raptor2-2.0.15/0000755000175000017500000000000012425347074010201 500000000000000raptor2-2.0.15/build/0000755000175000017500000000000012425347071011275 500000000000000raptor2-2.0.15/build/ltversion.m40000644000175000017500000000126212425344561013506 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) raptor2-2.0.15/build/pkg.m40000644000175000017500000001716712127610770012252 00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR raptor2-2.0.15/build/missing0000755000175000017500000002415212425344565012625 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor2-2.0.15/build/ltmain.sh0000644000175000017500000105202612425344561013044 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [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 # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # 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. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # 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" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # 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='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # 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 "$opt_dry_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" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # 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= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_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 $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # 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 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) 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 "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" 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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # 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 } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # 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. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" 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 func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile="$func_basename_result" 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" 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 func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append 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 func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" 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 func_append 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. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append 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 func_append 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" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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* | *-cegcc* | *-*-haiku*) # 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 func_append deplibs " System.ltframework" 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 func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" 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*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" 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 func_append 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. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append 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 func_append 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" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'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\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; 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 # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi 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 "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" 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 \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; 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 func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" 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 func_dirname "$lib" "" "." ladir="$func_dirname_result" 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 *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; 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 func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` 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 use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac 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. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append 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 func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$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 func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac 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 func_append 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*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; 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 $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append 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 "$prefer_static_libs,$installed" = "built,yes"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append 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 case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" 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* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 "$opt_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 (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then 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 && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append 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 func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append 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:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; 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:"*) ;; *) func_append 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 [\\/]*) func_append 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*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append 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" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= 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 "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi 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 "*) ;; *) func_append 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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" 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 test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # 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="$1" number_minor="$2" number_revision="$3" # # 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 # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; 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]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result 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 func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; 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 func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_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 | *.gcno) ;; $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 func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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 " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_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 func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 "$opt_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 shift realname="$1" 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_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:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append 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. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "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" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi 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\" test "X$libobjs" = "X " && libobjs= 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( 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 "$opt_mode" = relink; then $opt_dry_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 func_show_eval '${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 func_show_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 "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_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 and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_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" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status 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 func_append 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 func_append 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi 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" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED '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 "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } 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 $symfileobj" 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" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append 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 # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 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 func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { 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) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug 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) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append 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 func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 raptor2-2.0.15/build/config.sub0000755000175000017500000010532712425344565013215 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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, see . # # 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. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: raptor2-2.0.15/build/install-sh0000755000175000017500000003325612425344565013237 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor2-2.0.15/build/compile0000755000175000017500000001615212425344565012605 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-03-05.13; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. # Written by Tom Tromey . # # 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, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor2-2.0.15/build/depcomp0000755000175000017500000005064312425344566012610 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. # 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, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor2-2.0.15/build/ltsugar.m40000644000175000017500000001042412425344561013142 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) raptor2-2.0.15/build/gtk-doc.m40000644000175000017500000000461112425344561013012 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl check for tools we added during development AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) dnl don't check for glib if we build glib if test "x$PACKAGE_NAME" != "xglib"; then dnl don't fail if someone does not have glib PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) fi fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], [build documentation in html format [[default=yes]]]),, [enable_gtk_doc_html=yes]) AC_ARG_ENABLE([gtk-doc-pdf], AS_HELP_STRING([--enable-gtk-doc-pdf], [build documentation in pdf format [[default=no]]]),, [enable_gtk_doc_pdf=no]) if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) raptor2-2.0.15/build/config.guess0000755000175000017500000012743212425344565013553 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file 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, see . # # 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. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: raptor2-2.0.15/build/ar-lib0000755000175000017500000001330312425344565012316 00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010, 2012 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat <='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # 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 cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS raptor2-2.0.15/build/ltoptions.m40000644000175000017500000003007312425344561013516 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) raptor2-2.0.15/ChangeLog0000644000175000017500000006227612425347004011701 000000000000002014-11-01 Dave Beckett * Snapshotted raptor2_2_0_15 for 2.0.15 release (GIT 815e4a75a0e1f15a5cf35de48a3d0b32a14c5663) * src/turtle_lexer.l, tests/trig/Makefile.am, tests/trig/bug-584-dos.out, tests/trig/bug-584-dos.trig, tests/trig/bug-584-unix.out, tests/trig/bug-584-unix.trig: Handle \r in TRiG "graph-name {" Fixes Issue #0000584 http://bugs.librdf.org/mantis/view.php?id=584 * src/turtle_lexer.l: (turtle_token_print): Add GRAPH_NAME_LEFT_CURLY * src/turtle_lexer.l: (turtle_token_print): Add LEFT/RIGHT_CURLY * src/turtle_lexer.l: (main): Fix turtle_lexer_test to pass in string, not use yyinput * tests/ntriples/Makefile.am, tests/ntriples/bug-577.nt, tests/ntriples/bug-577.out: Add ntriples test bug-577 for URI escaping * src/turtle_common.h, src/turtle_parser.y: Rename raptor_turtle_expand_name_escapes to raptor_turtle_expand_qname_escapes * src/raptor_internal.h, src/turtle_common.c, src/turtle_lexer.l: (raptor_stringbuffer_append_turtle_string): Enforce URI restrictions. Add is_uri argument to distinguish. Report type label correctly. URIs may not have \t \b \n \r \f or raw ' ' or \u0020 or \u003C or \u003E Update all raptor_stringbuffer_append_turtle_string callers to pass URI flag. * src/raptor_ntriples.c: (raptor_ntriples_parse_term_internal): Enforce URI restrictions. URIs may not have \t \b \n \r \f or raw ' ' or \u0020 or \u003C or \u003E * src/raptor_internal.h, src/raptor_ntriples.c, src/turtle_common.c, src/turtle_lexer.l: Remove raptor_turtle_check_uri_string() which is at wrong level. Needs to be checked in earlier lexing so e.g. illegal escapes in URIs such as \b are found. For example. 2014-10-28 Dave Beckett * docs/raptor-changes.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_parse.c, src/raptor_serialize.c: (raptor_world_get_parsers_count, raptor_world_get_serializers_count): Added Fixes Issue #0000581 http://bugs.librdf.org/mantis/view.php?id=581 2014-10-26 Dave Beckett * src/raptor_general.c: doc fix Fixes Issue #0000579 http://bugs.librdf.org/mantis/view.php?id=579 * src/raptor_iostream.c: Code tidy; use nobj for raptor_iostream_write_bytes() return value. Related to Issue #0000575 fix * src/raptor_iostream.c: Fix return values for raptor_iostream_{hexa,}decimal_write (raptor_iostream_decimal_write, raptor_iostream_hexadecimal_write): Return non-0 if number of objects returned from raptor_iostream_write_bytes() does not match expected length. Fixes Issue #0000575 http://bugs.librdf.org/mantis/view.php?id=575 * src/raptor_ntriples.c, src/raptor_term.c, tests/ntriples/Makefile.am, tests/ntriples/bug-574.nt, tests/ntriples/bug-574.out: Accept '_' as alias/typo for '-' in lang strings. Replace on parsing. Fixes Issue #0000574 http://bugs.librdf.org/mantis/view.php?id=574 2014-10-20 Dave Beckett * Merge pull request #16 from rhmccullough/rdf-nil do not change "( )" to "rdf:nil" 2014-10-19 Dave Beckett * docs/Makefile.am, docs/raptor-1-to-2-map.tsv, docs/raptor-changes.tsv: Rename changes file to raptor-changes.tsv Not just about v1 to v2 * scripts/process-changes.pl: Make process-changes.pl report wrong fields count * .travis.yml: run autogen.sh not configure twice * scripts/install-bison3.sh: delete working dir * scripts/install-bison3.sh: sudo * .travis.yml: Looks like Travis OS support is not generally available http://blog.travis-ci.com/2014-05-13-multi-os-feature-available/ 2014-10-19 Richard H. McCullough * src/raptor_serialize_turtle.c: do not change "( )" to "rdf:nil" In tests/turtle: rapper -i turtle -o turtle test-08.ttl changes "( )" to "rdf:nil". This change to src/raptor_serialize_turtle.c will produce "( )" in the output file. 2014-10-19 Dave Beckett * .travis.yml: Quote TRAVIS_OS_NAME that doesn't always seem to be defined * .travis.yml: use test not [ ] * RELEASE.html: 2.0.15 * .travis.yml, scripts/install-bison3.sh: Travis update attempt 2014-10-12 Dave Beckett * tests/rdfa11/Makefile.am: doc * tests/rdfa11/0297.out, tests/rdfa11/Makefile.am: 0297 passes * tests/rdfa11/0303.out, tests/rdfa11/Makefile.am: 0303 passes * tests/rdfa11/Makefile.am: 26 failures * tests/rdfa11/0235.out, tests/rdfa11/Makefile.am: 0235 passes * tests/rdfa11/Makefile.am: Fix error report again * tests/rdfa11/0134.out: fix 134 out * tests/rdfa11/0134.out, tests/rdfa11/Makefile.am: 0134 passes * tests/rdfa11/0197.out, tests/rdfa11/Makefile.am: 0197 passes * tests/rdfa11/Makefile.am: 0197 now fails, 0302 now passes. * tests/rdfa11/Makefile.am: Tidy failure output * tests/rdfa11/0295.out: Update 0295 output 2014-10-10 Dave Beckett * librdfa/curie.c: Support full URLs for typeof. librdfa commit 5b73975a778ee00f328457356a69163911d540a5 2014-10-09 Dave Beckett * src/Makefile.am: Further fix flex/bison rules to silence them in normal runs * configure.ac, src/parsedate.y, src/raptor_internal.h, src/raptor_rdfxml.c: Use __FUNCTION__ (c99) replacing __func__ (c90) * src/sort_r.h: Add BSD header checks from sort_r * src/raptor_turtle_writer.c: Trailing , * configure.ac: Add some GCC5 warning flags * Merge pull request #14 from hroptatyr/compiler-support Intel C compiler (icc) support 2014-10-09 Sebastian Freundt * librdfa/rdfa.c, librdfa/triple.c, utils/rapper.c: const'ify string literals and char pointers that needn't be changed librdfa (start_element): const'ify umap_key librdfa (rdfa_complete_object_literal_triples): const'ifty current_object_literal rapper (print_graph): const'ify label * configure.ac: Always use AC_LANG_WERROR when checking for compiler warning flags Many gcc-compatible compilers (icc, clang, etc.) verbosely ignore gcc command line flags issuing a warning of some sort. Catch these warnings and turn them into errors when checking for support of specific warning flags. 2014-10-04 Dave Beckett * scripts/Makefile.am, scripts/fix-bison, scripts/fix-bison.pl, scripts/fix-flex, scripts/fix-flex.pl, src/Makefile.am: Rename fix-flex, fix-bison to have .pl suffix * ChangeLog, NEWS.html, RELEASE.html: 2.0.15 2014-09-25 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_filter_triples): Fix check [gcc5] This has been broken since 2007 but just meant too much work was being done. Original commit that added this 8bb88c9c4a5800b1163b50d2ff12b5245b4b1498 2014-08-21 Dave Beckett * utils/rdfdiff.c: Provide title and usage if args are missing [Coverity CID 72385] 2014-08-09 Dave Beckett * src/raptor_term.c: (raptor_new_term_from_blank): Accept "" as same as NULL blank 2014-08-04 Dave Beckett * src/raptor_uri.c: raptor_uri_counted_filename_to_uri_string handles a counted string (raptor_uri_counted_filename_to_uri_string): Do not look for end NUL char, count lengths. Fixes Issue #0000576 http://bugs.librdf.org/mantis/view.php?id=576 * src/raptor_turtle_writer.c: raptor_turtle_writer_quoted_counted_string handles a counted string (raptor_turtle_writer_contains_newline): Add len param and use it, drop strlen(). (raptor_turtle_writer_quoted_counted_string): Use len, drop strlen() and call raptor_turtle_writer_contains_newline with passed in len. Fixes Issue #0000576 http://bugs.librdf.org/mantis/view.php?id=576 * src/raptor_uri.c: Do not assume NUL terminated string in raptor_new_uri_from_counted_string (raptor_new_uri_from_counted_string): Remove debug assert and use fwrite to emit counted URI string to debug file handler. Fixes Issue #0000576 http://bugs.librdf.org/mantis/view.php?id=576 * src/raptor_internal.h, src/turtle_parser.y: Add RAPTOR_DEBUG_FH define internally 2014-08-02 Dave Beckett * INSTALL.html: Fix flex url 2014-07-27 Dave Beckett * src/raptor_iostream.c: Document sink handlers 2014-07-26 Dave Beckett * src/raptor_rfc2396.c: (raptor_uri_normalize_path): Check size of output buffer is big enough. 2014-07-07 Dave Beckett * README.html, INSTALL.html: bye bye sf * README.html: Update TRiG pointer, conformance 2014-06-29 Dave Beckett * src/sort_r.c: correct docs; does not always use sort_r * src/ssort.h: one more rename * docs/raptor-1-to-2-map.tsv, src/raptor2.h.in, src/raptor_sequence.c, src/sort_r.c: raptor_data_compare_arg_handler renamed from raptor_sort_r_compare Added it to changelog too * src/sort_r.c: Make sort test quiet on success * src/sort_r.c: const * src/sort_r.c: portability * configure.ac, src/Makefile.am, src/sort_r.c, src/ssort.h: Add public domain ssort_r if qsort_r and qsort_s are not present * docs/raptor-1-to-2-map.tsv, src/raptor2.h.in, src/raptor_sequence.c: (raptor_sequence_sort_r): Added based on raptor_sort_r() * docs/raptor-1-to-2-map.tsv, src/Makefile.am, src/raptor2.h.in, src/sort_r.c: (raptor_sort_r): Added based on public domain sort_r() * src/sort_r.h, sort_r.c: Public Domain sort_r() by Isaac Turner Imported GIT commit 7c60ef94753624291055af0b1eec291f8c4bd5a7 from https://github.com/noporpoise/sort_r 2014-05-21 Dave Beckett * src/parsedate.y: Update to point to PHP GIT * src/parsedate.y: Fix -99 <= var <= 99 timezone interval check. Thanks to Richard Trieu for the report. 2014-05-11 Dave Beckett * docs/raptor-docs.xml: 2014 2014-05-09 Dave Beckett * src/raptor_locator.c, src/snprintf.c: (raptor_locator_format): Add a NUL to terminate output string. See librdf commit aa3bf4ccf4cc9381a1c198566428812af28944de that works around this. 2014-05-05 Dave Beckett * utils/rapper.1: Use \- for hyphen * CMakeLists.txt, NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.15 * ChangeLog: Snapshotted raptor2_2_0_14 for 2.0.14 release (GIT 93bc8ef8fa1c0b6b4278412f5d12e558b70db708) * src/raptor_uri.c: fix autodoc * NEWS.html, RELEASE.html: 2.0.14 * Update tmpls * Snapshotted raptor2_2_0_14 for 2.0.14 release (GIT 93bc8ef8fa1c0b6b4278412f5d12e558b70db708) 2014-05-03 Dave Beckett * configure.ac: Import flex check from rasqal 2014-04-28 Dave Beckett * scripts/fix-bison: Remove dead code from bison output 2014-04-27 Dave Beckett * tests/rdfa/Makefile.am: Fix failure test and update expected failures: +0294.xml +0349.xml * tests/rdfa11/Makefile.am: Echo message when failures are not what expected * librdfa/rdfa.c: (rdfa_init_base): Fix Fixes support broke in commit 9447e886ad66a1c3dd2c877341feca639824488a 2014-04-26 Dave Beckett * tests/rdfa11/Makefile.am: Fail exit on test failures - broken for a long itme * src/turtle_parser.y: (collection): Use YYERR_MSG_GOTO to stop early break and add debug info * src/turtle_parser.y: Import header code from turtle-parser.y 2014-04-20 Dave Beckett * configure.ac, src/turtle_lexer.l: Define FLEX_VERSION_DECIMAL and use to not duplicate column prototypes. * scripts/fix-flex: Convert buffer check for PREFIX_restart into simple form * scripts/fix-flex: Use YY_CURRENT_BUFFER_LVALUE in PREFIX_pop_buffer_state [coverity CID 29295] * scripts/fix-flex: pop_buffer_state does not get changed with rule; delete ref * src/turtle_lexer.l: YY_FATAL_ERROR always calls abort() - hopefully coverity notices * scripts/fix-flex: Remove dead code after YY_INPUT - which is a return NULL [coverity CID 29302] * scripts/fix-flex: Match (static) yy_ prefix functions too * scripts/fix-flex: Use YY_CURRENT_BUFFER_LVALUE when ensured ok [coverity CID 29242 29252 29253 29295] Rewrite YY_CURRENT_BUFFER to YY_CURRENT_BUFFER_LVALUE in some functions after a PREFIX_ensure_buffer_stack() call has been seen. * scripts/fix-flex: Give function processing a state var %fn_state * scripts/fix-flex: Cleanups - Figure out lexer prefix from input - Capture current function name in $cur_function - Rewrite some checks to use exact function name - Added $debug var 2014-04-19 Dave Beckett * scripts/fix-bison: Set yytoken to non-negative value for [coverity CID 29259] * scripts/fix-bison: Add a default value for yyformat for [coverity CID 10838] * src/raptor_xml.c: Added coverity[negative_returns] for second use of unichar_len [CID 29257] * librdfa/lists.c: (rdfa_complete_list_triples): Init tmp for error path [coverity CID 36737] * src/raptor_grddl.c: (raptor_grddl_run_xpath_match): Free base_uri on error path [coverity CID 34618] * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Free iterator on error path [coverity CID 34617] 2014-04-18 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): root_element NULL [coverity CID 34616] (raptor_rss10_emit_rdfxml_item_triples): start xml root_element if not NULL [coverity CID 34616] * librdfa/curie.c: (rdfa_resolve_uri): Check end_index2 is not NULL [coverity CID 29261] * librdfa/lists.c: (rdfa_complete_list_triples): strdup and strstr output. [coverity CID 29260] (rdfa_complete_list_triples): Be careful for strdup and strstr returning NULL. [coverity CID 29260] * src/raptor_namespace.c: Check return of raptor_xml_escape_string for errors [coverity CID 29258] (raptor_namespace_format_as_xml): Check return values of raptor_xml_escape_string() for negative failure before casting to size_t. * src/raptor_iostream.c: (test_read_from_filename): Use int for read bytes values * src/raptor_parse.c: Treat raptor_iostream_read_bytes() returning int [coverity CID 29256] (raptor_parser_parse_iostream): Treat raptor_iostream_read_bytes() return as int, convert to size_t when it's known to be non-negative. [coverity CID 29256] The real fix is incompatible API change to make iostream return size_t or ssize_t for reads. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement): Restore *name always [coverity CID 29255] * librdfa/rdfa.c: (end_element): Do not call rdfa_complete_list_triples() with no new subject [coverity CID 29254] * src/raptor_xml_writer.c: (raptor_xml_writer_start_element_common): attribute namespaces [coverity CID 29244] (raptor_xml_writer_start_element_common): Process attribute namespaces only if there is a namespace stack [coverity CID 29244] * src/raptor_librdfa.c: rdfa requires a base URI [coverity CID 29250] (raptor_librdfa_parse_start): Add check for base URI (raptor_librdfa_parser_register_factory): Mark 'rdfa' parser needs a base URI. * librdfa/triple.c: (rdfa_complete_object_literal_triples) strchr on NULL [coverity CID 29429] (rdfa_complete_object_literal_triples): Need non NULL context->xml_literal to do strchr() on it [coverity CID 29429] * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement): Remove always 0 end_predicate_element [coverity CID 29238] * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Free root_qname in logical place [coverity CID 29236] * src/raptor_xml_writer.c: (raptor_xml_writer_start_element_common): nstack [coverity CID 29244] (raptor_xml_writer_start_element_common): Defining xml language declaration requires namespace declarations so add nstack check. * src/raptor_grddl.c: (raptor_grddl_run_xpath_match): Check if uri_string is not NULL [coverity CID 29243] * src/raptor_log.c: (raptor_log_error): Allow world to be NULL [coverity CID 29241] * src/raptor_log.c: (raptor_log_error_varargs): Allow world to be NULL [coverity CID 29241] * librdfa/triple.c: (rdfa_complete_current_property_value_triples): Remove duplicate variable [coverity CID 29240] * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Remove logically dead code [coverity CID 29239] loop is always 0 or 1 so don't check for other values. * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Remove logically dead code [coverity CID 29237] No need to test freeing serializer twice. * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Check parse start/chunk returns [coverity CID 29235] * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): check raptor_avltree_iterator_next() return [coverity CID 29234] 2014-04-17 Dave Beckett * src/raptor_parse.c: (raptor_parser_fatal_error): set parser failed if not NULL [coverity CID 29283] * src/raptor_xml_writer.c: (raptor_xml_writer_start_element_common): nspace_declarations is never NULL on return path [coverity CID 29284] * src/raptor_xml_writer.c: (raptor_xml_writer_start_element): element is not NULL [coverity CID 29285] * src/raptor_rss.c: (raptor_rss_end_element_handler): rss_element is never NULL [coverity CID 29286] * src/raptor_abbrev.c: (raptor_new_abbrev_subject): Do not use subject->properties on debug path [coverity CID 29287] * src/raptor_uri.c: (raptor_uri_counted_filename_to_uri_string): Error path cannot use NULL buffer [coverity CID 29302] * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement): Free object_uri_string always [coverity CID 29269] * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Free iter on error [coverity CID 29263] * src/turtle_lexer.l: Free stringbuffer on error case [coverity CID 29273] 2014-04-16 Dave Beckett * librdfa/rdfa.c: (rdfa_init_base): Fix uri_start dead code again [coverity CID 29700] * src/raptor_abbrev.c: (raptor_new_abbrev_subject): node arg is never NULL [coverity CID 29288] * src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name): move strlen after local_name NULL check [coverity CID 29289] * utils/rdfdiff.c: (main): from_string and to_string are never NULL [coverity CID 29290, CID 29291] * librdfa/triple.c: (rdfa_complete_object_literal_triples): NULL check for context->xml_literal [coverity CID 29292] * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_set_xml_writer): Check xml_writer NULL [coverity CID 29293] * src/raptor_log.c: (raptor_log_error_varargs): Can assume world is not NULL [coverity CID 29294] * librdfa/rdfa.c: (end_element): Add parent_context check around block [coverity CID 29296] * librdfa/rdfa.c: (rdfa_init_base): Check for uri_start before use [coverity CID 29297] * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Free iter on error path [coverity CID 29263] * src/raptor_parse.c: (raptor_world_guess_parser_name): Free scores on error path [coverity CID 29264] * src/raptor_grddl.c: (raptor_grddl_run_recursive): Free ibuffer [coverity CID 29265] * src/raptor_rss.c: (raptor_rss_end_element_handler): Free field on error path [coverity CID 29266] * src/raptor_rss.c: (raptor_rss_insert_rss_link): Free field on error path [coverity CID 29267] * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement): Free object_uri_string on error path [coverity CID 29269] * src/raptor_serialize_rss.c: (raptor_rss10_serialize_end): Error path entry_uri cleanup [coverity CID 29270] * librdfa/lists.c: (rdfa_complete_list_triples): Free bnode after loop [coverity CID 29272] Also strdup() the rdf:nil string so it can be freed. * src/turtle_lexer.l: Free stringbuffer on error case [coverity CID 29273] * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_internal.h, src/raptor_rfc2396.c, src/raptor_uri.c: Added raptor_uri_counted_filename_to_uri_string (raptor_uri_counted_filename_to_uri_string): Added based on raptor_uri_filename_to_uri_string. Updated to properly check the length of the incoming filename and ensure (on unix) that the path buffer is big enough. Eliminate strcat() calls while here. For win32, properly calculate the length when there is a :\ in the filename. RAPTOR_FATAL4 added for debugging URI length failures * src/turtle_common.c: (raptor_turtle_expand_name_escapes): arg free on error path [coverity CID 29303] (raptor_turtle_expand_name_escapes): Remove RAPTOR_FREE of name argument on error paths - this function does not own name. 2014-03-24 Dave Beckett * ChangeLog, ChangeLog.14, Makefile.am: ChangeLog.14 for 2013 2014-03-24 Dave Beckett * librdfa/lists.c, librdfa/rdfa.c: librdfa fixes for -Wunreachable-code (clang) 2014-02-24 Dave Beckett * src/raptor_general.c, src/raptor_json.c, src/raptor_rss.c, src/raptor_turtle_writer.c: Fixes for -Wunreachable-code (clang) (raptor_rss_insert_identifiers): When inserting identifiers, allow the loop to continue searching. (raptor_rss_start_namespaces): Remove loop since 1 value is enough. * configure.ac: Add -Wunreachable-code (clang) 2014-02-13 Dave Beckett * tests/turtle-2013/Makefile.am, tests/turtle-2013/oops.nt, tests/turtle-2013/oops.ttl: Add test and expected response for RDF 1.1 Turtle post-REC error Announced: http://lists.w3.org/Archives/Public/public-rdf-comments/2014Feb/0018.html Expected answer requested: http://lists.w3.org/Archives/Public/public-rdf-comments/2014Feb/0020.html 2014-02-12 Dave Beckett * tests/ntriples-2013/LITERAL.nt, tests/ntriples-2013/LITERAL_all_controls.nt, tests/ntriples-2013/LITERAL_all_punctuation.nt, tests/ntriples-2013/LITERAL_with_2_dquotes.nt, tests/ntriples-2013/LITERAL_with_2_squotes.nt, tests/ntriples-2013/LITERAL_with_UTF8_boundaries.nt, tests/ntriples-2013/LITERAL_with_dquote.nt, tests/ntriples-2013/LITERAL_with_squote.nt, tests/ntriples-2013/Makefile.am, tests/ntriples-2013/README, tests/ntriples-2013/literal.nt, tests/ntriples-2013/literal_all_controls.nt, tests/ntriples-2013/literal_all_punctuation.nt, tests/ntriples-2013/literal_with_2_dquotes.nt, tests/ntriples-2013/literal_with_2_squotes.nt, tests/ntriples-2013/literal_with_UTF8_boundaries.nt, tests/ntriples-2013/literal_with_dquote.nt, tests/ntriples-2013/literal_with_squote.nt: Renames to match W3C mercurial repo names 2014-01-29 Dave Beckett * CMakeLists.txt, NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.14 * Snapshotted raptor2_2_0_13 for 2.0.13 release (GIT fde3f210e7442de6de16c410443fd8a695f09820) 2014-01-29 Dave Beckett * NEWS.html, RELEASE.html: 2.0.13 2014-01-27 Dave Beckett * ChangeLog, INSTALL.html, LICENSE.html, NEWS.html, README.html, RELEASE.html, TODO.html, UPGRADING.html: 2.0.13 and 2014 * configure.ac: Use presence of libxml / curl config programs as test for presence Symptom was that after configuring, curl was present but not used for WWW fetching. Original commit that changed this was commit 7da03ba5cd6e45ea41afebd4955acf6e96e9d622 Date: Fri Apr 5 19:01:55 2013 +0100 which was Raptor 2.0.10 onwards 2014-01-15 Dave Beckett * autogen.sh: Create NEWS and README 2014-01-14 Dave Beckett * Makefile.am: fix html rules more * .travis.yml: Travis CI fix * Makefile.am: fix html rule 2014-01-10 Dave Beckett * src/raptor_abbrev.c: Revert: (raptor_abbrev_subject_find): Remove double free of lookup_node. This reverts commit c1c82f1be5d86ebf95fa10b86a938d6799e35626. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Handle NULL ref->path * src/raptor_abbrev.c: (raptor_abbrev_subject_find): Remove double free of lookup_node Remove call to raptor_free_abbrev_node() 2014-01-07 Dave Beckett * configure.ac: Use AC_CHECK_PROGS to find jing AC_CHECK_PROG doesn't default to setting it as found! 2014-01-04 Dave Beckett * src/raptor_general.c: 2014 * src/turtle_lexer.l: Remove YY_INPUT - never want to read from stdin/file 2014-01-02 Dave Beckett * Merge pull request #12 from dajobe/bison3.0-new Switch to use and require Bison 3.0 * src/turtle_lexer.l: Provide missing flex prototypes for flex 2.5.35 or earlier * src/parsedate.y: (raptor_parse_date): No need for cast to void* for yyparse 2014-01-01 Dave Beckett * src/turtle_parser.y: Remove redundant declaration of turtle_lexer_lex * configure.ac, src/Makefile.am: Alter configure to accept bison 3.0.0 or newer, no yacc * src/parsedate.y: Add bison 3.0 directives * src/parsedate.y: Bison 3.0 the parsedate parser - Update to new directives - Set %param - Update error call * src/turtle_parser.y: Bison 3.0 the turtle parser - Use bison 3.0+ directives replacing all command line arguments - Update lexer and parser parameters (remove use of YYLEX_PARAM) - (turtle_parser_error): Add scanner arg. - Use rdf_parser argument directly rather than via casted variable. - Add %empty directives - Remove casts to raptor_parser* that are no longer needed - (turtle_parse): Pass in scanner * src/turtle_parser.y: Remove YY_DECL * src/turtle_lexer.l: Add %option bison-bridge * src/turtle_lexer.l: Remove turtle_lexer_lex prototype / header override No longer use YYDECL - the default works. * src/turtle_lexer.l: Replace turtle_parser_lval with yylval * src/turtle_common.c: Move turtle_lexer.h include earlier so YYSTYPE can be found * src/turtle_lexer.l, src/turtle_parser.y: Remove token union unused integer field raptor2-2.0.15/README.html0000644000175000017500000002534412365014231011741 00000000000000 Raptor RDF Syntax Library

Raptor RDF Syntax Library

Dave Beckett

Overview

Raptor is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. The supported parsing syntaxes are RDF/XML, N-Quads, N-Triples 1.0 and 1.1, TRiG, Turtle 2008 and 2013, RDFa 1.0 and 1.1, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing syntaxes are RDF/XML (regular, abbreviated, XMP), Turtle 2013, N-Quads, N-Triples 1.1, Atom 1.0, RSS 1.0, GraphViz DOT, HTML and JSON.

Raptor was designed to work closely with the Redland RDF library (RDF Parser Toolkit for Redland) but is entirely separate. It is a portable library that works across many POSIX systems (Unix, GNU/Linux, BSDs, OSX, cygwin, win32).

A summary of the changes can be found in the NEWS file, detailed API changes in the release notes and file-by-file changes in the ChangeLog.

Details of upgrading from Raptor 1 as described in the Upgrading document.

  • Designed to integrate well with Redland
  • Parses content on the web if libcurl, libxml2 or BSD libfetch is available.
  • Supports all RDF terms including datatyped and XML literals
  • Optional features including parsers and serialisers can be selected at configure time.
  • Language bindings to Perl, PHP, Python and Ruby when used via Redland
  • No memory leaks
  • Fast
  • Standalone rapper RDF parser utility program

Known bugs and issues are recorded in the Redland issue tracker.

Parsers

RDF/XML Parser

A Parser for the standard RDF/XML syntax.

N-Quads Parser

A parser for the RDF 1.1 N-Quads - A line-based syntax for an RDF datasets, W3C Candidate Recommendation, 05 November 2013. This is an extension to N-Triples, providing an optional 4th context graph term at the end of the line when a triple is associated with a named graph.

N-Triples Parser

A parser for the RDF 1.1 N-Triples - A line-based syntax for an RDF graph, W3C Candidate Recommendation, 05 November 2013 (aka N-Triples 2013) based on the older N-Triples.

Turtle Parser

A parser for the Turtle Terse RDF Triple Language W3C Candidate Recommendation, 19 February 2013 based on earlier work Turtle Terse RDF Triple Language (2004)

TRiG Parser

A parser for the RDF 1.1 TriG RDF Dataset Language.

The parser does not support the entire 1.1 TRiG specification; the '{' ... '}' around a graph and the GRAPH keyword may not be omitted.

RSS "tag soup" parser

A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. Attempts to turn the input into RSS 1.0 RDF triples. True RSS 1.0, as a full RDF vocabulary, is best parsed by the RDF/XML parser. It also generates triples for RSS enclosures.

This parser also provides support for the Atom 1.0 syndication format defined in IETF RFC 4287

GRDDL and microformats parser

A parser/processor for Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed. It uses either an XML or a lax HTML parser to allow HTML tag soup to be read.

The parser passes the all the GRDDL tests as of Raptor 1.4.16.

The parser also handles hCard and hReview using public XSL sheets.

RDFa parser

A parser for RDFa 1.0 (W3C Recommendation 14 October 2008) and RDFa 1.1 (W3C Recommendation 07 June 2012) implemented via librdfa linked inside Raptor. librdfa was, written primarily by Manu Sporny of Digital Bazaar and is licensed with the same license as Raptor.

As of Raptor 2.0.8 the RDFa parser passes all of the RDFa 1.0 test suite except for 4 tests and all of the RDFa 1.1 test suite except for 30 tests.

Serializers

RDF/XML Serializer

A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group in 2004. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.

A second serializer is provided using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.

N-Quads Serializer

A serializer for the RDF 1.1 N-Quads -A line-based syntax for an RDF datasets, W3C Candidate Recommendation, 05 November 2013. This is an extension to N-Triples, providing an optional 4th context graph term at the end of the line when a triple is associated with a named graph.

N-Triples Serializer

A serializer for the RDF 1.1 N-Triples - A line-based syntax for an RDF graph (aka N-Triples 2013) based on the earlier N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.

Atom 1.0 Serializer

A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287.

JSON Serializers

Two serializers for to write triples encoded in JSON:

  1. json: in a resource-centric abbreviated form like Turtle or RDF/XML-Abbreviated as defined by: RDF 1.1 JSON Alternate Serialization (RDF/JSON), W3C Working Group Note, 07 November 2013
  2. json-triples: a triple-centric format based on the SPARQL results in JSON format.

JSON-LD is not supported - too complex to implement.

GraphViz DOT Serializer

An serializer to the GraphViz DOT format which aids visualising RDF graphs.

RSS 1.0 Serializer

A serializer to the RDF Site Summary (RSS) 1.0 format.

Turtle Serializer

A serializer for the Turtle Terse RDF Triple Language W3C Candidate Recommendation, 19 February 2013

XMP Serializer

An alpha quality serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document.

Documentation

The public API is described in the libraptor.3 UNIX manual page. It is demonstrated in the rapper utility program which shows how to call the parser and write the triples in a serialization. When Raptor is used inside Redland, the Redland documentation explains how to call the parser and contains several example programs. There are also further examples in the example directory of the distribution.

To install Raptor see the Installation document.

Sources

The packaged sources are available from http://download.librdf.org/source/ (master site) The development GIT sources can also be browsed at GitHub or checked out at git://github.com/dajobe/raptor.git

License

This library is free software / open source software released under the LGPL (GPL) or Apache 2.0 licenses. See LICENSE.html for full details.

Mailing Lists

The Redland mailing lists discusses the development and use of Raptor and Redland as well as future plans and announcement of releases.


Copyright (C) 2000-2014 Dave Beckett
Copyright (C) 2000-2005 University of Bristol

raptor2-2.0.15/README0000644000175000017500000001677112421010767011005 00000000000000 #DOAP Raptor RDF Syntax Library Dave Beckett Overview Raptor is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. The supported parsing syntaxes are RDF/XML, N-Quads, N-Triples 1.0 and 1.1, TRiG, Turtle 2008 and 2013, RDFa 1.0 and 1.1, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing syntaxes are RDF/XML (regular, abbreviated, XMP), Turtle 2013, N-Quads, N-Triples 1.1, Atom 1.0, RSS 1.0, GraphViz DOT, HTML and JSON. Raptor was designed to work closely with the Redland RDF library (RDF Parser Toolkit for Redland) but is entirely separate. It is a portable library that works across many POSIX systems (Unix, GNU/Linux, BSDs, OSX, cygwin, win32). A summary of the changes can be found in the NEWS file, detailed API changes in the release notes and file-by-file changes in the ChangeLog. Details of upgrading from Raptor 1 as described in the Upgrading document. * Designed to integrate well with Redland * Parses content on the web if libcurl, libxml2 or BSD libfetch is available. * Supports all RDF terms including datatyped and XML literals * Optional features including parsers and serialisers can be selected at configure time. * Language bindings to Perl, PHP, Python and Ruby when used via Redland * No memory leaks * Fast * Standalone rapper RDF parser utility program Known bugs and issues are recorded in the Redland issue tracker. Parsers RDF/XML Parser A Parser for the standard RDF/XML syntax. * Fully handles the RDF/XML syntax updates for XML Base, xml:lang, RDF datatyping and Collections. * Handles all RDF vocabularies such as FOAF, RSS 1.0, Dublin Core, OWL, DOAP * Handles rdf:resource / resource attributes * Uses libxml XML parser N-Quads Parser A parser for the RDF 1.1 N-Quads - A line-based syntax for an RDF datasets, W3C Candidate Recommendation, 05 November 2013. This is an extension to N-Triples, providing an optional 4th context graph term at the end of the line when a triple is associated with a named graph. N-Triples Parser A parser for the RDF 1.1 N-Triples - A line-based syntax for an RDF graph, W3C Candidate Recommendation, 05 November 2013 (aka N-Triples 2013) based on the older N-Triples. Turtle Parser A parser for the Turtle Terse RDF Triple Language W3C Candidate Recommendation, 19 February 2013 based on earlier work Turtle Terse RDF Triple Language (2004) TRiG Parser A parser for the RDF 1.1 TriG RDF Dataset Language. The parser does not support the entire 1.1 TRiG specification; the '{' ... '}' around a graph and the GRAPH keyword may not be omitted. RSS "tag soup" parser A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. Attempts to turn the input into RSS 1.0 RDF triples. True RSS 1.0, as a full RDF vocabulary, is best parsed by the RDF/XML parser. It also generates triples for RSS enclosures. This parser also provides support for the Atom 1.0 syndication format defined in IETF RFC 4287 GRDDL and microformats parser A parser/processor for Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed. It uses either an XML or a lax HTML parser to allow HTML tag soup to be read. The parser passes the all the GRDDL tests as of Raptor 1.4.16. The parser also handles hCard and hReview using public XSL sheets. RDFa parser A parser for RDFa 1.0 (W3C Recommendation 14 October 2008) and RDFa 1.1 (W3C Recommendation 07 June 2012) implemented via librdfa linked inside Raptor. librdfa was, written primarily by Manu Sporny of Digital Bazaar and is licensed with the same license as Raptor. As of Raptor 2.0.8 the RDFa parser passes all of the RDFa 1.0 test suite except for 4 tests and all of the RDFa 1.1 test suite except for 30 tests. Serializers RDF/XML Serializer A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group in 2004. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing. A second serializer is provided using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents. N-Quads Serializer A serializer for the RDF 1.1 N-Quads -A line-based syntax for an RDF datasets, W3C Candidate Recommendation, 05 November 2013. This is an extension to N-Triples, providing an optional 4th context graph term at the end of the line when a triple is associated with a named graph. N-Triples Serializer A serializer for the RDF 1.1 N-Triples - A line-based syntax for an RDF graph (aka N-Triples 2013) based on the earlier N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases. Atom 1.0 Serializer A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. JSON Serializers Two serializers for to write triples encoded in JSON: 1. json: in a resource-centric abbreviated form like Turtle or RDF/XML-Abbreviated as defined by: RDF 1.1 JSON Alternate Serialization (RDF/JSON), W3C Working Group Note, 07 November 2013 2. json-triples: a triple-centric format based on the SPARQL results in JSON format. JSON-LD is not supported - too complex to implement. GraphViz DOT Serializer An serializer to the GraphViz DOT format which aids visualising RDF graphs. RSS 1.0 Serializer A serializer to the RDF Site Summary (RSS) 1.0 format. Turtle Serializer A serializer for the Turtle Terse RDF Triple Language W3C Candidate Recommendation, 19 February 2013 XMP Serializer An alpha quality serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Documentation The public API is described in the libraptor.3 UNIX manual page. It is demonstrated in the rapper utility program which shows how to call the parser and write the triples in a serialization. When Raptor is used inside Redland, the Redland documentation explains how to call the parser and contains several example programs. There are also further examples in the example directory of the distribution. To install Raptor see the Installation document. Sources The packaged sources are available from http://download.librdf.org/source/ (master site) The development GIT sources can also be browsed at GitHub or checked out at git://github.com/dajobe/raptor.git License This library is free software / open source software released under the LGPL (GPL) or Apache 2.0 licenses. See LICENSE.html for full details. Mailing Lists The Redland mailing lists discusses the development and use of Raptor and Redland as well as future plans and announcement of releases. __________________________________________________________________ Copyright (C) 2000-2014 Dave Beckett Copyright (C) 2000-2005 University of Bristol raptor2-2.0.15/Makefile.am0000644000175000017500000000355112315200217012142 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - top level automake file for Raptor # # Copyright (C) 2000-2013 David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # SUBDIRS = librdfa src utils docs data tests examples scripts pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = raptor2.pc EXTRA_DIST=\ CMakeLists.txt \ ChangeLog.1 ChangeLog.2 ChangeLog.3 ChangeLog.4 ChangeLog.5 \ ChangeLog.6 ChangeLog.7 ChangeLog.8 ChangeLog.9 ChangeLog.10 ChangeLog.11 \ ChangeLog.12 ChangeLog.13 ChangeLog.14 \ README LICENSE.txt \ README.html NEWS.html LICENSE.html INSTALL.html \ README-cmake.md \ RELEASE.html \ LICENSE-2.0.txt NOTICE \ UPGRADING.html \ raptor2.rdf.in \ autogen.sh \ raptor2.spec.in \ raptor2.pc.in if RELEASE_VERSION EXTRA_DIST += raptor2.spec endif DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc if MAINTAINER_MODE # Create some text files from HTML sources LYNX=lynx HTML_TO_TEXT=TERM=vt100 $(LYNX) -dump -nolist SUFFIXES = .html .txt .html.txt: $(HTML_TO_TEXT) $< > $@ $(srcdir)/README: $(srcdir)/README.html $(HTML_TO_TEXT) $< > $@ $(srcdir)/NEWS: $(srcdir)/NEWS.html $(HTML_TO_TEXT) $< > $@ endif # Some people need a little help ;-) test: check raptor2-2.0.15/COPYING.LIB0000644000175000017500000006363710254306540011567 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! raptor2-2.0.15/ChangeLog.90000644000175000017500000032551611472513121012043 000000000000002008-11-26 Dave Beckett * docs/tmpl/section-general.sgml, docs/tmpl/section-triples.sgml: sgml docs * tests/turtle/Makefile.am: more workarounds for noisy gnu make * tests/turtle/Makefile.am: workaround gnu make being noisy * tests/Makefile.am, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/ex-62.rdf: Moved remaining turtle tests to tests/turtle * configure.ac, tests/Makefile.am, tests/all-escape.nt, tests/all-escape.rdf, tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt, tests/bad-04.nt, tests/bad-05.nt, tests/bad-06.nt, tests/ntriples, tests/ntriples/Makefile.am, tests/ntriples/all-escape.nt, tests/ntriples/all-escape.rdf, tests/ntriples/bad-00.nt, tests/ntriples/bad-01.nt, tests/ntriples/bad-02.nt, tests/ntriples/bad-03.nt, tests/ntriples/bad-04.nt, tests/ntriples/bad-05.nt, tests/ntriples/bad-06.nt, tests/ntriples/test.nt, tests/ntriples/test.out, tests/test.nt, tests/test.out: Moved ntriples tests to tests/ntriples * tests/Makefile.am: Removed unused OWL URLs * configure.ac, tests/ex*rdf, tests/ex*out, tests/bad*rdf, tests/warn*rdf, tests/warn*out, tests/wine*: Moved rdf/xml parsing and serializing tests to tests/rdfxml * src/raptor_nfc.c: (raptor_nfc_check): Invert check for raptor_nfc_check_combiners "check 3" to make legal Unicode sequence U+006b U+0061 U+0304 U+0062 U+006f U+006c as UTF-8 encoded bytes: 0x6b 0x61 0xcc 0x84 0x62 0x6f 0x6c work. Causes additional raptor_nfc_test failures but they are probably(?) not correct. raptor_nfc_test is not currently part of the normal test suite (make check) Fixes Issue#0000259 http://bugs.librdf.org/mantis/view.php?id=259 2008-11-22 Dave Beckett * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Calculate new string size correctly. * src/turtle_parser.y: (turtle_parse): Take a length arg and save a strlen inside lexer by using turtle_lexer__scan_bytes 2008-11-18 Dave Beckett * librdfa/rdfa.c: GIT commit 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a The bug appears whenever there is a subject and predicate specified on an element, but no child nodes for the object literal. Fixes Issue#0000289 http://bugs.librdf.org/mantis/view.php?id=289 2008-11-12 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixed raptor_log_error_to_handlers() calls when built with expat. Fixes issue #287 http://bugs.librdf.org/mantis/view.php?id=287 2008-11-07 Dave Beckett * configure.ac: handle empty LEX in test 2008-10-13 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (revert r14679, reapply r14459): Reintroduce sax2_initialized counter. This time to work around issues cleaning up libxml2 in case it was never initialized due to a failure earlier in raptor initialization. 2008-10-09 Lauri Aalto * src/raptor_grddl.c: (raptor_terminate_parser_grddl_common): Zero raptor_xslt_sec variable after xsltFreeSecurityPrefs() to prevent double deletions with multiple raptor instances in the same process. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish): (Revert r14459) Removed sax2_initialized counter from raptor_world. Does not serve its purpose if multiple raptor_worlds used. 2008-10-08 Lauri Aalto * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Revert r14677 as unnecessary * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: (raptor_world_instance): Internal function turned to an API function for legacy support. 2008-10-07 Lauri Aalto * src/raptor.h: Wrap raptor_world declaration to RAPTOR_WORLD_DECLARED preprocessor guards. * src/raptor_general.c: docs 2008-10-06 Dave Beckett * src/raptor.h: RAPTOR_DISABLE_V1 not RAPTOR_DISBALE_V1 2008-10-06 Lauri Aalto * src/raptor_set.c: Refactored raptor_set_test to use raptor v2 functions. * src/raptor_avltree.c: Refactored raptor_avltree_test to use raptor v2 functions. * src/raptor_turtle_writer.c: Refactored raptor_turtle_writer_test to use raptor v2 functions. * src/raptor_xml_writer.c: Refactored raptor_xml_writer_test to use raptor v2 functions. * src/raptor_www_test.c: Refactored raptor_www_test to use raptor v2 functions. * src/raptor_namespace.c: Refactored raptor_namespace_test to use raptor v2 functions. * src/raptor_uri.c: Refactored raptor_uri_test to use raptor v2 functions. * src/raptor_parse.c: Refactored raptor_parse_test to use raptor v2 functions. * utils/rdfdiff.c: Refactored rdfdiff to use raptor v2 APIs + internals. * src/raptor_internal.h, src/raptor_statement.c: Reorganized internal raptor_statement functions. (raptor_statement_copy): Require raptor_world param, replace earlier raptor_statement_copy_common() static function. (raptor_free_statement): Require raptor_world param, replace earlier raptor_free_statement_common() static function. Loses RAPTOR_DISABLE_V1 status. (raptor_print_statement_v1): Pulled static function to library internals. * utils/rapper.c: Refactored rapper to use raptor v2 API. * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_uri.c: (raptor_uri_to_relative_uri_string_v2): New v2 API function. raptor_uri_to_relative_uri_string() depends on V1 functions and cannot be used with RAPTOR_DISABLE_V1 or without raptor_init(). * src/raptor_internal.h: Fixed flipped flag * src/raptor_general.c: (raptor_world_open): Fixed return type * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www init/finish to support v2 raptor_world_instance. Retain source/binary compatibility with old API. (raptor_www_init_v2, raptor_www_finish_v2, raptor_www_no_www_library_init_finish_v2): New API functions that work with raptor_world objects. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h: Decouple raptor_world allocation and initialization to allow setting flags etc. before init. (raptor_world_open): New API function. (raptor_world_s): Internal struct gains opened field. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_parser_get_world, raptor_serializer_get_world): Added two new API functions to access raptor_world from a parser/serializer object. * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Added API flag RAPTOR_V2_AVAILABLE. Flagged v1 functions replaced with v2 variants with RAPTOR_V1 - easy to deprecate later. Wrapped v1 functions replaced with v2 variabrs in #ifndef RAPTOR_DISABLE_V1 - easy to remove old implementations if needed. * src/fix-bison: Keep #line references up to date * src/fix-bison, src/n3_parser.y, src/turtle_parser.y: HACK: Use fix-bison to pass in pure bison parser param (rdf_parser*) to %destructor - raptor_world required for raptor_free_uri_v2(). * src/raptor.h, src/raptor_serialize_ntriples.c: Refactored raptor_serialize_ntriples internals to use v2 raptor_world APIs. (raptor_iostream_write_statement_ntriples_v2): New API function that takes in a raptor_world param. 2008-10-03 Lauri Aalto * src/raptor_grddl.c: Refactored raptor_grddl internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Debug prints to use v2 APIs. * src/raptor_serialize.c: (raptor_serializer_register_factory): Fixed compiler warning in debug print. * src/raptor_namespace.c, src/raptor_qname.c, src/turtle_parser.y: Debug prints to use v2 APIs. * src/raptor.h, src/raptor_sequence.c: (raptor_new_sequence_with_handler_context): New API function that supports passing context data (e.g. raptor_world) to free_handler, print_handler. (raptor_sequence_set_print_handler_v2): New API function. (raptor_sequence_free_handler_v2, raptor_sequence_print_handler_v2): New API callback function typedefs for raptor_new_sequence_with_handler_context(), raptor_sequence_set_print_handler_v2(). (raptor_sequence_print_uri): Deprecated API function, should use raptor_uri_print(), raptor_uri_print_v2() instead. (raptor_free_sequence, raptor_sequence_set_at, raptor_sequence_push, raptor_sequence_shift): Support free_handler_v2 (raptor_sequence_print): Support print_handler_v2. * src/raptor_expat.c: (raptor_expat_init): v2 APIs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Refactored raptor_iostream internals to use v2 raptor_world APIs. (raptor_iostream_write_uri_v2): New API function that takes in a raptor_world param. (raptor_simple_serialize_statement): Use raptor_iostream_write_uri_v2() instead of raptor_iostream_write_uri(). * utils/rdfdiff.c: (long_options,title_format_string): Use const qualifier for constant data. * utils/rapper.c: (long_options,title_format_string): Use const qualifier for constant data. * src/raptor_www.c: Changed raptor_www_do_www_init_finish to its inverse raptor_www_skip_www_init_finish to make the flag default to 0 -> moved from writable .data chunk to .bss. * librdfa/curie.c: (g_property_reserver_words,g_relrev_reserver_words): Use const qualifier for constant data. 2008-10-02 Lauri Aalto * src/raptor_statement.c: (raptor_statement_compare_v2): Fixed args to raptor_statement_compare_common() * src/raptor_statement.c: (raptor_print_statement_as_ntriples_common): Added const qualifier to helper prototype * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c: Refactored raptor_statement internals to use v2 raptor_world APIs. (raptor_statement_v2): New API struct for wrapping raptor_statement with raptor_world without breaking source/binary compatibility. (raptor_print_statement_v2, raptor_print_statement_as_ntriples_v2, raptor_statement_compare_v2): New API function variants that work on raptor_statement_v2 objects. (raptor_statement_part_as_counted_string_v2, raptor_statement_part_as_string_v2): New API function variants that take in raptor_world object. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1, raptor_free_statement_v2): New internal raptor_statement_v2 lifecycle functions. (raptor_print_abbrev_po): Use raptor_statement_part_as_string_v2(). (raptor_new_rss_item, raptor_rss10_serialize_init, raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_items, raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): triples sequences are now sequences of raptor_statement_v2. (raptor_json_serialize_start, raptor_json_serialize_statement): context->avltree is now a tree of raptor_statement_v2. (raptor_statement_copy_common): (Pulled from raptor_statement_copy.) Now also checks for OOM. * librdfa/curie.c, librdfa/rdfa.c: Refactored librdfa raptor integration internals to use v2 raptor_world APIs. 2008-09-23 Lauri Aalto * src/raptor_www_libfetch.c, src/raptor_www_libxml.c: Refactored raptor_www_lib{fetch,xml} internals to use v2 raptor_world APIs. * src/raptor_www_curl.c: Refactored raptor_www_curl internals to use v2 raptor_world APIs. 2008-09-22 Lauri Aalto * src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_xml.c: Use raptor_new_qname_from_namespace_local_name_v2() instead of raptor_new_qname_from_namespace_local_name() 2008-09-20 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at): Maintain sequence design contract: "size" consecutive items in "sequence" starting from "start" when setting items more than +1 offset beyond the end of sequence. Fixes Issue#000276 http://bugs.librdf.org/mantis/view.php?id=276 2008-09-19 Lauri Aalto * src/raptor_serialize_rss.c: (raptor_rss_group_map): Internal struct gains world field, cannot trust item to be valid to use item->world. (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_set_item_group): Use/init group_map's raptor_world. (raptor_rss10_get_group_item): Init world field on search group map allocated on stack. * src/raptor_rss_common.c: (raptor_new_rss_item): Init identifier.world as well * src/raptor.h, src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name_v2): New API function that takes in a raptor_world param. Passed in raptor_namespace* may be NULL -> cannot use ns->world. (raptor_qname_copy): Copy qname->world as well. * src/raptor_serialize_json.c: Refactored raptor_serialize_json internals to use v2 raptor_world APIs. * src/raptor_serialize_dot.c: Refactored raptor_serialize_dot internals to use v2 raptor_world APIs. * src/raptor_serialize_rss.c: Refactored raptor_serialize_rss internals to use v2 raptor_world APIs. * src/raptor_serialize_turtle.c: Refactored raptor_serializer_turtle internals to use v2 raptor_world APIs. * src/raptor_serialize_rdfxmla.c: Refactored raptor_serializer_rdfxmla internals to use v2 raptor_world APIs. * src/raptor_avltree.c: (raptor_new_avltree): Bugfix: set world field to passed in value. * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Refactored raptor_abbrev, raptor_avltree internals to use v2 raptor_world APIs. (raptor_new_abbrev_node, raptor_new_avltree): Internal functions changed to take in raptor_world. (raptor_avltree_s): Moved internal struct definition to raptor_internal.h. Gains world field. (raptor_abbrev_node): Internal struct gains world field. * src/raptor_serialize_json.c: (raptor_json_serializer_start): Fixed accidentally deleted base_uri declaration * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Refactored raptor_json_writer internals to use v2 raptor_world APIs. (raptor_new_json_writer): Internal function prototype changed. Require raptor_world, do not take uri handlers anymore. * src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_turtle_writer.c: Further internals refactoring to use v2 raptor_uri functions. * src/raptor.h, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c, src/raptor_uri.c: Further refactored raptor_uri internals to use v2 raptor_world APIs. (raptor_uri_to_relative_counted_uri_string_v2, raptor_uri_print_v2, raptor_uri_to_counted_string_v2, raptor_uri_to_string_v2): New API functions that take in a raptor_world param. (raptor_new_uri_from_rdf_ordinal): Changed internal function to take in raptor_world. * src/raptor_serialize_rdfxml.c: Refactored raptor_serialize_rdfxml internals to use v2 raptor_world APIs. 2008-09-18 Lauri Aalto * src/raptor_librdfa.c: Refactored raptor_librdfa internals to use v2 raptor_world APIs. * src/raptor_guess.c: Refactored raptor_guess internals to use v2 raptor_world APIs. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Refactored raptor_rss internals to use v2 raptor_world APIs. (raptor_rss_field_s, raptor_rss_item_s, raptor_rss_model, raptor_rss_element_s): Internal structs gain world field. (raptor_new_rss_item, raptor_rss_new_field): Internal functions gain world param. * src/ntriples_parse.c: Refactored ntriples_parse internals to use v2 raptor_world APIs. * src/n3_lexer.l, src/n3_parser.y: Refactored n3_parser/n3_lexer internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. 2008-09-12 Lauri Aalto * src/turtle_parser.y: Refactored turtle_parser internals to use v2 raptor_world APIs. FIXME: Figure out a way to pass custom args (raptor_world) to %destructor. * src/turtle_lexer.l: Refactored turtle_lexer internals to use v2 raptor_world APIs. * src/n3_parser.y: (FLOATING_LITERAL): missing cast * src/raptor_sax2.c: Refactored raptor_sax2 internals to use v2 raptor_world APIs. * src/raptor_www.c: (raptor_www_fetch): Use raptor_new_uri_for_retrieval_v2() * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_for_xmlbase_v2, raptor_new_uri_for_retrieval_v2): Added new v2 API functions to replace old ones. Refactored internals to use raptor v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor_rdfxml.c: Refactored raptor_rdfxml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_uri.c: (raptor_new_uri_from_id_v2): Added new API function to replace raptor_new_uri_from_id(). Refactored internals to use raptor v2 raptor_world APIs. * src/n3_parser.y, src/raptor_internal.h, src/raptor_xsd.c: Refactored raptor_xsd internals to use v2 raptor_world APIs. (raptor_new_identifier_from_double): Internal function prototype changed. * src/raptor_turtle_writer.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Refactored raptor_turtle_writer internals to use v2 raptor_world APIs. (raptor_new_turtle_writer): Internal function prototype changed. * src/raptor_set.c: (main): Use raptor_world_instance() in test code temporarily to make tests compile * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_set.c: Refactored raptor_set internals to use v2 raptor_world APIs. (raptor_new_id_set): Internal function changed to require raptor_world param. * src/raptor.h, src/raptor_xml_writer.c: Refactored raptor_xml_writer internals to use v2 raptor_world APIs. (raptor_new_xml_writer_v2): New API function that takes in a raptor_world param. 2008-09-10 Dave Beckett * docs/libraptor.3: extra b 2008-09-10 Lauri Aalto * src/raptor_rss.h: (raptor_rss_namespace_info): Fix const member missing constructor warning in c++ mode. * src/raptor_internal.h, src/raptor_sax2.c: (raptor_world_s, raptor_sax2_init, raptor_sax2_finish): Store raptor_sax2 init counter in raptor_world. Works around resiliency issues in some xml parser implementations where xmlCleanupParser() crashes if xmlInitParser() has not been run. 2008-09-08 Lauri Aalto * src/raptor.h, src/raptor_internal.h: Moved EXTERN_C definitions to internal header - no need to expose in API. * src/raptor.h, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_www.c: Workaround for an armcc c++ mode issue regarding function pointers as arguments: Need explicit extern "C" to get C linkage for C function pointers. * src/raptor_rdfxml.c: (rdf_syntax_terms_info,rdf_content_type_info): Fixed c++ mode warnings about missing const member initializers. Array data is already const by the outermost const. * src/n3_lexer.l, src/turtle_lexer.l: casts for c++ 2008-09-05 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Use fputs when there is no error handler. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): do not assign same variable field while initing it. * librdfa/rdfa.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Fixes for g++ from Issue#0000270 http://bugs.librdf.org/mantis/view.php?id=270 2008-09-04 Lauri Aalto * src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rdfxml_start_element_handler, raptor_rss_new_enclosure): Bugfix: Initialize world fields in composed raptor_identifiers. * src/raptor_xml.c: Refactored raptor_xml internals to use v2 raptor_world APIs. * src/raptor.h, src/raptor_identifier.c: Refactored raptor_identifier internals to use v2 raptor_world functions. (raptor_new_identifier_v2): New API function that takes in raptor_world param. (raptor_identifier): API struct gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken. 2008-09-03 Lauri Aalto * src/raptor_parse.c: (raptor_parse_uri_with_connection): Use raptor_www v2 functions * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Refactored raptor_www internals to use v2 raptor_world functions. (raptor_www_new_v2, raptor_www_new_with_connection_v2): New API functions that take in raptor_world param. (raptor_www_s): Internal struct gains world param. * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: Refactored raptor logging to use v2 raptor_world functions. Store world pointer to raptor_sax2, raptor_error_handlers. (raptor_error_handlers): API struct gains world field. BINARY COMPATIBILITY BREAK: struct size and layout changed. (Source compatibility not broken.) (raptor_error_handlers_init_v2): New API function that takes in raptor_world param. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Internal logging functions now require a raptor_world param (may be NULL). (raptor_sax2_s): Internal struct gains world field. * src/raptor_rss_common.c: (raptor_rss_types_info, raptor_rss_fields_info): Fixed gcc warnings about missing initializers. * src/raptor_internal.h, src/raptor_qname.c: (raptor_free_qname, raptor_qname_copy, raptor_new_qname, raptor_new_qname_from_namespace_local_name): Bugfix: qname nspace field may be NULL. Store world pointer in qname struct and use it instead of indirecting nspace->nstack->world. (raptor_qname_s): Internal struct gains world field. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Refactored raptor_feature internals to use v2 raptor_world functions. (raptor_features_enumerate_v2, raptor_serializer_features_enumerate_v2, raptor_feature_from_uri_v2, raptor_xml_writer_features_enumerate_v2): New API functions that take in raptor_world param. (raptor_features_enumerate_common, raptor_turtle_writer_features_enumerate): Internal functions changed to take in raptor_world param. * src/raptor_qname.c: Refactored raptor_qname internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c: Refactored raptor_namespace internals to use v2 raptor_world functions. (raptor_new_namespaces_v2, raptor_namespaces_init_v2): New API functions that take in raptor_world param and use the uri handlers defined in it. (raptor_namespace_stack_s): Internal struct gains world field, loses uri_handler, uri_context fields. 2008-09-02 Dave Beckett * src/raptor_nfc_test.c: Update what is being ntested 2008-09-02 Lauri Aalto * src/raptor_serialize.c: (raptor_serializer_error_varargs, raptor_serializer_warning_varargs): Use locator v2 functions * src/raptor.h, src/raptor_locator.c: Refactored raptor_locator internals to use v2 raptor_world functions. (raptor_print_locator_v2, raptor_format_locator_v2, raptor_locator_uri_v2): New API functions that take in a raptor_world param. * src/raptor_uri.c: (raptor_uri_init): Use raptor_world* as default uri handler context. (raptor_default_new_uri): Refactored internals to use v2 raptor_world functions. * src/raptor_serialize.c: (raptor_serialize_start_to_iostream, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_free_serializer, raptor_serializer_set_feature_string): Refactored raptor_serialize internals to use v2 raptor_world functions. * src/raptor.h, src/raptor_parse.c: Refactored raptor_parse internals to use v2 raptor_world functions. (raptor_new_parser_for_content_v2): New API function that takes in a raptor_world param. (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_guess_parser_name_v2): Use RAPTOR_DEBUG instead of RAPTOR_FATAL for error messaging and let caller handle the error. These error conditions are really tests for development-time assumptions and should surface in maintainer mode (debug messages enabled). (raptor_start_parse, raptor_free_parser, raptor_parse_file, raptor_parse_file_no_net_filter, raptor_parse_uri_with_connection, raptor_guess_parser_name_v2): Refactored to use v2 raptor_world functions. * src/raptor_general.c, src/raptor_www.c: (raptor_new_world, raptor_free_world, raptor_init, raptor_finish): Moved raptor_www init/finish calls to new_world/free_world. Added a FIXME note to raptor_www to re-engineer the init/finish API. * src/raptor_internal.h, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Made raptor_rss_{namespaces,types,fields}_info arrays const and moved non-const uris/qnames to raptor_world. (raptor_rss_namespace_info): Internal struct loses uri field. (raptor_rss_info): Internal struct oses uri,qname fields. (raptor_world_s): Internal struct gains rss_common_initialised (from raptor_rss_common_initialised static in raptor_rss_common.c); rss_namespaces_info_uris, rss_types_info_uris, rss_types_info_qnames, rss_fields_info_uris, rss_fields_info_qnames from raptor_rss_{namespaces,types,fields}_info arrays. (raptor_rss_item_s): Internal struct gains node_typei field for indexing to uris/qnames in raptor_world. (raptor_rss10_serializer_context): Internal struct gains world field. (raptor_rss_common_init): Require raptor_world param. Return int return code. Allocate and init uri arrays in raptor_world. (raptor_rss_common_terminate): Require raptor_world param. Free allocs by raptor_rss_common_init(). (raptor_rss10_build_xml_names): Allocate and init qname arrays in raptor_world. Store item type index for uri/qname access. Access uris/qnames in raptor_world. (raptor_rss10_serialize_terminate): Free qname arrays in raptor_world. (raptor_rss_model_init): Require raptor_world param. (raptor_rss_parse_init, raptor_rss_start_element_handler, raptor_rss_sax2_new_namespace_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_rss_items): Access uris/qnames in raptor_world. (raptor_rss_insert_identifiers): Store item type index for uri/qname access. (raptor_rss10_emit_item): Store item type index for uri/qname access. Access uris/qnames in raptor_world. 2008-09-01 Dave Beckett * src/raptor_nfc_test.c: format * src/raptor_nfc_test.c: Make test take file as argument. Add where it can be found * librdfa/curie.c: Merge to GIT 5e29c166212c61d86223d2c4aa97e67fe0655063 2008-09-01 Lauri Aalto * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init, raptor_sax2_finish, raptor_init, raptor_finish, raptor_new_world, raptor_free_world): Changed raptor_sax2 init/finish code to the raptor_world model. Take in (unused) raptor_world param. * src/raptor_grddl.c: (raptor_init_parser_grddl_common): Fixed signature to match prototype * src/n3_parser.y, src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_uri.c, src/raptor_www_test.c, src/turtle_parser.y: Moved uri_handler and uri_handler_context to raptor_world. (raptor_new_uri_v2, raptor_new_uri_from_uri_local_name_v2, raptor_new_uri_relative_to_base_v2, raptor_new_uri_for_rdf_concept_v2, raptor_free_uri_v2, raptor_uri_equals_v2, raptor_uri_compare_v2, raptor_uri_copy_v2, raptor_uri_as_string_v2, raptor_uri_as_counted_string_v2, raptor_uri_set_handler_v2, raptor_uri_get_handler_v2): New API functions that take in a raptor_world object. (raptor_uri_init,main): Changed internal function to take in raptor_world param. Changed test code callers to use full raptor_init()/raptor_finish() instead so that the world is properly set up. FIXME: Refactor the raptor_uri opaque abstraction so that it can store raptor_world* - no need to pass in world as an argument to calls that take raptor_uris. * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c: Moved serializers sequence to raptor_world. (raptor_serializers_enumerate_v2, raptor_serializer_syntax_name_check_v2, raptor_new_serializer_v2): New API function variants that accept a raptor_world object. (raptor_serializer_s, raptor_seriazlizer_factory_s): Internal structs gain world field. (raptor_serializer_register_factory, raptor_serializers_init, raptor_serializers_finish, raptor_init_serializer_*): Internal functions changed to require raptor_world param. (raptor_delete_serializer_factories): Removed unnecessary prototype. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Introduced a raptor_world object for storing library-wide data instead of static variables. Moved parsers sequence to raptor_world. (raptor_new_world, raptor_free_world): New API functions, eventually to replace raptor_init() and raptor_finish(). (raptor_parsers_enumerate_v2, raptor_syntaxes_enumerate_v2, raptor_syntax_name_check_v2, raptor_guess_parser_name_v2, raptor_new_parser_v2): New API function variants that accept a raptor_world object. (raptor_parser_s, raptor_parser_factory_s): Internal structs gain world field. (raptor_parser_register_factory, raptor_parser_factory, raptor_parser_get_accept_header_all, raptor_parsers_init, raptor_parsers_finish, raptor_init_parser_*): Internal functions changed to require raptor_world param. (raptor_world_instance): New accessor for a static pointer to a raptor_world instance created by raptor_init(). Required for supporting non-v2 API functions (where v2 variants exist). 2008-08-29 Dave Beckett * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax, raptor_trig_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/raptor_librdfa.c: (raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare a string against a buffer that may not be NUL terminated. Part of fix for Issue#0000269 http://bugs.librdf.org/mantis/view.php?id=269 * src/Makefile.am, src/raptor_memnstr.c, src/raptor_memstr.c (from /raptor/trunk/src/raptor_memnstr.c:14406): Renamed raptor_memnstr.c to raptor_memnstr.c * src/raptor_internal.h, src/raptor_memnstr.c: (raptor_memstr): Renamed from raptor_memnstr 2008-08-27 Dave Beckett * src/raptor_memnstr.c: comment * src/raptor_memnstr.c: includes * src/raptor_memnstr.c: internal * src/raptor_internal.h: Added raptor_memnstr() * src/Makefile.am: Added raptor_memnstr.c * src/raptor_memnstr.c: Added raptor_memnstr 2008-08-25 Lauri Aalto * src/fix-flex: Removed additional OOM checks added to flex-generated ensure_buffer_stack(). flex versions 2.5.34 and later generate the OOM checking code themselves. 2008-08-24 Dave Beckett * utils/rapper.c: (main): Make printing triples count at least potentially localizable. * src/raptor_uri.c: Added tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id=268 which pass. 2008-08-20 Lauri Aalto * tests/rdfa/Makefile.am: Run tests inside set +e ... set -e 2008-07-10 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Cast to eliminate compiler printf-like format arg warning. 2008-07-04 Dave Beckett * configure.ac: Use AC_PROG_CC AM_PROG_CC_C_O 2008-07-04 Lauri Aalto * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^ format. Fixes Issue #0000263 http://bugs.librdf.org/mantis/view.php?id=263 2008-07-03 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.19 * docs: props 2008-07-02 Dave Beckett * docs/libraptor.3: 2008 2008-07-02 Lauri Aalto * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Produce error messages when raptor_new_uri() fails. Fixes Issue #0000262 http://bugs.librdf.org/mantis/view.php?id=262 2008-06-29 Dave Beckett * tests/feeds/Makefile: fix * tests/feeds/Makefile, tests/feeds/atom.rnc, tests/feeds/atom.rng, tests/feeds/test01.atom, tests/feeds/test01.rss, tests/feeds/test02.atom, tests/feeds/test02.rss, tests/feeds/test03.atom, tests/feeds/test03.rss: Feed examples * tests/feeds: Add feeds 2008-06-25 Dave Beckett * Snapshotted raptor_1_4_18 for 1.4.18 release (SVN 14104) 2008-06-23 Dave Beckett * docs/Makefile.am, utils/Makefile.am: Use $(PERL) not perl 2008-06-20 Dave Beckett * README.html, RELEASE.html, docs/raptor-parsers.xml, utils/rapper.1: Update RDFa pointers to http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ caniddate rec * src/raptor_sequence.c: (raptor_sequence_set_at): Correct counting when there is old data but no free handler. * tests/rdfa/0011.out, tests/rdfa/0092.out, tests/rdfa/0094.out, tests/rdfa/0099.xhtml, tests/rdfa/0100.out, tests/rdfa/0100.xhtml, tests/rdfa/0101.out, tests/rdfa/0101.xhtml, tests/rdfa/0102.out, tests/rdfa/0102.xhtml, tests/rdfa/0103.out, tests/rdfa/0103.xhtml, tests/rdfa/0104.xhtml, tests/rdfa/0105.out, tests/rdfa/0105.xhtml, tests/rdfa/0106.out, tests/rdfa/0106.xhtml, tests/rdfa/0107.out, tests/rdfa/0107.xhtml, tests/rdfa/0110.out, tests/rdfa/0110.xhtml, tests/rdfa/0111.out, tests/rdfa/0111.xhtml, tests/rdfa/0112.out, tests/rdfa/0112.xhtml, tests/rdfa/Makefile.am: Update approved tests from http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ as of now 2008-06-19 Dave Beckett * docs/libraptor.3: Added raptor_serialize_start_to_iostream for 1.4.18 * docs/raptor-tutorial-serializing.xml: xml * docs/raptor-tutorial-serializing.xml: Explain raptor_serialize_start and raptor_serialize_start_to_iostream, recommending the latter. * docs/Makefile.am: Call gtkdoc-scan with --deprecated-guards="RAPTOR_DISABLE_DEPRECATED" * src/ntriples_parse.c, src/raptor.h, src/raptor_iostream.c, src/raptor_statement.c, src/raptor_turtle_writer.c, src/raptor_uri.c: Use RAPTOR_DISABLE_DEPRECATED macro to wrap disabling deprecated functions and prototypes * docs/tmpl/section-feature.sgml, docs/tmpl/section-serializer.sgml: docs tmp * src/raptor_iostream.c: typo * docs/raptor-sections.txt: Added raptor_serialize_start_to_iostream * src/raptor_serialize.c: (raptor_serialize_set_namespace): Allow "" as a synonym for NULL prefix. 2008-06-18 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Use _:author for atom author bnode always since atom:author may not be a valid bnode ID. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_field_zero_one): Added. (raptor_rss10_ensure_atom_feed_valid): Use raptor_rss10_ensure_atom_field_zero_one to ensure that fields appear 0 or 1 times for atom feed and entry. 2008-06-15 Dave Beckett * docs/rdfserialize.c: Casts for C++ * librdfa/rdfa.c: GIT commit 8892f4056d9486d7bdd0cc89fe12b3a863a4d418 (rdfa_free_context): rewrite rdfa_free_list(context->context_stack) call to look and do a proper rdfa_free_context() on each returned item that is not ourself. Still leaks one malloc but does not crash parser on error. * src/raptor_librdfa.c: (raptor_librdfa_parse_start): Init librdfa context->error_handlers from static field in raptor_parser structure so that error handlers are passed correctly to librdfa and raptor_sax2 * librdfa/rdfa.c, librdfa/rdfa.h: GIT commit 1a4f7d0352017cf6d55ecbcf7d355badb0c777f9. Do not make a new error_handlers structure for the rdfa context, use the one passed in from the top-level rdfacontext, set by raptor as error_handlers static in the raptor_parser structure * src/raptor_serialize_dot.c: (raptor_dot_serializer_new_node): Return NULL [sparse] * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_grammar): Call raptor_rdfxml_process_property_attributes with NULL not 0 [sparse] * src/raptor_grddl.c: match_table: Use NULL for pointer in sentinal. [sparse] * src/raptor_abbrev.c: (raptor_new_abbrev_node): Return NULL [sparse] * src/raptor_rss.h: raptor_rss_field bitfields should be unsigned [sparse] * src/raptor_sax2.c: #ifdef RAPTOR_XML_EXPAT * src/raptor_rdfxml.c: #ifdef RAPTOR_DEBUG_VERBOSE * src/raptor_nfc_test.c: casts * configure.ac, src/raptor_nfc.h: Use autoconf 2.5.x AC_CHECK_TYPES for u8 and u16 2008-06-14 Dave Beckett * utils/rapper.c: fix comment * utils/rapper.c: Fix HELP_ARG_BOTH quoting as used in help message. 2008-06-13 Dave Beckett * examples/raptor_abort.c, examples/rdfserialize.c: Casts for C++ * src/raptor_serialize_rss.c: Casts to remove warnings when compiling with C++ * librdfa/curie.c, librdfa/rdfa.c, librdfa/rdfa_utils.c, librdfa/triple.c: GIT commit aefb63f96141d64e1a9f5845600feebac6aefa45 librdfa casts to remove warnings when compiling with C++ * src/n3_common.h, src/ntriples_parse.c, src/raptor_expat.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_librdfa.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_nfc.c, src/raptor_nfc.h, src/raptor_nfc_test.c, src/raptor_rfc2396.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_simple.c, src/raptor_utf8.c, src/raptor_win32.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xsd.c, src/turtle_common.c, src/turtle_common.h: 2008 * utils/rapper.c: Tidy variables into parser, serializer, other blocks. Output in error, info messages when filename is NULL * src/raptor_sequence.c: (raptor_sequence_set_at): Tidy tortured test. * src/raptor_sequence.c: (raptor_sequence_set_at): Update size when not over-writing an existing item. 2008-06-12 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_leftover_statements): Added to move any remaining triples after initial serialize_statement scan, to items or channel. (raptor_rss10_serialize_end): Call raptor_rss10_move_leftover_statements. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Use correct URI for rss:items with new macro RAPTOR_RSS_RSS_items_URI replacing RAPTOR_RSS_RDF_items_URI * src/raptor_rss_common.c: (raptor_rss_model_init): Init RAPTOR_RSS_RSS_items_URI against rss: (rss 1.0) namespace, not rdf: * src/raptor_rss.h: RAPTOR_RSS_RDF_items_URI renamed to RAPTOR_RSS_RSS_items_URI since it is in the rss: (rss 1.0) namespace * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Use raptor_serialize_start_to_iostream() with no destroying iostream instead of raptor_serialize_start(). * src/raptor.h: Added raptor_serialize_start_to_iostream prototype * src/raptor_serialize.c: (raptor_serialize_start_to_iostream): Added to have the new semantics of not owning and destroying the passed-in iostream * tests/rdfa/Makefile.am: 0094.xhtml fails now * librdfa/rdfa.c: GIT commit c2ca66384c2e201023e0ca7cb4d9e38450459c93 (rdfa_parse_end): Ensure rdfa_pop_item() is called when in raptor too * librdfa/rdfa.c: GIT commit 346046a980aee3ed84f69f482a74f95e2414c267 (start_element): Sort namespaces by prefix and hide overriden ones 2008-06-10 Dave Beckett * librdfa/rdfa.c, librdfa/rdfa.h: Merge to GIT fd8d211db142e14007ea6b3ac3eab090adf0a793 * librdfa/curie.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/triple.c: Merge to GIT a119a5ea0f215ec6036e79de30bb1131d9ca5647 * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): correct docs * src/raptor_avltree.c: (main): Do not call an internal debug function raptor_avltree_print() in unit testing. * src/raptor_sequence.c: (main): Remove test for preventing raptor_sequence_set_at() at size+1; this is now allowed. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Ignore any triple with predicate rss:items as it can be infered later for RSS 1.0 and ignore for Atom 1.0 * src/raptor_rss.h, src/raptor_rss_common.c: Added rss:items to raptor_rss_model concepts with macro RAPTOR_RSS_RDF_items_URI * src/raptor_serialize_rss.c: (raptor_rss10_build_items): Skip triples that have no URI value. * src/raptor_sequence.c: (raptor_sequence_set_at): Handle extending the sequence beyond capacity+1 * src/raptor_serialize_rss.c: (raptor_rss10_move_statements): Handled anonymous triples twice and the handled flag did not help - removed. Improved the logic to clearly 'continue' loop when a triple is handled; added comments to say why. Changed signature to return number of triples used, not presently used by callers. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Off by 1 in declaring user namespaces. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_set_xml_writer): Free any namespaces declared on the old stack, before freeing the stack. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_terminate): Free all allocated namespaces now it doesn't crash things. * src/raptor_serialize_rss.c: Ensure namespaces are freed before the stack they are associated with, so that URI destructor handler calls work. (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): Add raptor_free_namespace to user_namespaces sequence and call it early. (raptor_rss10_serialize_end): Do not free namespace stack here, as it refers to namespaces that are still alive. * src/raptor_serialize_rss.c: (raptor_rss10_build_items): Make a fake triple subject URI for comparison with seq node ID. 2008-06-09 Dave Beckett * docs/raptor-parsers.xml: Added RDFa parser * docs/raptor-serializers.xml: rss 1.0 and atom 1.0 serializer notes 2008-06-05 Dave Beckett * utils/rapper.c: update the parser/serializer name length to 14 for 'rss-tag-soup' & 'json-triples' which are at the previous max 12 * configure.ac: enable atom serializer for everyone * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_triples_map, raptor_rss10_emit_atom_feed): Adjust raptor_rss10_emit_atom_triples_map calling convention to add element name and code tidy. * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_triples_map): Added, pulled out of raptor_rss10_emit_atom_feed. Skip maps that do not apply to feed element. (raptor_rss10_emit_atom_feed): Call above twice, to generate at:feedmap and at:entrymap. * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): Set is_xml field when field is content:encoded (raptor_rss10_emit_item): Select rdf:parseType="Literal" for rss output with XML valued literals but prefer CDATA block for content:encoded. 2008-06-04 Dave Beckett * src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c: Make rdfxml and rdfxml-abbrev serializers respect feature writeBaseURI. * src/raptor_feature.c: Adjust RAPTOR_FEATURE_WRITE_BASE_URI description * src/raptor_serialize_rss.c: (raptor_rss10_serialize_end): Respect feature writeBaseURI * src/raptor_serialize_rss.c: raptor_rss10_serializer_context gains xml_literal_dt URI field. (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): Free xml_literal_dt field. (raptor_rss10_move_statements, raptor_rss10_store_statement): Set is_xml field when an XML literal. (raptor_rss10_emit_atom_feed, raptor_rss10_emit_rss_items): Emit relative URIs. (raptor_rss10_ensure_atom_feed_valid): Set atom:id if not present, to item URI. (raptor_rss10_emit_item): Emit relative URIs except for atom:id For atom:content with a URI value, write and take the type from at:contentType When writing a literal value and it is xml, write an atom type='xhtml'. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_field gains is_xml field. Added at:contentType / RAPTOR_RSS_FIELD_AT_CONTENT_TYPE field * src/raptor_uri.c: (raptor_uri_to_relative_counted_uri_string): Add support for a base URI with scheme and authority but no path, so the result can be a relative URI starting with '/'. (main): Add a test for the above * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Tidy is_atom/not code. 2008-06-04 Lauri Aalto * src/raptor_serialize_rss.c: Fixed warnings. (raptor_rss10_emit_rdfxml_item_triples, raptor_rss10_serialize_end): Init variables to NULL for some optimizing compilers that warn about possible use-before-init. (raptor_rss10_emit_item): Cast int to enum. 2008-06-04 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Add is_entry flag and use it to decide root name atom:feed or atom:entry for atom serializer. (raptor_rss10_serialize_end): When a feature atom_entry_uri is set, look for a matching item and if found, emit just that as an atom entry document. 2008-06-03 Dave Beckett * src/raptor_rss_common.c: (raptor_rss_set_date_field): cast 2008-06-02 Dave Beckett * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_ATOM_ENTRY_URI to set the Atom Entry document URI for the atom serializer 2008-05-29 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Remove rdf-xml atom:content for; it's not used. Check for 0 triples and end if nothing to emit. * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_feed_valid): ! * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_feed_valid): Remove any atom:content or atom:summary in feed * src/raptor_rss_common.c: raptor_atom_to_rss: rss:description maps to atom:summary * tests/rdfa/Makefile.am: 0058 now passes and the others pass if you re-order the xml namespaces * src/raptor_serialize_rss.c: ws * src/raptor_serialize_rss.c: (raptor_rss10_ensure_atom_items_valid): Added to check and correct atom id, title, updated and link OR content. (raptor_rss10_emit_item): Handle atom:link being written as - no choice for now on rel. (raptor_rss10_serialize_end): Call raptor_rss10_ensure_atom_items_valid * src/raptor_xml_writer.c: (raptor_xml_writer_start_element_common): Renamed from raptor_iostream_write_xml_element_start. Add indenting of xml namespace declaration attributes when auto indenting is on and there are more than 1. (raptor_xml_writer_end_element_common): Renamed from raptor_iostream_write_xml_element_end (raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_end_element): Update to use new names. * src/raptor_xml_writer.c: (raptor_iostream_write_xml_element_start): Remove all args that can be found in xml_writer. (raptor_xml_writer_empty_element, raptor_xml_writer_start_element): Update to use new raptor_iostream_write_xml_element_start * src/raptor_rss.h, src/raptor_rss_common.c: Added raptor_rss_format_iso_date and raptor_rss_set_date_field. (raptor_rss_date_uplift): Use above * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Generate bnode for author if not present. * librdfa/rdfa.c, librdfa/subject.c: Merge with GIT 8adf69fff952d069e4f6da472d9d8e0acf8fea28 that fixes test case #0058 * src/raptor_serialize_rss.c: Get atom author blank node ID from atom:author string value. 2008-05-28 Dave Beckett * src/raptor_rss.h: Re-order atom fields so that required ones are generated first when going in sequential field order. * src/raptor_rss_common.c, src/raptor_serialize_rss.c: Re-order atom fields so that required ones are generated first when going in sequential field order. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_terminate): Comment out raptor_free_namespace calls - crashes worse than leaks for now. * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Use atom_namespace not default for 'link'. * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): use at:md not atom:md * docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: added raptor_xml_writer_flush raptor_xml_writer_newline to templates. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_init): Init namespaces with error reporting. * src/raptor_serialize_rss.c: (raptor_rss10_emit_rdfxml_item_triples): Fix root_qname double free * src/raptor_serialize_rss.c: (raptor_rss10_emit_rss_items): Set xml-writer (raptor_rss10_emit_rdfxml_item_triples): Added, pulled rdf/xml block writing out of raptor_rss10_emit_item. Validate you can only use rdf-xml with rss-1.0 serializer and atom-triples with atom serializer. (raptor_rss10_emit_item): Call raptor_rss10_emit_rdfxml_item_triples * src/raptor_rss_common.c: Turn dc:date into atom:updated * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Add * src/raptor_serialize_rss.c: (raptor_rss10_emit_rss_items): Added, pulled RSS 1.0-specific channel XML out of raptor_rss10_emit_item (raptor_rss10_emit_item): Call raptor_rss10_emit_rss_items for RSS 1.0 rdf:Seq and rss:items * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Added, pulled atom-specific entry fields out of raptor_rss10_emit_item (raptor_rss10_emit_item): Call raptor_rss10_emit_item for atom and channel: atom feed. * src/raptor_xml.c: (raptor_xml_element_set_attributes): note @attributes become owned * src/raptor_serialize_rss.c: RSS 1.0 / Atom serializers now support user namespace declarations raptor_rss10_serializer_context gains user_namespaces (raptor_rss10_serialize_init): Init user_namespaces (raptor_rss10_serialize_declare_namespace, raptor_rss10_serialize_declare_namespace_from_namespace): Added. * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Added at:entrymap and at:map in the atom fee when rssTriples=atom-triples. 2008-05-27 Dave Beckett * src/raptor_rss.h: Update ATOMTRIPLES_NAMESPACE_URI * librdfa/curie.c: (rdfa_resolve_curie): Protect strtok_r with NULL string from using a NULL wcptr. 2008-05-26 Dave Beckett * docs/raptor-sections.txt: Added raptor_qname_to_counted_name, raptor_xml_writer_flush and raptor_xml_writer_newline * tests/rdfa/Makefile.am: Update failures to remove those now passing: + 0092: expected XML result corrected + 0094: expected XML result corrected * tests/rdfa/0011.out, tests/rdfa/0092.out, tests/rdfa/0094.out, tests/rdfa/0100.out, tests/rdfa/0101.out, tests/rdfa/0102.out, tests/rdfa/0103.out, tests/rdfa/Makefile.am: update xml results * librdfa/rdfa.c: (start_element): Reverse raptor stack namespace order to match that which librdfa uses. GIT 46929dc0822aa55553d61df5127b2695b8c7acf8 * tests/rdfa/Makefile.am: Update failures to remove those now passing: + 0042: no triples is correct; expected result corrected + 0052: expected result corrected + 0053: expected result corrected + 0091: fixed 0058 still wrong; sparql test case is inadequate * src/raptor.h: Added prototype for raptor_qname_to_counted_name * src/raptor_qname.c: (raptor_qname_to_counted_name): Added. * librdfa/rdfa.c: (start_element): Walk raptor namespace stack to figure out xml literal ns declarations. (raptor_rdfa_start_element, raptor_rdfa_end_element): Pass in qname string. GIT c1313ac3de0dee9903e7b132cb4626708f3df257 * tests/rdfa/0053.out: Update test result for 0053 to correct subject for first triple * tests/rdfa/0083.xhtml, tests/rdfa/0102.xhtml: Update inputs for tests 0083 0102 * tests/rdfa/0052.out: Update test result for 0052 to correct subject * tests/rdfa/0042.out: Update test result for 0042 to expect no triples * tests/rdfa/0011.out, tests/rdfa/0092.out, tests/rdfa/0094.out: Update test results for 0011 0092 0094 to use xmlns with double quotes * librdfa/rdfa.c: (start_element): set xml_lang variable when inside raptor GIT aeac34493258ecf53374b6cbda5eec03f10b841e * librdfa/triple.c: (rdfa_free_triple): Free triple. GIT a64e1f00a53d6858a818156a9115d10b7ecec036 2008-05-25 Dave Beckett * librdfa/curie.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/triple.c: Merge to GIT f82c0941956254847e8d51654759b2b45dc00088 * tests/rdfa/Makefile.am: Update expected test failures to add new approved & failing tests: 0042.xhtml 0088.xhtml 0091.xhtml 0092.xhtml 0093.xhtml 0094.xhtml 0100.xhtml 0101.xhtml 0102.xhtml 0103.xhtml Add triple counts to failure message * tests/rdfa/0017.out, tests/rdfa/0017.xhtml, tests/rdfa/0039.out, tests/rdfa/0039.xhtml, tests/rdfa/0040.out, tests/rdfa/0040.xhtml, tests/rdfa/0042.out, tests/rdfa/0042.xhtml, tests/rdfa/0085.out, tests/rdfa/0085.xhtml, tests/rdfa/0088.out, tests/rdfa/0088.xhtml, tests/rdfa/0091.out, tests/rdfa/0091.xhtml, tests/rdfa/0092.out, tests/rdfa/0092.xhtml, tests/rdfa/0093.out, tests/rdfa/0093.xhtml, tests/rdfa/0094.out, tests/rdfa/0094.xhtml, tests/rdfa/0099.out, tests/rdfa/0099.xhtml, tests/rdfa/0100.out, tests/rdfa/0100.xhtml, tests/rdfa/0101.out, tests/rdfa/0101.xhtml, tests/rdfa/0102.out, tests/rdfa/0102.xhtml, tests/rdfa/0103.out, tests/rdfa/0103.xhtml, tests/rdfa/0104.out, tests/rdfa/0104.xhtml, tests/rdfa/0107.out, tests/rdfa/0107.xhtml, tests/rdfa/0108.out, tests/rdfa/0108.xhtml, tests/rdfa/0109.out, tests/rdfa/0109.xhtml, tests/rdfa/Makefile.am: Added RDFa approved tests 0017 0039 0040 0042 0085 0088 0091 0092 0093 0094 0099 0100 0101 0102 0103 0104 0107 0108 0109 where approved tests are given by the SPARQL: BASE PREFIX : SELECT ?test FROM WHERE { ?test :reviewStatus :approved } and http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/rdfa-xhtml1-test-manifest.rdf Last-Modified: Mon, 19 May 2008 10:47:38 GMT 2008-05-24 Dave Beckett * docs/tmpl/section-feature.sgml, docs/tmpl/section-triples.sgml: update docs * librdfa/rdfa.c: (rdfa_free_context): Revert change in GIT d0f2401a9b914f70fff262be602fe92cf5a2e93e. Memory leak remains * src/raptor_librdfa.c: (raptor_librdfa_parse_start): Free any old context. (raptor_librdfa_parse_terminate): Free context. * librdfa/rdfa.c: Declare rdfa_init_context as static since it is only used in rdfa.c. GIT 71dd65d38f70120a205abf73e0cf8fd0bf6f0f27 * librdfa/rdfa.c: (rdfa_free_context): Free context_stack and remove TODO. GIT d0f2401a9b914f70fff262be602fe92cf5a2e93e * librdfa/triple.c: (rdfa_free_triple): free triple. GIT 402f883bfc2d7157eb6f13018ad141450ed47944 * src/raptor_librdfa.c: include rdfa_utils.h * src/raptor_librdfa.c: (raptor_librdfa_generate_statement): free incoming triple 2008-05-22 Lauri Aalto * src/n3_lexer.l, src/turtle_lexer.l: Fixed n3/turtle lexer error handling. Do not report OOM for failed function calls that can fail for other reasons besides OOM, e.g. qname expansion fails due to undeclared prefix. 2008-05-21 Dave Beckett * src/raptor_rdfxml.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c: Use raptor_xml_writer_flush for xml writer * src/raptor.h: Added prototypes for raptor_xml_writer_newline and raptor_xml_writer_flush * src/raptor_xml_writer.c: raptor_xml_writer gains pending_newline flag (raptor_xml_writer_indent): Handle pending_newline feature as well as indenting. (raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_end_element): Call indent if pending_newline. (raptor_xml_writer_newline): Added. (raptor_xml_writer_flush): Added to tidy up at the end of an XML writer. * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement, ): Set is_mapped when going from rss to atom fields. (raptor_rss10_remove_mapped_item_fields, raptor_rss10_remove_mapped_fields): Added to delete field values that were mapped when there is an non-mapped value. (raptor_rss10_serialize_end): Call raptor_rss10_remove_mapped_fields for atom. * src/raptor_rss.c: (raptor_rss_uplift_fields): Set is_mapped when uplifting * src/raptor_rss.h: raptor_rss_field gains is_mapped field 2008-05-19 Dave Beckett * src/raptor_internal.h, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c: Added grouping of triples by key (uri/fakeuri(bnode)) to item using an avltree of raptor_rss_group_map (raptor_free_group_map, raptor_rss_group_map_compare, raptor_rss10_get_group_item, raptor_rss10_set_item_group): Added. (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): init / free group_map avl tree (raptor_rss10_move_statements): If a statement object is anonymous, move it to the item triples, do not search for a field. Do not move any other fields with anonymous objects. (raptor_rss10_move_anonymous_statements): Added to move blank node closure triples to their item. (raptor_rss10_store_statement): Use avl tree to find an item for a triple (raptor_rss10_serialize_statement): Do not discard blank nodes on input. Set blank node/URI to item mapping. (raptor_rss10_emit_item): Emit different triple block elements, attributes only for atom;content (raptor_rss10_serialize_end): Call raptor_rss10_move_anonymous_statements * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_turtle_writer.c: 2008 * src/raptor_feature.c: RAPTOR_FEATURE_RSS_TRIPLES label shorter * src/raptor_serialize_rss.c: raptor_rss10_serializer_context gains rss_triples_mode (raptor_rss10_serialize_start): Added to set rss_triples_mode from feature_rss_triples. 1 is "rdf-xml" value, 2 is "atom-triples" (raptor_rss10_emit_item): Emit triples when enabled by feature Remove node elements, typed nodes and emit a single node for rss triples mode 2 (raptor_rss10_serializer_register_factory): Init raptor_rss10_serialize_start * src/raptor_serialize_rdfxmla.c: raptor_rdfxmla_context gains fields single_node, write_node_elements, write_typed_nodes (raptor_rdfxmla_emit_resource_uri): Added. (raptor_rdfxmla_emit_resource): Use raptor_rdfxmla_emit_resource_uri (raptor_rdfxmla_emit_subject_properties): Use write_typed_nodes flag to write rdf:type property element. (raptor_rdfxmla_emit_subject): Handle write_typed_nodes to skip typed node element. Handle write_node_elements flag. (raptor_rdfxmla_emit): Do not emit any top-level blank nodes if single_node is set. (raptor_rdfxmla_serialize_init): Init defaults for write_node_elements and write_typed_nodes: true/1. (raptor_rdfxmla_serialize_set_write_rdf_RDF, raptor_rdfxmla_serialize_set_xml_writer): autodocs (raptor_rdfxmla_serialize_set_single_node, raptor_rdfxmla_serialize_set_write_node_elements, raptor_rdfxmla_serialize_set_write_typed_nodes): Added to set internal flags. (raptor_rdfxmla_serialize_end): Free single node URI if present. * src/raptor_internal.h: raptor_serializer_s gains feature_rss_triples Added prototypes for raptor_rdfxmla_serialize_set_single_node, raptor_rdfxmla_serialize_set_write_node_elements and raptor_rdfxmla_serialize_set_write_typed_nodes * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added feature rss_triples (RAPTOR_FEATURE_RSS_TRIPLES) for rss-1.0/atom serializers 2008-05-18 Lauri Aalto * tests/rdfa: props 2008-05-17 Dave Beckett * librdfa/rdfa.c, librdfa/rdfa_utils.h, librdfa/subject.c: Update to GIT 402f883bfc2d7157eb6f13018ad141450ed47944 2008-05-15 Dave Beckett * librdfa/rdfa.h: Remove uri_mappings field if LIBRDFA_IN_RAPTOR is defined * docs/tmpl/section-sequence.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-xml.sgml: gtk docs * src/raptor_xml_writer.c: autodocs * src/raptor_avltree.c: de-autodoc internal functions * docs/raptor-sections.txt: Added raptor_sequence_delete_at and raptor_xml_writer_get_depth * librdfa/rdfa.c: Do not call rdfa_update_uri_mappings with LIBRDFA_IN_RAPTOR * tests/rdfa/0060.out, tests/rdfa/Makefile.am: Fix 0060.out to make 4 tests expected to fail * tests/rdfa/Makefile.am: annotate expected test failures * tests/rdfa/Makefile.am: Expect failures: 0011.xhtml 0052.xhtml 0053.xhtml 0058.xhtml 0060.xhtml * configure.ac, tests/Makefile.am, tests/rdfa, tests/rdfa/0001.out, tests/rdfa/0001.xhtml, tests/rdfa/0006.out, tests/rdfa/0006.xhtml, tests/rdfa/0007.out, tests/rdfa/0007.xhtml, tests/rdfa/0008.out, tests/rdfa/0008.xhtml, tests/rdfa/0009.out, tests/rdfa/0009.xhtml, tests/rdfa/0010.out, tests/rdfa/0010.xhtml, tests/rdfa/0011.out, tests/rdfa/0011.xhtml, tests/rdfa/0012.out, tests/rdfa/0012.xhtml, tests/rdfa/0013.out, tests/rdfa/0013.xhtml, tests/rdfa/0014.out, tests/rdfa/0014.xhtml, tests/rdfa/0015.out, tests/rdfa/0015.xhtml, tests/rdfa/0018.out, tests/rdfa/0018.xhtml, tests/rdfa/0019.out, tests/rdfa/0019.xhtml, tests/rdfa/0020.out, tests/rdfa/0020.xhtml, tests/rdfa/0021.out, tests/rdfa/0021.xhtml, tests/rdfa/0023.out, tests/rdfa/0023.xhtml, tests/rdfa/0025.out, tests/rdfa/0025.xhtml, tests/rdfa/0026.out, tests/rdfa/0026.xhtml, tests/rdfa/0027.out, tests/rdfa/0027.xhtml, tests/rdfa/0029.out, tests/rdfa/0029.xhtml, tests/rdfa/0030.out, tests/rdfa/0030.xhtml, tests/rdfa/0031.out, tests/rdfa/0031.xhtml, tests/rdfa/0032.out, tests/rdfa/0032.xhtml, tests/rdfa/0033.out, tests/rdfa/0033.xhtml, tests/rdfa/0034.out, tests/rdfa/0034.xhtml, tests/rdfa/0035.out, tests/rdfa/0035.xhtml, tests/rdfa/0036.out, tests/rdfa/0036.xhtml, tests/rdfa/0037.out, tests/rdfa/0037.xhtml, tests/rdfa/0038.out, tests/rdfa/0038.xhtml, tests/rdfa/0041.out, tests/rdfa/0041.xhtml, tests/rdfa/0046.out, tests/rdfa/0046.xhtml, tests/rdfa/0047.out, tests/rdfa/0047.xhtml, tests/rdfa/0048.out, tests/rdfa/0048.xhtml, tests/rdfa/0049.out, tests/rdfa/0049.xhtml, tests/rdfa/0050.out, tests/rdfa/0050.xhtml, tests/rdfa/0051.out, tests/rdfa/0051.xhtml, tests/rdfa/0052.out, tests/rdfa/0052.xhtml, tests/rdfa/0053.out, tests/rdfa/0053.xhtml, tests/rdfa/0054.out, tests/rdfa/0054.xhtml, tests/rdfa/0055.out, tests/rdfa/0055.xhtml, tests/rdfa/0056.out, tests/rdfa/0056.xhtml, tests/rdfa/0057.out, tests/rdfa/0057.xhtml, tests/rdfa/0058.out, tests/rdfa/0058.xhtml, tests/rdfa/0059.out, tests/rdfa/0059.xhtml, tests/rdfa/0060.out, tests/rdfa/0060.xhtml, tests/rdfa/0061.out, tests/rdfa/0061.xhtml, tests/rdfa/0062.out, tests/rdfa/0062.xhtml, tests/rdfa/0063.out, tests/rdfa/0063.xhtml, tests/rdfa/0064.out, tests/rdfa/0064.xhtml, tests/rdfa/0065.out, tests/rdfa/0065.xhtml, tests/rdfa/0066.out, tests/rdfa/0066.xhtml, tests/rdfa/0067.out, tests/rdfa/0067.xhtml, tests/rdfa/0068.out, tests/rdfa/0068.xhtml, tests/rdfa/0069.out, tests/rdfa/0069.xhtml, tests/rdfa/0070.out, tests/rdfa/0070.xhtml, tests/rdfa/0071.out, tests/rdfa/0071.xhtml, tests/rdfa/0072.out, tests/rdfa/0072.xhtml, tests/rdfa/0073.out, tests/rdfa/0073.xhtml, tests/rdfa/0074.out, tests/rdfa/0074.xhtml, tests/rdfa/0075.out, tests/rdfa/0075.xhtml, tests/rdfa/0076.out, tests/rdfa/0076.xhtml, tests/rdfa/0077.out, tests/rdfa/0077.xhtml, tests/rdfa/0078.out, tests/rdfa/0078.xhtml, tests/rdfa/0079.out, tests/rdfa/0079.xhtml, tests/rdfa/0080.out, tests/rdfa/0080.xhtml, tests/rdfa/0081.out, tests/rdfa/0081.xhtml, tests/rdfa/0082.out, tests/rdfa/0082.xhtml, tests/rdfa/0083.out, tests/rdfa/0083.xhtml, tests/rdfa/0084.out, tests/rdfa/0084.xhtml, tests/rdfa/0086.out, tests/rdfa/0086.xhtml, tests/rdfa/0087.out, tests/rdfa/0087.xhtml, tests/rdfa/0089.out, tests/rdfa/0089.xhtml, tests/rdfa/0090.out, tests/rdfa/0090.xhtml, tests/rdfa/1001.out, tests/rdfa/1001.xhtml, tests/rdfa/Makefile.am: Added RDFA test cases from http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/ * librdfa/curie.c: (rdfa_resolve_curie): Handle undefined namespaces prefix * src/raptor_librdfa.c: (raptor_librdfa_generate_statement): Generate correct bnodes * Makefile.am, configure.ac, librdfa, librdfa/Makefile.am, librdfa/curie.c, librdfa/language.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/subject.c, librdfa/triple.c, src/Makefile.am, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c: Added RDFA support via a copy of librdfa linked inside Raptor librdfa/ directory contains a copy of (part of) librdfa http://rdfa.digitalbazaar.com/librdfa/ by Manu Sporny "librdfa is licensed under the GNU Lesser General Public License v2.1 (or newer), GNU General Public License v2.0 (or newer), or the Apache 2.0 License (or newer). Each license is an alternative, and if you select one license, that one alone applies." (same license as raptor) The sources were taken from GIT at http://rdfa.digitalbazaar.com/librdfa.git and patched to work inside raptor. src/raptor_librdfa.c: New raptor parser 'rdfa' * src/raptor_grddl.c: (raptor_grddl_parse_recognise_syntax): Lower scores for xhtml since the mime type gets added in too * src/raptor_grddl.c: (raptor_grddl_parse_recognise_syntax): Do not guess using "xhtml" suffix twice 2008-05-15 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Resiliency fix. Check raptor_new_avltree_iterator() return value. * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_properties): Free avltree iterator * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Resiliency fix: do not leak iterator on OOM. 2008-05-14 Dave Beckett * src/raptor_abbrev.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Switch raptor_avltree_cursor_* functions to use raptor_avltree_iterator * tests/Makefile.am: check-rdfxmla, check-turtle-serialize: check status from rapper & rdfdiff * src/raptor_avltree.c: (raptor_avltree_cursor_first, raptor_avltree_cursor_last): Return failure/finished if tree was empty. * src/raptor_avltree.c: (raptor_avltree_iterator_get): finished if no current node * tests/turtle/Makefile.am: check-turtle-serialize: check status from rapper & rdfdiff * src/raptor_avltree.c: (raptor_new_avltree): Zap cursor_iterator * src/raptor_internal.h: Added raptor_avltree_iterator typedef. Added RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES flag Added prototypes for raptor_new_avltree_iterator, raptor_free_avltree_iterator, raptor_avltree_iterator_end, raptor_avltree_iterator_next and raptor_avltree_iterator_get. * src/raptor_avltree.c: Autodocs for (still internal) AVL Tree functions Some whitespace/indenting fixes. (raptor_avltree_add, raptor_avltree_sprout): Will either replace or ignore updates to a duplicate - equivalent - item depending on the new raptor_new_avltree constructor flags arg value RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES. (raptor_avltree_node_leftmost, raptor_avltree_node_rightmost): Accept a range argument to use for searching in a range. (raptor_avltree_node_search_right, raptor_avltree_node_search_left): Added for searching for a node in a direction in a range. (raptor_avltree_node_prev, raptor_avltree_node_next): Handle moving with ranges. (raptor_new_avltree_iterator): Added iterator constructor with direction arg to indicate prev/next direction of iteration, optionally in a range. (raptor_free_avltree_iterator): Added iterator destructor. (raptor_avltree_iterator_end): Added iterator done check method. (raptor_avltree_iterator_next): Added iterator move method. (raptor_avltree_iterator_get): Added iterator get current method. (raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next, raptor_avltree_cursor_get): Rewritten in terms of a tree->cursor_iterator iterator. (raptor_avltree_print): Rewritten using an iterator. (raptor_avltree_check_internal, raptor_avltree_check): Use an unsigned int count. (main): Use iterator for going forward check. 2008-05-10 Dave Beckett * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property): Do not lose reference count for inner nodes. * src/raptor_serialize_turtle.c: (raptor_turtl_serialize_statement): use raptor_abbrev_subject_add_property to ignore duplicate triples * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): use raptor_abbrev_subject_add_property to ignore duplicate triples * src/raptor_abbrev.c: (raptor_abbrev_node_cmp): Fix comparison to properly return 0 when literals are truly equal (raptor_abbrev_subject_add_property): Catch duplicates and do not add them. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_statement): Revert bogus dup triple test. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Revert bogus dup triple test. * tests/turtle/Makefile.am: check-turtle-serialize: do not break on first error; still return failure * src/raptor_turtle_writer.c: (raptor_new_turtle_writer): Make first @base be absolute since there is no base URI at that point. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_statement): Check whether no new subject, predicate or object nodes were created, in which case this is a duplicate statement that can be ignored. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Check whether no new subject, predicate or object nodes were created, in which case this is a duplicate statement that can be ignored. * src/raptor_abbrev.c: (raptor_abbrev_node_lookup, raptor_abbrev_subject_lookup): Added a created_p output parameter which is set to non-0 if a node was created. * src/raptor_internal.h: raptor_abbrev_node_lookup and raptor_abbrev_subject_lookup gain a created_p output parameter. 2008-05-01 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Fix attrs re-declared warning * src/raptor_serialize_rss.c: Removed indent arg from raptor_rss10_emit_item and comment out indent lines (raptor_rss10_emit_item): Loose indent * src/raptor_serialize_rss.c: With the atom serializer, write any remaining triples for an item as an ... block using the rdf/xml-abbrev serializer. Use auto-indenting XML writer, do not manage indent here anymore. (raptor_rss10_emit_item): Write atom:content block for atom serializer and when triples present. (raptor_rss10_serialize_end) Init auto indent and auto empty xml elements. * src/raptor_serialize_rdfxmla.c: Added new flags to allow an external xml_writer to be given, not write rdf:RDF, initialise the starting xml writer depth and allow an external namespace stack. (raptor_rdfxmla_emit, raptor_rdfxmla_serialize_declare_namespace_from_namespace): Set starting xml writer depth. (raptor_rdfxmla_serialize_init_nstack): Added to separate out stack initialising from raptor_rdfxmla_serialize_init. (raptor_rdfxmla_serialize_init): Call raptor_rdfxmla_serialize_init_nstack() and set rdf:RDF writing to true by default. (raptor_rdfxmla_serialize_terminate): Conditionalise freeing the xml writer and namespaces stack. (raptor_rdfxmla_serialize_set_write_rdf_RDF): Added (raptor_rdfxmla_serialize_set_xml_writer): Added (raptor_rdfxmla_serialize_start): Do not init local xml_writer if one was passed in. (raptor_rdfxmla_ensure_writen_header): Do not write rdf:RDF if not wanted. * src/raptor_rss_common.c: (raptor_new_rss_item): Added, refactoring raptor_rss_model_add_item and raptor_rss_model_add_common content and ensuring triples field is always initialised. * src/raptor_rss.h: Added raptor_new_rss_item prototype. * src/raptor_qname.c: (raptor_new_qname_from_namespace_local_name): Accept NULL namespace to make a namespace-less qname. * src/raptor_xml_writer.c: (raptor_xml_writer_get_depth): Added. * src/raptor_sequence.c: (raptor_sequence_delete_at): Added * src/raptor.h: Added raptor_sequence_delete_at and raptor_xml_writer_get_depth * src/raptor_serialize.c: (raptor_serialize_end): use free_iostream_on_end field to free iostream only if it was internal, not passed in * src/raptor_internal.h: iostream gets free_iostream_on_end field Added raptor_rdfxmla_serialize_set_write_rdf_RDF and raptor_rdfxmla_serialize_set_xml_writer prototypes 2008-04-30 Dave Robillard * src/raptor_turtle_writer.c: (raptor_new_turtle_writer, raptor_turtle_writer_base): Set base URI even if not writing @base directive, so relative URI writing works correctly when @base is disabled. 2008-04-26 Dave Beckett * src/raptor_uri.c: (assert_uri_to_relative): Free base_uri if not NULL 2008-04-25 Dave Beckett * src/raptor_avltree.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/raptor_abbrev.c: Use RAPTOR_ASSERT_OBJECT_POINTER_RETURN on destructor object arg. Code comments 2008 2008-04-16 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_end): Reset context->written_header flag to enable serializer object reuse. 2008-04-14 Dave Beckett * src/turtle_lexer.l: Rename fatal_error_longjmp_env to turtle_lexer_fatal_error_longjmp_env * src/n3_lexer.l: Use setjmp/longjmp to return fatal error messages to caller without abort() (n3_lexer_fatal_error): Remove abort() call. main code: setjmp before starting parse. Move code to inside %{ %} block. * src/n3_common.h, src/n3_parser.y, src/turtle_common.h, src/turtle_parser.y: Count errors in syntax parsing and do not report errors after the first one. A workaround instead of adding full bison error parser recovery. * configure.ac, src/turtle_lexer.l: Use setjmp/longjmp to return fatal error messages to caller without abort() (turtle_lexer_fatal_error): Remove abort() call. main code: setjmp before starting parse. Move code to inside %{ %} block. 2008-04-14 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_end_element_grammar): Resiliency fixes: check raptor_parser_internal_generate_id() return value * src/raptor_libxml.c: (raptor_libxml_free): Resiliency fix: make sure myDoc is always freed. * src/n3_lexer.l, src/turtle_lexer.l: Reverted from r13787 abort() calls back to *_lexer_fatal_error() - it is assumed that these functions never return. * src/ntriples_parse.c: (raptor_ntriples_generate_statement, raptor_ntriples_string_as_utf8_string): Resiliency fixes: check for alloc failures. 2008-04-13 Dave Beckett * src/raptor_rss_common.c: 2008 * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_model_add_item, raptor_free_rss_item): Add triples, free it. (raptor_clear_rss_item): Deleted, not used. * src/raptor_serialize_rss.c: comments (raptor_rss10_serialize_statement): pass on handled flag from raptor_rss10_store_statement() * src/raptor_guess.c: (raptor_guess_parse_chunk):: Check for raptor_parser_copy_user_state failure and pass on. * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Check for raptor_parser_copy_user_state failure and pass on. Slightly adjust nearby code to remove else. * src/raptor_internal.h, src/raptor_parse.c: (raptor_parser_copy_user_state): Add a return value on failure of allocs. * src/raptor_parse.c: (raptor_parser_copy_user_state): Copy Cache-Control: header and User-Agent: header values to destination parser * src/raptor_internal.h: Note about code changes needed when adding user data to raptor_parser * src/raptor_internal.h: Removed prototypes for removed functions: raptor_parser_error_message_handler, raptor_parser_fatal_error_message_handler, raptor_parser_warning_message_handler, raptor_parser_fatal_error_varargs, raptor_parser_warning_varargs * src/n3_lexer.l, src/parsedate.y, src/raptor_parse.c, src/raptor_rdfxml.c, src/turtle_lexer.l: Remove calls to abort() in mainline code (some aborts still exist in test code for consistency failures in avltree but they are only compiled in with RAPTOR_DEBUG) (raptor_parser_fatal_error): Set parsing failed flag on fatal error. (raptor_parser_fatal_error_message_handler, raptor_parser_error_message_handler, raptor_parser_warning_message_handler): Removed, no longer used. (raptor_rdfxml_start_element_grammar): case RAPTOR_STATE_PARSETYPE_DESCRIPTION... RAPTOR_STATE_PARSETYPE_COLLECTION Remove use of abort() for an ancient check for an object URI that can be worked around. case RAPTOR_STATE_MEMBER_PROPERTYELT: With content type RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL, remove use of abort() for unknown content types related to daml/collections - it will fall through to a fatal error anyway. With default content type, remove abort() and tidy the error message. Parsing will still fail in this case. (n3_lexer_fatal_error, turtle_lexer_fatal_error): Do not call abort. (ToHour): Do not call abort, print message when debugging and return invalid value. 2008-04-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_namespaces): Added, pulling namespace scanning out of raptor_rss_parse_chunk. (raptor_rss_parse_chunk): Call above. * src/raptor_rss.c: Add a nspaces_seen[] array in raptor_rss and track namespaces declared either in input (xmlns seen via SAX) or output, when writing a field in RSS1.0 schema. Save them all up and generate before emitting. (raptor_rss_parse_start): Reset nspaces_seen array to none seen. (raptor_rss_sax2_new_namespace_handler): Mark namespace seen, do not pass on to rdf namespace handler just yet. (raptor_rss_parse_chunk): On finish, scan all fields of all items for namespaces and mark those that need declaring. Then call raptor_parser_start_namespace() to start them for the client. 2008-04-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_sax2_new_namespace_handler): Added. (raptor_rss_parse_init): Register raptor_rss_sax2_new_namespace_handler to pass on SAX2 namespace events to the rdf parser. Fixes Issue #0000255 http://bugs.librdf.org/mantis/view.php?id=255 * docs/tmpl/section-triples.sgml: sgml docs * src/raptor_serialize_rss.c: 2008 2008-04-11 Lauri Aalto * src/raptor_general.c: (raptor_init, raptor_finish): Changed raptor_initialised flag to a reference count. 2008-04-05 Dave Beckett * docs/raptor-serializers.xml: Add JSON serializers section 2008-04-03 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_end): Fixed crash when reusing serializer objects. Reset context->written_header flag so that when raptor_rdfxmla_ensure_writen_header() returns success, context->rdf_RDF_element is always non-null. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Fixed rdfxml-xmp segfault. Make sure avltree cursor points to something before trying to indirect it. 2008-04-01 Dave Beckett * src/raptor-config.1: remove undefined macro .l other fixes * NEWS.html, RELEASE.html configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.18 2008-03-29 Dave Beckett * Snapshotted raptor_1_4_17 for 1.4.17 release (SVN 13771) * utils/rapper.c: adjust feature pops * utils/rapper.c: free features * utils/rapper.c: Allow multiple features to be set with -f/--feature by storing them away in two raptor_sequence* lists, one for parser and one for serializer. Then such things like rapper -q -o json -f jsonCallback=foo -f 'jsonExtraData="foo":"bar"' -f relativeURIs ... can be called. * src/raptor_serialize_json.c: (raptor_json_serialize_init): Alter default to serialize with absolute URIs for JSON. (raptor_json_serialize_start): Use feature_relative_uris to decide what base uri to send to JSON writer. 2008-03-27 Dave Beckett * src/raptor_serialize_json.c: (raptor_json_serialize_start): Make callback start with '(' again. 2008-03-26 Dave Beckett * src/raptor_sax2.c: (raptor_sax2_unparsed_entity_decl): Do not return error when there is no handler. (raptor_sax2_external_entity_ref): Error out when there is no handler as the XML cannot be parsed with unknown external entity references. * src/raptor_rdfxml.c, src/raptor_sax2.c: (raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): Moved unparsed entity and external entity reference error messages to sax2 class. (raptor_rdfxml_unparsed_entity_decl_handler, raptor_rdfxml_external_entity_ref_handler): Deleted. (raptor_rdfxml_parse_init): Remove setting handlers * src/raptor_rdfxml.c: (raptor_rdfxml_unparsed_entity_decl_handler, raptor_rdfxml_external_entity_ref_handler): Turn fprintf(stderr...) calls into real raptor_parser_error calls * src/raptor_sax2.c: (raptor_sax2_external_entity_ref): Note failure is happening with 'return 0' * src/raptor.h: raptor_sax2_external_entity_ref_handler autodocs 2008-03-25 Dave Beckett * src/raptor.h, src/raptor_sax2.c, src/raptor_iostream.c: autodocs * docs/libraptor.3: 1.4.17 and lots of formatting tidying * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_json.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_JSON_EXTRA_DATA name jsonExtraData that allows adding data to the end of the top level JSON object on output 2008-03-23 Dave Beckett * docs/tmpl/section-feature.sgml: add json callback feature 2008-03-16 Dave Beckett * configure.ac: fix check for needing to link with -lm * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Fixes to calling raptor_log_error_to_handlers when built with expat. * src/raptor_parse.c: (main): Only define program if RAPTOR_DEBUG * src/raptor_avltree.c: (check_string, main): Casts for C++ * src/raptor_turtle_writer.c: (main): Cast for C++ * src/raptor_uri.c: (main): Remove C99 initializer for C++ * src/raptor_abbrev.c: (raptor_abbrev_node_lookup): Cast for C++ * src/raptor_set.c: (raptor_id_set_add): Casts for C++ * src/raptor_turtle_writer.c: (main): use raptor_iostream_tell instead of deprecated raptor_iostream_get_bytes_written_count * tests/turtle/test-28-out.ttl: Update expected exact turtle serializer result due to AVLTree change in re-ordering the triples * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_json.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_JSON_CALLBACK serializer feature for the JSON serializer to emit a callback block like callback(...); struct raptor_serializer_s gains feature_json_callback. (raptor_free_serializer): Free all string features. (raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): Store/return JSON callback in feature_json_callback. raptor_features_list array gains new entry for RAPTOR_FEATURE_JSON_CALLBACK with name "jsonCallback". (raptor_json_serialize_start): Write callback before serialize start. (raptor_json_serialize_end): Terminate callback after serialize end. * src/raptor.h: Removed raptor_sax2_parse_handle_errors prototype - no such function. 2008-02-25 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_grammar, raptor_rdfxml_end_element_grammar): Check for alloc failures. * src/raptor_xml.c: (raptor_new_xml_element): Check for cdata stringbuffer alloc failure. * src/raptor_sax2.c: (raptor_sax2_start_element): Low-memory cleanup fixes. * src/raptor.h: (raptor_error_handlers): Quick segfault fix: statically allocate RAPTOR_LOG_LEVEL_LAST+1 error handler slots * src/raptor.h: (raptor_error_handlers): Portability fix: avoid "type containing an unknown-size array is not allowed" errors on some compilers. 2008-02-24 Lauri Aalto * src/raptor_www.c: (raptor_www_set_http_cache_control): +1 for zero termination 2008-02-24 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c, src/raptor_www_libxml.c: Added struct raptor_message_handler_closure for user data plus an error handler. (raptor_log_error_simple): Removed, only used in raptor_sax2.c (raptor_log_error_to_handlers): Added to log to an raptor_error_handlers object. (raptor_sax2_simple_error): Tidy error calling to use closure pointer. (raptor_sax2_parse_chunk, raptor_log_error_to_handlers): Use raptor_log_error_to_handlers (raptor_www_set_error_handler, raptor_www_error): Update for closure struct. (raptor_grddl_fetch_uri, raptor_grddl_parse_chunk): Update for closure struct. Tidy saving and restoring error handlers (raptor_new_parser): Init last_log_level for error handlers. (raptor_parse_uri_with_connection, raptor_parser_simple_error, raptor_parser_error_varargs, raptor_parser_error_message_handler, raptor_parser_warning, raptor_parser_warning_message_handler, raptor_set_fatal_error_handler, raptor_set_error_handler, raptor_set_warning_handler): Update for closure struct. (raptor_libxml_warning, raptor_libxml_error_common, raptor_libxml_generic_error, raptor_libxml_xmlStructuredErrorFunc): Update for closure struct. (raptor_www_libxml_init): Update for closure struct. 2008-02-24 Lauri Aalto * src/Makefile.am: flex-generated header file does not need fixing with fix-flex. It already has YY_NO_UNISTD_H guard and all other fix-flex issues are for .c files only. Fixes warnings due to multiple inclusion of raptor_config.h. 2008-02-23 Dave Beckett * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libxml.c, src/raptor_xml_writer.c: Add RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL and RAPTOR_FEATURE_WWW_HTTP_USER_AGENT to control WWW. Pass that on in parsers to internal www. raptor_www struct gains cache_control and user_agent fields. (raptor_www_curl_fetch): Disable curl www Pragma: header always. (raptor_www_set_http_cache_control): Added. (raptor_www_set_user_agent, raptor_www_set_proxy): Error checking on malloc failure. Fixes Issue #0000252 http://bugs.librdf.org/mantis/view.php?id=252 2008-02-22 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_cdata_grammar): Check for null pointer before indirecting it. * src/raptor_libxml.c: Removed writable static data from raptor_libxml.c 2008-02-16 Dave Beckett * autogen.sh: autogen checks when env prog version is empty. Update all packages to latest autogen.sh 2008-02-09 Dave Beckett * src/raptor_avltree.c, src/raptor_internal.h: (raptor_avltree_remove): Added. (raptor_avltree_delete): Rewritten in terms of raptor_avltree_remove. (main): Add test with raptor_avltree_remove 2008-02-07 Dave Beckett * src/raptor_avltree.c: (raptor_avltree_search_internal): Alter to return the node. (raptor_avltree_search): Use raptor_avltree_search_internal changed 2008-02-07 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Do not throw away return value from raptor_rdfxmla_emit_subject_list_items(). * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Check raptor_avltree_cursor_first() return value. Fixes a NULL indirection crash later on. * src/raptor_avltree.c: (raptor_new_avltree): Initialize print_fn field to NULL. 2008-02-06 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Ensure variable rv is initialized before use. 2008-02-02 Dave Beckett * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Switch raptor_avltree subject->properties from raptor_sequence to raptor_avltree and use an AVL Tree cursor to iterate it. This changes the exact ordering of the output from original order, to sorted by raptor_abbrev_node comparison order. * src/raptor_avltree.c: Export avltree cursor prototypes. Added raptor_data_print_function field. (raptor_avltree_set_print_handler, raptor_avltree_print): Added to print an AVL Tree. (raptor_avltree_sprout_right): Fix failure to set parent correctly in RR rebalancing. (raptor_avltree_dump_internal): Print node value if print_fn is defined. * src/raptor_internal.h: Added raptor_data_print_function typedef. Added raptor_avltree_set_print_handler and raptor_avltree_print prototypes. Added avltree cursor prototypes: raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next and raptor_avltree_cursor_get * src/raptor_avltree.c: (compare_strings): update sig * src/raptor_avltree.c, src/raptor_internal.h, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, src/raptor_set.c: Change raptor_avltree data from raptor_avltree_t typedef to void*. excessive typedefs. Rename raptor_avltree_compare_function to raptor_data_compare_function. Rename raptor_avltree_delete_function to raptor_data_free_function * src/raptor.h, src/raptor_general.c, src/raptor_parse.c, src/raptor_www.c: (raptor_error_handlers_init): Remove all args except object pointer. Add docs. This is currently not called internally so no need for extra arg soup. Use to init error_handlers everywhere. (raptor_new_parser, raptor_www_new_with_connection): Use raptor_error_handlers_init rather than set magic directly. * src/raptor_statement.c: (raptor_statement_compare): Allow subject, predicate or object to have NULL pointers which always sort earlier than pointers with values. 2008-01-29 Lauri Aalto * tests/grddl/Makefile.am: Run GRDDL tests only if GRDDL parser is enabled in configuration. 2008-01-27 Dave Beckett * src/raptor_avltree.c: (raptor_new_avltree): Init size and cursor * src/raptor_avltree.c: struct raptor_avltree gains a cursor field. (raptor_avltree_node_leftmost, raptor_avltree_node_rightmost): Added for code clarity. Really this could be inlined or a macro. (raptor_avltree_node_prev, raptor_avltree_node_next): Added for moving around tree in order. (raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next, raptor_avltree_cursor_get): Added avltree cursor with new methods. (main): Added tests for forwards and backwards cursoring. * src/raptor_statement.c: code style * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_start): Indenting * src/raptor_serialize_json.c: (raptor_statement_avltree_compare): Use raptor_statement_compare. * src/Makefile.am, src/raptor.h, src/raptor_general.c, src/raptor_statement.c: Added raptor_statement.c for statement functions. (raptor_statement_compare): Added, based on raptor_json_statement_compare. * src/raptor_turtle_writer.c: (main): Use write_base_uri in test. 2008-01-23 Dave Robillard * src/raptor_serialize_turtle.c: (raptor_turtle_context): Fix comment on written_header for Turtle (not XML). Add feature to control writing @base directive to Turtle files. (RAPTOR_FEATURE_WRITE_BASE_URI): Added. (raptor_new_turtle_writer): Added write_base_uri parameter. 2008-01-22 Dave Beckett * src/raptor_avltree.c: Remove most internal checks as they do not hold while sprouting and rebalancing (raptor_avltree_add, raptor_avltree_delete): Check here afterwards. 2008-01-21 Dave Beckett * src/raptor_avltree.c: Run raptor_avltree_check_node after only if not rebalancing - node is still being moved. * src/raptor_avltree.c: remove QUOTE_FN and flush stderr * src/raptor_avltree.c: Remove other raptor_avltree_check_node before * src/raptor_avltree.c: (raptor_avltree_sprout): Do not run before check, the node is not consistent while it is moving to the right place. * src/raptor_turtle_writer.c: (main) cast for strlen * src/raptor_internal.h: Added prototypes for raptor_avltree_size, raptor_avltree_dump and raptor_avltree_check * src/raptor_avltree.c: raptor_avltree_node gains a parent field raptor_avltree gains a size field (raptor_avltree_sprout): Add a parent node arg for updating parent field on sprouts. (raptor_avltree_add): Call raptor_avltree_sprout with NULL parent. (raptor_avltree_print_node): Added for debugging (raptor_avltree_check_node): Added to check a node for validity of pointers (raptor_avltree_sprout_left, raptor_avltree_sprout_right, raptor_avltree_sprout, raptor_avltree_balance_left, raptor_avltree_balance_right): Update parent pointers and run check functions afterwards. (raptor_avltree_delete_internal): Run check functions (raptor_avltree_size): Added to get tree size. (raptor_avltree_dump_internal, raptor_avltree_dump, raptor_avltree_check_internal, raptor_avltree_check): Added for debugging tree and checking consistency. (main): Added one more test item so tree is not balanced. Run checks during adds and delete. 2008-01-21 Lauri Aalto * src/raptor_rdfxml.c: (raptor_rdfxml_parse_init): Check for allocation failures and return error code if necessary. (raptor_rdfxml_parse_terminate): Do not assume sax2, id_set are initialized. 2008-01-21 Dave Beckett * utils/rdfdiff.c: Changed algorithm - read both files into rdfdiff_file* structures with rdfdiff_collect_statements, removing duplicates for each file then compare afterwards. (rdfdiff_statement_equals): Edited to have one return. (rdfdiff_statement_find): Added (rdfdiff_statement_exists): Uses rdfdiff_statement_find. (rdfdiff_compare_statements): Removed. (main): Use rdfdiff_collect_statements and after both files are read in, walk through and remove common statements from the from_file list. * tests/Makefile.am: show results from check-rdfdiff failing * utils/rdfdiff.c: (rdfdiff_statement_exists): Added. (rdfdiff_collect_statements): Use rdfdiff_statement_exists to not add duplicate statements. * tests/Makefile.am: Set result=1 on errors 2008-01-20 Dave Beckett * tests/turtle/rdf-schema.out, tests/turtle/rdf-schema.ttl: Remove duplicate statements from rdf-schema* now that serializer discards them * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property): Do not save duplicate statements. Fixes Issue #0000245 http://bugs.librdf.org/mantis/view.php?id=245 * src/raptor_avltree.c: (main): Add test for raptor_avltree_search * src/raptor.h, src/raptor_xml.c: autodocs 2008-01-17 Dave Beckett * src/raptor_serialize_json.c: (raptor_json_serialize_init): Change the test for name "json". * src/raptor_serialize_json.c: (raptor_init_serializer_json): Change serializer name 'json-t' to 'json-triples' * src/raptor_serialize_json.c: (raptor_init_serializer_json): Set JSON mime type to application/json. Change serializer name 'json' to resource-centric one and add alias 'json-r'. * src/raptor_xml_writer.c: (main): Use raptor_iostream_tell rather than deprecated raptor_iostream_get_bytes_written_count * src/raptor_serialize_json.c: (raptor_init_serializer_json): Cast * src/raptor_json_writer.c: Added define RAPTOR_JSON_WRITER_DATATYPES to remove unused fields and initialising/freeing supporting commented-out function raptor_json_writer_literal_datatype * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize.c, src/raptor_serialize_json.c: Added JSON serializing support. raptor_json_writer class for formatting JSON. json-r and json-t serializations based on http://n2.talis.com/wiki/RDF_JSON_Specification 2008-01-16 Dave Beckett * src/raptor_turtle_writer.c: (raptor_iostream_write_string_python): Do not write too much raw UTF-8 * src/raptor_turtle_writer.c: (raptor_iostream_write_string_python): Add Long Turtle mode 2, shift JSON to 3. (raptor_turtle_writer_quoted_counted_string): Use mode 2 for triple-quoted long strings * src/raptor_internal.h: Add raptor_turtle_writer_quoted_counted_string replacing raptor_turtle_writer_quoted * src/raptor.h, src/raptor_serialize_ntriples.c, src/raptor_turtle_writer.c: (raptor_iostream_write_string_python): Added renamed from raptor_iostream_write_string_turtle and replacing raptor_iostream_write_string_ntriples. Handles writing to an iostream with escapes in N-Triples, Turtle and JSON with appropriate escapes which are all python like. (raptor_iostream_write_string_turtle): Changed to use raptor_iostream_write_string_python. (raptor_turtle_writer_quoted_counted_string): Renamed from raptor_turtle_writer_quoted and taking a length 2008-01-14 Lauri Aalto * autogen.sh: Do not branch autogen.sh scripts but keep them identical 2008-01-12 Dave Beckett * autogen.sh: automake 1.10 research 2008-01-11 Lauri Aalto * src/n3_parser.y, src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/turtle_parser.y: (raptor_*_serializer_register_factory, raptor_*_parser_register_factory) Return error codes from parser and serializer factory registration functions. (raptor_serializer_register_factory, raptor_parser_register_factory) Check factory function return code. (raptor_parser_factory_add_alias, raptor_parser_factory_add_mime_type, raptor_parser_factory_add_uri) Added error code returns. Bubble up OOM errors to caller. * src/raptor_parse.c, src/raptor_serialize.c: (raptor_parsers_init, raptor_parser_register_factory, raptor_serializer_register_factory): Let raptor_init() handle dying on OOM. * src/n3_parser.y, src/ntriples_parse.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_uri.c, src/turtle_parser.y: Changed raptor internal init functions to return error codes. 2008-01-07 Lauri Aalto * src/raptor.h: Add raptor_error_handlers_init and raptor_sax2 RAPTOR_API exports. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Cast unsigned char -> char. Fixes compilation problems on non-gcc compilers. 2008-01-05 Dave Beckett * src/raptor_rfc2396.c: Update URI resolving for RFC3986 - some abnormal examples have different results or have defined possible results. (raptor_uri_resolve_uri_reference): Remove leading /../ and /./ (main): Update tests for RFC3986 changes * src/raptor_general.c: 2008 2008-01-04 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_ensure_writen_header): Do not assume context->turtle_writer is initialized. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_init): Require non-NULL rdf:type abbrev node. * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property): Prevent low-memory double deletes - increment object reference counts earlier. * src/raptor_turtle_writer.c: (raptor_turtle_writer_quoted): Check for stringbuffer alloc failures. 2008-01-03 Dave Beckett * src/raptor.h, src/raptor_qname.c: Added raptor_qname_get_counted_value 2008-01-03 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_statement): Return error if raptor_abbrev_node_lookup() or raptor_abbrev_subject_add_property() calls fail. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Removed redundant conditional. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): Check for qname alloc failure, do not pass NULL attributes to XML element. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Lowmem fixes. Return raptor_abbrev_subject_add_property() errors to caller. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): Added int return code. (raptor_rdfxmla_serialize_end) Fixed low-memory crash: make sure context->rdf_RDF_element is not used if NULL. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Fixed low-memory leaks. * src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: rdfxml-abbrev & turtle serializer error messages: Removed double 0x prefixes - %p already gives one. * src/raptor_iostream.c: Changed raptor_iostream_handler2 initializers from gcc/c99 style to traditional C. 2008-01-02 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_end): Do not assume xml_writer or rdf_RDF_element are initialized. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Check for raptor_abbrev_node_lookup() errors. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): Check for alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject): Check for alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Check for alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_literal): Check for qname attribute alloc failures. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_resource): Check for qname attribute alloc failure. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_list_items): Check for xml element alloc failure. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Check for alloc failure. * src/raptor_abbrev.c: (raptor_abbrev_node_lookup): Check for lookup node allocation failures. * src/raptor_abbrev.c: (raptor_new_abbrev_node): Check for alloc failures. * src/turtle_parser.y: (raptor_turtle_parse_chunk): Do not leave turtle_parser->buffer a dangling pointer if realloc fails. (raptor_turtle_parse_terminate) When freeing turtle_parser->buffer, do not trust turtle_parser->buffer_length to be in sync. * src/raptor_iostream.c: (raptor_new_iostream_to_filename): Close file on alloc failure. * src/raptor_iostream.c: (raptor_new_iostream_from_filename): Close file on alloc failure. * src/raptor_iostream.c: (raptor_iostream_calculate_modes, raptor_iostream_check_handler, raptor_new_iostream_from_handler2): Fix compiler error on some non-gcc compilers - illegal use of const. 2008-01-01 Dave Beckett * src/raptor_iostream.c: code style * src/raptor_iostream.c: docs * src/raptor_iostream.c: (raptor_iostream_calculate_modes): Use handler2 version for calculations. (raptor_iostream_check_handler): Check handler API versions. (raptor_new_iostream_from_handler2, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_new_iostream_from_filename, raptor_new_iostream_from_file_handle): Set mode once. * src/raptor_iostream.c: Check handler matches requested mode (raptor_iostream_calculate_modes): Added. (raptor_iostream_check_handler): Renamed from raptor_iostream_init_common. (raptor_new_iostream_from_handler2, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_new_iostream_from_filename, raptor_new_iostream_from_file_handle): Use raptor_iostream_check_handler to check things and raptor_iostream_calculate_modes to set mode. * src/raptor_iostream.c: Merge read/write filename code Ensure finish is called to fclose(handle) * src/raptor_iostream.c: (test_*): Replace uses of raptor_iostream_get_bytes_written_count with raptor_iostream_tell * src/raptor_iostream.c: Use unsigned long offset not bytes. (raptor_iostream_get_bytes_written_count): Deprecated for raptor_iostream_tell (raptor_iostream_tell): Added * src/raptor.h: Deprecate raptor_iostream_get_bytes_written_count for raptor_iostream_tell * src/raptor_iostream.c: (raptor_filename_iostream_finish): Added to close filename file handle. raptor_iostream_read_file_handle_handler struct added (raptor_new_iostream_from_file_handle): Added. (test_read_from_file_handle): Enabled. * src/raptor_iostream.c: Put ended EOF into flags * src/raptor_iostream.c: Merge read/write sinks * src/raptor_iostream.c: Add private field to raptor_iostream_s for handling freeing handler2 (raptor_new_iostream_from_handler2): Add const to hamdler2 arg. * src/raptor.h: raptor_iostream_handler2 loses private field - it can be part of internals of raptor_iostream Updated raptor_new_iostream_from_handler2 to make handler2 arg constant pointer to constant data. * src/raptor.h: Added raptor_iostream_read_eof and typedef raptor_iostream_read_eof_func to raptor_iostream_handler2 structure. * src/raptor_iostream.c: (raptor_iostream_read_eof): Added. (main) More unit test refactoring and checking. * src/raptor_iostream.c: Resource cleanup on test failures * src/raptor_iostream.c: Refactor read tests to be units - one function per test. * src/raptor_iostream.c: Refactor write tests to be units - one function per test. * src/raptor_iostream.c: (main): Tests for iostream reading raptor2-2.0.15/Makefile.in0000644000175000017500000007254612425344566012207 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - top level automake file for Raptor # # Copyright (C) 2000-2013 David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @RELEASE_VERSION_TRUE@am__append_1 = raptor2.spec subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/raptor2.pc.in \ $(srcdir)/raptor2.rdf.in $(srcdir)/raptor2.spec.in \ $(top_srcdir)/configure AUTHORS COPYING COPYING.LIB ChangeLog \ INSTALL NEWS build/ar-lib build/compile build/config.guess \ build/config.sub build/depcomp build/install-sh \ build/ltmain.sh build/missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = raptor2.spec raptor2.rdf raptor2.pc CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = librdfa src utils docs data tests examples scripts pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = raptor2.pc EXTRA_DIST = CMakeLists.txt ChangeLog.1 ChangeLog.2 ChangeLog.3 \ ChangeLog.4 ChangeLog.5 ChangeLog.6 ChangeLog.7 ChangeLog.8 \ ChangeLog.9 ChangeLog.10 ChangeLog.11 ChangeLog.12 \ ChangeLog.13 ChangeLog.14 README LICENSE.txt README.html \ NEWS.html LICENSE.html INSTALL.html README-cmake.md \ RELEASE.html LICENSE-2.0.txt NOTICE UPGRADING.html \ raptor2.rdf.in autogen.sh raptor2.spec.in raptor2.pc.in \ $(am__append_1) DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc # Create some text files from HTML sources @MAINTAINER_MODE_TRUE@LYNX = lynx @MAINTAINER_MODE_TRUE@HTML_TO_TEXT = TERM=vt100 $(LYNX) -dump -nolist @MAINTAINER_MODE_TRUE@SUFFIXES = .html .txt all: all-recursive .SUFFIXES: .SUFFIXES: .html .txt am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): raptor2.spec: $(top_builddir)/config.status $(srcdir)/raptor2.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ raptor2.rdf: $(top_builddir)/config.status $(srcdir)/raptor2.rdf.in cd $(top_builddir) && $(SHELL) ./config.status $@ raptor2.pc: $(top_builddir)/config.status $(srcdir)/raptor2.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA @MAINTAINER_MODE_TRUE@.html.txt: @MAINTAINER_MODE_TRUE@ $(HTML_TO_TEXT) $< > $@ @MAINTAINER_MODE_TRUE@$(srcdir)/README: $(srcdir)/README.html @MAINTAINER_MODE_TRUE@ $(HTML_TO_TEXT) $< > $@ @MAINTAINER_MODE_TRUE@$(srcdir)/NEWS: $(srcdir)/NEWS.html @MAINTAINER_MODE_TRUE@ $(HTML_TO_TEXT) $< > $@ # Some people need a little help ;-) test: check # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/raptor2.pc.in0000644000175000017500000000044312016211343012425 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/@PACKAGE@ Name: Raptor RDF Syntax Library Description: RDF Syntax Library Version: @VERSION@ Libs: -L${libdir} -lraptor2 Libs.private: @RAPTOR_LDFLAGS@ Cflags: -I${includedir} Requires:@PKG_CONFIG_REQUIRES@ raptor2-2.0.15/tests/0000755000175000017500000000000012425347074011343 500000000000000raptor2-2.0.15/tests/grddl/0000755000175000017500000000000012425347073012436 500000000000000raptor2-2.0.15/tests/grddl/data-01.nt0000644000175000017500000000001510677565706014060 00000000000000# No Triples raptor2-2.0.15/tests/grddl/Makefile.am0000644000175000017500000000477412011242611014405 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor GRDDL tests # # Copyright (C) 2007, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # TEST_FILES=test-01.html TEST_BAD_FILES= TEST_OUT_FILES=test-01.out TEST_DATA_FILES=\ data-01.rdf data-02.rdf data-01.nt ALL_TEST_FILES= \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_DATA_FILES) EXTRA_DIST = CMakeLists.txt $(ALL_TEST_FILES) CLEANFILES = CMakeTests.txt RAPPER = $(top_builddir)/utils/rapper build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) if RAPTOR_PARSER_GRDDL check-local: check-grddl else check-local: endif if MAINTAINER_MODE check_grddl_deps = $(TEST_FILES) endif check-grddl: build-rapper $(check_grddl_deps) @result=0; \ $(RECHO) "Testing GRDDL"; \ printf 'IF(RAPTOR_PARSER_GRDDL)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .html` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -f noNet -q -i grddl -o ntriples $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ if test $$status != 1 ; then \ rm -f $$name.res $$name.err; \ fi; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ grddl.$$name \ "\$${RAPPER} -f noNet -q -i grddl -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_GRDDL)\n\n' >>CMakeTests.txt; \ exit $$result raptor2-2.0.15/tests/grddl/Makefile.in0000644000175000017500000003451012425344566014432 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor GRDDL tests # # Copyright (C) 2007, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/grddl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TEST_FILES = test-01.html TEST_BAD_FILES = TEST_OUT_FILES = test-01.out TEST_DATA_FILES = \ data-01.rdf data-02.rdf data-01.nt ALL_TEST_FILES = \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_DATA_FILES) EXTRA_DIST = CMakeLists.txt $(ALL_TEST_FILES) CLEANFILES = CMakeTests.txt RAPPER = $(top_builddir)/utils/rapper @MAINTAINER_MODE_TRUE@check_grddl_deps = $(TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/grddl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/grddl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) @RAPTOR_PARSER_GRDDL_TRUE@check-local: check-grddl @RAPTOR_PARSER_GRDDL_FALSE@check-local: check-grddl: build-rapper $(check_grddl_deps) @result=0; \ $(RECHO) "Testing GRDDL"; \ printf 'IF(RAPTOR_PARSER_GRDDL)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .html` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -f noNet -q -i grddl -o ntriples $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ if test $$status != 1 ; then \ rm -f $$name.res $$name.err; \ fi; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ grddl.$$name \ "\$${RAPPER} -f noNet -q -i grddl -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_GRDDL)\n\n' >>CMakeTests.txt; \ exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/grddl/CMakeLists.txt0000644000175000017500000000062612011242611015101 00000000000000# raptor/tests/grddl/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # IF(RAPTOR_PARSER_GRDDL) RAPPER_TEST(grddl.test-01 "${RAPPER} -f noNet -q -i grddl -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/test-01.html" test-01.res ${CMAKE_CURRENT_SOURCE_DIR}/test-01.out ) ENDIF(RAPTOR_PARSER_GRDDL) # end raptor/tests/grddl/CMakeLists.txt raptor2-2.0.15/tests/grddl/test-01.out0000644000175000017500000000026010677565706014316 00000000000000_:genid1 "Triple from data-01.rdf" . _:genid2 "Triple from data-02.rdf" . raptor2-2.0.15/tests/grddl/test-01.html0000644000175000017500000000145510677602636014454 00000000000000 GRDDL link genid test raptor2-2.0.15/tests/grddl/data-01.rdf0000644000175000017500000000031210677565706014212 00000000000000 Triple from data-01.rdf raptor2-2.0.15/tests/grddl/data-02.rdf0000644000175000017500000000031210677565706014213 00000000000000 Triple from data-02.rdf raptor2-2.0.15/tests/Makefile.am0000644000175000017500000000261512250750761013320 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor tests # # Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # TESTS=raptor_empty_test$(EXEEXT) AM_CPPFLAGS=-I$(top_srcdir)/src AM_CFLAGS= -I$(top_builddir)/src @CFLAGS@ $(MEM) AM_LDFLAGS=$(top_builddir)/src/libraptor2.la $(MEM_LIBS) EXTRA_PROGRAMS=$(TESTS) CLEANFILES=$(TESTS) raptor_empty_test_SOURCES=empty.c # Used to make N-triples output consistent BASE_URI=http://librdf.org/raptor/tests/ SUBDIRS = rdfxml ntriples ntriples-2013 nquads-2013 turtle turtle-2013 trig grddl rdfa rdfa11 json feeds $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libraptor2.la raptor2-2.0.15/tests/Makefile.in0000644000175000017500000006361012425344566013341 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor tests # # Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_raptor_empty_test_OBJECTS = empty.$(OBJEXT) raptor_empty_test_OBJECTS = $(am_raptor_empty_test_OBJECTS) raptor_empty_test_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(raptor_empty_test_SOURCES) DIST_SOURCES = $(raptor_empty_test_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = raptor_empty_test$(EXEEXT) AM_CPPFLAGS = -I$(top_srcdir)/src AM_CFLAGS = -I$(top_builddir)/src @CFLAGS@ $(MEM) AM_LDFLAGS = $(top_builddir)/src/libraptor2.la $(MEM_LIBS) EXTRA_PROGRAMS = $(TESTS) CLEANFILES = $(TESTS) raptor_empty_test_SOURCES = empty.c # Used to make N-triples output consistent BASE_URI = http://librdf.org/raptor/tests/ SUBDIRS = rdfxml ntriples ntriples-2013 nquads-2013 turtle turtle-2013 trig grddl rdfa rdfa11 json feeds all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): raptor_empty_test$(EXEEXT): $(raptor_empty_test_OBJECTS) $(raptor_empty_test_DEPENDENCIES) $(EXTRA_raptor_empty_test_DEPENDENCIES) @rm -f raptor_empty_test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(raptor_empty_test_OBJECTS) $(raptor_empty_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/empty.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean clean-generic \ clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libraptor2.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/ntriples-2013/0000755000175000017500000000000012425347072013564 500000000000000raptor2-2.0.15/tests/ntriples-2013/nt-syntax-str-esc-03.nt0000644000175000017500000000006712222044704017604 00000000000000 "a\U00000020b" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-lang-01.nt0000644000175000017500000000010212222044704017655 00000000000000# Bad lang tag "string"@1 . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-str-esc-01.nt0000644000175000017500000000005612222044704017600 00000000000000 "a\n" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-num-01.nt0000644000175000017500000000005212222044704017537 00000000000000 1 . raptor2-2.0.15/tests/ntriples-2013/literal_with_FORM_FEED.nt0000644000175000017500000000006112245427574020147 00000000000000 "\f" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-datatypes-01.nt0000644000175000017500000000012712222044704020215 00000000000000 "123"^^ . raptor2-2.0.15/tests/ntriples-2013/README0000644000175000017500000000161112277157116014366 00000000000000This README is for the W3C RDF Working Group's N-Triples test suite. This test suite contains two kinds of tests: Positive syntax (rdft:TestNTriplesPositiveSyntax) - an input N-Triples file with no syntax errors. Negative syntax (rdft:TestNTriplesNegativeSyntax) - an input N-Triples file with at least one syntax error. The manifest.ttl file in this directory lists tests in the RDF WG's N-Triples test suite. All tests have a name (mf:name) and an input (mf:action). • An implementation passes a positive syntax test if it parses the input. • An implementation passes a negative syntax test if it fails to parse the input. The home of the test suite is . See http://www.w3.org/2011/rdf-wg/wiki/RDF_Test_Suites for more details. Eric Prud'hommeaux - 11 June 2013. Gregg Kellogg - 26 June 2013. raptor2-2.0.15/tests/ntriples-2013/Makefile.am0000644000175000017500000001413412277157116015546 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Triples 2013 tests # # Copyright (C) 2013, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # RDFCOMPARE=$(srcdir)/../../scripts/rdfcompare RDFXML_DIR = ../rdfxml TEST_GOOD_FILES = \ nt-syntax-file-01.nt \ nt-syntax-file-02.nt \ nt-syntax-file-03.nt \ nt-syntax-uri-01.nt \ nt-syntax-uri-02.nt \ nt-syntax-uri-03.nt \ nt-syntax-uri-04.nt \ nt-syntax-string-01.nt \ nt-syntax-string-02.nt \ nt-syntax-string-03.nt \ nt-syntax-str-esc-01.nt \ nt-syntax-str-esc-02.nt \ nt-syntax-str-esc-03.nt \ nt-syntax-bnode-01.nt \ nt-syntax-bnode-02.nt \ nt-syntax-bnode-03.nt \ nt-syntax-datatypes-01.nt \ nt-syntax-datatypes-02.nt \ nt-syntax-subm-01.nt \ comment_following_triple.nt \ LITERAL.nt \ LITERAL_all_controls.nt \ LITERAL_all_punctuation.nt \ LITERAL_ascii_boundaries.nt \ literal_false.nt \ literal_true.nt \ LITERAL_with_2_dquotes.nt \ LITERAL_with_2_squotes.nt \ literal_with_BACKSPACE.nt \ literal_with_CARRIAGE_RETURN.nt \ literal_with_CHARACTER_TABULATION.nt \ literal_with_FORM_FEED.nt \ literal_with_LINE_FEED.nt \ literal_with_REVERSE_SOLIDUS.nt \ literal_with_REVERSE_SOLIDUS2.nt \ LITERAL_with_UTF8_boundaries.nt \ LITERAL_with_dquote.nt \ literal_with_numeric_escape4.nt \ literal_with_numeric_escape8.nt \ LITERAL_with_squote.nt \ langtagged_string.nt \ lantag_with_subtag.nt \ minimal_whitespace.nt TEST_BAD_FILES = \ nt-syntax-bad-uri-01.nt \ nt-syntax-bad-uri-02.nt \ nt-syntax-bad-uri-03.nt \ nt-syntax-bad-uri-04.nt \ nt-syntax-bad-uri-05.nt \ nt-syntax-bad-uri-06.nt \ nt-syntax-bad-uri-07.nt \ nt-syntax-bad-uri-08.nt \ nt-syntax-bad-uri-09.nt \ nt-syntax-bad-prefix-01.nt \ nt-syntax-bad-base-01.nt \ nt-syntax-bad-struct-01.nt \ nt-syntax-bad-struct-02.nt \ nt-syntax-bad-lang-01.nt \ nt-syntax-bad-esc-01.nt \ nt-syntax-bad-esc-02.nt \ nt-syntax-bad-esc-03.nt \ nt-syntax-bad-string-01.nt \ nt-syntax-bad-string-02.nt \ nt-syntax-bad-string-03.nt \ nt-syntax-bad-string-04.nt \ nt-syntax-bad-string-05.nt \ nt-syntax-bad-string-06.nt \ nt-syntax-bad-string-07.nt \ nt-syntax-bad-num-01.nt \ nt-syntax-bad-num-02.nt \ nt-syntax-bad-num-03.nt # Used to make N-triples output consistent BASE_URI=http://www.w3.org/2013/N-TriplesTests/ # for rdf-schema.ttl RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES= \ $(TEST_GOOD_FILES) \ $(TEST_BAD_FILES) EXTRA_DIST = README \ $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-good-ntriples check-bad-ntriples if MAINTAINER_MODE check_good_ntriples_deps = $(TEST_GOOD_FILES) endif check-good-ntriples: build-rapper $(check_good_ntriples_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing good N-Triples syntax passes"; \ for test in $(TEST_GOOD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ rm -f $$name.res $$name.err; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result if MAINTAINER_MODE check_bad_ntriples_deps = $(TEST_BAD_FILES) endif check-bad-ntriples: build-rapper $(check_bad_ntriples_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing bad N-Triples fails"; \ for test in $(TEST_BAD_FILES) ; do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result raptor2-2.0.15/tests/ntriples-2013/Makefile.in0000644000175000017500000004357612425344566015575 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Triples 2013 tests # # Copyright (C) 2013, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/ntriples-2013 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ RDFCOMPARE = $(srcdir)/../../scripts/rdfcompare RDFXML_DIR = ../rdfxml TEST_GOOD_FILES = \ nt-syntax-file-01.nt \ nt-syntax-file-02.nt \ nt-syntax-file-03.nt \ nt-syntax-uri-01.nt \ nt-syntax-uri-02.nt \ nt-syntax-uri-03.nt \ nt-syntax-uri-04.nt \ nt-syntax-string-01.nt \ nt-syntax-string-02.nt \ nt-syntax-string-03.nt \ nt-syntax-str-esc-01.nt \ nt-syntax-str-esc-02.nt \ nt-syntax-str-esc-03.nt \ nt-syntax-bnode-01.nt \ nt-syntax-bnode-02.nt \ nt-syntax-bnode-03.nt \ nt-syntax-datatypes-01.nt \ nt-syntax-datatypes-02.nt \ nt-syntax-subm-01.nt \ comment_following_triple.nt \ LITERAL.nt \ LITERAL_all_controls.nt \ LITERAL_all_punctuation.nt \ LITERAL_ascii_boundaries.nt \ literal_false.nt \ literal_true.nt \ LITERAL_with_2_dquotes.nt \ LITERAL_with_2_squotes.nt \ literal_with_BACKSPACE.nt \ literal_with_CARRIAGE_RETURN.nt \ literal_with_CHARACTER_TABULATION.nt \ literal_with_FORM_FEED.nt \ literal_with_LINE_FEED.nt \ literal_with_REVERSE_SOLIDUS.nt \ literal_with_REVERSE_SOLIDUS2.nt \ LITERAL_with_UTF8_boundaries.nt \ LITERAL_with_dquote.nt \ literal_with_numeric_escape4.nt \ literal_with_numeric_escape8.nt \ LITERAL_with_squote.nt \ langtagged_string.nt \ lantag_with_subtag.nt \ minimal_whitespace.nt TEST_BAD_FILES = \ nt-syntax-bad-uri-01.nt \ nt-syntax-bad-uri-02.nt \ nt-syntax-bad-uri-03.nt \ nt-syntax-bad-uri-04.nt \ nt-syntax-bad-uri-05.nt \ nt-syntax-bad-uri-06.nt \ nt-syntax-bad-uri-07.nt \ nt-syntax-bad-uri-08.nt \ nt-syntax-bad-uri-09.nt \ nt-syntax-bad-prefix-01.nt \ nt-syntax-bad-base-01.nt \ nt-syntax-bad-struct-01.nt \ nt-syntax-bad-struct-02.nt \ nt-syntax-bad-lang-01.nt \ nt-syntax-bad-esc-01.nt \ nt-syntax-bad-esc-02.nt \ nt-syntax-bad-esc-03.nt \ nt-syntax-bad-string-01.nt \ nt-syntax-bad-string-02.nt \ nt-syntax-bad-string-03.nt \ nt-syntax-bad-string-04.nt \ nt-syntax-bad-string-05.nt \ nt-syntax-bad-string-06.nt \ nt-syntax-bad-string-07.nt \ nt-syntax-bad-num-01.nt \ nt-syntax-bad-num-02.nt \ nt-syntax-bad-num-03.nt # Used to make N-triples output consistent BASE_URI = http://www.w3.org/2013/N-TriplesTests/ # for rdf-schema.ttl RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES = \ $(TEST_GOOD_FILES) \ $(TEST_BAD_FILES) EXTRA_DIST = README \ $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff @MAINTAINER_MODE_TRUE@check_good_ntriples_deps = $(TEST_GOOD_FILES) @MAINTAINER_MODE_TRUE@check_bad_ntriples_deps = $(TEST_BAD_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/ntriples-2013/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/ntriples-2013/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-good-ntriples check-bad-ntriples check-good-ntriples: build-rapper $(check_good_ntriples_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing good N-Triples syntax passes"; \ for test in $(TEST_GOOD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ rm -f $$name.res $$name.err; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result check-bad-ntriples: build-rapper $(check_bad_ntriples_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing bad N-Triples fails"; \ for test in $(TEST_BAD_FILES) ; do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-02.nt0000644000175000017500000000005412222044704020251 00000000000000 1.0 . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-09.nt0000644000175000017500000000012412222044704017547 00000000000000# No relative IRIs in N-Triples "foo"^^
. raptor2-2.0.15/tests/ntriples-2013/literal_with_numeric_escape4.nt0000644000175000017500000000006512245427574021673 00000000000000 "\u006F" . raptor2-2.0.15/tests/ntriples-2013/LITERAL_with_2_dquotes.nt0000644000175000017500000000006512277157103020163 00000000000000 "x\"\"y" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-07.nt0000644000175000017500000000005512222044704020257 00000000000000 abc" . raptor2-2.0.15/tests/ntriples-2013/minimal_whitespace.nt0000644000175000017500000000036412245427574017722 00000000000000. "Alice". _:o. _:s. _:s"Alice". _:s_:bnode1. raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-num-03.nt0000644000175000017500000000005612222044704017545 00000000000000 1.0e0 . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-string-02.nt0000644000175000017500000000006412222044704017526 00000000000000 "string"@en . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-string-01.nt0000644000175000017500000000006112222044704017522 00000000000000 "string" . raptor2-2.0.15/tests/ntriples-2013/literal_with_REVERSE_SOLIDUS.nt0000644000175000017500000000006112245427574021136 00000000000000 "\\" . raptor2-2.0.15/tests/ntriples-2013/LITERAL_with_squote.nt0000644000175000017500000000006212277157103017573 00000000000000 "x'y" . raptor2-2.0.15/tests/ntriples-2013/LITERAL_all_punctuation.nt0000644000175000017500000000011112277157103020414 00000000000000 " !\"#$%&():;<=>?@[]^_`{|}~" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-prefix-01.nt0000644000175000017500000000003612222044704020237 00000000000000@prefix : . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-file-03.nt0000644000175000017500000000003712222044704017140 00000000000000#One comment, one empty line. raptor2-2.0.15/tests/ntriples-2013/comment_following_triple.nt0000644000175000017500000000046512245427574021163 00000000000000 . # comment _:o . # comment "o" . # comment "o"^^ . # comment "o"@en . # comment raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-esc-02.nt0000644000175000017500000000010512222044704017512 00000000000000# Bad string escape "\uWXYZ" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bnode-02.nt0000644000175000017500000000013112222044704017302 00000000000000 _:a . _:a . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-struct-01.nt0000644000175000017500000000012012222044704020260 00000000000000 , . raptor2-2.0.15/tests/ntriples-2013/LITERAL_with_dquote.nt0000644000175000017500000000006312277157103017555 00000000000000 "x\"y" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-subm-01.nt0000644000175000017500000000776012222044704017177 00000000000000# # Copyright World Wide Web Consortium, (Massachusetts Institute of # Technology, Institut National de Recherche en Informatique et en # Automatique, Keio University). # # All Rights Reserved. # # Please see the full Copyright clause at # # # Test file with a variety of legal N-Triples # # Dave Beckett - http://purl.org/net/dajobe/ # # $Id: test.nt,v 1.7 2003/10/06 15:52:19 dbeckett2 Exp $ # ##################################################################### # comment lines # comment line after whitespace # empty blank line, then one with spaces and tabs . _:anon . _:anon . # spaces and tabs throughout: . # line ending with CR NL (ASCII 13, ASCII 10) . # 2 statement lines separated by single CR (ASCII 10) . . # All literal escapes "simple literal" . "backslash:\\" . "dquote:\"" . "newline:\n" . "return\r" . "tab:\t" . # Space is optional before final . . "x". _:anon. # \u and \U escapes # latin small letter e with acute symbol \u00E9 - 3 UTF-8 bytes #xC3 #A9 "\u00E9" . # Euro symbol \u20ac - 3 UTF-8 bytes #xE2 #x82 #xAC "\u20AC" . # resource18 test removed # resource19 test removed # resource20 test removed # XML Literals as Datatyped Literals ""^^ . " "^^ . "x"^^ . "\""^^ . ""^^ . "a "^^ . "a c"^^ . "a\n\nc"^^ . "chat"^^ . # resource28 test removed 2003-08-03 # resource29 test removed 2003-08-03 # Plain literals with languages "chat"@fr . "chat"@en . # Typed Literals "abc"^^ . # resource33 test removed 2003-08-03 raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-03.nt0000644000175000017500000000005612222044704020254 00000000000000 1.0e1 . raptor2-2.0.15/tests/ntriples-2013/LITERAL_with_UTF8_boundaries.nt0000644000175000017500000000014312277157103021214 00000000000000 "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-08.nt0000644000175000017500000000011412222044704017545 00000000000000# No relative IRIs in N-Triples . raptor2-2.0.15/tests/ntriples-2013/LITERAL_ascii_boundaries.nt0000644000175000017500000000007112277157103020523 00000000000000 " &([]" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-datatypes-02.nt0000644000175000017500000000013112222044704020211 00000000000000 "123"^^ . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-04.nt0000644000175000017500000000014712222044704017547 00000000000000# Bad IRI : character escapes not allowed. . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-07.nt0000644000175000017500000000011412222044704017544 00000000000000# No relative IRIs in N-Triples

. raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-03.nt0000644000175000017500000000013312222044704017541 00000000000000# Bad IRI : bad escape . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-06.nt0000644000175000017500000000011412222044704017543 00000000000000# No relative IRIs in N-Triples . raptor2-2.0.15/tests/ntriples-2013/literal_with_CARRIAGE_RETURN.nt0000644000175000017500000000006112245427574021075 00000000000000 "\r" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-05.nt0000644000175000017500000000006212222044704020253 00000000000000 """abc""" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-base-01.nt0000644000175000017500000000003212222044704017650 00000000000000@base . raptor2-2.0.15/tests/ntriples-2013/literal_with_CHARACTER_TABULATION.nt0000644000175000017500000000006112245427574021637 00000000000000 "\t" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bnode-01.nt0000644000175000017500000000005512222044704017306 00000000000000_:a . raptor2-2.0.15/tests/ntriples-2013/literal_false.nt0000644000175000017500000000014012245427574016656 00000000000000 "false"^^ . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-uri-01.nt0000644000175000017500000000007312222044704017016 00000000000000 . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-struct-02.nt0000644000175000017500000000014512222044704020270 00000000000000 ; , . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bnode-03.nt0000644000175000017500000000013312245427574017324 00000000000000 _:1a . _:1a . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-02.nt0000644000175000017500000000013112222044704017536 00000000000000# Bad IRI : bad escape . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-01.nt0000644000175000017500000000005612222044704020252 00000000000000 "abc' . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-num-02.nt0000644000175000017500000000005412222044704017542 00000000000000 1.0 . raptor2-2.0.15/tests/ntriples-2013/langtagged_string.nt0000644000175000017500000000006612245427574017542 00000000000000 "chat"@en . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-01.nt0000644000175000017500000000012312222044704017536 00000000000000# Bad IRI : space. . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-esc-03.nt0000644000175000017500000000011112222044704017510 00000000000000# Bad string escape "\U0000WXYZ" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-file-01.nt0000644000175000017500000000000012222044704017124 00000000000000raptor2-2.0.15/tests/ntriples-2013/literal_with_REVERSE_SOLIDUS2.nt0000644000175000017500000000010112245427574021213 00000000000000 "test-\\" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-file-02.nt0000644000175000017500000000001512222044704017133 00000000000000#Empty file. raptor2-2.0.15/tests/ntriples-2013/literal_with_LINE_FEED.nt0000644000175000017500000000006112245427574020133 00000000000000 "\n" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-string-03.nt0000644000175000017500000000006712222044704017532 00000000000000 "string"@en-uk . raptor2-2.0.15/tests/ntriples-2013/LITERAL_all_controls.nt0000644000175000017500000000033712277157103017720 00000000000000 "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" . raptor2-2.0.15/tests/ntriples-2013/LITERAL.nt0000644000175000017500000000006012277157103015136 00000000000000 "x" . raptor2-2.0.15/tests/ntriples-2013/LITERAL_with_2_squotes.nt0000644000175000017500000000006312277157103020200 00000000000000 "x''y" . raptor2-2.0.15/tests/ntriples-2013/lantag_with_subtag.nt0000644000175000017500000000010512245427574017717 00000000000000 "Cheers"@en-UK . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-esc-01.nt0000644000175000017500000000010312222044704017507 00000000000000# Bad string escape "a\zb" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-04.nt0000644000175000017500000000006212222044704020252 00000000000000 '''abc''' . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-string-06.nt0000644000175000017500000000005512222044704020256 00000000000000 "abc . raptor2-2.0.15/tests/ntriples-2013/literal_with_numeric_escape8.nt0000644000175000017500000000007112245427574021674 00000000000000 "\U0000006F" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-bad-uri-05.nt0000644000175000017500000000014712222044704017550 00000000000000# Bad IRI : character escapes not allowed. . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-uri-04.nt0000644000175000017500000000024212222044704017017 00000000000000# IRI with all chars in it. . raptor2-2.0.15/tests/ntriples-2013/literal_with_BACKSPACE.nt0000644000175000017500000000006112245427574020075 00000000000000 "\b" . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-uri-02.nt0000644000175000017500000000012312222044704017013 00000000000000# x53 is capital S . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-uri-03.nt0000644000175000017500000000012712222044704017020 00000000000000# x53 is capital S . raptor2-2.0.15/tests/ntriples-2013/literal_true.nt0000644000175000017500000000013712245427574016551 00000000000000 "true"^^ . raptor2-2.0.15/tests/ntriples-2013/nt-syntax-str-esc-02.nt0000644000175000017500000000006312222044704017577 00000000000000 "a\u0020b" . raptor2-2.0.15/tests/turtle/0000755000175000017500000000000012425347072012660 500000000000000raptor2-2.0.15/tests/turtle/bad-04.ttl0000644000175000017500000000015710674751730014303 00000000000000# No comma is allowed in collections @prefix : . :a :b ( "apple", "banana" ) . raptor2-2.0.15/tests/turtle/test-27.out0000644000175000017500000000013410674751730014540 00000000000000 . raptor2-2.0.15/tests/turtle/test-03.out0000644000175000017500000000040210674751730014530 00000000000000 . . . raptor2-2.0.15/tests/turtle/test-29.ttl0000644000175000017500000000023312112703616014523 00000000000000 . raptor2-2.0.15/tests/turtle/test-02.out0000644000175000017500000000040210674751730014527 00000000000000 . . . raptor2-2.0.15/tests/turtle/test-32-out.ttl0000644000175000017500000000024011176653104015325 00000000000000@prefix rdf: . @prefix ex: . ex:node1 rdf:value (ex:item1 ex:item2 ) . raptor2-2.0.15/tests/turtle/bad-24.ttl0000644000175000017500000000017612222044704014271 00000000000000 "value"@en^^ . raptor2-2.0.15/tests/turtle/bad-18.ttl0000644000175000017500000000015012112703616014266 00000000000000# '''-quoted long literal @prefix : . :a :b '''John said: "Hello World!"''' . raptor2-2.0.15/tests/turtle/test-37.out0000644000175000017500000000010511526311642014526 00000000000000 "Cheers"@en-UK . raptor2-2.0.15/tests/turtle/test-20.out0000644000175000017500000000015210674751730014531 00000000000000 "" . "" . raptor2-2.0.15/tests/turtle/test-27.ttl0000644000175000017500000000016310674751730014536 00000000000000@prefix foo: . @prefix foo: . foo:blah foo:blah foo:blah . raptor2-2.0.15/tests/turtle/test-25.ttl0000644000175000017500000000040210674751730014530 00000000000000# comment test @prefix : . :a :b :c . # end of line comment :d # ignore me :e # and me :f # and me . :g :h #ignore me :i, # and me :j . # and me :k :l :m ; #ignore me :n :o ; # and me :p :q . # and me raptor2-2.0.15/tests/turtle/test-34.ttl0000644000175000017500000000023211331137720014515 00000000000000@prefix dbpedia: . . raptor2-2.0.15/tests/turtle/bad-01.ttl0000644000175000017500000000015010674751730014271 00000000000000# Forbidden by RDF - predicate cannot be blank @prefix : . :a [ :b :c ] :d . raptor2-2.0.15/tests/turtle/test-02.ttl0000644000175000017500000000013010674751730014521 00000000000000# Test , operator @prefix : . :a :b :c, :d, :e . raptor2-2.0.15/tests/turtle/test-11.out0000644000175000017500000000044010674751730014531 00000000000000 "a" . "b" . "c" . "d" . raptor2-2.0.15/tests/turtle/test-29.out0000644000175000017500000000023312112703616014527 00000000000000 . raptor2-2.0.15/tests/turtle/Makefile.am0000644000175000017500000002502712425333224014634 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Turtle tests # # Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_FILES=test-00.ttl test-01.ttl test-02.ttl test-03.ttl \ test-04.ttl test-05.ttl test-06.ttl test-07.ttl test-08.ttl \ test-09.ttl test-10.ttl test-11.ttl test-12.ttl test-13.ttl \ test-14.ttl test-15.ttl test-16.ttl test-17.ttl test-18.ttl \ test-19.ttl test-20.ttl test-21.ttl test-22.ttl test-23.ttl \ test-24.ttl test-25.ttl test-26.ttl test-27.ttl \ test-29.ttl test-30.ttl test-33.ttl test-36.ttl test-37.ttl \ test-38.ttl bad-15.ttl bad-17.ttl bad-18.ttl bad-21.ttl bad-22.ttl \ rdf-schema.ttl \ rdfs-namespace.ttl \ rdfq-results.ttl TEST_BAD_FILES=bad-00.ttl bad-01.ttl bad-02.ttl bad-03.ttl \ bad-04.ttl bad-05.ttl bad-06.ttl bad-07.ttl bad-08.ttl bad-09.ttl \ bad-10.ttl bad-11.ttl bad-12.ttl bad-13.ttl bad-14.ttl bad-16.ttl \ bad-19.ttl bad-20.ttl \ bad-23.ttl bad-24.ttl TEST_OUT_FILES=test-00.out test-01.out test-02.out test-03.out \ test-04.out test-05.out test-06.out test-07.out test-08.out \ test-09.out test-10.out test-11.out test-12.out test-13.out \ test-14.out test-15.out test-16.out test-17.out test-18.out \ test-19.out test-20.out test-21.out test-22.out test-23.out \ test-24.out test-25.out test-26.out test-27.out test-28.out \ test-29.out test-30.out test-33.out test-36.out test-37.out \ test-38.out bad-15.out bad-17.out bad-18.out bad-21.out bad-22.out \ rdf-schema.out \ rdfs-namespace.out \ rdfq-results.out TEST_SERIALIZE_FILES= \ test-28.ttl test-31.ttl test-32.ttl test-34.ttl test-39.ttl TEST_SERIALIZE_OUT_FILES= \ test-28-out.ttl test-31-out.ttl test-32-out.ttl test-34-out.ttl test-39-out.ttl TURTLE_HACK_OUT_FILES= \ ex-38-turtle.out TURTLE_SERIALIZE_RDF_FILES=ex-62.rdf TEST_MANIFEST_FILES=manifest.ttl manifest-bad.ttl # Used to make N-triples output consistent BASE_URI=http://www.w3.org/2001/sw/DataAccess/df1/tests/ # for rdf-schema.ttl RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES= README.txt \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_MANIFEST_FILES) \ $(TEST_SERIALIZE_FILES) \ $(TEST_SERIALIZE_OUT_FILES) \ $(TURTLE_SERIALIZE_RDF_TEST_FILES) \ $(TURTLE_SERIALIZE_RDF_FILES) \ $(TURTLE_HACK_OUT_FILES) EXTRA_DIST = $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-rdf check-bad-rdf check-turtle-serialize \ check-turtle-serialize-syntax check-turtle-parse-ntriples \ check-turtle-serialize-rdf if MAINTAINER_MODE check_rdf_deps = $(TEST_FILES) endif check-rdf: build-rapper $(check_rdf_deps) @result=0; \ $(RECHO) "Testing legal Turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ exit $$result if MAINTAINER_MODE check_bad_rdf_deps = $(TEST_BAD_FILES) endif check-bad-rdf: build-rapper $(check_bad_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing bad Turtle fails"; \ for test in $(TEST_BAD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_turtle_serialize_deps = $(TEST_FILES) endif check-turtle-serialize: build-rdfdiff build-rapper $(check_turtle_serialize_deps) @set +e; result=0; \ $(RECHO) "Testing turtle serialization with legal turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ $(RDFDIFF) -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(RECHO) $(RDFDIFF) -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name-turtle.ttl; cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_turtle_serialize_syntax_deps = $(TEST_SERIALIZE_FILES) endif check-turtle-serialize-syntax: build-rapper $(check_turtle_serialize_syntax_deps) @set +e; result=0; \ $(RECHO) "Testing turtle exact serialization output"; \ for test in $(TEST_SERIALIZE_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = test-31 -o $$name = test-32 -o $$name = test-39; then \ baseuri=-; \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ cmp -s $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ status=$$?; \ if test $$status = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ cat $$name.err; \ diff -a -u $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ fi; \ rm -f $$name-turtle.ttl $$name.err; \ done; \ set -e; exit $$result check-turtle-parse-ntriples: build-rapper @set +e; result=0; \ $(RECHO) "Testing Turtle parsing with N-Triples tests"; \ NT_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(NTRIPLES_DIR) && $(MAKE) print-nt-test-files | sed -e 's,^, ,' -e 's, ,$(NTRIPLES_DIR)/,g'`; \ for test in $$NT_TEST_FILES; do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ test_expected=$(srcdir)/$(NTRIPLES_DIR)/$$name.out; \ if cmp $$test_expected $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $$test_expected $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-rdf: build-rdfdiff build-rapper @set +e; result=0; \ RDF_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(RDFXML_DIR) && $(MAKE) print-rdf-test-files | sed -e 's,^, ,' -e 's, ,$(RDFXML_DIR)/,g'`; \ $(RECHO) "Testing turtle serialization with legal rdf/xml"; \ for test in $$RDF_TEST_FILES $(TURTLE_SERIALIZE_RDF_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ if test $$test = "$(RDFXML_DIR)/ex-38.rdf"; then \ diff $(srcdir)/ex-38-turtle.out $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(RDFDIFF) -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(RECHO) $(RDFDIFF) -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result if MAINTAINER_MODE zip: tests.zip tests.zip: $(ALL_TEST_FILES) rm -f $@ zip $@ $(ALL_TEST_FILES) endif raptor2-2.0.15/tests/turtle/rdfs-namespace.out0000644000175000017500000004373110674751730016235 00000000000000 . "Indicates membership of a class" . . . "type"@en . . . "A collection of alternatives."@en . . "Alt"@en . . . "An unordered collection."@en . . "Bag"@en . . . "The concept of a property." . . "Property"@en . . . "An ordered collection."@en . . "Seq"@en . . . "The class of RDF statements." . . "Statement"@en . . . "The object of an RDF statement." . . . "object"@en . . "the predicate of an RDF statement." . . . "predicate"@en . . . "The subject of an RDF statement." . . . "subject"@en . . . "Identifies the principal value (usually a string) of a property when the property value is a structured resource" . . . "value"@en . . . "The concept of Class" . . "Class"@en . . . "This represents the set Containers." . . "Container"@en . . . "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'." . . "ContainerMembershipProperty"@en . . . "This represents the set of atomic values, eg. textual strings." . . "Literal"@en . . "The class resource, everything." . . "Resource"@en . . "Use this for descriptions" . . . "comment"@en . . . "A domain class for a property type" . . . "domain"@en . . . "Indicates the namespace of a resource" . . . "isDefinedBy"@en . . . . "Provides a human-readable version of a resource name." . . . "label"@en . . . "a member of a container" . . . "member"@en . . "A range class for a property type" . . . "range"@en . . . "A resource that provides information about the subject resource" . . . "seeAlso"@en . . . "Indicates membership of a class" . . . "subClassOf"@en . . . "Indicates specialization of properties" . . . "subPropertyOf"@en . . raptor2-2.0.15/tests/turtle/bad-07.ttl0000644000175000017500000000013410674751730014301 00000000000000# paths are not in turtle @prefix : . :a.:b.:c . :a^:b^:c . raptor2-2.0.15/tests/turtle/test-31.ttl0000644000175000017500000000042111170016736014516 00000000000000@prefix rdf: . @prefix rss: . rss:items [ rdf:_1 ; rdf:_2 ; a rdf:Seq ] . raptor2-2.0.15/tests/turtle/test-14.ttl0000644000175000017500000064730710674751730014553 00000000000000# 10000 triples, more than the default Bison stack size @prefix : . :a1 :a1 :a1. :a2 :a2 :a2. :a3 :a3 :a3. :a4 :a4 :a4. :a5 :a5 :a5. :a6 :a6 :a6. :a7 :a7 :a7. :a8 :a8 :a8. :a9 :a9 :a9. :a10 :a10 :a10. :a11 :a11 :a11. :a12 :a12 :a12. :a13 :a13 :a13. :a14 :a14 :a14. :a15 :a15 :a15. :a16 :a16 :a16. :a17 :a17 :a17. :a18 :a18 :a18. :a19 :a19 :a19. :a20 :a20 :a20. :a21 :a21 :a21. :a22 :a22 :a22. :a23 :a23 :a23. :a24 :a24 :a24. :a25 :a25 :a25. :a26 :a26 :a26. :a27 :a27 :a27. :a28 :a28 :a28. :a29 :a29 :a29. :a30 :a30 :a30. :a31 :a31 :a31. :a32 :a32 :a32. :a33 :a33 :a33. :a34 :a34 :a34. :a35 :a35 :a35. :a36 :a36 :a36. :a37 :a37 :a37. :a38 :a38 :a38. :a39 :a39 :a39. :a40 :a40 :a40. :a41 :a41 :a41. :a42 :a42 :a42. :a43 :a43 :a43. :a44 :a44 :a44. :a45 :a45 :a45. :a46 :a46 :a46. :a47 :a47 :a47. :a48 :a48 :a48. :a49 :a49 :a49. :a50 :a50 :a50. :a51 :a51 :a51. :a52 :a52 :a52. :a53 :a53 :a53. :a54 :a54 :a54. :a55 :a55 :a55. :a56 :a56 :a56. :a57 :a57 :a57. :a58 :a58 :a58. :a59 :a59 :a59. :a60 :a60 :a60. :a61 :a61 :a61. :a62 :a62 :a62. :a63 :a63 :a63. :a64 :a64 :a64. :a65 :a65 :a65. :a66 :a66 :a66. :a67 :a67 :a67. :a68 :a68 :a68. :a69 :a69 :a69. :a70 :a70 :a70. :a71 :a71 :a71. :a72 :a72 :a72. :a73 :a73 :a73. :a74 :a74 :a74. :a75 :a75 :a75. :a76 :a76 :a76. :a77 :a77 :a77. :a78 :a78 :a78. :a79 :a79 :a79. :a80 :a80 :a80. :a81 :a81 :a81. :a82 :a82 :a82. :a83 :a83 :a83. :a84 :a84 :a84. :a85 :a85 :a85. :a86 :a86 :a86. :a87 :a87 :a87. :a88 :a88 :a88. :a89 :a89 :a89. :a90 :a90 :a90. :a91 :a91 :a91. :a92 :a92 :a92. :a93 :a93 :a93. :a94 :a94 :a94. :a95 :a95 :a95. :a96 :a96 :a96. :a97 :a97 :a97. :a98 :a98 :a98. :a99 :a99 :a99. :a100 :a100 :a100. :a101 :a101 :a101. :a102 :a102 :a102. :a103 :a103 :a103. :a104 :a104 :a104. :a105 :a105 :a105. :a106 :a106 :a106. :a107 :a107 :a107. :a108 :a108 :a108. :a109 :a109 :a109. :a110 :a110 :a110. :a111 :a111 :a111. :a112 :a112 :a112. :a113 :a113 :a113. :a114 :a114 :a114. :a115 :a115 :a115. :a116 :a116 :a116. :a117 :a117 :a117. :a118 :a118 :a118. :a119 :a119 :a119. :a120 :a120 :a120. :a121 :a121 :a121. :a122 :a122 :a122. :a123 :a123 :a123. :a124 :a124 :a124. :a125 :a125 :a125. :a126 :a126 :a126. :a127 :a127 :a127. :a128 :a128 :a128. :a129 :a129 :a129. :a130 :a130 :a130. :a131 :a131 :a131. :a132 :a132 :a132. :a133 :a133 :a133. :a134 :a134 :a134. :a135 :a135 :a135. :a136 :a136 :a136. :a137 :a137 :a137. :a138 :a138 :a138. :a139 :a139 :a139. :a140 :a140 :a140. :a141 :a141 :a141. :a142 :a142 :a142. :a143 :a143 :a143. :a144 :a144 :a144. :a145 :a145 :a145. :a146 :a146 :a146. :a147 :a147 :a147. :a148 :a148 :a148. :a149 :a149 :a149. :a150 :a150 :a150. :a151 :a151 :a151. :a152 :a152 :a152. :a153 :a153 :a153. :a154 :a154 :a154. :a155 :a155 :a155. :a156 :a156 :a156. :a157 :a157 :a157. :a158 :a158 :a158. :a159 :a159 :a159. :a160 :a160 :a160. :a161 :a161 :a161. :a162 :a162 :a162. :a163 :a163 :a163. :a164 :a164 :a164. :a165 :a165 :a165. :a166 :a166 :a166. :a167 :a167 :a167. :a168 :a168 :a168. :a169 :a169 :a169. :a170 :a170 :a170. :a171 :a171 :a171. :a172 :a172 :a172. :a173 :a173 :a173. :a174 :a174 :a174. :a175 :a175 :a175. :a176 :a176 :a176. :a177 :a177 :a177. :a178 :a178 :a178. :a179 :a179 :a179. :a180 :a180 :a180. :a181 :a181 :a181. :a182 :a182 :a182. :a183 :a183 :a183. :a184 :a184 :a184. :a185 :a185 :a185. :a186 :a186 :a186. :a187 :a187 :a187. :a188 :a188 :a188. :a189 :a189 :a189. :a190 :a190 :a190. :a191 :a191 :a191. :a192 :a192 :a192. :a193 :a193 :a193. :a194 :a194 :a194. :a195 :a195 :a195. :a196 :a196 :a196. :a197 :a197 :a197. :a198 :a198 :a198. :a199 :a199 :a199. :a200 :a200 :a200. :a201 :a201 :a201. :a202 :a202 :a202. :a203 :a203 :a203. :a204 :a204 :a204. :a205 :a205 :a205. :a206 :a206 :a206. :a207 :a207 :a207. :a208 :a208 :a208. :a209 :a209 :a209. :a210 :a210 :a210. :a211 :a211 :a211. :a212 :a212 :a212. :a213 :a213 :a213. :a214 :a214 :a214. :a215 :a215 :a215. :a216 :a216 :a216. :a217 :a217 :a217. :a218 :a218 :a218. :a219 :a219 :a219. :a220 :a220 :a220. :a221 :a221 :a221. :a222 :a222 :a222. :a223 :a223 :a223. :a224 :a224 :a224. :a225 :a225 :a225. :a226 :a226 :a226. :a227 :a227 :a227. :a228 :a228 :a228. :a229 :a229 :a229. :a230 :a230 :a230. :a231 :a231 :a231. :a232 :a232 :a232. :a233 :a233 :a233. :a234 :a234 :a234. :a235 :a235 :a235. :a236 :a236 :a236. :a237 :a237 :a237. :a238 :a238 :a238. :a239 :a239 :a239. :a240 :a240 :a240. :a241 :a241 :a241. :a242 :a242 :a242. :a243 :a243 :a243. :a244 :a244 :a244. :a245 :a245 :a245. :a246 :a246 :a246. :a247 :a247 :a247. :a248 :a248 :a248. :a249 :a249 :a249. :a250 :a250 :a250. :a251 :a251 :a251. :a252 :a252 :a252. :a253 :a253 :a253. :a254 :a254 :a254. :a255 :a255 :a255. :a256 :a256 :a256. :a257 :a257 :a257. :a258 :a258 :a258. :a259 :a259 :a259. :a260 :a260 :a260. :a261 :a261 :a261. :a262 :a262 :a262. :a263 :a263 :a263. :a264 :a264 :a264. :a265 :a265 :a265. :a266 :a266 :a266. :a267 :a267 :a267. :a268 :a268 :a268. :a269 :a269 :a269. :a270 :a270 :a270. :a271 :a271 :a271. :a272 :a272 :a272. :a273 :a273 :a273. :a274 :a274 :a274. :a275 :a275 :a275. :a276 :a276 :a276. :a277 :a277 :a277. :a278 :a278 :a278. :a279 :a279 :a279. :a280 :a280 :a280. :a281 :a281 :a281. :a282 :a282 :a282. :a283 :a283 :a283. :a284 :a284 :a284. :a285 :a285 :a285. :a286 :a286 :a286. :a287 :a287 :a287. :a288 :a288 :a288. :a289 :a289 :a289. :a290 :a290 :a290. :a291 :a291 :a291. :a292 :a292 :a292. :a293 :a293 :a293. :a294 :a294 :a294. :a295 :a295 :a295. :a296 :a296 :a296. :a297 :a297 :a297. :a298 :a298 :a298. :a299 :a299 :a299. :a300 :a300 :a300. :a301 :a301 :a301. :a302 :a302 :a302. :a303 :a303 :a303. :a304 :a304 :a304. :a305 :a305 :a305. :a306 :a306 :a306. :a307 :a307 :a307. :a308 :a308 :a308. :a309 :a309 :a309. :a310 :a310 :a310. :a311 :a311 :a311. :a312 :a312 :a312. :a313 :a313 :a313. :a314 :a314 :a314. :a315 :a315 :a315. :a316 :a316 :a316. :a317 :a317 :a317. :a318 :a318 :a318. :a319 :a319 :a319. :a320 :a320 :a320. :a321 :a321 :a321. :a322 :a322 :a322. :a323 :a323 :a323. :a324 :a324 :a324. :a325 :a325 :a325. :a326 :a326 :a326. :a327 :a327 :a327. :a328 :a328 :a328. :a329 :a329 :a329. :a330 :a330 :a330. :a331 :a331 :a331. :a332 :a332 :a332. :a333 :a333 :a333. :a334 :a334 :a334. :a335 :a335 :a335. :a336 :a336 :a336. :a337 :a337 :a337. :a338 :a338 :a338. :a339 :a339 :a339. :a340 :a340 :a340. :a341 :a341 :a341. :a342 :a342 :a342. :a343 :a343 :a343. :a344 :a344 :a344. :a345 :a345 :a345. :a346 :a346 :a346. :a347 :a347 :a347. :a348 :a348 :a348. :a349 :a349 :a349. :a350 :a350 :a350. :a351 :a351 :a351. :a352 :a352 :a352. :a353 :a353 :a353. :a354 :a354 :a354. :a355 :a355 :a355. :a356 :a356 :a356. :a357 :a357 :a357. :a358 :a358 :a358. :a359 :a359 :a359. :a360 :a360 :a360. :a361 :a361 :a361. :a362 :a362 :a362. :a363 :a363 :a363. :a364 :a364 :a364. :a365 :a365 :a365. :a366 :a366 :a366. :a367 :a367 :a367. :a368 :a368 :a368. :a369 :a369 :a369. :a370 :a370 :a370. :a371 :a371 :a371. :a372 :a372 :a372. :a373 :a373 :a373. :a374 :a374 :a374. :a375 :a375 :a375. :a376 :a376 :a376. :a377 :a377 :a377. :a378 :a378 :a378. :a379 :a379 :a379. :a380 :a380 :a380. :a381 :a381 :a381. :a382 :a382 :a382. :a383 :a383 :a383. :a384 :a384 :a384. :a385 :a385 :a385. :a386 :a386 :a386. :a387 :a387 :a387. :a388 :a388 :a388. :a389 :a389 :a389. :a390 :a390 :a390. :a391 :a391 :a391. :a392 :a392 :a392. :a393 :a393 :a393. :a394 :a394 :a394. :a395 :a395 :a395. :a396 :a396 :a396. :a397 :a397 :a397. :a398 :a398 :a398. :a399 :a399 :a399. :a400 :a400 :a400. :a401 :a401 :a401. :a402 :a402 :a402. :a403 :a403 :a403. :a404 :a404 :a404. :a405 :a405 :a405. :a406 :a406 :a406. :a407 :a407 :a407. :a408 :a408 :a408. :a409 :a409 :a409. :a410 :a410 :a410. :a411 :a411 :a411. :a412 :a412 :a412. :a413 :a413 :a413. :a414 :a414 :a414. :a415 :a415 :a415. :a416 :a416 :a416. :a417 :a417 :a417. :a418 :a418 :a418. :a419 :a419 :a419. :a420 :a420 :a420. :a421 :a421 :a421. :a422 :a422 :a422. :a423 :a423 :a423. :a424 :a424 :a424. :a425 :a425 :a425. :a426 :a426 :a426. :a427 :a427 :a427. :a428 :a428 :a428. :a429 :a429 :a429. :a430 :a430 :a430. :a431 :a431 :a431. :a432 :a432 :a432. :a433 :a433 :a433. :a434 :a434 :a434. :a435 :a435 :a435. :a436 :a436 :a436. :a437 :a437 :a437. :a438 :a438 :a438. :a439 :a439 :a439. :a440 :a440 :a440. :a441 :a441 :a441. :a442 :a442 :a442. :a443 :a443 :a443. :a444 :a444 :a444. :a445 :a445 :a445. :a446 :a446 :a446. :a447 :a447 :a447. :a448 :a448 :a448. :a449 :a449 :a449. :a450 :a450 :a450. :a451 :a451 :a451. :a452 :a452 :a452. :a453 :a453 :a453. :a454 :a454 :a454. :a455 :a455 :a455. :a456 :a456 :a456. :a457 :a457 :a457. :a458 :a458 :a458. :a459 :a459 :a459. :a460 :a460 :a460. :a461 :a461 :a461. :a462 :a462 :a462. :a463 :a463 :a463. :a464 :a464 :a464. :a465 :a465 :a465. :a466 :a466 :a466. :a467 :a467 :a467. :a468 :a468 :a468. :a469 :a469 :a469. :a470 :a470 :a470. :a471 :a471 :a471. :a472 :a472 :a472. :a473 :a473 :a473. :a474 :a474 :a474. :a475 :a475 :a475. :a476 :a476 :a476. :a477 :a477 :a477. :a478 :a478 :a478. :a479 :a479 :a479. :a480 :a480 :a480. :a481 :a481 :a481. :a482 :a482 :a482. :a483 :a483 :a483. :a484 :a484 :a484. :a485 :a485 :a485. :a486 :a486 :a486. :a487 :a487 :a487. :a488 :a488 :a488. :a489 :a489 :a489. :a490 :a490 :a490. :a491 :a491 :a491. :a492 :a492 :a492. :a493 :a493 :a493. :a494 :a494 :a494. :a495 :a495 :a495. :a496 :a496 :a496. :a497 :a497 :a497. :a498 :a498 :a498. :a499 :a499 :a499. :a500 :a500 :a500. :a501 :a501 :a501. :a502 :a502 :a502. :a503 :a503 :a503. :a504 :a504 :a504. :a505 :a505 :a505. :a506 :a506 :a506. :a507 :a507 :a507. :a508 :a508 :a508. :a509 :a509 :a509. :a510 :a510 :a510. :a511 :a511 :a511. :a512 :a512 :a512. :a513 :a513 :a513. :a514 :a514 :a514. :a515 :a515 :a515. :a516 :a516 :a516. :a517 :a517 :a517. :a518 :a518 :a518. :a519 :a519 :a519. :a520 :a520 :a520. :a521 :a521 :a521. :a522 :a522 :a522. :a523 :a523 :a523. :a524 :a524 :a524. :a525 :a525 :a525. :a526 :a526 :a526. :a527 :a527 :a527. :a528 :a528 :a528. :a529 :a529 :a529. :a530 :a530 :a530. :a531 :a531 :a531. :a532 :a532 :a532. :a533 :a533 :a533. :a534 :a534 :a534. :a535 :a535 :a535. :a536 :a536 :a536. :a537 :a537 :a537. :a538 :a538 :a538. :a539 :a539 :a539. :a540 :a540 :a540. :a541 :a541 :a541. :a542 :a542 :a542. :a543 :a543 :a543. :a544 :a544 :a544. :a545 :a545 :a545. :a546 :a546 :a546. :a547 :a547 :a547. :a548 :a548 :a548. :a549 :a549 :a549. :a550 :a550 :a550. :a551 :a551 :a551. :a552 :a552 :a552. :a553 :a553 :a553. :a554 :a554 :a554. :a555 :a555 :a555. :a556 :a556 :a556. :a557 :a557 :a557. :a558 :a558 :a558. :a559 :a559 :a559. :a560 :a560 :a560. :a561 :a561 :a561. :a562 :a562 :a562. :a563 :a563 :a563. :a564 :a564 :a564. :a565 :a565 :a565. :a566 :a566 :a566. :a567 :a567 :a567. :a568 :a568 :a568. :a569 :a569 :a569. :a570 :a570 :a570. :a571 :a571 :a571. :a572 :a572 :a572. :a573 :a573 :a573. :a574 :a574 :a574. :a575 :a575 :a575. :a576 :a576 :a576. :a577 :a577 :a577. :a578 :a578 :a578. :a579 :a579 :a579. :a580 :a580 :a580. :a581 :a581 :a581. :a582 :a582 :a582. :a583 :a583 :a583. :a584 :a584 :a584. :a585 :a585 :a585. :a586 :a586 :a586. :a587 :a587 :a587. :a588 :a588 :a588. :a589 :a589 :a589. :a590 :a590 :a590. :a591 :a591 :a591. :a592 :a592 :a592. :a593 :a593 :a593. :a594 :a594 :a594. :a595 :a595 :a595. :a596 :a596 :a596. :a597 :a597 :a597. :a598 :a598 :a598. :a599 :a599 :a599. :a600 :a600 :a600. :a601 :a601 :a601. :a602 :a602 :a602. :a603 :a603 :a603. :a604 :a604 :a604. :a605 :a605 :a605. :a606 :a606 :a606. :a607 :a607 :a607. :a608 :a608 :a608. :a609 :a609 :a609. :a610 :a610 :a610. :a611 :a611 :a611. :a612 :a612 :a612. :a613 :a613 :a613. :a614 :a614 :a614. :a615 :a615 :a615. :a616 :a616 :a616. :a617 :a617 :a617. :a618 :a618 :a618. :a619 :a619 :a619. :a620 :a620 :a620. :a621 :a621 :a621. :a622 :a622 :a622. :a623 :a623 :a623. :a624 :a624 :a624. :a625 :a625 :a625. :a626 :a626 :a626. :a627 :a627 :a627. :a628 :a628 :a628. :a629 :a629 :a629. :a630 :a630 :a630. :a631 :a631 :a631. :a632 :a632 :a632. :a633 :a633 :a633. :a634 :a634 :a634. :a635 :a635 :a635. :a636 :a636 :a636. :a637 :a637 :a637. :a638 :a638 :a638. :a639 :a639 :a639. :a640 :a640 :a640. :a641 :a641 :a641. :a642 :a642 :a642. :a643 :a643 :a643. :a644 :a644 :a644. :a645 :a645 :a645. :a646 :a646 :a646. :a647 :a647 :a647. :a648 :a648 :a648. :a649 :a649 :a649. :a650 :a650 :a650. :a651 :a651 :a651. :a652 :a652 :a652. :a653 :a653 :a653. :a654 :a654 :a654. :a655 :a655 :a655. :a656 :a656 :a656. :a657 :a657 :a657. :a658 :a658 :a658. :a659 :a659 :a659. :a660 :a660 :a660. :a661 :a661 :a661. :a662 :a662 :a662. :a663 :a663 :a663. :a664 :a664 :a664. :a665 :a665 :a665. :a666 :a666 :a666. :a667 :a667 :a667. :a668 :a668 :a668. :a669 :a669 :a669. :a670 :a670 :a670. :a671 :a671 :a671. :a672 :a672 :a672. :a673 :a673 :a673. :a674 :a674 :a674. :a675 :a675 :a675. :a676 :a676 :a676. :a677 :a677 :a677. :a678 :a678 :a678. :a679 :a679 :a679. :a680 :a680 :a680. :a681 :a681 :a681. :a682 :a682 :a682. :a683 :a683 :a683. :a684 :a684 :a684. :a685 :a685 :a685. :a686 :a686 :a686. :a687 :a687 :a687. :a688 :a688 :a688. :a689 :a689 :a689. :a690 :a690 :a690. :a691 :a691 :a691. :a692 :a692 :a692. :a693 :a693 :a693. :a694 :a694 :a694. :a695 :a695 :a695. :a696 :a696 :a696. :a697 :a697 :a697. :a698 :a698 :a698. :a699 :a699 :a699. :a700 :a700 :a700. :a701 :a701 :a701. :a702 :a702 :a702. :a703 :a703 :a703. :a704 :a704 :a704. :a705 :a705 :a705. :a706 :a706 :a706. :a707 :a707 :a707. :a708 :a708 :a708. :a709 :a709 :a709. :a710 :a710 :a710. :a711 :a711 :a711. :a712 :a712 :a712. :a713 :a713 :a713. :a714 :a714 :a714. :a715 :a715 :a715. :a716 :a716 :a716. :a717 :a717 :a717. :a718 :a718 :a718. :a719 :a719 :a719. :a720 :a720 :a720. :a721 :a721 :a721. :a722 :a722 :a722. :a723 :a723 :a723. :a724 :a724 :a724. :a725 :a725 :a725. :a726 :a726 :a726. :a727 :a727 :a727. :a728 :a728 :a728. :a729 :a729 :a729. :a730 :a730 :a730. :a731 :a731 :a731. :a732 :a732 :a732. :a733 :a733 :a733. :a734 :a734 :a734. :a735 :a735 :a735. :a736 :a736 :a736. :a737 :a737 :a737. :a738 :a738 :a738. :a739 :a739 :a739. :a740 :a740 :a740. :a741 :a741 :a741. :a742 :a742 :a742. :a743 :a743 :a743. :a744 :a744 :a744. :a745 :a745 :a745. :a746 :a746 :a746. :a747 :a747 :a747. :a748 :a748 :a748. :a749 :a749 :a749. :a750 :a750 :a750. :a751 :a751 :a751. :a752 :a752 :a752. :a753 :a753 :a753. :a754 :a754 :a754. :a755 :a755 :a755. :a756 :a756 :a756. :a757 :a757 :a757. :a758 :a758 :a758. :a759 :a759 :a759. :a760 :a760 :a760. :a761 :a761 :a761. :a762 :a762 :a762. :a763 :a763 :a763. :a764 :a764 :a764. :a765 :a765 :a765. :a766 :a766 :a766. :a767 :a767 :a767. :a768 :a768 :a768. :a769 :a769 :a769. :a770 :a770 :a770. :a771 :a771 :a771. :a772 :a772 :a772. :a773 :a773 :a773. :a774 :a774 :a774. :a775 :a775 :a775. :a776 :a776 :a776. :a777 :a777 :a777. :a778 :a778 :a778. :a779 :a779 :a779. :a780 :a780 :a780. :a781 :a781 :a781. :a782 :a782 :a782. :a783 :a783 :a783. :a784 :a784 :a784. :a785 :a785 :a785. :a786 :a786 :a786. :a787 :a787 :a787. :a788 :a788 :a788. :a789 :a789 :a789. :a790 :a790 :a790. :a791 :a791 :a791. :a792 :a792 :a792. :a793 :a793 :a793. :a794 :a794 :a794. :a795 :a795 :a795. :a796 :a796 :a796. :a797 :a797 :a797. :a798 :a798 :a798. :a799 :a799 :a799. :a800 :a800 :a800. :a801 :a801 :a801. :a802 :a802 :a802. :a803 :a803 :a803. :a804 :a804 :a804. :a805 :a805 :a805. :a806 :a806 :a806. :a807 :a807 :a807. :a808 :a808 :a808. :a809 :a809 :a809. :a810 :a810 :a810. :a811 :a811 :a811. :a812 :a812 :a812. :a813 :a813 :a813. :a814 :a814 :a814. :a815 :a815 :a815. :a816 :a816 :a816. :a817 :a817 :a817. :a818 :a818 :a818. :a819 :a819 :a819. :a820 :a820 :a820. :a821 :a821 :a821. :a822 :a822 :a822. :a823 :a823 :a823. :a824 :a824 :a824. :a825 :a825 :a825. :a826 :a826 :a826. :a827 :a827 :a827. :a828 :a828 :a828. :a829 :a829 :a829. :a830 :a830 :a830. :a831 :a831 :a831. :a832 :a832 :a832. :a833 :a833 :a833. :a834 :a834 :a834. :a835 :a835 :a835. :a836 :a836 :a836. :a837 :a837 :a837. :a838 :a838 :a838. :a839 :a839 :a839. :a840 :a840 :a840. :a841 :a841 :a841. :a842 :a842 :a842. :a843 :a843 :a843. :a844 :a844 :a844. :a845 :a845 :a845. :a846 :a846 :a846. :a847 :a847 :a847. :a848 :a848 :a848. :a849 :a849 :a849. :a850 :a850 :a850. :a851 :a851 :a851. :a852 :a852 :a852. :a853 :a853 :a853. :a854 :a854 :a854. :a855 :a855 :a855. :a856 :a856 :a856. :a857 :a857 :a857. :a858 :a858 :a858. :a859 :a859 :a859. :a860 :a860 :a860. :a861 :a861 :a861. :a862 :a862 :a862. :a863 :a863 :a863. :a864 :a864 :a864. :a865 :a865 :a865. :a866 :a866 :a866. :a867 :a867 :a867. :a868 :a868 :a868. :a869 :a869 :a869. :a870 :a870 :a870. :a871 :a871 :a871. :a872 :a872 :a872. :a873 :a873 :a873. :a874 :a874 :a874. :a875 :a875 :a875. :a876 :a876 :a876. :a877 :a877 :a877. :a878 :a878 :a878. :a879 :a879 :a879. :a880 :a880 :a880. :a881 :a881 :a881. :a882 :a882 :a882. :a883 :a883 :a883. :a884 :a884 :a884. :a885 :a885 :a885. :a886 :a886 :a886. :a887 :a887 :a887. :a888 :a888 :a888. :a889 :a889 :a889. :a890 :a890 :a890. :a891 :a891 :a891. :a892 :a892 :a892. :a893 :a893 :a893. :a894 :a894 :a894. :a895 :a895 :a895. :a896 :a896 :a896. :a897 :a897 :a897. :a898 :a898 :a898. :a899 :a899 :a899. :a900 :a900 :a900. :a901 :a901 :a901. :a902 :a902 :a902. :a903 :a903 :a903. :a904 :a904 :a904. :a905 :a905 :a905. :a906 :a906 :a906. :a907 :a907 :a907. :a908 :a908 :a908. :a909 :a909 :a909. :a910 :a910 :a910. :a911 :a911 :a911. :a912 :a912 :a912. :a913 :a913 :a913. :a914 :a914 :a914. :a915 :a915 :a915. :a916 :a916 :a916. :a917 :a917 :a917. :a918 :a918 :a918. :a919 :a919 :a919. :a920 :a920 :a920. :a921 :a921 :a921. :a922 :a922 :a922. :a923 :a923 :a923. :a924 :a924 :a924. :a925 :a925 :a925. :a926 :a926 :a926. :a927 :a927 :a927. :a928 :a928 :a928. :a929 :a929 :a929. :a930 :a930 :a930. :a931 :a931 :a931. :a932 :a932 :a932. :a933 :a933 :a933. :a934 :a934 :a934. :a935 :a935 :a935. :a936 :a936 :a936. :a937 :a937 :a937. :a938 :a938 :a938. :a939 :a939 :a939. :a940 :a940 :a940. :a941 :a941 :a941. :a942 :a942 :a942. :a943 :a943 :a943. :a944 :a944 :a944. :a945 :a945 :a945. :a946 :a946 :a946. :a947 :a947 :a947. :a948 :a948 :a948. :a949 :a949 :a949. :a950 :a950 :a950. :a951 :a951 :a951. :a952 :a952 :a952. :a953 :a953 :a953. :a954 :a954 :a954. :a955 :a955 :a955. :a956 :a956 :a956. :a957 :a957 :a957. :a958 :a958 :a958. :a959 :a959 :a959. :a960 :a960 :a960. :a961 :a961 :a961. :a962 :a962 :a962. :a963 :a963 :a963. :a964 :a964 :a964. :a965 :a965 :a965. :a966 :a966 :a966. :a967 :a967 :a967. :a968 :a968 :a968. :a969 :a969 :a969. :a970 :a970 :a970. :a971 :a971 :a971. :a972 :a972 :a972. :a973 :a973 :a973. :a974 :a974 :a974. :a975 :a975 :a975. :a976 :a976 :a976. :a977 :a977 :a977. :a978 :a978 :a978. :a979 :a979 :a979. :a980 :a980 :a980. :a981 :a981 :a981. :a982 :a982 :a982. :a983 :a983 :a983. :a984 :a984 :a984. :a985 :a985 :a985. :a986 :a986 :a986. :a987 :a987 :a987. :a988 :a988 :a988. :a989 :a989 :a989. :a990 :a990 :a990. :a991 :a991 :a991. :a992 :a992 :a992. :a993 :a993 :a993. :a994 :a994 :a994. :a995 :a995 :a995. :a996 :a996 :a996. :a997 :a997 :a997. :a998 :a998 :a998. :a999 :a999 :a999. :a1000 :a1000 :a1000. :a1001 :a1001 :a1001. :a1002 :a1002 :a1002. :a1003 :a1003 :a1003. :a1004 :a1004 :a1004. :a1005 :a1005 :a1005. :a1006 :a1006 :a1006. :a1007 :a1007 :a1007. :a1008 :a1008 :a1008. :a1009 :a1009 :a1009. :a1010 :a1010 :a1010. :a1011 :a1011 :a1011. :a1012 :a1012 :a1012. :a1013 :a1013 :a1013. :a1014 :a1014 :a1014. :a1015 :a1015 :a1015. :a1016 :a1016 :a1016. :a1017 :a1017 :a1017. :a1018 :a1018 :a1018. :a1019 :a1019 :a1019. :a1020 :a1020 :a1020. :a1021 :a1021 :a1021. :a1022 :a1022 :a1022. :a1023 :a1023 :a1023. :a1024 :a1024 :a1024. :a1025 :a1025 :a1025. :a1026 :a1026 :a1026. :a1027 :a1027 :a1027. :a1028 :a1028 :a1028. :a1029 :a1029 :a1029. :a1030 :a1030 :a1030. :a1031 :a1031 :a1031. :a1032 :a1032 :a1032. :a1033 :a1033 :a1033. :a1034 :a1034 :a1034. :a1035 :a1035 :a1035. :a1036 :a1036 :a1036. :a1037 :a1037 :a1037. :a1038 :a1038 :a1038. :a1039 :a1039 :a1039. :a1040 :a1040 :a1040. :a1041 :a1041 :a1041. :a1042 :a1042 :a1042. :a1043 :a1043 :a1043. :a1044 :a1044 :a1044. :a1045 :a1045 :a1045. :a1046 :a1046 :a1046. :a1047 :a1047 :a1047. :a1048 :a1048 :a1048. :a1049 :a1049 :a1049. :a1050 :a1050 :a1050. :a1051 :a1051 :a1051. :a1052 :a1052 :a1052. :a1053 :a1053 :a1053. :a1054 :a1054 :a1054. :a1055 :a1055 :a1055. :a1056 :a1056 :a1056. :a1057 :a1057 :a1057. :a1058 :a1058 :a1058. :a1059 :a1059 :a1059. :a1060 :a1060 :a1060. :a1061 :a1061 :a1061. :a1062 :a1062 :a1062. :a1063 :a1063 :a1063. :a1064 :a1064 :a1064. :a1065 :a1065 :a1065. :a1066 :a1066 :a1066. :a1067 :a1067 :a1067. :a1068 :a1068 :a1068. :a1069 :a1069 :a1069. :a1070 :a1070 :a1070. :a1071 :a1071 :a1071. :a1072 :a1072 :a1072. :a1073 :a1073 :a1073. :a1074 :a1074 :a1074. :a1075 :a1075 :a1075. :a1076 :a1076 :a1076. :a1077 :a1077 :a1077. :a1078 :a1078 :a1078. :a1079 :a1079 :a1079. :a1080 :a1080 :a1080. :a1081 :a1081 :a1081. :a1082 :a1082 :a1082. :a1083 :a1083 :a1083. :a1084 :a1084 :a1084. :a1085 :a1085 :a1085. :a1086 :a1086 :a1086. :a1087 :a1087 :a1087. :a1088 :a1088 :a1088. :a1089 :a1089 :a1089. :a1090 :a1090 :a1090. :a1091 :a1091 :a1091. :a1092 :a1092 :a1092. :a1093 :a1093 :a1093. :a1094 :a1094 :a1094. :a1095 :a1095 :a1095. :a1096 :a1096 :a1096. :a1097 :a1097 :a1097. :a1098 :a1098 :a1098. :a1099 :a1099 :a1099. :a1100 :a1100 :a1100. :a1101 :a1101 :a1101. :a1102 :a1102 :a1102. :a1103 :a1103 :a1103. :a1104 :a1104 :a1104. :a1105 :a1105 :a1105. :a1106 :a1106 :a1106. :a1107 :a1107 :a1107. :a1108 :a1108 :a1108. :a1109 :a1109 :a1109. :a1110 :a1110 :a1110. :a1111 :a1111 :a1111. :a1112 :a1112 :a1112. :a1113 :a1113 :a1113. :a1114 :a1114 :a1114. :a1115 :a1115 :a1115. :a1116 :a1116 :a1116. :a1117 :a1117 :a1117. :a1118 :a1118 :a1118. :a1119 :a1119 :a1119. :a1120 :a1120 :a1120. :a1121 :a1121 :a1121. :a1122 :a1122 :a1122. :a1123 :a1123 :a1123. :a1124 :a1124 :a1124. :a1125 :a1125 :a1125. :a1126 :a1126 :a1126. :a1127 :a1127 :a1127. :a1128 :a1128 :a1128. :a1129 :a1129 :a1129. :a1130 :a1130 :a1130. :a1131 :a1131 :a1131. :a1132 :a1132 :a1132. :a1133 :a1133 :a1133. :a1134 :a1134 :a1134. :a1135 :a1135 :a1135. :a1136 :a1136 :a1136. :a1137 :a1137 :a1137. :a1138 :a1138 :a1138. :a1139 :a1139 :a1139. :a1140 :a1140 :a1140. :a1141 :a1141 :a1141. :a1142 :a1142 :a1142. :a1143 :a1143 :a1143. :a1144 :a1144 :a1144. :a1145 :a1145 :a1145. :a1146 :a1146 :a1146. :a1147 :a1147 :a1147. :a1148 :a1148 :a1148. :a1149 :a1149 :a1149. :a1150 :a1150 :a1150. :a1151 :a1151 :a1151. :a1152 :a1152 :a1152. :a1153 :a1153 :a1153. :a1154 :a1154 :a1154. :a1155 :a1155 :a1155. :a1156 :a1156 :a1156. :a1157 :a1157 :a1157. :a1158 :a1158 :a1158. :a1159 :a1159 :a1159. :a1160 :a1160 :a1160. :a1161 :a1161 :a1161. :a1162 :a1162 :a1162. :a1163 :a1163 :a1163. :a1164 :a1164 :a1164. :a1165 :a1165 :a1165. :a1166 :a1166 :a1166. :a1167 :a1167 :a1167. :a1168 :a1168 :a1168. :a1169 :a1169 :a1169. :a1170 :a1170 :a1170. :a1171 :a1171 :a1171. :a1172 :a1172 :a1172. :a1173 :a1173 :a1173. :a1174 :a1174 :a1174. :a1175 :a1175 :a1175. :a1176 :a1176 :a1176. :a1177 :a1177 :a1177. :a1178 :a1178 :a1178. :a1179 :a1179 :a1179. :a1180 :a1180 :a1180. :a1181 :a1181 :a1181. :a1182 :a1182 :a1182. :a1183 :a1183 :a1183. :a1184 :a1184 :a1184. :a1185 :a1185 :a1185. :a1186 :a1186 :a1186. :a1187 :a1187 :a1187. :a1188 :a1188 :a1188. :a1189 :a1189 :a1189. :a1190 :a1190 :a1190. :a1191 :a1191 :a1191. :a1192 :a1192 :a1192. :a1193 :a1193 :a1193. :a1194 :a1194 :a1194. :a1195 :a1195 :a1195. :a1196 :a1196 :a1196. :a1197 :a1197 :a1197. :a1198 :a1198 :a1198. :a1199 :a1199 :a1199. :a1200 :a1200 :a1200. :a1201 :a1201 :a1201. :a1202 :a1202 :a1202. :a1203 :a1203 :a1203. :a1204 :a1204 :a1204. :a1205 :a1205 :a1205. :a1206 :a1206 :a1206. :a1207 :a1207 :a1207. :a1208 :a1208 :a1208. :a1209 :a1209 :a1209. :a1210 :a1210 :a1210. :a1211 :a1211 :a1211. :a1212 :a1212 :a1212. :a1213 :a1213 :a1213. :a1214 :a1214 :a1214. :a1215 :a1215 :a1215. :a1216 :a1216 :a1216. :a1217 :a1217 :a1217. :a1218 :a1218 :a1218. :a1219 :a1219 :a1219. :a1220 :a1220 :a1220. :a1221 :a1221 :a1221. :a1222 :a1222 :a1222. :a1223 :a1223 :a1223. :a1224 :a1224 :a1224. :a1225 :a1225 :a1225. :a1226 :a1226 :a1226. :a1227 :a1227 :a1227. :a1228 :a1228 :a1228. :a1229 :a1229 :a1229. :a1230 :a1230 :a1230. :a1231 :a1231 :a1231. :a1232 :a1232 :a1232. :a1233 :a1233 :a1233. :a1234 :a1234 :a1234. :a1235 :a1235 :a1235. :a1236 :a1236 :a1236. :a1237 :a1237 :a1237. :a1238 :a1238 :a1238. :a1239 :a1239 :a1239. :a1240 :a1240 :a1240. :a1241 :a1241 :a1241. :a1242 :a1242 :a1242. :a1243 :a1243 :a1243. :a1244 :a1244 :a1244. :a1245 :a1245 :a1245. :a1246 :a1246 :a1246. :a1247 :a1247 :a1247. :a1248 :a1248 :a1248. :a1249 :a1249 :a1249. :a1250 :a1250 :a1250. :a1251 :a1251 :a1251. :a1252 :a1252 :a1252. :a1253 :a1253 :a1253. :a1254 :a1254 :a1254. :a1255 :a1255 :a1255. :a1256 :a1256 :a1256. :a1257 :a1257 :a1257. :a1258 :a1258 :a1258. :a1259 :a1259 :a1259. :a1260 :a1260 :a1260. :a1261 :a1261 :a1261. :a1262 :a1262 :a1262. :a1263 :a1263 :a1263. :a1264 :a1264 :a1264. :a1265 :a1265 :a1265. :a1266 :a1266 :a1266. :a1267 :a1267 :a1267. :a1268 :a1268 :a1268. :a1269 :a1269 :a1269. :a1270 :a1270 :a1270. :a1271 :a1271 :a1271. :a1272 :a1272 :a1272. :a1273 :a1273 :a1273. :a1274 :a1274 :a1274. :a1275 :a1275 :a1275. :a1276 :a1276 :a1276. :a1277 :a1277 :a1277. :a1278 :a1278 :a1278. :a1279 :a1279 :a1279. :a1280 :a1280 :a1280. :a1281 :a1281 :a1281. :a1282 :a1282 :a1282. :a1283 :a1283 :a1283. :a1284 :a1284 :a1284. :a1285 :a1285 :a1285. :a1286 :a1286 :a1286. :a1287 :a1287 :a1287. :a1288 :a1288 :a1288. :a1289 :a1289 :a1289. :a1290 :a1290 :a1290. :a1291 :a1291 :a1291. :a1292 :a1292 :a1292. :a1293 :a1293 :a1293. :a1294 :a1294 :a1294. :a1295 :a1295 :a1295. :a1296 :a1296 :a1296. :a1297 :a1297 :a1297. :a1298 :a1298 :a1298. :a1299 :a1299 :a1299. :a1300 :a1300 :a1300. :a1301 :a1301 :a1301. :a1302 :a1302 :a1302. :a1303 :a1303 :a1303. :a1304 :a1304 :a1304. :a1305 :a1305 :a1305. :a1306 :a1306 :a1306. :a1307 :a1307 :a1307. :a1308 :a1308 :a1308. :a1309 :a1309 :a1309. :a1310 :a1310 :a1310. :a1311 :a1311 :a1311. :a1312 :a1312 :a1312. :a1313 :a1313 :a1313. :a1314 :a1314 :a1314. :a1315 :a1315 :a1315. :a1316 :a1316 :a1316. :a1317 :a1317 :a1317. :a1318 :a1318 :a1318. :a1319 :a1319 :a1319. :a1320 :a1320 :a1320. :a1321 :a1321 :a1321. :a1322 :a1322 :a1322. :a1323 :a1323 :a1323. :a1324 :a1324 :a1324. :a1325 :a1325 :a1325. :a1326 :a1326 :a1326. :a1327 :a1327 :a1327. :a1328 :a1328 :a1328. :a1329 :a1329 :a1329. :a1330 :a1330 :a1330. :a1331 :a1331 :a1331. :a1332 :a1332 :a1332. :a1333 :a1333 :a1333. :a1334 :a1334 :a1334. :a1335 :a1335 :a1335. :a1336 :a1336 :a1336. :a1337 :a1337 :a1337. :a1338 :a1338 :a1338. :a1339 :a1339 :a1339. :a1340 :a1340 :a1340. :a1341 :a1341 :a1341. :a1342 :a1342 :a1342. :a1343 :a1343 :a1343. :a1344 :a1344 :a1344. :a1345 :a1345 :a1345. :a1346 :a1346 :a1346. :a1347 :a1347 :a1347. :a1348 :a1348 :a1348. :a1349 :a1349 :a1349. :a1350 :a1350 :a1350. :a1351 :a1351 :a1351. :a1352 :a1352 :a1352. :a1353 :a1353 :a1353. :a1354 :a1354 :a1354. :a1355 :a1355 :a1355. :a1356 :a1356 :a1356. :a1357 :a1357 :a1357. :a1358 :a1358 :a1358. :a1359 :a1359 :a1359. :a1360 :a1360 :a1360. :a1361 :a1361 :a1361. :a1362 :a1362 :a1362. :a1363 :a1363 :a1363. :a1364 :a1364 :a1364. :a1365 :a1365 :a1365. :a1366 :a1366 :a1366. :a1367 :a1367 :a1367. :a1368 :a1368 :a1368. :a1369 :a1369 :a1369. :a1370 :a1370 :a1370. :a1371 :a1371 :a1371. :a1372 :a1372 :a1372. :a1373 :a1373 :a1373. :a1374 :a1374 :a1374. :a1375 :a1375 :a1375. :a1376 :a1376 :a1376. :a1377 :a1377 :a1377. :a1378 :a1378 :a1378. :a1379 :a1379 :a1379. :a1380 :a1380 :a1380. :a1381 :a1381 :a1381. :a1382 :a1382 :a1382. :a1383 :a1383 :a1383. :a1384 :a1384 :a1384. :a1385 :a1385 :a1385. :a1386 :a1386 :a1386. :a1387 :a1387 :a1387. :a1388 :a1388 :a1388. :a1389 :a1389 :a1389. :a1390 :a1390 :a1390. :a1391 :a1391 :a1391. :a1392 :a1392 :a1392. :a1393 :a1393 :a1393. :a1394 :a1394 :a1394. :a1395 :a1395 :a1395. :a1396 :a1396 :a1396. :a1397 :a1397 :a1397. :a1398 :a1398 :a1398. :a1399 :a1399 :a1399. :a1400 :a1400 :a1400. :a1401 :a1401 :a1401. :a1402 :a1402 :a1402. :a1403 :a1403 :a1403. :a1404 :a1404 :a1404. :a1405 :a1405 :a1405. :a1406 :a1406 :a1406. :a1407 :a1407 :a1407. :a1408 :a1408 :a1408. :a1409 :a1409 :a1409. :a1410 :a1410 :a1410. :a1411 :a1411 :a1411. :a1412 :a1412 :a1412. :a1413 :a1413 :a1413. :a1414 :a1414 :a1414. :a1415 :a1415 :a1415. :a1416 :a1416 :a1416. :a1417 :a1417 :a1417. :a1418 :a1418 :a1418. :a1419 :a1419 :a1419. :a1420 :a1420 :a1420. :a1421 :a1421 :a1421. :a1422 :a1422 :a1422. :a1423 :a1423 :a1423. :a1424 :a1424 :a1424. :a1425 :a1425 :a1425. :a1426 :a1426 :a1426. :a1427 :a1427 :a1427. :a1428 :a1428 :a1428. :a1429 :a1429 :a1429. :a1430 :a1430 :a1430. :a1431 :a1431 :a1431. :a1432 :a1432 :a1432. :a1433 :a1433 :a1433. :a1434 :a1434 :a1434. :a1435 :a1435 :a1435. :a1436 :a1436 :a1436. :a1437 :a1437 :a1437. :a1438 :a1438 :a1438. :a1439 :a1439 :a1439. :a1440 :a1440 :a1440. :a1441 :a1441 :a1441. :a1442 :a1442 :a1442. :a1443 :a1443 :a1443. :a1444 :a1444 :a1444. :a1445 :a1445 :a1445. :a1446 :a1446 :a1446. :a1447 :a1447 :a1447. :a1448 :a1448 :a1448. :a1449 :a1449 :a1449. :a1450 :a1450 :a1450. :a1451 :a1451 :a1451. :a1452 :a1452 :a1452. :a1453 :a1453 :a1453. :a1454 :a1454 :a1454. :a1455 :a1455 :a1455. :a1456 :a1456 :a1456. :a1457 :a1457 :a1457. :a1458 :a1458 :a1458. :a1459 :a1459 :a1459. :a1460 :a1460 :a1460. :a1461 :a1461 :a1461. :a1462 :a1462 :a1462. :a1463 :a1463 :a1463. :a1464 :a1464 :a1464. :a1465 :a1465 :a1465. :a1466 :a1466 :a1466. :a1467 :a1467 :a1467. :a1468 :a1468 :a1468. :a1469 :a1469 :a1469. :a1470 :a1470 :a1470. :a1471 :a1471 :a1471. :a1472 :a1472 :a1472. :a1473 :a1473 :a1473. :a1474 :a1474 :a1474. :a1475 :a1475 :a1475. :a1476 :a1476 :a1476. :a1477 :a1477 :a1477. :a1478 :a1478 :a1478. :a1479 :a1479 :a1479. :a1480 :a1480 :a1480. :a1481 :a1481 :a1481. :a1482 :a1482 :a1482. :a1483 :a1483 :a1483. :a1484 :a1484 :a1484. :a1485 :a1485 :a1485. :a1486 :a1486 :a1486. :a1487 :a1487 :a1487. :a1488 :a1488 :a1488. :a1489 :a1489 :a1489. :a1490 :a1490 :a1490. :a1491 :a1491 :a1491. :a1492 :a1492 :a1492. :a1493 :a1493 :a1493. :a1494 :a1494 :a1494. :a1495 :a1495 :a1495. :a1496 :a1496 :a1496. :a1497 :a1497 :a1497. :a1498 :a1498 :a1498. :a1499 :a1499 :a1499. :a1500 :a1500 :a1500. :a1501 :a1501 :a1501. :a1502 :a1502 :a1502. :a1503 :a1503 :a1503. :a1504 :a1504 :a1504. :a1505 :a1505 :a1505. :a1506 :a1506 :a1506. :a1507 :a1507 :a1507. :a1508 :a1508 :a1508. :a1509 :a1509 :a1509. :a1510 :a1510 :a1510. :a1511 :a1511 :a1511. :a1512 :a1512 :a1512. :a1513 :a1513 :a1513. :a1514 :a1514 :a1514. :a1515 :a1515 :a1515. :a1516 :a1516 :a1516. :a1517 :a1517 :a1517. :a1518 :a1518 :a1518. :a1519 :a1519 :a1519. :a1520 :a1520 :a1520. :a1521 :a1521 :a1521. :a1522 :a1522 :a1522. :a1523 :a1523 :a1523. :a1524 :a1524 :a1524. :a1525 :a1525 :a1525. :a1526 :a1526 :a1526. :a1527 :a1527 :a1527. :a1528 :a1528 :a1528. :a1529 :a1529 :a1529. :a1530 :a1530 :a1530. :a1531 :a1531 :a1531. :a1532 :a1532 :a1532. :a1533 :a1533 :a1533. :a1534 :a1534 :a1534. :a1535 :a1535 :a1535. :a1536 :a1536 :a1536. :a1537 :a1537 :a1537. :a1538 :a1538 :a1538. :a1539 :a1539 :a1539. :a1540 :a1540 :a1540. :a1541 :a1541 :a1541. :a1542 :a1542 :a1542. :a1543 :a1543 :a1543. :a1544 :a1544 :a1544. :a1545 :a1545 :a1545. :a1546 :a1546 :a1546. :a1547 :a1547 :a1547. :a1548 :a1548 :a1548. :a1549 :a1549 :a1549. :a1550 :a1550 :a1550. :a1551 :a1551 :a1551. :a1552 :a1552 :a1552. :a1553 :a1553 :a1553. :a1554 :a1554 :a1554. :a1555 :a1555 :a1555. :a1556 :a1556 :a1556. :a1557 :a1557 :a1557. :a1558 :a1558 :a1558. :a1559 :a1559 :a1559. :a1560 :a1560 :a1560. :a1561 :a1561 :a1561. :a1562 :a1562 :a1562. :a1563 :a1563 :a1563. :a1564 :a1564 :a1564. :a1565 :a1565 :a1565. :a1566 :a1566 :a1566. :a1567 :a1567 :a1567. :a1568 :a1568 :a1568. :a1569 :a1569 :a1569. :a1570 :a1570 :a1570. :a1571 :a1571 :a1571. :a1572 :a1572 :a1572. :a1573 :a1573 :a1573. :a1574 :a1574 :a1574. :a1575 :a1575 :a1575. :a1576 :a1576 :a1576. :a1577 :a1577 :a1577. :a1578 :a1578 :a1578. :a1579 :a1579 :a1579. :a1580 :a1580 :a1580. :a1581 :a1581 :a1581. :a1582 :a1582 :a1582. :a1583 :a1583 :a1583. :a1584 :a1584 :a1584. :a1585 :a1585 :a1585. :a1586 :a1586 :a1586. :a1587 :a1587 :a1587. :a1588 :a1588 :a1588. :a1589 :a1589 :a1589. :a1590 :a1590 :a1590. :a1591 :a1591 :a1591. :a1592 :a1592 :a1592. :a1593 :a1593 :a1593. :a1594 :a1594 :a1594. :a1595 :a1595 :a1595. :a1596 :a1596 :a1596. :a1597 :a1597 :a1597. :a1598 :a1598 :a1598. :a1599 :a1599 :a1599. :a1600 :a1600 :a1600. :a1601 :a1601 :a1601. :a1602 :a1602 :a1602. :a1603 :a1603 :a1603. :a1604 :a1604 :a1604. :a1605 :a1605 :a1605. :a1606 :a1606 :a1606. :a1607 :a1607 :a1607. :a1608 :a1608 :a1608. :a1609 :a1609 :a1609. :a1610 :a1610 :a1610. :a1611 :a1611 :a1611. :a1612 :a1612 :a1612. :a1613 :a1613 :a1613. :a1614 :a1614 :a1614. :a1615 :a1615 :a1615. :a1616 :a1616 :a1616. :a1617 :a1617 :a1617. :a1618 :a1618 :a1618. :a1619 :a1619 :a1619. :a1620 :a1620 :a1620. :a1621 :a1621 :a1621. :a1622 :a1622 :a1622. :a1623 :a1623 :a1623. :a1624 :a1624 :a1624. :a1625 :a1625 :a1625. :a1626 :a1626 :a1626. :a1627 :a1627 :a1627. :a1628 :a1628 :a1628. :a1629 :a1629 :a1629. :a1630 :a1630 :a1630. :a1631 :a1631 :a1631. :a1632 :a1632 :a1632. :a1633 :a1633 :a1633. :a1634 :a1634 :a1634. :a1635 :a1635 :a1635. :a1636 :a1636 :a1636. :a1637 :a1637 :a1637. :a1638 :a1638 :a1638. :a1639 :a1639 :a1639. :a1640 :a1640 :a1640. :a1641 :a1641 :a1641. :a1642 :a1642 :a1642. :a1643 :a1643 :a1643. :a1644 :a1644 :a1644. :a1645 :a1645 :a1645. :a1646 :a1646 :a1646. :a1647 :a1647 :a1647. :a1648 :a1648 :a1648. :a1649 :a1649 :a1649. :a1650 :a1650 :a1650. :a1651 :a1651 :a1651. :a1652 :a1652 :a1652. :a1653 :a1653 :a1653. :a1654 :a1654 :a1654. :a1655 :a1655 :a1655. :a1656 :a1656 :a1656. :a1657 :a1657 :a1657. :a1658 :a1658 :a1658. :a1659 :a1659 :a1659. :a1660 :a1660 :a1660. :a1661 :a1661 :a1661. :a1662 :a1662 :a1662. :a1663 :a1663 :a1663. :a1664 :a1664 :a1664. :a1665 :a1665 :a1665. :a1666 :a1666 :a1666. :a1667 :a1667 :a1667. :a1668 :a1668 :a1668. :a1669 :a1669 :a1669. :a1670 :a1670 :a1670. :a1671 :a1671 :a1671. :a1672 :a1672 :a1672. :a1673 :a1673 :a1673. :a1674 :a1674 :a1674. :a1675 :a1675 :a1675. :a1676 :a1676 :a1676. :a1677 :a1677 :a1677. :a1678 :a1678 :a1678. :a1679 :a1679 :a1679. :a1680 :a1680 :a1680. :a1681 :a1681 :a1681. :a1682 :a1682 :a1682. :a1683 :a1683 :a1683. :a1684 :a1684 :a1684. :a1685 :a1685 :a1685. :a1686 :a1686 :a1686. :a1687 :a1687 :a1687. :a1688 :a1688 :a1688. :a1689 :a1689 :a1689. :a1690 :a1690 :a1690. :a1691 :a1691 :a1691. :a1692 :a1692 :a1692. :a1693 :a1693 :a1693. :a1694 :a1694 :a1694. :a1695 :a1695 :a1695. :a1696 :a1696 :a1696. :a1697 :a1697 :a1697. :a1698 :a1698 :a1698. :a1699 :a1699 :a1699. :a1700 :a1700 :a1700. :a1701 :a1701 :a1701. :a1702 :a1702 :a1702. :a1703 :a1703 :a1703. :a1704 :a1704 :a1704. :a1705 :a1705 :a1705. :a1706 :a1706 :a1706. :a1707 :a1707 :a1707. :a1708 :a1708 :a1708. :a1709 :a1709 :a1709. :a1710 :a1710 :a1710. :a1711 :a1711 :a1711. :a1712 :a1712 :a1712. :a1713 :a1713 :a1713. :a1714 :a1714 :a1714. :a1715 :a1715 :a1715. :a1716 :a1716 :a1716. :a1717 :a1717 :a1717. :a1718 :a1718 :a1718. :a1719 :a1719 :a1719. :a1720 :a1720 :a1720. :a1721 :a1721 :a1721. :a1722 :a1722 :a1722. :a1723 :a1723 :a1723. :a1724 :a1724 :a1724. :a1725 :a1725 :a1725. :a1726 :a1726 :a1726. :a1727 :a1727 :a1727. :a1728 :a1728 :a1728. :a1729 :a1729 :a1729. :a1730 :a1730 :a1730. :a1731 :a1731 :a1731. :a1732 :a1732 :a1732. :a1733 :a1733 :a1733. :a1734 :a1734 :a1734. :a1735 :a1735 :a1735. :a1736 :a1736 :a1736. :a1737 :a1737 :a1737. :a1738 :a1738 :a1738. :a1739 :a1739 :a1739. :a1740 :a1740 :a1740. :a1741 :a1741 :a1741. :a1742 :a1742 :a1742. :a1743 :a1743 :a1743. :a1744 :a1744 :a1744. :a1745 :a1745 :a1745. :a1746 :a1746 :a1746. :a1747 :a1747 :a1747. :a1748 :a1748 :a1748. :a1749 :a1749 :a1749. :a1750 :a1750 :a1750. :a1751 :a1751 :a1751. :a1752 :a1752 :a1752. :a1753 :a1753 :a1753. :a1754 :a1754 :a1754. :a1755 :a1755 :a1755. :a1756 :a1756 :a1756. :a1757 :a1757 :a1757. :a1758 :a1758 :a1758. :a1759 :a1759 :a1759. :a1760 :a1760 :a1760. :a1761 :a1761 :a1761. :a1762 :a1762 :a1762. :a1763 :a1763 :a1763. :a1764 :a1764 :a1764. :a1765 :a1765 :a1765. :a1766 :a1766 :a1766. :a1767 :a1767 :a1767. :a1768 :a1768 :a1768. :a1769 :a1769 :a1769. :a1770 :a1770 :a1770. :a1771 :a1771 :a1771. :a1772 :a1772 :a1772. :a1773 :a1773 :a1773. :a1774 :a1774 :a1774. :a1775 :a1775 :a1775. :a1776 :a1776 :a1776. :a1777 :a1777 :a1777. :a1778 :a1778 :a1778. :a1779 :a1779 :a1779. :a1780 :a1780 :a1780. :a1781 :a1781 :a1781. :a1782 :a1782 :a1782. :a1783 :a1783 :a1783. :a1784 :a1784 :a1784. :a1785 :a1785 :a1785. :a1786 :a1786 :a1786. :a1787 :a1787 :a1787. :a1788 :a1788 :a1788. :a1789 :a1789 :a1789. :a1790 :a1790 :a1790. :a1791 :a1791 :a1791. :a1792 :a1792 :a1792. :a1793 :a1793 :a1793. :a1794 :a1794 :a1794. :a1795 :a1795 :a1795. :a1796 :a1796 :a1796. :a1797 :a1797 :a1797. :a1798 :a1798 :a1798. :a1799 :a1799 :a1799. :a1800 :a1800 :a1800. :a1801 :a1801 :a1801. :a1802 :a1802 :a1802. :a1803 :a1803 :a1803. :a1804 :a1804 :a1804. :a1805 :a1805 :a1805. :a1806 :a1806 :a1806. :a1807 :a1807 :a1807. :a1808 :a1808 :a1808. :a1809 :a1809 :a1809. :a1810 :a1810 :a1810. :a1811 :a1811 :a1811. :a1812 :a1812 :a1812. :a1813 :a1813 :a1813. :a1814 :a1814 :a1814. :a1815 :a1815 :a1815. :a1816 :a1816 :a1816. :a1817 :a1817 :a1817. :a1818 :a1818 :a1818. :a1819 :a1819 :a1819. :a1820 :a1820 :a1820. :a1821 :a1821 :a1821. :a1822 :a1822 :a1822. :a1823 :a1823 :a1823. :a1824 :a1824 :a1824. :a1825 :a1825 :a1825. :a1826 :a1826 :a1826. :a1827 :a1827 :a1827. :a1828 :a1828 :a1828. :a1829 :a1829 :a1829. :a1830 :a1830 :a1830. :a1831 :a1831 :a1831. :a1832 :a1832 :a1832. :a1833 :a1833 :a1833. :a1834 :a1834 :a1834. :a1835 :a1835 :a1835. :a1836 :a1836 :a1836. :a1837 :a1837 :a1837. :a1838 :a1838 :a1838. :a1839 :a1839 :a1839. :a1840 :a1840 :a1840. :a1841 :a1841 :a1841. :a1842 :a1842 :a1842. :a1843 :a1843 :a1843. :a1844 :a1844 :a1844. :a1845 :a1845 :a1845. :a1846 :a1846 :a1846. :a1847 :a1847 :a1847. :a1848 :a1848 :a1848. :a1849 :a1849 :a1849. :a1850 :a1850 :a1850. :a1851 :a1851 :a1851. :a1852 :a1852 :a1852. :a1853 :a1853 :a1853. :a1854 :a1854 :a1854. :a1855 :a1855 :a1855. :a1856 :a1856 :a1856. :a1857 :a1857 :a1857. :a1858 :a1858 :a1858. :a1859 :a1859 :a1859. :a1860 :a1860 :a1860. :a1861 :a1861 :a1861. :a1862 :a1862 :a1862. :a1863 :a1863 :a1863. :a1864 :a1864 :a1864. :a1865 :a1865 :a1865. :a1866 :a1866 :a1866. :a1867 :a1867 :a1867. :a1868 :a1868 :a1868. :a1869 :a1869 :a1869. :a1870 :a1870 :a1870. :a1871 :a1871 :a1871. :a1872 :a1872 :a1872. :a1873 :a1873 :a1873. :a1874 :a1874 :a1874. :a1875 :a1875 :a1875. :a1876 :a1876 :a1876. :a1877 :a1877 :a1877. :a1878 :a1878 :a1878. :a1879 :a1879 :a1879. :a1880 :a1880 :a1880. :a1881 :a1881 :a1881. :a1882 :a1882 :a1882. :a1883 :a1883 :a1883. :a1884 :a1884 :a1884. :a1885 :a1885 :a1885. :a1886 :a1886 :a1886. :a1887 :a1887 :a1887. :a1888 :a1888 :a1888. :a1889 :a1889 :a1889. :a1890 :a1890 :a1890. :a1891 :a1891 :a1891. :a1892 :a1892 :a1892. :a1893 :a1893 :a1893. :a1894 :a1894 :a1894. :a1895 :a1895 :a1895. :a1896 :a1896 :a1896. :a1897 :a1897 :a1897. :a1898 :a1898 :a1898. :a1899 :a1899 :a1899. :a1900 :a1900 :a1900. :a1901 :a1901 :a1901. :a1902 :a1902 :a1902. :a1903 :a1903 :a1903. :a1904 :a1904 :a1904. :a1905 :a1905 :a1905. :a1906 :a1906 :a1906. :a1907 :a1907 :a1907. :a1908 :a1908 :a1908. :a1909 :a1909 :a1909. :a1910 :a1910 :a1910. :a1911 :a1911 :a1911. :a1912 :a1912 :a1912. :a1913 :a1913 :a1913. :a1914 :a1914 :a1914. :a1915 :a1915 :a1915. :a1916 :a1916 :a1916. :a1917 :a1917 :a1917. :a1918 :a1918 :a1918. :a1919 :a1919 :a1919. :a1920 :a1920 :a1920. :a1921 :a1921 :a1921. :a1922 :a1922 :a1922. :a1923 :a1923 :a1923. :a1924 :a1924 :a1924. :a1925 :a1925 :a1925. :a1926 :a1926 :a1926. :a1927 :a1927 :a1927. :a1928 :a1928 :a1928. :a1929 :a1929 :a1929. :a1930 :a1930 :a1930. :a1931 :a1931 :a1931. :a1932 :a1932 :a1932. :a1933 :a1933 :a1933. :a1934 :a1934 :a1934. :a1935 :a1935 :a1935. :a1936 :a1936 :a1936. :a1937 :a1937 :a1937. :a1938 :a1938 :a1938. :a1939 :a1939 :a1939. :a1940 :a1940 :a1940. :a1941 :a1941 :a1941. :a1942 :a1942 :a1942. :a1943 :a1943 :a1943. :a1944 :a1944 :a1944. :a1945 :a1945 :a1945. :a1946 :a1946 :a1946. :a1947 :a1947 :a1947. :a1948 :a1948 :a1948. :a1949 :a1949 :a1949. :a1950 :a1950 :a1950. :a1951 :a1951 :a1951. :a1952 :a1952 :a1952. :a1953 :a1953 :a1953. :a1954 :a1954 :a1954. :a1955 :a1955 :a1955. :a1956 :a1956 :a1956. :a1957 :a1957 :a1957. :a1958 :a1958 :a1958. :a1959 :a1959 :a1959. :a1960 :a1960 :a1960. :a1961 :a1961 :a1961. :a1962 :a1962 :a1962. :a1963 :a1963 :a1963. :a1964 :a1964 :a1964. :a1965 :a1965 :a1965. :a1966 :a1966 :a1966. :a1967 :a1967 :a1967. :a1968 :a1968 :a1968. :a1969 :a1969 :a1969. :a1970 :a1970 :a1970. :a1971 :a1971 :a1971. :a1972 :a1972 :a1972. :a1973 :a1973 :a1973. :a1974 :a1974 :a1974. :a1975 :a1975 :a1975. :a1976 :a1976 :a1976. :a1977 :a1977 :a1977. :a1978 :a1978 :a1978. :a1979 :a1979 :a1979. :a1980 :a1980 :a1980. :a1981 :a1981 :a1981. :a1982 :a1982 :a1982. :a1983 :a1983 :a1983. :a1984 :a1984 :a1984. :a1985 :a1985 :a1985. :a1986 :a1986 :a1986. :a1987 :a1987 :a1987. :a1988 :a1988 :a1988. :a1989 :a1989 :a1989. :a1990 :a1990 :a1990. :a1991 :a1991 :a1991. :a1992 :a1992 :a1992. :a1993 :a1993 :a1993. :a1994 :a1994 :a1994. :a1995 :a1995 :a1995. :a1996 :a1996 :a1996. :a1997 :a1997 :a1997. :a1998 :a1998 :a1998. :a1999 :a1999 :a1999. :a2000 :a2000 :a2000. :a2001 :a2001 :a2001. :a2002 :a2002 :a2002. :a2003 :a2003 :a2003. :a2004 :a2004 :a2004. :a2005 :a2005 :a2005. :a2006 :a2006 :a2006. :a2007 :a2007 :a2007. :a2008 :a2008 :a2008. :a2009 :a2009 :a2009. :a2010 :a2010 :a2010. :a2011 :a2011 :a2011. :a2012 :a2012 :a2012. :a2013 :a2013 :a2013. :a2014 :a2014 :a2014. :a2015 :a2015 :a2015. :a2016 :a2016 :a2016. :a2017 :a2017 :a2017. :a2018 :a2018 :a2018. :a2019 :a2019 :a2019. :a2020 :a2020 :a2020. :a2021 :a2021 :a2021. :a2022 :a2022 :a2022. :a2023 :a2023 :a2023. :a2024 :a2024 :a2024. :a2025 :a2025 :a2025. :a2026 :a2026 :a2026. :a2027 :a2027 :a2027. :a2028 :a2028 :a2028. :a2029 :a2029 :a2029. :a2030 :a2030 :a2030. :a2031 :a2031 :a2031. :a2032 :a2032 :a2032. :a2033 :a2033 :a2033. :a2034 :a2034 :a2034. :a2035 :a2035 :a2035. :a2036 :a2036 :a2036. :a2037 :a2037 :a2037. :a2038 :a2038 :a2038. :a2039 :a2039 :a2039. :a2040 :a2040 :a2040. :a2041 :a2041 :a2041. :a2042 :a2042 :a2042. :a2043 :a2043 :a2043. :a2044 :a2044 :a2044. :a2045 :a2045 :a2045. :a2046 :a2046 :a2046. :a2047 :a2047 :a2047. :a2048 :a2048 :a2048. :a2049 :a2049 :a2049. :a2050 :a2050 :a2050. :a2051 :a2051 :a2051. :a2052 :a2052 :a2052. :a2053 :a2053 :a2053. :a2054 :a2054 :a2054. :a2055 :a2055 :a2055. :a2056 :a2056 :a2056. :a2057 :a2057 :a2057. :a2058 :a2058 :a2058. :a2059 :a2059 :a2059. :a2060 :a2060 :a2060. :a2061 :a2061 :a2061. :a2062 :a2062 :a2062. :a2063 :a2063 :a2063. :a2064 :a2064 :a2064. :a2065 :a2065 :a2065. :a2066 :a2066 :a2066. :a2067 :a2067 :a2067. :a2068 :a2068 :a2068. :a2069 :a2069 :a2069. :a2070 :a2070 :a2070. :a2071 :a2071 :a2071. :a2072 :a2072 :a2072. :a2073 :a2073 :a2073. :a2074 :a2074 :a2074. :a2075 :a2075 :a2075. :a2076 :a2076 :a2076. :a2077 :a2077 :a2077. :a2078 :a2078 :a2078. :a2079 :a2079 :a2079. :a2080 :a2080 :a2080. :a2081 :a2081 :a2081. :a2082 :a2082 :a2082. :a2083 :a2083 :a2083. :a2084 :a2084 :a2084. :a2085 :a2085 :a2085. :a2086 :a2086 :a2086. :a2087 :a2087 :a2087. :a2088 :a2088 :a2088. :a2089 :a2089 :a2089. :a2090 :a2090 :a2090. :a2091 :a2091 :a2091. :a2092 :a2092 :a2092. :a2093 :a2093 :a2093. :a2094 :a2094 :a2094. :a2095 :a2095 :a2095. :a2096 :a2096 :a2096. :a2097 :a2097 :a2097. :a2098 :a2098 :a2098. :a2099 :a2099 :a2099. :a2100 :a2100 :a2100. :a2101 :a2101 :a2101. :a2102 :a2102 :a2102. :a2103 :a2103 :a2103. :a2104 :a2104 :a2104. :a2105 :a2105 :a2105. :a2106 :a2106 :a2106. :a2107 :a2107 :a2107. :a2108 :a2108 :a2108. :a2109 :a2109 :a2109. :a2110 :a2110 :a2110. :a2111 :a2111 :a2111. :a2112 :a2112 :a2112. :a2113 :a2113 :a2113. :a2114 :a2114 :a2114. :a2115 :a2115 :a2115. :a2116 :a2116 :a2116. :a2117 :a2117 :a2117. :a2118 :a2118 :a2118. :a2119 :a2119 :a2119. :a2120 :a2120 :a2120. :a2121 :a2121 :a2121. :a2122 :a2122 :a2122. :a2123 :a2123 :a2123. :a2124 :a2124 :a2124. :a2125 :a2125 :a2125. :a2126 :a2126 :a2126. :a2127 :a2127 :a2127. :a2128 :a2128 :a2128. :a2129 :a2129 :a2129. :a2130 :a2130 :a2130. :a2131 :a2131 :a2131. :a2132 :a2132 :a2132. :a2133 :a2133 :a2133. :a2134 :a2134 :a2134. :a2135 :a2135 :a2135. :a2136 :a2136 :a2136. :a2137 :a2137 :a2137. :a2138 :a2138 :a2138. :a2139 :a2139 :a2139. :a2140 :a2140 :a2140. :a2141 :a2141 :a2141. :a2142 :a2142 :a2142. :a2143 :a2143 :a2143. :a2144 :a2144 :a2144. :a2145 :a2145 :a2145. :a2146 :a2146 :a2146. :a2147 :a2147 :a2147. :a2148 :a2148 :a2148. :a2149 :a2149 :a2149. :a2150 :a2150 :a2150. :a2151 :a2151 :a2151. :a2152 :a2152 :a2152. :a2153 :a2153 :a2153. :a2154 :a2154 :a2154. :a2155 :a2155 :a2155. :a2156 :a2156 :a2156. :a2157 :a2157 :a2157. :a2158 :a2158 :a2158. :a2159 :a2159 :a2159. :a2160 :a2160 :a2160. :a2161 :a2161 :a2161. :a2162 :a2162 :a2162. :a2163 :a2163 :a2163. :a2164 :a2164 :a2164. :a2165 :a2165 :a2165. :a2166 :a2166 :a2166. :a2167 :a2167 :a2167. :a2168 :a2168 :a2168. :a2169 :a2169 :a2169. :a2170 :a2170 :a2170. :a2171 :a2171 :a2171. :a2172 :a2172 :a2172. :a2173 :a2173 :a2173. :a2174 :a2174 :a2174. :a2175 :a2175 :a2175. :a2176 :a2176 :a2176. :a2177 :a2177 :a2177. :a2178 :a2178 :a2178. :a2179 :a2179 :a2179. :a2180 :a2180 :a2180. :a2181 :a2181 :a2181. :a2182 :a2182 :a2182. :a2183 :a2183 :a2183. :a2184 :a2184 :a2184. :a2185 :a2185 :a2185. :a2186 :a2186 :a2186. :a2187 :a2187 :a2187. :a2188 :a2188 :a2188. :a2189 :a2189 :a2189. :a2190 :a2190 :a2190. :a2191 :a2191 :a2191. :a2192 :a2192 :a2192. :a2193 :a2193 :a2193. :a2194 :a2194 :a2194. :a2195 :a2195 :a2195. :a2196 :a2196 :a2196. :a2197 :a2197 :a2197. :a2198 :a2198 :a2198. :a2199 :a2199 :a2199. :a2200 :a2200 :a2200. :a2201 :a2201 :a2201. :a2202 :a2202 :a2202. :a2203 :a2203 :a2203. :a2204 :a2204 :a2204. :a2205 :a2205 :a2205. :a2206 :a2206 :a2206. :a2207 :a2207 :a2207. :a2208 :a2208 :a2208. :a2209 :a2209 :a2209. :a2210 :a2210 :a2210. :a2211 :a2211 :a2211. :a2212 :a2212 :a2212. :a2213 :a2213 :a2213. :a2214 :a2214 :a2214. :a2215 :a2215 :a2215. :a2216 :a2216 :a2216. :a2217 :a2217 :a2217. :a2218 :a2218 :a2218. :a2219 :a2219 :a2219. :a2220 :a2220 :a2220. :a2221 :a2221 :a2221. :a2222 :a2222 :a2222. :a2223 :a2223 :a2223. :a2224 :a2224 :a2224. :a2225 :a2225 :a2225. :a2226 :a2226 :a2226. :a2227 :a2227 :a2227. :a2228 :a2228 :a2228. :a2229 :a2229 :a2229. :a2230 :a2230 :a2230. :a2231 :a2231 :a2231. :a2232 :a2232 :a2232. :a2233 :a2233 :a2233. :a2234 :a2234 :a2234. :a2235 :a2235 :a2235. :a2236 :a2236 :a2236. :a2237 :a2237 :a2237. :a2238 :a2238 :a2238. :a2239 :a2239 :a2239. :a2240 :a2240 :a2240. :a2241 :a2241 :a2241. :a2242 :a2242 :a2242. :a2243 :a2243 :a2243. :a2244 :a2244 :a2244. :a2245 :a2245 :a2245. :a2246 :a2246 :a2246. :a2247 :a2247 :a2247. :a2248 :a2248 :a2248. :a2249 :a2249 :a2249. :a2250 :a2250 :a2250. :a2251 :a2251 :a2251. :a2252 :a2252 :a2252. :a2253 :a2253 :a2253. :a2254 :a2254 :a2254. :a2255 :a2255 :a2255. :a2256 :a2256 :a2256. :a2257 :a2257 :a2257. :a2258 :a2258 :a2258. :a2259 :a2259 :a2259. :a2260 :a2260 :a2260. :a2261 :a2261 :a2261. :a2262 :a2262 :a2262. :a2263 :a2263 :a2263. :a2264 :a2264 :a2264. :a2265 :a2265 :a2265. :a2266 :a2266 :a2266. :a2267 :a2267 :a2267. :a2268 :a2268 :a2268. :a2269 :a2269 :a2269. :a2270 :a2270 :a2270. :a2271 :a2271 :a2271. :a2272 :a2272 :a2272. :a2273 :a2273 :a2273. :a2274 :a2274 :a2274. :a2275 :a2275 :a2275. :a2276 :a2276 :a2276. :a2277 :a2277 :a2277. :a2278 :a2278 :a2278. :a2279 :a2279 :a2279. :a2280 :a2280 :a2280. :a2281 :a2281 :a2281. :a2282 :a2282 :a2282. :a2283 :a2283 :a2283. :a2284 :a2284 :a2284. :a2285 :a2285 :a2285. :a2286 :a2286 :a2286. :a2287 :a2287 :a2287. :a2288 :a2288 :a2288. :a2289 :a2289 :a2289. :a2290 :a2290 :a2290. :a2291 :a2291 :a2291. :a2292 :a2292 :a2292. :a2293 :a2293 :a2293. :a2294 :a2294 :a2294. :a2295 :a2295 :a2295. :a2296 :a2296 :a2296. :a2297 :a2297 :a2297. :a2298 :a2298 :a2298. :a2299 :a2299 :a2299. :a2300 :a2300 :a2300. :a2301 :a2301 :a2301. :a2302 :a2302 :a2302. :a2303 :a2303 :a2303. :a2304 :a2304 :a2304. :a2305 :a2305 :a2305. :a2306 :a2306 :a2306. :a2307 :a2307 :a2307. :a2308 :a2308 :a2308. :a2309 :a2309 :a2309. :a2310 :a2310 :a2310. :a2311 :a2311 :a2311. :a2312 :a2312 :a2312. :a2313 :a2313 :a2313. :a2314 :a2314 :a2314. :a2315 :a2315 :a2315. :a2316 :a2316 :a2316. :a2317 :a2317 :a2317. :a2318 :a2318 :a2318. :a2319 :a2319 :a2319. :a2320 :a2320 :a2320. :a2321 :a2321 :a2321. :a2322 :a2322 :a2322. :a2323 :a2323 :a2323. :a2324 :a2324 :a2324. :a2325 :a2325 :a2325. :a2326 :a2326 :a2326. :a2327 :a2327 :a2327. :a2328 :a2328 :a2328. :a2329 :a2329 :a2329. :a2330 :a2330 :a2330. :a2331 :a2331 :a2331. :a2332 :a2332 :a2332. :a2333 :a2333 :a2333. :a2334 :a2334 :a2334. :a2335 :a2335 :a2335. :a2336 :a2336 :a2336. :a2337 :a2337 :a2337. :a2338 :a2338 :a2338. :a2339 :a2339 :a2339. :a2340 :a2340 :a2340. :a2341 :a2341 :a2341. :a2342 :a2342 :a2342. :a2343 :a2343 :a2343. :a2344 :a2344 :a2344. :a2345 :a2345 :a2345. :a2346 :a2346 :a2346. :a2347 :a2347 :a2347. :a2348 :a2348 :a2348. :a2349 :a2349 :a2349. :a2350 :a2350 :a2350. :a2351 :a2351 :a2351. :a2352 :a2352 :a2352. :a2353 :a2353 :a2353. :a2354 :a2354 :a2354. :a2355 :a2355 :a2355. :a2356 :a2356 :a2356. :a2357 :a2357 :a2357. :a2358 :a2358 :a2358. :a2359 :a2359 :a2359. :a2360 :a2360 :a2360. :a2361 :a2361 :a2361. :a2362 :a2362 :a2362. :a2363 :a2363 :a2363. :a2364 :a2364 :a2364. :a2365 :a2365 :a2365. :a2366 :a2366 :a2366. :a2367 :a2367 :a2367. :a2368 :a2368 :a2368. :a2369 :a2369 :a2369. :a2370 :a2370 :a2370. :a2371 :a2371 :a2371. :a2372 :a2372 :a2372. :a2373 :a2373 :a2373. :a2374 :a2374 :a2374. :a2375 :a2375 :a2375. :a2376 :a2376 :a2376. :a2377 :a2377 :a2377. :a2378 :a2378 :a2378. :a2379 :a2379 :a2379. :a2380 :a2380 :a2380. :a2381 :a2381 :a2381. :a2382 :a2382 :a2382. :a2383 :a2383 :a2383. :a2384 :a2384 :a2384. :a2385 :a2385 :a2385. :a2386 :a2386 :a2386. :a2387 :a2387 :a2387. :a2388 :a2388 :a2388. :a2389 :a2389 :a2389. :a2390 :a2390 :a2390. :a2391 :a2391 :a2391. :a2392 :a2392 :a2392. :a2393 :a2393 :a2393. :a2394 :a2394 :a2394. :a2395 :a2395 :a2395. :a2396 :a2396 :a2396. :a2397 :a2397 :a2397. :a2398 :a2398 :a2398. :a2399 :a2399 :a2399. :a2400 :a2400 :a2400. :a2401 :a2401 :a2401. :a2402 :a2402 :a2402. :a2403 :a2403 :a2403. :a2404 :a2404 :a2404. :a2405 :a2405 :a2405. :a2406 :a2406 :a2406. :a2407 :a2407 :a2407. :a2408 :a2408 :a2408. :a2409 :a2409 :a2409. :a2410 :a2410 :a2410. :a2411 :a2411 :a2411. :a2412 :a2412 :a2412. :a2413 :a2413 :a2413. :a2414 :a2414 :a2414. :a2415 :a2415 :a2415. :a2416 :a2416 :a2416. :a2417 :a2417 :a2417. :a2418 :a2418 :a2418. :a2419 :a2419 :a2419. :a2420 :a2420 :a2420. :a2421 :a2421 :a2421. :a2422 :a2422 :a2422. :a2423 :a2423 :a2423. :a2424 :a2424 :a2424. :a2425 :a2425 :a2425. :a2426 :a2426 :a2426. :a2427 :a2427 :a2427. :a2428 :a2428 :a2428. :a2429 :a2429 :a2429. :a2430 :a2430 :a2430. :a2431 :a2431 :a2431. :a2432 :a2432 :a2432. :a2433 :a2433 :a2433. :a2434 :a2434 :a2434. :a2435 :a2435 :a2435. :a2436 :a2436 :a2436. :a2437 :a2437 :a2437. :a2438 :a2438 :a2438. :a2439 :a2439 :a2439. :a2440 :a2440 :a2440. :a2441 :a2441 :a2441. :a2442 :a2442 :a2442. :a2443 :a2443 :a2443. :a2444 :a2444 :a2444. :a2445 :a2445 :a2445. :a2446 :a2446 :a2446. :a2447 :a2447 :a2447. :a2448 :a2448 :a2448. :a2449 :a2449 :a2449. :a2450 :a2450 :a2450. :a2451 :a2451 :a2451. :a2452 :a2452 :a2452. :a2453 :a2453 :a2453. :a2454 :a2454 :a2454. :a2455 :a2455 :a2455. :a2456 :a2456 :a2456. :a2457 :a2457 :a2457. :a2458 :a2458 :a2458. :a2459 :a2459 :a2459. :a2460 :a2460 :a2460. :a2461 :a2461 :a2461. :a2462 :a2462 :a2462. :a2463 :a2463 :a2463. :a2464 :a2464 :a2464. :a2465 :a2465 :a2465. :a2466 :a2466 :a2466. :a2467 :a2467 :a2467. :a2468 :a2468 :a2468. :a2469 :a2469 :a2469. :a2470 :a2470 :a2470. :a2471 :a2471 :a2471. :a2472 :a2472 :a2472. :a2473 :a2473 :a2473. :a2474 :a2474 :a2474. :a2475 :a2475 :a2475. :a2476 :a2476 :a2476. :a2477 :a2477 :a2477. :a2478 :a2478 :a2478. :a2479 :a2479 :a2479. :a2480 :a2480 :a2480. :a2481 :a2481 :a2481. :a2482 :a2482 :a2482. :a2483 :a2483 :a2483. :a2484 :a2484 :a2484. :a2485 :a2485 :a2485. :a2486 :a2486 :a2486. :a2487 :a2487 :a2487. :a2488 :a2488 :a2488. :a2489 :a2489 :a2489. :a2490 :a2490 :a2490. :a2491 :a2491 :a2491. :a2492 :a2492 :a2492. :a2493 :a2493 :a2493. :a2494 :a2494 :a2494. :a2495 :a2495 :a2495. :a2496 :a2496 :a2496. :a2497 :a2497 :a2497. :a2498 :a2498 :a2498. :a2499 :a2499 :a2499. :a2500 :a2500 :a2500. :a2501 :a2501 :a2501. :a2502 :a2502 :a2502. :a2503 :a2503 :a2503. :a2504 :a2504 :a2504. :a2505 :a2505 :a2505. :a2506 :a2506 :a2506. :a2507 :a2507 :a2507. :a2508 :a2508 :a2508. :a2509 :a2509 :a2509. :a2510 :a2510 :a2510. :a2511 :a2511 :a2511. :a2512 :a2512 :a2512. :a2513 :a2513 :a2513. :a2514 :a2514 :a2514. :a2515 :a2515 :a2515. :a2516 :a2516 :a2516. :a2517 :a2517 :a2517. :a2518 :a2518 :a2518. :a2519 :a2519 :a2519. :a2520 :a2520 :a2520. :a2521 :a2521 :a2521. :a2522 :a2522 :a2522. :a2523 :a2523 :a2523. :a2524 :a2524 :a2524. :a2525 :a2525 :a2525. :a2526 :a2526 :a2526. :a2527 :a2527 :a2527. :a2528 :a2528 :a2528. :a2529 :a2529 :a2529. :a2530 :a2530 :a2530. :a2531 :a2531 :a2531. :a2532 :a2532 :a2532. :a2533 :a2533 :a2533. :a2534 :a2534 :a2534. :a2535 :a2535 :a2535. :a2536 :a2536 :a2536. :a2537 :a2537 :a2537. :a2538 :a2538 :a2538. :a2539 :a2539 :a2539. :a2540 :a2540 :a2540. :a2541 :a2541 :a2541. :a2542 :a2542 :a2542. :a2543 :a2543 :a2543. :a2544 :a2544 :a2544. :a2545 :a2545 :a2545. :a2546 :a2546 :a2546. :a2547 :a2547 :a2547. :a2548 :a2548 :a2548. :a2549 :a2549 :a2549. :a2550 :a2550 :a2550. :a2551 :a2551 :a2551. :a2552 :a2552 :a2552. :a2553 :a2553 :a2553. :a2554 :a2554 :a2554. :a2555 :a2555 :a2555. :a2556 :a2556 :a2556. :a2557 :a2557 :a2557. :a2558 :a2558 :a2558. :a2559 :a2559 :a2559. :a2560 :a2560 :a2560. :a2561 :a2561 :a2561. :a2562 :a2562 :a2562. :a2563 :a2563 :a2563. :a2564 :a2564 :a2564. :a2565 :a2565 :a2565. :a2566 :a2566 :a2566. :a2567 :a2567 :a2567. :a2568 :a2568 :a2568. :a2569 :a2569 :a2569. :a2570 :a2570 :a2570. :a2571 :a2571 :a2571. :a2572 :a2572 :a2572. :a2573 :a2573 :a2573. :a2574 :a2574 :a2574. :a2575 :a2575 :a2575. :a2576 :a2576 :a2576. :a2577 :a2577 :a2577. :a2578 :a2578 :a2578. :a2579 :a2579 :a2579. :a2580 :a2580 :a2580. :a2581 :a2581 :a2581. :a2582 :a2582 :a2582. :a2583 :a2583 :a2583. :a2584 :a2584 :a2584. :a2585 :a2585 :a2585. :a2586 :a2586 :a2586. :a2587 :a2587 :a2587. :a2588 :a2588 :a2588. :a2589 :a2589 :a2589. :a2590 :a2590 :a2590. :a2591 :a2591 :a2591. :a2592 :a2592 :a2592. :a2593 :a2593 :a2593. :a2594 :a2594 :a2594. :a2595 :a2595 :a2595. :a2596 :a2596 :a2596. :a2597 :a2597 :a2597. :a2598 :a2598 :a2598. :a2599 :a2599 :a2599. :a2600 :a2600 :a2600. :a2601 :a2601 :a2601. :a2602 :a2602 :a2602. :a2603 :a2603 :a2603. :a2604 :a2604 :a2604. :a2605 :a2605 :a2605. :a2606 :a2606 :a2606. :a2607 :a2607 :a2607. :a2608 :a2608 :a2608. :a2609 :a2609 :a2609. :a2610 :a2610 :a2610. :a2611 :a2611 :a2611. :a2612 :a2612 :a2612. :a2613 :a2613 :a2613. :a2614 :a2614 :a2614. :a2615 :a2615 :a2615. :a2616 :a2616 :a2616. :a2617 :a2617 :a2617. :a2618 :a2618 :a2618. :a2619 :a2619 :a2619. :a2620 :a2620 :a2620. :a2621 :a2621 :a2621. :a2622 :a2622 :a2622. :a2623 :a2623 :a2623. :a2624 :a2624 :a2624. :a2625 :a2625 :a2625. :a2626 :a2626 :a2626. :a2627 :a2627 :a2627. :a2628 :a2628 :a2628. :a2629 :a2629 :a2629. :a2630 :a2630 :a2630. :a2631 :a2631 :a2631. :a2632 :a2632 :a2632. :a2633 :a2633 :a2633. :a2634 :a2634 :a2634. :a2635 :a2635 :a2635. :a2636 :a2636 :a2636. :a2637 :a2637 :a2637. :a2638 :a2638 :a2638. :a2639 :a2639 :a2639. :a2640 :a2640 :a2640. :a2641 :a2641 :a2641. :a2642 :a2642 :a2642. :a2643 :a2643 :a2643. :a2644 :a2644 :a2644. :a2645 :a2645 :a2645. :a2646 :a2646 :a2646. :a2647 :a2647 :a2647. :a2648 :a2648 :a2648. :a2649 :a2649 :a2649. :a2650 :a2650 :a2650. :a2651 :a2651 :a2651. :a2652 :a2652 :a2652. :a2653 :a2653 :a2653. :a2654 :a2654 :a2654. :a2655 :a2655 :a2655. :a2656 :a2656 :a2656. :a2657 :a2657 :a2657. :a2658 :a2658 :a2658. :a2659 :a2659 :a2659. :a2660 :a2660 :a2660. :a2661 :a2661 :a2661. :a2662 :a2662 :a2662. :a2663 :a2663 :a2663. :a2664 :a2664 :a2664. :a2665 :a2665 :a2665. :a2666 :a2666 :a2666. :a2667 :a2667 :a2667. :a2668 :a2668 :a2668. :a2669 :a2669 :a2669. :a2670 :a2670 :a2670. :a2671 :a2671 :a2671. :a2672 :a2672 :a2672. :a2673 :a2673 :a2673. :a2674 :a2674 :a2674. :a2675 :a2675 :a2675. :a2676 :a2676 :a2676. :a2677 :a2677 :a2677. :a2678 :a2678 :a2678. :a2679 :a2679 :a2679. :a2680 :a2680 :a2680. :a2681 :a2681 :a2681. :a2682 :a2682 :a2682. :a2683 :a2683 :a2683. :a2684 :a2684 :a2684. :a2685 :a2685 :a2685. :a2686 :a2686 :a2686. :a2687 :a2687 :a2687. :a2688 :a2688 :a2688. :a2689 :a2689 :a2689. :a2690 :a2690 :a2690. :a2691 :a2691 :a2691. :a2692 :a2692 :a2692. :a2693 :a2693 :a2693. :a2694 :a2694 :a2694. :a2695 :a2695 :a2695. :a2696 :a2696 :a2696. :a2697 :a2697 :a2697. :a2698 :a2698 :a2698. :a2699 :a2699 :a2699. :a2700 :a2700 :a2700. :a2701 :a2701 :a2701. :a2702 :a2702 :a2702. :a2703 :a2703 :a2703. :a2704 :a2704 :a2704. :a2705 :a2705 :a2705. :a2706 :a2706 :a2706. :a2707 :a2707 :a2707. :a2708 :a2708 :a2708. :a2709 :a2709 :a2709. :a2710 :a2710 :a2710. :a2711 :a2711 :a2711. :a2712 :a2712 :a2712. :a2713 :a2713 :a2713. :a2714 :a2714 :a2714. :a2715 :a2715 :a2715. :a2716 :a2716 :a2716. :a2717 :a2717 :a2717. :a2718 :a2718 :a2718. :a2719 :a2719 :a2719. :a2720 :a2720 :a2720. :a2721 :a2721 :a2721. :a2722 :a2722 :a2722. :a2723 :a2723 :a2723. :a2724 :a2724 :a2724. :a2725 :a2725 :a2725. :a2726 :a2726 :a2726. :a2727 :a2727 :a2727. :a2728 :a2728 :a2728. :a2729 :a2729 :a2729. :a2730 :a2730 :a2730. :a2731 :a2731 :a2731. :a2732 :a2732 :a2732. :a2733 :a2733 :a2733. :a2734 :a2734 :a2734. :a2735 :a2735 :a2735. :a2736 :a2736 :a2736. :a2737 :a2737 :a2737. :a2738 :a2738 :a2738. :a2739 :a2739 :a2739. :a2740 :a2740 :a2740. :a2741 :a2741 :a2741. :a2742 :a2742 :a2742. :a2743 :a2743 :a2743. :a2744 :a2744 :a2744. :a2745 :a2745 :a2745. :a2746 :a2746 :a2746. :a2747 :a2747 :a2747. :a2748 :a2748 :a2748. :a2749 :a2749 :a2749. :a2750 :a2750 :a2750. :a2751 :a2751 :a2751. :a2752 :a2752 :a2752. :a2753 :a2753 :a2753. :a2754 :a2754 :a2754. :a2755 :a2755 :a2755. :a2756 :a2756 :a2756. :a2757 :a2757 :a2757. :a2758 :a2758 :a2758. :a2759 :a2759 :a2759. :a2760 :a2760 :a2760. :a2761 :a2761 :a2761. :a2762 :a2762 :a2762. :a2763 :a2763 :a2763. :a2764 :a2764 :a2764. :a2765 :a2765 :a2765. :a2766 :a2766 :a2766. :a2767 :a2767 :a2767. :a2768 :a2768 :a2768. :a2769 :a2769 :a2769. :a2770 :a2770 :a2770. :a2771 :a2771 :a2771. :a2772 :a2772 :a2772. :a2773 :a2773 :a2773. :a2774 :a2774 :a2774. :a2775 :a2775 :a2775. :a2776 :a2776 :a2776. :a2777 :a2777 :a2777. :a2778 :a2778 :a2778. :a2779 :a2779 :a2779. :a2780 :a2780 :a2780. :a2781 :a2781 :a2781. :a2782 :a2782 :a2782. :a2783 :a2783 :a2783. :a2784 :a2784 :a2784. :a2785 :a2785 :a2785. :a2786 :a2786 :a2786. :a2787 :a2787 :a2787. :a2788 :a2788 :a2788. :a2789 :a2789 :a2789. :a2790 :a2790 :a2790. :a2791 :a2791 :a2791. :a2792 :a2792 :a2792. :a2793 :a2793 :a2793. :a2794 :a2794 :a2794. :a2795 :a2795 :a2795. :a2796 :a2796 :a2796. :a2797 :a2797 :a2797. :a2798 :a2798 :a2798. :a2799 :a2799 :a2799. :a2800 :a2800 :a2800. :a2801 :a2801 :a2801. :a2802 :a2802 :a2802. :a2803 :a2803 :a2803. :a2804 :a2804 :a2804. :a2805 :a2805 :a2805. :a2806 :a2806 :a2806. :a2807 :a2807 :a2807. :a2808 :a2808 :a2808. :a2809 :a2809 :a2809. :a2810 :a2810 :a2810. :a2811 :a2811 :a2811. :a2812 :a2812 :a2812. :a2813 :a2813 :a2813. :a2814 :a2814 :a2814. :a2815 :a2815 :a2815. :a2816 :a2816 :a2816. :a2817 :a2817 :a2817. :a2818 :a2818 :a2818. :a2819 :a2819 :a2819. :a2820 :a2820 :a2820. :a2821 :a2821 :a2821. :a2822 :a2822 :a2822. :a2823 :a2823 :a2823. :a2824 :a2824 :a2824. :a2825 :a2825 :a2825. :a2826 :a2826 :a2826. :a2827 :a2827 :a2827. :a2828 :a2828 :a2828. :a2829 :a2829 :a2829. :a2830 :a2830 :a2830. :a2831 :a2831 :a2831. :a2832 :a2832 :a2832. :a2833 :a2833 :a2833. :a2834 :a2834 :a2834. :a2835 :a2835 :a2835. :a2836 :a2836 :a2836. :a2837 :a2837 :a2837. :a2838 :a2838 :a2838. :a2839 :a2839 :a2839. :a2840 :a2840 :a2840. :a2841 :a2841 :a2841. :a2842 :a2842 :a2842. :a2843 :a2843 :a2843. :a2844 :a2844 :a2844. :a2845 :a2845 :a2845. :a2846 :a2846 :a2846. :a2847 :a2847 :a2847. :a2848 :a2848 :a2848. :a2849 :a2849 :a2849. :a2850 :a2850 :a2850. :a2851 :a2851 :a2851. :a2852 :a2852 :a2852. :a2853 :a2853 :a2853. :a2854 :a2854 :a2854. :a2855 :a2855 :a2855. :a2856 :a2856 :a2856. :a2857 :a2857 :a2857. :a2858 :a2858 :a2858. :a2859 :a2859 :a2859. :a2860 :a2860 :a2860. :a2861 :a2861 :a2861. :a2862 :a2862 :a2862. :a2863 :a2863 :a2863. :a2864 :a2864 :a2864. :a2865 :a2865 :a2865. :a2866 :a2866 :a2866. :a2867 :a2867 :a2867. :a2868 :a2868 :a2868. :a2869 :a2869 :a2869. :a2870 :a2870 :a2870. :a2871 :a2871 :a2871. :a2872 :a2872 :a2872. :a2873 :a2873 :a2873. :a2874 :a2874 :a2874. :a2875 :a2875 :a2875. :a2876 :a2876 :a2876. :a2877 :a2877 :a2877. :a2878 :a2878 :a2878. :a2879 :a2879 :a2879. :a2880 :a2880 :a2880. :a2881 :a2881 :a2881. :a2882 :a2882 :a2882. :a2883 :a2883 :a2883. :a2884 :a2884 :a2884. :a2885 :a2885 :a2885. :a2886 :a2886 :a2886. :a2887 :a2887 :a2887. :a2888 :a2888 :a2888. :a2889 :a2889 :a2889. :a2890 :a2890 :a2890. :a2891 :a2891 :a2891. :a2892 :a2892 :a2892. :a2893 :a2893 :a2893. :a2894 :a2894 :a2894. :a2895 :a2895 :a2895. :a2896 :a2896 :a2896. :a2897 :a2897 :a2897. :a2898 :a2898 :a2898. :a2899 :a2899 :a2899. :a2900 :a2900 :a2900. :a2901 :a2901 :a2901. :a2902 :a2902 :a2902. :a2903 :a2903 :a2903. :a2904 :a2904 :a2904. :a2905 :a2905 :a2905. :a2906 :a2906 :a2906. :a2907 :a2907 :a2907. :a2908 :a2908 :a2908. :a2909 :a2909 :a2909. :a2910 :a2910 :a2910. :a2911 :a2911 :a2911. :a2912 :a2912 :a2912. :a2913 :a2913 :a2913. :a2914 :a2914 :a2914. :a2915 :a2915 :a2915. :a2916 :a2916 :a2916. :a2917 :a2917 :a2917. :a2918 :a2918 :a2918. :a2919 :a2919 :a2919. :a2920 :a2920 :a2920. :a2921 :a2921 :a2921. :a2922 :a2922 :a2922. :a2923 :a2923 :a2923. :a2924 :a2924 :a2924. :a2925 :a2925 :a2925. :a2926 :a2926 :a2926. :a2927 :a2927 :a2927. :a2928 :a2928 :a2928. :a2929 :a2929 :a2929. :a2930 :a2930 :a2930. :a2931 :a2931 :a2931. :a2932 :a2932 :a2932. :a2933 :a2933 :a2933. :a2934 :a2934 :a2934. :a2935 :a2935 :a2935. :a2936 :a2936 :a2936. :a2937 :a2937 :a2937. :a2938 :a2938 :a2938. :a2939 :a2939 :a2939. :a2940 :a2940 :a2940. :a2941 :a2941 :a2941. :a2942 :a2942 :a2942. :a2943 :a2943 :a2943. :a2944 :a2944 :a2944. :a2945 :a2945 :a2945. :a2946 :a2946 :a2946. :a2947 :a2947 :a2947. :a2948 :a2948 :a2948. :a2949 :a2949 :a2949. :a2950 :a2950 :a2950. :a2951 :a2951 :a2951. :a2952 :a2952 :a2952. :a2953 :a2953 :a2953. :a2954 :a2954 :a2954. :a2955 :a2955 :a2955. :a2956 :a2956 :a2956. :a2957 :a2957 :a2957. :a2958 :a2958 :a2958. :a2959 :a2959 :a2959. :a2960 :a2960 :a2960. :a2961 :a2961 :a2961. :a2962 :a2962 :a2962. :a2963 :a2963 :a2963. :a2964 :a2964 :a2964. :a2965 :a2965 :a2965. :a2966 :a2966 :a2966. :a2967 :a2967 :a2967. :a2968 :a2968 :a2968. :a2969 :a2969 :a2969. :a2970 :a2970 :a2970. :a2971 :a2971 :a2971. :a2972 :a2972 :a2972. :a2973 :a2973 :a2973. :a2974 :a2974 :a2974. :a2975 :a2975 :a2975. :a2976 :a2976 :a2976. :a2977 :a2977 :a2977. :a2978 :a2978 :a2978. :a2979 :a2979 :a2979. :a2980 :a2980 :a2980. :a2981 :a2981 :a2981. :a2982 :a2982 :a2982. :a2983 :a2983 :a2983. :a2984 :a2984 :a2984. :a2985 :a2985 :a2985. :a2986 :a2986 :a2986. :a2987 :a2987 :a2987. :a2988 :a2988 :a2988. :a2989 :a2989 :a2989. :a2990 :a2990 :a2990. :a2991 :a2991 :a2991. :a2992 :a2992 :a2992. :a2993 :a2993 :a2993. :a2994 :a2994 :a2994. :a2995 :a2995 :a2995. :a2996 :a2996 :a2996. :a2997 :a2997 :a2997. :a2998 :a2998 :a2998. :a2999 :a2999 :a2999. :a3000 :a3000 :a3000. :a3001 :a3001 :a3001. :a3002 :a3002 :a3002. :a3003 :a3003 :a3003. :a3004 :a3004 :a3004. :a3005 :a3005 :a3005. :a3006 :a3006 :a3006. :a3007 :a3007 :a3007. :a3008 :a3008 :a3008. :a3009 :a3009 :a3009. :a3010 :a3010 :a3010. :a3011 :a3011 :a3011. :a3012 :a3012 :a3012. :a3013 :a3013 :a3013. :a3014 :a3014 :a3014. :a3015 :a3015 :a3015. :a3016 :a3016 :a3016. :a3017 :a3017 :a3017. :a3018 :a3018 :a3018. :a3019 :a3019 :a3019. :a3020 :a3020 :a3020. :a3021 :a3021 :a3021. :a3022 :a3022 :a3022. :a3023 :a3023 :a3023. :a3024 :a3024 :a3024. :a3025 :a3025 :a3025. :a3026 :a3026 :a3026. :a3027 :a3027 :a3027. :a3028 :a3028 :a3028. :a3029 :a3029 :a3029. :a3030 :a3030 :a3030. :a3031 :a3031 :a3031. :a3032 :a3032 :a3032. :a3033 :a3033 :a3033. :a3034 :a3034 :a3034. :a3035 :a3035 :a3035. :a3036 :a3036 :a3036. :a3037 :a3037 :a3037. :a3038 :a3038 :a3038. :a3039 :a3039 :a3039. :a3040 :a3040 :a3040. :a3041 :a3041 :a3041. :a3042 :a3042 :a3042. :a3043 :a3043 :a3043. :a3044 :a3044 :a3044. :a3045 :a3045 :a3045. :a3046 :a3046 :a3046. :a3047 :a3047 :a3047. :a3048 :a3048 :a3048. :a3049 :a3049 :a3049. :a3050 :a3050 :a3050. :a3051 :a3051 :a3051. :a3052 :a3052 :a3052. :a3053 :a3053 :a3053. :a3054 :a3054 :a3054. :a3055 :a3055 :a3055. :a3056 :a3056 :a3056. :a3057 :a3057 :a3057. :a3058 :a3058 :a3058. :a3059 :a3059 :a3059. :a3060 :a3060 :a3060. :a3061 :a3061 :a3061. :a3062 :a3062 :a3062. :a3063 :a3063 :a3063. :a3064 :a3064 :a3064. :a3065 :a3065 :a3065. :a3066 :a3066 :a3066. :a3067 :a3067 :a3067. :a3068 :a3068 :a3068. :a3069 :a3069 :a3069. :a3070 :a3070 :a3070. :a3071 :a3071 :a3071. :a3072 :a3072 :a3072. :a3073 :a3073 :a3073. :a3074 :a3074 :a3074. :a3075 :a3075 :a3075. :a3076 :a3076 :a3076. :a3077 :a3077 :a3077. :a3078 :a3078 :a3078. :a3079 :a3079 :a3079. :a3080 :a3080 :a3080. :a3081 :a3081 :a3081. :a3082 :a3082 :a3082. :a3083 :a3083 :a3083. :a3084 :a3084 :a3084. :a3085 :a3085 :a3085. :a3086 :a3086 :a3086. :a3087 :a3087 :a3087. :a3088 :a3088 :a3088. :a3089 :a3089 :a3089. :a3090 :a3090 :a3090. :a3091 :a3091 :a3091. :a3092 :a3092 :a3092. :a3093 :a3093 :a3093. :a3094 :a3094 :a3094. :a3095 :a3095 :a3095. :a3096 :a3096 :a3096. :a3097 :a3097 :a3097. :a3098 :a3098 :a3098. :a3099 :a3099 :a3099. :a3100 :a3100 :a3100. :a3101 :a3101 :a3101. :a3102 :a3102 :a3102. :a3103 :a3103 :a3103. :a3104 :a3104 :a3104. :a3105 :a3105 :a3105. :a3106 :a3106 :a3106. :a3107 :a3107 :a3107. :a3108 :a3108 :a3108. :a3109 :a3109 :a3109. :a3110 :a3110 :a3110. :a3111 :a3111 :a3111. :a3112 :a3112 :a3112. :a3113 :a3113 :a3113. :a3114 :a3114 :a3114. :a3115 :a3115 :a3115. :a3116 :a3116 :a3116. :a3117 :a3117 :a3117. :a3118 :a3118 :a3118. :a3119 :a3119 :a3119. :a3120 :a3120 :a3120. :a3121 :a3121 :a3121. :a3122 :a3122 :a3122. :a3123 :a3123 :a3123. :a3124 :a3124 :a3124. :a3125 :a3125 :a3125. :a3126 :a3126 :a3126. :a3127 :a3127 :a3127. :a3128 :a3128 :a3128. :a3129 :a3129 :a3129. :a3130 :a3130 :a3130. :a3131 :a3131 :a3131. :a3132 :a3132 :a3132. :a3133 :a3133 :a3133. :a3134 :a3134 :a3134. :a3135 :a3135 :a3135. :a3136 :a3136 :a3136. :a3137 :a3137 :a3137. :a3138 :a3138 :a3138. :a3139 :a3139 :a3139. :a3140 :a3140 :a3140. :a3141 :a3141 :a3141. :a3142 :a3142 :a3142. :a3143 :a3143 :a3143. :a3144 :a3144 :a3144. :a3145 :a3145 :a3145. :a3146 :a3146 :a3146. :a3147 :a3147 :a3147. :a3148 :a3148 :a3148. :a3149 :a3149 :a3149. :a3150 :a3150 :a3150. :a3151 :a3151 :a3151. :a3152 :a3152 :a3152. :a3153 :a3153 :a3153. :a3154 :a3154 :a3154. :a3155 :a3155 :a3155. :a3156 :a3156 :a3156. :a3157 :a3157 :a3157. :a3158 :a3158 :a3158. :a3159 :a3159 :a3159. :a3160 :a3160 :a3160. :a3161 :a3161 :a3161. :a3162 :a3162 :a3162. :a3163 :a3163 :a3163. :a3164 :a3164 :a3164. :a3165 :a3165 :a3165. :a3166 :a3166 :a3166. :a3167 :a3167 :a3167. :a3168 :a3168 :a3168. :a3169 :a3169 :a3169. :a3170 :a3170 :a3170. :a3171 :a3171 :a3171. :a3172 :a3172 :a3172. :a3173 :a3173 :a3173. :a3174 :a3174 :a3174. :a3175 :a3175 :a3175. :a3176 :a3176 :a3176. :a3177 :a3177 :a3177. :a3178 :a3178 :a3178. :a3179 :a3179 :a3179. :a3180 :a3180 :a3180. :a3181 :a3181 :a3181. :a3182 :a3182 :a3182. :a3183 :a3183 :a3183. :a3184 :a3184 :a3184. :a3185 :a3185 :a3185. :a3186 :a3186 :a3186. :a3187 :a3187 :a3187. :a3188 :a3188 :a3188. :a3189 :a3189 :a3189. :a3190 :a3190 :a3190. :a3191 :a3191 :a3191. :a3192 :a3192 :a3192. :a3193 :a3193 :a3193. :a3194 :a3194 :a3194. :a3195 :a3195 :a3195. :a3196 :a3196 :a3196. :a3197 :a3197 :a3197. :a3198 :a3198 :a3198. :a3199 :a3199 :a3199. :a3200 :a3200 :a3200. :a3201 :a3201 :a3201. :a3202 :a3202 :a3202. :a3203 :a3203 :a3203. :a3204 :a3204 :a3204. :a3205 :a3205 :a3205. :a3206 :a3206 :a3206. :a3207 :a3207 :a3207. :a3208 :a3208 :a3208. :a3209 :a3209 :a3209. :a3210 :a3210 :a3210. :a3211 :a3211 :a3211. :a3212 :a3212 :a3212. :a3213 :a3213 :a3213. :a3214 :a3214 :a3214. :a3215 :a3215 :a3215. :a3216 :a3216 :a3216. :a3217 :a3217 :a3217. :a3218 :a3218 :a3218. :a3219 :a3219 :a3219. :a3220 :a3220 :a3220. :a3221 :a3221 :a3221. :a3222 :a3222 :a3222. :a3223 :a3223 :a3223. :a3224 :a3224 :a3224. :a3225 :a3225 :a3225. :a3226 :a3226 :a3226. :a3227 :a3227 :a3227. :a3228 :a3228 :a3228. :a3229 :a3229 :a3229. :a3230 :a3230 :a3230. :a3231 :a3231 :a3231. :a3232 :a3232 :a3232. :a3233 :a3233 :a3233. :a3234 :a3234 :a3234. :a3235 :a3235 :a3235. :a3236 :a3236 :a3236. :a3237 :a3237 :a3237. :a3238 :a3238 :a3238. :a3239 :a3239 :a3239. :a3240 :a3240 :a3240. :a3241 :a3241 :a3241. :a3242 :a3242 :a3242. :a3243 :a3243 :a3243. :a3244 :a3244 :a3244. :a3245 :a3245 :a3245. :a3246 :a3246 :a3246. :a3247 :a3247 :a3247. :a3248 :a3248 :a3248. :a3249 :a3249 :a3249. :a3250 :a3250 :a3250. :a3251 :a3251 :a3251. :a3252 :a3252 :a3252. :a3253 :a3253 :a3253. :a3254 :a3254 :a3254. :a3255 :a3255 :a3255. :a3256 :a3256 :a3256. :a3257 :a3257 :a3257. :a3258 :a3258 :a3258. :a3259 :a3259 :a3259. :a3260 :a3260 :a3260. :a3261 :a3261 :a3261. :a3262 :a3262 :a3262. :a3263 :a3263 :a3263. :a3264 :a3264 :a3264. :a3265 :a3265 :a3265. :a3266 :a3266 :a3266. :a3267 :a3267 :a3267. :a3268 :a3268 :a3268. :a3269 :a3269 :a3269. :a3270 :a3270 :a3270. :a3271 :a3271 :a3271. :a3272 :a3272 :a3272. :a3273 :a3273 :a3273. :a3274 :a3274 :a3274. :a3275 :a3275 :a3275. :a3276 :a3276 :a3276. :a3277 :a3277 :a3277. :a3278 :a3278 :a3278. :a3279 :a3279 :a3279. :a3280 :a3280 :a3280. :a3281 :a3281 :a3281. :a3282 :a3282 :a3282. :a3283 :a3283 :a3283. :a3284 :a3284 :a3284. :a3285 :a3285 :a3285. :a3286 :a3286 :a3286. :a3287 :a3287 :a3287. :a3288 :a3288 :a3288. :a3289 :a3289 :a3289. :a3290 :a3290 :a3290. :a3291 :a3291 :a3291. :a3292 :a3292 :a3292. :a3293 :a3293 :a3293. :a3294 :a3294 :a3294. :a3295 :a3295 :a3295. :a3296 :a3296 :a3296. :a3297 :a3297 :a3297. :a3298 :a3298 :a3298. :a3299 :a3299 :a3299. :a3300 :a3300 :a3300. :a3301 :a3301 :a3301. :a3302 :a3302 :a3302. :a3303 :a3303 :a3303. :a3304 :a3304 :a3304. :a3305 :a3305 :a3305. :a3306 :a3306 :a3306. :a3307 :a3307 :a3307. :a3308 :a3308 :a3308. :a3309 :a3309 :a3309. :a3310 :a3310 :a3310. :a3311 :a3311 :a3311. :a3312 :a3312 :a3312. :a3313 :a3313 :a3313. :a3314 :a3314 :a3314. :a3315 :a3315 :a3315. :a3316 :a3316 :a3316. :a3317 :a3317 :a3317. :a3318 :a3318 :a3318. :a3319 :a3319 :a3319. :a3320 :a3320 :a3320. :a3321 :a3321 :a3321. :a3322 :a3322 :a3322. :a3323 :a3323 :a3323. :a3324 :a3324 :a3324. :a3325 :a3325 :a3325. :a3326 :a3326 :a3326. :a3327 :a3327 :a3327. :a3328 :a3328 :a3328. :a3329 :a3329 :a3329. :a3330 :a3330 :a3330. :a3331 :a3331 :a3331. :a3332 :a3332 :a3332. :a3333 :a3333 :a3333. :a3334 :a3334 :a3334. :a3335 :a3335 :a3335. :a3336 :a3336 :a3336. :a3337 :a3337 :a3337. :a3338 :a3338 :a3338. :a3339 :a3339 :a3339. :a3340 :a3340 :a3340. :a3341 :a3341 :a3341. :a3342 :a3342 :a3342. :a3343 :a3343 :a3343. :a3344 :a3344 :a3344. :a3345 :a3345 :a3345. :a3346 :a3346 :a3346. :a3347 :a3347 :a3347. :a3348 :a3348 :a3348. :a3349 :a3349 :a3349. :a3350 :a3350 :a3350. :a3351 :a3351 :a3351. :a3352 :a3352 :a3352. :a3353 :a3353 :a3353. :a3354 :a3354 :a3354. :a3355 :a3355 :a3355. :a3356 :a3356 :a3356. :a3357 :a3357 :a3357. :a3358 :a3358 :a3358. :a3359 :a3359 :a3359. :a3360 :a3360 :a3360. :a3361 :a3361 :a3361. :a3362 :a3362 :a3362. :a3363 :a3363 :a3363. :a3364 :a3364 :a3364. :a3365 :a3365 :a3365. :a3366 :a3366 :a3366. :a3367 :a3367 :a3367. :a3368 :a3368 :a3368. :a3369 :a3369 :a3369. :a3370 :a3370 :a3370. :a3371 :a3371 :a3371. :a3372 :a3372 :a3372. :a3373 :a3373 :a3373. :a3374 :a3374 :a3374. :a3375 :a3375 :a3375. :a3376 :a3376 :a3376. :a3377 :a3377 :a3377. :a3378 :a3378 :a3378. :a3379 :a3379 :a3379. :a3380 :a3380 :a3380. :a3381 :a3381 :a3381. :a3382 :a3382 :a3382. :a3383 :a3383 :a3383. :a3384 :a3384 :a3384. :a3385 :a3385 :a3385. :a3386 :a3386 :a3386. :a3387 :a3387 :a3387. :a3388 :a3388 :a3388. :a3389 :a3389 :a3389. :a3390 :a3390 :a3390. :a3391 :a3391 :a3391. :a3392 :a3392 :a3392. :a3393 :a3393 :a3393. :a3394 :a3394 :a3394. :a3395 :a3395 :a3395. :a3396 :a3396 :a3396. :a3397 :a3397 :a3397. :a3398 :a3398 :a3398. :a3399 :a3399 :a3399. :a3400 :a3400 :a3400. :a3401 :a3401 :a3401. :a3402 :a3402 :a3402. :a3403 :a3403 :a3403. :a3404 :a3404 :a3404. :a3405 :a3405 :a3405. :a3406 :a3406 :a3406. :a3407 :a3407 :a3407. :a3408 :a3408 :a3408. :a3409 :a3409 :a3409. :a3410 :a3410 :a3410. :a3411 :a3411 :a3411. :a3412 :a3412 :a3412. :a3413 :a3413 :a3413. :a3414 :a3414 :a3414. :a3415 :a3415 :a3415. :a3416 :a3416 :a3416. :a3417 :a3417 :a3417. :a3418 :a3418 :a3418. :a3419 :a3419 :a3419. :a3420 :a3420 :a3420. :a3421 :a3421 :a3421. :a3422 :a3422 :a3422. :a3423 :a3423 :a3423. :a3424 :a3424 :a3424. :a3425 :a3425 :a3425. :a3426 :a3426 :a3426. :a3427 :a3427 :a3427. :a3428 :a3428 :a3428. :a3429 :a3429 :a3429. :a3430 :a3430 :a3430. :a3431 :a3431 :a3431. :a3432 :a3432 :a3432. :a3433 :a3433 :a3433. :a3434 :a3434 :a3434. :a3435 :a3435 :a3435. :a3436 :a3436 :a3436. :a3437 :a3437 :a3437. :a3438 :a3438 :a3438. :a3439 :a3439 :a3439. :a3440 :a3440 :a3440. :a3441 :a3441 :a3441. :a3442 :a3442 :a3442. :a3443 :a3443 :a3443. :a3444 :a3444 :a3444. :a3445 :a3445 :a3445. :a3446 :a3446 :a3446. :a3447 :a3447 :a3447. :a3448 :a3448 :a3448. :a3449 :a3449 :a3449. :a3450 :a3450 :a3450. :a3451 :a3451 :a3451. :a3452 :a3452 :a3452. :a3453 :a3453 :a3453. :a3454 :a3454 :a3454. :a3455 :a3455 :a3455. :a3456 :a3456 :a3456. :a3457 :a3457 :a3457. :a3458 :a3458 :a3458. :a3459 :a3459 :a3459. :a3460 :a3460 :a3460. :a3461 :a3461 :a3461. :a3462 :a3462 :a3462. :a3463 :a3463 :a3463. :a3464 :a3464 :a3464. :a3465 :a3465 :a3465. :a3466 :a3466 :a3466. :a3467 :a3467 :a3467. :a3468 :a3468 :a3468. :a3469 :a3469 :a3469. :a3470 :a3470 :a3470. :a3471 :a3471 :a3471. :a3472 :a3472 :a3472. :a3473 :a3473 :a3473. :a3474 :a3474 :a3474. :a3475 :a3475 :a3475. :a3476 :a3476 :a3476. :a3477 :a3477 :a3477. :a3478 :a3478 :a3478. :a3479 :a3479 :a3479. :a3480 :a3480 :a3480. :a3481 :a3481 :a3481. :a3482 :a3482 :a3482. :a3483 :a3483 :a3483. :a3484 :a3484 :a3484. :a3485 :a3485 :a3485. :a3486 :a3486 :a3486. :a3487 :a3487 :a3487. :a3488 :a3488 :a3488. :a3489 :a3489 :a3489. :a3490 :a3490 :a3490. :a3491 :a3491 :a3491. :a3492 :a3492 :a3492. :a3493 :a3493 :a3493. :a3494 :a3494 :a3494. :a3495 :a3495 :a3495. :a3496 :a3496 :a3496. :a3497 :a3497 :a3497. :a3498 :a3498 :a3498. :a3499 :a3499 :a3499. :a3500 :a3500 :a3500. :a3501 :a3501 :a3501. :a3502 :a3502 :a3502. :a3503 :a3503 :a3503. :a3504 :a3504 :a3504. :a3505 :a3505 :a3505. :a3506 :a3506 :a3506. :a3507 :a3507 :a3507. :a3508 :a3508 :a3508. :a3509 :a3509 :a3509. :a3510 :a3510 :a3510. :a3511 :a3511 :a3511. :a3512 :a3512 :a3512. :a3513 :a3513 :a3513. :a3514 :a3514 :a3514. :a3515 :a3515 :a3515. :a3516 :a3516 :a3516. :a3517 :a3517 :a3517. :a3518 :a3518 :a3518. :a3519 :a3519 :a3519. :a3520 :a3520 :a3520. :a3521 :a3521 :a3521. :a3522 :a3522 :a3522. :a3523 :a3523 :a3523. :a3524 :a3524 :a3524. :a3525 :a3525 :a3525. :a3526 :a3526 :a3526. :a3527 :a3527 :a3527. :a3528 :a3528 :a3528. :a3529 :a3529 :a3529. :a3530 :a3530 :a3530. :a3531 :a3531 :a3531. :a3532 :a3532 :a3532. :a3533 :a3533 :a3533. :a3534 :a3534 :a3534. :a3535 :a3535 :a3535. :a3536 :a3536 :a3536. :a3537 :a3537 :a3537. :a3538 :a3538 :a3538. :a3539 :a3539 :a3539. :a3540 :a3540 :a3540. :a3541 :a3541 :a3541. :a3542 :a3542 :a3542. :a3543 :a3543 :a3543. :a3544 :a3544 :a3544. :a3545 :a3545 :a3545. :a3546 :a3546 :a3546. :a3547 :a3547 :a3547. :a3548 :a3548 :a3548. :a3549 :a3549 :a3549. :a3550 :a3550 :a3550. :a3551 :a3551 :a3551. :a3552 :a3552 :a3552. :a3553 :a3553 :a3553. :a3554 :a3554 :a3554. :a3555 :a3555 :a3555. :a3556 :a3556 :a3556. :a3557 :a3557 :a3557. :a3558 :a3558 :a3558. :a3559 :a3559 :a3559. :a3560 :a3560 :a3560. :a3561 :a3561 :a3561. :a3562 :a3562 :a3562. :a3563 :a3563 :a3563. :a3564 :a3564 :a3564. :a3565 :a3565 :a3565. :a3566 :a3566 :a3566. :a3567 :a3567 :a3567. :a3568 :a3568 :a3568. :a3569 :a3569 :a3569. :a3570 :a3570 :a3570. :a3571 :a3571 :a3571. :a3572 :a3572 :a3572. :a3573 :a3573 :a3573. :a3574 :a3574 :a3574. :a3575 :a3575 :a3575. :a3576 :a3576 :a3576. :a3577 :a3577 :a3577. :a3578 :a3578 :a3578. :a3579 :a3579 :a3579. :a3580 :a3580 :a3580. :a3581 :a3581 :a3581. :a3582 :a3582 :a3582. :a3583 :a3583 :a3583. :a3584 :a3584 :a3584. :a3585 :a3585 :a3585. :a3586 :a3586 :a3586. :a3587 :a3587 :a3587. :a3588 :a3588 :a3588. :a3589 :a3589 :a3589. :a3590 :a3590 :a3590. :a3591 :a3591 :a3591. :a3592 :a3592 :a3592. :a3593 :a3593 :a3593. :a3594 :a3594 :a3594. :a3595 :a3595 :a3595. :a3596 :a3596 :a3596. :a3597 :a3597 :a3597. :a3598 :a3598 :a3598. :a3599 :a3599 :a3599. :a3600 :a3600 :a3600. :a3601 :a3601 :a3601. :a3602 :a3602 :a3602. :a3603 :a3603 :a3603. :a3604 :a3604 :a3604. :a3605 :a3605 :a3605. :a3606 :a3606 :a3606. :a3607 :a3607 :a3607. :a3608 :a3608 :a3608. :a3609 :a3609 :a3609. :a3610 :a3610 :a3610. :a3611 :a3611 :a3611. :a3612 :a3612 :a3612. :a3613 :a3613 :a3613. :a3614 :a3614 :a3614. :a3615 :a3615 :a3615. :a3616 :a3616 :a3616. :a3617 :a3617 :a3617. :a3618 :a3618 :a3618. :a3619 :a3619 :a3619. :a3620 :a3620 :a3620. :a3621 :a3621 :a3621. :a3622 :a3622 :a3622. :a3623 :a3623 :a3623. :a3624 :a3624 :a3624. :a3625 :a3625 :a3625. :a3626 :a3626 :a3626. :a3627 :a3627 :a3627. :a3628 :a3628 :a3628. :a3629 :a3629 :a3629. :a3630 :a3630 :a3630. :a3631 :a3631 :a3631. :a3632 :a3632 :a3632. :a3633 :a3633 :a3633. :a3634 :a3634 :a3634. :a3635 :a3635 :a3635. :a3636 :a3636 :a3636. :a3637 :a3637 :a3637. :a3638 :a3638 :a3638. :a3639 :a3639 :a3639. :a3640 :a3640 :a3640. :a3641 :a3641 :a3641. :a3642 :a3642 :a3642. :a3643 :a3643 :a3643. :a3644 :a3644 :a3644. :a3645 :a3645 :a3645. :a3646 :a3646 :a3646. :a3647 :a3647 :a3647. :a3648 :a3648 :a3648. :a3649 :a3649 :a3649. :a3650 :a3650 :a3650. :a3651 :a3651 :a3651. :a3652 :a3652 :a3652. :a3653 :a3653 :a3653. :a3654 :a3654 :a3654. :a3655 :a3655 :a3655. :a3656 :a3656 :a3656. :a3657 :a3657 :a3657. :a3658 :a3658 :a3658. :a3659 :a3659 :a3659. :a3660 :a3660 :a3660. :a3661 :a3661 :a3661. :a3662 :a3662 :a3662. :a3663 :a3663 :a3663. :a3664 :a3664 :a3664. :a3665 :a3665 :a3665. :a3666 :a3666 :a3666. :a3667 :a3667 :a3667. :a3668 :a3668 :a3668. :a3669 :a3669 :a3669. :a3670 :a3670 :a3670. :a3671 :a3671 :a3671. :a3672 :a3672 :a3672. :a3673 :a3673 :a3673. :a3674 :a3674 :a3674. :a3675 :a3675 :a3675. :a3676 :a3676 :a3676. :a3677 :a3677 :a3677. :a3678 :a3678 :a3678. :a3679 :a3679 :a3679. :a3680 :a3680 :a3680. :a3681 :a3681 :a3681. :a3682 :a3682 :a3682. :a3683 :a3683 :a3683. :a3684 :a3684 :a3684. :a3685 :a3685 :a3685. :a3686 :a3686 :a3686. :a3687 :a3687 :a3687. :a3688 :a3688 :a3688. :a3689 :a3689 :a3689. :a3690 :a3690 :a3690. :a3691 :a3691 :a3691. :a3692 :a3692 :a3692. :a3693 :a3693 :a3693. :a3694 :a3694 :a3694. :a3695 :a3695 :a3695. :a3696 :a3696 :a3696. :a3697 :a3697 :a3697. :a3698 :a3698 :a3698. :a3699 :a3699 :a3699. :a3700 :a3700 :a3700. :a3701 :a3701 :a3701. :a3702 :a3702 :a3702. :a3703 :a3703 :a3703. :a3704 :a3704 :a3704. :a3705 :a3705 :a3705. :a3706 :a3706 :a3706. :a3707 :a3707 :a3707. :a3708 :a3708 :a3708. :a3709 :a3709 :a3709. :a3710 :a3710 :a3710. :a3711 :a3711 :a3711. :a3712 :a3712 :a3712. :a3713 :a3713 :a3713. :a3714 :a3714 :a3714. :a3715 :a3715 :a3715. :a3716 :a3716 :a3716. :a3717 :a3717 :a3717. :a3718 :a3718 :a3718. :a3719 :a3719 :a3719. :a3720 :a3720 :a3720. :a3721 :a3721 :a3721. :a3722 :a3722 :a3722. :a3723 :a3723 :a3723. :a3724 :a3724 :a3724. :a3725 :a3725 :a3725. :a3726 :a3726 :a3726. :a3727 :a3727 :a3727. :a3728 :a3728 :a3728. :a3729 :a3729 :a3729. :a3730 :a3730 :a3730. :a3731 :a3731 :a3731. :a3732 :a3732 :a3732. :a3733 :a3733 :a3733. :a3734 :a3734 :a3734. :a3735 :a3735 :a3735. :a3736 :a3736 :a3736. :a3737 :a3737 :a3737. :a3738 :a3738 :a3738. :a3739 :a3739 :a3739. :a3740 :a3740 :a3740. :a3741 :a3741 :a3741. :a3742 :a3742 :a3742. :a3743 :a3743 :a3743. :a3744 :a3744 :a3744. :a3745 :a3745 :a3745. :a3746 :a3746 :a3746. :a3747 :a3747 :a3747. :a3748 :a3748 :a3748. :a3749 :a3749 :a3749. :a3750 :a3750 :a3750. :a3751 :a3751 :a3751. :a3752 :a3752 :a3752. :a3753 :a3753 :a3753. :a3754 :a3754 :a3754. :a3755 :a3755 :a3755. :a3756 :a3756 :a3756. :a3757 :a3757 :a3757. :a3758 :a3758 :a3758. :a3759 :a3759 :a3759. :a3760 :a3760 :a3760. :a3761 :a3761 :a3761. :a3762 :a3762 :a3762. :a3763 :a3763 :a3763. :a3764 :a3764 :a3764. :a3765 :a3765 :a3765. :a3766 :a3766 :a3766. :a3767 :a3767 :a3767. :a3768 :a3768 :a3768. :a3769 :a3769 :a3769. :a3770 :a3770 :a3770. :a3771 :a3771 :a3771. :a3772 :a3772 :a3772. :a3773 :a3773 :a3773. :a3774 :a3774 :a3774. :a3775 :a3775 :a3775. :a3776 :a3776 :a3776. :a3777 :a3777 :a3777. :a3778 :a3778 :a3778. :a3779 :a3779 :a3779. :a3780 :a3780 :a3780. :a3781 :a3781 :a3781. :a3782 :a3782 :a3782. :a3783 :a3783 :a3783. :a3784 :a3784 :a3784. :a3785 :a3785 :a3785. :a3786 :a3786 :a3786. :a3787 :a3787 :a3787. :a3788 :a3788 :a3788. :a3789 :a3789 :a3789. :a3790 :a3790 :a3790. :a3791 :a3791 :a3791. :a3792 :a3792 :a3792. :a3793 :a3793 :a3793. :a3794 :a3794 :a3794. :a3795 :a3795 :a3795. :a3796 :a3796 :a3796. :a3797 :a3797 :a3797. :a3798 :a3798 :a3798. :a3799 :a3799 :a3799. :a3800 :a3800 :a3800. :a3801 :a3801 :a3801. :a3802 :a3802 :a3802. :a3803 :a3803 :a3803. :a3804 :a3804 :a3804. :a3805 :a3805 :a3805. :a3806 :a3806 :a3806. :a3807 :a3807 :a3807. :a3808 :a3808 :a3808. :a3809 :a3809 :a3809. :a3810 :a3810 :a3810. :a3811 :a3811 :a3811. :a3812 :a3812 :a3812. :a3813 :a3813 :a3813. :a3814 :a3814 :a3814. :a3815 :a3815 :a3815. :a3816 :a3816 :a3816. :a3817 :a3817 :a3817. :a3818 :a3818 :a3818. :a3819 :a3819 :a3819. :a3820 :a3820 :a3820. :a3821 :a3821 :a3821. :a3822 :a3822 :a3822. :a3823 :a3823 :a3823. :a3824 :a3824 :a3824. :a3825 :a3825 :a3825. :a3826 :a3826 :a3826. :a3827 :a3827 :a3827. :a3828 :a3828 :a3828. :a3829 :a3829 :a3829. :a3830 :a3830 :a3830. :a3831 :a3831 :a3831. :a3832 :a3832 :a3832. :a3833 :a3833 :a3833. :a3834 :a3834 :a3834. :a3835 :a3835 :a3835. :a3836 :a3836 :a3836. :a3837 :a3837 :a3837. :a3838 :a3838 :a3838. :a3839 :a3839 :a3839. :a3840 :a3840 :a3840. :a3841 :a3841 :a3841. :a3842 :a3842 :a3842. :a3843 :a3843 :a3843. :a3844 :a3844 :a3844. :a3845 :a3845 :a3845. :a3846 :a3846 :a3846. :a3847 :a3847 :a3847. :a3848 :a3848 :a3848. :a3849 :a3849 :a3849. :a3850 :a3850 :a3850. :a3851 :a3851 :a3851. :a3852 :a3852 :a3852. :a3853 :a3853 :a3853. :a3854 :a3854 :a3854. :a3855 :a3855 :a3855. :a3856 :a3856 :a3856. :a3857 :a3857 :a3857. :a3858 :a3858 :a3858. :a3859 :a3859 :a3859. :a3860 :a3860 :a3860. :a3861 :a3861 :a3861. :a3862 :a3862 :a3862. :a3863 :a3863 :a3863. :a3864 :a3864 :a3864. :a3865 :a3865 :a3865. :a3866 :a3866 :a3866. :a3867 :a3867 :a3867. :a3868 :a3868 :a3868. :a3869 :a3869 :a3869. :a3870 :a3870 :a3870. :a3871 :a3871 :a3871. :a3872 :a3872 :a3872. :a3873 :a3873 :a3873. :a3874 :a3874 :a3874. :a3875 :a3875 :a3875. :a3876 :a3876 :a3876. :a3877 :a3877 :a3877. :a3878 :a3878 :a3878. :a3879 :a3879 :a3879. :a3880 :a3880 :a3880. :a3881 :a3881 :a3881. :a3882 :a3882 :a3882. :a3883 :a3883 :a3883. :a3884 :a3884 :a3884. :a3885 :a3885 :a3885. :a3886 :a3886 :a3886. :a3887 :a3887 :a3887. :a3888 :a3888 :a3888. :a3889 :a3889 :a3889. :a3890 :a3890 :a3890. :a3891 :a3891 :a3891. :a3892 :a3892 :a3892. :a3893 :a3893 :a3893. :a3894 :a3894 :a3894. :a3895 :a3895 :a3895. :a3896 :a3896 :a3896. :a3897 :a3897 :a3897. :a3898 :a3898 :a3898. :a3899 :a3899 :a3899. :a3900 :a3900 :a3900. :a3901 :a3901 :a3901. :a3902 :a3902 :a3902. :a3903 :a3903 :a3903. :a3904 :a3904 :a3904. :a3905 :a3905 :a3905. :a3906 :a3906 :a3906. :a3907 :a3907 :a3907. :a3908 :a3908 :a3908. :a3909 :a3909 :a3909. :a3910 :a3910 :a3910. :a3911 :a3911 :a3911. :a3912 :a3912 :a3912. :a3913 :a3913 :a3913. :a3914 :a3914 :a3914. :a3915 :a3915 :a3915. :a3916 :a3916 :a3916. :a3917 :a3917 :a3917. :a3918 :a3918 :a3918. :a3919 :a3919 :a3919. :a3920 :a3920 :a3920. :a3921 :a3921 :a3921. :a3922 :a3922 :a3922. :a3923 :a3923 :a3923. :a3924 :a3924 :a3924. :a3925 :a3925 :a3925. :a3926 :a3926 :a3926. :a3927 :a3927 :a3927. :a3928 :a3928 :a3928. :a3929 :a3929 :a3929. :a3930 :a3930 :a3930. :a3931 :a3931 :a3931. :a3932 :a3932 :a3932. :a3933 :a3933 :a3933. :a3934 :a3934 :a3934. :a3935 :a3935 :a3935. :a3936 :a3936 :a3936. :a3937 :a3937 :a3937. :a3938 :a3938 :a3938. :a3939 :a3939 :a3939. :a3940 :a3940 :a3940. :a3941 :a3941 :a3941. :a3942 :a3942 :a3942. :a3943 :a3943 :a3943. :a3944 :a3944 :a3944. :a3945 :a3945 :a3945. :a3946 :a3946 :a3946. :a3947 :a3947 :a3947. :a3948 :a3948 :a3948. :a3949 :a3949 :a3949. :a3950 :a3950 :a3950. :a3951 :a3951 :a3951. :a3952 :a3952 :a3952. :a3953 :a3953 :a3953. :a3954 :a3954 :a3954. :a3955 :a3955 :a3955. :a3956 :a3956 :a3956. :a3957 :a3957 :a3957. :a3958 :a3958 :a3958. :a3959 :a3959 :a3959. :a3960 :a3960 :a3960. :a3961 :a3961 :a3961. :a3962 :a3962 :a3962. :a3963 :a3963 :a3963. :a3964 :a3964 :a3964. :a3965 :a3965 :a3965. :a3966 :a3966 :a3966. :a3967 :a3967 :a3967. :a3968 :a3968 :a3968. :a3969 :a3969 :a3969. :a3970 :a3970 :a3970. :a3971 :a3971 :a3971. :a3972 :a3972 :a3972. :a3973 :a3973 :a3973. :a3974 :a3974 :a3974. :a3975 :a3975 :a3975. :a3976 :a3976 :a3976. :a3977 :a3977 :a3977. :a3978 :a3978 :a3978. :a3979 :a3979 :a3979. :a3980 :a3980 :a3980. :a3981 :a3981 :a3981. :a3982 :a3982 :a3982. :a3983 :a3983 :a3983. :a3984 :a3984 :a3984. :a3985 :a3985 :a3985. :a3986 :a3986 :a3986. :a3987 :a3987 :a3987. :a3988 :a3988 :a3988. :a3989 :a3989 :a3989. :a3990 :a3990 :a3990. :a3991 :a3991 :a3991. :a3992 :a3992 :a3992. :a3993 :a3993 :a3993. :a3994 :a3994 :a3994. :a3995 :a3995 :a3995. :a3996 :a3996 :a3996. :a3997 :a3997 :a3997. :a3998 :a3998 :a3998. :a3999 :a3999 :a3999. :a4000 :a4000 :a4000. :a4001 :a4001 :a4001. :a4002 :a4002 :a4002. :a4003 :a4003 :a4003. :a4004 :a4004 :a4004. :a4005 :a4005 :a4005. :a4006 :a4006 :a4006. :a4007 :a4007 :a4007. :a4008 :a4008 :a4008. :a4009 :a4009 :a4009. :a4010 :a4010 :a4010. :a4011 :a4011 :a4011. :a4012 :a4012 :a4012. :a4013 :a4013 :a4013. :a4014 :a4014 :a4014. :a4015 :a4015 :a4015. :a4016 :a4016 :a4016. :a4017 :a4017 :a4017. :a4018 :a4018 :a4018. :a4019 :a4019 :a4019. :a4020 :a4020 :a4020. :a4021 :a4021 :a4021. :a4022 :a4022 :a4022. :a4023 :a4023 :a4023. :a4024 :a4024 :a4024. :a4025 :a4025 :a4025. :a4026 :a4026 :a4026. :a4027 :a4027 :a4027. :a4028 :a4028 :a4028. :a4029 :a4029 :a4029. :a4030 :a4030 :a4030. :a4031 :a4031 :a4031. :a4032 :a4032 :a4032. :a4033 :a4033 :a4033. :a4034 :a4034 :a4034. :a4035 :a4035 :a4035. :a4036 :a4036 :a4036. :a4037 :a4037 :a4037. :a4038 :a4038 :a4038. :a4039 :a4039 :a4039. :a4040 :a4040 :a4040. :a4041 :a4041 :a4041. :a4042 :a4042 :a4042. :a4043 :a4043 :a4043. :a4044 :a4044 :a4044. :a4045 :a4045 :a4045. :a4046 :a4046 :a4046. :a4047 :a4047 :a4047. :a4048 :a4048 :a4048. :a4049 :a4049 :a4049. :a4050 :a4050 :a4050. :a4051 :a4051 :a4051. :a4052 :a4052 :a4052. :a4053 :a4053 :a4053. :a4054 :a4054 :a4054. :a4055 :a4055 :a4055. :a4056 :a4056 :a4056. :a4057 :a4057 :a4057. :a4058 :a4058 :a4058. :a4059 :a4059 :a4059. :a4060 :a4060 :a4060. :a4061 :a4061 :a4061. :a4062 :a4062 :a4062. :a4063 :a4063 :a4063. :a4064 :a4064 :a4064. :a4065 :a4065 :a4065. :a4066 :a4066 :a4066. :a4067 :a4067 :a4067. :a4068 :a4068 :a4068. :a4069 :a4069 :a4069. :a4070 :a4070 :a4070. :a4071 :a4071 :a4071. :a4072 :a4072 :a4072. :a4073 :a4073 :a4073. :a4074 :a4074 :a4074. :a4075 :a4075 :a4075. :a4076 :a4076 :a4076. :a4077 :a4077 :a4077. :a4078 :a4078 :a4078. :a4079 :a4079 :a4079. :a4080 :a4080 :a4080. :a4081 :a4081 :a4081. :a4082 :a4082 :a4082. :a4083 :a4083 :a4083. :a4084 :a4084 :a4084. :a4085 :a4085 :a4085. :a4086 :a4086 :a4086. :a4087 :a4087 :a4087. :a4088 :a4088 :a4088. :a4089 :a4089 :a4089. :a4090 :a4090 :a4090. :a4091 :a4091 :a4091. :a4092 :a4092 :a4092. :a4093 :a4093 :a4093. :a4094 :a4094 :a4094. :a4095 :a4095 :a4095. :a4096 :a4096 :a4096. :a4097 :a4097 :a4097. :a4098 :a4098 :a4098. :a4099 :a4099 :a4099. :a4100 :a4100 :a4100. :a4101 :a4101 :a4101. :a4102 :a4102 :a4102. :a4103 :a4103 :a4103. :a4104 :a4104 :a4104. :a4105 :a4105 :a4105. :a4106 :a4106 :a4106. :a4107 :a4107 :a4107. :a4108 :a4108 :a4108. :a4109 :a4109 :a4109. :a4110 :a4110 :a4110. :a4111 :a4111 :a4111. :a4112 :a4112 :a4112. :a4113 :a4113 :a4113. :a4114 :a4114 :a4114. :a4115 :a4115 :a4115. :a4116 :a4116 :a4116. :a4117 :a4117 :a4117. :a4118 :a4118 :a4118. :a4119 :a4119 :a4119. :a4120 :a4120 :a4120. :a4121 :a4121 :a4121. :a4122 :a4122 :a4122. :a4123 :a4123 :a4123. :a4124 :a4124 :a4124. :a4125 :a4125 :a4125. :a4126 :a4126 :a4126. :a4127 :a4127 :a4127. :a4128 :a4128 :a4128. :a4129 :a4129 :a4129. :a4130 :a4130 :a4130. :a4131 :a4131 :a4131. :a4132 :a4132 :a4132. :a4133 :a4133 :a4133. :a4134 :a4134 :a4134. :a4135 :a4135 :a4135. :a4136 :a4136 :a4136. :a4137 :a4137 :a4137. :a4138 :a4138 :a4138. :a4139 :a4139 :a4139. :a4140 :a4140 :a4140. :a4141 :a4141 :a4141. :a4142 :a4142 :a4142. :a4143 :a4143 :a4143. :a4144 :a4144 :a4144. :a4145 :a4145 :a4145. :a4146 :a4146 :a4146. :a4147 :a4147 :a4147. :a4148 :a4148 :a4148. :a4149 :a4149 :a4149. :a4150 :a4150 :a4150. :a4151 :a4151 :a4151. :a4152 :a4152 :a4152. :a4153 :a4153 :a4153. :a4154 :a4154 :a4154. :a4155 :a4155 :a4155. :a4156 :a4156 :a4156. :a4157 :a4157 :a4157. :a4158 :a4158 :a4158. :a4159 :a4159 :a4159. :a4160 :a4160 :a4160. :a4161 :a4161 :a4161. :a4162 :a4162 :a4162. :a4163 :a4163 :a4163. :a4164 :a4164 :a4164. :a4165 :a4165 :a4165. :a4166 :a4166 :a4166. :a4167 :a4167 :a4167. :a4168 :a4168 :a4168. :a4169 :a4169 :a4169. :a4170 :a4170 :a4170. :a4171 :a4171 :a4171. :a4172 :a4172 :a4172. :a4173 :a4173 :a4173. :a4174 :a4174 :a4174. :a4175 :a4175 :a4175. :a4176 :a4176 :a4176. :a4177 :a4177 :a4177. :a4178 :a4178 :a4178. :a4179 :a4179 :a4179. :a4180 :a4180 :a4180. :a4181 :a4181 :a4181. :a4182 :a4182 :a4182. :a4183 :a4183 :a4183. :a4184 :a4184 :a4184. :a4185 :a4185 :a4185. :a4186 :a4186 :a4186. :a4187 :a4187 :a4187. :a4188 :a4188 :a4188. :a4189 :a4189 :a4189. :a4190 :a4190 :a4190. :a4191 :a4191 :a4191. :a4192 :a4192 :a4192. :a4193 :a4193 :a4193. :a4194 :a4194 :a4194. :a4195 :a4195 :a4195. :a4196 :a4196 :a4196. :a4197 :a4197 :a4197. :a4198 :a4198 :a4198. :a4199 :a4199 :a4199. :a4200 :a4200 :a4200. :a4201 :a4201 :a4201. :a4202 :a4202 :a4202. :a4203 :a4203 :a4203. :a4204 :a4204 :a4204. :a4205 :a4205 :a4205. :a4206 :a4206 :a4206. :a4207 :a4207 :a4207. :a4208 :a4208 :a4208. :a4209 :a4209 :a4209. :a4210 :a4210 :a4210. :a4211 :a4211 :a4211. :a4212 :a4212 :a4212. :a4213 :a4213 :a4213. :a4214 :a4214 :a4214. :a4215 :a4215 :a4215. :a4216 :a4216 :a4216. :a4217 :a4217 :a4217. :a4218 :a4218 :a4218. :a4219 :a4219 :a4219. :a4220 :a4220 :a4220. :a4221 :a4221 :a4221. :a4222 :a4222 :a4222. :a4223 :a4223 :a4223. :a4224 :a4224 :a4224. :a4225 :a4225 :a4225. :a4226 :a4226 :a4226. :a4227 :a4227 :a4227. :a4228 :a4228 :a4228. :a4229 :a4229 :a4229. :a4230 :a4230 :a4230. :a4231 :a4231 :a4231. :a4232 :a4232 :a4232. :a4233 :a4233 :a4233. :a4234 :a4234 :a4234. :a4235 :a4235 :a4235. :a4236 :a4236 :a4236. :a4237 :a4237 :a4237. :a4238 :a4238 :a4238. :a4239 :a4239 :a4239. :a4240 :a4240 :a4240. :a4241 :a4241 :a4241. :a4242 :a4242 :a4242. :a4243 :a4243 :a4243. :a4244 :a4244 :a4244. :a4245 :a4245 :a4245. :a4246 :a4246 :a4246. :a4247 :a4247 :a4247. :a4248 :a4248 :a4248. :a4249 :a4249 :a4249. :a4250 :a4250 :a4250. :a4251 :a4251 :a4251. :a4252 :a4252 :a4252. :a4253 :a4253 :a4253. :a4254 :a4254 :a4254. :a4255 :a4255 :a4255. :a4256 :a4256 :a4256. :a4257 :a4257 :a4257. :a4258 :a4258 :a4258. :a4259 :a4259 :a4259. :a4260 :a4260 :a4260. :a4261 :a4261 :a4261. :a4262 :a4262 :a4262. :a4263 :a4263 :a4263. :a4264 :a4264 :a4264. :a4265 :a4265 :a4265. :a4266 :a4266 :a4266. :a4267 :a4267 :a4267. :a4268 :a4268 :a4268. :a4269 :a4269 :a4269. :a4270 :a4270 :a4270. :a4271 :a4271 :a4271. :a4272 :a4272 :a4272. :a4273 :a4273 :a4273. :a4274 :a4274 :a4274. :a4275 :a4275 :a4275. :a4276 :a4276 :a4276. :a4277 :a4277 :a4277. :a4278 :a4278 :a4278. :a4279 :a4279 :a4279. :a4280 :a4280 :a4280. :a4281 :a4281 :a4281. :a4282 :a4282 :a4282. :a4283 :a4283 :a4283. :a4284 :a4284 :a4284. :a4285 :a4285 :a4285. :a4286 :a4286 :a4286. :a4287 :a4287 :a4287. :a4288 :a4288 :a4288. :a4289 :a4289 :a4289. :a4290 :a4290 :a4290. :a4291 :a4291 :a4291. :a4292 :a4292 :a4292. :a4293 :a4293 :a4293. :a4294 :a4294 :a4294. :a4295 :a4295 :a4295. :a4296 :a4296 :a4296. :a4297 :a4297 :a4297. :a4298 :a4298 :a4298. :a4299 :a4299 :a4299. :a4300 :a4300 :a4300. :a4301 :a4301 :a4301. :a4302 :a4302 :a4302. :a4303 :a4303 :a4303. :a4304 :a4304 :a4304. :a4305 :a4305 :a4305. :a4306 :a4306 :a4306. :a4307 :a4307 :a4307. :a4308 :a4308 :a4308. :a4309 :a4309 :a4309. :a4310 :a4310 :a4310. :a4311 :a4311 :a4311. :a4312 :a4312 :a4312. :a4313 :a4313 :a4313. :a4314 :a4314 :a4314. :a4315 :a4315 :a4315. :a4316 :a4316 :a4316. :a4317 :a4317 :a4317. :a4318 :a4318 :a4318. :a4319 :a4319 :a4319. :a4320 :a4320 :a4320. :a4321 :a4321 :a4321. :a4322 :a4322 :a4322. :a4323 :a4323 :a4323. :a4324 :a4324 :a4324. :a4325 :a4325 :a4325. :a4326 :a4326 :a4326. :a4327 :a4327 :a4327. :a4328 :a4328 :a4328. :a4329 :a4329 :a4329. :a4330 :a4330 :a4330. :a4331 :a4331 :a4331. :a4332 :a4332 :a4332. :a4333 :a4333 :a4333. :a4334 :a4334 :a4334. :a4335 :a4335 :a4335. :a4336 :a4336 :a4336. :a4337 :a4337 :a4337. :a4338 :a4338 :a4338. :a4339 :a4339 :a4339. :a4340 :a4340 :a4340. :a4341 :a4341 :a4341. :a4342 :a4342 :a4342. :a4343 :a4343 :a4343. :a4344 :a4344 :a4344. :a4345 :a4345 :a4345. :a4346 :a4346 :a4346. :a4347 :a4347 :a4347. :a4348 :a4348 :a4348. :a4349 :a4349 :a4349. :a4350 :a4350 :a4350. :a4351 :a4351 :a4351. :a4352 :a4352 :a4352. :a4353 :a4353 :a4353. :a4354 :a4354 :a4354. :a4355 :a4355 :a4355. :a4356 :a4356 :a4356. :a4357 :a4357 :a4357. :a4358 :a4358 :a4358. :a4359 :a4359 :a4359. :a4360 :a4360 :a4360. :a4361 :a4361 :a4361. :a4362 :a4362 :a4362. :a4363 :a4363 :a4363. :a4364 :a4364 :a4364. :a4365 :a4365 :a4365. :a4366 :a4366 :a4366. :a4367 :a4367 :a4367. :a4368 :a4368 :a4368. :a4369 :a4369 :a4369. :a4370 :a4370 :a4370. :a4371 :a4371 :a4371. :a4372 :a4372 :a4372. :a4373 :a4373 :a4373. :a4374 :a4374 :a4374. :a4375 :a4375 :a4375. :a4376 :a4376 :a4376. :a4377 :a4377 :a4377. :a4378 :a4378 :a4378. :a4379 :a4379 :a4379. :a4380 :a4380 :a4380. :a4381 :a4381 :a4381. :a4382 :a4382 :a4382. :a4383 :a4383 :a4383. :a4384 :a4384 :a4384. :a4385 :a4385 :a4385. :a4386 :a4386 :a4386. :a4387 :a4387 :a4387. :a4388 :a4388 :a4388. :a4389 :a4389 :a4389. :a4390 :a4390 :a4390. :a4391 :a4391 :a4391. :a4392 :a4392 :a4392. :a4393 :a4393 :a4393. :a4394 :a4394 :a4394. :a4395 :a4395 :a4395. :a4396 :a4396 :a4396. :a4397 :a4397 :a4397. :a4398 :a4398 :a4398. :a4399 :a4399 :a4399. :a4400 :a4400 :a4400. :a4401 :a4401 :a4401. :a4402 :a4402 :a4402. :a4403 :a4403 :a4403. :a4404 :a4404 :a4404. :a4405 :a4405 :a4405. :a4406 :a4406 :a4406. :a4407 :a4407 :a4407. :a4408 :a4408 :a4408. :a4409 :a4409 :a4409. :a4410 :a4410 :a4410. :a4411 :a4411 :a4411. :a4412 :a4412 :a4412. :a4413 :a4413 :a4413. :a4414 :a4414 :a4414. :a4415 :a4415 :a4415. :a4416 :a4416 :a4416. :a4417 :a4417 :a4417. :a4418 :a4418 :a4418. :a4419 :a4419 :a4419. :a4420 :a4420 :a4420. :a4421 :a4421 :a4421. :a4422 :a4422 :a4422. :a4423 :a4423 :a4423. :a4424 :a4424 :a4424. :a4425 :a4425 :a4425. :a4426 :a4426 :a4426. :a4427 :a4427 :a4427. :a4428 :a4428 :a4428. :a4429 :a4429 :a4429. :a4430 :a4430 :a4430. :a4431 :a4431 :a4431. :a4432 :a4432 :a4432. :a4433 :a4433 :a4433. :a4434 :a4434 :a4434. :a4435 :a4435 :a4435. :a4436 :a4436 :a4436. :a4437 :a4437 :a4437. :a4438 :a4438 :a4438. :a4439 :a4439 :a4439. :a4440 :a4440 :a4440. :a4441 :a4441 :a4441. :a4442 :a4442 :a4442. :a4443 :a4443 :a4443. :a4444 :a4444 :a4444. :a4445 :a4445 :a4445. :a4446 :a4446 :a4446. :a4447 :a4447 :a4447. :a4448 :a4448 :a4448. :a4449 :a4449 :a4449. :a4450 :a4450 :a4450. :a4451 :a4451 :a4451. :a4452 :a4452 :a4452. :a4453 :a4453 :a4453. :a4454 :a4454 :a4454. :a4455 :a4455 :a4455. :a4456 :a4456 :a4456. :a4457 :a4457 :a4457. :a4458 :a4458 :a4458. :a4459 :a4459 :a4459. :a4460 :a4460 :a4460. :a4461 :a4461 :a4461. :a4462 :a4462 :a4462. :a4463 :a4463 :a4463. :a4464 :a4464 :a4464. :a4465 :a4465 :a4465. :a4466 :a4466 :a4466. :a4467 :a4467 :a4467. :a4468 :a4468 :a4468. :a4469 :a4469 :a4469. :a4470 :a4470 :a4470. :a4471 :a4471 :a4471. :a4472 :a4472 :a4472. :a4473 :a4473 :a4473. :a4474 :a4474 :a4474. :a4475 :a4475 :a4475. :a4476 :a4476 :a4476. :a4477 :a4477 :a4477. :a4478 :a4478 :a4478. :a4479 :a4479 :a4479. :a4480 :a4480 :a4480. :a4481 :a4481 :a4481. :a4482 :a4482 :a4482. :a4483 :a4483 :a4483. :a4484 :a4484 :a4484. :a4485 :a4485 :a4485. :a4486 :a4486 :a4486. :a4487 :a4487 :a4487. :a4488 :a4488 :a4488. :a4489 :a4489 :a4489. :a4490 :a4490 :a4490. :a4491 :a4491 :a4491. :a4492 :a4492 :a4492. :a4493 :a4493 :a4493. :a4494 :a4494 :a4494. :a4495 :a4495 :a4495. :a4496 :a4496 :a4496. :a4497 :a4497 :a4497. :a4498 :a4498 :a4498. :a4499 :a4499 :a4499. :a4500 :a4500 :a4500. :a4501 :a4501 :a4501. :a4502 :a4502 :a4502. :a4503 :a4503 :a4503. :a4504 :a4504 :a4504. :a4505 :a4505 :a4505. :a4506 :a4506 :a4506. :a4507 :a4507 :a4507. :a4508 :a4508 :a4508. :a4509 :a4509 :a4509. :a4510 :a4510 :a4510. :a4511 :a4511 :a4511. :a4512 :a4512 :a4512. :a4513 :a4513 :a4513. :a4514 :a4514 :a4514. :a4515 :a4515 :a4515. :a4516 :a4516 :a4516. :a4517 :a4517 :a4517. :a4518 :a4518 :a4518. :a4519 :a4519 :a4519. :a4520 :a4520 :a4520. :a4521 :a4521 :a4521. :a4522 :a4522 :a4522. :a4523 :a4523 :a4523. :a4524 :a4524 :a4524. :a4525 :a4525 :a4525. :a4526 :a4526 :a4526. :a4527 :a4527 :a4527. :a4528 :a4528 :a4528. :a4529 :a4529 :a4529. :a4530 :a4530 :a4530. :a4531 :a4531 :a4531. :a4532 :a4532 :a4532. :a4533 :a4533 :a4533. :a4534 :a4534 :a4534. :a4535 :a4535 :a4535. :a4536 :a4536 :a4536. :a4537 :a4537 :a4537. :a4538 :a4538 :a4538. :a4539 :a4539 :a4539. :a4540 :a4540 :a4540. :a4541 :a4541 :a4541. :a4542 :a4542 :a4542. :a4543 :a4543 :a4543. :a4544 :a4544 :a4544. :a4545 :a4545 :a4545. :a4546 :a4546 :a4546. :a4547 :a4547 :a4547. :a4548 :a4548 :a4548. :a4549 :a4549 :a4549. :a4550 :a4550 :a4550. :a4551 :a4551 :a4551. :a4552 :a4552 :a4552. :a4553 :a4553 :a4553. :a4554 :a4554 :a4554. :a4555 :a4555 :a4555. :a4556 :a4556 :a4556. :a4557 :a4557 :a4557. :a4558 :a4558 :a4558. :a4559 :a4559 :a4559. :a4560 :a4560 :a4560. :a4561 :a4561 :a4561. :a4562 :a4562 :a4562. :a4563 :a4563 :a4563. :a4564 :a4564 :a4564. :a4565 :a4565 :a4565. :a4566 :a4566 :a4566. :a4567 :a4567 :a4567. :a4568 :a4568 :a4568. :a4569 :a4569 :a4569. :a4570 :a4570 :a4570. :a4571 :a4571 :a4571. :a4572 :a4572 :a4572. :a4573 :a4573 :a4573. :a4574 :a4574 :a4574. :a4575 :a4575 :a4575. :a4576 :a4576 :a4576. :a4577 :a4577 :a4577. :a4578 :a4578 :a4578. :a4579 :a4579 :a4579. :a4580 :a4580 :a4580. :a4581 :a4581 :a4581. :a4582 :a4582 :a4582. :a4583 :a4583 :a4583. :a4584 :a4584 :a4584. :a4585 :a4585 :a4585. :a4586 :a4586 :a4586. :a4587 :a4587 :a4587. :a4588 :a4588 :a4588. :a4589 :a4589 :a4589. :a4590 :a4590 :a4590. :a4591 :a4591 :a4591. :a4592 :a4592 :a4592. :a4593 :a4593 :a4593. :a4594 :a4594 :a4594. :a4595 :a4595 :a4595. :a4596 :a4596 :a4596. :a4597 :a4597 :a4597. :a4598 :a4598 :a4598. :a4599 :a4599 :a4599. :a4600 :a4600 :a4600. :a4601 :a4601 :a4601. :a4602 :a4602 :a4602. :a4603 :a4603 :a4603. :a4604 :a4604 :a4604. :a4605 :a4605 :a4605. :a4606 :a4606 :a4606. :a4607 :a4607 :a4607. :a4608 :a4608 :a4608. :a4609 :a4609 :a4609. :a4610 :a4610 :a4610. :a4611 :a4611 :a4611. :a4612 :a4612 :a4612. :a4613 :a4613 :a4613. :a4614 :a4614 :a4614. :a4615 :a4615 :a4615. :a4616 :a4616 :a4616. :a4617 :a4617 :a4617. :a4618 :a4618 :a4618. :a4619 :a4619 :a4619. :a4620 :a4620 :a4620. :a4621 :a4621 :a4621. :a4622 :a4622 :a4622. :a4623 :a4623 :a4623. :a4624 :a4624 :a4624. :a4625 :a4625 :a4625. :a4626 :a4626 :a4626. :a4627 :a4627 :a4627. :a4628 :a4628 :a4628. :a4629 :a4629 :a4629. :a4630 :a4630 :a4630. :a4631 :a4631 :a4631. :a4632 :a4632 :a4632. :a4633 :a4633 :a4633. :a4634 :a4634 :a4634. :a4635 :a4635 :a4635. :a4636 :a4636 :a4636. :a4637 :a4637 :a4637. :a4638 :a4638 :a4638. :a4639 :a4639 :a4639. :a4640 :a4640 :a4640. :a4641 :a4641 :a4641. :a4642 :a4642 :a4642. :a4643 :a4643 :a4643. :a4644 :a4644 :a4644. :a4645 :a4645 :a4645. :a4646 :a4646 :a4646. :a4647 :a4647 :a4647. :a4648 :a4648 :a4648. :a4649 :a4649 :a4649. :a4650 :a4650 :a4650. :a4651 :a4651 :a4651. :a4652 :a4652 :a4652. :a4653 :a4653 :a4653. :a4654 :a4654 :a4654. :a4655 :a4655 :a4655. :a4656 :a4656 :a4656. :a4657 :a4657 :a4657. :a4658 :a4658 :a4658. :a4659 :a4659 :a4659. :a4660 :a4660 :a4660. :a4661 :a4661 :a4661. :a4662 :a4662 :a4662. :a4663 :a4663 :a4663. :a4664 :a4664 :a4664. :a4665 :a4665 :a4665. :a4666 :a4666 :a4666. :a4667 :a4667 :a4667. :a4668 :a4668 :a4668. :a4669 :a4669 :a4669. :a4670 :a4670 :a4670. :a4671 :a4671 :a4671. :a4672 :a4672 :a4672. :a4673 :a4673 :a4673. :a4674 :a4674 :a4674. :a4675 :a4675 :a4675. :a4676 :a4676 :a4676. :a4677 :a4677 :a4677. :a4678 :a4678 :a4678. :a4679 :a4679 :a4679. :a4680 :a4680 :a4680. :a4681 :a4681 :a4681. :a4682 :a4682 :a4682. :a4683 :a4683 :a4683. :a4684 :a4684 :a4684. :a4685 :a4685 :a4685. :a4686 :a4686 :a4686. :a4687 :a4687 :a4687. :a4688 :a4688 :a4688. :a4689 :a4689 :a4689. :a4690 :a4690 :a4690. :a4691 :a4691 :a4691. :a4692 :a4692 :a4692. :a4693 :a4693 :a4693. :a4694 :a4694 :a4694. :a4695 :a4695 :a4695. :a4696 :a4696 :a4696. :a4697 :a4697 :a4697. :a4698 :a4698 :a4698. :a4699 :a4699 :a4699. :a4700 :a4700 :a4700. :a4701 :a4701 :a4701. :a4702 :a4702 :a4702. :a4703 :a4703 :a4703. :a4704 :a4704 :a4704. :a4705 :a4705 :a4705. :a4706 :a4706 :a4706. :a4707 :a4707 :a4707. :a4708 :a4708 :a4708. :a4709 :a4709 :a4709. :a4710 :a4710 :a4710. :a4711 :a4711 :a4711. :a4712 :a4712 :a4712. :a4713 :a4713 :a4713. :a4714 :a4714 :a4714. :a4715 :a4715 :a4715. :a4716 :a4716 :a4716. :a4717 :a4717 :a4717. :a4718 :a4718 :a4718. :a4719 :a4719 :a4719. :a4720 :a4720 :a4720. :a4721 :a4721 :a4721. :a4722 :a4722 :a4722. :a4723 :a4723 :a4723. :a4724 :a4724 :a4724. :a4725 :a4725 :a4725. :a4726 :a4726 :a4726. :a4727 :a4727 :a4727. :a4728 :a4728 :a4728. :a4729 :a4729 :a4729. :a4730 :a4730 :a4730. :a4731 :a4731 :a4731. :a4732 :a4732 :a4732. :a4733 :a4733 :a4733. :a4734 :a4734 :a4734. :a4735 :a4735 :a4735. :a4736 :a4736 :a4736. :a4737 :a4737 :a4737. :a4738 :a4738 :a4738. :a4739 :a4739 :a4739. :a4740 :a4740 :a4740. :a4741 :a4741 :a4741. :a4742 :a4742 :a4742. :a4743 :a4743 :a4743. :a4744 :a4744 :a4744. :a4745 :a4745 :a4745. :a4746 :a4746 :a4746. :a4747 :a4747 :a4747. :a4748 :a4748 :a4748. :a4749 :a4749 :a4749. :a4750 :a4750 :a4750. :a4751 :a4751 :a4751. :a4752 :a4752 :a4752. :a4753 :a4753 :a4753. :a4754 :a4754 :a4754. :a4755 :a4755 :a4755. :a4756 :a4756 :a4756. :a4757 :a4757 :a4757. :a4758 :a4758 :a4758. :a4759 :a4759 :a4759. :a4760 :a4760 :a4760. :a4761 :a4761 :a4761. :a4762 :a4762 :a4762. :a4763 :a4763 :a4763. :a4764 :a4764 :a4764. :a4765 :a4765 :a4765. :a4766 :a4766 :a4766. :a4767 :a4767 :a4767. :a4768 :a4768 :a4768. :a4769 :a4769 :a4769. :a4770 :a4770 :a4770. :a4771 :a4771 :a4771. :a4772 :a4772 :a4772. :a4773 :a4773 :a4773. :a4774 :a4774 :a4774. :a4775 :a4775 :a4775. :a4776 :a4776 :a4776. :a4777 :a4777 :a4777. :a4778 :a4778 :a4778. :a4779 :a4779 :a4779. :a4780 :a4780 :a4780. :a4781 :a4781 :a4781. :a4782 :a4782 :a4782. :a4783 :a4783 :a4783. :a4784 :a4784 :a4784. :a4785 :a4785 :a4785. :a4786 :a4786 :a4786. :a4787 :a4787 :a4787. :a4788 :a4788 :a4788. :a4789 :a4789 :a4789. :a4790 :a4790 :a4790. :a4791 :a4791 :a4791. :a4792 :a4792 :a4792. :a4793 :a4793 :a4793. :a4794 :a4794 :a4794. :a4795 :a4795 :a4795. :a4796 :a4796 :a4796. :a4797 :a4797 :a4797. :a4798 :a4798 :a4798. :a4799 :a4799 :a4799. :a4800 :a4800 :a4800. :a4801 :a4801 :a4801. :a4802 :a4802 :a4802. :a4803 :a4803 :a4803. :a4804 :a4804 :a4804. :a4805 :a4805 :a4805. :a4806 :a4806 :a4806. :a4807 :a4807 :a4807. :a4808 :a4808 :a4808. :a4809 :a4809 :a4809. :a4810 :a4810 :a4810. :a4811 :a4811 :a4811. :a4812 :a4812 :a4812. :a4813 :a4813 :a4813. :a4814 :a4814 :a4814. :a4815 :a4815 :a4815. :a4816 :a4816 :a4816. :a4817 :a4817 :a4817. :a4818 :a4818 :a4818. :a4819 :a4819 :a4819. :a4820 :a4820 :a4820. :a4821 :a4821 :a4821. :a4822 :a4822 :a4822. :a4823 :a4823 :a4823. :a4824 :a4824 :a4824. :a4825 :a4825 :a4825. :a4826 :a4826 :a4826. :a4827 :a4827 :a4827. :a4828 :a4828 :a4828. :a4829 :a4829 :a4829. :a4830 :a4830 :a4830. :a4831 :a4831 :a4831. :a4832 :a4832 :a4832. :a4833 :a4833 :a4833. :a4834 :a4834 :a4834. :a4835 :a4835 :a4835. :a4836 :a4836 :a4836. :a4837 :a4837 :a4837. :a4838 :a4838 :a4838. :a4839 :a4839 :a4839. :a4840 :a4840 :a4840. :a4841 :a4841 :a4841. :a4842 :a4842 :a4842. :a4843 :a4843 :a4843. :a4844 :a4844 :a4844. :a4845 :a4845 :a4845. :a4846 :a4846 :a4846. :a4847 :a4847 :a4847. :a4848 :a4848 :a4848. :a4849 :a4849 :a4849. :a4850 :a4850 :a4850. :a4851 :a4851 :a4851. :a4852 :a4852 :a4852. :a4853 :a4853 :a4853. :a4854 :a4854 :a4854. :a4855 :a4855 :a4855. :a4856 :a4856 :a4856. :a4857 :a4857 :a4857. :a4858 :a4858 :a4858. :a4859 :a4859 :a4859. :a4860 :a4860 :a4860. :a4861 :a4861 :a4861. :a4862 :a4862 :a4862. :a4863 :a4863 :a4863. :a4864 :a4864 :a4864. :a4865 :a4865 :a4865. :a4866 :a4866 :a4866. :a4867 :a4867 :a4867. :a4868 :a4868 :a4868. :a4869 :a4869 :a4869. :a4870 :a4870 :a4870. :a4871 :a4871 :a4871. :a4872 :a4872 :a4872. :a4873 :a4873 :a4873. :a4874 :a4874 :a4874. :a4875 :a4875 :a4875. :a4876 :a4876 :a4876. :a4877 :a4877 :a4877. :a4878 :a4878 :a4878. :a4879 :a4879 :a4879. :a4880 :a4880 :a4880. :a4881 :a4881 :a4881. :a4882 :a4882 :a4882. :a4883 :a4883 :a4883. :a4884 :a4884 :a4884. :a4885 :a4885 :a4885. :a4886 :a4886 :a4886. :a4887 :a4887 :a4887. :a4888 :a4888 :a4888. :a4889 :a4889 :a4889. :a4890 :a4890 :a4890. :a4891 :a4891 :a4891. :a4892 :a4892 :a4892. :a4893 :a4893 :a4893. :a4894 :a4894 :a4894. :a4895 :a4895 :a4895. :a4896 :a4896 :a4896. :a4897 :a4897 :a4897. :a4898 :a4898 :a4898. :a4899 :a4899 :a4899. :a4900 :a4900 :a4900. :a4901 :a4901 :a4901. :a4902 :a4902 :a4902. :a4903 :a4903 :a4903. :a4904 :a4904 :a4904. :a4905 :a4905 :a4905. :a4906 :a4906 :a4906. :a4907 :a4907 :a4907. :a4908 :a4908 :a4908. :a4909 :a4909 :a4909. :a4910 :a4910 :a4910. :a4911 :a4911 :a4911. :a4912 :a4912 :a4912. :a4913 :a4913 :a4913. :a4914 :a4914 :a4914. :a4915 :a4915 :a4915. :a4916 :a4916 :a4916. :a4917 :a4917 :a4917. :a4918 :a4918 :a4918. :a4919 :a4919 :a4919. :a4920 :a4920 :a4920. :a4921 :a4921 :a4921. :a4922 :a4922 :a4922. :a4923 :a4923 :a4923. :a4924 :a4924 :a4924. :a4925 :a4925 :a4925. :a4926 :a4926 :a4926. :a4927 :a4927 :a4927. :a4928 :a4928 :a4928. :a4929 :a4929 :a4929. :a4930 :a4930 :a4930. :a4931 :a4931 :a4931. :a4932 :a4932 :a4932. :a4933 :a4933 :a4933. :a4934 :a4934 :a4934. :a4935 :a4935 :a4935. :a4936 :a4936 :a4936. :a4937 :a4937 :a4937. :a4938 :a4938 :a4938. :a4939 :a4939 :a4939. :a4940 :a4940 :a4940. :a4941 :a4941 :a4941. :a4942 :a4942 :a4942. :a4943 :a4943 :a4943. :a4944 :a4944 :a4944. :a4945 :a4945 :a4945. :a4946 :a4946 :a4946. :a4947 :a4947 :a4947. :a4948 :a4948 :a4948. :a4949 :a4949 :a4949. :a4950 :a4950 :a4950. :a4951 :a4951 :a4951. :a4952 :a4952 :a4952. :a4953 :a4953 :a4953. :a4954 :a4954 :a4954. :a4955 :a4955 :a4955. :a4956 :a4956 :a4956. :a4957 :a4957 :a4957. :a4958 :a4958 :a4958. :a4959 :a4959 :a4959. :a4960 :a4960 :a4960. :a4961 :a4961 :a4961. :a4962 :a4962 :a4962. :a4963 :a4963 :a4963. :a4964 :a4964 :a4964. :a4965 :a4965 :a4965. :a4966 :a4966 :a4966. :a4967 :a4967 :a4967. :a4968 :a4968 :a4968. :a4969 :a4969 :a4969. :a4970 :a4970 :a4970. :a4971 :a4971 :a4971. :a4972 :a4972 :a4972. :a4973 :a4973 :a4973. :a4974 :a4974 :a4974. :a4975 :a4975 :a4975. :a4976 :a4976 :a4976. :a4977 :a4977 :a4977. :a4978 :a4978 :a4978. :a4979 :a4979 :a4979. :a4980 :a4980 :a4980. :a4981 :a4981 :a4981. :a4982 :a4982 :a4982. :a4983 :a4983 :a4983. :a4984 :a4984 :a4984. :a4985 :a4985 :a4985. :a4986 :a4986 :a4986. :a4987 :a4987 :a4987. :a4988 :a4988 :a4988. :a4989 :a4989 :a4989. :a4990 :a4990 :a4990. :a4991 :a4991 :a4991. :a4992 :a4992 :a4992. :a4993 :a4993 :a4993. :a4994 :a4994 :a4994. :a4995 :a4995 :a4995. :a4996 :a4996 :a4996. :a4997 :a4997 :a4997. :a4998 :a4998 :a4998. :a4999 :a4999 :a4999. :a5000 :a5000 :a5000. :a5001 :a5001 :a5001. :a5002 :a5002 :a5002. :a5003 :a5003 :a5003. :a5004 :a5004 :a5004. :a5005 :a5005 :a5005. :a5006 :a5006 :a5006. :a5007 :a5007 :a5007. :a5008 :a5008 :a5008. :a5009 :a5009 :a5009. :a5010 :a5010 :a5010. :a5011 :a5011 :a5011. :a5012 :a5012 :a5012. :a5013 :a5013 :a5013. :a5014 :a5014 :a5014. :a5015 :a5015 :a5015. :a5016 :a5016 :a5016. :a5017 :a5017 :a5017. :a5018 :a5018 :a5018. :a5019 :a5019 :a5019. :a5020 :a5020 :a5020. :a5021 :a5021 :a5021. :a5022 :a5022 :a5022. :a5023 :a5023 :a5023. :a5024 :a5024 :a5024. :a5025 :a5025 :a5025. :a5026 :a5026 :a5026. :a5027 :a5027 :a5027. :a5028 :a5028 :a5028. :a5029 :a5029 :a5029. :a5030 :a5030 :a5030. :a5031 :a5031 :a5031. :a5032 :a5032 :a5032. :a5033 :a5033 :a5033. :a5034 :a5034 :a5034. :a5035 :a5035 :a5035. :a5036 :a5036 :a5036. :a5037 :a5037 :a5037. :a5038 :a5038 :a5038. :a5039 :a5039 :a5039. :a5040 :a5040 :a5040. :a5041 :a5041 :a5041. :a5042 :a5042 :a5042. :a5043 :a5043 :a5043. :a5044 :a5044 :a5044. :a5045 :a5045 :a5045. :a5046 :a5046 :a5046. :a5047 :a5047 :a5047. :a5048 :a5048 :a5048. :a5049 :a5049 :a5049. :a5050 :a5050 :a5050. :a5051 :a5051 :a5051. :a5052 :a5052 :a5052. :a5053 :a5053 :a5053. :a5054 :a5054 :a5054. :a5055 :a5055 :a5055. :a5056 :a5056 :a5056. :a5057 :a5057 :a5057. :a5058 :a5058 :a5058. :a5059 :a5059 :a5059. :a5060 :a5060 :a5060. :a5061 :a5061 :a5061. :a5062 :a5062 :a5062. :a5063 :a5063 :a5063. :a5064 :a5064 :a5064. :a5065 :a5065 :a5065. :a5066 :a5066 :a5066. :a5067 :a5067 :a5067. :a5068 :a5068 :a5068. :a5069 :a5069 :a5069. :a5070 :a5070 :a5070. :a5071 :a5071 :a5071. :a5072 :a5072 :a5072. :a5073 :a5073 :a5073. :a5074 :a5074 :a5074. :a5075 :a5075 :a5075. :a5076 :a5076 :a5076. :a5077 :a5077 :a5077. :a5078 :a5078 :a5078. :a5079 :a5079 :a5079. :a5080 :a5080 :a5080. :a5081 :a5081 :a5081. :a5082 :a5082 :a5082. :a5083 :a5083 :a5083. :a5084 :a5084 :a5084. :a5085 :a5085 :a5085. :a5086 :a5086 :a5086. :a5087 :a5087 :a5087. :a5088 :a5088 :a5088. :a5089 :a5089 :a5089. :a5090 :a5090 :a5090. :a5091 :a5091 :a5091. :a5092 :a5092 :a5092. :a5093 :a5093 :a5093. :a5094 :a5094 :a5094. :a5095 :a5095 :a5095. :a5096 :a5096 :a5096. :a5097 :a5097 :a5097. :a5098 :a5098 :a5098. :a5099 :a5099 :a5099. :a5100 :a5100 :a5100. :a5101 :a5101 :a5101. :a5102 :a5102 :a5102. :a5103 :a5103 :a5103. :a5104 :a5104 :a5104. :a5105 :a5105 :a5105. :a5106 :a5106 :a5106. :a5107 :a5107 :a5107. :a5108 :a5108 :a5108. :a5109 :a5109 :a5109. :a5110 :a5110 :a5110. :a5111 :a5111 :a5111. :a5112 :a5112 :a5112. :a5113 :a5113 :a5113. :a5114 :a5114 :a5114. :a5115 :a5115 :a5115. :a5116 :a5116 :a5116. :a5117 :a5117 :a5117. :a5118 :a5118 :a5118. :a5119 :a5119 :a5119. :a5120 :a5120 :a5120. :a5121 :a5121 :a5121. :a5122 :a5122 :a5122. :a5123 :a5123 :a5123. :a5124 :a5124 :a5124. :a5125 :a5125 :a5125. :a5126 :a5126 :a5126. :a5127 :a5127 :a5127. :a5128 :a5128 :a5128. :a5129 :a5129 :a5129. :a5130 :a5130 :a5130. :a5131 :a5131 :a5131. :a5132 :a5132 :a5132. :a5133 :a5133 :a5133. :a5134 :a5134 :a5134. :a5135 :a5135 :a5135. :a5136 :a5136 :a5136. :a5137 :a5137 :a5137. :a5138 :a5138 :a5138. :a5139 :a5139 :a5139. :a5140 :a5140 :a5140. :a5141 :a5141 :a5141. :a5142 :a5142 :a5142. :a5143 :a5143 :a5143. :a5144 :a5144 :a5144. :a5145 :a5145 :a5145. :a5146 :a5146 :a5146. :a5147 :a5147 :a5147. :a5148 :a5148 :a5148. :a5149 :a5149 :a5149. :a5150 :a5150 :a5150. :a5151 :a5151 :a5151. :a5152 :a5152 :a5152. :a5153 :a5153 :a5153. :a5154 :a5154 :a5154. :a5155 :a5155 :a5155. :a5156 :a5156 :a5156. :a5157 :a5157 :a5157. :a5158 :a5158 :a5158. :a5159 :a5159 :a5159. :a5160 :a5160 :a5160. :a5161 :a5161 :a5161. :a5162 :a5162 :a5162. :a5163 :a5163 :a5163. :a5164 :a5164 :a5164. :a5165 :a5165 :a5165. :a5166 :a5166 :a5166. :a5167 :a5167 :a5167. :a5168 :a5168 :a5168. :a5169 :a5169 :a5169. :a5170 :a5170 :a5170. :a5171 :a5171 :a5171. :a5172 :a5172 :a5172. :a5173 :a5173 :a5173. :a5174 :a5174 :a5174. :a5175 :a5175 :a5175. :a5176 :a5176 :a5176. :a5177 :a5177 :a5177. :a5178 :a5178 :a5178. :a5179 :a5179 :a5179. :a5180 :a5180 :a5180. :a5181 :a5181 :a5181. :a5182 :a5182 :a5182. :a5183 :a5183 :a5183. :a5184 :a5184 :a5184. :a5185 :a5185 :a5185. :a5186 :a5186 :a5186. :a5187 :a5187 :a5187. :a5188 :a5188 :a5188. :a5189 :a5189 :a5189. :a5190 :a5190 :a5190. :a5191 :a5191 :a5191. :a5192 :a5192 :a5192. :a5193 :a5193 :a5193. :a5194 :a5194 :a5194. :a5195 :a5195 :a5195. :a5196 :a5196 :a5196. :a5197 :a5197 :a5197. :a5198 :a5198 :a5198. :a5199 :a5199 :a5199. :a5200 :a5200 :a5200. :a5201 :a5201 :a5201. :a5202 :a5202 :a5202. :a5203 :a5203 :a5203. :a5204 :a5204 :a5204. :a5205 :a5205 :a5205. :a5206 :a5206 :a5206. :a5207 :a5207 :a5207. :a5208 :a5208 :a5208. :a5209 :a5209 :a5209. :a5210 :a5210 :a5210. :a5211 :a5211 :a5211. :a5212 :a5212 :a5212. :a5213 :a5213 :a5213. :a5214 :a5214 :a5214. :a5215 :a5215 :a5215. :a5216 :a5216 :a5216. :a5217 :a5217 :a5217. :a5218 :a5218 :a5218. :a5219 :a5219 :a5219. :a5220 :a5220 :a5220. :a5221 :a5221 :a5221. :a5222 :a5222 :a5222. :a5223 :a5223 :a5223. :a5224 :a5224 :a5224. :a5225 :a5225 :a5225. :a5226 :a5226 :a5226. :a5227 :a5227 :a5227. :a5228 :a5228 :a5228. :a5229 :a5229 :a5229. :a5230 :a5230 :a5230. :a5231 :a5231 :a5231. :a5232 :a5232 :a5232. :a5233 :a5233 :a5233. :a5234 :a5234 :a5234. :a5235 :a5235 :a5235. :a5236 :a5236 :a5236. :a5237 :a5237 :a5237. :a5238 :a5238 :a5238. :a5239 :a5239 :a5239. :a5240 :a5240 :a5240. :a5241 :a5241 :a5241. :a5242 :a5242 :a5242. :a5243 :a5243 :a5243. :a5244 :a5244 :a5244. :a5245 :a5245 :a5245. :a5246 :a5246 :a5246. :a5247 :a5247 :a5247. :a5248 :a5248 :a5248. :a5249 :a5249 :a5249. :a5250 :a5250 :a5250. :a5251 :a5251 :a5251. :a5252 :a5252 :a5252. :a5253 :a5253 :a5253. :a5254 :a5254 :a5254. :a5255 :a5255 :a5255. :a5256 :a5256 :a5256. :a5257 :a5257 :a5257. :a5258 :a5258 :a5258. :a5259 :a5259 :a5259. :a5260 :a5260 :a5260. :a5261 :a5261 :a5261. :a5262 :a5262 :a5262. :a5263 :a5263 :a5263. :a5264 :a5264 :a5264. :a5265 :a5265 :a5265. :a5266 :a5266 :a5266. :a5267 :a5267 :a5267. :a5268 :a5268 :a5268. :a5269 :a5269 :a5269. :a5270 :a5270 :a5270. :a5271 :a5271 :a5271. :a5272 :a5272 :a5272. :a5273 :a5273 :a5273. :a5274 :a5274 :a5274. :a5275 :a5275 :a5275. :a5276 :a5276 :a5276. :a5277 :a5277 :a5277. :a5278 :a5278 :a5278. :a5279 :a5279 :a5279. :a5280 :a5280 :a5280. :a5281 :a5281 :a5281. :a5282 :a5282 :a5282. :a5283 :a5283 :a5283. :a5284 :a5284 :a5284. :a5285 :a5285 :a5285. :a5286 :a5286 :a5286. :a5287 :a5287 :a5287. :a5288 :a5288 :a5288. :a5289 :a5289 :a5289. :a5290 :a5290 :a5290. :a5291 :a5291 :a5291. :a5292 :a5292 :a5292. :a5293 :a5293 :a5293. :a5294 :a5294 :a5294. :a5295 :a5295 :a5295. :a5296 :a5296 :a5296. :a5297 :a5297 :a5297. :a5298 :a5298 :a5298. :a5299 :a5299 :a5299. :a5300 :a5300 :a5300. :a5301 :a5301 :a5301. :a5302 :a5302 :a5302. :a5303 :a5303 :a5303. :a5304 :a5304 :a5304. :a5305 :a5305 :a5305. :a5306 :a5306 :a5306. :a5307 :a5307 :a5307. :a5308 :a5308 :a5308. :a5309 :a5309 :a5309. :a5310 :a5310 :a5310. :a5311 :a5311 :a5311. :a5312 :a5312 :a5312. :a5313 :a5313 :a5313. :a5314 :a5314 :a5314. :a5315 :a5315 :a5315. :a5316 :a5316 :a5316. :a5317 :a5317 :a5317. :a5318 :a5318 :a5318. :a5319 :a5319 :a5319. :a5320 :a5320 :a5320. :a5321 :a5321 :a5321. :a5322 :a5322 :a5322. :a5323 :a5323 :a5323. :a5324 :a5324 :a5324. :a5325 :a5325 :a5325. :a5326 :a5326 :a5326. :a5327 :a5327 :a5327. :a5328 :a5328 :a5328. :a5329 :a5329 :a5329. :a5330 :a5330 :a5330. :a5331 :a5331 :a5331. :a5332 :a5332 :a5332. :a5333 :a5333 :a5333. :a5334 :a5334 :a5334. :a5335 :a5335 :a5335. :a5336 :a5336 :a5336. :a5337 :a5337 :a5337. :a5338 :a5338 :a5338. :a5339 :a5339 :a5339. :a5340 :a5340 :a5340. :a5341 :a5341 :a5341. :a5342 :a5342 :a5342. :a5343 :a5343 :a5343. :a5344 :a5344 :a5344. :a5345 :a5345 :a5345. :a5346 :a5346 :a5346. :a5347 :a5347 :a5347. :a5348 :a5348 :a5348. :a5349 :a5349 :a5349. :a5350 :a5350 :a5350. :a5351 :a5351 :a5351. :a5352 :a5352 :a5352. :a5353 :a5353 :a5353. :a5354 :a5354 :a5354. :a5355 :a5355 :a5355. :a5356 :a5356 :a5356. :a5357 :a5357 :a5357. :a5358 :a5358 :a5358. :a5359 :a5359 :a5359. :a5360 :a5360 :a5360. :a5361 :a5361 :a5361. :a5362 :a5362 :a5362. :a5363 :a5363 :a5363. :a5364 :a5364 :a5364. :a5365 :a5365 :a5365. :a5366 :a5366 :a5366. :a5367 :a5367 :a5367. :a5368 :a5368 :a5368. :a5369 :a5369 :a5369. :a5370 :a5370 :a5370. :a5371 :a5371 :a5371. :a5372 :a5372 :a5372. :a5373 :a5373 :a5373. :a5374 :a5374 :a5374. :a5375 :a5375 :a5375. :a5376 :a5376 :a5376. :a5377 :a5377 :a5377. :a5378 :a5378 :a5378. :a5379 :a5379 :a5379. :a5380 :a5380 :a5380. :a5381 :a5381 :a5381. :a5382 :a5382 :a5382. :a5383 :a5383 :a5383. :a5384 :a5384 :a5384. :a5385 :a5385 :a5385. :a5386 :a5386 :a5386. :a5387 :a5387 :a5387. :a5388 :a5388 :a5388. :a5389 :a5389 :a5389. :a5390 :a5390 :a5390. :a5391 :a5391 :a5391. :a5392 :a5392 :a5392. :a5393 :a5393 :a5393. :a5394 :a5394 :a5394. :a5395 :a5395 :a5395. :a5396 :a5396 :a5396. :a5397 :a5397 :a5397. :a5398 :a5398 :a5398. :a5399 :a5399 :a5399. :a5400 :a5400 :a5400. :a5401 :a5401 :a5401. :a5402 :a5402 :a5402. :a5403 :a5403 :a5403. :a5404 :a5404 :a5404. :a5405 :a5405 :a5405. :a5406 :a5406 :a5406. :a5407 :a5407 :a5407. :a5408 :a5408 :a5408. :a5409 :a5409 :a5409. :a5410 :a5410 :a5410. :a5411 :a5411 :a5411. :a5412 :a5412 :a5412. :a5413 :a5413 :a5413. :a5414 :a5414 :a5414. :a5415 :a5415 :a5415. :a5416 :a5416 :a5416. :a5417 :a5417 :a5417. :a5418 :a5418 :a5418. :a5419 :a5419 :a5419. :a5420 :a5420 :a5420. :a5421 :a5421 :a5421. :a5422 :a5422 :a5422. :a5423 :a5423 :a5423. :a5424 :a5424 :a5424. :a5425 :a5425 :a5425. :a5426 :a5426 :a5426. :a5427 :a5427 :a5427. :a5428 :a5428 :a5428. :a5429 :a5429 :a5429. :a5430 :a5430 :a5430. :a5431 :a5431 :a5431. :a5432 :a5432 :a5432. :a5433 :a5433 :a5433. :a5434 :a5434 :a5434. :a5435 :a5435 :a5435. :a5436 :a5436 :a5436. :a5437 :a5437 :a5437. :a5438 :a5438 :a5438. :a5439 :a5439 :a5439. :a5440 :a5440 :a5440. :a5441 :a5441 :a5441. :a5442 :a5442 :a5442. :a5443 :a5443 :a5443. :a5444 :a5444 :a5444. :a5445 :a5445 :a5445. :a5446 :a5446 :a5446. :a5447 :a5447 :a5447. :a5448 :a5448 :a5448. :a5449 :a5449 :a5449. :a5450 :a5450 :a5450. :a5451 :a5451 :a5451. :a5452 :a5452 :a5452. :a5453 :a5453 :a5453. :a5454 :a5454 :a5454. :a5455 :a5455 :a5455. :a5456 :a5456 :a5456. :a5457 :a5457 :a5457. :a5458 :a5458 :a5458. :a5459 :a5459 :a5459. :a5460 :a5460 :a5460. :a5461 :a5461 :a5461. :a5462 :a5462 :a5462. :a5463 :a5463 :a5463. :a5464 :a5464 :a5464. :a5465 :a5465 :a5465. :a5466 :a5466 :a5466. :a5467 :a5467 :a5467. :a5468 :a5468 :a5468. :a5469 :a5469 :a5469. :a5470 :a5470 :a5470. :a5471 :a5471 :a5471. :a5472 :a5472 :a5472. :a5473 :a5473 :a5473. :a5474 :a5474 :a5474. :a5475 :a5475 :a5475. :a5476 :a5476 :a5476. :a5477 :a5477 :a5477. :a5478 :a5478 :a5478. :a5479 :a5479 :a5479. :a5480 :a5480 :a5480. :a5481 :a5481 :a5481. :a5482 :a5482 :a5482. :a5483 :a5483 :a5483. :a5484 :a5484 :a5484. :a5485 :a5485 :a5485. :a5486 :a5486 :a5486. :a5487 :a5487 :a5487. :a5488 :a5488 :a5488. :a5489 :a5489 :a5489. :a5490 :a5490 :a5490. :a5491 :a5491 :a5491. :a5492 :a5492 :a5492. :a5493 :a5493 :a5493. :a5494 :a5494 :a5494. :a5495 :a5495 :a5495. :a5496 :a5496 :a5496. :a5497 :a5497 :a5497. :a5498 :a5498 :a5498. :a5499 :a5499 :a5499. :a5500 :a5500 :a5500. :a5501 :a5501 :a5501. :a5502 :a5502 :a5502. :a5503 :a5503 :a5503. :a5504 :a5504 :a5504. :a5505 :a5505 :a5505. :a5506 :a5506 :a5506. :a5507 :a5507 :a5507. :a5508 :a5508 :a5508. :a5509 :a5509 :a5509. :a5510 :a5510 :a5510. :a5511 :a5511 :a5511. :a5512 :a5512 :a5512. :a5513 :a5513 :a5513. :a5514 :a5514 :a5514. :a5515 :a5515 :a5515. :a5516 :a5516 :a5516. :a5517 :a5517 :a5517. :a5518 :a5518 :a5518. :a5519 :a5519 :a5519. :a5520 :a5520 :a5520. :a5521 :a5521 :a5521. :a5522 :a5522 :a5522. :a5523 :a5523 :a5523. :a5524 :a5524 :a5524. :a5525 :a5525 :a5525. :a5526 :a5526 :a5526. :a5527 :a5527 :a5527. :a5528 :a5528 :a5528. :a5529 :a5529 :a5529. :a5530 :a5530 :a5530. :a5531 :a5531 :a5531. :a5532 :a5532 :a5532. :a5533 :a5533 :a5533. :a5534 :a5534 :a5534. :a5535 :a5535 :a5535. :a5536 :a5536 :a5536. :a5537 :a5537 :a5537. :a5538 :a5538 :a5538. :a5539 :a5539 :a5539. :a5540 :a5540 :a5540. :a5541 :a5541 :a5541. :a5542 :a5542 :a5542. :a5543 :a5543 :a5543. :a5544 :a5544 :a5544. :a5545 :a5545 :a5545. :a5546 :a5546 :a5546. :a5547 :a5547 :a5547. :a5548 :a5548 :a5548. :a5549 :a5549 :a5549. :a5550 :a5550 :a5550. :a5551 :a5551 :a5551. :a5552 :a5552 :a5552. :a5553 :a5553 :a5553. :a5554 :a5554 :a5554. :a5555 :a5555 :a5555. :a5556 :a5556 :a5556. :a5557 :a5557 :a5557. :a5558 :a5558 :a5558. :a5559 :a5559 :a5559. :a5560 :a5560 :a5560. :a5561 :a5561 :a5561. :a5562 :a5562 :a5562. :a5563 :a5563 :a5563. :a5564 :a5564 :a5564. :a5565 :a5565 :a5565. :a5566 :a5566 :a5566. :a5567 :a5567 :a5567. :a5568 :a5568 :a5568. :a5569 :a5569 :a5569. :a5570 :a5570 :a5570. :a5571 :a5571 :a5571. :a5572 :a5572 :a5572. :a5573 :a5573 :a5573. :a5574 :a5574 :a5574. :a5575 :a5575 :a5575. :a5576 :a5576 :a5576. :a5577 :a5577 :a5577. :a5578 :a5578 :a5578. :a5579 :a5579 :a5579. :a5580 :a5580 :a5580. :a5581 :a5581 :a5581. :a5582 :a5582 :a5582. :a5583 :a5583 :a5583. :a5584 :a5584 :a5584. :a5585 :a5585 :a5585. :a5586 :a5586 :a5586. :a5587 :a5587 :a5587. :a5588 :a5588 :a5588. :a5589 :a5589 :a5589. :a5590 :a5590 :a5590. :a5591 :a5591 :a5591. :a5592 :a5592 :a5592. :a5593 :a5593 :a5593. :a5594 :a5594 :a5594. :a5595 :a5595 :a5595. :a5596 :a5596 :a5596. :a5597 :a5597 :a5597. :a5598 :a5598 :a5598. :a5599 :a5599 :a5599. :a5600 :a5600 :a5600. :a5601 :a5601 :a5601. :a5602 :a5602 :a5602. :a5603 :a5603 :a5603. :a5604 :a5604 :a5604. :a5605 :a5605 :a5605. :a5606 :a5606 :a5606. :a5607 :a5607 :a5607. :a5608 :a5608 :a5608. :a5609 :a5609 :a5609. :a5610 :a5610 :a5610. :a5611 :a5611 :a5611. :a5612 :a5612 :a5612. :a5613 :a5613 :a5613. :a5614 :a5614 :a5614. :a5615 :a5615 :a5615. :a5616 :a5616 :a5616. :a5617 :a5617 :a5617. :a5618 :a5618 :a5618. :a5619 :a5619 :a5619. :a5620 :a5620 :a5620. :a5621 :a5621 :a5621. :a5622 :a5622 :a5622. :a5623 :a5623 :a5623. :a5624 :a5624 :a5624. :a5625 :a5625 :a5625. :a5626 :a5626 :a5626. :a5627 :a5627 :a5627. :a5628 :a5628 :a5628. :a5629 :a5629 :a5629. :a5630 :a5630 :a5630. :a5631 :a5631 :a5631. :a5632 :a5632 :a5632. :a5633 :a5633 :a5633. :a5634 :a5634 :a5634. :a5635 :a5635 :a5635. :a5636 :a5636 :a5636. :a5637 :a5637 :a5637. :a5638 :a5638 :a5638. :a5639 :a5639 :a5639. :a5640 :a5640 :a5640. :a5641 :a5641 :a5641. :a5642 :a5642 :a5642. :a5643 :a5643 :a5643. :a5644 :a5644 :a5644. :a5645 :a5645 :a5645. :a5646 :a5646 :a5646. :a5647 :a5647 :a5647. :a5648 :a5648 :a5648. :a5649 :a5649 :a5649. :a5650 :a5650 :a5650. :a5651 :a5651 :a5651. :a5652 :a5652 :a5652. :a5653 :a5653 :a5653. :a5654 :a5654 :a5654. :a5655 :a5655 :a5655. :a5656 :a5656 :a5656. :a5657 :a5657 :a5657. :a5658 :a5658 :a5658. :a5659 :a5659 :a5659. :a5660 :a5660 :a5660. :a5661 :a5661 :a5661. :a5662 :a5662 :a5662. :a5663 :a5663 :a5663. :a5664 :a5664 :a5664. :a5665 :a5665 :a5665. :a5666 :a5666 :a5666. :a5667 :a5667 :a5667. :a5668 :a5668 :a5668. :a5669 :a5669 :a5669. :a5670 :a5670 :a5670. :a5671 :a5671 :a5671. :a5672 :a5672 :a5672. :a5673 :a5673 :a5673. :a5674 :a5674 :a5674. :a5675 :a5675 :a5675. :a5676 :a5676 :a5676. :a5677 :a5677 :a5677. :a5678 :a5678 :a5678. :a5679 :a5679 :a5679. :a5680 :a5680 :a5680. :a5681 :a5681 :a5681. :a5682 :a5682 :a5682. :a5683 :a5683 :a5683. :a5684 :a5684 :a5684. :a5685 :a5685 :a5685. :a5686 :a5686 :a5686. :a5687 :a5687 :a5687. :a5688 :a5688 :a5688. :a5689 :a5689 :a5689. :a5690 :a5690 :a5690. :a5691 :a5691 :a5691. :a5692 :a5692 :a5692. :a5693 :a5693 :a5693. :a5694 :a5694 :a5694. :a5695 :a5695 :a5695. :a5696 :a5696 :a5696. :a5697 :a5697 :a5697. :a5698 :a5698 :a5698. :a5699 :a5699 :a5699. :a5700 :a5700 :a5700. :a5701 :a5701 :a5701. :a5702 :a5702 :a5702. :a5703 :a5703 :a5703. :a5704 :a5704 :a5704. :a5705 :a5705 :a5705. :a5706 :a5706 :a5706. :a5707 :a5707 :a5707. :a5708 :a5708 :a5708. :a5709 :a5709 :a5709. :a5710 :a5710 :a5710. :a5711 :a5711 :a5711. :a5712 :a5712 :a5712. :a5713 :a5713 :a5713. :a5714 :a5714 :a5714. :a5715 :a5715 :a5715. :a5716 :a5716 :a5716. :a5717 :a5717 :a5717. :a5718 :a5718 :a5718. :a5719 :a5719 :a5719. :a5720 :a5720 :a5720. :a5721 :a5721 :a5721. :a5722 :a5722 :a5722. :a5723 :a5723 :a5723. :a5724 :a5724 :a5724. :a5725 :a5725 :a5725. :a5726 :a5726 :a5726. :a5727 :a5727 :a5727. :a5728 :a5728 :a5728. :a5729 :a5729 :a5729. :a5730 :a5730 :a5730. :a5731 :a5731 :a5731. :a5732 :a5732 :a5732. :a5733 :a5733 :a5733. :a5734 :a5734 :a5734. :a5735 :a5735 :a5735. :a5736 :a5736 :a5736. :a5737 :a5737 :a5737. :a5738 :a5738 :a5738. :a5739 :a5739 :a5739. :a5740 :a5740 :a5740. :a5741 :a5741 :a5741. :a5742 :a5742 :a5742. :a5743 :a5743 :a5743. :a5744 :a5744 :a5744. :a5745 :a5745 :a5745. :a5746 :a5746 :a5746. :a5747 :a5747 :a5747. :a5748 :a5748 :a5748. :a5749 :a5749 :a5749. :a5750 :a5750 :a5750. :a5751 :a5751 :a5751. :a5752 :a5752 :a5752. :a5753 :a5753 :a5753. :a5754 :a5754 :a5754. :a5755 :a5755 :a5755. :a5756 :a5756 :a5756. :a5757 :a5757 :a5757. :a5758 :a5758 :a5758. :a5759 :a5759 :a5759. :a5760 :a5760 :a5760. :a5761 :a5761 :a5761. :a5762 :a5762 :a5762. :a5763 :a5763 :a5763. :a5764 :a5764 :a5764. :a5765 :a5765 :a5765. :a5766 :a5766 :a5766. :a5767 :a5767 :a5767. :a5768 :a5768 :a5768. :a5769 :a5769 :a5769. :a5770 :a5770 :a5770. :a5771 :a5771 :a5771. :a5772 :a5772 :a5772. :a5773 :a5773 :a5773. :a5774 :a5774 :a5774. :a5775 :a5775 :a5775. :a5776 :a5776 :a5776. :a5777 :a5777 :a5777. :a5778 :a5778 :a5778. :a5779 :a5779 :a5779. :a5780 :a5780 :a5780. :a5781 :a5781 :a5781. :a5782 :a5782 :a5782. :a5783 :a5783 :a5783. :a5784 :a5784 :a5784. :a5785 :a5785 :a5785. :a5786 :a5786 :a5786. :a5787 :a5787 :a5787. :a5788 :a5788 :a5788. :a5789 :a5789 :a5789. :a5790 :a5790 :a5790. :a5791 :a5791 :a5791. :a5792 :a5792 :a5792. :a5793 :a5793 :a5793. :a5794 :a5794 :a5794. :a5795 :a5795 :a5795. :a5796 :a5796 :a5796. :a5797 :a5797 :a5797. :a5798 :a5798 :a5798. :a5799 :a5799 :a5799. :a5800 :a5800 :a5800. :a5801 :a5801 :a5801. :a5802 :a5802 :a5802. :a5803 :a5803 :a5803. :a5804 :a5804 :a5804. :a5805 :a5805 :a5805. :a5806 :a5806 :a5806. :a5807 :a5807 :a5807. :a5808 :a5808 :a5808. :a5809 :a5809 :a5809. :a5810 :a5810 :a5810. :a5811 :a5811 :a5811. :a5812 :a5812 :a5812. :a5813 :a5813 :a5813. :a5814 :a5814 :a5814. :a5815 :a5815 :a5815. :a5816 :a5816 :a5816. :a5817 :a5817 :a5817. :a5818 :a5818 :a5818. :a5819 :a5819 :a5819. :a5820 :a5820 :a5820. :a5821 :a5821 :a5821. :a5822 :a5822 :a5822. :a5823 :a5823 :a5823. :a5824 :a5824 :a5824. :a5825 :a5825 :a5825. :a5826 :a5826 :a5826. :a5827 :a5827 :a5827. :a5828 :a5828 :a5828. :a5829 :a5829 :a5829. :a5830 :a5830 :a5830. :a5831 :a5831 :a5831. :a5832 :a5832 :a5832. :a5833 :a5833 :a5833. :a5834 :a5834 :a5834. :a5835 :a5835 :a5835. :a5836 :a5836 :a5836. :a5837 :a5837 :a5837. :a5838 :a5838 :a5838. :a5839 :a5839 :a5839. :a5840 :a5840 :a5840. :a5841 :a5841 :a5841. :a5842 :a5842 :a5842. :a5843 :a5843 :a5843. :a5844 :a5844 :a5844. :a5845 :a5845 :a5845. :a5846 :a5846 :a5846. :a5847 :a5847 :a5847. :a5848 :a5848 :a5848. :a5849 :a5849 :a5849. :a5850 :a5850 :a5850. :a5851 :a5851 :a5851. :a5852 :a5852 :a5852. :a5853 :a5853 :a5853. :a5854 :a5854 :a5854. :a5855 :a5855 :a5855. :a5856 :a5856 :a5856. :a5857 :a5857 :a5857. :a5858 :a5858 :a5858. :a5859 :a5859 :a5859. :a5860 :a5860 :a5860. :a5861 :a5861 :a5861. :a5862 :a5862 :a5862. :a5863 :a5863 :a5863. :a5864 :a5864 :a5864. :a5865 :a5865 :a5865. :a5866 :a5866 :a5866. :a5867 :a5867 :a5867. :a5868 :a5868 :a5868. :a5869 :a5869 :a5869. :a5870 :a5870 :a5870. :a5871 :a5871 :a5871. :a5872 :a5872 :a5872. :a5873 :a5873 :a5873. :a5874 :a5874 :a5874. :a5875 :a5875 :a5875. :a5876 :a5876 :a5876. :a5877 :a5877 :a5877. :a5878 :a5878 :a5878. :a5879 :a5879 :a5879. :a5880 :a5880 :a5880. :a5881 :a5881 :a5881. :a5882 :a5882 :a5882. :a5883 :a5883 :a5883. :a5884 :a5884 :a5884. :a5885 :a5885 :a5885. :a5886 :a5886 :a5886. :a5887 :a5887 :a5887. :a5888 :a5888 :a5888. :a5889 :a5889 :a5889. :a5890 :a5890 :a5890. :a5891 :a5891 :a5891. :a5892 :a5892 :a5892. :a5893 :a5893 :a5893. :a5894 :a5894 :a5894. :a5895 :a5895 :a5895. :a5896 :a5896 :a5896. :a5897 :a5897 :a5897. :a5898 :a5898 :a5898. :a5899 :a5899 :a5899. :a5900 :a5900 :a5900. :a5901 :a5901 :a5901. :a5902 :a5902 :a5902. :a5903 :a5903 :a5903. :a5904 :a5904 :a5904. :a5905 :a5905 :a5905. :a5906 :a5906 :a5906. :a5907 :a5907 :a5907. :a5908 :a5908 :a5908. :a5909 :a5909 :a5909. :a5910 :a5910 :a5910. :a5911 :a5911 :a5911. :a5912 :a5912 :a5912. :a5913 :a5913 :a5913. :a5914 :a5914 :a5914. :a5915 :a5915 :a5915. :a5916 :a5916 :a5916. :a5917 :a5917 :a5917. :a5918 :a5918 :a5918. :a5919 :a5919 :a5919. :a5920 :a5920 :a5920. :a5921 :a5921 :a5921. :a5922 :a5922 :a5922. :a5923 :a5923 :a5923. :a5924 :a5924 :a5924. :a5925 :a5925 :a5925. :a5926 :a5926 :a5926. :a5927 :a5927 :a5927. :a5928 :a5928 :a5928. :a5929 :a5929 :a5929. :a5930 :a5930 :a5930. :a5931 :a5931 :a5931. :a5932 :a5932 :a5932. :a5933 :a5933 :a5933. :a5934 :a5934 :a5934. :a5935 :a5935 :a5935. :a5936 :a5936 :a5936. :a5937 :a5937 :a5937. :a5938 :a5938 :a5938. :a5939 :a5939 :a5939. :a5940 :a5940 :a5940. :a5941 :a5941 :a5941. :a5942 :a5942 :a5942. :a5943 :a5943 :a5943. :a5944 :a5944 :a5944. :a5945 :a5945 :a5945. :a5946 :a5946 :a5946. :a5947 :a5947 :a5947. :a5948 :a5948 :a5948. :a5949 :a5949 :a5949. :a5950 :a5950 :a5950. :a5951 :a5951 :a5951. :a5952 :a5952 :a5952. :a5953 :a5953 :a5953. :a5954 :a5954 :a5954. :a5955 :a5955 :a5955. :a5956 :a5956 :a5956. :a5957 :a5957 :a5957. :a5958 :a5958 :a5958. :a5959 :a5959 :a5959. :a5960 :a5960 :a5960. :a5961 :a5961 :a5961. :a5962 :a5962 :a5962. :a5963 :a5963 :a5963. :a5964 :a5964 :a5964. :a5965 :a5965 :a5965. :a5966 :a5966 :a5966. :a5967 :a5967 :a5967. :a5968 :a5968 :a5968. :a5969 :a5969 :a5969. :a5970 :a5970 :a5970. :a5971 :a5971 :a5971. :a5972 :a5972 :a5972. :a5973 :a5973 :a5973. :a5974 :a5974 :a5974. :a5975 :a5975 :a5975. :a5976 :a5976 :a5976. :a5977 :a5977 :a5977. :a5978 :a5978 :a5978. :a5979 :a5979 :a5979. :a5980 :a5980 :a5980. :a5981 :a5981 :a5981. :a5982 :a5982 :a5982. :a5983 :a5983 :a5983. :a5984 :a5984 :a5984. :a5985 :a5985 :a5985. :a5986 :a5986 :a5986. :a5987 :a5987 :a5987. :a5988 :a5988 :a5988. :a5989 :a5989 :a5989. :a5990 :a5990 :a5990. :a5991 :a5991 :a5991. :a5992 :a5992 :a5992. :a5993 :a5993 :a5993. :a5994 :a5994 :a5994. :a5995 :a5995 :a5995. :a5996 :a5996 :a5996. :a5997 :a5997 :a5997. :a5998 :a5998 :a5998. :a5999 :a5999 :a5999. :a6000 :a6000 :a6000. :a6001 :a6001 :a6001. :a6002 :a6002 :a6002. :a6003 :a6003 :a6003. :a6004 :a6004 :a6004. :a6005 :a6005 :a6005. :a6006 :a6006 :a6006. :a6007 :a6007 :a6007. :a6008 :a6008 :a6008. :a6009 :a6009 :a6009. :a6010 :a6010 :a6010. :a6011 :a6011 :a6011. :a6012 :a6012 :a6012. :a6013 :a6013 :a6013. :a6014 :a6014 :a6014. :a6015 :a6015 :a6015. :a6016 :a6016 :a6016. :a6017 :a6017 :a6017. :a6018 :a6018 :a6018. :a6019 :a6019 :a6019. :a6020 :a6020 :a6020. :a6021 :a6021 :a6021. :a6022 :a6022 :a6022. :a6023 :a6023 :a6023. :a6024 :a6024 :a6024. :a6025 :a6025 :a6025. :a6026 :a6026 :a6026. :a6027 :a6027 :a6027. :a6028 :a6028 :a6028. :a6029 :a6029 :a6029. :a6030 :a6030 :a6030. :a6031 :a6031 :a6031. :a6032 :a6032 :a6032. :a6033 :a6033 :a6033. :a6034 :a6034 :a6034. :a6035 :a6035 :a6035. :a6036 :a6036 :a6036. :a6037 :a6037 :a6037. :a6038 :a6038 :a6038. :a6039 :a6039 :a6039. :a6040 :a6040 :a6040. :a6041 :a6041 :a6041. :a6042 :a6042 :a6042. :a6043 :a6043 :a6043. :a6044 :a6044 :a6044. :a6045 :a6045 :a6045. :a6046 :a6046 :a6046. :a6047 :a6047 :a6047. :a6048 :a6048 :a6048. :a6049 :a6049 :a6049. :a6050 :a6050 :a6050. :a6051 :a6051 :a6051. :a6052 :a6052 :a6052. :a6053 :a6053 :a6053. :a6054 :a6054 :a6054. :a6055 :a6055 :a6055. :a6056 :a6056 :a6056. :a6057 :a6057 :a6057. :a6058 :a6058 :a6058. :a6059 :a6059 :a6059. :a6060 :a6060 :a6060. :a6061 :a6061 :a6061. :a6062 :a6062 :a6062. :a6063 :a6063 :a6063. :a6064 :a6064 :a6064. :a6065 :a6065 :a6065. :a6066 :a6066 :a6066. :a6067 :a6067 :a6067. :a6068 :a6068 :a6068. :a6069 :a6069 :a6069. :a6070 :a6070 :a6070. :a6071 :a6071 :a6071. :a6072 :a6072 :a6072. :a6073 :a6073 :a6073. :a6074 :a6074 :a6074. :a6075 :a6075 :a6075. :a6076 :a6076 :a6076. :a6077 :a6077 :a6077. :a6078 :a6078 :a6078. :a6079 :a6079 :a6079. :a6080 :a6080 :a6080. :a6081 :a6081 :a6081. :a6082 :a6082 :a6082. :a6083 :a6083 :a6083. :a6084 :a6084 :a6084. :a6085 :a6085 :a6085. :a6086 :a6086 :a6086. :a6087 :a6087 :a6087. :a6088 :a6088 :a6088. :a6089 :a6089 :a6089. :a6090 :a6090 :a6090. :a6091 :a6091 :a6091. :a6092 :a6092 :a6092. :a6093 :a6093 :a6093. :a6094 :a6094 :a6094. :a6095 :a6095 :a6095. :a6096 :a6096 :a6096. :a6097 :a6097 :a6097. :a6098 :a6098 :a6098. :a6099 :a6099 :a6099. :a6100 :a6100 :a6100. :a6101 :a6101 :a6101. :a6102 :a6102 :a6102. :a6103 :a6103 :a6103. :a6104 :a6104 :a6104. :a6105 :a6105 :a6105. :a6106 :a6106 :a6106. :a6107 :a6107 :a6107. :a6108 :a6108 :a6108. :a6109 :a6109 :a6109. :a6110 :a6110 :a6110. :a6111 :a6111 :a6111. :a6112 :a6112 :a6112. :a6113 :a6113 :a6113. :a6114 :a6114 :a6114. :a6115 :a6115 :a6115. :a6116 :a6116 :a6116. :a6117 :a6117 :a6117. :a6118 :a6118 :a6118. :a6119 :a6119 :a6119. :a6120 :a6120 :a6120. :a6121 :a6121 :a6121. :a6122 :a6122 :a6122. :a6123 :a6123 :a6123. :a6124 :a6124 :a6124. :a6125 :a6125 :a6125. :a6126 :a6126 :a6126. :a6127 :a6127 :a6127. :a6128 :a6128 :a6128. :a6129 :a6129 :a6129. :a6130 :a6130 :a6130. :a6131 :a6131 :a6131. :a6132 :a6132 :a6132. :a6133 :a6133 :a6133. :a6134 :a6134 :a6134. :a6135 :a6135 :a6135. :a6136 :a6136 :a6136. :a6137 :a6137 :a6137. :a6138 :a6138 :a6138. :a6139 :a6139 :a6139. :a6140 :a6140 :a6140. :a6141 :a6141 :a6141. :a6142 :a6142 :a6142. :a6143 :a6143 :a6143. :a6144 :a6144 :a6144. :a6145 :a6145 :a6145. :a6146 :a6146 :a6146. :a6147 :a6147 :a6147. :a6148 :a6148 :a6148. :a6149 :a6149 :a6149. :a6150 :a6150 :a6150. :a6151 :a6151 :a6151. :a6152 :a6152 :a6152. :a6153 :a6153 :a6153. :a6154 :a6154 :a6154. :a6155 :a6155 :a6155. :a6156 :a6156 :a6156. :a6157 :a6157 :a6157. :a6158 :a6158 :a6158. :a6159 :a6159 :a6159. :a6160 :a6160 :a6160. :a6161 :a6161 :a6161. :a6162 :a6162 :a6162. :a6163 :a6163 :a6163. :a6164 :a6164 :a6164. :a6165 :a6165 :a6165. :a6166 :a6166 :a6166. :a6167 :a6167 :a6167. :a6168 :a6168 :a6168. :a6169 :a6169 :a6169. :a6170 :a6170 :a6170. :a6171 :a6171 :a6171. :a6172 :a6172 :a6172. :a6173 :a6173 :a6173. :a6174 :a6174 :a6174. :a6175 :a6175 :a6175. :a6176 :a6176 :a6176. :a6177 :a6177 :a6177. :a6178 :a6178 :a6178. :a6179 :a6179 :a6179. :a6180 :a6180 :a6180. :a6181 :a6181 :a6181. :a6182 :a6182 :a6182. :a6183 :a6183 :a6183. :a6184 :a6184 :a6184. :a6185 :a6185 :a6185. :a6186 :a6186 :a6186. :a6187 :a6187 :a6187. :a6188 :a6188 :a6188. :a6189 :a6189 :a6189. :a6190 :a6190 :a6190. :a6191 :a6191 :a6191. :a6192 :a6192 :a6192. :a6193 :a6193 :a6193. :a6194 :a6194 :a6194. :a6195 :a6195 :a6195. :a6196 :a6196 :a6196. :a6197 :a6197 :a6197. :a6198 :a6198 :a6198. :a6199 :a6199 :a6199. :a6200 :a6200 :a6200. :a6201 :a6201 :a6201. :a6202 :a6202 :a6202. :a6203 :a6203 :a6203. :a6204 :a6204 :a6204. :a6205 :a6205 :a6205. :a6206 :a6206 :a6206. :a6207 :a6207 :a6207. :a6208 :a6208 :a6208. :a6209 :a6209 :a6209. :a6210 :a6210 :a6210. :a6211 :a6211 :a6211. :a6212 :a6212 :a6212. :a6213 :a6213 :a6213. :a6214 :a6214 :a6214. :a6215 :a6215 :a6215. :a6216 :a6216 :a6216. :a6217 :a6217 :a6217. :a6218 :a6218 :a6218. :a6219 :a6219 :a6219. :a6220 :a6220 :a6220. :a6221 :a6221 :a6221. :a6222 :a6222 :a6222. :a6223 :a6223 :a6223. :a6224 :a6224 :a6224. :a6225 :a6225 :a6225. :a6226 :a6226 :a6226. :a6227 :a6227 :a6227. :a6228 :a6228 :a6228. :a6229 :a6229 :a6229. :a6230 :a6230 :a6230. :a6231 :a6231 :a6231. :a6232 :a6232 :a6232. :a6233 :a6233 :a6233. :a6234 :a6234 :a6234. :a6235 :a6235 :a6235. :a6236 :a6236 :a6236. :a6237 :a6237 :a6237. :a6238 :a6238 :a6238. :a6239 :a6239 :a6239. :a6240 :a6240 :a6240. :a6241 :a6241 :a6241. :a6242 :a6242 :a6242. :a6243 :a6243 :a6243. :a6244 :a6244 :a6244. :a6245 :a6245 :a6245. :a6246 :a6246 :a6246. :a6247 :a6247 :a6247. :a6248 :a6248 :a6248. :a6249 :a6249 :a6249. :a6250 :a6250 :a6250. :a6251 :a6251 :a6251. :a6252 :a6252 :a6252. :a6253 :a6253 :a6253. :a6254 :a6254 :a6254. :a6255 :a6255 :a6255. :a6256 :a6256 :a6256. :a6257 :a6257 :a6257. :a6258 :a6258 :a6258. :a6259 :a6259 :a6259. :a6260 :a6260 :a6260. :a6261 :a6261 :a6261. :a6262 :a6262 :a6262. :a6263 :a6263 :a6263. :a6264 :a6264 :a6264. :a6265 :a6265 :a6265. :a6266 :a6266 :a6266. :a6267 :a6267 :a6267. :a6268 :a6268 :a6268. :a6269 :a6269 :a6269. :a6270 :a6270 :a6270. :a6271 :a6271 :a6271. :a6272 :a6272 :a6272. :a6273 :a6273 :a6273. :a6274 :a6274 :a6274. :a6275 :a6275 :a6275. :a6276 :a6276 :a6276. :a6277 :a6277 :a6277. :a6278 :a6278 :a6278. :a6279 :a6279 :a6279. :a6280 :a6280 :a6280. :a6281 :a6281 :a6281. :a6282 :a6282 :a6282. :a6283 :a6283 :a6283. :a6284 :a6284 :a6284. :a6285 :a6285 :a6285. :a6286 :a6286 :a6286. :a6287 :a6287 :a6287. :a6288 :a6288 :a6288. :a6289 :a6289 :a6289. :a6290 :a6290 :a6290. :a6291 :a6291 :a6291. :a6292 :a6292 :a6292. :a6293 :a6293 :a6293. :a6294 :a6294 :a6294. :a6295 :a6295 :a6295. :a6296 :a6296 :a6296. :a6297 :a6297 :a6297. :a6298 :a6298 :a6298. :a6299 :a6299 :a6299. :a6300 :a6300 :a6300. :a6301 :a6301 :a6301. :a6302 :a6302 :a6302. :a6303 :a6303 :a6303. :a6304 :a6304 :a6304. :a6305 :a6305 :a6305. :a6306 :a6306 :a6306. :a6307 :a6307 :a6307. :a6308 :a6308 :a6308. :a6309 :a6309 :a6309. :a6310 :a6310 :a6310. :a6311 :a6311 :a6311. :a6312 :a6312 :a6312. :a6313 :a6313 :a6313. :a6314 :a6314 :a6314. :a6315 :a6315 :a6315. :a6316 :a6316 :a6316. :a6317 :a6317 :a6317. :a6318 :a6318 :a6318. :a6319 :a6319 :a6319. :a6320 :a6320 :a6320. :a6321 :a6321 :a6321. :a6322 :a6322 :a6322. :a6323 :a6323 :a6323. :a6324 :a6324 :a6324. :a6325 :a6325 :a6325. :a6326 :a6326 :a6326. :a6327 :a6327 :a6327. :a6328 :a6328 :a6328. :a6329 :a6329 :a6329. :a6330 :a6330 :a6330. :a6331 :a6331 :a6331. :a6332 :a6332 :a6332. :a6333 :a6333 :a6333. :a6334 :a6334 :a6334. :a6335 :a6335 :a6335. :a6336 :a6336 :a6336. :a6337 :a6337 :a6337. :a6338 :a6338 :a6338. :a6339 :a6339 :a6339. :a6340 :a6340 :a6340. :a6341 :a6341 :a6341. :a6342 :a6342 :a6342. :a6343 :a6343 :a6343. :a6344 :a6344 :a6344. :a6345 :a6345 :a6345. :a6346 :a6346 :a6346. :a6347 :a6347 :a6347. :a6348 :a6348 :a6348. :a6349 :a6349 :a6349. :a6350 :a6350 :a6350. :a6351 :a6351 :a6351. :a6352 :a6352 :a6352. :a6353 :a6353 :a6353. :a6354 :a6354 :a6354. :a6355 :a6355 :a6355. :a6356 :a6356 :a6356. :a6357 :a6357 :a6357. :a6358 :a6358 :a6358. :a6359 :a6359 :a6359. :a6360 :a6360 :a6360. :a6361 :a6361 :a6361. :a6362 :a6362 :a6362. :a6363 :a6363 :a6363. :a6364 :a6364 :a6364. :a6365 :a6365 :a6365. :a6366 :a6366 :a6366. :a6367 :a6367 :a6367. :a6368 :a6368 :a6368. :a6369 :a6369 :a6369. :a6370 :a6370 :a6370. :a6371 :a6371 :a6371. :a6372 :a6372 :a6372. :a6373 :a6373 :a6373. :a6374 :a6374 :a6374. :a6375 :a6375 :a6375. :a6376 :a6376 :a6376. :a6377 :a6377 :a6377. :a6378 :a6378 :a6378. :a6379 :a6379 :a6379. :a6380 :a6380 :a6380. :a6381 :a6381 :a6381. :a6382 :a6382 :a6382. :a6383 :a6383 :a6383. :a6384 :a6384 :a6384. :a6385 :a6385 :a6385. :a6386 :a6386 :a6386. :a6387 :a6387 :a6387. :a6388 :a6388 :a6388. :a6389 :a6389 :a6389. :a6390 :a6390 :a6390. :a6391 :a6391 :a6391. :a6392 :a6392 :a6392. :a6393 :a6393 :a6393. :a6394 :a6394 :a6394. :a6395 :a6395 :a6395. :a6396 :a6396 :a6396. :a6397 :a6397 :a6397. :a6398 :a6398 :a6398. :a6399 :a6399 :a6399. :a6400 :a6400 :a6400. :a6401 :a6401 :a6401. :a6402 :a6402 :a6402. :a6403 :a6403 :a6403. :a6404 :a6404 :a6404. :a6405 :a6405 :a6405. :a6406 :a6406 :a6406. :a6407 :a6407 :a6407. :a6408 :a6408 :a6408. :a6409 :a6409 :a6409. :a6410 :a6410 :a6410. :a6411 :a6411 :a6411. :a6412 :a6412 :a6412. :a6413 :a6413 :a6413. :a6414 :a6414 :a6414. :a6415 :a6415 :a6415. :a6416 :a6416 :a6416. :a6417 :a6417 :a6417. :a6418 :a6418 :a6418. :a6419 :a6419 :a6419. :a6420 :a6420 :a6420. :a6421 :a6421 :a6421. :a6422 :a6422 :a6422. :a6423 :a6423 :a6423. :a6424 :a6424 :a6424. :a6425 :a6425 :a6425. :a6426 :a6426 :a6426. :a6427 :a6427 :a6427. :a6428 :a6428 :a6428. :a6429 :a6429 :a6429. :a6430 :a6430 :a6430. :a6431 :a6431 :a6431. :a6432 :a6432 :a6432. :a6433 :a6433 :a6433. :a6434 :a6434 :a6434. :a6435 :a6435 :a6435. :a6436 :a6436 :a6436. :a6437 :a6437 :a6437. :a6438 :a6438 :a6438. :a6439 :a6439 :a6439. :a6440 :a6440 :a6440. :a6441 :a6441 :a6441. :a6442 :a6442 :a6442. :a6443 :a6443 :a6443. :a6444 :a6444 :a6444. :a6445 :a6445 :a6445. :a6446 :a6446 :a6446. :a6447 :a6447 :a6447. :a6448 :a6448 :a6448. :a6449 :a6449 :a6449. :a6450 :a6450 :a6450. :a6451 :a6451 :a6451. :a6452 :a6452 :a6452. :a6453 :a6453 :a6453. :a6454 :a6454 :a6454. :a6455 :a6455 :a6455. :a6456 :a6456 :a6456. :a6457 :a6457 :a6457. :a6458 :a6458 :a6458. :a6459 :a6459 :a6459. :a6460 :a6460 :a6460. :a6461 :a6461 :a6461. :a6462 :a6462 :a6462. :a6463 :a6463 :a6463. :a6464 :a6464 :a6464. :a6465 :a6465 :a6465. :a6466 :a6466 :a6466. :a6467 :a6467 :a6467. :a6468 :a6468 :a6468. :a6469 :a6469 :a6469. :a6470 :a6470 :a6470. :a6471 :a6471 :a6471. :a6472 :a6472 :a6472. :a6473 :a6473 :a6473. :a6474 :a6474 :a6474. :a6475 :a6475 :a6475. :a6476 :a6476 :a6476. :a6477 :a6477 :a6477. :a6478 :a6478 :a6478. :a6479 :a6479 :a6479. :a6480 :a6480 :a6480. :a6481 :a6481 :a6481. :a6482 :a6482 :a6482. :a6483 :a6483 :a6483. :a6484 :a6484 :a6484. :a6485 :a6485 :a6485. :a6486 :a6486 :a6486. :a6487 :a6487 :a6487. :a6488 :a6488 :a6488. :a6489 :a6489 :a6489. :a6490 :a6490 :a6490. :a6491 :a6491 :a6491. :a6492 :a6492 :a6492. :a6493 :a6493 :a6493. :a6494 :a6494 :a6494. :a6495 :a6495 :a6495. :a6496 :a6496 :a6496. :a6497 :a6497 :a6497. :a6498 :a6498 :a6498. :a6499 :a6499 :a6499. :a6500 :a6500 :a6500. :a6501 :a6501 :a6501. :a6502 :a6502 :a6502. :a6503 :a6503 :a6503. :a6504 :a6504 :a6504. :a6505 :a6505 :a6505. :a6506 :a6506 :a6506. :a6507 :a6507 :a6507. :a6508 :a6508 :a6508. :a6509 :a6509 :a6509. :a6510 :a6510 :a6510. :a6511 :a6511 :a6511. :a6512 :a6512 :a6512. :a6513 :a6513 :a6513. :a6514 :a6514 :a6514. :a6515 :a6515 :a6515. :a6516 :a6516 :a6516. :a6517 :a6517 :a6517. :a6518 :a6518 :a6518. :a6519 :a6519 :a6519. :a6520 :a6520 :a6520. :a6521 :a6521 :a6521. :a6522 :a6522 :a6522. :a6523 :a6523 :a6523. :a6524 :a6524 :a6524. :a6525 :a6525 :a6525. :a6526 :a6526 :a6526. :a6527 :a6527 :a6527. :a6528 :a6528 :a6528. :a6529 :a6529 :a6529. :a6530 :a6530 :a6530. :a6531 :a6531 :a6531. :a6532 :a6532 :a6532. :a6533 :a6533 :a6533. :a6534 :a6534 :a6534. :a6535 :a6535 :a6535. :a6536 :a6536 :a6536. :a6537 :a6537 :a6537. :a6538 :a6538 :a6538. :a6539 :a6539 :a6539. :a6540 :a6540 :a6540. :a6541 :a6541 :a6541. :a6542 :a6542 :a6542. :a6543 :a6543 :a6543. :a6544 :a6544 :a6544. :a6545 :a6545 :a6545. :a6546 :a6546 :a6546. :a6547 :a6547 :a6547. :a6548 :a6548 :a6548. :a6549 :a6549 :a6549. :a6550 :a6550 :a6550. :a6551 :a6551 :a6551. :a6552 :a6552 :a6552. :a6553 :a6553 :a6553. :a6554 :a6554 :a6554. :a6555 :a6555 :a6555. :a6556 :a6556 :a6556. :a6557 :a6557 :a6557. :a6558 :a6558 :a6558. :a6559 :a6559 :a6559. :a6560 :a6560 :a6560. :a6561 :a6561 :a6561. :a6562 :a6562 :a6562. :a6563 :a6563 :a6563. :a6564 :a6564 :a6564. :a6565 :a6565 :a6565. :a6566 :a6566 :a6566. :a6567 :a6567 :a6567. :a6568 :a6568 :a6568. :a6569 :a6569 :a6569. :a6570 :a6570 :a6570. :a6571 :a6571 :a6571. :a6572 :a6572 :a6572. :a6573 :a6573 :a6573. :a6574 :a6574 :a6574. :a6575 :a6575 :a6575. :a6576 :a6576 :a6576. :a6577 :a6577 :a6577. :a6578 :a6578 :a6578. :a6579 :a6579 :a6579. :a6580 :a6580 :a6580. :a6581 :a6581 :a6581. :a6582 :a6582 :a6582. :a6583 :a6583 :a6583. :a6584 :a6584 :a6584. :a6585 :a6585 :a6585. :a6586 :a6586 :a6586. :a6587 :a6587 :a6587. :a6588 :a6588 :a6588. :a6589 :a6589 :a6589. :a6590 :a6590 :a6590. :a6591 :a6591 :a6591. :a6592 :a6592 :a6592. :a6593 :a6593 :a6593. :a6594 :a6594 :a6594. :a6595 :a6595 :a6595. :a6596 :a6596 :a6596. :a6597 :a6597 :a6597. :a6598 :a6598 :a6598. :a6599 :a6599 :a6599. :a6600 :a6600 :a6600. :a6601 :a6601 :a6601. :a6602 :a6602 :a6602. :a6603 :a6603 :a6603. :a6604 :a6604 :a6604. :a6605 :a6605 :a6605. :a6606 :a6606 :a6606. :a6607 :a6607 :a6607. :a6608 :a6608 :a6608. :a6609 :a6609 :a6609. :a6610 :a6610 :a6610. :a6611 :a6611 :a6611. :a6612 :a6612 :a6612. :a6613 :a6613 :a6613. :a6614 :a6614 :a6614. :a6615 :a6615 :a6615. :a6616 :a6616 :a6616. :a6617 :a6617 :a6617. :a6618 :a6618 :a6618. :a6619 :a6619 :a6619. :a6620 :a6620 :a6620. :a6621 :a6621 :a6621. :a6622 :a6622 :a6622. :a6623 :a6623 :a6623. :a6624 :a6624 :a6624. :a6625 :a6625 :a6625. :a6626 :a6626 :a6626. :a6627 :a6627 :a6627. :a6628 :a6628 :a6628. :a6629 :a6629 :a6629. :a6630 :a6630 :a6630. :a6631 :a6631 :a6631. :a6632 :a6632 :a6632. :a6633 :a6633 :a6633. :a6634 :a6634 :a6634. :a6635 :a6635 :a6635. :a6636 :a6636 :a6636. :a6637 :a6637 :a6637. :a6638 :a6638 :a6638. :a6639 :a6639 :a6639. :a6640 :a6640 :a6640. :a6641 :a6641 :a6641. :a6642 :a6642 :a6642. :a6643 :a6643 :a6643. :a6644 :a6644 :a6644. :a6645 :a6645 :a6645. :a6646 :a6646 :a6646. :a6647 :a6647 :a6647. :a6648 :a6648 :a6648. :a6649 :a6649 :a6649. :a6650 :a6650 :a6650. :a6651 :a6651 :a6651. :a6652 :a6652 :a6652. :a6653 :a6653 :a6653. :a6654 :a6654 :a6654. :a6655 :a6655 :a6655. :a6656 :a6656 :a6656. :a6657 :a6657 :a6657. :a6658 :a6658 :a6658. :a6659 :a6659 :a6659. :a6660 :a6660 :a6660. :a6661 :a6661 :a6661. :a6662 :a6662 :a6662. :a6663 :a6663 :a6663. :a6664 :a6664 :a6664. :a6665 :a6665 :a6665. :a6666 :a6666 :a6666. :a6667 :a6667 :a6667. :a6668 :a6668 :a6668. :a6669 :a6669 :a6669. :a6670 :a6670 :a6670. :a6671 :a6671 :a6671. :a6672 :a6672 :a6672. :a6673 :a6673 :a6673. :a6674 :a6674 :a6674. :a6675 :a6675 :a6675. :a6676 :a6676 :a6676. :a6677 :a6677 :a6677. :a6678 :a6678 :a6678. :a6679 :a6679 :a6679. :a6680 :a6680 :a6680. :a6681 :a6681 :a6681. :a6682 :a6682 :a6682. :a6683 :a6683 :a6683. :a6684 :a6684 :a6684. :a6685 :a6685 :a6685. :a6686 :a6686 :a6686. :a6687 :a6687 :a6687. :a6688 :a6688 :a6688. :a6689 :a6689 :a6689. :a6690 :a6690 :a6690. :a6691 :a6691 :a6691. :a6692 :a6692 :a6692. :a6693 :a6693 :a6693. :a6694 :a6694 :a6694. :a6695 :a6695 :a6695. :a6696 :a6696 :a6696. :a6697 :a6697 :a6697. :a6698 :a6698 :a6698. :a6699 :a6699 :a6699. :a6700 :a6700 :a6700. :a6701 :a6701 :a6701. :a6702 :a6702 :a6702. :a6703 :a6703 :a6703. :a6704 :a6704 :a6704. :a6705 :a6705 :a6705. :a6706 :a6706 :a6706. :a6707 :a6707 :a6707. :a6708 :a6708 :a6708. :a6709 :a6709 :a6709. :a6710 :a6710 :a6710. :a6711 :a6711 :a6711. :a6712 :a6712 :a6712. :a6713 :a6713 :a6713. :a6714 :a6714 :a6714. :a6715 :a6715 :a6715. :a6716 :a6716 :a6716. :a6717 :a6717 :a6717. :a6718 :a6718 :a6718. :a6719 :a6719 :a6719. :a6720 :a6720 :a6720. :a6721 :a6721 :a6721. :a6722 :a6722 :a6722. :a6723 :a6723 :a6723. :a6724 :a6724 :a6724. :a6725 :a6725 :a6725. :a6726 :a6726 :a6726. :a6727 :a6727 :a6727. :a6728 :a6728 :a6728. :a6729 :a6729 :a6729. :a6730 :a6730 :a6730. :a6731 :a6731 :a6731. :a6732 :a6732 :a6732. :a6733 :a6733 :a6733. :a6734 :a6734 :a6734. :a6735 :a6735 :a6735. :a6736 :a6736 :a6736. :a6737 :a6737 :a6737. :a6738 :a6738 :a6738. :a6739 :a6739 :a6739. :a6740 :a6740 :a6740. :a6741 :a6741 :a6741. :a6742 :a6742 :a6742. :a6743 :a6743 :a6743. :a6744 :a6744 :a6744. :a6745 :a6745 :a6745. :a6746 :a6746 :a6746. :a6747 :a6747 :a6747. :a6748 :a6748 :a6748. :a6749 :a6749 :a6749. :a6750 :a6750 :a6750. :a6751 :a6751 :a6751. :a6752 :a6752 :a6752. :a6753 :a6753 :a6753. :a6754 :a6754 :a6754. :a6755 :a6755 :a6755. :a6756 :a6756 :a6756. :a6757 :a6757 :a6757. :a6758 :a6758 :a6758. :a6759 :a6759 :a6759. :a6760 :a6760 :a6760. :a6761 :a6761 :a6761. :a6762 :a6762 :a6762. :a6763 :a6763 :a6763. :a6764 :a6764 :a6764. :a6765 :a6765 :a6765. :a6766 :a6766 :a6766. :a6767 :a6767 :a6767. :a6768 :a6768 :a6768. :a6769 :a6769 :a6769. :a6770 :a6770 :a6770. :a6771 :a6771 :a6771. :a6772 :a6772 :a6772. :a6773 :a6773 :a6773. :a6774 :a6774 :a6774. :a6775 :a6775 :a6775. :a6776 :a6776 :a6776. :a6777 :a6777 :a6777. :a6778 :a6778 :a6778. :a6779 :a6779 :a6779. :a6780 :a6780 :a6780. :a6781 :a6781 :a6781. :a6782 :a6782 :a6782. :a6783 :a6783 :a6783. :a6784 :a6784 :a6784. :a6785 :a6785 :a6785. :a6786 :a6786 :a6786. :a6787 :a6787 :a6787. :a6788 :a6788 :a6788. :a6789 :a6789 :a6789. :a6790 :a6790 :a6790. :a6791 :a6791 :a6791. :a6792 :a6792 :a6792. :a6793 :a6793 :a6793. :a6794 :a6794 :a6794. :a6795 :a6795 :a6795. :a6796 :a6796 :a6796. :a6797 :a6797 :a6797. :a6798 :a6798 :a6798. :a6799 :a6799 :a6799. :a6800 :a6800 :a6800. :a6801 :a6801 :a6801. :a6802 :a6802 :a6802. :a6803 :a6803 :a6803. :a6804 :a6804 :a6804. :a6805 :a6805 :a6805. :a6806 :a6806 :a6806. :a6807 :a6807 :a6807. :a6808 :a6808 :a6808. :a6809 :a6809 :a6809. :a6810 :a6810 :a6810. :a6811 :a6811 :a6811. :a6812 :a6812 :a6812. :a6813 :a6813 :a6813. :a6814 :a6814 :a6814. :a6815 :a6815 :a6815. :a6816 :a6816 :a6816. :a6817 :a6817 :a6817. :a6818 :a6818 :a6818. :a6819 :a6819 :a6819. :a6820 :a6820 :a6820. :a6821 :a6821 :a6821. :a6822 :a6822 :a6822. :a6823 :a6823 :a6823. :a6824 :a6824 :a6824. :a6825 :a6825 :a6825. :a6826 :a6826 :a6826. :a6827 :a6827 :a6827. :a6828 :a6828 :a6828. :a6829 :a6829 :a6829. :a6830 :a6830 :a6830. :a6831 :a6831 :a6831. :a6832 :a6832 :a6832. :a6833 :a6833 :a6833. :a6834 :a6834 :a6834. :a6835 :a6835 :a6835. :a6836 :a6836 :a6836. :a6837 :a6837 :a6837. :a6838 :a6838 :a6838. :a6839 :a6839 :a6839. :a6840 :a6840 :a6840. :a6841 :a6841 :a6841. :a6842 :a6842 :a6842. :a6843 :a6843 :a6843. :a6844 :a6844 :a6844. :a6845 :a6845 :a6845. :a6846 :a6846 :a6846. :a6847 :a6847 :a6847. :a6848 :a6848 :a6848. :a6849 :a6849 :a6849. :a6850 :a6850 :a6850. :a6851 :a6851 :a6851. :a6852 :a6852 :a6852. :a6853 :a6853 :a6853. :a6854 :a6854 :a6854. :a6855 :a6855 :a6855. :a6856 :a6856 :a6856. :a6857 :a6857 :a6857. :a6858 :a6858 :a6858. :a6859 :a6859 :a6859. :a6860 :a6860 :a6860. :a6861 :a6861 :a6861. :a6862 :a6862 :a6862. :a6863 :a6863 :a6863. :a6864 :a6864 :a6864. :a6865 :a6865 :a6865. :a6866 :a6866 :a6866. :a6867 :a6867 :a6867. :a6868 :a6868 :a6868. :a6869 :a6869 :a6869. :a6870 :a6870 :a6870. :a6871 :a6871 :a6871. :a6872 :a6872 :a6872. :a6873 :a6873 :a6873. :a6874 :a6874 :a6874. :a6875 :a6875 :a6875. :a6876 :a6876 :a6876. :a6877 :a6877 :a6877. :a6878 :a6878 :a6878. :a6879 :a6879 :a6879. :a6880 :a6880 :a6880. :a6881 :a6881 :a6881. :a6882 :a6882 :a6882. :a6883 :a6883 :a6883. :a6884 :a6884 :a6884. :a6885 :a6885 :a6885. :a6886 :a6886 :a6886. :a6887 :a6887 :a6887. :a6888 :a6888 :a6888. :a6889 :a6889 :a6889. :a6890 :a6890 :a6890. :a6891 :a6891 :a6891. :a6892 :a6892 :a6892. :a6893 :a6893 :a6893. :a6894 :a6894 :a6894. :a6895 :a6895 :a6895. :a6896 :a6896 :a6896. :a6897 :a6897 :a6897. :a6898 :a6898 :a6898. :a6899 :a6899 :a6899. :a6900 :a6900 :a6900. :a6901 :a6901 :a6901. :a6902 :a6902 :a6902. :a6903 :a6903 :a6903. :a6904 :a6904 :a6904. :a6905 :a6905 :a6905. :a6906 :a6906 :a6906. :a6907 :a6907 :a6907. :a6908 :a6908 :a6908. :a6909 :a6909 :a6909. :a6910 :a6910 :a6910. :a6911 :a6911 :a6911. :a6912 :a6912 :a6912. :a6913 :a6913 :a6913. :a6914 :a6914 :a6914. :a6915 :a6915 :a6915. :a6916 :a6916 :a6916. :a6917 :a6917 :a6917. :a6918 :a6918 :a6918. :a6919 :a6919 :a6919. :a6920 :a6920 :a6920. :a6921 :a6921 :a6921. :a6922 :a6922 :a6922. :a6923 :a6923 :a6923. :a6924 :a6924 :a6924. :a6925 :a6925 :a6925. :a6926 :a6926 :a6926. :a6927 :a6927 :a6927. :a6928 :a6928 :a6928. :a6929 :a6929 :a6929. :a6930 :a6930 :a6930. :a6931 :a6931 :a6931. :a6932 :a6932 :a6932. :a6933 :a6933 :a6933. :a6934 :a6934 :a6934. :a6935 :a6935 :a6935. :a6936 :a6936 :a6936. :a6937 :a6937 :a6937. :a6938 :a6938 :a6938. :a6939 :a6939 :a6939. :a6940 :a6940 :a6940. :a6941 :a6941 :a6941. :a6942 :a6942 :a6942. :a6943 :a6943 :a6943. :a6944 :a6944 :a6944. :a6945 :a6945 :a6945. :a6946 :a6946 :a6946. :a6947 :a6947 :a6947. :a6948 :a6948 :a6948. :a6949 :a6949 :a6949. :a6950 :a6950 :a6950. :a6951 :a6951 :a6951. :a6952 :a6952 :a6952. :a6953 :a6953 :a6953. :a6954 :a6954 :a6954. :a6955 :a6955 :a6955. :a6956 :a6956 :a6956. :a6957 :a6957 :a6957. :a6958 :a6958 :a6958. :a6959 :a6959 :a6959. :a6960 :a6960 :a6960. :a6961 :a6961 :a6961. :a6962 :a6962 :a6962. :a6963 :a6963 :a6963. :a6964 :a6964 :a6964. :a6965 :a6965 :a6965. :a6966 :a6966 :a6966. :a6967 :a6967 :a6967. :a6968 :a6968 :a6968. :a6969 :a6969 :a6969. :a6970 :a6970 :a6970. :a6971 :a6971 :a6971. :a6972 :a6972 :a6972. :a6973 :a6973 :a6973. :a6974 :a6974 :a6974. :a6975 :a6975 :a6975. :a6976 :a6976 :a6976. :a6977 :a6977 :a6977. :a6978 :a6978 :a6978. :a6979 :a6979 :a6979. :a6980 :a6980 :a6980. :a6981 :a6981 :a6981. :a6982 :a6982 :a6982. :a6983 :a6983 :a6983. :a6984 :a6984 :a6984. :a6985 :a6985 :a6985. :a6986 :a6986 :a6986. :a6987 :a6987 :a6987. :a6988 :a6988 :a6988. :a6989 :a6989 :a6989. :a6990 :a6990 :a6990. :a6991 :a6991 :a6991. :a6992 :a6992 :a6992. :a6993 :a6993 :a6993. :a6994 :a6994 :a6994. :a6995 :a6995 :a6995. :a6996 :a6996 :a6996. :a6997 :a6997 :a6997. :a6998 :a6998 :a6998. :a6999 :a6999 :a6999. :a7000 :a7000 :a7000. :a7001 :a7001 :a7001. :a7002 :a7002 :a7002. :a7003 :a7003 :a7003. :a7004 :a7004 :a7004. :a7005 :a7005 :a7005. :a7006 :a7006 :a7006. :a7007 :a7007 :a7007. :a7008 :a7008 :a7008. :a7009 :a7009 :a7009. :a7010 :a7010 :a7010. :a7011 :a7011 :a7011. :a7012 :a7012 :a7012. :a7013 :a7013 :a7013. :a7014 :a7014 :a7014. :a7015 :a7015 :a7015. :a7016 :a7016 :a7016. :a7017 :a7017 :a7017. :a7018 :a7018 :a7018. :a7019 :a7019 :a7019. :a7020 :a7020 :a7020. :a7021 :a7021 :a7021. :a7022 :a7022 :a7022. :a7023 :a7023 :a7023. :a7024 :a7024 :a7024. :a7025 :a7025 :a7025. :a7026 :a7026 :a7026. :a7027 :a7027 :a7027. :a7028 :a7028 :a7028. :a7029 :a7029 :a7029. :a7030 :a7030 :a7030. :a7031 :a7031 :a7031. :a7032 :a7032 :a7032. :a7033 :a7033 :a7033. :a7034 :a7034 :a7034. :a7035 :a7035 :a7035. :a7036 :a7036 :a7036. :a7037 :a7037 :a7037. :a7038 :a7038 :a7038. :a7039 :a7039 :a7039. :a7040 :a7040 :a7040. :a7041 :a7041 :a7041. :a7042 :a7042 :a7042. :a7043 :a7043 :a7043. :a7044 :a7044 :a7044. :a7045 :a7045 :a7045. :a7046 :a7046 :a7046. :a7047 :a7047 :a7047. :a7048 :a7048 :a7048. :a7049 :a7049 :a7049. :a7050 :a7050 :a7050. :a7051 :a7051 :a7051. :a7052 :a7052 :a7052. :a7053 :a7053 :a7053. :a7054 :a7054 :a7054. :a7055 :a7055 :a7055. :a7056 :a7056 :a7056. :a7057 :a7057 :a7057. :a7058 :a7058 :a7058. :a7059 :a7059 :a7059. :a7060 :a7060 :a7060. :a7061 :a7061 :a7061. :a7062 :a7062 :a7062. :a7063 :a7063 :a7063. :a7064 :a7064 :a7064. :a7065 :a7065 :a7065. :a7066 :a7066 :a7066. :a7067 :a7067 :a7067. :a7068 :a7068 :a7068. :a7069 :a7069 :a7069. :a7070 :a7070 :a7070. :a7071 :a7071 :a7071. :a7072 :a7072 :a7072. :a7073 :a7073 :a7073. :a7074 :a7074 :a7074. :a7075 :a7075 :a7075. :a7076 :a7076 :a7076. :a7077 :a7077 :a7077. :a7078 :a7078 :a7078. :a7079 :a7079 :a7079. :a7080 :a7080 :a7080. :a7081 :a7081 :a7081. :a7082 :a7082 :a7082. :a7083 :a7083 :a7083. :a7084 :a7084 :a7084. :a7085 :a7085 :a7085. :a7086 :a7086 :a7086. :a7087 :a7087 :a7087. :a7088 :a7088 :a7088. :a7089 :a7089 :a7089. :a7090 :a7090 :a7090. :a7091 :a7091 :a7091. :a7092 :a7092 :a7092. :a7093 :a7093 :a7093. :a7094 :a7094 :a7094. :a7095 :a7095 :a7095. :a7096 :a7096 :a7096. :a7097 :a7097 :a7097. :a7098 :a7098 :a7098. :a7099 :a7099 :a7099. :a7100 :a7100 :a7100. :a7101 :a7101 :a7101. :a7102 :a7102 :a7102. :a7103 :a7103 :a7103. :a7104 :a7104 :a7104. :a7105 :a7105 :a7105. :a7106 :a7106 :a7106. :a7107 :a7107 :a7107. :a7108 :a7108 :a7108. :a7109 :a7109 :a7109. :a7110 :a7110 :a7110. :a7111 :a7111 :a7111. :a7112 :a7112 :a7112. :a7113 :a7113 :a7113. :a7114 :a7114 :a7114. :a7115 :a7115 :a7115. :a7116 :a7116 :a7116. :a7117 :a7117 :a7117. :a7118 :a7118 :a7118. :a7119 :a7119 :a7119. :a7120 :a7120 :a7120. :a7121 :a7121 :a7121. :a7122 :a7122 :a7122. :a7123 :a7123 :a7123. :a7124 :a7124 :a7124. :a7125 :a7125 :a7125. :a7126 :a7126 :a7126. :a7127 :a7127 :a7127. :a7128 :a7128 :a7128. :a7129 :a7129 :a7129. :a7130 :a7130 :a7130. :a7131 :a7131 :a7131. :a7132 :a7132 :a7132. :a7133 :a7133 :a7133. :a7134 :a7134 :a7134. :a7135 :a7135 :a7135. :a7136 :a7136 :a7136. :a7137 :a7137 :a7137. :a7138 :a7138 :a7138. :a7139 :a7139 :a7139. :a7140 :a7140 :a7140. :a7141 :a7141 :a7141. :a7142 :a7142 :a7142. :a7143 :a7143 :a7143. :a7144 :a7144 :a7144. :a7145 :a7145 :a7145. :a7146 :a7146 :a7146. :a7147 :a7147 :a7147. :a7148 :a7148 :a7148. :a7149 :a7149 :a7149. :a7150 :a7150 :a7150. :a7151 :a7151 :a7151. :a7152 :a7152 :a7152. :a7153 :a7153 :a7153. :a7154 :a7154 :a7154. :a7155 :a7155 :a7155. :a7156 :a7156 :a7156. :a7157 :a7157 :a7157. :a7158 :a7158 :a7158. :a7159 :a7159 :a7159. :a7160 :a7160 :a7160. :a7161 :a7161 :a7161. :a7162 :a7162 :a7162. :a7163 :a7163 :a7163. :a7164 :a7164 :a7164. :a7165 :a7165 :a7165. :a7166 :a7166 :a7166. :a7167 :a7167 :a7167. :a7168 :a7168 :a7168. :a7169 :a7169 :a7169. :a7170 :a7170 :a7170. :a7171 :a7171 :a7171. :a7172 :a7172 :a7172. :a7173 :a7173 :a7173. :a7174 :a7174 :a7174. :a7175 :a7175 :a7175. :a7176 :a7176 :a7176. :a7177 :a7177 :a7177. :a7178 :a7178 :a7178. :a7179 :a7179 :a7179. :a7180 :a7180 :a7180. :a7181 :a7181 :a7181. :a7182 :a7182 :a7182. :a7183 :a7183 :a7183. :a7184 :a7184 :a7184. :a7185 :a7185 :a7185. :a7186 :a7186 :a7186. :a7187 :a7187 :a7187. :a7188 :a7188 :a7188. :a7189 :a7189 :a7189. :a7190 :a7190 :a7190. :a7191 :a7191 :a7191. :a7192 :a7192 :a7192. :a7193 :a7193 :a7193. :a7194 :a7194 :a7194. :a7195 :a7195 :a7195. :a7196 :a7196 :a7196. :a7197 :a7197 :a7197. :a7198 :a7198 :a7198. :a7199 :a7199 :a7199. :a7200 :a7200 :a7200. :a7201 :a7201 :a7201. :a7202 :a7202 :a7202. :a7203 :a7203 :a7203. :a7204 :a7204 :a7204. :a7205 :a7205 :a7205. :a7206 :a7206 :a7206. :a7207 :a7207 :a7207. :a7208 :a7208 :a7208. :a7209 :a7209 :a7209. :a7210 :a7210 :a7210. :a7211 :a7211 :a7211. :a7212 :a7212 :a7212. :a7213 :a7213 :a7213. :a7214 :a7214 :a7214. :a7215 :a7215 :a7215. :a7216 :a7216 :a7216. :a7217 :a7217 :a7217. :a7218 :a7218 :a7218. :a7219 :a7219 :a7219. :a7220 :a7220 :a7220. :a7221 :a7221 :a7221. :a7222 :a7222 :a7222. :a7223 :a7223 :a7223. :a7224 :a7224 :a7224. :a7225 :a7225 :a7225. :a7226 :a7226 :a7226. :a7227 :a7227 :a7227. :a7228 :a7228 :a7228. :a7229 :a7229 :a7229. :a7230 :a7230 :a7230. :a7231 :a7231 :a7231. :a7232 :a7232 :a7232. :a7233 :a7233 :a7233. :a7234 :a7234 :a7234. :a7235 :a7235 :a7235. :a7236 :a7236 :a7236. :a7237 :a7237 :a7237. :a7238 :a7238 :a7238. :a7239 :a7239 :a7239. :a7240 :a7240 :a7240. :a7241 :a7241 :a7241. :a7242 :a7242 :a7242. :a7243 :a7243 :a7243. :a7244 :a7244 :a7244. :a7245 :a7245 :a7245. :a7246 :a7246 :a7246. :a7247 :a7247 :a7247. :a7248 :a7248 :a7248. :a7249 :a7249 :a7249. :a7250 :a7250 :a7250. :a7251 :a7251 :a7251. :a7252 :a7252 :a7252. :a7253 :a7253 :a7253. :a7254 :a7254 :a7254. :a7255 :a7255 :a7255. :a7256 :a7256 :a7256. :a7257 :a7257 :a7257. :a7258 :a7258 :a7258. :a7259 :a7259 :a7259. :a7260 :a7260 :a7260. :a7261 :a7261 :a7261. :a7262 :a7262 :a7262. :a7263 :a7263 :a7263. :a7264 :a7264 :a7264. :a7265 :a7265 :a7265. :a7266 :a7266 :a7266. :a7267 :a7267 :a7267. :a7268 :a7268 :a7268. :a7269 :a7269 :a7269. :a7270 :a7270 :a7270. :a7271 :a7271 :a7271. :a7272 :a7272 :a7272. :a7273 :a7273 :a7273. :a7274 :a7274 :a7274. :a7275 :a7275 :a7275. :a7276 :a7276 :a7276. :a7277 :a7277 :a7277. :a7278 :a7278 :a7278. :a7279 :a7279 :a7279. :a7280 :a7280 :a7280. :a7281 :a7281 :a7281. :a7282 :a7282 :a7282. :a7283 :a7283 :a7283. :a7284 :a7284 :a7284. :a7285 :a7285 :a7285. :a7286 :a7286 :a7286. :a7287 :a7287 :a7287. :a7288 :a7288 :a7288. :a7289 :a7289 :a7289. :a7290 :a7290 :a7290. :a7291 :a7291 :a7291. :a7292 :a7292 :a7292. :a7293 :a7293 :a7293. :a7294 :a7294 :a7294. :a7295 :a7295 :a7295. :a7296 :a7296 :a7296. :a7297 :a7297 :a7297. :a7298 :a7298 :a7298. :a7299 :a7299 :a7299. :a7300 :a7300 :a7300. :a7301 :a7301 :a7301. :a7302 :a7302 :a7302. :a7303 :a7303 :a7303. :a7304 :a7304 :a7304. :a7305 :a7305 :a7305. :a7306 :a7306 :a7306. :a7307 :a7307 :a7307. :a7308 :a7308 :a7308. :a7309 :a7309 :a7309. :a7310 :a7310 :a7310. :a7311 :a7311 :a7311. :a7312 :a7312 :a7312. :a7313 :a7313 :a7313. :a7314 :a7314 :a7314. :a7315 :a7315 :a7315. :a7316 :a7316 :a7316. :a7317 :a7317 :a7317. :a7318 :a7318 :a7318. :a7319 :a7319 :a7319. :a7320 :a7320 :a7320. :a7321 :a7321 :a7321. :a7322 :a7322 :a7322. :a7323 :a7323 :a7323. :a7324 :a7324 :a7324. :a7325 :a7325 :a7325. :a7326 :a7326 :a7326. :a7327 :a7327 :a7327. :a7328 :a7328 :a7328. :a7329 :a7329 :a7329. :a7330 :a7330 :a7330. :a7331 :a7331 :a7331. :a7332 :a7332 :a7332. :a7333 :a7333 :a7333. :a7334 :a7334 :a7334. :a7335 :a7335 :a7335. :a7336 :a7336 :a7336. :a7337 :a7337 :a7337. :a7338 :a7338 :a7338. :a7339 :a7339 :a7339. :a7340 :a7340 :a7340. :a7341 :a7341 :a7341. :a7342 :a7342 :a7342. :a7343 :a7343 :a7343. :a7344 :a7344 :a7344. :a7345 :a7345 :a7345. :a7346 :a7346 :a7346. :a7347 :a7347 :a7347. :a7348 :a7348 :a7348. :a7349 :a7349 :a7349. :a7350 :a7350 :a7350. :a7351 :a7351 :a7351. :a7352 :a7352 :a7352. :a7353 :a7353 :a7353. :a7354 :a7354 :a7354. :a7355 :a7355 :a7355. :a7356 :a7356 :a7356. :a7357 :a7357 :a7357. :a7358 :a7358 :a7358. :a7359 :a7359 :a7359. :a7360 :a7360 :a7360. :a7361 :a7361 :a7361. :a7362 :a7362 :a7362. :a7363 :a7363 :a7363. :a7364 :a7364 :a7364. :a7365 :a7365 :a7365. :a7366 :a7366 :a7366. :a7367 :a7367 :a7367. :a7368 :a7368 :a7368. :a7369 :a7369 :a7369. :a7370 :a7370 :a7370. :a7371 :a7371 :a7371. :a7372 :a7372 :a7372. :a7373 :a7373 :a7373. :a7374 :a7374 :a7374. :a7375 :a7375 :a7375. :a7376 :a7376 :a7376. :a7377 :a7377 :a7377. :a7378 :a7378 :a7378. :a7379 :a7379 :a7379. :a7380 :a7380 :a7380. :a7381 :a7381 :a7381. :a7382 :a7382 :a7382. :a7383 :a7383 :a7383. :a7384 :a7384 :a7384. :a7385 :a7385 :a7385. :a7386 :a7386 :a7386. :a7387 :a7387 :a7387. :a7388 :a7388 :a7388. :a7389 :a7389 :a7389. :a7390 :a7390 :a7390. :a7391 :a7391 :a7391. :a7392 :a7392 :a7392. :a7393 :a7393 :a7393. :a7394 :a7394 :a7394. :a7395 :a7395 :a7395. :a7396 :a7396 :a7396. :a7397 :a7397 :a7397. :a7398 :a7398 :a7398. :a7399 :a7399 :a7399. :a7400 :a7400 :a7400. :a7401 :a7401 :a7401. :a7402 :a7402 :a7402. :a7403 :a7403 :a7403. :a7404 :a7404 :a7404. :a7405 :a7405 :a7405. :a7406 :a7406 :a7406. :a7407 :a7407 :a7407. :a7408 :a7408 :a7408. :a7409 :a7409 :a7409. :a7410 :a7410 :a7410. :a7411 :a7411 :a7411. :a7412 :a7412 :a7412. :a7413 :a7413 :a7413. :a7414 :a7414 :a7414. :a7415 :a7415 :a7415. :a7416 :a7416 :a7416. :a7417 :a7417 :a7417. :a7418 :a7418 :a7418. :a7419 :a7419 :a7419. :a7420 :a7420 :a7420. :a7421 :a7421 :a7421. :a7422 :a7422 :a7422. :a7423 :a7423 :a7423. :a7424 :a7424 :a7424. :a7425 :a7425 :a7425. :a7426 :a7426 :a7426. :a7427 :a7427 :a7427. :a7428 :a7428 :a7428. :a7429 :a7429 :a7429. :a7430 :a7430 :a7430. :a7431 :a7431 :a7431. :a7432 :a7432 :a7432. :a7433 :a7433 :a7433. :a7434 :a7434 :a7434. :a7435 :a7435 :a7435. :a7436 :a7436 :a7436. :a7437 :a7437 :a7437. :a7438 :a7438 :a7438. :a7439 :a7439 :a7439. :a7440 :a7440 :a7440. :a7441 :a7441 :a7441. :a7442 :a7442 :a7442. :a7443 :a7443 :a7443. :a7444 :a7444 :a7444. :a7445 :a7445 :a7445. :a7446 :a7446 :a7446. :a7447 :a7447 :a7447. :a7448 :a7448 :a7448. :a7449 :a7449 :a7449. :a7450 :a7450 :a7450. :a7451 :a7451 :a7451. :a7452 :a7452 :a7452. :a7453 :a7453 :a7453. :a7454 :a7454 :a7454. :a7455 :a7455 :a7455. :a7456 :a7456 :a7456. :a7457 :a7457 :a7457. :a7458 :a7458 :a7458. :a7459 :a7459 :a7459. :a7460 :a7460 :a7460. :a7461 :a7461 :a7461. :a7462 :a7462 :a7462. :a7463 :a7463 :a7463. :a7464 :a7464 :a7464. :a7465 :a7465 :a7465. :a7466 :a7466 :a7466. :a7467 :a7467 :a7467. :a7468 :a7468 :a7468. :a7469 :a7469 :a7469. :a7470 :a7470 :a7470. :a7471 :a7471 :a7471. :a7472 :a7472 :a7472. :a7473 :a7473 :a7473. :a7474 :a7474 :a7474. :a7475 :a7475 :a7475. :a7476 :a7476 :a7476. :a7477 :a7477 :a7477. :a7478 :a7478 :a7478. :a7479 :a7479 :a7479. :a7480 :a7480 :a7480. :a7481 :a7481 :a7481. :a7482 :a7482 :a7482. :a7483 :a7483 :a7483. :a7484 :a7484 :a7484. :a7485 :a7485 :a7485. :a7486 :a7486 :a7486. :a7487 :a7487 :a7487. :a7488 :a7488 :a7488. :a7489 :a7489 :a7489. :a7490 :a7490 :a7490. :a7491 :a7491 :a7491. :a7492 :a7492 :a7492. :a7493 :a7493 :a7493. :a7494 :a7494 :a7494. :a7495 :a7495 :a7495. :a7496 :a7496 :a7496. :a7497 :a7497 :a7497. :a7498 :a7498 :a7498. :a7499 :a7499 :a7499. :a7500 :a7500 :a7500. :a7501 :a7501 :a7501. :a7502 :a7502 :a7502. :a7503 :a7503 :a7503. :a7504 :a7504 :a7504. :a7505 :a7505 :a7505. :a7506 :a7506 :a7506. :a7507 :a7507 :a7507. :a7508 :a7508 :a7508. :a7509 :a7509 :a7509. :a7510 :a7510 :a7510. :a7511 :a7511 :a7511. :a7512 :a7512 :a7512. :a7513 :a7513 :a7513. :a7514 :a7514 :a7514. :a7515 :a7515 :a7515. :a7516 :a7516 :a7516. :a7517 :a7517 :a7517. :a7518 :a7518 :a7518. :a7519 :a7519 :a7519. :a7520 :a7520 :a7520. :a7521 :a7521 :a7521. :a7522 :a7522 :a7522. :a7523 :a7523 :a7523. :a7524 :a7524 :a7524. :a7525 :a7525 :a7525. :a7526 :a7526 :a7526. :a7527 :a7527 :a7527. :a7528 :a7528 :a7528. :a7529 :a7529 :a7529. :a7530 :a7530 :a7530. :a7531 :a7531 :a7531. :a7532 :a7532 :a7532. :a7533 :a7533 :a7533. :a7534 :a7534 :a7534. :a7535 :a7535 :a7535. :a7536 :a7536 :a7536. :a7537 :a7537 :a7537. :a7538 :a7538 :a7538. :a7539 :a7539 :a7539. :a7540 :a7540 :a7540. :a7541 :a7541 :a7541. :a7542 :a7542 :a7542. :a7543 :a7543 :a7543. :a7544 :a7544 :a7544. :a7545 :a7545 :a7545. :a7546 :a7546 :a7546. :a7547 :a7547 :a7547. :a7548 :a7548 :a7548. :a7549 :a7549 :a7549. :a7550 :a7550 :a7550. :a7551 :a7551 :a7551. :a7552 :a7552 :a7552. :a7553 :a7553 :a7553. :a7554 :a7554 :a7554. :a7555 :a7555 :a7555. :a7556 :a7556 :a7556. :a7557 :a7557 :a7557. :a7558 :a7558 :a7558. :a7559 :a7559 :a7559. :a7560 :a7560 :a7560. :a7561 :a7561 :a7561. :a7562 :a7562 :a7562. :a7563 :a7563 :a7563. :a7564 :a7564 :a7564. :a7565 :a7565 :a7565. :a7566 :a7566 :a7566. :a7567 :a7567 :a7567. :a7568 :a7568 :a7568. :a7569 :a7569 :a7569. :a7570 :a7570 :a7570. :a7571 :a7571 :a7571. :a7572 :a7572 :a7572. :a7573 :a7573 :a7573. :a7574 :a7574 :a7574. :a7575 :a7575 :a7575. :a7576 :a7576 :a7576. :a7577 :a7577 :a7577. :a7578 :a7578 :a7578. :a7579 :a7579 :a7579. :a7580 :a7580 :a7580. :a7581 :a7581 :a7581. :a7582 :a7582 :a7582. :a7583 :a7583 :a7583. :a7584 :a7584 :a7584. :a7585 :a7585 :a7585. :a7586 :a7586 :a7586. :a7587 :a7587 :a7587. :a7588 :a7588 :a7588. :a7589 :a7589 :a7589. :a7590 :a7590 :a7590. :a7591 :a7591 :a7591. :a7592 :a7592 :a7592. :a7593 :a7593 :a7593. :a7594 :a7594 :a7594. :a7595 :a7595 :a7595. :a7596 :a7596 :a7596. :a7597 :a7597 :a7597. :a7598 :a7598 :a7598. :a7599 :a7599 :a7599. :a7600 :a7600 :a7600. :a7601 :a7601 :a7601. :a7602 :a7602 :a7602. :a7603 :a7603 :a7603. :a7604 :a7604 :a7604. :a7605 :a7605 :a7605. :a7606 :a7606 :a7606. :a7607 :a7607 :a7607. :a7608 :a7608 :a7608. :a7609 :a7609 :a7609. :a7610 :a7610 :a7610. :a7611 :a7611 :a7611. :a7612 :a7612 :a7612. :a7613 :a7613 :a7613. :a7614 :a7614 :a7614. :a7615 :a7615 :a7615. :a7616 :a7616 :a7616. :a7617 :a7617 :a7617. :a7618 :a7618 :a7618. :a7619 :a7619 :a7619. :a7620 :a7620 :a7620. :a7621 :a7621 :a7621. :a7622 :a7622 :a7622. :a7623 :a7623 :a7623. :a7624 :a7624 :a7624. :a7625 :a7625 :a7625. :a7626 :a7626 :a7626. :a7627 :a7627 :a7627. :a7628 :a7628 :a7628. :a7629 :a7629 :a7629. :a7630 :a7630 :a7630. :a7631 :a7631 :a7631. :a7632 :a7632 :a7632. :a7633 :a7633 :a7633. :a7634 :a7634 :a7634. :a7635 :a7635 :a7635. :a7636 :a7636 :a7636. :a7637 :a7637 :a7637. :a7638 :a7638 :a7638. :a7639 :a7639 :a7639. :a7640 :a7640 :a7640. :a7641 :a7641 :a7641. :a7642 :a7642 :a7642. :a7643 :a7643 :a7643. :a7644 :a7644 :a7644. :a7645 :a7645 :a7645. :a7646 :a7646 :a7646. :a7647 :a7647 :a7647. :a7648 :a7648 :a7648. :a7649 :a7649 :a7649. :a7650 :a7650 :a7650. :a7651 :a7651 :a7651. :a7652 :a7652 :a7652. :a7653 :a7653 :a7653. :a7654 :a7654 :a7654. :a7655 :a7655 :a7655. :a7656 :a7656 :a7656. :a7657 :a7657 :a7657. :a7658 :a7658 :a7658. :a7659 :a7659 :a7659. :a7660 :a7660 :a7660. :a7661 :a7661 :a7661. :a7662 :a7662 :a7662. :a7663 :a7663 :a7663. :a7664 :a7664 :a7664. :a7665 :a7665 :a7665. :a7666 :a7666 :a7666. :a7667 :a7667 :a7667. :a7668 :a7668 :a7668. :a7669 :a7669 :a7669. :a7670 :a7670 :a7670. :a7671 :a7671 :a7671. :a7672 :a7672 :a7672. :a7673 :a7673 :a7673. :a7674 :a7674 :a7674. :a7675 :a7675 :a7675. :a7676 :a7676 :a7676. :a7677 :a7677 :a7677. :a7678 :a7678 :a7678. :a7679 :a7679 :a7679. :a7680 :a7680 :a7680. :a7681 :a7681 :a7681. :a7682 :a7682 :a7682. :a7683 :a7683 :a7683. :a7684 :a7684 :a7684. :a7685 :a7685 :a7685. :a7686 :a7686 :a7686. :a7687 :a7687 :a7687. :a7688 :a7688 :a7688. :a7689 :a7689 :a7689. :a7690 :a7690 :a7690. :a7691 :a7691 :a7691. :a7692 :a7692 :a7692. :a7693 :a7693 :a7693. :a7694 :a7694 :a7694. :a7695 :a7695 :a7695. :a7696 :a7696 :a7696. :a7697 :a7697 :a7697. :a7698 :a7698 :a7698. :a7699 :a7699 :a7699. :a7700 :a7700 :a7700. :a7701 :a7701 :a7701. :a7702 :a7702 :a7702. :a7703 :a7703 :a7703. :a7704 :a7704 :a7704. :a7705 :a7705 :a7705. :a7706 :a7706 :a7706. :a7707 :a7707 :a7707. :a7708 :a7708 :a7708. :a7709 :a7709 :a7709. :a7710 :a7710 :a7710. :a7711 :a7711 :a7711. :a7712 :a7712 :a7712. :a7713 :a7713 :a7713. :a7714 :a7714 :a7714. :a7715 :a7715 :a7715. :a7716 :a7716 :a7716. :a7717 :a7717 :a7717. :a7718 :a7718 :a7718. :a7719 :a7719 :a7719. :a7720 :a7720 :a7720. :a7721 :a7721 :a7721. :a7722 :a7722 :a7722. :a7723 :a7723 :a7723. :a7724 :a7724 :a7724. :a7725 :a7725 :a7725. :a7726 :a7726 :a7726. :a7727 :a7727 :a7727. :a7728 :a7728 :a7728. :a7729 :a7729 :a7729. :a7730 :a7730 :a7730. :a7731 :a7731 :a7731. :a7732 :a7732 :a7732. :a7733 :a7733 :a7733. :a7734 :a7734 :a7734. :a7735 :a7735 :a7735. :a7736 :a7736 :a7736. :a7737 :a7737 :a7737. :a7738 :a7738 :a7738. :a7739 :a7739 :a7739. :a7740 :a7740 :a7740. :a7741 :a7741 :a7741. :a7742 :a7742 :a7742. :a7743 :a7743 :a7743. :a7744 :a7744 :a7744. :a7745 :a7745 :a7745. :a7746 :a7746 :a7746. :a7747 :a7747 :a7747. :a7748 :a7748 :a7748. :a7749 :a7749 :a7749. :a7750 :a7750 :a7750. :a7751 :a7751 :a7751. :a7752 :a7752 :a7752. :a7753 :a7753 :a7753. :a7754 :a7754 :a7754. :a7755 :a7755 :a7755. :a7756 :a7756 :a7756. :a7757 :a7757 :a7757. :a7758 :a7758 :a7758. :a7759 :a7759 :a7759. :a7760 :a7760 :a7760. :a7761 :a7761 :a7761. :a7762 :a7762 :a7762. :a7763 :a7763 :a7763. :a7764 :a7764 :a7764. :a7765 :a7765 :a7765. :a7766 :a7766 :a7766. :a7767 :a7767 :a7767. :a7768 :a7768 :a7768. :a7769 :a7769 :a7769. :a7770 :a7770 :a7770. :a7771 :a7771 :a7771. :a7772 :a7772 :a7772. :a7773 :a7773 :a7773. :a7774 :a7774 :a7774. :a7775 :a7775 :a7775. :a7776 :a7776 :a7776. :a7777 :a7777 :a7777. :a7778 :a7778 :a7778. :a7779 :a7779 :a7779. :a7780 :a7780 :a7780. :a7781 :a7781 :a7781. :a7782 :a7782 :a7782. :a7783 :a7783 :a7783. :a7784 :a7784 :a7784. :a7785 :a7785 :a7785. :a7786 :a7786 :a7786. :a7787 :a7787 :a7787. :a7788 :a7788 :a7788. :a7789 :a7789 :a7789. :a7790 :a7790 :a7790. :a7791 :a7791 :a7791. :a7792 :a7792 :a7792. :a7793 :a7793 :a7793. :a7794 :a7794 :a7794. :a7795 :a7795 :a7795. :a7796 :a7796 :a7796. :a7797 :a7797 :a7797. :a7798 :a7798 :a7798. :a7799 :a7799 :a7799. :a7800 :a7800 :a7800. :a7801 :a7801 :a7801. :a7802 :a7802 :a7802. :a7803 :a7803 :a7803. :a7804 :a7804 :a7804. :a7805 :a7805 :a7805. :a7806 :a7806 :a7806. :a7807 :a7807 :a7807. :a7808 :a7808 :a7808. :a7809 :a7809 :a7809. :a7810 :a7810 :a7810. :a7811 :a7811 :a7811. :a7812 :a7812 :a7812. :a7813 :a7813 :a7813. :a7814 :a7814 :a7814. :a7815 :a7815 :a7815. :a7816 :a7816 :a7816. :a7817 :a7817 :a7817. :a7818 :a7818 :a7818. :a7819 :a7819 :a7819. :a7820 :a7820 :a7820. :a7821 :a7821 :a7821. :a7822 :a7822 :a7822. :a7823 :a7823 :a7823. :a7824 :a7824 :a7824. :a7825 :a7825 :a7825. :a7826 :a7826 :a7826. :a7827 :a7827 :a7827. :a7828 :a7828 :a7828. :a7829 :a7829 :a7829. :a7830 :a7830 :a7830. :a7831 :a7831 :a7831. :a7832 :a7832 :a7832. :a7833 :a7833 :a7833. :a7834 :a7834 :a7834. :a7835 :a7835 :a7835. :a7836 :a7836 :a7836. :a7837 :a7837 :a7837. :a7838 :a7838 :a7838. :a7839 :a7839 :a7839. :a7840 :a7840 :a7840. :a7841 :a7841 :a7841. :a7842 :a7842 :a7842. :a7843 :a7843 :a7843. :a7844 :a7844 :a7844. :a7845 :a7845 :a7845. :a7846 :a7846 :a7846. :a7847 :a7847 :a7847. :a7848 :a7848 :a7848. :a7849 :a7849 :a7849. :a7850 :a7850 :a7850. :a7851 :a7851 :a7851. :a7852 :a7852 :a7852. :a7853 :a7853 :a7853. :a7854 :a7854 :a7854. :a7855 :a7855 :a7855. :a7856 :a7856 :a7856. :a7857 :a7857 :a7857. :a7858 :a7858 :a7858. :a7859 :a7859 :a7859. :a7860 :a7860 :a7860. :a7861 :a7861 :a7861. :a7862 :a7862 :a7862. :a7863 :a7863 :a7863. :a7864 :a7864 :a7864. :a7865 :a7865 :a7865. :a7866 :a7866 :a7866. :a7867 :a7867 :a7867. :a7868 :a7868 :a7868. :a7869 :a7869 :a7869. :a7870 :a7870 :a7870. :a7871 :a7871 :a7871. :a7872 :a7872 :a7872. :a7873 :a7873 :a7873. :a7874 :a7874 :a7874. :a7875 :a7875 :a7875. :a7876 :a7876 :a7876. :a7877 :a7877 :a7877. :a7878 :a7878 :a7878. :a7879 :a7879 :a7879. :a7880 :a7880 :a7880. :a7881 :a7881 :a7881. :a7882 :a7882 :a7882. :a7883 :a7883 :a7883. :a7884 :a7884 :a7884. :a7885 :a7885 :a7885. :a7886 :a7886 :a7886. :a7887 :a7887 :a7887. :a7888 :a7888 :a7888. :a7889 :a7889 :a7889. :a7890 :a7890 :a7890. :a7891 :a7891 :a7891. :a7892 :a7892 :a7892. :a7893 :a7893 :a7893. :a7894 :a7894 :a7894. :a7895 :a7895 :a7895. :a7896 :a7896 :a7896. :a7897 :a7897 :a7897. :a7898 :a7898 :a7898. :a7899 :a7899 :a7899. :a7900 :a7900 :a7900. :a7901 :a7901 :a7901. :a7902 :a7902 :a7902. :a7903 :a7903 :a7903. :a7904 :a7904 :a7904. :a7905 :a7905 :a7905. :a7906 :a7906 :a7906. :a7907 :a7907 :a7907. :a7908 :a7908 :a7908. :a7909 :a7909 :a7909. :a7910 :a7910 :a7910. :a7911 :a7911 :a7911. :a7912 :a7912 :a7912. :a7913 :a7913 :a7913. :a7914 :a7914 :a7914. :a7915 :a7915 :a7915. :a7916 :a7916 :a7916. :a7917 :a7917 :a7917. :a7918 :a7918 :a7918. :a7919 :a7919 :a7919. :a7920 :a7920 :a7920. :a7921 :a7921 :a7921. :a7922 :a7922 :a7922. :a7923 :a7923 :a7923. :a7924 :a7924 :a7924. :a7925 :a7925 :a7925. :a7926 :a7926 :a7926. :a7927 :a7927 :a7927. :a7928 :a7928 :a7928. :a7929 :a7929 :a7929. :a7930 :a7930 :a7930. :a7931 :a7931 :a7931. :a7932 :a7932 :a7932. :a7933 :a7933 :a7933. :a7934 :a7934 :a7934. :a7935 :a7935 :a7935. :a7936 :a7936 :a7936. :a7937 :a7937 :a7937. :a7938 :a7938 :a7938. :a7939 :a7939 :a7939. :a7940 :a7940 :a7940. :a7941 :a7941 :a7941. :a7942 :a7942 :a7942. :a7943 :a7943 :a7943. :a7944 :a7944 :a7944. :a7945 :a7945 :a7945. :a7946 :a7946 :a7946. :a7947 :a7947 :a7947. :a7948 :a7948 :a7948. :a7949 :a7949 :a7949. :a7950 :a7950 :a7950. :a7951 :a7951 :a7951. :a7952 :a7952 :a7952. :a7953 :a7953 :a7953. :a7954 :a7954 :a7954. :a7955 :a7955 :a7955. :a7956 :a7956 :a7956. :a7957 :a7957 :a7957. :a7958 :a7958 :a7958. :a7959 :a7959 :a7959. :a7960 :a7960 :a7960. :a7961 :a7961 :a7961. :a7962 :a7962 :a7962. :a7963 :a7963 :a7963. :a7964 :a7964 :a7964. :a7965 :a7965 :a7965. :a7966 :a7966 :a7966. :a7967 :a7967 :a7967. :a7968 :a7968 :a7968. :a7969 :a7969 :a7969. :a7970 :a7970 :a7970. :a7971 :a7971 :a7971. :a7972 :a7972 :a7972. :a7973 :a7973 :a7973. :a7974 :a7974 :a7974. :a7975 :a7975 :a7975. :a7976 :a7976 :a7976. :a7977 :a7977 :a7977. :a7978 :a7978 :a7978. :a7979 :a7979 :a7979. :a7980 :a7980 :a7980. :a7981 :a7981 :a7981. :a7982 :a7982 :a7982. :a7983 :a7983 :a7983. :a7984 :a7984 :a7984. :a7985 :a7985 :a7985. :a7986 :a7986 :a7986. :a7987 :a7987 :a7987. :a7988 :a7988 :a7988. :a7989 :a7989 :a7989. :a7990 :a7990 :a7990. :a7991 :a7991 :a7991. :a7992 :a7992 :a7992. :a7993 :a7993 :a7993. :a7994 :a7994 :a7994. :a7995 :a7995 :a7995. :a7996 :a7996 :a7996. :a7997 :a7997 :a7997. :a7998 :a7998 :a7998. :a7999 :a7999 :a7999. :a8000 :a8000 :a8000. :a8001 :a8001 :a8001. :a8002 :a8002 :a8002. :a8003 :a8003 :a8003. :a8004 :a8004 :a8004. :a8005 :a8005 :a8005. :a8006 :a8006 :a8006. :a8007 :a8007 :a8007. :a8008 :a8008 :a8008. :a8009 :a8009 :a8009. :a8010 :a8010 :a8010. :a8011 :a8011 :a8011. :a8012 :a8012 :a8012. :a8013 :a8013 :a8013. :a8014 :a8014 :a8014. :a8015 :a8015 :a8015. :a8016 :a8016 :a8016. :a8017 :a8017 :a8017. :a8018 :a8018 :a8018. :a8019 :a8019 :a8019. :a8020 :a8020 :a8020. :a8021 :a8021 :a8021. :a8022 :a8022 :a8022. :a8023 :a8023 :a8023. :a8024 :a8024 :a8024. :a8025 :a8025 :a8025. :a8026 :a8026 :a8026. :a8027 :a8027 :a8027. :a8028 :a8028 :a8028. :a8029 :a8029 :a8029. :a8030 :a8030 :a8030. :a8031 :a8031 :a8031. :a8032 :a8032 :a8032. :a8033 :a8033 :a8033. :a8034 :a8034 :a8034. :a8035 :a8035 :a8035. :a8036 :a8036 :a8036. :a8037 :a8037 :a8037. :a8038 :a8038 :a8038. :a8039 :a8039 :a8039. :a8040 :a8040 :a8040. :a8041 :a8041 :a8041. :a8042 :a8042 :a8042. :a8043 :a8043 :a8043. :a8044 :a8044 :a8044. :a8045 :a8045 :a8045. :a8046 :a8046 :a8046. :a8047 :a8047 :a8047. :a8048 :a8048 :a8048. :a8049 :a8049 :a8049. :a8050 :a8050 :a8050. :a8051 :a8051 :a8051. :a8052 :a8052 :a8052. :a8053 :a8053 :a8053. :a8054 :a8054 :a8054. :a8055 :a8055 :a8055. :a8056 :a8056 :a8056. :a8057 :a8057 :a8057. :a8058 :a8058 :a8058. :a8059 :a8059 :a8059. :a8060 :a8060 :a8060. :a8061 :a8061 :a8061. :a8062 :a8062 :a8062. :a8063 :a8063 :a8063. :a8064 :a8064 :a8064. :a8065 :a8065 :a8065. :a8066 :a8066 :a8066. :a8067 :a8067 :a8067. :a8068 :a8068 :a8068. :a8069 :a8069 :a8069. :a8070 :a8070 :a8070. :a8071 :a8071 :a8071. :a8072 :a8072 :a8072. :a8073 :a8073 :a8073. :a8074 :a8074 :a8074. :a8075 :a8075 :a8075. :a8076 :a8076 :a8076. :a8077 :a8077 :a8077. :a8078 :a8078 :a8078. :a8079 :a8079 :a8079. :a8080 :a8080 :a8080. :a8081 :a8081 :a8081. :a8082 :a8082 :a8082. :a8083 :a8083 :a8083. :a8084 :a8084 :a8084. :a8085 :a8085 :a8085. :a8086 :a8086 :a8086. :a8087 :a8087 :a8087. :a8088 :a8088 :a8088. :a8089 :a8089 :a8089. :a8090 :a8090 :a8090. :a8091 :a8091 :a8091. :a8092 :a8092 :a8092. :a8093 :a8093 :a8093. :a8094 :a8094 :a8094. :a8095 :a8095 :a8095. :a8096 :a8096 :a8096. :a8097 :a8097 :a8097. :a8098 :a8098 :a8098. :a8099 :a8099 :a8099. :a8100 :a8100 :a8100. :a8101 :a8101 :a8101. :a8102 :a8102 :a8102. :a8103 :a8103 :a8103. :a8104 :a8104 :a8104. :a8105 :a8105 :a8105. :a8106 :a8106 :a8106. :a8107 :a8107 :a8107. :a8108 :a8108 :a8108. :a8109 :a8109 :a8109. :a8110 :a8110 :a8110. :a8111 :a8111 :a8111. :a8112 :a8112 :a8112. :a8113 :a8113 :a8113. :a8114 :a8114 :a8114. :a8115 :a8115 :a8115. :a8116 :a8116 :a8116. :a8117 :a8117 :a8117. :a8118 :a8118 :a8118. :a8119 :a8119 :a8119. :a8120 :a8120 :a8120. :a8121 :a8121 :a8121. :a8122 :a8122 :a8122. :a8123 :a8123 :a8123. :a8124 :a8124 :a8124. :a8125 :a8125 :a8125. :a8126 :a8126 :a8126. :a8127 :a8127 :a8127. :a8128 :a8128 :a8128. :a8129 :a8129 :a8129. :a8130 :a8130 :a8130. :a8131 :a8131 :a8131. :a8132 :a8132 :a8132. :a8133 :a8133 :a8133. :a8134 :a8134 :a8134. :a8135 :a8135 :a8135. :a8136 :a8136 :a8136. :a8137 :a8137 :a8137. :a8138 :a8138 :a8138. :a8139 :a8139 :a8139. :a8140 :a8140 :a8140. :a8141 :a8141 :a8141. :a8142 :a8142 :a8142. :a8143 :a8143 :a8143. :a8144 :a8144 :a8144. :a8145 :a8145 :a8145. :a8146 :a8146 :a8146. :a8147 :a8147 :a8147. :a8148 :a8148 :a8148. :a8149 :a8149 :a8149. :a8150 :a8150 :a8150. :a8151 :a8151 :a8151. :a8152 :a8152 :a8152. :a8153 :a8153 :a8153. :a8154 :a8154 :a8154. :a8155 :a8155 :a8155. :a8156 :a8156 :a8156. :a8157 :a8157 :a8157. :a8158 :a8158 :a8158. :a8159 :a8159 :a8159. :a8160 :a8160 :a8160. :a8161 :a8161 :a8161. :a8162 :a8162 :a8162. :a8163 :a8163 :a8163. :a8164 :a8164 :a8164. :a8165 :a8165 :a8165. :a8166 :a8166 :a8166. :a8167 :a8167 :a8167. :a8168 :a8168 :a8168. :a8169 :a8169 :a8169. :a8170 :a8170 :a8170. :a8171 :a8171 :a8171. :a8172 :a8172 :a8172. :a8173 :a8173 :a8173. :a8174 :a8174 :a8174. :a8175 :a8175 :a8175. :a8176 :a8176 :a8176. :a8177 :a8177 :a8177. :a8178 :a8178 :a8178. :a8179 :a8179 :a8179. :a8180 :a8180 :a8180. :a8181 :a8181 :a8181. :a8182 :a8182 :a8182. :a8183 :a8183 :a8183. :a8184 :a8184 :a8184. :a8185 :a8185 :a8185. :a8186 :a8186 :a8186. :a8187 :a8187 :a8187. :a8188 :a8188 :a8188. :a8189 :a8189 :a8189. :a8190 :a8190 :a8190. :a8191 :a8191 :a8191. :a8192 :a8192 :a8192. :a8193 :a8193 :a8193. :a8194 :a8194 :a8194. :a8195 :a8195 :a8195. :a8196 :a8196 :a8196. :a8197 :a8197 :a8197. :a8198 :a8198 :a8198. :a8199 :a8199 :a8199. :a8200 :a8200 :a8200. :a8201 :a8201 :a8201. :a8202 :a8202 :a8202. :a8203 :a8203 :a8203. :a8204 :a8204 :a8204. :a8205 :a8205 :a8205. :a8206 :a8206 :a8206. :a8207 :a8207 :a8207. :a8208 :a8208 :a8208. :a8209 :a8209 :a8209. :a8210 :a8210 :a8210. :a8211 :a8211 :a8211. :a8212 :a8212 :a8212. :a8213 :a8213 :a8213. :a8214 :a8214 :a8214. :a8215 :a8215 :a8215. :a8216 :a8216 :a8216. :a8217 :a8217 :a8217. :a8218 :a8218 :a8218. :a8219 :a8219 :a8219. :a8220 :a8220 :a8220. :a8221 :a8221 :a8221. :a8222 :a8222 :a8222. :a8223 :a8223 :a8223. :a8224 :a8224 :a8224. :a8225 :a8225 :a8225. :a8226 :a8226 :a8226. :a8227 :a8227 :a8227. :a8228 :a8228 :a8228. :a8229 :a8229 :a8229. :a8230 :a8230 :a8230. :a8231 :a8231 :a8231. :a8232 :a8232 :a8232. :a8233 :a8233 :a8233. :a8234 :a8234 :a8234. :a8235 :a8235 :a8235. :a8236 :a8236 :a8236. :a8237 :a8237 :a8237. :a8238 :a8238 :a8238. :a8239 :a8239 :a8239. :a8240 :a8240 :a8240. :a8241 :a8241 :a8241. :a8242 :a8242 :a8242. :a8243 :a8243 :a8243. :a8244 :a8244 :a8244. :a8245 :a8245 :a8245. :a8246 :a8246 :a8246. :a8247 :a8247 :a8247. :a8248 :a8248 :a8248. :a8249 :a8249 :a8249. :a8250 :a8250 :a8250. :a8251 :a8251 :a8251. :a8252 :a8252 :a8252. :a8253 :a8253 :a8253. :a8254 :a8254 :a8254. :a8255 :a8255 :a8255. :a8256 :a8256 :a8256. :a8257 :a8257 :a8257. :a8258 :a8258 :a8258. :a8259 :a8259 :a8259. :a8260 :a8260 :a8260. :a8261 :a8261 :a8261. :a8262 :a8262 :a8262. :a8263 :a8263 :a8263. :a8264 :a8264 :a8264. :a8265 :a8265 :a8265. :a8266 :a8266 :a8266. :a8267 :a8267 :a8267. :a8268 :a8268 :a8268. :a8269 :a8269 :a8269. :a8270 :a8270 :a8270. :a8271 :a8271 :a8271. :a8272 :a8272 :a8272. :a8273 :a8273 :a8273. :a8274 :a8274 :a8274. :a8275 :a8275 :a8275. :a8276 :a8276 :a8276. :a8277 :a8277 :a8277. :a8278 :a8278 :a8278. :a8279 :a8279 :a8279. :a8280 :a8280 :a8280. :a8281 :a8281 :a8281. :a8282 :a8282 :a8282. :a8283 :a8283 :a8283. :a8284 :a8284 :a8284. :a8285 :a8285 :a8285. :a8286 :a8286 :a8286. :a8287 :a8287 :a8287. :a8288 :a8288 :a8288. :a8289 :a8289 :a8289. :a8290 :a8290 :a8290. :a8291 :a8291 :a8291. :a8292 :a8292 :a8292. :a8293 :a8293 :a8293. :a8294 :a8294 :a8294. :a8295 :a8295 :a8295. :a8296 :a8296 :a8296. :a8297 :a8297 :a8297. :a8298 :a8298 :a8298. :a8299 :a8299 :a8299. :a8300 :a8300 :a8300. :a8301 :a8301 :a8301. :a8302 :a8302 :a8302. :a8303 :a8303 :a8303. :a8304 :a8304 :a8304. :a8305 :a8305 :a8305. :a8306 :a8306 :a8306. :a8307 :a8307 :a8307. :a8308 :a8308 :a8308. :a8309 :a8309 :a8309. :a8310 :a8310 :a8310. :a8311 :a8311 :a8311. :a8312 :a8312 :a8312. :a8313 :a8313 :a8313. :a8314 :a8314 :a8314. :a8315 :a8315 :a8315. :a8316 :a8316 :a8316. :a8317 :a8317 :a8317. :a8318 :a8318 :a8318. :a8319 :a8319 :a8319. :a8320 :a8320 :a8320. :a8321 :a8321 :a8321. :a8322 :a8322 :a8322. :a8323 :a8323 :a8323. :a8324 :a8324 :a8324. :a8325 :a8325 :a8325. :a8326 :a8326 :a8326. :a8327 :a8327 :a8327. :a8328 :a8328 :a8328. :a8329 :a8329 :a8329. :a8330 :a8330 :a8330. :a8331 :a8331 :a8331. :a8332 :a8332 :a8332. :a8333 :a8333 :a8333. :a8334 :a8334 :a8334. :a8335 :a8335 :a8335. :a8336 :a8336 :a8336. :a8337 :a8337 :a8337. :a8338 :a8338 :a8338. :a8339 :a8339 :a8339. :a8340 :a8340 :a8340. :a8341 :a8341 :a8341. :a8342 :a8342 :a8342. :a8343 :a8343 :a8343. :a8344 :a8344 :a8344. :a8345 :a8345 :a8345. :a8346 :a8346 :a8346. :a8347 :a8347 :a8347. :a8348 :a8348 :a8348. :a8349 :a8349 :a8349. :a8350 :a8350 :a8350. :a8351 :a8351 :a8351. :a8352 :a8352 :a8352. :a8353 :a8353 :a8353. :a8354 :a8354 :a8354. :a8355 :a8355 :a8355. :a8356 :a8356 :a8356. :a8357 :a8357 :a8357. :a8358 :a8358 :a8358. :a8359 :a8359 :a8359. :a8360 :a8360 :a8360. :a8361 :a8361 :a8361. :a8362 :a8362 :a8362. :a8363 :a8363 :a8363. :a8364 :a8364 :a8364. :a8365 :a8365 :a8365. :a8366 :a8366 :a8366. :a8367 :a8367 :a8367. :a8368 :a8368 :a8368. :a8369 :a8369 :a8369. :a8370 :a8370 :a8370. :a8371 :a8371 :a8371. :a8372 :a8372 :a8372. :a8373 :a8373 :a8373. :a8374 :a8374 :a8374. :a8375 :a8375 :a8375. :a8376 :a8376 :a8376. :a8377 :a8377 :a8377. :a8378 :a8378 :a8378. :a8379 :a8379 :a8379. :a8380 :a8380 :a8380. :a8381 :a8381 :a8381. :a8382 :a8382 :a8382. :a8383 :a8383 :a8383. :a8384 :a8384 :a8384. :a8385 :a8385 :a8385. :a8386 :a8386 :a8386. :a8387 :a8387 :a8387. :a8388 :a8388 :a8388. :a8389 :a8389 :a8389. :a8390 :a8390 :a8390. :a8391 :a8391 :a8391. :a8392 :a8392 :a8392. :a8393 :a8393 :a8393. :a8394 :a8394 :a8394. :a8395 :a8395 :a8395. :a8396 :a8396 :a8396. :a8397 :a8397 :a8397. :a8398 :a8398 :a8398. :a8399 :a8399 :a8399. :a8400 :a8400 :a8400. :a8401 :a8401 :a8401. :a8402 :a8402 :a8402. :a8403 :a8403 :a8403. :a8404 :a8404 :a8404. :a8405 :a8405 :a8405. :a8406 :a8406 :a8406. :a8407 :a8407 :a8407. :a8408 :a8408 :a8408. :a8409 :a8409 :a8409. :a8410 :a8410 :a8410. :a8411 :a8411 :a8411. :a8412 :a8412 :a8412. :a8413 :a8413 :a8413. :a8414 :a8414 :a8414. :a8415 :a8415 :a8415. :a8416 :a8416 :a8416. :a8417 :a8417 :a8417. :a8418 :a8418 :a8418. :a8419 :a8419 :a8419. :a8420 :a8420 :a8420. :a8421 :a8421 :a8421. :a8422 :a8422 :a8422. :a8423 :a8423 :a8423. :a8424 :a8424 :a8424. :a8425 :a8425 :a8425. :a8426 :a8426 :a8426. :a8427 :a8427 :a8427. :a8428 :a8428 :a8428. :a8429 :a8429 :a8429. :a8430 :a8430 :a8430. :a8431 :a8431 :a8431. :a8432 :a8432 :a8432. :a8433 :a8433 :a8433. :a8434 :a8434 :a8434. :a8435 :a8435 :a8435. :a8436 :a8436 :a8436. :a8437 :a8437 :a8437. :a8438 :a8438 :a8438. :a8439 :a8439 :a8439. :a8440 :a8440 :a8440. :a8441 :a8441 :a8441. :a8442 :a8442 :a8442. :a8443 :a8443 :a8443. :a8444 :a8444 :a8444. :a8445 :a8445 :a8445. :a8446 :a8446 :a8446. :a8447 :a8447 :a8447. :a8448 :a8448 :a8448. :a8449 :a8449 :a8449. :a8450 :a8450 :a8450. :a8451 :a8451 :a8451. :a8452 :a8452 :a8452. :a8453 :a8453 :a8453. :a8454 :a8454 :a8454. :a8455 :a8455 :a8455. :a8456 :a8456 :a8456. :a8457 :a8457 :a8457. :a8458 :a8458 :a8458. :a8459 :a8459 :a8459. :a8460 :a8460 :a8460. :a8461 :a8461 :a8461. :a8462 :a8462 :a8462. :a8463 :a8463 :a8463. :a8464 :a8464 :a8464. :a8465 :a8465 :a8465. :a8466 :a8466 :a8466. :a8467 :a8467 :a8467. :a8468 :a8468 :a8468. :a8469 :a8469 :a8469. :a8470 :a8470 :a8470. :a8471 :a8471 :a8471. :a8472 :a8472 :a8472. :a8473 :a8473 :a8473. :a8474 :a8474 :a8474. :a8475 :a8475 :a8475. :a8476 :a8476 :a8476. :a8477 :a8477 :a8477. :a8478 :a8478 :a8478. :a8479 :a8479 :a8479. :a8480 :a8480 :a8480. :a8481 :a8481 :a8481. :a8482 :a8482 :a8482. :a8483 :a8483 :a8483. :a8484 :a8484 :a8484. :a8485 :a8485 :a8485. :a8486 :a8486 :a8486. :a8487 :a8487 :a8487. :a8488 :a8488 :a8488. :a8489 :a8489 :a8489. :a8490 :a8490 :a8490. :a8491 :a8491 :a8491. :a8492 :a8492 :a8492. :a8493 :a8493 :a8493. :a8494 :a8494 :a8494. :a8495 :a8495 :a8495. :a8496 :a8496 :a8496. :a8497 :a8497 :a8497. :a8498 :a8498 :a8498. :a8499 :a8499 :a8499. :a8500 :a8500 :a8500. :a8501 :a8501 :a8501. :a8502 :a8502 :a8502. :a8503 :a8503 :a8503. :a8504 :a8504 :a8504. :a8505 :a8505 :a8505. :a8506 :a8506 :a8506. :a8507 :a8507 :a8507. :a8508 :a8508 :a8508. :a8509 :a8509 :a8509. :a8510 :a8510 :a8510. :a8511 :a8511 :a8511. :a8512 :a8512 :a8512. :a8513 :a8513 :a8513. :a8514 :a8514 :a8514. :a8515 :a8515 :a8515. :a8516 :a8516 :a8516. :a8517 :a8517 :a8517. :a8518 :a8518 :a8518. :a8519 :a8519 :a8519. :a8520 :a8520 :a8520. :a8521 :a8521 :a8521. :a8522 :a8522 :a8522. :a8523 :a8523 :a8523. :a8524 :a8524 :a8524. :a8525 :a8525 :a8525. :a8526 :a8526 :a8526. :a8527 :a8527 :a8527. :a8528 :a8528 :a8528. :a8529 :a8529 :a8529. :a8530 :a8530 :a8530. :a8531 :a8531 :a8531. :a8532 :a8532 :a8532. :a8533 :a8533 :a8533. :a8534 :a8534 :a8534. :a8535 :a8535 :a8535. :a8536 :a8536 :a8536. :a8537 :a8537 :a8537. :a8538 :a8538 :a8538. :a8539 :a8539 :a8539. :a8540 :a8540 :a8540. :a8541 :a8541 :a8541. :a8542 :a8542 :a8542. :a8543 :a8543 :a8543. :a8544 :a8544 :a8544. :a8545 :a8545 :a8545. :a8546 :a8546 :a8546. :a8547 :a8547 :a8547. :a8548 :a8548 :a8548. :a8549 :a8549 :a8549. :a8550 :a8550 :a8550. :a8551 :a8551 :a8551. :a8552 :a8552 :a8552. :a8553 :a8553 :a8553. :a8554 :a8554 :a8554. :a8555 :a8555 :a8555. :a8556 :a8556 :a8556. :a8557 :a8557 :a8557. :a8558 :a8558 :a8558. :a8559 :a8559 :a8559. :a8560 :a8560 :a8560. :a8561 :a8561 :a8561. :a8562 :a8562 :a8562. :a8563 :a8563 :a8563. :a8564 :a8564 :a8564. :a8565 :a8565 :a8565. :a8566 :a8566 :a8566. :a8567 :a8567 :a8567. :a8568 :a8568 :a8568. :a8569 :a8569 :a8569. :a8570 :a8570 :a8570. :a8571 :a8571 :a8571. :a8572 :a8572 :a8572. :a8573 :a8573 :a8573. :a8574 :a8574 :a8574. :a8575 :a8575 :a8575. :a8576 :a8576 :a8576. :a8577 :a8577 :a8577. :a8578 :a8578 :a8578. :a8579 :a8579 :a8579. :a8580 :a8580 :a8580. :a8581 :a8581 :a8581. :a8582 :a8582 :a8582. :a8583 :a8583 :a8583. :a8584 :a8584 :a8584. :a8585 :a8585 :a8585. :a8586 :a8586 :a8586. :a8587 :a8587 :a8587. :a8588 :a8588 :a8588. :a8589 :a8589 :a8589. :a8590 :a8590 :a8590. :a8591 :a8591 :a8591. :a8592 :a8592 :a8592. :a8593 :a8593 :a8593. :a8594 :a8594 :a8594. :a8595 :a8595 :a8595. :a8596 :a8596 :a8596. :a8597 :a8597 :a8597. :a8598 :a8598 :a8598. :a8599 :a8599 :a8599. :a8600 :a8600 :a8600. :a8601 :a8601 :a8601. :a8602 :a8602 :a8602. :a8603 :a8603 :a8603. :a8604 :a8604 :a8604. :a8605 :a8605 :a8605. :a8606 :a8606 :a8606. :a8607 :a8607 :a8607. :a8608 :a8608 :a8608. :a8609 :a8609 :a8609. :a8610 :a8610 :a8610. :a8611 :a8611 :a8611. :a8612 :a8612 :a8612. :a8613 :a8613 :a8613. :a8614 :a8614 :a8614. :a8615 :a8615 :a8615. :a8616 :a8616 :a8616. :a8617 :a8617 :a8617. :a8618 :a8618 :a8618. :a8619 :a8619 :a8619. :a8620 :a8620 :a8620. :a8621 :a8621 :a8621. :a8622 :a8622 :a8622. :a8623 :a8623 :a8623. :a8624 :a8624 :a8624. :a8625 :a8625 :a8625. :a8626 :a8626 :a8626. :a8627 :a8627 :a8627. :a8628 :a8628 :a8628. :a8629 :a8629 :a8629. :a8630 :a8630 :a8630. :a8631 :a8631 :a8631. :a8632 :a8632 :a8632. :a8633 :a8633 :a8633. :a8634 :a8634 :a8634. :a8635 :a8635 :a8635. :a8636 :a8636 :a8636. :a8637 :a8637 :a8637. :a8638 :a8638 :a8638. :a8639 :a8639 :a8639. :a8640 :a8640 :a8640. :a8641 :a8641 :a8641. :a8642 :a8642 :a8642. :a8643 :a8643 :a8643. :a8644 :a8644 :a8644. :a8645 :a8645 :a8645. :a8646 :a8646 :a8646. :a8647 :a8647 :a8647. :a8648 :a8648 :a8648. :a8649 :a8649 :a8649. :a8650 :a8650 :a8650. :a8651 :a8651 :a8651. :a8652 :a8652 :a8652. :a8653 :a8653 :a8653. :a8654 :a8654 :a8654. :a8655 :a8655 :a8655. :a8656 :a8656 :a8656. :a8657 :a8657 :a8657. :a8658 :a8658 :a8658. :a8659 :a8659 :a8659. :a8660 :a8660 :a8660. :a8661 :a8661 :a8661. :a8662 :a8662 :a8662. :a8663 :a8663 :a8663. :a8664 :a8664 :a8664. :a8665 :a8665 :a8665. :a8666 :a8666 :a8666. :a8667 :a8667 :a8667. :a8668 :a8668 :a8668. :a8669 :a8669 :a8669. :a8670 :a8670 :a8670. :a8671 :a8671 :a8671. :a8672 :a8672 :a8672. :a8673 :a8673 :a8673. :a8674 :a8674 :a8674. :a8675 :a8675 :a8675. :a8676 :a8676 :a8676. :a8677 :a8677 :a8677. :a8678 :a8678 :a8678. :a8679 :a8679 :a8679. :a8680 :a8680 :a8680. :a8681 :a8681 :a8681. :a8682 :a8682 :a8682. :a8683 :a8683 :a8683. :a8684 :a8684 :a8684. :a8685 :a8685 :a8685. :a8686 :a8686 :a8686. :a8687 :a8687 :a8687. :a8688 :a8688 :a8688. :a8689 :a8689 :a8689. :a8690 :a8690 :a8690. :a8691 :a8691 :a8691. :a8692 :a8692 :a8692. :a8693 :a8693 :a8693. :a8694 :a8694 :a8694. :a8695 :a8695 :a8695. :a8696 :a8696 :a8696. :a8697 :a8697 :a8697. :a8698 :a8698 :a8698. :a8699 :a8699 :a8699. :a8700 :a8700 :a8700. :a8701 :a8701 :a8701. :a8702 :a8702 :a8702. :a8703 :a8703 :a8703. :a8704 :a8704 :a8704. :a8705 :a8705 :a8705. :a8706 :a8706 :a8706. :a8707 :a8707 :a8707. :a8708 :a8708 :a8708. :a8709 :a8709 :a8709. :a8710 :a8710 :a8710. :a8711 :a8711 :a8711. :a8712 :a8712 :a8712. :a8713 :a8713 :a8713. :a8714 :a8714 :a8714. :a8715 :a8715 :a8715. :a8716 :a8716 :a8716. :a8717 :a8717 :a8717. :a8718 :a8718 :a8718. :a8719 :a8719 :a8719. :a8720 :a8720 :a8720. :a8721 :a8721 :a8721. :a8722 :a8722 :a8722. :a8723 :a8723 :a8723. :a8724 :a8724 :a8724. :a8725 :a8725 :a8725. :a8726 :a8726 :a8726. :a8727 :a8727 :a8727. :a8728 :a8728 :a8728. :a8729 :a8729 :a8729. :a8730 :a8730 :a8730. :a8731 :a8731 :a8731. :a8732 :a8732 :a8732. :a8733 :a8733 :a8733. :a8734 :a8734 :a8734. :a8735 :a8735 :a8735. :a8736 :a8736 :a8736. :a8737 :a8737 :a8737. :a8738 :a8738 :a8738. :a8739 :a8739 :a8739. :a8740 :a8740 :a8740. :a8741 :a8741 :a8741. :a8742 :a8742 :a8742. :a8743 :a8743 :a8743. :a8744 :a8744 :a8744. :a8745 :a8745 :a8745. :a8746 :a8746 :a8746. :a8747 :a8747 :a8747. :a8748 :a8748 :a8748. :a8749 :a8749 :a8749. :a8750 :a8750 :a8750. :a8751 :a8751 :a8751. :a8752 :a8752 :a8752. :a8753 :a8753 :a8753. :a8754 :a8754 :a8754. :a8755 :a8755 :a8755. :a8756 :a8756 :a8756. :a8757 :a8757 :a8757. :a8758 :a8758 :a8758. :a8759 :a8759 :a8759. :a8760 :a8760 :a8760. :a8761 :a8761 :a8761. :a8762 :a8762 :a8762. :a8763 :a8763 :a8763. :a8764 :a8764 :a8764. :a8765 :a8765 :a8765. :a8766 :a8766 :a8766. :a8767 :a8767 :a8767. :a8768 :a8768 :a8768. :a8769 :a8769 :a8769. :a8770 :a8770 :a8770. :a8771 :a8771 :a8771. :a8772 :a8772 :a8772. :a8773 :a8773 :a8773. :a8774 :a8774 :a8774. :a8775 :a8775 :a8775. :a8776 :a8776 :a8776. :a8777 :a8777 :a8777. :a8778 :a8778 :a8778. :a8779 :a8779 :a8779. :a8780 :a8780 :a8780. :a8781 :a8781 :a8781. :a8782 :a8782 :a8782. :a8783 :a8783 :a8783. :a8784 :a8784 :a8784. :a8785 :a8785 :a8785. :a8786 :a8786 :a8786. :a8787 :a8787 :a8787. :a8788 :a8788 :a8788. :a8789 :a8789 :a8789. :a8790 :a8790 :a8790. :a8791 :a8791 :a8791. :a8792 :a8792 :a8792. :a8793 :a8793 :a8793. :a8794 :a8794 :a8794. :a8795 :a8795 :a8795. :a8796 :a8796 :a8796. :a8797 :a8797 :a8797. :a8798 :a8798 :a8798. :a8799 :a8799 :a8799. :a8800 :a8800 :a8800. :a8801 :a8801 :a8801. :a8802 :a8802 :a8802. :a8803 :a8803 :a8803. :a8804 :a8804 :a8804. :a8805 :a8805 :a8805. :a8806 :a8806 :a8806. :a8807 :a8807 :a8807. :a8808 :a8808 :a8808. :a8809 :a8809 :a8809. :a8810 :a8810 :a8810. :a8811 :a8811 :a8811. :a8812 :a8812 :a8812. :a8813 :a8813 :a8813. :a8814 :a8814 :a8814. :a8815 :a8815 :a8815. :a8816 :a8816 :a8816. :a8817 :a8817 :a8817. :a8818 :a8818 :a8818. :a8819 :a8819 :a8819. :a8820 :a8820 :a8820. :a8821 :a8821 :a8821. :a8822 :a8822 :a8822. :a8823 :a8823 :a8823. :a8824 :a8824 :a8824. :a8825 :a8825 :a8825. :a8826 :a8826 :a8826. :a8827 :a8827 :a8827. :a8828 :a8828 :a8828. :a8829 :a8829 :a8829. :a8830 :a8830 :a8830. :a8831 :a8831 :a8831. :a8832 :a8832 :a8832. :a8833 :a8833 :a8833. :a8834 :a8834 :a8834. :a8835 :a8835 :a8835. :a8836 :a8836 :a8836. :a8837 :a8837 :a8837. :a8838 :a8838 :a8838. :a8839 :a8839 :a8839. :a8840 :a8840 :a8840. :a8841 :a8841 :a8841. :a8842 :a8842 :a8842. :a8843 :a8843 :a8843. :a8844 :a8844 :a8844. :a8845 :a8845 :a8845. :a8846 :a8846 :a8846. :a8847 :a8847 :a8847. :a8848 :a8848 :a8848. :a8849 :a8849 :a8849. :a8850 :a8850 :a8850. :a8851 :a8851 :a8851. :a8852 :a8852 :a8852. :a8853 :a8853 :a8853. :a8854 :a8854 :a8854. :a8855 :a8855 :a8855. :a8856 :a8856 :a8856. :a8857 :a8857 :a8857. :a8858 :a8858 :a8858. :a8859 :a8859 :a8859. :a8860 :a8860 :a8860. :a8861 :a8861 :a8861. :a8862 :a8862 :a8862. :a8863 :a8863 :a8863. :a8864 :a8864 :a8864. :a8865 :a8865 :a8865. :a8866 :a8866 :a8866. :a8867 :a8867 :a8867. :a8868 :a8868 :a8868. :a8869 :a8869 :a8869. :a8870 :a8870 :a8870. :a8871 :a8871 :a8871. :a8872 :a8872 :a8872. :a8873 :a8873 :a8873. :a8874 :a8874 :a8874. :a8875 :a8875 :a8875. :a8876 :a8876 :a8876. :a8877 :a8877 :a8877. :a8878 :a8878 :a8878. :a8879 :a8879 :a8879. :a8880 :a8880 :a8880. :a8881 :a8881 :a8881. :a8882 :a8882 :a8882. :a8883 :a8883 :a8883. :a8884 :a8884 :a8884. :a8885 :a8885 :a8885. :a8886 :a8886 :a8886. :a8887 :a8887 :a8887. :a8888 :a8888 :a8888. :a8889 :a8889 :a8889. :a8890 :a8890 :a8890. :a8891 :a8891 :a8891. :a8892 :a8892 :a8892. :a8893 :a8893 :a8893. :a8894 :a8894 :a8894. :a8895 :a8895 :a8895. :a8896 :a8896 :a8896. :a8897 :a8897 :a8897. :a8898 :a8898 :a8898. :a8899 :a8899 :a8899. :a8900 :a8900 :a8900. :a8901 :a8901 :a8901. :a8902 :a8902 :a8902. :a8903 :a8903 :a8903. :a8904 :a8904 :a8904. :a8905 :a8905 :a8905. :a8906 :a8906 :a8906. :a8907 :a8907 :a8907. :a8908 :a8908 :a8908. :a8909 :a8909 :a8909. :a8910 :a8910 :a8910. :a8911 :a8911 :a8911. :a8912 :a8912 :a8912. :a8913 :a8913 :a8913. :a8914 :a8914 :a8914. :a8915 :a8915 :a8915. :a8916 :a8916 :a8916. :a8917 :a8917 :a8917. :a8918 :a8918 :a8918. :a8919 :a8919 :a8919. :a8920 :a8920 :a8920. :a8921 :a8921 :a8921. :a8922 :a8922 :a8922. :a8923 :a8923 :a8923. :a8924 :a8924 :a8924. :a8925 :a8925 :a8925. :a8926 :a8926 :a8926. :a8927 :a8927 :a8927. :a8928 :a8928 :a8928. :a8929 :a8929 :a8929. :a8930 :a8930 :a8930. :a8931 :a8931 :a8931. :a8932 :a8932 :a8932. :a8933 :a8933 :a8933. :a8934 :a8934 :a8934. :a8935 :a8935 :a8935. :a8936 :a8936 :a8936. :a8937 :a8937 :a8937. :a8938 :a8938 :a8938. :a8939 :a8939 :a8939. :a8940 :a8940 :a8940. :a8941 :a8941 :a8941. :a8942 :a8942 :a8942. :a8943 :a8943 :a8943. :a8944 :a8944 :a8944. :a8945 :a8945 :a8945. :a8946 :a8946 :a8946. :a8947 :a8947 :a8947. :a8948 :a8948 :a8948. :a8949 :a8949 :a8949. :a8950 :a8950 :a8950. :a8951 :a8951 :a8951. :a8952 :a8952 :a8952. :a8953 :a8953 :a8953. :a8954 :a8954 :a8954. :a8955 :a8955 :a8955. :a8956 :a8956 :a8956. :a8957 :a8957 :a8957. :a8958 :a8958 :a8958. :a8959 :a8959 :a8959. :a8960 :a8960 :a8960. :a8961 :a8961 :a8961. :a8962 :a8962 :a8962. :a8963 :a8963 :a8963. :a8964 :a8964 :a8964. :a8965 :a8965 :a8965. :a8966 :a8966 :a8966. :a8967 :a8967 :a8967. :a8968 :a8968 :a8968. :a8969 :a8969 :a8969. :a8970 :a8970 :a8970. :a8971 :a8971 :a8971. :a8972 :a8972 :a8972. :a8973 :a8973 :a8973. :a8974 :a8974 :a8974. :a8975 :a8975 :a8975. :a8976 :a8976 :a8976. :a8977 :a8977 :a8977. :a8978 :a8978 :a8978. :a8979 :a8979 :a8979. :a8980 :a8980 :a8980. :a8981 :a8981 :a8981. :a8982 :a8982 :a8982. :a8983 :a8983 :a8983. :a8984 :a8984 :a8984. :a8985 :a8985 :a8985. :a8986 :a8986 :a8986. :a8987 :a8987 :a8987. :a8988 :a8988 :a8988. :a8989 :a8989 :a8989. :a8990 :a8990 :a8990. :a8991 :a8991 :a8991. :a8992 :a8992 :a8992. :a8993 :a8993 :a8993. :a8994 :a8994 :a8994. :a8995 :a8995 :a8995. :a8996 :a8996 :a8996. :a8997 :a8997 :a8997. :a8998 :a8998 :a8998. :a8999 :a8999 :a8999. :a9000 :a9000 :a9000. :a9001 :a9001 :a9001. :a9002 :a9002 :a9002. :a9003 :a9003 :a9003. :a9004 :a9004 :a9004. :a9005 :a9005 :a9005. :a9006 :a9006 :a9006. :a9007 :a9007 :a9007. :a9008 :a9008 :a9008. :a9009 :a9009 :a9009. :a9010 :a9010 :a9010. :a9011 :a9011 :a9011. :a9012 :a9012 :a9012. :a9013 :a9013 :a9013. :a9014 :a9014 :a9014. :a9015 :a9015 :a9015. :a9016 :a9016 :a9016. :a9017 :a9017 :a9017. :a9018 :a9018 :a9018. :a9019 :a9019 :a9019. :a9020 :a9020 :a9020. :a9021 :a9021 :a9021. :a9022 :a9022 :a9022. :a9023 :a9023 :a9023. :a9024 :a9024 :a9024. :a9025 :a9025 :a9025. :a9026 :a9026 :a9026. :a9027 :a9027 :a9027. :a9028 :a9028 :a9028. :a9029 :a9029 :a9029. :a9030 :a9030 :a9030. :a9031 :a9031 :a9031. :a9032 :a9032 :a9032. :a9033 :a9033 :a9033. :a9034 :a9034 :a9034. :a9035 :a9035 :a9035. :a9036 :a9036 :a9036. :a9037 :a9037 :a9037. :a9038 :a9038 :a9038. :a9039 :a9039 :a9039. :a9040 :a9040 :a9040. :a9041 :a9041 :a9041. :a9042 :a9042 :a9042. :a9043 :a9043 :a9043. :a9044 :a9044 :a9044. :a9045 :a9045 :a9045. :a9046 :a9046 :a9046. :a9047 :a9047 :a9047. :a9048 :a9048 :a9048. :a9049 :a9049 :a9049. :a9050 :a9050 :a9050. :a9051 :a9051 :a9051. :a9052 :a9052 :a9052. :a9053 :a9053 :a9053. :a9054 :a9054 :a9054. :a9055 :a9055 :a9055. :a9056 :a9056 :a9056. :a9057 :a9057 :a9057. :a9058 :a9058 :a9058. :a9059 :a9059 :a9059. :a9060 :a9060 :a9060. :a9061 :a9061 :a9061. :a9062 :a9062 :a9062. :a9063 :a9063 :a9063. :a9064 :a9064 :a9064. :a9065 :a9065 :a9065. :a9066 :a9066 :a9066. :a9067 :a9067 :a9067. :a9068 :a9068 :a9068. :a9069 :a9069 :a9069. :a9070 :a9070 :a9070. :a9071 :a9071 :a9071. :a9072 :a9072 :a9072. :a9073 :a9073 :a9073. :a9074 :a9074 :a9074. :a9075 :a9075 :a9075. :a9076 :a9076 :a9076. :a9077 :a9077 :a9077. :a9078 :a9078 :a9078. :a9079 :a9079 :a9079. :a9080 :a9080 :a9080. :a9081 :a9081 :a9081. :a9082 :a9082 :a9082. :a9083 :a9083 :a9083. :a9084 :a9084 :a9084. :a9085 :a9085 :a9085. :a9086 :a9086 :a9086. :a9087 :a9087 :a9087. :a9088 :a9088 :a9088. :a9089 :a9089 :a9089. :a9090 :a9090 :a9090. :a9091 :a9091 :a9091. :a9092 :a9092 :a9092. :a9093 :a9093 :a9093. :a9094 :a9094 :a9094. :a9095 :a9095 :a9095. :a9096 :a9096 :a9096. :a9097 :a9097 :a9097. :a9098 :a9098 :a9098. :a9099 :a9099 :a9099. :a9100 :a9100 :a9100. :a9101 :a9101 :a9101. :a9102 :a9102 :a9102. :a9103 :a9103 :a9103. :a9104 :a9104 :a9104. :a9105 :a9105 :a9105. :a9106 :a9106 :a9106. :a9107 :a9107 :a9107. :a9108 :a9108 :a9108. :a9109 :a9109 :a9109. :a9110 :a9110 :a9110. :a9111 :a9111 :a9111. :a9112 :a9112 :a9112. :a9113 :a9113 :a9113. :a9114 :a9114 :a9114. :a9115 :a9115 :a9115. :a9116 :a9116 :a9116. :a9117 :a9117 :a9117. :a9118 :a9118 :a9118. :a9119 :a9119 :a9119. :a9120 :a9120 :a9120. :a9121 :a9121 :a9121. :a9122 :a9122 :a9122. :a9123 :a9123 :a9123. :a9124 :a9124 :a9124. :a9125 :a9125 :a9125. :a9126 :a9126 :a9126. :a9127 :a9127 :a9127. :a9128 :a9128 :a9128. :a9129 :a9129 :a9129. :a9130 :a9130 :a9130. :a9131 :a9131 :a9131. :a9132 :a9132 :a9132. :a9133 :a9133 :a9133. :a9134 :a9134 :a9134. :a9135 :a9135 :a9135. :a9136 :a9136 :a9136. :a9137 :a9137 :a9137. :a9138 :a9138 :a9138. :a9139 :a9139 :a9139. :a9140 :a9140 :a9140. :a9141 :a9141 :a9141. :a9142 :a9142 :a9142. :a9143 :a9143 :a9143. :a9144 :a9144 :a9144. :a9145 :a9145 :a9145. :a9146 :a9146 :a9146. :a9147 :a9147 :a9147. :a9148 :a9148 :a9148. :a9149 :a9149 :a9149. :a9150 :a9150 :a9150. :a9151 :a9151 :a9151. :a9152 :a9152 :a9152. :a9153 :a9153 :a9153. :a9154 :a9154 :a9154. :a9155 :a9155 :a9155. :a9156 :a9156 :a9156. :a9157 :a9157 :a9157. :a9158 :a9158 :a9158. :a9159 :a9159 :a9159. :a9160 :a9160 :a9160. :a9161 :a9161 :a9161. :a9162 :a9162 :a9162. :a9163 :a9163 :a9163. :a9164 :a9164 :a9164. :a9165 :a9165 :a9165. :a9166 :a9166 :a9166. :a9167 :a9167 :a9167. :a9168 :a9168 :a9168. :a9169 :a9169 :a9169. :a9170 :a9170 :a9170. :a9171 :a9171 :a9171. :a9172 :a9172 :a9172. :a9173 :a9173 :a9173. :a9174 :a9174 :a9174. :a9175 :a9175 :a9175. :a9176 :a9176 :a9176. :a9177 :a9177 :a9177. :a9178 :a9178 :a9178. :a9179 :a9179 :a9179. :a9180 :a9180 :a9180. :a9181 :a9181 :a9181. :a9182 :a9182 :a9182. :a9183 :a9183 :a9183. :a9184 :a9184 :a9184. :a9185 :a9185 :a9185. :a9186 :a9186 :a9186. :a9187 :a9187 :a9187. :a9188 :a9188 :a9188. :a9189 :a9189 :a9189. :a9190 :a9190 :a9190. :a9191 :a9191 :a9191. :a9192 :a9192 :a9192. :a9193 :a9193 :a9193. :a9194 :a9194 :a9194. :a9195 :a9195 :a9195. :a9196 :a9196 :a9196. :a9197 :a9197 :a9197. :a9198 :a9198 :a9198. :a9199 :a9199 :a9199. :a9200 :a9200 :a9200. :a9201 :a9201 :a9201. :a9202 :a9202 :a9202. :a9203 :a9203 :a9203. :a9204 :a9204 :a9204. :a9205 :a9205 :a9205. :a9206 :a9206 :a9206. :a9207 :a9207 :a9207. :a9208 :a9208 :a9208. :a9209 :a9209 :a9209. :a9210 :a9210 :a9210. :a9211 :a9211 :a9211. :a9212 :a9212 :a9212. :a9213 :a9213 :a9213. :a9214 :a9214 :a9214. :a9215 :a9215 :a9215. :a9216 :a9216 :a9216. :a9217 :a9217 :a9217. :a9218 :a9218 :a9218. :a9219 :a9219 :a9219. :a9220 :a9220 :a9220. :a9221 :a9221 :a9221. :a9222 :a9222 :a9222. :a9223 :a9223 :a9223. :a9224 :a9224 :a9224. :a9225 :a9225 :a9225. :a9226 :a9226 :a9226. :a9227 :a9227 :a9227. :a9228 :a9228 :a9228. :a9229 :a9229 :a9229. :a9230 :a9230 :a9230. :a9231 :a9231 :a9231. :a9232 :a9232 :a9232. :a9233 :a9233 :a9233. :a9234 :a9234 :a9234. :a9235 :a9235 :a9235. :a9236 :a9236 :a9236. :a9237 :a9237 :a9237. :a9238 :a9238 :a9238. :a9239 :a9239 :a9239. :a9240 :a9240 :a9240. :a9241 :a9241 :a9241. :a9242 :a9242 :a9242. :a9243 :a9243 :a9243. :a9244 :a9244 :a9244. :a9245 :a9245 :a9245. :a9246 :a9246 :a9246. :a9247 :a9247 :a9247. :a9248 :a9248 :a9248. :a9249 :a9249 :a9249. :a9250 :a9250 :a9250. :a9251 :a9251 :a9251. :a9252 :a9252 :a9252. :a9253 :a9253 :a9253. :a9254 :a9254 :a9254. :a9255 :a9255 :a9255. :a9256 :a9256 :a9256. :a9257 :a9257 :a9257. :a9258 :a9258 :a9258. :a9259 :a9259 :a9259. :a9260 :a9260 :a9260. :a9261 :a9261 :a9261. :a9262 :a9262 :a9262. :a9263 :a9263 :a9263. :a9264 :a9264 :a9264. :a9265 :a9265 :a9265. :a9266 :a9266 :a9266. :a9267 :a9267 :a9267. :a9268 :a9268 :a9268. :a9269 :a9269 :a9269. :a9270 :a9270 :a9270. :a9271 :a9271 :a9271. :a9272 :a9272 :a9272. :a9273 :a9273 :a9273. :a9274 :a9274 :a9274. :a9275 :a9275 :a9275. :a9276 :a9276 :a9276. :a9277 :a9277 :a9277. :a9278 :a9278 :a9278. :a9279 :a9279 :a9279. :a9280 :a9280 :a9280. :a9281 :a9281 :a9281. :a9282 :a9282 :a9282. :a9283 :a9283 :a9283. :a9284 :a9284 :a9284. :a9285 :a9285 :a9285. :a9286 :a9286 :a9286. :a9287 :a9287 :a9287. :a9288 :a9288 :a9288. :a9289 :a9289 :a9289. :a9290 :a9290 :a9290. :a9291 :a9291 :a9291. :a9292 :a9292 :a9292. :a9293 :a9293 :a9293. :a9294 :a9294 :a9294. :a9295 :a9295 :a9295. :a9296 :a9296 :a9296. :a9297 :a9297 :a9297. :a9298 :a9298 :a9298. :a9299 :a9299 :a9299. :a9300 :a9300 :a9300. :a9301 :a9301 :a9301. :a9302 :a9302 :a9302. :a9303 :a9303 :a9303. :a9304 :a9304 :a9304. :a9305 :a9305 :a9305. :a9306 :a9306 :a9306. :a9307 :a9307 :a9307. :a9308 :a9308 :a9308. :a9309 :a9309 :a9309. :a9310 :a9310 :a9310. :a9311 :a9311 :a9311. :a9312 :a9312 :a9312. :a9313 :a9313 :a9313. :a9314 :a9314 :a9314. :a9315 :a9315 :a9315. :a9316 :a9316 :a9316. :a9317 :a9317 :a9317. :a9318 :a9318 :a9318. :a9319 :a9319 :a9319. :a9320 :a9320 :a9320. :a9321 :a9321 :a9321. :a9322 :a9322 :a9322. :a9323 :a9323 :a9323. :a9324 :a9324 :a9324. :a9325 :a9325 :a9325. :a9326 :a9326 :a9326. :a9327 :a9327 :a9327. :a9328 :a9328 :a9328. :a9329 :a9329 :a9329. :a9330 :a9330 :a9330. :a9331 :a9331 :a9331. :a9332 :a9332 :a9332. :a9333 :a9333 :a9333. :a9334 :a9334 :a9334. :a9335 :a9335 :a9335. :a9336 :a9336 :a9336. :a9337 :a9337 :a9337. :a9338 :a9338 :a9338. :a9339 :a9339 :a9339. :a9340 :a9340 :a9340. :a9341 :a9341 :a9341. :a9342 :a9342 :a9342. :a9343 :a9343 :a9343. :a9344 :a9344 :a9344. :a9345 :a9345 :a9345. :a9346 :a9346 :a9346. :a9347 :a9347 :a9347. :a9348 :a9348 :a9348. :a9349 :a9349 :a9349. :a9350 :a9350 :a9350. :a9351 :a9351 :a9351. :a9352 :a9352 :a9352. :a9353 :a9353 :a9353. :a9354 :a9354 :a9354. :a9355 :a9355 :a9355. :a9356 :a9356 :a9356. :a9357 :a9357 :a9357. :a9358 :a9358 :a9358. :a9359 :a9359 :a9359. :a9360 :a9360 :a9360. :a9361 :a9361 :a9361. :a9362 :a9362 :a9362. :a9363 :a9363 :a9363. :a9364 :a9364 :a9364. :a9365 :a9365 :a9365. :a9366 :a9366 :a9366. :a9367 :a9367 :a9367. :a9368 :a9368 :a9368. :a9369 :a9369 :a9369. :a9370 :a9370 :a9370. :a9371 :a9371 :a9371. :a9372 :a9372 :a9372. :a9373 :a9373 :a9373. :a9374 :a9374 :a9374. :a9375 :a9375 :a9375. :a9376 :a9376 :a9376. :a9377 :a9377 :a9377. :a9378 :a9378 :a9378. :a9379 :a9379 :a9379. :a9380 :a9380 :a9380. :a9381 :a9381 :a9381. :a9382 :a9382 :a9382. :a9383 :a9383 :a9383. :a9384 :a9384 :a9384. :a9385 :a9385 :a9385. :a9386 :a9386 :a9386. :a9387 :a9387 :a9387. :a9388 :a9388 :a9388. :a9389 :a9389 :a9389. :a9390 :a9390 :a9390. :a9391 :a9391 :a9391. :a9392 :a9392 :a9392. :a9393 :a9393 :a9393. :a9394 :a9394 :a9394. :a9395 :a9395 :a9395. :a9396 :a9396 :a9396. :a9397 :a9397 :a9397. :a9398 :a9398 :a9398. :a9399 :a9399 :a9399. :a9400 :a9400 :a9400. :a9401 :a9401 :a9401. :a9402 :a9402 :a9402. :a9403 :a9403 :a9403. :a9404 :a9404 :a9404. :a9405 :a9405 :a9405. :a9406 :a9406 :a9406. :a9407 :a9407 :a9407. :a9408 :a9408 :a9408. :a9409 :a9409 :a9409. :a9410 :a9410 :a9410. :a9411 :a9411 :a9411. :a9412 :a9412 :a9412. :a9413 :a9413 :a9413. :a9414 :a9414 :a9414. :a9415 :a9415 :a9415. :a9416 :a9416 :a9416. :a9417 :a9417 :a9417. :a9418 :a9418 :a9418. :a9419 :a9419 :a9419. :a9420 :a9420 :a9420. :a9421 :a9421 :a9421. :a9422 :a9422 :a9422. :a9423 :a9423 :a9423. :a9424 :a9424 :a9424. :a9425 :a9425 :a9425. :a9426 :a9426 :a9426. :a9427 :a9427 :a9427. :a9428 :a9428 :a9428. :a9429 :a9429 :a9429. :a9430 :a9430 :a9430. :a9431 :a9431 :a9431. :a9432 :a9432 :a9432. :a9433 :a9433 :a9433. :a9434 :a9434 :a9434. :a9435 :a9435 :a9435. :a9436 :a9436 :a9436. :a9437 :a9437 :a9437. :a9438 :a9438 :a9438. :a9439 :a9439 :a9439. :a9440 :a9440 :a9440. :a9441 :a9441 :a9441. :a9442 :a9442 :a9442. :a9443 :a9443 :a9443. :a9444 :a9444 :a9444. :a9445 :a9445 :a9445. :a9446 :a9446 :a9446. :a9447 :a9447 :a9447. :a9448 :a9448 :a9448. :a9449 :a9449 :a9449. :a9450 :a9450 :a9450. :a9451 :a9451 :a9451. :a9452 :a9452 :a9452. :a9453 :a9453 :a9453. :a9454 :a9454 :a9454. :a9455 :a9455 :a9455. :a9456 :a9456 :a9456. :a9457 :a9457 :a9457. :a9458 :a9458 :a9458. :a9459 :a9459 :a9459. :a9460 :a9460 :a9460. :a9461 :a9461 :a9461. :a9462 :a9462 :a9462. :a9463 :a9463 :a9463. :a9464 :a9464 :a9464. :a9465 :a9465 :a9465. :a9466 :a9466 :a9466. :a9467 :a9467 :a9467. :a9468 :a9468 :a9468. :a9469 :a9469 :a9469. :a9470 :a9470 :a9470. :a9471 :a9471 :a9471. :a9472 :a9472 :a9472. :a9473 :a9473 :a9473. :a9474 :a9474 :a9474. :a9475 :a9475 :a9475. :a9476 :a9476 :a9476. :a9477 :a9477 :a9477. :a9478 :a9478 :a9478. :a9479 :a9479 :a9479. :a9480 :a9480 :a9480. :a9481 :a9481 :a9481. :a9482 :a9482 :a9482. :a9483 :a9483 :a9483. :a9484 :a9484 :a9484. :a9485 :a9485 :a9485. :a9486 :a9486 :a9486. :a9487 :a9487 :a9487. :a9488 :a9488 :a9488. :a9489 :a9489 :a9489. :a9490 :a9490 :a9490. :a9491 :a9491 :a9491. :a9492 :a9492 :a9492. :a9493 :a9493 :a9493. :a9494 :a9494 :a9494. :a9495 :a9495 :a9495. :a9496 :a9496 :a9496. :a9497 :a9497 :a9497. :a9498 :a9498 :a9498. :a9499 :a9499 :a9499. :a9500 :a9500 :a9500. :a9501 :a9501 :a9501. :a9502 :a9502 :a9502. :a9503 :a9503 :a9503. :a9504 :a9504 :a9504. :a9505 :a9505 :a9505. :a9506 :a9506 :a9506. :a9507 :a9507 :a9507. :a9508 :a9508 :a9508. :a9509 :a9509 :a9509. :a9510 :a9510 :a9510. :a9511 :a9511 :a9511. :a9512 :a9512 :a9512. :a9513 :a9513 :a9513. :a9514 :a9514 :a9514. :a9515 :a9515 :a9515. :a9516 :a9516 :a9516. :a9517 :a9517 :a9517. :a9518 :a9518 :a9518. :a9519 :a9519 :a9519. :a9520 :a9520 :a9520. :a9521 :a9521 :a9521. :a9522 :a9522 :a9522. :a9523 :a9523 :a9523. :a9524 :a9524 :a9524. :a9525 :a9525 :a9525. :a9526 :a9526 :a9526. :a9527 :a9527 :a9527. :a9528 :a9528 :a9528. :a9529 :a9529 :a9529. :a9530 :a9530 :a9530. :a9531 :a9531 :a9531. :a9532 :a9532 :a9532. :a9533 :a9533 :a9533. :a9534 :a9534 :a9534. :a9535 :a9535 :a9535. :a9536 :a9536 :a9536. :a9537 :a9537 :a9537. :a9538 :a9538 :a9538. :a9539 :a9539 :a9539. :a9540 :a9540 :a9540. :a9541 :a9541 :a9541. :a9542 :a9542 :a9542. :a9543 :a9543 :a9543. :a9544 :a9544 :a9544. :a9545 :a9545 :a9545. :a9546 :a9546 :a9546. :a9547 :a9547 :a9547. :a9548 :a9548 :a9548. :a9549 :a9549 :a9549. :a9550 :a9550 :a9550. :a9551 :a9551 :a9551. :a9552 :a9552 :a9552. :a9553 :a9553 :a9553. :a9554 :a9554 :a9554. :a9555 :a9555 :a9555. :a9556 :a9556 :a9556. :a9557 :a9557 :a9557. :a9558 :a9558 :a9558. :a9559 :a9559 :a9559. :a9560 :a9560 :a9560. :a9561 :a9561 :a9561. :a9562 :a9562 :a9562. :a9563 :a9563 :a9563. :a9564 :a9564 :a9564. :a9565 :a9565 :a9565. :a9566 :a9566 :a9566. :a9567 :a9567 :a9567. :a9568 :a9568 :a9568. :a9569 :a9569 :a9569. :a9570 :a9570 :a9570. :a9571 :a9571 :a9571. :a9572 :a9572 :a9572. :a9573 :a9573 :a9573. :a9574 :a9574 :a9574. :a9575 :a9575 :a9575. :a9576 :a9576 :a9576. :a9577 :a9577 :a9577. :a9578 :a9578 :a9578. :a9579 :a9579 :a9579. :a9580 :a9580 :a9580. :a9581 :a9581 :a9581. :a9582 :a9582 :a9582. :a9583 :a9583 :a9583. :a9584 :a9584 :a9584. :a9585 :a9585 :a9585. :a9586 :a9586 :a9586. :a9587 :a9587 :a9587. :a9588 :a9588 :a9588. :a9589 :a9589 :a9589. :a9590 :a9590 :a9590. :a9591 :a9591 :a9591. :a9592 :a9592 :a9592. :a9593 :a9593 :a9593. :a9594 :a9594 :a9594. :a9595 :a9595 :a9595. :a9596 :a9596 :a9596. :a9597 :a9597 :a9597. :a9598 :a9598 :a9598. :a9599 :a9599 :a9599. :a9600 :a9600 :a9600. :a9601 :a9601 :a9601. :a9602 :a9602 :a9602. :a9603 :a9603 :a9603. :a9604 :a9604 :a9604. :a9605 :a9605 :a9605. :a9606 :a9606 :a9606. :a9607 :a9607 :a9607. :a9608 :a9608 :a9608. :a9609 :a9609 :a9609. :a9610 :a9610 :a9610. :a9611 :a9611 :a9611. :a9612 :a9612 :a9612. :a9613 :a9613 :a9613. :a9614 :a9614 :a9614. :a9615 :a9615 :a9615. :a9616 :a9616 :a9616. :a9617 :a9617 :a9617. :a9618 :a9618 :a9618. :a9619 :a9619 :a9619. :a9620 :a9620 :a9620. :a9621 :a9621 :a9621. :a9622 :a9622 :a9622. :a9623 :a9623 :a9623. :a9624 :a9624 :a9624. :a9625 :a9625 :a9625. :a9626 :a9626 :a9626. :a9627 :a9627 :a9627. :a9628 :a9628 :a9628. :a9629 :a9629 :a9629. :a9630 :a9630 :a9630. :a9631 :a9631 :a9631. :a9632 :a9632 :a9632. :a9633 :a9633 :a9633. :a9634 :a9634 :a9634. :a9635 :a9635 :a9635. :a9636 :a9636 :a9636. :a9637 :a9637 :a9637. :a9638 :a9638 :a9638. :a9639 :a9639 :a9639. :a9640 :a9640 :a9640. :a9641 :a9641 :a9641. :a9642 :a9642 :a9642. :a9643 :a9643 :a9643. :a9644 :a9644 :a9644. :a9645 :a9645 :a9645. :a9646 :a9646 :a9646. :a9647 :a9647 :a9647. :a9648 :a9648 :a9648. :a9649 :a9649 :a9649. :a9650 :a9650 :a9650. :a9651 :a9651 :a9651. :a9652 :a9652 :a9652. :a9653 :a9653 :a9653. :a9654 :a9654 :a9654. :a9655 :a9655 :a9655. :a9656 :a9656 :a9656. :a9657 :a9657 :a9657. :a9658 :a9658 :a9658. :a9659 :a9659 :a9659. :a9660 :a9660 :a9660. :a9661 :a9661 :a9661. :a9662 :a9662 :a9662. :a9663 :a9663 :a9663. :a9664 :a9664 :a9664. :a9665 :a9665 :a9665. :a9666 :a9666 :a9666. :a9667 :a9667 :a9667. :a9668 :a9668 :a9668. :a9669 :a9669 :a9669. :a9670 :a9670 :a9670. :a9671 :a9671 :a9671. :a9672 :a9672 :a9672. :a9673 :a9673 :a9673. :a9674 :a9674 :a9674. :a9675 :a9675 :a9675. :a9676 :a9676 :a9676. :a9677 :a9677 :a9677. :a9678 :a9678 :a9678. :a9679 :a9679 :a9679. :a9680 :a9680 :a9680. :a9681 :a9681 :a9681. :a9682 :a9682 :a9682. :a9683 :a9683 :a9683. :a9684 :a9684 :a9684. :a9685 :a9685 :a9685. :a9686 :a9686 :a9686. :a9687 :a9687 :a9687. :a9688 :a9688 :a9688. :a9689 :a9689 :a9689. :a9690 :a9690 :a9690. :a9691 :a9691 :a9691. :a9692 :a9692 :a9692. :a9693 :a9693 :a9693. :a9694 :a9694 :a9694. :a9695 :a9695 :a9695. :a9696 :a9696 :a9696. :a9697 :a9697 :a9697. :a9698 :a9698 :a9698. :a9699 :a9699 :a9699. :a9700 :a9700 :a9700. :a9701 :a9701 :a9701. :a9702 :a9702 :a9702. :a9703 :a9703 :a9703. :a9704 :a9704 :a9704. :a9705 :a9705 :a9705. :a9706 :a9706 :a9706. :a9707 :a9707 :a9707. :a9708 :a9708 :a9708. :a9709 :a9709 :a9709. :a9710 :a9710 :a9710. :a9711 :a9711 :a9711. :a9712 :a9712 :a9712. :a9713 :a9713 :a9713. :a9714 :a9714 :a9714. :a9715 :a9715 :a9715. :a9716 :a9716 :a9716. :a9717 :a9717 :a9717. :a9718 :a9718 :a9718. :a9719 :a9719 :a9719. :a9720 :a9720 :a9720. :a9721 :a9721 :a9721. :a9722 :a9722 :a9722. :a9723 :a9723 :a9723. :a9724 :a9724 :a9724. :a9725 :a9725 :a9725. :a9726 :a9726 :a9726. :a9727 :a9727 :a9727. :a9728 :a9728 :a9728. :a9729 :a9729 :a9729. :a9730 :a9730 :a9730. :a9731 :a9731 :a9731. :a9732 :a9732 :a9732. :a9733 :a9733 :a9733. :a9734 :a9734 :a9734. :a9735 :a9735 :a9735. :a9736 :a9736 :a9736. :a9737 :a9737 :a9737. :a9738 :a9738 :a9738. :a9739 :a9739 :a9739. :a9740 :a9740 :a9740. :a9741 :a9741 :a9741. :a9742 :a9742 :a9742. :a9743 :a9743 :a9743. :a9744 :a9744 :a9744. :a9745 :a9745 :a9745. :a9746 :a9746 :a9746. :a9747 :a9747 :a9747. :a9748 :a9748 :a9748. :a9749 :a9749 :a9749. :a9750 :a9750 :a9750. :a9751 :a9751 :a9751. :a9752 :a9752 :a9752. :a9753 :a9753 :a9753. :a9754 :a9754 :a9754. :a9755 :a9755 :a9755. :a9756 :a9756 :a9756. :a9757 :a9757 :a9757. :a9758 :a9758 :a9758. :a9759 :a9759 :a9759. :a9760 :a9760 :a9760. :a9761 :a9761 :a9761. :a9762 :a9762 :a9762. :a9763 :a9763 :a9763. :a9764 :a9764 :a9764. :a9765 :a9765 :a9765. :a9766 :a9766 :a9766. :a9767 :a9767 :a9767. :a9768 :a9768 :a9768. :a9769 :a9769 :a9769. :a9770 :a9770 :a9770. :a9771 :a9771 :a9771. :a9772 :a9772 :a9772. :a9773 :a9773 :a9773. :a9774 :a9774 :a9774. :a9775 :a9775 :a9775. :a9776 :a9776 :a9776. :a9777 :a9777 :a9777. :a9778 :a9778 :a9778. :a9779 :a9779 :a9779. :a9780 :a9780 :a9780. :a9781 :a9781 :a9781. :a9782 :a9782 :a9782. :a9783 :a9783 :a9783. :a9784 :a9784 :a9784. :a9785 :a9785 :a9785. :a9786 :a9786 :a9786. :a9787 :a9787 :a9787. :a9788 :a9788 :a9788. :a9789 :a9789 :a9789. :a9790 :a9790 :a9790. :a9791 :a9791 :a9791. :a9792 :a9792 :a9792. :a9793 :a9793 :a9793. :a9794 :a9794 :a9794. :a9795 :a9795 :a9795. :a9796 :a9796 :a9796. :a9797 :a9797 :a9797. :a9798 :a9798 :a9798. :a9799 :a9799 :a9799. :a9800 :a9800 :a9800. :a9801 :a9801 :a9801. :a9802 :a9802 :a9802. :a9803 :a9803 :a9803. :a9804 :a9804 :a9804. :a9805 :a9805 :a9805. :a9806 :a9806 :a9806. :a9807 :a9807 :a9807. :a9808 :a9808 :a9808. :a9809 :a9809 :a9809. :a9810 :a9810 :a9810. :a9811 :a9811 :a9811. :a9812 :a9812 :a9812. :a9813 :a9813 :a9813. :a9814 :a9814 :a9814. :a9815 :a9815 :a9815. :a9816 :a9816 :a9816. :a9817 :a9817 :a9817. :a9818 :a9818 :a9818. :a9819 :a9819 :a9819. :a9820 :a9820 :a9820. :a9821 :a9821 :a9821. :a9822 :a9822 :a9822. :a9823 :a9823 :a9823. :a9824 :a9824 :a9824. :a9825 :a9825 :a9825. :a9826 :a9826 :a9826. :a9827 :a9827 :a9827. :a9828 :a9828 :a9828. :a9829 :a9829 :a9829. :a9830 :a9830 :a9830. :a9831 :a9831 :a9831. :a9832 :a9832 :a9832. :a9833 :a9833 :a9833. :a9834 :a9834 :a9834. :a9835 :a9835 :a9835. :a9836 :a9836 :a9836. :a9837 :a9837 :a9837. :a9838 :a9838 :a9838. :a9839 :a9839 :a9839. :a9840 :a9840 :a9840. :a9841 :a9841 :a9841. :a9842 :a9842 :a9842. :a9843 :a9843 :a9843. :a9844 :a9844 :a9844. :a9845 :a9845 :a9845. :a9846 :a9846 :a9846. :a9847 :a9847 :a9847. :a9848 :a9848 :a9848. :a9849 :a9849 :a9849. :a9850 :a9850 :a9850. :a9851 :a9851 :a9851. :a9852 :a9852 :a9852. :a9853 :a9853 :a9853. :a9854 :a9854 :a9854. :a9855 :a9855 :a9855. :a9856 :a9856 :a9856. :a9857 :a9857 :a9857. :a9858 :a9858 :a9858. :a9859 :a9859 :a9859. :a9860 :a9860 :a9860. :a9861 :a9861 :a9861. :a9862 :a9862 :a9862. :a9863 :a9863 :a9863. :a9864 :a9864 :a9864. :a9865 :a9865 :a9865. :a9866 :a9866 :a9866. :a9867 :a9867 :a9867. :a9868 :a9868 :a9868. :a9869 :a9869 :a9869. :a9870 :a9870 :a9870. :a9871 :a9871 :a9871. :a9872 :a9872 :a9872. :a9873 :a9873 :a9873. :a9874 :a9874 :a9874. :a9875 :a9875 :a9875. :a9876 :a9876 :a9876. :a9877 :a9877 :a9877. :a9878 :a9878 :a9878. :a9879 :a9879 :a9879. :a9880 :a9880 :a9880. :a9881 :a9881 :a9881. :a9882 :a9882 :a9882. :a9883 :a9883 :a9883. :a9884 :a9884 :a9884. :a9885 :a9885 :a9885. :a9886 :a9886 :a9886. :a9887 :a9887 :a9887. :a9888 :a9888 :a9888. :a9889 :a9889 :a9889. :a9890 :a9890 :a9890. :a9891 :a9891 :a9891. :a9892 :a9892 :a9892. :a9893 :a9893 :a9893. :a9894 :a9894 :a9894. :a9895 :a9895 :a9895. :a9896 :a9896 :a9896. :a9897 :a9897 :a9897. :a9898 :a9898 :a9898. :a9899 :a9899 :a9899. :a9900 :a9900 :a9900. :a9901 :a9901 :a9901. :a9902 :a9902 :a9902. :a9903 :a9903 :a9903. :a9904 :a9904 :a9904. :a9905 :a9905 :a9905. :a9906 :a9906 :a9906. :a9907 :a9907 :a9907. :a9908 :a9908 :a9908. :a9909 :a9909 :a9909. :a9910 :a9910 :a9910. :a9911 :a9911 :a9911. :a9912 :a9912 :a9912. :a9913 :a9913 :a9913. :a9914 :a9914 :a9914. :a9915 :a9915 :a9915. :a9916 :a9916 :a9916. :a9917 :a9917 :a9917. :a9918 :a9918 :a9918. :a9919 :a9919 :a9919. :a9920 :a9920 :a9920. :a9921 :a9921 :a9921. :a9922 :a9922 :a9922. :a9923 :a9923 :a9923. :a9924 :a9924 :a9924. :a9925 :a9925 :a9925. :a9926 :a9926 :a9926. :a9927 :a9927 :a9927. :a9928 :a9928 :a9928. :a9929 :a9929 :a9929. :a9930 :a9930 :a9930. :a9931 :a9931 :a9931. :a9932 :a9932 :a9932. :a9933 :a9933 :a9933. :a9934 :a9934 :a9934. :a9935 :a9935 :a9935. :a9936 :a9936 :a9936. :a9937 :a9937 :a9937. :a9938 :a9938 :a9938. :a9939 :a9939 :a9939. :a9940 :a9940 :a9940. :a9941 :a9941 :a9941. :a9942 :a9942 :a9942. :a9943 :a9943 :a9943. :a9944 :a9944 :a9944. :a9945 :a9945 :a9945. :a9946 :a9946 :a9946. :a9947 :a9947 :a9947. :a9948 :a9948 :a9948. :a9949 :a9949 :a9949. :a9950 :a9950 :a9950. :a9951 :a9951 :a9951. :a9952 :a9952 :a9952. :a9953 :a9953 :a9953. :a9954 :a9954 :a9954. :a9955 :a9955 :a9955. :a9956 :a9956 :a9956. :a9957 :a9957 :a9957. :a9958 :a9958 :a9958. :a9959 :a9959 :a9959. :a9960 :a9960 :a9960. :a9961 :a9961 :a9961. :a9962 :a9962 :a9962. :a9963 :a9963 :a9963. :a9964 :a9964 :a9964. :a9965 :a9965 :a9965. :a9966 :a9966 :a9966. :a9967 :a9967 :a9967. :a9968 :a9968 :a9968. :a9969 :a9969 :a9969. :a9970 :a9970 :a9970. :a9971 :a9971 :a9971. :a9972 :a9972 :a9972. :a9973 :a9973 :a9973. :a9974 :a9974 :a9974. :a9975 :a9975 :a9975. :a9976 :a9976 :a9976. :a9977 :a9977 :a9977. :a9978 :a9978 :a9978. :a9979 :a9979 :a9979. :a9980 :a9980 :a9980. :a9981 :a9981 :a9981. :a9982 :a9982 :a9982. :a9983 :a9983 :a9983. :a9984 :a9984 :a9984. :a9985 :a9985 :a9985. :a9986 :a9986 :a9986. :a9987 :a9987 :a9987. :a9988 :a9988 :a9988. :a9989 :a9989 :a9989. :a9990 :a9990 :a9990. :a9991 :a9991 :a9991. :a9992 :a9992 :a9992. :a9993 :a9993 :a9993. :a9994 :a9994 :a9994. :a9995 :a9995 :a9995. :a9996 :a9996 :a9996. :a9997 :a9997 :a9997. :a9998 :a9998 :a9998. :a9999 :a9999 :a9999. :a10000 :a10000 :a10000. raptor2-2.0.15/tests/turtle/test-07.out0000644000175000017500000000061610674751730014543 00000000000000_:genid1 "banana" . _:genid1 . _:genid2 "apple" . _:genid2 _:genid1 . _:genid2 . raptor2-2.0.15/tests/turtle/Makefile.in0000644000175000017500000005453312425344566014664 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Turtle tests # # Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/turtle DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_FILES = test-00.ttl test-01.ttl test-02.ttl test-03.ttl \ test-04.ttl test-05.ttl test-06.ttl test-07.ttl test-08.ttl \ test-09.ttl test-10.ttl test-11.ttl test-12.ttl test-13.ttl \ test-14.ttl test-15.ttl test-16.ttl test-17.ttl test-18.ttl \ test-19.ttl test-20.ttl test-21.ttl test-22.ttl test-23.ttl \ test-24.ttl test-25.ttl test-26.ttl test-27.ttl \ test-29.ttl test-30.ttl test-33.ttl test-36.ttl test-37.ttl \ test-38.ttl bad-15.ttl bad-17.ttl bad-18.ttl bad-21.ttl bad-22.ttl \ rdf-schema.ttl \ rdfs-namespace.ttl \ rdfq-results.ttl TEST_BAD_FILES = bad-00.ttl bad-01.ttl bad-02.ttl bad-03.ttl \ bad-04.ttl bad-05.ttl bad-06.ttl bad-07.ttl bad-08.ttl bad-09.ttl \ bad-10.ttl bad-11.ttl bad-12.ttl bad-13.ttl bad-14.ttl bad-16.ttl \ bad-19.ttl bad-20.ttl \ bad-23.ttl bad-24.ttl TEST_OUT_FILES = test-00.out test-01.out test-02.out test-03.out \ test-04.out test-05.out test-06.out test-07.out test-08.out \ test-09.out test-10.out test-11.out test-12.out test-13.out \ test-14.out test-15.out test-16.out test-17.out test-18.out \ test-19.out test-20.out test-21.out test-22.out test-23.out \ test-24.out test-25.out test-26.out test-27.out test-28.out \ test-29.out test-30.out test-33.out test-36.out test-37.out \ test-38.out bad-15.out bad-17.out bad-18.out bad-21.out bad-22.out \ rdf-schema.out \ rdfs-namespace.out \ rdfq-results.out TEST_SERIALIZE_FILES = \ test-28.ttl test-31.ttl test-32.ttl test-34.ttl test-39.ttl TEST_SERIALIZE_OUT_FILES = \ test-28-out.ttl test-31-out.ttl test-32-out.ttl test-34-out.ttl test-39-out.ttl TURTLE_HACK_OUT_FILES = \ ex-38-turtle.out TURTLE_SERIALIZE_RDF_FILES = ex-62.rdf TEST_MANIFEST_FILES = manifest.ttl manifest-bad.ttl # Used to make N-triples output consistent BASE_URI = http://www.w3.org/2001/sw/DataAccess/df1/tests/ # for rdf-schema.ttl RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES = README.txt \ $(TEST_FILES) \ $(TEST_BAD_FILES) \ $(TEST_OUT_FILES) \ $(TEST_MANIFEST_FILES) \ $(TEST_SERIALIZE_FILES) \ $(TEST_SERIALIZE_OUT_FILES) \ $(TURTLE_SERIALIZE_RDF_TEST_FILES) \ $(TURTLE_SERIALIZE_RDF_FILES) \ $(TURTLE_HACK_OUT_FILES) EXTRA_DIST = $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff @MAINTAINER_MODE_TRUE@check_rdf_deps = $(TEST_FILES) @MAINTAINER_MODE_TRUE@check_bad_rdf_deps = $(TEST_BAD_FILES) @MAINTAINER_MODE_TRUE@check_turtle_serialize_deps = $(TEST_FILES) @MAINTAINER_MODE_TRUE@check_turtle_serialize_syntax_deps = $(TEST_SERIALIZE_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/turtle/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/turtle/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-rdf check-bad-rdf check-turtle-serialize \ check-turtle-serialize-syntax check-turtle-parse-ntriples \ check-turtle-serialize-rdf check-rdf: build-rapper $(check_rdf_deps) @result=0; \ $(RECHO) "Testing legal Turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ exit $$result check-bad-rdf: build-rapper $(check_bad_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing bad Turtle fails"; \ for test in $(TEST_BAD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ set -e; exit $$result check-turtle-serialize: build-rdfdiff build-rapper $(check_turtle_serialize_deps) @set +e; result=0; \ $(RECHO) "Testing turtle serialization with legal turtle"; \ for test in $(TEST_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ $(RDFDIFF) -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(RECHO) $(RDFDIFF) -f turtle -u $$baseuri -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name-turtle.ttl; cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-syntax: build-rapper $(check_turtle_serialize_syntax_deps) @set +e; result=0; \ $(RECHO) "Testing turtle exact serialization output"; \ for test in $(TEST_SERIALIZE_FILES); do \ name=`basename $$test .ttl` ; \ if test $$name = rdf-schema; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = test-31 -o $$name = test-32 -o $$name = test-39; then \ baseuri=-; \ else \ baseuri=$(BASE_URI)$$test; \ fi; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ cmp -s $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ status=$$?; \ if test $$status = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ cat $$name.err; \ diff -a -u $(srcdir)/$$name-out.ttl $$name-turtle.ttl; \ fi; \ rm -f $$name-turtle.ttl $$name.err; \ done; \ set -e; exit $$result check-turtle-parse-ntriples: build-rapper @set +e; result=0; \ $(RECHO) "Testing Turtle parsing with N-Triples tests"; \ NT_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(NTRIPLES_DIR) && $(MAKE) print-nt-test-files | sed -e 's,^, ,' -e 's, ,$(NTRIPLES_DIR)/,g'`; \ for test in $$NT_TEST_FILES; do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ test_expected=$(srcdir)/$(NTRIPLES_DIR)/$$name.out; \ if cmp $$test_expected $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $$test_expected $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-turtle-serialize-rdf: build-rdfdiff build-rapper @set +e; result=0; \ RDF_TEST_FILES=`unset MAKELEVEL MAKEFLAGS; cd $(RDFXML_DIR) && $(MAKE) print-rdf-test-files | sed -e 's,^, ,' -e 's, ,$(RDFXML_DIR)/,g'`; \ $(RECHO) "Testing turtle serialization with legal rdf/xml"; \ for test in $$RDF_TEST_FILES $(TURTLE_SERIALIZE_RDF_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o turtle $(srcdir)/$$test $$baseuri > $$name-turtle.ttl 2> $$name.err; \ status1=$$?; \ if test $$test = "$(RDFXML_DIR)/ex-38.rdf"; then \ diff $(srcdir)/ex-38-turtle.out $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(RDFDIFF) -t turtle $(srcdir)/$$test $$name-turtle.ttl > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -o turtle $(srcdir)/$$test $$baseuri '>' $$name-turtle.ttl; \ $(RECHO) $(RDFDIFF) -t turtle $(srcdir)/$$test $$name-turtle.ttl '>' $$name.res; \ cat $$name.err; \ fi; \ rm -f $$name-turtle.ttl $$name.res $$name.err; \ done; \ set -e; exit $$result @MAINTAINER_MODE_TRUE@zip: tests.zip @MAINTAINER_MODE_TRUE@tests.zip: $(ALL_TEST_FILES) @MAINTAINER_MODE_TRUE@ rm -f $@ @MAINTAINER_MODE_TRUE@ zip $@ $(ALL_TEST_FILES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/turtle/test-26.ttl0000644000175000017500000000013510674751730014534 00000000000000# comment line with no final newline test @prefix : . :a :b :c . #foo raptor2-2.0.15/tests/turtle/bad-06.ttl0000644000175000017500000000013310674751730014277 00000000000000# is and of are not in turtle @prefix : . :a is :b of :c . raptor2-2.0.15/tests/turtle/test-04.ttl0000644000175000017500000000016010674751730014526 00000000000000# Test empty [] operator; not allowed as predicate @prefix : . [] :a :b . :c :d [] . raptor2-2.0.15/tests/turtle/bad-00.ttl0000644000175000017500000000005610674751730014275 00000000000000# prefix name must end in a : @prefix a <#> . raptor2-2.0.15/tests/turtle/ex-62.rdf0000644000175000017500000000106311113423026014121 00000000000000 raptor2-2.0.15/tests/turtle/bad-23.ttl0000644000175000017500000000036311472513121014266 00000000000000# from Redland Issue #0000369 # http://bugs.librdf.org/mantis/view.php?id=369 # The terminating """ is three leftmost-parsed double-quotes """This literal ends with an unescaped quote"""" . raptor2-2.0.15/tests/turtle/bad-22.out0000644000175000017500000000015612112703616014273 00000000000000 . raptor2-2.0.15/tests/turtle/rdfs-namespace.ttl0000644000175000017500000001043510674751730016224 00000000000000# RDFS Namespace document converted into Turtle @prefix : . @prefix rdf: . rdf:type a rdf:Property; :comment "Indicates membership of a class"; :domain :Resource; :isDefinedBy rdf:; :label "type"@en; :range :Class . rdf:Alt a :Class; :comment "A collection of alternatives."@en; :isDefinedBy rdf:; :label "Alt"@en; :subClassOf :Container . rdf:Bag a :Class; :comment "An unordered collection."@en; :isDefinedBy rdf:; :label "Bag"@en; :subClassOf :Container . rdf:Property a :Class; :comment "The concept of a property."; :isDefinedBy rdf:; :label "Property"@en; :subClassOf :Resource . rdf:Seq a :Class; :comment "An ordered collection."@en; :isDefinedBy rdf:; :label "Seq"@en; :subClassOf :Container . rdf:Statement a :Class; :comment "The class of RDF statements."; :isDefinedBy rdf:; :label "Statement"@en; :subClassOf :Resource . rdf:object a rdf:Property; :comment "The object of an RDF statement."; :domain rdf:Statement; :isDefinedBy rdf:; :label "object"@en . rdf:predicate a rdf:Property; :comment "the predicate of an RDF statement."; :domain rdf:Statement; :isDefinedBy rdf:; :label "predicate"@en; :range rdf:Property . rdf:subject a rdf:Property; :comment "The subject of an RDF statement."; :domain rdf:Statement; :isDefinedBy rdf:; :label "subject"@en; :range :Resource . rdf:value a rdf:Property; :comment "Identifies the principal value (usually a string) of a property when the property value is a structured resource"; :domain :Resource; :isDefinedBy rdf:; :label "value"@en . : :seeAlso . :Class a :Class; :comment "The concept of Class"; :isDefinedBy :; :label "Class"@en; :subClassOf :Resource . :Container a :Class; :comment "This represents the set Containers."; :isDefinedBy :; :label "Container"@en; :subClassOf :Resource . :ContainerMembershipProperty a :Class; :comment "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'."; :isDefinedBy :; :label "ContainerMembershipProperty"@en; :subClassOf rdf:Property . :Literal a :Class; :comment "This represents the set of atomic values, eg. textual strings."; :isDefinedBy :; :label "Literal"@en . :Resource a :Class; :comment "The class resource, everything."; :isDefinedBy :; :label "Resource"@en . :comment a rdf:Property; :comment "Use this for descriptions"; :domain :Resource; :isDefinedBy :; :label "comment"@en; :range :Literal . :domain a rdf:Property; :comment "A domain class for a property type"; :domain rdf:Property; :isDefinedBy :; :label "domain"@en; :range :Class . :isDefinedBy a rdf:Property; :comment "Indicates the namespace of a resource"; :domain :Resource; :isDefinedBy :; :label "isDefinedBy"@en; :range :Resource; :subPropertyOf :seeAlso . :label a rdf:Property; :comment "Provides a human-readable version of a resource name."; :domain :Resource; :isDefinedBy :; :label "label"@en; :range :Literal . :member a rdf:Property; :comment "a member of a container"; :domain :Container; :isDefinedBy :; :label "member"@en . :range a rdf:Property; :comment "A range class for a property type"; :domain rdf:Property; :isDefinedBy :; :label "range"@en; :range :Class . :seeAlso a rdf:Property; :comment "A resource that provides information about the subject resource"; :domain :Resource; :isDefinedBy :; :label "seeAlso"@en; :range :Resource . :subClassOf a rdf:Property; :comment "Indicates membership of a class"; :domain :Class; :isDefinedBy :; :label "subClassOf"@en; :range :Class . :subPropertyOf a rdf:Property; :comment "Indicates specialization of properties"; :domain rdf:Property; :isDefinedBy :; :label "subPropertyOf"@en; :range rdf:Property . raptor2-2.0.15/tests/turtle/test-39-out.ttl0000644000175000017500000000017312425333224015335 00000000000000@prefix rdf: . @prefix : . :a :b ( ) . raptor2-2.0.15/tests/turtle/test-24.ttl0000644000175000017500000000007510674751730014535 00000000000000@prefix : . :a :b true . :c :d false . raptor2-2.0.15/tests/turtle/test-15.ttl0000644000175000017500000023225010674751730014537 00000000000000# 10000 triple objects (10000 triples) more than the default Bison stack size @prefix : . :a :b :c1, :c2, :c3, :c4, :c5, :c6, :c7, :c8, :c9, :c10, :c11, :c12, :c13, :c14, :c15, :c16, :c17, :c18, :c19, :c20, :c21, :c22, :c23, :c24, :c25, :c26, :c27, :c28, :c29, :c30, :c31, :c32, :c33, :c34, :c35, :c36, :c37, :c38, :c39, :c40, :c41, :c42, :c43, :c44, :c45, :c46, :c47, :c48, :c49, :c50, :c51, :c52, :c53, :c54, :c55, :c56, :c57, :c58, :c59, :c60, :c61, :c62, :c63, :c64, :c65, :c66, :c67, :c68, :c69, :c70, :c71, :c72, :c73, :c74, :c75, :c76, :c77, :c78, :c79, :c80, :c81, :c82, :c83, :c84, :c85, :c86, :c87, :c88, :c89, :c90, :c91, :c92, :c93, :c94, :c95, :c96, :c97, :c98, :c99, :c100, :c101, :c102, :c103, :c104, :c105, :c106, :c107, :c108, :c109, :c110, :c111, :c112, :c113, :c114, :c115, :c116, :c117, :c118, :c119, :c120, :c121, :c122, :c123, :c124, :c125, :c126, :c127, :c128, :c129, :c130, :c131, :c132, :c133, :c134, :c135, :c136, :c137, :c138, :c139, :c140, :c141, :c142, :c143, :c144, :c145, :c146, :c147, :c148, :c149, :c150, :c151, :c152, :c153, :c154, :c155, :c156, :c157, :c158, :c159, :c160, :c161, :c162, :c163, :c164, :c165, :c166, :c167, :c168, :c169, :c170, :c171, :c172, :c173, :c174, :c175, :c176, :c177, :c178, :c179, :c180, :c181, :c182, :c183, :c184, :c185, :c186, :c187, :c188, :c189, :c190, :c191, :c192, :c193, :c194, :c195, :c196, :c197, :c198, :c199, :c200, :c201, :c202, :c203, :c204, :c205, :c206, :c207, :c208, :c209, :c210, :c211, :c212, :c213, :c214, :c215, :c216, :c217, :c218, :c219, :c220, :c221, :c222, :c223, :c224, :c225, :c226, :c227, :c228, :c229, :c230, :c231, :c232, :c233, :c234, :c235, :c236, :c237, :c238, :c239, :c240, :c241, :c242, :c243, :c244, :c245, :c246, :c247, :c248, :c249, :c250, :c251, :c252, :c253, :c254, :c255, :c256, :c257, :c258, :c259, :c260, :c261, :c262, :c263, :c264, :c265, :c266, :c267, :c268, :c269, :c270, :c271, :c272, :c273, :c274, :c275, :c276, :c277, :c278, :c279, :c280, :c281, :c282, :c283, :c284, :c285, :c286, :c287, :c288, :c289, :c290, :c291, :c292, :c293, :c294, :c295, :c296, :c297, :c298, :c299, :c300, :c301, :c302, :c303, :c304, :c305, :c306, :c307, :c308, :c309, :c310, :c311, :c312, :c313, :c314, :c315, :c316, :c317, :c318, :c319, :c320, :c321, :c322, :c323, :c324, :c325, :c326, :c327, :c328, :c329, :c330, :c331, :c332, :c333, :c334, :c335, :c336, :c337, :c338, :c339, :c340, :c341, :c342, :c343, :c344, :c345, :c346, :c347, :c348, :c349, :c350, :c351, :c352, :c353, :c354, :c355, :c356, :c357, :c358, :c359, :c360, :c361, :c362, :c363, :c364, :c365, :c366, :c367, :c368, :c369, :c370, :c371, :c372, :c373, :c374, :c375, :c376, :c377, :c378, :c379, :c380, :c381, :c382, :c383, :c384, :c385, :c386, :c387, :c388, :c389, :c390, :c391, :c392, :c393, :c394, :c395, :c396, :c397, :c398, :c399, :c400, :c401, :c402, :c403, :c404, :c405, :c406, :c407, :c408, :c409, :c410, :c411, :c412, :c413, :c414, :c415, :c416, :c417, :c418, :c419, :c420, :c421, :c422, :c423, :c424, :c425, :c426, :c427, :c428, :c429, :c430, :c431, :c432, :c433, :c434, :c435, :c436, :c437, :c438, :c439, :c440, :c441, :c442, :c443, :c444, :c445, :c446, :c447, :c448, :c449, :c450, :c451, :c452, :c453, :c454, :c455, :c456, :c457, :c458, :c459, :c460, :c461, :c462, :c463, :c464, :c465, :c466, :c467, :c468, :c469, :c470, :c471, :c472, :c473, :c474, :c475, :c476, :c477, :c478, :c479, :c480, :c481, :c482, :c483, :c484, :c485, :c486, :c487, :c488, :c489, :c490, :c491, :c492, :c493, :c494, :c495, :c496, :c497, :c498, :c499, :c500, :c501, :c502, :c503, :c504, :c505, :c506, :c507, :c508, :c509, :c510, :c511, :c512, :c513, :c514, :c515, :c516, :c517, :c518, :c519, :c520, :c521, :c522, :c523, :c524, :c525, :c526, :c527, :c528, :c529, :c530, :c531, :c532, :c533, :c534, :c535, :c536, :c537, :c538, :c539, :c540, :c541, :c542, :c543, :c544, :c545, :c546, :c547, :c548, :c549, :c550, :c551, :c552, :c553, :c554, :c555, :c556, :c557, :c558, :c559, :c560, :c561, :c562, :c563, :c564, :c565, :c566, :c567, :c568, :c569, :c570, :c571, :c572, :c573, :c574, :c575, :c576, :c577, :c578, :c579, :c580, :c581, :c582, :c583, :c584, :c585, :c586, :c587, :c588, :c589, :c590, :c591, :c592, :c593, :c594, :c595, :c596, :c597, :c598, :c599, :c600, :c601, :c602, :c603, :c604, :c605, :c606, :c607, :c608, :c609, :c610, :c611, :c612, :c613, :c614, :c615, :c616, :c617, :c618, :c619, :c620, :c621, :c622, :c623, :c624, :c625, :c626, :c627, :c628, :c629, :c630, :c631, :c632, :c633, :c634, :c635, :c636, :c637, :c638, :c639, :c640, :c641, :c642, :c643, :c644, :c645, :c646, :c647, :c648, :c649, :c650, :c651, :c652, :c653, :c654, :c655, :c656, :c657, :c658, :c659, :c660, :c661, :c662, :c663, :c664, :c665, :c666, :c667, :c668, :c669, :c670, :c671, :c672, :c673, :c674, :c675, :c676, :c677, :c678, :c679, :c680, :c681, :c682, :c683, :c684, :c685, :c686, :c687, :c688, :c689, :c690, :c691, :c692, :c693, :c694, :c695, :c696, :c697, :c698, :c699, :c700, :c701, :c702, :c703, :c704, :c705, :c706, :c707, :c708, :c709, :c710, :c711, :c712, :c713, :c714, :c715, :c716, :c717, :c718, :c719, :c720, :c721, :c722, :c723, :c724, :c725, :c726, :c727, :c728, :c729, :c730, :c731, :c732, :c733, :c734, :c735, :c736, :c737, :c738, :c739, :c740, :c741, :c742, :c743, :c744, :c745, :c746, :c747, :c748, :c749, :c750, :c751, :c752, :c753, :c754, :c755, :c756, :c757, :c758, :c759, :c760, :c761, :c762, :c763, :c764, :c765, :c766, :c767, :c768, :c769, :c770, :c771, :c772, :c773, :c774, :c775, :c776, :c777, :c778, :c779, :c780, :c781, :c782, :c783, :c784, :c785, :c786, :c787, :c788, :c789, :c790, :c791, :c792, :c793, :c794, :c795, :c796, :c797, :c798, :c799, :c800, :c801, :c802, :c803, :c804, :c805, :c806, :c807, :c808, :c809, :c810, :c811, :c812, :c813, :c814, :c815, :c816, :c817, :c818, :c819, :c820, :c821, :c822, :c823, :c824, :c825, :c826, :c827, :c828, :c829, :c830, :c831, :c832, :c833, :c834, :c835, :c836, :c837, :c838, :c839, :c840, :c841, :c842, :c843, :c844, :c845, :c846, :c847, :c848, :c849, :c850, :c851, :c852, :c853, :c854, :c855, :c856, :c857, :c858, :c859, :c860, :c861, :c862, :c863, :c864, :c865, :c866, :c867, :c868, :c869, :c870, :c871, :c872, :c873, :c874, :c875, :c876, :c877, :c878, :c879, :c880, :c881, :c882, :c883, :c884, :c885, :c886, :c887, :c888, :c889, :c890, :c891, :c892, :c893, :c894, :c895, :c896, :c897, :c898, :c899, :c900, :c901, :c902, :c903, :c904, :c905, :c906, :c907, :c908, :c909, :c910, :c911, :c912, :c913, :c914, :c915, :c916, :c917, :c918, :c919, :c920, :c921, :c922, :c923, :c924, :c925, :c926, :c927, :c928, :c929, :c930, :c931, :c932, :c933, :c934, :c935, :c936, :c937, :c938, :c939, :c940, :c941, :c942, :c943, :c944, :c945, :c946, :c947, :c948, :c949, :c950, :c951, :c952, :c953, :c954, :c955, :c956, :c957, :c958, :c959, :c960, :c961, :c962, :c963, :c964, :c965, :c966, :c967, :c968, :c969, :c970, :c971, :c972, :c973, :c974, :c975, :c976, :c977, :c978, :c979, :c980, :c981, :c982, :c983, :c984, :c985, :c986, :c987, :c988, :c989, :c990, :c991, :c992, :c993, :c994, :c995, :c996, :c997, :c998, :c999, :c1000, :c1001, :c1002, :c1003, :c1004, :c1005, :c1006, :c1007, :c1008, :c1009, :c1010, :c1011, :c1012, :c1013, :c1014, :c1015, :c1016, :c1017, :c1018, :c1019, :c1020, :c1021, :c1022, :c1023, :c1024, :c1025, :c1026, :c1027, :c1028, :c1029, :c1030, :c1031, :c1032, :c1033, :c1034, :c1035, :c1036, :c1037, :c1038, :c1039, :c1040, :c1041, :c1042, :c1043, :c1044, :c1045, :c1046, :c1047, :c1048, :c1049, :c1050, :c1051, :c1052, :c1053, :c1054, :c1055, :c1056, :c1057, :c1058, :c1059, :c1060, :c1061, :c1062, :c1063, :c1064, :c1065, :c1066, :c1067, :c1068, :c1069, :c1070, :c1071, :c1072, :c1073, :c1074, :c1075, :c1076, :c1077, :c1078, :c1079, :c1080, :c1081, :c1082, :c1083, :c1084, :c1085, :c1086, :c1087, :c1088, :c1089, :c1090, :c1091, :c1092, :c1093, :c1094, :c1095, :c1096, :c1097, :c1098, :c1099, :c1100, :c1101, :c1102, :c1103, :c1104, :c1105, :c1106, :c1107, :c1108, :c1109, :c1110, :c1111, :c1112, :c1113, :c1114, :c1115, :c1116, :c1117, :c1118, :c1119, :c1120, :c1121, :c1122, :c1123, :c1124, :c1125, :c1126, :c1127, :c1128, :c1129, :c1130, :c1131, :c1132, :c1133, :c1134, :c1135, :c1136, :c1137, :c1138, :c1139, :c1140, :c1141, :c1142, :c1143, :c1144, :c1145, :c1146, :c1147, :c1148, :c1149, :c1150, :c1151, :c1152, :c1153, :c1154, :c1155, :c1156, :c1157, :c1158, :c1159, :c1160, :c1161, :c1162, :c1163, :c1164, :c1165, :c1166, :c1167, :c1168, :c1169, :c1170, :c1171, :c1172, :c1173, :c1174, :c1175, :c1176, :c1177, :c1178, :c1179, :c1180, :c1181, :c1182, :c1183, :c1184, :c1185, :c1186, :c1187, :c1188, :c1189, :c1190, :c1191, :c1192, :c1193, :c1194, :c1195, :c1196, :c1197, :c1198, :c1199, :c1200, :c1201, :c1202, :c1203, :c1204, :c1205, :c1206, :c1207, :c1208, :c1209, :c1210, :c1211, :c1212, :c1213, :c1214, :c1215, :c1216, :c1217, :c1218, :c1219, :c1220, :c1221, :c1222, :c1223, :c1224, :c1225, :c1226, :c1227, :c1228, :c1229, :c1230, :c1231, :c1232, :c1233, :c1234, :c1235, :c1236, :c1237, :c1238, :c1239, :c1240, :c1241, :c1242, :c1243, :c1244, :c1245, :c1246, :c1247, :c1248, :c1249, :c1250, :c1251, :c1252, :c1253, :c1254, :c1255, :c1256, :c1257, :c1258, :c1259, :c1260, :c1261, :c1262, :c1263, :c1264, :c1265, :c1266, :c1267, :c1268, :c1269, :c1270, :c1271, :c1272, :c1273, :c1274, :c1275, :c1276, :c1277, :c1278, :c1279, :c1280, :c1281, :c1282, :c1283, :c1284, :c1285, :c1286, :c1287, :c1288, :c1289, :c1290, :c1291, :c1292, :c1293, :c1294, :c1295, :c1296, :c1297, :c1298, :c1299, :c1300, :c1301, :c1302, :c1303, :c1304, :c1305, :c1306, :c1307, :c1308, :c1309, :c1310, :c1311, :c1312, :c1313, :c1314, :c1315, :c1316, :c1317, :c1318, :c1319, :c1320, :c1321, :c1322, :c1323, :c1324, :c1325, :c1326, :c1327, :c1328, :c1329, :c1330, :c1331, :c1332, :c1333, :c1334, :c1335, :c1336, :c1337, :c1338, :c1339, :c1340, :c1341, :c1342, :c1343, :c1344, :c1345, :c1346, :c1347, :c1348, :c1349, :c1350, :c1351, :c1352, :c1353, :c1354, :c1355, :c1356, :c1357, :c1358, :c1359, :c1360, :c1361, :c1362, :c1363, :c1364, :c1365, :c1366, :c1367, :c1368, :c1369, :c1370, :c1371, :c1372, :c1373, :c1374, :c1375, :c1376, :c1377, :c1378, :c1379, :c1380, :c1381, :c1382, :c1383, :c1384, :c1385, :c1386, :c1387, :c1388, :c1389, :c1390, :c1391, :c1392, :c1393, :c1394, :c1395, :c1396, :c1397, :c1398, :c1399, :c1400, :c1401, :c1402, :c1403, :c1404, :c1405, :c1406, :c1407, :c1408, :c1409, :c1410, :c1411, :c1412, :c1413, :c1414, :c1415, :c1416, :c1417, :c1418, :c1419, :c1420, :c1421, :c1422, :c1423, :c1424, :c1425, :c1426, :c1427, :c1428, :c1429, :c1430, :c1431, :c1432, :c1433, :c1434, :c1435, :c1436, :c1437, :c1438, :c1439, :c1440, :c1441, :c1442, :c1443, :c1444, :c1445, :c1446, :c1447, :c1448, :c1449, :c1450, :c1451, :c1452, :c1453, :c1454, :c1455, :c1456, :c1457, :c1458, :c1459, :c1460, :c1461, :c1462, :c1463, :c1464, :c1465, :c1466, :c1467, :c1468, :c1469, :c1470, :c1471, :c1472, :c1473, :c1474, :c1475, :c1476, :c1477, :c1478, :c1479, :c1480, :c1481, :c1482, :c1483, :c1484, :c1485, :c1486, :c1487, :c1488, :c1489, :c1490, :c1491, :c1492, :c1493, :c1494, :c1495, :c1496, :c1497, :c1498, :c1499, :c1500, :c1501, :c1502, :c1503, :c1504, :c1505, :c1506, :c1507, :c1508, :c1509, :c1510, :c1511, :c1512, :c1513, :c1514, :c1515, :c1516, :c1517, :c1518, :c1519, :c1520, :c1521, :c1522, :c1523, :c1524, :c1525, :c1526, :c1527, :c1528, :c1529, :c1530, :c1531, :c1532, :c1533, :c1534, :c1535, :c1536, :c1537, :c1538, :c1539, :c1540, :c1541, :c1542, :c1543, :c1544, :c1545, :c1546, :c1547, :c1548, :c1549, :c1550, :c1551, :c1552, :c1553, :c1554, :c1555, :c1556, :c1557, :c1558, :c1559, :c1560, :c1561, :c1562, :c1563, :c1564, :c1565, :c1566, :c1567, :c1568, :c1569, :c1570, :c1571, :c1572, :c1573, :c1574, :c1575, :c1576, :c1577, :c1578, :c1579, :c1580, :c1581, :c1582, :c1583, :c1584, :c1585, :c1586, :c1587, :c1588, :c1589, :c1590, :c1591, :c1592, :c1593, :c1594, :c1595, :c1596, :c1597, :c1598, :c1599, :c1600, :c1601, :c1602, :c1603, :c1604, :c1605, :c1606, :c1607, :c1608, :c1609, :c1610, :c1611, :c1612, :c1613, :c1614, :c1615, :c1616, :c1617, :c1618, :c1619, :c1620, :c1621, :c1622, :c1623, :c1624, :c1625, :c1626, :c1627, :c1628, :c1629, :c1630, :c1631, :c1632, :c1633, :c1634, :c1635, :c1636, :c1637, :c1638, :c1639, :c1640, :c1641, :c1642, :c1643, :c1644, :c1645, :c1646, :c1647, :c1648, :c1649, :c1650, :c1651, :c1652, :c1653, :c1654, :c1655, :c1656, :c1657, :c1658, :c1659, :c1660, :c1661, :c1662, :c1663, :c1664, :c1665, :c1666, :c1667, :c1668, :c1669, :c1670, :c1671, :c1672, :c1673, :c1674, :c1675, :c1676, :c1677, :c1678, :c1679, :c1680, :c1681, :c1682, :c1683, :c1684, :c1685, :c1686, :c1687, :c1688, :c1689, :c1690, :c1691, :c1692, :c1693, :c1694, :c1695, :c1696, :c1697, :c1698, :c1699, :c1700, :c1701, :c1702, :c1703, :c1704, :c1705, :c1706, :c1707, :c1708, :c1709, :c1710, :c1711, :c1712, :c1713, :c1714, :c1715, :c1716, :c1717, :c1718, :c1719, :c1720, :c1721, :c1722, :c1723, :c1724, :c1725, :c1726, :c1727, :c1728, :c1729, :c1730, :c1731, :c1732, :c1733, :c1734, :c1735, :c1736, :c1737, :c1738, :c1739, :c1740, :c1741, :c1742, :c1743, :c1744, :c1745, :c1746, :c1747, :c1748, :c1749, :c1750, :c1751, :c1752, :c1753, :c1754, :c1755, :c1756, :c1757, :c1758, :c1759, :c1760, :c1761, :c1762, :c1763, :c1764, :c1765, :c1766, :c1767, :c1768, :c1769, :c1770, :c1771, :c1772, :c1773, :c1774, :c1775, :c1776, :c1777, :c1778, :c1779, :c1780, :c1781, :c1782, :c1783, :c1784, :c1785, :c1786, :c1787, :c1788, :c1789, :c1790, :c1791, :c1792, :c1793, :c1794, :c1795, :c1796, :c1797, :c1798, :c1799, :c1800, :c1801, :c1802, :c1803, :c1804, :c1805, :c1806, :c1807, :c1808, :c1809, :c1810, :c1811, :c1812, :c1813, :c1814, :c1815, :c1816, :c1817, :c1818, :c1819, :c1820, :c1821, :c1822, :c1823, :c1824, :c1825, :c1826, :c1827, :c1828, :c1829, :c1830, :c1831, :c1832, :c1833, :c1834, :c1835, :c1836, :c1837, :c1838, :c1839, :c1840, :c1841, :c1842, :c1843, :c1844, :c1845, :c1846, :c1847, :c1848, :c1849, :c1850, :c1851, :c1852, :c1853, :c1854, :c1855, :c1856, :c1857, :c1858, :c1859, :c1860, :c1861, :c1862, :c1863, :c1864, :c1865, :c1866, :c1867, :c1868, :c1869, :c1870, :c1871, :c1872, :c1873, :c1874, :c1875, :c1876, :c1877, :c1878, :c1879, :c1880, :c1881, :c1882, :c1883, :c1884, :c1885, :c1886, :c1887, :c1888, :c1889, :c1890, :c1891, :c1892, :c1893, :c1894, :c1895, :c1896, :c1897, :c1898, :c1899, :c1900, :c1901, :c1902, :c1903, :c1904, :c1905, :c1906, :c1907, :c1908, :c1909, :c1910, :c1911, :c1912, :c1913, :c1914, :c1915, :c1916, :c1917, :c1918, :c1919, :c1920, :c1921, :c1922, :c1923, :c1924, :c1925, :c1926, :c1927, :c1928, :c1929, :c1930, :c1931, :c1932, :c1933, :c1934, :c1935, :c1936, :c1937, :c1938, :c1939, :c1940, :c1941, :c1942, :c1943, :c1944, :c1945, :c1946, :c1947, :c1948, :c1949, :c1950, :c1951, :c1952, :c1953, :c1954, :c1955, :c1956, :c1957, :c1958, :c1959, :c1960, :c1961, :c1962, :c1963, :c1964, :c1965, :c1966, :c1967, :c1968, :c1969, :c1970, :c1971, :c1972, :c1973, :c1974, :c1975, :c1976, :c1977, :c1978, :c1979, :c1980, :c1981, :c1982, :c1983, :c1984, :c1985, :c1986, :c1987, :c1988, :c1989, :c1990, :c1991, :c1992, :c1993, :c1994, :c1995, :c1996, :c1997, :c1998, :c1999, :c2000, :c2001, :c2002, :c2003, :c2004, :c2005, :c2006, :c2007, :c2008, :c2009, :c2010, :c2011, :c2012, :c2013, :c2014, :c2015, :c2016, :c2017, :c2018, :c2019, :c2020, :c2021, :c2022, :c2023, :c2024, :c2025, :c2026, :c2027, :c2028, :c2029, :c2030, :c2031, :c2032, :c2033, :c2034, :c2035, :c2036, :c2037, :c2038, :c2039, :c2040, :c2041, :c2042, :c2043, :c2044, :c2045, :c2046, :c2047, :c2048, :c2049, :c2050, :c2051, :c2052, :c2053, :c2054, :c2055, :c2056, :c2057, :c2058, :c2059, :c2060, :c2061, :c2062, :c2063, :c2064, :c2065, :c2066, :c2067, :c2068, :c2069, :c2070, :c2071, :c2072, :c2073, :c2074, :c2075, :c2076, :c2077, :c2078, :c2079, :c2080, :c2081, :c2082, :c2083, :c2084, :c2085, :c2086, :c2087, :c2088, :c2089, :c2090, :c2091, :c2092, :c2093, :c2094, :c2095, :c2096, :c2097, :c2098, :c2099, :c2100, :c2101, :c2102, :c2103, :c2104, :c2105, :c2106, :c2107, :c2108, :c2109, :c2110, :c2111, :c2112, :c2113, :c2114, :c2115, :c2116, :c2117, :c2118, :c2119, :c2120, :c2121, :c2122, :c2123, :c2124, :c2125, :c2126, :c2127, :c2128, :c2129, :c2130, :c2131, :c2132, :c2133, :c2134, :c2135, :c2136, :c2137, :c2138, :c2139, :c2140, :c2141, :c2142, :c2143, :c2144, :c2145, :c2146, :c2147, :c2148, :c2149, :c2150, :c2151, :c2152, :c2153, :c2154, :c2155, :c2156, :c2157, :c2158, :c2159, :c2160, :c2161, :c2162, :c2163, :c2164, :c2165, :c2166, :c2167, :c2168, :c2169, :c2170, :c2171, :c2172, :c2173, :c2174, :c2175, :c2176, :c2177, :c2178, :c2179, :c2180, :c2181, :c2182, :c2183, :c2184, :c2185, :c2186, :c2187, :c2188, :c2189, :c2190, :c2191, :c2192, :c2193, :c2194, :c2195, :c2196, :c2197, :c2198, :c2199, :c2200, :c2201, :c2202, :c2203, :c2204, :c2205, :c2206, :c2207, :c2208, :c2209, :c2210, :c2211, :c2212, :c2213, :c2214, :c2215, :c2216, :c2217, :c2218, :c2219, :c2220, :c2221, :c2222, :c2223, :c2224, :c2225, :c2226, :c2227, :c2228, :c2229, :c2230, :c2231, :c2232, :c2233, :c2234, :c2235, :c2236, :c2237, :c2238, :c2239, :c2240, :c2241, :c2242, :c2243, :c2244, :c2245, :c2246, :c2247, :c2248, :c2249, :c2250, :c2251, :c2252, :c2253, :c2254, :c2255, :c2256, :c2257, :c2258, :c2259, :c2260, :c2261, :c2262, :c2263, :c2264, :c2265, :c2266, :c2267, :c2268, :c2269, :c2270, :c2271, :c2272, :c2273, :c2274, :c2275, :c2276, :c2277, :c2278, :c2279, :c2280, :c2281, :c2282, :c2283, :c2284, :c2285, :c2286, :c2287, :c2288, :c2289, :c2290, :c2291, :c2292, :c2293, :c2294, :c2295, :c2296, :c2297, :c2298, :c2299, :c2300, :c2301, :c2302, :c2303, :c2304, :c2305, :c2306, :c2307, :c2308, :c2309, :c2310, :c2311, :c2312, :c2313, :c2314, :c2315, :c2316, :c2317, :c2318, :c2319, :c2320, :c2321, :c2322, :c2323, :c2324, :c2325, :c2326, :c2327, :c2328, :c2329, :c2330, :c2331, :c2332, :c2333, :c2334, :c2335, :c2336, :c2337, :c2338, :c2339, :c2340, :c2341, :c2342, :c2343, :c2344, :c2345, :c2346, :c2347, :c2348, :c2349, :c2350, :c2351, :c2352, :c2353, :c2354, :c2355, :c2356, :c2357, :c2358, :c2359, :c2360, :c2361, :c2362, :c2363, :c2364, :c2365, :c2366, :c2367, :c2368, :c2369, :c2370, :c2371, :c2372, :c2373, :c2374, :c2375, :c2376, :c2377, :c2378, :c2379, :c2380, :c2381, :c2382, :c2383, :c2384, :c2385, :c2386, :c2387, :c2388, :c2389, :c2390, :c2391, :c2392, :c2393, :c2394, :c2395, :c2396, :c2397, :c2398, :c2399, :c2400, :c2401, :c2402, :c2403, :c2404, :c2405, :c2406, :c2407, :c2408, :c2409, :c2410, :c2411, :c2412, :c2413, :c2414, :c2415, :c2416, :c2417, :c2418, :c2419, :c2420, :c2421, :c2422, :c2423, :c2424, :c2425, :c2426, :c2427, :c2428, :c2429, :c2430, :c2431, :c2432, :c2433, :c2434, :c2435, :c2436, :c2437, :c2438, :c2439, :c2440, :c2441, :c2442, :c2443, :c2444, :c2445, :c2446, :c2447, :c2448, :c2449, :c2450, :c2451, :c2452, :c2453, :c2454, :c2455, :c2456, :c2457, :c2458, :c2459, :c2460, :c2461, :c2462, :c2463, :c2464, :c2465, :c2466, :c2467, :c2468, :c2469, :c2470, :c2471, :c2472, :c2473, :c2474, :c2475, :c2476, :c2477, :c2478, :c2479, :c2480, :c2481, :c2482, :c2483, :c2484, :c2485, :c2486, :c2487, :c2488, :c2489, :c2490, :c2491, :c2492, :c2493, :c2494, :c2495, :c2496, :c2497, :c2498, :c2499, :c2500, :c2501, :c2502, :c2503, :c2504, :c2505, :c2506, :c2507, :c2508, :c2509, :c2510, :c2511, :c2512, :c2513, :c2514, :c2515, :c2516, :c2517, :c2518, :c2519, :c2520, :c2521, :c2522, :c2523, :c2524, :c2525, :c2526, :c2527, :c2528, :c2529, :c2530, :c2531, :c2532, :c2533, :c2534, :c2535, :c2536, :c2537, :c2538, :c2539, :c2540, :c2541, :c2542, :c2543, :c2544, :c2545, :c2546, :c2547, :c2548, :c2549, :c2550, :c2551, :c2552, :c2553, :c2554, :c2555, :c2556, :c2557, :c2558, :c2559, :c2560, :c2561, :c2562, :c2563, :c2564, :c2565, :c2566, :c2567, :c2568, :c2569, :c2570, :c2571, :c2572, :c2573, :c2574, :c2575, :c2576, :c2577, :c2578, :c2579, :c2580, :c2581, :c2582, :c2583, :c2584, :c2585, :c2586, :c2587, :c2588, :c2589, :c2590, :c2591, :c2592, :c2593, :c2594, :c2595, :c2596, :c2597, :c2598, :c2599, :c2600, :c2601, :c2602, :c2603, :c2604, :c2605, :c2606, :c2607, :c2608, :c2609, :c2610, :c2611, :c2612, :c2613, :c2614, :c2615, :c2616, :c2617, :c2618, :c2619, :c2620, :c2621, :c2622, :c2623, :c2624, :c2625, :c2626, :c2627, :c2628, :c2629, :c2630, :c2631, :c2632, :c2633, :c2634, :c2635, :c2636, :c2637, :c2638, :c2639, :c2640, :c2641, :c2642, :c2643, :c2644, :c2645, :c2646, :c2647, :c2648, :c2649, :c2650, :c2651, :c2652, :c2653, :c2654, :c2655, :c2656, :c2657, :c2658, :c2659, :c2660, :c2661, :c2662, :c2663, :c2664, :c2665, :c2666, :c2667, :c2668, :c2669, :c2670, :c2671, :c2672, :c2673, :c2674, :c2675, :c2676, :c2677, :c2678, :c2679, :c2680, :c2681, :c2682, :c2683, :c2684, :c2685, :c2686, :c2687, :c2688, :c2689, :c2690, :c2691, :c2692, :c2693, :c2694, :c2695, :c2696, :c2697, :c2698, :c2699, :c2700, :c2701, :c2702, :c2703, :c2704, :c2705, :c2706, :c2707, :c2708, :c2709, :c2710, :c2711, :c2712, :c2713, :c2714, :c2715, :c2716, :c2717, :c2718, :c2719, :c2720, :c2721, :c2722, :c2723, :c2724, :c2725, :c2726, :c2727, :c2728, :c2729, :c2730, :c2731, :c2732, :c2733, :c2734, :c2735, :c2736, :c2737, :c2738, :c2739, :c2740, :c2741, :c2742, :c2743, :c2744, :c2745, :c2746, :c2747, :c2748, :c2749, :c2750, :c2751, :c2752, :c2753, :c2754, :c2755, :c2756, :c2757, :c2758, :c2759, :c2760, :c2761, :c2762, :c2763, :c2764, :c2765, :c2766, :c2767, :c2768, :c2769, :c2770, :c2771, :c2772, :c2773, :c2774, :c2775, :c2776, :c2777, :c2778, :c2779, :c2780, :c2781, :c2782, :c2783, :c2784, :c2785, :c2786, :c2787, :c2788, :c2789, :c2790, :c2791, :c2792, :c2793, :c2794, :c2795, :c2796, :c2797, :c2798, :c2799, :c2800, :c2801, :c2802, :c2803, :c2804, :c2805, :c2806, :c2807, :c2808, :c2809, :c2810, :c2811, :c2812, :c2813, :c2814, :c2815, :c2816, :c2817, :c2818, :c2819, :c2820, :c2821, :c2822, :c2823, :c2824, :c2825, :c2826, :c2827, :c2828, :c2829, :c2830, :c2831, :c2832, :c2833, :c2834, :c2835, :c2836, :c2837, :c2838, :c2839, :c2840, :c2841, :c2842, :c2843, :c2844, :c2845, :c2846, :c2847, :c2848, :c2849, :c2850, :c2851, :c2852, :c2853, :c2854, :c2855, :c2856, :c2857, :c2858, :c2859, :c2860, :c2861, :c2862, :c2863, :c2864, :c2865, :c2866, :c2867, :c2868, :c2869, :c2870, :c2871, :c2872, :c2873, :c2874, :c2875, :c2876, :c2877, :c2878, :c2879, :c2880, :c2881, :c2882, :c2883, :c2884, :c2885, :c2886, :c2887, :c2888, :c2889, :c2890, :c2891, :c2892, :c2893, :c2894, :c2895, :c2896, :c2897, :c2898, :c2899, :c2900, :c2901, :c2902, :c2903, :c2904, :c2905, :c2906, :c2907, :c2908, :c2909, :c2910, :c2911, :c2912, :c2913, :c2914, :c2915, :c2916, :c2917, :c2918, :c2919, :c2920, :c2921, :c2922, :c2923, :c2924, :c2925, :c2926, :c2927, :c2928, :c2929, :c2930, :c2931, :c2932, :c2933, :c2934, :c2935, :c2936, :c2937, :c2938, :c2939, :c2940, :c2941, :c2942, :c2943, :c2944, :c2945, :c2946, :c2947, :c2948, :c2949, :c2950, :c2951, :c2952, :c2953, :c2954, :c2955, :c2956, :c2957, :c2958, :c2959, :c2960, :c2961, :c2962, :c2963, :c2964, :c2965, :c2966, :c2967, :c2968, :c2969, :c2970, :c2971, :c2972, :c2973, :c2974, :c2975, :c2976, :c2977, :c2978, :c2979, :c2980, :c2981, :c2982, :c2983, :c2984, :c2985, :c2986, :c2987, :c2988, :c2989, :c2990, :c2991, :c2992, :c2993, :c2994, :c2995, :c2996, :c2997, :c2998, :c2999, :c3000, :c3001, :c3002, :c3003, :c3004, :c3005, :c3006, :c3007, :c3008, :c3009, :c3010, :c3011, :c3012, :c3013, :c3014, :c3015, :c3016, :c3017, :c3018, :c3019, :c3020, :c3021, :c3022, :c3023, :c3024, :c3025, :c3026, :c3027, :c3028, :c3029, :c3030, :c3031, :c3032, :c3033, :c3034, :c3035, :c3036, :c3037, :c3038, :c3039, :c3040, :c3041, :c3042, :c3043, :c3044, :c3045, :c3046, :c3047, :c3048, :c3049, :c3050, :c3051, :c3052, :c3053, :c3054, :c3055, :c3056, :c3057, :c3058, :c3059, :c3060, :c3061, :c3062, :c3063, :c3064, :c3065, :c3066, :c3067, :c3068, :c3069, :c3070, :c3071, :c3072, :c3073, :c3074, :c3075, :c3076, :c3077, :c3078, :c3079, :c3080, :c3081, :c3082, :c3083, :c3084, :c3085, :c3086, :c3087, :c3088, :c3089, :c3090, :c3091, :c3092, :c3093, :c3094, :c3095, :c3096, :c3097, :c3098, :c3099, :c3100, :c3101, :c3102, :c3103, :c3104, :c3105, :c3106, :c3107, :c3108, :c3109, :c3110, :c3111, :c3112, :c3113, :c3114, :c3115, :c3116, :c3117, :c3118, :c3119, :c3120, :c3121, :c3122, :c3123, :c3124, :c3125, :c3126, :c3127, :c3128, :c3129, :c3130, :c3131, :c3132, :c3133, :c3134, :c3135, :c3136, :c3137, :c3138, :c3139, :c3140, :c3141, :c3142, :c3143, :c3144, :c3145, :c3146, :c3147, :c3148, :c3149, :c3150, :c3151, :c3152, :c3153, :c3154, :c3155, :c3156, :c3157, :c3158, :c3159, :c3160, :c3161, :c3162, :c3163, :c3164, :c3165, :c3166, :c3167, :c3168, :c3169, :c3170, :c3171, :c3172, :c3173, :c3174, :c3175, :c3176, :c3177, :c3178, :c3179, :c3180, :c3181, :c3182, :c3183, :c3184, :c3185, :c3186, :c3187, :c3188, :c3189, :c3190, :c3191, :c3192, :c3193, :c3194, :c3195, :c3196, :c3197, :c3198, :c3199, :c3200, :c3201, :c3202, :c3203, :c3204, :c3205, :c3206, :c3207, :c3208, :c3209, :c3210, :c3211, :c3212, :c3213, :c3214, :c3215, :c3216, :c3217, :c3218, :c3219, :c3220, :c3221, :c3222, :c3223, :c3224, :c3225, :c3226, :c3227, :c3228, :c3229, :c3230, :c3231, :c3232, :c3233, :c3234, :c3235, :c3236, :c3237, :c3238, :c3239, :c3240, :c3241, :c3242, :c3243, :c3244, :c3245, :c3246, :c3247, :c3248, :c3249, :c3250, :c3251, :c3252, :c3253, :c3254, :c3255, :c3256, :c3257, :c3258, :c3259, :c3260, :c3261, :c3262, :c3263, :c3264, :c3265, :c3266, :c3267, :c3268, :c3269, :c3270, :c3271, :c3272, :c3273, :c3274, :c3275, :c3276, :c3277, :c3278, :c3279, :c3280, :c3281, :c3282, :c3283, :c3284, :c3285, :c3286, :c3287, :c3288, :c3289, :c3290, :c3291, :c3292, :c3293, :c3294, :c3295, :c3296, :c3297, :c3298, :c3299, :c3300, :c3301, :c3302, :c3303, :c3304, :c3305, :c3306, :c3307, :c3308, :c3309, :c3310, :c3311, :c3312, :c3313, :c3314, :c3315, :c3316, :c3317, :c3318, :c3319, :c3320, :c3321, :c3322, :c3323, :c3324, :c3325, :c3326, :c3327, :c3328, :c3329, :c3330, :c3331, :c3332, :c3333, :c3334, :c3335, :c3336, :c3337, :c3338, :c3339, :c3340, :c3341, :c3342, :c3343, :c3344, :c3345, :c3346, :c3347, :c3348, :c3349, :c3350, :c3351, :c3352, :c3353, :c3354, :c3355, :c3356, :c3357, :c3358, :c3359, :c3360, :c3361, :c3362, :c3363, :c3364, :c3365, :c3366, :c3367, :c3368, :c3369, :c3370, :c3371, :c3372, :c3373, :c3374, :c3375, :c3376, :c3377, :c3378, :c3379, :c3380, :c3381, :c3382, :c3383, :c3384, :c3385, :c3386, :c3387, :c3388, :c3389, :c3390, :c3391, :c3392, :c3393, :c3394, :c3395, :c3396, :c3397, :c3398, :c3399, :c3400, :c3401, :c3402, :c3403, :c3404, :c3405, :c3406, :c3407, :c3408, :c3409, :c3410, :c3411, :c3412, :c3413, :c3414, :c3415, :c3416, :c3417, :c3418, :c3419, :c3420, :c3421, :c3422, :c3423, :c3424, :c3425, :c3426, :c3427, :c3428, :c3429, :c3430, :c3431, :c3432, :c3433, :c3434, :c3435, :c3436, :c3437, :c3438, :c3439, :c3440, :c3441, :c3442, :c3443, :c3444, :c3445, :c3446, :c3447, :c3448, :c3449, :c3450, :c3451, :c3452, :c3453, :c3454, :c3455, :c3456, :c3457, :c3458, :c3459, :c3460, :c3461, :c3462, :c3463, :c3464, :c3465, :c3466, :c3467, :c3468, :c3469, :c3470, :c3471, :c3472, :c3473, :c3474, :c3475, :c3476, :c3477, :c3478, :c3479, :c3480, :c3481, :c3482, :c3483, :c3484, :c3485, :c3486, :c3487, :c3488, :c3489, :c3490, :c3491, :c3492, :c3493, :c3494, :c3495, :c3496, :c3497, :c3498, :c3499, :c3500, :c3501, :c3502, :c3503, :c3504, :c3505, :c3506, :c3507, :c3508, :c3509, :c3510, :c3511, :c3512, :c3513, :c3514, :c3515, :c3516, :c3517, :c3518, :c3519, :c3520, :c3521, :c3522, :c3523, :c3524, :c3525, :c3526, :c3527, :c3528, :c3529, :c3530, :c3531, :c3532, :c3533, :c3534, :c3535, :c3536, :c3537, :c3538, :c3539, :c3540, :c3541, :c3542, :c3543, :c3544, :c3545, :c3546, :c3547, :c3548, :c3549, :c3550, :c3551, :c3552, :c3553, :c3554, :c3555, :c3556, :c3557, :c3558, :c3559, :c3560, :c3561, :c3562, :c3563, :c3564, :c3565, :c3566, :c3567, :c3568, :c3569, :c3570, :c3571, :c3572, :c3573, :c3574, :c3575, :c3576, :c3577, :c3578, :c3579, :c3580, :c3581, :c3582, :c3583, :c3584, :c3585, :c3586, :c3587, :c3588, :c3589, :c3590, :c3591, :c3592, :c3593, :c3594, :c3595, :c3596, :c3597, :c3598, :c3599, :c3600, :c3601, :c3602, :c3603, :c3604, :c3605, :c3606, :c3607, :c3608, :c3609, :c3610, :c3611, :c3612, :c3613, :c3614, :c3615, :c3616, :c3617, :c3618, :c3619, :c3620, :c3621, :c3622, :c3623, :c3624, :c3625, :c3626, :c3627, :c3628, :c3629, :c3630, :c3631, :c3632, :c3633, :c3634, :c3635, :c3636, :c3637, :c3638, :c3639, :c3640, :c3641, :c3642, :c3643, :c3644, :c3645, :c3646, :c3647, :c3648, :c3649, :c3650, :c3651, :c3652, :c3653, :c3654, :c3655, :c3656, :c3657, :c3658, :c3659, :c3660, :c3661, :c3662, :c3663, :c3664, :c3665, :c3666, :c3667, :c3668, :c3669, :c3670, :c3671, :c3672, :c3673, :c3674, :c3675, :c3676, :c3677, :c3678, :c3679, :c3680, :c3681, :c3682, :c3683, :c3684, :c3685, :c3686, :c3687, :c3688, :c3689, :c3690, :c3691, :c3692, :c3693, :c3694, :c3695, :c3696, :c3697, :c3698, :c3699, :c3700, :c3701, :c3702, :c3703, :c3704, :c3705, :c3706, :c3707, :c3708, :c3709, :c3710, :c3711, :c3712, :c3713, :c3714, :c3715, :c3716, :c3717, :c3718, :c3719, :c3720, :c3721, :c3722, :c3723, :c3724, :c3725, :c3726, :c3727, :c3728, :c3729, :c3730, :c3731, :c3732, :c3733, :c3734, :c3735, :c3736, :c3737, :c3738, :c3739, :c3740, :c3741, :c3742, :c3743, :c3744, :c3745, :c3746, :c3747, :c3748, :c3749, :c3750, :c3751, :c3752, :c3753, :c3754, :c3755, :c3756, :c3757, :c3758, :c3759, :c3760, :c3761, :c3762, :c3763, :c3764, :c3765, :c3766, :c3767, :c3768, :c3769, :c3770, :c3771, :c3772, :c3773, :c3774, :c3775, :c3776, :c3777, :c3778, :c3779, :c3780, :c3781, :c3782, :c3783, :c3784, :c3785, :c3786, :c3787, :c3788, :c3789, :c3790, :c3791, :c3792, :c3793, :c3794, :c3795, :c3796, :c3797, :c3798, :c3799, :c3800, :c3801, :c3802, :c3803, :c3804, :c3805, :c3806, :c3807, :c3808, :c3809, :c3810, :c3811, :c3812, :c3813, :c3814, :c3815, :c3816, :c3817, :c3818, :c3819, :c3820, :c3821, :c3822, :c3823, :c3824, :c3825, :c3826, :c3827, :c3828, :c3829, :c3830, :c3831, :c3832, :c3833, :c3834, :c3835, :c3836, :c3837, :c3838, :c3839, :c3840, :c3841, :c3842, :c3843, :c3844, :c3845, :c3846, :c3847, :c3848, :c3849, :c3850, :c3851, :c3852, :c3853, :c3854, :c3855, :c3856, :c3857, :c3858, :c3859, :c3860, :c3861, :c3862, :c3863, :c3864, :c3865, :c3866, :c3867, :c3868, :c3869, :c3870, :c3871, :c3872, :c3873, :c3874, :c3875, :c3876, :c3877, :c3878, :c3879, :c3880, :c3881, :c3882, :c3883, :c3884, :c3885, :c3886, :c3887, :c3888, :c3889, :c3890, :c3891, :c3892, :c3893, :c3894, :c3895, :c3896, :c3897, :c3898, :c3899, :c3900, :c3901, :c3902, :c3903, :c3904, :c3905, :c3906, :c3907, :c3908, :c3909, :c3910, :c3911, :c3912, :c3913, :c3914, :c3915, :c3916, :c3917, :c3918, :c3919, :c3920, :c3921, :c3922, :c3923, :c3924, :c3925, :c3926, :c3927, :c3928, :c3929, :c3930, :c3931, :c3932, :c3933, :c3934, :c3935, :c3936, :c3937, :c3938, :c3939, :c3940, :c3941, :c3942, :c3943, :c3944, :c3945, :c3946, :c3947, :c3948, :c3949, :c3950, :c3951, :c3952, :c3953, :c3954, :c3955, :c3956, :c3957, :c3958, :c3959, :c3960, :c3961, :c3962, :c3963, :c3964, :c3965, :c3966, :c3967, :c3968, :c3969, :c3970, :c3971, :c3972, :c3973, :c3974, :c3975, :c3976, :c3977, :c3978, :c3979, :c3980, :c3981, :c3982, :c3983, :c3984, :c3985, :c3986, :c3987, :c3988, :c3989, :c3990, :c3991, :c3992, :c3993, :c3994, :c3995, :c3996, :c3997, :c3998, :c3999, :c4000, :c4001, :c4002, :c4003, :c4004, :c4005, :c4006, :c4007, :c4008, :c4009, :c4010, :c4011, :c4012, :c4013, :c4014, :c4015, :c4016, :c4017, :c4018, :c4019, :c4020, :c4021, :c4022, :c4023, :c4024, :c4025, :c4026, :c4027, :c4028, :c4029, :c4030, :c4031, :c4032, :c4033, :c4034, :c4035, :c4036, :c4037, :c4038, :c4039, :c4040, :c4041, :c4042, :c4043, :c4044, :c4045, :c4046, :c4047, :c4048, :c4049, :c4050, :c4051, :c4052, :c4053, :c4054, :c4055, :c4056, :c4057, :c4058, :c4059, :c4060, :c4061, :c4062, :c4063, :c4064, :c4065, :c4066, :c4067, :c4068, :c4069, :c4070, :c4071, :c4072, :c4073, :c4074, :c4075, :c4076, :c4077, :c4078, :c4079, :c4080, :c4081, :c4082, :c4083, :c4084, :c4085, :c4086, :c4087, :c4088, :c4089, :c4090, :c4091, :c4092, :c4093, :c4094, :c4095, :c4096, :c4097, :c4098, :c4099, :c4100, :c4101, :c4102, :c4103, :c4104, :c4105, :c4106, :c4107, :c4108, :c4109, :c4110, :c4111, :c4112, :c4113, :c4114, :c4115, :c4116, :c4117, :c4118, :c4119, :c4120, :c4121, :c4122, :c4123, :c4124, :c4125, :c4126, :c4127, :c4128, :c4129, :c4130, :c4131, :c4132, :c4133, :c4134, :c4135, :c4136, :c4137, :c4138, :c4139, :c4140, :c4141, :c4142, :c4143, :c4144, :c4145, :c4146, :c4147, :c4148, :c4149, :c4150, :c4151, :c4152, :c4153, :c4154, :c4155, :c4156, :c4157, :c4158, :c4159, :c4160, :c4161, :c4162, :c4163, :c4164, :c4165, :c4166, :c4167, :c4168, :c4169, :c4170, :c4171, :c4172, :c4173, :c4174, :c4175, :c4176, :c4177, :c4178, :c4179, :c4180, :c4181, :c4182, :c4183, :c4184, :c4185, :c4186, :c4187, :c4188, :c4189, :c4190, :c4191, :c4192, :c4193, :c4194, :c4195, :c4196, :c4197, :c4198, :c4199, :c4200, :c4201, :c4202, :c4203, :c4204, :c4205, :c4206, :c4207, :c4208, :c4209, :c4210, :c4211, :c4212, :c4213, :c4214, :c4215, :c4216, :c4217, :c4218, :c4219, :c4220, :c4221, :c4222, :c4223, :c4224, :c4225, :c4226, :c4227, :c4228, :c4229, :c4230, :c4231, :c4232, :c4233, :c4234, :c4235, :c4236, :c4237, :c4238, :c4239, :c4240, :c4241, :c4242, :c4243, :c4244, :c4245, :c4246, :c4247, :c4248, :c4249, :c4250, :c4251, :c4252, :c4253, :c4254, :c4255, :c4256, :c4257, :c4258, :c4259, :c4260, :c4261, :c4262, :c4263, :c4264, :c4265, :c4266, :c4267, :c4268, :c4269, :c4270, :c4271, :c4272, :c4273, :c4274, :c4275, :c4276, :c4277, :c4278, :c4279, :c4280, :c4281, :c4282, :c4283, :c4284, :c4285, :c4286, :c4287, :c4288, :c4289, :c4290, :c4291, :c4292, :c4293, :c4294, :c4295, :c4296, :c4297, :c4298, :c4299, :c4300, :c4301, :c4302, :c4303, :c4304, :c4305, :c4306, :c4307, :c4308, :c4309, :c4310, :c4311, :c4312, :c4313, :c4314, :c4315, :c4316, :c4317, :c4318, :c4319, :c4320, :c4321, :c4322, :c4323, :c4324, :c4325, :c4326, :c4327, :c4328, :c4329, :c4330, :c4331, :c4332, :c4333, :c4334, :c4335, :c4336, :c4337, :c4338, :c4339, :c4340, :c4341, :c4342, :c4343, :c4344, :c4345, :c4346, :c4347, :c4348, :c4349, :c4350, :c4351, :c4352, :c4353, :c4354, :c4355, :c4356, :c4357, :c4358, :c4359, :c4360, :c4361, :c4362, :c4363, :c4364, :c4365, :c4366, :c4367, :c4368, :c4369, :c4370, :c4371, :c4372, :c4373, :c4374, :c4375, :c4376, :c4377, :c4378, :c4379, :c4380, :c4381, :c4382, :c4383, :c4384, :c4385, :c4386, :c4387, :c4388, :c4389, :c4390, :c4391, :c4392, :c4393, :c4394, :c4395, :c4396, :c4397, :c4398, :c4399, :c4400, :c4401, :c4402, :c4403, :c4404, :c4405, :c4406, :c4407, :c4408, :c4409, :c4410, :c4411, :c4412, :c4413, :c4414, :c4415, :c4416, :c4417, :c4418, :c4419, :c4420, :c4421, :c4422, :c4423, :c4424, :c4425, :c4426, :c4427, :c4428, :c4429, :c4430, :c4431, :c4432, :c4433, :c4434, :c4435, :c4436, :c4437, :c4438, :c4439, :c4440, :c4441, :c4442, :c4443, :c4444, :c4445, :c4446, :c4447, :c4448, :c4449, :c4450, :c4451, :c4452, :c4453, :c4454, :c4455, :c4456, :c4457, :c4458, :c4459, :c4460, :c4461, :c4462, :c4463, :c4464, :c4465, :c4466, :c4467, :c4468, :c4469, :c4470, :c4471, :c4472, :c4473, :c4474, :c4475, :c4476, :c4477, :c4478, :c4479, :c4480, :c4481, :c4482, :c4483, :c4484, :c4485, :c4486, :c4487, :c4488, :c4489, :c4490, :c4491, :c4492, :c4493, :c4494, :c4495, :c4496, :c4497, :c4498, :c4499, :c4500, :c4501, :c4502, :c4503, :c4504, :c4505, :c4506, :c4507, :c4508, :c4509, :c4510, :c4511, :c4512, :c4513, :c4514, :c4515, :c4516, :c4517, :c4518, :c4519, :c4520, :c4521, :c4522, :c4523, :c4524, :c4525, :c4526, :c4527, :c4528, :c4529, :c4530, :c4531, :c4532, :c4533, :c4534, :c4535, :c4536, :c4537, :c4538, :c4539, :c4540, :c4541, :c4542, :c4543, :c4544, :c4545, :c4546, :c4547, :c4548, :c4549, :c4550, :c4551, :c4552, :c4553, :c4554, :c4555, :c4556, :c4557, :c4558, :c4559, :c4560, :c4561, :c4562, :c4563, :c4564, :c4565, :c4566, :c4567, :c4568, :c4569, :c4570, :c4571, :c4572, :c4573, :c4574, :c4575, :c4576, :c4577, :c4578, :c4579, :c4580, :c4581, :c4582, :c4583, :c4584, :c4585, :c4586, :c4587, :c4588, :c4589, :c4590, :c4591, :c4592, :c4593, :c4594, :c4595, :c4596, :c4597, :c4598, :c4599, :c4600, :c4601, :c4602, :c4603, :c4604, :c4605, :c4606, :c4607, :c4608, :c4609, :c4610, :c4611, :c4612, :c4613, :c4614, :c4615, :c4616, :c4617, :c4618, :c4619, :c4620, :c4621, :c4622, :c4623, :c4624, :c4625, :c4626, :c4627, :c4628, :c4629, :c4630, :c4631, :c4632, :c4633, :c4634, :c4635, :c4636, :c4637, :c4638, :c4639, :c4640, :c4641, :c4642, :c4643, :c4644, :c4645, :c4646, :c4647, :c4648, :c4649, :c4650, :c4651, :c4652, :c4653, :c4654, :c4655, :c4656, :c4657, :c4658, :c4659, :c4660, :c4661, :c4662, :c4663, :c4664, :c4665, :c4666, :c4667, :c4668, :c4669, :c4670, :c4671, :c4672, :c4673, :c4674, :c4675, :c4676, :c4677, :c4678, :c4679, :c4680, :c4681, :c4682, :c4683, :c4684, :c4685, :c4686, :c4687, :c4688, :c4689, :c4690, :c4691, :c4692, :c4693, :c4694, :c4695, :c4696, :c4697, :c4698, :c4699, :c4700, :c4701, :c4702, :c4703, :c4704, :c4705, :c4706, :c4707, :c4708, :c4709, :c4710, :c4711, :c4712, :c4713, :c4714, :c4715, :c4716, :c4717, :c4718, :c4719, :c4720, :c4721, :c4722, :c4723, :c4724, :c4725, :c4726, :c4727, :c4728, :c4729, :c4730, :c4731, :c4732, :c4733, :c4734, :c4735, :c4736, :c4737, :c4738, :c4739, :c4740, :c4741, :c4742, :c4743, :c4744, :c4745, :c4746, :c4747, :c4748, :c4749, :c4750, :c4751, :c4752, :c4753, :c4754, :c4755, :c4756, :c4757, :c4758, :c4759, :c4760, :c4761, :c4762, :c4763, :c4764, :c4765, :c4766, :c4767, :c4768, :c4769, :c4770, :c4771, :c4772, :c4773, :c4774, :c4775, :c4776, :c4777, :c4778, :c4779, :c4780, :c4781, :c4782, :c4783, :c4784, :c4785, :c4786, :c4787, :c4788, :c4789, :c4790, :c4791, :c4792, :c4793, :c4794, :c4795, :c4796, :c4797, :c4798, :c4799, :c4800, :c4801, :c4802, :c4803, :c4804, :c4805, :c4806, :c4807, :c4808, :c4809, :c4810, :c4811, :c4812, :c4813, :c4814, :c4815, :c4816, :c4817, :c4818, :c4819, :c4820, :c4821, :c4822, :c4823, :c4824, :c4825, :c4826, :c4827, :c4828, :c4829, :c4830, :c4831, :c4832, :c4833, :c4834, :c4835, :c4836, :c4837, :c4838, :c4839, :c4840, :c4841, :c4842, :c4843, :c4844, :c4845, :c4846, :c4847, :c4848, :c4849, :c4850, :c4851, :c4852, :c4853, :c4854, :c4855, :c4856, :c4857, :c4858, :c4859, :c4860, :c4861, :c4862, :c4863, :c4864, :c4865, :c4866, :c4867, :c4868, :c4869, :c4870, :c4871, :c4872, :c4873, :c4874, :c4875, :c4876, :c4877, :c4878, :c4879, :c4880, :c4881, :c4882, :c4883, :c4884, :c4885, :c4886, :c4887, :c4888, :c4889, :c4890, :c4891, :c4892, :c4893, :c4894, :c4895, :c4896, :c4897, :c4898, :c4899, :c4900, :c4901, :c4902, :c4903, :c4904, :c4905, :c4906, :c4907, :c4908, :c4909, :c4910, :c4911, :c4912, :c4913, :c4914, :c4915, :c4916, :c4917, :c4918, :c4919, :c4920, :c4921, :c4922, :c4923, :c4924, :c4925, :c4926, :c4927, :c4928, :c4929, :c4930, :c4931, :c4932, :c4933, :c4934, :c4935, :c4936, :c4937, :c4938, :c4939, :c4940, :c4941, :c4942, :c4943, :c4944, :c4945, :c4946, :c4947, :c4948, :c4949, :c4950, :c4951, :c4952, :c4953, :c4954, :c4955, :c4956, :c4957, :c4958, :c4959, :c4960, :c4961, :c4962, :c4963, :c4964, :c4965, :c4966, :c4967, :c4968, :c4969, :c4970, :c4971, :c4972, :c4973, :c4974, :c4975, :c4976, :c4977, :c4978, :c4979, :c4980, :c4981, :c4982, :c4983, :c4984, :c4985, :c4986, :c4987, :c4988, :c4989, :c4990, :c4991, :c4992, :c4993, :c4994, :c4995, :c4996, :c4997, :c4998, :c4999, :c5000, :c5001, :c5002, :c5003, :c5004, :c5005, :c5006, :c5007, :c5008, :c5009, :c5010, :c5011, :c5012, :c5013, :c5014, :c5015, :c5016, :c5017, :c5018, :c5019, :c5020, :c5021, :c5022, :c5023, :c5024, :c5025, :c5026, :c5027, :c5028, :c5029, :c5030, :c5031, :c5032, :c5033, :c5034, :c5035, :c5036, :c5037, :c5038, :c5039, :c5040, :c5041, :c5042, :c5043, :c5044, :c5045, :c5046, :c5047, :c5048, :c5049, :c5050, :c5051, :c5052, :c5053, :c5054, :c5055, :c5056, :c5057, :c5058, :c5059, :c5060, :c5061, :c5062, :c5063, :c5064, :c5065, :c5066, :c5067, :c5068, :c5069, :c5070, :c5071, :c5072, :c5073, :c5074, :c5075, :c5076, :c5077, :c5078, :c5079, :c5080, :c5081, :c5082, :c5083, :c5084, :c5085, :c5086, :c5087, :c5088, :c5089, :c5090, :c5091, :c5092, :c5093, :c5094, :c5095, :c5096, :c5097, :c5098, :c5099, :c5100, :c5101, :c5102, :c5103, :c5104, :c5105, :c5106, :c5107, :c5108, :c5109, :c5110, :c5111, :c5112, :c5113, :c5114, :c5115, :c5116, :c5117, :c5118, :c5119, :c5120, :c5121, :c5122, :c5123, :c5124, :c5125, :c5126, :c5127, :c5128, :c5129, :c5130, :c5131, :c5132, :c5133, :c5134, :c5135, :c5136, :c5137, :c5138, :c5139, :c5140, :c5141, :c5142, :c5143, :c5144, :c5145, :c5146, :c5147, :c5148, :c5149, :c5150, :c5151, :c5152, :c5153, :c5154, :c5155, :c5156, :c5157, :c5158, :c5159, :c5160, :c5161, :c5162, :c5163, :c5164, :c5165, :c5166, :c5167, :c5168, :c5169, :c5170, :c5171, :c5172, :c5173, :c5174, :c5175, :c5176, :c5177, :c5178, :c5179, :c5180, :c5181, :c5182, :c5183, :c5184, :c5185, :c5186, :c5187, :c5188, :c5189, :c5190, :c5191, :c5192, :c5193, :c5194, :c5195, :c5196, :c5197, :c5198, :c5199, :c5200, :c5201, :c5202, :c5203, :c5204, :c5205, :c5206, :c5207, :c5208, :c5209, :c5210, :c5211, :c5212, :c5213, :c5214, :c5215, :c5216, :c5217, :c5218, :c5219, :c5220, :c5221, :c5222, :c5223, :c5224, :c5225, :c5226, :c5227, :c5228, :c5229, :c5230, :c5231, :c5232, :c5233, :c5234, :c5235, :c5236, :c5237, :c5238, :c5239, :c5240, :c5241, :c5242, :c5243, :c5244, :c5245, :c5246, :c5247, :c5248, :c5249, :c5250, :c5251, :c5252, :c5253, :c5254, :c5255, :c5256, :c5257, :c5258, :c5259, :c5260, :c5261, :c5262, :c5263, :c5264, :c5265, :c5266, :c5267, :c5268, :c5269, :c5270, :c5271, :c5272, :c5273, :c5274, :c5275, :c5276, :c5277, :c5278, :c5279, :c5280, :c5281, :c5282, :c5283, :c5284, :c5285, :c5286, :c5287, :c5288, :c5289, :c5290, :c5291, :c5292, :c5293, :c5294, :c5295, :c5296, :c5297, :c5298, :c5299, :c5300, :c5301, :c5302, :c5303, :c5304, :c5305, :c5306, :c5307, :c5308, :c5309, :c5310, :c5311, :c5312, :c5313, :c5314, :c5315, :c5316, :c5317, :c5318, :c5319, :c5320, :c5321, :c5322, :c5323, :c5324, :c5325, :c5326, :c5327, :c5328, :c5329, :c5330, :c5331, :c5332, :c5333, :c5334, :c5335, :c5336, :c5337, :c5338, :c5339, :c5340, :c5341, :c5342, :c5343, :c5344, :c5345, :c5346, :c5347, :c5348, :c5349, :c5350, :c5351, :c5352, :c5353, :c5354, :c5355, :c5356, :c5357, :c5358, :c5359, :c5360, :c5361, :c5362, :c5363, :c5364, :c5365, :c5366, :c5367, :c5368, :c5369, :c5370, :c5371, :c5372, :c5373, :c5374, :c5375, :c5376, :c5377, :c5378, :c5379, :c5380, :c5381, :c5382, :c5383, :c5384, :c5385, :c5386, :c5387, :c5388, :c5389, :c5390, :c5391, :c5392, :c5393, :c5394, :c5395, :c5396, :c5397, :c5398, :c5399, :c5400, :c5401, :c5402, :c5403, :c5404, :c5405, :c5406, :c5407, :c5408, :c5409, :c5410, :c5411, :c5412, :c5413, :c5414, :c5415, :c5416, :c5417, :c5418, :c5419, :c5420, :c5421, :c5422, :c5423, :c5424, :c5425, :c5426, :c5427, :c5428, :c5429, :c5430, :c5431, :c5432, :c5433, :c5434, :c5435, :c5436, :c5437, :c5438, :c5439, :c5440, :c5441, :c5442, :c5443, :c5444, :c5445, :c5446, :c5447, :c5448, :c5449, :c5450, :c5451, :c5452, :c5453, :c5454, :c5455, :c5456, :c5457, :c5458, :c5459, :c5460, :c5461, :c5462, :c5463, :c5464, :c5465, :c5466, :c5467, :c5468, :c5469, :c5470, :c5471, :c5472, :c5473, :c5474, :c5475, :c5476, :c5477, :c5478, :c5479, :c5480, :c5481, :c5482, :c5483, :c5484, :c5485, :c5486, :c5487, :c5488, :c5489, :c5490, :c5491, :c5492, :c5493, :c5494, :c5495, :c5496, :c5497, :c5498, :c5499, :c5500, :c5501, :c5502, :c5503, :c5504, :c5505, :c5506, :c5507, :c5508, :c5509, :c5510, :c5511, :c5512, :c5513, :c5514, :c5515, :c5516, :c5517, :c5518, :c5519, :c5520, :c5521, :c5522, :c5523, :c5524, :c5525, :c5526, :c5527, :c5528, :c5529, :c5530, :c5531, :c5532, :c5533, :c5534, :c5535, :c5536, :c5537, :c5538, :c5539, :c5540, :c5541, :c5542, :c5543, :c5544, :c5545, :c5546, :c5547, :c5548, :c5549, :c5550, :c5551, :c5552, :c5553, :c5554, :c5555, :c5556, :c5557, :c5558, :c5559, :c5560, :c5561, :c5562, :c5563, :c5564, :c5565, :c5566, :c5567, :c5568, :c5569, :c5570, :c5571, :c5572, :c5573, :c5574, :c5575, :c5576, :c5577, :c5578, :c5579, :c5580, :c5581, :c5582, :c5583, :c5584, :c5585, :c5586, :c5587, :c5588, :c5589, :c5590, :c5591, :c5592, :c5593, :c5594, :c5595, :c5596, :c5597, :c5598, :c5599, :c5600, :c5601, :c5602, :c5603, :c5604, :c5605, :c5606, :c5607, :c5608, :c5609, :c5610, :c5611, :c5612, :c5613, :c5614, :c5615, :c5616, :c5617, :c5618, :c5619, :c5620, :c5621, :c5622, :c5623, :c5624, :c5625, :c5626, :c5627, :c5628, :c5629, :c5630, :c5631, :c5632, :c5633, :c5634, :c5635, :c5636, :c5637, :c5638, :c5639, :c5640, :c5641, :c5642, :c5643, :c5644, :c5645, :c5646, :c5647, :c5648, :c5649, :c5650, :c5651, :c5652, :c5653, :c5654, :c5655, :c5656, :c5657, :c5658, :c5659, :c5660, :c5661, :c5662, :c5663, :c5664, :c5665, :c5666, :c5667, :c5668, :c5669, :c5670, :c5671, :c5672, :c5673, :c5674, :c5675, :c5676, :c5677, :c5678, :c5679, :c5680, :c5681, :c5682, :c5683, :c5684, :c5685, :c5686, :c5687, :c5688, :c5689, :c5690, :c5691, :c5692, :c5693, :c5694, :c5695, :c5696, :c5697, :c5698, :c5699, :c5700, :c5701, :c5702, :c5703, :c5704, :c5705, :c5706, :c5707, :c5708, :c5709, :c5710, :c5711, :c5712, :c5713, :c5714, :c5715, :c5716, :c5717, :c5718, :c5719, :c5720, :c5721, :c5722, :c5723, :c5724, :c5725, :c5726, :c5727, :c5728, :c5729, :c5730, :c5731, :c5732, :c5733, :c5734, :c5735, :c5736, :c5737, :c5738, :c5739, :c5740, :c5741, :c5742, :c5743, :c5744, :c5745, :c5746, :c5747, :c5748, :c5749, :c5750, :c5751, :c5752, :c5753, :c5754, :c5755, :c5756, :c5757, :c5758, :c5759, :c5760, :c5761, :c5762, :c5763, :c5764, :c5765, :c5766, :c5767, :c5768, :c5769, :c5770, :c5771, :c5772, :c5773, :c5774, :c5775, :c5776, :c5777, :c5778, :c5779, :c5780, :c5781, :c5782, :c5783, :c5784, :c5785, :c5786, :c5787, :c5788, :c5789, :c5790, :c5791, :c5792, :c5793, :c5794, :c5795, :c5796, :c5797, :c5798, :c5799, :c5800, :c5801, :c5802, :c5803, :c5804, :c5805, :c5806, :c5807, :c5808, :c5809, :c5810, :c5811, :c5812, :c5813, :c5814, :c5815, :c5816, :c5817, :c5818, :c5819, :c5820, :c5821, :c5822, :c5823, :c5824, :c5825, :c5826, :c5827, :c5828, :c5829, :c5830, :c5831, :c5832, :c5833, :c5834, :c5835, :c5836, :c5837, :c5838, :c5839, :c5840, :c5841, :c5842, :c5843, :c5844, :c5845, :c5846, :c5847, :c5848, :c5849, :c5850, :c5851, :c5852, :c5853, :c5854, :c5855, :c5856, :c5857, :c5858, :c5859, :c5860, :c5861, :c5862, :c5863, :c5864, :c5865, :c5866, :c5867, :c5868, :c5869, :c5870, :c5871, :c5872, :c5873, :c5874, :c5875, :c5876, :c5877, :c5878, :c5879, :c5880, :c5881, :c5882, :c5883, :c5884, :c5885, :c5886, :c5887, :c5888, :c5889, :c5890, :c5891, :c5892, :c5893, :c5894, :c5895, :c5896, :c5897, :c5898, :c5899, :c5900, :c5901, :c5902, :c5903, :c5904, :c5905, :c5906, :c5907, :c5908, :c5909, :c5910, :c5911, :c5912, :c5913, :c5914, :c5915, :c5916, :c5917, :c5918, :c5919, :c5920, :c5921, :c5922, :c5923, :c5924, :c5925, :c5926, :c5927, :c5928, :c5929, :c5930, :c5931, :c5932, :c5933, :c5934, :c5935, :c5936, :c5937, :c5938, :c5939, :c5940, :c5941, :c5942, :c5943, :c5944, :c5945, :c5946, :c5947, :c5948, :c5949, :c5950, :c5951, :c5952, :c5953, :c5954, :c5955, :c5956, :c5957, :c5958, :c5959, :c5960, :c5961, :c5962, :c5963, :c5964, :c5965, :c5966, :c5967, :c5968, :c5969, :c5970, :c5971, :c5972, :c5973, :c5974, :c5975, :c5976, :c5977, :c5978, :c5979, :c5980, :c5981, :c5982, :c5983, :c5984, :c5985, :c5986, :c5987, :c5988, :c5989, :c5990, :c5991, :c5992, :c5993, :c5994, :c5995, :c5996, :c5997, :c5998, :c5999, :c6000, :c6001, :c6002, :c6003, :c6004, :c6005, :c6006, :c6007, :c6008, :c6009, :c6010, :c6011, :c6012, :c6013, :c6014, :c6015, :c6016, :c6017, :c6018, :c6019, :c6020, :c6021, :c6022, :c6023, :c6024, :c6025, :c6026, :c6027, :c6028, :c6029, :c6030, :c6031, :c6032, :c6033, :c6034, :c6035, :c6036, :c6037, :c6038, :c6039, :c6040, :c6041, :c6042, :c6043, :c6044, :c6045, :c6046, :c6047, :c6048, :c6049, :c6050, :c6051, :c6052, :c6053, :c6054, :c6055, :c6056, :c6057, :c6058, :c6059, :c6060, :c6061, :c6062, :c6063, :c6064, :c6065, :c6066, :c6067, :c6068, :c6069, :c6070, :c6071, :c6072, :c6073, :c6074, :c6075, :c6076, :c6077, :c6078, :c6079, :c6080, :c6081, :c6082, :c6083, :c6084, :c6085, :c6086, :c6087, :c6088, :c6089, :c6090, :c6091, :c6092, :c6093, :c6094, :c6095, :c6096, :c6097, :c6098, :c6099, :c6100, :c6101, :c6102, :c6103, :c6104, :c6105, :c6106, :c6107, :c6108, :c6109, :c6110, :c6111, :c6112, :c6113, :c6114, :c6115, :c6116, :c6117, :c6118, :c6119, :c6120, :c6121, :c6122, :c6123, :c6124, :c6125, :c6126, :c6127, :c6128, :c6129, :c6130, :c6131, :c6132, :c6133, :c6134, :c6135, :c6136, :c6137, :c6138, :c6139, :c6140, :c6141, :c6142, :c6143, :c6144, :c6145, :c6146, :c6147, :c6148, :c6149, :c6150, :c6151, :c6152, :c6153, :c6154, :c6155, :c6156, :c6157, :c6158, :c6159, :c6160, :c6161, :c6162, :c6163, :c6164, :c6165, :c6166, :c6167, :c6168, :c6169, :c6170, :c6171, :c6172, :c6173, :c6174, :c6175, :c6176, :c6177, :c6178, :c6179, :c6180, :c6181, :c6182, :c6183, :c6184, :c6185, :c6186, :c6187, :c6188, :c6189, :c6190, :c6191, :c6192, :c6193, :c6194, :c6195, :c6196, :c6197, :c6198, :c6199, :c6200, :c6201, :c6202, :c6203, :c6204, :c6205, :c6206, :c6207, :c6208, :c6209, :c6210, :c6211, :c6212, :c6213, :c6214, :c6215, :c6216, :c6217, :c6218, :c6219, :c6220, :c6221, :c6222, :c6223, :c6224, :c6225, :c6226, :c6227, :c6228, :c6229, :c6230, :c6231, :c6232, :c6233, :c6234, :c6235, :c6236, :c6237, :c6238, :c6239, :c6240, :c6241, :c6242, :c6243, :c6244, :c6245, :c6246, :c6247, :c6248, :c6249, :c6250, :c6251, :c6252, :c6253, :c6254, :c6255, :c6256, :c6257, :c6258, :c6259, :c6260, :c6261, :c6262, :c6263, :c6264, :c6265, :c6266, :c6267, :c6268, :c6269, :c6270, :c6271, :c6272, :c6273, :c6274, :c6275, :c6276, :c6277, :c6278, :c6279, :c6280, :c6281, :c6282, :c6283, :c6284, :c6285, :c6286, :c6287, :c6288, :c6289, :c6290, :c6291, :c6292, :c6293, :c6294, :c6295, :c6296, :c6297, :c6298, :c6299, :c6300, :c6301, :c6302, :c6303, :c6304, :c6305, :c6306, :c6307, :c6308, :c6309, :c6310, :c6311, :c6312, :c6313, :c6314, :c6315, :c6316, :c6317, :c6318, :c6319, :c6320, :c6321, :c6322, :c6323, :c6324, :c6325, :c6326, :c6327, :c6328, :c6329, :c6330, :c6331, :c6332, :c6333, :c6334, :c6335, :c6336, :c6337, :c6338, :c6339, :c6340, :c6341, :c6342, :c6343, :c6344, :c6345, :c6346, :c6347, :c6348, :c6349, :c6350, :c6351, :c6352, :c6353, :c6354, :c6355, :c6356, :c6357, :c6358, :c6359, :c6360, :c6361, :c6362, :c6363, :c6364, :c6365, :c6366, :c6367, :c6368, :c6369, :c6370, :c6371, :c6372, :c6373, :c6374, :c6375, :c6376, :c6377, :c6378, :c6379, :c6380, :c6381, :c6382, :c6383, :c6384, :c6385, :c6386, :c6387, :c6388, :c6389, :c6390, :c6391, :c6392, :c6393, :c6394, :c6395, :c6396, :c6397, :c6398, :c6399, :c6400, :c6401, :c6402, :c6403, :c6404, :c6405, :c6406, :c6407, :c6408, :c6409, :c6410, :c6411, :c6412, :c6413, :c6414, :c6415, :c6416, :c6417, :c6418, :c6419, :c6420, :c6421, :c6422, :c6423, :c6424, :c6425, :c6426, :c6427, :c6428, :c6429, :c6430, :c6431, :c6432, :c6433, :c6434, :c6435, :c6436, :c6437, :c6438, :c6439, :c6440, :c6441, :c6442, :c6443, :c6444, :c6445, :c6446, :c6447, :c6448, :c6449, :c6450, :c6451, :c6452, :c6453, :c6454, :c6455, :c6456, :c6457, :c6458, :c6459, :c6460, :c6461, :c6462, :c6463, :c6464, :c6465, :c6466, :c6467, :c6468, :c6469, :c6470, :c6471, :c6472, :c6473, :c6474, :c6475, :c6476, :c6477, :c6478, :c6479, :c6480, :c6481, :c6482, :c6483, :c6484, :c6485, :c6486, :c6487, :c6488, :c6489, :c6490, :c6491, :c6492, :c6493, :c6494, :c6495, :c6496, :c6497, :c6498, :c6499, :c6500, :c6501, :c6502, :c6503, :c6504, :c6505, :c6506, :c6507, :c6508, :c6509, :c6510, :c6511, :c6512, :c6513, :c6514, :c6515, :c6516, :c6517, :c6518, :c6519, :c6520, :c6521, :c6522, :c6523, :c6524, :c6525, :c6526, :c6527, :c6528, :c6529, :c6530, :c6531, :c6532, :c6533, :c6534, :c6535, :c6536, :c6537, :c6538, :c6539, :c6540, :c6541, :c6542, :c6543, :c6544, :c6545, :c6546, :c6547, :c6548, :c6549, :c6550, :c6551, :c6552, :c6553, :c6554, :c6555, :c6556, :c6557, :c6558, :c6559, :c6560, :c6561, :c6562, :c6563, :c6564, :c6565, :c6566, :c6567, :c6568, :c6569, :c6570, :c6571, :c6572, :c6573, :c6574, :c6575, :c6576, :c6577, :c6578, :c6579, :c6580, :c6581, :c6582, :c6583, :c6584, :c6585, :c6586, :c6587, :c6588, :c6589, :c6590, :c6591, :c6592, :c6593, :c6594, :c6595, :c6596, :c6597, :c6598, :c6599, :c6600, :c6601, :c6602, :c6603, :c6604, :c6605, :c6606, :c6607, :c6608, :c6609, :c6610, :c6611, :c6612, :c6613, :c6614, :c6615, :c6616, :c6617, :c6618, :c6619, :c6620, :c6621, :c6622, :c6623, :c6624, :c6625, :c6626, :c6627, :c6628, :c6629, :c6630, :c6631, :c6632, :c6633, :c6634, :c6635, :c6636, :c6637, :c6638, :c6639, :c6640, :c6641, :c6642, :c6643, :c6644, :c6645, :c6646, :c6647, :c6648, :c6649, :c6650, :c6651, :c6652, :c6653, :c6654, :c6655, :c6656, :c6657, :c6658, :c6659, :c6660, :c6661, :c6662, :c6663, :c6664, :c6665, :c6666, :c6667, :c6668, :c6669, :c6670, :c6671, :c6672, :c6673, :c6674, :c6675, :c6676, :c6677, :c6678, :c6679, :c6680, :c6681, :c6682, :c6683, :c6684, :c6685, :c6686, :c6687, :c6688, :c6689, :c6690, :c6691, :c6692, :c6693, :c6694, :c6695, :c6696, :c6697, :c6698, :c6699, :c6700, :c6701, :c6702, :c6703, :c6704, :c6705, :c6706, :c6707, :c6708, :c6709, :c6710, :c6711, :c6712, :c6713, :c6714, :c6715, :c6716, :c6717, :c6718, :c6719, :c6720, :c6721, :c6722, :c6723, :c6724, :c6725, :c6726, :c6727, :c6728, :c6729, :c6730, :c6731, :c6732, :c6733, :c6734, :c6735, :c6736, :c6737, :c6738, :c6739, :c6740, :c6741, :c6742, :c6743, :c6744, :c6745, :c6746, :c6747, :c6748, :c6749, :c6750, :c6751, :c6752, :c6753, :c6754, :c6755, :c6756, :c6757, :c6758, :c6759, :c6760, :c6761, :c6762, :c6763, :c6764, :c6765, :c6766, :c6767, :c6768, :c6769, :c6770, :c6771, :c6772, :c6773, :c6774, :c6775, :c6776, :c6777, :c6778, :c6779, :c6780, :c6781, :c6782, :c6783, :c6784, :c6785, :c6786, :c6787, :c6788, :c6789, :c6790, :c6791, :c6792, :c6793, :c6794, :c6795, :c6796, :c6797, :c6798, :c6799, :c6800, :c6801, :c6802, :c6803, :c6804, :c6805, :c6806, :c6807, :c6808, :c6809, :c6810, :c6811, :c6812, :c6813, :c6814, :c6815, :c6816, :c6817, :c6818, :c6819, :c6820, :c6821, :c6822, :c6823, :c6824, :c6825, :c6826, :c6827, :c6828, :c6829, :c6830, :c6831, :c6832, :c6833, :c6834, :c6835, :c6836, :c6837, :c6838, :c6839, :c6840, :c6841, :c6842, :c6843, :c6844, :c6845, :c6846, :c6847, :c6848, :c6849, :c6850, :c6851, :c6852, :c6853, :c6854, :c6855, :c6856, :c6857, :c6858, :c6859, :c6860, :c6861, :c6862, :c6863, :c6864, :c6865, :c6866, :c6867, :c6868, :c6869, :c6870, :c6871, :c6872, :c6873, :c6874, :c6875, :c6876, :c6877, :c6878, :c6879, :c6880, :c6881, :c6882, :c6883, :c6884, :c6885, :c6886, :c6887, :c6888, :c6889, :c6890, :c6891, :c6892, :c6893, :c6894, :c6895, :c6896, :c6897, :c6898, :c6899, :c6900, :c6901, :c6902, :c6903, :c6904, :c6905, :c6906, :c6907, :c6908, :c6909, :c6910, :c6911, :c6912, :c6913, :c6914, :c6915, :c6916, :c6917, :c6918, :c6919, :c6920, :c6921, :c6922, :c6923, :c6924, :c6925, :c6926, :c6927, :c6928, :c6929, :c6930, :c6931, :c6932, :c6933, :c6934, :c6935, :c6936, :c6937, :c6938, :c6939, :c6940, :c6941, :c6942, :c6943, :c6944, :c6945, :c6946, :c6947, :c6948, :c6949, :c6950, :c6951, :c6952, :c6953, :c6954, :c6955, :c6956, :c6957, :c6958, :c6959, :c6960, :c6961, :c6962, :c6963, :c6964, :c6965, :c6966, :c6967, :c6968, :c6969, :c6970, :c6971, :c6972, :c6973, :c6974, :c6975, :c6976, :c6977, :c6978, :c6979, :c6980, :c6981, :c6982, :c6983, :c6984, :c6985, :c6986, :c6987, :c6988, :c6989, :c6990, :c6991, :c6992, :c6993, :c6994, :c6995, :c6996, :c6997, :c6998, :c6999, :c7000, :c7001, :c7002, :c7003, :c7004, :c7005, :c7006, :c7007, :c7008, :c7009, :c7010, :c7011, :c7012, :c7013, :c7014, :c7015, :c7016, :c7017, :c7018, :c7019, :c7020, :c7021, :c7022, :c7023, :c7024, :c7025, :c7026, :c7027, :c7028, :c7029, :c7030, :c7031, :c7032, :c7033, :c7034, :c7035, :c7036, :c7037, :c7038, :c7039, :c7040, :c7041, :c7042, :c7043, :c7044, :c7045, :c7046, :c7047, :c7048, :c7049, :c7050, :c7051, :c7052, :c7053, :c7054, :c7055, :c7056, :c7057, :c7058, :c7059, :c7060, :c7061, :c7062, :c7063, :c7064, :c7065, :c7066, :c7067, :c7068, :c7069, :c7070, :c7071, :c7072, :c7073, :c7074, :c7075, :c7076, :c7077, :c7078, :c7079, :c7080, :c7081, :c7082, :c7083, :c7084, :c7085, :c7086, :c7087, :c7088, :c7089, :c7090, :c7091, :c7092, :c7093, :c7094, :c7095, :c7096, :c7097, :c7098, :c7099, :c7100, :c7101, :c7102, :c7103, :c7104, :c7105, :c7106, :c7107, :c7108, :c7109, :c7110, :c7111, :c7112, :c7113, :c7114, :c7115, :c7116, :c7117, :c7118, :c7119, :c7120, :c7121, :c7122, :c7123, :c7124, :c7125, :c7126, :c7127, :c7128, :c7129, :c7130, :c7131, :c7132, :c7133, :c7134, :c7135, :c7136, :c7137, :c7138, :c7139, :c7140, :c7141, :c7142, :c7143, :c7144, :c7145, :c7146, :c7147, :c7148, :c7149, :c7150, :c7151, :c7152, :c7153, :c7154, :c7155, :c7156, :c7157, :c7158, :c7159, :c7160, :c7161, :c7162, :c7163, :c7164, :c7165, :c7166, :c7167, :c7168, :c7169, :c7170, :c7171, :c7172, :c7173, :c7174, :c7175, :c7176, :c7177, :c7178, :c7179, :c7180, :c7181, :c7182, :c7183, :c7184, :c7185, :c7186, :c7187, :c7188, :c7189, :c7190, :c7191, :c7192, :c7193, :c7194, :c7195, :c7196, :c7197, :c7198, :c7199, :c7200, :c7201, :c7202, :c7203, :c7204, :c7205, :c7206, :c7207, :c7208, :c7209, :c7210, :c7211, :c7212, :c7213, :c7214, :c7215, :c7216, :c7217, :c7218, :c7219, :c7220, :c7221, :c7222, :c7223, :c7224, :c7225, :c7226, :c7227, :c7228, :c7229, :c7230, :c7231, :c7232, :c7233, :c7234, :c7235, :c7236, :c7237, :c7238, :c7239, :c7240, :c7241, :c7242, :c7243, :c7244, :c7245, :c7246, :c7247, :c7248, :c7249, :c7250, :c7251, :c7252, :c7253, :c7254, :c7255, :c7256, :c7257, :c7258, :c7259, :c7260, :c7261, :c7262, :c7263, :c7264, :c7265, :c7266, :c7267, :c7268, :c7269, :c7270, :c7271, :c7272, :c7273, :c7274, :c7275, :c7276, :c7277, :c7278, :c7279, :c7280, :c7281, :c7282, :c7283, :c7284, :c7285, :c7286, :c7287, :c7288, :c7289, :c7290, :c7291, :c7292, :c7293, :c7294, :c7295, :c7296, :c7297, :c7298, :c7299, :c7300, :c7301, :c7302, :c7303, :c7304, :c7305, :c7306, :c7307, :c7308, :c7309, :c7310, :c7311, :c7312, :c7313, :c7314, :c7315, :c7316, :c7317, :c7318, :c7319, :c7320, :c7321, :c7322, :c7323, :c7324, :c7325, :c7326, :c7327, :c7328, :c7329, :c7330, :c7331, :c7332, :c7333, :c7334, :c7335, :c7336, :c7337, :c7338, :c7339, :c7340, :c7341, :c7342, :c7343, :c7344, :c7345, :c7346, :c7347, :c7348, :c7349, :c7350, :c7351, :c7352, :c7353, :c7354, :c7355, :c7356, :c7357, :c7358, :c7359, :c7360, :c7361, :c7362, :c7363, :c7364, :c7365, :c7366, :c7367, :c7368, :c7369, :c7370, :c7371, :c7372, :c7373, :c7374, :c7375, :c7376, :c7377, :c7378, :c7379, :c7380, :c7381, :c7382, :c7383, :c7384, :c7385, :c7386, :c7387, :c7388, :c7389, :c7390, :c7391, :c7392, :c7393, :c7394, :c7395, :c7396, :c7397, :c7398, :c7399, :c7400, :c7401, :c7402, :c7403, :c7404, :c7405, :c7406, :c7407, :c7408, :c7409, :c7410, :c7411, :c7412, :c7413, :c7414, :c7415, :c7416, :c7417, :c7418, :c7419, :c7420, :c7421, :c7422, :c7423, :c7424, :c7425, :c7426, :c7427, :c7428, :c7429, :c7430, :c7431, :c7432, :c7433, :c7434, :c7435, :c7436, :c7437, :c7438, :c7439, :c7440, :c7441, :c7442, :c7443, :c7444, :c7445, :c7446, :c7447, :c7448, :c7449, :c7450, :c7451, :c7452, :c7453, :c7454, :c7455, :c7456, :c7457, :c7458, :c7459, :c7460, :c7461, :c7462, :c7463, :c7464, :c7465, :c7466, :c7467, :c7468, :c7469, :c7470, :c7471, :c7472, :c7473, :c7474, :c7475, :c7476, :c7477, :c7478, :c7479, :c7480, :c7481, :c7482, :c7483, :c7484, :c7485, :c7486, :c7487, :c7488, :c7489, :c7490, :c7491, :c7492, :c7493, :c7494, :c7495, :c7496, :c7497, :c7498, :c7499, :c7500, :c7501, :c7502, :c7503, :c7504, :c7505, :c7506, :c7507, :c7508, :c7509, :c7510, :c7511, :c7512, :c7513, :c7514, :c7515, :c7516, :c7517, :c7518, :c7519, :c7520, :c7521, :c7522, :c7523, :c7524, :c7525, :c7526, :c7527, :c7528, :c7529, :c7530, :c7531, :c7532, :c7533, :c7534, :c7535, :c7536, :c7537, :c7538, :c7539, :c7540, :c7541, :c7542, :c7543, :c7544, :c7545, :c7546, :c7547, :c7548, :c7549, :c7550, :c7551, :c7552, :c7553, :c7554, :c7555, :c7556, :c7557, :c7558, :c7559, :c7560, :c7561, :c7562, :c7563, :c7564, :c7565, :c7566, :c7567, :c7568, :c7569, :c7570, :c7571, :c7572, :c7573, :c7574, :c7575, :c7576, :c7577, :c7578, :c7579, :c7580, :c7581, :c7582, :c7583, :c7584, :c7585, :c7586, :c7587, :c7588, :c7589, :c7590, :c7591, :c7592, :c7593, :c7594, :c7595, :c7596, :c7597, :c7598, :c7599, :c7600, :c7601, :c7602, :c7603, :c7604, :c7605, :c7606, :c7607, :c7608, :c7609, :c7610, :c7611, :c7612, :c7613, :c7614, :c7615, :c7616, :c7617, :c7618, :c7619, :c7620, :c7621, :c7622, :c7623, :c7624, :c7625, :c7626, :c7627, :c7628, :c7629, :c7630, :c7631, :c7632, :c7633, :c7634, :c7635, :c7636, :c7637, :c7638, :c7639, :c7640, :c7641, :c7642, :c7643, :c7644, :c7645, :c7646, :c7647, :c7648, :c7649, :c7650, :c7651, :c7652, :c7653, :c7654, :c7655, :c7656, :c7657, :c7658, :c7659, :c7660, :c7661, :c7662, :c7663, :c7664, :c7665, :c7666, :c7667, :c7668, :c7669, :c7670, :c7671, :c7672, :c7673, :c7674, :c7675, :c7676, :c7677, :c7678, :c7679, :c7680, :c7681, :c7682, :c7683, :c7684, :c7685, :c7686, :c7687, :c7688, :c7689, :c7690, :c7691, :c7692, :c7693, :c7694, :c7695, :c7696, :c7697, :c7698, :c7699, :c7700, :c7701, :c7702, :c7703, :c7704, :c7705, :c7706, :c7707, :c7708, :c7709, :c7710, :c7711, :c7712, :c7713, :c7714, :c7715, :c7716, :c7717, :c7718, :c7719, :c7720, :c7721, :c7722, :c7723, :c7724, :c7725, :c7726, :c7727, :c7728, :c7729, :c7730, :c7731, :c7732, :c7733, :c7734, :c7735, :c7736, :c7737, :c7738, :c7739, :c7740, :c7741, :c7742, :c7743, :c7744, :c7745, :c7746, :c7747, :c7748, :c7749, :c7750, :c7751, :c7752, :c7753, :c7754, :c7755, :c7756, :c7757, :c7758, :c7759, :c7760, :c7761, :c7762, :c7763, :c7764, :c7765, :c7766, :c7767, :c7768, :c7769, :c7770, :c7771, :c7772, :c7773, :c7774, :c7775, :c7776, :c7777, :c7778, :c7779, :c7780, :c7781, :c7782, :c7783, :c7784, :c7785, :c7786, :c7787, :c7788, :c7789, :c7790, :c7791, :c7792, :c7793, :c7794, :c7795, :c7796, :c7797, :c7798, :c7799, :c7800, :c7801, :c7802, :c7803, :c7804, :c7805, :c7806, :c7807, :c7808, :c7809, :c7810, :c7811, :c7812, :c7813, :c7814, :c7815, :c7816, :c7817, :c7818, :c7819, :c7820, :c7821, :c7822, :c7823, :c7824, :c7825, :c7826, :c7827, :c7828, :c7829, :c7830, :c7831, :c7832, :c7833, :c7834, :c7835, :c7836, :c7837, :c7838, :c7839, :c7840, :c7841, :c7842, :c7843, :c7844, :c7845, :c7846, :c7847, :c7848, :c7849, :c7850, :c7851, :c7852, :c7853, :c7854, :c7855, :c7856, :c7857, :c7858, :c7859, :c7860, :c7861, :c7862, :c7863, :c7864, :c7865, :c7866, :c7867, :c7868, :c7869, :c7870, :c7871, :c7872, :c7873, :c7874, :c7875, :c7876, :c7877, :c7878, :c7879, :c7880, :c7881, :c7882, :c7883, :c7884, :c7885, :c7886, :c7887, :c7888, :c7889, :c7890, :c7891, :c7892, :c7893, :c7894, :c7895, :c7896, :c7897, :c7898, :c7899, :c7900, :c7901, :c7902, :c7903, :c7904, :c7905, :c7906, :c7907, :c7908, :c7909, :c7910, :c7911, :c7912, :c7913, :c7914, :c7915, :c7916, :c7917, :c7918, :c7919, :c7920, :c7921, :c7922, :c7923, :c7924, :c7925, :c7926, :c7927, :c7928, :c7929, :c7930, :c7931, :c7932, :c7933, :c7934, :c7935, :c7936, :c7937, :c7938, :c7939, :c7940, :c7941, :c7942, :c7943, :c7944, :c7945, :c7946, :c7947, :c7948, :c7949, :c7950, :c7951, :c7952, :c7953, :c7954, :c7955, :c7956, :c7957, :c7958, :c7959, :c7960, :c7961, :c7962, :c7963, :c7964, :c7965, :c7966, :c7967, :c7968, :c7969, :c7970, :c7971, :c7972, :c7973, :c7974, :c7975, :c7976, :c7977, :c7978, :c7979, :c7980, :c7981, :c7982, :c7983, :c7984, :c7985, :c7986, :c7987, :c7988, :c7989, :c7990, :c7991, :c7992, :c7993, :c7994, :c7995, :c7996, :c7997, :c7998, :c7999, :c8000, :c8001, :c8002, :c8003, :c8004, :c8005, :c8006, :c8007, :c8008, :c8009, :c8010, :c8011, :c8012, :c8013, :c8014, :c8015, :c8016, :c8017, :c8018, :c8019, :c8020, :c8021, :c8022, :c8023, :c8024, :c8025, :c8026, :c8027, :c8028, :c8029, :c8030, :c8031, :c8032, :c8033, :c8034, :c8035, :c8036, :c8037, :c8038, :c8039, :c8040, :c8041, :c8042, :c8043, :c8044, :c8045, :c8046, :c8047, :c8048, :c8049, :c8050, :c8051, :c8052, :c8053, :c8054, :c8055, :c8056, :c8057, :c8058, :c8059, :c8060, :c8061, :c8062, :c8063, :c8064, :c8065, :c8066, :c8067, :c8068, :c8069, :c8070, :c8071, :c8072, :c8073, :c8074, :c8075, :c8076, :c8077, :c8078, :c8079, :c8080, :c8081, :c8082, :c8083, :c8084, :c8085, :c8086, :c8087, :c8088, :c8089, :c8090, :c8091, :c8092, :c8093, :c8094, :c8095, :c8096, :c8097, :c8098, :c8099, :c8100, :c8101, :c8102, :c8103, :c8104, :c8105, :c8106, :c8107, :c8108, :c8109, :c8110, :c8111, :c8112, :c8113, :c8114, :c8115, :c8116, :c8117, :c8118, :c8119, :c8120, :c8121, :c8122, :c8123, :c8124, :c8125, :c8126, :c8127, :c8128, :c8129, :c8130, :c8131, :c8132, :c8133, :c8134, :c8135, :c8136, :c8137, :c8138, :c8139, :c8140, :c8141, :c8142, :c8143, :c8144, :c8145, :c8146, :c8147, :c8148, :c8149, :c8150, :c8151, :c8152, :c8153, :c8154, :c8155, :c8156, :c8157, :c8158, :c8159, :c8160, :c8161, :c8162, :c8163, :c8164, :c8165, :c8166, :c8167, :c8168, :c8169, :c8170, :c8171, :c8172, :c8173, :c8174, :c8175, :c8176, :c8177, :c8178, :c8179, :c8180, :c8181, :c8182, :c8183, :c8184, :c8185, :c8186, :c8187, :c8188, :c8189, :c8190, :c8191, :c8192, :c8193, :c8194, :c8195, :c8196, :c8197, :c8198, :c8199, :c8200, :c8201, :c8202, :c8203, :c8204, :c8205, :c8206, :c8207, :c8208, :c8209, :c8210, :c8211, :c8212, :c8213, :c8214, :c8215, :c8216, :c8217, :c8218, :c8219, :c8220, :c8221, :c8222, :c8223, :c8224, :c8225, :c8226, :c8227, :c8228, :c8229, :c8230, :c8231, :c8232, :c8233, :c8234, :c8235, :c8236, :c8237, :c8238, :c8239, :c8240, :c8241, :c8242, :c8243, :c8244, :c8245, :c8246, :c8247, :c8248, :c8249, :c8250, :c8251, :c8252, :c8253, :c8254, :c8255, :c8256, :c8257, :c8258, :c8259, :c8260, :c8261, :c8262, :c8263, :c8264, :c8265, :c8266, :c8267, :c8268, :c8269, :c8270, :c8271, :c8272, :c8273, :c8274, :c8275, :c8276, :c8277, :c8278, :c8279, :c8280, :c8281, :c8282, :c8283, :c8284, :c8285, :c8286, :c8287, :c8288, :c8289, :c8290, :c8291, :c8292, :c8293, :c8294, :c8295, :c8296, :c8297, :c8298, :c8299, :c8300, :c8301, :c8302, :c8303, :c8304, :c8305, :c8306, :c8307, :c8308, :c8309, :c8310, :c8311, :c8312, :c8313, :c8314, :c8315, :c8316, :c8317, :c8318, :c8319, :c8320, :c8321, :c8322, :c8323, :c8324, :c8325, :c8326, :c8327, :c8328, :c8329, :c8330, :c8331, :c8332, :c8333, :c8334, :c8335, :c8336, :c8337, :c8338, :c8339, :c8340, :c8341, :c8342, :c8343, :c8344, :c8345, :c8346, :c8347, :c8348, :c8349, :c8350, :c8351, :c8352, :c8353, :c8354, :c8355, :c8356, :c8357, :c8358, :c8359, :c8360, :c8361, :c8362, :c8363, :c8364, :c8365, :c8366, :c8367, :c8368, :c8369, :c8370, :c8371, :c8372, :c8373, :c8374, :c8375, :c8376, :c8377, :c8378, :c8379, :c8380, :c8381, :c8382, :c8383, :c8384, :c8385, :c8386, :c8387, :c8388, :c8389, :c8390, :c8391, :c8392, :c8393, :c8394, :c8395, :c8396, :c8397, :c8398, :c8399, :c8400, :c8401, :c8402, :c8403, :c8404, :c8405, :c8406, :c8407, :c8408, :c8409, :c8410, :c8411, :c8412, :c8413, :c8414, :c8415, :c8416, :c8417, :c8418, :c8419, :c8420, :c8421, :c8422, :c8423, :c8424, :c8425, :c8426, :c8427, :c8428, :c8429, :c8430, :c8431, :c8432, :c8433, :c8434, :c8435, :c8436, :c8437, :c8438, :c8439, :c8440, :c8441, :c8442, :c8443, :c8444, :c8445, :c8446, :c8447, :c8448, :c8449, :c8450, :c8451, :c8452, :c8453, :c8454, :c8455, :c8456, :c8457, :c8458, :c8459, :c8460, :c8461, :c8462, :c8463, :c8464, :c8465, :c8466, :c8467, :c8468, :c8469, :c8470, :c8471, :c8472, :c8473, :c8474, :c8475, :c8476, :c8477, :c8478, :c8479, :c8480, :c8481, :c8482, :c8483, :c8484, :c8485, :c8486, :c8487, :c8488, :c8489, :c8490, :c8491, :c8492, :c8493, :c8494, :c8495, :c8496, :c8497, :c8498, :c8499, :c8500, :c8501, :c8502, :c8503, :c8504, :c8505, :c8506, :c8507, :c8508, :c8509, :c8510, :c8511, :c8512, :c8513, :c8514, :c8515, :c8516, :c8517, :c8518, :c8519, :c8520, :c8521, :c8522, :c8523, :c8524, :c8525, :c8526, :c8527, :c8528, :c8529, :c8530, :c8531, :c8532, :c8533, :c8534, :c8535, :c8536, :c8537, :c8538, :c8539, :c8540, :c8541, :c8542, :c8543, :c8544, :c8545, :c8546, :c8547, :c8548, :c8549, :c8550, :c8551, :c8552, :c8553, :c8554, :c8555, :c8556, :c8557, :c8558, :c8559, :c8560, :c8561, :c8562, :c8563, :c8564, :c8565, :c8566, :c8567, :c8568, :c8569, :c8570, :c8571, :c8572, :c8573, :c8574, :c8575, :c8576, :c8577, :c8578, :c8579, :c8580, :c8581, :c8582, :c8583, :c8584, :c8585, :c8586, :c8587, :c8588, :c8589, :c8590, :c8591, :c8592, :c8593, :c8594, :c8595, :c8596, :c8597, :c8598, :c8599, :c8600, :c8601, :c8602, :c8603, :c8604, :c8605, :c8606, :c8607, :c8608, :c8609, :c8610, :c8611, :c8612, :c8613, :c8614, :c8615, :c8616, :c8617, :c8618, :c8619, :c8620, :c8621, :c8622, :c8623, :c8624, :c8625, :c8626, :c8627, :c8628, :c8629, :c8630, :c8631, :c8632, :c8633, :c8634, :c8635, :c8636, :c8637, :c8638, :c8639, :c8640, :c8641, :c8642, :c8643, :c8644, :c8645, :c8646, :c8647, :c8648, :c8649, :c8650, :c8651, :c8652, :c8653, :c8654, :c8655, :c8656, :c8657, :c8658, :c8659, :c8660, :c8661, :c8662, :c8663, :c8664, :c8665, :c8666, :c8667, :c8668, :c8669, :c8670, :c8671, :c8672, :c8673, :c8674, :c8675, :c8676, :c8677, :c8678, :c8679, :c8680, :c8681, :c8682, :c8683, :c8684, :c8685, :c8686, :c8687, :c8688, :c8689, :c8690, :c8691, :c8692, :c8693, :c8694, :c8695, :c8696, :c8697, :c8698, :c8699, :c8700, :c8701, :c8702, :c8703, :c8704, :c8705, :c8706, :c8707, :c8708, :c8709, :c8710, :c8711, :c8712, :c8713, :c8714, :c8715, :c8716, :c8717, :c8718, :c8719, :c8720, :c8721, :c8722, :c8723, :c8724, :c8725, :c8726, :c8727, :c8728, :c8729, :c8730, :c8731, :c8732, :c8733, :c8734, :c8735, :c8736, :c8737, :c8738, :c8739, :c8740, :c8741, :c8742, :c8743, :c8744, :c8745, :c8746, :c8747, :c8748, :c8749, :c8750, :c8751, :c8752, :c8753, :c8754, :c8755, :c8756, :c8757, :c8758, :c8759, :c8760, :c8761, :c8762, :c8763, :c8764, :c8765, :c8766, :c8767, :c8768, :c8769, :c8770, :c8771, :c8772, :c8773, :c8774, :c8775, :c8776, :c8777, :c8778, :c8779, :c8780, :c8781, :c8782, :c8783, :c8784, :c8785, :c8786, :c8787, :c8788, :c8789, :c8790, :c8791, :c8792, :c8793, :c8794, :c8795, :c8796, :c8797, :c8798, :c8799, :c8800, :c8801, :c8802, :c8803, :c8804, :c8805, :c8806, :c8807, :c8808, :c8809, :c8810, :c8811, :c8812, :c8813, :c8814, :c8815, :c8816, :c8817, :c8818, :c8819, :c8820, :c8821, :c8822, :c8823, :c8824, :c8825, :c8826, :c8827, :c8828, :c8829, :c8830, :c8831, :c8832, :c8833, :c8834, :c8835, :c8836, :c8837, :c8838, :c8839, :c8840, :c8841, :c8842, :c8843, :c8844, :c8845, :c8846, :c8847, :c8848, :c8849, :c8850, :c8851, :c8852, :c8853, :c8854, :c8855, :c8856, :c8857, :c8858, :c8859, :c8860, :c8861, :c8862, :c8863, :c8864, :c8865, :c8866, :c8867, :c8868, :c8869, :c8870, :c8871, :c8872, :c8873, :c8874, :c8875, :c8876, :c8877, :c8878, :c8879, :c8880, :c8881, :c8882, :c8883, :c8884, :c8885, :c8886, :c8887, :c8888, :c8889, :c8890, :c8891, :c8892, :c8893, :c8894, :c8895, :c8896, :c8897, :c8898, :c8899, :c8900, :c8901, :c8902, :c8903, :c8904, :c8905, :c8906, :c8907, :c8908, :c8909, :c8910, :c8911, :c8912, :c8913, :c8914, :c8915, :c8916, :c8917, :c8918, :c8919, :c8920, :c8921, :c8922, :c8923, :c8924, :c8925, :c8926, :c8927, :c8928, :c8929, :c8930, :c8931, :c8932, :c8933, :c8934, :c8935, :c8936, :c8937, :c8938, :c8939, :c8940, :c8941, :c8942, :c8943, :c8944, :c8945, :c8946, :c8947, :c8948, :c8949, :c8950, :c8951, :c8952, :c8953, :c8954, :c8955, :c8956, :c8957, :c8958, :c8959, :c8960, :c8961, :c8962, :c8963, :c8964, :c8965, :c8966, :c8967, :c8968, :c8969, :c8970, :c8971, :c8972, :c8973, :c8974, :c8975, :c8976, :c8977, :c8978, :c8979, :c8980, :c8981, :c8982, :c8983, :c8984, :c8985, :c8986, :c8987, :c8988, :c8989, :c8990, :c8991, :c8992, :c8993, :c8994, :c8995, :c8996, :c8997, :c8998, :c8999, :c9000, :c9001, :c9002, :c9003, :c9004, :c9005, :c9006, :c9007, :c9008, :c9009, :c9010, :c9011, :c9012, :c9013, :c9014, :c9015, :c9016, :c9017, :c9018, :c9019, :c9020, :c9021, :c9022, :c9023, :c9024, :c9025, :c9026, :c9027, :c9028, :c9029, :c9030, :c9031, :c9032, :c9033, :c9034, :c9035, :c9036, :c9037, :c9038, :c9039, :c9040, :c9041, :c9042, :c9043, :c9044, :c9045, :c9046, :c9047, :c9048, :c9049, :c9050, :c9051, :c9052, :c9053, :c9054, :c9055, :c9056, :c9057, :c9058, :c9059, :c9060, :c9061, :c9062, :c9063, :c9064, :c9065, :c9066, :c9067, :c9068, :c9069, :c9070, :c9071, :c9072, :c9073, :c9074, :c9075, :c9076, :c9077, :c9078, :c9079, :c9080, :c9081, :c9082, :c9083, :c9084, :c9085, :c9086, :c9087, :c9088, :c9089, :c9090, :c9091, :c9092, :c9093, :c9094, :c9095, :c9096, :c9097, :c9098, :c9099, :c9100, :c9101, :c9102, :c9103, :c9104, :c9105, :c9106, :c9107, :c9108, :c9109, :c9110, :c9111, :c9112, :c9113, :c9114, :c9115, :c9116, :c9117, :c9118, :c9119, :c9120, :c9121, :c9122, :c9123, :c9124, :c9125, :c9126, :c9127, :c9128, :c9129, :c9130, :c9131, :c9132, :c9133, :c9134, :c9135, :c9136, :c9137, :c9138, :c9139, :c9140, :c9141, :c9142, :c9143, :c9144, :c9145, :c9146, :c9147, :c9148, :c9149, :c9150, :c9151, :c9152, :c9153, :c9154, :c9155, :c9156, :c9157, :c9158, :c9159, :c9160, :c9161, :c9162, :c9163, :c9164, :c9165, :c9166, :c9167, :c9168, :c9169, :c9170, :c9171, :c9172, :c9173, :c9174, :c9175, :c9176, :c9177, :c9178, :c9179, :c9180, :c9181, :c9182, :c9183, :c9184, :c9185, :c9186, :c9187, :c9188, :c9189, :c9190, :c9191, :c9192, :c9193, :c9194, :c9195, :c9196, :c9197, :c9198, :c9199, :c9200, :c9201, :c9202, :c9203, :c9204, :c9205, :c9206, :c9207, :c9208, :c9209, :c9210, :c9211, :c9212, :c9213, :c9214, :c9215, :c9216, :c9217, :c9218, :c9219, :c9220, :c9221, :c9222, :c9223, :c9224, :c9225, :c9226, :c9227, :c9228, :c9229, :c9230, :c9231, :c9232, :c9233, :c9234, :c9235, :c9236, :c9237, :c9238, :c9239, :c9240, :c9241, :c9242, :c9243, :c9244, :c9245, :c9246, :c9247, :c9248, :c9249, :c9250, :c9251, :c9252, :c9253, :c9254, :c9255, :c9256, :c9257, :c9258, :c9259, :c9260, :c9261, :c9262, :c9263, :c9264, :c9265, :c9266, :c9267, :c9268, :c9269, :c9270, :c9271, :c9272, :c9273, :c9274, :c9275, :c9276, :c9277, :c9278, :c9279, :c9280, :c9281, :c9282, :c9283, :c9284, :c9285, :c9286, :c9287, :c9288, :c9289, :c9290, :c9291, :c9292, :c9293, :c9294, :c9295, :c9296, :c9297, :c9298, :c9299, :c9300, :c9301, :c9302, :c9303, :c9304, :c9305, :c9306, :c9307, :c9308, :c9309, :c9310, :c9311, :c9312, :c9313, :c9314, :c9315, :c9316, :c9317, :c9318, :c9319, :c9320, :c9321, :c9322, :c9323, :c9324, :c9325, :c9326, :c9327, :c9328, :c9329, :c9330, :c9331, :c9332, :c9333, :c9334, :c9335, :c9336, :c9337, :c9338, :c9339, :c9340, :c9341, :c9342, :c9343, :c9344, :c9345, :c9346, :c9347, :c9348, :c9349, :c9350, :c9351, :c9352, :c9353, :c9354, :c9355, :c9356, :c9357, :c9358, :c9359, :c9360, :c9361, :c9362, :c9363, :c9364, :c9365, :c9366, :c9367, :c9368, :c9369, :c9370, :c9371, :c9372, :c9373, :c9374, :c9375, :c9376, :c9377, :c9378, :c9379, :c9380, :c9381, :c9382, :c9383, :c9384, :c9385, :c9386, :c9387, :c9388, :c9389, :c9390, :c9391, :c9392, :c9393, :c9394, :c9395, :c9396, :c9397, :c9398, :c9399, :c9400, :c9401, :c9402, :c9403, :c9404, :c9405, :c9406, :c9407, :c9408, :c9409, :c9410, :c9411, :c9412, :c9413, :c9414, :c9415, :c9416, :c9417, :c9418, :c9419, :c9420, :c9421, :c9422, :c9423, :c9424, :c9425, :c9426, :c9427, :c9428, :c9429, :c9430, :c9431, :c9432, :c9433, :c9434, :c9435, :c9436, :c9437, :c9438, :c9439, :c9440, :c9441, :c9442, :c9443, :c9444, :c9445, :c9446, :c9447, :c9448, :c9449, :c9450, :c9451, :c9452, :c9453, :c9454, :c9455, :c9456, :c9457, :c9458, :c9459, :c9460, :c9461, :c9462, :c9463, :c9464, :c9465, :c9466, :c9467, :c9468, :c9469, :c9470, :c9471, :c9472, :c9473, :c9474, :c9475, :c9476, :c9477, :c9478, :c9479, :c9480, :c9481, :c9482, :c9483, :c9484, :c9485, :c9486, :c9487, :c9488, :c9489, :c9490, :c9491, :c9492, :c9493, :c9494, :c9495, :c9496, :c9497, :c9498, :c9499, :c9500, :c9501, :c9502, :c9503, :c9504, :c9505, :c9506, :c9507, :c9508, :c9509, :c9510, :c9511, :c9512, :c9513, :c9514, :c9515, :c9516, :c9517, :c9518, :c9519, :c9520, :c9521, :c9522, :c9523, :c9524, :c9525, :c9526, :c9527, :c9528, :c9529, :c9530, :c9531, :c9532, :c9533, :c9534, :c9535, :c9536, :c9537, :c9538, :c9539, :c9540, :c9541, :c9542, :c9543, :c9544, :c9545, :c9546, :c9547, :c9548, :c9549, :c9550, :c9551, :c9552, :c9553, :c9554, :c9555, :c9556, :c9557, :c9558, :c9559, :c9560, :c9561, :c9562, :c9563, :c9564, :c9565, :c9566, :c9567, :c9568, :c9569, :c9570, :c9571, :c9572, :c9573, :c9574, :c9575, :c9576, :c9577, :c9578, :c9579, :c9580, :c9581, :c9582, :c9583, :c9584, :c9585, :c9586, :c9587, :c9588, :c9589, :c9590, :c9591, :c9592, :c9593, :c9594, :c9595, :c9596, :c9597, :c9598, :c9599, :c9600, :c9601, :c9602, :c9603, :c9604, :c9605, :c9606, :c9607, :c9608, :c9609, :c9610, :c9611, :c9612, :c9613, :c9614, :c9615, :c9616, :c9617, :c9618, :c9619, :c9620, :c9621, :c9622, :c9623, :c9624, :c9625, :c9626, :c9627, :c9628, :c9629, :c9630, :c9631, :c9632, :c9633, :c9634, :c9635, :c9636, :c9637, :c9638, :c9639, :c9640, :c9641, :c9642, :c9643, :c9644, :c9645, :c9646, :c9647, :c9648, :c9649, :c9650, :c9651, :c9652, :c9653, :c9654, :c9655, :c9656, :c9657, :c9658, :c9659, :c9660, :c9661, :c9662, :c9663, :c9664, :c9665, :c9666, :c9667, :c9668, :c9669, :c9670, :c9671, :c9672, :c9673, :c9674, :c9675, :c9676, :c9677, :c9678, :c9679, :c9680, :c9681, :c9682, :c9683, :c9684, :c9685, :c9686, :c9687, :c9688, :c9689, :c9690, :c9691, :c9692, :c9693, :c9694, :c9695, :c9696, :c9697, :c9698, :c9699, :c9700, :c9701, :c9702, :c9703, :c9704, :c9705, :c9706, :c9707, :c9708, :c9709, :c9710, :c9711, :c9712, :c9713, :c9714, :c9715, :c9716, :c9717, :c9718, :c9719, :c9720, :c9721, :c9722, :c9723, :c9724, :c9725, :c9726, :c9727, :c9728, :c9729, :c9730, :c9731, :c9732, :c9733, :c9734, :c9735, :c9736, :c9737, :c9738, :c9739, :c9740, :c9741, :c9742, :c9743, :c9744, :c9745, :c9746, :c9747, :c9748, :c9749, :c9750, :c9751, :c9752, :c9753, :c9754, :c9755, :c9756, :c9757, :c9758, :c9759, :c9760, :c9761, :c9762, :c9763, :c9764, :c9765, :c9766, :c9767, :c9768, :c9769, :c9770, :c9771, :c9772, :c9773, :c9774, :c9775, :c9776, :c9777, :c9778, :c9779, :c9780, :c9781, :c9782, :c9783, :c9784, :c9785, :c9786, :c9787, :c9788, :c9789, :c9790, :c9791, :c9792, :c9793, :c9794, :c9795, :c9796, :c9797, :c9798, :c9799, :c9800, :c9801, :c9802, :c9803, :c9804, :c9805, :c9806, :c9807, :c9808, :c9809, :c9810, :c9811, :c9812, :c9813, :c9814, :c9815, :c9816, :c9817, :c9818, :c9819, :c9820, :c9821, :c9822, :c9823, :c9824, :c9825, :c9826, :c9827, :c9828, :c9829, :c9830, :c9831, :c9832, :c9833, :c9834, :c9835, :c9836, :c9837, :c9838, :c9839, :c9840, :c9841, :c9842, :c9843, :c9844, :c9845, :c9846, :c9847, :c9848, :c9849, :c9850, :c9851, :c9852, :c9853, :c9854, :c9855, :c9856, :c9857, :c9858, :c9859, :c9860, :c9861, :c9862, :c9863, :c9864, :c9865, :c9866, :c9867, :c9868, :c9869, :c9870, :c9871, :c9872, :c9873, :c9874, :c9875, :c9876, :c9877, :c9878, :c9879, :c9880, :c9881, :c9882, :c9883, :c9884, :c9885, :c9886, :c9887, :c9888, :c9889, :c9890, :c9891, :c9892, :c9893, :c9894, :c9895, :c9896, :c9897, :c9898, :c9899, :c9900, :c9901, :c9902, :c9903, :c9904, :c9905, :c9906, :c9907, :c9908, :c9909, :c9910, :c9911, :c9912, :c9913, :c9914, :c9915, :c9916, :c9917, :c9918, :c9919, :c9920, :c9921, :c9922, :c9923, :c9924, :c9925, :c9926, :c9927, :c9928, :c9929, :c9930, :c9931, :c9932, :c9933, :c9934, :c9935, :c9936, :c9937, :c9938, :c9939, :c9940, :c9941, :c9942, :c9943, :c9944, :c9945, :c9946, :c9947, :c9948, :c9949, :c9950, :c9951, :c9952, :c9953, :c9954, :c9955, :c9956, :c9957, :c9958, :c9959, :c9960, :c9961, :c9962, :c9963, :c9964, :c9965, :c9966, :c9967, :c9968, :c9969, :c9970, :c9971, :c9972, :c9973, :c9974, :c9975, :c9976, :c9977, :c9978, :c9979, :c9980, :c9981, :c9982, :c9983, :c9984, :c9985, :c9986, :c9987, :c9988, :c9989, :c9990, :c9991, :c9992, :c9993, :c9994, :c9995, :c9996, :c9997, :c9998, :c9999, :c10000 . raptor2-2.0.15/tests/turtle/bad-08.ttl0000644000175000017500000000006210674751730014302 00000000000000@keywords something. # @keywords is not in turtle raptor2-2.0.15/tests/turtle/bad-19.ttl0000644000175000017500000000012010735307727014300 00000000000000# Bad () in predicate position @prefix : . :a () :b . raptor2-2.0.15/tests/turtle/test-33.ttl0000644000175000017500000000007511331137720014521 00000000000000@prefix : . :s :p1 """test-\\""" . raptor2-2.0.15/tests/turtle/test-22.out0000644000175000017500000000045010711544516014526 00000000000000 "-1.0"^^ . "-1"^^ . "-1.0e0"^^ . raptor2-2.0.15/tests/turtle/README.txt0000644000175000017500000000104510360131566014271 00000000000000These are the tests for the Turtle Terse RDF Triple Language that must be passed by conformant systems. See http://www.dajobe.org/2004/01/turtle/ for the full conformance information. The format is a set of good tests and bad tests. Good tests are a pair of files: abc.ttl abc.out which are the input Turtle file and the expected output RDF triples, written in N-Triples. bad tests are of the form bad-XX.ttl which must fail. The tests should be performed with an assumed base URI of http://www.w3.org/2001/sw/DataAccess/df1/tests/ Dave raptor2-2.0.15/tests/turtle/test-10.ttl0000644000175000017500000000044710674751730014533 00000000000000 000000 . 0 . 000001 . 2 . 4 . raptor2-2.0.15/tests/turtle/test-25.out0000644000175000017500000000100610674751730014535 00000000000000 . . . . . . . raptor2-2.0.15/tests/turtle/test-32.ttl0000644000175000017500000000032711176653104014526 00000000000000@prefix rdf: . @prefix ex: . # Based on Issue#0000274 http://bugs.librdf.org/mantis/view.php?id=274 ex:node1 rdf:value ( ex:item1 ex:item2 ) . raptor2-2.0.15/tests/turtle/test-12.ttl0000644000175000017500000000044010674751730014526 00000000000000# Tests for rdf:_ and other qnames starting with _ @prefix rdf: . @prefix ex: . @prefix : . ex:foo rdf:_1 "1" . ex:foo rdf:_2 "2" . ex:foo :_abc "def" . ex:foo :_345 "678" . raptor2-2.0.15/tests/turtle/bad-21.out0000644000175000017500000000000012112703616014256 00000000000000raptor2-2.0.15/tests/turtle/test-26.out0000644000175000017500000000011210674751730014533 00000000000000 . raptor2-2.0.15/tests/turtle/rdfq-results.ttl0000644000175000017500000000232410674751730015765 00000000000000# from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html @prefix rdf: . @prefix rs: . <> rdf:type rs:ResultSet ; rs:size 4 ; rs:resultVariable "x" ; rs:resultVariable "y" ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value 123 ] ; rs:binding [ rs:variable "y" ; rs:value ] ] ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value "2003-01-21" ] ; rs:binding [ rs:variable "y" ; rs:value ] ] ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value "anon1" ] ; rs:binding [ rs:variable "y" ; rs:value _:a ] ] ; rs:solution [ rdf:type rs:ResultSolution ; rs:binding [ rs:variable "x" ; rs:value "anon2" ] ; rs:binding [ rs:variable "y" ; rs:value _:a ] ] ; . raptor2-2.0.15/tests/turtle/test-23.out0000644000175000017500000000012410674751730014533 00000000000000 "John said: \"Hello World!\"" . raptor2-2.0.15/tests/turtle/test-06.ttl0000644000175000017500000000012310674751730014527 00000000000000# 'a' only allowed as a predicate @prefix : . :a a :b . raptor2-2.0.15/tests/turtle/bad-03.ttl0000644000175000017500000000012310674751730014273 00000000000000# 'a' only allowed as a predicate @prefix : . a :a :b . raptor2-2.0.15/tests/turtle/test-17.ttl0000644000175000017500000000014610674751730014536 00000000000000# Test long literal @prefix : . :a :b """a long literal with newlines""" . raptor2-2.0.15/tests/turtle/test-28.out0000644000175000017500000000450010674751730014542 00000000000000 "2.345"^^ . "1.0"^^ . "1.0"^^ . "1.0"^^ . "1.0"^^ . "2.30"^^ . "2.234000005"^^ . "2.2340000005"^^ . "2.23400000005"^^ . "2.234000000005"^^ . "2.2340000000005"^^ . "2.23400000000005"^^ . "2.234000000000005"^^ . "2.2340000000000005"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "2.234"^^ . "1.2345678901234567"^^ . raptor2-2.0.15/tests/turtle/manifest.ttl0000644000175000017500000001727412046577174015155 00000000000000@prefix rdf: . @prefix rdfs: . @prefix mf: . @prefix qt: . <> rdf:type mf:Manifest ; rdfs:comment "Turtle good syntax test cases (must pass)" ; mf:entries ( [ mf:name "test-00" ; rdfs:comment "Blank subject" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-01" ; rdfs:comment "@prefix and qnames" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-02" ; rdfs:comment ", operator" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-03" ; rdfs:comment "; operator" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-04" ; rdfs:comment "empty [] as subject and object" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-05" ; rdfs:comment "non-empty [] as subject and object" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-06" ; rdfs:comment "'a' as predicate" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-07" ; rdfs:comment "simple collection" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-08" ; rdfs:comment "empty collection" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-09" ; rdfs:comment "integer datatyped literal" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-10" ; rdfs:comment "decimal integer canonicalization" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-11" ; rdfs:comment "- and _ in names and qnames" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-12" ; rdfs:comment "tests for rdf:_ and other qnames starting with _" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-13" ; rdfs:comment "bare : allowed" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-14" ; rdfs:comment "10000 triples, more than the default Bison stack size" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-15" ; rdfs:comment "10000 triple objects (10000 triples)" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-16" ; rdfs:comment "10000 items (10000 triples)" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-17" ; rdfs:comment "simple long literal" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-18" ; rdfs:comment "long literals with escapes" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-19" ; rdfs:comment "floating point number" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-20" ; rdfs:comment "empty literals, normal and long variant" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-21" ; rdfs:comment "positive integer, decimal and doubles" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-22" ; rdfs:comment "negative integer, decimal and doubles" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-23" ; rdfs:comment "long literal ending in double quote" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-24" ; rdfs:comment "boolean literals" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-25" ; rdfs:comment "comments" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-26" ; rdfs:comment "no final mewline" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-27" ; rdfs:comment "duplicate prefix" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-28" ; rdfs:comment "decimal data types (serializing test)" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-29" ; rdfs:comment "Escaping U+0001 to U+007F in a URI" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-30" ; rdfs:comment "@base" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-31" ; rdfs:comment "RSS test" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-32" ; rdfs:comment "RDF Value" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-33" ; rdfs:comment "Long literal ending in escaped slash" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-34" ; rdfs:comment "URI ending in period character" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-35" ; rdfs:comment "XMLLiteral with lang tag" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-36" ; rdfs:comment "Test long literal twice to ensure it does not over-quote" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-37" ; rdfs:comment "Test long literal with lang tag" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "test-38" ; rdfs:comment "Unicode surrogates in literal" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "rdf-schema" ; rdfs:comment "RDF Namespace document converted into Turtle" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "rdfs-namespace" ; rdfs:comment "RDFS Namespace document converted into Turtle" ; mf:action [ qt:data ] ; mf:result ] [ mf:name "rdfq-results" ; rdfs:comment "Example query result from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html" ; mf:action [ qt:data ] ; mf:result ] # End of tests ). raptor2-2.0.15/tests/turtle/test-37.ttl0000644000175000017500000000014311526311642014524 00000000000000# Test long literal with lang tag @prefix : . :a :b """Cheers"""@en-UK . raptor2-2.0.15/tests/turtle/test-34-out.ttl0000644000175000017500000000043211331137720015324 00000000000000@base . @prefix rdf: <../../../../../1999/02/22-rdf-syntax-ns#> . @prefix dbpedia: . . raptor2-2.0.15/tests/turtle/test-01.out0000644000175000017500000000041310674751730014530 00000000000000 . . . raptor2-2.0.15/tests/turtle/test-33.out0000644000175000017500000000010111331137720014513 00000000000000 "test-\\" . raptor2-2.0.15/tests/turtle/bad-05.ttl0000644000175000017500000000013710674751730014302 00000000000000# N3 {}s are not in Turtle @prefix : . { :a :b :c . } :d :e . raptor2-2.0.15/tests/turtle/bad-14.ttl0000644000175000017500000000016310674751730014301 00000000000000# Test long literals with missing end @prefix : . :a :b """a long literal with newlines raptor2-2.0.15/tests/turtle/bad-13.ttl0000644000175000017500000000011510674751730014275 00000000000000# <= is not in turtle @prefix : . :a <= :b . raptor2-2.0.15/tests/turtle/test-16.ttl0000644000175000017500000041737110674751730014551 00000000000000# 10000 items (10000 triples) more than the default Bison stack size @prefix : . :a :b :c1; :b :c2; :b :c3; :b :c4; :b :c5; :b :c6; :b :c7; :b :c8; :b :c9; :b :c10; :b :c11; :b :c12; :b :c13; :b :c14; :b :c15; :b :c16; :b :c17; :b :c18; :b :c19; :b :c20; :b :c21; :b :c22; :b :c23; :b :c24; :b :c25; :b :c26; :b :c27; :b :c28; :b :c29; :b :c30; :b :c31; :b :c32; :b :c33; :b :c34; :b :c35; :b :c36; :b :c37; :b :c38; :b :c39; :b :c40; :b :c41; :b :c42; :b :c43; :b :c44; :b :c45; :b :c46; :b :c47; :b :c48; :b :c49; :b :c50; :b :c51; :b :c52; :b :c53; :b :c54; :b :c55; :b :c56; :b :c57; :b :c58; :b :c59; :b :c60; :b :c61; :b :c62; :b :c63; :b :c64; :b :c65; :b :c66; :b :c67; :b :c68; :b :c69; :b :c70; :b :c71; :b :c72; :b :c73; :b :c74; :b :c75; :b :c76; :b :c77; :b :c78; :b :c79; :b :c80; :b :c81; :b :c82; :b :c83; :b :c84; :b :c85; :b :c86; :b :c87; :b :c88; :b :c89; :b :c90; :b :c91; :b :c92; :b :c93; :b :c94; :b :c95; :b :c96; :b :c97; :b :c98; :b :c99; :b :c100; :b :c101; :b :c102; :b :c103; :b :c104; :b :c105; :b :c106; :b :c107; :b :c108; :b :c109; :b :c110; :b :c111; :b :c112; :b :c113; :b :c114; :b :c115; :b :c116; :b :c117; :b :c118; :b :c119; :b :c120; :b :c121; :b :c122; :b :c123; :b :c124; :b :c125; :b :c126; :b :c127; :b :c128; :b :c129; :b :c130; :b :c131; :b :c132; :b :c133; :b :c134; :b :c135; :b :c136; :b :c137; :b :c138; :b :c139; :b :c140; :b :c141; :b :c142; :b :c143; :b :c144; :b :c145; :b :c146; :b :c147; :b :c148; :b :c149; :b :c150; :b :c151; :b :c152; :b :c153; :b :c154; :b :c155; :b :c156; :b :c157; :b :c158; :b :c159; :b :c160; :b :c161; :b :c162; :b :c163; :b :c164; :b :c165; :b :c166; :b :c167; :b :c168; :b :c169; :b :c170; :b :c171; :b :c172; :b :c173; :b :c174; :b :c175; :b :c176; :b :c177; :b :c178; :b :c179; :b :c180; :b :c181; :b :c182; :b :c183; :b :c184; :b :c185; :b :c186; :b :c187; :b :c188; :b :c189; :b :c190; :b :c191; :b :c192; :b :c193; :b :c194; :b :c195; :b :c196; :b :c197; :b :c198; :b :c199; :b :c200; :b :c201; :b :c202; :b :c203; :b :c204; :b :c205; :b :c206; :b :c207; :b :c208; :b :c209; :b :c210; :b :c211; :b :c212; :b :c213; :b :c214; :b :c215; :b :c216; :b :c217; :b :c218; :b :c219; :b :c220; :b :c221; :b :c222; :b :c223; :b :c224; :b :c225; :b :c226; :b :c227; :b :c228; :b :c229; :b :c230; :b :c231; :b :c232; :b :c233; :b :c234; :b :c235; :b :c236; :b :c237; :b :c238; :b :c239; :b :c240; :b :c241; :b :c242; :b :c243; :b :c244; :b :c245; :b :c246; :b :c247; :b :c248; :b :c249; :b :c250; :b :c251; :b :c252; :b :c253; :b :c254; :b :c255; :b :c256; :b :c257; :b :c258; :b :c259; :b :c260; :b :c261; :b :c262; :b :c263; :b :c264; :b :c265; :b :c266; :b :c267; :b :c268; :b :c269; :b :c270; :b :c271; :b :c272; :b :c273; :b :c274; :b :c275; :b :c276; :b :c277; :b :c278; :b :c279; :b :c280; :b :c281; :b :c282; :b :c283; :b :c284; :b :c285; :b :c286; :b :c287; :b :c288; :b :c289; :b :c290; :b :c291; :b :c292; :b :c293; :b :c294; :b :c295; :b :c296; :b :c297; :b :c298; :b :c299; :b :c300; :b :c301; :b :c302; :b :c303; :b :c304; :b :c305; :b :c306; :b :c307; :b :c308; :b :c309; :b :c310; :b :c311; :b :c312; :b :c313; :b :c314; :b :c315; :b :c316; :b :c317; :b :c318; :b :c319; :b :c320; :b :c321; :b :c322; :b :c323; :b :c324; :b :c325; :b :c326; :b :c327; :b :c328; :b :c329; :b :c330; :b :c331; :b :c332; :b :c333; :b :c334; :b :c335; :b :c336; :b :c337; :b :c338; :b :c339; :b :c340; :b :c341; :b :c342; :b :c343; :b :c344; :b :c345; :b :c346; :b :c347; :b :c348; :b :c349; :b :c350; :b :c351; :b :c352; :b :c353; :b :c354; :b :c355; :b :c356; :b :c357; :b :c358; :b :c359; :b :c360; :b :c361; :b :c362; :b :c363; :b :c364; :b :c365; :b :c366; :b :c367; :b :c368; :b :c369; :b :c370; :b :c371; :b :c372; :b :c373; :b :c374; :b :c375; :b :c376; :b :c377; :b :c378; :b :c379; :b :c380; :b :c381; :b :c382; :b :c383; :b :c384; :b :c385; :b :c386; :b :c387; :b :c388; :b :c389; :b :c390; :b :c391; :b :c392; :b :c393; :b :c394; :b :c395; :b :c396; :b :c397; :b :c398; :b :c399; :b :c400; :b :c401; :b :c402; :b :c403; :b :c404; :b :c405; :b :c406; :b :c407; :b :c408; :b :c409; :b :c410; :b :c411; :b :c412; :b :c413; :b :c414; :b :c415; :b :c416; :b :c417; :b :c418; :b :c419; :b :c420; :b :c421; :b :c422; :b :c423; :b :c424; :b :c425; :b :c426; :b :c427; :b :c428; :b :c429; :b :c430; :b :c431; :b :c432; :b :c433; :b :c434; :b :c435; :b :c436; :b :c437; :b :c438; :b :c439; :b :c440; :b :c441; :b :c442; :b :c443; :b :c444; :b :c445; :b :c446; :b :c447; :b :c448; :b :c449; :b :c450; :b :c451; :b :c452; :b :c453; :b :c454; :b :c455; :b :c456; :b :c457; :b :c458; :b :c459; :b :c460; :b :c461; :b :c462; :b :c463; :b :c464; :b :c465; :b :c466; :b :c467; :b :c468; :b :c469; :b :c470; :b :c471; :b :c472; :b :c473; :b :c474; :b :c475; :b :c476; :b :c477; :b :c478; :b :c479; :b :c480; :b :c481; :b :c482; :b :c483; :b :c484; :b :c485; :b :c486; :b :c487; :b :c488; :b :c489; :b :c490; :b :c491; :b :c492; :b :c493; :b :c494; :b :c495; :b :c496; :b :c497; :b :c498; :b :c499; :b :c500; :b :c501; :b :c502; :b :c503; :b :c504; :b :c505; :b :c506; :b :c507; :b :c508; :b :c509; :b :c510; :b :c511; :b :c512; :b :c513; :b :c514; :b :c515; :b :c516; :b :c517; :b :c518; :b :c519; :b :c520; :b :c521; :b :c522; :b :c523; :b :c524; :b :c525; :b :c526; :b :c527; :b :c528; :b :c529; :b :c530; :b :c531; :b :c532; :b :c533; :b :c534; :b :c535; :b :c536; :b :c537; :b :c538; :b :c539; :b :c540; :b :c541; :b :c542; :b :c543; :b :c544; :b :c545; :b :c546; :b :c547; :b :c548; :b :c549; :b :c550; :b :c551; :b :c552; :b :c553; :b :c554; :b :c555; :b :c556; :b :c557; :b :c558; :b :c559; :b :c560; :b :c561; :b :c562; :b :c563; :b :c564; :b :c565; :b :c566; :b :c567; :b :c568; :b :c569; :b :c570; :b :c571; :b :c572; :b :c573; :b :c574; :b :c575; :b :c576; :b :c577; :b :c578; :b :c579; :b :c580; :b :c581; :b :c582; :b :c583; :b :c584; :b :c585; :b :c586; :b :c587; :b :c588; :b :c589; :b :c590; :b :c591; :b :c592; :b :c593; :b :c594; :b :c595; :b :c596; :b :c597; :b :c598; :b :c599; :b :c600; :b :c601; :b :c602; :b :c603; :b :c604; :b :c605; :b :c606; :b :c607; :b :c608; :b :c609; :b :c610; :b :c611; :b :c612; :b :c613; :b :c614; :b :c615; :b :c616; :b :c617; :b :c618; :b :c619; :b :c620; :b :c621; :b :c622; :b :c623; :b :c624; :b :c625; :b :c626; :b :c627; :b :c628; :b :c629; :b :c630; :b :c631; :b :c632; :b :c633; :b :c634; :b :c635; :b :c636; :b :c637; :b :c638; :b :c639; :b :c640; :b :c641; :b :c642; :b :c643; :b :c644; :b :c645; :b :c646; :b :c647; :b :c648; :b :c649; :b :c650; :b :c651; :b :c652; :b :c653; :b :c654; :b :c655; :b :c656; :b :c657; :b :c658; :b :c659; :b :c660; :b :c661; :b :c662; :b :c663; :b :c664; :b :c665; :b :c666; :b :c667; :b :c668; :b :c669; :b :c670; :b :c671; :b :c672; :b :c673; :b :c674; :b :c675; :b :c676; :b :c677; :b :c678; :b :c679; :b :c680; :b :c681; :b :c682; :b :c683; :b :c684; :b :c685; :b :c686; :b :c687; :b :c688; :b :c689; :b :c690; :b :c691; :b :c692; :b :c693; :b :c694; :b :c695; :b :c696; :b :c697; :b :c698; :b :c699; :b :c700; :b :c701; :b :c702; :b :c703; :b :c704; :b :c705; :b :c706; :b :c707; :b :c708; :b :c709; :b :c710; :b :c711; :b :c712; :b :c713; :b :c714; :b :c715; :b :c716; :b :c717; :b :c718; :b :c719; :b :c720; :b :c721; :b :c722; :b :c723; :b :c724; :b :c725; :b :c726; :b :c727; :b :c728; :b :c729; :b :c730; :b :c731; :b :c732; :b :c733; :b :c734; :b :c735; :b :c736; :b :c737; :b :c738; :b :c739; :b :c740; :b :c741; :b :c742; :b :c743; :b :c744; :b :c745; :b :c746; :b :c747; :b :c748; :b :c749; :b :c750; :b :c751; :b :c752; :b :c753; :b :c754; :b :c755; :b :c756; :b :c757; :b :c758; :b :c759; :b :c760; :b :c761; :b :c762; :b :c763; :b :c764; :b :c765; :b :c766; :b :c767; :b :c768; :b :c769; :b :c770; :b :c771; :b :c772; :b :c773; :b :c774; :b :c775; :b :c776; :b :c777; :b :c778; :b :c779; :b :c780; :b :c781; :b :c782; :b :c783; :b :c784; :b :c785; :b :c786; :b :c787; :b :c788; :b :c789; :b :c790; :b :c791; :b :c792; :b :c793; :b :c794; :b :c795; :b :c796; :b :c797; :b :c798; :b :c799; :b :c800; :b :c801; :b :c802; :b :c803; :b :c804; :b :c805; :b :c806; :b :c807; :b :c808; :b :c809; :b :c810; :b :c811; :b :c812; :b :c813; :b :c814; :b :c815; :b :c816; :b :c817; :b :c818; :b :c819; :b :c820; :b :c821; :b :c822; :b :c823; :b :c824; :b :c825; :b :c826; :b :c827; :b :c828; :b :c829; :b :c830; :b :c831; :b :c832; :b :c833; :b :c834; :b :c835; :b :c836; :b :c837; :b :c838; :b :c839; :b :c840; :b :c841; :b :c842; :b :c843; :b :c844; :b :c845; :b :c846; :b :c847; :b :c848; :b :c849; :b :c850; :b :c851; :b :c852; :b :c853; :b :c854; :b :c855; :b :c856; :b :c857; :b :c858; :b :c859; :b :c860; :b :c861; :b :c862; :b :c863; :b :c864; :b :c865; :b :c866; :b :c867; :b :c868; :b :c869; :b :c870; :b :c871; :b :c872; :b :c873; :b :c874; :b :c875; :b :c876; :b :c877; :b :c878; :b :c879; :b :c880; :b :c881; :b :c882; :b :c883; :b :c884; :b :c885; :b :c886; :b :c887; :b :c888; :b :c889; :b :c890; :b :c891; :b :c892; :b :c893; :b :c894; :b :c895; :b :c896; :b :c897; :b :c898; :b :c899; :b :c900; :b :c901; :b :c902; :b :c903; :b :c904; :b :c905; :b :c906; :b :c907; :b :c908; :b :c909; :b :c910; :b :c911; :b :c912; :b :c913; :b :c914; :b :c915; :b :c916; :b :c917; :b :c918; :b :c919; :b :c920; :b :c921; :b :c922; :b :c923; :b :c924; :b :c925; :b :c926; :b :c927; :b :c928; :b :c929; :b :c930; :b :c931; :b :c932; :b :c933; :b :c934; :b :c935; :b :c936; :b :c937; :b :c938; :b :c939; :b :c940; :b :c941; :b :c942; :b :c943; :b :c944; :b :c945; :b :c946; :b :c947; :b :c948; :b :c949; :b :c950; :b :c951; :b :c952; :b :c953; :b :c954; :b :c955; :b :c956; :b :c957; :b :c958; :b :c959; :b :c960; :b :c961; :b :c962; :b :c963; :b :c964; :b :c965; :b :c966; :b :c967; :b :c968; :b :c969; :b :c970; :b :c971; :b :c972; :b :c973; :b :c974; :b :c975; :b :c976; :b :c977; :b :c978; :b :c979; :b :c980; :b :c981; :b :c982; :b :c983; :b :c984; :b :c985; :b :c986; :b :c987; :b :c988; :b :c989; :b :c990; :b :c991; :b :c992; :b :c993; :b :c994; :b :c995; :b :c996; :b :c997; :b :c998; :b :c999; :b :c1000; :b :c1001; :b :c1002; :b :c1003; :b :c1004; :b :c1005; :b :c1006; :b :c1007; :b :c1008; :b :c1009; :b :c1010; :b :c1011; :b :c1012; :b :c1013; :b :c1014; :b :c1015; :b :c1016; :b :c1017; :b :c1018; :b :c1019; :b :c1020; :b :c1021; :b :c1022; :b :c1023; :b :c1024; :b :c1025; :b :c1026; :b :c1027; :b :c1028; :b :c1029; :b :c1030; :b :c1031; :b :c1032; :b :c1033; :b :c1034; :b :c1035; :b :c1036; :b :c1037; :b :c1038; :b :c1039; :b :c1040; :b :c1041; :b :c1042; :b :c1043; :b :c1044; :b :c1045; :b :c1046; :b :c1047; :b :c1048; :b :c1049; :b :c1050; :b :c1051; :b :c1052; :b :c1053; :b :c1054; :b :c1055; :b :c1056; :b :c1057; :b :c1058; :b :c1059; :b :c1060; :b :c1061; :b :c1062; :b :c1063; :b :c1064; :b :c1065; :b :c1066; :b :c1067; :b :c1068; :b :c1069; :b :c1070; :b :c1071; :b :c1072; :b :c1073; :b :c1074; :b :c1075; :b :c1076; :b :c1077; :b :c1078; :b :c1079; :b :c1080; :b :c1081; :b :c1082; :b :c1083; :b :c1084; :b :c1085; :b :c1086; :b :c1087; :b :c1088; :b :c1089; :b :c1090; :b :c1091; :b :c1092; :b :c1093; :b :c1094; :b :c1095; :b :c1096; :b :c1097; :b :c1098; :b :c1099; :b :c1100; :b :c1101; :b :c1102; :b :c1103; :b :c1104; :b :c1105; :b :c1106; :b :c1107; :b :c1108; :b :c1109; :b :c1110; :b :c1111; :b :c1112; :b :c1113; :b :c1114; :b :c1115; :b :c1116; :b :c1117; :b :c1118; :b :c1119; :b :c1120; :b :c1121; :b :c1122; :b :c1123; :b :c1124; :b :c1125; :b :c1126; :b :c1127; :b :c1128; :b :c1129; :b :c1130; :b :c1131; :b :c1132; :b :c1133; :b :c1134; :b :c1135; :b :c1136; :b :c1137; :b :c1138; :b :c1139; :b :c1140; :b :c1141; :b :c1142; :b :c1143; :b :c1144; :b :c1145; :b :c1146; :b :c1147; :b :c1148; :b :c1149; :b :c1150; :b :c1151; :b :c1152; :b :c1153; :b :c1154; :b :c1155; :b :c1156; :b :c1157; :b :c1158; :b :c1159; :b :c1160; :b :c1161; :b :c1162; :b :c1163; :b :c1164; :b :c1165; :b :c1166; :b :c1167; :b :c1168; :b :c1169; :b :c1170; :b :c1171; :b :c1172; :b :c1173; :b :c1174; :b :c1175; :b :c1176; :b :c1177; :b :c1178; :b :c1179; :b :c1180; :b :c1181; :b :c1182; :b :c1183; :b :c1184; :b :c1185; :b :c1186; :b :c1187; :b :c1188; :b :c1189; :b :c1190; :b :c1191; :b :c1192; :b :c1193; :b :c1194; :b :c1195; :b :c1196; :b :c1197; :b :c1198; :b :c1199; :b :c1200; :b :c1201; :b :c1202; :b :c1203; :b :c1204; :b :c1205; :b :c1206; :b :c1207; :b :c1208; :b :c1209; :b :c1210; :b :c1211; :b :c1212; :b :c1213; :b :c1214; :b :c1215; :b :c1216; :b :c1217; :b :c1218; :b :c1219; :b :c1220; :b :c1221; :b :c1222; :b :c1223; :b :c1224; :b :c1225; :b :c1226; :b :c1227; :b :c1228; :b :c1229; :b :c1230; :b :c1231; :b :c1232; :b :c1233; :b :c1234; :b :c1235; :b :c1236; :b :c1237; :b :c1238; :b :c1239; :b :c1240; :b :c1241; :b :c1242; :b :c1243; :b :c1244; :b :c1245; :b :c1246; :b :c1247; :b :c1248; :b :c1249; :b :c1250; :b :c1251; :b :c1252; :b :c1253; :b :c1254; :b :c1255; :b :c1256; :b :c1257; :b :c1258; :b :c1259; :b :c1260; :b :c1261; :b :c1262; :b :c1263; :b :c1264; :b :c1265; :b :c1266; :b :c1267; :b :c1268; :b :c1269; :b :c1270; :b :c1271; :b :c1272; :b :c1273; :b :c1274; :b :c1275; :b :c1276; :b :c1277; :b :c1278; :b :c1279; :b :c1280; :b :c1281; :b :c1282; :b :c1283; :b :c1284; :b :c1285; :b :c1286; :b :c1287; :b :c1288; :b :c1289; :b :c1290; :b :c1291; :b :c1292; :b :c1293; :b :c1294; :b :c1295; :b :c1296; :b :c1297; :b :c1298; :b :c1299; :b :c1300; :b :c1301; :b :c1302; :b :c1303; :b :c1304; :b :c1305; :b :c1306; :b :c1307; :b :c1308; :b :c1309; :b :c1310; :b :c1311; :b :c1312; :b :c1313; :b :c1314; :b :c1315; :b :c1316; :b :c1317; :b :c1318; :b :c1319; :b :c1320; :b :c1321; :b :c1322; :b :c1323; :b :c1324; :b :c1325; :b :c1326; :b :c1327; :b :c1328; :b :c1329; :b :c1330; :b :c1331; :b :c1332; :b :c1333; :b :c1334; :b :c1335; :b :c1336; :b :c1337; :b :c1338; :b :c1339; :b :c1340; :b :c1341; :b :c1342; :b :c1343; :b :c1344; :b :c1345; :b :c1346; :b :c1347; :b :c1348; :b :c1349; :b :c1350; :b :c1351; :b :c1352; :b :c1353; :b :c1354; :b :c1355; :b :c1356; :b :c1357; :b :c1358; :b :c1359; :b :c1360; :b :c1361; :b :c1362; :b :c1363; :b :c1364; :b :c1365; :b :c1366; :b :c1367; :b :c1368; :b :c1369; :b :c1370; :b :c1371; :b :c1372; :b :c1373; :b :c1374; :b :c1375; :b :c1376; :b :c1377; :b :c1378; :b :c1379; :b :c1380; :b :c1381; :b :c1382; :b :c1383; :b :c1384; :b :c1385; :b :c1386; :b :c1387; :b :c1388; :b :c1389; :b :c1390; :b :c1391; :b :c1392; :b :c1393; :b :c1394; :b :c1395; :b :c1396; :b :c1397; :b :c1398; :b :c1399; :b :c1400; :b :c1401; :b :c1402; :b :c1403; :b :c1404; :b :c1405; :b :c1406; :b :c1407; :b :c1408; :b :c1409; :b :c1410; :b :c1411; :b :c1412; :b :c1413; :b :c1414; :b :c1415; :b :c1416; :b :c1417; :b :c1418; :b :c1419; :b :c1420; :b :c1421; :b :c1422; :b :c1423; :b :c1424; :b :c1425; :b :c1426; :b :c1427; :b :c1428; :b :c1429; :b :c1430; :b :c1431; :b :c1432; :b :c1433; :b :c1434; :b :c1435; :b :c1436; :b :c1437; :b :c1438; :b :c1439; :b :c1440; :b :c1441; :b :c1442; :b :c1443; :b :c1444; :b :c1445; :b :c1446; :b :c1447; :b :c1448; :b :c1449; :b :c1450; :b :c1451; :b :c1452; :b :c1453; :b :c1454; :b :c1455; :b :c1456; :b :c1457; :b :c1458; :b :c1459; :b :c1460; :b :c1461; :b :c1462; :b :c1463; :b :c1464; :b :c1465; :b :c1466; :b :c1467; :b :c1468; :b :c1469; :b :c1470; :b :c1471; :b :c1472; :b :c1473; :b :c1474; :b :c1475; :b :c1476; :b :c1477; :b :c1478; :b :c1479; :b :c1480; :b :c1481; :b :c1482; :b :c1483; :b :c1484; :b :c1485; :b :c1486; :b :c1487; :b :c1488; :b :c1489; :b :c1490; :b :c1491; :b :c1492; :b :c1493; :b :c1494; :b :c1495; :b :c1496; :b :c1497; :b :c1498; :b :c1499; :b :c1500; :b :c1501; :b :c1502; :b :c1503; :b :c1504; :b :c1505; :b :c1506; :b :c1507; :b :c1508; :b :c1509; :b :c1510; :b :c1511; :b :c1512; :b :c1513; :b :c1514; :b :c1515; :b :c1516; :b :c1517; :b :c1518; :b :c1519; :b :c1520; :b :c1521; :b :c1522; :b :c1523; :b :c1524; :b :c1525; :b :c1526; :b :c1527; :b :c1528; :b :c1529; :b :c1530; :b :c1531; :b :c1532; :b :c1533; :b :c1534; :b :c1535; :b :c1536; :b :c1537; :b :c1538; :b :c1539; :b :c1540; :b :c1541; :b :c1542; :b :c1543; :b :c1544; :b :c1545; :b :c1546; :b :c1547; :b :c1548; :b :c1549; :b :c1550; :b :c1551; :b :c1552; :b :c1553; :b :c1554; :b :c1555; :b :c1556; :b :c1557; :b :c1558; :b :c1559; :b :c1560; :b :c1561; :b :c1562; :b :c1563; :b :c1564; :b :c1565; :b :c1566; :b :c1567; :b :c1568; :b :c1569; :b :c1570; :b :c1571; :b :c1572; :b :c1573; :b :c1574; :b :c1575; :b :c1576; :b :c1577; :b :c1578; :b :c1579; :b :c1580; :b :c1581; :b :c1582; :b :c1583; :b :c1584; :b :c1585; :b :c1586; :b :c1587; :b :c1588; :b :c1589; :b :c1590; :b :c1591; :b :c1592; :b :c1593; :b :c1594; :b :c1595; :b :c1596; :b :c1597; :b :c1598; :b :c1599; :b :c1600; :b :c1601; :b :c1602; :b :c1603; :b :c1604; :b :c1605; :b :c1606; :b :c1607; :b :c1608; :b :c1609; :b :c1610; :b :c1611; :b :c1612; :b :c1613; :b :c1614; :b :c1615; :b :c1616; :b :c1617; :b :c1618; :b :c1619; :b :c1620; :b :c1621; :b :c1622; :b :c1623; :b :c1624; :b :c1625; :b :c1626; :b :c1627; :b :c1628; :b :c1629; :b :c1630; :b :c1631; :b :c1632; :b :c1633; :b :c1634; :b :c1635; :b :c1636; :b :c1637; :b :c1638; :b :c1639; :b :c1640; :b :c1641; :b :c1642; :b :c1643; :b :c1644; :b :c1645; :b :c1646; :b :c1647; :b :c1648; :b :c1649; :b :c1650; :b :c1651; :b :c1652; :b :c1653; :b :c1654; :b :c1655; :b :c1656; :b :c1657; :b :c1658; :b :c1659; :b :c1660; :b :c1661; :b :c1662; :b :c1663; :b :c1664; :b :c1665; :b :c1666; :b :c1667; :b :c1668; :b :c1669; :b :c1670; :b :c1671; :b :c1672; :b :c1673; :b :c1674; :b :c1675; :b :c1676; :b :c1677; :b :c1678; :b :c1679; :b :c1680; :b :c1681; :b :c1682; :b :c1683; :b :c1684; :b :c1685; :b :c1686; :b :c1687; :b :c1688; :b :c1689; :b :c1690; :b :c1691; :b :c1692; :b :c1693; :b :c1694; :b :c1695; :b :c1696; :b :c1697; :b :c1698; :b :c1699; :b :c1700; :b :c1701; :b :c1702; :b :c1703; :b :c1704; :b :c1705; :b :c1706; :b :c1707; :b :c1708; :b :c1709; :b :c1710; :b :c1711; :b :c1712; :b :c1713; :b :c1714; :b :c1715; :b :c1716; :b :c1717; :b :c1718; :b :c1719; :b :c1720; :b :c1721; :b :c1722; :b :c1723; :b :c1724; :b :c1725; :b :c1726; :b :c1727; :b :c1728; :b :c1729; :b :c1730; :b :c1731; :b :c1732; :b :c1733; :b :c1734; :b :c1735; :b :c1736; :b :c1737; :b :c1738; :b :c1739; :b :c1740; :b :c1741; :b :c1742; :b :c1743; :b :c1744; :b :c1745; :b :c1746; :b :c1747; :b :c1748; :b :c1749; :b :c1750; :b :c1751; :b :c1752; :b :c1753; :b :c1754; :b :c1755; :b :c1756; :b :c1757; :b :c1758; :b :c1759; :b :c1760; :b :c1761; :b :c1762; :b :c1763; :b :c1764; :b :c1765; :b :c1766; :b :c1767; :b :c1768; :b :c1769; :b :c1770; :b :c1771; :b :c1772; :b :c1773; :b :c1774; :b :c1775; :b :c1776; :b :c1777; :b :c1778; :b :c1779; :b :c1780; :b :c1781; :b :c1782; :b :c1783; :b :c1784; :b :c1785; :b :c1786; :b :c1787; :b :c1788; :b :c1789; :b :c1790; :b :c1791; :b :c1792; :b :c1793; :b :c1794; :b :c1795; :b :c1796; :b :c1797; :b :c1798; :b :c1799; :b :c1800; :b :c1801; :b :c1802; :b :c1803; :b :c1804; :b :c1805; :b :c1806; :b :c1807; :b :c1808; :b :c1809; :b :c1810; :b :c1811; :b :c1812; :b :c1813; :b :c1814; :b :c1815; :b :c1816; :b :c1817; :b :c1818; :b :c1819; :b :c1820; :b :c1821; :b :c1822; :b :c1823; :b :c1824; :b :c1825; :b :c1826; :b :c1827; :b :c1828; :b :c1829; :b :c1830; :b :c1831; :b :c1832; :b :c1833; :b :c1834; :b :c1835; :b :c1836; :b :c1837; :b :c1838; :b :c1839; :b :c1840; :b :c1841; :b :c1842; :b :c1843; :b :c1844; :b :c1845; :b :c1846; :b :c1847; :b :c1848; :b :c1849; :b :c1850; :b :c1851; :b :c1852; :b :c1853; :b :c1854; :b :c1855; :b :c1856; :b :c1857; :b :c1858; :b :c1859; :b :c1860; :b :c1861; :b :c1862; :b :c1863; :b :c1864; :b :c1865; :b :c1866; :b :c1867; :b :c1868; :b :c1869; :b :c1870; :b :c1871; :b :c1872; :b :c1873; :b :c1874; :b :c1875; :b :c1876; :b :c1877; :b :c1878; :b :c1879; :b :c1880; :b :c1881; :b :c1882; :b :c1883; :b :c1884; :b :c1885; :b :c1886; :b :c1887; :b :c1888; :b :c1889; :b :c1890; :b :c1891; :b :c1892; :b :c1893; :b :c1894; :b :c1895; :b :c1896; :b :c1897; :b :c1898; :b :c1899; :b :c1900; :b :c1901; :b :c1902; :b :c1903; :b :c1904; :b :c1905; :b :c1906; :b :c1907; :b :c1908; :b :c1909; :b :c1910; :b :c1911; :b :c1912; :b :c1913; :b :c1914; :b :c1915; :b :c1916; :b :c1917; :b :c1918; :b :c1919; :b :c1920; :b :c1921; :b :c1922; :b :c1923; :b :c1924; :b :c1925; :b :c1926; :b :c1927; :b :c1928; :b :c1929; :b :c1930; :b :c1931; :b :c1932; :b :c1933; :b :c1934; :b :c1935; :b :c1936; :b :c1937; :b :c1938; :b :c1939; :b :c1940; :b :c1941; :b :c1942; :b :c1943; :b :c1944; :b :c1945; :b :c1946; :b :c1947; :b :c1948; :b :c1949; :b :c1950; :b :c1951; :b :c1952; :b :c1953; :b :c1954; :b :c1955; :b :c1956; :b :c1957; :b :c1958; :b :c1959; :b :c1960; :b :c1961; :b :c1962; :b :c1963; :b :c1964; :b :c1965; :b :c1966; :b :c1967; :b :c1968; :b :c1969; :b :c1970; :b :c1971; :b :c1972; :b :c1973; :b :c1974; :b :c1975; :b :c1976; :b :c1977; :b :c1978; :b :c1979; :b :c1980; :b :c1981; :b :c1982; :b :c1983; :b :c1984; :b :c1985; :b :c1986; :b :c1987; :b :c1988; :b :c1989; :b :c1990; :b :c1991; :b :c1992; :b :c1993; :b :c1994; :b :c1995; :b :c1996; :b :c1997; :b :c1998; :b :c1999; :b :c2000; :b :c2001; :b :c2002; :b :c2003; :b :c2004; :b :c2005; :b :c2006; :b :c2007; :b :c2008; :b :c2009; :b :c2010; :b :c2011; :b :c2012; :b :c2013; :b :c2014; :b :c2015; :b :c2016; :b :c2017; :b :c2018; :b :c2019; :b :c2020; :b :c2021; :b :c2022; :b :c2023; :b :c2024; :b :c2025; :b :c2026; :b :c2027; :b :c2028; :b :c2029; :b :c2030; :b :c2031; :b :c2032; :b :c2033; :b :c2034; :b :c2035; :b :c2036; :b :c2037; :b :c2038; :b :c2039; :b :c2040; :b :c2041; :b :c2042; :b :c2043; :b :c2044; :b :c2045; :b :c2046; :b :c2047; :b :c2048; :b :c2049; :b :c2050; :b :c2051; :b :c2052; :b :c2053; :b :c2054; :b :c2055; :b :c2056; :b :c2057; :b :c2058; :b :c2059; :b :c2060; :b :c2061; :b :c2062; :b :c2063; :b :c2064; :b :c2065; :b :c2066; :b :c2067; :b :c2068; :b :c2069; :b :c2070; :b :c2071; :b :c2072; :b :c2073; :b :c2074; :b :c2075; :b :c2076; :b :c2077; :b :c2078; :b :c2079; :b :c2080; :b :c2081; :b :c2082; :b :c2083; :b :c2084; :b :c2085; :b :c2086; :b :c2087; :b :c2088; :b :c2089; :b :c2090; :b :c2091; :b :c2092; :b :c2093; :b :c2094; :b :c2095; :b :c2096; :b :c2097; :b :c2098; :b :c2099; :b :c2100; :b :c2101; :b :c2102; :b :c2103; :b :c2104; :b :c2105; :b :c2106; :b :c2107; :b :c2108; :b :c2109; :b :c2110; :b :c2111; :b :c2112; :b :c2113; :b :c2114; :b :c2115; :b :c2116; :b :c2117; :b :c2118; :b :c2119; :b :c2120; :b :c2121; :b :c2122; :b :c2123; :b :c2124; :b :c2125; :b :c2126; :b :c2127; :b :c2128; :b :c2129; :b :c2130; :b :c2131; :b :c2132; :b :c2133; :b :c2134; :b :c2135; :b :c2136; :b :c2137; :b :c2138; :b :c2139; :b :c2140; :b :c2141; :b :c2142; :b :c2143; :b :c2144; :b :c2145; :b :c2146; :b :c2147; :b :c2148; :b :c2149; :b :c2150; :b :c2151; :b :c2152; :b :c2153; :b :c2154; :b :c2155; :b :c2156; :b :c2157; :b :c2158; :b :c2159; :b :c2160; :b :c2161; :b :c2162; :b :c2163; :b :c2164; :b :c2165; :b :c2166; :b :c2167; :b :c2168; :b :c2169; :b :c2170; :b :c2171; :b :c2172; :b :c2173; :b :c2174; :b :c2175; :b :c2176; :b :c2177; :b :c2178; :b :c2179; :b :c2180; :b :c2181; :b :c2182; :b :c2183; :b :c2184; :b :c2185; :b :c2186; :b :c2187; :b :c2188; :b :c2189; :b :c2190; :b :c2191; :b :c2192; :b :c2193; :b :c2194; :b :c2195; :b :c2196; :b :c2197; :b :c2198; :b :c2199; :b :c2200; :b :c2201; :b :c2202; :b :c2203; :b :c2204; :b :c2205; :b :c2206; :b :c2207; :b :c2208; :b :c2209; :b :c2210; :b :c2211; :b :c2212; :b :c2213; :b :c2214; :b :c2215; :b :c2216; :b :c2217; :b :c2218; :b :c2219; :b :c2220; :b :c2221; :b :c2222; :b :c2223; :b :c2224; :b :c2225; :b :c2226; :b :c2227; :b :c2228; :b :c2229; :b :c2230; :b :c2231; :b :c2232; :b :c2233; :b :c2234; :b :c2235; :b :c2236; :b :c2237; :b :c2238; :b :c2239; :b :c2240; :b :c2241; :b :c2242; :b :c2243; :b :c2244; :b :c2245; :b :c2246; :b :c2247; :b :c2248; :b :c2249; :b :c2250; :b :c2251; :b :c2252; :b :c2253; :b :c2254; :b :c2255; :b :c2256; :b :c2257; :b :c2258; :b :c2259; :b :c2260; :b :c2261; :b :c2262; :b :c2263; :b :c2264; :b :c2265; :b :c2266; :b :c2267; :b :c2268; :b :c2269; :b :c2270; :b :c2271; :b :c2272; :b :c2273; :b :c2274; :b :c2275; :b :c2276; :b :c2277; :b :c2278; :b :c2279; :b :c2280; :b :c2281; :b :c2282; :b :c2283; :b :c2284; :b :c2285; :b :c2286; :b :c2287; :b :c2288; :b :c2289; :b :c2290; :b :c2291; :b :c2292; :b :c2293; :b :c2294; :b :c2295; :b :c2296; :b :c2297; :b :c2298; :b :c2299; :b :c2300; :b :c2301; :b :c2302; :b :c2303; :b :c2304; :b :c2305; :b :c2306; :b :c2307; :b :c2308; :b :c2309; :b :c2310; :b :c2311; :b :c2312; :b :c2313; :b :c2314; :b :c2315; :b :c2316; :b :c2317; :b :c2318; :b :c2319; :b :c2320; :b :c2321; :b :c2322; :b :c2323; :b :c2324; :b :c2325; :b :c2326; :b :c2327; :b :c2328; :b :c2329; :b :c2330; :b :c2331; :b :c2332; :b :c2333; :b :c2334; :b :c2335; :b :c2336; :b :c2337; :b :c2338; :b :c2339; :b :c2340; :b :c2341; :b :c2342; :b :c2343; :b :c2344; :b :c2345; :b :c2346; :b :c2347; :b :c2348; :b :c2349; :b :c2350; :b :c2351; :b :c2352; :b :c2353; :b :c2354; :b :c2355; :b :c2356; :b :c2357; :b :c2358; :b :c2359; :b :c2360; :b :c2361; :b :c2362; :b :c2363; :b :c2364; :b :c2365; :b :c2366; :b :c2367; :b :c2368; :b :c2369; :b :c2370; :b :c2371; :b :c2372; :b :c2373; :b :c2374; :b :c2375; :b :c2376; :b :c2377; :b :c2378; :b :c2379; :b :c2380; :b :c2381; :b :c2382; :b :c2383; :b :c2384; :b :c2385; :b :c2386; :b :c2387; :b :c2388; :b :c2389; :b :c2390; :b :c2391; :b :c2392; :b :c2393; :b :c2394; :b :c2395; :b :c2396; :b :c2397; :b :c2398; :b :c2399; :b :c2400; :b :c2401; :b :c2402; :b :c2403; :b :c2404; :b :c2405; :b :c2406; :b :c2407; :b :c2408; :b :c2409; :b :c2410; :b :c2411; :b :c2412; :b :c2413; :b :c2414; :b :c2415; :b :c2416; :b :c2417; :b :c2418; :b :c2419; :b :c2420; :b :c2421; :b :c2422; :b :c2423; :b :c2424; :b :c2425; :b :c2426; :b :c2427; :b :c2428; :b :c2429; :b :c2430; :b :c2431; :b :c2432; :b :c2433; :b :c2434; :b :c2435; :b :c2436; :b :c2437; :b :c2438; :b :c2439; :b :c2440; :b :c2441; :b :c2442; :b :c2443; :b :c2444; :b :c2445; :b :c2446; :b :c2447; :b :c2448; :b :c2449; :b :c2450; :b :c2451; :b :c2452; :b :c2453; :b :c2454; :b :c2455; :b :c2456; :b :c2457; :b :c2458; :b :c2459; :b :c2460; :b :c2461; :b :c2462; :b :c2463; :b :c2464; :b :c2465; :b :c2466; :b :c2467; :b :c2468; :b :c2469; :b :c2470; :b :c2471; :b :c2472; :b :c2473; :b :c2474; :b :c2475; :b :c2476; :b :c2477; :b :c2478; :b :c2479; :b :c2480; :b :c2481; :b :c2482; :b :c2483; :b :c2484; :b :c2485; :b :c2486; :b :c2487; :b :c2488; :b :c2489; :b :c2490; :b :c2491; :b :c2492; :b :c2493; :b :c2494; :b :c2495; :b :c2496; :b :c2497; :b :c2498; :b :c2499; :b :c2500; :b :c2501; :b :c2502; :b :c2503; :b :c2504; :b :c2505; :b :c2506; :b :c2507; :b :c2508; :b :c2509; :b :c2510; :b :c2511; :b :c2512; :b :c2513; :b :c2514; :b :c2515; :b :c2516; :b :c2517; :b :c2518; :b :c2519; :b :c2520; :b :c2521; :b :c2522; :b :c2523; :b :c2524; :b :c2525; :b :c2526; :b :c2527; :b :c2528; :b :c2529; :b :c2530; :b :c2531; :b :c2532; :b :c2533; :b :c2534; :b :c2535; :b :c2536; :b :c2537; :b :c2538; :b :c2539; :b :c2540; :b :c2541; :b :c2542; :b :c2543; :b :c2544; :b :c2545; :b :c2546; :b :c2547; :b :c2548; :b :c2549; :b :c2550; :b :c2551; :b :c2552; :b :c2553; :b :c2554; :b :c2555; :b :c2556; :b :c2557; :b :c2558; :b :c2559; :b :c2560; :b :c2561; :b :c2562; :b :c2563; :b :c2564; :b :c2565; :b :c2566; :b :c2567; :b :c2568; :b :c2569; :b :c2570; :b :c2571; :b :c2572; :b :c2573; :b :c2574; :b :c2575; :b :c2576; :b :c2577; :b :c2578; :b :c2579; :b :c2580; :b :c2581; :b :c2582; :b :c2583; :b :c2584; :b :c2585; :b :c2586; :b :c2587; :b :c2588; :b :c2589; :b :c2590; :b :c2591; :b :c2592; :b :c2593; :b :c2594; :b :c2595; :b :c2596; :b :c2597; :b :c2598; :b :c2599; :b :c2600; :b :c2601; :b :c2602; :b :c2603; :b :c2604; :b :c2605; :b :c2606; :b :c2607; :b :c2608; :b :c2609; :b :c2610; :b :c2611; :b :c2612; :b :c2613; :b :c2614; :b :c2615; :b :c2616; :b :c2617; :b :c2618; :b :c2619; :b :c2620; :b :c2621; :b :c2622; :b :c2623; :b :c2624; :b :c2625; :b :c2626; :b :c2627; :b :c2628; :b :c2629; :b :c2630; :b :c2631; :b :c2632; :b :c2633; :b :c2634; :b :c2635; :b :c2636; :b :c2637; :b :c2638; :b :c2639; :b :c2640; :b :c2641; :b :c2642; :b :c2643; :b :c2644; :b :c2645; :b :c2646; :b :c2647; :b :c2648; :b :c2649; :b :c2650; :b :c2651; :b :c2652; :b :c2653; :b :c2654; :b :c2655; :b :c2656; :b :c2657; :b :c2658; :b :c2659; :b :c2660; :b :c2661; :b :c2662; :b :c2663; :b :c2664; :b :c2665; :b :c2666; :b :c2667; :b :c2668; :b :c2669; :b :c2670; :b :c2671; :b :c2672; :b :c2673; :b :c2674; :b :c2675; :b :c2676; :b :c2677; :b :c2678; :b :c2679; :b :c2680; :b :c2681; :b :c2682; :b :c2683; :b :c2684; :b :c2685; :b :c2686; :b :c2687; :b :c2688; :b :c2689; :b :c2690; :b :c2691; :b :c2692; :b :c2693; :b :c2694; :b :c2695; :b :c2696; :b :c2697; :b :c2698; :b :c2699; :b :c2700; :b :c2701; :b :c2702; :b :c2703; :b :c2704; :b :c2705; :b :c2706; :b :c2707; :b :c2708; :b :c2709; :b :c2710; :b :c2711; :b :c2712; :b :c2713; :b :c2714; :b :c2715; :b :c2716; :b :c2717; :b :c2718; :b :c2719; :b :c2720; :b :c2721; :b :c2722; :b :c2723; :b :c2724; :b :c2725; :b :c2726; :b :c2727; :b :c2728; :b :c2729; :b :c2730; :b :c2731; :b :c2732; :b :c2733; :b :c2734; :b :c2735; :b :c2736; :b :c2737; :b :c2738; :b :c2739; :b :c2740; :b :c2741; :b :c2742; :b :c2743; :b :c2744; :b :c2745; :b :c2746; :b :c2747; :b :c2748; :b :c2749; :b :c2750; :b :c2751; :b :c2752; :b :c2753; :b :c2754; :b :c2755; :b :c2756; :b :c2757; :b :c2758; :b :c2759; :b :c2760; :b :c2761; :b :c2762; :b :c2763; :b :c2764; :b :c2765; :b :c2766; :b :c2767; :b :c2768; :b :c2769; :b :c2770; :b :c2771; :b :c2772; :b :c2773; :b :c2774; :b :c2775; :b :c2776; :b :c2777; :b :c2778; :b :c2779; :b :c2780; :b :c2781; :b :c2782; :b :c2783; :b :c2784; :b :c2785; :b :c2786; :b :c2787; :b :c2788; :b :c2789; :b :c2790; :b :c2791; :b :c2792; :b :c2793; :b :c2794; :b :c2795; :b :c2796; :b :c2797; :b :c2798; :b :c2799; :b :c2800; :b :c2801; :b :c2802; :b :c2803; :b :c2804; :b :c2805; :b :c2806; :b :c2807; :b :c2808; :b :c2809; :b :c2810; :b :c2811; :b :c2812; :b :c2813; :b :c2814; :b :c2815; :b :c2816; :b :c2817; :b :c2818; :b :c2819; :b :c2820; :b :c2821; :b :c2822; :b :c2823; :b :c2824; :b :c2825; :b :c2826; :b :c2827; :b :c2828; :b :c2829; :b :c2830; :b :c2831; :b :c2832; :b :c2833; :b :c2834; :b :c2835; :b :c2836; :b :c2837; :b :c2838; :b :c2839; :b :c2840; :b :c2841; :b :c2842; :b :c2843; :b :c2844; :b :c2845; :b :c2846; :b :c2847; :b :c2848; :b :c2849; :b :c2850; :b :c2851; :b :c2852; :b :c2853; :b :c2854; :b :c2855; :b :c2856; :b :c2857; :b :c2858; :b :c2859; :b :c2860; :b :c2861; :b :c2862; :b :c2863; :b :c2864; :b :c2865; :b :c2866; :b :c2867; :b :c2868; :b :c2869; :b :c2870; :b :c2871; :b :c2872; :b :c2873; :b :c2874; :b :c2875; :b :c2876; :b :c2877; :b :c2878; :b :c2879; :b :c2880; :b :c2881; :b :c2882; :b :c2883; :b :c2884; :b :c2885; :b :c2886; :b :c2887; :b :c2888; :b :c2889; :b :c2890; :b :c2891; :b :c2892; :b :c2893; :b :c2894; :b :c2895; :b :c2896; :b :c2897; :b :c2898; :b :c2899; :b :c2900; :b :c2901; :b :c2902; :b :c2903; :b :c2904; :b :c2905; :b :c2906; :b :c2907; :b :c2908; :b :c2909; :b :c2910; :b :c2911; :b :c2912; :b :c2913; :b :c2914; :b :c2915; :b :c2916; :b :c2917; :b :c2918; :b :c2919; :b :c2920; :b :c2921; :b :c2922; :b :c2923; :b :c2924; :b :c2925; :b :c2926; :b :c2927; :b :c2928; :b :c2929; :b :c2930; :b :c2931; :b :c2932; :b :c2933; :b :c2934; :b :c2935; :b :c2936; :b :c2937; :b :c2938; :b :c2939; :b :c2940; :b :c2941; :b :c2942; :b :c2943; :b :c2944; :b :c2945; :b :c2946; :b :c2947; :b :c2948; :b :c2949; :b :c2950; :b :c2951; :b :c2952; :b :c2953; :b :c2954; :b :c2955; :b :c2956; :b :c2957; :b :c2958; :b :c2959; :b :c2960; :b :c2961; :b :c2962; :b :c2963; :b :c2964; :b :c2965; :b :c2966; :b :c2967; :b :c2968; :b :c2969; :b :c2970; :b :c2971; :b :c2972; :b :c2973; :b :c2974; :b :c2975; :b :c2976; :b :c2977; :b :c2978; :b :c2979; :b :c2980; :b :c2981; :b :c2982; :b :c2983; :b :c2984; :b :c2985; :b :c2986; :b :c2987; :b :c2988; :b :c2989; :b :c2990; :b :c2991; :b :c2992; :b :c2993; :b :c2994; :b :c2995; :b :c2996; :b :c2997; :b :c2998; :b :c2999; :b :c3000; :b :c3001; :b :c3002; :b :c3003; :b :c3004; :b :c3005; :b :c3006; :b :c3007; :b :c3008; :b :c3009; :b :c3010; :b :c3011; :b :c3012; :b :c3013; :b :c3014; :b :c3015; :b :c3016; :b :c3017; :b :c3018; :b :c3019; :b :c3020; :b :c3021; :b :c3022; :b :c3023; :b :c3024; :b :c3025; :b :c3026; :b :c3027; :b :c3028; :b :c3029; :b :c3030; :b :c3031; :b :c3032; :b :c3033; :b :c3034; :b :c3035; :b :c3036; :b :c3037; :b :c3038; :b :c3039; :b :c3040; :b :c3041; :b :c3042; :b :c3043; :b :c3044; :b :c3045; :b :c3046; :b :c3047; :b :c3048; :b :c3049; :b :c3050; :b :c3051; :b :c3052; :b :c3053; :b :c3054; :b :c3055; :b :c3056; :b :c3057; :b :c3058; :b :c3059; :b :c3060; :b :c3061; :b :c3062; :b :c3063; :b :c3064; :b :c3065; :b :c3066; :b :c3067; :b :c3068; :b :c3069; :b :c3070; :b :c3071; :b :c3072; :b :c3073; :b :c3074; :b :c3075; :b :c3076; :b :c3077; :b :c3078; :b :c3079; :b :c3080; :b :c3081; :b :c3082; :b :c3083; :b :c3084; :b :c3085; :b :c3086; :b :c3087; :b :c3088; :b :c3089; :b :c3090; :b :c3091; :b :c3092; :b :c3093; :b :c3094; :b :c3095; :b :c3096; :b :c3097; :b :c3098; :b :c3099; :b :c3100; :b :c3101; :b :c3102; :b :c3103; :b :c3104; :b :c3105; :b :c3106; :b :c3107; :b :c3108; :b :c3109; :b :c3110; :b :c3111; :b :c3112; :b :c3113; :b :c3114; :b :c3115; :b :c3116; :b :c3117; :b :c3118; :b :c3119; :b :c3120; :b :c3121; :b :c3122; :b :c3123; :b :c3124; :b :c3125; :b :c3126; :b :c3127; :b :c3128; :b :c3129; :b :c3130; :b :c3131; :b :c3132; :b :c3133; :b :c3134; :b :c3135; :b :c3136; :b :c3137; :b :c3138; :b :c3139; :b :c3140; :b :c3141; :b :c3142; :b :c3143; :b :c3144; :b :c3145; :b :c3146; :b :c3147; :b :c3148; :b :c3149; :b :c3150; :b :c3151; :b :c3152; :b :c3153; :b :c3154; :b :c3155; :b :c3156; :b :c3157; :b :c3158; :b :c3159; :b :c3160; :b :c3161; :b :c3162; :b :c3163; :b :c3164; :b :c3165; :b :c3166; :b :c3167; :b :c3168; :b :c3169; :b :c3170; :b :c3171; :b :c3172; :b :c3173; :b :c3174; :b :c3175; :b :c3176; :b :c3177; :b :c3178; :b :c3179; :b :c3180; :b :c3181; :b :c3182; :b :c3183; :b :c3184; :b :c3185; :b :c3186; :b :c3187; :b :c3188; :b :c3189; :b :c3190; :b :c3191; :b :c3192; :b :c3193; :b :c3194; :b :c3195; :b :c3196; :b :c3197; :b :c3198; :b :c3199; :b :c3200; :b :c3201; :b :c3202; :b :c3203; :b :c3204; :b :c3205; :b :c3206; :b :c3207; :b :c3208; :b :c3209; :b :c3210; :b :c3211; :b :c3212; :b :c3213; :b :c3214; :b :c3215; :b :c3216; :b :c3217; :b :c3218; :b :c3219; :b :c3220; :b :c3221; :b :c3222; :b :c3223; :b :c3224; :b :c3225; :b :c3226; :b :c3227; :b :c3228; :b :c3229; :b :c3230; :b :c3231; :b :c3232; :b :c3233; :b :c3234; :b :c3235; :b :c3236; :b :c3237; :b :c3238; :b :c3239; :b :c3240; :b :c3241; :b :c3242; :b :c3243; :b :c3244; :b :c3245; :b :c3246; :b :c3247; :b :c3248; :b :c3249; :b :c3250; :b :c3251; :b :c3252; :b :c3253; :b :c3254; :b :c3255; :b :c3256; :b :c3257; :b :c3258; :b :c3259; :b :c3260; :b :c3261; :b :c3262; :b :c3263; :b :c3264; :b :c3265; :b :c3266; :b :c3267; :b :c3268; :b :c3269; :b :c3270; :b :c3271; :b :c3272; :b :c3273; :b :c3274; :b :c3275; :b :c3276; :b :c3277; :b :c3278; :b :c3279; :b :c3280; :b :c3281; :b :c3282; :b :c3283; :b :c3284; :b :c3285; :b :c3286; :b :c3287; :b :c3288; :b :c3289; :b :c3290; :b :c3291; :b :c3292; :b :c3293; :b :c3294; :b :c3295; :b :c3296; :b :c3297; :b :c3298; :b :c3299; :b :c3300; :b :c3301; :b :c3302; :b :c3303; :b :c3304; :b :c3305; :b :c3306; :b :c3307; :b :c3308; :b :c3309; :b :c3310; :b :c3311; :b :c3312; :b :c3313; :b :c3314; :b :c3315; :b :c3316; :b :c3317; :b :c3318; :b :c3319; :b :c3320; :b :c3321; :b :c3322; :b :c3323; :b :c3324; :b :c3325; :b :c3326; :b :c3327; :b :c3328; :b :c3329; :b :c3330; :b :c3331; :b :c3332; :b :c3333; :b :c3334; :b :c3335; :b :c3336; :b :c3337; :b :c3338; :b :c3339; :b :c3340; :b :c3341; :b :c3342; :b :c3343; :b :c3344; :b :c3345; :b :c3346; :b :c3347; :b :c3348; :b :c3349; :b :c3350; :b :c3351; :b :c3352; :b :c3353; :b :c3354; :b :c3355; :b :c3356; :b :c3357; :b :c3358; :b :c3359; :b :c3360; :b :c3361; :b :c3362; :b :c3363; :b :c3364; :b :c3365; :b :c3366; :b :c3367; :b :c3368; :b :c3369; :b :c3370; :b :c3371; :b :c3372; :b :c3373; :b :c3374; :b :c3375; :b :c3376; :b :c3377; :b :c3378; :b :c3379; :b :c3380; :b :c3381; :b :c3382; :b :c3383; :b :c3384; :b :c3385; :b :c3386; :b :c3387; :b :c3388; :b :c3389; :b :c3390; :b :c3391; :b :c3392; :b :c3393; :b :c3394; :b :c3395; :b :c3396; :b :c3397; :b :c3398; :b :c3399; :b :c3400; :b :c3401; :b :c3402; :b :c3403; :b :c3404; :b :c3405; :b :c3406; :b :c3407; :b :c3408; :b :c3409; :b :c3410; :b :c3411; :b :c3412; :b :c3413; :b :c3414; :b :c3415; :b :c3416; :b :c3417; :b :c3418; :b :c3419; :b :c3420; :b :c3421; :b :c3422; :b :c3423; :b :c3424; :b :c3425; :b :c3426; :b :c3427; :b :c3428; :b :c3429; :b :c3430; :b :c3431; :b :c3432; :b :c3433; :b :c3434; :b :c3435; :b :c3436; :b :c3437; :b :c3438; :b :c3439; :b :c3440; :b :c3441; :b :c3442; :b :c3443; :b :c3444; :b :c3445; :b :c3446; :b :c3447; :b :c3448; :b :c3449; :b :c3450; :b :c3451; :b :c3452; :b :c3453; :b :c3454; :b :c3455; :b :c3456; :b :c3457; :b :c3458; :b :c3459; :b :c3460; :b :c3461; :b :c3462; :b :c3463; :b :c3464; :b :c3465; :b :c3466; :b :c3467; :b :c3468; :b :c3469; :b :c3470; :b :c3471; :b :c3472; :b :c3473; :b :c3474; :b :c3475; :b :c3476; :b :c3477; :b :c3478; :b :c3479; :b :c3480; :b :c3481; :b :c3482; :b :c3483; :b :c3484; :b :c3485; :b :c3486; :b :c3487; :b :c3488; :b :c3489; :b :c3490; :b :c3491; :b :c3492; :b :c3493; :b :c3494; :b :c3495; :b :c3496; :b :c3497; :b :c3498; :b :c3499; :b :c3500; :b :c3501; :b :c3502; :b :c3503; :b :c3504; :b :c3505; :b :c3506; :b :c3507; :b :c3508; :b :c3509; :b :c3510; :b :c3511; :b :c3512; :b :c3513; :b :c3514; :b :c3515; :b :c3516; :b :c3517; :b :c3518; :b :c3519; :b :c3520; :b :c3521; :b :c3522; :b :c3523; :b :c3524; :b :c3525; :b :c3526; :b :c3527; :b :c3528; :b :c3529; :b :c3530; :b :c3531; :b :c3532; :b :c3533; :b :c3534; :b :c3535; :b :c3536; :b :c3537; :b :c3538; :b :c3539; :b :c3540; :b :c3541; :b :c3542; :b :c3543; :b :c3544; :b :c3545; :b :c3546; :b :c3547; :b :c3548; :b :c3549; :b :c3550; :b :c3551; :b :c3552; :b :c3553; :b :c3554; :b :c3555; :b :c3556; :b :c3557; :b :c3558; :b :c3559; :b :c3560; :b :c3561; :b :c3562; :b :c3563; :b :c3564; :b :c3565; :b :c3566; :b :c3567; :b :c3568; :b :c3569; :b :c3570; :b :c3571; :b :c3572; :b :c3573; :b :c3574; :b :c3575; :b :c3576; :b :c3577; :b :c3578; :b :c3579; :b :c3580; :b :c3581; :b :c3582; :b :c3583; :b :c3584; :b :c3585; :b :c3586; :b :c3587; :b :c3588; :b :c3589; :b :c3590; :b :c3591; :b :c3592; :b :c3593; :b :c3594; :b :c3595; :b :c3596; :b :c3597; :b :c3598; :b :c3599; :b :c3600; :b :c3601; :b :c3602; :b :c3603; :b :c3604; :b :c3605; :b :c3606; :b :c3607; :b :c3608; :b :c3609; :b :c3610; :b :c3611; :b :c3612; :b :c3613; :b :c3614; :b :c3615; :b :c3616; :b :c3617; :b :c3618; :b :c3619; :b :c3620; :b :c3621; :b :c3622; :b :c3623; :b :c3624; :b :c3625; :b :c3626; :b :c3627; :b :c3628; :b :c3629; :b :c3630; :b :c3631; :b :c3632; :b :c3633; :b :c3634; :b :c3635; :b :c3636; :b :c3637; :b :c3638; :b :c3639; :b :c3640; :b :c3641; :b :c3642; :b :c3643; :b :c3644; :b :c3645; :b :c3646; :b :c3647; :b :c3648; :b :c3649; :b :c3650; :b :c3651; :b :c3652; :b :c3653; :b :c3654; :b :c3655; :b :c3656; :b :c3657; :b :c3658; :b :c3659; :b :c3660; :b :c3661; :b :c3662; :b :c3663; :b :c3664; :b :c3665; :b :c3666; :b :c3667; :b :c3668; :b :c3669; :b :c3670; :b :c3671; :b :c3672; :b :c3673; :b :c3674; :b :c3675; :b :c3676; :b :c3677; :b :c3678; :b :c3679; :b :c3680; :b :c3681; :b :c3682; :b :c3683; :b :c3684; :b :c3685; :b :c3686; :b :c3687; :b :c3688; :b :c3689; :b :c3690; :b :c3691; :b :c3692; :b :c3693; :b :c3694; :b :c3695; :b :c3696; :b :c3697; :b :c3698; :b :c3699; :b :c3700; :b :c3701; :b :c3702; :b :c3703; :b :c3704; :b :c3705; :b :c3706; :b :c3707; :b :c3708; :b :c3709; :b :c3710; :b :c3711; :b :c3712; :b :c3713; :b :c3714; :b :c3715; :b :c3716; :b :c3717; :b :c3718; :b :c3719; :b :c3720; :b :c3721; :b :c3722; :b :c3723; :b :c3724; :b :c3725; :b :c3726; :b :c3727; :b :c3728; :b :c3729; :b :c3730; :b :c3731; :b :c3732; :b :c3733; :b :c3734; :b :c3735; :b :c3736; :b :c3737; :b :c3738; :b :c3739; :b :c3740; :b :c3741; :b :c3742; :b :c3743; :b :c3744; :b :c3745; :b :c3746; :b :c3747; :b :c3748; :b :c3749; :b :c3750; :b :c3751; :b :c3752; :b :c3753; :b :c3754; :b :c3755; :b :c3756; :b :c3757; :b :c3758; :b :c3759; :b :c3760; :b :c3761; :b :c3762; :b :c3763; :b :c3764; :b :c3765; :b :c3766; :b :c3767; :b :c3768; :b :c3769; :b :c3770; :b :c3771; :b :c3772; :b :c3773; :b :c3774; :b :c3775; :b :c3776; :b :c3777; :b :c3778; :b :c3779; :b :c3780; :b :c3781; :b :c3782; :b :c3783; :b :c3784; :b :c3785; :b :c3786; :b :c3787; :b :c3788; :b :c3789; :b :c3790; :b :c3791; :b :c3792; :b :c3793; :b :c3794; :b :c3795; :b :c3796; :b :c3797; :b :c3798; :b :c3799; :b :c3800; :b :c3801; :b :c3802; :b :c3803; :b :c3804; :b :c3805; :b :c3806; :b :c3807; :b :c3808; :b :c3809; :b :c3810; :b :c3811; :b :c3812; :b :c3813; :b :c3814; :b :c3815; :b :c3816; :b :c3817; :b :c3818; :b :c3819; :b :c3820; :b :c3821; :b :c3822; :b :c3823; :b :c3824; :b :c3825; :b :c3826; :b :c3827; :b :c3828; :b :c3829; :b :c3830; :b :c3831; :b :c3832; :b :c3833; :b :c3834; :b :c3835; :b :c3836; :b :c3837; :b :c3838; :b :c3839; :b :c3840; :b :c3841; :b :c3842; :b :c3843; :b :c3844; :b :c3845; :b :c3846; :b :c3847; :b :c3848; :b :c3849; :b :c3850; :b :c3851; :b :c3852; :b :c3853; :b :c3854; :b :c3855; :b :c3856; :b :c3857; :b :c3858; :b :c3859; :b :c3860; :b :c3861; :b :c3862; :b :c3863; :b :c3864; :b :c3865; :b :c3866; :b :c3867; :b :c3868; :b :c3869; :b :c3870; :b :c3871; :b :c3872; :b :c3873; :b :c3874; :b :c3875; :b :c3876; :b :c3877; :b :c3878; :b :c3879; :b :c3880; :b :c3881; :b :c3882; :b :c3883; :b :c3884; :b :c3885; :b :c3886; :b :c3887; :b :c3888; :b :c3889; :b :c3890; :b :c3891; :b :c3892; :b :c3893; :b :c3894; :b :c3895; :b :c3896; :b :c3897; :b :c3898; :b :c3899; :b :c3900; :b :c3901; :b :c3902; :b :c3903; :b :c3904; :b :c3905; :b :c3906; :b :c3907; :b :c3908; :b :c3909; :b :c3910; :b :c3911; :b :c3912; :b :c3913; :b :c3914; :b :c3915; :b :c3916; :b :c3917; :b :c3918; :b :c3919; :b :c3920; :b :c3921; :b :c3922; :b :c3923; :b :c3924; :b :c3925; :b :c3926; :b :c3927; :b :c3928; :b :c3929; :b :c3930; :b :c3931; :b :c3932; :b :c3933; :b :c3934; :b :c3935; :b :c3936; :b :c3937; :b :c3938; :b :c3939; :b :c3940; :b :c3941; :b :c3942; :b :c3943; :b :c3944; :b :c3945; :b :c3946; :b :c3947; :b :c3948; :b :c3949; :b :c3950; :b :c3951; :b :c3952; :b :c3953; :b :c3954; :b :c3955; :b :c3956; :b :c3957; :b :c3958; :b :c3959; :b :c3960; :b :c3961; :b :c3962; :b :c3963; :b :c3964; :b :c3965; :b :c3966; :b :c3967; :b :c3968; :b :c3969; :b :c3970; :b :c3971; :b :c3972; :b :c3973; :b :c3974; :b :c3975; :b :c3976; :b :c3977; :b :c3978; :b :c3979; :b :c3980; :b :c3981; :b :c3982; :b :c3983; :b :c3984; :b :c3985; :b :c3986; :b :c3987; :b :c3988; :b :c3989; :b :c3990; :b :c3991; :b :c3992; :b :c3993; :b :c3994; :b :c3995; :b :c3996; :b :c3997; :b :c3998; :b :c3999; :b :c4000; :b :c4001; :b :c4002; :b :c4003; :b :c4004; :b :c4005; :b :c4006; :b :c4007; :b :c4008; :b :c4009; :b :c4010; :b :c4011; :b :c4012; :b :c4013; :b :c4014; :b :c4015; :b :c4016; :b :c4017; :b :c4018; :b :c4019; :b :c4020; :b :c4021; :b :c4022; :b :c4023; :b :c4024; :b :c4025; :b :c4026; :b :c4027; :b :c4028; :b :c4029; :b :c4030; :b :c4031; :b :c4032; :b :c4033; :b :c4034; :b :c4035; :b :c4036; :b :c4037; :b :c4038; :b :c4039; :b :c4040; :b :c4041; :b :c4042; :b :c4043; :b :c4044; :b :c4045; :b :c4046; :b :c4047; :b :c4048; :b :c4049; :b :c4050; :b :c4051; :b :c4052; :b :c4053; :b :c4054; :b :c4055; :b :c4056; :b :c4057; :b :c4058; :b :c4059; :b :c4060; :b :c4061; :b :c4062; :b :c4063; :b :c4064; :b :c4065; :b :c4066; :b :c4067; :b :c4068; :b :c4069; :b :c4070; :b :c4071; :b :c4072; :b :c4073; :b :c4074; :b :c4075; :b :c4076; :b :c4077; :b :c4078; :b :c4079; :b :c4080; :b :c4081; :b :c4082; :b :c4083; :b :c4084; :b :c4085; :b :c4086; :b :c4087; :b :c4088; :b :c4089; :b :c4090; :b :c4091; :b :c4092; :b :c4093; :b :c4094; :b :c4095; :b :c4096; :b :c4097; :b :c4098; :b :c4099; :b :c4100; :b :c4101; :b :c4102; :b :c4103; :b :c4104; :b :c4105; :b :c4106; :b :c4107; :b :c4108; :b :c4109; :b :c4110; :b :c4111; :b :c4112; :b :c4113; :b :c4114; :b :c4115; :b :c4116; :b :c4117; :b :c4118; :b :c4119; :b :c4120; :b :c4121; :b :c4122; :b :c4123; :b :c4124; :b :c4125; :b :c4126; :b :c4127; :b :c4128; :b :c4129; :b :c4130; :b :c4131; :b :c4132; :b :c4133; :b :c4134; :b :c4135; :b :c4136; :b :c4137; :b :c4138; :b :c4139; :b :c4140; :b :c4141; :b :c4142; :b :c4143; :b :c4144; :b :c4145; :b :c4146; :b :c4147; :b :c4148; :b :c4149; :b :c4150; :b :c4151; :b :c4152; :b :c4153; :b :c4154; :b :c4155; :b :c4156; :b :c4157; :b :c4158; :b :c4159; :b :c4160; :b :c4161; :b :c4162; :b :c4163; :b :c4164; :b :c4165; :b :c4166; :b :c4167; :b :c4168; :b :c4169; :b :c4170; :b :c4171; :b :c4172; :b :c4173; :b :c4174; :b :c4175; :b :c4176; :b :c4177; :b :c4178; :b :c4179; :b :c4180; :b :c4181; :b :c4182; :b :c4183; :b :c4184; :b :c4185; :b :c4186; :b :c4187; :b :c4188; :b :c4189; :b :c4190; :b :c4191; :b :c4192; :b :c4193; :b :c4194; :b :c4195; :b :c4196; :b :c4197; :b :c4198; :b :c4199; :b :c4200; :b :c4201; :b :c4202; :b :c4203; :b :c4204; :b :c4205; :b :c4206; :b :c4207; :b :c4208; :b :c4209; :b :c4210; :b :c4211; :b :c4212; :b :c4213; :b :c4214; :b :c4215; :b :c4216; :b :c4217; :b :c4218; :b :c4219; :b :c4220; :b :c4221; :b :c4222; :b :c4223; :b :c4224; :b :c4225; :b :c4226; :b :c4227; :b :c4228; :b :c4229; :b :c4230; :b :c4231; :b :c4232; :b :c4233; :b :c4234; :b :c4235; :b :c4236; :b :c4237; :b :c4238; :b :c4239; :b :c4240; :b :c4241; :b :c4242; :b :c4243; :b :c4244; :b :c4245; :b :c4246; :b :c4247; :b :c4248; :b :c4249; :b :c4250; :b :c4251; :b :c4252; :b :c4253; :b :c4254; :b :c4255; :b :c4256; :b :c4257; :b :c4258; :b :c4259; :b :c4260; :b :c4261; :b :c4262; :b :c4263; :b :c4264; :b :c4265; :b :c4266; :b :c4267; :b :c4268; :b :c4269; :b :c4270; :b :c4271; :b :c4272; :b :c4273; :b :c4274; :b :c4275; :b :c4276; :b :c4277; :b :c4278; :b :c4279; :b :c4280; :b :c4281; :b :c4282; :b :c4283; :b :c4284; :b :c4285; :b :c4286; :b :c4287; :b :c4288; :b :c4289; :b :c4290; :b :c4291; :b :c4292; :b :c4293; :b :c4294; :b :c4295; :b :c4296; :b :c4297; :b :c4298; :b :c4299; :b :c4300; :b :c4301; :b :c4302; :b :c4303; :b :c4304; :b :c4305; :b :c4306; :b :c4307; :b :c4308; :b :c4309; :b :c4310; :b :c4311; :b :c4312; :b :c4313; :b :c4314; :b :c4315; :b :c4316; :b :c4317; :b :c4318; :b :c4319; :b :c4320; :b :c4321; :b :c4322; :b :c4323; :b :c4324; :b :c4325; :b :c4326; :b :c4327; :b :c4328; :b :c4329; :b :c4330; :b :c4331; :b :c4332; :b :c4333; :b :c4334; :b :c4335; :b :c4336; :b :c4337; :b :c4338; :b :c4339; :b :c4340; :b :c4341; :b :c4342; :b :c4343; :b :c4344; :b :c4345; :b :c4346; :b :c4347; :b :c4348; :b :c4349; :b :c4350; :b :c4351; :b :c4352; :b :c4353; :b :c4354; :b :c4355; :b :c4356; :b :c4357; :b :c4358; :b :c4359; :b :c4360; :b :c4361; :b :c4362; :b :c4363; :b :c4364; :b :c4365; :b :c4366; :b :c4367; :b :c4368; :b :c4369; :b :c4370; :b :c4371; :b :c4372; :b :c4373; :b :c4374; :b :c4375; :b :c4376; :b :c4377; :b :c4378; :b :c4379; :b :c4380; :b :c4381; :b :c4382; :b :c4383; :b :c4384; :b :c4385; :b :c4386; :b :c4387; :b :c4388; :b :c4389; :b :c4390; :b :c4391; :b :c4392; :b :c4393; :b :c4394; :b :c4395; :b :c4396; :b :c4397; :b :c4398; :b :c4399; :b :c4400; :b :c4401; :b :c4402; :b :c4403; :b :c4404; :b :c4405; :b :c4406; :b :c4407; :b :c4408; :b :c4409; :b :c4410; :b :c4411; :b :c4412; :b :c4413; :b :c4414; :b :c4415; :b :c4416; :b :c4417; :b :c4418; :b :c4419; :b :c4420; :b :c4421; :b :c4422; :b :c4423; :b :c4424; :b :c4425; :b :c4426; :b :c4427; :b :c4428; :b :c4429; :b :c4430; :b :c4431; :b :c4432; :b :c4433; :b :c4434; :b :c4435; :b :c4436; :b :c4437; :b :c4438; :b :c4439; :b :c4440; :b :c4441; :b :c4442; :b :c4443; :b :c4444; :b :c4445; :b :c4446; :b :c4447; :b :c4448; :b :c4449; :b :c4450; :b :c4451; :b :c4452; :b :c4453; :b :c4454; :b :c4455; :b :c4456; :b :c4457; :b :c4458; :b :c4459; :b :c4460; :b :c4461; :b :c4462; :b :c4463; :b :c4464; :b :c4465; :b :c4466; :b :c4467; :b :c4468; :b :c4469; :b :c4470; :b :c4471; :b :c4472; :b :c4473; :b :c4474; :b :c4475; :b :c4476; :b :c4477; :b :c4478; :b :c4479; :b :c4480; :b :c4481; :b :c4482; :b :c4483; :b :c4484; :b :c4485; :b :c4486; :b :c4487; :b :c4488; :b :c4489; :b :c4490; :b :c4491; :b :c4492; :b :c4493; :b :c4494; :b :c4495; :b :c4496; :b :c4497; :b :c4498; :b :c4499; :b :c4500; :b :c4501; :b :c4502; :b :c4503; :b :c4504; :b :c4505; :b :c4506; :b :c4507; :b :c4508; :b :c4509; :b :c4510; :b :c4511; :b :c4512; :b :c4513; :b :c4514; :b :c4515; :b :c4516; :b :c4517; :b :c4518; :b :c4519; :b :c4520; :b :c4521; :b :c4522; :b :c4523; :b :c4524; :b :c4525; :b :c4526; :b :c4527; :b :c4528; :b :c4529; :b :c4530; :b :c4531; :b :c4532; :b :c4533; :b :c4534; :b :c4535; :b :c4536; :b :c4537; :b :c4538; :b :c4539; :b :c4540; :b :c4541; :b :c4542; :b :c4543; :b :c4544; :b :c4545; :b :c4546; :b :c4547; :b :c4548; :b :c4549; :b :c4550; :b :c4551; :b :c4552; :b :c4553; :b :c4554; :b :c4555; :b :c4556; :b :c4557; :b :c4558; :b :c4559; :b :c4560; :b :c4561; :b :c4562; :b :c4563; :b :c4564; :b :c4565; :b :c4566; :b :c4567; :b :c4568; :b :c4569; :b :c4570; :b :c4571; :b :c4572; :b :c4573; :b :c4574; :b :c4575; :b :c4576; :b :c4577; :b :c4578; :b :c4579; :b :c4580; :b :c4581; :b :c4582; :b :c4583; :b :c4584; :b :c4585; :b :c4586; :b :c4587; :b :c4588; :b :c4589; :b :c4590; :b :c4591; :b :c4592; :b :c4593; :b :c4594; :b :c4595; :b :c4596; :b :c4597; :b :c4598; :b :c4599; :b :c4600; :b :c4601; :b :c4602; :b :c4603; :b :c4604; :b :c4605; :b :c4606; :b :c4607; :b :c4608; :b :c4609; :b :c4610; :b :c4611; :b :c4612; :b :c4613; :b :c4614; :b :c4615; :b :c4616; :b :c4617; :b :c4618; :b :c4619; :b :c4620; :b :c4621; :b :c4622; :b :c4623; :b :c4624; :b :c4625; :b :c4626; :b :c4627; :b :c4628; :b :c4629; :b :c4630; :b :c4631; :b :c4632; :b :c4633; :b :c4634; :b :c4635; :b :c4636; :b :c4637; :b :c4638; :b :c4639; :b :c4640; :b :c4641; :b :c4642; :b :c4643; :b :c4644; :b :c4645; :b :c4646; :b :c4647; :b :c4648; :b :c4649; :b :c4650; :b :c4651; :b :c4652; :b :c4653; :b :c4654; :b :c4655; :b :c4656; :b :c4657; :b :c4658; :b :c4659; :b :c4660; :b :c4661; :b :c4662; :b :c4663; :b :c4664; :b :c4665; :b :c4666; :b :c4667; :b :c4668; :b :c4669; :b :c4670; :b :c4671; :b :c4672; :b :c4673; :b :c4674; :b :c4675; :b :c4676; :b :c4677; :b :c4678; :b :c4679; :b :c4680; :b :c4681; :b :c4682; :b :c4683; :b :c4684; :b :c4685; :b :c4686; :b :c4687; :b :c4688; :b :c4689; :b :c4690; :b :c4691; :b :c4692; :b :c4693; :b :c4694; :b :c4695; :b :c4696; :b :c4697; :b :c4698; :b :c4699; :b :c4700; :b :c4701; :b :c4702; :b :c4703; :b :c4704; :b :c4705; :b :c4706; :b :c4707; :b :c4708; :b :c4709; :b :c4710; :b :c4711; :b :c4712; :b :c4713; :b :c4714; :b :c4715; :b :c4716; :b :c4717; :b :c4718; :b :c4719; :b :c4720; :b :c4721; :b :c4722; :b :c4723; :b :c4724; :b :c4725; :b :c4726; :b :c4727; :b :c4728; :b :c4729; :b :c4730; :b :c4731; :b :c4732; :b :c4733; :b :c4734; :b :c4735; :b :c4736; :b :c4737; :b :c4738; :b :c4739; :b :c4740; :b :c4741; :b :c4742; :b :c4743; :b :c4744; :b :c4745; :b :c4746; :b :c4747; :b :c4748; :b :c4749; :b :c4750; :b :c4751; :b :c4752; :b :c4753; :b :c4754; :b :c4755; :b :c4756; :b :c4757; :b :c4758; :b :c4759; :b :c4760; :b :c4761; :b :c4762; :b :c4763; :b :c4764; :b :c4765; :b :c4766; :b :c4767; :b :c4768; :b :c4769; :b :c4770; :b :c4771; :b :c4772; :b :c4773; :b :c4774; :b :c4775; :b :c4776; :b :c4777; :b :c4778; :b :c4779; :b :c4780; :b :c4781; :b :c4782; :b :c4783; :b :c4784; :b :c4785; :b :c4786; :b :c4787; :b :c4788; :b :c4789; :b :c4790; :b :c4791; :b :c4792; :b :c4793; :b :c4794; :b :c4795; :b :c4796; :b :c4797; :b :c4798; :b :c4799; :b :c4800; :b :c4801; :b :c4802; :b :c4803; :b :c4804; :b :c4805; :b :c4806; :b :c4807; :b :c4808; :b :c4809; :b :c4810; :b :c4811; :b :c4812; :b :c4813; :b :c4814; :b :c4815; :b :c4816; :b :c4817; :b :c4818; :b :c4819; :b :c4820; :b :c4821; :b :c4822; :b :c4823; :b :c4824; :b :c4825; :b :c4826; :b :c4827; :b :c4828; :b :c4829; :b :c4830; :b :c4831; :b :c4832; :b :c4833; :b :c4834; :b :c4835; :b :c4836; :b :c4837; :b :c4838; :b :c4839; :b :c4840; :b :c4841; :b :c4842; :b :c4843; :b :c4844; :b :c4845; :b :c4846; :b :c4847; :b :c4848; :b :c4849; :b :c4850; :b :c4851; :b :c4852; :b :c4853; :b :c4854; :b :c4855; :b :c4856; :b :c4857; :b :c4858; :b :c4859; :b :c4860; :b :c4861; :b :c4862; :b :c4863; :b :c4864; :b :c4865; :b :c4866; :b :c4867; :b :c4868; :b :c4869; :b :c4870; :b :c4871; :b :c4872; :b :c4873; :b :c4874; :b :c4875; :b :c4876; :b :c4877; :b :c4878; :b :c4879; :b :c4880; :b :c4881; :b :c4882; :b :c4883; :b :c4884; :b :c4885; :b :c4886; :b :c4887; :b :c4888; :b :c4889; :b :c4890; :b :c4891; :b :c4892; :b :c4893; :b :c4894; :b :c4895; :b :c4896; :b :c4897; :b :c4898; :b :c4899; :b :c4900; :b :c4901; :b :c4902; :b :c4903; :b :c4904; :b :c4905; :b :c4906; :b :c4907; :b :c4908; :b :c4909; :b :c4910; :b :c4911; :b :c4912; :b :c4913; :b :c4914; :b :c4915; :b :c4916; :b :c4917; :b :c4918; :b :c4919; :b :c4920; :b :c4921; :b :c4922; :b :c4923; :b :c4924; :b :c4925; :b :c4926; :b :c4927; :b :c4928; :b :c4929; :b :c4930; :b :c4931; :b :c4932; :b :c4933; :b :c4934; :b :c4935; :b :c4936; :b :c4937; :b :c4938; :b :c4939; :b :c4940; :b :c4941; :b :c4942; :b :c4943; :b :c4944; :b :c4945; :b :c4946; :b :c4947; :b :c4948; :b :c4949; :b :c4950; :b :c4951; :b :c4952; :b :c4953; :b :c4954; :b :c4955; :b :c4956; :b :c4957; :b :c4958; :b :c4959; :b :c4960; :b :c4961; :b :c4962; :b :c4963; :b :c4964; :b :c4965; :b :c4966; :b :c4967; :b :c4968; :b :c4969; :b :c4970; :b :c4971; :b :c4972; :b :c4973; :b :c4974; :b :c4975; :b :c4976; :b :c4977; :b :c4978; :b :c4979; :b :c4980; :b :c4981; :b :c4982; :b :c4983; :b :c4984; :b :c4985; :b :c4986; :b :c4987; :b :c4988; :b :c4989; :b :c4990; :b :c4991; :b :c4992; :b :c4993; :b :c4994; :b :c4995; :b :c4996; :b :c4997; :b :c4998; :b :c4999; :b :c5000; :b :c5001; :b :c5002; :b :c5003; :b :c5004; :b :c5005; :b :c5006; :b :c5007; :b :c5008; :b :c5009; :b :c5010; :b :c5011; :b :c5012; :b :c5013; :b :c5014; :b :c5015; :b :c5016; :b :c5017; :b :c5018; :b :c5019; :b :c5020; :b :c5021; :b :c5022; :b :c5023; :b :c5024; :b :c5025; :b :c5026; :b :c5027; :b :c5028; :b :c5029; :b :c5030; :b :c5031; :b :c5032; :b :c5033; :b :c5034; :b :c5035; :b :c5036; :b :c5037; :b :c5038; :b :c5039; :b :c5040; :b :c5041; :b :c5042; :b :c5043; :b :c5044; :b :c5045; :b :c5046; :b :c5047; :b :c5048; :b :c5049; :b :c5050; :b :c5051; :b :c5052; :b :c5053; :b :c5054; :b :c5055; :b :c5056; :b :c5057; :b :c5058; :b :c5059; :b :c5060; :b :c5061; :b :c5062; :b :c5063; :b :c5064; :b :c5065; :b :c5066; :b :c5067; :b :c5068; :b :c5069; :b :c5070; :b :c5071; :b :c5072; :b :c5073; :b :c5074; :b :c5075; :b :c5076; :b :c5077; :b :c5078; :b :c5079; :b :c5080; :b :c5081; :b :c5082; :b :c5083; :b :c5084; :b :c5085; :b :c5086; :b :c5087; :b :c5088; :b :c5089; :b :c5090; :b :c5091; :b :c5092; :b :c5093; :b :c5094; :b :c5095; :b :c5096; :b :c5097; :b :c5098; :b :c5099; :b :c5100; :b :c5101; :b :c5102; :b :c5103; :b :c5104; :b :c5105; :b :c5106; :b :c5107; :b :c5108; :b :c5109; :b :c5110; :b :c5111; :b :c5112; :b :c5113; :b :c5114; :b :c5115; :b :c5116; :b :c5117; :b :c5118; :b :c5119; :b :c5120; :b :c5121; :b :c5122; :b :c5123; :b :c5124; :b :c5125; :b :c5126; :b :c5127; :b :c5128; :b :c5129; :b :c5130; :b :c5131; :b :c5132; :b :c5133; :b :c5134; :b :c5135; :b :c5136; :b :c5137; :b :c5138; :b :c5139; :b :c5140; :b :c5141; :b :c5142; :b :c5143; :b :c5144; :b :c5145; :b :c5146; :b :c5147; :b :c5148; :b :c5149; :b :c5150; :b :c5151; :b :c5152; :b :c5153; :b :c5154; :b :c5155; :b :c5156; :b :c5157; :b :c5158; :b :c5159; :b :c5160; :b :c5161; :b :c5162; :b :c5163; :b :c5164; :b :c5165; :b :c5166; :b :c5167; :b :c5168; :b :c5169; :b :c5170; :b :c5171; :b :c5172; :b :c5173; :b :c5174; :b :c5175; :b :c5176; :b :c5177; :b :c5178; :b :c5179; :b :c5180; :b :c5181; :b :c5182; :b :c5183; :b :c5184; :b :c5185; :b :c5186; :b :c5187; :b :c5188; :b :c5189; :b :c5190; :b :c5191; :b :c5192; :b :c5193; :b :c5194; :b :c5195; :b :c5196; :b :c5197; :b :c5198; :b :c5199; :b :c5200; :b :c5201; :b :c5202; :b :c5203; :b :c5204; :b :c5205; :b :c5206; :b :c5207; :b :c5208; :b :c5209; :b :c5210; :b :c5211; :b :c5212; :b :c5213; :b :c5214; :b :c5215; :b :c5216; :b :c5217; :b :c5218; :b :c5219; :b :c5220; :b :c5221; :b :c5222; :b :c5223; :b :c5224; :b :c5225; :b :c5226; :b :c5227; :b :c5228; :b :c5229; :b :c5230; :b :c5231; :b :c5232; :b :c5233; :b :c5234; :b :c5235; :b :c5236; :b :c5237; :b :c5238; :b :c5239; :b :c5240; :b :c5241; :b :c5242; :b :c5243; :b :c5244; :b :c5245; :b :c5246; :b :c5247; :b :c5248; :b :c5249; :b :c5250; :b :c5251; :b :c5252; :b :c5253; :b :c5254; :b :c5255; :b :c5256; :b :c5257; :b :c5258; :b :c5259; :b :c5260; :b :c5261; :b :c5262; :b :c5263; :b :c5264; :b :c5265; :b :c5266; :b :c5267; :b :c5268; :b :c5269; :b :c5270; :b :c5271; :b :c5272; :b :c5273; :b :c5274; :b :c5275; :b :c5276; :b :c5277; :b :c5278; :b :c5279; :b :c5280; :b :c5281; :b :c5282; :b :c5283; :b :c5284; :b :c5285; :b :c5286; :b :c5287; :b :c5288; :b :c5289; :b :c5290; :b :c5291; :b :c5292; :b :c5293; :b :c5294; :b :c5295; :b :c5296; :b :c5297; :b :c5298; :b :c5299; :b :c5300; :b :c5301; :b :c5302; :b :c5303; :b :c5304; :b :c5305; :b :c5306; :b :c5307; :b :c5308; :b :c5309; :b :c5310; :b :c5311; :b :c5312; :b :c5313; :b :c5314; :b :c5315; :b :c5316; :b :c5317; :b :c5318; :b :c5319; :b :c5320; :b :c5321; :b :c5322; :b :c5323; :b :c5324; :b :c5325; :b :c5326; :b :c5327; :b :c5328; :b :c5329; :b :c5330; :b :c5331; :b :c5332; :b :c5333; :b :c5334; :b :c5335; :b :c5336; :b :c5337; :b :c5338; :b :c5339; :b :c5340; :b :c5341; :b :c5342; :b :c5343; :b :c5344; :b :c5345; :b :c5346; :b :c5347; :b :c5348; :b :c5349; :b :c5350; :b :c5351; :b :c5352; :b :c5353; :b :c5354; :b :c5355; :b :c5356; :b :c5357; :b :c5358; :b :c5359; :b :c5360; :b :c5361; :b :c5362; :b :c5363; :b :c5364; :b :c5365; :b :c5366; :b :c5367; :b :c5368; :b :c5369; :b :c5370; :b :c5371; :b :c5372; :b :c5373; :b :c5374; :b :c5375; :b :c5376; :b :c5377; :b :c5378; :b :c5379; :b :c5380; :b :c5381; :b :c5382; :b :c5383; :b :c5384; :b :c5385; :b :c5386; :b :c5387; :b :c5388; :b :c5389; :b :c5390; :b :c5391; :b :c5392; :b :c5393; :b :c5394; :b :c5395; :b :c5396; :b :c5397; :b :c5398; :b :c5399; :b :c5400; :b :c5401; :b :c5402; :b :c5403; :b :c5404; :b :c5405; :b :c5406; :b :c5407; :b :c5408; :b :c5409; :b :c5410; :b :c5411; :b :c5412; :b :c5413; :b :c5414; :b :c5415; :b :c5416; :b :c5417; :b :c5418; :b :c5419; :b :c5420; :b :c5421; :b :c5422; :b :c5423; :b :c5424; :b :c5425; :b :c5426; :b :c5427; :b :c5428; :b :c5429; :b :c5430; :b :c5431; :b :c5432; :b :c5433; :b :c5434; :b :c5435; :b :c5436; :b :c5437; :b :c5438; :b :c5439; :b :c5440; :b :c5441; :b :c5442; :b :c5443; :b :c5444; :b :c5445; :b :c5446; :b :c5447; :b :c5448; :b :c5449; :b :c5450; :b :c5451; :b :c5452; :b :c5453; :b :c5454; :b :c5455; :b :c5456; :b :c5457; :b :c5458; :b :c5459; :b :c5460; :b :c5461; :b :c5462; :b :c5463; :b :c5464; :b :c5465; :b :c5466; :b :c5467; :b :c5468; :b :c5469; :b :c5470; :b :c5471; :b :c5472; :b :c5473; :b :c5474; :b :c5475; :b :c5476; :b :c5477; :b :c5478; :b :c5479; :b :c5480; :b :c5481; :b :c5482; :b :c5483; :b :c5484; :b :c5485; :b :c5486; :b :c5487; :b :c5488; :b :c5489; :b :c5490; :b :c5491; :b :c5492; :b :c5493; :b :c5494; :b :c5495; :b :c5496; :b :c5497; :b :c5498; :b :c5499; :b :c5500; :b :c5501; :b :c5502; :b :c5503; :b :c5504; :b :c5505; :b :c5506; :b :c5507; :b :c5508; :b :c5509; :b :c5510; :b :c5511; :b :c5512; :b :c5513; :b :c5514; :b :c5515; :b :c5516; :b :c5517; :b :c5518; :b :c5519; :b :c5520; :b :c5521; :b :c5522; :b :c5523; :b :c5524; :b :c5525; :b :c5526; :b :c5527; :b :c5528; :b :c5529; :b :c5530; :b :c5531; :b :c5532; :b :c5533; :b :c5534; :b :c5535; :b :c5536; :b :c5537; :b :c5538; :b :c5539; :b :c5540; :b :c5541; :b :c5542; :b :c5543; :b :c5544; :b :c5545; :b :c5546; :b :c5547; :b :c5548; :b :c5549; :b :c5550; :b :c5551; :b :c5552; :b :c5553; :b :c5554; :b :c5555; :b :c5556; :b :c5557; :b :c5558; :b :c5559; :b :c5560; :b :c5561; :b :c5562; :b :c5563; :b :c5564; :b :c5565; :b :c5566; :b :c5567; :b :c5568; :b :c5569; :b :c5570; :b :c5571; :b :c5572; :b :c5573; :b :c5574; :b :c5575; :b :c5576; :b :c5577; :b :c5578; :b :c5579; :b :c5580; :b :c5581; :b :c5582; :b :c5583; :b :c5584; :b :c5585; :b :c5586; :b :c5587; :b :c5588; :b :c5589; :b :c5590; :b :c5591; :b :c5592; :b :c5593; :b :c5594; :b :c5595; :b :c5596; :b :c5597; :b :c5598; :b :c5599; :b :c5600; :b :c5601; :b :c5602; :b :c5603; :b :c5604; :b :c5605; :b :c5606; :b :c5607; :b :c5608; :b :c5609; :b :c5610; :b :c5611; :b :c5612; :b :c5613; :b :c5614; :b :c5615; :b :c5616; :b :c5617; :b :c5618; :b :c5619; :b :c5620; :b :c5621; :b :c5622; :b :c5623; :b :c5624; :b :c5625; :b :c5626; :b :c5627; :b :c5628; :b :c5629; :b :c5630; :b :c5631; :b :c5632; :b :c5633; :b :c5634; :b :c5635; :b :c5636; :b :c5637; :b :c5638; :b :c5639; :b :c5640; :b :c5641; :b :c5642; :b :c5643; :b :c5644; :b :c5645; :b :c5646; :b :c5647; :b :c5648; :b :c5649; :b :c5650; :b :c5651; :b :c5652; :b :c5653; :b :c5654; :b :c5655; :b :c5656; :b :c5657; :b :c5658; :b :c5659; :b :c5660; :b :c5661; :b :c5662; :b :c5663; :b :c5664; :b :c5665; :b :c5666; :b :c5667; :b :c5668; :b :c5669; :b :c5670; :b :c5671; :b :c5672; :b :c5673; :b :c5674; :b :c5675; :b :c5676; :b :c5677; :b :c5678; :b :c5679; :b :c5680; :b :c5681; :b :c5682; :b :c5683; :b :c5684; :b :c5685; :b :c5686; :b :c5687; :b :c5688; :b :c5689; :b :c5690; :b :c5691; :b :c5692; :b :c5693; :b :c5694; :b :c5695; :b :c5696; :b :c5697; :b :c5698; :b :c5699; :b :c5700; :b :c5701; :b :c5702; :b :c5703; :b :c5704; :b :c5705; :b :c5706; :b :c5707; :b :c5708; :b :c5709; :b :c5710; :b :c5711; :b :c5712; :b :c5713; :b :c5714; :b :c5715; :b :c5716; :b :c5717; :b :c5718; :b :c5719; :b :c5720; :b :c5721; :b :c5722; :b :c5723; :b :c5724; :b :c5725; :b :c5726; :b :c5727; :b :c5728; :b :c5729; :b :c5730; :b :c5731; :b :c5732; :b :c5733; :b :c5734; :b :c5735; :b :c5736; :b :c5737; :b :c5738; :b :c5739; :b :c5740; :b :c5741; :b :c5742; :b :c5743; :b :c5744; :b :c5745; :b :c5746; :b :c5747; :b :c5748; :b :c5749; :b :c5750; :b :c5751; :b :c5752; :b :c5753; :b :c5754; :b :c5755; :b :c5756; :b :c5757; :b :c5758; :b :c5759; :b :c5760; :b :c5761; :b :c5762; :b :c5763; :b :c5764; :b :c5765; :b :c5766; :b :c5767; :b :c5768; :b :c5769; :b :c5770; :b :c5771; :b :c5772; :b :c5773; :b :c5774; :b :c5775; :b :c5776; :b :c5777; :b :c5778; :b :c5779; :b :c5780; :b :c5781; :b :c5782; :b :c5783; :b :c5784; :b :c5785; :b :c5786; :b :c5787; :b :c5788; :b :c5789; :b :c5790; :b :c5791; :b :c5792; :b :c5793; :b :c5794; :b :c5795; :b :c5796; :b :c5797; :b :c5798; :b :c5799; :b :c5800; :b :c5801; :b :c5802; :b :c5803; :b :c5804; :b :c5805; :b :c5806; :b :c5807; :b :c5808; :b :c5809; :b :c5810; :b :c5811; :b :c5812; :b :c5813; :b :c5814; :b :c5815; :b :c5816; :b :c5817; :b :c5818; :b :c5819; :b :c5820; :b :c5821; :b :c5822; :b :c5823; :b :c5824; :b :c5825; :b :c5826; :b :c5827; :b :c5828; :b :c5829; :b :c5830; :b :c5831; :b :c5832; :b :c5833; :b :c5834; :b :c5835; :b :c5836; :b :c5837; :b :c5838; :b :c5839; :b :c5840; :b :c5841; :b :c5842; :b :c5843; :b :c5844; :b :c5845; :b :c5846; :b :c5847; :b :c5848; :b :c5849; :b :c5850; :b :c5851; :b :c5852; :b :c5853; :b :c5854; :b :c5855; :b :c5856; :b :c5857; :b :c5858; :b :c5859; :b :c5860; :b :c5861; :b :c5862; :b :c5863; :b :c5864; :b :c5865; :b :c5866; :b :c5867; :b :c5868; :b :c5869; :b :c5870; :b :c5871; :b :c5872; :b :c5873; :b :c5874; :b :c5875; :b :c5876; :b :c5877; :b :c5878; :b :c5879; :b :c5880; :b :c5881; :b :c5882; :b :c5883; :b :c5884; :b :c5885; :b :c5886; :b :c5887; :b :c5888; :b :c5889; :b :c5890; :b :c5891; :b :c5892; :b :c5893; :b :c5894; :b :c5895; :b :c5896; :b :c5897; :b :c5898; :b :c5899; :b :c5900; :b :c5901; :b :c5902; :b :c5903; :b :c5904; :b :c5905; :b :c5906; :b :c5907; :b :c5908; :b :c5909; :b :c5910; :b :c5911; :b :c5912; :b :c5913; :b :c5914; :b :c5915; :b :c5916; :b :c5917; :b :c5918; :b :c5919; :b :c5920; :b :c5921; :b :c5922; :b :c5923; :b :c5924; :b :c5925; :b :c5926; :b :c5927; :b :c5928; :b :c5929; :b :c5930; :b :c5931; :b :c5932; :b :c5933; :b :c5934; :b :c5935; :b :c5936; :b :c5937; :b :c5938; :b :c5939; :b :c5940; :b :c5941; :b :c5942; :b :c5943; :b :c5944; :b :c5945; :b :c5946; :b :c5947; :b :c5948; :b :c5949; :b :c5950; :b :c5951; :b :c5952; :b :c5953; :b :c5954; :b :c5955; :b :c5956; :b :c5957; :b :c5958; :b :c5959; :b :c5960; :b :c5961; :b :c5962; :b :c5963; :b :c5964; :b :c5965; :b :c5966; :b :c5967; :b :c5968; :b :c5969; :b :c5970; :b :c5971; :b :c5972; :b :c5973; :b :c5974; :b :c5975; :b :c5976; :b :c5977; :b :c5978; :b :c5979; :b :c5980; :b :c5981; :b :c5982; :b :c5983; :b :c5984; :b :c5985; :b :c5986; :b :c5987; :b :c5988; :b :c5989; :b :c5990; :b :c5991; :b :c5992; :b :c5993; :b :c5994; :b :c5995; :b :c5996; :b :c5997; :b :c5998; :b :c5999; :b :c6000; :b :c6001; :b :c6002; :b :c6003; :b :c6004; :b :c6005; :b :c6006; :b :c6007; :b :c6008; :b :c6009; :b :c6010; :b :c6011; :b :c6012; :b :c6013; :b :c6014; :b :c6015; :b :c6016; :b :c6017; :b :c6018; :b :c6019; :b :c6020; :b :c6021; :b :c6022; :b :c6023; :b :c6024; :b :c6025; :b :c6026; :b :c6027; :b :c6028; :b :c6029; :b :c6030; :b :c6031; :b :c6032; :b :c6033; :b :c6034; :b :c6035; :b :c6036; :b :c6037; :b :c6038; :b :c6039; :b :c6040; :b :c6041; :b :c6042; :b :c6043; :b :c6044; :b :c6045; :b :c6046; :b :c6047; :b :c6048; :b :c6049; :b :c6050; :b :c6051; :b :c6052; :b :c6053; :b :c6054; :b :c6055; :b :c6056; :b :c6057; :b :c6058; :b :c6059; :b :c6060; :b :c6061; :b :c6062; :b :c6063; :b :c6064; :b :c6065; :b :c6066; :b :c6067; :b :c6068; :b :c6069; :b :c6070; :b :c6071; :b :c6072; :b :c6073; :b :c6074; :b :c6075; :b :c6076; :b :c6077; :b :c6078; :b :c6079; :b :c6080; :b :c6081; :b :c6082; :b :c6083; :b :c6084; :b :c6085; :b :c6086; :b :c6087; :b :c6088; :b :c6089; :b :c6090; :b :c6091; :b :c6092; :b :c6093; :b :c6094; :b :c6095; :b :c6096; :b :c6097; :b :c6098; :b :c6099; :b :c6100; :b :c6101; :b :c6102; :b :c6103; :b :c6104; :b :c6105; :b :c6106; :b :c6107; :b :c6108; :b :c6109; :b :c6110; :b :c6111; :b :c6112; :b :c6113; :b :c6114; :b :c6115; :b :c6116; :b :c6117; :b :c6118; :b :c6119; :b :c6120; :b :c6121; :b :c6122; :b :c6123; :b :c6124; :b :c6125; :b :c6126; :b :c6127; :b :c6128; :b :c6129; :b :c6130; :b :c6131; :b :c6132; :b :c6133; :b :c6134; :b :c6135; :b :c6136; :b :c6137; :b :c6138; :b :c6139; :b :c6140; :b :c6141; :b :c6142; :b :c6143; :b :c6144; :b :c6145; :b :c6146; :b :c6147; :b :c6148; :b :c6149; :b :c6150; :b :c6151; :b :c6152; :b :c6153; :b :c6154; :b :c6155; :b :c6156; :b :c6157; :b :c6158; :b :c6159; :b :c6160; :b :c6161; :b :c6162; :b :c6163; :b :c6164; :b :c6165; :b :c6166; :b :c6167; :b :c6168; :b :c6169; :b :c6170; :b :c6171; :b :c6172; :b :c6173; :b :c6174; :b :c6175; :b :c6176; :b :c6177; :b :c6178; :b :c6179; :b :c6180; :b :c6181; :b :c6182; :b :c6183; :b :c6184; :b :c6185; :b :c6186; :b :c6187; :b :c6188; :b :c6189; :b :c6190; :b :c6191; :b :c6192; :b :c6193; :b :c6194; :b :c6195; :b :c6196; :b :c6197; :b :c6198; :b :c6199; :b :c6200; :b :c6201; :b :c6202; :b :c6203; :b :c6204; :b :c6205; :b :c6206; :b :c6207; :b :c6208; :b :c6209; :b :c6210; :b :c6211; :b :c6212; :b :c6213; :b :c6214; :b :c6215; :b :c6216; :b :c6217; :b :c6218; :b :c6219; :b :c6220; :b :c6221; :b :c6222; :b :c6223; :b :c6224; :b :c6225; :b :c6226; :b :c6227; :b :c6228; :b :c6229; :b :c6230; :b :c6231; :b :c6232; :b :c6233; :b :c6234; :b :c6235; :b :c6236; :b :c6237; :b :c6238; :b :c6239; :b :c6240; :b :c6241; :b :c6242; :b :c6243; :b :c6244; :b :c6245; :b :c6246; :b :c6247; :b :c6248; :b :c6249; :b :c6250; :b :c6251; :b :c6252; :b :c6253; :b :c6254; :b :c6255; :b :c6256; :b :c6257; :b :c6258; :b :c6259; :b :c6260; :b :c6261; :b :c6262; :b :c6263; :b :c6264; :b :c6265; :b :c6266; :b :c6267; :b :c6268; :b :c6269; :b :c6270; :b :c6271; :b :c6272; :b :c6273; :b :c6274; :b :c6275; :b :c6276; :b :c6277; :b :c6278; :b :c6279; :b :c6280; :b :c6281; :b :c6282; :b :c6283; :b :c6284; :b :c6285; :b :c6286; :b :c6287; :b :c6288; :b :c6289; :b :c6290; :b :c6291; :b :c6292; :b :c6293; :b :c6294; :b :c6295; :b :c6296; :b :c6297; :b :c6298; :b :c6299; :b :c6300; :b :c6301; :b :c6302; :b :c6303; :b :c6304; :b :c6305; :b :c6306; :b :c6307; :b :c6308; :b :c6309; :b :c6310; :b :c6311; :b :c6312; :b :c6313; :b :c6314; :b :c6315; :b :c6316; :b :c6317; :b :c6318; :b :c6319; :b :c6320; :b :c6321; :b :c6322; :b :c6323; :b :c6324; :b :c6325; :b :c6326; :b :c6327; :b :c6328; :b :c6329; :b :c6330; :b :c6331; :b :c6332; :b :c6333; :b :c6334; :b :c6335; :b :c6336; :b :c6337; :b :c6338; :b :c6339; :b :c6340; :b :c6341; :b :c6342; :b :c6343; :b :c6344; :b :c6345; :b :c6346; :b :c6347; :b :c6348; :b :c6349; :b :c6350; :b :c6351; :b :c6352; :b :c6353; :b :c6354; :b :c6355; :b :c6356; :b :c6357; :b :c6358; :b :c6359; :b :c6360; :b :c6361; :b :c6362; :b :c6363; :b :c6364; :b :c6365; :b :c6366; :b :c6367; :b :c6368; :b :c6369; :b :c6370; :b :c6371; :b :c6372; :b :c6373; :b :c6374; :b :c6375; :b :c6376; :b :c6377; :b :c6378; :b :c6379; :b :c6380; :b :c6381; :b :c6382; :b :c6383; :b :c6384; :b :c6385; :b :c6386; :b :c6387; :b :c6388; :b :c6389; :b :c6390; :b :c6391; :b :c6392; :b :c6393; :b :c6394; :b :c6395; :b :c6396; :b :c6397; :b :c6398; :b :c6399; :b :c6400; :b :c6401; :b :c6402; :b :c6403; :b :c6404; :b :c6405; :b :c6406; :b :c6407; :b :c6408; :b :c6409; :b :c6410; :b :c6411; :b :c6412; :b :c6413; :b :c6414; :b :c6415; :b :c6416; :b :c6417; :b :c6418; :b :c6419; :b :c6420; :b :c6421; :b :c6422; :b :c6423; :b :c6424; :b :c6425; :b :c6426; :b :c6427; :b :c6428; :b :c6429; :b :c6430; :b :c6431; :b :c6432; :b :c6433; :b :c6434; :b :c6435; :b :c6436; :b :c6437; :b :c6438; :b :c6439; :b :c6440; :b :c6441; :b :c6442; :b :c6443; :b :c6444; :b :c6445; :b :c6446; :b :c6447; :b :c6448; :b :c6449; :b :c6450; :b :c6451; :b :c6452; :b :c6453; :b :c6454; :b :c6455; :b :c6456; :b :c6457; :b :c6458; :b :c6459; :b :c6460; :b :c6461; :b :c6462; :b :c6463; :b :c6464; :b :c6465; :b :c6466; :b :c6467; :b :c6468; :b :c6469; :b :c6470; :b :c6471; :b :c6472; :b :c6473; :b :c6474; :b :c6475; :b :c6476; :b :c6477; :b :c6478; :b :c6479; :b :c6480; :b :c6481; :b :c6482; :b :c6483; :b :c6484; :b :c6485; :b :c6486; :b :c6487; :b :c6488; :b :c6489; :b :c6490; :b :c6491; :b :c6492; :b :c6493; :b :c6494; :b :c6495; :b :c6496; :b :c6497; :b :c6498; :b :c6499; :b :c6500; :b :c6501; :b :c6502; :b :c6503; :b :c6504; :b :c6505; :b :c6506; :b :c6507; :b :c6508; :b :c6509; :b :c6510; :b :c6511; :b :c6512; :b :c6513; :b :c6514; :b :c6515; :b :c6516; :b :c6517; :b :c6518; :b :c6519; :b :c6520; :b :c6521; :b :c6522; :b :c6523; :b :c6524; :b :c6525; :b :c6526; :b :c6527; :b :c6528; :b :c6529; :b :c6530; :b :c6531; :b :c6532; :b :c6533; :b :c6534; :b :c6535; :b :c6536; :b :c6537; :b :c6538; :b :c6539; :b :c6540; :b :c6541; :b :c6542; :b :c6543; :b :c6544; :b :c6545; :b :c6546; :b :c6547; :b :c6548; :b :c6549; :b :c6550; :b :c6551; :b :c6552; :b :c6553; :b :c6554; :b :c6555; :b :c6556; :b :c6557; :b :c6558; :b :c6559; :b :c6560; :b :c6561; :b :c6562; :b :c6563; :b :c6564; :b :c6565; :b :c6566; :b :c6567; :b :c6568; :b :c6569; :b :c6570; :b :c6571; :b :c6572; :b :c6573; :b :c6574; :b :c6575; :b :c6576; :b :c6577; :b :c6578; :b :c6579; :b :c6580; :b :c6581; :b :c6582; :b :c6583; :b :c6584; :b :c6585; :b :c6586; :b :c6587; :b :c6588; :b :c6589; :b :c6590; :b :c6591; :b :c6592; :b :c6593; :b :c6594; :b :c6595; :b :c6596; :b :c6597; :b :c6598; :b :c6599; :b :c6600; :b :c6601; :b :c6602; :b :c6603; :b :c6604; :b :c6605; :b :c6606; :b :c6607; :b :c6608; :b :c6609; :b :c6610; :b :c6611; :b :c6612; :b :c6613; :b :c6614; :b :c6615; :b :c6616; :b :c6617; :b :c6618; :b :c6619; :b :c6620; :b :c6621; :b :c6622; :b :c6623; :b :c6624; :b :c6625; :b :c6626; :b :c6627; :b :c6628; :b :c6629; :b :c6630; :b :c6631; :b :c6632; :b :c6633; :b :c6634; :b :c6635; :b :c6636; :b :c6637; :b :c6638; :b :c6639; :b :c6640; :b :c6641; :b :c6642; :b :c6643; :b :c6644; :b :c6645; :b :c6646; :b :c6647; :b :c6648; :b :c6649; :b :c6650; :b :c6651; :b :c6652; :b :c6653; :b :c6654; :b :c6655; :b :c6656; :b :c6657; :b :c6658; :b :c6659; :b :c6660; :b :c6661; :b :c6662; :b :c6663; :b :c6664; :b :c6665; :b :c6666; :b :c6667; :b :c6668; :b :c6669; :b :c6670; :b :c6671; :b :c6672; :b :c6673; :b :c6674; :b :c6675; :b :c6676; :b :c6677; :b :c6678; :b :c6679; :b :c6680; :b :c6681; :b :c6682; :b :c6683; :b :c6684; :b :c6685; :b :c6686; :b :c6687; :b :c6688; :b :c6689; :b :c6690; :b :c6691; :b :c6692; :b :c6693; :b :c6694; :b :c6695; :b :c6696; :b :c6697; :b :c6698; :b :c6699; :b :c6700; :b :c6701; :b :c6702; :b :c6703; :b :c6704; :b :c6705; :b :c6706; :b :c6707; :b :c6708; :b :c6709; :b :c6710; :b :c6711; :b :c6712; :b :c6713; :b :c6714; :b :c6715; :b :c6716; :b :c6717; :b :c6718; :b :c6719; :b :c6720; :b :c6721; :b :c6722; :b :c6723; :b :c6724; :b :c6725; :b :c6726; :b :c6727; :b :c6728; :b :c6729; :b :c6730; :b :c6731; :b :c6732; :b :c6733; :b :c6734; :b :c6735; :b :c6736; :b :c6737; :b :c6738; :b :c6739; :b :c6740; :b :c6741; :b :c6742; :b :c6743; :b :c6744; :b :c6745; :b :c6746; :b :c6747; :b :c6748; :b :c6749; :b :c6750; :b :c6751; :b :c6752; :b :c6753; :b :c6754; :b :c6755; :b :c6756; :b :c6757; :b :c6758; :b :c6759; :b :c6760; :b :c6761; :b :c6762; :b :c6763; :b :c6764; :b :c6765; :b :c6766; :b :c6767; :b :c6768; :b :c6769; :b :c6770; :b :c6771; :b :c6772; :b :c6773; :b :c6774; :b :c6775; :b :c6776; :b :c6777; :b :c6778; :b :c6779; :b :c6780; :b :c6781; :b :c6782; :b :c6783; :b :c6784; :b :c6785; :b :c6786; :b :c6787; :b :c6788; :b :c6789; :b :c6790; :b :c6791; :b :c6792; :b :c6793; :b :c6794; :b :c6795; :b :c6796; :b :c6797; :b :c6798; :b :c6799; :b :c6800; :b :c6801; :b :c6802; :b :c6803; :b :c6804; :b :c6805; :b :c6806; :b :c6807; :b :c6808; :b :c6809; :b :c6810; :b :c6811; :b :c6812; :b :c6813; :b :c6814; :b :c6815; :b :c6816; :b :c6817; :b :c6818; :b :c6819; :b :c6820; :b :c6821; :b :c6822; :b :c6823; :b :c6824; :b :c6825; :b :c6826; :b :c6827; :b :c6828; :b :c6829; :b :c6830; :b :c6831; :b :c6832; :b :c6833; :b :c6834; :b :c6835; :b :c6836; :b :c6837; :b :c6838; :b :c6839; :b :c6840; :b :c6841; :b :c6842; :b :c6843; :b :c6844; :b :c6845; :b :c6846; :b :c6847; :b :c6848; :b :c6849; :b :c6850; :b :c6851; :b :c6852; :b :c6853; :b :c6854; :b :c6855; :b :c6856; :b :c6857; :b :c6858; :b :c6859; :b :c6860; :b :c6861; :b :c6862; :b :c6863; :b :c6864; :b :c6865; :b :c6866; :b :c6867; :b :c6868; :b :c6869; :b :c6870; :b :c6871; :b :c6872; :b :c6873; :b :c6874; :b :c6875; :b :c6876; :b :c6877; :b :c6878; :b :c6879; :b :c6880; :b :c6881; :b :c6882; :b :c6883; :b :c6884; :b :c6885; :b :c6886; :b :c6887; :b :c6888; :b :c6889; :b :c6890; :b :c6891; :b :c6892; :b :c6893; :b :c6894; :b :c6895; :b :c6896; :b :c6897; :b :c6898; :b :c6899; :b :c6900; :b :c6901; :b :c6902; :b :c6903; :b :c6904; :b :c6905; :b :c6906; :b :c6907; :b :c6908; :b :c6909; :b :c6910; :b :c6911; :b :c6912; :b :c6913; :b :c6914; :b :c6915; :b :c6916; :b :c6917; :b :c6918; :b :c6919; :b :c6920; :b :c6921; :b :c6922; :b :c6923; :b :c6924; :b :c6925; :b :c6926; :b :c6927; :b :c6928; :b :c6929; :b :c6930; :b :c6931; :b :c6932; :b :c6933; :b :c6934; :b :c6935; :b :c6936; :b :c6937; :b :c6938; :b :c6939; :b :c6940; :b :c6941; :b :c6942; :b :c6943; :b :c6944; :b :c6945; :b :c6946; :b :c6947; :b :c6948; :b :c6949; :b :c6950; :b :c6951; :b :c6952; :b :c6953; :b :c6954; :b :c6955; :b :c6956; :b :c6957; :b :c6958; :b :c6959; :b :c6960; :b :c6961; :b :c6962; :b :c6963; :b :c6964; :b :c6965; :b :c6966; :b :c6967; :b :c6968; :b :c6969; :b :c6970; :b :c6971; :b :c6972; :b :c6973; :b :c6974; :b :c6975; :b :c6976; :b :c6977; :b :c6978; :b :c6979; :b :c6980; :b :c6981; :b :c6982; :b :c6983; :b :c6984; :b :c6985; :b :c6986; :b :c6987; :b :c6988; :b :c6989; :b :c6990; :b :c6991; :b :c6992; :b :c6993; :b :c6994; :b :c6995; :b :c6996; :b :c6997; :b :c6998; :b :c6999; :b :c7000; :b :c7001; :b :c7002; :b :c7003; :b :c7004; :b :c7005; :b :c7006; :b :c7007; :b :c7008; :b :c7009; :b :c7010; :b :c7011; :b :c7012; :b :c7013; :b :c7014; :b :c7015; :b :c7016; :b :c7017; :b :c7018; :b :c7019; :b :c7020; :b :c7021; :b :c7022; :b :c7023; :b :c7024; :b :c7025; :b :c7026; :b :c7027; :b :c7028; :b :c7029; :b :c7030; :b :c7031; :b :c7032; :b :c7033; :b :c7034; :b :c7035; :b :c7036; :b :c7037; :b :c7038; :b :c7039; :b :c7040; :b :c7041; :b :c7042; :b :c7043; :b :c7044; :b :c7045; :b :c7046; :b :c7047; :b :c7048; :b :c7049; :b :c7050; :b :c7051; :b :c7052; :b :c7053; :b :c7054; :b :c7055; :b :c7056; :b :c7057; :b :c7058; :b :c7059; :b :c7060; :b :c7061; :b :c7062; :b :c7063; :b :c7064; :b :c7065; :b :c7066; :b :c7067; :b :c7068; :b :c7069; :b :c7070; :b :c7071; :b :c7072; :b :c7073; :b :c7074; :b :c7075; :b :c7076; :b :c7077; :b :c7078; :b :c7079; :b :c7080; :b :c7081; :b :c7082; :b :c7083; :b :c7084; :b :c7085; :b :c7086; :b :c7087; :b :c7088; :b :c7089; :b :c7090; :b :c7091; :b :c7092; :b :c7093; :b :c7094; :b :c7095; :b :c7096; :b :c7097; :b :c7098; :b :c7099; :b :c7100; :b :c7101; :b :c7102; :b :c7103; :b :c7104; :b :c7105; :b :c7106; :b :c7107; :b :c7108; :b :c7109; :b :c7110; :b :c7111; :b :c7112; :b :c7113; :b :c7114; :b :c7115; :b :c7116; :b :c7117; :b :c7118; :b :c7119; :b :c7120; :b :c7121; :b :c7122; :b :c7123; :b :c7124; :b :c7125; :b :c7126; :b :c7127; :b :c7128; :b :c7129; :b :c7130; :b :c7131; :b :c7132; :b :c7133; :b :c7134; :b :c7135; :b :c7136; :b :c7137; :b :c7138; :b :c7139; :b :c7140; :b :c7141; :b :c7142; :b :c7143; :b :c7144; :b :c7145; :b :c7146; :b :c7147; :b :c7148; :b :c7149; :b :c7150; :b :c7151; :b :c7152; :b :c7153; :b :c7154; :b :c7155; :b :c7156; :b :c7157; :b :c7158; :b :c7159; :b :c7160; :b :c7161; :b :c7162; :b :c7163; :b :c7164; :b :c7165; :b :c7166; :b :c7167; :b :c7168; :b :c7169; :b :c7170; :b :c7171; :b :c7172; :b :c7173; :b :c7174; :b :c7175; :b :c7176; :b :c7177; :b :c7178; :b :c7179; :b :c7180; :b :c7181; :b :c7182; :b :c7183; :b :c7184; :b :c7185; :b :c7186; :b :c7187; :b :c7188; :b :c7189; :b :c7190; :b :c7191; :b :c7192; :b :c7193; :b :c7194; :b :c7195; :b :c7196; :b :c7197; :b :c7198; :b :c7199; :b :c7200; :b :c7201; :b :c7202; :b :c7203; :b :c7204; :b :c7205; :b :c7206; :b :c7207; :b :c7208; :b :c7209; :b :c7210; :b :c7211; :b :c7212; :b :c7213; :b :c7214; :b :c7215; :b :c7216; :b :c7217; :b :c7218; :b :c7219; :b :c7220; :b :c7221; :b :c7222; :b :c7223; :b :c7224; :b :c7225; :b :c7226; :b :c7227; :b :c7228; :b :c7229; :b :c7230; :b :c7231; :b :c7232; :b :c7233; :b :c7234; :b :c7235; :b :c7236; :b :c7237; :b :c7238; :b :c7239; :b :c7240; :b :c7241; :b :c7242; :b :c7243; :b :c7244; :b :c7245; :b :c7246; :b :c7247; :b :c7248; :b :c7249; :b :c7250; :b :c7251; :b :c7252; :b :c7253; :b :c7254; :b :c7255; :b :c7256; :b :c7257; :b :c7258; :b :c7259; :b :c7260; :b :c7261; :b :c7262; :b :c7263; :b :c7264; :b :c7265; :b :c7266; :b :c7267; :b :c7268; :b :c7269; :b :c7270; :b :c7271; :b :c7272; :b :c7273; :b :c7274; :b :c7275; :b :c7276; :b :c7277; :b :c7278; :b :c7279; :b :c7280; :b :c7281; :b :c7282; :b :c7283; :b :c7284; :b :c7285; :b :c7286; :b :c7287; :b :c7288; :b :c7289; :b :c7290; :b :c7291; :b :c7292; :b :c7293; :b :c7294; :b :c7295; :b :c7296; :b :c7297; :b :c7298; :b :c7299; :b :c7300; :b :c7301; :b :c7302; :b :c7303; :b :c7304; :b :c7305; :b :c7306; :b :c7307; :b :c7308; :b :c7309; :b :c7310; :b :c7311; :b :c7312; :b :c7313; :b :c7314; :b :c7315; :b :c7316; :b :c7317; :b :c7318; :b :c7319; :b :c7320; :b :c7321; :b :c7322; :b :c7323; :b :c7324; :b :c7325; :b :c7326; :b :c7327; :b :c7328; :b :c7329; :b :c7330; :b :c7331; :b :c7332; :b :c7333; :b :c7334; :b :c7335; :b :c7336; :b :c7337; :b :c7338; :b :c7339; :b :c7340; :b :c7341; :b :c7342; :b :c7343; :b :c7344; :b :c7345; :b :c7346; :b :c7347; :b :c7348; :b :c7349; :b :c7350; :b :c7351; :b :c7352; :b :c7353; :b :c7354; :b :c7355; :b :c7356; :b :c7357; :b :c7358; :b :c7359; :b :c7360; :b :c7361; :b :c7362; :b :c7363; :b :c7364; :b :c7365; :b :c7366; :b :c7367; :b :c7368; :b :c7369; :b :c7370; :b :c7371; :b :c7372; :b :c7373; :b :c7374; :b :c7375; :b :c7376; :b :c7377; :b :c7378; :b :c7379; :b :c7380; :b :c7381; :b :c7382; :b :c7383; :b :c7384; :b :c7385; :b :c7386; :b :c7387; :b :c7388; :b :c7389; :b :c7390; :b :c7391; :b :c7392; :b :c7393; :b :c7394; :b :c7395; :b :c7396; :b :c7397; :b :c7398; :b :c7399; :b :c7400; :b :c7401; :b :c7402; :b :c7403; :b :c7404; :b :c7405; :b :c7406; :b :c7407; :b :c7408; :b :c7409; :b :c7410; :b :c7411; :b :c7412; :b :c7413; :b :c7414; :b :c7415; :b :c7416; :b :c7417; :b :c7418; :b :c7419; :b :c7420; :b :c7421; :b :c7422; :b :c7423; :b :c7424; :b :c7425; :b :c7426; :b :c7427; :b :c7428; :b :c7429; :b :c7430; :b :c7431; :b :c7432; :b :c7433; :b :c7434; :b :c7435; :b :c7436; :b :c7437; :b :c7438; :b :c7439; :b :c7440; :b :c7441; :b :c7442; :b :c7443; :b :c7444; :b :c7445; :b :c7446; :b :c7447; :b :c7448; :b :c7449; :b :c7450; :b :c7451; :b :c7452; :b :c7453; :b :c7454; :b :c7455; :b :c7456; :b :c7457; :b :c7458; :b :c7459; :b :c7460; :b :c7461; :b :c7462; :b :c7463; :b :c7464; :b :c7465; :b :c7466; :b :c7467; :b :c7468; :b :c7469; :b :c7470; :b :c7471; :b :c7472; :b :c7473; :b :c7474; :b :c7475; :b :c7476; :b :c7477; :b :c7478; :b :c7479; :b :c7480; :b :c7481; :b :c7482; :b :c7483; :b :c7484; :b :c7485; :b :c7486; :b :c7487; :b :c7488; :b :c7489; :b :c7490; :b :c7491; :b :c7492; :b :c7493; :b :c7494; :b :c7495; :b :c7496; :b :c7497; :b :c7498; :b :c7499; :b :c7500; :b :c7501; :b :c7502; :b :c7503; :b :c7504; :b :c7505; :b :c7506; :b :c7507; :b :c7508; :b :c7509; :b :c7510; :b :c7511; :b :c7512; :b :c7513; :b :c7514; :b :c7515; :b :c7516; :b :c7517; :b :c7518; :b :c7519; :b :c7520; :b :c7521; :b :c7522; :b :c7523; :b :c7524; :b :c7525; :b :c7526; :b :c7527; :b :c7528; :b :c7529; :b :c7530; :b :c7531; :b :c7532; :b :c7533; :b :c7534; :b :c7535; :b :c7536; :b :c7537; :b :c7538; :b :c7539; :b :c7540; :b :c7541; :b :c7542; :b :c7543; :b :c7544; :b :c7545; :b :c7546; :b :c7547; :b :c7548; :b :c7549; :b :c7550; :b :c7551; :b :c7552; :b :c7553; :b :c7554; :b :c7555; :b :c7556; :b :c7557; :b :c7558; :b :c7559; :b :c7560; :b :c7561; :b :c7562; :b :c7563; :b :c7564; :b :c7565; :b :c7566; :b :c7567; :b :c7568; :b :c7569; :b :c7570; :b :c7571; :b :c7572; :b :c7573; :b :c7574; :b :c7575; :b :c7576; :b :c7577; :b :c7578; :b :c7579; :b :c7580; :b :c7581; :b :c7582; :b :c7583; :b :c7584; :b :c7585; :b :c7586; :b :c7587; :b :c7588; :b :c7589; :b :c7590; :b :c7591; :b :c7592; :b :c7593; :b :c7594; :b :c7595; :b :c7596; :b :c7597; :b :c7598; :b :c7599; :b :c7600; :b :c7601; :b :c7602; :b :c7603; :b :c7604; :b :c7605; :b :c7606; :b :c7607; :b :c7608; :b :c7609; :b :c7610; :b :c7611; :b :c7612; :b :c7613; :b :c7614; :b :c7615; :b :c7616; :b :c7617; :b :c7618; :b :c7619; :b :c7620; :b :c7621; :b :c7622; :b :c7623; :b :c7624; :b :c7625; :b :c7626; :b :c7627; :b :c7628; :b :c7629; :b :c7630; :b :c7631; :b :c7632; :b :c7633; :b :c7634; :b :c7635; :b :c7636; :b :c7637; :b :c7638; :b :c7639; :b :c7640; :b :c7641; :b :c7642; :b :c7643; :b :c7644; :b :c7645; :b :c7646; :b :c7647; :b :c7648; :b :c7649; :b :c7650; :b :c7651; :b :c7652; :b :c7653; :b :c7654; :b :c7655; :b :c7656; :b :c7657; :b :c7658; :b :c7659; :b :c7660; :b :c7661; :b :c7662; :b :c7663; :b :c7664; :b :c7665; :b :c7666; :b :c7667; :b :c7668; :b :c7669; :b :c7670; :b :c7671; :b :c7672; :b :c7673; :b :c7674; :b :c7675; :b :c7676; :b :c7677; :b :c7678; :b :c7679; :b :c7680; :b :c7681; :b :c7682; :b :c7683; :b :c7684; :b :c7685; :b :c7686; :b :c7687; :b :c7688; :b :c7689; :b :c7690; :b :c7691; :b :c7692; :b :c7693; :b :c7694; :b :c7695; :b :c7696; :b :c7697; :b :c7698; :b :c7699; :b :c7700; :b :c7701; :b :c7702; :b :c7703; :b :c7704; :b :c7705; :b :c7706; :b :c7707; :b :c7708; :b :c7709; :b :c7710; :b :c7711; :b :c7712; :b :c7713; :b :c7714; :b :c7715; :b :c7716; :b :c7717; :b :c7718; :b :c7719; :b :c7720; :b :c7721; :b :c7722; :b :c7723; :b :c7724; :b :c7725; :b :c7726; :b :c7727; :b :c7728; :b :c7729; :b :c7730; :b :c7731; :b :c7732; :b :c7733; :b :c7734; :b :c7735; :b :c7736; :b :c7737; :b :c7738; :b :c7739; :b :c7740; :b :c7741; :b :c7742; :b :c7743; :b :c7744; :b :c7745; :b :c7746; :b :c7747; :b :c7748; :b :c7749; :b :c7750; :b :c7751; :b :c7752; :b :c7753; :b :c7754; :b :c7755; :b :c7756; :b :c7757; :b :c7758; :b :c7759; :b :c7760; :b :c7761; :b :c7762; :b :c7763; :b :c7764; :b :c7765; :b :c7766; :b :c7767; :b :c7768; :b :c7769; :b :c7770; :b :c7771; :b :c7772; :b :c7773; :b :c7774; :b :c7775; :b :c7776; :b :c7777; :b :c7778; :b :c7779; :b :c7780; :b :c7781; :b :c7782; :b :c7783; :b :c7784; :b :c7785; :b :c7786; :b :c7787; :b :c7788; :b :c7789; :b :c7790; :b :c7791; :b :c7792; :b :c7793; :b :c7794; :b :c7795; :b :c7796; :b :c7797; :b :c7798; :b :c7799; :b :c7800; :b :c7801; :b :c7802; :b :c7803; :b :c7804; :b :c7805; :b :c7806; :b :c7807; :b :c7808; :b :c7809; :b :c7810; :b :c7811; :b :c7812; :b :c7813; :b :c7814; :b :c7815; :b :c7816; :b :c7817; :b :c7818; :b :c7819; :b :c7820; :b :c7821; :b :c7822; :b :c7823; :b :c7824; :b :c7825; :b :c7826; :b :c7827; :b :c7828; :b :c7829; :b :c7830; :b :c7831; :b :c7832; :b :c7833; :b :c7834; :b :c7835; :b :c7836; :b :c7837; :b :c7838; :b :c7839; :b :c7840; :b :c7841; :b :c7842; :b :c7843; :b :c7844; :b :c7845; :b :c7846; :b :c7847; :b :c7848; :b :c7849; :b :c7850; :b :c7851; :b :c7852; :b :c7853; :b :c7854; :b :c7855; :b :c7856; :b :c7857; :b :c7858; :b :c7859; :b :c7860; :b :c7861; :b :c7862; :b :c7863; :b :c7864; :b :c7865; :b :c7866; :b :c7867; :b :c7868; :b :c7869; :b :c7870; :b :c7871; :b :c7872; :b :c7873; :b :c7874; :b :c7875; :b :c7876; :b :c7877; :b :c7878; :b :c7879; :b :c7880; :b :c7881; :b :c7882; :b :c7883; :b :c7884; :b :c7885; :b :c7886; :b :c7887; :b :c7888; :b :c7889; :b :c7890; :b :c7891; :b :c7892; :b :c7893; :b :c7894; :b :c7895; :b :c7896; :b :c7897; :b :c7898; :b :c7899; :b :c7900; :b :c7901; :b :c7902; :b :c7903; :b :c7904; :b :c7905; :b :c7906; :b :c7907; :b :c7908; :b :c7909; :b :c7910; :b :c7911; :b :c7912; :b :c7913; :b :c7914; :b :c7915; :b :c7916; :b :c7917; :b :c7918; :b :c7919; :b :c7920; :b :c7921; :b :c7922; :b :c7923; :b :c7924; :b :c7925; :b :c7926; :b :c7927; :b :c7928; :b :c7929; :b :c7930; :b :c7931; :b :c7932; :b :c7933; :b :c7934; :b :c7935; :b :c7936; :b :c7937; :b :c7938; :b :c7939; :b :c7940; :b :c7941; :b :c7942; :b :c7943; :b :c7944; :b :c7945; :b :c7946; :b :c7947; :b :c7948; :b :c7949; :b :c7950; :b :c7951; :b :c7952; :b :c7953; :b :c7954; :b :c7955; :b :c7956; :b :c7957; :b :c7958; :b :c7959; :b :c7960; :b :c7961; :b :c7962; :b :c7963; :b :c7964; :b :c7965; :b :c7966; :b :c7967; :b :c7968; :b :c7969; :b :c7970; :b :c7971; :b :c7972; :b :c7973; :b :c7974; :b :c7975; :b :c7976; :b :c7977; :b :c7978; :b :c7979; :b :c7980; :b :c7981; :b :c7982; :b :c7983; :b :c7984; :b :c7985; :b :c7986; :b :c7987; :b :c7988; :b :c7989; :b :c7990; :b :c7991; :b :c7992; :b :c7993; :b :c7994; :b :c7995; :b :c7996; :b :c7997; :b :c7998; :b :c7999; :b :c8000; :b :c8001; :b :c8002; :b :c8003; :b :c8004; :b :c8005; :b :c8006; :b :c8007; :b :c8008; :b :c8009; :b :c8010; :b :c8011; :b :c8012; :b :c8013; :b :c8014; :b :c8015; :b :c8016; :b :c8017; :b :c8018; :b :c8019; :b :c8020; :b :c8021; :b :c8022; :b :c8023; :b :c8024; :b :c8025; :b :c8026; :b :c8027; :b :c8028; :b :c8029; :b :c8030; :b :c8031; :b :c8032; :b :c8033; :b :c8034; :b :c8035; :b :c8036; :b :c8037; :b :c8038; :b :c8039; :b :c8040; :b :c8041; :b :c8042; :b :c8043; :b :c8044; :b :c8045; :b :c8046; :b :c8047; :b :c8048; :b :c8049; :b :c8050; :b :c8051; :b :c8052; :b :c8053; :b :c8054; :b :c8055; :b :c8056; :b :c8057; :b :c8058; :b :c8059; :b :c8060; :b :c8061; :b :c8062; :b :c8063; :b :c8064; :b :c8065; :b :c8066; :b :c8067; :b :c8068; :b :c8069; :b :c8070; :b :c8071; :b :c8072; :b :c8073; :b :c8074; :b :c8075; :b :c8076; :b :c8077; :b :c8078; :b :c8079; :b :c8080; :b :c8081; :b :c8082; :b :c8083; :b :c8084; :b :c8085; :b :c8086; :b :c8087; :b :c8088; :b :c8089; :b :c8090; :b :c8091; :b :c8092; :b :c8093; :b :c8094; :b :c8095; :b :c8096; :b :c8097; :b :c8098; :b :c8099; :b :c8100; :b :c8101; :b :c8102; :b :c8103; :b :c8104; :b :c8105; :b :c8106; :b :c8107; :b :c8108; :b :c8109; :b :c8110; :b :c8111; :b :c8112; :b :c8113; :b :c8114; :b :c8115; :b :c8116; :b :c8117; :b :c8118; :b :c8119; :b :c8120; :b :c8121; :b :c8122; :b :c8123; :b :c8124; :b :c8125; :b :c8126; :b :c8127; :b :c8128; :b :c8129; :b :c8130; :b :c8131; :b :c8132; :b :c8133; :b :c8134; :b :c8135; :b :c8136; :b :c8137; :b :c8138; :b :c8139; :b :c8140; :b :c8141; :b :c8142; :b :c8143; :b :c8144; :b :c8145; :b :c8146; :b :c8147; :b :c8148; :b :c8149; :b :c8150; :b :c8151; :b :c8152; :b :c8153; :b :c8154; :b :c8155; :b :c8156; :b :c8157; :b :c8158; :b :c8159; :b :c8160; :b :c8161; :b :c8162; :b :c8163; :b :c8164; :b :c8165; :b :c8166; :b :c8167; :b :c8168; :b :c8169; :b :c8170; :b :c8171; :b :c8172; :b :c8173; :b :c8174; :b :c8175; :b :c8176; :b :c8177; :b :c8178; :b :c8179; :b :c8180; :b :c8181; :b :c8182; :b :c8183; :b :c8184; :b :c8185; :b :c8186; :b :c8187; :b :c8188; :b :c8189; :b :c8190; :b :c8191; :b :c8192; :b :c8193; :b :c8194; :b :c8195; :b :c8196; :b :c8197; :b :c8198; :b :c8199; :b :c8200; :b :c8201; :b :c8202; :b :c8203; :b :c8204; :b :c8205; :b :c8206; :b :c8207; :b :c8208; :b :c8209; :b :c8210; :b :c8211; :b :c8212; :b :c8213; :b :c8214; :b :c8215; :b :c8216; :b :c8217; :b :c8218; :b :c8219; :b :c8220; :b :c8221; :b :c8222; :b :c8223; :b :c8224; :b :c8225; :b :c8226; :b :c8227; :b :c8228; :b :c8229; :b :c8230; :b :c8231; :b :c8232; :b :c8233; :b :c8234; :b :c8235; :b :c8236; :b :c8237; :b :c8238; :b :c8239; :b :c8240; :b :c8241; :b :c8242; :b :c8243; :b :c8244; :b :c8245; :b :c8246; :b :c8247; :b :c8248; :b :c8249; :b :c8250; :b :c8251; :b :c8252; :b :c8253; :b :c8254; :b :c8255; :b :c8256; :b :c8257; :b :c8258; :b :c8259; :b :c8260; :b :c8261; :b :c8262; :b :c8263; :b :c8264; :b :c8265; :b :c8266; :b :c8267; :b :c8268; :b :c8269; :b :c8270; :b :c8271; :b :c8272; :b :c8273; :b :c8274; :b :c8275; :b :c8276; :b :c8277; :b :c8278; :b :c8279; :b :c8280; :b :c8281; :b :c8282; :b :c8283; :b :c8284; :b :c8285; :b :c8286; :b :c8287; :b :c8288; :b :c8289; :b :c8290; :b :c8291; :b :c8292; :b :c8293; :b :c8294; :b :c8295; :b :c8296; :b :c8297; :b :c8298; :b :c8299; :b :c8300; :b :c8301; :b :c8302; :b :c8303; :b :c8304; :b :c8305; :b :c8306; :b :c8307; :b :c8308; :b :c8309; :b :c8310; :b :c8311; :b :c8312; :b :c8313; :b :c8314; :b :c8315; :b :c8316; :b :c8317; :b :c8318; :b :c8319; :b :c8320; :b :c8321; :b :c8322; :b :c8323; :b :c8324; :b :c8325; :b :c8326; :b :c8327; :b :c8328; :b :c8329; :b :c8330; :b :c8331; :b :c8332; :b :c8333; :b :c8334; :b :c8335; :b :c8336; :b :c8337; :b :c8338; :b :c8339; :b :c8340; :b :c8341; :b :c8342; :b :c8343; :b :c8344; :b :c8345; :b :c8346; :b :c8347; :b :c8348; :b :c8349; :b :c8350; :b :c8351; :b :c8352; :b :c8353; :b :c8354; :b :c8355; :b :c8356; :b :c8357; :b :c8358; :b :c8359; :b :c8360; :b :c8361; :b :c8362; :b :c8363; :b :c8364; :b :c8365; :b :c8366; :b :c8367; :b :c8368; :b :c8369; :b :c8370; :b :c8371; :b :c8372; :b :c8373; :b :c8374; :b :c8375; :b :c8376; :b :c8377; :b :c8378; :b :c8379; :b :c8380; :b :c8381; :b :c8382; :b :c8383; :b :c8384; :b :c8385; :b :c8386; :b :c8387; :b :c8388; :b :c8389; :b :c8390; :b :c8391; :b :c8392; :b :c8393; :b :c8394; :b :c8395; :b :c8396; :b :c8397; :b :c8398; :b :c8399; :b :c8400; :b :c8401; :b :c8402; :b :c8403; :b :c8404; :b :c8405; :b :c8406; :b :c8407; :b :c8408; :b :c8409; :b :c8410; :b :c8411; :b :c8412; :b :c8413; :b :c8414; :b :c8415; :b :c8416; :b :c8417; :b :c8418; :b :c8419; :b :c8420; :b :c8421; :b :c8422; :b :c8423; :b :c8424; :b :c8425; :b :c8426; :b :c8427; :b :c8428; :b :c8429; :b :c8430; :b :c8431; :b :c8432; :b :c8433; :b :c8434; :b :c8435; :b :c8436; :b :c8437; :b :c8438; :b :c8439; :b :c8440; :b :c8441; :b :c8442; :b :c8443; :b :c8444; :b :c8445; :b :c8446; :b :c8447; :b :c8448; :b :c8449; :b :c8450; :b :c8451; :b :c8452; :b :c8453; :b :c8454; :b :c8455; :b :c8456; :b :c8457; :b :c8458; :b :c8459; :b :c8460; :b :c8461; :b :c8462; :b :c8463; :b :c8464; :b :c8465; :b :c8466; :b :c8467; :b :c8468; :b :c8469; :b :c8470; :b :c8471; :b :c8472; :b :c8473; :b :c8474; :b :c8475; :b :c8476; :b :c8477; :b :c8478; :b :c8479; :b :c8480; :b :c8481; :b :c8482; :b :c8483; :b :c8484; :b :c8485; :b :c8486; :b :c8487; :b :c8488; :b :c8489; :b :c8490; :b :c8491; :b :c8492; :b :c8493; :b :c8494; :b :c8495; :b :c8496; :b :c8497; :b :c8498; :b :c8499; :b :c8500; :b :c8501; :b :c8502; :b :c8503; :b :c8504; :b :c8505; :b :c8506; :b :c8507; :b :c8508; :b :c8509; :b :c8510; :b :c8511; :b :c8512; :b :c8513; :b :c8514; :b :c8515; :b :c8516; :b :c8517; :b :c8518; :b :c8519; :b :c8520; :b :c8521; :b :c8522; :b :c8523; :b :c8524; :b :c8525; :b :c8526; :b :c8527; :b :c8528; :b :c8529; :b :c8530; :b :c8531; :b :c8532; :b :c8533; :b :c8534; :b :c8535; :b :c8536; :b :c8537; :b :c8538; :b :c8539; :b :c8540; :b :c8541; :b :c8542; :b :c8543; :b :c8544; :b :c8545; :b :c8546; :b :c8547; :b :c8548; :b :c8549; :b :c8550; :b :c8551; :b :c8552; :b :c8553; :b :c8554; :b :c8555; :b :c8556; :b :c8557; :b :c8558; :b :c8559; :b :c8560; :b :c8561; :b :c8562; :b :c8563; :b :c8564; :b :c8565; :b :c8566; :b :c8567; :b :c8568; :b :c8569; :b :c8570; :b :c8571; :b :c8572; :b :c8573; :b :c8574; :b :c8575; :b :c8576; :b :c8577; :b :c8578; :b :c8579; :b :c8580; :b :c8581; :b :c8582; :b :c8583; :b :c8584; :b :c8585; :b :c8586; :b :c8587; :b :c8588; :b :c8589; :b :c8590; :b :c8591; :b :c8592; :b :c8593; :b :c8594; :b :c8595; :b :c8596; :b :c8597; :b :c8598; :b :c8599; :b :c8600; :b :c8601; :b :c8602; :b :c8603; :b :c8604; :b :c8605; :b :c8606; :b :c8607; :b :c8608; :b :c8609; :b :c8610; :b :c8611; :b :c8612; :b :c8613; :b :c8614; :b :c8615; :b :c8616; :b :c8617; :b :c8618; :b :c8619; :b :c8620; :b :c8621; :b :c8622; :b :c8623; :b :c8624; :b :c8625; :b :c8626; :b :c8627; :b :c8628; :b :c8629; :b :c8630; :b :c8631; :b :c8632; :b :c8633; :b :c8634; :b :c8635; :b :c8636; :b :c8637; :b :c8638; :b :c8639; :b :c8640; :b :c8641; :b :c8642; :b :c8643; :b :c8644; :b :c8645; :b :c8646; :b :c8647; :b :c8648; :b :c8649; :b :c8650; :b :c8651; :b :c8652; :b :c8653; :b :c8654; :b :c8655; :b :c8656; :b :c8657; :b :c8658; :b :c8659; :b :c8660; :b :c8661; :b :c8662; :b :c8663; :b :c8664; :b :c8665; :b :c8666; :b :c8667; :b :c8668; :b :c8669; :b :c8670; :b :c8671; :b :c8672; :b :c8673; :b :c8674; :b :c8675; :b :c8676; :b :c8677; :b :c8678; :b :c8679; :b :c8680; :b :c8681; :b :c8682; :b :c8683; :b :c8684; :b :c8685; :b :c8686; :b :c8687; :b :c8688; :b :c8689; :b :c8690; :b :c8691; :b :c8692; :b :c8693; :b :c8694; :b :c8695; :b :c8696; :b :c8697; :b :c8698; :b :c8699; :b :c8700; :b :c8701; :b :c8702; :b :c8703; :b :c8704; :b :c8705; :b :c8706; :b :c8707; :b :c8708; :b :c8709; :b :c8710; :b :c8711; :b :c8712; :b :c8713; :b :c8714; :b :c8715; :b :c8716; :b :c8717; :b :c8718; :b :c8719; :b :c8720; :b :c8721; :b :c8722; :b :c8723; :b :c8724; :b :c8725; :b :c8726; :b :c8727; :b :c8728; :b :c8729; :b :c8730; :b :c8731; :b :c8732; :b :c8733; :b :c8734; :b :c8735; :b :c8736; :b :c8737; :b :c8738; :b :c8739; :b :c8740; :b :c8741; :b :c8742; :b :c8743; :b :c8744; :b :c8745; :b :c8746; :b :c8747; :b :c8748; :b :c8749; :b :c8750; :b :c8751; :b :c8752; :b :c8753; :b :c8754; :b :c8755; :b :c8756; :b :c8757; :b :c8758; :b :c8759; :b :c8760; :b :c8761; :b :c8762; :b :c8763; :b :c8764; :b :c8765; :b :c8766; :b :c8767; :b :c8768; :b :c8769; :b :c8770; :b :c8771; :b :c8772; :b :c8773; :b :c8774; :b :c8775; :b :c8776; :b :c8777; :b :c8778; :b :c8779; :b :c8780; :b :c8781; :b :c8782; :b :c8783; :b :c8784; :b :c8785; :b :c8786; :b :c8787; :b :c8788; :b :c8789; :b :c8790; :b :c8791; :b :c8792; :b :c8793; :b :c8794; :b :c8795; :b :c8796; :b :c8797; :b :c8798; :b :c8799; :b :c8800; :b :c8801; :b :c8802; :b :c8803; :b :c8804; :b :c8805; :b :c8806; :b :c8807; :b :c8808; :b :c8809; :b :c8810; :b :c8811; :b :c8812; :b :c8813; :b :c8814; :b :c8815; :b :c8816; :b :c8817; :b :c8818; :b :c8819; :b :c8820; :b :c8821; :b :c8822; :b :c8823; :b :c8824; :b :c8825; :b :c8826; :b :c8827; :b :c8828; :b :c8829; :b :c8830; :b :c8831; :b :c8832; :b :c8833; :b :c8834; :b :c8835; :b :c8836; :b :c8837; :b :c8838; :b :c8839; :b :c8840; :b :c8841; :b :c8842; :b :c8843; :b :c8844; :b :c8845; :b :c8846; :b :c8847; :b :c8848; :b :c8849; :b :c8850; :b :c8851; :b :c8852; :b :c8853; :b :c8854; :b :c8855; :b :c8856; :b :c8857; :b :c8858; :b :c8859; :b :c8860; :b :c8861; :b :c8862; :b :c8863; :b :c8864; :b :c8865; :b :c8866; :b :c8867; :b :c8868; :b :c8869; :b :c8870; :b :c8871; :b :c8872; :b :c8873; :b :c8874; :b :c8875; :b :c8876; :b :c8877; :b :c8878; :b :c8879; :b :c8880; :b :c8881; :b :c8882; :b :c8883; :b :c8884; :b :c8885; :b :c8886; :b :c8887; :b :c8888; :b :c8889; :b :c8890; :b :c8891; :b :c8892; :b :c8893; :b :c8894; :b :c8895; :b :c8896; :b :c8897; :b :c8898; :b :c8899; :b :c8900; :b :c8901; :b :c8902; :b :c8903; :b :c8904; :b :c8905; :b :c8906; :b :c8907; :b :c8908; :b :c8909; :b :c8910; :b :c8911; :b :c8912; :b :c8913; :b :c8914; :b :c8915; :b :c8916; :b :c8917; :b :c8918; :b :c8919; :b :c8920; :b :c8921; :b :c8922; :b :c8923; :b :c8924; :b :c8925; :b :c8926; :b :c8927; :b :c8928; :b :c8929; :b :c8930; :b :c8931; :b :c8932; :b :c8933; :b :c8934; :b :c8935; :b :c8936; :b :c8937; :b :c8938; :b :c8939; :b :c8940; :b :c8941; :b :c8942; :b :c8943; :b :c8944; :b :c8945; :b :c8946; :b :c8947; :b :c8948; :b :c8949; :b :c8950; :b :c8951; :b :c8952; :b :c8953; :b :c8954; :b :c8955; :b :c8956; :b :c8957; :b :c8958; :b :c8959; :b :c8960; :b :c8961; :b :c8962; :b :c8963; :b :c8964; :b :c8965; :b :c8966; :b :c8967; :b :c8968; :b :c8969; :b :c8970; :b :c8971; :b :c8972; :b :c8973; :b :c8974; :b :c8975; :b :c8976; :b :c8977; :b :c8978; :b :c8979; :b :c8980; :b :c8981; :b :c8982; :b :c8983; :b :c8984; :b :c8985; :b :c8986; :b :c8987; :b :c8988; :b :c8989; :b :c8990; :b :c8991; :b :c8992; :b :c8993; :b :c8994; :b :c8995; :b :c8996; :b :c8997; :b :c8998; :b :c8999; :b :c9000; :b :c9001; :b :c9002; :b :c9003; :b :c9004; :b :c9005; :b :c9006; :b :c9007; :b :c9008; :b :c9009; :b :c9010; :b :c9011; :b :c9012; :b :c9013; :b :c9014; :b :c9015; :b :c9016; :b :c9017; :b :c9018; :b :c9019; :b :c9020; :b :c9021; :b :c9022; :b :c9023; :b :c9024; :b :c9025; :b :c9026; :b :c9027; :b :c9028; :b :c9029; :b :c9030; :b :c9031; :b :c9032; :b :c9033; :b :c9034; :b :c9035; :b :c9036; :b :c9037; :b :c9038; :b :c9039; :b :c9040; :b :c9041; :b :c9042; :b :c9043; :b :c9044; :b :c9045; :b :c9046; :b :c9047; :b :c9048; :b :c9049; :b :c9050; :b :c9051; :b :c9052; :b :c9053; :b :c9054; :b :c9055; :b :c9056; :b :c9057; :b :c9058; :b :c9059; :b :c9060; :b :c9061; :b :c9062; :b :c9063; :b :c9064; :b :c9065; :b :c9066; :b :c9067; :b :c9068; :b :c9069; :b :c9070; :b :c9071; :b :c9072; :b :c9073; :b :c9074; :b :c9075; :b :c9076; :b :c9077; :b :c9078; :b :c9079; :b :c9080; :b :c9081; :b :c9082; :b :c9083; :b :c9084; :b :c9085; :b :c9086; :b :c9087; :b :c9088; :b :c9089; :b :c9090; :b :c9091; :b :c9092; :b :c9093; :b :c9094; :b :c9095; :b :c9096; :b :c9097; :b :c9098; :b :c9099; :b :c9100; :b :c9101; :b :c9102; :b :c9103; :b :c9104; :b :c9105; :b :c9106; :b :c9107; :b :c9108; :b :c9109; :b :c9110; :b :c9111; :b :c9112; :b :c9113; :b :c9114; :b :c9115; :b :c9116; :b :c9117; :b :c9118; :b :c9119; :b :c9120; :b :c9121; :b :c9122; :b :c9123; :b :c9124; :b :c9125; :b :c9126; :b :c9127; :b :c9128; :b :c9129; :b :c9130; :b :c9131; :b :c9132; :b :c9133; :b :c9134; :b :c9135; :b :c9136; :b :c9137; :b :c9138; :b :c9139; :b :c9140; :b :c9141; :b :c9142; :b :c9143; :b :c9144; :b :c9145; :b :c9146; :b :c9147; :b :c9148; :b :c9149; :b :c9150; :b :c9151; :b :c9152; :b :c9153; :b :c9154; :b :c9155; :b :c9156; :b :c9157; :b :c9158; :b :c9159; :b :c9160; :b :c9161; :b :c9162; :b :c9163; :b :c9164; :b :c9165; :b :c9166; :b :c9167; :b :c9168; :b :c9169; :b :c9170; :b :c9171; :b :c9172; :b :c9173; :b :c9174; :b :c9175; :b :c9176; :b :c9177; :b :c9178; :b :c9179; :b :c9180; :b :c9181; :b :c9182; :b :c9183; :b :c9184; :b :c9185; :b :c9186; :b :c9187; :b :c9188; :b :c9189; :b :c9190; :b :c9191; :b :c9192; :b :c9193; :b :c9194; :b :c9195; :b :c9196; :b :c9197; :b :c9198; :b :c9199; :b :c9200; :b :c9201; :b :c9202; :b :c9203; :b :c9204; :b :c9205; :b :c9206; :b :c9207; :b :c9208; :b :c9209; :b :c9210; :b :c9211; :b :c9212; :b :c9213; :b :c9214; :b :c9215; :b :c9216; :b :c9217; :b :c9218; :b :c9219; :b :c9220; :b :c9221; :b :c9222; :b :c9223; :b :c9224; :b :c9225; :b :c9226; :b :c9227; :b :c9228; :b :c9229; :b :c9230; :b :c9231; :b :c9232; :b :c9233; :b :c9234; :b :c9235; :b :c9236; :b :c9237; :b :c9238; :b :c9239; :b :c9240; :b :c9241; :b :c9242; :b :c9243; :b :c9244; :b :c9245; :b :c9246; :b :c9247; :b :c9248; :b :c9249; :b :c9250; :b :c9251; :b :c9252; :b :c9253; :b :c9254; :b :c9255; :b :c9256; :b :c9257; :b :c9258; :b :c9259; :b :c9260; :b :c9261; :b :c9262; :b :c9263; :b :c9264; :b :c9265; :b :c9266; :b :c9267; :b :c9268; :b :c9269; :b :c9270; :b :c9271; :b :c9272; :b :c9273; :b :c9274; :b :c9275; :b :c9276; :b :c9277; :b :c9278; :b :c9279; :b :c9280; :b :c9281; :b :c9282; :b :c9283; :b :c9284; :b :c9285; :b :c9286; :b :c9287; :b :c9288; :b :c9289; :b :c9290; :b :c9291; :b :c9292; :b :c9293; :b :c9294; :b :c9295; :b :c9296; :b :c9297; :b :c9298; :b :c9299; :b :c9300; :b :c9301; :b :c9302; :b :c9303; :b :c9304; :b :c9305; :b :c9306; :b :c9307; :b :c9308; :b :c9309; :b :c9310; :b :c9311; :b :c9312; :b :c9313; :b :c9314; :b :c9315; :b :c9316; :b :c9317; :b :c9318; :b :c9319; :b :c9320; :b :c9321; :b :c9322; :b :c9323; :b :c9324; :b :c9325; :b :c9326; :b :c9327; :b :c9328; :b :c9329; :b :c9330; :b :c9331; :b :c9332; :b :c9333; :b :c9334; :b :c9335; :b :c9336; :b :c9337; :b :c9338; :b :c9339; :b :c9340; :b :c9341; :b :c9342; :b :c9343; :b :c9344; :b :c9345; :b :c9346; :b :c9347; :b :c9348; :b :c9349; :b :c9350; :b :c9351; :b :c9352; :b :c9353; :b :c9354; :b :c9355; :b :c9356; :b :c9357; :b :c9358; :b :c9359; :b :c9360; :b :c9361; :b :c9362; :b :c9363; :b :c9364; :b :c9365; :b :c9366; :b :c9367; :b :c9368; :b :c9369; :b :c9370; :b :c9371; :b :c9372; :b :c9373; :b :c9374; :b :c9375; :b :c9376; :b :c9377; :b :c9378; :b :c9379; :b :c9380; :b :c9381; :b :c9382; :b :c9383; :b :c9384; :b :c9385; :b :c9386; :b :c9387; :b :c9388; :b :c9389; :b :c9390; :b :c9391; :b :c9392; :b :c9393; :b :c9394; :b :c9395; :b :c9396; :b :c9397; :b :c9398; :b :c9399; :b :c9400; :b :c9401; :b :c9402; :b :c9403; :b :c9404; :b :c9405; :b :c9406; :b :c9407; :b :c9408; :b :c9409; :b :c9410; :b :c9411; :b :c9412; :b :c9413; :b :c9414; :b :c9415; :b :c9416; :b :c9417; :b :c9418; :b :c9419; :b :c9420; :b :c9421; :b :c9422; :b :c9423; :b :c9424; :b :c9425; :b :c9426; :b :c9427; :b :c9428; :b :c9429; :b :c9430; :b :c9431; :b :c9432; :b :c9433; :b :c9434; :b :c9435; :b :c9436; :b :c9437; :b :c9438; :b :c9439; :b :c9440; :b :c9441; :b :c9442; :b :c9443; :b :c9444; :b :c9445; :b :c9446; :b :c9447; :b :c9448; :b :c9449; :b :c9450; :b :c9451; :b :c9452; :b :c9453; :b :c9454; :b :c9455; :b :c9456; :b :c9457; :b :c9458; :b :c9459; :b :c9460; :b :c9461; :b :c9462; :b :c9463; :b :c9464; :b :c9465; :b :c9466; :b :c9467; :b :c9468; :b :c9469; :b :c9470; :b :c9471; :b :c9472; :b :c9473; :b :c9474; :b :c9475; :b :c9476; :b :c9477; :b :c9478; :b :c9479; :b :c9480; :b :c9481; :b :c9482; :b :c9483; :b :c9484; :b :c9485; :b :c9486; :b :c9487; :b :c9488; :b :c9489; :b :c9490; :b :c9491; :b :c9492; :b :c9493; :b :c9494; :b :c9495; :b :c9496; :b :c9497; :b :c9498; :b :c9499; :b :c9500; :b :c9501; :b :c9502; :b :c9503; :b :c9504; :b :c9505; :b :c9506; :b :c9507; :b :c9508; :b :c9509; :b :c9510; :b :c9511; :b :c9512; :b :c9513; :b :c9514; :b :c9515; :b :c9516; :b :c9517; :b :c9518; :b :c9519; :b :c9520; :b :c9521; :b :c9522; :b :c9523; :b :c9524; :b :c9525; :b :c9526; :b :c9527; :b :c9528; :b :c9529; :b :c9530; :b :c9531; :b :c9532; :b :c9533; :b :c9534; :b :c9535; :b :c9536; :b :c9537; :b :c9538; :b :c9539; :b :c9540; :b :c9541; :b :c9542; :b :c9543; :b :c9544; :b :c9545; :b :c9546; :b :c9547; :b :c9548; :b :c9549; :b :c9550; :b :c9551; :b :c9552; :b :c9553; :b :c9554; :b :c9555; :b :c9556; :b :c9557; :b :c9558; :b :c9559; :b :c9560; :b :c9561; :b :c9562; :b :c9563; :b :c9564; :b :c9565; :b :c9566; :b :c9567; :b :c9568; :b :c9569; :b :c9570; :b :c9571; :b :c9572; :b :c9573; :b :c9574; :b :c9575; :b :c9576; :b :c9577; :b :c9578; :b :c9579; :b :c9580; :b :c9581; :b :c9582; :b :c9583; :b :c9584; :b :c9585; :b :c9586; :b :c9587; :b :c9588; :b :c9589; :b :c9590; :b :c9591; :b :c9592; :b :c9593; :b :c9594; :b :c9595; :b :c9596; :b :c9597; :b :c9598; :b :c9599; :b :c9600; :b :c9601; :b :c9602; :b :c9603; :b :c9604; :b :c9605; :b :c9606; :b :c9607; :b :c9608; :b :c9609; :b :c9610; :b :c9611; :b :c9612; :b :c9613; :b :c9614; :b :c9615; :b :c9616; :b :c9617; :b :c9618; :b :c9619; :b :c9620; :b :c9621; :b :c9622; :b :c9623; :b :c9624; :b :c9625; :b :c9626; :b :c9627; :b :c9628; :b :c9629; :b :c9630; :b :c9631; :b :c9632; :b :c9633; :b :c9634; :b :c9635; :b :c9636; :b :c9637; :b :c9638; :b :c9639; :b :c9640; :b :c9641; :b :c9642; :b :c9643; :b :c9644; :b :c9645; :b :c9646; :b :c9647; :b :c9648; :b :c9649; :b :c9650; :b :c9651; :b :c9652; :b :c9653; :b :c9654; :b :c9655; :b :c9656; :b :c9657; :b :c9658; :b :c9659; :b :c9660; :b :c9661; :b :c9662; :b :c9663; :b :c9664; :b :c9665; :b :c9666; :b :c9667; :b :c9668; :b :c9669; :b :c9670; :b :c9671; :b :c9672; :b :c9673; :b :c9674; :b :c9675; :b :c9676; :b :c9677; :b :c9678; :b :c9679; :b :c9680; :b :c9681; :b :c9682; :b :c9683; :b :c9684; :b :c9685; :b :c9686; :b :c9687; :b :c9688; :b :c9689; :b :c9690; :b :c9691; :b :c9692; :b :c9693; :b :c9694; :b :c9695; :b :c9696; :b :c9697; :b :c9698; :b :c9699; :b :c9700; :b :c9701; :b :c9702; :b :c9703; :b :c9704; :b :c9705; :b :c9706; :b :c9707; :b :c9708; :b :c9709; :b :c9710; :b :c9711; :b :c9712; :b :c9713; :b :c9714; :b :c9715; :b :c9716; :b :c9717; :b :c9718; :b :c9719; :b :c9720; :b :c9721; :b :c9722; :b :c9723; :b :c9724; :b :c9725; :b :c9726; :b :c9727; :b :c9728; :b :c9729; :b :c9730; :b :c9731; :b :c9732; :b :c9733; :b :c9734; :b :c9735; :b :c9736; :b :c9737; :b :c9738; :b :c9739; :b :c9740; :b :c9741; :b :c9742; :b :c9743; :b :c9744; :b :c9745; :b :c9746; :b :c9747; :b :c9748; :b :c9749; :b :c9750; :b :c9751; :b :c9752; :b :c9753; :b :c9754; :b :c9755; :b :c9756; :b :c9757; :b :c9758; :b :c9759; :b :c9760; :b :c9761; :b :c9762; :b :c9763; :b :c9764; :b :c9765; :b :c9766; :b :c9767; :b :c9768; :b :c9769; :b :c9770; :b :c9771; :b :c9772; :b :c9773; :b :c9774; :b :c9775; :b :c9776; :b :c9777; :b :c9778; :b :c9779; :b :c9780; :b :c9781; :b :c9782; :b :c9783; :b :c9784; :b :c9785; :b :c9786; :b :c9787; :b :c9788; :b :c9789; :b :c9790; :b :c9791; :b :c9792; :b :c9793; :b :c9794; :b :c9795; :b :c9796; :b :c9797; :b :c9798; :b :c9799; :b :c9800; :b :c9801; :b :c9802; :b :c9803; :b :c9804; :b :c9805; :b :c9806; :b :c9807; :b :c9808; :b :c9809; :b :c9810; :b :c9811; :b :c9812; :b :c9813; :b :c9814; :b :c9815; :b :c9816; :b :c9817; :b :c9818; :b :c9819; :b :c9820; :b :c9821; :b :c9822; :b :c9823; :b :c9824; :b :c9825; :b :c9826; :b :c9827; :b :c9828; :b :c9829; :b :c9830; :b :c9831; :b :c9832; :b :c9833; :b :c9834; :b :c9835; :b :c9836; :b :c9837; :b :c9838; :b :c9839; :b :c9840; :b :c9841; :b :c9842; :b :c9843; :b :c9844; :b :c9845; :b :c9846; :b :c9847; :b :c9848; :b :c9849; :b :c9850; :b :c9851; :b :c9852; :b :c9853; :b :c9854; :b :c9855; :b :c9856; :b :c9857; :b :c9858; :b :c9859; :b :c9860; :b :c9861; :b :c9862; :b :c9863; :b :c9864; :b :c9865; :b :c9866; :b :c9867; :b :c9868; :b :c9869; :b :c9870; :b :c9871; :b :c9872; :b :c9873; :b :c9874; :b :c9875; :b :c9876; :b :c9877; :b :c9878; :b :c9879; :b :c9880; :b :c9881; :b :c9882; :b :c9883; :b :c9884; :b :c9885; :b :c9886; :b :c9887; :b :c9888; :b :c9889; :b :c9890; :b :c9891; :b :c9892; :b :c9893; :b :c9894; :b :c9895; :b :c9896; :b :c9897; :b :c9898; :b :c9899; :b :c9900; :b :c9901; :b :c9902; :b :c9903; :b :c9904; :b :c9905; :b :c9906; :b :c9907; :b :c9908; :b :c9909; :b :c9910; :b :c9911; :b :c9912; :b :c9913; :b :c9914; :b :c9915; :b :c9916; :b :c9917; :b :c9918; :b :c9919; :b :c9920; :b :c9921; :b :c9922; :b :c9923; :b :c9924; :b :c9925; :b :c9926; :b :c9927; :b :c9928; :b :c9929; :b :c9930; :b :c9931; :b :c9932; :b :c9933; :b :c9934; :b :c9935; :b :c9936; :b :c9937; :b :c9938; :b :c9939; :b :c9940; :b :c9941; :b :c9942; :b :c9943; :b :c9944; :b :c9945; :b :c9946; :b :c9947; :b :c9948; :b :c9949; :b :c9950; :b :c9951; :b :c9952; :b :c9953; :b :c9954; :b :c9955; :b :c9956; :b :c9957; :b :c9958; :b :c9959; :b :c9960; :b :c9961; :b :c9962; :b :c9963; :b :c9964; :b :c9965; :b :c9966; :b :c9967; :b :c9968; :b :c9969; :b :c9970; :b :c9971; :b :c9972; :b :c9973; :b :c9974; :b :c9975; :b :c9976; :b :c9977; :b :c9978; :b :c9979; :b :c9980; :b :c9981; :b :c9982; :b :c9983; :b :c9984; :b :c9985; :b :c9986; :b :c9987; :b :c9988; :b :c9989; :b :c9990; :b :c9991; :b :c9992; :b :c9993; :b :c9994; :b :c9995; :b :c9996; :b :c9997; :b :c9998; :b :c9999; :b :c10000 . raptor2-2.0.15/tests/turtle/test-17.out0000644000175000017500000000013210674751730014535 00000000000000 "a long\n\tliteral\nwith\nnewlines" . raptor2-2.0.15/tests/turtle/test-11.ttl0000644000175000017500000000051310674751730014526 00000000000000# Tests for - and _ in names, qnames @prefix ex1: . @prefix ex-2: . @prefix ex3_: . @prefix ex4-: . ex1:foo-bar ex1:foo_bar "a" . ex-2:foo-bar ex-2:foo_bar "b" . ex3_:foo-bar ex3_:foo_bar "c" . ex4-:foo-bar ex4-:foo_bar "d" . raptor2-2.0.15/tests/turtle/test-19.out0000644000175000017500000000014410674751730014542 00000000000000 "1.0"^^ . raptor2-2.0.15/tests/turtle/test-20.ttl0000644000175000017500000000010010674751730014516 00000000000000@prefix : . :a :b "" . :c :d """""" . raptor2-2.0.15/tests/turtle/bad-02.ttl0000644000175000017500000000014110674751730014272 00000000000000# Forbidden by RDF - predicate cannot be blank @prefix : . :a [] :b . raptor2-2.0.15/tests/turtle/bad-18.out0000644000175000017500000000012412112703616014273 00000000000000 "John said: \"Hello World!\"" . raptor2-2.0.15/tests/turtle/test-08.ttl0000644000175000017500000000007110674751730014533 00000000000000@prefix : . :a :b ( ) . raptor2-2.0.15/tests/turtle/manifest-bad.ttl0000644000175000017500000000671612046577174015700 00000000000000@prefix rdf: . @prefix rdfs: . @prefix mf: . @prefix qt: . <> rdf:type mf:Manifest ; rdfs:comment "Turtle bad syntax test cases (must fail)" ; mf:entries ( [ mf:name "bad-00" ; rdfs:comment "prefix name must end in a :" ; mf:action [ qt:data ] ; ] [ mf:name "bad-01" ; rdfs:comment "blank predicate forbidden" ; mf:action [ qt:data ] ; ] [ mf:name "bad-02" ; rdfs:comment "blank predicate forbidden" ; mf:action [ qt:data ] ; ] [ mf:name "bad-03" ; rdfs:comment "a forbidden as subject" ; mf:action [ qt:data ] ; ] [ mf:name "bad-04" ; rdfs:comment ", not allowed in collections" ; mf:action [ qt:data ] ; ] [ mf:name "bad-05" ; rdfs:comment "{} not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-06" ; rdfs:comment "is and of not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-07" ; rdfs:comment "paths not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-08" ; rdfs:comment "@keywords not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-09" ; rdfs:comment "=> not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-10" ; rdfs:comment "= not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-11" ; rdfs:comment "@forAll not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-12" ; rdfs:comment "@forSome not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-13" ; rdfs:comment "<= not allowed in Turtle" ; mf:action [ qt:data ] ; ] [ mf:name "bad-14" ; rdfs:comment "long literal with missing end" ; mf:action [ qt:data ] ; ] [ mf:name "bad-17" ; rdfs:comment "literal with ''s" ; mf:action [ qt:data ] ; ] [ mf:name "bad-18" ; rdfs:comment "long literal with '''s" ; mf:action [ qt:data ] ; ] [ mf:name "bad-19" ; rdfs:comment "Bad () in predicate position" ; mf:action [ qt:data ] ; ] [ mf:name "bad-20" ; rdfs:comment "Escape end-of-file" ; mf:action [ qt:data ] ; ] [ mf:name "bad-21" ; rdfs:comment "Turtle spec does not allow . in namespace prefix (token prefixName)" ; mf:action [ qt:data ] ; ] [ mf:name "bad-22" ; rdfs:comment "Turtle spec does not allow . in namespace name (token name)" ; mf:action [ qt:data ] ; ] [ mf:name "bad-23" ; rdfs:comment "Bad terminating long literal" ; mf:action [ qt:data ] ; ] # End of tests ). raptor2-2.0.15/tests/turtle/test-24.out0000644000175000017500000000030710674751730014537 00000000000000 "true"^^ . "false"^^ . raptor2-2.0.15/tests/turtle/test-18.ttl0000644000175000017500000000023510674751730014536 00000000000000@prefix : . :a :b """\nthis \ris a \U00015678long\t literal\uABCD """ . :d :e """\tThis \uABCDis\r \U00015678another\n one """ . raptor2-2.0.15/tests/turtle/test-23.ttl0000644000175000017500000000014310674751730014530 00000000000000# Test long literal @prefix : . :a :b """John said: "Hello World!\"""" . raptor2-2.0.15/tests/turtle/test-09.ttl0000644000175000017500000000042410674751730014536 00000000000000# Test integer datatyped literals using an OWL cardinality constraint @prefix owl: . # based on examples in the OWL Reference _:hasParent a owl:ObjectProperty . [] a owl:Restriction ; owl:onProperty _:hasParent ; owl:maxCardinality 2 . raptor2-2.0.15/tests/turtle/test-18.out0000644000175000017500000000032110674751730014536 00000000000000 "\nthis \ris a \U00015678long\t\nliteral\uABCD\n" . "\tThis \uABCDis\r \U00015678another\n\none\n" . raptor2-2.0.15/tests/turtle/rdfq-results.out0000644000175000017500000000644610674751730016002 00000000000000_:genid1 "x" . _:genid1 "123"^^ . _:genid2 "y" . _:genid2 . _:genid3 . _:genid3 _:genid1 . _:genid3 _:genid2 . _:genid4 "x" . _:genid4 "2003-01-21" . _:genid5 "y" . _:genid5 . _:genid6 . _:genid6 _:genid4 . _:genid6 _:genid5 . _:genid7 "x" . _:genid7 "anon1" . _:genid8 "y" . _:genid8 _:a . _:genid9 . _:genid9 _:genid7 . _:genid9 _:genid8 . _:genid10 "x" . _:genid10 "anon2" . _:genid11 "y" . _:genid11 _:a . _:genid12 . _:genid12 _:genid10 . _:genid12 _:genid11 . . "4"^^ . "x" . "y" . _:genid3 . _:genid6 . _:genid9 . _:genid12 . raptor2-2.0.15/tests/turtle/test-36.out0000644000175000017500000000022711526311642014532 00000000000000 "first long literal" . "second long literal" . raptor2-2.0.15/tests/turtle/test-10.out0000644000175000017500000000101510711544452014520 00000000000000 "000000"^^ . "0"^^ . "000001"^^ . "2"^^ . "4"^^ . raptor2-2.0.15/tests/turtle/test-05.out0000644000175000017500000000041410674751730014535 00000000000000_:genid1 . _:genid1 . _:genid2 . _:genid2 . raptor2-2.0.15/tests/turtle/bad-17.out0000644000175000017500000000012412112703616014272 00000000000000 "John said: \"Hello World!\"" . raptor2-2.0.15/tests/turtle/bad-11.ttl0000644000175000017500000000012410674751730014273 00000000000000# @forAll is not in turtle @prefix : . @forAll :x . raptor2-2.0.15/tests/turtle/bad-15.ttl0000644000175000017500000000006111755067764014307 00000000000000@prefix : . [ :a :b ] . raptor2-2.0.15/tests/turtle/test-21.ttl0000644000175000017500000000010610674751730014525 00000000000000@prefix : . :a :b 1.0 . :c :d 1 . :e :f 1.0e0 . raptor2-2.0.15/tests/turtle/bad-10.ttl0000644000175000017500000000012510674751730014273 00000000000000# equivalence is not in turtle @prefix : . :a = :b . raptor2-2.0.15/tests/turtle/test-28-out.ttl0000644000175000017500000000105110767362013015334 00000000000000@base . @prefix rdf: <../../../../../1999/02/22-rdf-syntax-ns#> . 1, 1., 1.0, 1.000000000, 1.2345678901234567890123457890, 2.23400000000000000000005, 2.2340000000000000000005, 2.234000000000000000005, 2.23400000000000000005, 2.2340000000000000005, 2.234000000000000005, 2.23400000000000005, 2.2340000000000005, 2.234000000000005, 2.23400000000005, 2.2340000000005, 2.234000000005, 2.23400000005, 2.2340000005, 2.234000005, 2.3, 2.345 . raptor2-2.0.15/tests/turtle/bad-20.ttl0000644000175000017500000000010511331137720014256 00000000000000# Escape end-of-file @prefix : . :a :b """\raptor2-2.0.15/tests/turtle/test-00.ttl0000644000175000017500000000003310674751730014521 00000000000000@prefix : <#> . [] :x :y . raptor2-2.0.15/tests/turtle/test-03.ttl0000644000175000017500000000013210674751730014524 00000000000000# Test ; operator @prefix : . :a :b :c ; :d :e ; :f :g . raptor2-2.0.15/tests/turtle/bad-16.ttl0000644000175000017500000000001411755067764014306 00000000000000( 1 2 3 ) . raptor2-2.0.15/tests/turtle/bad-21.ttl0000644000175000017500000000016311331137720014263 00000000000000# Turtle spec does not allow . in namespace prefix (token prefixName) @prefix foo.bar: . raptor2-2.0.15/tests/turtle/test-01.ttl0000644000175000017500000000027310674751730014530 00000000000000# Test @prefix and qnames @prefix : . @prefix a: . @prefix b: . :a :b :c . a:a a:b a:c . :a a:a b:a . raptor2-2.0.15/tests/turtle/test-21.out0000644000175000017500000000044510711544531014526 00000000000000 "1.0"^^ . "1"^^ . "1.0e0"^^ . raptor2-2.0.15/tests/turtle/test-19.ttl0000644000175000017500000000006210674751730014535 00000000000000@prefix : . :a :b 1.0 . raptor2-2.0.15/tests/turtle/test-30.ttl0000644000175000017500000000063710674751730014536 00000000000000# In-scope base URI is http://www.w3.org/2001/sw/DataAccess/df1/tests/ at this point . @base . # In-scope base URI is http://example.org/ns/ at this point . @base . # In-scope base URI is http://example.org/ns/foo/ at this point . @prefix : . :a4 :b4 :c4 . @prefix : . :a5 :b5 :c5 . raptor2-2.0.15/tests/turtle/bad-12.ttl0000644000175000017500000000012610674751730014276 00000000000000# @forSome is not in turtle @prefix : . @forSome :x . raptor2-2.0.15/tests/turtle/test-15.out0000644000175000017500000314635610674751730014561 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/turtle/test-04.out0000644000175000017500000000020610674751730014533 00000000000000_:genid1 . _:genid2 . raptor2-2.0.15/tests/turtle/test-16.out0000644000175000017500000314635610674751730014562 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/turtle/bad-15.out0000644000175000017500000000007712112703616014277 00000000000000_:genid1 . raptor2-2.0.15/tests/turtle/test-30.out0000644000175000017500000000102110674751730014526 00000000000000 . . . . . raptor2-2.0.15/tests/turtle/test-38.out0000644000175000017500000000016111755067764014552 00000000000000 "\uD801\uDC69" . raptor2-2.0.15/tests/turtle/test-12.out0000644000175000017500000000045610674751730014541 00000000000000 "1" . "2" . "def" . "678" . raptor2-2.0.15/tests/turtle/test-08.out0000644000175000017500000000016510674751730014543 00000000000000 . raptor2-2.0.15/tests/turtle/test-14.out0000644000175000017500000337631210674751730014555 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/turtle/test-38.ttl0000644000175000017500000000021311755067764014544 00000000000000# http://bugs.librdf.org/mantis/view.php?id=505 @prefix rdfs: . rdfs:label "\ud801\udc69" . raptor2-2.0.15/tests/turtle/test-22.ttl0000644000175000017500000000011110674751730014522 00000000000000@prefix : . :a :b -1.0 . :c :d -1 . :e :f -1.0e0 . raptor2-2.0.15/tests/turtle/test-00.out0000644000175000017500000000021110674751730014523 00000000000000_:genid1 . raptor2-2.0.15/tests/turtle/rdf-schema.ttl0000644000175000017500000001036110745050064015332 00000000000000# RDF Namespace document converted into Turtle @prefix : . @prefix rdf: . rdf:type a rdf:Property; :comment "Indicates membership of a class"; :label "type"@en, "type"@fr; :range :Class . :Class a :Class; :comment "The concept of Class"; :label "Class"@en, "Classe"@fr; :subClassOf :Resource . :ConstraintProperty a :Class; :comment "Properties used to express RDF Schema constraints."; :label "ConstraintProperty"@en, "Propri\u00E9t\u00E9Contrainte"@fr; :subClassOf :ConstraintResource, rdf:Property . :ConstraintResource a :Class; :comment "Resources used to express RDF Schema constraints."; :label "ConstraintResource"@en, "RessourceContrainte"@fr; :subClassOf :Resource . :Container a :Class; :comment "This represents the set Containers."; :label "Container"@en, "Enveloppe"@fr; :subClassOf :Resource . :ContainerMembershipProperty a :Class; :label "ContainerMembershipProperty"@en; :subClassOf rdf:Property . :Literal a :Class; :comment "This represents the set of atomic values, eg. textual strings."; :label "Literal"@en, "Litt\u00E9ral"@fr . :Resource a :Class; :comment "The most general class"; :label "Resource"@en, "Ressource"@fr . :comment a rdf:Property; :comment "Use this for descriptions"; :domain :Resource; :label "comment"@en, "commentaire"@fr; :range :Literal . :domain a :ConstraintProperty; :comment "This is how we associate a class with properties that its instances can have"; :label "domain"@en, "domaine"@fr . :isDefinedBy a rdf:Property; :comment "Indicates a resource containing and defining the subject resource."; :domain :Resource; :label "esD\u00E9finiPar"@fr, "isDefinedBy"@en; :range :Resource; :subPropertyOf :seeAlso . :label a rdf:Property; :comment "Provides a human-readable version of a resource name."; :domain :Resource; :label "label"@en, "label"@fr; :range :Literal . :range a :ConstraintProperty; :comment "Properties that can be used in a schema to provide constraints"; :domain rdf:Property; :label "range"@en, "\u00E9tendue"@fr; :range :Class . :seeAlso a rdf:Property; :comment "Indicates a resource that provides information about the subject resource."; :domain :Resource; :label "seeAlso"@en, "voirAussi"@fr; :range :Resource . :subClassOf a rdf:Property; :comment "Indicates membership of a class"; :domain :Class; :label "sousClasseDe"@fr, "subClassOf"@en; :range :Class . :subPropertyOf a rdf:Property; :comment "Indicates specialization of properties"; :domain rdf:Property; :label "sousPropri\u00E9t\u00E9De"@fr, "subPropertyOf"@en; :range rdf:Property . rdf:Alt a :Class; :label "Alt"@en, "Choix"@fr; :subClassOf :Container . rdf:Bag a :Class; :label "Bag"@en, "Ensemble"@fr; :subClassOf :Container . rdf:Property a :Class; :comment "The concept of a property."; :label "Property"@en, "Propri\u00E9t\u00E9"@fr; :subClassOf :Resource . rdf:Seq a :Class; :label "Sequence"@en, "S\u00E9quence"@fr; :subClassOf :Container . rdf:Statement a :Class; :comment "This represents the set of reified statements."; :label "D\u00E9claration"@fr, "Statement"@en; :subClassOf :Resource . rdf:object a rdf:Property; :domain rdf:Statement; :label "object"@en, "objet"@fr . rdf:predicate a rdf:Property; :domain rdf:Statement; :label "predicate"@en, "pr\u00E9dicat"@fr; :range rdf:Property . rdf:subject a rdf:Property; :domain rdf:Statement; :label "subject"@en, "sujet"@fr; :range :Resource . rdf:value a rdf:Property; :label "object"@en, "value"@fr . : :seeAlso . raptor2-2.0.15/tests/turtle/test-06.out0000644000175000017500000000015410674751730014537 00000000000000 . raptor2-2.0.15/tests/turtle/bad-17.ttl0000644000175000017500000000014212112703616014266 00000000000000# '-quoted long literal @prefix : . :a :b 'John said: "Hello World!"' . raptor2-2.0.15/tests/turtle/test-07.ttl0000644000175000017500000000011210674751730014526 00000000000000@prefix : . :a :b ( "apple" "banana" ) . raptor2-2.0.15/tests/turtle/test-13.ttl0000644000175000017500000000012210674751730014524 00000000000000# Test for : allowed @prefix : . [] : [] . : : : . raptor2-2.0.15/tests/turtle/ex-38-turtle.out0000644000175000017500000000076011302562553015511 00000000000000@prefix rdf: . @prefix ex: . rdf:object _:genid1 ; rdf:predicate ex:property ; rdf:subject ex:resource ; a rdf:Statement . ex:resource ex:property _:genid1 . _:genid1 ex:resource1 ; ; a . raptor2-2.0.15/tests/turtle/bad-22.ttl0000644000175000017500000000022511331137720014263 00000000000000# Turtle spec does not allow . in namespace name (token name) @prefix ex: . ex:not.allowed ex:not.allowed ex:not.allowed . raptor2-2.0.15/tests/turtle/test-36.ttl0000644000175000017500000000024411526311642014525 00000000000000# Test long literal twice to ensure it does not over-quote @prefix : . :a :b """first long literal""" . :c :d """second long literal""" . raptor2-2.0.15/tests/turtle/test-13.out0000644000175000017500000000017210674751730014535 00000000000000_:genid1 _:genid2 . . raptor2-2.0.15/tests/turtle/rdf-schema.out0000644000175000017500000004067410745050103015342 00000000000000 . "Indicates membership of a class" . "type"@en . "type"@fr . . . "The concept of Class" . "Class"@en . "Classe"@fr . . . "Properties used to express RDF Schema constraints." . "ConstraintProperty"@en . "Propri\u00E9t\u00E9Contrainte"@fr . . . . "Resources used to express RDF Schema constraints." . "ConstraintResource"@en . "RessourceContrainte"@fr . . . "This represents the set Containers." . "Container"@en . "Enveloppe"@fr . . . "ContainerMembershipProperty"@en . . . "This represents the set of atomic values, eg. textual strings." . "Literal"@en . "Litt\u00E9ral"@fr . . "The most general class" . "Resource"@en . "Ressource"@fr . . "Use this for descriptions" . . "comment"@en . "commentaire"@fr . . . "This is how we associate a class with properties that its instances can have" . "domain"@en . "domaine"@fr . . "Indicates a resource containing and defining the subject resource." . . "esD\u00E9finiPar"@fr . "isDefinedBy"@en . . . . "Provides a human-readable version of a resource name." . . "label"@en . "label"@fr . . . "Properties that can be used in a schema to provide constraints" . . "range"@en . "\u00E9tendue"@fr . . . "Indicates a resource that provides information about the subject resource." . . "seeAlso"@en . "voirAussi"@fr . . . "Indicates membership of a class" . . "sousClasseDe"@fr . "subClassOf"@en . . . "Indicates specialization of properties" . . "sousPropri\u00E9t\u00E9De"@fr . "subPropertyOf"@en . . . "Alt"@en . "Choix"@fr . . . "Bag"@en . "Ensemble"@fr . . . "The concept of a property." . "Property"@en . "Propri\u00E9t\u00E9"@fr . . . "Sequence"@en . "S\u00E9quence"@fr . . . "This represents the set of reified statements." . "D\u00E9claration"@fr . "Statement"@en . . . . "object"@en . "objet"@fr . . . "predicate"@en . "pr\u00E9dicat"@fr . . . . "subject"@en . "sujet"@fr . . . "object"@en . "value"@fr . . raptor2-2.0.15/tests/turtle/test-05.ttl0000644000175000017500000000020210674751730014524 00000000000000# Test non empty [] operator; not allowed as predicate @prefix : . [ :a :b ] :c :d . :e :f [ :g :h ] . raptor2-2.0.15/tests/turtle/bad-09.ttl0000644000175000017500000000012210674751730014300 00000000000000# implies is not in turtle @prefix : . :a => :b . raptor2-2.0.15/tests/turtle/test-31-out.ttl0000644000175000017500000000042111170016736015323 00000000000000@prefix rdf: . @prefix rss: . rss:items [ rdf:_1 ; rdf:_2 ; a rdf:Seq ] . raptor2-2.0.15/tests/turtle/test-28.ttl0000644000175000017500000000470710674751730014547 00000000000000 "2.345"^^ . "1"^^ . "1.0"^^ . "1."^^ . "1.000000000"^^ . "2.3"^^ . "2.234000005"^^ . "2.2340000005"^^ . "2.23400000005"^^ . "2.234000000005"^^ . "2.2340000000005"^^ . "2.23400000000005"^^ . "2.234000000000005"^^ . "2.2340000000000005"^^ . "2.23400000000000005"^^ . "2.234000000000000005"^^ . "2.2340000000000000005"^^ . "2.23400000000000000005"^^ . "2.234000000000000000005"^^ . "2.2340000000000000000005"^^ . "2.23400000000000000000005"^^ . "1.2345678901234567890123457890"^^ . raptor2-2.0.15/tests/turtle/test-09.out0000644000175000017500000000060410674751730014542 00000000000000_:hasParent . _:genid1 . _:genid1 _:hasParent . _:genid1 "2"^^ . raptor2-2.0.15/tests/turtle/test-39.ttl0000644000175000017500000000007112425333224014525 00000000000000@prefix : . :a :b ( ) . raptor2-2.0.15/tests/trig/0000755000175000017500000000000012425347073012307 500000000000000raptor2-2.0.15/tests/trig/bug370.trig0000644000175000017500000000123411754570472014132 00000000000000# Issue #0000370 http://bugs.librdf.org/mantis/bug_change_status_page.php # # rapper -i trig --show-graphs bug370.trig http://mmt.me.uk/examples/rdf/trig1.tt # @base . @prefix xsd: . @prefix foaf: . @prefix foo: . @prefix : . :romeo a foaf:Person ; foaf:name "Romeo Montague". :juliet a foaf:Person ; foaf:name "Juliet Capulet" . :juliet foaf:gender "female" . :reality { :romeo foo:loves :juliet . } :alternative { :romeo foo:hates :juliet . } :romeo foaf:gender "male" . raptor2-2.0.15/tests/trig/example3.out0000644000175000017500000000076111754570472014507 00000000000000 "Bob" . "Alice" . _:a "Bob" . _:a . _:a "Alice" . _:a . raptor2-2.0.15/tests/trig/Makefile.am0000644000175000017500000000465512425344315014271 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor TRiG tests # # Copyright (C) 2007, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # TEST_FILES=\ example1.trig example2.trig example3.trig bug370.trig bug451.trig \ bug-584-dos.trig bug-584-unix.trig TEST_OUT_FILES=\ example1.out example2.out example3.out bug370.out bug451.out \ bug-584-dos.out bug-584-unix.out # Used to make N-triples output consistent BASE_URI=http://example.librdf.org/ EXTRA_DIST = \ CMakeLists.txt \ $(TEST_FILES) \ $(TEST_OUT_FILES) RAPPER = $(top_builddir)/utils/rapper CLEANFILES = CMakeTests.txt build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: check-trig if MAINTAINER_MODE check_trig_deps = $(TEST_FILES) endif check-trig: build-rapper $(check_trig_deps) @result=0; \ $(RECHO) "Testing legal TRiG"; \ for test in $(TEST_FILES); do \ name=`basename $$test .trig` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i trig -o nquads $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ trig.$$name \ "\$${RAPPER} -q -i trig -o nquads \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ exit $$result raptor2-2.0.15/tests/trig/Makefile.in0000644000175000017500000003434112425344566014305 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor TRiG tests # # Copyright (C) 2007, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/trig DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TEST_FILES = \ example1.trig example2.trig example3.trig bug370.trig bug451.trig \ bug-584-dos.trig bug-584-unix.trig TEST_OUT_FILES = \ example1.out example2.out example3.out bug370.out bug451.out \ bug-584-dos.out bug-584-unix.out # Used to make N-triples output consistent BASE_URI = http://example.librdf.org/ EXTRA_DIST = \ CMakeLists.txt \ $(TEST_FILES) \ $(TEST_OUT_FILES) RAPPER = $(top_builddir)/utils/rapper CLEANFILES = CMakeTests.txt @MAINTAINER_MODE_TRUE@check_trig_deps = $(TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/trig/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/trig/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: check-trig check-trig: build-rapper $(check_trig_deps) @result=0; \ $(RECHO) "Testing legal TRiG"; \ for test in $(TEST_FILES); do \ name=`basename $$test .trig` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i trig -o nquads $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ trig.$$name \ "\$${RAPPER} -q -i trig -o nquads \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/trig/example2.out0000644000175000017500000000203111754570472014476 00000000000000 . "Monica Murphy" . . . . . raptor2-2.0.15/tests/trig/bug-584-dos.trig0000644000175000017500000000013212425344315014764 00000000000000 { a . } raptor2-2.0.15/tests/trig/CMakeLists.txt0000644000175000017500000000221112011242612014743 00000000000000# raptor/tests/trig/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # RAPPER_TEST(trig.example1 "${RAPPER} -q -i trig -o nquads ${CMAKE_CURRENT_SOURCE_DIR}/example1.trig http://example.librdf.org/example1.trig" example1.res ${CMAKE_CURRENT_SOURCE_DIR}/example1.out ) RAPPER_TEST(trig.example2 "${RAPPER} -q -i trig -o nquads ${CMAKE_CURRENT_SOURCE_DIR}/example2.trig http://example.librdf.org/example2.trig" example2.res ${CMAKE_CURRENT_SOURCE_DIR}/example2.out ) RAPPER_TEST(trig.example3 "${RAPPER} -q -i trig -o nquads ${CMAKE_CURRENT_SOURCE_DIR}/example3.trig http://example.librdf.org/example3.trig" example3.res ${CMAKE_CURRENT_SOURCE_DIR}/example3.out ) RAPPER_TEST(trig.bug370 "${RAPPER} -q -i trig -o nquads ${CMAKE_CURRENT_SOURCE_DIR}/bug370.trig http://example.librdf.org/bug370.trig" bug370.res ${CMAKE_CURRENT_SOURCE_DIR}/bug370.out ) RAPPER_TEST(trig.bug451 "${RAPPER} -q -i trig -o nquads ${CMAKE_CURRENT_SOURCE_DIR}/bug451.trig http://example.librdf.org/bug451.trig" bug451.res ${CMAKE_CURRENT_SOURCE_DIR}/bug451.out ) # end raptor/tests/trig/CMakeLists.txt raptor2-2.0.15/tests/trig/bug-584-unix.out0000644000175000017500000000020312425344315015023 00000000000000 . raptor2-2.0.15/tests/trig/example1.trig0000644000175000017500000000176211754570472014645 00000000000000 # TriG Example Document 1 # This document encodes three graphs. @prefix rdf: . @prefix xsd: . @prefix swp: . @prefix dc: . @prefix ex: . @prefix : . :G1 { :Monica ex:name "Monica Murphy" . :Monica ex:homepage . :Monica ex:email . :Monica ex:hasSkill ex:Management } :G2 { :Monica rdf:type ex:Person . :Monica ex:hasSkill ex:Programming } :G3 { :G1 swp:assertedBy _:w1 . _:w1 swp:authority :Chris . _:w1 dc:date "2003-10-02"^^xsd:date . :G2 swp:quotedBy _:w2 . :G3 swp:assertedBy _:w2 . _:w2 dc:date "2003-09-03"^^xsd:date . _:w2 swp:authority :Chris . :Chris rdf:type ex:Person . :Chris ex:email } raptor2-2.0.15/tests/trig/bug-584-dos.out0000644000175000017500000000020312425344315014625 00000000000000 . raptor2-2.0.15/tests/trig/example1.out0000644000175000017500000000455111754570472014506 00000000000000 "Monica Murphy" . . . . . . _:w1 . _:w1 . _:w1 "2003-10-02"^^ . _:w2 . _:w2 . _:w2 "2003-09-03"^^ . _:w2 . . . raptor2-2.0.15/tests/trig/example3.trig0000644000175000017500000000120111754570472014633 00000000000000 # TriG Example Document 3 # This document contains a default graph and two named graphs. @prefix rdf: . @prefix dc: . @prefix foaf: . # default graph { dc:publisher "Bob" . dc:publisher "Alice" . } { _:a foaf:name "Bob" . _:a foaf:mbox . } { _:a foaf:name "Alice" . _:a foaf:mbox . } raptor2-2.0.15/tests/trig/bug451.trig0000644000175000017500000000172411754570472014136 00000000000000@prefix nie: . @prefix dcterms: . @prefix rdfs: . @prefix nrl: . @prefix rdf: . @prefix xsd: . # HERE "nie:" is used as graph name nie: {nie:characterSet a rdf:Property ; rdfs:comment "Characterset in which the content of the InformationElement was created." ; rdfs:domain nie:InformationElement ; rdfs:label "characterSet" ; rdfs:range xsd:string ; nrl:maxCardinality "1" . } { nie: a nrl:Ontology ; . a nrl:GraphMetadata ; nrl:coreGraphMetadataFor nie: . } raptor2-2.0.15/tests/trig/bug451.out0000644000175000017500000000417311754570472014001 00000000000000 . "Characterset in which the content of the InformationElement was created." . . "characterSet" . . "1" . . . . raptor2-2.0.15/tests/trig/example2.trig0000644000175000017500000000065311754570472014644 00000000000000# TriG Example Document 2 @prefix ex: . @prefix : . :G1 = { :Monica a ex:Person ; ex:name "Monica Murphy" ; ex:homepage ; ex:email ; ex:hasSkill ex:Management , ex:Programming . } raptor2-2.0.15/tests/trig/bug370.out0000644000175000017500000000147711754570472014005 00000000000000 . "Romeo Montague" . . "Juliet Capulet" . "female" . . . "male" . raptor2-2.0.15/tests/trig/bug-584-unix.trig0000644000175000017500000000013012425344315015160 00000000000000 { a . } raptor2-2.0.15/tests/turtle-2013/0000755000175000017500000000000012425347073013244 500000000000000raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-ln-escape.ttl0000644000175000017500000000007712222044704021137 00000000000000@prefix : . :s :p :o%2 . raptor2-2.0.15/tests/turtle-2013/percent_escaped_localName.ttl0000644000175000017500000000012212222044704020771 00000000000000@prefix p: . p:%25 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-16.ttl0000644000175000017500000000015112222044704021031 00000000000000# BNode as predicate [] . raptor2-2.0.15/tests/turtle-2013/turtle-subm-07.ttl0000644000175000017500000000012312112703616016404 00000000000000# 'a' only allowed as a predicate @prefix : . :a a :b . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_ascii_boundaries.ttl0000644000175000017500000000006512222044704021260 00000000000000 "!#[]" . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_2_squotes.nt0000644000175000017500000000006512222044704020552 00000000000000 "x\"\"y" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-04.ttl0000644000175000017500000000013212112703616016401 00000000000000# Test ; operator @prefix : . :a :b :c ; :d :e ; :f :g . raptor2-2.0.15/tests/turtle-2013/turtle-subm-05.nt0000644000175000017500000000020612112703616016222 00000000000000_:genid1 . _:genid2 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-kw-05.ttl0000644000175000017500000000007712222044704020133 00000000000000@prefix : . :s true :o . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_with_2_squotes.ttl0000644000175000017500000000006712222044704020735 00000000000000 '''x''y''' . raptor2-2.0.15/tests/turtle-2013/turtle-subm-23.nt0000644000175000017500000000100612112703616016221 00000000000000 . . . . . . . raptor2-2.0.15/tests/turtle-2013/nested_blankNodePropertyLists.nt0000644000175000017500000000022612222044704021540 00000000000000_:genid1 . _:genid2 _:genid1 . _:genid2 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-ln-dots.ttl0000644000175000017500000000014412222044704020117 00000000000000@prefix : . :s.1 :p.1 :o.1 . :s..2 :p..2 :o..2. :3.s :3.p :3. raptor2-2.0.15/tests/turtle-2013/comment_following_PNAME_NS.nt0000644000175000017500000000010012222044704020546 00000000000000 . raptor2-2.0.15/tests/turtle-2013/LITERAL2_ascii_boundaries.nt0000644000175000017500000000012312222044704020252 00000000000000 "\u0000\t\u000B\u000C\u000E!#[]\u007F" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-04.ttl0000644000175000017500000000020412222044704021325 00000000000000# N3 paths @prefix : . @prefix ns: . :x^ns:p :p :z . raptor2-2.0.15/tests/turtle-2013/number_sign_following_PNAME_NS.ttl0000644000175000017500000000013312222044704021604 00000000000000@prefix p: . p:\#numbersign . raptor2-2.0.15/tests/turtle-2013/turtle-subm-07.nt0000644000175000017500000000015412112703616016226 00000000000000 . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_LINE_FEED.nt0000644000175000017500000000006112222044704021257 00000000000000 "\n" . raptor2-2.0.15/tests/turtle-2013/turtle-eval-struct-02.nt0000644000175000017500000000036212222044704017523 00000000000000 . . raptor2-2.0.15/tests/turtle-2013/turtle-subm-12.ttl0000644000175000017500000000051312112703616016403 00000000000000# Tests for - and _ in names, qnames @prefix ex1: . @prefix ex-2: . @prefix ex3_: . @prefix ex4-: . ex1:foo-bar ex1:foo_bar "a" . ex-2:foo-bar ex-2:foo_bar "b" . ex3_:foo-bar ex3_:foo_bar "c" . ex4-:foo-bar ex4-:foo_bar "d" . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.nt0000644000175000017500000000016412222044704026653 00000000000000 _:AZazÀÖØöø˿ͰͽͿ῿‌‍⁰↏Ⰰ⿯、퟿豈﷏ﷰ�𐀀󯿽 . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_1_squote.ttl0000644000175000017500000000006612222044704020551 00000000000000 """x"y""" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-str-esc-03.ttl0000644000175000017500000000013712222044704020341 00000000000000 "a\U00000020b" . raptor2-2.0.15/tests/turtle-2013/LITERAL1_with_UTF8_boundaries.nt0000644000175000017500000000024712222044704020751 00000000000000 "\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD" . raptor2-2.0.15/tests/turtle-2013/IRI_with_all_punctuation.ttl0000644000175000017500000000021612222044704020635 00000000000000 . raptor2-2.0.15/tests/turtle-2013/first.nt0000644000175000017500000000117212222044704014645 00000000000000_:genid1 "1"^^ . _:genid1 . _:genid2 "2"^^ . _:genid2 . _:genid3 _:genid1 . _:genid3 _:genid2 . _:genid3 . raptor2-2.0.15/tests/turtle-2013/default_namespace_IRI.ttl0000644000175000017500000000011612222044704020040 00000000000000@prefix : . :s . raptor2-2.0.15/tests/turtle-2013/bareword_double.nt0000644000175000017500000000013512222044704016653 00000000000000 "1E0"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-uri-04.ttl0000644000175000017500000000031212222044704017554 00000000000000# IRI with all chars in it. . raptor2-2.0.15/tests/turtle-2013/literal_with_LINE_FEED.ttl0000644000175000017500000000006412222044704017760 00000000000000 ''' ''' . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_LINE_FEED.ttl0000644000175000017500000000006112222044704021441 00000000000000 '\n' . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-12.ttl0000644000175000017500000000011712222044704021027 00000000000000 raptor2-2.0.15/tests/turtle-2013/LITERAL2.ttl0000644000175000017500000000006012222044704015051 00000000000000 "x" . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_leading_digit.ttl0000644000175000017500000000006012222044704023335 00000000000000 _:0 . raptor2-2.0.15/tests/turtle-2013/repeated_semis_at_end.ttl0000644000175000017500000000016112222044704020200 00000000000000 ;; . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-01.ttl0000644000175000017500000000006212222044704020251 00000000000000@prefix : . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-prefix-01.ttl0000644000175000017500000000007412222044704021000 00000000000000# No prefix :s "x" . raptor2-2.0.15/tests/turtle-2013/literal_with_FORM_FEED.nt0000644000175000017500000000006512222044704017613 00000000000000 "\u000C" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-02.ttl0000644000175000017500000000005712222044704020256 00000000000000PreFIX : raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-07.ttl0000644000175000017500000000014412222044704020271 00000000000000 """abc""def''ghi""" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-kw-02.ttl0000644000175000017500000000007412222044704020125 00000000000000@prefix : . a :p :o . raptor2-2.0.15/tests/turtle-2013/literal_with_BACKSPACE.ttl0000644000175000017500000000006012222044704017716 00000000000000 '' . raptor2-2.0.15/tests/turtle-2013/double_lower_case_e.nt0000644000175000017500000000013512222044704017475 00000000000000 "1e0"^^ . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_non_leading_extras.ttl0000644000175000017500000000007512222044704024423 00000000000000 _:a·̀ͯ‿.⁀ . raptor2-2.0.15/tests/turtle-2013/predicateObjectList_with_two_objectLists.nt0000644000175000017500000000020612222044704023727 00000000000000 . . raptor2-2.0.15/tests/turtle-2013/old_style_base.nt0000644000175000017500000000010112222044704016475 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-01.ttl0000644000175000017500000000001612112703616020245 00000000000000

123 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-06.nt0000644000175000017500000000041412112703616016224 00000000000000_:genid1 . _:genid1 . _:genid2 . _:genid2 . raptor2-2.0.15/tests/turtle-2013/localname_with_COLON.ttl0000644000175000017500000000012112222044704017611 00000000000000@prefix p: . p:s: . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-10.ttl0000644000175000017500000000014412222044704020044 00000000000000@prefix : . :s1 :p :o . [ :p1 :o1 ; :p2 :o2 ] . :s2 :p :o . raptor2-2.0.15/tests/turtle-2013/README0000644000175000017500000000473312222044704014041 00000000000000This README is for the W3C RDF Working Group's Turtle test suite. This test suite contains four kinds of tests: 132 Evaluation (rdft:TestTurtleEval) - a pair of an input turtle file and reference ntriples file. 77 Positive syntax (rdft:TestTurtlePositiveSyntax) - an input turtle file with no syntax errors. 78 Negative syntax (rdft:TestTurtleNegativeSyntax) - an input turtle file with at least one syntax error. 4 Negative Evaluation (rdft:TestTurtleNegativeEval) - a pair of an input turtle file and reference ntriples file. These tests have the same properties as rdft:TestTurtleNegativeSyntax. The manifest.ttl file in this directory lists all of the tests in the RDF WG's Turtle test suite. Each test is one of the above tests. All tests have a name (mf:name) and an input (mf:action). The Evaluation tests have an expected result (mf:result). • An implementation passes an Evaluation test if it parses the input into a graph, parses the expecte result into another graph, and those two graphs are isomorphic (see ). • An implementation passes a positive syntax test if it parses the input. • An implementation passes a negative syntax test if it fails to parse the input. RELATIVE IRI RESOLUTION: The home of the test suite is . Per RFC 3986 section 5.1.3, the base IRI for parsing each file is the retrieval IRI for that file. For example, the tests turtle-subm-01 and turtle-subm-27 require relative IRI resolution against a base of and respectively. CHARACTER ENCODING: The Turtle language uses UTF-8 encoding. The following tests include non-ascii characters: localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries * localName_with_nfc_PN_CHARS_BASE_character_boundaries * labeled_blank_node_with_PN_CHARS_BASE_character_boundaries * LITERAL1_with_UTF8_boundaries * LITERAL_LONG1_with_UTF8_boundaries * LITERAL2_with_UTF8_boundaries * LITERAL_LONG2_with_UTF8_boundaries * Those marked with a * include characters with codepoints greater than U+FFFD and are thus expressed as a pair of surrogate characters when represented in UCS2. See http://www.w3.org/2011/rdf-wg/wiki/Turtle_Test_Suite for more details. Eric Prud'hommeaux - 11 June 2013. raptor2-2.0.15/tests/turtle-2013/SPARQL_style_base.nt0000644000175000017500000000010112222044704016721 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-esc-01.ttl0000644000175000017500000000015312222044704020253 00000000000000# Bad string escape "a\zb" . raptor2-2.0.15/tests/turtle-2013/old_style_base.ttl0000644000175000017500000000011312222044704016662 00000000000000@base . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-pname-03.ttl0000644000175000017500000000013012222044704020576 00000000000000# No \u (x39 is "9") @prefix : . :a\u0039 :p :o . raptor2-2.0.15/tests/turtle-2013/Makefile.am0000644000175000017500000004673612277157103015236 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Turtle 2013 tests # # Copyright (C) 2013, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # RDFCOMPARE=$(srcdir)/../../scripts/rdfcompare RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_GOOD_FILES = \ turtle-syntax-file-01.ttl \ turtle-syntax-file-02.ttl \ turtle-syntax-file-03.ttl \ turtle-syntax-uri-01.ttl \ turtle-syntax-uri-02.ttl \ turtle-syntax-uri-03.ttl \ turtle-syntax-uri-04.ttl \ turtle-syntax-base-01.ttl \ turtle-syntax-base-02.ttl \ turtle-syntax-base-03.ttl \ turtle-syntax-base-04.ttl \ turtle-syntax-prefix-01.ttl \ turtle-syntax-prefix-02.ttl \ turtle-syntax-prefix-03.ttl \ turtle-syntax-prefix-04.ttl \ turtle-syntax-prefix-05.ttl \ turtle-syntax-prefix-06.ttl \ turtle-syntax-prefix-07.ttl \ turtle-syntax-prefix-08.ttl \ turtle-syntax-prefix-09.ttl \ turtle-syntax-string-01.ttl \ turtle-syntax-string-02.ttl \ turtle-syntax-string-03.ttl \ turtle-syntax-string-04.ttl \ turtle-syntax-string-05.ttl \ turtle-syntax-string-06.ttl \ turtle-syntax-string-07.ttl \ turtle-syntax-string-08.ttl \ turtle-syntax-string-09.ttl \ turtle-syntax-string-10.ttl \ turtle-syntax-string-11.ttl \ turtle-syntax-str-esc-01.ttl \ turtle-syntax-str-esc-02.ttl \ turtle-syntax-str-esc-03.ttl \ turtle-syntax-pname-esc-01.ttl \ turtle-syntax-pname-esc-02.ttl \ turtle-syntax-pname-esc-03.ttl \ turtle-syntax-bnode-01.ttl \ turtle-syntax-bnode-02.ttl \ turtle-syntax-bnode-03.ttl \ turtle-syntax-bnode-04.ttl \ turtle-syntax-bnode-05.ttl \ turtle-syntax-bnode-06.ttl \ turtle-syntax-bnode-07.ttl \ turtle-syntax-bnode-08.ttl \ turtle-syntax-bnode-09.ttl \ turtle-syntax-bnode-10.ttl \ turtle-syntax-number-01.ttl \ turtle-syntax-number-02.ttl \ turtle-syntax-number-03.ttl \ turtle-syntax-number-04.ttl \ turtle-syntax-number-05.ttl \ turtle-syntax-number-06.ttl \ turtle-syntax-number-07.ttl \ turtle-syntax-number-08.ttl \ turtle-syntax-number-09.ttl \ turtle-syntax-number-10.ttl \ turtle-syntax-number-11.ttl \ turtle-syntax-datatypes-01.ttl \ turtle-syntax-datatypes-02.ttl \ turtle-syntax-kw-01.ttl \ turtle-syntax-kw-02.ttl \ turtle-syntax-kw-03.ttl \ turtle-syntax-struct-01.ttl \ turtle-syntax-struct-02.ttl \ turtle-syntax-struct-03.ttl \ turtle-syntax-struct-04.ttl \ turtle-syntax-struct-05.ttl \ turtle-syntax-lists-01.ttl \ turtle-syntax-lists-02.ttl \ turtle-syntax-lists-03.ttl \ turtle-syntax-lists-04.ttl \ turtle-syntax-lists-05.ttl \ turtle-syntax-ln-dots.ttl \ turtle-syntax-ln-colons.ttl \ turtle-syntax-ns-dots.ttl \ turtle-syntax-blank-label.ttl TEST_BAD_FILES = \ turtle-syntax-bad-uri-01.ttl \ turtle-syntax-bad-uri-02.ttl \ turtle-syntax-bad-uri-03.ttl \ turtle-syntax-bad-uri-04.ttl \ turtle-syntax-bad-uri-05.ttl \ turtle-syntax-bad-prefix-01.ttl \ turtle-syntax-bad-prefix-02.ttl \ turtle-syntax-bad-prefix-03.ttl \ turtle-syntax-bad-prefix-04.ttl \ turtle-syntax-bad-prefix-05.ttl \ turtle-syntax-bad-base-01.ttl \ turtle-syntax-bad-base-02.ttl \ turtle-syntax-bad-base-03.ttl \ turtle-syntax-bad-struct-01.ttl \ turtle-syntax-bad-struct-02.ttl \ turtle-syntax-bad-struct-03.ttl \ turtle-syntax-bad-struct-04.ttl \ turtle-syntax-bad-struct-05.ttl \ turtle-syntax-bad-struct-06.ttl \ turtle-syntax-bad-struct-07.ttl \ turtle-syntax-bad-kw-01.ttl \ turtle-syntax-bad-kw-02.ttl \ turtle-syntax-bad-kw-03.ttl \ turtle-syntax-bad-kw-04.ttl \ turtle-syntax-bad-kw-05.ttl \ turtle-syntax-bad-n3-extras-01.ttl \ turtle-syntax-bad-n3-extras-02.ttl \ turtle-syntax-bad-n3-extras-03.ttl \ turtle-syntax-bad-n3-extras-04.ttl \ turtle-syntax-bad-n3-extras-05.ttl \ turtle-syntax-bad-n3-extras-06.ttl \ turtle-syntax-bad-n3-extras-07.ttl \ turtle-syntax-bad-n3-extras-08.ttl \ turtle-syntax-bad-n3-extras-09.ttl \ turtle-syntax-bad-n3-extras-10.ttl \ turtle-syntax-bad-n3-extras-11.ttl \ turtle-syntax-bad-n3-extras-12.ttl \ turtle-syntax-bad-n3-extras-13.ttl \ turtle-syntax-bad-struct-08.ttl \ turtle-syntax-bad-struct-09.ttl \ turtle-syntax-bad-struct-10.ttl \ turtle-syntax-bad-struct-11.ttl \ turtle-syntax-bad-struct-12.ttl \ turtle-syntax-bad-struct-13.ttl \ turtle-syntax-bad-struct-14.ttl \ turtle-syntax-bad-struct-15.ttl \ turtle-syntax-bad-struct-16.ttl \ turtle-syntax-bad-struct-17.ttl \ turtle-syntax-bad-lang-01.ttl \ turtle-syntax-bad-esc-01.ttl \ turtle-syntax-bad-esc-02.ttl \ turtle-syntax-bad-esc-03.ttl \ turtle-syntax-bad-esc-04.ttl \ turtle-syntax-bad-pname-01.ttl \ turtle-syntax-bad-pname-02.ttl \ turtle-syntax-bad-pname-03.ttl \ turtle-syntax-bad-string-01.ttl \ turtle-syntax-bad-string-02.ttl \ turtle-syntax-bad-string-03.ttl \ turtle-syntax-bad-string-04.ttl \ turtle-syntax-bad-string-05.ttl \ turtle-syntax-bad-string-06.ttl \ turtle-syntax-bad-string-07.ttl \ turtle-syntax-bad-num-01.ttl \ turtle-syntax-bad-num-02.ttl \ turtle-syntax-bad-num-03.ttl \ turtle-syntax-bad-num-04.ttl \ turtle-syntax-bad-num-05.ttl \ turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl \ turtle-syntax-bad-blank-label-dot-end.ttl \ turtle-syntax-bad-number-dot-in-anon.ttl \ turtle-syntax-bad-ln-dash-start.ttl \ turtle-syntax-bad-ln-escape.ttl \ turtle-syntax-bad-ln-escape-start.ttl \ turtle-syntax-bad-ns-dot-end.ttl \ turtle-syntax-bad-ns-dot-start.ttl \ turtle-syntax-bad-missing-ns-dot-end.ttl \ turtle-syntax-bad-missing-ns-dot-start.ttl TEST_EVAL_FILES = \ IRI_subject.ttl \ IRI_with_four_digit_numeric_escape.ttl \ IRI_with_eight_digit_numeric_escape.ttl \ IRI_with_all_punctuation.ttl \ bareword_a_predicate.ttl \ old_style_prefix.ttl \ SPARQL_style_prefix.ttl \ prefixed_IRI_predicate.ttl \ prefixed_IRI_object.ttl \ prefix_only_IRI.ttl \ prefix_with_PN_CHARS_BASE_character_boundaries.ttl \ prefix_with_non_leading_extras.ttl \ localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries.ttl \ localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.ttl \ localName_with_nfc_PN_CHARS_BASE_character_boundaries.ttl \ default_namespace_IRI.ttl \ prefix_reassigned_and_used.ttl \ reserved_escaped_localName.ttl \ percent_escaped_localName.ttl \ HYPHEN_MINUS_in_localName.ttl \ underscore_in_localName.ttl \ localname_with_COLON.ttl \ localName_with_leading_underscore.ttl \ localName_with_leading_digit.ttl \ localName_with_non_leading_extras.ttl \ old_style_base.ttl \ SPARQL_style_base.ttl \ labeled_blank_node_subject.ttl \ labeled_blank_node_object.ttl \ labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.ttl \ labeled_blank_node_with_leading_underscore.ttl \ labeled_blank_node_with_leading_digit.ttl \ labeled_blank_node_with_non_leading_extras.ttl \ anonymous_blank_node_subject.ttl \ anonymous_blank_node_object.ttl \ sole_blankNodePropertyList.ttl \ blankNodePropertyList_as_subject.ttl \ blankNodePropertyList_as_object.ttl \ blankNodePropertyList_with_multiple_triples.ttl \ nested_blankNodePropertyLists.ttl \ blankNodePropertyList_containing_collection.ttl \ collection_subject.ttl \ collection_object.ttl \ empty_collection.ttl \ nested_collection.ttl \ first.ttl \ last.ttl \ LITERAL1.ttl \ LITERAL1_ascii_boundaries.ttl \ LITERAL1_with_UTF8_boundaries.ttl \ LITERAL1_all_controls.ttl \ LITERAL1_all_punctuation.ttl \ LITERAL_LONG1.ttl \ LITERAL_LONG1_ascii_boundaries.ttl \ LITERAL_LONG1_with_UTF8_boundaries.ttl \ LITERAL_LONG1_with_1_squote.ttl \ LITERAL_LONG1_with_2_squotes.ttl \ LITERAL2.ttl \ LITERAL2_ascii_boundaries.ttl \ LITERAL2_with_UTF8_boundaries.ttl \ LITERAL_LONG2.ttl \ LITERAL_LONG2_ascii_boundaries.ttl \ LITERAL_LONG2_with_UTF8_boundaries.ttl \ LITERAL_LONG2_with_1_squote.ttl \ LITERAL_LONG2_with_2_squotes.ttl \ literal_with_CHARACTER_TABULATION.ttl \ literal_with_BACKSPACE.ttl \ literal_with_LINE_FEED.ttl \ literal_with_CARRIAGE_RETURN.ttl \ literal_with_FORM_FEED.ttl \ literal_with_REVERSE_SOLIDUS.ttl \ literal_with_escaped_CHARACTER_TABULATION.ttl \ literal_with_escaped_BACKSPACE.ttl \ literal_with_escaped_LINE_FEED.ttl \ literal_with_escaped_CARRIAGE_RETURN.ttl \ literal_with_escaped_FORM_FEED.ttl \ literal_with_numeric_escape4.ttl \ literal_with_numeric_escape8.ttl \ IRIREF_datatype.ttl \ prefixed_name_datatype.ttl \ bareword_integer.ttl \ bareword_decimal.ttl \ bareword_double.ttl \ double_lower_case_e.ttl \ negative_numeric.ttl \ positive_numeric.ttl \ numeric_with_leading_0.ttl \ literal_true.ttl \ literal_false.ttl \ langtagged_non_LONG.ttl \ langtagged_LONG.ttl \ lantag_with_subtag.ttl \ objectList_with_two_objects.ttl \ predicateObjectList_with_two_objectLists.ttl \ repeated_semis_at_end.ttl \ repeated_semis_not_at_end.ttl \ turtle-eval-struct-01.ttl \ turtle-eval-struct-02.ttl \ turtle-subm-01.ttl \ turtle-subm-02.ttl \ turtle-subm-03.ttl \ turtle-subm-04.ttl \ turtle-subm-05.ttl \ turtle-subm-06.ttl \ turtle-subm-07.ttl \ turtle-subm-08.ttl \ turtle-subm-09.ttl \ turtle-subm-10.ttl \ turtle-subm-11.ttl \ turtle-subm-12.ttl \ turtle-subm-13.ttl \ turtle-subm-14.ttl \ turtle-subm-15.ttl \ turtle-subm-16.ttl \ turtle-subm-17.ttl \ turtle-subm-18.ttl \ turtle-subm-19.ttl \ turtle-subm-20.ttl \ turtle-subm-21.ttl \ turtle-subm-22.ttl \ turtle-subm-23.ttl \ turtle-subm-24.ttl \ turtle-subm-25.ttl \ turtle-subm-26.ttl \ turtle-subm-27.ttl \ comment_following_localName.ttl \ number_sign_following_localName.ttl \ comment_following_PNAME_NS.ttl \ number_sign_following_PNAME_NS.ttl \ LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl \ two_LITERAL_LONG2s.ttl \ langtagged_LONG_with_subtag.ttl \ oops.ttl TEST_BAD_EVAL_FILES = \ turtle-eval-bad-01.ttl \ turtle-eval-bad-02.ttl \ turtle-eval-bad-03.ttl \ turtle-eval-bad-04.ttl TEST_OUT_FILES = \ HYPHEN_MINUS_in_localName.nt \ IRIREF_datatype.nt \ IRI_spo.nt \ IRI_subject.nt \ IRI_with_all_punctuation.nt \ IRI_with_eight_digit_numeric_escape.nt \ IRI_with_four_digit_numeric_escape.nt \ LITERAL1.nt \ LITERAL1_all_controls.nt \ LITERAL1_all_punctuation.nt \ LITERAL1_ascii_boundaries.nt \ LITERAL1_with_UTF8_boundaries.nt \ LITERAL2.nt \ LITERAL2_ascii_boundaries.nt \ LITERAL2_with_UTF8_boundaries.nt \ LITERAL_LONG1.nt \ LITERAL_LONG1_ascii_boundaries.nt \ LITERAL_LONG1_with_1_squote.nt \ LITERAL_LONG1_with_2_squotes.nt \ LITERAL_LONG1_with_UTF8_boundaries.nt \ LITERAL_LONG2.nt \ LITERAL_LONG2_ascii_boundaries.nt \ LITERAL_LONG2_with_1_squote.nt \ LITERAL_LONG2_with_2_squotes.nt \ LITERAL_LONG2_with_REVERSE_SOLIDUS.nt \ LITERAL_LONG2_with_UTF8_boundaries.nt \ LITERAL_with_UTF8_boundaries.nt \ SPARQL_style_base.nt \ SPARQL_style_prefix.nt \ anonymous_blank_node_object.nt \ anonymous_blank_node_subject.nt \ bareword_a_predicate.nt \ bareword_decimal.nt \ bareword_double.nt \ bareword_integer.nt \ blankNodePropertyList_as_object.nt \ blankNodePropertyList_as_subject.nt \ blankNodePropertyList_containing_collection.nt \ blankNodePropertyList_with_multiple_triples.nt \ collection_object.nt \ collection_subject.nt \ comment_following_PNAME_NS.nt \ comment_following_localName.nt \ default_namespace_IRI.nt \ double_lower_case_e.nt \ empty_collection.nt \ first.nt \ labeled_blank_node_object.nt \ labeled_blank_node_subject.nt \ labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.nt \ labeled_blank_node_with_leading_digit.nt \ labeled_blank_node_with_leading_underscore.nt \ labeled_blank_node_with_non_leading_extras.nt \ langtagged_LONG.nt \ langtagged_LONG_with_subtag.nt \ langtagged_non_LONG.nt \ lantag_with_subtag.nt \ last.nt \ literal_false.nt \ literal_true.nt \ literal_with_BACKSPACE.nt \ literal_with_CARRIAGE_RETURN.nt \ literal_with_CHARACTER_TABULATION.nt \ literal_with_FORM_FEED.nt \ literal_with_LINE_FEED.nt \ literal_with_REVERSE_SOLIDUS.nt \ literal_with_escaped_BACKSPACE.nt \ literal_with_escaped_CARRIAGE_RETURN.nt \ literal_with_escaped_CHARACTER_TABULATION.nt \ literal_with_escaped_FORM_FEED.nt \ literal_with_escaped_LINE_FEED.nt \ literal_with_numeric_escape4.nt \ literal_with_numeric_escape8.nt \ localName_with_PN_CHARS_BASE_character_boundaries.nt \ localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.nt \ localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries.nt \ localName_with_leading_digit.nt \ localName_with_leading_underscore.nt \ localName_with_nfc_PN_CHARS_BASE_character_boundaries.nt \ localName_with_non_leading_extras.nt \ localname_with_COLON.nt \ negative_numeric.nt \ nested_blankNodePropertyLists.nt \ nested_collection.nt \ number_sign_following_PNAME_NS.nt \ number_sign_following_localName.nt \ numeric_with_leading_0.nt \ objectList_with_two_objects.nt \ old_style_base.nt \ old_style_prefix.nt \ percent_escaped_localName.nt \ positive_numeric.nt \ predicateObjectList_with_two_objectLists.nt \ prefix_only_IRI.nt \ prefix_reassigned_and_used.nt \ prefix_with_PN_CHARS_BASE_character_boundaries.nt \ prefix_with_non_leading_extras.nt \ prefixed_IRI_object.nt \ prefixed_IRI_predicate.nt \ prefixed_name_datatype.nt \ repeated_semis_at_end.nt \ repeated_semis_not_at_end.nt \ reserved_escaped_localName.nt \ sole_blankNodePropertyList.nt \ turtle-eval-struct-01.nt \ turtle-eval-struct-02.nt \ turtle-subm-01.nt \ turtle-subm-02.nt \ turtle-subm-03.nt \ turtle-subm-04.nt \ turtle-subm-05.nt \ turtle-subm-06.nt \ turtle-subm-07.nt \ turtle-subm-08.nt \ turtle-subm-09.nt \ turtle-subm-10.nt \ turtle-subm-11.nt \ turtle-subm-12.nt \ turtle-subm-13.nt \ turtle-subm-14.nt \ turtle-subm-15.nt \ turtle-subm-16.nt \ turtle-subm-17.nt \ turtle-subm-18.nt \ turtle-subm-19.nt \ turtle-subm-20.nt \ turtle-subm-21.nt \ turtle-subm-22.nt \ turtle-subm-23.nt \ turtle-subm-24.nt \ turtle-subm-25.nt \ turtle-subm-26.nt \ turtle-subm-27.nt \ turtle-syntax-blank-label.nt \ turtle-syntax-ln-colons.nt \ turtle-syntax-ln-dots.nt \ two_LITERAL_LONG2s.nt \ underscore_in_localName.nt \ oops.nt # Used to make N-triples output consistent BASE_URI=http://www.w3.org/2013/TurtleTests/ # for rdf-schema.ttl RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES= README \ $(TEST_GOOD_FILES) \ $(TEST_BAD_FILES) \ $(TEST_EVAL_FILES) \ $(TEST_BAD_EVAL_FILES) \ $(TEST_OUT_FILES) EXTRA_DIST = $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-good-turtle check-bad-turtle check-eval-turtle if MAINTAINER_MODE check_good_turtle_deps = $(TEST_GOOD_FILES) endif check-good-turtle: build-rapper $(check_good_turtle_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing good Turtle syntax passes"; \ for test in $(TEST_GOOD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ rm -f $$name.res $$name.err; \ done; \ $(RECHO) "Result: $$errors errors: $$failures"; \ set -e; exit $$result if MAINTAINER_MODE check_bad_turtle_deps = $(TEST_BAD_FILES) $(TEST_BAD_EVAL_FILES) endif check-bad-turtle: build-rapper $(check_bad_turtle_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing bad Turtle fails"; \ for test in $(TEST_BAD_FILES) $(TEST_BAD_EVAL_FILES) ; do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ $(RECHO) "Result: $$errors errors: $$failures"; \ set -e; exit $$result if MAINTAINER_MODE check_eval_turtle_deps = $(TEST_EVAL_FILES) endif check-eval-turtle: build-rapper $(check_eval_turtle_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing eval Turtle"; \ for test in $(TEST_EVAL_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$name.nt > $$name.nnt; \ $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif $(RDFCOMPARE) $$name.nnt $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $$name.nnt $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err $$name.nnt; \ done; \ $(RECHO) "Result: $$errors errors: $$failures"; \ set -e; exit $$result raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-08.ttl0000644000175000017500000000013612222044704020273 00000000000000 """abc def""" . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_with_UTF8_boundaries.nt0000644000175000017500000000024712222044704021570 00000000000000 "\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-02.ttl0000644000175000017500000000011712222044704021326 00000000000000# = is not Turtle @prefix : . :a = :b . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_ascii_boundaries.ttl0000644000175000017500000000006512222044704021257 00000000000000 '&([]' . raptor2-2.0.15/tests/turtle-2013/last.ttl0000644000175000017500000000006412222044704014642 00000000000000 (1 (2)) . raptor2-2.0.15/tests/turtle-2013/Makefile.in0000644000175000017500000007636412425344566015255 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Turtle 2013 tests # # Copyright (C) 2013, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/turtle-2013 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ RDFCOMPARE = $(srcdir)/../../scripts/rdfcompare RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_GOOD_FILES = \ turtle-syntax-file-01.ttl \ turtle-syntax-file-02.ttl \ turtle-syntax-file-03.ttl \ turtle-syntax-uri-01.ttl \ turtle-syntax-uri-02.ttl \ turtle-syntax-uri-03.ttl \ turtle-syntax-uri-04.ttl \ turtle-syntax-base-01.ttl \ turtle-syntax-base-02.ttl \ turtle-syntax-base-03.ttl \ turtle-syntax-base-04.ttl \ turtle-syntax-prefix-01.ttl \ turtle-syntax-prefix-02.ttl \ turtle-syntax-prefix-03.ttl \ turtle-syntax-prefix-04.ttl \ turtle-syntax-prefix-05.ttl \ turtle-syntax-prefix-06.ttl \ turtle-syntax-prefix-07.ttl \ turtle-syntax-prefix-08.ttl \ turtle-syntax-prefix-09.ttl \ turtle-syntax-string-01.ttl \ turtle-syntax-string-02.ttl \ turtle-syntax-string-03.ttl \ turtle-syntax-string-04.ttl \ turtle-syntax-string-05.ttl \ turtle-syntax-string-06.ttl \ turtle-syntax-string-07.ttl \ turtle-syntax-string-08.ttl \ turtle-syntax-string-09.ttl \ turtle-syntax-string-10.ttl \ turtle-syntax-string-11.ttl \ turtle-syntax-str-esc-01.ttl \ turtle-syntax-str-esc-02.ttl \ turtle-syntax-str-esc-03.ttl \ turtle-syntax-pname-esc-01.ttl \ turtle-syntax-pname-esc-02.ttl \ turtle-syntax-pname-esc-03.ttl \ turtle-syntax-bnode-01.ttl \ turtle-syntax-bnode-02.ttl \ turtle-syntax-bnode-03.ttl \ turtle-syntax-bnode-04.ttl \ turtle-syntax-bnode-05.ttl \ turtle-syntax-bnode-06.ttl \ turtle-syntax-bnode-07.ttl \ turtle-syntax-bnode-08.ttl \ turtle-syntax-bnode-09.ttl \ turtle-syntax-bnode-10.ttl \ turtle-syntax-number-01.ttl \ turtle-syntax-number-02.ttl \ turtle-syntax-number-03.ttl \ turtle-syntax-number-04.ttl \ turtle-syntax-number-05.ttl \ turtle-syntax-number-06.ttl \ turtle-syntax-number-07.ttl \ turtle-syntax-number-08.ttl \ turtle-syntax-number-09.ttl \ turtle-syntax-number-10.ttl \ turtle-syntax-number-11.ttl \ turtle-syntax-datatypes-01.ttl \ turtle-syntax-datatypes-02.ttl \ turtle-syntax-kw-01.ttl \ turtle-syntax-kw-02.ttl \ turtle-syntax-kw-03.ttl \ turtle-syntax-struct-01.ttl \ turtle-syntax-struct-02.ttl \ turtle-syntax-struct-03.ttl \ turtle-syntax-struct-04.ttl \ turtle-syntax-struct-05.ttl \ turtle-syntax-lists-01.ttl \ turtle-syntax-lists-02.ttl \ turtle-syntax-lists-03.ttl \ turtle-syntax-lists-04.ttl \ turtle-syntax-lists-05.ttl \ turtle-syntax-ln-dots.ttl \ turtle-syntax-ln-colons.ttl \ turtle-syntax-ns-dots.ttl \ turtle-syntax-blank-label.ttl TEST_BAD_FILES = \ turtle-syntax-bad-uri-01.ttl \ turtle-syntax-bad-uri-02.ttl \ turtle-syntax-bad-uri-03.ttl \ turtle-syntax-bad-uri-04.ttl \ turtle-syntax-bad-uri-05.ttl \ turtle-syntax-bad-prefix-01.ttl \ turtle-syntax-bad-prefix-02.ttl \ turtle-syntax-bad-prefix-03.ttl \ turtle-syntax-bad-prefix-04.ttl \ turtle-syntax-bad-prefix-05.ttl \ turtle-syntax-bad-base-01.ttl \ turtle-syntax-bad-base-02.ttl \ turtle-syntax-bad-base-03.ttl \ turtle-syntax-bad-struct-01.ttl \ turtle-syntax-bad-struct-02.ttl \ turtle-syntax-bad-struct-03.ttl \ turtle-syntax-bad-struct-04.ttl \ turtle-syntax-bad-struct-05.ttl \ turtle-syntax-bad-struct-06.ttl \ turtle-syntax-bad-struct-07.ttl \ turtle-syntax-bad-kw-01.ttl \ turtle-syntax-bad-kw-02.ttl \ turtle-syntax-bad-kw-03.ttl \ turtle-syntax-bad-kw-04.ttl \ turtle-syntax-bad-kw-05.ttl \ turtle-syntax-bad-n3-extras-01.ttl \ turtle-syntax-bad-n3-extras-02.ttl \ turtle-syntax-bad-n3-extras-03.ttl \ turtle-syntax-bad-n3-extras-04.ttl \ turtle-syntax-bad-n3-extras-05.ttl \ turtle-syntax-bad-n3-extras-06.ttl \ turtle-syntax-bad-n3-extras-07.ttl \ turtle-syntax-bad-n3-extras-08.ttl \ turtle-syntax-bad-n3-extras-09.ttl \ turtle-syntax-bad-n3-extras-10.ttl \ turtle-syntax-bad-n3-extras-11.ttl \ turtle-syntax-bad-n3-extras-12.ttl \ turtle-syntax-bad-n3-extras-13.ttl \ turtle-syntax-bad-struct-08.ttl \ turtle-syntax-bad-struct-09.ttl \ turtle-syntax-bad-struct-10.ttl \ turtle-syntax-bad-struct-11.ttl \ turtle-syntax-bad-struct-12.ttl \ turtle-syntax-bad-struct-13.ttl \ turtle-syntax-bad-struct-14.ttl \ turtle-syntax-bad-struct-15.ttl \ turtle-syntax-bad-struct-16.ttl \ turtle-syntax-bad-struct-17.ttl \ turtle-syntax-bad-lang-01.ttl \ turtle-syntax-bad-esc-01.ttl \ turtle-syntax-bad-esc-02.ttl \ turtle-syntax-bad-esc-03.ttl \ turtle-syntax-bad-esc-04.ttl \ turtle-syntax-bad-pname-01.ttl \ turtle-syntax-bad-pname-02.ttl \ turtle-syntax-bad-pname-03.ttl \ turtle-syntax-bad-string-01.ttl \ turtle-syntax-bad-string-02.ttl \ turtle-syntax-bad-string-03.ttl \ turtle-syntax-bad-string-04.ttl \ turtle-syntax-bad-string-05.ttl \ turtle-syntax-bad-string-06.ttl \ turtle-syntax-bad-string-07.ttl \ turtle-syntax-bad-num-01.ttl \ turtle-syntax-bad-num-02.ttl \ turtle-syntax-bad-num-03.ttl \ turtle-syntax-bad-num-04.ttl \ turtle-syntax-bad-num-05.ttl \ turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl \ turtle-syntax-bad-blank-label-dot-end.ttl \ turtle-syntax-bad-number-dot-in-anon.ttl \ turtle-syntax-bad-ln-dash-start.ttl \ turtle-syntax-bad-ln-escape.ttl \ turtle-syntax-bad-ln-escape-start.ttl \ turtle-syntax-bad-ns-dot-end.ttl \ turtle-syntax-bad-ns-dot-start.ttl \ turtle-syntax-bad-missing-ns-dot-end.ttl \ turtle-syntax-bad-missing-ns-dot-start.ttl TEST_EVAL_FILES = \ IRI_subject.ttl \ IRI_with_four_digit_numeric_escape.ttl \ IRI_with_eight_digit_numeric_escape.ttl \ IRI_with_all_punctuation.ttl \ bareword_a_predicate.ttl \ old_style_prefix.ttl \ SPARQL_style_prefix.ttl \ prefixed_IRI_predicate.ttl \ prefixed_IRI_object.ttl \ prefix_only_IRI.ttl \ prefix_with_PN_CHARS_BASE_character_boundaries.ttl \ prefix_with_non_leading_extras.ttl \ localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries.ttl \ localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.ttl \ localName_with_nfc_PN_CHARS_BASE_character_boundaries.ttl \ default_namespace_IRI.ttl \ prefix_reassigned_and_used.ttl \ reserved_escaped_localName.ttl \ percent_escaped_localName.ttl \ HYPHEN_MINUS_in_localName.ttl \ underscore_in_localName.ttl \ localname_with_COLON.ttl \ localName_with_leading_underscore.ttl \ localName_with_leading_digit.ttl \ localName_with_non_leading_extras.ttl \ old_style_base.ttl \ SPARQL_style_base.ttl \ labeled_blank_node_subject.ttl \ labeled_blank_node_object.ttl \ labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.ttl \ labeled_blank_node_with_leading_underscore.ttl \ labeled_blank_node_with_leading_digit.ttl \ labeled_blank_node_with_non_leading_extras.ttl \ anonymous_blank_node_subject.ttl \ anonymous_blank_node_object.ttl \ sole_blankNodePropertyList.ttl \ blankNodePropertyList_as_subject.ttl \ blankNodePropertyList_as_object.ttl \ blankNodePropertyList_with_multiple_triples.ttl \ nested_blankNodePropertyLists.ttl \ blankNodePropertyList_containing_collection.ttl \ collection_subject.ttl \ collection_object.ttl \ empty_collection.ttl \ nested_collection.ttl \ first.ttl \ last.ttl \ LITERAL1.ttl \ LITERAL1_ascii_boundaries.ttl \ LITERAL1_with_UTF8_boundaries.ttl \ LITERAL1_all_controls.ttl \ LITERAL1_all_punctuation.ttl \ LITERAL_LONG1.ttl \ LITERAL_LONG1_ascii_boundaries.ttl \ LITERAL_LONG1_with_UTF8_boundaries.ttl \ LITERAL_LONG1_with_1_squote.ttl \ LITERAL_LONG1_with_2_squotes.ttl \ LITERAL2.ttl \ LITERAL2_ascii_boundaries.ttl \ LITERAL2_with_UTF8_boundaries.ttl \ LITERAL_LONG2.ttl \ LITERAL_LONG2_ascii_boundaries.ttl \ LITERAL_LONG2_with_UTF8_boundaries.ttl \ LITERAL_LONG2_with_1_squote.ttl \ LITERAL_LONG2_with_2_squotes.ttl \ literal_with_CHARACTER_TABULATION.ttl \ literal_with_BACKSPACE.ttl \ literal_with_LINE_FEED.ttl \ literal_with_CARRIAGE_RETURN.ttl \ literal_with_FORM_FEED.ttl \ literal_with_REVERSE_SOLIDUS.ttl \ literal_with_escaped_CHARACTER_TABULATION.ttl \ literal_with_escaped_BACKSPACE.ttl \ literal_with_escaped_LINE_FEED.ttl \ literal_with_escaped_CARRIAGE_RETURN.ttl \ literal_with_escaped_FORM_FEED.ttl \ literal_with_numeric_escape4.ttl \ literal_with_numeric_escape8.ttl \ IRIREF_datatype.ttl \ prefixed_name_datatype.ttl \ bareword_integer.ttl \ bareword_decimal.ttl \ bareword_double.ttl \ double_lower_case_e.ttl \ negative_numeric.ttl \ positive_numeric.ttl \ numeric_with_leading_0.ttl \ literal_true.ttl \ literal_false.ttl \ langtagged_non_LONG.ttl \ langtagged_LONG.ttl \ lantag_with_subtag.ttl \ objectList_with_two_objects.ttl \ predicateObjectList_with_two_objectLists.ttl \ repeated_semis_at_end.ttl \ repeated_semis_not_at_end.ttl \ turtle-eval-struct-01.ttl \ turtle-eval-struct-02.ttl \ turtle-subm-01.ttl \ turtle-subm-02.ttl \ turtle-subm-03.ttl \ turtle-subm-04.ttl \ turtle-subm-05.ttl \ turtle-subm-06.ttl \ turtle-subm-07.ttl \ turtle-subm-08.ttl \ turtle-subm-09.ttl \ turtle-subm-10.ttl \ turtle-subm-11.ttl \ turtle-subm-12.ttl \ turtle-subm-13.ttl \ turtle-subm-14.ttl \ turtle-subm-15.ttl \ turtle-subm-16.ttl \ turtle-subm-17.ttl \ turtle-subm-18.ttl \ turtle-subm-19.ttl \ turtle-subm-20.ttl \ turtle-subm-21.ttl \ turtle-subm-22.ttl \ turtle-subm-23.ttl \ turtle-subm-24.ttl \ turtle-subm-25.ttl \ turtle-subm-26.ttl \ turtle-subm-27.ttl \ comment_following_localName.ttl \ number_sign_following_localName.ttl \ comment_following_PNAME_NS.ttl \ number_sign_following_PNAME_NS.ttl \ LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl \ two_LITERAL_LONG2s.ttl \ langtagged_LONG_with_subtag.ttl \ oops.ttl TEST_BAD_EVAL_FILES = \ turtle-eval-bad-01.ttl \ turtle-eval-bad-02.ttl \ turtle-eval-bad-03.ttl \ turtle-eval-bad-04.ttl TEST_OUT_FILES = \ HYPHEN_MINUS_in_localName.nt \ IRIREF_datatype.nt \ IRI_spo.nt \ IRI_subject.nt \ IRI_with_all_punctuation.nt \ IRI_with_eight_digit_numeric_escape.nt \ IRI_with_four_digit_numeric_escape.nt \ LITERAL1.nt \ LITERAL1_all_controls.nt \ LITERAL1_all_punctuation.nt \ LITERAL1_ascii_boundaries.nt \ LITERAL1_with_UTF8_boundaries.nt \ LITERAL2.nt \ LITERAL2_ascii_boundaries.nt \ LITERAL2_with_UTF8_boundaries.nt \ LITERAL_LONG1.nt \ LITERAL_LONG1_ascii_boundaries.nt \ LITERAL_LONG1_with_1_squote.nt \ LITERAL_LONG1_with_2_squotes.nt \ LITERAL_LONG1_with_UTF8_boundaries.nt \ LITERAL_LONG2.nt \ LITERAL_LONG2_ascii_boundaries.nt \ LITERAL_LONG2_with_1_squote.nt \ LITERAL_LONG2_with_2_squotes.nt \ LITERAL_LONG2_with_REVERSE_SOLIDUS.nt \ LITERAL_LONG2_with_UTF8_boundaries.nt \ LITERAL_with_UTF8_boundaries.nt \ SPARQL_style_base.nt \ SPARQL_style_prefix.nt \ anonymous_blank_node_object.nt \ anonymous_blank_node_subject.nt \ bareword_a_predicate.nt \ bareword_decimal.nt \ bareword_double.nt \ bareword_integer.nt \ blankNodePropertyList_as_object.nt \ blankNodePropertyList_as_subject.nt \ blankNodePropertyList_containing_collection.nt \ blankNodePropertyList_with_multiple_triples.nt \ collection_object.nt \ collection_subject.nt \ comment_following_PNAME_NS.nt \ comment_following_localName.nt \ default_namespace_IRI.nt \ double_lower_case_e.nt \ empty_collection.nt \ first.nt \ labeled_blank_node_object.nt \ labeled_blank_node_subject.nt \ labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.nt \ labeled_blank_node_with_leading_digit.nt \ labeled_blank_node_with_leading_underscore.nt \ labeled_blank_node_with_non_leading_extras.nt \ langtagged_LONG.nt \ langtagged_LONG_with_subtag.nt \ langtagged_non_LONG.nt \ lantag_with_subtag.nt \ last.nt \ literal_false.nt \ literal_true.nt \ literal_with_BACKSPACE.nt \ literal_with_CARRIAGE_RETURN.nt \ literal_with_CHARACTER_TABULATION.nt \ literal_with_FORM_FEED.nt \ literal_with_LINE_FEED.nt \ literal_with_REVERSE_SOLIDUS.nt \ literal_with_escaped_BACKSPACE.nt \ literal_with_escaped_CARRIAGE_RETURN.nt \ literal_with_escaped_CHARACTER_TABULATION.nt \ literal_with_escaped_FORM_FEED.nt \ literal_with_escaped_LINE_FEED.nt \ literal_with_numeric_escape4.nt \ literal_with_numeric_escape8.nt \ localName_with_PN_CHARS_BASE_character_boundaries.nt \ localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.nt \ localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries.nt \ localName_with_leading_digit.nt \ localName_with_leading_underscore.nt \ localName_with_nfc_PN_CHARS_BASE_character_boundaries.nt \ localName_with_non_leading_extras.nt \ localname_with_COLON.nt \ negative_numeric.nt \ nested_blankNodePropertyLists.nt \ nested_collection.nt \ number_sign_following_PNAME_NS.nt \ number_sign_following_localName.nt \ numeric_with_leading_0.nt \ objectList_with_two_objects.nt \ old_style_base.nt \ old_style_prefix.nt \ percent_escaped_localName.nt \ positive_numeric.nt \ predicateObjectList_with_two_objectLists.nt \ prefix_only_IRI.nt \ prefix_reassigned_and_used.nt \ prefix_with_PN_CHARS_BASE_character_boundaries.nt \ prefix_with_non_leading_extras.nt \ prefixed_IRI_object.nt \ prefixed_IRI_predicate.nt \ prefixed_name_datatype.nt \ repeated_semis_at_end.nt \ repeated_semis_not_at_end.nt \ reserved_escaped_localName.nt \ sole_blankNodePropertyList.nt \ turtle-eval-struct-01.nt \ turtle-eval-struct-02.nt \ turtle-subm-01.nt \ turtle-subm-02.nt \ turtle-subm-03.nt \ turtle-subm-04.nt \ turtle-subm-05.nt \ turtle-subm-06.nt \ turtle-subm-07.nt \ turtle-subm-08.nt \ turtle-subm-09.nt \ turtle-subm-10.nt \ turtle-subm-11.nt \ turtle-subm-12.nt \ turtle-subm-13.nt \ turtle-subm-14.nt \ turtle-subm-15.nt \ turtle-subm-16.nt \ turtle-subm-17.nt \ turtle-subm-18.nt \ turtle-subm-19.nt \ turtle-subm-20.nt \ turtle-subm-21.nt \ turtle-subm-22.nt \ turtle-subm-23.nt \ turtle-subm-24.nt \ turtle-subm-25.nt \ turtle-subm-26.nt \ turtle-subm-27.nt \ turtle-syntax-blank-label.nt \ turtle-syntax-ln-colons.nt \ turtle-syntax-ln-dots.nt \ two_LITERAL_LONG2s.nt \ underscore_in_localName.nt \ oops.nt # Used to make N-triples output consistent BASE_URI = http://www.w3.org/2013/TurtleTests/ # for rdf-schema.ttl RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES = README \ $(TEST_GOOD_FILES) \ $(TEST_BAD_FILES) \ $(TEST_EVAL_FILES) \ $(TEST_BAD_EVAL_FILES) \ $(TEST_OUT_FILES) EXTRA_DIST = $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff @MAINTAINER_MODE_TRUE@check_good_turtle_deps = $(TEST_GOOD_FILES) @MAINTAINER_MODE_TRUE@check_bad_turtle_deps = $(TEST_BAD_FILES) $(TEST_BAD_EVAL_FILES) @MAINTAINER_MODE_TRUE@check_eval_turtle_deps = $(TEST_EVAL_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/turtle-2013/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/turtle-2013/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-good-turtle check-bad-turtle check-eval-turtle check-good-turtle: build-rapper $(check_good_turtle_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing good Turtle syntax passes"; \ for test in $(TEST_GOOD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ rm -f $$name.res $$name.err; \ done; \ $(RECHO) "Result: $$errors errors: $$failures"; \ set -e; exit $$result check-bad-turtle: build-rapper $(check_bad_turtle_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing bad Turtle fails"; \ for test in $(TEST_BAD_FILES) $(TEST_BAD_EVAL_FILES) ; do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ $(RECHO) "Result: $$errors errors: $$failures"; \ set -e; exit $$result check-eval-turtle: build-rapper $(check_eval_turtle_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing eval Turtle"; \ for test in $(TEST_EVAL_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$name.nt > $$name.nnt; \ $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif $(RDFCOMPARE) $$name.nnt $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; result=1; \ $(RECHO) $(RAPPER) -q -i turtle -o ntriples $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ diff $$name.nnt $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err $$name.nnt; \ done; \ $(RECHO) "Result: $$errors errors: $$failures"; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/turtle-2013/collection_subject.ttl0000644000175000017500000000006012222044704017545 00000000000000(1) . raptor2-2.0.15/tests/turtle-2013/turtle-subm-19.nt0000644000175000017500000000044512112703616016234 00000000000000 "1.0"^^ . "1"^^ . "1.0e0"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-pname-01.ttl0000644000175000017500000000012412222044704020577 00000000000000# ~ must be escaped. @prefix : . :a~b :p :o . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-esc-04.ttl0000644000175000017500000000016112222044704020255 00000000000000# Bad string escape "\U0000WXYZ" . raptor2-2.0.15/tests/turtle-2013/literal_with_numeric_escape4.nt0000644000175000017500000000006012222044704021326 00000000000000 "o" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-ln-dots.nt0000644000175000017500000000057012222044704017740 00000000000000 . . . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_as_subject.nt0000644000175000017500000000015412222044704022215 00000000000000_:genid1 . _:genid1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-kw-03.ttl0000644000175000017500000000007412222044704020126 00000000000000@prefix : . :s :p a . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-ns-dots.ttl0000644000175000017500000000011112222044704020120 00000000000000@prefix e.g: . e.g:s e.g:p e.g:o . raptor2-2.0.15/tests/turtle-2013/IRIREF_datatype.ttl0000644000175000017500000000013412222044704016550 00000000000000 "1"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-13.ttl0000644000175000017500000000011712222044704021030 00000000000000 raptor2-2.0.15/tests/turtle-2013/literal_with_CHARACTER_TABULATION.ttl0000644000175000017500000000006012222044704021460 00000000000000 ' ' . raptor2-2.0.15/tests/turtle-2013/turtle-subm-05.ttl0000644000175000017500000000016012112703616016403 00000000000000# Test empty [] operator; not allowed as predicate @prefix : . [] :a :b . :c :d [] . raptor2-2.0.15/tests/turtle-2013/turtle-subm-26.ttl0000644000175000017500000000470712112703616016421 00000000000000 "2.345"^^ . "1"^^ . "1.0"^^ . "1."^^ . "1.000000000"^^ . "2.3"^^ . "2.234000005"^^ . "2.2340000005"^^ . "2.23400000005"^^ . "2.234000000005"^^ . "2.2340000000005"^^ . "2.23400000000005"^^ . "2.234000000000005"^^ . "2.2340000000000005"^^ . "2.23400000000000005"^^ . "2.234000000000000005"^^ . "2.2340000000000000005"^^ . "2.23400000000000000005"^^ . "2.234000000000000000005"^^ . "2.2340000000000000000005"^^ . "2.23400000000000000000005"^^ . "1.2345678901234567890123457890"^^ . raptor2-2.0.15/tests/turtle-2013/empty_collection.ttl0000644000175000017500000000005712222044704017252 00000000000000 () . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-03.ttl0000644000175000017500000000022112222044704021323 00000000000000# N3 paths @prefix : . @prefix ns: . :x. ns:p. ns:q :p :z . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2.ttl0000644000175000017500000000006412222044704015674 00000000000000 """x""" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-20.ttl0000644000175000017500000000011112112703616016374 00000000000000@prefix : . :a :b -1.0 . :c :d -1 . :e :f -1.0e0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-06.ttl0000644000175000017500000000007712222044704020056 00000000000000@prefix : . _:a :p :o . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-03.ttl0000644000175000017500000000026512222044704021033 00000000000000# Turtle is not NQuads . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-blank-label-dot-end.ttl0000644000175000017500000000010012222044704022747 00000000000000@prefix : . _:b1. :p :o . raptor2-2.0.15/tests/turtle-2013/literal_with_CARRIAGE_RETURN.ttl0000644000175000017500000000006412222044704020722 00000000000000 ''' ''' . raptor2-2.0.15/tests/turtle-2013/turtle-subm-11.ttl0000644000175000017500000000044712112703616016410 00000000000000 000000 . 0 . 000001 . 2 . 4 . raptor2-2.0.15/tests/turtle-2013/prefix_with_non_leading_extras.nt0000644000175000017500000000010112222044704021760 00000000000000 . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_with_multiple_triples.nt0000644000175000017500000000024312222044704024522 00000000000000_:genid1 . _:genid1 . _:genid1 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-15.ttl0000644000175000017500000000014612112703616016410 00000000000000# Test long literal @prefix : . :a :b """a long literal with newlines""" . raptor2-2.0.15/tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries.ttl0000644000175000017500000000021512222044704027503 00000000000000@prefix p: . p:AZazÀÖØöø˿Ͱͽ΄῾‌‍⁰↉Ⰰ⿕、ퟻ﨎ﷇﷰ￯ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-pname-esc-02.ttl0000644000175000017500000000015512222044704020630 00000000000000@prefix : . :s :p :0123\~\.\-\!\$\&\'\(\)\*\+\,\;\=\/\?\#\@\_\%AA123 . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2.nt0000644000175000017500000000006012222044704015506 00000000000000 "x" . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_2_squotes.ttl0000644000175000017500000000006712222044704020736 00000000000000 """x""y""" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-27.ttl0000644000175000017500000000064712222044704016417 00000000000000# In-scope base URI is at this point . @base . # In-scope base URI is http://example.org/ns/ at this point . @base . # In-scope base URI is http://example.org/ns/foo/ at this point . @prefix : . :a4 :b4 :c4 . @prefix : . :a5 :b5 :c5 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-str-esc-01.ttl0000644000175000017500000000012612222044704020335 00000000000000 "a\n" . raptor2-2.0.15/tests/turtle-2013/old_style_prefix.nt0000644000175000017500000000010112222044704017060 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-22.nt0000644000175000017500000000030712112703616016223 00000000000000 "true"^^ . "false"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-prefix-05.ttl0000644000175000017500000000010612222044704021000 00000000000000# @prefix without : @prefix x . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_as_object.ttl0000644000175000017500000000013412222044704022204 00000000000000 [ ] . raptor2-2.0.15/tests/turtle-2013/bareword_integer.ttl0000644000175000017500000000005612222044704017222 00000000000000 1 . raptor2-2.0.15/tests/turtle-2013/bareword_a_predicate.ttl0000644000175000017500000000005612222044704020025 00000000000000 a . raptor2-2.0.15/tests/turtle-2013/literal_with_numeric_escape8.ttl0000644000175000017500000000007112222044704021516 00000000000000 '\U0000006F' . raptor2-2.0.15/tests/turtle-2013/literal_true.ttl0000644000175000017500000000006112222044704016367 00000000000000 true . raptor2-2.0.15/tests/turtle-2013/turtle-subm-02.nt0000644000175000017500000000041312112703616016217 00000000000000 . . . raptor2-2.0.15/tests/turtle-2013/comment_following_localName.ttl0000644000175000017500000000013112222044704021367 00000000000000@prefix p: . p:o#comment . raptor2-2.0.15/tests/turtle-2013/prefixed_name_datatype.nt0000644000175000017500000000013412222044704020214 00000000000000 "1"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-ns-dot-start.ttl0000644000175000017500000000011212222044704021615 00000000000000@prefix .eg : . .eg:s .eg:p .eg:o . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_with_UTF8_boundaries.ttl0000644000175000017500000000014712222044704021751 00000000000000 '''€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽''' . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-pname-02.ttl0000644000175000017500000000012012222044704020574 00000000000000# Bad %-sequence @prefix : . :a%2 :p :o . raptor2-2.0.15/tests/turtle-2013/LITERAL1_all_punctuation.ttl0000644000175000017500000000011012222044704020325 00000000000000 ' !"#$%&():;<=>?@[]^_`{|}~' . raptor2-2.0.15/tests/turtle-2013/literal_false.ttl0000644000175000017500000000006212222044704016503 00000000000000 false . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-05.ttl0000644000175000017500000000012112222044704021324 00000000000000# N3 is...of @prefix : . :z is :p of :x . raptor2-2.0.15/tests/turtle-2013/LITERAL1.nt0000644000175000017500000000006012222044704014666 00000000000000 "x" . raptor2-2.0.15/tests/turtle-2013/positive_numeric.nt0000644000175000017500000000013512222044704017100 00000000000000 "+1"^^ . raptor2-2.0.15/tests/turtle-2013/IRI_subject.nt0000644000175000017500000000010112222044704015647 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-20.nt0000644000175000017500000000045012112703616016220 00000000000000 "-1.0"^^ . "-1"^^ . "-1.0e0"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-06.ttl0000644000175000017500000000013712222044704021016 00000000000000# Long literal with 4" @prefix : . :s :p """abc""""@en . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-ln-colons.ttl0000644000175000017500000000020512222044704020441 00000000000000@prefix : . :s:1 :p:1 :o:1 . :s::2 :p::2 :o::2 . :3:s :3:p :3 . ::s ::p ::o . ::s: ::p: ::o: . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-05.ttl0000644000175000017500000000012012222044704020042 00000000000000@prefix : . [ :q1 :o1 ; :q2 :o2 ] :p :o . raptor2-2.0.15/tests/turtle-2013/LITERAL1_ascii_boundaries.nt0000644000175000017500000000012312222044704020251 00000000000000 "\u0000\t\u000B\u000C\u000E&([]\u007F" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-06.ttl0000644000175000017500000000020212112703616016401 00000000000000# Test non empty [] operator; not allowed as predicate @prefix : . [ :a :b ] :c :d . :e :f [ :g :h ] . raptor2-2.0.15/tests/turtle-2013/two_LITERAL_LONG2s.nt0000644000175000017500000000022712222044704016567 00000000000000 "first long literal" . "second long literal" . raptor2-2.0.15/tests/turtle-2013/repeated_semis_at_end.nt0000644000175000017500000000020612222044704020016 00000000000000 . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-datatypes-01.ttl0000644000175000017500000000012112112703616020750 00000000000000@prefix xsd: .

"123"^^xsd:byte . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-03.ttl0000644000175000017500000000013712222044704020267 00000000000000 "string"@en-uk . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-missing-ns-dot-start.ttl0000644000175000017500000000005112222044704023266 00000000000000.undefined:s .undefined:p .undefined:o . raptor2-2.0.15/tests/turtle-2013/literal_with_REVERSE_SOLIDUS.nt0000644000175000017500000000006112222044704020576 00000000000000 "\\" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-27.nt0000644000175000017500000000075512222044704016235 00000000000000 . . . . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-ln-colons.nt0000644000175000017500000000115712222044704020266 00000000000000 . . . . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-file-02.ttl0000644000175000017500000000001512112703616017674 00000000000000#Empty file. raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-15.ttl0000644000175000017500000000015612222044704021035 00000000000000# Literal as predicate "abc" . raptor2-2.0.15/tests/turtle-2013/repeated_semis_not_at_end.ttl0000644000175000017500000000010512222044704021056 00000000000000 ;; . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-lists-04.ttl0000644000175000017500000000010112222044704020107 00000000000000@prefix : . (()) :p (()) . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-esc-02.ttl0000644000175000017500000000015512222044704020256 00000000000000# Bad string escape "\uWXYZ" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-03.ttl0000644000175000017500000000007412222044704020256 00000000000000PREFIX : :s :p :123 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-num-02.ttl0000644000175000017500000000012512222044704020300 00000000000000 123e . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-base-02.ttl0000644000175000017500000000005312222044704017667 00000000000000BASE raptor2-2.0.15/tests/turtle-2013/empty_collection.nt0000644000175000017500000000013512222044704017065 00000000000000 . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_with_2_squotes.nt0000644000175000017500000000006312222044704020547 00000000000000 "x''y" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-04.ttl0000644000175000017500000000013112222044704020262 00000000000000 'string' . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_leading_underscore.ttl0000644000175000017500000000006012222044704024406 00000000000000 _:_ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-06.ttl0000644000175000017500000000020012222044704021023 00000000000000# Turtle does not allow bnodes-as-predicates [] . raptor2-2.0.15/tests/turtle-2013/LITERAL1_all_controls.ttl0000644000175000017500000000011512222044704017624 00000000000000 ' ' . raptor2-2.0.15/tests/turtle-2013/number_sign_following_localName.ttl0000644000175000017500000000013512222044704022241 00000000000000@prefix p: . p:o\#numbersign . raptor2-2.0.15/tests/turtle-2013/oops.nt0000644000175000017500000000067612277157103014516 00000000000000 " ''' " . " \"\"\" " . " \"\"a " . "\"\"\"" . "\"\"a" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-11.nt0000644000175000017500000000101512112703616016216 00000000000000 "000000"^^ . "0"^^ . "000001"^^ . "2"^^ . "4"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-subm-01.nt0000644000175000017500000000017712222044704016223 00000000000000_:genid1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-03.ttl0000644000175000017500000000010212222044704021003 00000000000000@prefix : . :s :p '''abc' . raptor2-2.0.15/tests/turtle-2013/SPARQL_style_prefix.ttl0000644000175000017500000000011612222044704017474 00000000000000PREFIX p: p:s . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-lang-01.ttl0000644000175000017500000000015212222044704020421 00000000000000# Bad lang tag "string"@1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-08.ttl0000644000175000017500000000006312112703616021336 00000000000000# @keywords is not Turtle @keywords a . x a Item . raptor2-2.0.15/tests/turtle-2013/comment_following_PNAME_NS.ttl0000644000175000017500000000013012222044704020733 00000000000000@prefix p: . p:#comment . raptor2-2.0.15/tests/turtle-2013/localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.nt0000644000175000017500000000033412222044704027504 00000000000000 . raptor2-2.0.15/tests/turtle-2013/anonymous_blank_node_object.ttl0000644000175000017500000000005712222044704021433 00000000000000 [] . raptor2-2.0.15/tests/turtle-2013/localName_with_nfc_PN_CHARS_BASE_character_boundaries.nt0000644000175000017500000000033412222044704025627 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-09.ttl0000644000175000017500000000012012222044704021327 00000000000000# => is not Turtle @prefix : . :s => :o . raptor2-2.0.15/tests/turtle-2013/localName_with_leading_digit.nt0000644000175000017500000000010112222044704021276 00000000000000 . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_UTF8_boundaries.nt0000644000175000017500000000024712222044704021571 00000000000000 "\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-pname-esc-03.ttl0000644000175000017500000000010612222044704020625 00000000000000@prefix : . :xyz\~ :abc\.: : . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-uri-03.ttl0000644000175000017500000000022312222044704017554 00000000000000# x53 is capital S . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-04.ttl0000644000175000017500000000020512222044704021026 00000000000000# Turtle does not allow literals-as-subjects "hello" . raptor2-2.0.15/tests/turtle-2013/LITERAL1_all_punctuation.nt0000644000175000017500000000011112222044704020144 00000000000000 " !\"#$%&():;<=>?@[]^_`{|}~" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-struct-03.ttl0000644000175000017500000000012112222044704020276 00000000000000@prefix : . :s :p1 :o1 ; :p2 :o2 ; . raptor2-2.0.15/tests/turtle-2013/LITERAL1.ttl0000644000175000017500000000006012222044704015050 00000000000000 'x' . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-09.ttl0000644000175000017500000000013612222044704020274 00000000000000 '''abc def''' . raptor2-2.0.15/tests/turtle-2013/prefix_reassigned_and_used.nt0000644000175000017500000000010112222044704021050 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-01.ttl0000644000175000017500000000010012222044704020777 00000000000000@prefix : . :s :p "abc' . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_with_1_squote.ttl0000644000175000017500000000006612222044704020550 00000000000000 '''x'y''' . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_CARRIAGE_RETURN.ttl0000644000175000017500000000006112222044704022403 00000000000000 '\r' . raptor2-2.0.15/tests/turtle-2013/prefix_with_PN_CHARS_BASE_character_boundaries.ttl0000644000175000017500000000033112222044704024562 00000000000000@prefix AZazÀÖØöø˿ͰͽͿ῿‌‍⁰↏Ⰰ⿯、퟿豈﷏ﷰ�𐀀󯿽: . AZazÀÖØöø˿ͰͽͿ῿‌‍⁰↏Ⰰ⿯、퟿豈﷏ﷰ�𐀀󯿽:o . raptor2-2.0.15/tests/turtle-2013/bareword_double.ttl0000644000175000017500000000006012222044704017032 00000000000000 1E0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-uri-02.ttl0000644000175000017500000000022512222044704020301 00000000000000# Bad IRI : bad escape . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-02.ttl0000644000175000017500000000013412222044704020263 00000000000000 "string"@en . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-num-01.ttl0000644000175000017500000000013012222044704020273 00000000000000 123.abc . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-struct-05.ttl0000644000175000017500000000012212222044704020301 00000000000000@prefix : . :s :p1 :o1 ; :p2 :o2 ;; . raptor2-2.0.15/tests/turtle-2013/turtle-subm-13.ttl0000644000175000017500000000044012112703616016403 00000000000000# Tests for rdf:_ and other qnames starting with _ @prefix rdf: . @prefix ex: . @prefix : . ex:foo rdf:_1 "1" . ex:foo rdf:_2 "2" . ex:foo :_abc "def" . ex:foo :_345 "678" . raptor2-2.0.15/tests/turtle-2013/LITERAL_with_UTF8_boundaries.nt0000644000175000017500000000024712222044704020670 00000000000000 "\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-ln-dash-start.ttl0000644000175000017500000000007612222044704021750 00000000000000@prefix : . :s :p :-o . raptor2-2.0.15/tests/turtle-2013/langtagged_LONG_with_subtag.ttl0000644000175000017500000000014312222044704021211 00000000000000# Test long literal with lang tag @prefix : . :a :b """Cheers"""@en-UK . raptor2-2.0.15/tests/turtle-2013/prefixed_name_datatype.ttl0000644000175000017500000000016012222044704020375 00000000000000@prefix xsd: . "1"^^xsd:integer . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-02.ttl0000644000175000017500000000007512222044704020050 00000000000000@prefix : . :s :p [] . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_FORM_FEED.nt0000644000175000017500000000006512222044704021277 00000000000000 "\u000C" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-03.ttl0000644000175000017500000000001712112703616020250 00000000000000

+123 . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.ttl0000644000175000017500000000016412222044704027035 00000000000000 _:AZazÀÖØöø˿ͰͽͿ῿‌‍⁰↏Ⰰ⿯、퟿豈﷏ﷰ�𐀀󯿽 . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_containing_collection.nt0000644000175000017500000000040612222044704024437 00000000000000_:genid1 "1"^^ . _:genid1 . _:genid2 _:genid1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-missing-ns-dot-end.ttl0000644000175000017500000000003512222044704022701 00000000000000valid:s valid:p invalid.:o . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-10.ttl0000644000175000017500000000014112222044704020260 00000000000000 """abc def"""@en . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-08.ttl0000644000175000017500000000004212112703616020253 00000000000000# This is an integer

123. raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-07.ttl0000644000175000017500000000004712112703616020257 00000000000000# This is a decimal.

+123.0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-datatypes-02.ttl0000644000175000017500000000022412112703616020755 00000000000000@prefix rdf: . @prefix xsd: .

"123"^^xsd:string . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-uri-04.ttl0000644000175000017500000000024312222044704020303 00000000000000# Bad IRI : character escapes not allowed. . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_leading_underscore.nt0000644000175000017500000000006012222044704024224 00000000000000 _:_ . raptor2-2.0.15/tests/turtle-2013/turtle-subm-02.ttl0000644000175000017500000000027312112703616016405 00000000000000# Test @prefix and qnames @prefix : . @prefix a: . @prefix b: . :a :b :c . a:a a:b a:c . :a a:a b:a . raptor2-2.0.15/tests/turtle-2013/turtle-eval-bad-01.ttl0000644000175000017500000000024312222044704017104 00000000000000# Bad IRI : good escape, bad charcater . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_CARRIAGE_RETURN.nt0000644000175000017500000000006112222044704022221 00000000000000 "\r" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-04.ttl0000644000175000017500000000004612112703616020253 00000000000000# This is a decimal.

123.0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-06.ttl0000644000175000017500000000004712112703616020256 00000000000000# This is a decimal.

-123.0 . raptor2-2.0.15/tests/turtle-2013/SPARQL_style_base.ttl0000644000175000017500000000011112222044704017104 00000000000000BASE . raptor2-2.0.15/tests/turtle-2013/sole_blankNodePropertyList.ttl0000644000175000017500000000006012222044704021213 00000000000000[ ] . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_BACKSPACE.ttl0000644000175000017500000000006112222044704021403 00000000000000 '\b' . raptor2-2.0.15/tests/turtle-2013/turtle-subm-14.ttl0000644000175000017500000000012212112703616016401 00000000000000# Test for : allowed @prefix : . [] : [] . : : : . raptor2-2.0.15/tests/turtle-2013/prefix_only_IRI.nt0000644000175000017500000000010112222044704016546 00000000000000 . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_leading_digit.nt0000644000175000017500000000006012222044704023153 00000000000000 _:0 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-01.ttl0000644000175000017500000000003312112703616016376 00000000000000@prefix : <#> . [] :x :y . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-uri-03.ttl0000644000175000017500000000022712222044704020304 00000000000000# Bad IRI : bad escape . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-lists-05.ttl0000644000175000017500000000012312222044704020114 00000000000000@prefix : . (1 2 (1 2)) :p (( "a") "b" :o) . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-struct-01.ttl0000644000175000017500000000010412222044704020275 00000000000000@prefix : . :s :p :o1 , :o2 . raptor2-2.0.15/tests/turtle-2013/LITERAL2_with_UTF8_boundaries.ttl0000644000175000017500000000014312222044704021127 00000000000000 "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . raptor2-2.0.15/tests/turtle-2013/double_lower_case_e.ttl0000644000175000017500000000006012222044704017654 00000000000000 1e0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-08.ttl0000644000175000017500000000017612222044704021041 00000000000000# No DOT raptor2-2.0.15/tests/turtle-2013/SPARQL_style_prefix.nt0000644000175000017500000000010112222044704017304 00000000000000 . raptor2-2.0.15/tests/turtle-2013/nested_collection.ttl0000644000175000017500000000006212222044704017372 00000000000000 ((1)) . raptor2-2.0.15/tests/turtle-2013/bareword_a_predicate.nt0000644000175000017500000000013612222044704017642 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-eval-struct-01.ttl0000644000175000017500000000016712222044704017707 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-14.ttl0000644000175000017500000000015412222044704021032 00000000000000# Literal as subject "abc" . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_UTF8_boundaries.ttl0000644000175000017500000000014712222044704021752 00000000000000 """€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽""" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-07.ttl0000644000175000017500000000013712222044704021017 00000000000000# Long literal with 4' @prefix : . :s :p '''abc''''@en . raptor2-2.0.15/tests/turtle-2013/literal_with_CARRIAGE_RETURN.nt0000644000175000017500000000006112222044704020535 00000000000000 "\r" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-blank-label.ttl0000644000175000017500000000024712222044704020707 00000000000000@prefix : . _:0b :p :o . # Starts with digit _:_b :p :o . # Starts with underscore _:b.0 :p :o . # Contains dot, ends with digit raptor2-2.0.15/tests/turtle-2013/localName_with_nfc_PN_CHARS_BASE_character_boundaries.ttl0000644000175000017500000000022512222044704026010 00000000000000@prefix p: . p:AZazÀÖØöø˿ͰͽͿ῿‌‍⁰↏Ⰰ⿯、퟿﨎﷏ﷰ￯𐀀󯿽 . raptor2-2.0.15/tests/turtle-2013/collection_subject.nt0000644000175000017500000000042112222044704017364 00000000000000_:genid1 "1"^^ . _:genid1 . _:genid1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-esc-03.ttl0000644000175000017500000000016112222044704020254 00000000000000# Bad string escape "\U0000WXYZ" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-08.ttl0000644000175000017500000000011212112703616016403 00000000000000@prefix : . :a :b ( "apple" "banana" ) . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-01.ttl0000644000175000017500000000007512222044704020047 00000000000000@prefix : . [] :p :o . raptor2-2.0.15/tests/turtle-2013/localName_with_leading_underscore.nt0000644000175000017500000000010112222044704022347 00000000000000 . raptor2-2.0.15/tests/turtle-2013/numeric_with_leading_0.ttl0000644000175000017500000000005712222044704020300 00000000000000 01 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-21.ttl0000644000175000017500000000014312112703616016402 00000000000000# Test long literal @prefix : . :a :b """John said: "Hello World!\"""" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl0000644000175000017500000000017612222044704025713 00000000000000 "value"@en^^ . raptor2-2.0.15/tests/turtle-2013/last.nt0000644000175000017500000000117212222044704014461 00000000000000_:genid1 "2"^^ . _:genid1 . _:genid2 _:genid1 . _:genid2 . _:genid3 "1"^^ . _:genid3 _:genid2 . _:genid3 . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_ascii_boundaries.nt0000644000175000017500000000007712222044704021101 00000000000000 "\u0000!#[]\u007F" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-num-05.ttl0000644000175000017500000000012412222044704020302 00000000000000 +-1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-10.ttl0000644000175000017500000000040212222044704021022 00000000000000# Too many DOT . . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-base-02.ttl0000644000175000017500000000010512222044704020411 00000000000000# @base in wrong case. @BASE . raptor2-2.0.15/tests/turtle-2013/turtle-subm-09.ttl0000644000175000017500000000007112112703616016410 00000000000000@prefix : . :a :b ( ) . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-prefix-02.ttl0000644000175000017500000000020212222044704020772 00000000000000# No prefix @prefix rdf: . rdf:type :C . raptor2-2.0.15/tests/turtle-2013/literal_with_CHARACTER_TABULATION.nt0000644000175000017500000000006112222044704021277 00000000000000 "\t" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-kw-03.ttl0000644000175000017500000000007412222044704017402 00000000000000@prefix : . :s a :C . raptor2-2.0.15/tests/turtle-2013/predicateObjectList_with_two_objectLists.ttl0000644000175000017500000000016012222044704024110 00000000000000 ; . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-num-03.ttl0000644000175000017500000000012712222044704020303 00000000000000 123abc . raptor2-2.0.15/tests/turtle-2013/localName_with_non_leading_extras.ttl0000644000175000017500000000013512222044704022547 00000000000000@prefix p: . p:a·̀ͯ‿.⁀ . raptor2-2.0.15/tests/turtle-2013/turtle-subm-14.nt0000644000175000017500000000017212112703616016224 00000000000000_:genid1 _:genid2 . . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1.ttl0000644000175000017500000000006412222044704015673 00000000000000 '''x''' . raptor2-2.0.15/tests/turtle-2013/LITERAL2_with_UTF8_boundaries.nt0000644000175000017500000000024712222044704020752 00000000000000 "\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD" . raptor2-2.0.15/tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries.nt0000644000175000017500000000031012222044704027315 00000000000000 . raptor2-2.0.15/tests/turtle-2013/negative_numeric.ttl0000644000175000017500000000005712222044704017225 00000000000000 -1 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-15.nt0000644000175000017500000000013212112703616016221 00000000000000 "a long\n\tliteral\nwith\nnewlines" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-07.ttl0000644000175000017500000000020112222044704021025 00000000000000# Turtle does not allow bnodes-as-predicates _:p . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-06.ttl0000644000175000017500000000013712222044704020272 00000000000000 'string'@en-uk . raptor2-2.0.15/tests/turtle-2013/turtle-subm-25.nt0000644000175000017500000000013412112703616016224 00000000000000 . raptor2-2.0.15/tests/turtle-2013/literal_false.nt0000644000175000017500000000014012222044704016316 00000000000000 "false"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-subm-10.ttl0000644000175000017500000000042412112703616016402 00000000000000# Test integer datatyped literals using an OWL cardinality constraint @prefix owl: . # based on examples in the OWL Reference _:hasParent a owl:ObjectProperty . [] a owl:Restriction ; owl:onProperty _:hasParent ; owl:maxCardinality 2 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-03.ttl0000644000175000017500000000010412222044704020042 00000000000000@prefix : . :s :p [ :q :o ] . raptor2-2.0.15/tests/turtle-2013/prefixed_IRI_object.ttl0000644000175000017500000000012012222044704017527 00000000000000@prefix p: . p:o . raptor2-2.0.15/tests/turtle-2013/prefix_only_IRI.ttl0000644000175000017500000000012012222044704016731 00000000000000@prefix p: . p: . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_FORM_FEED.ttl0000644000175000017500000000006112222044704021455 00000000000000 '\f' . raptor2-2.0.15/tests/turtle-2013/turtle-subm-08.nt0000644000175000017500000000061612112703616016232 00000000000000_:genid1 "banana" . _:genid1 . _:genid2 "apple" . _:genid2 _:genid1 . _:genid2 . raptor2-2.0.15/tests/turtle-2013/IRI_subject.ttl0000644000175000017500000000010112222044704016031 00000000000000 . raptor2-2.0.15/tests/turtle-2013/prefix_with_PN_CHARS_BASE_character_boundaries.nt0000644000175000017500000000010112222044704024373 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-file-01.ttl0000644000175000017500000000000012112703616017665 00000000000000raptor2-2.0.15/tests/turtle-2013/literal_with_numeric_escape4.ttl0000644000175000017500000000006512222044704021515 00000000000000 '\u006F' . raptor2-2.0.15/tests/turtle-2013/bareword_decimal.nt0000644000175000017500000000013612222044704017000 00000000000000 "1.0"^^ . raptor2-2.0.15/tests/turtle-2013/localName_with_non_leading_extras.nt0000644000175000017500000000014512222044704022366 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-ln-escape-start.ttl0000644000175000017500000000007712222044704022272 00000000000000@prefix : . :s :p :%2o . raptor2-2.0.15/tests/turtle-2013/positive_numeric.ttl0000644000175000017500000000005712222044704017265 00000000000000 +1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-uri-01.ttl0000644000175000017500000000016712222044704017561 00000000000000 . raptor2-2.0.15/tests/turtle-2013/langtagged_LONG_with_subtag.nt0000644000175000017500000000010512222044704021025 00000000000000 "Cheers"@en-UK . raptor2-2.0.15/tests/turtle-2013/anonymous_blank_node_subject.nt0000644000175000017500000000006512222044704021441 00000000000000_:genid1 . raptor2-2.0.15/tests/turtle-2013/IRI_with_four_digit_numeric_escape.ttl0000644000175000017500000000010612222044704022627 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-base-03.ttl0000644000175000017500000000013612222044704020416 00000000000000# FULL STOP used after SPARQL BASE BASE .

. raptor2-2.0.15/tests/turtle-2013/repeated_semis_not_at_end.nt0000644000175000017500000000010312222044704020672 00000000000000 . raptor2-2.0.15/tests/turtle-2013/first.ttl0000644000175000017500000000006412222044704015026 00000000000000 ((1) 2) . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-base-01.ttl0000644000175000017500000000003512112703616020414 00000000000000# @base without URI. @base . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-05.ttl0000644000175000017500000000014312222044704021012 00000000000000# Long literal with missing end @prefix : . :s :p """abc def raptor2-2.0.15/tests/turtle-2013/turtle-syntax-lists-01.ttl0000644000175000017500000000007512222044704020116 00000000000000@prefix : . :s :p () . raptor2-2.0.15/tests/turtle-2013/comment_following_localName.nt0000644000175000017500000000010112222044704021202 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-23.ttl0000644000175000017500000000040212112703616016402 00000000000000# comment test @prefix : . :a :b :c . # end of line comment :d # ignore me :e # and me :f # and me . :g :h #ignore me :i, # and me :j . # and me :k :l :m ; #ignore me :n :o ; # and me :p :q . # and me raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-08.ttl0000644000175000017500000000007712222044704020060 00000000000000@prefix : . [ :p :o ] . raptor2-2.0.15/tests/turtle-2013/localName_with_leading_digit.ttl0000644000175000017500000000012012222044704021461 00000000000000@prefix p: . p:0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-10.ttl0000644000175000017500000000002212112703616020242 00000000000000

-123e-1 . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_subject.ttl0000644000175000017500000000006012222044704021156 00000000000000_:s . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_with_non_leading_extras.nt0000644000175000017500000000007512222044704024241 00000000000000 _:a·̀ͯ‿.⁀ . raptor2-2.0.15/tests/turtle-2013/localName_with_assigned_nfc_PN_CHARS_BASE_character_boundaries.ttl0000644000175000017500000000022512222044704027665 00000000000000@prefix p: . p:AZazÀÖØöø˿Ͱͽ΄῾‌‍⁰↉Ⰰ⿕、ퟻ﨎ﷇﷰ￯𐀀󠇯 . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_BACKSPACE.nt0000644000175000017500000000006512222044704021225 00000000000000 "\u0008" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-uri-05.ttl0000644000175000017500000000024312222044704020304 00000000000000# Bad IRI : character escapes not allowed. . raptor2-2.0.15/tests/turtle-2013/default_namespace_IRI.nt0000644000175000017500000000010112222044704017650 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-blank-label.nt0000644000175000017500000000040012222044704020514 00000000000000_:0b . _:_b . _:b.0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-number-dot-in-anon.ttl0000644000175000017500000000011312222044704022670 00000000000000@prefix : . :s :p [ :p1 27. ] . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1.nt0000644000175000017500000000006012222044704015505 00000000000000 "x" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-02.ttl0000644000175000017500000000001712112703616020247 00000000000000

-123 . raptor2-2.0.15/tests/turtle-2013/IRI_with_eight_digit_numeric_escape.ttl0000644000175000017500000000011212222044704022751 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-eval-bad-03.ttl0000644000175000017500000000022412222044704017105 00000000000000# Bad IRI : hex 3E is > . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-02.ttl0000644000175000017500000000010012222044704021000 00000000000000@prefix : . :s :p 'abc" . raptor2-2.0.15/tests/turtle-2013/anonymous_blank_node_subject.ttl0000644000175000017500000000005712222044704021624 00000000000000[] . raptor2-2.0.15/tests/turtle-2013/langtagged_non_LONG.ttl0000644000175000017500000000006612222044704017467 00000000000000 "chat"@en . raptor2-2.0.15/tests/turtle-2013/number_sign_following_localName.nt0000644000175000017500000000011412222044704022054 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-eval-struct-01.nt0000644000175000017500000000016712222044704017525 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-09.ttl0000644000175000017500000000011712222044704020054 00000000000000@prefix : . [ :p :o1,:2 ] . :s :p :o . raptor2-2.0.15/tests/turtle-2013/literal_with_REVERSE_SOLIDUS.ttl0000644000175000017500000000006112222044704020760 00000000000000 '\\' . raptor2-2.0.15/tests/turtle-2013/langtagged_LONG.ttl0000644000175000017500000000007212222044704016612 00000000000000 """chat"""@en . raptor2-2.0.15/tests/turtle-2013/LITERAL2.nt0000644000175000017500000000006012222044704014667 00000000000000 "x" . raptor2-2.0.15/tests/turtle-2013/literal_with_LINE_FEED.nt0000644000175000017500000000006112222044704017573 00000000000000 "\n" . raptor2-2.0.15/tests/turtle-2013/turtle-eval-bad-02.ttl0000644000175000017500000000022412222044704017104 00000000000000# Bad IRI : hex 3C is < . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_CHARACTER_TABULATION.ttl0000644000175000017500000000006112222044704023145 00000000000000 '\t' . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_with_1_squote.nt0000644000175000017500000000006212222044704020362 00000000000000 "x'y" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-01.ttl0000644000175000017500000000013112222044704020257 00000000000000 "string" . raptor2-2.0.15/tests/turtle-2013/HYPHEN_MINUS_in_localName.ttl0000644000175000017500000000012112222044704020300 00000000000000@prefix p: . p:s- . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-12.ttl0000644000175000017500000000012712222044704021330 00000000000000# @forAll is not Turtle @prefix : . @forAll :x . raptor2-2.0.15/tests/turtle-2013/turtle-subm-13.nt0000644000175000017500000000045612112703616016230 00000000000000 "1" . "2" . "def" . "678" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-04.ttl0000644000175000017500000000007712222044704020262 00000000000000@prefix : . :s :p :%20 . raptor2-2.0.15/tests/turtle-2013/localName_with_leading_underscore.ttl0000644000175000017500000000012012222044704022532 00000000000000@prefix p: . p:_ . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl0000644000175000017500000000007512222044704021326 00000000000000@prefix : . :s :p1 """test-\\""" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-11.ttl0000644000175000017500000000020412222044704021023 00000000000000# Trailing ; ; raptor2-2.0.15/tests/turtle-2013/IRI_with_eight_digit_numeric_escape.nt0000644000175000017500000000010112222044704022565 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-uri-01.ttl0000644000175000017500000000021712222044704020301 00000000000000# Bad IRI : space. . raptor2-2.0.15/tests/turtle-2013/reserved_escaped_localName.ttl0000644000175000017500000000017112222044704021154 00000000000000@prefix p: . p:\_\~\.\-\!\$\&\'\(\)\*\+\,\;\=\/\?\#\@\%00 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-04.ttl0000644000175000017500000000012012222044704020041 00000000000000@prefix : . :s :p [ :q1 :o1 ; :q2 :o2 ] . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_as_subject.ttl0000644000175000017500000000013412222044704022375 00000000000000[ ] . raptor2-2.0.15/tests/turtle-2013/prefixed_IRI_object.nt0000644000175000017500000000010112222044704017344 00000000000000 . raptor2-2.0.15/tests/turtle-2013/IRI_with_all_punctuation.nt0000644000175000017500000000021612222044704020453 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-05.ttl0000644000175000017500000000007212222044704020256 00000000000000@prefix : . : : : . raptor2-2.0.15/tests/turtle-2013/sole_blankNodePropertyList.nt0000644000175000017500000000006512222044704021036 00000000000000_:genid1 . raptor2-2.0.15/tests/turtle-2013/collection_object.ttl0000644000175000017500000000006012222044704017354 00000000000000 (1) . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-kw-04.ttl0000644000175000017500000000007712222044704020132 00000000000000@prefix : . true :p :o . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-lists-03.ttl0000644000175000017500000000007712222044704020122 00000000000000@prefix : . (1) :p (1) . raptor2-2.0.15/tests/turtle-2013/percent_escaped_localName.nt0000644000175000017500000000010312222044704020606 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-file-03.ttl0000644000175000017500000000003712112703616017701 00000000000000#One comment, one empty line. raptor2-2.0.15/tests/turtle-2013/turtle-subm-22.ttl0000644000175000017500000000007512112703616016407 00000000000000@prefix : . :a :b true . :c :d false . raptor2-2.0.15/tests/turtle-2013/IRIREF_datatype.nt0000644000175000017500000000013412222044704016366 00000000000000 "1"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-struct-04.ttl0000644000175000017500000000012112222044704020277 00000000000000@prefix : . :s :p1 :o1 ;; :p2 :o2 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-lists-02.ttl0000644000175000017500000000010512222044704020111 00000000000000@prefix : . :s :p (1 "2" :o) . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_1_squote.nt0000644000175000017500000000006312222044704020364 00000000000000 "x\"y" . raptor2-2.0.15/tests/turtle-2013/two_LITERAL_LONG2s.ttl0000644000175000017500000000024412222044704016750 00000000000000# Test long literal twice to ensure it does not over-quote @prefix : . :a :b """first long literal""" . :c :d """second long literal""" . raptor2-2.0.15/tests/turtle-2013/langtagged_non_LONG.nt0000644000175000017500000000006612222044704017305 00000000000000 "chat"@en . raptor2-2.0.15/tests/turtle-2013/turtle-subm-24.nt0000644000175000017500000000011212112703616016217 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-12.nt0000644000175000017500000000044012112703616016220 00000000000000 "a" . "b" . "c" . "d" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-09.ttl0000644000175000017500000000002212112703616020252 00000000000000

123.0e1 . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_subject.nt0000644000175000017500000000006012222044704020774 00000000000000_:s . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG1_ascii_boundaries.nt0000644000175000017500000000007712222044704021100 00000000000000 "\u0000&([]\u007F" . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_object.nt0000644000175000017500000000006012222044704020603 00000000000000 _:o . raptor2-2.0.15/tests/turtle-2013/prefixed_IRI_predicate.nt0000644000175000017500000000010112222044704020036 00000000000000 . raptor2-2.0.15/tests/turtle-2013/localName_with_PN_CHARS_BASE_character_boundaries.nt0000644000175000017500000000033412222044704025001 00000000000000 . raptor2-2.0.15/tests/turtle-2013/IRI_spo.nt0000644000175000017500000000010112222044704015011 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-02.ttl0000644000175000017500000000014512222044704021027 00000000000000# Turtle is not N3 = . raptor2-2.0.15/tests/turtle-2013/prefixed_IRI_predicate.ttl0000644000175000017500000000012012222044704020221 00000000000000@prefix p: . p:p . raptor2-2.0.15/tests/turtle-2013/oops.ttl0000644000175000017500000000017312277157103014670 00000000000000

''' ''\' ''' .

""" ""\" """ .

""" ""\u0061 """ .

"""""\"""" .

"""""\u0061""" . raptor2-2.0.15/tests/turtle-2013/langtagged_LONG.nt0000644000175000017500000000006612222044704016433 00000000000000 "chat"@en . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-str-esc-02.ttl0000644000175000017500000000013312222044704020334 00000000000000 "a\u0020b" . raptor2-2.0.15/tests/turtle-2013/LITERAL1_all_controls.nt0000644000175000017500000000033712222044704017450 00000000000000 "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" . raptor2-2.0.15/tests/turtle-2013/collection_object.nt0000644000175000017500000000042112222044704017173 00000000000000_:genid1 "1"^^ . _:genid1 . _:genid1 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-prefix-03.ttl0000644000175000017500000000004512112703616021002 00000000000000# @prefix without URI. @prefix ex: . raptor2-2.0.15/tests/turtle-2013/lantag_with_subtag.nt0000644000175000017500000000007112222044704017361 00000000000000 "chat"@en-us . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bnode-07.ttl0000644000175000017500000000011412222044704020047 00000000000000@prefix : . :s :p _:a . _:a :p :o . raptor2-2.0.15/tests/turtle-2013/turtle-subm-17.ttl0000644000175000017500000000006212112703616016407 00000000000000@prefix : . :a :b 1.0 . raptor2-2.0.15/tests/turtle-2013/objectList_with_two_objects.ttl0000644000175000017500000000013112222044704021431 00000000000000 , . raptor2-2.0.15/tests/turtle-2013/turtle-subm-10.nt0000644000175000017500000000060412112703616016220 00000000000000_:hasParent . _:genid1 . _:genid1 _:hasParent . _:genid1 "2"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-subm-04.nt0000644000175000017500000000040212112703616016217 00000000000000 . . . raptor2-2.0.15/tests/turtle-2013/reserved_escaped_localName.nt0000644000175000017500000000012612222044704020772 00000000000000 . raptor2-2.0.15/tests/turtle-2013/bareword_integer.nt0000644000175000017500000000013412222044704017035 00000000000000 "1"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-06.ttl0000644000175000017500000000012012222044704021324 00000000000000# = is not Turtle @prefix : . :a.:b.:c . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-uri-02.ttl0000644000175000017500000000021712222044704017556 00000000000000# x53 is capital S . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-11.ttl0000644000175000017500000000014112222044704020261 00000000000000 '''abc def'''@en . raptor2-2.0.15/tests/turtle-2013/turtle-subm-25.ttl0000644000175000017500000000016312112703616016410 00000000000000@prefix foo: . @prefix foo: . foo:blah foo:blah foo:blah . raptor2-2.0.15/tests/turtle-2013/nested_collection.nt0000644000175000017500000000070612222044704017215 00000000000000_:genid1 "1"^^ . _:genid1 . _:genid2 _:genid1 . _:genid2 . _:genid2 . raptor2-2.0.15/tests/turtle-2013/LITERAL2_ascii_boundaries.ttl0000644000175000017500000000007112222044704020436 00000000000000 " !#[]" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-09.ttl0000644000175000017500000000021012222044704021027 00000000000000# Too many DOT . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-11.ttl0000644000175000017500000000013112222044704021322 00000000000000# @forSome is not Turtle @prefix : . @forSome :x . raptor2-2.0.15/tests/turtle-2013/anonymous_blank_node_object.nt0000644000175000017500000000006512222044704021250 00000000000000 _:genid1 . raptor2-2.0.15/tests/turtle-2013/underscore_in_localName.nt0000644000175000017500000000010212222044704020320 00000000000000 . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_containing_collection.ttl0000644000175000017500000000004012222044704024613 00000000000000[ (1) ] . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-11.ttl0000644000175000017500000000002212112703616020243 00000000000000

123.E+1 . raptor2-2.0.15/tests/turtle-2013/HYPHEN_MINUS_in_localName.nt0000644000175000017500000000010212222044704020115 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-prefix-04.ttl0000644000175000017500000000012012222044704020773 00000000000000# @prefix without prefix name . @prefix . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-number-05.ttl0000644000175000017500000000004312112703616020251 00000000000000# This is a decimal.

.1 . raptor2-2.0.15/tests/turtle-2013/LITERAL_LONG2_with_REVERSE_SOLIDUS.nt0000644000175000017500000000010112222044704021132 00000000000000 "test-\\" . raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_with_multiple_triples.ttl0000644000175000017500000000021212222044704024700 00000000000000[ ; ] . raptor2-2.0.15/tests/turtle-2013/labeled_blank_node_object.ttl0000644000175000017500000000006012222044704020765 00000000000000 _:o . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-07.ttl0000644000175000017500000000015012222044704020255 00000000000000# dash is a legal pname character @prefix x: . x:a-b-c x:p x:o . raptor2-2.0.15/tests/turtle-2013/turtle-subm-18.ttl0000644000175000017500000000010012112703616016401 00000000000000@prefix : . :a :b "" . :c :d """""" . raptor2-2.0.15/tests/turtle-2013/prefix_with_non_leading_extras.ttl0000644000175000017500000000015212222044704022150 00000000000000@prefix a·̀ͯ‿.⁀: . a·̀ͯ‿.⁀:s . raptor2-2.0.15/tests/turtle-2013/turtle-subm-26.nt0000644000175000017500000000470712112703616016237 00000000000000 "2.345"^^ . "1"^^ . "1.0"^^ . "1."^^ . "1.000000000"^^ . "2.3"^^ . "2.234000005"^^ . "2.2340000005"^^ . "2.23400000005"^^ . "2.234000000005"^^ . "2.2340000000005"^^ . "2.23400000000005"^^ . "2.234000000000005"^^ . "2.2340000000000005"^^ . "2.23400000000000005"^^ . "2.234000000000000005"^^ . "2.2340000000000000005"^^ . "2.23400000000000000005"^^ . "2.234000000000000000005"^^ . "2.2340000000000000000005"^^ . "2.23400000000000000000005"^^ . "1.2345678901234567890123457890"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-base-04.ttl0000644000175000017500000000007112222044704017671 00000000000000base

. raptor2-2.0.15/tests/turtle-2013/lantag_with_subtag.ttl0000644000175000017500000000007112222044704017543 00000000000000 "chat"@en-us . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-10.ttl0000644000175000017500000000012012222044704021317 00000000000000# <= is not Turtle @prefix : . :s <= :o . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-08.ttl0000644000175000017500000000015412222044704020262 00000000000000# underscore is a legal pname character @prefix x: . x:_ x:p_1 x:o . raptor2-2.0.15/tests/turtle-2013/IRI_with_four_digit_numeric_escape.nt0000644000175000017500000000010112222044704022440 00000000000000 . raptor2-2.0.15/tests/turtle-2013/literal_with_escaped_CHARACTER_TABULATION.nt0000644000175000017500000000006112222044704022763 00000000000000 "\t" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-17.ttl0000644000175000017500000000015212222044704021033 00000000000000# BNode as predicate _:a . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-string-05.ttl0000644000175000017500000000013412222044704020266 00000000000000 'string'@en . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-string-04.ttl0000644000175000017500000000010412222044704021006 00000000000000@prefix : . :s :p """abc''' . raptor2-2.0.15/tests/turtle-2013/literal_with_numeric_escape8.nt0000644000175000017500000000006012222044704021332 00000000000000 "o" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-base-01.ttl0000644000175000017500000000005612222044704017671 00000000000000@base . raptor2-2.0.15/tests/turtle-2013/negative_numeric.nt0000644000175000017500000000013512222044704017040 00000000000000 "-1"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-pname-esc-01.ttl0000644000175000017500000000014612222044704020627 00000000000000@prefix : . :s :p :\~\.\-\!\$\&\'\(\)\*\+\,\;\=\/\?\#\@\_\%AA . raptor2-2.0.15/tests/turtle-2013/bareword_decimal.ttl0000644000175000017500000000006012222044704017156 00000000000000 1.0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-kw-01.ttl0000644000175000017500000000001712112703616017377 00000000000000

true . raptor2-2.0.15/tests/turtle-2013/prefix_reassigned_and_used.ttl0000644000175000017500000000016012222044704021237 00000000000000@prefix p: . @prefix p: . p:s . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-09.ttl0000644000175000017500000000020612222044704020261 00000000000000# percents @prefix : . @prefix x: . :a%3E x:%25 :a%3Eb . raptor2-2.0.15/tests/turtle-2013/turtle-subm-16.ttl0000644000175000017500000000064212112703616016412 00000000000000@prefix : . ## \U00015678 is a not a legal codepoint ## :a :b """\nthis \ris a \U00015678long\t ## literal\uABCD ## """ . ## ## :d :e """\tThis \uABCDis\r \U00015678another\n ## one ## """ . # \U00015678 is a not a legal codepoint # \U00012451 in Cuneiform numeric ban 3 :a :b """\nthis \ris a \U00012451long\t literal\uABCD """ . :d :e """\tThis \uABCDis\r \U00012451another\n one """ . raptor2-2.0.15/tests/turtle-2013/numeric_with_leading_0.nt0000644000175000017500000000013512222044704020113 00000000000000 "01"^^ . raptor2-2.0.15/tests/turtle-2013/underscore_in_localName.ttl0000644000175000017500000000012112222044704020503 00000000000000@prefix p: . p:s_ . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-struct-02.ttl0000644000175000017500000000011412222044704020277 00000000000000@prefix : . :s :p1 :o1 ; :p2 :o2 . raptor2-2.0.15/tests/turtle-2013/localname_with_COLON.nt0000644000175000017500000000010212222044704017426 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-07.ttl0000644000175000017500000000006312112703616021335 00000000000000# @keywords is not Turtle @keywords a . x a Item . raptor2-2.0.15/tests/turtle-2013/turtle-subm-16.nt0000644000175000017500000000032112112703616016222 00000000000000 "\nthis \ris a \U00012451long\t\nliteral\uABCD\n" . "\tThis \uABCDis\r \U00012451another\n\none\n" . raptor2-2.0.15/tests/turtle-2013/turtle-eval-struct-02.ttl0000644000175000017500000000034112222044704017702 00000000000000 ; ; . raptor2-2.0.15/tests/turtle-2013/turtle-subm-24.ttl0000644000175000017500000000013512112703616016406 00000000000000# comment line with no final newline test @prefix : . :a :b :c . #foo raptor2-2.0.15/tests/turtle-2013/old_style_prefix.ttl0000644000175000017500000000012012222044704017243 00000000000000@prefix p: . p:s . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-01.ttl0000644000175000017500000000021612222044704021025 00000000000000# Turtle is not TriG { } raptor2-2.0.15/tests/turtle-2013/blankNodePropertyList_as_object.nt0000644000175000017500000000015412222044704022024 00000000000000_:genid1 . _:genid1 . raptor2-2.0.15/tests/turtle-2013/LITERAL1_ascii_boundaries.ttl0000644000175000017500000000007112222044704020435 00000000000000 ' &([]' . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-01.ttl0000644000175000017500000000014612222044704021327 00000000000000# {} fomulae not in Turtle @prefix : . { :a :q :c . } :p :z . raptor2-2.0.15/tests/turtle-2013/number_sign_following_PNAME_NS.nt0000644000175000017500000000011312222044704021420 00000000000000 . raptor2-2.0.15/tests/turtle-2013/literal_with_BACKSPACE.nt0000644000175000017500000000006512222044704017541 00000000000000 "\u0008" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-base-03.ttl0000644000175000017500000000007412222044704017673 00000000000000@base .

. raptor2-2.0.15/tests/turtle-2013/LITERAL1_with_UTF8_boundaries.ttl0000644000175000017500000000014312222044704021126 00000000000000 '€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽' . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-kw-01.ttl0000644000175000017500000000007412222044704020124 00000000000000@prefix : . :s A :C . raptor2-2.0.15/tests/turtle-2013/turtle-subm-19.ttl0000644000175000017500000000010612112703616016410 00000000000000@prefix : . :a :b 1.0 . :c :d 1 . :e :f 1.0e0 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-struct-05.ttl0000644000175000017500000000020712222044704021031 00000000000000# Turtle does not allow literals-as-predicates "hello" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-21.nt0000644000175000017500000000012412112703616016217 00000000000000 "John said: \"Hello World!\"" . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-prefix-06.ttl0000644000175000017500000000023712222044704020262 00000000000000# colon is a legal pname character @prefix : . @prefix x: . :a:b:c x:d:e:f :::: . raptor2-2.0.15/tests/turtle-2013/turtle-eval-bad-04.ttl0000644000175000017500000000020512222044704017105 00000000000000# Bad IRI . raptor2-2.0.15/tests/turtle-2013/objectList_with_two_objects.nt0000644000175000017500000000020412222044704021250 00000000000000 . . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-n3-extras-13.ttl0000644000175000017500000000006212112703616021331 00000000000000# @keywords is not Turtle @keywords . x @a Item . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-num-04.ttl0000644000175000017500000000012612222044704020303 00000000000000 0x123 . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-bad-ns-dot-end.ttl0000644000175000017500000000011212222044704021226 00000000000000@prefix eg. : . eg.:s eg.:p eg.:o . raptor2-2.0.15/tests/turtle-2013/turtle-subm-09.nt0000644000175000017500000000016512112703616016232 00000000000000 . raptor2-2.0.15/tests/turtle-2013/turtle-subm-03.ttl0000644000175000017500000000013012112703616016376 00000000000000# Test , operator @prefix : . :a :b :c, :d, :e . raptor2-2.0.15/tests/turtle-2013/literal_true.nt0000644000175000017500000000013712222044704016211 00000000000000 "true"^^ . raptor2-2.0.15/tests/turtle-2013/literal_with_FORM_FEED.ttl0000644000175000017500000000006012222044704017770 00000000000000 ' ' . raptor2-2.0.15/tests/turtle-2013/turtle-syntax-kw-02.ttl0000644000175000017500000000002012112703616017372 00000000000000

false . raptor2-2.0.15/tests/turtle-2013/nested_blankNodePropertyLists.ttl0000644000175000017500000000016712222044704021726 00000000000000[ [ ] ; ]. raptor2-2.0.15/tests/turtle-2013/turtle-subm-18.nt0000644000175000017500000000015212112703616016226 00000000000000 "" . "" . raptor2-2.0.15/tests/turtle-2013/turtle-subm-17.nt0000644000175000017500000000014412112703616016226 00000000000000 "1.0"^^ . raptor2-2.0.15/tests/turtle-2013/turtle-subm-03.nt0000644000175000017500000000040212112703616016216 00000000000000 . . . raptor2-2.0.15/tests/nquads-2013/0000755000175000017500000000000012425347072013217 500000000000000raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-02.nq0000644000175000017500000000005412250750761017711 00000000000000 1.0 . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-esc-03.nq0000644000175000017500000000011112250750761017150 00000000000000# Bad string escape "\U0000WXYZ" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-03.nq0000644000175000017500000000013312250750761017201 00000000000000# Bad IRI : bad escape . raptor2-2.0.15/tests/nquads-2013/nt-syntax-str-esc-02.nq0000644000175000017500000000006312250750761017237 00000000000000 "a\u0020b" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-str-esc-03.nq0000644000175000017500000000006712250750761017244 00000000000000 "a\U00000020b" . raptor2-2.0.15/tests/nquads-2013/nq-syntax-uri-04.nq0000644000175000017500000000007612250750761016461 00000000000000 "o" .raptor2-2.0.15/tests/nquads-2013/nq-syntax-bad-uri-01.nq0000644000175000017500000000013412250750761017175 00000000000000# No relative IRIs in N-Quads . raptor2-2.0.15/tests/nquads-2013/nq-syntax-uri-01.nq0000644000175000017500000000011512250750761016450 00000000000000 .raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-06.nq0000644000175000017500000000005512250750761017716 00000000000000 "abc . raptor2-2.0.15/tests/nquads-2013/README0000644000175000017500000000157212250750761014023 00000000000000This README is for the W3C RDF Working Group's N-Quads test suite. This test suite contains two kinds of tests: Positive syntax (rdft:TestNQuadsPositiveSyntax) - an input N-Quads file with no syntax errors. Negative syntax (rdft:TestNQuadsNegativeSyntax) - an input N-Quads file with at least one syntax error. The manifest.ttl file in this directory lists tests in the RDF WG's N-Quads test suite. All tests have a name (mf:name) and an input (mf:action). • An implementation passes a positive syntax test if it parses the input. • An implementation passes a negative syntax test if it fails to parse the input. The home of the test suite is . See http://www.w3.org/2011/rdf-wg/wiki/RDF_Test_Suites for more details. Eric Prud'hommeaux - 11 June 2013. Gregg Kellogg - 26 June 2013. raptor2-2.0.15/tests/nquads-2013/nq-syntax-uri-02.nq0000644000175000017500000000007612250750761016457 00000000000000_:s .raptor2-2.0.15/tests/nquads-2013/nq-syntax-bnode-02.nq0000644000175000017500000000005712250750761016746 00000000000000_:s _:g .raptor2-2.0.15/tests/nquads-2013/Makefile.am0000644000175000017500000001453712250750761015204 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Quads 2013 tests # # Copyright (C) 2013, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # RDFCOMPARE=$(srcdir)/../../scripts/rdfcompare RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_GOOD_FILES = \ comment_following_triple.nq \ langtagged_string.nq \ lantag_with_subtag.nq \ literal_all_controls.nq \ literal_all_punctuation.nq \ literal_ascii_boundaries.nq \ literal_false.nq \ literal.nq \ literal_true.nq \ literal_with_2_dquotes.nq \ literal_with_2_squotes.nq \ literal_with_BACKSPACE.nq \ literal_with_CARRIAGE_RETURN.nq \ literal_with_CHARACTER_TABULATION.nq \ literal_with_dquote.nq \ literal_with_FORM_FEED.nq \ literal_with_LINE_FEED.nq \ literal_with_numeric_escape4.nq \ literal_with_numeric_escape8.nq \ literal_with_REVERSE_SOLIDUS2.nq \ literal_with_REVERSE_SOLIDUS.nq \ literal_with_squote.nq \ literal_with_UTF8_boundaries.nq \ minimal_whitespace.nq \ nq-syntax-bnode-01.nq \ nq-syntax-bnode-02.nq \ nq-syntax-bnode-03.nq \ nq-syntax-bnode-04.nq \ nq-syntax-bnode-05.nq \ nq-syntax-bnode-06.nq \ nq-syntax-uri-01.nq \ nq-syntax-uri-02.nq \ nq-syntax-uri-03.nq \ nq-syntax-uri-04.nq \ nq-syntax-uri-05.nq \ nq-syntax-uri-06.nq \ nt-syntax-bnode-01.nq \ nt-syntax-bnode-02.nq \ nt-syntax-bnode-03.nq \ nt-syntax-datatypes-01.nq \ nt-syntax-datatypes-02.nq \ nt-syntax-file-01.nq \ nt-syntax-file-02.nq \ nt-syntax-file-03.nq \ nt-syntax-str-esc-01.nq \ nt-syntax-str-esc-02.nq \ nt-syntax-str-esc-03.nq \ nt-syntax-string-01.nq \ nt-syntax-string-02.nq \ nt-syntax-string-03.nq \ nt-syntax-subm-01.nq \ nt-syntax-uri-01.nq \ nt-syntax-uri-02.nq \ nt-syntax-uri-03.nq \ nt-syntax-uri-04.nq TEST_BAD_FILES = \ nq-syntax-bad-literal-01.nq \ nq-syntax-bad-literal-02.nq \ nq-syntax-bad-literal-03.nq \ nq-syntax-bad-quint-01.nq \ nq-syntax-bad-uri-01.nq \ nt-syntax-bad-base-01.nq \ nt-syntax-bad-esc-01.nq \ nt-syntax-bad-esc-02.nq \ nt-syntax-bad-esc-03.nq \ nt-syntax-bad-lang-01.nq \ nt-syntax-bad-num-01.nq \ nt-syntax-bad-num-02.nq \ nt-syntax-bad-num-03.nq \ nt-syntax-bad-prefix-01.nq \ nt-syntax-bad-string-01.nq \ nt-syntax-bad-string-02.nq \ nt-syntax-bad-string-03.nq \ nt-syntax-bad-string-04.nq \ nt-syntax-bad-string-05.nq \ nt-syntax-bad-string-06.nq \ nt-syntax-bad-string-07.nq \ nt-syntax-bad-struct-01.nq \ nt-syntax-bad-struct-02.nq \ nt-syntax-bad-uri-01.nq \ nt-syntax-bad-uri-02.nq \ nt-syntax-bad-uri-03.nq \ nt-syntax-bad-uri-04.nq \ nt-syntax-bad-uri-05.nq \ nt-syntax-bad-uri-06.nq \ nt-syntax-bad-uri-07.nq \ nt-syntax-bad-uri-08.nq \ nt-syntax-bad-uri-09.nq # Used to make N-triples output consistent BASE_URI=http://www.w3.org/2013/N-QuadsTests/ # for rdf-schema.ttl RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES= README \ $(TEST_GOOD_FILES) \ $(TEST_BAD_FILES) EXTRA_DIST = $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-good-nquads check-bad-nquads if MAINTAINER_MODE check_good_ntriples_deps = $(TEST_GOOD_FILES) endif check-good-nquads: build-rapper $(check_good_nquads_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing good N-Quads syntax passes"; \ for test in $(TEST_GOOD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ rm -f $$name.res $$name.err; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result if MAINTAINER_MODE check_bad_nquads_deps = $(TEST_BAD_FILES) endif check-bad-nquads: build-rapper $(check_bad_nquads_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing bad N-Quads fails"; \ for test in $(TEST_BAD_FILES) ; do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result raptor2-2.0.15/tests/nquads-2013/nq-syntax-bnode-06.nq0000644000175000017500000000013212250750761016744 00000000000000 "o"^^ _:g .raptor2-2.0.15/tests/nquads-2013/Makefile.in0000644000175000017500000004417112425344566015220 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Quads 2013 tests # # Copyright (C) 2013, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/nquads-2013 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ RDFCOMPARE = $(srcdir)/../../scripts/rdfcompare RDFXML_DIR = ../rdfxml NTRIPLES_DIR = ../ntriples TEST_GOOD_FILES = \ comment_following_triple.nq \ langtagged_string.nq \ lantag_with_subtag.nq \ literal_all_controls.nq \ literal_all_punctuation.nq \ literal_ascii_boundaries.nq \ literal_false.nq \ literal.nq \ literal_true.nq \ literal_with_2_dquotes.nq \ literal_with_2_squotes.nq \ literal_with_BACKSPACE.nq \ literal_with_CARRIAGE_RETURN.nq \ literal_with_CHARACTER_TABULATION.nq \ literal_with_dquote.nq \ literal_with_FORM_FEED.nq \ literal_with_LINE_FEED.nq \ literal_with_numeric_escape4.nq \ literal_with_numeric_escape8.nq \ literal_with_REVERSE_SOLIDUS2.nq \ literal_with_REVERSE_SOLIDUS.nq \ literal_with_squote.nq \ literal_with_UTF8_boundaries.nq \ minimal_whitespace.nq \ nq-syntax-bnode-01.nq \ nq-syntax-bnode-02.nq \ nq-syntax-bnode-03.nq \ nq-syntax-bnode-04.nq \ nq-syntax-bnode-05.nq \ nq-syntax-bnode-06.nq \ nq-syntax-uri-01.nq \ nq-syntax-uri-02.nq \ nq-syntax-uri-03.nq \ nq-syntax-uri-04.nq \ nq-syntax-uri-05.nq \ nq-syntax-uri-06.nq \ nt-syntax-bnode-01.nq \ nt-syntax-bnode-02.nq \ nt-syntax-bnode-03.nq \ nt-syntax-datatypes-01.nq \ nt-syntax-datatypes-02.nq \ nt-syntax-file-01.nq \ nt-syntax-file-02.nq \ nt-syntax-file-03.nq \ nt-syntax-str-esc-01.nq \ nt-syntax-str-esc-02.nq \ nt-syntax-str-esc-03.nq \ nt-syntax-string-01.nq \ nt-syntax-string-02.nq \ nt-syntax-string-03.nq \ nt-syntax-subm-01.nq \ nt-syntax-uri-01.nq \ nt-syntax-uri-02.nq \ nt-syntax-uri-03.nq \ nt-syntax-uri-04.nq TEST_BAD_FILES = \ nq-syntax-bad-literal-01.nq \ nq-syntax-bad-literal-02.nq \ nq-syntax-bad-literal-03.nq \ nq-syntax-bad-quint-01.nq \ nq-syntax-bad-uri-01.nq \ nt-syntax-bad-base-01.nq \ nt-syntax-bad-esc-01.nq \ nt-syntax-bad-esc-02.nq \ nt-syntax-bad-esc-03.nq \ nt-syntax-bad-lang-01.nq \ nt-syntax-bad-num-01.nq \ nt-syntax-bad-num-02.nq \ nt-syntax-bad-num-03.nq \ nt-syntax-bad-prefix-01.nq \ nt-syntax-bad-string-01.nq \ nt-syntax-bad-string-02.nq \ nt-syntax-bad-string-03.nq \ nt-syntax-bad-string-04.nq \ nt-syntax-bad-string-05.nq \ nt-syntax-bad-string-06.nq \ nt-syntax-bad-string-07.nq \ nt-syntax-bad-struct-01.nq \ nt-syntax-bad-struct-02.nq \ nt-syntax-bad-uri-01.nq \ nt-syntax-bad-uri-02.nq \ nt-syntax-bad-uri-03.nq \ nt-syntax-bad-uri-04.nq \ nt-syntax-bad-uri-05.nq \ nt-syntax-bad-uri-06.nq \ nt-syntax-bad-uri-07.nq \ nt-syntax-bad-uri-08.nq \ nt-syntax-bad-uri-09.nq # Used to make N-triples output consistent BASE_URI = http://www.w3.org/2013/N-QuadsTests/ # for rdf-schema.ttl RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.ttl RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema ALL_TEST_FILES = README \ $(TEST_GOOD_FILES) \ $(TEST_BAD_FILES) EXTRA_DIST = $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff @MAINTAINER_MODE_TRUE@check_good_ntriples_deps = $(TEST_GOOD_FILES) @MAINTAINER_MODE_TRUE@check_bad_nquads_deps = $(TEST_BAD_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/nquads-2013/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/nquads-2013/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: check-good-nquads check-bad-nquads check-good-nquads: build-rapper $(check_good_nquads_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing good N-Quads syntax passes"; \ for test in $(TEST_GOOD_FILES); do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) "FAILED returned status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads $(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ rm -f $$name.res $$name.err; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result check-bad-nquads: build-rapper $(check_bad_nquads_deps) @set +e; result=0; errors=0; failures=''; \ $(RECHO) "Testing bad N-Quads fails"; \ for test in $(TEST_BAD_FILES) ; do \ name=`basename $$test .ttl` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; grep Warning $$name.err; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; result=1; \ $(RECHO) $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $$baseuri '>' $$name.res; \ cat $$name.err; \ cat $$name.res; \ errors=`expr $$errors + 1`; \ failures="$$failures $$test"; \ fi; \ rm -f $$name.res $$name.err ; \ done; \ $(RECHO) "Result: $$errors errors:$$failures"; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/nquads-2013/literal_all_punctuation.nq0000644000175000017500000000011112250750761020404 00000000000000 " !\"#$%&():;<=>?@[]^_`{|}~" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-08.nq0000644000175000017500000000011412250750761017205 00000000000000# No relative IRIs in N-Triples . raptor2-2.0.15/tests/nquads-2013/minimal_whitespace.nq0000644000175000017500000000036412250750761017343 00000000000000. "Alice". _:o. _:s. _:s"Alice". _:s_:bnode1. raptor2-2.0.15/tests/nquads-2013/nq-syntax-bad-literal-02.nq0000644000175000017500000000010112250750761020025 00000000000000 "o"@en .raptor2-2.0.15/tests/nquads-2013/literal_with_2_squotes.nq0000644000175000017500000000006312250750761020170 00000000000000 "x''y" . raptor2-2.0.15/tests/nquads-2013/nq-syntax-bad-literal-01.nq0000644000175000017500000000007612250750761020037 00000000000000 "o" .raptor2-2.0.15/tests/nquads-2013/nt-syntax-file-03.nq0000644000175000017500000000003712250750761016600 00000000000000#One comment, one empty line. raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-01.nq0000644000175000017500000000005612250750761017712 00000000000000 "abc' . raptor2-2.0.15/tests/nquads-2013/nt-syntax-datatypes-02.nq0000644000175000017500000000013112250750761017651 00000000000000 "123"^^ . raptor2-2.0.15/tests/nquads-2013/nq-syntax-bnode-05.nq0000644000175000017500000000006212250750761016745 00000000000000 "o"@en _:g .raptor2-2.0.15/tests/nquads-2013/nq-syntax-bnode-04.nq0000644000175000017500000000005712250750761016750 00000000000000 "o" _:g .raptor2-2.0.15/tests/nquads-2013/literal_with_FORM_FEED.nq0000644000175000017500000000006112250750761017570 00000000000000 "\f" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-04.nq0000644000175000017500000000014712250750761017207 00000000000000# Bad IRI : character escapes not allowed. . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-09.nq0000644000175000017500000000012412250750761017207 00000000000000# No relative IRIs in N-Triples "foo"^^

. raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-06.nq0000644000175000017500000000011412250750761017203 00000000000000# No relative IRIs in N-Triples . raptor2-2.0.15/tests/nquads-2013/nt-syntax-datatypes-01.nq0000644000175000017500000000012712250750761017655 00000000000000 "123"^^ . raptor2-2.0.15/tests/nquads-2013/literal_with_REVERSE_SOLIDUS.nq0000644000175000017500000000006112250750761020557 00000000000000 "\\" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-string-01.nq0000644000175000017500000000006112250750761017162 00000000000000 "string" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-file-02.nq0000644000175000017500000000001512250750761016573 00000000000000#Empty file. raptor2-2.0.15/tests/nquads-2013/nt-syntax-file-01.nq0000644000175000017500000000000012250750761016564 00000000000000raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-07.nq0000644000175000017500000000005512250750761017717 00000000000000 abc" . raptor2-2.0.15/tests/nquads-2013/literal_false.nq0000644000175000017500000000014012250750761016277 00000000000000 "false"^^ . raptor2-2.0.15/tests/nquads-2013/nt-syntax-subm-01.nq0000644000175000017500000000776012250750761016637 00000000000000# # Copyright World Wide Web Consortium, (Massachusetts Institute of # Technology, Institut National de Recherche en Informatique et en # Automatique, Keio University). # # All Rights Reserved. # # Please see the full Copyright clause at # # # Test file with a variety of legal N-Triples # # Dave Beckett - http://purl.org/net/dajobe/ # # $Id: test.nt,v 1.7 2003/10/06 15:52:19 dbeckett2 Exp $ # ##################################################################### # comment lines # comment line after whitespace # empty blank line, then one with spaces and tabs . _:anon . _:anon . # spaces and tabs throughout: . # line ending with CR NL (ASCII 13, ASCII 10) . # 2 statement lines separated by single CR (ASCII 10) . . # All literal escapes "simple literal" . "backslash:\\" . "dquote:\"" . "newline:\n" . "return\r" . "tab:\t" . # Space is optional before final . . "x". _:anon. # \u and \U escapes # latin small letter e with acute symbol \u00E9 - 3 UTF-8 bytes #xC3 #A9 "\u00E9" . # Euro symbol \u20ac - 3 UTF-8 bytes #xE2 #x82 #xAC "\u20AC" . # resource18 test removed # resource19 test removed # resource20 test removed # XML Literals as Datatyped Literals ""^^ . " "^^ . "x"^^ . "\""^^ . ""^^ . "a "^^ . "a c"^^ . "a\n\nc"^^ . "chat"^^ . # resource28 test removed 2003-08-03 # resource29 test removed 2003-08-03 # Plain literals with languages "chat"@fr . "chat"@en . # Typed Literals "abc"^^ . # resource33 test removed 2003-08-03 raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-esc-02.nq0000644000175000017500000000010512250750761017152 00000000000000# Bad string escape "\uWXYZ" . raptor2-2.0.15/tests/nquads-2013/literal.nq0000644000175000017500000000006012250750761015126 00000000000000 "x" . raptor2-2.0.15/tests/nquads-2013/literal_with_UTF8_boundaries.nq0000644000175000017500000000014312250750761021204 00000000000000 "€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽" . raptor2-2.0.15/tests/nquads-2013/nq-syntax-uri-05.nq0000644000175000017500000000010112250750761016447 00000000000000 "o"@en .raptor2-2.0.15/tests/nquads-2013/literal_ascii_boundaries.nq0000644000175000017500000000007112250750761020513 00000000000000 " &([]" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bnode-01.nq0000644000175000017500000000005512250750761016746 00000000000000_:a . raptor2-2.0.15/tests/nquads-2013/literal_all_controls.nq0000644000175000017500000000033712250750761017710 00000000000000 "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-05.nq0000644000175000017500000000014712250750761017210 00000000000000# Bad IRI : character escapes not allowed. . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bnode-02.nq0000644000175000017500000000013112250750761016742 00000000000000 _:a . _:a . raptor2-2.0.15/tests/nquads-2013/literal_with_numeric_escape4.nq0000644000175000017500000000006512250750761021314 00000000000000 "\u006F" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bnode-03.nq0000644000175000017500000000013312250750761016745 00000000000000 _:1a . _:1a . raptor2-2.0.15/tests/nquads-2013/nq-syntax-uri-03.nq0000644000175000017500000000007612250750761016460 00000000000000 _:o .raptor2-2.0.15/tests/nquads-2013/literal_with_dquote.nq0000644000175000017500000000006312250750761017545 00000000000000 "x\"y" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-string-02.nq0000644000175000017500000000006412250750761017166 00000000000000 "string"@en . raptor2-2.0.15/tests/nquads-2013/nt-syntax-uri-03.nq0000644000175000017500000000012712250750761016460 00000000000000# x53 is capital S . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-num-03.nq0000644000175000017500000000005612250750761017205 00000000000000 1.0e0 . raptor2-2.0.15/tests/nquads-2013/nq-syntax-bnode-03.nq0000644000175000017500000000005712250750761016747 00000000000000 _:o _:g .raptor2-2.0.15/tests/nquads-2013/nq-syntax-bad-quint-01.nq0000644000175000017500000000017312250750761017541 00000000000000# N-Quads rejects a quint . raptor2-2.0.15/tests/nquads-2013/comment_following_triple.nq0000644000175000017500000000046512250750761020604 00000000000000 . # comment _:o . # comment "o" . # comment "o"^^ . # comment "o"@en . # comment raptor2-2.0.15/tests/nquads-2013/langtagged_string.nq0000644000175000017500000000006612250750761017163 00000000000000 "chat"@en . raptor2-2.0.15/tests/nquads-2013/literal_with_2_dquotes.nq0000644000175000017500000000006512250750761020153 00000000000000 "x\"\"y" . raptor2-2.0.15/tests/nquads-2013/literal_with_REVERSE_SOLIDUS2.nq0000644000175000017500000000010112250750761020634 00000000000000 "test-\\" . raptor2-2.0.15/tests/nquads-2013/literal_with_LINE_FEED.nq0000644000175000017500000000006112250750761017554 00000000000000 "\n" . raptor2-2.0.15/tests/nquads-2013/literal_true.nq0000644000175000017500000000013712250750761016172 00000000000000 "true"^^ . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-04.nq0000644000175000017500000000006212250750761017712 00000000000000 '''abc''' . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-base-01.nq0000644000175000017500000000003212250750761017310 00000000000000@base . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-07.nq0000644000175000017500000000011412250750761017204 00000000000000# No relative IRIs in N-Triples

. raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-struct-01.nq0000644000175000017500000000012012250750761017720 00000000000000 , . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-num-02.nq0000644000175000017500000000005412250750761017202 00000000000000 1.0 . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-esc-01.nq0000644000175000017500000000010312250750761017147 00000000000000# Bad string escape "a\zb" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-str-esc-01.nq0000644000175000017500000000005612250750761017240 00000000000000 "a\n" . raptor2-2.0.15/tests/nquads-2013/nq-syntax-bnode-01.nq0000644000175000017500000000007612250750761016746 00000000000000 _:g .raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-01.nq0000644000175000017500000000012312250750761017176 00000000000000# Bad IRI : space. . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-05.nq0000644000175000017500000000006212250750761017713 00000000000000 """abc""" . raptor2-2.0.15/tests/nquads-2013/lantag_with_subtag.nq0000644000175000017500000000010512250750761017340 00000000000000 "Cheers"@en-UK . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-uri-02.nq0000644000175000017500000000013112250750761017176 00000000000000# Bad IRI : bad escape . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-prefix-01.nq0000644000175000017500000000003612250750761017677 00000000000000@prefix : . raptor2-2.0.15/tests/nquads-2013/nt-syntax-uri-02.nq0000644000175000017500000000012312250750761016453 00000000000000# x53 is capital S . raptor2-2.0.15/tests/nquads-2013/nt-syntax-uri-01.nq0000644000175000017500000000007312250750761016456 00000000000000 . raptor2-2.0.15/tests/nquads-2013/nq-syntax-bad-literal-03.nq0000644000175000017500000000015112250750761020033 00000000000000 "o"^^ .raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-lang-01.nq0000644000175000017500000000010212250750761017315 00000000000000# Bad lang tag "string"@1 . raptor2-2.0.15/tests/nquads-2013/literal_with_squote.nq0000644000175000017500000000006212250750761017563 00000000000000 "x'y" . raptor2-2.0.15/tests/nquads-2013/literal_with_BACKSPACE.nq0000644000175000017500000000006112250750761017516 00000000000000 "\b" . raptor2-2.0.15/tests/nquads-2013/nq-syntax-uri-06.nq0000644000175000017500000000015112250750761016455 00000000000000 "o"^^ .raptor2-2.0.15/tests/nquads-2013/literal_with_CHARACTER_TABULATION.nq0000644000175000017500000000006112250750761021260 00000000000000 "\t" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-uri-04.nq0000644000175000017500000000024212250750761016457 00000000000000# IRI with all chars in it. . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-struct-02.nq0000644000175000017500000000014512250750761017730 00000000000000 ; , . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-string-03.nq0000644000175000017500000000005612250750761017714 00000000000000 1.0e1 . raptor2-2.0.15/tests/nquads-2013/nt-syntax-string-03.nq0000644000175000017500000000006712250750761017172 00000000000000 "string"@en-uk . raptor2-2.0.15/tests/nquads-2013/literal_with_numeric_escape8.nq0000644000175000017500000000007112250750761021315 00000000000000 "\U0000006F" . raptor2-2.0.15/tests/nquads-2013/literal_with_CARRIAGE_RETURN.nq0000644000175000017500000000006112250750761020516 00000000000000 "\r" . raptor2-2.0.15/tests/nquads-2013/nt-syntax-bad-num-01.nq0000644000175000017500000000005212250750761017177 00000000000000 1 . raptor2-2.0.15/tests/rdfxml/0000755000175000017500000000000012425347072012635 500000000000000raptor2-2.0.15/tests/rdfxml/warn-05.rdf0000644000175000017500000000043111113423026014424 00000000000000 bar raptor2-2.0.15/tests/rdfxml/bad-04.rdf0000644000175000017500000000044411113423026014206 00000000000000 bar2 raptor2-2.0.15/tests/rdfxml/ex-40.rdf0000644000175000017500000000043711113423026014076 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-13.out0000644000175000017500000000032611113423026014127 00000000000000_:genid2 "jd8734djr08347jyd4" . _:genid1 _:genid2 . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-34.rdf0000644000175000017500000000112111113423026014070 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-02.rdf0000644000175000017500000000052411113423026014071 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-23.rdf0000644000175000017500000000150311113423026014072 00000000000000 raptor2-2.0.15/tests/rdfxml/warn-00.rdf0000644000175000017500000000060011113423026014415 00000000000000 text raptor2-2.0.15/tests/rdfxml/ex-17.rdf0000644000175000017500000000041711113423026014100 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-41.out0000644000175000017500000000046511113423026014134 00000000000000 "val1"^^ . "val2"^^ . "val3"^^ . raptor2-2.0.15/tests/rdfxml/ex-21.rdf0000644000175000017500000000072311113423026014073 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-49.out0000644000175000017500000000120011113423026014130 00000000000000 " hmm "^^ . " "^^ . " "^^ . " \"> "^^ . raptor2-2.0.15/tests/rdfxml/ex-35.out0000644000175000017500000000015111113423026014127 00000000000000 . raptor2-2.0.15/tests/rdfxml/ex-63.out0000644000175000017500000000043012244506702014141 00000000000000 "\n

\n

123

\n\n
\n "^^ . raptor2-2.0.15/tests/rdfxml/ex-09.out0000644000175000017500000000042511113423026014134 00000000000000 . "content" . "blah" . raptor2-2.0.15/tests/rdfxml/ex-32.rdf0000644000175000017500000000053711113423026014100 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-01.rdf0000644000175000017500000000032711113423026014071 00000000000000 raptor2-2.0.15/tests/rdfxml/Makefile.am0000644000175000017500000004031612244507562014616 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDF/XML tests # # Copyright (C) 2000-2008, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # These are errors in strict mode, warnings in lax - for now RDF_BAGID_TEST_FILES=ex-03.rdf ex-42.rdf ex-43.rdf ex-44.rdf ex-45.rdf RDF_TEST_FILES=ex-00.rdf ex-01.rdf ex-02.rdf ex-04.rdf ex-05.rdf \ ex-06.rdf ex-07.rdf ex-08.rdf ex-09.rdf ex-10.rdf ex-11.rdf ex-12.rdf \ ex-13.rdf ex-14.rdf ex-15.rdf ex-16.rdf ex-17.rdf ex-18.rdf \ ex-20.rdf ex-21.rdf ex-22.rdf ex-23.rdf ex-24.rdf ex-25.rdf ex-26.rdf \ ex-27.rdf ex-28.rdf ex-29.rdf ex-30.rdf ex-31.rdf ex-32.rdf ex-33.rdf \ ex-34.rdf ex-35.rdf ex-36.rdf ex-37.rdf ex-38.rdf ex-39.rdf ex-40.rdf \ ex-41.rdf ex-46.rdf ex-47.rdf ex-48.rdf ex-49.rdf ex-51.rdf \ ex-53.rdf ex-54.rdf ex-56.rdf ex-57.rdf ex-58.rdf ex-61.rdf \ ex-62.rdf ex-63.rdf \ 22-rdf-syntax-ns.rdf rdfs-namespace.rdf rdf-schema.rdf \ owl-schema.rdf daml-oil.rdf wine.rdf # ex-55 fails with libxml2 # libxml2 bug report: http://bugs.gnome.org/show_bug.cgi?id=159219 RDF_MAYFAIL_XML_TEST_FILES=ex-55.rdf RDF_BAD_TEST_FILES=bad-00.rdf bad-01.rdf bad-02.rdf bad-03.rdf \ bad-04.rdf bad-05.rdf bad-06.rdf bad-07.rdf bad-08.rdf bad-09.rdf \ bad-10.rdf bad-11.rdf bad-12.rdf bad-13.rdf bad-14.rdf bad-18.rdf \ bad-19.rdf bad-20.rdf bad-21.rdf bad-22.rdf bad-23.rdf RDF_BAD_NFC_TEST_FILES=bad-15.rdf bad-16.rdf bad-17.rdf RDF_WARN_TEST_FILES=warn-00.rdf warn-02.rdf warn-04.rdf \ warn-05.rdf warn-06.rdf warn-07.rdf \ $(RDF_BAGID_TEST_FILES) RDF_ASSUME_TEST_FILES=ex-19.rdf RDF_SCAN_TEST_FILES=ex-52.svg RDF_OUT_FILES=ex-00.out ex-01.out ex-02.out ex-03.out ex-04.out ex-05.out \ ex-06.out ex-07.out ex-08.out ex-09.out ex-10.out ex-11.out ex-12.out \ ex-13.out ex-14.out ex-15.out ex-16.out ex-17.out ex-18.out \ ex-20.out ex-21.out ex-22.out ex-23.out ex-24.out ex-25.out ex-26.out \ ex-27.out ex-28.out ex-29.out ex-30.out ex-31.out ex-32.out ex-33.out \ ex-34.out ex-35.out ex-36.out ex-37.out ex-38.out ex-39.out ex-40.out \ ex-41.out ex-42.out ex-43.out ex-44.out ex-45.out ex-46.out ex-47.out \ ex-48.out ex-49.out ex-51.out ex-53.out ex-54.out ex-55.out ex-56.out \ ex-57.out ex-58.out ex-61.out ex-61.out ex-62.out ex-63.out \ 22-rdf-syntax-ns.out rdfs-namespace.out rdf-schema.out \ owl-schema.out daml-oil.out wine.out RDF_HACK_OUT_FILES=ex-38-rdfxmla.out RDF_MAYFAIL_XML_OUT_FILES=ex-55.rdf RDF_WARN_OUT_FILES=warn-00.out warn-02.out warn-04.out \ warn-05.out warn-06.out warn-07.out RDF_ASSUME_OUT_FILES=ex-19.out RDF_SCAN_OUT_FILES=ex-52.out RDF_SERIALIZE_TEST_FILES=ex-59.nt ex-60.nt RDF_SERIALIZE_OUT_FILES=ex-59.rdf ex-60.rdf # Used to make N-triples output consistent BASE_URI=http://librdf.org/raptor/tests/ # for 22-rdf-syntax-ns.rdf RDF_NS_URI=http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.rdf (2002-04-30) and rdf-schema.rdf (2000-03-27) RDFS_NS_URI=http://www.w3.org/2000/01/rdf-schema OWL_DOC_URI="http://www.w3.org/2002/07/owl" DAML_OIL_DOC_URI="http://www.daml.org/2001/03/daml+oil" OWL_WINE_URI="http://www.w3.org/TR/owl-guide/wine.rdf" EXTRA_DIST = \ CMakeLists.txt \ $(RDF_TEST_FILES) \ $(RDF_MAYFAIL_XML_TEST_FILES) \ $(RDF_ASSUME_TEST_FILES) \ $(RDF_SCAN_TEST_FILES) \ $(RDF_BAD_TEST_FILES) \ $(RDF_BAD_NFC_TEST_FILES) \ $(RDF_WARN_TEST_FILES) \ $(RDF_OUT_FILES) \ $(RDF_MAYFAIL_XML_OUT_FILES) \ $(RDF_ASSUME_OUT_FILES) \ $(RDF_SCAN_OUT_FILES) \ $(RDF_WARN_OUT_FILES) \ $(RDF_SERIALIZE_TEST_FILES) \ $(RDF_SERIALIZE_OUT_FILES) \ $(RDF_HACK_OUT_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff CLEANFILES = CMakeTests.txt CMakeTmp.txt build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: build-rapper \ check-rdf check-mayfail-xml-rdf check-assume-rdf check-scan-rdf \ check-bad-rdf check-bad-nfc-rdf check-warn-rdf \ check-rdfdiff check-rdfxml check-rdfxmla ## Some non-GNU Make programs modify variables that appear in a target's ## dependencies by prepending VPATH to filenames. We don't want this, so ## we only specify the dependencies in maintainer mode, when GNU Make is ## likely being used. ## if MAINTAINER_MODE check_rdf_deps = $(RDF_TEST_FILES) endif check-rdf: build-rapper $(check_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ if test $$name = 22-rdf-syntax-ns; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace -o $$name = rdf-schema; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = owl-schema; then \ baseuri=$(OWL_DOC_URI); \ elif test $$name = daml-oil; then \ baseuri=$(DAML_OIL_DOC_URI); \ elif test $$name = wine; then \ baseuri=$(OWL_WINE_URI); \ else \ baseuri=$(BASE_URI)$$name.rdf; \ fi; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_assume_rdf_deps = $(RDF_ASSUME_TEST_FILES) endif check-assume-rdf: build-rapper $(check_assume_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing rdf/xml known by context"; \ for test in $(RDF_ASSUME_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_scan_rdf_deps = $(RDF_SCAN_TEST_FILES) endif check-scan-rdf: build-rapper $(check_scan_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing rdf/xml inside other XML"; \ for test in $(RDF_SCAN_TEST_FILES); do \ name=`echo $$test | sed -e 's/\..*//'` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -f scanForRDF -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -f scanForRDF -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_mayfail_xml_rdf_deps = $(RDF_MAYFAIL_XML_TEST_FILES) endif check-mayfail-xml-rdf: build-rapper $(check_mayfail_xml_rdf_deps) @set +e; \ $(RECHO) "Testing rdf/xml (may fail due to XML parser bugs)"; \ for test in $(RDF_MAYFAIL_XML_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit 0 if MAINTAINER_MODE check_bad_rdf_deps = $(RDF_BAD_TEST_FILES) endif check-bad-rdf: build-rapper $(check_bad_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing that bad rdf/xml fails"; \ for test in $(RDF_BAD_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'ADD_TEST(%s %s) # WILL_FAIL\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t%s\n' rdfxml.$$name >>CMakeTmp.txt; \ done; \ (printf '\nSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\tPROPERTIES\n\tWILL_FAIL TRUE\n)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result if MAINTAINER_MODE check_bad_nfc_rdf_deps = $(RDF_BAD_NFC_TEST_FILES) endif check-bad-nfc-rdf: build-rapper $(check_bad_nfc_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing that rdf/xml with bad Unicode NFC fails"; \ for test in $(RDF_BAD_NFC_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -m strict -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed (NFC test)"; \ cat $$name.res; result=0; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'ADD_TEST(%s %s) # WILL_FAIL\n' \ rdfxml.$$name \ "\$${RAPPER} -q -m strict -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t%s\n' rdfxml.$$name >>CMakeTmp.txt; \ done; \ (printf '\nSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\tPROPERTIES\n\tWILL_FAIL TRUE\n)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result if MAINTAINER_MODE check_warn_rdf_deps = $(RDF_WARN_TEST_FILES) endif check-warn-rdf: build-rapper $(check_warn_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing rdf/xml with warnings"; \ for test in $(RDF_WARN_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "FAILED - parsing failed when should have warned"; \ cat $$name.res; grep Error $$name.err; result=1; \ elif test $$status -eq 2 ; then \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_rdfdiff_deps = $(RDF_TEST_FILES) endif check-rdfdiff: build-rdfdiff $(check_rdfdiff_deps) @set +e; result=0; \ $(RECHO) "Testing rdfdiff with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RDFDIFF) $(srcdir)/$$test $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ cat $$name.err; result=1; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_rdfxml_deps = $(RDF_SERIALIZE_TEST_FILES) endif check-rdfxml: build-rapper $(check_rdfxml_deps) @set +e; result=0; \ $(RECHO) "Testing rdfxml serialization with legal rdf/xml"; \ for test in $(RDF_SERIALIZE_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o rdfxml $(srcdir)/$$test $$baseuri > $$name-rdfxml.rdf 2> $$name.err; \ if cmp $(srcdir)/$$name.rdf $$name-rdfxml.rdf >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.rdf $$name-rdfxml.rdf; result=1; \ fi; \ rm -f $$name-rdfxml.rdf $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -i ntriples -o rdfxml \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name-rdfxml.rdf \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.rdf" >>CMakeTests.txt; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_rdfxmla_deps = $(RDF_TEST_FILES) endif check-rdfxmla: build-rdfdiff build-rapper $(check_rdfxmla_deps) @set +e; result=0; \ $(RECHO) "Testing rdfxml-abbrev serialization with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri > $$name-rdfxmla.rdf 2> $$name.err; \ status1=$$?; \ if test $$test = ex-38.rdf; then \ diff $(srcdir)/ex-38-rdfxmla.out $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(RDFDIFF) $(srcdir)/$$test $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ echo $(RAPPER) -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri '>' $$name-rdfxmla.rdf; \ status1=$$?; \ echo $(RDFDIFF) $(srcdir)/$$test $$name-rdfxmla.rdf '>' $$name.res; \ echo "rapper + rdfdiff output:"; cat $$name.err; result=1; \ fi; \ rm -f $$name-rdfxmla.rdf $$name.res $$name.err; \ done; \ set -e; exit $$result print-rdf-test-files: @echo $(RDF_TEST_FILES) | tr ' ' '\012' raptor2-2.0.15/tests/rdfxml/bad-19.rdf0000644000175000017500000000044511113423026014215 00000000000000 content raptor2-2.0.15/tests/rdfxml/rdfs-namespace.out0000644000175000017500000004416611113423026016174 00000000000000 . . "Resource"@en . "The class resource, everything." . . . "type"@en . "Indicates membership of a class" . . . . . "Class"@en . "The concept of Class" . . . . "subClassOf"@en . "Indicates membership of a class" . . . . . "subPropertyOf"@en . "Indicates specialization of properties" . . . . . "Property"@en . "The concept of a property." . . . . "comment"@en . "Use this for descriptions" . . . . . "label"@en . "Provides a human-readable version of a resource name." . . . . . "domain"@en . "A domain class for a property type" . . . . . "range"@en . "A range class for a property type" . . . . . "seeAlso"@en . "A resource that provides information about the subject resource" . . . . . . . "isDefinedBy"@en . "Indicates the namespace of a resource" . . . . . "Literal"@en . "This represents the set of atomic values, eg. textual strings." . . . "Statement"@en . . "The class of RDF statements." . . . "subject"@en . "The subject of an RDF statement." . . . . . "predicate"@en . "the predicate of an RDF statement." . . . . . "object"@en . "The object of an RDF statement." . . . . "Container"@en . . "This represents the set Containers." . . . "Bag"@en . "An unordered collection."@en . . . . "Seq"@en . "An ordered collection."@en . . . . "Alt"@en . "A collection of alternatives."@en . . . . "ContainerMembershipProperty"@en . "The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'." . . . . "member"@en . "a member of a container" . . . . "value"@en . "Identifies the principal value (usually a string) of a property when the property value is a structured resource" . . . raptor2-2.0.15/tests/rdfxml/ex-13.rdf0000644000175000017500000000117111113423026014072 00000000000000 jd8734djr08347jyd4 raptor2-2.0.15/tests/rdfxml/ex-26.out0000644000175000017500000000025311113423026014132 00000000000000 . "content" . raptor2-2.0.15/tests/rdfxml/ex-04.out0000644000175000017500000000035411113423026014130 00000000000000_:genid1 . _:genid1 "a" . _:genid1 "b" . raptor2-2.0.15/tests/rdfxml/ex-55.out0000644000175000017500000000026211113423026014134 00000000000000 "abc" . "def" . raptor2-2.0.15/tests/rdfxml/ex-17.out0000644000175000017500000000010411113423026014125 00000000000000 "" . raptor2-2.0.15/tests/rdfxml/Makefile.in0000644000175000017500000006741012425344566014637 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDF/XML tests # # Copyright (C) 2000-2008, David Beckett http://purl.org/net/dajobe/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/rdfxml DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # These are errors in strict mode, warnings in lax - for now RDF_BAGID_TEST_FILES = ex-03.rdf ex-42.rdf ex-43.rdf ex-44.rdf ex-45.rdf RDF_TEST_FILES = ex-00.rdf ex-01.rdf ex-02.rdf ex-04.rdf ex-05.rdf \ ex-06.rdf ex-07.rdf ex-08.rdf ex-09.rdf ex-10.rdf ex-11.rdf ex-12.rdf \ ex-13.rdf ex-14.rdf ex-15.rdf ex-16.rdf ex-17.rdf ex-18.rdf \ ex-20.rdf ex-21.rdf ex-22.rdf ex-23.rdf ex-24.rdf ex-25.rdf ex-26.rdf \ ex-27.rdf ex-28.rdf ex-29.rdf ex-30.rdf ex-31.rdf ex-32.rdf ex-33.rdf \ ex-34.rdf ex-35.rdf ex-36.rdf ex-37.rdf ex-38.rdf ex-39.rdf ex-40.rdf \ ex-41.rdf ex-46.rdf ex-47.rdf ex-48.rdf ex-49.rdf ex-51.rdf \ ex-53.rdf ex-54.rdf ex-56.rdf ex-57.rdf ex-58.rdf ex-61.rdf \ ex-62.rdf ex-63.rdf \ 22-rdf-syntax-ns.rdf rdfs-namespace.rdf rdf-schema.rdf \ owl-schema.rdf daml-oil.rdf wine.rdf # ex-55 fails with libxml2 # libxml2 bug report: http://bugs.gnome.org/show_bug.cgi?id=159219 RDF_MAYFAIL_XML_TEST_FILES = ex-55.rdf RDF_BAD_TEST_FILES = bad-00.rdf bad-01.rdf bad-02.rdf bad-03.rdf \ bad-04.rdf bad-05.rdf bad-06.rdf bad-07.rdf bad-08.rdf bad-09.rdf \ bad-10.rdf bad-11.rdf bad-12.rdf bad-13.rdf bad-14.rdf bad-18.rdf \ bad-19.rdf bad-20.rdf bad-21.rdf bad-22.rdf bad-23.rdf RDF_BAD_NFC_TEST_FILES = bad-15.rdf bad-16.rdf bad-17.rdf RDF_WARN_TEST_FILES = warn-00.rdf warn-02.rdf warn-04.rdf \ warn-05.rdf warn-06.rdf warn-07.rdf \ $(RDF_BAGID_TEST_FILES) RDF_ASSUME_TEST_FILES = ex-19.rdf RDF_SCAN_TEST_FILES = ex-52.svg RDF_OUT_FILES = ex-00.out ex-01.out ex-02.out ex-03.out ex-04.out ex-05.out \ ex-06.out ex-07.out ex-08.out ex-09.out ex-10.out ex-11.out ex-12.out \ ex-13.out ex-14.out ex-15.out ex-16.out ex-17.out ex-18.out \ ex-20.out ex-21.out ex-22.out ex-23.out ex-24.out ex-25.out ex-26.out \ ex-27.out ex-28.out ex-29.out ex-30.out ex-31.out ex-32.out ex-33.out \ ex-34.out ex-35.out ex-36.out ex-37.out ex-38.out ex-39.out ex-40.out \ ex-41.out ex-42.out ex-43.out ex-44.out ex-45.out ex-46.out ex-47.out \ ex-48.out ex-49.out ex-51.out ex-53.out ex-54.out ex-55.out ex-56.out \ ex-57.out ex-58.out ex-61.out ex-61.out ex-62.out ex-63.out \ 22-rdf-syntax-ns.out rdfs-namespace.out rdf-schema.out \ owl-schema.out daml-oil.out wine.out RDF_HACK_OUT_FILES = ex-38-rdfxmla.out RDF_MAYFAIL_XML_OUT_FILES = ex-55.rdf RDF_WARN_OUT_FILES = warn-00.out warn-02.out warn-04.out \ warn-05.out warn-06.out warn-07.out RDF_ASSUME_OUT_FILES = ex-19.out RDF_SCAN_OUT_FILES = ex-52.out RDF_SERIALIZE_TEST_FILES = ex-59.nt ex-60.nt RDF_SERIALIZE_OUT_FILES = ex-59.rdf ex-60.rdf # Used to make N-triples output consistent BASE_URI = http://librdf.org/raptor/tests/ # for 22-rdf-syntax-ns.rdf RDF_NS_URI = http://www.w3.org/1999/02/22-rdf-syntax-ns # for rdfs-namespace.rdf (2002-04-30) and rdf-schema.rdf (2000-03-27) RDFS_NS_URI = http://www.w3.org/2000/01/rdf-schema OWL_DOC_URI = "http://www.w3.org/2002/07/owl" DAML_OIL_DOC_URI = "http://www.daml.org/2001/03/daml+oil" OWL_WINE_URI = "http://www.w3.org/TR/owl-guide/wine.rdf" EXTRA_DIST = \ CMakeLists.txt \ $(RDF_TEST_FILES) \ $(RDF_MAYFAIL_XML_TEST_FILES) \ $(RDF_ASSUME_TEST_FILES) \ $(RDF_SCAN_TEST_FILES) \ $(RDF_BAD_TEST_FILES) \ $(RDF_BAD_NFC_TEST_FILES) \ $(RDF_WARN_TEST_FILES) \ $(RDF_OUT_FILES) \ $(RDF_MAYFAIL_XML_OUT_FILES) \ $(RDF_ASSUME_OUT_FILES) \ $(RDF_SCAN_OUT_FILES) \ $(RDF_WARN_OUT_FILES) \ $(RDF_SERIALIZE_TEST_FILES) \ $(RDF_SERIALIZE_OUT_FILES) \ $(RDF_HACK_OUT_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff CLEANFILES = CMakeTests.txt CMakeTmp.txt @MAINTAINER_MODE_TRUE@check_rdf_deps = $(RDF_TEST_FILES) @MAINTAINER_MODE_TRUE@check_assume_rdf_deps = $(RDF_ASSUME_TEST_FILES) @MAINTAINER_MODE_TRUE@check_scan_rdf_deps = $(RDF_SCAN_TEST_FILES) @MAINTAINER_MODE_TRUE@check_mayfail_xml_rdf_deps = $(RDF_MAYFAIL_XML_TEST_FILES) @MAINTAINER_MODE_TRUE@check_bad_rdf_deps = $(RDF_BAD_TEST_FILES) @MAINTAINER_MODE_TRUE@check_bad_nfc_rdf_deps = $(RDF_BAD_NFC_TEST_FILES) @MAINTAINER_MODE_TRUE@check_warn_rdf_deps = $(RDF_WARN_TEST_FILES) @MAINTAINER_MODE_TRUE@check_rdfdiff_deps = $(RDF_TEST_FILES) @MAINTAINER_MODE_TRUE@check_rdfxml_deps = $(RDF_SERIALIZE_TEST_FILES) @MAINTAINER_MODE_TRUE@check_rdfxmla_deps = $(RDF_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/rdfxml/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/rdfxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) check-local: build-rapper \ check-rdf check-mayfail-xml-rdf check-assume-rdf check-scan-rdf \ check-bad-rdf check-bad-nfc-rdf check-warn-rdf \ check-rdfdiff check-rdfxml check-rdfxmla check-rdf: build-rapper $(check_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ if test $$name = 22-rdf-syntax-ns; then \ baseuri=$(RDF_NS_URI); \ elif test $$name = rdfs-namespace -o $$name = rdf-schema; then \ baseuri=$(RDFS_NS_URI); \ elif test $$name = owl-schema; then \ baseuri=$(OWL_DOC_URI); \ elif test $$name = daml-oil; then \ baseuri=$(DAML_OIL_DOC_URI); \ elif test $$name = wine; then \ baseuri=$(OWL_WINE_URI); \ else \ baseuri=$(BASE_URI)$$name.rdf; \ fi; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result check-assume-rdf: build-rapper $(check_assume_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing rdf/xml known by context"; \ for test in $(RDF_ASSUME_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result check-scan-rdf: build-rapper $(check_scan_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing rdf/xml inside other XML"; \ for test in $(RDF_SCAN_TEST_FILES); do \ name=`echo $$test | sed -e 's/\..*//'` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -f scanForRDF -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -f scanForRDF -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result check-mayfail-xml-rdf: build-rapper $(check_mayfail_xml_rdf_deps) @set +e; \ $(RECHO) "Testing rdf/xml (may fail due to XML parser bugs)"; \ for test in $(RDF_MAYFAIL_XML_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; \ fi; \ rm -f $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit 0 check-bad-rdf: build-rapper $(check_bad_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing that bad rdf/xml fails"; \ for test in $(RDF_BAD_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'ADD_TEST(%s %s) # WILL_FAIL\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t%s\n' rdfxml.$$name >>CMakeTmp.txt; \ done; \ (printf '\nSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\tPROPERTIES\n\tWILL_FAIL TRUE\n)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result check-bad-nfc-rdf: build-rapper $(check_bad_nfc_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing that rdf/xml with bad Unicode NFC fails"; \ for test in $(RDF_BAD_NFC_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -m strict -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed (NFC test)"; \ cat $$name.res; result=0; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'ADD_TEST(%s %s) # WILL_FAIL\n' \ rdfxml.$$name \ "\$${RAPPER} -q -m strict -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t%s\n' rdfxml.$$name >>CMakeTmp.txt; \ done; \ (printf '\nSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\tPROPERTIES\n\tWILL_FAIL TRUE\n)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result check-warn-rdf: build-rapper $(check_warn_rdf_deps) @set +e; result=0; \ $(RECHO) "Testing rdf/xml with warnings"; \ for test in $(RDF_WARN_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=$(BASE_URI)$$name.rdf; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "FAILED - parsing failed when should have warned"; \ cat $$name.res; grep Error $$name.err; result=1; \ elif test $$status -eq 2 ; then \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result check-rdfdiff: build-rdfdiff $(check_rdfdiff_deps) @set +e; result=0; \ $(RECHO) "Testing rdfdiff with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RDFDIFF) $(srcdir)/$$test $(srcdir)/$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ cat $$name.err; result=1; \ fi; \ rm -f $$name.res $$name.err; \ done; \ set -e; exit $$result check-rdfxml: build-rapper $(check_rdfxml_deps) @set +e; result=0; \ $(RECHO) "Testing rdfxml serialization with legal rdf/xml"; \ for test in $(RDF_SERIALIZE_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o rdfxml $(srcdir)/$$test $$baseuri > $$name-rdfxml.rdf 2> $$name.err; \ if cmp $(srcdir)/$$name.rdf $$name-rdfxml.rdf >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.rdf $$name-rdfxml.rdf; result=1; \ fi; \ rm -f $$name-rdfxml.rdf $$name.res $$name.err; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ rdfxml.$$name \ "\$${RAPPER} -q -i ntriples -o rdfxml \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name-rdfxml.rdf \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.rdf" >>CMakeTests.txt; \ done; \ set -e; exit $$result check-rdfxmla: build-rdfdiff build-rapper $(check_rdfxmla_deps) @set +e; result=0; \ $(RECHO) "Testing rdfxml-abbrev serialization with legal rdf/xml"; \ for test in $(RDF_TEST_FILES); do \ name=`basename $$test .rdf` ; \ baseuri=-; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri > $$name-rdfxmla.rdf 2> $$name.err; \ status1=$$?; \ if test $$test = ex-38.rdf; then \ diff $(srcdir)/ex-38-rdfxmla.out $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ else \ $(RDFDIFF) $(srcdir)/$$test $$name-rdfxmla.rdf > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ echo $(RAPPER) -q -o rdfxml-abbrev $(srcdir)/$$test $$baseuri '>' $$name-rdfxmla.rdf; \ status1=$$?; \ echo $(RDFDIFF) $(srcdir)/$$test $$name-rdfxmla.rdf '>' $$name.res; \ echo "rapper + rdfdiff output:"; cat $$name.err; result=1; \ fi; \ rm -f $$name-rdfxmla.rdf $$name.res $$name.err; \ done; \ set -e; exit $$result print-rdf-test-files: @echo $(RDF_TEST_FILES) | tr ' ' '\012' # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/rdfxml/ex-39.out0000644000175000017500000000103211113423026014132 00000000000000_:genid2 _:genid1 . _:genid1 . _:genid4 _:genid3 . _:genid2 _:genid4 . _:genid3 . _:genid4 . _:genid2 . raptor2-2.0.15/tests/rdfxml/ex-35.rdf0000644000175000017500000000055311113423026014101 00000000000000 raptor2-2.0.15/tests/rdfxml/wine.rdf0000644000175000017500000023061611113423026014207 00000000000000 ]> An example OWL ontology Derived from the DAML Wine ontology at http://ontolingua.stanford.edu/doc/chimaera/ontologies/wines.daml Substantially changed, in particular the Region based relations. Wine Ontology 1 1 1 1 1 1 wine vin 1 1 1998 1 Made WineDescriptor unionType of tastes and color 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 raptor2-2.0.15/tests/rdfxml/rdfs-namespace.rdf0000644000175000017500000002353111113423026016131 00000000000000 Resource The class resource, everything. type Indicates membership of a class Class The concept of Class subClassOf Indicates membership of a class subPropertyOf Indicates specialization of properties Property The concept of a property. comment Use this for descriptions label Provides a human-readable version of a resource name. domain A domain class for a property type range A range class for a property type seeAlso A resource that provides information about the subject resource isDefinedBy Indicates the namespace of a resource Literal This represents the set of atomic values, eg. textual strings. Statement The class of RDF statements. subject The subject of an RDF statement. predicate the predicate of an RDF statement. object The object of an RDF statement. Container This represents the set Containers. Bag An unordered collection. Seq An ordered collection. Alt A collection of alternatives. ContainerMembershipProperty The container membership properties, rdf:1, rdf:2, ..., all of which are sub-properties of 'member'. member a member of a container value Identifies the principal value (usually a string) of a property when the property value is a structured resource raptor2-2.0.15/tests/rdfxml/ex-46.rdf0000644000175000017500000001040511113423026014100 00000000000000 ]> apples pears oranges 10 raptor2-2.0.15/tests/rdfxml/warn-02.rdf0000644000175000017500000000040311113423026014420 00000000000000 raptor2-2.0.15/tests/rdfxml/warn-05.out0000644000175000017500000000012211113423026014455 00000000000000 "bar" . raptor2-2.0.15/tests/rdfxml/ex-61.rdf0000644000175000017500000000031411113423026014073 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-29.rdf0000644000175000017500000000060611113423026014103 00000000000000 chat chat chat raptor2-2.0.15/tests/rdfxml/ex-54.rdf0000644000175000017500000000050311113423026014075 00000000000000 They’re artistic…uhm, bugs, at the very least. raptor2-2.0.15/tests/rdfxml/ex-16.out0000644000175000017500000000014311113423026014127 00000000000000 "the content" . raptor2-2.0.15/tests/rdfxml/ex-42.out0000644000175000017500000000414311113423026014132 00000000000000 . "val1" . . . . . "val1" . "val2" . . . . . "val2" . "val3"@en . . . . . "val3"@en . raptor2-2.0.15/tests/rdfxml/ex-45.rdf0000644000175000017500000000054211113423026014100 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-59.nt0000644000175000017500000000010212222044704013747 00000000000000 "value" . raptor2-2.0.15/tests/rdfxml/ex-54.out0000644000175000017500000000025111113423026014131 00000000000000 "They\u2019re artistic\u2026uhm, bugs, at the very least."^^ . raptor2-2.0.15/tests/rdfxml/ex-62.rdf0000644000175000017500000000121012244506702014101 00000000000000 ]> Item1 Item2 Item3 raptor2-2.0.15/tests/rdfxml/warn-06.out0000644000175000017500000000012311113423026014457 00000000000000 "blah" . raptor2-2.0.15/tests/rdfxml/ex-25.out0000644000175000017500000000050211113423026014126 00000000000000 "1" . "_1" . "2" . "_3" . raptor2-2.0.15/tests/rdfxml/ex-19.rdf0000644000175000017500000000025611113423026014103 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-22.rdf0000644000175000017500000000046611113423026014100 00000000000000 value raptor2-2.0.15/tests/rdfxml/ex-32.out0000644000175000017500000000023311113423026014125 00000000000000 "literal" . . raptor2-2.0.15/tests/rdfxml/ex-34.out0000644000175000017500000000131611113423026014132 00000000000000_:genid2 . _:genid2 _:genid1 . _:genid1 . _:genid4 . _:genid4 _:genid3 . _:genid2 _:genid4 . _:genid3 . _:genid4 . _:genid2 . raptor2-2.0.15/tests/rdfxml/ex-01.out0000644000175000017500000000025011113423026014120 00000000000000_:genid1 . _:genid2 . raptor2-2.0.15/tests/rdfxml/bad-17.rdf0000644000175000017500000000111311113423026014204 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-45.out0000644000175000017500000000030411113423026014130 00000000000000 . "" . raptor2-2.0.15/tests/rdfxml/bad-11.rdf0000644000175000017500000000056311113423026014206 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-20.out0000644000175000017500000000016611113423026014127 00000000000000 . raptor2-2.0.15/tests/rdfxml/ex-62.out0000644000175000017500000000043212244506702014142 00000000000000 "Item1" . "Item2" . "Item3" . raptor2-2.0.15/tests/rdfxml/ex-28.out0000644000175000017500000000027211113423026014135 00000000000000_:genid1 "foo" . _:genid1 . "literal" . raptor2-2.0.15/tests/rdfxml/ex-51.out0000644000175000017500000000016711113423026014134 00000000000000 ""^^ . raptor2-2.0.15/tests/rdfxml/warn-04.out0000644000175000017500000000030011113423026014452 00000000000000 . "bar" . raptor2-2.0.15/tests/rdfxml/ex-20.rdf0000644000175000017500000000046411113423026014074 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-30.rdf0000644000175000017500000000057511113423026014100 00000000000000 blah raptor2-2.0.15/tests/rdfxml/warn-00.out0000644000175000017500000000122511113423026014455 00000000000000 . "text" . _:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 "text" . raptor2-2.0.15/tests/rdfxml/CMakeLists.txt0000644000175000017500000004276612011242612015315 00000000000000# raptor/tests/rdfxml/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # RAPPER_TEST(rdfxml.ex-00 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-00.rdf http://librdf.org/raptor/tests/ex-00.rdf" ex-00.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-00.out ) RAPPER_TEST(rdfxml.ex-01 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-01.rdf http://librdf.org/raptor/tests/ex-01.rdf" ex-01.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-01.out ) RAPPER_TEST(rdfxml.ex-02 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-02.rdf http://librdf.org/raptor/tests/ex-02.rdf" ex-02.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-02.out ) RAPPER_TEST(rdfxml.ex-04 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-04.rdf http://librdf.org/raptor/tests/ex-04.rdf" ex-04.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-04.out ) RAPPER_TEST(rdfxml.ex-05 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-05.rdf http://librdf.org/raptor/tests/ex-05.rdf" ex-05.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-05.out ) RAPPER_TEST(rdfxml.ex-06 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-06.rdf http://librdf.org/raptor/tests/ex-06.rdf" ex-06.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-06.out ) RAPPER_TEST(rdfxml.ex-07 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-07.rdf http://librdf.org/raptor/tests/ex-07.rdf" ex-07.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-07.out ) RAPPER_TEST(rdfxml.ex-08 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-08.rdf http://librdf.org/raptor/tests/ex-08.rdf" ex-08.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-08.out ) RAPPER_TEST(rdfxml.ex-09 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-09.rdf http://librdf.org/raptor/tests/ex-09.rdf" ex-09.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-09.out ) RAPPER_TEST(rdfxml.ex-10 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-10.rdf http://librdf.org/raptor/tests/ex-10.rdf" ex-10.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-10.out ) RAPPER_TEST(rdfxml.ex-11 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-11.rdf http://librdf.org/raptor/tests/ex-11.rdf" ex-11.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-11.out ) RAPPER_TEST(rdfxml.ex-12 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-12.rdf http://librdf.org/raptor/tests/ex-12.rdf" ex-12.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-12.out ) RAPPER_TEST(rdfxml.ex-13 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-13.rdf http://librdf.org/raptor/tests/ex-13.rdf" ex-13.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-13.out ) RAPPER_TEST(rdfxml.ex-14 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-14.rdf http://librdf.org/raptor/tests/ex-14.rdf" ex-14.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-14.out ) RAPPER_TEST(rdfxml.ex-15 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-15.rdf http://librdf.org/raptor/tests/ex-15.rdf" ex-15.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-15.out ) RAPPER_TEST(rdfxml.ex-16 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-16.rdf http://librdf.org/raptor/tests/ex-16.rdf" ex-16.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-16.out ) RAPPER_TEST(rdfxml.ex-17 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-17.rdf http://librdf.org/raptor/tests/ex-17.rdf" ex-17.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-17.out ) RAPPER_TEST(rdfxml.ex-18 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-18.rdf http://librdf.org/raptor/tests/ex-18.rdf" ex-18.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-18.out ) RAPPER_TEST(rdfxml.ex-20 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-20.rdf http://librdf.org/raptor/tests/ex-20.rdf" ex-20.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-20.out ) RAPPER_TEST(rdfxml.ex-21 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-21.rdf http://librdf.org/raptor/tests/ex-21.rdf" ex-21.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-21.out ) RAPPER_TEST(rdfxml.ex-22 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-22.rdf http://librdf.org/raptor/tests/ex-22.rdf" ex-22.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-22.out ) RAPPER_TEST(rdfxml.ex-23 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-23.rdf http://librdf.org/raptor/tests/ex-23.rdf" ex-23.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-23.out ) RAPPER_TEST(rdfxml.ex-24 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-24.rdf http://librdf.org/raptor/tests/ex-24.rdf" ex-24.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-24.out ) RAPPER_TEST(rdfxml.ex-25 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-25.rdf http://librdf.org/raptor/tests/ex-25.rdf" ex-25.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-25.out ) RAPPER_TEST(rdfxml.ex-26 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-26.rdf http://librdf.org/raptor/tests/ex-26.rdf" ex-26.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-26.out ) RAPPER_TEST(rdfxml.ex-27 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-27.rdf http://librdf.org/raptor/tests/ex-27.rdf" ex-27.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-27.out ) RAPPER_TEST(rdfxml.ex-28 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-28.rdf http://librdf.org/raptor/tests/ex-28.rdf" ex-28.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-28.out ) RAPPER_TEST(rdfxml.ex-29 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-29.rdf http://librdf.org/raptor/tests/ex-29.rdf" ex-29.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-29.out ) RAPPER_TEST(rdfxml.ex-30 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-30.rdf http://librdf.org/raptor/tests/ex-30.rdf" ex-30.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-30.out ) RAPPER_TEST(rdfxml.ex-31 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-31.rdf http://librdf.org/raptor/tests/ex-31.rdf" ex-31.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-31.out ) RAPPER_TEST(rdfxml.ex-32 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-32.rdf http://librdf.org/raptor/tests/ex-32.rdf" ex-32.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-32.out ) RAPPER_TEST(rdfxml.ex-33 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-33.rdf http://librdf.org/raptor/tests/ex-33.rdf" ex-33.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-33.out ) RAPPER_TEST(rdfxml.ex-34 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-34.rdf http://librdf.org/raptor/tests/ex-34.rdf" ex-34.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-34.out ) RAPPER_TEST(rdfxml.ex-35 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-35.rdf http://librdf.org/raptor/tests/ex-35.rdf" ex-35.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-35.out ) RAPPER_TEST(rdfxml.ex-36 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-36.rdf http://librdf.org/raptor/tests/ex-36.rdf" ex-36.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-36.out ) RAPPER_TEST(rdfxml.ex-37 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-37.rdf http://librdf.org/raptor/tests/ex-37.rdf" ex-37.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-37.out ) RAPPER_TEST(rdfxml.ex-38 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-38.rdf http://librdf.org/raptor/tests/ex-38.rdf" ex-38.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-38.out ) RAPPER_TEST(rdfxml.ex-39 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-39.rdf http://librdf.org/raptor/tests/ex-39.rdf" ex-39.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-39.out ) RAPPER_TEST(rdfxml.ex-40 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-40.rdf http://librdf.org/raptor/tests/ex-40.rdf" ex-40.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-40.out ) RAPPER_TEST(rdfxml.ex-41 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-41.rdf http://librdf.org/raptor/tests/ex-41.rdf" ex-41.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-41.out ) RAPPER_TEST(rdfxml.ex-46 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-46.rdf http://librdf.org/raptor/tests/ex-46.rdf" ex-46.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-46.out ) RAPPER_TEST(rdfxml.ex-47 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-47.rdf http://librdf.org/raptor/tests/ex-47.rdf" ex-47.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-47.out ) RAPPER_TEST(rdfxml.ex-48 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-48.rdf http://librdf.org/raptor/tests/ex-48.rdf" ex-48.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-48.out ) RAPPER_TEST(rdfxml.ex-49 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-49.rdf http://librdf.org/raptor/tests/ex-49.rdf" ex-49.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-49.out ) RAPPER_TEST(rdfxml.ex-51 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-51.rdf http://librdf.org/raptor/tests/ex-51.rdf" ex-51.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-51.out ) RAPPER_TEST(rdfxml.ex-53 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-53.rdf http://librdf.org/raptor/tests/ex-53.rdf" ex-53.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-53.out ) RAPPER_TEST(rdfxml.ex-54 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-54.rdf http://librdf.org/raptor/tests/ex-54.rdf" ex-54.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-54.out ) RAPPER_TEST(rdfxml.ex-56 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-56.rdf http://librdf.org/raptor/tests/ex-56.rdf" ex-56.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-56.out ) RAPPER_TEST(rdfxml.ex-57 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-57.rdf http://librdf.org/raptor/tests/ex-57.rdf" ex-57.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-57.out ) RAPPER_TEST(rdfxml.ex-58 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-58.rdf http://librdf.org/raptor/tests/ex-58.rdf" ex-58.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-58.out ) RAPPER_TEST(rdfxml.ex-61 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-61.rdf http://librdf.org/raptor/tests/ex-61.rdf" ex-61.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-61.out ) RAPPER_TEST(rdfxml.22-rdf-syntax-ns "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/22-rdf-syntax-ns.rdf http://www.w3.org/1999/02/22-rdf-syntax-ns" 22-rdf-syntax-ns.res ${CMAKE_CURRENT_SOURCE_DIR}/22-rdf-syntax-ns.out ) RAPPER_TEST(rdfxml.rdfs-namespace "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/rdfs-namespace.rdf http://www.w3.org/2000/01/rdf-schema" rdfs-namespace.res ${CMAKE_CURRENT_SOURCE_DIR}/rdfs-namespace.out ) RAPPER_TEST(rdfxml.rdf-schema "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/rdf-schema.rdf http://www.w3.org/2000/01/rdf-schema" rdf-schema.res ${CMAKE_CURRENT_SOURCE_DIR}/rdf-schema.out ) RAPPER_TEST(rdfxml.owl-schema "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/owl-schema.rdf http://www.w3.org/2002/07/owl" owl-schema.res ${CMAKE_CURRENT_SOURCE_DIR}/owl-schema.out ) RAPPER_TEST(rdfxml.daml-oil "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/daml-oil.rdf http://www.daml.org/2001/03/daml+oil" daml-oil.res ${CMAKE_CURRENT_SOURCE_DIR}/daml-oil.out ) RAPPER_TEST(rdfxml.wine "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/wine.rdf http://www.w3.org/TR/owl-guide/wine.rdf" wine.res ${CMAKE_CURRENT_SOURCE_DIR}/wine.out ) RAPPER_TEST(rdfxml.ex-55 "${RAPPER} -q -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/ex-55.rdf http://librdf.org/raptor/tests/ex-55.rdf" ex-55.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-55.out ) RAPPER_TEST(rdfxml.ex-19 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-19.rdf http://librdf.org/raptor/tests/ex-19.rdf" ex-19.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-19.out ) RAPPER_TEST(rdfxml.ex-52 "${RAPPER} -q -f scanForRDF -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-52.svg http://librdf.org/raptor/tests/ex-52.rdf" ex-52.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-52.out ) ADD_TEST(rdfxml.bad-00 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-00.rdf http://librdf.org/raptor/tests/bad-00.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-01 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-01.rdf http://librdf.org/raptor/tests/bad-01.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-02 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-02.rdf http://librdf.org/raptor/tests/bad-02.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-03 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-03.rdf http://librdf.org/raptor/tests/bad-03.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-04 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-04.rdf http://librdf.org/raptor/tests/bad-04.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-05 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-05.rdf http://librdf.org/raptor/tests/bad-05.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-06 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-06.rdf http://librdf.org/raptor/tests/bad-06.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-07 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-07.rdf http://librdf.org/raptor/tests/bad-07.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-08 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-08.rdf http://librdf.org/raptor/tests/bad-08.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-09 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-09.rdf http://librdf.org/raptor/tests/bad-09.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-10 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-10.rdf http://librdf.org/raptor/tests/bad-10.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-11 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-11.rdf http://librdf.org/raptor/tests/bad-11.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-12 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-12.rdf http://librdf.org/raptor/tests/bad-12.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-13 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-13.rdf http://librdf.org/raptor/tests/bad-13.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-14 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-14.rdf http://librdf.org/raptor/tests/bad-14.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-18 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-18.rdf http://librdf.org/raptor/tests/bad-18.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-19 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-19.rdf http://librdf.org/raptor/tests/bad-19.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-20 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-20.rdf http://librdf.org/raptor/tests/bad-20.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-21 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-21.rdf http://librdf.org/raptor/tests/bad-21.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-22 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-22.rdf http://librdf.org/raptor/tests/bad-22.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-23 ${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-23.rdf http://librdf.org/raptor/tests/bad-23.rdf) # WILL_FAIL SET_TESTS_PROPERTIES( rdfxml.bad-00 rdfxml.bad-01 rdfxml.bad-02 rdfxml.bad-03 rdfxml.bad-04 rdfxml.bad-05 rdfxml.bad-06 rdfxml.bad-07 rdfxml.bad-08 rdfxml.bad-09 rdfxml.bad-10 rdfxml.bad-11 rdfxml.bad-12 rdfxml.bad-13 rdfxml.bad-14 rdfxml.bad-18 rdfxml.bad-19 rdfxml.bad-20 rdfxml.bad-21 rdfxml.bad-22 rdfxml.bad-23 PROPERTIES WILL_FAIL TRUE ) ADD_TEST(rdfxml.bad-15 ${RAPPER} -q -m strict -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-15.rdf http://librdf.org/raptor/tests/bad-15.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-16 ${RAPPER} -q -m strict -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-16.rdf http://librdf.org/raptor/tests/bad-16.rdf) # WILL_FAIL ADD_TEST(rdfxml.bad-17 ${RAPPER} -q -m strict -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-17.rdf http://librdf.org/raptor/tests/bad-17.rdf) # WILL_FAIL SET_TESTS_PROPERTIES( rdfxml.bad-15 rdfxml.bad-16 rdfxml.bad-17 PROPERTIES WILL_FAIL TRUE ) RAPPER_TEST(rdfxml.warn-00 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/warn-00.rdf http://librdf.org/raptor/tests/warn-00.rdf" warn-00.res ${CMAKE_CURRENT_SOURCE_DIR}/warn-00.out ) RAPPER_TEST(rdfxml.warn-02 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/warn-02.rdf http://librdf.org/raptor/tests/warn-02.rdf" warn-02.res ${CMAKE_CURRENT_SOURCE_DIR}/warn-02.out ) RAPPER_TEST(rdfxml.warn-04 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/warn-04.rdf http://librdf.org/raptor/tests/warn-04.rdf" warn-04.res ${CMAKE_CURRENT_SOURCE_DIR}/warn-04.out ) RAPPER_TEST(rdfxml.warn-05 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/warn-05.rdf http://librdf.org/raptor/tests/warn-05.rdf" warn-05.res ${CMAKE_CURRENT_SOURCE_DIR}/warn-05.out ) RAPPER_TEST(rdfxml.warn-06 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/warn-06.rdf http://librdf.org/raptor/tests/warn-06.rdf" warn-06.res ${CMAKE_CURRENT_SOURCE_DIR}/warn-06.out ) RAPPER_TEST(rdfxml.warn-07 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/warn-07.rdf http://librdf.org/raptor/tests/warn-07.rdf" warn-07.res ${CMAKE_CURRENT_SOURCE_DIR}/warn-07.out ) RAPPER_TEST(rdfxml.ex-03 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-03.rdf http://librdf.org/raptor/tests/ex-03.rdf" ex-03.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-03.out ) RAPPER_TEST(rdfxml.ex-42 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-42.rdf http://librdf.org/raptor/tests/ex-42.rdf" ex-42.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-42.out ) RAPPER_TEST(rdfxml.ex-43 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-43.rdf http://librdf.org/raptor/tests/ex-43.rdf" ex-43.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-43.out ) RAPPER_TEST(rdfxml.ex-44 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-44.rdf http://librdf.org/raptor/tests/ex-44.rdf" ex-44.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-44.out ) RAPPER_TEST(rdfxml.ex-45 "${RAPPER} -q -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/ex-45.rdf http://librdf.org/raptor/tests/ex-45.rdf" ex-45.res ${CMAKE_CURRENT_SOURCE_DIR}/ex-45.out ) RAPPER_TEST(rdfxml.ex-59 "${RAPPER} -q -i ntriples -o rdfxml ${CMAKE_CURRENT_SOURCE_DIR}/ex-59.nt -" ex-59-rdfxml.rdf ${CMAKE_CURRENT_SOURCE_DIR}/ex-59.rdf ) RAPPER_TEST(rdfxml.ex-60 "${RAPPER} -q -i ntriples -o rdfxml ${CMAKE_CURRENT_SOURCE_DIR}/ex-60.nt -" ex-60-rdfxml.rdf ${CMAKE_CURRENT_SOURCE_DIR}/ex-60.rdf ) # end raptor/tests/rdfxml/CMakeLists.txt raptor2-2.0.15/tests/rdfxml/ex-36.rdf0000644000175000017500000000065111113423026014101 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-18.rdf0000644000175000017500000000031211113423026014205 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-21.rdf0000644000175000017500000000055111113423026014204 00000000000000 foo raptor2-2.0.15/tests/rdfxml/ex-42.rdf0000644000175000017500000000077611113423026014106 00000000000000 val1 val2 val3 raptor2-2.0.15/tests/rdfxml/daml-oil.rdf0000644000175000017500000003756311113423026014751 00000000000000 $Id: daml+oil.daml,v 1.7 2001/06/06 01:38:21 mdean Exp $ Class The class of all "object" classes Datatype The class of all datatype classes Thing The most general (object) class in DAML. This is equal to the union of any class and its complement. Nothing the class with no things in it. equivalentTo for equivalentTo(X, Y), read X is an equivalent term to Y. sameClassAs for sameClassAs(X, Y), read X is an equivalent class to Y. cf OIL Equivalent samePropertyAs for samePropertyAs(P, R), read P is an equivalent property to R. sameIndividualAs for sameIndividualAs(a, b), read a is the same individual as b. disjointWith for disjointWith(X, Y) read: X and Y have no members in common. cf OIL Disjoint differentIndividualFrom for differentIndividualFrom(a, b), read a is not the same individual as b. unionOf for unionOf(X, Y) read: X is the union of the classes in the list Y; i.e. if something is in any of the classes in Y, it's in X, and vice versa. cf OIL OR disjointUnionOf for disjointUnionOf(X, Y) read: X is the disjoint union of the classes in the list Y: (a) for any c1 and c2 in Y, disjointWith(c1, c2), and (b) unionOf(X, Y). i.e. if something is in any of the classes in Y, it's in X, and vice versa. cf OIL disjoint-covered intersectionOf for intersectionOf(X, Y) read: X is the intersection of the classes in the list Y; i.e. if something is in all the classes in Y, then it's in X, and vice versa. cf OIL AND complementOf for complementOf(X, Y) read: X is the complement of Y; if something is in Y, then it's not in X, and vice versa. cf OIL NOT oneOf for oneOf(C, L) read everything in C is one of the things in L; This lets us define classes by enumerating the members. cf OIL OneOf Restriction something is in the class R if it satisfies the attached restrictions, and vice versa. onProperty for onProperty(R, P), read: R is a restricted with respect to property P. toClass for onProperty(R, P) and toClass(R, X), read: i is in class R if and only if for all j, P(i, j) implies type(j, X). cf OIL ValueType hasValue for onProperty(R, P) and hasValue(R, V), read: i is in class R if and only if P(i, V). cf OIL HasFiller hasClass for onProperty(R, P) and hasClass(R, X), read: i is in class R if and only if for some j, P(i, j) and type(j, X). cf OIL HasValue minCardinality for onProperty(R, P) and minCardinality(R, n), read: i is in class R if and only if there are at least n distinct j with P(i, j). cf OIL MinCardinality maxCardinality for onProperty(R, P) and maxCardinality(R, n), read: i is in class R if and only if there are at most n distinct j with P(i, j). cf OIL MaxCardinality cardinality for onProperty(R, P) and cardinality(R, n), read: i is in class R if and only if there are exactly n distinct j with P(i, j). cf OIL Cardinality hasClassQ property for specifying class restriction with cardinalityQ constraints minCardinality for onProperty(R, P), minCardinalityQ(R, n) and hasClassQ(R, X), read: i is in class R if and only if there are at least n distinct j with P(i, j) and type(j, X). cf OIL MinCardinality maxCardinality for onProperty(R, P), maxCardinalityQ(R, n) and hasClassQ(R, X), read: i is in class R if and only if there are at most n distinct j with P(i, j) and type(j, X). cf OIL MaxCardinality cardinality for onProperty(R, P), cardinalityQ(R, n) and hasClassQ(R, X), read: i is in class R if and only if there are exactly n distinct j with P(i, j) and type(j, X). cf OIL Cardinality ObjectProperty if P is an ObjectProperty, and P(x, y), then y is an object. DatatypeProperty if P is a DatatypeProperty, and P(x, y), then y is a data value. inverseOf for inverseOf(R, S) read: R is the inverse of S; i.e. if R(x, y) then S(y, x) and vice versa. cf OIL inverseRelationOf TransitiveProperty if P is a TransitiveProperty, then if P(x, y) and P(y, z) then P(x, z). cf OIL TransitiveProperty. UniqueProperty compare with maxCardinality=1; e.g. integer successor: if P is a UniqueProperty, then if P(x, y) and P(x, z) then y=z. cf OIL FunctionalProperty. UnambiguousProperty if P is an UnambiguousProperty, then if P(x, y) and P(z, y) then x=z. aka injective. e.g. if firstBorne(m, Susan) and firstBorne(n, Susan) then m and n are the same. the empty list; this used to be called Empty. for item(L, I) read: I is an item in L; either first(L, I) or item(R, I) where rest(L, R). Ontology An Ontology is a document that describes a vocabulary of terms for communication between (human and) automated agents. versionInfo generally, a string giving information about this version; e.g. RCS/CVS keywords imports for imports(X, Y) read: X imports Y; i.e. X asserts the* contents of Y by reference; i.e. if imports(X, Y) and you believe X and Y says something, then you should believe it. Note: "the contents" is, in the general case, an il-formed definite description. Different interactions with a resource may expose contents that vary with time, data format, preferred language, requestor credentials, etc. So for "the contents", read "any contents". raptor2-2.0.15/tests/rdfxml/ex-24.out0000644000175000017500000000076211113423026014135 00000000000000_:genid2 . _:genid2 _:genid1 . _:genid1 . _:genid1 . _:genid2 . _:genid2 . raptor2-2.0.15/tests/rdfxml/warn-02.out0000644000175000017500000000000011113423026014445 00000000000000raptor2-2.0.15/tests/rdfxml/ex-56.rdf0000644000175000017500000000043511113423026014103 00000000000000 val raptor2-2.0.15/tests/rdfxml/warn-07.out0000644000175000017500000000133411113423026014465 00000000000000 "\n prop1name\n "^^ . "\n \n \n \n "^^ . raptor2-2.0.15/tests/rdfxml/warn-04.rdf0000644000175000017500000000047411113423026014432 00000000000000 bar raptor2-2.0.15/tests/rdfxml/ex-06.rdf0000644000175000017500000000076311113423026014102 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-11.rdf0000644000175000017500000000075511113423026014077 00000000000000 some markup blah raptor2-2.0.15/tests/rdfxml/ex-40.out0000644000175000017500000000010611113423026014123 00000000000000 "value" . raptor2-2.0.15/tests/rdfxml/ex-08.rdf0000644000175000017500000000066411113423026014104 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-20.rdf0000644000175000017500000000030011113423026014173 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-10.rdf0000644000175000017500000000000011113423026014167 00000000000000raptor2-2.0.15/tests/rdfxml/ex-26.rdf0000644000175000017500000000052611113423026014101 00000000000000 ]> content raptor2-2.0.15/tests/rdfxml/bad-01.rdf0000644000175000017500000000072611113423026014206 00000000000000 val1 val2 raptor2-2.0.15/tests/rdfxml/ex-24.rdf0000644000175000017500000000070311113423026014074 00000000000000 raptor2-2.0.15/tests/rdfxml/rdf-schema.rdf0000644000175000017500000001731411113423026015254 00000000000000 Resource Ressource The most general class type type Indicates membership of a class comment commentaire Use this for descriptions label label Provides a human-readable version of a resource name. Class Classe The concept of Class subClassOf sousClasseDe Indicates membership of a class subPropertyOf sousPropriétéDe Indicates specialization of properties seeAlso voirAussi Indicates a resource that provides information about the subject resource. isDefinedBy esDéfiniPar Indicates a resource containing and defining the subject resource. ConstraintResource RessourceContrainte Resources used to express RDF Schema constraints. ConstraintProperty PropriétéContrainte Properties used to express RDF Schema constraints. domain domaine This is how we associate a class with properties that its instances can have range étendue Properties that can be used in a schema to provide constraints Property Propriété The concept of a property. Literal Littéral This represents the set of atomic values, eg. textual strings. Statement Déclaration This represents the set of reified statements. subject sujet predicate prédicat object objet Container Enveloppe This represents the set Containers. Bag Ensemble Sequence Séquence Alt Choix ContainerMembershipProperty object value raptor2-2.0.15/tests/rdfxml/ex-38.rdf0000644000175000017500000000074411113423026014106 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-38.out0000644000175000017500000000145711113423026014144 00000000000000_:genid1 . _:genid1 . _:genid1 . _:genid1 . . . . _:genid1 . raptor2-2.0.15/tests/rdfxml/bad-02.rdf0000644000175000017500000000052511113423026014204 00000000000000 bar1 bar2 raptor2-2.0.15/tests/rdfxml/ex-46.out0000644000175000017500000001324011113423026014134 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . . "abc" . "abc" . "abc" . "abc" . _:node2 . _:node1 . "apples" . "pears"^^ . "oranges"^^ . "10"^^ . raptor2-2.0.15/tests/rdfxml/ex-57.rdf0000644000175000017500000000107111113423026014101 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-15.out0000644000175000017500000000016311113423026014130 00000000000000 . raptor2-2.0.15/tests/rdfxml/ex-59.rdf0000644000175000017500000000040312222044704014105 00000000000000 value raptor2-2.0.15/tests/rdfxml/ex-07.rdf0000644000175000017500000000062111113423026014074 00000000000000 some literal text raptor2-2.0.15/tests/rdfxml/22-rdf-syntax-ns.out0000644000175000017500000000711311113423026016231 00000000000000 . "A triple consisting of a predicate, a subject, and an object." . . "A name of a property, defining specific meaning for the property" . . "An unordered collection" . . "An ordered collection" . . "A collection of alternatives" . . "Identifies the property used in a statement when representing the statement in reified form" . . . . "Identifies the resource that a statement is describing when representing the statement in reified form" . . . "Identifies the object of a statement when representing the statement in reified form" . . "Identifies the Class of a resource" . . "Identifies the principal value (usually a string) of a property when the property value is a structured resource" . raptor2-2.0.15/tests/rdfxml/ex-04.rdf0000644000175000017500000000027411113423026014075 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-29.out0000644000175000017500000000031111113423026014130 00000000000000 "chat"@en . "chat"@fr . "chat" . raptor2-2.0.15/tests/rdfxml/ex-05.rdf0000644000175000017500000000042111113423026014070 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-08.rdf0000644000175000017500000000073411113423026014214 00000000000000 val2 raptor2-2.0.15/tests/rdfxml/ex-31.rdf0000644000175000017500000000070211113423026014071 00000000000000 foo blah 2 _3 raptor2-2.0.15/tests/rdfxml/ex-56.out0000644000175000017500000000015011113423026014131 00000000000000 "val"^^ . raptor2-2.0.15/tests/rdfxml/ex-25.rdf0000644000175000017500000000055511113423026014102 00000000000000 1 _1 2 _3 raptor2-2.0.15/tests/rdfxml/bad-07.rdf0000644000175000017500000000067011113423026014212 00000000000000 val raptor2-2.0.15/tests/rdfxml/ex-37.out0000644000175000017500000000023511113423026014134 00000000000000_:genid1 . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-48.out0000644000175000017500000000125611113423026014142 00000000000000 " & "^^ . " < "^^ . " > "^^ . ">&<"^^ . "<ex:notaprop>"^^ . raptor2-2.0.15/tests/rdfxml/ex-61.out0000644000175000017500000000013011113423026014123 00000000000000 "one" . raptor2-2.0.15/tests/rdfxml/ex-18.out0000644000175000017500000000010711113423026014131 00000000000000 "Example" . raptor2-2.0.15/tests/rdfxml/ex-06.out0000644000175000017500000000071611113423026014134 00000000000000_:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-12.rdf0000644000175000017500000000106111113423026014067 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-03.out0000644000175000017500000000020111113423026014116 00000000000000 . raptor2-2.0.15/tests/rdfxml/ex-14.out0000644000175000017500000000062711113423026014134 00000000000000 . "John Doe" . "New York" . "19010101" . raptor2-2.0.15/tests/rdfxml/ex-07.out0000644000175000017500000000050511113423026014131 00000000000000_:genid1 . _:genid1 "some literal text"^^ . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-38-rdfxmla.out0000644000175000017500000000135012244506702015600 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-21.out0000644000175000017500000000103011113423026014117 00000000000000 "val1" . "val2" . . "val1" . _:genid1 . _:genid1 "http://example.org/thing3" . _:genid1 "val1" . raptor2-2.0.15/tests/rdfxml/ex-53.out0000644000175000017500000000013211113423026014126 00000000000000_:genid1 . raptor2-2.0.15/tests/rdfxml/ex-48.rdf0000644000175000017500000000120411113423026014077 00000000000000 & < > >&< <ex:notaprop> raptor2-2.0.15/tests/rdfxml/ex-53.rdf0000644000175000017500000000004711113423026014077 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-00.rdf0000644000175000017500000000031211113423026014062 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-10.out0000644000175000017500000000104411113423026014122 00000000000000 . _:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-05.out0000644000175000017500000000044711113423026014134 00000000000000_:genid1 . _:genid1 "a" . _:genid1 "b" . _:genid1 "foo" . raptor2-2.0.15/tests/rdfxml/ex-51.rdf0000644000175000017500000000047111113423026014076 00000000000000 raptor2-2.0.15/tests/rdfxml/owl-schema.out0000644000175000017500000005161111113423026015334 00000000000000 . . . . . . "This file specifies in RDF Schema format the\n built-in classes and properties that together form the basis of\n the RDF/XML syntax of OWL Full, OWL DL and OWL Lite.\n We do not expect people to import this file\n explicitly into their ontology. People that do import this file\n should expect their ontology to be an OWL Full ontology. \n " . "$Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $" . "$Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $" . . "Class" . . . "Thing" . _:genid1 . . _:genid3 _:genid2 . _:genid1 _:genid3 . _:genid2 . _:genid2 . _:genid3 . _:genid1 . . "Nothing" . . . "equivalentClass" . . . . . "disjointWith" . . . . "equivalentProperty" . . . "sameAs" . . . . "differentFrom" . . . . "AllDifferent" . . "distinctMembers" . . . . "unionOf" . . . . "intersectionOf" . . . . "complementOf" . . . . "oneOf" . . . . "Restriction" . . . "onProperty" . . . . "allValuesFrom" . . . . "hasValue" . . . "someValuesFrom" . . . . "minCardinality" . . . . "maxCardinality" . . . . "cardinality" . . . . "ObjectProperty" . . . "DatatypeProperty" . . . "inverseOf" . . . . "TransitiveProperty" . . . "SymmetricProperty" . . . "FunctionalProperty" . . . "InverseFunctionalProperty" . . . . . . . . . "Ontology" . . . . "imports" . . . . . "versionInfo" . . . "priorVersion" . . . . . "backwardCompatibleWitesh" . . . . . "incompatibleWith" . . . . . "DeprecatedClass" . . . "DeprecatedProperty" . . . "DataRange" . raptor2-2.0.15/tests/rdfxml/ex-22.out0000644000175000017500000000066411113423026014134 00000000000000_:genid1 . . "value" . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-31.out0000644000175000017500000000052511113423026014130 00000000000000_:genid1 "foo" . _:genid1 "blah" . _:genid1 . "2" . "_3" . raptor2-2.0.15/tests/rdfxml/ex-60.rdf0000644000175000017500000000046312222044704014103 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-23.out0000644000175000017500000000113011113423026014122 00000000000000_:genid1 . _:genid3 . _:genid2 _:genid3 . _:genid4 . _:genid2 _:genid4 . _:genid5 . _:genid2 _:genid5 . _:genid1 _:genid2 . raptor2-2.0.15/tests/rdfxml/bad-23.rdf0000644000175000017500000000044711113423026014212 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-18.rdf0000644000175000017500000000045311113423026014101 00000000000000 Example raptor2-2.0.15/tests/rdfxml/warn-07.rdf0000644000175000017500000000126011113423026014427 00000000000000 prop1name raptor2-2.0.15/tests/rdfxml/ex-52.out0000644000175000017500000000030711113423026014131 00000000000000 "Simple Example" . "2002-10-05" . raptor2-2.0.15/tests/rdfxml/daml-oil.out0000644000175000017500000010164411113423026014775 00000000000000 "$Id: daml+oil.daml,v 1.7 2001/06/06 01:38:21 mdean Exp $" . . . "Class" . "\n The class of all \"object\" classes\n " . . . "Datatype" . "\n The class of all datatype classes\n " . . . "Thing" . "\n The most general (object) class in DAML.\n This is equal to the union of any class and its complement.\n " . _:genid1 . _:genid1 . . _:genid3 . _:genid3 _:genid2 . _:genid1 _:genid3 . _:genid2 . _:genid2 . _:genid3 . _:genid1 . . "Nothing" . "the class with no things in it." . . . "equivalentTo" . "\n for equivalentTo(X, Y), read X is an equivalent term to Y.\n " . . "sameClassAs" . "\n for sameClassAs(X, Y), read X is an equivalent class to Y.\n cf OIL Equivalent\n " . . . . . . "samePropertyAs" . "\n for samePropertyAs(P, R), read P is an equivalent property to R.\n " . . . . "sameIndividualAs" . "\n for sameIndividualAs(a, b), read a is the same individual as b.\n " . . . . . "disjointWith" . "\n for disjointWith(X, Y) read: X and Y have no members in common.\n cf OIL Disjoint\n " . . . . "differentIndividualFrom" . "\n for differentIndividualFrom(a, b), read a is not the same individual as b.\n " . . . . "unionOf" . "\n for unionOf(X, Y) read: X is the union of the classes in the list Y;\n i.e. if something is in any of the classes in Y, it's in X, and vice versa.\n cf OIL OR\n " . . . . "disjointUnionOf" . "\n for disjointUnionOf(X, Y) read: X is the disjoint union of the classes in\n the list Y: (a) for any c1 and c2 in Y, disjointWith(c1, c2),\n and (b) unionOf(X, Y). i.e. if something is in any of the classes in Y, it's\n in X, and vice versa.\n cf OIL disjoint-covered\n " . . . . "intersectionOf" . "\n for intersectionOf(X, Y) read: X is the intersection of the classes in the list Y;\n i.e. if something is in all the classes in Y, then it's in X, and vice versa.\n cf OIL AND\n " . . . . "complementOf" . "\n for complementOf(X, Y) read: X is the complement of Y; if something is in Y,\n then it's not in X, and vice versa.\n cf OIL NOT\n " . . . . "oneOf" . "\n for oneOf(C, L) read everything in C is one of the\n things in L;\n This lets us define classes by enumerating the members.\n cf OIL OneOf\n " . . . . "Restriction" . "\n something is in the class R if it satisfies the attached restrictions, \n and vice versa.\n " . . . "onProperty" . "\n for onProperty(R, P), read:\n R is a restricted with respect to property P.\n " . . . . "toClass" . "\n for onProperty(R, P) and toClass(R, X), read:\n i is in class R if and only if for all j, P(i, j) implies type(j, X).\n cf OIL ValueType\n " . . . . "hasValue" . "\n for onProperty(R, P) and hasValue(R, V), read:\n i is in class R if and only if P(i, V).\n cf OIL HasFiller\n " . . . "hasClass" . "\n for onProperty(R, P) and hasClass(R, X), read:\n i is in class R if and only if for some j, P(i, j) and type(j, X).\n cf OIL HasValue\n " . . . . "minCardinality" . "\n for onProperty(R, P) and minCardinality(R, n), read:\n i is in class R if and only if there are at least n distinct j with P(i, j).\n cf OIL MinCardinality\n " . . . . "maxCardinality" . "\n for onProperty(R, P) and maxCardinality(R, n), read:\n i is in class R if and only if there are at most n distinct j with P(i, j).\n cf OIL MaxCardinality\n " . . . . "cardinality" . "\n for onProperty(R, P) and cardinality(R, n), read:\n i is in class R if and only if there are exactly n distinct j with P(i, j).\n cf OIL Cardinality\n " . . . . "hasClassQ" . "\n property for specifying class restriction with cardinalityQ constraints\n " . . . . "minCardinality" . "\n for onProperty(R, P), minCardinalityQ(R, n) and hasClassQ(R, X), read:\n i is in class R if and only if there are at least n distinct j with P(i, j) \n and type(j, X).\n cf OIL MinCardinality\n " . . . . "maxCardinality" . "\n for onProperty(R, P), maxCardinalityQ(R, n) and hasClassQ(R, X), read:\n i is in class R if and only if there are at most n distinct j with P(i, j)\n and type(j, X).\n cf OIL MaxCardinality\n " . . . . "cardinality" . "\n for onProperty(R, P), cardinalityQ(R, n) and hasClassQ(R, X), read:\n i is in class R if and only if there are exactly n distinct j with P(i, j)\n and type(j, X).\n cf OIL Cardinality\n " . . . . "ObjectProperty" . "\n if P is an ObjectProperty, and P(x, y), then y is an object.\n " . . . "DatatypeProperty" . "\n if P is a DatatypeProperty, and P(x, y), then y is a data value.\n " . . . "inverseOf" . "\n for inverseOf(R, S) read: R is the inverse of S; i.e.\n if R(x, y) then S(y, x) and vice versa.\n cf OIL inverseRelationOf\n " . . . . "TransitiveProperty" . "\n if P is a TransitiveProperty, then if P(x, y) and P(y, z) then P(x, z).\n cf OIL TransitiveProperty.\n " . . . "UniqueProperty" . "\n compare with maxCardinality=1; e.g. integer successor:\n if P is a UniqueProperty, then if P(x, y) and P(x, z) then y=z.\n cf OIL FunctionalProperty.\n " . . . "UnambiguousProperty" . "\n if P is an UnambiguousProperty, then if P(x, y) and P(z, y) then x=z.\n aka injective. e.g. if firstBorne(m, Susan)\n and firstBorne(n, Susan) then m and n are the same.\n " . . . . . "\n the empty list; this used to be called Empty.\n " . . . . . . . "\n for item(L, I) read: I is an item in L; either first(L, I)\n or item(R, I) where rest(L, R).\n " . . . "Ontology" . "\n An Ontology is a document that describes\n a vocabulary of terms for communication between\n (human and) automated agents.\n " . . "versionInfo" . "\n generally, a string giving information about this\n version; e.g. RCS/CVS keywords\n " . . "imports" . "\n for imports(X, Y) read: X imports Y;\n i.e. X asserts the* contents of Y by reference;\n i.e. if imports(X, Y) and you believe X and Y says something,\n then you should believe it.\n Note: \"the contents\" is, in the general case,\n an il-formed definite description. Different\n interactions with a resource may expose contents\n that vary with time, data format, preferred language,\n requestor credentials, etc. So for \"the contents\",\n read \"any contents\".\n " . . . . . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfxml/ex-47.out0000644000175000017500000000462311113423026014142 00000000000000 . . . . . . . . . . . . . . . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . "abc" . raptor2-2.0.15/tests/rdfxml/ex-33.out0000644000175000017500000000025311113423026014130 00000000000000_:genid1 "literal2" . _:genid1 "literal3" . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-12.out0000644000175000017500000000155111113423026014127 00000000000000_:genid1 . _:genid1 . _:genid2 . _:genid2 . _:genid1 _:genid2 . _:genid3 . _:genid3 . _:genid2 _:genid3 . _:genid3 . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-49.rdf0000644000175000017500000000116611113423026014107 00000000000000 hmm raptor2-2.0.15/tests/rdfxml/ex-37.rdf0000644000175000017500000000057611113423026014110 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-10.rdf0000644000175000017500000000100611113423026014064 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-05.rdf0000644000175000017500000000066411113423026014213 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-58.out0000644000175000017500000000043311113423026014137 00000000000000 "World Wide Web Consortium" . . . raptor2-2.0.15/tests/rdfxml/22-rdf-syntax-ns.rdf0000644000175000017500000000304011113423026016170 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-22.rdf0000644000175000017500000000045011113423026014203 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-02.out0000644000175000017500000000000011113423026014112 00000000000000raptor2-2.0.15/tests/rdfxml/bad-03.rdf0000644000175000017500000000053611113423026014207 00000000000000 bar1 bar2 raptor2-2.0.15/tests/rdfxml/bad-16.rdf0000644000175000017500000000103711113423026014210 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-06.rdf0000644000175000017500000000061411113423026014207 00000000000000 val raptor2-2.0.15/tests/rdfxml/ex-33.rdf0000644000175000017500000000057311113423026014101 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-08.out0000644000175000017500000000071311113423026014133 00000000000000 "err" . "hmm" . "umm" . "apple" . "banana" . "pear" . raptor2-2.0.15/tests/rdfxml/bad-15.rdf0000644000175000017500000000103211113423026014202 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-47.rdf0000644000175000017500000000445511113423026014111 00000000000000 ]> raptor2-2.0.15/tests/rdfxml/warn-06.rdf0000644000175000017500000000042411113423026014427 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-14.rdf0000644000175000017500000000047211113423026014210 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-30.out0000644000175000017500000000010311113423026014117 00000000000000 "blah" . raptor2-2.0.15/tests/rdfxml/ex-27.out0000644000175000017500000000054511113423026014137 00000000000000_:genid1 "prop1name" . _:genid1 . _:genid2 "prop2name" . _:genid2 . _:genid3 "prop3name" . _:genid3 . raptor2-2.0.15/tests/rdfxml/ex-15.rdf0000644000175000017500000000046411113423026014100 00000000000000 raptor2-2.0.15/tests/rdfxml/bad-12.rdf0000644000175000017500000000040011113423026014175 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-16.rdf0000644000175000017500000000044511113423026014100 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-27.rdf0000644000175000017500000000073411113423026014103 00000000000000 prop1name prop2name prop3name raptor2-2.0.15/tests/rdfxml/ex-55.rdf0000644000175000017500000000050611113423026014101 00000000000000 ]> &bar; raptor2-2.0.15/tests/rdfxml/ex-41.rdf0000644000175000017500000000100311113423026014065 00000000000000 val1 val2 val3 raptor2-2.0.15/tests/rdfxml/ex-11.out0000644000175000017500000000045611113423026014131 00000000000000 "\n some markup\n blah\n "^^ . raptor2-2.0.15/tests/rdfxml/ex-43.rdf0000644000175000017500000000056011113423026014076 00000000000000 val1 raptor2-2.0.15/tests/rdfxml/owl-schema.rdf0000644000175000017500000002053611113423026015302 00000000000000 ]> This file specifies in RDF Schema format the built-in classes and properties that together form the basis of the RDF/XML syntax of OWL Full, OWL DL and OWL Lite. We do not expect people to import this file explicitly into their ontology. People that do import this file should expect their ontology to be an OWL Full ontology. $Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $ $Id: owl.rdf,v 1.5 2003/08/19 15:07:19 connolly Exp $ Class Thing Nothing equivalentClass disjointWith equivalentProperty sameAs differentFrom AllDifferent distinctMembers unionOf intersectionOf complementOf oneOf Restriction onProperty allValuesFrom hasValue someValuesFrom minCardinality maxCardinality cardinality ObjectProperty DatatypeProperty inverseOf TransitiveProperty SymmetricProperty FunctionalProperty InverseFunctionalProperty Ontology imports versionInfo priorVersion backwardCompatibleWitesh incompatibleWith DeprecatedClass DeprecatedProperty DataRange raptor2-2.0.15/tests/rdfxml/ex-43.out0000644000175000017500000000122711113423026014133 00000000000000 . "val1" . _:genid1 . _:genid1 . _:genid1 . _:genid1 . _:genid1 "val1" . raptor2-2.0.15/tests/rdfxml/ex-03.rdf0000644000175000017500000000071011113423026014067 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-39.rdf0000644000175000017500000000103011113423026014074 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-09.rdf0000644000175000017500000000043111113423026014075 00000000000000 content blah raptor2-2.0.15/tests/rdfxml/ex-58.rdf0000644000175000017500000000105711113423026014106 00000000000000 World Wide Web Consortium raptor2-2.0.15/tests/rdfxml/bad-00.rdf0000644000175000017500000000066211113423026014204 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-28.rdf0000644000175000017500000000053411113423026014102 00000000000000 foo literal raptor2-2.0.15/tests/rdfxml/bad-13.rdf0000644000175000017500000000050711113423026014206 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-00.out0000644000175000017500000000012411113423026014117 00000000000000_:genid1 . raptor2-2.0.15/tests/rdfxml/ex-52.svg0000644000175000017500000000142511113423026014123 00000000000000 Simple Example 2002-10-05 raptor2-2.0.15/tests/rdfxml/ex-19.out0000644000175000017500000000015311113423026014133 00000000000000 . raptor2-2.0.15/tests/rdfxml/ex-63.rdf0000644000175000017500000000070312244506702014110 00000000000000

123

raptor2-2.0.15/tests/rdfxml/ex-60.nt0000644000175000017500000000015312222044704013745 00000000000000 . raptor2-2.0.15/tests/rdfxml/rdf-schema.out0000644000175000017500000004227411113423026015313 00000000000000 . "Resource"@en . "Ressource"@fr . "The most general class" . . "type"@en . "type"@fr . "Indicates membership of a class" . . . "comment"@en . "commentaire"@fr . . "Use this for descriptions" . . . . "label"@en . "label"@fr . . "Provides a human-readable version of a resource name." . . . "Class"@en . "Classe"@fr . "The concept of Class" . . . "subClassOf"@en . "sousClasseDe"@fr . "Indicates membership of a class" . . . . "subPropertyOf"@en . "sousPropri\u00E9t\u00E9De"@fr . "Indicates specialization of properties" . . . . "seeAlso"@en . "voirAussi"@fr . "Indicates a resource that provides information about the subject resource." . . . . . . "isDefinedBy"@en . "esD\u00E9finiPar"@fr . "Indicates a resource containing and defining the subject resource." . . . . "ConstraintResource"@en . "RessourceContrainte"@fr . . . "Resources used to express RDF Schema constraints." . . "ConstraintProperty"@en . "Propri\u00E9t\u00E9Contrainte"@fr . . . "Properties used to express RDF Schema constraints." . . "domain"@en . "domaine"@fr . "This is how we associate a class with properties that its instances can have" . . "range"@en . "\u00E9tendue"@fr . "Properties that can be used in a schema to provide constraints" . . . . "Property"@en . "Propri\u00E9t\u00E9"@fr . "The concept of a property." . . . "Literal"@en . "Litt\u00E9ral"@fr . . "This represents the set of atomic values, eg. textual strings." . . "Statement"@en . "D\u00E9claration"@fr . . "This represents the set of reified statements." . . "subject"@en . "sujet"@fr . . . . "predicate"@en . "pr\u00E9dicat"@fr . . . . . "object"@en . "objet"@fr . . . "Container"@en . "Enveloppe"@fr . . "This represents the set Containers." . . "Bag"@en . "Ensemble"@fr . . . "Sequence"@en . "S\u00E9quence"@fr . . . "Alt"@en . "Choix"@fr . . . "ContainerMembershipProperty"@en . . . "object"@en . "value"@fr . . raptor2-2.0.15/tests/rdfxml/bad-09.rdf0000644000175000017500000000100011113423026014200 00000000000000 raptor2-2.0.15/tests/rdfxml/ex-57.out0000644000175000017500000000014711113423026014140 00000000000000 ""^^ . raptor2-2.0.15/tests/rdfxml/ex-36.out0000644000175000017500000000055111113423026014134 00000000000000_:genid1 . _:genid1 . _:genid1 . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-14.rdf0000644000175000017500000000116111113423026014072 00000000000000 John Doe New York 19010101 raptor2-2.0.15/tests/rdfxml/wine.out0000644000175000017500000103006311113423026014236 00000000000000 . "An example OWL ontology" . . . . "Derived from the DAML Wine ontology at \n http://ontolingua.stanford.edu/doc/chimaera/ontologies/wines.daml\n Substantially changed, in particular the Region based relations.\n " . "Wine Ontology" . . . _:genid1 . _:genid1 . _:genid1 "1"^^ . _:genid1 . _:genid2 . _:genid2 . _:genid2 . _:genid2 . _:genid3 . _:genid3 . _:genid3 "1"^^ . _:genid3 . _:genid4 . _:genid4 . _:genid4 "1"^^ . _:genid4 . _:genid5 . _:genid5 . _:genid5 "1"^^ . _:genid5 . _:genid6 . _:genid6 . _:genid6 "1"^^ . _:genid6 . _:genid7 . _:genid7 . _:genid7 "1"^^ . _:genid7 . _:genid8 . _:genid8 . _:genid8 . _:genid8 . "wine"@en . "vin"@fr . . _:genid9 . _:genid9 . _:genid9 "1"^^ . _:genid9 . . . . _:genid10 . . _:genid12 _:genid11 . _:genid10 _:genid12 . _:genid11 . _:genid11 . _:genid11 . _:genid12 . _:genid10 . . _:genid13 . . _:genid15 _:genid14 . _:genid13 _:genid15 . _:genid14 . _:genid14 . _:genid14 . _:genid15 . _:genid13 . . _:genid16 . . _:genid18 _:genid17 . _:genid16 _:genid18 . _:genid17 . _:genid17 . _:genid19 . _:genid20 . . _:genid21 . _:genid20 _:genid21 . . _:genid21 . _:genid19 _:genid20 . _:genid17 _:genid19 . _:genid18 . _:genid16 . . _:genid22 . . _:genid23 . _:genid22 _:genid23 . . _:genid23 . _:genid22 . . _:genid24 . _:genid24 . _:genid25 . _:genid26 . . _:genid27 . _:genid26 _:genid27 . . _:genid28 . _:genid27 _:genid28 . . _:genid28 . _:genid25 _:genid26 . _:genid24 _:genid25 . _:genid24 . . _:genid29 . . _:genid30 . _:genid29 _:genid30 . . _:genid30 . _:genid29 . . _:genid31 . _:genid31 . _:genid31 . _:genid31 . _:genid32 . _:genid32 . _:genid32 "1"^^ . _:genid32 . . _:genid33 . . _:genid34 . _:genid33 _:genid34 . . _:genid34 . _:genid33 . . _:genid35 . _:genid35 . _:genid36 . _:genid37 . . _:genid38 . _:genid37 _:genid38 . . _:genid38 . _:genid36 _:genid37 . _:genid35 _:genid36 . _:genid35 . . . . . . . . . . . . . . . "1998"^^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _:genid39 . . _:genid41 _:genid40 . _:genid39 _:genid41 . _:genid40 . _:genid40 . _:genid40 . _:genid43 _:genid42 . _:genid41 _:genid43 . _:genid42 . _:genid42 . _:genid42 "1"^^ . _:genid43 . _:genid39 . . _:genid44 . _:genid44 . _:genid44 . _:genid44 . _:genid45 . _:genid45 . _:genid45 . _:genid45 . _:genid46 . _:genid46 . _:genid47 . _:genid48 . . _:genid49 . _:genid48 _:genid49 . . _:genid49 . _:genid47 _:genid48 . _:genid46 _:genid47 . _:genid46 . _:genid50 . _:genid50 . _:genid51 . _:genid52 . . _:genid53 . _:genid52 _:genid53 . . _:genid53 . _:genid51 _:genid52 . _:genid50 _:genid51 . _:genid50 . . . "Made WineDescriptor unionType of tastes and color" . _:genid54 . . _:genid55 . _:genid54 _:genid55 . . _:genid55 . _:genid54 . . . . . _:genid56 . . _:genid57 . _:genid56 _:genid57 . . _:genid58 . _:genid57 _:genid58 . . _:genid58 . _:genid56 . . . _:genid59 . . _:genid60 . _:genid59 _:genid60 . . _:genid61 . _:genid60 _:genid61 . . _:genid61 . _:genid59 . . . _:genid62 . . _:genid63 . _:genid62 _:genid63 . . _:genid64 . _:genid63 _:genid64 . . _:genid64 . _:genid62 . . . _:genid65 . . _:genid66 . _:genid65 _:genid66 . . _:genid67 . _:genid66 _:genid67 . . _:genid67 . _:genid65 . . . _:genid68 . . _:genid70 _:genid69 . _:genid68 _:genid70 . _:genid69 . _:genid69 . _:genid69 . _:genid70 . _:genid68 . . _:genid71 . _:genid71 . _:genid71 . _:genid71 . _:genid72 . _:genid72 . _:genid72 "1"^^ . _:genid72 . . _:genid73 . . _:genid75 _:genid74 . _:genid73 _:genid75 . _:genid74 . _:genid74 . _:genid74 . _:genid75 . _:genid73 . . _:genid76 . . _:genid78 _:genid77 . _:genid76 _:genid78 . _:genid77 . _:genid77 . _:genid77 . _:genid78 . _:genid76 . . . _:genid79 . _:genid79 . _:genid79 . _:genid79 . _:genid80 . _:genid80 . _:genid81 . _:genid82 . . _:genid83 . _:genid82 _:genid83 . . _:genid83 . _:genid81 _:genid82 . _:genid80 _:genid81 . _:genid80 . _:genid84 . . _:genid86 _:genid85 . _:genid84 _:genid86 . _:genid85 . _:genid85 . _:genid85 . _:genid86 . _:genid84 . . _:genid87 . _:genid87 . _:genid87 . _:genid87 . _:genid88 . _:genid88 . _:genid88 . _:genid88 . _:genid89 . _:genid89 . _:genid89 . _:genid89 . _:genid90 . _:genid90 . _:genid90 "1"^^ . _:genid90 . _:genid91 . . _:genid93 _:genid92 . _:genid91 _:genid93 . _:genid92 . _:genid92 . _:genid92 . _:genid93 . _:genid91 . . _:genid94 . _:genid94 . _:genid94 . _:genid94 . _:genid95 . _:genid95 . _:genid96 . _:genid97 . . _:genid98 . _:genid97 _:genid98 . . _:genid98 . _:genid96 _:genid97 . _:genid95 _:genid96 . _:genid95 . _:genid99 . . _:genid101 _:genid100 . _:genid99 _:genid101 . _:genid100 . _:genid100 . _:genid102 . _:genid103 . . _:genid104 . _:genid103 _:genid104 . . _:genid104 . _:genid102 _:genid103 . _:genid100 _:genid102 . _:genid101 . _:genid99 . . _:genid105 . . _:genid107 _:genid106 . _:genid105 _:genid107 . _:genid106 . _:genid106 . _:genid106 . _:genid109 _:genid108 . _:genid107 _:genid109 . _:genid108 . _:genid108 . _:genid108 "1"^^ . _:genid109 . _:genid105 . . _:genid110 . . _:genid112 _:genid111 . _:genid110 _:genid112 . _:genid111 . _:genid111 . _:genid111 . _:genid114 _:genid113 . _:genid112 _:genid114 . _:genid113 . _:genid113 . _:genid113 "1"^^ . _:genid114 . _:genid110 . . . . _:genid115 . _:genid115 . _:genid115 . _:genid115 . _:genid116 . _:genid116 . _:genid116 . _:genid116 . _:genid117 . _:genid117 . _:genid117 . _:genid117 . . _:genid118 . _:genid118 . _:genid118 . _:genid118 . _:genid119 . _:genid119 . _:genid119 . _:genid119 . _:genid120 . _:genid120 . _:genid120 . _:genid120 . _:genid121 . _:genid121 . _:genid121 . _:genid121 . _:genid122 . _:genid122 . _:genid122 "1"^^ . _:genid122 . _:genid123 . . _:genid125 _:genid124 . _:genid123 _:genid125 . _:genid124 . _:genid124 . _:genid124 . _:genid125 . _:genid123 . . _:genid126 . . _:genid128 _:genid127 . _:genid126 _:genid128 . _:genid127 . _:genid127 . _:genid127 . _:genid128 . _:genid126 . . _:genid129 . _:genid129 . _:genid129 . _:genid129 . _:genid130 . . _:genid132 _:genid131 . _:genid130 _:genid132 . _:genid131 . _:genid131 . _:genid131 . _:genid134 _:genid133 . _:genid132 _:genid134 . _:genid133 . _:genid133 . _:genid133 "1"^^ . _:genid134 . _:genid130 . . _:genid135 . . _:genid137 _:genid136 . _:genid135 _:genid137 . _:genid136 . _:genid136 . _:genid136 . _:genid137 . _:genid135 . . _:genid138 . . _:genid140 _:genid139 . _:genid138 _:genid140 . _:genid139 . _:genid139 . _:genid139 . _:genid140 . _:genid138 . . _:genid141 . _:genid141 . _:genid141 . _:genid141 . _:genid142 . _:genid142 . _:genid142 "1"^^ . _:genid142 . _:genid143 . . _:genid144 . _:genid143 _:genid144 . . _:genid144 . _:genid143 . . _:genid145 . _:genid145 . _:genid146 . _:genid147 . . _:genid148 . _:genid147 _:genid148 . . _:genid148 . _:genid146 _:genid147 . _:genid145 _:genid146 . _:genid145 . _:genid149 . . _:genid150 . _:genid149 _:genid150 . . _:genid150 . _:genid149 . . . _:genid151 . _:genid151 . _:genid151 . _:genid151 . _:genid152 . _:genid152 . _:genid152 . _:genid152 . _:genid153 . _:genid153 . _:genid153 . _:genid153 . _:genid154 . _:genid154 . _:genid154 . _:genid154 . . _:genid155 . _:genid155 . _:genid155 . _:genid155 . _:genid156 . . _:genid158 _:genid157 . _:genid156 _:genid158 . _:genid157 . _:genid157 . _:genid157 . _:genid160 _:genid159 . _:genid158 _:genid160 . _:genid159 . _:genid159 . _:genid159 "1"^^ . _:genid160 . _:genid156 . . _:genid161 . _:genid161 . _:genid161 . _:genid161 . _:genid162 . . _:genid164 _:genid163 . _:genid162 _:genid164 . _:genid163 . _:genid163 . _:genid163 . _:genid166 _:genid165 . _:genid164 _:genid166 . _:genid165 . _:genid165 . _:genid165 "1"^^ . _:genid166 . _:genid162 . . _:genid167 . _:genid167 . _:genid167 . _:genid167 . _:genid168 . _:genid168 . _:genid168 . _:genid168 . _:genid169 . _:genid169 . _:genid170 . _:genid171 . . _:genid172 . _:genid171 _:genid172 . . _:genid172 . _:genid170 _:genid171 . _:genid169 _:genid170 . _:genid169 . _:genid173 . _:genid173 . _:genid174 . _:genid175 . . _:genid176 . _:genid175 _:genid176 . . _:genid176 . _:genid174 _:genid175 . _:genid173 _:genid174 . _:genid173 . _:genid177 . . _:genid179 _:genid178 . _:genid177 _:genid179 . _:genid178 . _:genid178 . _:genid178 . _:genid181 _:genid180 . _:genid179 _:genid181 . _:genid180 . _:genid180 . _:genid180 "1"^^ . _:genid181 . _:genid177 . . _:genid182 . _:genid182 . _:genid182 . _:genid182 . _:genid183 . _:genid183 . _:genid183 . _:genid183 . _:genid184 . _:genid184 . _:genid184 . _:genid184 . _:genid185 . _:genid185 . _:genid185 "1"^^ . _:genid185 . _:genid186 . . _:genid188 _:genid187 . _:genid186 _:genid188 . _:genid187 . _:genid187 . _:genid187 . _:genid188 . _:genid186 . . _:genid189 . _:genid189 . _:genid189 . _:genid189 . _:genid190 . _:genid190 . _:genid190 . _:genid190 . _:genid191 . _:genid191 . _:genid191 . _:genid191 . _:genid192 . _:genid192 . _:genid192 . _:genid192 . _:genid193 . _:genid193 . _:genid193 "1"^^ . _:genid193 . _:genid194 . . _:genid196 _:genid195 . _:genid194 _:genid196 . _:genid195 . _:genid195 . _:genid195 . _:genid196 . _:genid194 . . _:genid197 . _:genid197 . _:genid197 . _:genid197 . _:genid198 . . _:genid200 _:genid199 . _:genid198 _:genid200 . _:genid199 . _:genid199 . _:genid199 . _:genid200 . _:genid198 . . _:genid201 . _:genid201 . _:genid201 . _:genid201 . _:genid202 . _:genid202 . _:genid202 . _:genid202 . _:genid203 . _:genid203 . _:genid204 . _:genid205 . . _:genid206 . _:genid205 _:genid206 . . _:genid206 . _:genid204 _:genid205 . _:genid203 _:genid204 . _:genid203 . _:genid207 . _:genid207 . _:genid208 . _:genid209 . . _:genid210 . _:genid209 _:genid210 . . _:genid210 . _:genid208 _:genid209 . _:genid207 _:genid208 . _:genid207 . _:genid211 . . _:genid213 _:genid212 . _:genid211 _:genid213 . _:genid212 . _:genid212 . _:genid212 . _:genid215 _:genid214 . _:genid213 _:genid215 . _:genid214 . _:genid214 . _:genid214 "1"^^ . _:genid215 . _:genid211 . . _:genid216 . _:genid216 . _:genid216 . _:genid216 . _:genid217 . . _:genid219 _:genid218 . _:genid217 _:genid219 . _:genid218 . _:genid218 . _:genid220 . _:genid221 . . _:genid222 . _:genid221 _:genid222 . . _:genid223 . _:genid222 _:genid223 . . _:genid224 . _:genid223 _:genid224 . . _:genid225 . _:genid224 _:genid225 . . _:genid225 . _:genid220 _:genid221 . _:genid218 _:genid220 . _:genid227 _:genid226 . _:genid219 _:genid227 . _:genid226 . _:genid226 . _:genid226 "2"^^ . _:genid227 . _:genid217 . . . . _:genid228 . _:genid228 . _:genid228 . _:genid228 . _:genid229 . _:genid229 . _:genid229 . _:genid229 . _:genid230 . . _:genid232 _:genid231 . _:genid230 _:genid232 . _:genid231 . _:genid231 . _:genid231 . _:genid232 . _:genid230 . . _:genid233 . _:genid233 . _:genid233 . _:genid233 . _:genid234 . _:genid234 . _:genid234 . _:genid234 . _:genid235 . _:genid235 . _:genid235 "1"^^ . _:genid235 . _:genid236 . . _:genid238 _:genid237 . _:genid236 _:genid238 . _:genid237 . _:genid237 . _:genid237 . _:genid238 . _:genid236 . . . . _:genid239 . . _:genid241 _:genid240 . _:genid239 _:genid241 . _:genid240 . _:genid240 . _:genid240 . _:genid241 . _:genid239 . . . . _:genid242 . _:genid242 . _:genid242 . _:genid242 . _:genid243 . _:genid243 . _:genid244 . _:genid245 . . _:genid246 . _:genid245 _:genid246 . . _:genid246 . _:genid244 _:genid245 . _:genid243 _:genid244 . _:genid243 . . _:genid247 . . _:genid249 _:genid248 . _:genid247 _:genid249 . _:genid248 . _:genid248 . _:genid248 . _:genid249 . _:genid247 . . . _:genid250 . _:genid250 . _:genid251 . _:genid252 . . _:genid253 . _:genid252 _:genid253 . . _:genid253 . _:genid251 _:genid252 . _:genid250 _:genid251 . _:genid250 . _:genid254 . _:genid254 . _:genid255 . _:genid256 . . _:genid257 . _:genid256 _:genid257 . . _:genid257 . _:genid255 _:genid256 . _:genid254 _:genid255 . _:genid254 . _:genid258 . . _:genid259 . _:genid258 _:genid259 . . _:genid261 _:genid260 . _:genid259 _:genid261 . _:genid260 . _:genid260 . _:genid260 . _:genid261 . _:genid258 . . _:genid262 . . _:genid264 _:genid263 . _:genid262 _:genid264 . _:genid263 . _:genid263 . _:genid263 . _:genid264 . _:genid262 . . _:genid265 . . _:genid267 _:genid266 . _:genid265 _:genid267 . _:genid266 . _:genid266 . _:genid266 . _:genid269 _:genid268 . _:genid267 _:genid269 . _:genid268 . _:genid268 . _:genid268 "1"^^ . _:genid269 . _:genid265 . . _:genid270 . . _:genid272 _:genid271 . _:genid270 _:genid272 . _:genid271 . _:genid271 . _:genid271 . _:genid272 . _:genid270 . . . _:genid273 . . _:genid275 _:genid274 . _:genid273 _:genid275 . _:genid274 . _:genid274 . _:genid274 . _:genid275 . _:genid273 . . . _:genid276 . _:genid276 . _:genid277 . _:genid278 . . _:genid279 . _:genid278 _:genid279 . . _:genid279 . _:genid277 _:genid278 . _:genid276 _:genid277 . _:genid276 . . _:genid280 . . _:genid282 _:genid281 . _:genid280 _:genid282 . _:genid281 . _:genid281 . _:genid281 . _:genid282 . _:genid280 . . _:genid283 . . _:genid284 . _:genid283 _:genid284 . . _:genid284 . _:genid283 . . _:genid285 . _:genid285 . _:genid285 . _:genid285 . _:genid286 . _:genid286 . _:genid286 . _:genid286 . _:genid287 . _:genid287 . _:genid288 . _:genid289 . . _:genid290 . _:genid289 _:genid290 . . _:genid290 . _:genid288 _:genid289 . _:genid287 _:genid288 . _:genid287 . _:genid291 . . _:genid293 _:genid292 . _:genid291 _:genid293 . _:genid292 . _:genid292 . _:genid292 . _:genid293 . _:genid291 . . _:genid294 . . _:genid295 . _:genid294 _:genid295 . . _:genid295 . _:genid294 . . . _:genid296 . _:genid296 . _:genid297 . _:genid298 . . _:genid299 . _:genid298 _:genid299 . . _:genid299 . _:genid297 _:genid298 . _:genid296 _:genid297 . _:genid296 . . _:genid300 . _:genid300 . _:genid300 . _:genid300 . _:genid301 . . _:genid303 _:genid302 . _:genid301 _:genid303 . _:genid302 . _:genid302 . _:genid302 . _:genid303 . _:genid301 . . . _:genid304 . _:genid304 . _:genid304 . _:genid304 . _:genid305 . _:genid305 . _:genid305 . _:genid305 . _:genid306 . _:genid306 . _:genid306 . _:genid306 . _:genid307 . _:genid307 . _:genid307 . _:genid307 . _:genid308 . _:genid308 . _:genid308 . _:genid308 . _:genid309 . _:genid309 . _:genid310 . _:genid311 . . _:genid312 . _:genid311 _:genid312 . . _:genid312 . _:genid310 _:genid311 . _:genid309 _:genid310 . _:genid309 . . _:genid313 . _:genid313 . _:genid313 . _:genid313 . _:genid314 . _:genid314 . _:genid314 . _:genid314 . _:genid315 . _:genid315 . _:genid316 . _:genid317 . . _:genid318 . _:genid317 _:genid318 . . _:genid318 . _:genid316 _:genid317 . _:genid315 _:genid316 . _:genid315 . _:genid319 . _:genid319 . _:genid320 . _:genid321 . . _:genid322 . _:genid321 _:genid322 . . _:genid322 . _:genid320 _:genid321 . _:genid319 _:genid320 . _:genid319 . _:genid323 . . _:genid325 _:genid324 . _:genid323 _:genid325 . _:genid324 . _:genid324 . _:genid324 . _:genid327 _:genid326 . _:genid325 _:genid327 . _:genid326 . _:genid326 . _:genid326 "1"^^ . _:genid327 . _:genid323 . . _:genid328 . _:genid328 . _:genid328 . _:genid328 . _:genid329 . _:genid329 . _:genid330 . _:genid331 . . _:genid332 . _:genid331 _:genid332 . . _:genid332 . _:genid330 _:genid331 . _:genid329 _:genid330 . _:genid329 . _:genid333 . _:genid333 . _:genid334 . _:genid335 . . _:genid336 . _:genid335 _:genid336 . . _:genid336 . _:genid334 _:genid335 . _:genid333 _:genid334 . _:genid333 . _:genid337 . . _:genid339 _:genid338 . _:genid337 _:genid339 . _:genid338 . _:genid338 . _:genid338 . _:genid341 _:genid340 . _:genid339 _:genid341 . _:genid340 . _:genid340 . _:genid340 "1"^^ . _:genid341 . _:genid337 . . . . . . _:genid342 . . _:genid344 _:genid343 . _:genid342 _:genid344 . _:genid343 . _:genid343 . _:genid343 . _:genid344 . _:genid342 . . _:genid345 . . _:genid347 _:genid346 . _:genid345 _:genid347 . _:genid346 . _:genid346 . _:genid346 . _:genid347 . _:genid345 . . _:genid348 . _:genid348 . _:genid348 . _:genid348 . _:genid349 . _:genid349 . _:genid349 . _:genid349 . _:genid350 . _:genid350 . _:genid351 . _:genid352 . . _:genid353 . _:genid352 _:genid353 . . _:genid353 . _:genid351 _:genid352 . _:genid350 _:genid351 . _:genid350 . _:genid354 . _:genid354 . _:genid355 . _:genid356 . . _:genid357 . _:genid356 _:genid357 . . _:genid357 . _:genid355 _:genid356 . _:genid354 _:genid355 . _:genid354 . _:genid358 . . _:genid360 _:genid359 . _:genid358 _:genid360 . _:genid359 . _:genid359 . _:genid359 . _:genid362 _:genid361 . _:genid360 _:genid362 . _:genid361 . _:genid361 . _:genid361 "1"^^ . _:genid362 . _:genid358 . . _:genid363 . _:genid363 . _:genid363 . _:genid363 . _:genid364 . _:genid364 . _:genid364 . _:genid364 . _:genid365 . _:genid365 . _:genid365 . _:genid365 . _:genid366 . _:genid366 . _:genid366 . _:genid366 . _:genid367 . . _:genid369 _:genid368 . _:genid367 _:genid369 . _:genid368 . _:genid368 . _:genid368 . _:genid371 _:genid370 . _:genid369 _:genid371 . _:genid370 . _:genid370 . _:genid370 "1"^^ . _:genid371 . _:genid367 . . _:genid372 . . _:genid374 _:genid373 . _:genid372 _:genid374 . _:genid373 . _:genid373 . _:genid373 . _:genid374 . _:genid372 . _:genid375 . _:genid375 . _:genid375 . _:genid375 . . . . . . _:genid376 . . _:genid378 _:genid377 . _:genid376 _:genid378 . _:genid377 . _:genid377 . _:genid377 . _:genid378 . _:genid376 . . _:genid379 . _:genid379 . _:genid379 . _:genid379 . _:genid380 . _:genid380 . _:genid380 . _:genid380 . _:genid381 . _:genid381 . _:genid381 . _:genid381 . _:genid382 . _:genid382 . _:genid382 . _:genid382 . _:genid383 . _:genid383 . _:genid383 . _:genid383 . _:genid384 . _:genid384 . _:genid384 "1"^^ . _:genid384 . _:genid385 . . _:genid387 _:genid386 . _:genid385 _:genid387 . _:genid386 . _:genid386 . _:genid386 . _:genid387 . _:genid385 . . . _:genid388 . _:genid388 . _:genid388 . _:genid388 . _:genid389 . _:genid389 . _:genid389 . _:genid389 . _:genid390 . _:genid390 . _:genid390 . _:genid390 . _:genid391 . _:genid391 . _:genid391 . _:genid391 . _:genid392 . . _:genid394 _:genid393 . _:genid392 _:genid394 . _:genid393 . _:genid393 . _:genid393 . _:genid394 . _:genid392 . . _:genid395 . . _:genid397 _:genid396 . _:genid395 _:genid397 . _:genid396 . _:genid396 . _:genid396 . _:genid397 . _:genid395 . . _:genid398 . . _:genid400 _:genid399 . _:genid398 _:genid400 . _:genid399 . _:genid399 . _:genid399 . _:genid400 . _:genid398 . . . . . . . . . . . . . . . . _:genid401 . _:genid402 . . _:genid403 . _:genid402 _:genid403 . . _:genid404 . _:genid403 _:genid404 . . _:genid404 . _:genid401 _:genid402 . _:genid405 . _:genid406 . . _:genid407 . _:genid406 _:genid407 . . _:genid408 . _:genid407 _:genid408 . . _:genid408 . _:genid405 _:genid406 . _:genid409 . _:genid410 . . _:genid411 . _:genid410 _:genid411 . . _:genid412 . _:genid411 _:genid412 . . _:genid412 . _:genid409 _:genid410 . _:genid413 . _:genid414 . . _:genid415 . _:genid414 _:genid415 . . _:genid416 . _:genid415 _:genid416 . . _:genid416 . _:genid413 _:genid414 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _:genid417 . _:genid418 . . _:genid419 . _:genid418 _:genid419 . . _:genid420 . _:genid419 _:genid420 . . _:genid421 . _:genid420 _:genid421 . . _:genid422 . _:genid421 _:genid422 . . _:genid423 . _:genid422 _:genid423 . . _:genid424 . _:genid423 _:genid424 . . _:genid425 . _:genid424 _:genid425 . . _:genid426 . _:genid425 _:genid426 . . _:genid427 . _:genid426 _:genid427 . . _:genid428 . _:genid427 _:genid428 . . _:genid429 . _:genid428 _:genid429 . . _:genid430 . _:genid429 _:genid430 . . _:genid431 . _:genid430 _:genid431 . . _:genid432 . _:genid431 _:genid432 . . _:genid433 . _:genid432 _:genid433 . . _:genid434 . _:genid433 _:genid434 . . _:genid435 . _:genid434 _:genid435 . . _:genid436 . _:genid435 _:genid436 . . _:genid437 . _:genid436 _:genid437 . . _:genid438 . _:genid437 _:genid438 . . _:genid439 . _:genid438 _:genid439 . . _:genid440 . _:genid439 _:genid440 . . _:genid441 . _:genid440 _:genid441 . . _:genid442 . _:genid441 _:genid442 . . _:genid443 . _:genid442 _:genid443 . . _:genid444 . _:genid443 _:genid444 . . _:genid445 . _:genid444 _:genid445 . . _:genid446 . _:genid445 _:genid446 . . _:genid447 . _:genid446 _:genid447 . . _:genid448 . _:genid447 _:genid448 . . _:genid449 . _:genid448 _:genid449 . . _:genid450 . _:genid449 _:genid450 . . _:genid451 . _:genid450 _:genid451 . . _:genid452 . _:genid451 _:genid452 . . _:genid453 . _:genid452 _:genid453 . . _:genid454 . _:genid453 _:genid454 . . _:genid455 . _:genid454 _:genid455 . . _:genid456 . _:genid455 _:genid456 . . _:genid457 . _:genid456 _:genid457 . . _:genid458 . _:genid457 _:genid458 . . _:genid458 . _:genid417 _:genid418 . raptor2-2.0.15/tests/rdfxml/ex-44.out0000644000175000017500000000127211113423026014134 00000000000000 . _:genid1 "val2" . _:genid2 . _:genid2 . _:genid2 _:genid1 . _:genid2 . _:genid2 "val2" . _:genid1 . raptor2-2.0.15/tests/rdfxml/ex-44.rdf0000644000175000017500000000060611113423026014100 00000000000000 raptor2-2.0.15/tests/rdfa11/0000755000175000017500000000000012425347074012421 500000000000000raptor2-2.0.15/tests/rdfa11/0074.out0000644000175000017500000000014411765455733013473 00000000000000 . raptor2-2.0.15/tests/rdfa11/0172.xml0000644000175000017500000000077311765455733013473 00000000000000 Test 0172

A plain literal with a lang tag.

raptor2-2.0.15/tests/rdfa11/0079.xml0000644000175000017500000000106211765455733013471 00000000000000 Test 0079

Ivan Herman

Tim Berners Lee

Dan Brickley

raptor2-2.0.15/tests/rdfa11/0121.out0000644000175000017500000000025011765455733013462 00000000000000 "Test Case 0121" . "Shane McCarron" . raptor2-2.0.15/tests/rdfa11/0224.out0000644000175000017500000000106311765455733013471 00000000000000 _:bnodeid2 . _:bnodeid1 . _:bnodeid1 . _:bnodeid2 . _:bnodeid2 _:bnodeid1 . raptor2-2.0.15/tests/rdfa11/0176.out0000644000175000017500000000040311765455733013474 00000000000000_:manu . _:manu _:gregg . _:gregg _:manu . _:gregg . raptor2-2.0.15/tests/rdfa11/0179.xml0000644000175000017500000000066311765455733013500 00000000000000 Test 0179

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0239.out0000644000175000017500000000013411765455733013475 00000000000000_:s . raptor2-2.0.15/tests/rdfa11/0001.out0000644000175000017500000000017611765455732013465 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0271.xml0000644000175000017500000000040411765455733013462 00000000000000 Test 0269

raptor2-2.0.15/tests/rdfa11/0075.out0000644000175000017500000000017211765455733013475 00000000000000 . raptor2-2.0.15/tests/rdfa11/0176.xml0000644000175000017500000000133411765455733013471 00000000000000 Test 0176
Manu can be reached via email. He knows Gregg. Who knows Manu.
Gregg can be reached via email.
raptor2-2.0.15/tests/rdfa11/0049.xml0000644000175000017500000000051511765455733013470 00000000000000 Test 0049

John Doe

raptor2-2.0.15/tests/rdfa11/0039.xml0000644000175000017500000000072011765455733013465 00000000000000 Test 0039
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0027.out0000644000175000017500000000014011765455733013465 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0225.xml0000644000175000017500000000047111765455733013465 00000000000000 Test 0225

Foo

Bar

raptor2-2.0.15/tests/rdfa11/0276.xml0000644000175000017500000000032111765455733013465 00000000000000 Test 0275 raptor2-2.0.15/tests/rdfa11/0104.out0000644000175000017500000000034511765455733013470 00000000000000 _:a . _:a "17" . _:a "character" . raptor2-2.0.15/tests/rdfa11/0181.out0000644000175000017500000000022711765455733013474 00000000000000 . raptor2-2.0.15/tests/rdfa11/0253.out0000644000175000017500000000030511765455733013471 00000000000000 "\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03CC\n\u03AC\u03C3\u03C0\u03C1\u03BF \u03B4\u03B9\u03AC\u03C3\u03C4\u03B7\u03BC\u03B1\n"@el . raptor2-2.0.15/tests/rdfa11/0261.xml0000644000175000017500000000057211765455733013467 00000000000000 Test 0261

This is an XMLLiteral

raptor2-2.0.15/tests/rdfa11/0286.out0000644000175000017500000000021511765455733013477 00000000000000 "veni, vidi, vici"@lat . raptor2-2.0.15/tests/rdfa11/0268.out0000644000175000017500000000041511765455733013501 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0182.out0000644000175000017500000000030311765455733013470 00000000000000 . "A particular agent" . raptor2-2.0.15/tests/rdfa11/0091.xml0000644000175000017500000000077711765455733013477 00000000000000 Test 0091

A human is a bi-pedal primate. They are quite possibly one of the most confused animals residing in the Milky Way.

raptor2-2.0.15/tests/rdfa11/0014.xml0000644000175000017500000000056711765455732013466 00000000000000 Test 0014

ten

raptor2-2.0.15/tests/rdfa11/0111.out0000644000175000017500000000024511765455733013465 00000000000000 _:a . _:a _:b . raptor2-2.0.15/tests/rdfa11/0198.xml0000644000175000017500000000101711765455733013473 00000000000000 Test 0198

Mark Birbeck

raptor2-2.0.15/tests/rdfa11/0065.out0000644000175000017500000000031111765455733013467 00000000000000_:a . _:b . _:a _:b . raptor2-2.0.15/tests/rdfa11/0259.out0000644000175000017500000000643311765455733013507 00000000000000 "GRDDL" . "MA" . "OWL" . "RDF" . "RDFa" . "RDFS" . "RIF" . "SKOS" . "SKOS-XL" . "WDR" . "VOID" . "WDRS" . "XHV" . "XML" . "XSD" . "CC" . "CTAG" . "DC" . "DCTERMS" . "FOAF" . "GR" . "ICAL" . "OG" . "REV" . "SIOC" . "V" . "VCARD" . "Schema" . "DescribedBy" . "License" . "Role" . raptor2-2.0.15/tests/rdfa11/0248.out0000644000175000017500000000063311765455733013501 00000000000000_:a . _:a . _:a "Ivan Herman" . _:b . _:b . _:b "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0237.xml0000644000175000017500000000043211765455733013465 00000000000000 Test 0237 Malformed Prefix raptor2-2.0.15/tests/rdfa11/0229.out0000644000175000017500000000021311765455733013472 00000000000000 . raptor2-2.0.15/tests/rdfa11/0203.out0000644000175000017500000000015011765455733013462 00000000000000 "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa11/0099.out0000644000175000017500000000115711765455733013507 00000000000000 "\n We put thirty spokes together and call it a wheel;\n But it is on the space where there is nothing that the usefulness of the wheel depends.\n We turn clay to make a vessel;\n But it is on the space where there is nothing that the usefulness of the vessel depends.\n We pierce doors and windows to make a house;\n And it is on these spaces where there is nothing that the usefulness of the house depends.\n Therefore just as we take advantage of what is, we should recognize the usefulness of what is not.\n\n Lao Tzu: Tao Te Ching" . raptor2-2.0.15/tests/rdfa11/0238.xml0000644000175000017500000000031611765455733013467 00000000000000 Test 0238 Undefined Term raptor2-2.0.15/tests/rdfa11/0273.xml0000644000175000017500000000034511765455733013470 00000000000000 Test 0273 raptor2-2.0.15/tests/rdfa11/0175.xml0000644000175000017500000000044011765455733013465 00000000000000 Test 0175

My name is Gregg Kellogg.

raptor2-2.0.15/tests/rdfa11/0033.out0000644000175000017500000000024411765455733013467 00000000000000 _:a . _:a "Ben Adida" . raptor2-2.0.15/tests/rdfa11/0196.out0000644000175000017500000000034311765455733013501 00000000000000 "This is an XMLLiteral"^^ . "This is a plain literal" . raptor2-2.0.15/tests/rdfa11/0112.out0000644000175000017500000000015411765455733013465 00000000000000 "not an XML Literal,\nwhitespace preserved\n" . raptor2-2.0.15/tests/rdfa11/0061.out0000644000175000017500000000025611765455733013473 00000000000000 . raptor2-2.0.15/tests/rdfa11/0025.xml0000644000175000017500000000063211765455733013462 00000000000000 Test 0025

This paper was written by Ben Adida.

raptor2-2.0.15/tests/rdfa11/0274.out0000644000175000017500000000027211765455733013477 00000000000000 "2012-03-18T00:00:00Z"^^ . raptor2-2.0.15/tests/rdfa11/0066.xml0000644000175000017500000000042111765455733013463 00000000000000 Test 0066

This is test #66.

raptor2-2.0.15/tests/rdfa11/0006.out0000644000175000017500000000044611765455732013472 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0010.out0000644000175000017500000000033011765455732013455 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0302.out0000644000175000017500000000121411765455733013464 00000000000000 . . . . "St\u00E9phane Corlosquet" . . raptor2-2.0.15/tests/rdfa11/0119.xml0000644000175000017500000000070311765455733013465 00000000000000 Test 0119

The Example Website is used in many W3C tutorials.

raptor2-2.0.15/tests/rdfa11/0062.out0000644000175000017500000000025611765455733013474 00000000000000 . raptor2-2.0.15/tests/rdfa11/0247.out0000644000175000017500000000070511765455733013500 00000000000000 _:bnodeid1 . _:bnodeid1 "Ivan Herman" . _:bnodeid1 . _:bnodeid2 . _:bnodeid2 . _:bnodeid2 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0178.xml0000644000175000017500000000061111765455733013470 00000000000000 Test 0178

A particular agent

raptor2-2.0.15/tests/rdfa11/0111.xml0000644000175000017500000000051011765455733013451 00000000000000 Test 0111
raptor2-2.0.15/tests/rdfa11/0041.out0000644000175000017500000000015211765455733013464 00000000000000 . raptor2-2.0.15/tests/rdfa11/0303.xml0000644000175000017500000000072511765455733013464 00000000000000 Test 0303: @rel/@rev terms removed if @property exists raptor2-2.0.15/tests/rdfa11/0207.out0000644000175000017500000000166411765455733013501 00000000000000 . "Weekend off in Iona" . "2006-10-21"^^ . "2006-10-23"^^ . . "Iona, UK" . raptor2-2.0.15/tests/rdfa11/0261.out0000644000175000017500000000021511765455733013470 00000000000000 "This is\nan XMLLiteral"^^ . raptor2-2.0.15/tests/rdfa11/0256.xml0000644000175000017500000000051111765455733013464 00000000000000 Test 0256

raptor2-2.0.15/tests/rdfa11/0246.out0000644000175000017500000000065511765455733013503 00000000000000 _:a . _:b . _:a . _:a "Mark Birbeck" . _:b . _:b "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/Makefile.am0000644000175000017500000002306612416654151014401 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDFa 1.1 tests # # Copyright (C) 2012, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # BASE_URI=http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/ # # Manifest: # https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl # defines whether sparql ASK should return true or false for success # # Query to return all RDFA 1.1 test URIs: # # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select ?t where {?t "rdfa1.1"}' # # Query to return RDFa 1.1 tests that must return False: # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select * where {?s false; "rdfa1.1"}' # # http://rdfa.info/test-suite/test-cases/0107 # http://rdfa.info/test-suite/test-cases/0122 # http://rdfa.info/test-suite/test-cases/0140 # http://rdfa.info/test-suite/test-cases/0235 # http://rdfa.info/test-suite/test-cases/0258 # # http://rdfa.info/test-suite/test-cases/0180 MUST not return given triple; expected to return 1 triple # # These all expect 0 ntriples - failure is >0 triples or ERROR CLEANFILES= \ CMakeTests.txt \ *-res.nt TEST_FILES= \ 0001.xml 0006.xml 0007.xml 0008.xml 0009.xml 0010.xml 0012.xml \ 0013.xml 0014.xml 0015.xml 0017.xml 0018.xml 0019.xml 0020.xml \ 0021.xml 0023.xml 0025.xml 0026.xml 0027.xml 0029.xml 0030.xml \ 0031.xml 0032.xml 0033.xml 0034.xml 0035.xml 0036.xml 0037.xml \ 0038.xml 0039.xml 0041.xml 0048.xml 0049.xml 0050.xml 0051.xml \ 0052.xml 0053.xml 0054.xml 0055.xml 0056.xml 0057.xml 0059.xml \ 0060.xml 0061.xml 0062.xml 0063.xml 0064.xml 0065.xml 0066.xml \ 0067.xml 0068.xml 0069.xml 0070.xml 0071.xml 0072.xml 0073.xml \ 0074.xml 0075.xml 0076.xml 0077.xml 0079.xml 0080.xml 0083.xml \ 0084.xml 0085.xml 0087.xml 0088.xml 0089.xml 0091.xml 0093.xml \ 0099.xml 0104.xml 0106.xml 0107.xml 0108.xml 0109.xml 0110.xml \ 0111.xml 0112.xml 0113.xml 0114.xml 0115.xml 0117.xml 0118.xml \ 0119.xml 0120.xml 0121.xml 0122.xml 0126.xml 0131.xml 0134.xml \ 0140.xml 0147.xml 0172.xml 0173.xml 0174.xml 0175.xml 0176.xml \ 0177.xml 0178.xml 0179.xml 0180.xml 0181.xml 0182.xml 0183.xml \ 0186.xml 0187.xml 0188.xml 0189.xml 0190.xml 0196.xml 0197.xml \ 0198.xml 0201.xml 0202.xml 0203.xml 0206.xml 0207.xml 0213.xml \ 0214.xml 0216.xml 0217.xml 0218.xml 0219.xml 0220.xml 0221.xml \ 0222.xml 0223.xml 0224.xml 0225.xml 0226.xml 0227.xml 0228.xml \ 0229.xml 0230.xml 0231.xml 0232.xml 0233.xml 0234.xml 0235.xml \ 0236.xml 0237.xml 0238.xml 0239.xml 0246.xml 0247.xml 0248.xml \ 0249.xml 0250.xml 0251.xml 0252.xml 0253.xml 0254.xml 0255.xml \ 0256.xml 0257.xml 0258.xml 0259.xml 0260.xml 0261.xml 0262.xml \ 0263.xml 0264.xml 0265.xml 0266.xml 0267.xml 0268.xml 0269.xml \ 0269.xml 0271.xml 0272.xml 0273.xml 0274.xml 0275.xml 0276.xml \ 0277.xml 0278.xml 0279.xml 0280.xml 0281.xml 0282.xml 0283.xml \ 0284.xml 0285.xml 0286.xml 0287.xml 0289.xml 0290.xml 0291.xml \ 0292.xml 0293.xml 0295.xml 0296.xml 0297.xml 0298.xml 0299.xml \ 0300.xml 0301.xml 0302.xml 0303.xml 0304.xml TEST_OUT_FILES = \ 0001.out 0006.out 0007.out 0008.out 0009.out 0010.out 0012.out \ 0013.out 0014.out 0015.out 0017.out 0018.out 0019.out 0020.out \ 0021.out 0023.out 0025.out 0026.out 0027.out 0029.out 0030.out \ 0031.out 0032.out 0033.out 0034.out 0035.out 0036.out 0037.out \ 0038.out 0039.out 0041.out 0048.out 0049.out 0050.out 0051.out \ 0052.out 0053.out 0054.out 0055.out 0056.out 0057.out 0059.out \ 0060.out 0061.out 0062.out 0063.out 0064.out 0065.out 0066.out \ 0067.out 0068.out 0069.out 0070.out 0071.out 0072.out 0073.out \ 0074.out 0075.out 0076.out 0077.out 0079.out 0080.out 0083.out \ 0084.out 0085.out 0087.out 0088.out 0089.out 0091.out 0093.out \ 0099.out 0104.out 0106.out 0107.out 0108.out 0109.out 0110.out \ 0111.out 0112.out 0113.out 0114.out 0115.out 0117.out 0118.out \ 0119.out 0120.out 0121.out 0122.out 0126.out 0131.out 0134.out \ 0140.out 0147.out 0172.out 0173.out 0174.out 0175.out 0176.out \ 0177.out 0178.out 0179.out 0180.out 0181.out 0182.out 0183.out \ 0186.out 0187.out 0188.out 0189.out 0190.out 0196.out 0197.out \ 0198.out 0201.out 0202.out 0203.out 0206.out 0207.out 0213.out \ 0214.out 0216.out 0217.out 0218.out 0219.out 0220.out 0221.out \ 0222.out 0223.out 0224.out 0225.out 0226.out 0227.out 0228.out \ 0229.out 0230.out 0231.out 0232.out 0233.out 0234.out 0235.out \ 0236.out 0237.out 0238.out 0239.out 0246.out 0247.out 0248.out \ 0249.out 0250.out 0251.out 0252.out 0253.out 0254.out 0255.out \ 0256.out 0257.out 0258.out 0259.out 0260.out 0261.out 0262.out \ 0263.out 0264.out 0265.out 0266.out 0267.out 0268.out 0269.out \ 0269.out 0271.out 0272.out 0273.out 0274.out 0275.out 0276.out \ 0277.out 0278.out 0279.out 0280.out 0281.out 0282.out 0283.out \ 0284.out 0285.out 0286.out 0287.out 0289.out 0290.out 0291.out \ 0292.out 0293.out 0295.out 0296.out 0297.out 0298.out 0299.out \ 0300.out 0301.out 0302.out 0303.out 0304.out ALL_TEST_FILES= \ $(TEST_FILES) \ $(TEST_OUT_FILES) # Expected test failures (24): # Test Problem Description # ---------------------------- # 0190 librdfa fails term case insensitivity # 0198 raptor XML (HTML) markup differences but same meaning # 0202 librdfa ensure @xml:base in SVG and XHTML5 # 0203 librdfa ensure @, XML+RDFa in non-root elements in SVG and XHTML5 # 0236 librdfa should return triple(?s a ) # 0238 librdfa should return triple(?s a ) # 0237 0239 # librdfa should return triple(?s a ) # 0256 librdfa wrong language code "hu" instead of "fr" # 0272 0273 0274 0275 0276 0277 0278 0279 0280 0281 0282 # librdfa datatype support # 0285 librdfa time element with @datetime an invalid datatype ... # 0286 librdfa fails to let @value override @content in data # 0287 librdfa datatype (@datetime etc.) attribute value # 0304 ??? requires running RDF/XML parse for SVG metadata # # NOTE: Some tests such as 0295 blow up rdfdiff with stack overflow # which is why the 'cmp' is done first. # # (Add a space to the start of this string) EXPECTED_FAILURES=" 0190.xml 0198.xml 0202.xml 0203.xml 0236.xml 0237.xml 0238.xml 0239.xml 0256.xml 0272.xml 0273.xml 0274.xml 0275.xml 0276.xml 0277.xml 0278.xml 0279.xml 0280.xml 0281.xml 0282.xml 0285.xml 0286.xml 0287.xml 0304.xml" EXTRA_DIST = CMakeLists.txt $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) if RAPTOR_PARSER_RDFA check-local: check-rdfa else check-local: endif if MAINTAINER_MODE check_rdfa_deps = $(TEST_FILES) endif check-rdfa: build-rdfdiff build-rapper $(check_rdfa_deps) @set +e; result=0; failures=; failure_count=0; \ $(RECHO) "Testing RDFa 1.1"; \ printf 'IF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .xml` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(RAPPER) -f noNet -q -i rdfa11 -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ if test $$status1 = 2; then \ status1=0; \ fi; \ if cmp $(srcdir)/$$name.out $$name-res.nt >/dev/null 2>&1; then \ status2=0; \ else \ $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(RECHO) $(RAPPER) -f noNet -q -i rdfa11 -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(RECHO) $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ printf '\tRAPPER_RDFDIFF_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t"%s"\n\t)\n\n' \ rdfa11.$$name \ "\$${RAPPER} -f noNet -q -i rdfa11 -I $$baseuri -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$name-res.nt \ "\$${RDFDIFF} -f ntriples -u $$baseuri -t ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out $$name-res.nt" \ >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ if test "X$$failures" != X; then \ echo "$$failure_count tests FAILED: $$failures"; \ if test "$$failures" = $(EXPECTED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ else \ echo "FAILED: Got:"; echo " $$failures"; echo "but expected"; echo " $(EXPECTED_FAILURES)"; \ result=1; \ fi; \ fi; \ set -e; exit $$result raptor2-2.0.15/tests/rdfa11/0073.xml0000644000175000017500000000060611765455733013466 00000000000000 Test 0073

This article was written by Jane.

raptor2-2.0.15/tests/rdfa11/0048.out0000644000175000017500000000035311765455733013476 00000000000000 . _:a . _:a "John Doe" . raptor2-2.0.15/tests/rdfa11/0134.out0000644000175000017500000000024112416654151013453 00000000000000 . raptor2-2.0.15/tests/rdfa11/0227.out0000644000175000017500000000141011765455733013470 00000000000000 _:bnodeid1 . _:bnodeid1 "Foo" . _:bnodeid1 . . _:bnodeid2 . _:bnodeid2 "Bar" . _:bnodeid2 . raptor2-2.0.15/tests/rdfa11/0201.xml0000644000175000017500000000104411765455733013454 00000000000000 A yellow rectangle with sharp corners. raptor2-2.0.15/tests/rdfa11/0247.xml0000644000175000017500000000075611765455733013477 00000000000000 Test 0247

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor2-2.0.15/tests/rdfa11/0034.xml0000644000175000017500000000060211765455733013457 00000000000000 Test 0034
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0216.out0000644000175000017500000000012411765455733013467 00000000000000 "Iv\u00E1n" . raptor2-2.0.15/tests/rdfa11/0277.out0000644000175000017500000000027211765455733013502 00000000000000 "2012-03-18T00:00:00Z"^^ . raptor2-2.0.15/tests/rdfa11/Makefile.in0000644000175000017500000005260112425344566014415 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDFa 1.1 tests # # Copyright (C) 2012, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/rdfa11 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BASE_URI = http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/ # # Manifest: # https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl # defines whether sparql ASK should return true or false for success # # Query to return all RDFA 1.1 test URIs: # # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select ?t where {?t "rdfa1.1"}' # # Query to return RDFa 1.1 tests that must return False: # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select * where {?s false; "rdfa1.1"}' # # http://rdfa.info/test-suite/test-cases/0107 # http://rdfa.info/test-suite/test-cases/0122 # http://rdfa.info/test-suite/test-cases/0140 # http://rdfa.info/test-suite/test-cases/0235 # http://rdfa.info/test-suite/test-cases/0258 # # http://rdfa.info/test-suite/test-cases/0180 MUST not return given triple; expected to return 1 triple # # These all expect 0 ntriples - failure is >0 triples or ERROR CLEANFILES = \ CMakeTests.txt \ *-res.nt TEST_FILES = \ 0001.xml 0006.xml 0007.xml 0008.xml 0009.xml 0010.xml 0012.xml \ 0013.xml 0014.xml 0015.xml 0017.xml 0018.xml 0019.xml 0020.xml \ 0021.xml 0023.xml 0025.xml 0026.xml 0027.xml 0029.xml 0030.xml \ 0031.xml 0032.xml 0033.xml 0034.xml 0035.xml 0036.xml 0037.xml \ 0038.xml 0039.xml 0041.xml 0048.xml 0049.xml 0050.xml 0051.xml \ 0052.xml 0053.xml 0054.xml 0055.xml 0056.xml 0057.xml 0059.xml \ 0060.xml 0061.xml 0062.xml 0063.xml 0064.xml 0065.xml 0066.xml \ 0067.xml 0068.xml 0069.xml 0070.xml 0071.xml 0072.xml 0073.xml \ 0074.xml 0075.xml 0076.xml 0077.xml 0079.xml 0080.xml 0083.xml \ 0084.xml 0085.xml 0087.xml 0088.xml 0089.xml 0091.xml 0093.xml \ 0099.xml 0104.xml 0106.xml 0107.xml 0108.xml 0109.xml 0110.xml \ 0111.xml 0112.xml 0113.xml 0114.xml 0115.xml 0117.xml 0118.xml \ 0119.xml 0120.xml 0121.xml 0122.xml 0126.xml 0131.xml 0134.xml \ 0140.xml 0147.xml 0172.xml 0173.xml 0174.xml 0175.xml 0176.xml \ 0177.xml 0178.xml 0179.xml 0180.xml 0181.xml 0182.xml 0183.xml \ 0186.xml 0187.xml 0188.xml 0189.xml 0190.xml 0196.xml 0197.xml \ 0198.xml 0201.xml 0202.xml 0203.xml 0206.xml 0207.xml 0213.xml \ 0214.xml 0216.xml 0217.xml 0218.xml 0219.xml 0220.xml 0221.xml \ 0222.xml 0223.xml 0224.xml 0225.xml 0226.xml 0227.xml 0228.xml \ 0229.xml 0230.xml 0231.xml 0232.xml 0233.xml 0234.xml 0235.xml \ 0236.xml 0237.xml 0238.xml 0239.xml 0246.xml 0247.xml 0248.xml \ 0249.xml 0250.xml 0251.xml 0252.xml 0253.xml 0254.xml 0255.xml \ 0256.xml 0257.xml 0258.xml 0259.xml 0260.xml 0261.xml 0262.xml \ 0263.xml 0264.xml 0265.xml 0266.xml 0267.xml 0268.xml 0269.xml \ 0269.xml 0271.xml 0272.xml 0273.xml 0274.xml 0275.xml 0276.xml \ 0277.xml 0278.xml 0279.xml 0280.xml 0281.xml 0282.xml 0283.xml \ 0284.xml 0285.xml 0286.xml 0287.xml 0289.xml 0290.xml 0291.xml \ 0292.xml 0293.xml 0295.xml 0296.xml 0297.xml 0298.xml 0299.xml \ 0300.xml 0301.xml 0302.xml 0303.xml 0304.xml TEST_OUT_FILES = \ 0001.out 0006.out 0007.out 0008.out 0009.out 0010.out 0012.out \ 0013.out 0014.out 0015.out 0017.out 0018.out 0019.out 0020.out \ 0021.out 0023.out 0025.out 0026.out 0027.out 0029.out 0030.out \ 0031.out 0032.out 0033.out 0034.out 0035.out 0036.out 0037.out \ 0038.out 0039.out 0041.out 0048.out 0049.out 0050.out 0051.out \ 0052.out 0053.out 0054.out 0055.out 0056.out 0057.out 0059.out \ 0060.out 0061.out 0062.out 0063.out 0064.out 0065.out 0066.out \ 0067.out 0068.out 0069.out 0070.out 0071.out 0072.out 0073.out \ 0074.out 0075.out 0076.out 0077.out 0079.out 0080.out 0083.out \ 0084.out 0085.out 0087.out 0088.out 0089.out 0091.out 0093.out \ 0099.out 0104.out 0106.out 0107.out 0108.out 0109.out 0110.out \ 0111.out 0112.out 0113.out 0114.out 0115.out 0117.out 0118.out \ 0119.out 0120.out 0121.out 0122.out 0126.out 0131.out 0134.out \ 0140.out 0147.out 0172.out 0173.out 0174.out 0175.out 0176.out \ 0177.out 0178.out 0179.out 0180.out 0181.out 0182.out 0183.out \ 0186.out 0187.out 0188.out 0189.out 0190.out 0196.out 0197.out \ 0198.out 0201.out 0202.out 0203.out 0206.out 0207.out 0213.out \ 0214.out 0216.out 0217.out 0218.out 0219.out 0220.out 0221.out \ 0222.out 0223.out 0224.out 0225.out 0226.out 0227.out 0228.out \ 0229.out 0230.out 0231.out 0232.out 0233.out 0234.out 0235.out \ 0236.out 0237.out 0238.out 0239.out 0246.out 0247.out 0248.out \ 0249.out 0250.out 0251.out 0252.out 0253.out 0254.out 0255.out \ 0256.out 0257.out 0258.out 0259.out 0260.out 0261.out 0262.out \ 0263.out 0264.out 0265.out 0266.out 0267.out 0268.out 0269.out \ 0269.out 0271.out 0272.out 0273.out 0274.out 0275.out 0276.out \ 0277.out 0278.out 0279.out 0280.out 0281.out 0282.out 0283.out \ 0284.out 0285.out 0286.out 0287.out 0289.out 0290.out 0291.out \ 0292.out 0293.out 0295.out 0296.out 0297.out 0298.out 0299.out \ 0300.out 0301.out 0302.out 0303.out 0304.out ALL_TEST_FILES = \ $(TEST_FILES) \ $(TEST_OUT_FILES) # Expected test failures (24): # Test Problem Description # ---------------------------- # 0190 librdfa fails term case insensitivity # 0198 raptor XML (HTML) markup differences but same meaning # 0202 librdfa ensure @xml:base in SVG and XHTML5 # 0203 librdfa ensure @, XML+RDFa in non-root elements in SVG and XHTML5 # 0236 librdfa should return triple(?s a ) # 0238 librdfa should return triple(?s a ) # 0237 0239 # librdfa should return triple(?s a ) # 0256 librdfa wrong language code "hu" instead of "fr" # 0272 0273 0274 0275 0276 0277 0278 0279 0280 0281 0282 # librdfa datatype support # 0285 librdfa time element with @datetime an invalid datatype ... # 0286 librdfa fails to let @value override @content in data # 0287 librdfa datatype (@datetime etc.) attribute value # 0304 ??? requires running RDF/XML parse for SVG metadata # # NOTE: Some tests such as 0295 blow up rdfdiff with stack overflow # which is why the 'cmp' is done first. # # (Add a space to the start of this string) EXPECTED_FAILURES = " 0190.xml 0198.xml 0202.xml 0203.xml 0236.xml 0237.xml 0238.xml 0239.xml 0256.xml 0272.xml 0273.xml 0274.xml 0275.xml 0276.xml 0277.xml 0278.xml 0279.xml 0280.xml 0281.xml 0282.xml 0285.xml 0286.xml 0287.xml 0304.xml" EXTRA_DIST = CMakeLists.txt $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff @MAINTAINER_MODE_TRUE@check_rdfa_deps = $(TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/rdfa11/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/rdfa11/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) @RAPTOR_PARSER_RDFA_TRUE@check-local: check-rdfa @RAPTOR_PARSER_RDFA_FALSE@check-local: check-rdfa: build-rdfdiff build-rapper $(check_rdfa_deps) @set +e; result=0; failures=; failure_count=0; \ $(RECHO) "Testing RDFa 1.1"; \ printf 'IF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .xml` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(RAPPER) -f noNet -q -i rdfa11 -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ if test $$status1 = 2; then \ status1=0; \ fi; \ if cmp $(srcdir)/$$name.out $$name-res.nt >/dev/null 2>&1; then \ status2=0; \ else \ $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ fi; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(RECHO) $(RAPPER) -f noNet -q -i rdfa11 -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(RECHO) $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ printf '\tRAPPER_RDFDIFF_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t"%s"\n\t)\n\n' \ rdfa11.$$name \ "\$${RAPPER} -f noNet -q -i rdfa11 -I $$baseuri -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$name-res.nt \ "\$${RDFDIFF} -f ntriples -u $$baseuri -t ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out $$name-res.nt" \ >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ if test "X$$failures" != X; then \ echo "$$failure_count tests FAILED: $$failures"; \ if test "$$failures" = $(EXPECTED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ else \ echo "FAILED: Got:"; echo " $$failures"; echo "but expected"; echo " $(EXPECTED_FAILURES)"; \ result=1; \ fi; \ fi; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/rdfa11/0093.xml0000644000175000017500000000076511765455733013476 00000000000000 Test 0093
Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

raptor2-2.0.15/tests/rdfa11/0218.xml0000644000175000017500000000034111765455733013463 00000000000000 Test 0218

raptor2-2.0.15/tests/rdfa11/0268.xml0000644000175000017500000000052211765455733013471 00000000000000 Test 0268
raptor2-2.0.15/tests/rdfa11/0027.xml0000644000175000017500000000055011765455733013463 00000000000000 Test 0027

Mark B.

raptor2-2.0.15/tests/rdfa11/0110.xml0000644000175000017500000000044211765455733013454 00000000000000 Test 0110
raptor2-2.0.15/tests/rdfa11/0073.out0000644000175000017500000000014411765455733013472 00000000000000 . raptor2-2.0.15/tests/rdfa11/0289.out0000644000175000017500000000012311765455733013500 00000000000000 "value" . raptor2-2.0.15/tests/rdfa11/0227.xml0000644000175000017500000000056411765455733013472 00000000000000 Test 0227

Foo

Bar

raptor2-2.0.15/tests/rdfa11/0108.xml0000644000175000017500000000053411765455733013465 00000000000000 Test 0108

ελληνικό άσπρο διάστημα

raptor2-2.0.15/tests/rdfa11/0134.xml0000644000175000017500000000033211765455733013460 00000000000000 Test raptor2-2.0.15/tests/rdfa11/0287.out0000644000175000017500000000027711765455733013510 00000000000000 "2012-03-18T00:00:00-08:00"^^ . raptor2-2.0.15/tests/rdfa11/0278.xml0000644000175000017500000000037611765455733013501 00000000000000 Test 0278 raptor2-2.0.15/tests/rdfa11/0255.xml0000644000175000017500000000047411765455733013473 00000000000000 Test 0255

Just a plain literal.

raptor2-2.0.15/tests/rdfa11/0120.xml0000644000175000017500000000066011765455733013457 00000000000000 Test 0120

The The XHTML Vocabulary Document is the default prefix for XHTML+RDFa 1.0.

raptor2-2.0.15/tests/rdfa11/0179.out0000644000175000017500000000011211765455733013474 00000000000000 "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0226.xml0000644000175000017500000000056711765455733013474 00000000000000 Test 0226

Foo

Bar

raptor2-2.0.15/tests/rdfa11/0301.out0000644000175000017500000000061411765455733013466 00000000000000 . _:bnode0 . _:bnode0 "Fizzbit" . _:bnode0 . raptor2-2.0.15/tests/rdfa11/0083.xml0000644000175000017500000000100411765455733013460 00000000000000 Test 0083

Ivan Herman

mailto:ivan@w3.org

Dan Brickley

raptor2-2.0.15/tests/rdfa11/0080.out0000644000175000017500000000015311765455733013470 00000000000000 . raptor2-2.0.15/tests/rdfa11/0295.out0000644000175000017500000017064712416654151013505 00000000000000 "Mark Birbeck" . . . . . "Portrait of Mark" . . "10"^^ . _:a "Manu Sporny" . _:a _:b . _:b "Ralph Swick" . . . "Mark Birbeck" . "Mark Birbeck" . "Mark Birbeck" . . "Ben Adida" . "Mark Birbeck" . "Mark Birbeck" . "Mark Birbeck"^^ . . . . _:bnode0 "Ben Adida" . _:bnode0 . . . . . . . . . . _:bnode3 . _:bnode3 . _:bnode3 "John Doe" . . . "John Doe" . . _:bnode4 "John Doe" . _:bnode4 . . "John Doe" . _:bnode5 . _:bnode5 "John Doe" . . "John Doe" . . . "John Doe" . "Fabien Gandon" . "Fabien Gandon" . . . . "Mark Birbeck" . . "Mark Birbeck" . . "Ivan Herman" . . _:bnode9 . _:bnode8 _:bnode9 . _:bnode8 . _:bnode10 . _:bnode8 _:bnode10 . _:bnode8 . "Manu Sporny" . . . "Fabien Gandon" . . . . "\u677E\u672C \u540E\u5B50" . _:michael . _:manu . _:manu _:michael . _:michael . "Test 0067" . . . . "Example FAQ" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _:bnode12 "Ivan Herman" . _:bnode12 . _:bnode12 . _:bnode12 . _:bnode13 . _:bnode12 _:bnode13 . _:bnode12 . . . . . _:bnode16 "Ivan Herman" . _:bnode16 . _:bnode16 . _:bnode16 . _:bnode17 . _:bnode16 _:bnode17 . _:bnode16 . _:bnode18 "Ivan Herman" . _:bnode18 . _:bnode18 . _:bnode18 . _:bnode18 . _:bnode18 . _:bnode19 . _:bnode18 _:bnode19 . _:bnode18 . _:bnode18 . _:bnode20 "Ivan Herman" . _:bnode20 . _:bnode20 . _:bnode20 . . "Dan Brickley" . . _:bnode21 "Ivan Herman" . _:bnode21 . _:bnode21 . _:bnode21 . _:bnode21 . _:bnode21 . . "Dan Brickley" . . . _:bnode22 . _:bnode22 . _:bnode22 . _:bnode22 . . . . . . . . . . . . . . . . . . . . . . . . . _:bnode25 "Dan Brickley" . _:bnode25 . _:bnode25 . _:bnode25 . . . _:human "a bi-pedal primate" . _:human "confused animal" . _:human "Milky Way" . "Albert Einstein" . "E = mc2: The Most Urgent Problem of Our Time"^^ . "\n We put thirty spokes together and call it a wheel;\n But it is on the space where there is nothing that the usefulness of the wheel depends.\n We turn clay to make a vessel;\n But it is on the space where there is nothing that the usefulness of the vessel depends.\n We pierce doors and windows to make a house;\n And it is on these spaces where there is nothing that the usefulness of the house depends.\n Therefore just as we take advantage of what is, we should recognize the usefulness of what is not.\n\n Lao Tzu: Tao Te Ching" . _:bnode26 "17" . _:bnode26 . _:bnode26 "character" . _:bnode26 . _:bnode27 . "\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03CC\n\u03AC\u03C3\u03C0\u03C1\u03BF \u03B4\u03B9\u03AC\u03C3\u03C4\u03B7\u03BC\u03B1\n"@el . "Test 0109" . _:bnode29 . _:bnode31 _:bnode32 . _:bnode31 . "not an XML Literal,\nwhitespace preserved\n" . "" . "" . . . . . . . . . . ">" . "Ben & Co." . "@" . "@" . "Mark Birbeck" . "Ben" . "Example Website" . "The XHTML Vocabulary Document" . "Test Case 0121" . "Shane McCarron" . . . "My article" . "Test" . "John Doe" . _:gregg "Gregg Kellogg" . _:manu . _:manu _:gregg . _:gregg _:manu . _:gregg . "Ivan Herman" . . "A particular agent" . "Ivan Herman" . "Ivan Herman" . . . "A particular agent" . . "A particular agent" . . "Ivan Herman" . . . "Ivan Herman" . . "Ivan Herman" . . . . "This is an XMLLiteral"^^ . "This is a plain literal" . . "Gregg Kellogg" . "Ruby"^^ . . . . "Mark" . "Birbeck" . "Mark Birbeck"^^ . . . "Weekend off in Iona" . "2006-10-21"^^ . "2006-10-23"^^ . . "Iona, UK" . "Ivan Herman" . "Ivan Herman" . . "Ivan Herman" . "E = mc2: The Most Urgent Problem of Our Time" . "E = mc2: The Most Urgent Problem of Our Time" . "Iv\u00E1n" . "Iv\u00E1n" . . "Gregg Kellogg" . . _:bnode36 "Foo" . _:bnode36 . _:bnode36 . . _:bnode37 . _:bnode37 . _:bnode37 . . _:bnode38 "Foo" . _:bnode38 _:bnode39 . _:bnode39 . _:bnode39 . _:bnode38 . _:bnode39 "Foo" . _:bnode39 _:bnode40 . _:bnode40 "Bar" . _:bnode40 . _:bnode39 . "Baz" . _:bnode40 "Foo" . _:bnode40 _:bnode41 . _:bnode41 "Bar" . _:bnode41 . _:bnode40 . _:bnode41 . _:bnode41 _:bnode42 . _:bnode42 . _:bnode42 . _:bnode41 . _:bnode42 "Foo" . _:bnode42 . _:bnode42 . _:bnode43 "Bar" . _:bnode43 . _:bnode43 . . _:bnode45 "Bar" . _:bnode45 . _:bnode45 . _:bnode44 "Foo" . _:bnode44 . _:bnode44 . . _:bnode48 "Bar" . _:bnode48 . _:bnode48 . _:bnode46 "Foo" . _:bnode46 . _:bnode46 . . . . . _:bnode50 . _:bnode50 . _:bnode50 "John Doe" . . . "John Doe" . . . . "rdfagraph" . "\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03CC\n\u03AC\u03C3\u03C0\u03C1\u03BF \u03B4\u03B9\u03AC\u03C3\u03C4\u03B7\u03BC\u03B1\n"@el . "" . _:test . "GRDDL" . "MA" . "OWL" . "RDF" . "RDFa" . "RDFS" . "RIF" . "SKOS" . "SKOS-XL" . "WDR" . "VOID" . "WDRS" . "XHV" . "XML" . "XSD" . "CC" . "CTAG" . "DC" . "DCTERMS" . "FOAF" . "GR" . "ICAL" . "OG" . "REV" . "SIOC" . "V" . "VCARD" . "Schema" . "DescribedBy" . "License" . "Role" . "alternate" . "appendix" . "cite" . "bookmark" . "contents" . "chapter" . "copyright" . "first" . "glossary" . "help" . "icon" . "index" . "last" . "license" . "meta" . "next" . "prev" . "previous" . "section" . "start" . "stylesheet" . "subsection" . "top" . "up" . "p3pv1" . "This is\nan XMLLiteral"^^ . "Mark Birbeck" . . . . . . . "18 March 2012" . "midnight" . "18 March 2012 at midnight" . "2012-03-18Z" . "00:00:00Z" . "2012-03-18T00:00:00Z" . "not this" . "18 March 2012 at midnight"^^ . "2011 years 6 months 28 days" . "Two Thousand Twelve" . "March, Two Thousand Twelve" . " 2012-03-18Z" . " 2012-03-18Z"^^ . "\n Non matching lexical value with language.\n "@en . "I came, I saw, I conquered"@lat . "18 March 2012 at midnight in San Francisco" . "" . "value" . "value" . "value" . "value two" . "value one" . "Test" . "GRDDL" . "MA" . "OWL" . "RDF" . "RDFa" . "RDFS" . "RIF" . "SKOS" . "SKOS-XL" . "WDR" . "VOID" . "WDRS" . "XHV" . "XML" . "XSD" . "CC" . "CTAG" . "DC" . "DCTERMS" . "FOAF" . "GR" . "ICAL" . "OG" . "REV" . "SIOC" . "V" . "VCARD" . "Schema" . "DescribedBy" . raptor2-2.0.15/tests/rdfa11/0109.out0000644000175000017500000000016711765455733013477 00000000000000 "Test 0109" . raptor2-2.0.15/tests/rdfa11/0233.out0000644000175000017500000000050111765455733013465 00000000000000 . . "John Doe" . raptor2-2.0.15/tests/rdfa11/0203.xml0000644000175000017500000000120011765455733013450 00000000000000 version="1.2" baseProfile="tiny" A yellow rectangle with sharp corners. Test 0183

A particular agent

raptor2-2.0.15/tests/rdfa11/0236.xml0000644000175000017500000000032711765455733013467 00000000000000 Test 0236 raptor2-2.0.15/tests/rdfa11/0299.out0000644000175000017500000000016011765455733013502 00000000000000 . raptor2-2.0.15/tests/rdfa11/0019.xml0000644000175000017500000000052311765455733013464 00000000000000 Test 0019
raptor2-2.0.15/tests/rdfa11/0262.out0000644000175000017500000000017611765455733013477 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0251.out0000644000175000017500000000010411765455733013464 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa11/0175.out0000644000175000017500000000006711765455733013501 00000000000000_:a "Gregg Kellogg" . raptor2-2.0.15/tests/rdfa11/0072.xml0000644000175000017500000000063111765455733013463 00000000000000 Test 0072

Learn more by reading the example.org Example FAQ.

raptor2-2.0.15/tests/rdfa11/0062.xml0000644000175000017500000000075111765455733013465 00000000000000 Test 0062

This is unit test #62. The next unit test is #63.

raptor2-2.0.15/tests/rdfa11/0237.out0000644000175000017500000000013411765455733013473 00000000000000_:s . raptor2-2.0.15/tests/rdfa11/0283.out0000644000175000017500000000020511765455733013473 00000000000000 " 2012-03-18Z" . raptor2-2.0.15/tests/rdfa11/0276.out0000644000175000017500000000025311765455733013500 00000000000000 "00:00:00Z"^^ . raptor2-2.0.15/tests/rdfa11/0214.out0000644000175000017500000000041211765455733013465 00000000000000 . "Test 0214" . raptor2-2.0.15/tests/rdfa11/0075.xml0000644000175000017500000000071111765455733013465 00000000000000 Test 0075

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

raptor2-2.0.15/tests/rdfa11/0257.xml0000644000175000017500000000041411765455733013467 00000000000000 Test 0257 raptor2-2.0.15/tests/rdfa11/0093.out0000644000175000017500000000047611765455733013504 00000000000000 "Albert Einstein" . "E = mc2: The Most Urgent Problem of Our Time"^^ . raptor2-2.0.15/tests/rdfa11/0189.xml0000644000175000017500000000060711765455733013477 00000000000000 Test 0189

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0084.xml0000644000175000017500000000106111765455733013464 00000000000000 Test 0084

Ivan Herman

mailto:ivan@w3.org

Dan Brickley

raptor2-2.0.15/tests/rdfa11/0018.xml0000644000175000017500000000055711765455733013472 00000000000000 Test 0018

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa11/0254.out0000644000175000017500000000013611765455733013474 00000000000000 "A plain literal with a lang tag."@en . raptor2-2.0.15/tests/rdfa11/0014.out0000644000175000017500000000014511765455732013465 00000000000000 "10"^^ . raptor2-2.0.15/tests/rdfa11/0122.xml0000644000175000017500000000051711765455733013462 00000000000000 Test 0122

This section is contained below the main site.

raptor2-2.0.15/tests/rdfa11/0131.out0000644000175000017500000000127611765455733013474 00000000000000 . . . . . raptor2-2.0.15/tests/rdfa11/0293.out0000644000175000017500000000010711765455733013475 00000000000000 "Test" . raptor2-2.0.15/tests/rdfa11/0232.xml0000644000175000017500000000047311765455733013465 00000000000000 Test 0232

John Doe

raptor2-2.0.15/tests/rdfa11/0039.out0000644000175000017500000000015611765455733013477 00000000000000 . raptor2-2.0.15/tests/rdfa11/0008.xml0000644000175000017500000000061211765455732013460 00000000000000 Test 0008

This document is licensed under a Creative Commons .

raptor2-2.0.15/tests/rdfa11/0196.xml0000644000175000017500000000067511765455733013502 00000000000000 Test 0196

This is an XMLLiteral

This is a plain literal

raptor2-2.0.15/tests/rdfa11/0126.xml0000644000175000017500000000067611765455733013474 00000000000000 Test 0126

My article

raptor2-2.0.15/tests/rdfa11/0279.xml0000644000175000017500000000042511765455733013475 00000000000000 Test 0279 raptor2-2.0.15/tests/rdfa11/0057.out0000644000175000017500000000054311765455733013477 00000000000000 . . "Mark Birbeck" . "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0265.xml0000644000175000017500000000040711765455733013470 00000000000000 Test 0265

raptor2-2.0.15/tests/rdfa11/0231.out0000644000175000017500000000020411765455733013463 00000000000000 . raptor2-2.0.15/tests/rdfa11/0021.out0000644000175000017500000000017411765455733013466 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0174.xml0000644000175000017500000000060511765455733013467 00000000000000 Test 0174

This test ensures that single-character prefixes are allowed. My name is: John Doe

raptor2-2.0.15/tests/rdfa11/0074.xml0000644000175000017500000000056511765455733013473 00000000000000 Test 0074

This article was written by Jane.

raptor2-2.0.15/tests/rdfa11/0197.out0000644000175000017500000000077112416654151013474 00000000000000 . "Gregg Kellogg" . "Ruby"^^ . . . raptor2-2.0.15/tests/rdfa11/0255.out0000644000175000017500000000012111765455733013467 00000000000000 "Just a plain literal." . raptor2-2.0.15/tests/rdfa11/0254.xml0000644000175000017500000000053411765455733013467 00000000000000 Test 0254

A plain literal with a lang tag.

raptor2-2.0.15/tests/rdfa11/0285.out0000644000175000017500000000020111765455733013471 00000000000000 "D-Day"@en . raptor2-2.0.15/tests/rdfa11/0272.out0000644000175000017500000000025511765455733013476 00000000000000 "2012-03-18Z"^^ . raptor2-2.0.15/tests/rdfa11/0264.out0000644000175000017500000000021311765455733013471 00000000000000 . raptor2-2.0.15/tests/rdfa11/0070.xml0000644000175000017500000000053211765455733013461 00000000000000 Test 0070

The previous test was Test 0069.

raptor2-2.0.15/tests/rdfa11/0246.xml0000644000175000017500000000070211765455733013465 00000000000000 Test 0246

Mark Birbeck

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0054.out0000644000175000017500000000037411765455733013476 00000000000000 "Fabien Gandon" . "Fabien Gandon" . raptor2-2.0.15/tests/rdfa11/0106.out0000644000175000017500000000016111765455733013466 00000000000000 _:a . raptor2-2.0.15/tests/rdfa11/0187.xml0000644000175000017500000000061111765455733013470 00000000000000 Test 0187

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0036.out0000644000175000017500000000015211765455733013470 00000000000000 . raptor2-2.0.15/tests/rdfa11/0290.out0000644000175000017500000000012311765455733013470 00000000000000 "value" . raptor2-2.0.15/tests/rdfa11/0071.out0000644000175000017500000000023411765455733013470 00000000000000 . raptor2-2.0.15/tests/rdfa11/0032.out0000644000175000017500000000021211765455733013461 00000000000000 . raptor2-2.0.15/tests/rdfa11/CMakeLists.txt0000644000175000017500000021415312011242611015065 00000000000000# raptor/tests/rdfa11/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # IF(RAPTOR_PARSER_RDFA) RAPPER_RDFDIFF_TEST(rdfa11.0001 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0001.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0001.xml" 0001-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0001.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0001.out 0001-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0006 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0006.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0006.xml" 0006-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0006.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0006.out 0006-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0007 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0007.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0007.xml" 0007-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0007.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0007.out 0007-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0008 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0008.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0008.xml" 0008-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0008.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0008.out 0008-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0009 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0009.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0009.xml" 0009-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0009.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0009.out 0009-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0010 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0010.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0010.xml" 0010-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0010.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0010.out 0010-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0012 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0012.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0012.xml" 0012-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0012.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0012.out 0012-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0013 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0013.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0013.xml" 0013-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0013.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0013.out 0013-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0014 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0014.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0014.xml" 0014-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0014.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0014.out 0014-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0015 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0015.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0015.xml" 0015-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0015.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0015.out 0015-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0017 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0017.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0017.xml" 0017-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0017.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0017.out 0017-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0018 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0018.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0018.xml" 0018-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0018.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0018.out 0018-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0019 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0019.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0019.xml" 0019-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0019.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0019.out 0019-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0020 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0020.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0020.xml" 0020-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0020.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0020.out 0020-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0021 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0021.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0021.xml" 0021-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0021.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0021.out 0021-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0023 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0023.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0023.xml" 0023-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0023.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0023.out 0023-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0025 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0025.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0025.xml" 0025-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0025.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0025.out 0025-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0026 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0026.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0026.xml" 0026-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0026.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0026.out 0026-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0027 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0027.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0027.xml" 0027-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0027.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0027.out 0027-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0029 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0029.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0029.xml" 0029-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0029.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0029.out 0029-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0030 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0030.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0030.xml" 0030-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0030.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0030.out 0030-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0031 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0031.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0031.xml" 0031-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0031.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0031.out 0031-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0032 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0032.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0032.xml" 0032-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0032.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0032.out 0032-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0033 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0033.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0033.xml" 0033-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0033.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0033.out 0033-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0034 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0034.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0034.xml" 0034-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0034.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0034.out 0034-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0035 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0035.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0035.xml" 0035-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0035.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0035.out 0035-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0036 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0036.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0036.xml" 0036-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0036.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0036.out 0036-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0037 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0037.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0037.xml" 0037-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0037.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0037.out 0037-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0038 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0038.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0038.xml" 0038-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0038.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0038.out 0038-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0039 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0039.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0039.xml" 0039-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0039.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0039.out 0039-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0041 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0041.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0041.xml" 0041-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0041.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0041.out 0041-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0048 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0048.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0048.xml" 0048-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0048.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0048.out 0048-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0049 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0049.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0049.xml" 0049-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0049.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0049.out 0049-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0050 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0050.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0050.xml" 0050-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0050.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0050.out 0050-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0051 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0051.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0051.xml" 0051-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0051.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0051.out 0051-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0052 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0052.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0052.xml" 0052-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0052.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0052.out 0052-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0053 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0053.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0053.xml" 0053-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0053.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0053.out 0053-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0054 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0054.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0054.xml" 0054-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0054.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0054.out 0054-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0055 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0055.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0055.xml" 0055-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0055.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0055.out 0055-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0056 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0056.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0056.xml" 0056-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0056.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0056.out 0056-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0057 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0057.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0057.xml" 0057-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0057.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0057.out 0057-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0059 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0059.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0059.xml" 0059-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0059.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0059.out 0059-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0060 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0060.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0060.xml" 0060-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0060.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0060.out 0060-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0061 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0061.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0061.xml" 0061-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0061.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0061.out 0061-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0062 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0062.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0062.xml" 0062-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0062.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0062.out 0062-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0063 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0063.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0063.xml" 0063-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0063.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0063.out 0063-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0064 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0064.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0064.xml" 0064-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0064.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0064.out 0064-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0065 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0065.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0065.xml" 0065-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0065.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0065.out 0065-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0066 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0066.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0066.xml" 0066-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0066.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0066.out 0066-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0067 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0067.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0067.xml" 0067-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0067.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0067.out 0067-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0068 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0068.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0068.xml" 0068-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0068.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0068.out 0068-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0069 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0069.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0069.xml" 0069-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0069.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0069.out 0069-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0070 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0070.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0070.xml" 0070-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0070.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0070.out 0070-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0071 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0071.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0071.xml" 0071-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0071.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0071.out 0071-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0072 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0072.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0072.xml" 0072-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0072.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0072.out 0072-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0073 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0073.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0073.xml" 0073-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0073.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0073.out 0073-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0074 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0074.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0074.xml" 0074-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0074.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0074.out 0074-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0075 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0075.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0075.xml" 0075-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0075.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0075.out 0075-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0076 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0076.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0076.xml" 0076-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0076.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0076.out 0076-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0077 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0077.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0077.xml" 0077-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0077.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0077.out 0077-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0079 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0079.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0079.xml" 0079-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0079.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0079.out 0079-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0080 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0080.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0080.xml" 0080-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0080.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0080.out 0080-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0083 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0083.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0083.xml" 0083-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0083.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0083.out 0083-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0084 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0084.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0084.xml" 0084-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0084.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0084.out 0084-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0085 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0085.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0085.xml" 0085-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0085.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0085.out 0085-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0087 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0087.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0087.xml" 0087-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0087.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0087.out 0087-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0088 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0088.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0088.xml" 0088-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0088.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0088.out 0088-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0089 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0089.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0089.xml" 0089-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0089.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0089.out 0089-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0091 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0091.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0091.xml" 0091-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0091.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0091.out 0091-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0093 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0093.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0093.xml" 0093-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0093.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0093.out 0093-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0099 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0099.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0099.xml" 0099-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0099.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0099.out 0099-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0104 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0104.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0104.xml" 0104-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0104.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0104.out 0104-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0106 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0106.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0106.xml" 0106-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0106.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0106.out 0106-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0107 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0107.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0107.xml" 0107-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0107.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0107.out 0107-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0108 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0108.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0108.xml" 0108-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0108.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0108.out 0108-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0109 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0109.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0109.xml" 0109-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0109.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0109.out 0109-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0110 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0110.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0110.xml" 0110-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0110.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0110.out 0110-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0111 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0111.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0111.xml" 0111-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0111.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0111.out 0111-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0112 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0112.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0112.xml" 0112-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0112.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0112.out 0112-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0113 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0113.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0113.xml" 0113-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0113.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0113.out 0113-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0114 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0114.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0114.xml" 0114-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0114.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0114.out 0114-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0115 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0115.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0115.xml" 0115-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0115.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0115.out 0115-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0117 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0117.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0117.xml" 0117-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0117.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0117.out 0117-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0118 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0118.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0118.xml" 0118-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0118.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0118.out 0118-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0119 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0119.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0119.xml" 0119-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0119.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0119.out 0119-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0120 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0120.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0120.xml" 0120-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0120.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0120.out 0120-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0121 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0121.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0121.xml" 0121-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0121.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0121.out 0121-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0122 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0122.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0122.xml" 0122-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0122.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0122.out 0122-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0126 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0126.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0126.xml" 0126-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0126.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0126.out 0126-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0131 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0131.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0131.xml" 0131-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0131.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0131.out 0131-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0134 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0134.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0134.xml" 0134-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0134.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0134.out 0134-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0140 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0140.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0140.xml" 0140-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0140.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0140.out 0140-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0147 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0147.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0147.xml" 0147-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0147.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0147.out 0147-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0172 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0172.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0172.xml" 0172-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0172.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0172.out 0172-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0173 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0173.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0173.xml" 0173-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0173.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0173.out 0173-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0174 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0174.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0174.xml" 0174-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0174.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0174.out 0174-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0175 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0175.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0175.xml" 0175-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0175.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0175.out 0175-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0176 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0176.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0176.xml" 0176-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0176.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0176.out 0176-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0177 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0177.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0177.xml" 0177-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0177.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0177.out 0177-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0178 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0178.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0178.xml" 0178-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0178.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0178.out 0178-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0179 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0179.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0179.xml" 0179-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0179.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0179.out 0179-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0180 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0180.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0180.xml" 0180-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0180.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0180.out 0180-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0181 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0181.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0181.xml" 0181-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0181.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0181.out 0181-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0182 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0182.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0182.xml" 0182-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0182.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0182.out 0182-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0183 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0183.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0183.xml" 0183-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0183.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0183.out 0183-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0186 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0186.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0186.xml" 0186-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0186.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0186.out 0186-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0187 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0187.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0187.xml" 0187-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0187.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0187.out 0187-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0188 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0188.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0188.xml" 0188-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0188.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0188.out 0188-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0189 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0189.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0189.xml" 0189-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0189.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0189.out 0189-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0190 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0190.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0190.xml" 0190-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0190.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0190.out 0190-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0196 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0196.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0196.xml" 0196-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0196.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0196.out 0196-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0197 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0197.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0197.xml" 0197-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0197.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0197.out 0197-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0198 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0198.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0198.xml" 0198-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0198.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0198.out 0198-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0201 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0201.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0201.xml" 0201-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0201.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0201.out 0201-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0202 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0202.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0202.xml" 0202-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0202.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0202.out 0202-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0203 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0203.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0203.xml" 0203-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0203.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0203.out 0203-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0206 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0206.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0206.xml" 0206-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0206.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0206.out 0206-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0207 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0207.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0207.xml" 0207-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0207.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0207.out 0207-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0213 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0213.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0213.xml" 0213-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0213.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0213.out 0213-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0214 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0214.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0214.xml" 0214-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0214.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0214.out 0214-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0216 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0216.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0216.xml" 0216-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0216.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0216.out 0216-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0217 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0217.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0217.xml" 0217-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0217.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0217.out 0217-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0218 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0218.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0218.xml" 0218-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0218.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0218.out 0218-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0219 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0219.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0219.xml" 0219-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0219.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0219.out 0219-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0220 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0220.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0220.xml" 0220-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0220.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0220.out 0220-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0221 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0221.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0221.xml" 0221-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0221.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0221.out 0221-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0222 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0222.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0222.xml" 0222-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0222.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0222.out 0222-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0223 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0223.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0223.xml" 0223-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0223.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0223.out 0223-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0224 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0224.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0224.xml" 0224-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0224.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0224.out 0224-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0225 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0225.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0225.xml" 0225-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0225.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0225.out 0225-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0226 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0226.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0226.xml" 0226-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0226.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0226.out 0226-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0227 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0227.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0227.xml" 0227-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0227.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0227.out 0227-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0228 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0228.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0228.xml" 0228-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0228.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0228.out 0228-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0229 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0229.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0229.xml" 0229-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0229.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0229.out 0229-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0230 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0230.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0230.xml" 0230-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0230.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0230.out 0230-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0231 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0231.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0231.xml" 0231-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0231.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0231.out 0231-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0232 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0232.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0232.xml" 0232-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0232.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0232.out 0232-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0233 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0233.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0233.xml" 0233-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0233.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0233.out 0233-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0234 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0234.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0234.xml" 0234-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0234.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0234.out 0234-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0235 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0235.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0235.xml" 0235-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0235.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0235.out 0235-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0236 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0236.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0236.xml" 0236-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0236.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0236.out 0236-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0237 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0237.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0237.xml" 0237-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0237.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0237.out 0237-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0238 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0238.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0238.xml" 0238-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0238.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0238.out 0238-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0239 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0239.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0239.xml" 0239-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0239.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0239.out 0239-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0246 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0246.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0246.xml" 0246-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0246.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0246.out 0246-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0247 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0247.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0247.xml" 0247-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0247.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0247.out 0247-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0248 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0248.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0248.xml" 0248-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0248.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0248.out 0248-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0249 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0249.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0249.xml" 0249-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0249.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0249.out 0249-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0250 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0250.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0250.xml" 0250-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0250.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0250.out 0250-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0251 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0251.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0251.xml" 0251-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0251.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0251.out 0251-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0252 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0252.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0252.xml" 0252-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0252.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0252.out 0252-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0253 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0253.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0253.xml" 0253-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0253.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0253.out 0253-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0254 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0254.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0254.xml" 0254-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0254.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0254.out 0254-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0255 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0255.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0255.xml" 0255-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0255.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0255.out 0255-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0256 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0256.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0256.xml" 0256-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0256.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0256.out 0256-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0257 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0257.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0257.xml" 0257-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0257.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0257.out 0257-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0258 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0258.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0258.xml" 0258-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0258.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0258.out 0258-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0259 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0259.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0259.xml" 0259-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0259.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0259.out 0259-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0260 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0260.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0260.xml" 0260-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0260.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0260.out 0260-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0261 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0261.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0261.xml" 0261-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0261.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0261.out 0261-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0262 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0262.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0262.xml" 0262-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0262.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0262.out 0262-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0263 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0263.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0263.xml" 0263-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0263.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0263.out 0263-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0264 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0264.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0264.xml" 0264-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0264.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0264.out 0264-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0265 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0265.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0265.xml" 0265-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0265.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0265.out 0265-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0266 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0266.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0266.xml" 0266-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0266.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0266.out 0266-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0267 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0267.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0267.xml" 0267-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0267.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0267.out 0267-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0268 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0268.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0268.xml" 0268-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0268.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0268.out 0268-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0269 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0269.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0269.xml" 0269-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0269.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0269.out 0269-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0269 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0269.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0269.xml" 0269-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0269.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0269.out 0269-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0271 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0271.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0271.xml" 0271-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0271.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0271.out 0271-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0272 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0272.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0272.xml" 0272-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0272.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0272.out 0272-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0273 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0273.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0273.xml" 0273-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0273.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0273.out 0273-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0274 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0274.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0274.xml" 0274-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0274.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0274.out 0274-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0275 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0275.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0275.xml" 0275-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0275.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0275.out 0275-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0276 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0276.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0276.xml" 0276-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0276.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0276.out 0276-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0277 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0277.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0277.xml" 0277-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0277.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0277.out 0277-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0278 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0278.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0278.xml" 0278-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0278.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0278.out 0278-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0279 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0279.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0279.xml" 0279-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0279.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0279.out 0279-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0280 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0280.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0280.xml" 0280-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0280.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0280.out 0280-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0281 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0281.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0281.xml" 0281-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0281.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0281.out 0281-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0282 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0282.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0282.xml" 0282-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0282.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0282.out 0282-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0283 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0283.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0283.xml" 0283-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0283.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0283.out 0283-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0284 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0284.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0284.xml" 0284-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0284.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0284.out 0284-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0285 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0285.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0285.xml" 0285-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0285.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0285.out 0285-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0286 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0286.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0286.xml" 0286-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0286.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0286.out 0286-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0287 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0287.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0287.xml" 0287-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0287.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0287.out 0287-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0289 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0289.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0289.xml" 0289-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0289.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0289.out 0289-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0290 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0290.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0290.xml" 0290-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0290.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0290.out 0290-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0291 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0291.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0291.xml" 0291-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0291.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0291.out 0291-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0292 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0292.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0292.xml" 0292-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0292.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0292.out 0292-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0293 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0293.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0293.xml" 0293-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0293.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0293.out 0293-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0295 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0295.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0295.xml" 0295-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0295.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0295.out 0295-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0296 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0296.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0296.xml" 0296-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0296.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0296.out 0296-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0297 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0297.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0297.xml" 0297-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0297.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0297.out 0297-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0298 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0298.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0298.xml" 0298-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0298.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0298.out 0298-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0299 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0299.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0299.xml" 0299-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0299.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0299.out 0299-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0300 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0300.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0300.xml" 0300-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0300.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0300.out 0300-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0301 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0301.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0301.xml" 0301-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0301.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0301.out 0301-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0302 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0302.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0302.xml" 0302-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0302.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0302.out 0302-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0303 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0303.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0303.xml" 0303-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0303.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0303.out 0303-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa11.0304 "${RAPPER} -f noNet -q -i rdfa11 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0304.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0304.xml" 0304-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0304.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0304.out 0304-res.nt" ) ENDIF(RAPTOR_PARSER_RDFA) # end raptor/tests/rdfa11/CMakeLists.txt raptor2-2.0.15/tests/rdfa11/0115.out0000644000175000017500000000065011765455733013471 00000000000000 ">" . "Ben & Co." . "@" . "@" . raptor2-2.0.15/tests/rdfa11/0072.out0000644000175000017500000000012511765455733013470 00000000000000 "Example FAQ" . raptor2-2.0.15/tests/rdfa11/0053.xml0000644000175000017500000000052211765455733013461 00000000000000 Test 0053

John Doe

raptor2-2.0.15/tests/rdfa11/0296.xml0000644000175000017500000000226411765455733013477 00000000000000 Test 0296 raptor2-2.0.15/tests/rdfa11/0221.xml0000644000175000017500000000043711765455733013463 00000000000000 Test 0221

Foo

Foo
raptor2-2.0.15/tests/rdfa11/0217.xml0000644000175000017500000000046211765455733013466 00000000000000 Test 0217

Gregg Kellogg

raptor2-2.0.15/tests/rdfa11/0069.xml0000644000175000017500000000052011765455733013466 00000000000000 Test 0069

The next test will be Test 0070.

raptor2-2.0.15/tests/rdfa11/0277.xml0000644000175000017500000000033411765455733013472 00000000000000 Test 0277 raptor2-2.0.15/tests/rdfa11/0032.xml0000644000175000017500000000070711765455733013463 00000000000000 Test 0032

The book Weaving the Web (hardcover) has the ISBN 0752820907.

raptor2-2.0.15/tests/rdfa11/0213.xml0000644000175000017500000000071011765455733013456 00000000000000 Test 0213

E = mc2: The Most Urgent Problem of Our Time

raptor2-2.0.15/tests/rdfa11/0068.out0000644000175000017500000000016711765455733013503 00000000000000 "Test 0067" . raptor2-2.0.15/tests/rdfa11/0186.out0000644000175000017500000000025211765455733013477 00000000000000 . "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0282.out0000644000175000017500000000025711765455733013501 00000000000000 "2012-03"^^ . raptor2-2.0.15/tests/rdfa11/0067.out0000644000175000017500000000016111765455733013474 00000000000000 "Test 0067" . raptor2-2.0.15/tests/rdfa11/0190.out0000644000175000017500000000022711765455733013474 00000000000000 . raptor2-2.0.15/tests/rdfa11/0065.xml0000644000175000017500000000113511765455733013465 00000000000000 Test 0065
Manu Sporny can be reached via email. He knows Michael.
Michael can be reached via email.
raptor2-2.0.15/tests/rdfa11/0188.out0000644000175000017500000000025211765455733013501 00000000000000 . "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0304.xml0000644000175000017500000000142711765455733013465 00000000000000 A yellow rectangle with sharp corners. Test 0304 raptor2-2.0.15/tests/rdfa11/0083.out0000644000175000017500000000077311765455733013503 00000000000000 _:a . . _:a "Ivan Herman" . _:a . . "Dan Brickley" . raptor2-2.0.15/tests/rdfa11/0110.out0000644000175000017500000000016111765455733013461 00000000000000 _:a . raptor2-2.0.15/tests/rdfa11/0114.out0000644000175000017500000000245511767512705013470 00000000000000 . . . . . . . . raptor2-2.0.15/tests/rdfa11/0026.out0000644000175000017500000000014011765455733013464 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0054.xml0000644000175000017500000000054611765455733013470 00000000000000 Test 0054

This document was authored and published by Fabien Gandon.

raptor2-2.0.15/tests/rdfa11/0036.xml0000644000175000017500000000072011765455733013462 00000000000000 Test 0036
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0206.out0000644000175000017500000000022511765455733013470 00000000000000 . raptor2-2.0.15/tests/rdfa11/0009.out0000644000175000017500000000015411765455732013471 00000000000000 . raptor2-2.0.15/tests/rdfa11/0285.xml0000644000175000017500000000042411765455733013471 00000000000000 Test 0285 raptor2-2.0.15/tests/rdfa11/0029.out0000644000175000017500000000017711765455733013501 00000000000000 "Mark Birbeck"^^ . raptor2-2.0.15/tests/rdfa11/0297.xml0000644000175000017500000000042211765455733013472 00000000000000 Test 0297: Testing @typeof and @about=[]
Alex Milowski
raptor2-2.0.15/tests/rdfa11/0173.out0000644000175000017500000000012011765455733013465 00000000000000 "Just a plain literal." . raptor2-2.0.15/tests/rdfa11/0189.out0000644000175000017500000000043711765455733013507 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0282.xml0000644000175000017500000000036511765455733013472 00000000000000 Test 0282 raptor2-2.0.15/tests/rdfa11/0115.xml0000644000175000017500000000076111765455733013465 00000000000000 Test 0115

Description: XML entities in the RDFa content

> Ben & Co. @ @

raptor2-2.0.15/tests/rdfa11/0118.out0000644000175000017500000000016311765455733013473 00000000000000 "Ben" . raptor2-2.0.15/tests/rdfa11/0055.xml0000644000175000017500000000060311765455733013463 00000000000000 Test 0055

This document was authored and published by Fabien Gandon.

raptor2-2.0.15/tests/rdfa11/0089.xml0000644000175000017500000000057311765455733013500 00000000000000 Test 0089
example image
raptor2-2.0.15/tests/rdfa11/0234.out0000644000175000017500000000065111767512705013467 00000000000000 . . . raptor2-2.0.15/tests/rdfa11/0202.xml0000644000175000017500000000111411765455733013453 00000000000000 version="1.2" baseProfile="tiny" A yellow rectangle with sharp corners. raptor2-2.0.15/tests/rdfa11/0223.xml0000644000175000017500000000051611765455733013463 00000000000000 Test 0223

Foo

Bar

Baz

raptor2-2.0.15/tests/rdfa11/0113.out0000644000175000017500000000034011765455733013463 00000000000000 "" . "" . raptor2-2.0.15/tests/rdfa11/0221.out0000644000175000017500000000124311765455733013466 00000000000000 . _:bnode0 "Foo" . _:bnode0 _:bnode1 . _:bnode1 . _:bnode1 . _:bnode0 . raptor2-2.0.15/tests/rdfa11/0172.out0000644000175000017500000000013611765455733013473 00000000000000 "A plain literal with a lang tag."@en . raptor2-2.0.15/tests/rdfa11/0295.xml0000644000175000017500000011640611765455733013502 00000000000000 RDFa 1.1 Benchmark File #1

This photo was taken by Mark Birbeck.

This photo was taken by Mark Birbeck.

This photo was taken by Mark Birbeck.

This document is licensed under a Creative Commons .

ten

Manu Sporny knows Ralph Swick.

This photo was taken by Mark Birbeck.

this photo was taken by Mark Birbeck
this photo was taken by Mark Birbeck
This photo was taken by Mark Birbeck

This paper was written by Ben Adida.

Mark B.

Mark Birbeck.

This document is licensed under a Creative Commons License .

The book Weaving the Web (hardcover) has the ISBN 0752820907.

The book Weaving the Web (hardcover) has the ISBN 0752820907.

This paper was written by Ben Adida.

A photo depicting Michael
A photo depicting Michael
A photo depicting Michael
A photo depicting Michael
A photo depicting Michael
A photo depicting Michael
A photo depicting Michael
A photo depicting Michael
A photo depicting Michael

John Doe

John Doe

John Doe

John Doe

John Doe

John Doe

John Doe

John Doe

This document was authored and published by Fabien Gandon.

This document was authored and published by Fabien Gandon.

Mark Birbeck

Mark Birbeck

Ivan Herman

Mark Birbeck

Ivan Herman

This document was authored and published by:

  • Manu Sporny
  • Fabien Gandon

松本 后子

This is the first chapter in a series of chapters.

This is unit test #62. The next unit test is #63.

This is the 63rd test. The next test is #64.

Michael knows Manu.

Manu Sporny can be reached via email. He knows Michael.
Michael can be reached via email.

This is test #66.

This is test #67.

The previous test was Test 0067.

The next test will be Test 0070.

The previous test was Test 0069.

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

Learn more by reading the example.org Example FAQ.

This article was written by Jane.

This article was written by Jane.

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

alternate appendix bookmark cite chapter contents copyright glossary help index last license meta p3pv1 role section subsection start stylesheet up

alternate appendix bookmark cite chapter contents copyright glossary help icon index first last license meta next p3pv1 prev role section subsection start stylesheet up

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

Ivan Herman

Tim Berners Lee

Dan Brickley

Dan Brickley

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

Ivan Herman

mailto:ivan@w3.org

Dan Brickley

Ivan Herman

mailto:ivan@w3.org

Dan Brickley

Ivan Herman

Tim Berners Lee

Dan Brickley

alternate appendix bookmark cite chapter contents copyright glossary help icon index first last license meta next p3pv1 prev role section subsection start stylesheet up

Dan Brickley

Dan Brickley again:-)

example image
example image

A human is a bi-pedal primate. They are quite possibly one of the most confused animals residing in the Milky Way.

Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

We put thirty spokes together and call it a wheel; But it is on the space where there is nothing that the usefulness of the wheel depends. We turn clay to make a vessel; But it is on the space where there is nothing that the usefulness of the vessel depends. We pierce doors and windows to make a house; And it is on these spaces where there is nothing that the usefulness of the house depends. Therefore just as we take advantage of what is, we should recognize the usefulness of what is not. Lao Tzu: Tao Te Ching

The word "interfenestration" has 17 characters.

Manu created this page.

ελληνικό άσπρο διάστημα

This is Test 0109.

not an XML Literal, whitespace preserved

Description: XML entities in the RDFa content

> Ben & Co. @ @

Mark Birbeck added this triple test.

Check to see if parsers get confused when "" is interpreted as NULL in some chaining cases. Ben

The Example Website is used in many W3C tutorials.

The The XHTML Vocabulary Document is the default prefix for XHTML+RDFa 1.0.

Test Case 0121 checks to make sure RDFa processors resolve the empty CURIE correctly.

Shane McCarron contributed to this test.

This section is contained below the main site.

My article

Blank Nodes are not allowed to be predicate identifiers in RDF:

Test

Test

This test ensures that single-character prefixes are allowed. My name is: John Doe

My name is Gregg Kellogg.

Manu can be reached via email. He knows Gregg. Who knows Manu.
Gregg can be reached via email.

Ivan Herman

A particular agent

Ivan Herman

Ivan Herman

Ivan Herman

A particular agent

A particular agent

Ivan Herman

Ivan Herman

Ivan Herman

Ivan Herman

Ivan Herman

This is an XMLLiteral

This is a plain literal

Gregg Kellogg

Ruby

Kellogg Associates

Ruby Gem

Mark Birbeck

An OWL Axiom: "xsd:maxExclusive" is a Datatype Property in OWL.

Weekend off in Iona: Oct 21st to Oct 23rd. See FreeTime.Example.org for info on Iona, UK.

Ivan Herman

Ivan Herman

Ivan Herman

E = mc2: The Most Urgent Problem of Our Time

E = mc2: The Most Urgent Problem of Our Time

This document has a title.

Iván

Iván

Gregg Kellogg

Foo

Foo

Foo

Foo

Foo

Bar

Foo

Bar

Baz

Foo

Bar

Foo

Bar

Foo

Bar

A photo depicting Michael
A photo depicting Michael
example image
example image

John Doe

John Doe

describedby license role

The rdfagraph should not generate triples when looking only at the processor graph.

ελληνικό άσπρο διάστημα

Ensure that the "_" prefix is ignored.

Test

Vocabulary Prefixes GRDDL MA OWL RDF RDFa RDFS RIF SKOS SKOS-XL WDR VOID WDRS XHV XML XSD
Widely Used prefixes CC CTAG DC DCTERMS FOAF GR ICAL OG REV SIOC V VCARD Schema
Vocabulary Terms DescribedBy License Role
Vocabulary Terms alternate appendix cite bookmark contents chapter copyright first glossary help icon index last license meta next prev previous section start stylesheet subsection top up p3pv1

This is an XMLLiteral

This photo was taken by Mark Birbeck.

Ivan Herman

@value overrides @content in the 'data' element.

@href becomes subject when @property and @content are present

ignored

@href becomes subject when @property and @datatype are present

value

@href as subject overridden by @about

ignored

@about overriding @href as subject is used as parent resource

value two

Testing the ':' character usage in a CURIE

Test

None of these triples should be generated in RDFa 1.0.

Vocabulary Prefixes GRDDL MA OWL RDF RDFa RDFS RIF SKOS SKOS-XL WDR VOID WDRS XHV XML XSD
Widely Used prefixes CC CTAG DC DCTERMS FOAF GR ICAL OG REV SIOC V VCARD Schema
Vocabulary Terms DescribedBy
raptor2-2.0.15/tests/rdfa11/0180.out0000644000175000017500000000012311765455733013466 00000000000000 "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0214.xml0000644000175000017500000000036411765455733013464 00000000000000 Test 0214

This document has a title.

raptor2-2.0.15/tests/rdfa11/0281.xml0000644000175000017500000000035311765455733013466 00000000000000 Test 0281 raptor2-2.0.15/tests/rdfa11/0140.out0000644000175000017500000000000011765455733013454 00000000000000raptor2-2.0.15/tests/rdfa11/0091.out0000644000175000017500000000031011765455733013465 00000000000000_:a "a bi-pedal primate" . _:a "confused animal" . _:a "Milky Way" . raptor2-2.0.15/tests/rdfa11/0206.xml0000644000175000017500000000051611765455733013464 00000000000000 Default context test 0206

An OWL Axiom: "xsd:maxExclusive" is a Datatype Property in OWL.

raptor2-2.0.15/tests/rdfa11/0182.xml0000644000175000017500000000072611765455733013472 00000000000000 Test 0182

A particular agent

raptor2-2.0.15/tests/rdfa11/0088.xml0000644000175000017500000000064011765455733013472 00000000000000 Test 0088

Dan Brickley

Dan Brickley again:-)

raptor2-2.0.15/tests/rdfa11/0292.xml0000644000175000017500000000070111765455733013465 00000000000000 Test 0292

@about overriding @href as subject is used as parent resource

value two raptor2-2.0.15/tests/rdfa11/0147.out0000644000175000017500000000014411765455733013474 00000000000000 "Test" . raptor2-2.0.15/tests/rdfa11/0239.xml0000644000175000017500000000035511765455733013473 00000000000000 Test 0239 Undefined Prefix raptor2-2.0.15/tests/rdfa11/0186.xml0000644000175000017500000000046111765455733013472 00000000000000 Test 0186

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0293.xml0000644000175000017500000000053111765455733013467 00000000000000 Test 0293

Testing the ':' character usage in a CURIE

Test

raptor2-2.0.15/tests/rdfa11/0107.out0000644000175000017500000000000011765455733013457 00000000000000raptor2-2.0.15/tests/rdfa11/0259.xml0000644000175000017500000000271611765455733013500 00000000000000 Test 0259
Vocabulary Prefixes GRDDL MA OWL RDF RDFa RDFS RIF SKOS SKOS-XL WDR VOID WDRS XHV XML XSD
Widely Used prefixes CC CTAG DC DCTERMS FOAF GR ICAL OG REV SIOC V VCARD Schema
Vocabulary Terms DescribedBy License Role
raptor2-2.0.15/tests/rdfa11/0121.xml0000644000175000017500000000102311765455733013452 00000000000000 Test 0121

Test Case 0121 checks to make sure RDFa processors resolve the empty CURIE correctly.

Shane McCarron contributed to this test.

raptor2-2.0.15/tests/rdfa11/0017.out0000644000175000017500000000022611765455732013470 00000000000000_:x "Manu Sporny" . _:x _:y . _:y "Ralph Swick" . raptor2-2.0.15/tests/rdfa11/0258.out0000644000175000017500000000015711765455733013503 00000000000000 _:test . raptor2-2.0.15/tests/rdfa11/0030.xml0000644000175000017500000000061111765455733013453 00000000000000 Test 0030

This document is licensed under a Creative Commons License .

raptor2-2.0.15/tests/rdfa11/0264.xml0000644000175000017500000000035011765455733013464 00000000000000 Test 0264

raptor2-2.0.15/tests/rdfa11/0257.out0000644000175000017500000000016011765455733013474 00000000000000 "" . raptor2-2.0.15/tests/rdfa11/0250.xml0000644000175000017500000000050311765455733013457 00000000000000 Test 0250

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0020.out0000644000175000017500000000017611765455733013467 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0303.out0000644000175000017500000000101112416654151013445 00000000000000 . . "Not This" . . . "Gregg Kellogg" . raptor2-2.0.15/tests/rdfa11/0038.out0000644000175000017500000000015611765455733013476 00000000000000 . raptor2-2.0.15/tests/rdfa11/0013.xml0000644000175000017500000000051511765455732013456 00000000000000 Test 0013

raptor2-2.0.15/tests/rdfa11/0085.out0000644000175000017500000000047611765455733013505 00000000000000 _:a . _:a . _:a . _:a . raptor2-2.0.15/tests/rdfa11/0188.xml0000644000175000017500000000053511765455733013476 00000000000000 Test 0188

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0229.xml0000644000175000017500000000054411765455733013472 00000000000000 Test 0042
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0230.xml0000644000175000017500000000053211765455733013457 00000000000000 Test 0230
example image
raptor2-2.0.15/tests/rdfa11/0117.xml0000644000175000017500000000064611765455733013471 00000000000000 Test 0117

Mark Birbeck added this triple test.

raptor2-2.0.15/tests/rdfa11/0284.xml0000644000175000017500000000035411765455733013472 00000000000000 Test 0284 raptor2-2.0.15/tests/rdfa11/0260.out0000644000175000017500000000567411765455733013505 00000000000000 "alternate" . "appendix" . "cite" . "bookmark" . "contents" . "chapter" . "copyright" . "first" . "glossary" . "help" . "icon" . "index" . "last" . "license" . "meta" . "next" . "prev" . "previous" . "section" . "start" . "stylesheet" . "subsection" . "top" . "up" . "p3pv1" . raptor2-2.0.15/tests/rdfa11/0300.out0000644000175000017500000000016011765455733013461 00000000000000 . raptor2-2.0.15/tests/rdfa11/0297.out0000644000175000017500000000031512416654151013467 00000000000000_:bnode0 . _:bnode0 . raptor2-2.0.15/tests/rdfa11/0048.xml0000644000175000017500000000053611765455733013472 00000000000000 Test 0048

John Doe

raptor2-2.0.15/tests/rdfa11/0279.out0000644000175000017500000000026611765455733013507 00000000000000 "2012-03-18T00:00:00Z"^^ . raptor2-2.0.15/tests/rdfa11/0025.out0000644000175000017500000000044411765455733013472 00000000000000 . "Ben Adida" . raptor2-2.0.15/tests/rdfa11/0034.out0000644000175000017500000000015211765455733013466 00000000000000 . raptor2-2.0.15/tests/rdfa11/0060.out0000644000175000017500000000035411765455733013471 00000000000000 . "\u677E\u672C \u540E\u5B50" . raptor2-2.0.15/tests/rdfa11/0001.xml0000644000175000017500000000050511765455732013452 00000000000000 Test 0001

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa11/0104.xml0000644000175000017500000000104011765455733013452 00000000000000 Test 0104

The word "interfenestration" has 17 characters.

raptor2-2.0.15/tests/rdfa11/0056.out0000644000175000017500000000044711765455733013501 00000000000000 . . "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0069.out0000644000175000017500000000025611765455733013503 00000000000000 . raptor2-2.0.15/tests/rdfa11/0274.xml0000644000175000017500000000040111765455733013462 00000000000000 Test 0274 raptor2-2.0.15/tests/rdfa11/0219.out0000644000175000017500000000046711765455733013504 00000000000000 _:bnodeid1 . _:bnodeid1 "Foo" . _:bnodeid1 . raptor2-2.0.15/tests/rdfa11/0252.out0000644000175000017500000000010411765455733013465 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa11/0291.xml0000644000175000017500000000057111765455733013471 00000000000000 Test 0291

@href as subject overridden by @about

ignored raptor2-2.0.15/tests/rdfa11/0250.out0000644000175000017500000000032211765455733013465 00000000000000 . "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0304.out0000644000175000017500000000025511765455733013472 00000000000000 "Test 0304" . "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa11/0113.xml0000644000175000017500000000046611765455733013465 00000000000000 Test 0113 raptor2-2.0.15/tests/rdfa11/0190.xml0000644000175000017500000000054111765455733013464 00000000000000 Test 0190

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0050.out0000644000175000017500000000021511765455733013464 00000000000000_:a "John Doe" . _:a . raptor2-2.0.15/tests/rdfa11/0225.out0000644000175000017500000000114411765455733013472 00000000000000 _:bnodeid1 . _:bnodeid1 "Foo" . _:bnodeid1 . _:bnodeid2 . _:bnodeid2 "Bar" . _:bnodeid2 . raptor2-2.0.15/tests/rdfa11/0187.out0000644000175000017500000000042211765455733013477 00000000000000 . . "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0291.out0000644000175000017500000000012311765455733013471 00000000000000 "value" . raptor2-2.0.15/tests/rdfa11/0080.xml0000644000175000017500000000062611765455733013466 00000000000000 Test 0080

Dan Brickley

raptor2-2.0.15/tests/rdfa11/0012.out0000644000175000017500000000010411765455732013456 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa11/0302.xml0000644000175000017500000000070611765455733013462 00000000000000 Test 0302: various types of tokens in @typeof raptor2-2.0.15/tests/rdfa11/0224.xml0000644000175000017500000000046411765455733013466 00000000000000 Test 0224 raptor2-2.0.15/tests/rdfa11/0037.xml0000644000175000017500000000100111765455733013454 00000000000000 Test 0037
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0283.xml0000644000175000017500000000032411765455733013466 00000000000000 Test 0283 raptor2-2.0.15/tests/rdfa11/0126.out0000644000175000017500000000050211765455733013467 00000000000000 . . "My article" . raptor2-2.0.15/tests/rdfa11/0286.xml0000644000175000017500000000051111765455733013467 00000000000000 Test 0286 @value overrides @content in the 'data' element. raptor2-2.0.15/tests/rdfa11/0177.xml0000644000175000017500000000052111765455733013467 00000000000000 Test 0177

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0035.xml0000644000175000017500000000071411765455733013464 00000000000000 Test 0035
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0222.out0000644000175000017500000000070711765455733013473 00000000000000 _:bnodeid2 . _:bnodeid1 "Bar" . _:bnodeid1 . _:bnodeid2 "Foo" . _:bnodeid2 _:bnodeid1 . raptor2-2.0.15/tests/rdfa11/0041.xml0000644000175000017500000000100511765455733013453 00000000000000 Test 0041
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0031.xml0000644000175000017500000000060211765455733013454 00000000000000 Test 0031

The book Weaving the Web (hardcover) has the ISBN 0752820907.

raptor2-2.0.15/tests/rdfa11/0220.xml0000644000175000017500000000036111765455733013456 00000000000000 Test 0220
Foo
raptor2-2.0.15/tests/rdfa11/0202.out0000644000175000017500000000015011765455733013461 00000000000000 "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa11/0063.out0000644000175000017500000000025611765455733013475 00000000000000 . raptor2-2.0.15/tests/rdfa11/0089.out0000644000175000017500000000016711765455733013506 00000000000000 . raptor2-2.0.15/tests/rdfa11/0018.out0000644000175000017500000000023011765455733013465 00000000000000 . raptor2-2.0.15/tests/rdfa11/0223.out0000644000175000017500000000110311765455733013463 00000000000000 _:bnodeid2 . _:bnodeid1 "Bar" . _:bnodeid1 . _:bnodeid2 "Foo" . _:bnodeid2 _:bnodeid1 . "Baz" . raptor2-2.0.15/tests/rdfa11/0052.xml0000644000175000017500000000046011765455733013461 00000000000000 Test 0052

John Doe

raptor2-2.0.15/tests/rdfa11/0015.xml0000644000175000017500000000052511765455732013461 00000000000000 Test 0015

raptor2-2.0.15/tests/rdfa11/0007.out0000644000175000017500000000064611765455732013475 00000000000000 . "Portrait of Mark" . . raptor2-2.0.15/tests/rdfa11/0066.out0000644000175000017500000000023211765455733013472 00000000000000 . raptor2-2.0.15/tests/rdfa11/0299.xml0000644000175000017500000000047711765455733013506 00000000000000 Test 0299: Testing @resource=[] The Foo Document raptor2-2.0.15/tests/rdfa11/0031.out0000644000175000017500000000021211765455733013460 00000000000000 . raptor2-2.0.15/tests/rdfa11/0228.out0000644000175000017500000000023211765455733013472 00000000000000 . raptor2-2.0.15/tests/rdfa11/0271.out0000644000175000017500000000014211765455733013470 00000000000000 "This is an RDFa test" . raptor2-2.0.15/tests/rdfa11/0006.xml0000644000175000017500000000064511765455732013464 00000000000000 Test 0006

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa11/0269.out0000644000175000017500000000021111765455733013474 00000000000000 "This is an RDFa test" . raptor2-2.0.15/tests/rdfa11/0068.xml0000644000175000017500000000053111765455733013467 00000000000000 Test 0068

The previous test was Test 0067.

raptor2-2.0.15/tests/rdfa11/0021.xml0000644000175000017500000000055011765455733013455 00000000000000 Test 0021
this photo was taken by Mark Birbeck
raptor2-2.0.15/tests/rdfa11/0228.xml0000644000175000017500000000065111765455733013470 00000000000000 Test 0228
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0272.xml0000644000175000017500000000035411765455733013467 00000000000000 Test 0272 raptor2-2.0.15/tests/rdfa11/0061.xml0000644000175000017500000000075211765455733013465 00000000000000 Test 0061

This is the first chapter in a series of chapters.

raptor2-2.0.15/tests/rdfa11/0249.out0000644000175000017500000000106111765455733013476 00000000000000 _:a . _:b . _:a . _:a . _:a "Ivan Herman" . _:b . _:b . _:b "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0108.out0000644000175000017500000000030511765455733013470 00000000000000 "\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03CC\n\u03AC\u03C3\u03C0\u03C1\u03BF \u03B4\u03B9\u03AC\u03C3\u03C4\u03B7\u03BC\u03B1\n"@el . raptor2-2.0.15/tests/rdfa11/0252.xml0000644000175000017500000000050711765455733013465 00000000000000 Test 0252

raptor2-2.0.15/tests/rdfa11/0290.xml0000644000175000017500000000047011765455733013466 00000000000000 Test 0290

@href becomes subject when @property and @datatype are present

value raptor2-2.0.15/tests/rdfa11/0084.out0000644000175000017500000000126111765455733013475 00000000000000 _:a . . _:a . _:a . _:a "Ivan Herman" . . . "Dan Brickley" . raptor2-2.0.15/tests/rdfa11/0007.xml0000644000175000017500000000073111765455732013461 00000000000000 Test 0007

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa11/0071.xml0000644000175000017500000000065511765455733013470 00000000000000 Test 0071

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

raptor2-2.0.15/tests/rdfa11/0087.out0000644000175000017500000000641211765455733013503 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfa11/0117.out0000644000175000017500000000027711765455733013500 00000000000000 "Test 0117" . "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0056.xml0000644000175000017500000000061011765455733013462 00000000000000 Test 0056

Mark Birbeck

raptor2-2.0.15/tests/rdfa11/0112.xml0000644000175000017500000000055311765455733013461 00000000000000 Test 0112

not an XML Literal, whitespace preserved

raptor2-2.0.15/tests/rdfa11/0275.out0000644000175000017500000000025511765455733013501 00000000000000 "2012-03-18Z"^^ . raptor2-2.0.15/tests/rdfa11/0292.out0000644000175000017500000000025611765455733013501 00000000000000 "value one" . "value two" . raptor2-2.0.15/tests/rdfa11/0213.out0000644000175000017500000000016311765455733013467 00000000000000 "E = mc2: The Most Urgent Problem of Our Time" . raptor2-2.0.15/tests/rdfa11/0262.xml0000644000175000017500000000051211765455733013462 00000000000000 Test 0262

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa11/0198.out0000644000175000017500000000141311765455733013502 00000000000000 . "Mark Birbeck"^^ . "Mark" . "Birbeck" . raptor2-2.0.15/tests/rdfa11/0052.out0000644000175000017500000000016411765455733013471 00000000000000 . raptor2-2.0.15/tests/rdfa11/0207.xml0000644000175000017500000000132211765455733013461 00000000000000 Test 0207

Weekend off in Iona: Oct 21st to Oct 23rd. See FreeTime.Example.org for info on Iona, UK.

raptor2-2.0.15/tests/rdfa11/0029.xml0000644000175000017500000000063311765455733013467 00000000000000 Test 0029

Mark Birbeck.

raptor2-2.0.15/tests/rdfa11/0181.xml0000644000175000017500000000053611765455733013470 00000000000000 Test 0181

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0118.xml0000644000175000017500000000072211765455733013465 00000000000000 Test 0118

Check to see if parsers get confused when "" is interpreted as NULL in some chaining cases. Ben

raptor2-2.0.15/tests/rdfa11/0037.out0000644000175000017500000000014611765455733013474 00000000000000 . raptor2-2.0.15/tests/rdfa11/0033.xml0000644000175000017500000000061311765455733013460 00000000000000 Test 0033

This paper was written by Ben Adida.

raptor2-2.0.15/tests/rdfa11/0063.xml0000644000175000017500000000053111765455733013462 00000000000000 Test 0063

This is the 63rd test. The next test is #64.

raptor2-2.0.15/tests/rdfa11/0120.out0000644000175000017500000000016011765455733013461 00000000000000 "The XHTML Vocabulary Document" . raptor2-2.0.15/tests/rdfa11/0122.out0000644000175000017500000000000011765455733013454 00000000000000raptor2-2.0.15/tests/rdfa11/0260.xml0000644000175000017500000000257511765455733013473 00000000000000 Test 0259
Vocabulary Terms alternate appendix cite bookmark contents chapter copyright first glossary help icon index last license meta next prev previous section start stylesheet subsection top up p3pv1
raptor2-2.0.15/tests/rdfa11/0067.xml0000644000175000017500000000042011765455733013463 00000000000000 Test 0067

This is test #67.

raptor2-2.0.15/tests/rdfa11/0114.xml0000644000175000017500000000155111765455733013462 00000000000000 Test 0114 raptor2-2.0.15/tests/rdfa11/0222.xml0000644000175000017500000000045211765455733013461 00000000000000 Test 0222

Foo

Bar

raptor2-2.0.15/tests/rdfa11/0099.xml0000644000175000017500000000156111765455733013477 00000000000000 Test 0099

We put thirty spokes together and call it a wheel; But it is on the space where there is nothing that the usefulness of the wheel depends. We turn clay to make a vessel; But it is on the space where there is nothing that the usefulness of the vessel depends. We pierce doors and windows to make a house; And it is on these spaces where there is nothing that the usefulness of the house depends. Therefore just as we take advantage of what is, we should recognize the usefulness of what is not. Lao Tzu: Tao Te Ching

raptor2-2.0.15/tests/rdfa11/0076.out0000644000175000017500000000620111765455733013475 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfa11/0013.out0000644000175000017500000000010411765455732013457 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa11/0030.out0000644000175000017500000000023711765455733013466 00000000000000 . raptor2-2.0.15/tests/rdfa11/0258.xml0000644000175000017500000000061311765455733013471 00000000000000 Undescore Prefix is Ignored Test

Ensure that the "_" prefix is ignored.

Test

raptor2-2.0.15/tests/rdfa11/0216.xml0000644000175000017500000000231511765455733013464 00000000000000

Iván

raptor2-2.0.15/tests/rdfa11/0051.xml0000644000175000017500000000044011765455733013456 00000000000000 Test 0051

John Doe

raptor2-2.0.15/tests/rdfa11/0296.out0000644000175000017500000000374711765455733013515 00000000000000 . . "Gregg" . . . "Niklas" . . . . "St\u00E9phane" . . . . "Ivan" . . . . "Manu" . . . raptor2-2.0.15/tests/rdfa11/0238.out0000644000175000017500000000013411765455733013474 00000000000000_:s . raptor2-2.0.15/tests/rdfa11/0017.xml0000644000175000017500000000070611765455732013464 00000000000000 Test 0017

Manu Sporny knows Ralph Swick.

raptor2-2.0.15/tests/rdfa11/0057.xml0000644000175000017500000000070611765455733013471 00000000000000 Test 0057

Mark Birbeck

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0256.out0000644000175000017500000000010411765455733013471 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa11/0174.out0000644000175000017500000000011211765455733013467 00000000000000 "John Doe" . raptor2-2.0.15/tests/rdfa11/0298.out0000644000175000017500000000024011765455733013500 00000000000000_:bnodeid1 . _:bnodeid1 "Alex Milowski" . raptor2-2.0.15/tests/rdfa11/0233.xml0000644000175000017500000000054111765455733013462 00000000000000 Test 0233

John Doe

raptor2-2.0.15/tests/rdfa11/0249.xml0000644000175000017500000000077311765455733013500 00000000000000 Test 0249

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor2-2.0.15/tests/rdfa11/0106.xml0000644000175000017500000000051011765455733013455 00000000000000 Test 0106
Manu created this page.
raptor2-2.0.15/tests/rdfa11/0266.xml0000644000175000017500000000051111765455733013465 00000000000000 Test 0266 raptor2-2.0.15/tests/rdfa11/0281.out0000644000175000017500000000024711765455733013477 00000000000000 "2012"^^ . raptor2-2.0.15/tests/rdfa11/0248.xml0000644000175000017500000000075211765455733013474 00000000000000 Test 0248

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor2-2.0.15/tests/rdfa11/0023.xml0000644000175000017500000000052111765455733013455 00000000000000 Test 0023
This photo was taken by Mark Birbeck
raptor2-2.0.15/tests/rdfa11/0019.out0000644000175000017500000000016311765455733013473 00000000000000 . raptor2-2.0.15/tests/rdfa11/0253.xml0000644000175000017500000000053211765455733013464 00000000000000 Test 0108

ελληνικό άσπρο διάστημα

raptor2-2.0.15/tests/rdfa11/0015.out0000644000175000017500000000040311765455732013463 00000000000000 "Fyodor Dostoevsky" . . raptor2-2.0.15/tests/rdfa11/0235.xml0000644000175000017500000000047711765455733013474 00000000000000 Test 0235

The rdfagraph should not generate triples when looking only at the processor graph.

raptor2-2.0.15/tests/rdfa11/0183.out0000644000175000017500000000030311765455733013471 00000000000000 . "A particular agent" . raptor2-2.0.15/tests/rdfa11/0269.xml0000644000175000017500000000034511765455733013475 00000000000000 Test 0269

raptor2-2.0.15/tests/rdfa11/0263.xml0000644000175000017500000000035011765455733013463 00000000000000 Test 0263

raptor2-2.0.15/tests/rdfa11/0298.xml0000644000175000017500000000044711765455733013502 00000000000000 Test 0298: Testing @typeof and @about=[]
Alex Milowski
raptor2-2.0.15/tests/rdfa11/0140.xml0000644000175000017500000000043611765455733013462 00000000000000 Blank-node as Predicate Test

Blank Nodes are not allowed to be predicate identifiers in RDF:

Test

raptor2-2.0.15/tests/rdfa11/0077.out0000644000175000017500000000641211765455733013502 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfa11/0050.xml0000644000175000017500000000045211765455733013460 00000000000000 Test 0050

John Doe

raptor2-2.0.15/tests/rdfa11/0076.xml0000644000175000017500000000362211765455733013472 00000000000000 Test 0076

alternate appendix bookmark cite chapter contents copyright glossary help index last license meta p3pv1 role section subsection start stylesheet up

raptor2-2.0.15/tests/rdfa11/0251.xml0000644000175000017500000000047211765455733013465 00000000000000 Test 251

raptor2-2.0.15/tests/rdfa11/0197.xml0000644000175000017500000000103211765455733013467 00000000000000 Test 0197

Gregg Kellogg

Ruby

Kellogg Associates

Ruby Gem

raptor2-2.0.15/tests/rdfa11/0219.xml0000644000175000017500000000035311765455733013467 00000000000000 Test 0219

Foo

raptor2-2.0.15/tests/rdfa11/0236.out0000644000175000017500000000013211765455733013470 00000000000000_:s . raptor2-2.0.15/tests/rdfa11/0263.out0000644000175000017500000000021311765455733013470 00000000000000 . raptor2-2.0.15/tests/rdfa11/0300.xml0000644000175000017500000000050411765455733013454 00000000000000 Test 0300: Testing @resource=[] The Foo Document raptor2-2.0.15/tests/rdfa11/0059.xml0000644000175000017500000000103011765455733013462 00000000000000 Test 0059

This document was authored and published by:

  • Manu Sporny
  • Fabien Gandon
raptor2-2.0.15/tests/rdfa11/0059.out0000644000175000017500000000133411765455733013500 00000000000000 . . . . "Manu Sporny" . "Fabien Gandon" . raptor2-2.0.15/tests/rdfa11/0020.xml0000644000175000017500000000060311765455733013453 00000000000000 Test 0020
this photo was taken by Mark Birbeck
raptor2-2.0.15/tests/rdfa11/0234.xml0000644000175000017500000000064311765455733013466 00000000000000 Test 0234

describedby license role

raptor2-2.0.15/tests/rdfa11/0280.out0000644000175000017500000000027411765455733013476 00000000000000 "P2011Y06M28DT00H00M00S"^^ . raptor2-2.0.15/tests/rdfa11/0217.out0000644000175000017500000000025411765455733013474 00000000000000 "Gregg Kellogg" . . raptor2-2.0.15/tests/rdfa11/0064.out0000644000175000017500000000011711765455733013472 00000000000000_:a . raptor2-2.0.15/tests/rdfa11/0266.out0000644000175000017500000000035511765455733013502 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0038.xml0000644000175000017500000000060611765455733013467 00000000000000 Test 0038
A photo depicting Michael
raptor2-2.0.15/tests/rdfa11/0010.xml0000644000175000017500000000055211765455732013454 00000000000000 Test 0010

raptor2-2.0.15/tests/rdfa11/0107.xml0000644000175000017500000000034511765455733013464 00000000000000 Test 0107 raptor2-2.0.15/tests/rdfa11/0267.out0000644000175000017500000000035511765455733013503 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0088.out0000644000175000017500000000033411765455733013501 00000000000000 _:a . _:a . _:a "Dan Brickley" . raptor2-2.0.15/tests/rdfa11/0284.out0000644000175000017500000000026211765455733013477 00000000000000 " 2012-03-18Z"^^ . raptor2-2.0.15/tests/rdfa11/0060.xml0000644000175000017500000000055111765455733013461 00000000000000 Test 0060

松本 后子

raptor2-2.0.15/tests/rdfa11/0051.out0000644000175000017500000000041211765455733013464 00000000000000 . "John Doe" . raptor2-2.0.15/tests/rdfa11/0180.xml0000644000175000017500000000050311765455733013461 00000000000000 Test 0180

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0055.out0000644000175000017500000000045611765455733013500 00000000000000 . . raptor2-2.0.15/tests/rdfa11/0280.xml0000644000175000017500000000040511765455733013463 00000000000000 Test 0280 raptor2-2.0.15/tests/rdfa11/0232.out0000644000175000017500000000036611765455733013475 00000000000000 _:a . _:a . _:a "John Doe" . raptor2-2.0.15/tests/rdfa11/0023.out0000644000175000017500000000017411765455733013470 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa11/0079.out0000644000175000017500000000052011765455733013476 00000000000000 . . . raptor2-2.0.15/tests/rdfa11/0230.out0000644000175000017500000000024411765455733013466 00000000000000 . raptor2-2.0.15/tests/rdfa11/0289.xml0000644000175000017500000000047511765455733013503 00000000000000 Test 0289

@href becomes subject when @property and @content are present

ignored raptor2-2.0.15/tests/rdfa11/0147.xml0000644000175000017500000000034411765455733013467 00000000000000 Test

Test

raptor2-2.0.15/tests/rdfa11/0131.xml0000644000175000017500000000051211765455733013455 00000000000000 Test raptor2-2.0.15/tests/rdfa11/0077.xml0000644000175000017500000000555211765455733013477 00000000000000 Test 0077

alternate appendix bookmark cite chapter contents copyright glossary help icon index first last license meta next p3pv1 prev role section subsection start stylesheet up

raptor2-2.0.15/tests/rdfa11/0173.xml0000644000175000017500000000073711765455733013474 00000000000000 Test 0173

Just a plain literal.

raptor2-2.0.15/tests/rdfa11/0235.out0000644000175000017500000000016012416654151013455 00000000000000 "rdfagraph" . raptor2-2.0.15/tests/rdfa11/0119.out0000644000175000017500000000012211765455733013467 00000000000000 "Example Website" . raptor2-2.0.15/tests/rdfa11/0109.xml0000644000175000017500000000072711765455733013472 00000000000000 Test 0109

This is Test 0109.

raptor2-2.0.15/tests/rdfa11/0070.out0000644000175000017500000000025611765455733013473 00000000000000 . raptor2-2.0.15/tests/rdfa11/0085.xml0000644000175000017500000000112711765455733013470 00000000000000 Test 0085

Ivan Herman

Tim Berners Lee

Dan Brickley

raptor2-2.0.15/tests/rdfa11/0226.out0000644000175000017500000000141011765455733013467 00000000000000 _:bnodeid1 . _:bnodeid1 "Foo" . _:bnodeid1 . . _:bnodeid2 . _:bnodeid2 "Bar" . _:bnodeid2 . raptor2-2.0.15/tests/rdfa11/0053.out0000644000175000017500000000027711765455733013477 00000000000000 . "John Doe" . raptor2-2.0.15/tests/rdfa11/0301.xml0000644000175000017500000000045211765455733013457 00000000000000 Test 0301: Typed Property

Fizzbit

raptor2-2.0.15/tests/rdfa11/0087.xml0000644000175000017500000000353311765455733013475 00000000000000 Test 0087

alternate appendix bookmark cite chapter contents copyright glossary help icon index first last license meta next p3pv1 prev role section subsection start stylesheet up

raptor2-2.0.15/tests/rdfa11/0009.xml0000644000175000017500000000053511765455732013465 00000000000000 Test 0009

raptor2-2.0.15/tests/rdfa11/0201.out0000644000175000017500000000022311765455733013461 00000000000000 "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa11/0177.out0000644000175000017500000000011211765455733013472 00000000000000 "Ivan Herman" . raptor2-2.0.15/tests/rdfa11/0220.out0000644000175000017500000000103111765455733013460 00000000000000 . _:bnode0 . _:bnode0 . _:bnode0 . raptor2-2.0.15/tests/rdfa11/0218.out0000644000175000017500000000024711765455733013477 00000000000000 . raptor2-2.0.15/tests/rdfa11/0273.out0000644000175000017500000000025311765455733013475 00000000000000 "00:00:00Z"^^ . raptor2-2.0.15/tests/rdfa11/0278.out0000644000175000017500000000025411765455733013503 00000000000000 "2012-03-18"^^ . raptor2-2.0.15/tests/rdfa11/0049.out0000644000175000017500000000027711765455733013504 00000000000000 "John Doe" . . raptor2-2.0.15/tests/rdfa11/0026.xml0000644000175000017500000000052311765455733013462 00000000000000 Test 0026

raptor2-2.0.15/tests/rdfa11/0287.xml0000644000175000017500000000042711765455733013476 00000000000000 Test 0287 raptor2-2.0.15/tests/rdfa11/0035.out0000644000175000017500000000015211765455733013467 00000000000000 . raptor2-2.0.15/tests/rdfa11/0008.out0000644000175000017500000000023711765455732013472 00000000000000 . raptor2-2.0.15/tests/rdfa11/0265.out0000644000175000017500000000014311765455733013474 00000000000000 . raptor2-2.0.15/tests/rdfa11/0178.out0000644000175000017500000000030311765455733013475 00000000000000 . "A particular agent" . raptor2-2.0.15/tests/rdfa11/0275.xml0000644000175000017500000000032311765455733013466 00000000000000 Test 0275 raptor2-2.0.15/tests/rdfa11/0267.xml0000644000175000017500000000051511765455733013472 00000000000000 Test 0267

Ivan Herman

raptor2-2.0.15/tests/rdfa11/0012.xml0000644000175000017500000000047511765455732013462 00000000000000 Test 0012

raptor2-2.0.15/tests/rdfa11/0064.xml0000644000175000017500000000052711765455733013470 00000000000000 Test 0064

Michael knows Manu.

raptor2-2.0.15/tests/rdfa11/0231.xml0000644000175000017500000000050111765455733013454 00000000000000 Test 0231
example image
raptor2-2.0.15/tests/rdfa/0000755000175000017500000000000012425347073012256 500000000000000raptor2-2.0.15/tests/rdfa/0074.out0000644000175000017500000000014411755040762013320 00000000000000 . raptor2-2.0.15/tests/rdfa/0046.xml0000644000175000017500000000047511754557150013322 00000000000000 Test 0046

John Doe

raptor2-2.0.15/tests/rdfa/0172.xml0000644000175000017500000000053611754557212013317 00000000000000 Test 0172

A plain literal with a lang tag.

raptor2-2.0.15/tests/rdfa/0079.xml0000644000175000017500000000106211754557172013325 00000000000000 Test 0079

Ivan Herman

Tim Berners Lee

Dan Brickley

raptor2-2.0.15/tests/rdfa/0121.out0000644000175000017500000000025011755040765013312 00000000000000 "Test Case 0121" . "Shane McCarron" . raptor2-2.0.15/tests/rdfa/0001.out0000644000175000017500000000017611755040754013314 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0075.out0000644000175000017500000000017211755040762013322 00000000000000 . raptor2-2.0.15/tests/rdfa/0049.xml0000644000175000017500000000051511754557152013322 00000000000000 Test 0049

John Doe

raptor2-2.0.15/tests/rdfa/0039.xml0000644000175000017500000000072011755044367013317 00000000000000 Test 0039
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0027.out0000644000175000017500000000014011755040756013315 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0104.out0000644000175000017500000000034511755044367013322 00000000000000 _:a . _:a "17" . _:a "character" . raptor2-2.0.15/tests/rdfa/0181.out0000644000175000017500000000022711755040765013324 00000000000000 . raptor2-2.0.15/tests/rdfa/0091.xml0000644000175000017500000000077711754557177013340 00000000000000 Test 0091

A human is a bi-pedal primate. They are quite possibly one of the most confused animals residing in the Milky Way.

raptor2-2.0.15/tests/rdfa/0014.xml0000644000175000017500000000056711754557133013320 00000000000000 Test 0014

ten

raptor2-2.0.15/tests/rdfa/0111.out0000644000175000017500000000024511755040764013314 00000000000000 _:a . _:a _:b . raptor2-2.0.15/tests/rdfa/0065.out0000644000175000017500000000031111755040761013313 00000000000000_:a . _:b . _:a _:b . raptor2-2.0.15/tests/rdfa/0203.out0000644000175000017500000000015011755044367013314 00000000000000 "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa/0099.out0000644000175000017500000000115711755040763013335 00000000000000 "\n We put thirty spokes together and call it a wheel;\n But it is on the space where there is nothing that the usefulness of the wheel depends.\n We turn clay to make a vessel;\n But it is on the space where there is nothing that the usefulness of the vessel depends.\n We pierce doors and windows to make a house;\n And it is on these spaces where there is nothing that the usefulness of the house depends.\n Therefore just as we take advantage of what is, we should recognize the usefulness of what is not.\n\n Lao Tzu: Tao Te Ching" . raptor2-2.0.15/tests/rdfa/0033.out0000644000175000017500000000024411755040756013317 00000000000000 _:a . _:a "Ben Adida" . raptor2-2.0.15/tests/rdfa/0112.out0000644000175000017500000000015411755040764013314 00000000000000 "not an XML Literal,\nwhitespace preserved\n" . raptor2-2.0.15/tests/rdfa/0061.out0000644000175000017500000000025611755040760013316 00000000000000 . raptor2-2.0.15/tests/rdfa/0025.xml0000644000175000017500000000063211754557137013317 00000000000000 Test 0025

This paper was written by Ben Adida.

raptor2-2.0.15/tests/rdfa/0066.xml0000644000175000017500000000042111754557163013317 00000000000000 Test 0066

This is test #66.

raptor2-2.0.15/tests/rdfa/0006.out0000644000175000017500000000044611755040754013321 00000000000000 . . raptor2-2.0.15/tests/rdfa/0010.out0000644000175000017500000000033011755040755013305 00000000000000 . . raptor2-2.0.15/tests/rdfa/0119.xml0000644000175000017500000000070311754557207013320 00000000000000 Test 0119

The Example Website is used in many W3C tutorials.

raptor2-2.0.15/tests/rdfa/0062.out0000644000175000017500000000025611755040761013320 00000000000000 . raptor2-2.0.15/tests/rdfa/0111.xml0000644000175000017500000000051011754557204013301 00000000000000 Test 0111
raptor2-2.0.15/tests/rdfa/0041.out0000644000175000017500000000015211755040757013315 00000000000000 . raptor2-2.0.15/tests/rdfa/0207.out0000644000175000017500000000166411755040766013332 00000000000000 . "Weekend off in Iona" . "2006-10-21"^^ . "2006-10-23"^^ . . "Iona, UK" . raptor2-2.0.15/tests/rdfa/Makefile.am0000644000175000017500000001556512331300672014234 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDFa 1.0 tests # # Copyright (C) 2008-2012, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # BASE_URI=http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/ # # Manifest: # https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl # defines whether sparql ASK should return true or false for success # # Query to return all RDFA 1.0 test URIs: # # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select ?t where {?t "rdfa1.0"}' # # Query to return RDFa 1.0 tests that must return False: # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select * where {?s false; "rdfa1.0"}' # # http://rdfa.info/test-suite/test-cases/0042 # http://rdfa.info/test-suite/test-cases/0107 # http://rdfa.info/test-suite/test-cases/0122 # http://rdfa.info/test-suite/test-cases/0140 # http://rdfa.info/test-suite/test-cases/0209 # http://rdfa.info/test-suite/test-cases/0211 # http://rdfa.info/test-suite/test-cases/0258 # http://rdfa.info/test-suite/test-cases/0294 # # These all expect 0 ntriples - failure is >0 triples or ERROR CLEANFILES= \ CMakeTests.txt \ *-res.nt TEST_FILES= \ 0001.xml 0006.xml 0007.xml 0008.xml 0009.xml 0010.xml 0012.xml \ 0013.xml 0014.xml 0015.xml 0017.xml 0018.xml 0019.xml 0020.xml \ 0021.xml 0023.xml 0025.xml 0026.xml 0027.xml 0029.xml 0030.xml \ 0031.xml 0032.xml 0033.xml 0034.xml 0035.xml 0036.xml 0037.xml \ 0038.xml 0039.xml 0040.xml 0041.xml 0042.xml 0046.xml 0047.xml \ 0048.xml 0049.xml 0050.xml 0051.xml 0052.xml 0053.xml 0054.xml \ 0055.xml 0056.xml 0057.xml 0058.xml 0059.xml 0060.xml 0061.xml \ 0062.xml 0063.xml 0064.xml 0065.xml 0066.xml 0067.xml 0068.xml \ 0069.xml 0070.xml 0071.xml 0072.xml 0073.xml 0074.xml 0075.xml \ 0076.xml 0077.xml 0078.xml 0079.xml 0080.xml 0081.xml 0082.xml \ 0083.xml 0084.xml 0085.xml 0087.xml 0088.xml 0089.xml 0090.xml \ 0091.xml 0093.xml 0099.xml 0104.xml 0106.xml 0107.xml 0108.xml \ 0109.xml 0110.xml 0111.xml 0112.xml 0113.xml 0114.xml 0115.xml \ 0117.xml 0118.xml 0119.xml 0120.xml 0121.xml 0122.xml 0126.xml \ 0131.xml 0134.xml 0140.xml 0147.xml 0172.xml 0173.xml 0174.xml \ 0181.xml 0197.xml 0201.xml 0202.xml 0203.xml 0207.xml 0209.xml \ 0210.xml 0211.xml 0212.xml 0215.xml 0258.xml 0262.xml 0291.xml \ 0294.xml 0304.xml TEST_OUT_FILES = \ 0001.out 0006.out 0007.out 0008.out 0009.out 0010.out 0012.out \ 0013.out 0014.out 0015.out 0017.out 0018.out 0019.out 0020.out \ 0021.out 0023.out 0025.out 0026.out 0027.out 0029.out 0030.out \ 0031.out 0032.out 0033.out 0034.out 0035.out 0036.out 0037.out \ 0038.out 0039.out 0040.out 0041.out 0042.out 0046.out 0047.out \ 0048.out 0049.out 0050.out 0051.out 0052.out 0053.out 0054.out \ 0055.out 0056.out 0057.out 0058.out 0059.out 0060.out 0061.out \ 0062.out 0063.out 0064.out 0065.out 0066.out 0067.out 0068.out \ 0069.out 0070.out 0071.out 0072.out 0073.out 0074.out 0075.out \ 0076.out 0077.out 0078.out 0079.out 0080.out 0081.out 0082.out \ 0083.out 0084.out 0085.out 0087.out 0088.out 0089.out 0090.out \ 0091.out 0093.out 0099.out 0104.out 0106.out 0107.out 0108.out \ 0109.out 0110.out 0111.out 0112.out 0113.out 0114.out 0115.out \ 0117.out 0118.out 0119.out 0120.out 0121.out 0122.out 0126.out \ 0131.out 0134.out 0140.out 0147.out 0172.out 0173.out 0174.out \ 0181.out 0197.out 0201.out 0202.out 0203.out 0207.out 0209.out \ 0210.out 0211.out 0212.out 0215.out 0258.out 0262.out 0291.out \ 0294.out 0304.out ALL_TEST_FILES= \ $(TEST_FILES) \ $(TEST_OUT_FILES) # Expected test failures: # 0202.xml - @xml:base support in SVG # 0203.xml - @xml:base in non-root in SVG # 0294.xml - property="xml:" generates a triple but shouldn't # 0304.xml - embedded rdf/xml in SVG # (Add a space to the start of this string) EXPECTED_FAILURES=" 0202.xml 0203.xml 0294.xml 0304.xml" EXTRA_DIST = CMakeLists.txt $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) if RAPTOR_PARSER_RDFA check-local: check-rdfa else check-local: endif if MAINTAINER_MODE check_rdfa_deps = $(TEST_FILES) endif check-rdfa: build-rdfdiff build-rapper $(check_rdfa_deps) @set +e; result=0; failures=; failure_count=0; \ $(RECHO) "Testing RDFa 1.0"; \ printf 'IF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .xml` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(RAPPER) -f noNet -q -i rdfa10 -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ if test $$status1 = 2; then \ status1=0; \ fi; \ $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(RECHO) $(RAPPER) -f noNet -q -i rdfa10 -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(RECHO) $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ printf '\tRAPPER_RDFDIFF_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t"%s"\n\t)\n\n' \ rdfa.$$name \ "\$${RAPPER} -f noNet -q -i rdfa10 -I $$baseuri -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$name-res.nt \ "\$${RDFDIFF} -f ntriples -u $$baseuri -t ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out $$name-res.nt" \ >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ if test "X$$failures" != X; then \ if test "$$failures" = $(EXPECTED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ else \ echo "FAILED: Got $$failures but expected $(EXPECTED_FAILURES)"; \ result=1; \ fi; \ fi; \ set -e; exit $$result raptor2-2.0.15/tests/rdfa/0073.xml0000644000175000017500000000060611754557167013326 00000000000000 Test 0073

This article was written by Jane.

raptor2-2.0.15/tests/rdfa/0048.out0000644000175000017500000000035311755040757013327 00000000000000 . _:a . _:a "John Doe" . raptor2-2.0.15/tests/rdfa/0134.out0000644000175000017500000000021611755044367013322 00000000000000 . raptor2-2.0.15/tests/rdfa/0201.xml0000644000175000017500000000104311755044367013305 00000000000000 A yellow rectangle with sharp corners. raptor2-2.0.15/tests/rdfa/0081.out0000644000175000017500000000063311755040762013321 00000000000000_:a . _:a . _:a "Ivan Herman" . _:b . _:b . _:b "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0034.xml0000644000175000017500000000060211754557143013311 00000000000000 Test 0034
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/Makefile.in0000644000175000017500000004527212425344566014261 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor RDFa 1.0 tests # # Copyright (C) 2008-2012, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/rdfa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BASE_URI = http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/ # # Manifest: # https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl # defines whether sparql ASK should return true or false for success # # Query to return all RDFA 1.0 test URIs: # # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select ?t where {?t "rdfa1.0"}' # # Query to return RDFa 1.0 tests that must return False: # roqet -r csv -D https://raw.github.com/rdfa/rdfa-website/master/manifest.ttl -e 'select * where {?s false; "rdfa1.0"}' # # http://rdfa.info/test-suite/test-cases/0042 # http://rdfa.info/test-suite/test-cases/0107 # http://rdfa.info/test-suite/test-cases/0122 # http://rdfa.info/test-suite/test-cases/0140 # http://rdfa.info/test-suite/test-cases/0209 # http://rdfa.info/test-suite/test-cases/0211 # http://rdfa.info/test-suite/test-cases/0258 # http://rdfa.info/test-suite/test-cases/0294 # # These all expect 0 ntriples - failure is >0 triples or ERROR CLEANFILES = \ CMakeTests.txt \ *-res.nt TEST_FILES = \ 0001.xml 0006.xml 0007.xml 0008.xml 0009.xml 0010.xml 0012.xml \ 0013.xml 0014.xml 0015.xml 0017.xml 0018.xml 0019.xml 0020.xml \ 0021.xml 0023.xml 0025.xml 0026.xml 0027.xml 0029.xml 0030.xml \ 0031.xml 0032.xml 0033.xml 0034.xml 0035.xml 0036.xml 0037.xml \ 0038.xml 0039.xml 0040.xml 0041.xml 0042.xml 0046.xml 0047.xml \ 0048.xml 0049.xml 0050.xml 0051.xml 0052.xml 0053.xml 0054.xml \ 0055.xml 0056.xml 0057.xml 0058.xml 0059.xml 0060.xml 0061.xml \ 0062.xml 0063.xml 0064.xml 0065.xml 0066.xml 0067.xml 0068.xml \ 0069.xml 0070.xml 0071.xml 0072.xml 0073.xml 0074.xml 0075.xml \ 0076.xml 0077.xml 0078.xml 0079.xml 0080.xml 0081.xml 0082.xml \ 0083.xml 0084.xml 0085.xml 0087.xml 0088.xml 0089.xml 0090.xml \ 0091.xml 0093.xml 0099.xml 0104.xml 0106.xml 0107.xml 0108.xml \ 0109.xml 0110.xml 0111.xml 0112.xml 0113.xml 0114.xml 0115.xml \ 0117.xml 0118.xml 0119.xml 0120.xml 0121.xml 0122.xml 0126.xml \ 0131.xml 0134.xml 0140.xml 0147.xml 0172.xml 0173.xml 0174.xml \ 0181.xml 0197.xml 0201.xml 0202.xml 0203.xml 0207.xml 0209.xml \ 0210.xml 0211.xml 0212.xml 0215.xml 0258.xml 0262.xml 0291.xml \ 0294.xml 0304.xml TEST_OUT_FILES = \ 0001.out 0006.out 0007.out 0008.out 0009.out 0010.out 0012.out \ 0013.out 0014.out 0015.out 0017.out 0018.out 0019.out 0020.out \ 0021.out 0023.out 0025.out 0026.out 0027.out 0029.out 0030.out \ 0031.out 0032.out 0033.out 0034.out 0035.out 0036.out 0037.out \ 0038.out 0039.out 0040.out 0041.out 0042.out 0046.out 0047.out \ 0048.out 0049.out 0050.out 0051.out 0052.out 0053.out 0054.out \ 0055.out 0056.out 0057.out 0058.out 0059.out 0060.out 0061.out \ 0062.out 0063.out 0064.out 0065.out 0066.out 0067.out 0068.out \ 0069.out 0070.out 0071.out 0072.out 0073.out 0074.out 0075.out \ 0076.out 0077.out 0078.out 0079.out 0080.out 0081.out 0082.out \ 0083.out 0084.out 0085.out 0087.out 0088.out 0089.out 0090.out \ 0091.out 0093.out 0099.out 0104.out 0106.out 0107.out 0108.out \ 0109.out 0110.out 0111.out 0112.out 0113.out 0114.out 0115.out \ 0117.out 0118.out 0119.out 0120.out 0121.out 0122.out 0126.out \ 0131.out 0134.out 0140.out 0147.out 0172.out 0173.out 0174.out \ 0181.out 0197.out 0201.out 0202.out 0203.out 0207.out 0209.out \ 0210.out 0211.out 0212.out 0215.out 0258.out 0262.out 0291.out \ 0294.out 0304.out ALL_TEST_FILES = \ $(TEST_FILES) \ $(TEST_OUT_FILES) # Expected test failures: # 0202.xml - @xml:base support in SVG # 0203.xml - @xml:base in non-root in SVG # 0294.xml - property="xml:" generates a triple but shouldn't # 0304.xml - embedded rdf/xml in SVG # (Add a space to the start of this string) EXPECTED_FAILURES = " 0202.xml 0203.xml 0294.xml 0304.xml" EXTRA_DIST = CMakeLists.txt $(ALL_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper RDFDIFF = $(top_builddir)/utils/rdfdiff @MAINTAINER_MODE_TRUE@check_rdfa_deps = $(TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/rdfa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/rdfa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) build-rdfdiff: @(cd $(top_builddir)/utils ; $(MAKE) rdfdiff$(EXEEXT)) @RAPTOR_PARSER_RDFA_TRUE@check-local: check-rdfa @RAPTOR_PARSER_RDFA_FALSE@check-local: check-rdfa: build-rdfdiff build-rapper $(check_rdfa_deps) @set +e; result=0; failures=; failure_count=0; \ $(RECHO) "Testing RDFa 1.0"; \ printf 'IF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .xml` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ baseuri=$(BASE_URI)$$test; \ $(RAPPER) -f noNet -q -i rdfa10 -I $$baseuri -o ntriples $(srcdir)/$$test > $$name-res.nt 2> $$name.err; \ status1=$$?; \ if test $$status1 = 2; then \ status1=0; \ fi; \ $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt > $$name.res 2> $$name.err; \ status2=$$?; \ if test $$status1 = 0 -a $$status2 = 0; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "Triple counts: expected: `wc -l < $(srcdir)/$$name.out` got: `wc -l < $$name-res.nt` "; \ $(RECHO) $(RAPPER) -f noNet -q -i rdfa10 -I $$baseuri -o ntriples $(srcdir)/$$test '>' $$name-res.nt; \ $(RECHO) $(RDFDIFF) -f ntriples -u $$baseuri -t ntriples $(srcdir)/$$name.out $$name-res.nt '>' $$name.res; \ cat $$name.err $$name.res; \ failures="$$failures $$test"; \ failure_count=`expr $$failure_count + 1`; \ fi; \ rm -f $$name-res.nt $$name.res $$name.err; \ printf '\tRAPPER_RDFDIFF_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t"%s"\n\t)\n\n' \ rdfa.$$name \ "\$${RAPPER} -f noNet -q -i rdfa10 -I $$baseuri -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$name-res.nt \ "\$${RDFDIFF} -f ntriples -u $$baseuri -t ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out $$name-res.nt" \ >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RDFA)\n\n' >>CMakeTests.txt; \ if test "X$$failures" != X; then \ if test "$$failures" = $(EXPECTED_FAILURES); then \ echo "Ignoring expected failures"; \ result=0; \ else \ echo "FAILED: Got $$failures but expected $(EXPECTED_FAILURES)"; \ result=1; \ fi; \ fi; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/rdfa/0093.xml0000644000175000017500000000076511754557200013322 00000000000000 Test 0093
Author: Albert Einstein

E = mc2: The Most Urgent Problem of Our Time

raptor2-2.0.15/tests/rdfa/0027.xml0000644000175000017500000000055011754557140013312 00000000000000 Test 0027

Mark B.

raptor2-2.0.15/tests/rdfa/0040.out0000644000175000017500000000020111755044367013310 00000000000000 . raptor2-2.0.15/tests/rdfa/0110.xml0000644000175000017500000000044211754557203013303 00000000000000 Test 0110
raptor2-2.0.15/tests/rdfa/0042.out0000644000175000017500000000000011755044367013307 00000000000000raptor2-2.0.15/tests/rdfa/0073.out0000644000175000017500000000014411755040762013317 00000000000000 . raptor2-2.0.15/tests/rdfa/0108.xml0000644000175000017500000000053411754557202013313 00000000000000 Test 0108

ελληνικό άσπρο διάστημα

raptor2-2.0.15/tests/rdfa/0134.xml0000644000175000017500000000033211755044367013312 00000000000000 Test raptor2-2.0.15/tests/rdfa/0120.xml0000644000175000017500000000066011754557210013304 00000000000000 Test 0120

The The XHTML Vocabulary Document is the default prefix for XHTML+RDFa 1.0.

raptor2-2.0.15/tests/rdfa/0083.xml0000644000175000017500000000100411754557174013316 00000000000000 Test 0083

Ivan Herman

mailto:ivan@w3.org

Dan Brickley

raptor2-2.0.15/tests/rdfa/0080.out0000644000175000017500000000015311755040762013315 00000000000000 . raptor2-2.0.15/tests/rdfa/0109.out0000644000175000017500000000016711755040764013326 00000000000000 "Test 0109" . raptor2-2.0.15/tests/rdfa/0203.xml0000644000175000017500000000120011755044367013302 00000000000000 version="1.2" baseProfile="tiny" A yellow rectangle with sharp corners. raptor2-2.0.15/tests/rdfa/0019.xml0000644000175000017500000000052311754557135013317 00000000000000 Test 0019
raptor2-2.0.15/tests/rdfa/0262.out0000644000175000017500000000017611755044367013331 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0072.xml0000644000175000017500000000063111754557166013322 00000000000000 Test 0072

Learn more by reading the example.org Example FAQ.

raptor2-2.0.15/tests/rdfa/0062.xml0000644000175000017500000000052211754557161013313 00000000000000 Test 0062

This is unit test #62. The next unit test is #63.

raptor2-2.0.15/tests/rdfa/0075.xml0000644000175000017500000000071111754557170013317 00000000000000 Test 0075

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

raptor2-2.0.15/tests/rdfa/0093.out0000644000175000017500000000047611755040763013332 00000000000000 "Albert Einstein" . "E = mc2: The Most Urgent Problem of Our Time"^^ . raptor2-2.0.15/tests/rdfa/0084.xml0000644000175000017500000000106111754557175013323 00000000000000 Test 0084

Ivan Herman

mailto:ivan@w3.org

Dan Brickley

raptor2-2.0.15/tests/rdfa/0018.xml0000644000175000017500000000055711754557134013324 00000000000000 Test 0018

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa/0090.out0000644000175000017500000000020411755040763013314 00000000000000 . raptor2-2.0.15/tests/rdfa/0014.out0000644000175000017500000000014511755040755013315 00000000000000 "10"^^ . raptor2-2.0.15/tests/rdfa/0122.xml0000644000175000017500000000051711755044367013314 00000000000000 Test 0122

This section is contained below the main site.

raptor2-2.0.15/tests/rdfa/0131.out0000644000175000017500000000127611755044367013326 00000000000000 . . . . . raptor2-2.0.15/tests/rdfa/0039.out0000644000175000017500000000015611755044367013331 00000000000000 . raptor2-2.0.15/tests/rdfa/0082.xml0000644000175000017500000000075411754557174013330 00000000000000 Test 0082

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor2-2.0.15/tests/rdfa/0008.xml0000644000175000017500000000061211754557130013307 00000000000000 Test 0008

This document is licensed under a Creative Commons .

raptor2-2.0.15/tests/rdfa/0126.xml0000644000175000017500000000067611755044367013326 00000000000000 Test 0126

My article

raptor2-2.0.15/tests/rdfa/0057.out0000644000175000017500000000054311755040760013322 00000000000000 . . "Mark Birbeck" . "Ivan Herman" . raptor2-2.0.15/tests/rdfa/0212.out0000644000175000017500000000041411755040766013316 00000000000000 "E = mc2: The Most Urgent Problem of Our Time"^^ . raptor2-2.0.15/tests/rdfa/0021.out0000644000175000017500000000017411755040756013316 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0174.xml0000644000175000017500000000060511754557213013317 00000000000000 Test 0174

This test ensures that single-character prefixes are allowed. My name is: John Doe

raptor2-2.0.15/tests/rdfa/0074.xml0000644000175000017500000000056511754557167013333 00000000000000 Test 0074

This article was written by Jane.

raptor2-2.0.15/tests/rdfa/0058.out0000644000175000017500000000065511755040760013327 00000000000000 _:a . _:b . _:a . _:a "Mark Birbeck" . _:b . _:b "Ivan Herman" . raptor2-2.0.15/tests/rdfa/0197.out0000644000175000017500000000011111755040765013323 00000000000000 "Ruby" . raptor2-2.0.15/tests/rdfa/0070.xml0000644000175000017500000000053211754557165013317 00000000000000 Test 0070

The previous test was Test 0069.

raptor2-2.0.15/tests/rdfa/0054.out0000644000175000017500000000037411755040760013321 00000000000000 "Fabien Gandon" . "Fabien Gandon" . raptor2-2.0.15/tests/rdfa/0106.out0000644000175000017500000000016111755040763013314 00000000000000 _:a . raptor2-2.0.15/tests/rdfa/0036.out0000644000175000017500000000015211755040757013321 00000000000000 . raptor2-2.0.15/tests/rdfa/0071.out0000644000175000017500000000023411755040761013314 00000000000000 . raptor2-2.0.15/tests/rdfa/0032.out0000644000175000017500000000021211755040756013311 00000000000000 . raptor2-2.0.15/tests/rdfa/CMakeLists.txt0000644000175000017500000012406512011242611014725 00000000000000# raptor/tests/rdfa/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # IF(RAPTOR_PARSER_RDFA) RAPPER_RDFDIFF_TEST(rdfa.0001 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0001.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0001.xml" 0001-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0001.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0001.out 0001-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0006 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0006.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0006.xml" 0006-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0006.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0006.out 0006-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0007 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0007.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0007.xml" 0007-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0007.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0007.out 0007-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0008 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0008.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0008.xml" 0008-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0008.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0008.out 0008-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0009 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0009.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0009.xml" 0009-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0009.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0009.out 0009-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0010 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0010.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0010.xml" 0010-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0010.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0010.out 0010-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0012 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0012.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0012.xml" 0012-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0012.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0012.out 0012-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0013 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0013.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0013.xml" 0013-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0013.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0013.out 0013-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0014 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0014.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0014.xml" 0014-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0014.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0014.out 0014-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0015 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0015.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0015.xml" 0015-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0015.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0015.out 0015-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0017 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0017.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0017.xml" 0017-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0017.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0017.out 0017-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0018 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0018.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0018.xml" 0018-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0018.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0018.out 0018-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0019 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0019.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0019.xml" 0019-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0019.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0019.out 0019-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0020 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0020.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0020.xml" 0020-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0020.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0020.out 0020-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0021 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0021.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0021.xml" 0021-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0021.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0021.out 0021-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0023 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0023.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0023.xml" 0023-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0023.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0023.out 0023-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0025 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0025.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0025.xml" 0025-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0025.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0025.out 0025-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0026 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0026.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0026.xml" 0026-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0026.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0026.out 0026-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0027 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0027.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0027.xml" 0027-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0027.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0027.out 0027-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0029 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0029.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0029.xml" 0029-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0029.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0029.out 0029-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0030 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0030.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0030.xml" 0030-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0030.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0030.out 0030-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0031 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0031.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0031.xml" 0031-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0031.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0031.out 0031-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0032 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0032.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0032.xml" 0032-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0032.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0032.out 0032-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0033 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0033.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0033.xml" 0033-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0033.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0033.out 0033-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0034 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0034.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0034.xml" 0034-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0034.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0034.out 0034-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0035 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0035.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0035.xml" 0035-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0035.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0035.out 0035-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0036 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0036.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0036.xml" 0036-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0036.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0036.out 0036-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0037 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0037.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0037.xml" 0037-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0037.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0037.out 0037-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0038 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0038.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0038.xml" 0038-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0038.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0038.out 0038-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0039 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0039.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0039.xml" 0039-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0039.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0039.out 0039-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0040 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0040.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0040.xml" 0040-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0040.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0040.out 0040-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0041 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0041.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0041.xml" 0041-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0041.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0041.out 0041-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0042 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0042.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0042.xml" 0042-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0042.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0042.out 0042-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0046 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0046.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0046.xml" 0046-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0046.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0046.out 0046-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0047 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0047.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0047.xml" 0047-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0047.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0047.out 0047-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0048 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0048.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0048.xml" 0048-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0048.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0048.out 0048-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0049 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0049.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0049.xml" 0049-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0049.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0049.out 0049-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0050 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0050.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0050.xml" 0050-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0050.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0050.out 0050-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0051 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0051.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0051.xml" 0051-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0051.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0051.out 0051-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0052 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0052.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0052.xml" 0052-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0052.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0052.out 0052-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0053 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0053.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0053.xml" 0053-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0053.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0053.out 0053-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0054 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0054.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0054.xml" 0054-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0054.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0054.out 0054-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0055 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0055.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0055.xml" 0055-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0055.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0055.out 0055-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0056 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0056.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0056.xml" 0056-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0056.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0056.out 0056-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0057 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0057.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0057.xml" 0057-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0057.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0057.out 0057-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0058 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0058.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0058.xml" 0058-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0058.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0058.out 0058-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0059 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0059.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0059.xml" 0059-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0059.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0059.out 0059-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0060 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0060.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0060.xml" 0060-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0060.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0060.out 0060-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0061 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0061.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0061.xml" 0061-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0061.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0061.out 0061-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0062 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0062.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0062.xml" 0062-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0062.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0062.out 0062-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0063 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0063.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0063.xml" 0063-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0063.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0063.out 0063-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0064 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0064.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0064.xml" 0064-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0064.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0064.out 0064-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0065 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0065.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0065.xml" 0065-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0065.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0065.out 0065-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0066 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0066.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0066.xml" 0066-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0066.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0066.out 0066-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0067 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0067.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0067.xml" 0067-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0067.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0067.out 0067-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0068 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0068.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0068.xml" 0068-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0068.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0068.out 0068-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0069 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0069.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0069.xml" 0069-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0069.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0069.out 0069-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0070 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0070.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0070.xml" 0070-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0070.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0070.out 0070-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0071 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0071.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0071.xml" 0071-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0071.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0071.out 0071-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0072 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0072.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0072.xml" 0072-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0072.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0072.out 0072-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0073 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0073.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0073.xml" 0073-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0073.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0073.out 0073-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0074 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0074.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0074.xml" 0074-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0074.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0074.out 0074-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0075 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0075.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0075.xml" 0075-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0075.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0075.out 0075-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0076 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0076.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0076.xml" 0076-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0076.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0076.out 0076-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0077 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0077.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0077.xml" 0077-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0077.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0077.out 0077-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0078 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0078.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0078.xml" 0078-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0078.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0078.out 0078-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0079 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0079.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0079.xml" 0079-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0079.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0079.out 0079-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0080 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0080.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0080.xml" 0080-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0080.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0080.out 0080-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0081 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0081.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0081.xml" 0081-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0081.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0081.out 0081-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0082 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0082.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0082.xml" 0082-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0082.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0082.out 0082-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0083 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0083.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0083.xml" 0083-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0083.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0083.out 0083-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0084 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0084.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0084.xml" 0084-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0084.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0084.out 0084-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0085 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0085.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0085.xml" 0085-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0085.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0085.out 0085-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0087 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0087.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0087.xml" 0087-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0087.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0087.out 0087-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0088 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0088.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0088.xml" 0088-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0088.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0088.out 0088-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0089 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0089.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0089.xml" 0089-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0089.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0089.out 0089-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0090 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0090.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0090.xml" 0090-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0090.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0090.out 0090-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0091 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0091.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0091.xml" 0091-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0091.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0091.out 0091-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0093 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0093.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0093.xml" 0093-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0093.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0093.out 0093-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0099 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0099.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0099.xml" 0099-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0099.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0099.out 0099-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0104 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0104.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0104.xml" 0104-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0104.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0104.out 0104-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0106 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0106.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0106.xml" 0106-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0106.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0106.out 0106-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0107 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0107.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0107.xml" 0107-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0107.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0107.out 0107-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0108 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0108.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0108.xml" 0108-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0108.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0108.out 0108-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0109 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0109.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0109.xml" 0109-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0109.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0109.out 0109-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0110 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0110.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0110.xml" 0110-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0110.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0110.out 0110-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0111 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0111.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0111.xml" 0111-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0111.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0111.out 0111-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0112 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0112.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0112.xml" 0112-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0112.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0112.out 0112-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0113 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0113.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0113.xml" 0113-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0113.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0113.out 0113-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0114 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0114.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0114.xml" 0114-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0114.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0114.out 0114-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0115 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0115.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0115.xml" 0115-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0115.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0115.out 0115-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0117 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0117.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0117.xml" 0117-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0117.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0117.out 0117-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0118 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0118.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0118.xml" 0118-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0118.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0118.out 0118-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0119 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0119.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0119.xml" 0119-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0119.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0119.out 0119-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0120 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0120.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0120.xml" 0120-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0120.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0120.out 0120-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0121 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0121.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0121.xml" 0121-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0121.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0121.out 0121-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0122 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0122.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0122.xml" 0122-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0122.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0122.out 0122-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0126 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0126.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0126.xml" 0126-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0126.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0126.out 0126-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0131 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0131.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0131.xml" 0131-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0131.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0131.out 0131-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0134 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0134.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0134.xml" 0134-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0134.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0134.out 0134-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0140 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0140.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0140.xml" 0140-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0140.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0140.out 0140-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0147 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0147.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0147.xml" 0147-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0147.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0147.out 0147-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0172 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0172.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0172.xml" 0172-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0172.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0172.out 0172-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0173 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0173.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0173.xml" 0173-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0173.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0173.out 0173-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0174 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0174.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0174.xml" 0174-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0174.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0174.out 0174-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0181 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0181.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0181.xml" 0181-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0181.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0181.out 0181-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0197 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0197.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0197.xml" 0197-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0197.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0197.out 0197-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0201 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0201.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0201.xml" 0201-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0201.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0201.out 0201-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0202 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0202.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0202.xml" 0202-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0202.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0202.out 0202-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0203 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0203.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0203.xml" 0203-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0203.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0203.out 0203-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0207 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0207.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0207.xml" 0207-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0207.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0207.out 0207-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0209 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0209.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0209.xml" 0209-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0209.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0209.out 0209-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0210 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0210.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0210.xml" 0210-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0210.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0210.out 0210-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0211 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0211.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0211.xml" 0211-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0211.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0211.out 0211-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0212 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0212.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0212.xml" 0212-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0212.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0212.out 0212-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0215 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0215.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0215.xml" 0215-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0215.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0215.out 0215-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0258 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0258.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0258.xml" 0258-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0258.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0258.out 0258-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0262 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0262.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0262.xml" 0262-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0262.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0262.out 0262-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0291 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0291.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0291.xml" 0291-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0291.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0291.out 0291-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0294 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0294.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0294.xml" 0294-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0294.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0294.out 0294-res.nt" ) RAPPER_RDFDIFF_TEST(rdfa.0304 "${RAPPER} -f noNet -q -i rdfa10 -I http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0304.xml -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0304.xml" 0304-res.nt "${RDFDIFF} -f ntriples -u http://rdfa.info/test-suite/test-cases/xhtml1/rdfa1.0/0304.xml -t ntriples ${CMAKE_CURRENT_SOURCE_DIR}/0304.out 0304-res.nt" ) ENDIF(RAPTOR_PARSER_RDFA) # end raptor/tests/rdfa/CMakeLists.txt raptor2-2.0.15/tests/rdfa/0115.out0000644000175000017500000000065011755040764013320 00000000000000 ">" . "Ben & Co." . "@" . "@" . raptor2-2.0.15/tests/rdfa/0082.out0000644000175000017500000000106111755040762013316 00000000000000 _:a . _:b . _:a . _:a . _:a "Ivan Herman" . _:b . _:b . _:b "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0072.out0000644000175000017500000000012511755040762013315 00000000000000 "Example FAQ" . raptor2-2.0.15/tests/rdfa/0053.xml0000644000175000017500000000052211754557154013315 00000000000000 Test 0053

John Doe

raptor2-2.0.15/tests/rdfa/0081.xml0000644000175000017500000000073311754557173013323 00000000000000 Test 0081

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor2-2.0.15/tests/rdfa/0069.xml0000644000175000017500000000052011754557165013324 00000000000000 Test 0069

The next test will be Test 0070.

raptor2-2.0.15/tests/rdfa/0032.xml0000644000175000017500000000070711754557142013314 00000000000000 Test 0032

The book Weaving the Web (hardcover) has the ISBN 0752820907.

raptor2-2.0.15/tests/rdfa/0215.out0000644000175000017500000000012411755040766013317 00000000000000 "Iv\u00E1n" . raptor2-2.0.15/tests/rdfa/0068.out0000644000175000017500000000016711755040761013327 00000000000000 "Test 0067" . raptor2-2.0.15/tests/rdfa/0067.out0000644000175000017500000000016111755040761013320 00000000000000 "Test 0067" . raptor2-2.0.15/tests/rdfa/0065.xml0000644000175000017500000000113511754557162013320 00000000000000 Test 0065
Manu Sporny can be reached via email. He knows Michael.
Michael can be reached via email.
raptor2-2.0.15/tests/rdfa/0304.xml0000644000175000017500000000145311755351166013314 00000000000000 A yellow rectangle with sharp corners. Test 0304 raptor2-2.0.15/tests/rdfa/0083.out0000644000175000017500000000077311755040762013330 00000000000000 _:a . . _:a "Ivan Herman" . _:a . . "Dan Brickley" . raptor2-2.0.15/tests/rdfa/0110.out0000644000175000017500000000016111755040764013310 00000000000000 _:a . raptor2-2.0.15/tests/rdfa/0114.out0000644000175000017500000000245511755041147013320 00000000000000 . . . . . . . . raptor2-2.0.15/tests/rdfa/0026.out0000644000175000017500000000014011755040756013314 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0090.xml0000644000175000017500000000070511754557177013326 00000000000000 Test 0090
example image
raptor2-2.0.15/tests/rdfa/0054.xml0000644000175000017500000000054611754557154013324 00000000000000 Test 0054

This document was authored and published by Fabien Gandon.

raptor2-2.0.15/tests/rdfa/0036.xml0000644000175000017500000000072011754557146013317 00000000000000 Test 0036
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0009.out0000644000175000017500000000015411755040755013321 00000000000000 . raptor2-2.0.15/tests/rdfa/0029.out0000644000175000017500000000017711755040756013331 00000000000000 "Mark Birbeck"^^ . raptor2-2.0.15/tests/rdfa/0173.out0000644000175000017500000000012011755041147013310 00000000000000 "Just a plain literal." . raptor2-2.0.15/tests/rdfa/0040.xml0000644000175000017500000000064611755044367013316 00000000000000 Test 0040
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0042.xml0000644000175000017500000000054411755044367013315 00000000000000 Test 0042
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0078.xml0000644000175000017500000000073711754557171013333 00000000000000 Test 0078

Ivan Herman

mailto:ivan@w3.org

Mark Birbeck

raptor2-2.0.15/tests/rdfa/0115.xml0000644000175000017500000000076111754557206013317 00000000000000 Test 0115

Description: XML entities in the RDFa content

> Ben & Co. @ @

raptor2-2.0.15/tests/rdfa/0209.out0000644000175000017500000000000011755041147013305 00000000000000raptor2-2.0.15/tests/rdfa/0118.out0000644000175000017500000000016311755040764013322 00000000000000 "Ben" . raptor2-2.0.15/tests/rdfa/0055.xml0000644000175000017500000000060311754557155013320 00000000000000 Test 0055

This document was authored and published by Fabien Gandon.

raptor2-2.0.15/tests/rdfa/0089.xml0000644000175000017500000000057311754557176013340 00000000000000 Test 0089
example image
raptor2-2.0.15/tests/rdfa/0202.xml0000644000175000017500000000111311755044367013304 00000000000000 version="1.2" baseProfile="tiny" A yellow rectangle with sharp corners. raptor2-2.0.15/tests/rdfa/0113.out0000644000175000017500000000034011755040764013312 00000000000000 "" . "" . raptor2-2.0.15/tests/rdfa/0172.out0000644000175000017500000000013611755040765013323 00000000000000 "A plain literal with a lang tag."@en . raptor2-2.0.15/tests/rdfa/0140.out0000644000175000017500000000000011755040765013304 00000000000000raptor2-2.0.15/tests/rdfa/0091.out0000644000175000017500000000031011755040763013313 00000000000000_:a "a bi-pedal primate" . _:a "confused animal" . _:a "Milky Way" . raptor2-2.0.15/tests/rdfa/0211.out0000644000175000017500000000000011755041147013276 00000000000000raptor2-2.0.15/tests/rdfa/0088.xml0000644000175000017500000000064011754557176013332 00000000000000 Test 0088

Dan Brickley

Dan Brickley again:-)

raptor2-2.0.15/tests/rdfa/0147.out0000644000175000017500000000014411755040765013324 00000000000000 "Test" . raptor2-2.0.15/tests/rdfa/0107.out0000644000175000017500000000000011755041147013302 00000000000000raptor2-2.0.15/tests/rdfa/0121.xml0000644000175000017500000000102311754557210013277 00000000000000 Test 0121

Test Case 0121 checks to make sure RDFa processors resolve the empty CURIE correctly.

Shane McCarron contributed to this test.

raptor2-2.0.15/tests/rdfa/0017.out0000644000175000017500000000022611755044367013323 00000000000000_:x "Manu Sporny" . _:x _:y . _:y "Ralph Swick" . raptor2-2.0.15/tests/rdfa/0258.out0000644000175000017500000000015711755044367013335 00000000000000 _:test . raptor2-2.0.15/tests/rdfa/0030.xml0000644000175000017500000000061111754557141013303 00000000000000 Test 0030

This document is licensed under a Creative Commons License .

raptor2-2.0.15/tests/rdfa/0020.out0000644000175000017500000000017611755040755013316 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0038.out0000644000175000017500000000015611755040757013327 00000000000000 . raptor2-2.0.15/tests/rdfa/0013.xml0000644000175000017500000000051511754557133013310 00000000000000 Test 0013

raptor2-2.0.15/tests/rdfa/0085.out0000644000175000017500000000047611755044367013337 00000000000000 _:a . _:a . _:a . _:a . raptor2-2.0.15/tests/rdfa/0117.xml0000644000175000017500000000064611754557206013323 00000000000000 Test 0117

Mark Birbeck added this triple test.

raptor2-2.0.15/tests/rdfa/0048.xml0000644000175000017500000000053611754557151013323 00000000000000 Test 0048

John Doe

raptor2-2.0.15/tests/rdfa/0058.xml0000644000175000017500000000064611754557157013334 00000000000000 Test 0058

Mark Birbeck

Ivan Herman

raptor2-2.0.15/tests/rdfa/0025.out0000644000175000017500000000044411755040756013322 00000000000000 . "Ben Adida" . raptor2-2.0.15/tests/rdfa/0034.out0000644000175000017500000000015211755040756013316 00000000000000 . raptor2-2.0.15/tests/rdfa/0060.out0000644000175000017500000000035411755040760013314 00000000000000 . "\u677E\u672C \u540E\u5B50" . raptor2-2.0.15/tests/rdfa/0001.xml0000644000175000017500000000050511754557127013307 00000000000000 Test 0001

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa/0104.xml0000644000175000017500000000104011755044367013304 00000000000000 Test 0104

The word "interfenestration" has 17 characters.

raptor2-2.0.15/tests/rdfa/0056.out0000644000175000017500000000044711755040760013324 00000000000000 . . "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0069.out0000644000175000017500000000025611755040761013327 00000000000000 . raptor2-2.0.15/tests/rdfa/0291.xml0000644000175000017500000000057111754557220013317 00000000000000 Test 0291

@href as subject overridden by @about

ignored raptor2-2.0.15/tests/rdfa/0304.out0000644000175000017500000000025511755351166013322 00000000000000 "Test 0304" . "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa/0113.xml0000644000175000017500000000046611754557205013316 00000000000000 Test 0113 raptor2-2.0.15/tests/rdfa/0050.out0000644000175000017500000000021511755040760013307 00000000000000_:a "John Doe" . _:a . raptor2-2.0.15/tests/rdfa/0291.out0000644000175000017500000000012311755040766013322 00000000000000 "value" . raptor2-2.0.15/tests/rdfa/0080.xml0000644000175000017500000000062611754557172013322 00000000000000 Test 0080

Dan Brickley

raptor2-2.0.15/tests/rdfa/0012.out0000644000175000017500000000010411755040755013306 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa/0037.xml0000644000175000017500000000100111754557146013311 00000000000000 Test 0037
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0126.out0000644000175000017500000000050211755044367013321 00000000000000 . . "My article" . raptor2-2.0.15/tests/rdfa/0035.xml0000644000175000017500000000071411754557144013317 00000000000000 Test 0035
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0041.xml0000644000175000017500000000100511754557147013311 00000000000000 Test 0041
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0031.xml0000644000175000017500000000060211754557142013305 00000000000000 Test 0031

The book Weaving the Web (hardcover) has the ISBN 0752820907.

raptor2-2.0.15/tests/rdfa/0202.out0000644000175000017500000000015011755044367013313 00000000000000 "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa/0063.out0000644000175000017500000000025611755040761013321 00000000000000 . raptor2-2.0.15/tests/rdfa/0089.out0000644000175000017500000000016711755040763013334 00000000000000 . raptor2-2.0.15/tests/rdfa/0018.out0000644000175000017500000000023011755040755013314 00000000000000 . raptor2-2.0.15/tests/rdfa/0052.xml0000644000175000017500000000046011754557153013314 00000000000000 Test 0052

John Doe

raptor2-2.0.15/tests/rdfa/0015.xml0000644000175000017500000000052511754557134013314 00000000000000 Test 0015

raptor2-2.0.15/tests/rdfa/0007.out0000644000175000017500000000064611755040755013325 00000000000000 . "Portrait of Mark" . . raptor2-2.0.15/tests/rdfa/0066.out0000644000175000017500000000023211755040761013316 00000000000000 . raptor2-2.0.15/tests/rdfa/0215.xml0000644000175000017500000000247711754557220013322 00000000000000

Iván

raptor2-2.0.15/tests/rdfa/0031.out0000644000175000017500000000021211755040756013310 00000000000000 . raptor2-2.0.15/tests/rdfa/0006.xml0000644000175000017500000000064511754557127013321 00000000000000 Test 0006

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa/0068.xml0000644000175000017500000000053111754557164013324 00000000000000 Test 0068

The previous test was Test 0067.

raptor2-2.0.15/tests/rdfa/0047.out0000644000175000017500000000035511755040757013330 00000000000000_:a . _:a . "John Doe" . raptor2-2.0.15/tests/rdfa/0212.xml0000644000175000017500000000073211754557217013315 00000000000000 Test 0212

E = mc2: The Most Urgent Problem of Our Time

raptor2-2.0.15/tests/rdfa/0021.xml0000644000175000017500000000055011754557136013311 00000000000000 Test 0021
this photo was taken by Mark Birbeck
raptor2-2.0.15/tests/rdfa/0061.xml0000644000175000017500000000052311754557160013312 00000000000000 Test 0061

This is the first chapter in a series of chapters.

raptor2-2.0.15/tests/rdfa/0108.out0000644000175000017500000000030511755040764013317 00000000000000 "\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03CC\n\u03AC\u03C3\u03C0\u03C1\u03BF \u03B4\u03B9\u03AC\u03C3\u03C4\u03B7\u03BC\u03B1\n"@el . raptor2-2.0.15/tests/rdfa/0084.out0000644000175000017500000000126111755040763013323 00000000000000 _:a . . _:a . _:a . _:a "Ivan Herman" . . . "Dan Brickley" . raptor2-2.0.15/tests/rdfa/0007.xml0000644000175000017500000000073111754557130013310 00000000000000 Test 0007

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa/0071.xml0000644000175000017500000000065511754557166013327 00000000000000 Test 0071

This page is under a Creative Commons Attribution-No Derivatives 3.0 license.

raptor2-2.0.15/tests/rdfa/0087.out0000644000175000017500000000641211755040763013331 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfa/0117.out0000644000175000017500000000027711755040764013327 00000000000000 "Test 0117" . "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0056.xml0000644000175000017500000000061011754557155013317 00000000000000 Test 0056

Mark Birbeck

raptor2-2.0.15/tests/rdfa/0112.xml0000644000175000017500000000055311754557204013311 00000000000000 Test 0112

not an XML Literal, whitespace preserved

raptor2-2.0.15/tests/rdfa/0262.xml0000644000175000017500000000051211755044367013314 00000000000000 Test 0262

This photo was taken by Mark Birbeck.

raptor2-2.0.15/tests/rdfa/0052.out0000644000175000017500000000016411755040760013314 00000000000000 . raptor2-2.0.15/tests/rdfa/0207.xml0000644000175000017500000000132211754557215013313 00000000000000 Test 0207

Weekend off in Iona: Oct 21st to Oct 23rd. See FreeTime.Example.org for info on Iona, UK.

raptor2-2.0.15/tests/rdfa/0029.xml0000644000175000017500000000063311754557141013317 00000000000000 Test 0029

Mark Birbeck.

raptor2-2.0.15/tests/rdfa/0181.xml0000644000175000017500000000053611754557214013321 00000000000000 Test 0181

Ivan Herman

raptor2-2.0.15/tests/rdfa/0118.xml0000644000175000017500000000072211754557207013320 00000000000000 Test 0118

Check to see if parsers get confused when "" is interpreted as NULL in some chaining cases. Ben

raptor2-2.0.15/tests/rdfa/0037.out0000644000175000017500000000014611755040757013325 00000000000000 . raptor2-2.0.15/tests/rdfa/0033.xml0000644000175000017500000000061311754557143013312 00000000000000 Test 0033

This paper was written by Ben Adida.

raptor2-2.0.15/tests/rdfa/0063.xml0000644000175000017500000000053111754557161013314 00000000000000 Test 0063

This is the 63rd test. The next test is #64.

raptor2-2.0.15/tests/rdfa/0294.out0000644000175000017500000000000011755044367013320 00000000000000raptor2-2.0.15/tests/rdfa/0120.out0000644000175000017500000000016011755040764013310 00000000000000 "The XHTML Vocabulary Document" . raptor2-2.0.15/tests/rdfa/0122.out0000644000175000017500000000000011755044367013306 00000000000000raptor2-2.0.15/tests/rdfa/0067.xml0000644000175000017500000000042011754557163013317 00000000000000 Test 0067

This is test #67.

raptor2-2.0.15/tests/rdfa/0114.xml0000644000175000017500000000155111754557205013313 00000000000000 Test 0114 raptor2-2.0.15/tests/rdfa/0099.xml0000644000175000017500000000156111754557200013323 00000000000000 Test 0099

We put thirty spokes together and call it a wheel; But it is on the space where there is nothing that the usefulness of the wheel depends. We turn clay to make a vessel; But it is on the space where there is nothing that the usefulness of the vessel depends. We pierce doors and windows to make a house; And it is on these spaces where there is nothing that the usefulness of the house depends. Therefore just as we take advantage of what is, we should recognize the usefulness of what is not. Lao Tzu: Tao Te Ching

raptor2-2.0.15/tests/rdfa/0076.out0000644000175000017500000000620111755040762013322 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfa/0013.out0000644000175000017500000000010411755040755013307 00000000000000 "chat"@fr . raptor2-2.0.15/tests/rdfa/0030.out0000644000175000017500000000023711755040756013316 00000000000000 . raptor2-2.0.15/tests/rdfa/0258.xml0000644000175000017500000000061311755044367013323 00000000000000 Undescore Prefix is Ignored Test

Ensure that the "_" prefix is ignored.

Test

raptor2-2.0.15/tests/rdfa/0051.xml0000644000175000017500000000044011754557153013311 00000000000000 Test 0051

John Doe

raptor2-2.0.15/tests/rdfa/0017.xml0000644000175000017500000000070611755044367013317 00000000000000 Test 0017

Manu Sporny knows Ralph Swick.

raptor2-2.0.15/tests/rdfa/0057.xml0000644000175000017500000000070611754557156013327 00000000000000 Test 0057

Mark Birbeck

Ivan Herman

raptor2-2.0.15/tests/rdfa/0174.out0000644000175000017500000000011211755040765013317 00000000000000 "John Doe" . raptor2-2.0.15/tests/rdfa/0294.xml0000644000175000017500000000267511755044367013335 00000000000000 Test 0294

None of these triples should be generated in RDFa 1.0.

Vocabulary Prefixes GRDDL MA OWL RDF RDFa RDFS RIF SKOS SKOS-XL WDR VOID WDRS XHV XML XSD
Widely Used prefixes CC CTAG DC DCTERMS FOAF GR ICAL OG REV SIOC V VCARD Schema
Vocabulary Terms DescribedBy
raptor2-2.0.15/tests/rdfa/0106.xml0000644000175000017500000000051011754557201013302 00000000000000 Test 0106
Manu created this page.
raptor2-2.0.15/tests/rdfa/0078.out0000644000175000017500000000070511755040762013327 00000000000000 _:bnodeid1 . _:bnodeid1 "Ivan Herman" . _:bnodeid1 . _:bnodeid2 . _:bnodeid2 . _:bnodeid2 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0023.xml0000644000175000017500000000052111754557136013311 00000000000000 Test 0023
This photo was taken by Mark Birbeck
raptor2-2.0.15/tests/rdfa/0019.out0000644000175000017500000000016311755040755013322 00000000000000 . raptor2-2.0.15/tests/rdfa/0015.out0000644000175000017500000000040311755040755013313 00000000000000 "Fyodor Dostoevsky" . . raptor2-2.0.15/tests/rdfa/0047.xml0000644000175000017500000000054311754557150013317 00000000000000 Test 0047

John Doe

raptor2-2.0.15/tests/rdfa/0140.xml0000644000175000017500000000043611754557211013310 00000000000000 Blank-node as Predicate Test

Blank Nodes are not allowed to be predicate identifiers in RDF:

Test

raptor2-2.0.15/tests/rdfa/0077.out0000644000175000017500000000641211755040762013327 00000000000000 . . . . . . . . . . . . . . . . . . . . . . . . raptor2-2.0.15/tests/rdfa/0050.xml0000644000175000017500000000045211754557152013312 00000000000000 Test 0050

John Doe

raptor2-2.0.15/tests/rdfa/0076.xml0000644000175000017500000000337311754557170013327 00000000000000 Test 0076

alternate appendix bookmark cite chapter contents copyright glossary help index last license meta p3pv1 role section subsection start stylesheet up

raptor2-2.0.15/tests/rdfa/0197.xml0000644000175000017500000000103211754557214013320 00000000000000 Test 0197

Gregg Kellogg

Ruby

Kellogg Associates

Ruby Gem

raptor2-2.0.15/tests/rdfa/0210.xml0000644000175000017500000000076411754557216013317 00000000000000 Test 0210

Ivan Herman

raptor2-2.0.15/tests/rdfa/0211.xml0000644000175000017500000000061211754557217013311 00000000000000 Test 0211

Ivan Herman

raptor2-2.0.15/tests/rdfa/0059.xml0000644000175000017500000000103011754557157013321 00000000000000 Test 0059

This document was authored and published by:

  • Manu Sporny
  • Fabien Gandon
raptor2-2.0.15/tests/rdfa/0059.out0000644000175000017500000000133411755040760013323 00000000000000 . . . . "Manu Sporny" . "Fabien Gandon" . raptor2-2.0.15/tests/rdfa/0020.xml0000644000175000017500000000060311754557135013306 00000000000000 Test 0020
this photo was taken by Mark Birbeck
raptor2-2.0.15/tests/rdfa/0064.out0000644000175000017500000000011711755040761013316 00000000000000_:a . raptor2-2.0.15/tests/rdfa/0038.xml0000644000175000017500000000060611754557147013325 00000000000000 Test 0038
A photo depicting Michael
raptor2-2.0.15/tests/rdfa/0010.xml0000644000175000017500000000055211754557131013304 00000000000000 Test 0010

raptor2-2.0.15/tests/rdfa/0107.xml0000644000175000017500000000034511754557202013312 00000000000000 Test 0107 raptor2-2.0.15/tests/rdfa/0088.out0000644000175000017500000000033411755040763013327 00000000000000 _:a . _:a . _:a "Dan Brickley" . raptor2-2.0.15/tests/rdfa/0210.out0000644000175000017500000000012611755040766013314 00000000000000 "Ivan Herman" . raptor2-2.0.15/tests/rdfa/0060.xml0000644000175000017500000000055111754557160013312 00000000000000 Test 0060

松本 后子

raptor2-2.0.15/tests/rdfa/0051.out0000644000175000017500000000041211755040760013307 00000000000000 . "John Doe" . raptor2-2.0.15/tests/rdfa/0055.out0000644000175000017500000000045611755040760013323 00000000000000 . . raptor2-2.0.15/tests/rdfa/0023.out0000644000175000017500000000017411755040756013320 00000000000000 "Mark Birbeck" . raptor2-2.0.15/tests/rdfa/0079.out0000644000175000017500000000052011755040762013323 00000000000000 . . . raptor2-2.0.15/tests/rdfa/0046.out0000644000175000017500000000027311755040757013326 00000000000000_:a . _:a _:b . _:b "John Doe" . raptor2-2.0.15/tests/rdfa/0147.xml0000644000175000017500000000034411754557211013315 00000000000000 Test

Test

raptor2-2.0.15/tests/rdfa/0131.xml0000644000175000017500000000051211755044367013307 00000000000000 Test raptor2-2.0.15/tests/rdfa/0077.xml0000644000175000017500000000532311754557171013326 00000000000000 Test 0077

alternate appendix bookmark cite chapter contents copyright glossary help icon index first last license meta next p3pv1 prev role section subsection start stylesheet up

raptor2-2.0.15/tests/rdfa/0173.xml0000644000175000017500000000050211754557213013312 00000000000000 Test 0173

Just a plain literal.

raptor2-2.0.15/tests/rdfa/0209.xml0000644000175000017500000000061511754557215013321 00000000000000 Test 0209

Ivan Herman

raptor2-2.0.15/tests/rdfa/0119.out0000644000175000017500000000012211755040764013316 00000000000000 "Example Website" . raptor2-2.0.15/tests/rdfa/0109.xml0000644000175000017500000000072711754557203013321 00000000000000 Test 0109

This is Test 0109.

raptor2-2.0.15/tests/rdfa/0070.out0000644000175000017500000000025611755040761013317 00000000000000 . raptor2-2.0.15/tests/rdfa/0085.xml0000644000175000017500000000112711755044367013322 00000000000000 Test 0085

Ivan Herman

Tim Berners Lee

Dan Brickley

raptor2-2.0.15/tests/rdfa/0053.out0000644000175000017500000000027711755040760013322 00000000000000 . "John Doe" . raptor2-2.0.15/tests/rdfa/0087.xml0000644000175000017500000000353311754557175013334 00000000000000 Test 0087

alternate appendix bookmark cite chapter contents copyright glossary help icon index first last license meta next p3pv1 prev role section subsection start stylesheet up

raptor2-2.0.15/tests/rdfa/0009.xml0000644000175000017500000000053511754557131013315 00000000000000 Test 0009

raptor2-2.0.15/tests/rdfa/0201.out0000644000175000017500000000022311755044367013313 00000000000000 "A yellow rectangle with sharp corners." . raptor2-2.0.15/tests/rdfa/0049.out0000644000175000017500000000027711755040757013335 00000000000000 "John Doe" . . raptor2-2.0.15/tests/rdfa/0026.xml0000644000175000017500000000052311754557140013311 00000000000000 Test 0026

raptor2-2.0.15/tests/rdfa/0035.out0000644000175000017500000000015211755040756013317 00000000000000 . raptor2-2.0.15/tests/rdfa/0008.out0000644000175000017500000000023711755040755013322 00000000000000 . raptor2-2.0.15/tests/rdfa/0012.xml0000644000175000017500000000047511754557132013313 00000000000000 Test 0012

raptor2-2.0.15/tests/rdfa/0064.xml0000644000175000017500000000052711754557162013323 00000000000000 Test 0064

Michael knows Manu.

raptor2-2.0.15/tests/ntriples/0000755000175000017500000000000012425347072013201 500000000000000raptor2-2.0.15/tests/ntriples/test.nt0000644000175000017500000000732212246407047014447 00000000000000# # N-Triples Test Cases # Dave Beckett - http://purl.org/net/dajobe/ # # $Id$ # # comment lines # comment line after whitespace # empty blank line, then one with spaces and tabs . _:anon . _:anon . # spaces and tabs throughout: . # line ending with CR NL (ASCII 13, ASCII 10) . # 2 statement lines separated by single CR (ASCII 10) . . # All literal escapes "simple literal" . "backslash:\\" . "dquote:\"" . "newline:\n" . "return\r" . "tab:\t" . # Space is optional before final . . "x". # space is required after bnode ID before final . _:anon . # \u and \U escapes # latin small letter e with acute symbol \u00E9 - 3 UTF-8 bytes #xC3 #A9 "\u00E9" . # Euro symbol \u20ac - 3 UTF-8 bytes #xE2 #x82 #xAC "\u20AC" . # ? symbol \U0010FFFF - 4 UTF-8 bytes #xF4 #x8F #xBF #xBF "\U0010FFFF" . # extended literal syntax - parseType="Literal" (XML) ""^^ . " "^^ . "x"^^ . "\""^^ . ""^^ . "a "^^ . "a c"^^ . "a\n\nc"^^ . "chat"^^ . # resource28 removed 2003-08-03 # resource29 removed 2003-08-03 # literals with languages "chat"@fr . "chat"@en . # Datatype Literals "abc"^^ . # resource33 removed 2003-08-03 raptor2-2.0.15/tests/ntriples/nt2013-ex3.nt0000644000175000017500000000202512222044704015076 00000000000000 "That Seventies Show"^^ . # literal with XML Schema string datatype "That Seventies Show" . # same as above "That Seventies Show"@en . # literal with a language tag "Cette Série des Années Septante"@fr-be . # literal outside of ASCII range with a region subtag "This is a multi-line\nliteral with many quotes (\"\"\"\"\")\nand two apostrophes ('')." . "2"^^ . # xsd:integer "1.663E-4"^^ . # xsd:double raptor2-2.0.15/tests/ntriples/bug-577.out0000644000175000017500000000554112425333224014746 00000000000000 "escape for 1" . "escape for 2" . "escape for 3" . "escape for 4" . "escape for 5" . "escape for 6" . "escape for 7" . "escape for 8" . "escape for 9" . "escape for 10" . "escape for 11" . "escape for 12" . "escape for 13" . "escape for 14" . "escape for 15" . "escape for 16" . "escape for 17" . "escape for 18" . "escape for 19" . "escape for 20" . "escape for 21" . "escape for 22" . "escape for 23" . "escape for 24" . "escape for 25" . "escape for 26" . "escape for 27" . "escape for 28" . "escape for 29" . "escape for 30" . "escape for 31" . "escape for 123" . "escape for 125" . "escape for 124" . "escape for 94" . "escape for 96" . "escape for 92" . raptor2-2.0.15/tests/ntriples/Makefile.am0000644000175000017500000001204012425333224015144 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Triples tests # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # NT_TEST_FILES = test.nt \ nt2013-ex1.nt \ nt2013-ex2.nt \ nt2013-ex3.nt \ nt2013-ex4.nt \ bug-562.nt \ bug-574.nt \ bug-577.nt NT_OUT_FILES = test.out \ nt2013-ex1.out \ nt2013-ex2.out \ nt2013-ex3.out \ nt2013-ex4.out \ bug-562.out \ bug-574.out \ bug-577.out NT_BAD_TEST_FILES=bad-00.nt bad-02.nt bad-03.nt bad-04.nt \ bad-05.nt bad-06.nt bad-07.nt NQ_TEST_FILES=testnq-1.nq testnq-optional-context.nq bug-481.nq NQ_OUT_FILES=testnq-1.out testnq-optional-context.out bug-481.out # Used to make N-triples output consistent BASE_URI=http://librdf.org/raptor/tests/ EXTRA_DIST = \ CMakeLists.txt \ $(NT_TEST_FILES) \ $(NT_OUT_FILES) \ $(NT_BAD_TEST_FILES) \ $(NQ_TEST_FILES) \ $(NQ_OUT_FILES) CLEANFILES = CMakeTests.txt CMakeTmp.txt RAPPER = $(top_builddir)/utils/rapper build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: build-rapper \ check-nt check-bad-nt check-nq if MAINTAINER_MODE check_nt_deps = $(NT_TEST_FILES) endif check-nt: build-rapper $(check_nt_deps) @set +e; result=0; \ $(RECHO) "Testing N-Triples"; \ for test in $(NT_TEST_FILES); do \ name=`basename $$test .nt` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $(BASE_URI)$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -ne 0 ; then \ $(RECHO) "FAILED"; \ cat $$name.err; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ ntriples.$$name \ "\$${RAPPER} -q -i ntriples -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $(BASE_URI)$$test" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result if MAINTAINER_MODE check_bad_nt_deps = $(NT_BAD_TEST_FILES) endif check-bad-nt: build-rapper $(check_bad_nt_deps) @set +e; result=0; \ $(RECHO) "Testing that bad N-Triples fails"; \ for test in $(NT_BAD_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=$(BASE_URI)$$name.nt; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'ADD_TEST(%s %s) # WILL_FAIL\n' \ ntriples.$$name \ "\$${RAPPER} -q -i ntriples -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t%s\n' ntriples.$$name >>CMakeTmp.txt; \ done; \ (printf '\nSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\tPROPERTIES\n\tWILL_FAIL TRUE\n)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result if MAINTAINER_MODE check_nq_deps = $(NQ_TEST_FILES) endif check-nq: build-rapper $(check_nq_deps) @set +e; result=0; \ $(RECHO) "Testing N-Quads"; \ for test in $(NQ_TEST_FILES); do \ name=`basename $$test .nq` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $(BASE_URI)$$test > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ ntriples.$$name \ "\$${RAPPER} -q -i nquads -o nquads file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $(BASE_URI)$$test" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result print-nt-test-files: @echo $(NT_TEST_FILES) | tr ' ' '\012' raptor2-2.0.15/tests/ntriples/nt2013-ex1.out0000644000175000017500000000031112222044704015256 00000000000000 . _:subject1 "object1" . _:subject2 "object2" . raptor2-2.0.15/tests/ntriples/Makefile.in0000644000175000017500000004153012425344566015176 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor N-Triples tests # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/ntriples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ NT_TEST_FILES = test.nt \ nt2013-ex1.nt \ nt2013-ex2.nt \ nt2013-ex3.nt \ nt2013-ex4.nt \ bug-562.nt \ bug-574.nt \ bug-577.nt NT_OUT_FILES = test.out \ nt2013-ex1.out \ nt2013-ex2.out \ nt2013-ex3.out \ nt2013-ex4.out \ bug-562.out \ bug-574.out \ bug-577.out NT_BAD_TEST_FILES = bad-00.nt bad-02.nt bad-03.nt bad-04.nt \ bad-05.nt bad-06.nt bad-07.nt NQ_TEST_FILES = testnq-1.nq testnq-optional-context.nq bug-481.nq NQ_OUT_FILES = testnq-1.out testnq-optional-context.out bug-481.out # Used to make N-triples output consistent BASE_URI = http://librdf.org/raptor/tests/ EXTRA_DIST = \ CMakeLists.txt \ $(NT_TEST_FILES) \ $(NT_OUT_FILES) \ $(NT_BAD_TEST_FILES) \ $(NQ_TEST_FILES) \ $(NQ_OUT_FILES) CLEANFILES = CMakeTests.txt CMakeTmp.txt RAPPER = $(top_builddir)/utils/rapper @MAINTAINER_MODE_TRUE@check_nt_deps = $(NT_TEST_FILES) @MAINTAINER_MODE_TRUE@check_bad_nt_deps = $(NT_BAD_TEST_FILES) @MAINTAINER_MODE_TRUE@check_nq_deps = $(NQ_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/ntriples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/ntriples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: build-rapper \ check-nt check-bad-nt check-nq check-nt: build-rapper $(check_nt_deps) @set +e; result=0; \ $(RECHO) "Testing N-Triples"; \ for test in $(NT_TEST_FILES); do \ name=`basename $$test .nt` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $(BASE_URI)$$test > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -ne 0 ; then \ $(RECHO) "FAILED"; \ cat $$name.err; \ elif cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ ntriples.$$name \ "\$${RAPPER} -q -i ntriples -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $(BASE_URI)$$test" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result check-bad-nt: build-rapper $(check_bad_nt_deps) @set +e; result=0; \ $(RECHO) "Testing that bad N-Triples fails"; \ for test in $(NT_BAD_TEST_FILES); do \ name=`basename $$test .nt` ; \ baseuri=$(BASE_URI)$$name.nt; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i ntriples -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf 'ADD_TEST(%s %s) # WILL_FAIL\n' \ ntriples.$$name \ "\$${RAPPER} -q -i ntriples -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t%s\n' ntriples.$$name >>CMakeTmp.txt; \ done; \ (printf '\nSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\tPROPERTIES\n\tWILL_FAIL TRUE\n)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result check-nq: build-rapper $(check_nq_deps) @set +e; result=0; \ $(RECHO) "Testing N-Quads"; \ for test in $(NQ_TEST_FILES); do \ name=`basename $$test .nq` ; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i nquads -o nquads file:$(srcdir)/$$test $(BASE_URI)$$test > $$name.res 2>/dev/null; \ if cmp $(srcdir)/$$name.out $$name.res >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ diff $(srcdir)/$$name.out $$name.res; result=1; \ fi; \ rm -f $$name.res ; \ printf 'RAPPER_TEST(%s\n\t"%s"\n\t%s\n\t%s\n)\n\n' \ ntriples.$$name \ "\$${RAPPER} -q -i nquads -o nquads file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $(BASE_URI)$$test" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.out" >>CMakeTests.txt; \ done; \ set -e; exit $$result print-nt-test-files: @echo $(NT_TEST_FILES) | tr ' ' '\012' # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/ntriples/bug-562.nt0000644000175000017500000000013512260330735014545 00000000000000_:b . _:b _:c . raptor2-2.0.15/tests/ntriples/bad-00.nt0000644000175000017500000000003111113423026014404 00000000000000_: "blah" . raptor2-2.0.15/tests/ntriples/nt2013-ex4.out0000644000175000017500000000014412222044704015265 00000000000000_:alice _:bob . _:bob _:alice . raptor2-2.0.15/tests/ntriples/nt2013-ex2.out0000644000175000017500000000017412222044704015266 00000000000000 . raptor2-2.0.15/tests/ntriples/testnq-optional-context.nq0000644000175000017500000000024511655006661020305 00000000000000 . . raptor2-2.0.15/tests/ntriples/CMakeLists.txt0000644000175000017500000000477012011242611015651 00000000000000# raptor/tests/ntriples/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # RAPPER_TEST(ntriples.test "${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/test.nt http://librdf.org/raptor/tests/test.nt" test.res ${CMAKE_CURRENT_SOURCE_DIR}/test.out ) ADD_TEST(ntriples.bad-00 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-00.nt http://librdf.org/raptor/tests/bad-00.nt) # WILL_FAIL ADD_TEST(ntriples.bad-01 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-01.nt http://librdf.org/raptor/tests/bad-01.nt) # WILL_FAIL ADD_TEST(ntriples.bad-02 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-02.nt http://librdf.org/raptor/tests/bad-02.nt) # WILL_FAIL ADD_TEST(ntriples.bad-03 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-03.nt http://librdf.org/raptor/tests/bad-03.nt) # WILL_FAIL ADD_TEST(ntriples.bad-04 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-04.nt http://librdf.org/raptor/tests/bad-04.nt) # WILL_FAIL ADD_TEST(ntriples.bad-05 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-05.nt http://librdf.org/raptor/tests/bad-05.nt) # WILL_FAIL ADD_TEST(ntriples.bad-06 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-06.nt http://librdf.org/raptor/tests/bad-06.nt) # WILL_FAIL ADD_TEST(ntriples.bad-07 ${RAPPER} -q -i ntriples -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-07.nt http://librdf.org/raptor/tests/bad-07.nt) # WILL_FAIL SET_TESTS_PROPERTIES( ntriples.bad-00 ntriples.bad-01 ntriples.bad-02 ntriples.bad-03 ntriples.bad-04 ntriples.bad-05 ntriples.bad-06 ntriples.bad-07 PROPERTIES WILL_FAIL TRUE ) RAPPER_TEST(ntriples.testnq-1 "${RAPPER} -q -i nquads -o nquads file:${CMAKE_CURRENT_SOURCE_DIR}/testnq-1.nq http://librdf.org/raptor/tests/testnq-1.nq" testnq-1.res ${CMAKE_CURRENT_SOURCE_DIR}/testnq-1.out ) RAPPER_TEST(ntriples.testnq-optional-context "${RAPPER} -q -i nquads -o nquads file:${CMAKE_CURRENT_SOURCE_DIR}/testnq-optional-context.nq http://librdf.org/raptor/tests/testnq-optional-context.nq" testnq-optional-context.res ${CMAKE_CURRENT_SOURCE_DIR}/testnq-optional-context.out ) RAPPER_TEST(ntriples.bug-481 "${RAPPER} -q -i nquads -o nquads file:${CMAKE_CURRENT_SOURCE_DIR}/bug-481.nq http://librdf.org/raptor/tests/bug-481.nq" bug-481.res ${CMAKE_CURRENT_SOURCE_DIR}/bug-481.out ) # end raptor/tests/ntriples/CMakeLists.txt raptor2-2.0.15/tests/ntriples/nt2013-ex2.nt0000644000175000017500000000017412222044704015100 00000000000000 . raptor2-2.0.15/tests/ntriples/nt2013-ex1.nt0000644000175000017500000000036612222044704015102 00000000000000 . # comments here # or on a line by themselves _:subject1 "object1" . _:subject2 "object2" . raptor2-2.0.15/tests/ntriples/nt2013-ex4.nt0000644000175000017500000000014412222044704015077 00000000000000_:alice _:bob . _:bob _:alice . raptor2-2.0.15/tests/ntriples/bad-03.nt0000644000175000017500000000003111113423026014407 00000000000000_:a "blah . raptor2-2.0.15/tests/ntriples/bug-481.nq0000644000175000017500000000034711657561213014555 00000000000000_:httpx3Ax2Fx2Fapix2Ehi5x2Ecomx2Frestx2Fprofilex2Ffoafx2F504083723xxbnode229 "\u0102\uD838\uDF06\u0941\u04EANONGJEE\u04EA\u0941\uD838\uDF06\u0102" . raptor2-2.0.15/tests/ntriples/bad-05.nt0000644000175000017500000000011511113423026014414 00000000000000 "\U00110000" . raptor2-2.0.15/tests/ntriples/bad-07.nt0000644000175000017500000000012411472513121014422 00000000000000 xml"bar" . raptor2-2.0.15/tests/ntriples/testnq-1.out0000644000175000017500000000235612115153746015333 00000000000000 . "Alice" . _:bnode1 . _:bnode1 . _:bnode1 "Bob" . _:bnode1 . _:bnode1 . . "Bob" . . raptor2-2.0.15/tests/ntriples/bug-481.out0000644000175000017500000000034711755070143014742 00000000000000_:httpx3Ax2Fx2Fapix2Ehi5x2Ecomx2Frestx2Fprofilex2Ffoafx2F504083723xxbnode229 "\u0102\uD838\uDF06\u0941\u04EANONGJEE\u04EA\u0941\uD838\uDF06\u0102" . raptor2-2.0.15/tests/ntriples/bug-577.nt0000644000175000017500000000554612425333224014565 00000000000000 "escape for 1" . "escape for 2" . "escape for 3" . "escape for 4" . "escape for 5" . "escape for 6" . "escape for 7" . "escape for 8" . "escape for 9" . "escape for 10" . "escape for 11" . "escape for 12" . "escape for 13" . "escape for 14" . "escape for 15" . "escape for 16" . "escape for 17" . "escape for 18" . "escape for 19" . "escape for 20" . "escape for 21" . "escape for 22" . "escape for 23" . "escape for 24" . "escape for 25" . "escape for 26" . "escape for 27" . "escape for 28" . "escape for 29" . "escape for 30" . "escape for 31" . "escape for 123" . "escape for 125" . "escape for 124" . "escape for 94" . "escape for 96" . "escape for 92" . raptor2-2.0.15/tests/ntriples/bug-574.nt0000644000175000017500000000014312425333224014546 00000000000000 "SOMETHING"@zh_pinyin . raptor2-2.0.15/tests/ntriples/bad-02.nt0000644000175000017500000000003111113423026014406 00000000000000_:a . _:anon . _:anon . . . . . "simple literal" . "backslash:\\" . "dquote:\"" . "newline:\n" . "return\r" . "tab:\t" . . "x" . _:anon . "\u00E9" . "\u20AC" . "\U0010FFFF" . ""^^ . " "^^ . "x"^^ . "\""^^ . ""^^ . "a "^^ . "a c"^^ . "a\n\nc"^^ . "chat"^^ . "chat"@fr . "chat"@en . "abc"^^ . raptor2-2.0.15/tests/ntriples/bug-574.out0000644000175000017500000000014312425333224014734 00000000000000 "SOMETHING"@zh-pinyin . raptor2-2.0.15/tests/ntriples/nt2013-ex3.out0000644000175000017500000000155012222044704015266 00000000000000 "That Seventies Show"^^ . "That Seventies Show" . "That Seventies Show"@en . "Cette S\u00E9rie des Ann\u00E9es Septante"@fr-be . "This is a multi-line\nliteral with many quotes (\"\"\"\"\")\nand two apostrophes ('')." . "2"^^ . "1.663E-4"^^ . raptor2-2.0.15/tests/ntriples/bad-04.nt0000644000175000017500000000003111113423026014410 00000000000000_:a . "Alice" . _:bnode1 . _:bnode1 . _:bnode1 "Bob" . _:bnode1 . _:bnode1 . . "Bob" . . raptor2-2.0.15/tests/ntriples/bug-562.out0000644000175000017500000000013512260330735014733 00000000000000_:b . _:b _:c . raptor2-2.0.15/tests/ntriples/bad-06.nt0000644000175000017500000000015011113423026014414 00000000000000 . raptor2-2.0.15/tests/ntriples/testnq-optional-context.out0000644000175000017500000000024511655006661020476 00000000000000 . . raptor2-2.0.15/tests/empty.c0000644000175000017500000000176311556053751012574 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * empty.c - Raptor empty file test * * Copyright (C) 2004-2006, David Beckett http://purl.org/net/dajobe/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #include int main(int argc, char *argv[]); int main(int argc, char *argv[]) { return 0; } raptor2-2.0.15/tests/feeds/0000755000175000017500000000000012425347074012431 500000000000000raptor2-2.0.15/tests/feeds/test01.rdf0000644000175000017500000000315311170016742014157 00000000000000 example feed with 1 item atomic title 2006-03-28T20:57:15Z example example@example.com http://example.com/ http://example.org/whatsnew 2006-03-28T17:05:01-05:00 Original blog item title 2006-03 rss:description here
The atom:summary description including tags over several lines.
atomic blog item title http://example.org/2006/03/28/blog-item 2006-03-28T20:57:15Z 2006-03-28T20:57:15Z Example
raptor2-2.0.15/tests/feeds/test04-result.ttl0000644000175000017500000000412611303121536015523 00000000000000@prefix rdf: . @prefix rss091: . @prefix rss: . @prefix dc: . @prefix content: . @prefix atom: . <2006/04/01/More-Stuff> dc:date "2006-04-01T08:03:19-05:00" ; rss:link "http://www.example.org/blog/2006/04/01/More-Stuff" ; rss:title "More stuff" ; a rss:item ; atom:content "
More stuff
" ; atom:id ; atom:link [ a atom:Link ; atom:href <2006/04/01/More-Stuff> ] ; atom:title "More stuff" ; atom:updated "2006-04-01T08:03:19-05:00" . <2006/04/02/Blah-Blah> dc:date "2006-04-02T07:06:12-04:00" ; rss:description "Blah blah summary." ; rss:link "http://www.example.org/blog/2006/04/02/Blah-Blah" ; content:encoded "Blah blah summary." ; rss:title "Blah Blah" ; a rss:item ; atom:content "

Blah blah

" ; atom:id ; atom:link [ a atom:Link ; atom:href <2006/04/02/Blah-Blah> ] ; atom:summary "Blah blah summary." ; atom:title "Blah Blah" ; atom:updated "2006-04-02T07:06:12-04:00" . dc:date "2006-04-02T22:15:25-04:00" ; rss:items [ rdf:_1 <2006/04/02/Blah-Blah> ; rdf:_2 <2006/04/01/More-Stuff> ; a rdf:Seq ] ; rss:link "http://www.example.org/blog/index.atom" ; rss:title "Kim Doe" ; a rss:channel ; atom:author [ a atom:Author ; atom:email "me@example.org" ; atom:name "Kim Doe" ; atom:uri "http://www.example.org/blog/" ] ; atom:id ; atom:link [ a atom:Link ; atom:href ; atom:rel "self" ], [ a atom:Link ; atom:href <> ] ; atom:subtitle "Blog subtitle" ; atom:title "Kim Doe" ; atom:updated "2006-04-02T22:15:25-04:00" . raptor2-2.0.15/tests/feeds/test04.atom0000644000175000017500000000314311203022666014345 00000000000000 http://www.example.org/blog/index.atom Kim Doe Blog subtitle Kim Doe me@example.org http://www.example.org/blog/ 2006-04-02T22:15:25-04:00 tag:example.org,2004:2217 Blah Blah

Blah blah

Blah blah summary. 2006-04-02T07:06:12-04:00
tag:example.org,2004:2216 More stuff
More stuff
2006-04-01T08:03:19-05:00
raptor2-2.0.15/tests/feeds/test03-result.atom0000644000175000017500000000727112244506702015672 00000000000000 http://example.org/whatsnew example feed with 3 items 2006-03-28T20:57:15Z bob@bob.com unknown http://bob.com/ atom:id atom:updated atom:rights atom:title atom:summary atom:id atom:updated atom:rights atom:title atom:summary rss091:pubDate rss:description http://example.org/2006/03/03/blog-item blog item title 2006-02 2006-03-03T23:59:59Z
a literal XML atom:content with tags and newlines
the summary of the item
http://example.org/2006/02/02/blog-item blog item title 2006-02 2006-02-02T00:00:02Z
a content:encoded description with tags and newlines
http://example.org/2006/01/01/blog-item blog item title 2006-01 2006-01-01T00:00:01Z
The atom:summary description including tags over several lines.
http://example.org/2005/12/12/blog-item blog item title 2005-12 2005-12-12T00:00:00Z the rss description
raptor2-2.0.15/tests/feeds/Makefile.am0000644000175000017500000002004112237236250014374 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Feed tests # # Copyright (C) 2009, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # Input RDF/XML (atom model) files - rdfxml parser TEST_IN_RDF_ATOMS= test01.rdf test02.rdf test03.rdf # Input Atom 1.0 (atom model) files - rss-tag-soup parser TEST_IN_ATOMS= test04.atom test05.atom # Output files in Turtle (after parsing) and Atom (after serializing) OUT_RDF_TTLS= $(TEST_IN_RDF_ATOMS:.rdf=.ttl) OUT_ATOM_TTLS= $(TEST_IN_ATOMS:.atom=.ttl) OUT_RDF_ATOMS= $(TEST_IN_RDF_ATOMS:.rdf=.atom) # Expected results for above EXPECTED_TTLS= $(OUT_RDF_TTLS:.ttl=-result.ttl) $(OUT_ATOM_TTLS:.ttl=-result.ttl) EXPECTED_ATOMS= $(OUT_RDF_ATOMS:.atom=-result.atom) # Files generated during testing (to delete/clean) OUT_TTLS = $(OUT_RDF_TTLS) $(OUT_ATOM_TTLS) OUT_ATOMS = $(OUT_RDF_ATOMS) EXTRA_DIST = \ CMakeLists.txt \ $(TEST_IN_RDF_ATOMS) $(TEST_IN_ATOMS) \ $(EXPECTED_TTLS) $(EXPECTED_ATOMS) \ atom.rng atom.rnc CLEANFILES = $(OUT_ATOMS) $(OUT_TTLS) CMakeTests.txt errors.log RAPPER = $(top_builddir)/utils/rapper # http://www.thaiopensource.com/relaxng/trang.html TRANG = trang build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) FEED_TESTS= if RAPTOR_PARSER_RDFXML FEED_TESTS += check-rdfxml-to-turtle endif if RAPTOR_PARSER_RSS FEED_TESTS += check-atom-to-turtle endif if RAPTOR_SERIALIZER_ATOM FEED_TESTS += check-serialize-atom endif if MAINTAINER_MODE FEED_TESTS += check-validate-atom endif check-local: build-rapper $(FEED_TESTS) if MAINTAINER_MODE check_rdfxml_to_turtle_deps = $(TEST_IN_RDF_ATOMS) endif # Parse from RDF/XML and Serialize to Turtle check-rdfxml-to-turtle: $(check_rdfxml_to_turtle_deps) @set +e; result=0; \ $(RECHO) "Testing RDF/XML to Turtle"; \ printf 'IF(RAPTOR_PARSER_RDFXML)\n\n' >>CMakeTests.txt; \ for test in $(TEST_IN_RDF_ATOMS); do \ parser=rdfxml; \ name=`basename $$test .rdf` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ feeds.$$test \ "\$${RAPPER} $$opts file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$turtle \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$expected" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RDFXML)\n\n' >>CMakeTests.txt; \ set -e; exit $$result if MAINTAINER_MODE check_atom_to_turtle_deps = $(TEST_IN_ATOMS) endif # Parser from Atom and Serialize to Turtle check-atom-to-turtle: $(check_atom_to_turtle_deps) @set +e; result=0; \ $(RECHO) "Testing Atom to Turtle"; \ printf 'IF(RAPTOR_PARSER_RSS)\n\n' >>CMakeTests.txt; \ for test in $(TEST_IN_ATOMS); do \ parser=rss-tag-soup; \ name=`basename $$test .atom` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ baseuri="http://www.example.org/blog/"; \ if test $$name = test04; then \ baseuri="http://www.example.org/blog/"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ feeds.$$test \ "\$${RAPPER} $$opts file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$turtle \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$expected" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RSS)\n\n' >>CMakeTests.txt; \ set -e; exit $$result if MAINTAINER_MODE check_serialize_atom_deps = $(OUT_RDF_TTLS) endif # Parser from Turtle and Serialize to Atom check-serialize-atom: $(check_serialize_atom_deps) @set +e; result=0; \ $(RECHO) "Testing Turtle to Atom XML"; \ printf 'IF(RAPTOR_SERIALIZER_ATOM)\n\n' >>CMakeTests.txt; \ for test in $(OUT_RDF_TTLS); do \ name=`basename $$test .ttl` ; \ atom="$$name.atom"; \ expected="$$name-result.atom"; \ opts="-f writeBaseURI=0 -f rssTriples=atom-triples"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ opts="$$opts -f atomEntryUri=http://example.org/2006/03/28/blog-item"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i turtle -o atom $$opts -I $$baseuri -O $$baseuri"; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) $$opts file:$$test > $$atom 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; \ $(RECHO) "$(RAPPER) $$opts file:$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$atom >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$atom; result=1; \ fi; \ rm -f errors.log ; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ feeds.$$test \ "\$${RAPPER} $$opts file:$$test" \ $$atom \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$expected" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_SERIALIZER_ATOM)\n\n' >>CMakeTests.txt; \ set -e; exit $$result if MAINTAINER_MODE SUFFIXES = .rng .rnc .rnc.rng: $(TRANG) $< $@ check-validate-atom: $(srcdir)/atom.rng $(OUT_ATOMS) $(TEST_IN_ATOMS) @set +e; result=0; \ if test "X$(JING)" = X; then \ $(RECHO) "WARNING: Skipping feed validation RelaxNG tests - jing is missing"; \ else \ $(RECHO) "Validating Atom XML with RelaxNG"; \ for atom in $(OUT_ATOMS) $(TEST_IN_ATOMS); do \ test -f $$atom || atom=$(srcdir)/$$atom; \ $(RECHO) $(RECHO_N) "Validating $$atom $(RECHO_C)"; \ $(JING) $(srcdir)/atom.rng $$atom > errors.log 2>&1; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; result=1; \ $(RECHO) $(JING) $(srcdir)/atom.rng $$atom; \ sed -e "s,^.*$$atom,$$atom," errors.log ; \ result=1 ; \ else \ $(RECHO) "ok"; \ fi; \ rm -f errors.log; \ printf '\tADD_TEST(%s %s)\n' \ feeds.jing-$$atom \ "\$${JING} \$${CMAKE_CURRENT_SOURCE_DIR}/atom.rng $$atom" >>CMakeTests.txt; \ done; \ fi; \ set -e; exit $$result endif raptor2-2.0.15/tests/feeds/Makefile.in0000644000175000017500000005077712425344566014441 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor Feed tests # # Copyright (C) 2009, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @RAPTOR_PARSER_RDFXML_TRUE@am__append_1 = check-rdfxml-to-turtle @RAPTOR_PARSER_RSS_TRUE@am__append_2 = check-atom-to-turtle @RAPTOR_SERIALIZER_ATOM_TRUE@am__append_3 = check-serialize-atom @MAINTAINER_MODE_TRUE@am__append_4 = check-validate-atom subdir = tests/feeds DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Input RDF/XML (atom model) files - rdfxml parser TEST_IN_RDF_ATOMS = test01.rdf test02.rdf test03.rdf # Input Atom 1.0 (atom model) files - rss-tag-soup parser TEST_IN_ATOMS = test04.atom test05.atom # Output files in Turtle (after parsing) and Atom (after serializing) OUT_RDF_TTLS = $(TEST_IN_RDF_ATOMS:.rdf=.ttl) OUT_ATOM_TTLS = $(TEST_IN_ATOMS:.atom=.ttl) OUT_RDF_ATOMS = $(TEST_IN_RDF_ATOMS:.rdf=.atom) # Expected results for above EXPECTED_TTLS = $(OUT_RDF_TTLS:.ttl=-result.ttl) $(OUT_ATOM_TTLS:.ttl=-result.ttl) EXPECTED_ATOMS = $(OUT_RDF_ATOMS:.atom=-result.atom) # Files generated during testing (to delete/clean) OUT_TTLS = $(OUT_RDF_TTLS) $(OUT_ATOM_TTLS) OUT_ATOMS = $(OUT_RDF_ATOMS) EXTRA_DIST = \ CMakeLists.txt \ $(TEST_IN_RDF_ATOMS) $(TEST_IN_ATOMS) \ $(EXPECTED_TTLS) $(EXPECTED_ATOMS) \ atom.rng atom.rnc CLEANFILES = $(OUT_ATOMS) $(OUT_TTLS) CMakeTests.txt errors.log RAPPER = $(top_builddir)/utils/rapper # http://www.thaiopensource.com/relaxng/trang.html TRANG = trang FEED_TESTS = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) @MAINTAINER_MODE_TRUE@check_rdfxml_to_turtle_deps = $(TEST_IN_RDF_ATOMS) @MAINTAINER_MODE_TRUE@check_atom_to_turtle_deps = $(TEST_IN_ATOMS) @MAINTAINER_MODE_TRUE@check_serialize_atom_deps = $(OUT_RDF_TTLS) @MAINTAINER_MODE_TRUE@SUFFIXES = .rng .rnc all: all-am .SUFFIXES: .SUFFIXES: .rng .rnc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/feeds/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/feeds/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) check-local: build-rapper $(FEED_TESTS) # Parse from RDF/XML and Serialize to Turtle check-rdfxml-to-turtle: $(check_rdfxml_to_turtle_deps) @set +e; result=0; \ $(RECHO) "Testing RDF/XML to Turtle"; \ printf 'IF(RAPTOR_PARSER_RDFXML)\n\n' >>CMakeTests.txt; \ for test in $(TEST_IN_RDF_ATOMS); do \ parser=rdfxml; \ name=`basename $$test .rdf` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ feeds.$$test \ "\$${RAPPER} $$opts file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$turtle \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$expected" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RDFXML)\n\n' >>CMakeTests.txt; \ set -e; exit $$result # Parser from Atom and Serialize to Turtle check-atom-to-turtle: $(check_atom_to_turtle_deps) @set +e; result=0; \ $(RECHO) "Testing Atom to Turtle"; \ printf 'IF(RAPTOR_PARSER_RSS)\n\n' >>CMakeTests.txt; \ for test in $(TEST_IN_ATOMS); do \ parser=rss-tag-soup; \ name=`basename $$test .atom` ; \ turtle="$$name.ttl"; \ expected="$$name-result.ttl"; \ opts="-f writeBaseURI=0"; \ baseuri="http://www.example.org/blog/"; \ if test $$name = test04; then \ baseuri="http://www.example.org/blog/"; \ fi; \ opts="-q -i $$parser -o turtle $$opts -O $$baseuri"; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) $$opts file:$(srcdir)/$$test > $$turtle 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$turtle >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$turtle; result=1; \ fi; \ rm -f errors.log ; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ feeds.$$test \ "\$${RAPPER} $$opts file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test" \ $$turtle \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$expected" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_RSS)\n\n' >>CMakeTests.txt; \ set -e; exit $$result # Parser from Turtle and Serialize to Atom check-serialize-atom: $(check_serialize_atom_deps) @set +e; result=0; \ $(RECHO) "Testing Turtle to Atom XML"; \ printf 'IF(RAPTOR_SERIALIZER_ATOM)\n\n' >>CMakeTests.txt; \ for test in $(OUT_RDF_TTLS); do \ name=`basename $$test .ttl` ; \ atom="$$name.atom"; \ expected="$$name-result.atom"; \ opts="-f writeBaseURI=0 -f rssTriples=atom-triples"; \ if test $$name = test01; then \ baseuri="http://example.org/whatsnew"; \ opts="$$opts -f atomEntryUri=http://example.org/2006/03/28/blog-item"; \ elif test $$name = test02; then \ baseuri="http://example.org/news/"; \ elif test $$name = test03; then \ baseuri="http://example.org"; \ fi; \ opts="-q -i turtle -o atom $$opts -I $$baseuri -O $$baseuri"; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) $$opts file:$$test > $$atom 2> errors.log; \ status=$$?; \ if test $$status != 0; then \ $(RECHO) "FAILED with code $$status"; \ $(RECHO) "$(RAPPER) $$opts file:$$test"; \ cat errors.log ; \ result=1 ; \ elif cmp $(srcdir)/$$expected $$atom >/dev/null 2>&1; then \ $(RECHO) "ok"; \ else \ $(RECHO) "FAILED"; \ $(RECHO) "$(RAPPER) $$opts file:$(srcdir)/$$test"; \ diff -u $(srcdir)/$$expected $$atom; result=1; \ fi; \ rm -f errors.log ; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ feeds.$$test \ "\$${RAPPER} $$opts file:$$test" \ $$atom \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$expected" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_SERIALIZER_ATOM)\n\n' >>CMakeTests.txt; \ set -e; exit $$result @MAINTAINER_MODE_TRUE@.rnc.rng: @MAINTAINER_MODE_TRUE@ $(TRANG) $< $@ @MAINTAINER_MODE_TRUE@check-validate-atom: $(srcdir)/atom.rng $(OUT_ATOMS) $(TEST_IN_ATOMS) @MAINTAINER_MODE_TRUE@ @set +e; result=0; \ @MAINTAINER_MODE_TRUE@ if test "X$(JING)" = X; then \ @MAINTAINER_MODE_TRUE@ $(RECHO) "WARNING: Skipping feed validation RelaxNG tests - jing is missing"; \ @MAINTAINER_MODE_TRUE@ else \ @MAINTAINER_MODE_TRUE@ $(RECHO) "Validating Atom XML with RelaxNG"; \ @MAINTAINER_MODE_TRUE@ for atom in $(OUT_ATOMS) $(TEST_IN_ATOMS); do \ @MAINTAINER_MODE_TRUE@ test -f $$atom || atom=$(srcdir)/$$atom; \ @MAINTAINER_MODE_TRUE@ $(RECHO) $(RECHO_N) "Validating $$atom $(RECHO_C)"; \ @MAINTAINER_MODE_TRUE@ $(JING) $(srcdir)/atom.rng $$atom > errors.log 2>&1; \ @MAINTAINER_MODE_TRUE@ status=$$?; \ @MAINTAINER_MODE_TRUE@ if test $$status != 0; then \ @MAINTAINER_MODE_TRUE@ $(RECHO) "FAILED with code $$status"; result=1; \ @MAINTAINER_MODE_TRUE@ $(RECHO) $(JING) $(srcdir)/atom.rng $$atom; \ @MAINTAINER_MODE_TRUE@ sed -e "s,^.*$$atom,$$atom," errors.log ; \ @MAINTAINER_MODE_TRUE@ result=1 ; \ @MAINTAINER_MODE_TRUE@ else \ @MAINTAINER_MODE_TRUE@ $(RECHO) "ok"; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ rm -f errors.log; \ @MAINTAINER_MODE_TRUE@ printf '\tADD_TEST(%s %s)\n' \ @MAINTAINER_MODE_TRUE@ feeds.jing-$$atom \ @MAINTAINER_MODE_TRUE@ "\$${JING} \$${CMAKE_CURRENT_SOURCE_DIR}/atom.rng $$atom" >>CMakeTests.txt; \ @MAINTAINER_MODE_TRUE@ done; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/feeds/atom.rnc0000644000175000017500000001524311032060324014001 00000000000000# -*- rnc -*- # RELAX NG Compact Syntax Grammar for the # Atom Format Specification Version 11 namespace atom = "http://www.w3.org/2005/Atom" namespace xhtml = "http://www.w3.org/1999/xhtml" namespace s = "http://www.ascc.net/xml/schematron" namespace local = "" start = atomFeed | atomEntry # Common attributes atomCommonAttributes = attribute xml:base { atomUri }?, attribute xml:lang { atomLanguageTag }?, undefinedAttribute* # Text Constructs atomPlainTextConstruct = atomCommonAttributes, attribute type { "text" | "html" }?, text atomXHTMLTextConstruct = atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct # Person Construct atomPersonConstruct = atomCommonAttributes, (element atom:name { text } & element atom:uri { atomUri }? & element atom:email { atomEmailAddress }? & extensionElement*) # Date Construct atomDateConstruct = atomCommonAttributes, xsd:dateTime # atom:feed atomFeed = [ s:rule [ context = "atom:feed" s:assert [ test = "atom:author or not(atom:entry[not(atom:author)])" "An atom:feed must have an atom:author unless all " ~ "of its atom:entry children have an atom:author." ] ] ] element atom:feed { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId & atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle & atomUpdated & extensionElement*), atomEntry* } # atom:entry atomEntry = [ s:rule [ context = "atom:entry" s:assert [ test = "atom:link[@rel='alternate'] " ~ "or atom:link[not(@rel)] " ~ "or atom:content" "An atom:entry must have at least one atom:link element " ~ "with a rel attribute of 'alternate' " ~ "or an atom:content." ] ] s:rule [ context = "atom:entry" s:assert [ test = "atom:author or " ~ "../atom:author or atom:source/atom:author" "An atom:entry must have an atom:author " ~ "if its feed does not." ] ] ] element atom:entry { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContent? & atomContributor* & atomId & atomLink* & atomPublished? & atomRights? & atomSource? & atomSummary? & atomTitle & atomUpdated & extensionElement*) } # atom:content atomInlineTextContent = element atom:content { atomCommonAttributes, attribute type { "text" | "html" }?, (text)* } atomInlineXHTMLContent = element atom:content { atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv } atomInlineOtherContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, (text|anyElement)* } atomOutOfLineContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, attribute src { atomUri }, empty } atomContent = atomInlineTextContent | atomInlineXHTMLContent | atomInlineOtherContent | atomOutOfLineContent # atom:author atomAuthor = element atom:author { atomPersonConstruct } # atom:category atomCategory = element atom:category { atomCommonAttributes, attribute term { text }, attribute scheme { atomUri }?, attribute label { text }?, undefinedContent } # atom:contributor atomContributor = element atom:contributor { atomPersonConstruct } # atom:generator atomGenerator = element atom:generator { atomCommonAttributes, attribute uri { atomUri }?, attribute version { text }?, text } # atom:icon atomIcon = element atom:icon { atomCommonAttributes, (atomUri) } # atom:id atomId = element atom:id { atomCommonAttributes, (atomUri) } # atom:logo atomLogo = element atom:logo { atomCommonAttributes, (atomUri) } # atom:link atomLink = element atom:link { atomCommonAttributes, attribute href { atomUri }, attribute rel { atomNCName | atomUri }?, attribute type { atomMediaType }?, attribute hreflang { atomLanguageTag }?, attribute title { text }?, attribute length { text }?, undefinedContent } # atom:published atomPublished = element atom:published { atomDateConstruct } # atom:rights atomRights = element atom:rights { atomTextConstruct } # atom:source atomSource = element atom:source { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId? & atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle? & atomUpdated? & extensionElement*) } # atom:subtitle atomSubtitle = element atom:subtitle { atomTextConstruct } # atom:summary atomSummary = element atom:summary { atomTextConstruct } # atom:title atomTitle = element atom:title { atomTextConstruct } # atom:updated atomUpdated = element atom:updated { atomDateConstruct } # Low-level simple types atomNCName = xsd:string { minLength = "1" pattern = "[^:]*" } # Whatever a media type is, it contains at least one slash atomMediaType = xsd:string { pattern = ".+/.+" } # As defined in RFC 3066 atomLanguageTag = xsd:string { pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" } # Unconstrained; it's not entirely clear how IRI fit into # xsd:anyURI so let's not try to constrain it here atomUri = text # Whatever an email address is, it contains at least one @ atomEmailAddress = xsd:string { pattern = ".+@.+" } # Simple Extension simpleExtensionElement = element * - atom:* { text } # Structured Extension structuredExtensionElement = element * - atom:* { (attribute * { text }+, (text|anyElement)*) | (attribute * { text }*, (text?, anyElement+, (text|anyElement)*)) } # Other Extensibility extensionElement = simpleExtensionElement | structuredExtensionElement undefinedAttribute = attribute * - (xml:base | xml:lang | local:*) { text } undefinedContent = (text|anyForeignElement)* anyElement = element * { (attribute * { text } | text | anyElement)* } anyForeignElement = element * - atom:* { (attribute * { text } | text | anyElement)* } # XHTML anyXHTML = element xhtml:* { (attribute * { text } | text | anyXHTML)* } xhtmlDiv = element xhtml:div { (attribute * { text } | text | anyXHTML)* } raptor2-2.0.15/tests/feeds/CMakeLists.txt0000644000175000017500000000537412011242611015100 00000000000000# raptor/tests/feeds/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # IF(RAPTOR_PARSER_RDFXML) RAPPER_TEST(feeds.test01.rdf "${RAPPER} -q -i rdfxml -o turtle -f writeBaseURI=0 -O http://example.org/whatsnew file:${CMAKE_CURRENT_SOURCE_DIR}/test01.rdf" test01.ttl ${CMAKE_CURRENT_SOURCE_DIR}/test01-result.ttl ) RAPPER_TEST(feeds.test02.rdf "${RAPPER} -q -i rdfxml -o turtle -f writeBaseURI=0 -O http://example.org/news/ file:${CMAKE_CURRENT_SOURCE_DIR}/test02.rdf" test02.ttl ${CMAKE_CURRENT_SOURCE_DIR}/test02-result.ttl ) RAPPER_TEST(feeds.test03.rdf "${RAPPER} -q -i rdfxml -o turtle -f writeBaseURI=0 -O http://example.org file:${CMAKE_CURRENT_SOURCE_DIR}/test03.rdf" test03.ttl ${CMAKE_CURRENT_SOURCE_DIR}/test03-result.ttl ) ENDIF(RAPTOR_PARSER_RDFXML) IF(RAPTOR_PARSER_RSS) RAPPER_TEST(feeds.test04.atom "${RAPPER} -q -i rss-tag-soup -o turtle -f writeBaseURI=0 -O http://www.example.org/blog/ file:${CMAKE_CURRENT_SOURCE_DIR}/test04.atom" test04.ttl ${CMAKE_CURRENT_SOURCE_DIR}/test04-result.ttl ) RAPPER_TEST(feeds.test05.atom "${RAPPER} -q -i rss-tag-soup -o turtle -f writeBaseURI=0 -O http://www.example.org/blog/ file:${CMAKE_CURRENT_SOURCE_DIR}/test05.atom" test05.ttl ${CMAKE_CURRENT_SOURCE_DIR}/test05-result.ttl ) ENDIF(RAPTOR_PARSER_RSS) IF(RAPTOR_SERIALIZER_ATOM) RAPPER_TEST(feeds.test01.ttl "${RAPPER} -q -i turtle -o atom -f writeBaseURI=0 -f rssTriples=atom-triples -f atomEntryUri=http://example.org/2006/03/28/blog-item -I http://example.org/whatsnew -O http://example.org/whatsnew file:test01.ttl" test01.atom ${CMAKE_CURRENT_SOURCE_DIR}/test01-result.atom ) RAPPER_TEST(feeds.test02.ttl "${RAPPER} -q -i turtle -o atom -f writeBaseURI=0 -f rssTriples=atom-triples -I http://example.org/news/ -O http://example.org/news/ file:test02.ttl" test02.atom ${CMAKE_CURRENT_SOURCE_DIR}/test02-result.atom ) RAPPER_TEST(feeds.test03.ttl "${RAPPER} -q -i turtle -o atom -f writeBaseURI=0 -f rssTriples=atom-triples -I http://example.org -O http://example.org file:test03.ttl" test03.atom ${CMAKE_CURRENT_SOURCE_DIR}/test03-result.atom ) ENDIF(RAPTOR_SERIALIZER_ATOM) IF(HAVE_JING) ADD_TEST(feeds.jing-test01.atom ${JING} ${CMAKE_CURRENT_SOURCE_DIR}/atom.rng test01.atom) ADD_TEST(feeds.jing-test02.atom ${JING} ${CMAKE_CURRENT_SOURCE_DIR}/atom.rng test02.atom) ADD_TEST(feeds.jing-test03.atom ${JING} ${CMAKE_CURRENT_SOURCE_DIR}/atom.rng test03.atom) ADD_TEST(feeds.jing-test04.atom ${JING} ${CMAKE_CURRENT_SOURCE_DIR}/atom.rng ${CMAKE_CURRENT_SOURCE_DIR}/test04.atom) ADD_TEST(feeds.jing-test05.atom ${JING} ${CMAKE_CURRENT_SOURCE_DIR}/atom.rng ${CMAKE_CURRENT_SOURCE_DIR}/test05.atom) ENDIF(HAVE_JING) # end raptor/tests/feeds/CMakeLists.txt raptor2-2.0.15/tests/feeds/test01-result.atom0000644000175000017500000000173612244506702015670 00000000000000 http://example.org/2006/03/28/blog-item atomic blog item title 2006-03-28T20:57:15Z rss:description here Example raptor2-2.0.15/tests/feeds/test02.rdf0000644000175000017500000000310111227654651014163 00000000000000 Example News http://example.org/news/ Example News feed. 2008-03-30T05:52:06Z http://example.org/news/2008-03-30 News for 2008-03-30 html description 1
]]> <div xmlns="http://www.w3.org/1999/xhtml"> html description 2 </div> 2008-03-30T06:07:28Z http://example.org/news/2007-10-01 News for 2007-10-01 html description 3
]]> <div xmlns="http://www.w3.org/1999/xhtml"> html description 4 </div> 2007-10-01T06:56:58Z raptor2-2.0.15/tests/feeds/test03-result.ttl0000644000175000017500000000360111303121536015517 00000000000000@prefix rdf: . @prefix atom: . @prefix content: . @prefix dc: . @prefix at: . @prefix : . dc:date "2005-12-12T00:00:00Z" ; :description "the rss description" ; :title "blog item title 2005-12" ; at:contentType "text/html" ; a :item ; atom:content . dc:date "2006-01-01T00:00:01Z" ; :title "blog item title 2006-01" ; a :item ; atom:summary """
The atom:summary description including tags over several lines.
"""^^rdf:XMLLiteral . dc:date "2006-02-02T00:00:02Z" ; content:encoded """
a content:encoded description with tags and newlines
""" ; :title "blog item title 2006-02" ; a :item . dc:date "2006-03-03T12:00:005Z" ; :description "the summary of the item" ; :title "blog item title 2006-02" ; a :item ; atom:content """
a literal XML atom:content with tags and newlines
"""^^rdf:XMLLiteral ; atom:updated "2006-03-03T23:59:59Z" . dc:date "2006-03-28T17:05:01-05:00" ; :items [ rdf:_1 ; rdf:_2 ; rdf:_3 ; rdf:_4 ; a rdf:Seq ] ; :title "example feed with 3 items" ; a :channel ; atom:author "bob" ; atom:email "bob@bob.com" ; atom:updated "2006-03-28T20:57:15Z" ; atom:uri "http://bob.com/" . raptor2-2.0.15/tests/feeds/atom.rng0000644000175000017500000003624211032060324014007 00000000000000 text html xhtml An atom:feed must have an atom:author unless all of its atom:entry children have an atom:author. An atom:entry must have at least one atom:link element with a rel attribute of 'alternate' or an atom:content. An atom:entry must have an atom:author if its feed does not. text html xhtml 1 [^:]* .+/.+ [A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})* .+@.+ xml:base xml:lang raptor2-2.0.15/tests/feeds/test05.atom0000644000175000017500000000050011170016742014341 00000000000000 http://www.example.org/blog/index.atom Kim Doe Kim Doe 2009-01-01T00:00:00-00:00 raptor2-2.0.15/tests/feeds/test02-result.atom0000644000175000017500000000524612244506702015671 00000000000000 http://example.org/news/ Example News 2008-03-30T05:52:06Z unknown atom:id atom:updated atom:rights atom:title atom:summary atom:id atom:updated atom:rights atom:title atom:summary rss091:pubDate rss:description http://example.org/news/2008-03-30 News for 2008-03-30 2008-03-30T06:07:28Z
html description 2
http://example.org/news/2007-10-01 News for 2007-10-01 2007-10-01T06:56:58Z
html description 4
raptor2-2.0.15/tests/feeds/test02-result.ttl0000644000175000017500000000221411303121536015515 00000000000000@prefix rdf: . @prefix content: . @prefix dc: . @prefix : . <> dc:date "2008-03-30T05:52:06Z" ; :description "Example News feed." ; :items [ rdf:_1 <2008-03-30> ; rdf:_2 <2007-10-01> ; a rdf:Seq ] ; :link "http://example.org/news/" ; :title "Example News" ; a :channel . <2007-10-01> dc:date "2007-10-01T06:56:58Z" ; :description """
html description 4
""" ; :link "http://example.org/news/2007-10-01" ; content:encoded """
html description 3
""" ; :title "News for 2007-10-01" ; a :item . <2008-03-30> dc:date "2008-03-30T06:07:28Z" ; :description """
html description 2
""" ; :link "http://example.org/news/2008-03-30" ; content:encoded """
html description 1
""" ; :title "News for 2008-03-30" ; a :item . raptor2-2.0.15/tests/feeds/test01-result.ttl0000644000175000017500000000244311303121536015520 00000000000000@prefix rdf: . @prefix atom: . @prefix content: . @prefix dc: . @prefix enc: . @prefix rss091: . @prefix : . <2006/03/28/blog-item> dc:creator [ dc:title "Example" ; a dc:Person ] ; dc:date "2006-03-28T20:57:15Z" ; :description "rss:description here" ; :link "http://example.org/2006/03/28/blog-item" ; :title "Original blog item title 2006-03" ; a :item ; atom:summary """
The atom:summary description including tags over several lines.
"""^^rdf:XMLLiteral ; atom:title "atomic blog item title" ; atom:updated "2006-03-28T20:57:15Z" . <> dc:date "2006-03-28T17:05:01-05:00" ; :items [ rdf:_1 <2006/03/28/blog-item> ; a rdf:Seq ] ; :link "http://example.org/whatsnew" ; :title "example feed with 1 item" ; a :channel ; atom:author "example" ; atom:email "example@example.com" ; atom:title "atomic title" ; atom:updated "2006-03-28T20:57:15Z" ; atom:uri "http://example.com/" . raptor2-2.0.15/tests/feeds/test05-result.ttl0000644000175000017500000000127311212371621015525 00000000000000@prefix rdf: . @prefix rss091: . @prefix rss: . @prefix dc: . @prefix atom: . dc:date "2009-01-01T00:00:00-00:00" ; rss:link "http://www.example.org/blog/index.atom" ; rss:title "Kim Doe" ; a rss:channel ; atom:author [ a atom:Author ; atom:name "Kim Doe" ] ; atom:id ; atom:link [ a atom:Link ; atom:href ; atom:rel "self" ] ; atom:title "Kim Doe" ; atom:updated "2009-01-01T00:00:00-00:00" . raptor2-2.0.15/tests/feeds/test03.rdf0000644000175000017500000000560111170016742014161 00000000000000 example feed with 3 items 2006-03-28T20:57:15Z bob bob@bob.com http://bob.com/ 2006-03-28T17:05:01-05:00 blog item title 2006-02 the summary of the item
a literal XML atom:content with tags and newlines
2006-03-03T23:59:59Z 2006-03-03T12:00:005Z
blog item title 2006-02 a content:encoded description with tags and newlines
]]> 2006-02-02T00:00:02Z blog item title 2006-01
The atom:summary description including tags over several lines.
2006-01-01T00:00:01Z
blog item title 2005-12 the rss description text/html 2005-12-12T00:00:00Z raptor2-2.0.15/tests/json/0000755000175000017500000000000012425347074012314 500000000000000raptor2-2.0.15/tests/json/example2.json0000644000175000017500000000606211472513121014635 00000000000000{ "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : "Anna Wilder" } },{ "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/title" }, "object" : { "type" : "literal", "value" : "Anna's Homepage", "lang" : "en" } },{ "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/maker" }, "object" : { "type" : "bnode", "value" : "_:person" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/homepage" }, "object" : { "type" : "uri", "value" : "http://example.org/about" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/made" }, "object" : { "type" : "uri", "value" : "http://example.org/about" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/name" }, "object" : { "type" : "literal", "value" : "Anna Wilder" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/firstName" }, "object" : { "type" : "literal", "value" : "Anna" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/surname" }, "object" : { "type" : "literal", "value" : "Wilder" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/depiction" }, "object" : { "type" : "uri", "value" : "http://example.org/pic.jpg" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/nick" }, "object" : { "type" : "literal", "value" : "wildling" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/nick" }, "object" : { "type" : "literal", "value" : "wilda" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/age" }, "object" : { "type" : "literal", "value" : "48", "datatype" : "http://www.w3.org/2001/XMLSchema#integer" } },{ "subject" : { "type" : "bnode", "value" : "_:person" }, "predicate" : { "type" : "uri", "value" : "http://xmlns.com/foaf/0.1/mbox_sha1sum" }, "object" : { "type" : "literal", "value" : "69e31bbcf58d432950127593e292a55975bc66fd" } } ] } raptor2-2.0.15/tests/json/bad-06.json0000644000175000017500000000057711472513121014076 00000000000000/* bad-06.json - Invalid term name */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : "Anna Wilder" }, "foo" : { "type" : "literal", "value" : "Anna Wilder" } } ] } raptor2-2.0.15/tests/json/example2.nt0000644000175000017500000000164711472513121014311 00000000000000 "Anna Wilder" . "Anna's Homepage"@en . _:person . _:person . _:person . _:person "Anna Wilder" . _:person "Anna" . _:person "Wilder" . _:person . _:person "wildling" . _:person "wilda" . _:person "48"^^ . _:person "69e31bbcf58d432950127593e292a55975bc66fd" . raptor2-2.0.15/tests/json/Makefile.am0000644000175000017500000001037112011242611014250 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor JSON tests # # Copyright (C) 2010, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # TEST_FILES=\ example1.json example2.json example3.json example4.json TEST_OUT_FILES=\ example1.nt example2.nt example3.nt example4.nt JSON_BAD_TEST_FILES=bad-00.json bad-01.json bad-02.json bad-03.json \ bad-04.json bad-05.json bad-06.json bad-07.json bad-08.json bad-09.json \ bad-10.json bad-11.json bad-12.json bad-13.json # Used to make N-triples output consistent BASE_URI=http://example.librdf.org/ EXTRA_DIST = \ CMakeLists.txt \ $(TEST_FILES) \ $(TEST_OUT_FILES) \ $(JSON_BAD_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper CLEANFILES = CMakeTests.txt CMakeTmp.txt build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) if RAPTOR_PARSER_JSON check-local: build-rapper check-json check-bad-json else check-local: endif if MAINTAINER_MODE check_json_deps = $(TEST_FILES) endif check-json: build-rapper $(check_json_deps) @result=0; \ $(RECHO) "Testing legal JSON"; \ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .json` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i json -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.nt $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ cat $$name.err; \ diff $(srcdir)/$$name.nt $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ json.$$name \ "\$${RAPPER} -q -i json -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.nt" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \ exit $$result if MAINTAINER_MODE check_bad_json_deps = $(JSON_BAD_TEST_FILES) endif check-bad-json: build-rapper $(check_bad_json_deps) @set +e; result=0; \ $(RECHO) "Testing that bad JSON fails"; \ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \ for test in $(JSON_BAD_TEST_FILES); do \ name=`basename $$test .json` ; \ baseuri=$(BASE_URI)$$name.json; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i json -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf '\tADD_TEST(%s %s) # WILL_FAIL\n' \ json.$$name \ "\$${RAPPER} -q -i json -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t\t%s\n' json.$$name >>CMakeTmp.txt; \ done; \ (printf '\n\tSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\t\tPROPERTIES\n\t\tWILL_FAIL TRUE\n\t)\n\n'; \ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result raptor2-2.0.15/tests/json/bad-12.json0000644000175000017500000000014411472513121014061 00000000000000/* bad-12.json - Not RDF/JSON */ { "key1" : "value1", "key2" : "value2", "key3" : "value3" } raptor2-2.0.15/tests/json/Makefile.in0000644000175000017500000004007412425344566014311 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor JSON tests # # Copyright (C) 2010, David Beckett http://purl.org/net/dajobe/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/json DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TEST_FILES = \ example1.json example2.json example3.json example4.json TEST_OUT_FILES = \ example1.nt example2.nt example3.nt example4.nt JSON_BAD_TEST_FILES = bad-00.json bad-01.json bad-02.json bad-03.json \ bad-04.json bad-05.json bad-06.json bad-07.json bad-08.json bad-09.json \ bad-10.json bad-11.json bad-12.json bad-13.json # Used to make N-triples output consistent BASE_URI = http://example.librdf.org/ EXTRA_DIST = \ CMakeLists.txt \ $(TEST_FILES) \ $(TEST_OUT_FILES) \ $(JSON_BAD_TEST_FILES) RAPPER = $(top_builddir)/utils/rapper CLEANFILES = CMakeTests.txt CMakeTmp.txt @MAINTAINER_MODE_TRUE@check_json_deps = $(TEST_FILES) @MAINTAINER_MODE_TRUE@check_bad_json_deps = $(JSON_BAD_TEST_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/json/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/json/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-am check-local clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am build-rapper: @(cd $(top_builddir)/utils ; $(MAKE) rapper$(EXEEXT)) @RAPTOR_PARSER_JSON_TRUE@check-local: build-rapper check-json check-bad-json @RAPTOR_PARSER_JSON_FALSE@check-local: check-json: build-rapper $(check_json_deps) @result=0; \ $(RECHO) "Testing legal JSON"; \ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \ for test in $(TEST_FILES); do \ name=`basename $$test .json` ; \ baseuri=$(BASE_URI)$$test; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i json -o ntriples $(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status != 0 -a $$status != 2 ; then \ $(RECHO) FAILED returned status $$status; result=1; \ elif cmp $(srcdir)/$$name.nt $$name.res >/dev/null 2>&1; then \ if test $$status = 2 ; then \ $(RECHO) "ok with warnings"; grep Warning $$name.err; \ else \ $(RECHO) "ok"; \ fi; \ else \ $(RECHO) "FAILED"; \ cat $$name.err; \ diff $(srcdir)/$$name.nt $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err; \ printf '\tRAPPER_TEST(%s\n\t\t"%s"\n\t\t%s\n\t\t%s\n\t)\n\n' \ json.$$name \ "\$${RAPPER} -q -i json -o ntriples \$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" \ $$name.res \ "\$${CMAKE_CURRENT_SOURCE_DIR}/$$name.nt" >>CMakeTests.txt; \ done; \ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \ exit $$result check-bad-json: build-rapper $(check_bad_json_deps) @set +e; result=0; \ $(RECHO) "Testing that bad JSON fails"; \ printf 'IF(RAPTOR_PARSER_JSON)\n\n' >>CMakeTests.txt; \ for test in $(JSON_BAD_TEST_FILES); do \ name=`basename $$test .json` ; \ baseuri=$(BASE_URI)$$name.json; \ $(RECHO) $(RECHO_N) "Checking $$test $(RECHO_C)"; \ $(RAPPER) -q -i json -o ntriples file:$(srcdir)/$$test $$baseuri > $$name.res 2> $$name.err; \ status=$$?; \ if test $$status -eq 1 ; then \ $(RECHO) "ok"; \ elif test $$status -eq 2 ; then \ $(RECHO) "FAILED - parsing succeeded with a warning"; \ cat $$name.res; grep Warning $$name.err; result=1; \ elif test $$status -eq 0 ; then \ $(RECHO) "FAILED - parsing succeeded but should have failed"; \ cat $$name.res; result=1; \ else \ $(RECHO) "FAILED - parsing failed with unknown status $$status"; \ cat $$name.res; result=1; \ fi; \ rm -f $$name.res $$name.err ; \ printf '\tADD_TEST(%s %s) # WILL_FAIL\n' \ json.$$name \ "\$${RAPPER} -q -i json -o ntriples file:\$${CMAKE_CURRENT_SOURCE_DIR}/$$test $$baseuri" >>CMakeTests.txt; \ printf '\t\t%s\n' json.$$name >>CMakeTmp.txt; \ done; \ (printf '\n\tSET_TESTS_PROPERTIES(\n'; \ cat CMakeTmp.txt; \ printf '\t\tPROPERTIES\n\t\tWILL_FAIL TRUE\n\t)\n\n'; \ printf 'ENDIF(RAPTOR_PARSER_JSON)\n\n') >>CMakeTests.txt; \ rm -f CMakeTmp.txt; \ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/tests/json/example3.json0000644000175000017500000000060211472513121014630 00000000000000/* example3.json - a comment at the start of the file */ // C++ style comment { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, // Comment in the middle "object" : { "type" : "literal", "value" : "Anna Wilder" } } ] } raptor2-2.0.15/tests/json/example1.json0000644000175000017500000000316711472513121014637 00000000000000{ "http://example.org/about" : { "http://purl.org/dc/elements/1.1/creator" : [ { "value" : "Anna Wilder", "type" : "literal" } ], "http://purl.org/dc/elements/1.1/title" : [ { "value" : "Anna's Homepage", "type" : "literal", "lang" : "en" } ] , "http://xmlns.com/foaf/0.1/maker" : [ { "value" : "_:person", "type" : "bnode" } ] } , "_:person" : { "http://xmlns.com/foaf/0.1/homepage" : [ { "value" : "http://example.org/about", "type" : "uri" } ] , "http://xmlns.com/foaf/0.1/made" : [ { "value" : "http://example.org/about", "type" : "uri" } ] , "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Anna Wilder", "type" : "literal" } ] , "http://xmlns.com/foaf/0.1/firstName" : [ { "value" : "Anna", "type" : "literal" } ] , "http://xmlns.com/foaf/0.1/surname" : [ { "value" : "Wilder", "type" : "literal" } ] , "http://xmlns.com/foaf/0.1/depiction" : [ { "value" : "http://example.org/pic.jpg", "type" : "uri" } ] , "http://xmlns.com/foaf/0.1/nick" : [ { "type" : "literal", "value" : "wildling"} , { "type" : "literal", "value" : "wilda" } ] , "http://xmlns.com/foaf/0.1/age" : [ { "value" : "48", "type" : "literal", "datatype" : "http://www.w3.org/2001/XMLSchema#integer" } ] , "http://xmlns.com/foaf/0.1/mbox_sha1sum" : [ { "value" : "69e31bbcf58d432950127593e292a55975bc66fd", "type" : "literal" } ] } } raptor2-2.0.15/tests/json/CMakeLists.txt0000644000175000017500000000653712011242611014765 00000000000000# raptor/tests/json/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # IF(RAPTOR_PARSER_JSON) RAPPER_TEST(json.example1 "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example1.json http://example.librdf.org/example1.json" example1.res ${CMAKE_CURRENT_SOURCE_DIR}/example1.nt ) RAPPER_TEST(json.example2 "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example2.json http://example.librdf.org/example2.json" example2.res ${CMAKE_CURRENT_SOURCE_DIR}/example2.nt ) RAPPER_TEST(json.example3 "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example3.json http://example.librdf.org/example3.json" example3.res ${CMAKE_CURRENT_SOURCE_DIR}/example3.nt ) RAPPER_TEST(json.example4 "${RAPPER} -q -i json -o ntriples ${CMAKE_CURRENT_SOURCE_DIR}/example4.json http://example.librdf.org/example4.json" example4.res ${CMAKE_CURRENT_SOURCE_DIR}/example4.nt ) ADD_TEST(json.bad-00 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-00.json http://example.librdf.org/bad-00.json) # WILL_FAIL ADD_TEST(json.bad-01 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-01.json http://example.librdf.org/bad-01.json) # WILL_FAIL ADD_TEST(json.bad-02 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-02.json http://example.librdf.org/bad-02.json) # WILL_FAIL ADD_TEST(json.bad-03 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-03.json http://example.librdf.org/bad-03.json) # WILL_FAIL ADD_TEST(json.bad-04 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-04.json http://example.librdf.org/bad-04.json) # WILL_FAIL ADD_TEST(json.bad-05 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-05.json http://example.librdf.org/bad-05.json) # WILL_FAIL ADD_TEST(json.bad-06 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-06.json http://example.librdf.org/bad-06.json) # WILL_FAIL ADD_TEST(json.bad-07 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-07.json http://example.librdf.org/bad-07.json) # WILL_FAIL ADD_TEST(json.bad-08 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-08.json http://example.librdf.org/bad-08.json) # WILL_FAIL ADD_TEST(json.bad-09 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-09.json http://example.librdf.org/bad-09.json) # WILL_FAIL ADD_TEST(json.bad-10 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-10.json http://example.librdf.org/bad-10.json) # WILL_FAIL ADD_TEST(json.bad-11 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-11.json http://example.librdf.org/bad-11.json) # WILL_FAIL ADD_TEST(json.bad-12 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-12.json http://example.librdf.org/bad-12.json) # WILL_FAIL ADD_TEST(json.bad-13 ${RAPPER} -q -i json -o ntriples file:${CMAKE_CURRENT_SOURCE_DIR}/bad-13.json http://example.librdf.org/bad-13.json) # WILL_FAIL SET_TESTS_PROPERTIES( json.bad-00 json.bad-01 json.bad-02 json.bad-03 json.bad-04 json.bad-05 json.bad-06 json.bad-07 json.bad-08 json.bad-09 json.bad-10 json.bad-11 json.bad-12 json.bad-13 PROPERTIES WILL_FAIL TRUE ) ENDIF(RAPTOR_PARSER_JSON) # end raptor/tests/json/CMakeLists.txt raptor2-2.0.15/tests/json/example4.nt0000644000175000017500000000106411472513121014304 00000000000000 . . . "Joe Bloggs"@en . "59"^^ . raptor2-2.0.15/tests/json/bad-09.json0000644000175000017500000000047311472513121014074 00000000000000/* bad-07.json - Document with a integer value */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : 44 } } ] } raptor2-2.0.15/tests/json/bad-08.json0000644000175000017500000000047511472513121014075 00000000000000/* bad-08.json - Document with a boolean value */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : true } } ] } raptor2-2.0.15/tests/json/bad-11.json0000644000175000017500000000052711472513121014065 00000000000000/* bad-11.json - Syntax error in the JSON - extra square-brace */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" ]}, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : "Anna Wilder" } } ] } raptor2-2.0.15/tests/json/example4.json0000644000175000017500000000157711472513121014645 00000000000000{ "http://example.com/joe/foaf.rdf" : { "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { "value" : "http://xmlns.com/foaf/0.1/PersonalProfileDocument", "type" : "uri" } ], "http://xmlns.com/foaf/0.1/primaryTopic" : [ { "value" : "http://www.example.com/joe#me", "type" : "uri" } ] } , "http://www.example.com/joe#me" : { "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { "value" : "http://xmlns.com/foaf/0.1/Person", "type" : "uri" } ], "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joe Bloggs", "lang" : "en", "type" : "literal" } ], "http://xmlns.com/foaf/0.1/age" : [ { "value" : "59", "datatype" : "http://www.w3.org/2001/XMLSchema#integer", "type" : "literal" } ] } } raptor2-2.0.15/tests/json/bad-07.json0000644000175000017500000000047211472513121014071 00000000000000/* bad-07.json - Document with a null value */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : null } } ] } raptor2-2.0.15/tests/json/example1.nt0000644000175000017500000000164711472513121014310 00000000000000 "Anna Wilder" . "Anna's Homepage"@en . _:person . _:person . _:person . _:person "Anna Wilder" . _:person "Anna" . _:person "Wilder" . _:person . _:person "wildling" . _:person "wilda" . _:person "48"^^ . _:person "69e31bbcf58d432950127593e292a55975bc66fd" . raptor2-2.0.15/tests/json/bad-04.json0000644000175000017500000000024511472513121014064 00000000000000/* bad-04.json - Resource-centric JSON missing an object */ { "http://example.org/about" : { "http://purl.org/dc/elements/1.1/creator" : [ {} ] } } raptor2-2.0.15/tests/json/bad-00.json0000644000175000017500000000005511472513121014057 00000000000000/* bad-00.json - Nearly empty document */ { raptor2-2.0.15/tests/json/bad-10.json0000644000175000017500000000047211472513121014063 00000000000000/* bad-11.json - Document with a float value */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : 4.4 } } ] } raptor2-2.0.15/tests/json/bad-05.json0000644000175000017500000000051011472513121014060 00000000000000/* bad-05.json - Invalid attribute */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : "Anna Wilder", "foo" : "bar" } } ] }raptor2-2.0.15/tests/json/bad-02.json0000644000175000017500000000045311472513121014063 00000000000000// bad-02.json - Missing the value for a literal { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal" } } ] }raptor2-2.0.15/tests/json/example3.nt0000644000175000017500000000012511472513121014300 00000000000000 "Anna Wilder" . raptor2-2.0.15/tests/json/bad-01.json0000644000175000017500000000050311472513121014056 00000000000000/* bad-01.json - Missing trailing curly-brace */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "type" : "literal", "value" : "Anna Wilder" } } ] raptor2-2.0.15/tests/json/bad-13.json0000644000175000017500000000044711472513121014070 00000000000000/* bad-06.json - Missing term type */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" }, "object" : { "value" : "Anna Wilder" }, } ] } raptor2-2.0.15/tests/json/bad-03.json0000644000175000017500000000040011472513121014054 00000000000000/* bad-03.json - No object defined for triple */ { "triples" : [ { "subject" : { "type" : "uri", "value" : "http://example.org/about" }, "predicate" : { "type" : "uri", "value" : "http://purl.org/dc/elements/1.1/creator" } } ] } raptor2-2.0.15/ChangeLog.70000644000175000017500000017366210614302607012046 000000000000002006-12-29 Dave Beckett * src/raptor_grddl.c: Add profile_transformation_uri and profile_uris list to grddl parser structure. (raptor_xslt_parse_init, raptor_xslt_parse_terminate): init/free the above fields. Add MATH_IS_VALUE_LIST and MATCH_IS_PROFILE flags to match_table. Comment out hard-coded embedded RDF, hCalendar xpaths. Added head profile xpath for profile URI resoltuion. (raptor_grddl_relay_triples): Look for matches in the list of profile_uris for getting XSLT uris. (typedef raptor_grddl_xml_parse_bytes_context): Renamed from raptor_grddl_parse_bytes_context. (raptor_grddl_uri_xml_parse_bytes): Renamed from raptor_grddl_uri_parse_bytes. (raptor_grddl_fetch_uri): Added to provide a single place to retrieve URIs in the GRDDL operation. Set a user agent, send accept header and handle no-net. (raptor_grddl_run_grddl_transform_uri): Use raptor_grddl_fetch_uri to retrieve the XSLT doc. (raptor_grddl_seen_uri): Do a check only, mark done in new function: (raptor_grddl_done_uri): Added. (raptor_grddl_parse_uri_write_bytes): Added for use by raptor_grddl_parse_chunk. (raptor_grddl_parse_chunk): Mark done when received is_end. Use profile_uris list to record root namespace as first item in list at index 0. Accept an XPath result of element and use its namespace name if seen, to allow an XPath matching the root element - not yet used. Update to use the match_table flags field. Handle MATCH_IS_PROFILE by storing in the profile_uris list, skipping the http://www.w3.org/2003/g/data-view profile URI. Do all recursive GRDDL in one place over all the profile_uris using raptor_grddl_fetch_uri. * src/raptor_www_curl.c: (raptor_www_curl_fetch): set proxy if www->proxy set 2006-12-28 Dave Beckett * utils/rapper.c: adjust whitespace so longer grddl description fits * src/raptor_grddl.c: grddl docs, description updates * src/Makefile.am, src/raptor_grddl.c (from /raptor/trunk/src/raptor_xslt.c:11760), src/raptor_xslt.c: Renameed raptor_xslt.c to raptor_grddl.c * src/raptor_xslt.c: Rename all functions / structures to be raptor_grddl / grddl not xslt. * src/raptor_xslt.c: update spec reference 2006-12-27 Dave Beckett * src/raptor_xslt.c: Track list of visited URIs across recursive GRDDL parsers (raptor_xslt_parse_init, raptor_xslt_parse_terminate): Share the list of visited uris, allocated/freed at depth 0 parser. (raptor_xslt_add_parent): Added to associate a parent with a child GRDDL parser and to all share the depth 0 parser's list of visited URIs. (raptor_xslt_relay_triples, raptor_xslt_ensure_internal_parser): Return failure code and prepare for alternative when this may not pass on all triples for namespace/profile GRDDL operations. (raptor_xslt_run_grddl_transform_doc): Handle error code from above. (raptor_xslt_seen_uri): Added to track URIs seen. (raptor_xslt_parse_chunk): Use seen URI tracking for initial document and recursive GRDDLs. * src/raptor_general.c: docs 2006-12-26 Dave Beckett * src/raptor_xslt.c: Add GRDDL looking up of root namespace URIs. (raptor_xslt_parse_init, raptor_xslt_parse_terminate): Init/free doc_transform_uris and namespace_transformation_uri. grddl_namespace_uris_ignore_list added with list of namespace URIs to never attempt to retrieve. (raptor_xslt_relay_triples): Added, to relay triples to user but look for data-view:namespaceTransformation triples (raptor_xslt_ensure_internal_parser): Added to init an internal parser if needed, reusing otherwise. Relay triples via raptor_xslt_relay_triples before sending to user handler. (raptor_xslt_run_grddl_transform_doc): Moved internal parser code to raptor_xslt_ensure_internal_parser. (raptor_xslt_parse_chunk): Get and store document root namespace URI and then use it if not ignored. Do not do transforms immediately but store in a sequence. Do a parse on the root namespace URI if present to look for transformation triples. Finally apply all transformation URIs seen in one go. * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Recognize RDF/XML in sample content by looking for the XML marking the RDF namespace declaration, the root element and likely attributes. * src/raptor_parse.c: (raptor_guess_parser_name): Mime type matches that are q<10 no longer return a match but use the q as score. Guessing then continues with the recognise_syntax factory method, if present. 2006-12-14 Dave Beckett * src/raptor_xslt.c: (raptor_xslt_parse_init, raptor_xslt_parse_start): Move xslt_parser->sax2 init from raptor_xslt_parse_start - running on every parse to raptor_xslt_parse_init - running once. * src/raptor_xslt.c: (raptor_xslt_parse_chunk): Free any previously used xpathObj before making a new one 2006-12-10 Dave Beckett * src/raptor_xslt.c: Previous changes did this: Fixes Issue#0000143 http://bugs.librdf.org/mantis/view.php?id=143 * src/raptor_xslt.c: struct raptor_xslt_parser_context_s gains raptor_sax2* sax2 field. (raptor_xslt_parse_terminate): Free sax2. (raptor_xslt_parse_start): Create a new sax2 structure and initialise it's locator and error handler params. (raptor_xslt_parse_chunk): Move error handler inits to raptor_xslt_parse_start and do it once. * src/raptor_parse.c: (raptor_parser_fatal_error_message_handler, raptor_parser_error_message_handler, raptor_parser_warning_message_handler): No need to protectb raptor_print_locator from NULL locator, it does that. * src/raptor_libxml.c: (raptor_libxml_update_document_locator, raptor_libxml_error_common): Protect from NULL locator. (raptor_libxml_init_generic_error_handlers): Altered to take an raptor_sax2* argument. * src/raptor_internal.h: raptor_libxml_init_generic_error_handlers altered to take an raptor_sax2* argument. 2006-12-07 Dave Beckett * src/raptor_parse.c: (raptor_parser_copy_user_state): Make a new copy of the shared generate id prefix string. Fixes Issue#0000141 http://bugs.librdf.org/mantis/view.php?id=141 * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Do not store an rdf:type predicate triple as the typed-node type unless the triple object is a URI. Fixes Issue#0000157 http://bugs.librdf.org/mantis/view.php?id=157 2006-12-06 Dave Beckett * src/raptor_turtle_writer.c: (raptor_turtle_writer_reference): Generate <> for the empty relative URI 2006-12-03 Dave Beckett * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Rename raptor_node to raptor_abbrev_node and raptor_subject to raptor_abbrev_subject and rename functions to match the pattern * src/raptor_turtle_writer.c: Use limits.h to get LONG_MAX * src/raptor_www_libxml.c: raptor_www_libxml_http_error prototype. * src/raptor_xslt.c: Store a single parser that could be of any name, not just 'rdfxml'. (raptor_xslt_parse_init): Do not init rdfxml parser here. 9raptor_xslt_parse_terminate): Free internal parser if present. (raptor_xslt_parse_start): Do not copy user state to internal parser here. (raptor_xslt_run_grddl_transform_doc): Delve into the XSL transformation results and try to interpret a mime type out of the output type (if present). Assume any XML mime type is actually RDF/XML and refuse to do recursive grddl guesses this way. Tidy up code to clean up error paths * src/raptor_www.c: (raptor_www_file_fetch): Return 200, 403 or 404 status codes and set failed flag. (raptor_www_fetch): Set failed flag if a status code was returned and the result was not 200. * src/raptor_xslt.c: (raptor_xslt_parse_chunk): Skip empty XSLT URIs in the list found. 2006-12-02 Dave Beckett * src/raptor_sax2.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Add new features to switch()s * src/raptor_abbrev.c: (raptor_new_node): init node always * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_blank): Do not double-encode blank node ids. Do not free a shared blank node string value. (raptor_rdfxmla_emit_subject): Do not double-encode blank node ids. Free only allocated attr_value. (raptor_rdfxmla_serialize_init): Ensure rdf_type is initialized. * src/raptor_turtle_writer.c: Remove // comments * src/raptor_serialize_turtle.c: deleting commented-out code * src/raptor_serialize_turtle.c: Code style, whitespace. * src/raptor.h, src/raptor_internal.h: Move turtle write functions into internal API for now * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_declare_namespace_from_namespace): Allow a default namespace to be handled when prefix is NULL. * src/raptor_turtle_writer.c: (raptor_turtle_writer_qname): Write a QName using Turtle's rules either prefix:local or :local which is not how raptor_iostream_write_qname() writes them for XML. * src/raptor_turtle_writer.c: (raptor_turtle_writer_namespace_prefix): Only emit a prefix if there is one. * src/raptor_serialize_turtle.c, docs/raptor-serializers.xml, docs/tmpl/section-general.sgml, configure.ac, src/Makefile.am, src/raptor.h, src/raptor_serialize.c, src/raptor_turtle_writer.c, tests/Makefile.am, tests/turtle/Makefile.am: Turtle serializer by Dave Robillard * src/raptor_xml_writer.c: docs * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_find_subject): Renamed from raptor_find_subject. (raptor_new_qname_from_resource): Remove link to rdfxml-abbrev serializer context and pass in namespaces stack parameters. (raptor_lookup_node): Renamed from raptor_rdfxmla_lookup_node (raptor_lookup_subject): Renamed from raptor_rdfxmla_lookup_subject. (raptor_find_subject): Renamed from raptor_rdfxmla_find_subject. * src/raptor_abbrev.c: Re order functions * src/Makefile.am, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: (raptor_new_qname_from_resource, raptor_new_node, raptor_free_node, raptor_node_equals, raptor_node_matches, raptor_new_subject, raptor_free_subject, raptor_subject_add_property, raptor_subject_add_list_element, raptor_rdfxmla_lookup_node, raptor_rdfxmla_find_subject, raptor_rdfxmla_lookup_subject): Move common abbreviated serializer code from raptor_serialize_rdfxmla.c to raptor_abbrev.c * src/raptor_serialize_dot.c: gratuitous whitespace schanges * docs/tmpl/section-feature.sgml: New DOT features * src/raptor_turtle_writer.c copied from /raptor/trunk/src/raptor_xml_writer.c:11666: copy for turtle writing 2006-11-26 Dave Beckett * src/raptor_uri.c: (raptor_uri_filename_to_uri_string): Dynamically allocate the path buffer and realloc it if it's too small. This helps Hurd which does not handle PATH_MAX like linux/unix. * docs/raptor-serializers.xml, src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_serialize_dot.c: Import updated DOT serializer. Renamed features to remove _color/_COLOR from end of name. Added feature descriptions * src/raptor_serialize_dot.c: alter label * src/Makefile.am, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c: Add DOT serializer * configure.ac: libxml minimum version is now 2.6.8 since 2.6.7 crashes on PPC64 Linux. 2.6.8 was released March 2004 so this should be no burden. 2006-11-20 Dave Beckett * raptor.rdf.in: Update description and for SVN repository. 2006-11-19 Dave Beckett * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.5.0 2006-10-22 Dave Beckett * Snapshotted raptor_1_4_13 for 1.4.13 release (SVN r11540) * src/raptor_rss.c: (raptor_rss_end_element_handler): Only declare name when debugging. * src/win32_raptor_config.h: Update defines: HAVE_XMLSAX2INTERNALSUBSET replaces RAPTOR_LIBXML_XMLSAX2INTERNALSUBSET Added HAVE_XMLCTXTUSEOPTIONS Deleted RAPTOR_LIBXML_XMLUSENEWPARSER * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes): Use #ifdef HAVE_XMLCTXTUSEOPTIONS to protect call to xmlCtxtUseOptions * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Use #ifdef HAVE_XMLCTXTUSEOPTIONS to protect call to xmlCtxtUseOptions * src/raptor_libxml.c: #ifdef HAVE_XMLSAX2INTERNALSUBSET replaces RAPTOR_LIBXML_XMLSAX2INTERNALSUBSET * configure.ac: Remove unused check for xmlUseNewParser (defining RAPTOR_LIBXML_XMLUSENEWPARSER) Use AC_CHECK_FUNCS to check for new xmlCtxtUseOptions and existing xmlSAX2InternalSubset 2006-10-21 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Throw an error and skip triple if cannot make URI from a predicate. 2006-10-13 Dave Beckett * src/raptor_uri.c: (raptor_uri_to_relative_counted_uri_string): Check for equal scheme and authority correctly. Fixes Issue #0000134 http://bugs.librdf.org/mantis/view.php?id=134 * src/raptor_uri.c: (main): Test for bug 134 2006-10-09 Dave Beckett * src/raptor_parse.c: (raptor_set_default_generate_id_parameters) autodocs 2006-10-08 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_start) Free any existing xml_writer before making a new one. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_start) Free any existing xml_writer before making a new one. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_end): Free any existing xml_writer before making a new one. 2006-10-05 Dave Beckett * configure.ac: Found more -W flags. * utils/rdfdiff.c: cast * src/raptor_set.c: const * configure.ac: In maintainer mode, add all the supported -W options to the MAINTAINER_CFLAGS * utils/rapper.c: Cast for signed/unsigned comparison * src/raptor_libxml.c: redundant decl * utils/rapper.c: Cast for unsigned vs signed int use of raptor_get_feature_count() * src/n3_common.h, src/n3_lexer.l, src/n3_parser.y, src/raptor_libxml.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/turtle_common.h, src/turtle_lexer.l, src/turtle_parser.y: Make internal error/warning/vargs functions use RAPTOR_PRINTF_FORMAT and fix a few bad uses of args * src/raptor_parse.c: (raptor_syntaxes_enumerate): Discard test for unsigned int < 0. (raptor_parse_uri_no_net_filter); Fix raptor_parser_error format arg. * src/raptor_serialize.c: (raptor_serializers_init): Declare new style void. (raptor_serializers_enumerate): Discard test for unsigned int < 0. * src/ntriples_parse.c: (raptor_ntriples_term): Cast for raptor_parser_error arg. * src/raptor_internal.h: Declare many error/warning/*varargs prototypes with RAPTOR_PRINTF_FORMAT that they take a printf-style format argument. * src/raptor.h: Added RAPTOR_PRINTF_FORMAT to allow declaring of functions with a printf-style format argument. Declare raptor_vsnprintf using it. * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_xml.c: Turn content_cdata into using raptor_stringbuffer so that it does a lot less copying (strncpy) when joining literals 2006-10-03 Dave Beckett * examples/Makefile.am: Fix AM_* flags 2006-10-02 Dave Beckett * docs/raptor-tutorial-serializing.xml: typo raptor_serializer_set_namespace => raptor_serialize_set_namespace * docs/raptor-tutorial-serializing.xml: Add single triple serializing example rdfserialize.c * docs/Makefile.am: Add rdfserialize.c * examples/rdfserialize.c: tidy * examples/Makefile.am: Added rdfserialize example. * examples/rdfserialize.c: rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev 2006-09-24 Dave Beckett * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes): Only use XML_PARSE_NONET if defined. * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Use XML_PARSE_NONET only if defined. 2006-09-17 Dave Beckett * utils/Makefile.am: (AM_CFLAGS, AM_CPPFLAGS): Remove duplication of @CFLAGS@, @CPPFLAGS@ * src/Makefile.am: (AM_CFLAGS): Remove duplication of @CFLAGS@ 2006-09-08 Dave Beckett * configure.ac: Allow LEX to be set to things that aren't exactly 'flex' 2006-08-27 Dave Beckett * NEWS.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.13 * Snapshotted raptor_1_4_12 for 1.4.12 release (SVN r11256) * docs/libraptor.3: 1.4.12 no API changes * src/raptor_serialize.c: (raptor_serializers_init): Restore order from 1.4.10 * src/raptor_serialize_rdfxmla.c: (raptor_init_serializer_rdfxmla): Restore order from 1.4.10 2006-08-26 Dave Beckett * src/win32_raptor_config.h, configure.ac, NEWS.html: Bumped version to 1.4.12 * Snapshotted raptor_1_4_11 for 1.4.11 release (SVN r11244) * src/raptor_parse.c: (raptor_start_parse): Throw an error if no base URI is given and it is needed. * src/raptor_sax2.c: (raptor_sax2_parse_start): Free any existing base URI before assigning a new one. * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Use raptor_new_uri since base_uri is never used, and all the URIs are absolute. * docs/tmpl/section-feature.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-unicode.sgml: Updated templates for 1.4.11 * src/raptor_parse.c: (raptor_start_parse): Return failure if need a base URI and none was given. 2006-08-23 Dave Beckett * src/raptor.h: Add RAPTOR_API before raptor_namespaces_qname_from_uri to export it properly for windows. Fixes Issue #0000112 http://bugs.librdf.org/mantis/view.php?id=112 * src/raptor_rss.c: Use raptor_strcasecmp. Fixes Issue #0000110 http://bugs.librdf.org/mantis/view.php?id=110 2006-08-22 Dave Beckett * docs/libraptor.3: Updates for 1.4.11 2006-08-21 Dave Beckett * docs/raptor-sections.txt: Added raptor_get_feature_count and raptor_get_need_base_uri * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_xslt.c, src/turtle_parser.y: Added raptor_get_need_base_uri to return new field need_base_uri_flag in raptor_parser_factory that is set by all parsers now 2006-08-20 Dave Beckett * utils/rapper.c: Use raptor_get_feature_count and add raptor_finish() before all exits. * src/raptor.h: Added raptor_get_feature_count prototype * src/raptor_feature.c: (raptor_get_feature_count): Added * src/raptor_serialize.c: Turn serializers into a raptor_sequence (raptor_free_serializer_factory): Added. (raptor_serializers_init): Init sequence, reverse order so N-Triples remains first. (raptor_serializers_finish): Free with raptor_free_sequence (raptor_serializer_register_factory, raptor_get_serializer_factory, raptor_serializers_enumerate): Update to use sequence. * src/raptor_parse.c: Turn parsers into a raptor_sequence (raptor_free_parser_factory): Added. (raptor_parsers_init): Init sequence, reverse order so RDF/XML remains first. (raptor_parsers_finish): Free with raptor_free_sequence (raptor_parser_register_factory, raptor_parser_factory_add_alias, raptor_get_parser_factory, raptor_syntaxes_enumerate, raptor_guess_parser_name): Update to use sequence. (main): Added test for raptor_parser_get_accept_header_all * src/raptor_internal.h: Added prototypes for raptor_parsers_init, raptor_serializers_init, raptor_parsers_finish and raptor_serializers_finish. Rename raptor_init/finish_sax2 to raptor_sax2_init/finish * src/raptor_sax2.c: (raptor_sax2_init): Renamed from raptor_init_sax2 (raptor_sax2_finish): Renamed from raptor_finish_sax2 * src/raptor_general.c: (raptor_init): Call raptor_parsers_init and raptor_serializers_init. (raptor_finish): Call raptor_parsers_finish and raptor_serializers_finish. * src/raptor_serialize.c: (raptor_serializers_init): Added. (raptor_serializers_finish): Renamed from raptor_delete_serializer_factories * src/raptor_parse.c: (raptor_parsers_init): Added. (raptor_parsers_finish): Renamed from raptor_delete_parser_factories (raptor_parser_register_factory): Delete mime_type and uri_string args. (raptor_parser_factory_add_uri): Added for registering a URI * src/n3_parser.y, src/ntriples_parse.c, src/raptor_guess.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_xslt.c, src/turtle_parser.y: Remove mime_type and uri args from raptor_parser_register_factory * src/n3_parser.y, src/ntriples_parse.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_xslt.c, src/turtle_parser.y: (raptor_parser_register_factory): Remove mime type arg, nothing uses it now * src/ntriples_parse.c: (raptor_ntriples_parse_chunk): Make junk at end of input errro return from the function as a failure. * src/turtle_parser.y: Remove %destructor tidy for PREFIX * src/n3_parser.y: Remove %destructor tidy for PREFIX * src/n3_parser.y: Add %destructor to tidy up tokens when doing error recovery. (directive): Hack to stop Bison moaning about not using $1 * src/turtle_parser.y: Add %destructor to tidy up tokens when doing error recovery. (directive): Hack to stop Bison moaning about not using $1 * src/n3_parser.y: Added labels for tokens to enable better error messages. * src/turtle_parser.y: Added labels for tokens to enable better error messages. * autogen.sh: Track where programs are discovered. * src/raptor_parse.c: (raptor_parse_uri_with_connection, raptor_set_feature, raptor_get_feature, raptor_set_parser_strict): Update to use array of features throughout. (raptor_parser_copy_user_state): Copy all features when copying state. * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes, raptor_xslt_run_grddl_transform_uri): Update to use array of features. * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_handler, raptor_rdfxml_parse_start, raptor_rdfxml_generate_statement, raptor_rdfxml_process_property_attributes, raptor_rdfxml_start_element_grammar, raptor_rdfxml_end_element_grammar, raptor_rdfxml_cdata_grammar, raptor_rdfxml_record_ID): Update to use array of features throughout. * src/raptor_rss.c: (raptor_rss_parse_start): Update to use array of features. * src/raptor_guess.c: (raptor_guess_parse_chunk): Use raptor_parser_copy_user_state to copy over pointers and feature flags to the inner parser. * src/raptor_internal.h: struct raptor_parser_s - replace individual feature fields with an array. * src/raptor_parse.c: Removed static raptor_get_parser_factory prototype * src/raptor_internal.h: Added raptor_get_parser_factory * src/raptor_parse.c: (raptor_get_parser_factory): Now internal not static * configure.ac: flex check - warn before failing * src/raptor_xslt.c: comma chameleon * configure.ac: recommend flex 2.5.33 * configure.ac: Update to point at main flex site whichq finally gets 2.5.33 after 9 years * src/raptor_guess.c: Rework to call an internal use of a parser rather than "exec"ing into the guessed parser. Fixes Issue#0000091 http://bugs.librdf.org/mantis/view.php?id=91 * src/raptor_parse.c: (raptor_parser_exec): Deleted * src/raptor_internal.h: Delete raptor_parser_exec * src/raptor_xslt.c: Disable dc-extract.xsl 2006-08-19 Dave Beckett * RELEASE.html: Updated for 1.4.11 * docs/raptor-docs.xml: Added raptor-parsers.xml and raptor-serializers.xml * docs/Makefile.am: Added raptor-parsers.xml and raptor-serializers.xml * docs/raptor-parsers.xml, docs/raptor-serializers.xml: Added list of parsers and serializers * docs/tmpl/section-parser.sgml: Updated * docs/tmpl/section-www.sgml: Updated * docs/tmpl/section-feature.sgml: Updated * docs/libraptor.3: Rename raptor_uri_filter_func * docs/raptor-docs.xml: tweak title * docs/raptor-tutorial-parsing.xml: params * docs/raptor-sections.txt: Rename raptor_uri_filter_func * utils/rapper.c: Allow --show-namespaces to print to stderr while relaying them to the serializer. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_declare_namespace_from_namespace): Don't declared multiple prefixes for the same namespace URI. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_declare_namespace_from_namespace): Don't declared multiple prefixes for the same namespace URI. * docs/raptor-tutorial-parsing.xml: Update for uri filter arg change * src/raptor_parse.c: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor.h: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor_www.c: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor_internal.h: Renamed raptor_www_uri_filter_func uri_filter to raptor_uri_filter_func uri_filter and removed raptor_www* arg to the filter function. * src/raptor_xslt.c: (raptor_xslt_uri_parse_bytes): Take in a small structure to get the raptor_parser* pointer as well as the libxml parser context. Use it to pass on the nonet option to libxml if it is set. (raptor_xslt_run_grddl_transform_uri): Use new struct. * src/raptor_rss.c: (raptor_rss_parse_start): Pass on raptor_parser feature no_net to raptor_sax2. * src/raptor_rdfxml.c: (raptor_rdfxml_parse_init): Do feature related initialising at the start of every parse, not once for all rdf/xml parser instances. (raptor_rdfxml_parse_start): Init feature_normalize_language and feature_no_net here. * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Set libxml option XML_PARSE_NONET if sax2 feature RAPTOR_FEATURE_NO_NET is set. (raptor_sax2_set_feature): Handle RAPTOR_FEATURE_NO_NET. * src/raptor_internal.h: raptor_sax2 gains feature_no_net * docs/raptor-tutorial-parsing.xml: Add parser URI filtering examples to tutorial * docs/libraptor.3: Updated for 1.4.11 * utils/rapper.c: Reorder help message. Use triples in messages and fix that plurals thing. 2006-08-18 Dave Beckett * docs/raptor-tutorial-serializing.xml: Add IDs to examples * docs/raptor-tutorial-parsing.xml: Add IDs to examples * docs/raptor-tutorial-querying-functionality.xml: Make it xml * src/raptor_sax2.c: Added autodocs for raptor_xml_element_is_empty * docs/raptor-sections.txt: Add raptor_parser_set_uri_filter, raptor_www_set_uri_filter and raptor_www_uri_filter_func * docs/raptor-tutorial-querying-functionality.xml: Fix example, add ID * src/raptor.h: Document RAPTOR_FEATURE_NO_NET * src/raptor_parse.c: (main): Print all features for a parser, don't stop at first non parser feature. * src/raptor_xslt.c: (raptor_xslt_run_grddl_transform_uri): Set URI filter or if feature NO_NET is set, raptor_parse_uri_no_net_filter * src/raptor_xml_writer.c: Add RAPTOR_FEATURE_NO_NET to switches * src/raptor_sax2.c: Add RAPTOR_FEATURE_NO_NET to switches * src/raptor_serialize.c: Add RAPTOR_FEATURE_NO_NET to switches * src/raptor_parse.c: (raptor_parse_uri_no_net_filter): Added to use in parsers to deny network fetches when feature NO_NET is in action. (raptor_parse_uri_with_connection): Set URI filter or if feature NO_NET is set, raptor_parse_uri_no_net_filter (raptor_parser_set_uri_filter): Added. (raptor_set_feature, raptor_get_feature): Handle RAPTOR_FEATURE_NO_NET. (raptor_parser_copy_user_state): Copy uri filter fields. * src/raptor_www.c: (raptor_www_set_uri_filter): Added to add a filter function to check a URI before it is resolved. (raptor_www_fetch): call URI filter function before resolving. * src/raptor_feature.c: Added RAPTOR_FEATURE_NO_NET to deny network requests, primarily in parsing. * src/raptor_internal.h: Add feature_no_net Added raptor_parse_uri_no_net_filter prototype raptor_parser and raptor_www gain fields uri_filter_user_data and raptor_www_uri_filter_func uri_filter * src/raptor.h: Added RAPTOR_FEATURE_NO_NET Added raptor_www_uri_filter_func filter. Added raptor_parser_set_uri_filter prototype. Added raptor_www_set_uri_filter * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Make sure the allocated URI is always freed. * configure.ac: Strip more -O flags from incoming CFLAGS, CXXFLAGS and CPPFLAGS. * configure.ac: Patch configure.ac to remove un-necessary tests for C++ or F77++ compilers that libtool stupidly insists on 2006-08-14 Dave Beckett * src/raptor_serialize_rdfxmla.c: Replace reference counting with counting blank/resource nodes used as subjects and objects to prevent dual-triple generation. Fixes Issue#0000014 http://bugs.librdf.org/mantis/view.php?id=14 Add function documentation and tidy code style. * src/n3_parser.y: (raptor_n3_parse_start): Enforce that a base URI is required. * src/turtle_parser.y: (raptor_turtle_parse_start): Enforce that a base URI is required. 2006-07-30 Dave Beckett * src/raptor_xslt.c: Allow GRDDL value to be a space-separated list of URIs, so now can support dataview:transformation in XML taking a list of transformations as defined in http://www.w3.org/2004/01/rdxh/spec#grddl-xhtml (raptor_xslt_parse_chunk): Split the value into a list of XSLT URIs and use each of them on the document. Fixes Issue #0000041 http://bugs.librdf.org/mantis/view.php?id=41 * src/raptor_xslt.c: Added a table of xpaths and optional XSLT URIs to use, which allows non-GRDDL to be given as long as XML/XHTML is recognised and the XSLT sheet does the transformation work. Added transform pointers for DC , Embedded RDF and HCalendar (raptor_xslt_run_grddl_transform_doc, raptor_xslt_run_grddl_transform_uri): Added, pulled out of raptor_xslt_parse_chunk which was too long. (raptor_xslt_parse_chunk): Much smaller and tidied error messages. Use the given XSLT URI to do a transform if it exists rather than the node value(s) as URIs for multiple transforms. * configure.ac: Remove libwww support * src/raptor_internal.h, src/raptor_www.c, src/raptor_www_libwww.c: Remove libwww support 2006-07-16 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_build_items): Recognize ordinals also by their URI, not just from the deprecated ORDINAL special type - this makes RSS 1.0 serializing work again. Based on patch from Shin-ichi Hirata. 2006-07-15 Dave Beckett * NEWS.html, configure.ac, src/win32_raptor_config.h: Bumped versions to 1.4.11 2006-07-14 Dave Beckett * Snapshotted raptor_1_4_10 for 1.4.10 release (SVN r11070) 2006-07-04 Dave Beckett * raptor.pc.in, src/raptor-config.in: Remove @LDFLAGS from raptor.pc.in and src/raptor-config.in. Fixes Issue#0000097 http://bugs.librdf.org/mantis/view.php?id=97 2006-06-26 Dave Beckett * src/raptor.h: (raptor_identifier_type): no more RAPTOR_IDENTIFIER_TYPE_ORDINAL generated. * src/n3_parser.y: Remove duplicate symbol PREFIX. (raptor_n3_generate_statement): Do not turn a rdf:_n into an ordinal but just check it for validity. * src/turtle_parser.y: Remove duplicate symbol PREFIX. (raptor_turtle_generate_statement): Do not turn a rdf:_n predicate into an ordinal but just check it for validity. * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Do not turn a rdf:_n predicate into an ordinal but just check it for validity. * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Turn a predicate ordinal into a resource using raptor_new_uri_from_rdf_ordinal Handle reifying this afterwards. * src/raptor_general.c: (raptor_statement_copy): Turn a subject, predicate or object ordinal into a resource using raptor_new_uri_from_rdf_ordinal * src/raptor_internal.h: Added raptor_new_uri_from_rdf_ordinal prototype. * src/raptor_uri.c: (raptor_new_uri_from_rdf_ordinal): Added - internal. 2006-06-25 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Add predicate_ordinal field, for now. Fix up calls to this to use it. 2006-06-07 Dave Beckett * src/raptor_rss.c: (raptor_rss_parse_chunk): Return 0 on success 2006-05-07 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_comment_handler): Do nothing when a comment is given outside an xml_element context. * src/raptor_rss.c: (raptor_rss_parse_chunk, raptor_rss_parse_terminate): Make triples appear at end of parsing, not on parser destruction which was terribly wrong. (raptor_rss_comment_handler): Do nothing when a comment is given outside an xml_element context. 2006-05-02 Dave Beckett * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_start): Reset "written header" flag. Without this, reusing a serializer dies. 2006-04-30 Dave Beckett * docs/libraptor.3: Updated for some final 1.4.9 changes 2006-04-22 Dave Beckett * src/raptor_guess.c: (raptor_guess_parse_chunk): Tired of seeing guess parser name, move to verbose debugging. * src/raptor_www.c: (raptor_www_set_http_accept): Tired of seeing accept headers, move to verbose debugging. * src/raptor_xml_writer.c: (main): Rewrite to remove warning punning * src/raptor_www_test.c: (main): Rewrite to remove warning punning * src/raptor_uri.c: (raptor_uri_uri_string_to_filename_fragment): Rewrite to remove warning punning * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Init element to NULL * src/raptor_rss.c: (raptor_rss_end_element_handler): Init cdata_len to 0 * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.10 * Snapshotted raptor_1_4_9 for 1.4.9 release (SVN r10822) * src/raptor_rdfxml.c: (raptor_rdfxml_sax2_new_namespace_handler): Move var def to start of block. * src/raptor_parse.c: (raptor_parse_uri_with_connection): Move var def to start of block. 2006-04-20 Dave Beckett * examples/Makefile.am, examples/rdfcat.c, examples/rdfprint.c: Add tutorial examples rdfcat.c and rdfprint.c here. * docs: DocBook updates: new Tutorial chapter on serializing plus completing of parsing chapter. * src/raptor_uri.c: Change all calloc/mallocs for URI strings to add enough room for a full pointer at the end of a URI string to stop valgrind moans on 64bit systems when they are looking for the end of string NUL. 2006-04-15 Dave Beckett * src/raptor_www_curl.c: Delete alternate path using CURLINFO_CONTENT_TYPE instead of grepping headers. * src/raptor_www_curl.c: Add alternate path to use CURLINFO_CONTENT_TYPE instead of grepping headers. Downside is that the content type appears long after content. Add more debug messages when RAPTOR_DEBUG > 2 (raptor_www_curl_init): Tidy alternate defines * src/raptor_internal.h: Deleted raptor_uri_init_default_handler prototype. * src/raptor_uri.c: (raptor_uri_set_handler, raptor_new_iostream_from_handler): Ajusted to take const handler args. (raptor_uri_init_default_handler): Deleted. (raptor_uri_init): No need to init static struct. * src/raptor.h: Adjust raptor_uri_set_handler and raptor_new_iostream_from_handler prototypes to take const handler args. * src/raptor_rss.c: make raptor_rss_uplift_map const * src/raptor_iostream.c: make handler field a const (raptor_new_iostream_from_handler): Take a const handler. 2006-04-14 Dave Beckett * tests/all-escape.nt, tests/all-escape.rdf: All 0-7F ascii escapes and the XML 1.1 output 2006-04-11 Dave Beckett * docs: DocBook updates 2006-04-10 Dave Beckett * docs: DocBook updates: Tutorial introduction, parsing. 2006-04-09 Dave Beckett * docs: DocBook updates * src/raptor_xml.c: (raptor_xml_element_declare_namespace): Add int return value for when a namespace is failed to be declared, when it is already there. * src/raptor.h: raptor_xml_element_declare_namespace now has an int return value 2006-04-07 Dave Beckett * src/raptor_xslt.c: (raptor_xslt_parse_chunk): Added debug statement. 2006-04-03 Dave Beckett * tests/turtle/manifest.ttl: Added test-25 * tests/turtle/Makefile.am, tests/turtle/test-25.out, tests/turtle/test-25.ttl: Added comment test 2006-04-01 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Tidying of logic near type attribute * src/raptor_rss.c: (raptor_rss_start_element_handler): More atom/old atom/rss guessing. Look for type=xml and an XML mime type to trigger xml writer Look for attribute version on feed to ensure old atom is found * src/raptor_rss.c: (raptor_init_parser_rss): Add another mime type possibility. * src/raptor_rss.c: Add is_atom field to rss_parser structure. (raptor_rss_start_element_handler): Use elements seen to pick is_atom flag. Use is_atom flag to switch between rss author and atom author handling. * src/raptor_rss.c: (raptor_init_parser_rss): Add more unregistered rss mime type possibilities. * src/raptor_guess.c: (raptor_guess_parse_content_type_handler): Strip ';' onwards from content type for guessing. * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): Use xml in mime type guess * src/raptor_parse.c: (raptor_parser_get_accept_header, raptor_parser_get_accept_header_all): Do not format with ;q=1.0 * src/turtle_parser.y: (raptor_init_parser_turtle): Register application/x-turtle once only. * src/raptor_parse.c: (raptor_guess_parser_name, raptor_parser_get_accept_header, raptor_parser_get_accept_header_all): Fix type_q list walking to detect end of loops vs early exit properly. * src/turtle_parser.y: (raptor_init_parser_turtle): Register N3 mime types here with lower Q, if no N3 parser is present. * src/n3_parser.y: (raptor_init_parser_n3): Add another N3 mime type possibility. * src/raptor_parse.c: (raptor_guess_parser_name): Fix i/j problem. * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle atom:summary XML content * configure.ac: No longer require libxml for rss-tag-soup parser. * src/raptor_serialize_rss.c: casts * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Switch to using raptor_sax2 API from xmlReader, and now can do atom type 'xhtml' content using raptor_xml_writer. * src/raptor.h: Add prototype for raptor_xml_element_is_empty * src/raptor_rdfxml.c: (raptor_rdfxml_characters_handler, raptor_rdfxml_cdata_handler, raptor_rdfxml_comment_handler): Add xml_element parameter. * src/raptor_sax2.c: (raptor_xml_element_is_empty): Added. (raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler): Add xml_element parameter. * src/raptor_internal.h: Add xml_element field to raptor_sax2_characters_handler, raptor_sax2_cdata_handler and raptor_sax2_comment_handler 2006-03-30 Dave Beckett * src/raptor_rdfxml.c: update function names in fatal/debug messages * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_handler): Tidy tests for looking for an empty element. * src/raptor_internal.h: raptor_xml_element gains a user_data field 2006-03-29 Dave Beckett * src/raptor_rss.c: Replace raptor_rss_parser_context* with raptor_rss_parser* 2006-03-27 Dave Beckett * src/win32_raptor_config.h: raptor win32 build files update from John Barstow * win32/rapper.vcproj, win32/raptor.sln, win32/raptor.vcproj: raptor win32 build files update from John Barstow * docs/tmpl/section-parser.sgml: docs update * docs/raptor-overrides.txt: Do not override raptor_statement * docs/tmpl/section-unused.sgml: RAPTOR_DEPRECATED 2006-03-26 Dave Beckett * docs/raptor-sections.txt: Added raptor_parser_get_accept_header * src/raptor_parse.c: (raptor_parser_get_accept_header): fix q format * src/n3_parser.y: (raptor_init_parser_n3): Register n3 mime type * src/turtle_parser.y: (raptor_init_parser_turtle): Register turtle experimental mime types * src/raptor_xslt.c: (raptor_init_parser_grddl): Register HTML and XHTML mime types at low q. * src/raptor_rdfxml.c: (raptor_init_parser_rdfxml): Register rdf/xml and older mozilla-era mime type. * src/raptor_www.c: (raptor_www_set_http_accept): debug message * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): look in mime type for rss or atom. (raptor_init_parser_rss): Register two rss mime types. * src/raptor_guess.c: (raptor_guess_accept_header): Added (raptor_guess_parser_register_factory): Use raptor_guess_accept_header to accept all known types. * src/raptor.h: Added prototype for raptor_parser_get_accept_header * src/raptor_parse.c: (raptor_delete_parser_factories): Delete new mime_types list. (raptor_parser_register_factory): Use raptor_parser_factory_add_mime_type. (raptor_free_type_q): Added. (raptor_parser_factory_add_mime_type): Added. (raptor_syntaxes_enumerate): Use mime types from sequence to return first as primary. (raptor_parse_uri_with_connection): Use raptor_parser_get_accept_header to do the work. (raptor_get_mime_type): Use mime_type sequence in factory to return first mime type if registered. (raptor_guess_parser_name): Use mime types from sequence to find them. (raptor_parser_get_accept_header): Added (raptor_parser_get_accept_header_all): Added to return an accept header for all types * src/raptor_internal.h: Added raptor_type_q for storing mime type+Q values. raptor_parser_factory gains raptor_sequence* mime_types replacing a single mime_type const char* and an accept_header method to return the Accept: header rather than use it from the mime_types list. Added prototypes, for raptor_parser_factory_add_mime_type, raptor_free_type_q and raptor_parse_get_all_accept_headers * src/raptor_www_curl.c: (raptor_www_curl_fetch): Get the curl status into a long, not an int which causes failure on 64 bit archs. Fixes issue#0000075 http://bugs.librdf.org/mantis/view.php?id=75 * src/raptor_internal.h: (struct raptor_www_s): Removed CURLcode status 2006-03-20 Dave Beckett * docs/raptor-chapter-intro.xml: docs 2006-03-19 Dave Beckett * docs/raptor-chapter-intro.xml: docs * docs/raptor-docs.xml: Added raptor-chapter-intro.xml * docs/Makefile.am: Added raptor-chapter-intro.xml * docs/raptor-chapter-intro.xml: intro * Makefile.am: deleted obsolete deb rule * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Add foaf and doap to suffixes that are likely RDF/XML * gtkdoc-mkdb reports "100% symbol docs coverage" * docs/raptor-overrides.txt: Override internal struct names. * src/raptor.h, src/raptor_general.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_xml.c, src/raptor_xml_writer.c: autodocs 2006-03-18 Dave Beckett * src/raptor_utf8.c, docs/tmpl/section-uri.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-unicode.sgml: autodocs * src/raptor_utf8.c: (raptor_unicode_char_to_utf8): Add docs. (raptor_utf8_to_unicode_char): Add docs. Now also checks for overlong UTF-8 sequences, illegal code positions or out of range codes. * docs/raptor-sections.txt: Added new functions * src/turtle_parser.y: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/raptor_rss.c: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/raptor_rdfxml.c: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/ntriples_parse.c: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/n3_parser.y: Remove generating RAPTOR_IDENTIFIER_TYPE_RESOURCE for statement predicates as deprecated in 1.4.8 * src/raptor_uri.c: (raptor_new_uri): Fail on NULL or empty uri_string. (raptor_new_uri_from_uri_local_name): Fail on NULL uri or local_name (raptor_new_uri_relative_to_base): Fail on NULL base_uri or uri_string (raptor_new_uri_from_id): Fail on NULL base_uri or id. (raptor_new_uri_for_rdf_concept): Fail on NULL name. (raptor_uri_copy): Fail on NULL uri. (raptor_uri_as_string): Fail on NULL uri. (raptor_uri_as_counted_string): Fail on NULL uri. (raptor_uri_filename_to_uri_string): : Fail on NULL filename. (raptor_uri_uri_string_to_filename_fragment): Fail on NULL or empty uri_string. (raptor_uri_uri_string_is_file_uri): Fail on NULL or empty uri_string. (raptor_new_uri_for_xmlbase): Fail on NULL uri. (raptor_new_uri_for_retrieval): Fail on NULL uri. (raptor_uri_to_relative_counted_uri_string): Fail on NULL reference_uri. Document allowing NULL base_uri. (raptor_uri_print): Print "(NULL URI)" for NULL URI. (raptor_uri_to_counted_string): Fail on NULL uri. * src/raptor_rdfxml.c: More raptor_* to raptor_rdfxml_* renames * src/raptor_internal.h: Delete prototypes for functions only used in rdfxml * src/raptor_qname.c: Return const namespace from raptor_qname_get_namespace * src/raptor.h: Return const namespace from raptor_qname_get_namespace * src/raptor_rdfxml.c: (raptor_rdfxml_record_ID): Renamed from raptor_record_ID (raptor_rdfxml_inscope_base_uri): Renamed from raptor_inscope_base_uri and now static (raptor_inscope_xml_language): Deleted, replaced with 1 call to raptor_sax2_inscope_xml_language * src/raptor_rdfxml.c: raptor_element to raptor_rdfxml_element renames 2006-03-15 Dave Beckett * src/raptor_xml.c: (raptor_iostream_write_xml_any_escaped_string): Write XML-escaped ASCII 9 and A as XML with trailing ';' * tests/Makefile.am, tests/ex-60.nt, tests/ex-60.rdf: Added ex-60 rdf/xml serializing test * src/raptor.h: Added raptor_qname_get_namespace * src/raptor_qname.c: (raptor_qname_get_namespace): Added. * src/raptor_www.c: (raptor_uri_uri_string_is_file_uri): Renamed from raptor_uri_string_is_file_uri. * src/raptor_uri.c: (raptor_uri_uri_string_is_file_uri): Renamed from raptor_uri_string_is_file_uri. * src/raptor.h: (raptor_uri_uri_string_is_file_uri): Renamed from raptor_uri_string_is_file_uri. 2006-03-04 Dave Beckett * src/turtle_parser.y: (directive): Use raptor_new_namespace_from_uri and save string conversions. * src/n3_parser.y: (directive): Use raptor_new_namespace_from_uri and save string conversions. * src/raptor_www.c: (raptor_www_fetch): Use raptor_uri_string_is_file_uri instead of deprecated raptor_uri_is_file_uri * src/raptor_serialize_simple.c: (raptor_simple_serialize_statement): Use new raptor_iostream_write_uri. * src/raptor_uri.c: (raptor_uri_is_file_uri): Deprecated for raptor_uri_string_is_file_uri. (raptor_uri_string_is_file_uri): Added. * src/raptor.h: Deprecated raptor_uri_is_file_uri for raptor_uri_string_is_file_uri. Added raptor_iostream_write_uri. * src/raptor_iostream.c: (raptor_iostream_write_uri): Added. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement): Do not free shared string returned from raptor_uri_as_string. Fixes issue#0000065 http://bugs.librdf.org/mantis/view.php?id=65 * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement): Use raptor_uri_to_string so that new strings are allocated then freed. Fixes issue#0000065 http://bugs.librdf.org/mantis/view.php?id=65 * src/raptor_stringbuffer.c: (raptor_stringbuffer_append_string_common, raptor_stringbuffer_append_counted_string, raptor_stringbuffer_append_string): Do nothing on appending a NULL string or a string of length 0. (main): Add tests for this. Fixes issue#0000073 http://bugs.librdf.org/mantis/view.php?id=73 2006-02-21 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_new_qname_from_resource): Use raptor_namespaces_qname_from_uri to prefer using an existing XML namespace for creating a qname, otherwise make a new one just for this element. * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Added, to make a qname from the in-scope namespaces in a stack. * src/raptor.h: Added prototype for raptor_namespaces_qname_from_uri 2006-02-20 Dave Beckett * src/raptor_rss.c: raptor_rss_parser_context_s gains is_empty and nstack fields. (raptor_rss_context_init): Initialise new namespace stack and the nspace field of raptor_rss_namespace_info. (raptor_rss_context_terminate): Delete new namespace stack. (raptor_rss_parse_start): Synthesise the namespace events. (raptor_rss_start_element): Push is_empty flag into rss parser context and reorganize empty case. (raptor_rss_parser_processNode): set element_is_empty flag and use it. * src/raptor_rss_common.c: Add RDF namespace for RSS use * src/raptor_rss.h: Add RDF namespace for RSS use 2006-02-19 Dave Beckett * AUTHORS: update me 2006-02-18 Dave Beckett * docs/raptor-sections.txt: Add raptor_xml_element_get_attributes raptor_xml_element_get_attributes_count * src/raptor_serialize_rdfxmla.c: Remove // comments * src/raptor_guess.c: Cast for C++ * src/n3_parser.y: Cast for C++ * src/turtle_parser.y: Cast for C++ * src/raptor_sax2.c: (raptor_sax2_parse_start, raptor_sax2_end_element): Code tidying, move decls to top of functions and don't end early if there is no handler. * src/raptor_rdfxml.c: Remove several unused uses of raptor_sax2* * src/raptor_rdfxml.c: Change to use field name xml_element for a raptor_xml_element inside raptor_element. * src/raptor_sax2.c: (raptor_free_sax2): Delete obsolete raptor_libxml_libxml_free_entities. Free base URI. (raptor_sax2_inscope_base_uri): Return SAX2 base URI if nothing is in scope. (raptor_sax2_parse_start): Save Base URI. (raptor_sax2_start_element): Add all code from old raptor_rdfxml_start_element_handler. (raptor_sax2_end_element): Add all code from old raptor_rdfxml_end_element_handler. * src/raptor_rdfxml.c: (raptor_rdfxml_sax2_new_namespace_handler): Add raptor_parser_start_namespace call. (raptor_rdfxml_start_element_handler): Deleted and merged into raptor_sax2_start_element. (raptor_rdfxml_end_element_handler): Use raptor_xml_element* argument. (raptor_inscope_base_uri): Tidy code. * src/raptor_internal.h: raptor_sax2_start_element_handler and raptor_sax2_end_element_handler now take raptor_xml_element* raptor_sax2 gaisn base_uri field. * src/raptor_rdfxml.c: (raptor_rdfxml_end_element_handler): Split into XML and RDF/XML parts now calling raptor_rdfxml_end_xml_element_handler. (raptor_rdfxml_end_xml_element_handler): Added, splitting RDF/XML part out of raptor_rdfxml_end_element_handler * src/raptor_sax2.c: (raptor_free_sax2): Run raptor_namespaces_clear. (raptor_sax2_simple_error): Added, to report errors from namespaces upwards. (raptor_sax2_parse_start): Init namespaces stack. * src/raptor_rdfxml.c: Deleted raptor_namespace_stack, now in raptor_sax2 (raptor_rdfxml_start_xml_element_handler): Added, splitting RDF/XML part out of raptor_rdfxml_start_element_handler (raptor_rdfxml_end_element_handler): Prepare for splitting XML and RDF/XML parts. (raptor_rdfxml_parse_start): Moved namespaces stack init into raptor_sax2_parse_start. * src/raptor_internal.h: raptor_sax2 gains raptor_namespace_stack from rdf/xml parser * src/raptor_rdfxml.c: (raptor_rdfxml_sax2_new_namespace_handler): Added, as callback raptor_sax2_set_namespace_handler. (raptor_rdfxml_start_element_handler): Split XML and RDF/XML namespace processing parts in preparation for moving them elsewhere. (raptor_rdfxml_parse_init): Use raptor_sax2_set_feature to set the XML namespace handler. * src/raptor.h: Added prototypes for raptor_xml_element_get_attributes and raptor_xml_element_get_attributes_count. * src/raptor_xml.c: (raptor_xml_element_get_attributes, raptor_xml_element_get_attributes_count): Added. * src/raptor_internal.h: raptor_sax2 gaisn namespace_handler and feature_normalize_language fields. Added prototypes for raptor_sax2_set_namespace_handler and raptor_sax2_set_feature. * src/raptor_sax2.c: (raptor_sax2_set_namespace_handler): Added, to allow callbacks when an XML namespace is defined. (raptor_sax2_set_feature): Added, with one feature RAPTOR_FEATURE_NORMALIZE_LANGUAGE for normalizing xml:lang values. 2006-02-04 Dave Beckett * src/raptor_parse.c: (raptor_parser_warning): Restored. * src/raptor_parse.c: (raptor_parser_error_varargs): Restored. * src/Makefile.am: Added fix-bison * src/fix-bison: Format output generated by bison * src/raptor_internal.h: revert experiment not intended to be commited * src/raptor_internal.h: Add prototypes for raptor_invoke_message_varargs and raptor_invoke_simple_message_varargs * src/raptor_parse.c: (raptor_parser_simple_error, raptor_parser_warning): Use raptor_invoke_message_varargs (raptor_parser_error_varargs, raptor_parser_warning_varargs): Deleted. * src/raptor_general.c: (raptor_invoke_simple_message_varargs, raptor_invoke_message): Helper functions for invoking error/warning/fatal error handlers with varargs, just given a handler that takes a single message string. 2006-02-03 Dave Beckett * configure.ac: allow --enable-parsers/serializers=none 2006-02-02 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element, raptor_rss_end_element, raptor_rss_cdata): Added, pulling big chunks of code out of the switch in raptor_rss_parser_processNode. 2006-01-27 Dave Beckett * src/raptor_serialize_rss.c: Do not write XML header here, XML writer does it. 2006-01-22 Dave Beckett * src/raptor_guess.c: (raptor_guess_parse_chunk): Tired of seeing debug message. Goodbye. 2006-01-16 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_format): NULL-terminate the namespace string. Fixes bug 0000062 http://bugs.librdf.org/mantis/view.php?id=62 * tests/test.nt: Remove svn:eol-style native property so that multiple line endings in one file work * win32/rapper.dsp, win32/rapper.vcproj, win32/raptor.dsp, win32/raptor.dsw, win32/raptor.sln, win32/raptor.vcproj, win32/raptortest.cpp, win32/raptortest.dsp, win32/raptortest.vcproj: Restore CRLF end of lines, set svn:eol-style CRLF 2006-01-14 Dave Beckett * docs/tmpl/section-serializer.sgml, docs/tmpl/section-xml-namespace.sgml: update docs for new functions * docs/raptor-sections.txt: Added raptor_serialize_set_namespace_from_namespace * utils/rapper.c: (relay_namespaces): Added, calling raptor_serialize_set_namespace_from_namespace when namespaces are not just printed out. Makes serializers use namespace prefix/URIs found in parsed RDF. * src/raptor_serialize_rdfxmla.c: Delay the writing of the namespaces on the rdf:RDF root element till as late as possible, allowing user declaration of namespaces to effect the output. (raptor_rdfxmla_serialize_init): Add rdf:RDF's namespace to the list of namespaces to declare. (raptor_rdfxmla_serialize_terminate): Do not free namespace #0 because of above. (raptor_rdfxmla_serialize_declare_namespace_from_namespace): Added, to set a namespace declared once only, preventing the same prefix appearing twice. (raptor_rdfxmla_serialize_declare_namespace): Use the above. (raptor_rdfxmla_serialize_start): Do not write root element here. (raptor_rdfxmla_ensure_writen_header): Added to write root element and namespace declarations. (raptor_rdfxmla_serialize_statement, raptor_rdfxmla_serialize_end): Call raptor_rdfxmla_ensure_writen_header before emitting syntax. (raptor_rdfxmla_serializer_register_factory): Register raptor_rdfxmla_serialize_declare_namespace_from_namespace. * src/raptor_serialize_rdfxml.c: Delay the writing of the namespaces on the rdf:RDF root element till as late as possible, allowing user declaration of namespaces to effect the output. (raptor_rdfxml_serialize_init): Add rdf:RDF's namespace to the list of namespaces to declare. (raptor_rdfxml_serialize_terminate): Do not free namespace #0 because of above. (raptor_rdfxml_serialize_declare_namespace_from_namespace): Added, to set a namespace declared once only, preventing the same prefix appearing twice. (raptor_rdfxml_serialize_declare_namespace): Use the above. (raptor_rdfxml_serialize_start): Do not write root element here. (raptor_rdfxml_ensure_writen_header): Added to write root element and namespace declarations. (raptor_rdfxml_serialize_statement, raptor_rdfxml_serialize_end): Call raptor_rdfxml_ensure_writen_header before emitting syntax. (raptor_rdfxml_serializer_register_factory): Register raptor_rdfxml_serialize_declare_namespace_from_namespace. * src/raptor.h: Added prototype for raptor_serialize_set_namespace_from_namespace * src/raptor_serialize.c: (raptor_serialize_set_namespace): Now a wrapper around: (raptor_serialize_set_namespace_from_namespace:): Added, to set a namespace for serialzing from an existing raptor_namespace * src/raptor_internal.h: raptor_serializer_factory gains a factory method declare_namespace_from_namespace * tests/Makefile.am: Report error output on rdfxml-abbrev failure * tests/Makefile.am: (check-rdfxmla): Don't die on first error, report all then die. * docs/raptor-sections.txt: Added raptor_namespace_get_counted_prefix * src/raptor.h: Added prototype for raptor_namespace_get_counted_prefix * src/raptor_namespace.c: (raptor_namespace_get_counted_prefix): Added to return prefix and it's length. * src/turtle_parser.y: (statementList): Rewrite to remove all shift/reduce conflicts. * src/n3_parser.y: (statementList): Rewrite to remove all shift/reduce conflicts. 2006-01-10 Dave Beckett * src/n3_parser.y: Make literal be just literals, resource only URI or QNAME. * src/turtle_parser.y: Use TRUE and FALSE boolean literals to make xsd:boolean values. Make literal be just literals, resource only URI or QNAME. * src/turtle_lexer.l: Added true & false boolean literals * tests/turtle/Makefile.am, tests/turtle/manifest.ttl, tests/turtle/test-24.out, tests/turtle/test-24.ttl: Added boolean literals tests * src/turtle_parser.y: Compatibility fixes for older bisons (1.7x) and whitespace edits. * src/n3_parser.y: Compatibility fixes for older bisons (1.7x) and whitespace edits. 2006-01-09 Dave Beckett * src/turtle_parser.y, src/n3_parser.y: Compatibility fixes for older bisons (1.7x) and whitespace edits. * examples/Makefile.am: Fix raptor_abort link dependencies 2006-01-08 Dave Beckett * fix-groff-xhtml: footer 2006-01-07 Dave Beckett * Makefile.am, autogen.sh, configure.ac, docs/Makefile.am, examples/Makefile.am, examples/grapper.c, examples/raptor_abort.c, fix-groff-xhtml, manifest.pl, raptor-src-config.in, src/Makefile.am, src/fix-flex, src/n3_common.h, src/n3_lexer.l, src/n3_parser.y, src/ntriples_parse.c, src/parsedate.y, src/raptor-config.1, src/raptor-config.1, src/raptor-config.in, src/raptor.h, src/raptor_expat.c, src/raptor_feature.c, src/raptor_general.c, src/raptor_guess.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_nfc.c, src/raptor_nfc.h, src/raptor_nfc_test.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_set.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_utf8.c, src/raptor_win32.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libwww.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/raptor_xsd.c, src/raptor_xslt.c, src/strcasecmp.c, src/turtle_common.c, src/turtle_common.h, src/turtle_lexer.l, src/turtle_parser.y, src/win32_raptor_config.h, tests/Makefile.am, tests/empty.c, tests/ex-52.svg, tests/test.html, tests/test.nt, tests/test.svg, utils/Makefile.am, utils/getopt.c, utils/rapper.1, utils/rapper.c, utils/raptor_getopt.h, utils/rdfdiff.c: Remove RCS ID. Copyright 2006 * .cvsignore, data/.cvsignore, docs/.cvsignore, examples/.cvsignore, src/.cvsignore, tests/.cvsignore, tests/turtle/.cvsignore, utils/.cvsignore, win32/.cvsignore, delete .cvsignore files 2006-01-07 Dave Beckett * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.9 * docs/tmpl/section-feature.sgml: Added RAPTOR_FEATURE_WRITER_XML_VERSION * Switched to Subversion version control. CVS tag for raptor 1.4.8: raptor_1_4_8 Subversion revision ID for raptor 1.4.8: r3091 2006-01-03 Dave Beckett * Snapshotted raptor_1_4_8 for 1.4.8 release (SVN r3091) 2006-01-02 Dave Beckett * src/raptor_namespace.c (main): Cast for string * src/n3_lexer.l: Apply more turtle to n3 changes for names. * src/n3_parser.y: Update N3 parser to turtle. * src/n3_lexer.l: Update N3 lexer to turtle. * src/raptor_general.c, src/raptor_namespace.c, src/turtle_parser.y, src/turtle_lexer.l: 2006 and urls * tests/turtle/Makefile.am: Added test-23 * tests/turtle/test-23.out, tests/turtle/test-23.ttl: Test long literal ending in a double quote * tests/turtle/manifest.ttl: Added test-23 testing long literal ending in a double quote * src/turtle_common.c (raptor_stringbuffer_append_turtle_string): Fix comment to match code and report hex char of bad escapes. * src/turtle_lexer.l: Try to handle \-escapes inside """ properly. * tests/turtle/README.txt: url * tests/turtle/Makefile.am: Add TEST_MANIFEST_FILES to tests.zip * tests/turtle/manifest-bad.ttl, tests/turtle/manifest.ttl: Updated manifests from Arjohn Kampman * src/turtle_parser.y (DECIMAL_LITERAL): Added turtle decimal and double after SPARQL 2005-11-23 * src/turtle_lexer.l: Added turtle decimal and double after SPARQL 2005-11-23 * tests/turtle/Makefile.am, tests/turtle/test-19.out, tests/turtle/test-21.out, tests/turtle/test-21.ttl, tests/turtle/test-22.out, tests/turtle/test-22.ttl: Added decimal/double/integer + and - checks from http://lists.w3.org/Archives/Public/public-cwm-talk/2005OctDec/0017.html 2006-01-01 Dave Beckett * src/raptor_namespace.c (raptor_namespaces_find_namespace): Handle searching for default namespace with prefix=NULL. (main): Add test code for above. raptor2-2.0.15/ChangeLog.50000644000175000017500000024056310247340024012034 000000000000002004-12-31 Dave Beckett * raptor_rss.c (raptor_rss10_serialize_terminate): Free all namespaces, now they are not stacked explicitly. Free namespace stack. (raptor_rss10_build_xml_names): Use raptor_new_namespace and don't start the rdf namespace. (raptor_rss10_build_xml_names): Use raptor_new_namespace and don't start the namespaces ((raptor_rss10_serialize_end): Make a namespace stack here, with only xml: defined. * raptor_xml_writer.c (raptor_xml_writer_start_namespace_full): Deleted. (main): Declare the foo namespace but don't start it, so that the xml writer will do that. * raptor_xml_writer.c: Optionally declare a namespace stack internally. (raptor_new_xml_writer): Add optional raptor_namespace_stack parameter, if NULL declare one internally. * turtle_lexer.l, turtle_parser.y: Delete unused WS token * raptor_xml_writer.c, raptor_sax2.c, raptor_rss.c, raptor_rdfxml.c, raptor_internal.h, raptor.h, libraptor.3: Rename raptor_sax2_element to raptor_xml_element throughout. * raptor_internal.h: Added feature_start_uri to raptor_serializer * raptor_serialize.c (raptor_free_serializer): Tidy up any feature_start_uri set. (raptor_serializer_set_feature_string): Added, handling feature_start_uri created from a passed in string. (raptor_serializer_get_feature_string): Added, handling feature_start_uri as a returned shared string. * raptor_parse.c (raptor_parser_set_feature_string): Added, always failing. (raptor_parser_get_feature_string): Added, always failing. * raptor.h: Added feature RAPTOR_FEATURE_START_URI Added prototypes for raptor_parser_set_feature_string, raptor_parser_get_feature_string, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string and raptor_feature_value_type * raptor_feature.c: Added flag bits for string valued features. Added startUri (RAPTOR_FEATURE_START_URI) with a string value. (raptor_feature_value_type): Added, to return value of a feature. 2004-12-30 Dave Beckett * libraptor.3: Added SAX2 XML Element and XML Writer classes. * raptor_internal.h, raptor.h: Moved raptor_sax2_element and raptor_xml_writer to public API. * libraptor.3: Added rss-1.0 to raptor_new_serializer description. * libraptor.3: More updates for 1.4.3 2004-12-25 Dave Beckett * raptor_rss.c (raptor_rss_parser_processNode): Turn val into (raptor_rss10_emit_item): Always serialize rss:items at the end of an rss channel. * raptor_xml_writer.c, raptor_xml.c, raptor_utf8.c, raptor_sax2.c, raptor_rss.c, raptor_general.c: Casts for c++. Rename variables namespace to nspace. 2004-12-24 Dave Beckett * raptor_www_test.c (main): Cast for size_t 2004-12-23 Dave Beckett * raptor_rss.c (raptor_rss10_serialize_statement): Fix item URI check to use correct URI. In debugging unknown typed node, print type URI. * raptor_rss.c (raptor_rss10_serialize_statement): Do not look in items with no URI. (raptor_rss10_build_xml_names): Do not make qnames for types with no namespace. * raptor_rss.c (raptor_rss10_build_items): Do nothing if there is no seq_uri * raptor_rss.c (raptor_init_serializer_rss10): Give rss 1.0 a URI * raptor_serialize.c (raptor_iostream_write_string_ntriples): Renamed from raptor_serialize_ntriples_print_string and made public. Handle delimiters that aren't ' or " such as >, and if found \uHHHH escape it. (raptor_iostream_write_statement_part_ntriples): Renamed from raptor_serialize_ntriples_print_statement_part and made public. (raptor_iostream_write_statement_ntriples): Added and made public. (raptor_ntriples_serialize_statement): Moved most code to raptor_iostream_write_statement_ntriples * raptor.h: Add and export raptor_iostream_write_ntriples_string and raptor_iostream_write_statement_ntriples * tests/turtle/test-13.ttl, tests/turtle/test-13.out: Use a namespace URI that gives a predicate which could be serialized to rdf/xml. * raptor_rss.c (raptor_rss_insert_identifiers): For channel type, check both the link field and the atom:id field. * raptor_rss.c (raptor_rss10_emit_item): Emit the .... here. (raptor_rss10_serialize_end): Moved items code above. * raptor_parse.c (raptor_guess_parser_name): Don't emit debug messages about scores unless very debuggy. * n3_lexer.l, turtle_lexer.l: In state, accept remaining characters so -s is true. * raptor.h: Export raptor_xml_name_check * raptor_xml.c (raptor_valid_xml_ID): Use raptor_xml_name_check with appropriate XML version. (raptor_xml_name_check): Added to check for a legal XML name. * raptor_utf8.c (raptor_utf8_check): Added, to just check a string is good UTF-8 and all the Unicode characters are 0 <= char <= 0x10ffff * raptor.h: Export raptor_utf8_check * raptor_nfc_test.c (main): Use raptor_utf8_check * raptor_xml_writer.c (main): Update tests for changed xml_writer api * raptor.h: Export raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namestartchar raptor_unicode_is_xml11_namechar and raptor_unicode_is_xml10_namechar * raptor_utf8.c: (raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml10_namechar): Added, as public functions called by raptor_unicode_is_namestartchar and raptor_unicode_is_namechar respectively. * raptor_rss.c (raptor_clear_rss_items): Renamed from raptor_free_rss_items. Use raptor_free_rss_item. (raptor_rss_context_terminate): Rename call to raptor_clear_rss_items * raptor_rss.c (raptor_clear_rss_item): Renamed from raptor_free_rss_item to empty a static raptor_rss_item. (raptor_free_rss_item): Same as above but deallocates the item too. (raptor_free_rss_items, raptor_rss_context_terminate): Use raptor_clear_rss_item. * raptor_rss.c (raptor_rss10_move_statements): Add item arg. Remove auto-fail with type RAPTOR_RSS_ITEM, and now look in the sequence of items for instances of this type. Count and report moved statements counts when debugging. (raptor_rss10_store_statement): Only print out individal statement moves when debugging. (raptor_rss10_serialize_statement): When typed node is an item, get the URI from the entry in the sequence if it exists, maybe move the statements then. (raptor_rss10_build_items): Move any item statements once the item URIs have been made. (raptor_rss10_serialize_end): Report triples remaining when debugging. Remove last raw use of raptor_iostream* 2004-12-22 Dave Beckett * raptor_rss.c: Fix 'enc' prefix. Add rdf_RDF_element and xml_writer to raptor_rss10_serializer_context. (raptor_rss10_serialize_init): No need for nstack here. (raptor_rss10_serialize_terminate): Delete nstack tidy. Tidy up xml_writer and type qnames. (raptor_rss10_move_statements): Note don't do rss items. (raptor_rss10_build_items): Build list of raptor_rss_item* in rss_serializer->items. (raptor_rss10_build_xml_names): Added to make namespaces and qnames for fields and types; pulled out of raptor_rss10_build_items. (raptor_rss10_emit_item): Delete xml-writer, iostr args. Replace more raptor_iostream* functions with raptor_xml_writer* equivalents. (raptor_rss10_serialize_end): Extra nl at end * raptor_rss.c: Fix 'enc' prefix. Add rdf_RDF_element and xml_writer to raptor_rss10_serializer_context. (raptor_rss10_serialize_init): No need for nstack here. (raptor_rss10_serialize_terminate): Delete nstack tidy. Tidy up xml_writer and type qnames. (raptor_rss10_move_statements): Note don't do rss items. (raptor_rss10_build_items): Build list of raptor_rss_item* in rss_serializer->items. (raptor_rss10_build_xml_names): Added to make namespaces and qnames for fields and types; pulled out of raptor_rss10_build_items. (raptor_rss10_emit_item): Delete xml-writer, iostr args. Replace more raptor_iostream* functions with raptor_xml_writer* equivalents. (raptor_rss10_serialize_end): Move rdf_RDF qname stuff to new raptor_rss10_build_xml_names Move bits around so that rdf:RDF is declared with all namespaces known and using raptor_xml_writer_start_element. Emit rdf:Seq and rdf:li elements using_xml_writer_start_element with attributes as needed. Attempt to emit channel items. * raptor_internal.h: Remove raptor_xml_writer_element_declare_namespace_full * raptor_xml_writer.c: Renamed content_cdata_namespaces to nstack, content_cdata_namespaces_depth to nstack_depth. (raptor_xml_writer_start_namespace_full): Added, to start a new namespace in the xml_writer at the current element. (raptor_xml_writer_cdata_counted, raptor_xml_writer_raw_counted, raptor_xml_writer_comment_counted): Added.counted string versions. * raptor_sax2.c (raptor_new_sax2_element, raptor_free_sax2_element): Init/tidy declared_namespaces. (raptor_sax2_declare_namespace): Added to declare the given namespace on the element. (raptor_iostream_write_sax2_element): Handle declared_namespaces; boost the nspace_declarations by size of the sequence. Declare all the namespaces in the declared_nspaces sequence. * raptor_rdfxml.c (raptor_xml_comment_handler): Use raptor_xml_writer_comment (uncounted). (raptor_cdata_grammar): Use raptor_xml_writer_cdata_counted * raptor_internal.h: raptor_sax2_element added declared_nspaces field Added prototype for raptor_sax2_declare_namespace. Added prototypes for raptor_xml_writer_start_namespace_full and raptor_xml_writer_element_declare_namespace_full Split raptor_xml_writer_cdata / raptor_xml_writer_raw / raptor_xml_writer_comment into uncounted and raptor_xml_writer_cdata_counted / raw_counted / comment_counted 2004-12-21 Dave Beckett * raptor_rss.c: Made rss1.0 the default namespace for writing; added prefixes for others. (raptor_rss10_serialize_end): Removed unused commented code. * raptor_qname.c (raptor_qname_copy): Added. * raptor.h: Added raptor_qname_copy. * raptor_rss.c: raptor_rss_item field node_type is now a pointer to the raptor_rss_info* for that node type. (raptor_rss_insert_identifiers, raptor_rss_emit_item): Update for new node_type definition. raptor_rss10_serializer_context now has rdf_nspace (raptor_rss10_build_items): Declare rdf namespace and store in rss_serializer->rdf_nspace - freed when namespace stack is destroyed. Declare all raptor_namespace* for the raptor_rss_namespaces_info[].nspace Declare all raptor_qname* for the raptor_rss_fields_info[].qname Declare all raptor_qname* raptor_rss_types_info[].qname Insert node_type pointers for all items. (raptor_rss10_emit_item): Add xml_writer argument. Use more of xml_writer to emit main type element and predicate names. Incomplete. (raptor_rss10_serialize_end): Declare and use mxl_writer and qname, element for rdf:RDF. Incomplete. * raptor_rss.c: Do not init all NULL fields for raptor_rss_namespaces_info * raptor_rss.c: Added raptor_rss_namespace_info typedef and raptor_rss_namespaces_info merging uri_strings and prefixes for namespaces. Made all rss info static. (raptor_rss_common_init, raptor_rss_parser_processNode, raptor_rss10_serialize_end): Update for namespace URIs struct change. * raptor_rss.c: Added rss_namespace_prefix_strings to list namespaces to declare. raptor_rss10_serializer_context gains raptor_namespace_stack nstack field. (raptor_rss10_serialize_init): Init the namespace stack. (raptor_rss10_serialize_terminate): Clean namespace stack and any defined qnames. (raptor_rss10_emit_item): Padding. (raptor_rss10_serialize_end): Write namespace decls using stack. * raptor_rss.c: Rename some destructors more normally: (raptor_free_rss_item): Renamed from raptor_item_free. (raptor_free_rss_items): Renamed from raptor_rss_items_free. (raptor_rss10_move_statements, raptor_rss10_store_statement): Record field counts per item. (raptor_rss10_build_items): Find the rdf:_ items and put them into a raptor sequence. (raptor_rss10_emit_item): Skeleton rss item writer. (raptor_rss10_serialize_end): Make the final structures and do the serializing in skeleton form. 2004-12-20 Dave Beckett * raptor_rss.c: Added seq_uri to raptor_rss10_serializer_context (raptor_rss10_serialize_terminate): Tidy seq_uri (raptor_rss10_move_statements, raptor_rss10_store_statement): Ignore checking fields with no URI. (raptor_rss10_serialize_statement): For rdf:Seq node, store the URI or blank node - as fake URI. Make fake object node correctly for general statements. * raptor_rss.c (raptor_rss_common_init): Prevent 2x initialising. (raptor_item_free): Free type URI (raptor_rss10_serialize_terminate): Call raptor_rss_common_terminate. (raptor_rss10_move_statements): Use RAPTOR_IDENTIFIER_TYPE_PREDICATE set raptor_sequence_set_at destroy overwritten object. (raptor_rss10_store_statement): Use RAPTOR_IDENTIFIER_TYPE_PREDICATE Make fake URIs from blank node strings and free them. * raptor_general.c (raptor_free_statement): Handle more statement part types. * raptor_rss.c: RAPTOR_RSS_FIELDS_SIZE now stops before UNKNOWN for real field names. (raptor_rss10_move_statements): Added, to move statements from the sequence of triples to below a typed node once a new typed node of the given type appears. (raptor_rss10_store_statement): Added, to store a given statement either below an existing typed node or in a sequence of triples if it can't be found one. * raptor_rss.c (raptor_rss10_serialize_statement): iostream write turned into debug. 2004-12-19 Dave Beckett * raptor_uri.c (raptor_uri_print): Cast for gcc * raptor_rss.c: Use raptor_uri in raptor_rss_item. (raptor_rss_context_init, raptor_rss_context_terminate): Added and used in parser and serializer init and terminate. (raptor_rss10_serialize_init): Initialise list of triples, items. (raptor_rss10_serialize_terminate): Tidy up triples, items. (raptor_rss10_serialize_statement): Look for known typed nodes, identify ones matching rss 1.0 model and also look for the rdf:Seq. Store other triples for later. (raptor_rss10_serialize_end): Added skeleton. 2004-12-18 Dave Beckett * raptor_uri.c (raptor_uri_print): Added. * raptor.h: Added raptor_uri_print * raptor_general.c (raptor_statement_copy): Added statement copy constructor (raptor_free_statement): Added statement destructor. * raptor_internal.h: Added raptor_statement_copy and raptor_free_statement * raptor_rss.c: Moved parser namespace URIs to common code rss_namespace_uris. (raptor_rss_common_init, raptor_rss_common_terminate): Added to initialise and free up common rss items - namespace URIs, URIs for types and uris for properties. Added skeleton RSS 1.0 serializer (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate, raptor_rss10_serialize_statement, raptor_rss10_serialize_finish_factory, raptor_rss10_serializer_register_factory, raptor_init_serializer_rss10): Added skeleton RSS 1.0 serializer factory and methods. * raptor_general.c (raptor_init): Added call to raptor_init_serializer_rss10 * raptor_internal.h: Added raptor_init_serializer_rss10 * raptor_rss.c (raptor_rss_parse_recognise_syntax): Add atom checks. 2004-12-17 Dave Beckett * tests/Makefile.am: Added RDF_MAYFAIL_XML_TEST_FILES,RDF_MAYFAIL_XML_OUT_FILES and rule check-mayfail-xml-rdf to run checks that may fail due to XML parser bugs. * raptor_sax2.c, raptor_serialize.c, raptor_iostream.c, raptor_nfc.c, raptor_rdfxml.c: Initialise possibly used but uninitialised vars to remove gcc warning with -O. * raptor_namespace.c, raptor_rdfxml.c, raptor_serialize.c, raptor_xml_writer.c, rdfdump.c, raptor.h, raptor_internal.h, raptor_iostream.c: Casts for c++ * raptor_rdfxml.c: Fix using wrong element name in warnings. * raptor_rdfxml.c (raptor_xml_start_element_handler): Use raptor_sax2_element_set_attributes. * raptor_xml_writer.c (raptor_xml_writer_empty_element): Added. (raptor_xml_writer_start_element, raptor_xml_writer_end_element): Updated raptor_iostream_write_sax2_element calls (main): Add attributes and test writing empty element. * raptor_internal.h: Added raptor_sax2_element_set_attributes Added is_empty arg to raptor_iostream_write_sax2_element Added raptor_xml_writer_empty_element * raptor_sax2.c (raptor_sax2_element_set_attributes): Added. (raptor_print_sax2_element): tidy (raptor_iostream_write_sax2_element): Added is_empty arg and use it for form. 2004-12-14 Dave Beckett * libraptor.3: Actaully updated for 1.4.3 so far * libraptor.3: Updated for 1.4.2 so far. * tests/turtle/README.txt, tests/turtle/rdfq-results.out, tests/turtle/test-00.out, tests/turtle/Makefile.am: Switch to base URI http://www.w3.org/2001/sw/DataAccess/df1/tests/ * tests/turtle/test-13.out, tests/turtle/test-13.ttl, tests/turtle/manifest.ttl, tests/turtle/bad-12.ttl, tests/turtle/bad-13.ttl, tests/turtle/manifest-bad.ttl, tests/turtle/bad-10.ttl, tests/turtle/bad-11.ttl, tests/turtle/bad-08.ttl, tests/turtle/bad-09.ttl, tests/turtle/bad-04.ttl, tests/turtle/bad-05.ttl, tests/turtle/bad-06.ttl, tests/turtle/bad-07.ttl, tests/turtle/Makefile.am: Import more bad turtle tests, initial manifest files * raptor_namespace.c (raptor_iostream_write_namespace): Handle ns->uri is NULL and no prefix, i.e. emitting xmlns="" * raptor_namespace.c (raptor_namespaces_format): Handle ns->uri is NULL and no prefix, i.e. emitting xmlns="" 2004-12-08 Dave Beckett * raptor_uri.c (raptor_default_new_uri_relative_to_base): Ask for 1 more char for new URI to allow inserting of a missing "/" path. * raptor_rfc2396.c (raptor_uri_resolve_uri_reference): Add debug message. When adding a missing path "/", set the path_len and the uri_len to match. (main): Added test when a missing abs / path is added. * raptor_sequence.c (raptor_sequence_set_at, raptor_sequence_get_at): Check for non-negative idx * raptor_sequence.c (raptor_sequence_get_at): Fix index offset check 2004-12-02 Dave Beckett * rdfdump.c: Make a raptor_sequence of namespace declarations declared by '-f xmlns:foo="bar"' and then add them to the serializer when initialised. (rdfdump_free_namespace_decl): Added, to provide a helper to cleanup. * raptor_serialize.c (raptor_serialize_set_namespace): Call factory method declare_namespace. (raptor_rdfxml_serialize_declare_namespace): Copy the passed in namespace prefix, URI before storing the namespace. (raptor_rdfxml_serialize_start): Delete the namespace sequence contents as the namespaces are declared on the namespace stack, which is the new owner of the namespaces. * raptor_namespace.c (raptor_new_namespace_parts_from_string): Added, to decode things like "xmlns:foo='bar'" into prefix, uri strings. * raptor.h: Added prototype for raptor_new_namespace_parts_from_string. raptor_sequence_free_handler prototype changed to return void 2004-11-30 Dave Beckett * raptor_serialize.c (raptor_rdfxml_serialize_init): Add a sequence of user-declared namespaces. (raptor_rdfxml_serialize_terminate): Tidy sequence. (raptor_rdfxml_serialize_declare_namespace): Use sequence to store declared namespaces. (raptor_rdfxml_serialize_start): Declare used-defined namespaces and start them in the namespace stack. * raptor_namespace.c (raptor_new_namespace_from_uri): Added with raptor_new_namespace code. (raptor_new_namespace): Now a wrapper around raptor_new_namespace_from_uri. (raptor_namespace_copy): Use raptor_new_namespace_from_uri. * raptor_qname.c (raptor_iostream_write_qname): Added to write a qname to an iostream. * raptor.h: Add prototypes for raptor_iostream_write_qname, raptor_new_namespace_from_uri * raptor_rdfxml.c (raptor_xml_start_element_handler, raptor_xml_end_element_handler, raptor_xml_comment_handler, raptor_start_element_grammar, raptor_end_element_grammar, raptor_cdata_grammar): Update the use of xml_writer for building parseType="Literal" content to use an iostream. Use more sax2 methods rather than direct access to internals - still some left. (raptor_xml_parse_init, raptor_xml_parse_start, raptor_xml_parse_terminate, raptor_inscope_xml_language, raptor_inscope_base_uri): Move expat/libxml details to raptor_new_sax2, raptor_sax2_parse_start, raptor_free_sax2, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri respectively. (raptor_xml_parse_chunk_): Deleted, moved to raptor_sax2_parse_chunk * raptor_xml_writer.c: Change to output to an iostream not build up a stringbuffer. (raptor_new_xml_writer): Add iostream arg, delete never-used canonicalize. (raptor_free_xml_writer): Remove stringbuffer. (raptor_xml_writer_start_element, raptor_xml_writer_end_element): Delete stringbuffer and use raptor_iostream_write_sax2_element. (raptor_xml_writer_cdata): Delete stringbuffer and use raptor_iostream_write_xml_escaped_string. (raptor_xml_writer_raw): Added to write just the bytes. (raptor_xml_writer_comment): Fixed to emit (raptor_xml_writer_as_string): Deleted. (main): Added with test case. * raptor_sax2.c (raptor_new_sax2, raptor_free_sax2, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri, raptor_sax2_get_depth, raptor_sax2_inc_depth, raptor_sax2_dec_depth, raptor_sax2_parse_start, raptor_sax2_parse_chunk, raptor_sax2_element_get_element): Added. (raptor_iostream_write_sax2_element): Renamed from raptor_format_sax2_element and now writing to a raptor_iostream with no allocing/freeing buffers. * raptor_xml.c (raptor_iostream_write_xml_escaped_string): Added, to write an XML-escaped version of a string to an iostream 2004-11-29 Dave Beckett * raptor_namespace.c (raptor_iostream_write_namespace): Added to write a namespace to a raptor_iostream * raptor.h: Added raptor_iostream_write_namespace * Makefile.am: Added raptor_xml_writer_test * raptor_expat.c (raptor_expat_init): Take void* user data * raptor_internal.h: raptor_exp_init takes void* Add user_data to raptor_sax2 Added prototypes or raptor_new_sax2, raptor_free_sax2, raptor_sax2_parse_start, raptor_sax2_parse_chunk, raptor_sax2_parse_handle_errors, raptor_sax2_get_depth, raptor_sax2_inc_depth, raptor_sax2_dec_depth, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri, raptor_sax2_element_get_element, raptor_iostream_write_sax2_element Deleted raptor_format_sax2_element, raptor_xml_writer_as_string and raptor_xml_writer_write_to_iostream Changed raptor_new_xml_writer to write to a raptor_iostream * raptor.h: Added raptor_iostream_write_xml_escaped_string and raptor_namespace_write 2004-11-26 Dave Beckett * raptor_internal.h: Added prototype for raptor_xml_writer_write_to_iostream * raptor_xml_writer.c (raptor_xml_writer_write_to_iostream): Added * raptor.h: Added prototype for raptor_iostream_write_stringbuffer * raptor_iostream.c: (raptor_iostream_write_stringbuffer) Added * configure.ac: --with-dmalloc default is now no 2004-11-25 Dave Beckett * configure.ac: If expat_source is empty, set it to auto so no path-to-source is added to libs, includes 2004-11-23 Dave Beckett * tests/ex-55.out, tests/ex-55.rdf: ex-55 * tests/Makefile.am: Added ex-55 2004-11-17 Dave Beckett * examples/grapper.c: Extensively updated to use GTK 2.4, 2.5 features when available. Triples/Errors windows have a scalable pane between them Triple columns can be sorted by clicking, width resized. All known parser features are available on the preferences menu. Added parser guessing button. Moved syntax menu to top of display. Updated about box fields to include more info when possible to display. 2004-11-12 Dave Beckett * rapper.1: Updated -f for serializer features 2004-11-10 Dave Beckett * raptor_sequence.c (raptor_sequence_join): Copy pointers correctly * raptor_sequence.c (raptor_sequence_join): Added, to move all items between two sequences leaving one empty. * raptor.h: Added raptor_sequence_join * raptor.h: Added raptor_serialize_set_namespace * raptor_serialize.c (raptor_serialize_set_namespace): Added, not implemented. * raptor_rss.c (raptor_rss_parse_recognise_syntax): Boost in recognising xml rss 2004-11-08 Dave Beckett * rdfdump.c: allow -f to set serializer features * raptor_feature.c (raptor_features_enumerate_common): return -1 2004-11-07 Dave Beckett * raptor_uri.c: C style, indenting. const unsigned char. (raptor_uri_path_make_relative_path): Remove a small memcpy. (raptor_uri_to_relative_counted_uri_string) Docs edit. Remove a large if {} block. Rename 'reference' var since libxml2 defines it (SEP). Use buildresult to make empty string result. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Use feature feature_relative_uris to decide when to emit an absolute or relative URI, the latter using raptor_uri_to_relative_uri_string. * raptor_uri.c: Added raptor relative URI generating code patch from Ren Puls (raptor_uri_path_common_base_length): Added. Helper to return the common base length of two paths (raptor_uri_path_make_relative_path): Added. Helper to build the result relative URI string from already analysed parts. (raptor_uri_to_relative_counted_uri_string): Added. Get the relative URI string between a base and reference URI. (raptor_uri_to_relative_uri_string): Added. Wrapper about the above. (assert_uri_to_relative): Added. Helper for tests for above. (main): Added relative URI string generation tests. * raptor.h: Added prototypes for raptor_uri_to_relative_counted_uri_string and raptor_uri_to_relative_uri_string * raptor_rss.c (raptor_rss_parser_processNode): Add cast for name when returned from xmlTextReaderConstLocalName. * raptor_rss.c (raptor_rss_parser_processNode): Always declare name as xmlChar* 2004-11-06 Dave Beckett * rdfdump.c: Tidy help messages about features, other words. * raptor_parse.c (raptor_feature_from_uri): Moved to raptor_feature.c * raptor.h: Moved raptor_feature_from_uri to separate section, not just parsers * raptor_internal.h: Deleted raptor_feature_from_uri_common * raptor_feature.c (raptor_feature_from_uri): Defined here, no need for raptor_feature_from_uri_common * rdfdump.c: In feature help code, list parser and serializer features separately, using new raptor_features_enumerate. * raptor_serialize.c (raptor_serializer_features_enumerate): Added, a wrapper around raptor_features_enumerate_common. (raptor_serializer_set_feature): Added. (raptor_serializer_get_feature): Added. * raptor_parse.c: Moved raptor_features_list to raptor_feature.c (raptor_features_enumerate): Changed to be a wrapper around raptor_features_enumerate_common now containing the body of the code. (raptor_feature_from_uri): Changed to be a wraper around raptor_feature_from_uri_common now containing the body of the code. * raptor_internal.h: Added feature_relative_uris for raptor_serializer. Added prototypes for raptor_features_enumerate_common and raptor_feature_from_uri_common * raptor.h: Added RAPTOR_FEATURE_RELATIVE_URIS for serializing. Added prototypes for raptor_serializer_features_enumerate, raptor_serializer_set_feature and raptor_serializer_get_feature * Makefile.am: Added raptor_feature.c * raptor_feature.c: Moved common raptor_feature code from raptor_parse.c * raptor_rss.c: Added entry to raptor_rss_fields_info so that when indexed with RAPTOR_RSS_FIELDS_NONE, does not access invalid data. Fixes for xmlReader API for older libxml2s: Added node type defines for <2.5.9 Use xmlTextReaderLocalName, xmlTextReaderNamespaceUri instead of the Const versions with additional corresponding xmlFree()s for <2.6.0 2004-11-01 Dave Beckett * Snapshotted raptor_1_4_2 for 1.4.2 release * win32_raptor_config.h, configure.ac: Bumped version to 1.4.2 * raptor_xml_writer.c (raptor_xml_writer_cdata): Return when raptor_xml_escape_string fails. * raptor_xml.c (raptor_xml_escape_string): Return -1 on UTF-8 encoding failure * raptor_xml.c: docs 2004-10-28 Dave Beckett * Snapshotted raptor_1_4_1 for 1.4.1 release * raptor_xml.c (raptor_xml_escape_string): Ensure an empty string is copied out; write a NUL. 2004-10-28 Dave Beckett * libraptor.3: 1.4.1 raptor_xml_escape_string return value now int, <0 on failure. * raptor_xml_writer.c (raptor_xml_writer_cdata): Use int for raptor_xml_escape_string return variables and use error return <0 * raptor_serialize.c: (raptor_rdfxml_serialize_write_xml_attribute, raptor_rdfxml_serialize_statement) Use int for raptor_xml_escape_string return variables. Handle empty string attribute when len=0. * raptor_sax2.c (raptor_format_sax2_element): Use int for raptor_xml_escape_string return. * raptor.h: raptor_xml_escape_string changed return value to int * raptor_xml.c (raptor_xml_escape_string): Return value now int, <0 on failure to allow escaping an empty string to return 0 bytes required. (main): Add empty string escaping test. Check for failure of first raptor_xml_escape_string call. * raptor_rss.c (raptor_rss_parser_processNode): Fix url attribute failing for non-enclosure. 2004-10-27 Dave Beckett * raptor_rfc2396.c (raptor_new_uri_detail): Do not add schema_len twice to dest pointer; stop buffer overrun 2004-10-26 Dave Beckett * raptor_locator.c (raptor_format_locator): Only print line if > 0 * raptor-config.1: Fix --libtool-libs desc 2004-10-24 Dave Beckett * win32_raptor_config.h, configure.ac, NEWS.html: Bumped version to 1.4.1 * Snapshotted raptor_1_4_0 for 1.4.0 release * raptor_rss.c: Added generation of triples for RSS enclosures based on a patch from Suzan Foster. Changes made include correcting the enclosures namespace, tidying some memory leaks and printing some debug information. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Make rdf:_ 'ordinal' properties serialize correctly. * raptor_www_test.c (main): Use raptor_www_fetch_to_string for testing. * raptor_iostream.c (raptor_string_iostream_finish): Code tidy. * libraptor.3, raptor.h: Added raptor_www_fetch_to_string * raptor_www.c (raptor_www_fetch_to_string_write_bytes): Added handler for the following function. (raptor_www_fetch_to_string): Added, to get content back as a string. 2004-10-23 Dave Beckett * libraptor.3: Updates for 1.4.0 * raptor.h, raptor_iostream.c: s/fh/handle/ for clarity. * raptor.rdf.in: Add Raptor to the desc * raptor.rdf.in, raptor.spec.in: Update descriptions to include serializers 2004-10-21 Dave Beckett * raptor_namespace.c: less namespace debugs * raptor_xml_writer.c: less cdata debugs * raptor_namespace.c: Make most namespace debug messages appear only if #ifdef RAPTOR_DEBUG_VERBOSE * raptor_rdfxml.c: Make most rdf/xml parsing debug messages appear only if #ifdef RAPTOR_DEBUG_VERBOSE * raptor_serialize.c: (raptor_serialize_start, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_serialize_statement, raptor_serialize_end): Fail if no iostream is made or available. * raptor_iostream.c (raptor_new_iostream_to_string): Docs, zap string and length before starting. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Print datatype URIs correctly. 2004-10-20 Dave Beckett * configure.ac, win32_raptor_config.h: 1.4.0 * raptor_internal.h: Added warning_user_data, warning_handler to serializer Added prototypes for raptor_serializer_warning and raptor_serializer_warning_varargs * raptor_serialize.c (raptor_serializer_warning, raptor_serializer_warning_varargs): Added (raptor_serializer_set_warning_handler): Added * raptor.h: Added raptor_serializer_set_warning_handler * configure.ac: autoconf mode * rdfdump.c: default serializer simple * raptor_serialize.c (raptor_rdfxml_serialize_statement): Handle URI subject, object right. * raptor_serialize.c (raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle): Don't enforce base URI is required. 2004-10-19 Dave Beckett * raptor.h: Updated raptor_new_iostream_to_string with malloc_handler argument * raptor_serialize.c (raptor_serialize_start_to_string): Update raptor_new_iostream_to_string for malloc_handler argument * raptor_iostream.c (raptor_string_iostream_finish): Use passed-in malloc_handler to make string, raptor_stringbuffer_copy_to_string to copy directly in. (raptor_new_iostream_to_string): Add optional malloc_handler argument so caller can control allocation. (main): Update tests for above. * raptor.h: Added raptor_stringbuffer_copy_to_string * raptor_stringbuffer.c (raptor_stringbuffer_copy_to_string): Added to allow exporting to externally alloced buffers - handy for cross-library/heap work. (main): Added test for above. * raptor_general.c (raptor_init): Don't register 'simple' type. * raptor_iostream.c, raptor_namespace.c, raptor_serialize.c, raptor_iostream.c: Casts for C++ * tests/Makefile.am, tests/turtle/Makefile.am: Replace direct dependency on $(top_builddir)/rapper with build-rapper so re-compile check is forced before testing. * raptor.h, raptor_namespace.c, raptor_serialize.c: Fix a bunch of constitency typos in namespace URIs * raptor_internal.h: Add locator, error_user_data and error_handler to raptor_serializer. Add raptor_init_serializer_rdfxml, raptor_serializer_error, raptor_serializer_simple_error and raptor_serializer_error_varargs. * raptor_namespace.c: Export raptor_xml_namespace_uri, raptor_rdf_namespace_ms_uri, raptor_rdf_namespace_schema_uri, raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri, raptor_rdf_namespace_ms_uri_len * raptor_general.c (raptor_init): Call raptor_init_serializer_rdfxml * raptor.h: Export raptor_xml_namespace_uri, raptor_rdf_namespace_ms_uri, raptor_rdf_namespace_schema_uri, raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri, raptor_rdf_namespace_ms_uri_len Add raptor_serializer_set_error_handler, raptor_serializer_get_locator * raptor_serialize.c: Added RDF/XML serializer. Added locator to serializer. (raptor_serializer_error, raptor_serializer_simple_error, raptor_serializer_error_varargs): Added internal support for errors. (raptor_serializer_set_error_handler, raptor_serializer_get_locator): Added public methods 2004-10-18 Dave Beckett * raptor_iostream.c: (main) casts for fprintf * rdfdump.c: Remove ad-hoc serializing code and use raptor_serializer. Update help and usage messages to use raptor_serializers_enumerate * raptor_internal.h: Added raptor_serializer_factory and declarations for factories raptor_init_serializer_ntriples, raptor_init_serializer_simple and raptor_delete_serializer_factories * raptor_general.c (raptor_init): Call raptor_init_serializer_ntriples and raptor_init_serializer_simple * raptor.h: Added raptor_serializer class and methods: raptor_serializers_enumerate, raptor_serializer_syntax_name_check, raptor_new_serializer, raptor_free_serializer, raptor_serialize_start, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_serialize_statement, raptor_serialize_end, raptor_serializer_get_iostream. Added new raptor_iostream class constructor raptor_new_iostream_to_sink and methods: raptor_iostream_write_end, raptor_iostream_write_string, raptor_iostream_write_counted_string, raptor_iostream_get_bytes_written_count, raptor_iostream_write_decimal, raptor_iostream_format_hexadecimal * Makefile.am: Added raptor_serialize.c Added $(LIBS) to rfc2396 tests for -ldmalloc when present * raptor_serialize.c: Serializers * raptor_iostream.c (raptor_iostream_write_counted_string): Added as a wrapper. * raptor_iostream.c (raptor_iostream_format_hexadecimal): Added for writing field-formatted hex. * raptor_iostream.c (raptor_iostream_get_bytes_written_count): Renamed from raptor_get_bytes_written_count (raptor_iostream_write_decimal): Added to print a decimal to the iostream. * raptor_iostream.c (raptor_new_iostream_to_file_handle): Do not fclose at end. (raptor_string_iostream_finish): Free malloced context. (raptor_iostream_write_string): Helper to write C string. * raptor_iostream.c: Added sink iostream (raptor_sink_iostream_write_byte, raptor_sink_iostream_write_bytes): Added. (raptor_new_iostream_to_sink): Added to create a throwaway data iostream. (raptor_free_iostream): Ensure write_end is always called once only. (main): Test sink. * raptor_iostream.c: Added ended flag, once write_end is done, all further calls fail. (raptor_filename_iostream_finish): Removed; write_end does this. (raptor_filename_iostream_write_end): Added to fclose() on end (raptor_string_iostream_finish): More checks when stringbuffer is empty. (raptor_new_iostream_to_string): Handle error tidy up better. (raptor_iostream_write_end): Added. (main): Code tidy. * raptor_iostream.c: casts for c++ * raptor.h: Added raptor_iostream class and methods. * Makefile.am: Added raptor_iostream.c and raptor_iostream_test * raptor_iostream.c: Raptor I/O stream class * turtle_parser.y, turtle_lexer.l, n3_parser.y, n3_lexer.l: Rename rather generic define ERROR to ERROR_TOKEN to help win32. 2004-10-16 Dave Beckett * rapper.1: die .UE 2004-10-15 Dave Beckett * raptor_xml.c (raptor_xml_escape_string): Call error_handler correctly. 2004-09-24 Dave Beckett * raptor-config.1: Restore deleted content 2004-09-20 Dave Beckett * win32_raptor_config.h, configure.ac, NEWS.html: Bumped version to 1.3.4 * Snapshotted raptor_1_3_3 for 1.3.3 release * Switched to LGPL / Apache 2.0 license in the sources CVS tags before: raptor_license_lgpl_mpl, and after: raptor_license_lgpl_apache2 2004-09-20 Dave Beckett * configure.ac: Check for libxml 2.5.10+ for RSS tag soup parser requirements, not features. 2004-09-10 Dave Beckett * raptor_namespace.c (raptor_new_namespace): Debug message only when level >1 2004-09-09 Dave Beckett * Makefile.am: Just link raptor_uri_test, raptor_uri_win32_test with raptor_rfc2396.lo * raptor_uri.c: (main) Don't use raptor_basename * raptor_uri.c: Revert wrapping so that -DWIN32 raptor_uri_win32_test can be compiled. OSX 'make check' will have to live with the moans. * raptor_uri.c: Wrap functions with #ifndef STANDALONE ... #endif to prevent multiple link warnings on OSX with tests. * raptor_uri.c (main): Use program and raptor_basename in messages * raptor_xml.c, raptor_stringbuffer.c, raptor_sequence.c, raptor_rfc2396.c, raptor_uri.c: Wrap functions with #ifndef STANDALONE ... #endif to prevent multiple link warnings on OSX with tests. * raptor.spec.in, Makefile.am, NOTICE: Added NOTICE for Apache License 2.0 * raptor.spec.in: Mention atom 0.3 * raptor.spec.in: Update for LGPL/Apache 2.0 * raptor_rfc2396.c: Header 2004-09-08 Dave Beckett * raptor_rfc2396.c (raptor_new_uri_detail): Handle NULL string - failure. Increase alloced size to compensate for possibly 5 extra \0s for each URI component. (main): Check "" URI parses and NULL doesn't crash it. * raptor_internal.h: Added raptor_uri_detail. Added internal raptor_basename. * raptor.h: docs * Makefile.am: Added raptor_rfc2396.c and raptor_rfc2396_test Link all tests with librdf.la $(LIBS) * raptor_rfc2396.c: RFC2396 URI detail * raptor_uri.c: Remove old URI resolving code. * raptor_xml.c, raptor_parse.c, raptor_sequence.c, raptor_set.c, raptor_stringbuffer.c, raptor_nfc_test.c: Use raptor_basename in test code main() * raptor_general.c (raptor_basename): Added * raptor_rdfxml.c: correct comment * Makefile.am: Run tests raptor_set_test and raptor_xml_test only if rdf/xml is enabled. * raptor_parse.c (raptor_stats_print): Print rdfxml stats only if rdf/xml is enabled. * Makefile.am: Change test to be raptor_parse_test Use raptor_rdfxml.c only if rdf/xml enabled. * raptor.h: Export raptor_xml_literal_datatype_uri_string_len * raptor_internal.h: Declare raptor_delete_parser_factories. * raptor_parse.c, raptor_general.c: Moved the following parser related functions and methods to raptor_parse.c: raptor_default_generate_id_handler, raptor_delete_parser_factories, raptor_feature_from_uri, raptor_features_enumerate, raptor_free_parser, raptor_generate_id, raptor_get_feature, raptor_get_label, raptor_get_locator, raptor_get_mime_type, raptor_get_name, raptor_get_parser_factory , raptor_guess_parser_name, raptor_new_parser, raptor_new_parser_for_content, raptor_parse_abort, raptor_parse_chunk, raptor_parse_file, raptor_parse_file_stream, raptor_parse_uri, raptor_parse_uri_with_connection, raptor_parse_uri_write_bytes, raptor_parser_error, raptor_parser_error_varargs, raptor_parser_fatal_error, raptor_parser_fatal_error_varargs, raptor_parser_register_factory, raptor_parser_simple_error, raptor_parser_warning, raptor_parser_warning_varargs, raptor_parsers_enumerate, raptor_set_default_generate_id_parameters, raptor_set_error_handler, raptor_set_fatal_error_handler, raptor_set_feature, raptor_set_generate_id_handler, raptor_set_parser_strict, raptor_set_statement_handler, raptor_set_warning_handler, raptor_start_parse, raptor_stats_print, raptor_syntax_name_check, raptor_syntaxes_enumerate * raptor_rdfxml.c: Added as copy of raptor_parse.c * Makefile.am: -MPL.html (MPL 1.1), +LICENSE-2.0.txt (Apache 2.0) * README.html, LICENSE.html: -MPL1.1, +Apache2.0 * LICENSE-2.0.txt: Added. * MPL.html: Deleted. 2004-09-07 Dave Beckett * tests/turtle/test-16.ttl, tests/turtle/test-16.out: 10000 triples exactly now * raptor_sequence.c: docs * turtle_parser.y (blank): Revert mis-edited triple sequence change. * turtle_parser.y (propertyList): Switch to left-recursion to prevent stack problems with bison. (raptor_turtle_parse_terminate): Call turtle_lexer_lex_destroy properly. * tests/turtle/test-14.ttl, tests/turtle/test-14.out: Use exactly 10000 all different triples. * tests/turtle/test-15.ttl, tests/turtle/test-15.out: Use different objects and no collections so there are exactly 10000 triples, all different. * tests/turtle/test-16.ttl, tests/turtle/test-16.out: Use different objects so all 10000 triples are different * turtle_lexer.l (turtle_token_print): Add INTEGER_LITERAL for debugging. * Makefile.am: Make turtle_parser.c appear as C source name * turtle_parser.y (statementList, objectList): Switch to using left recursion to prevent stack overflow in bison with 10000 statements (possible) or objects (rarer). * tests/turtle/Makefile.am, tests/turtle/test-16.ttl, tests/turtle/test-15.out, tests/turtle/test-15.ttl, tests/turtle/test-16.out, tests/turtle/test-14.out, tests/turtle/test-14.ttl: Added large turtle tests test-14,15,16 * turtle_parser.y (raptor_turtle_parse_chunk): Use RAPTOR_REALLOC for massive speed improvements on some systems. * raptor_internal.h: Added RAPTOR_REALLOC 2004-09-06 Dave Beckett * raptor_set.c (raptor_free_id_set): Free the set after freeing the list. 2004-09-02 Dave Beckett * tests/turtle/test-13.out, tests/turtle/test-13.ttl: Make serializable as rdf/xml 2004-09-01 Dave Beckett * tests/turtle/Makefile.am, tests/turtle/README.txt: Turtle tests readme 2004-08-27 Dave Beckett * raptor_rss.c: compare namespace URIs the cheaper way * raptor_rss.c: Added atom:copyright Rewrite atom fields earlier. Compare namespaces too, if they have them. * raptor_rss.c: Handle atom 0.3 somewhat. - Add atom author type. - Add atom 0.3 NS and atom 0.3 properties - Add DC Ns and all DC element properties. - Always rewrites atom:content into rss:description which is not correct for all situations. - Cannot handle multiple with different attributes; just uses rel=alternate ones. General changes: Use XML_READER type enums. Fix copying properties to use RAPTOR_RSS_FIELDS_SIZE. Allow item field x to have a URI value in item->uri_fields[x] as well as literal in item->fields[x]. 2004-08-27 Dave Beckett * raptor_rss.c: compare namespace URIs the cheaper way * raptor_rss.c: Added atom:copyright Rewrite atom fields earlier. Compare namespaces too, if they have them. * raptor_rss.c: Handle atom 0.3 somewhat. - Add atom author type. - Add atom 0.3 NS and atom 0.3 properties - Add DC Ns and all DC element properties. - Always rewrites atom:content into rss:description which is not correct for all situations. - Cannot handle multiple with different attributes; just uses rel=alternate ones. General changes: Use XML_READER type enums. Fix copying properties to use RAPTOR_RSS_FIELDS_SIZE. Allow item field x to have a URI value in item->uri_fields[x] as well as literal in item->fields[x]. 2004-08-23 Dave Beckett * turtle_parser.y (blank rule): Do not free a generated id here 2004-08-22 Dave Beckett * configure.ac: Remove old reference to g_utf8_normalize 2004-08-19 Dave Beckett * Makefile.am: Add libraptor_la_SOURCES += for NFC. 2004-08-18 Dave Beckett * raptor_set.c: Wrap main code with #ifndef STANDALONE * raptor_general.c (raptor_init, raptor_finish): Use new static raptor_initialised to protect these from being run twice. 2004-08-17 Dave Beckett * configure.ac: nfc_needed default * configure.ac, Makefile.am: Added conditional makefile support for XML parsers (expat, libxml), selecting RDF parsers (RDF/XML, Turtle, N-Triples, RSS tag soup), NFC checking. Added new configure argument --enable-parsers to control this. * raptor_utf8.c (raptor_utf8_is_nfc): Protect NFC check with define RAPTOR_NFC_CHECK * raptor_locator.c (raptor_update_document_locator): Protect RDF/XML bits with define RAPTOR_PARSER_RDFXML * raptor_general.c (raptor_stats_print): Protect RDF/XML bits with define RAPTOR_PARSER_RDFXML * raptor.h: Added prototype for raptor_calloc_memory * raptor_set.c, raptor_nfc.c: Casts for C++ * LICENSE.html: More LGPL v2.1 fixes * win32_raptor_config.h: 1.3.3 2004-08-13 Dave Beckett * turtle_lexer.l, n3_lexer.l: grammar * turtle_lexer.l, n3_lexer.l, fix-flex: fix-flex now inserts the raptor and win32 config includes block at the top of the lexer C. * n3_parser.y, n3_lexer.l: win32 * Several fixes for building on win32 from Chris Pointon * win32/raptor.dsw, win32/raptor.dsp: win32 updates from Chris Pointon * win32_raptor_config.h: No need for #define YY_NO_UNISTD_H here, it's done in the turtle lexer and parser C source. * turtle_parser.y, turtle_lexer.l: Use turtle_parser.h * raptor_xml_writer.c, raptor_sax2.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_libxml.c: calloc() fixes. * Makefile.am: Do not generate *.tab.[ch] for turtle parser but process and rename to make .c, .h. Apply fix-flex to the generated flex header file, to catch another unprotected include of unistd.h. * libraptor.3: Document raptor_calloc_memory. * raptor_general.c: Added raptor_calloc_memory * raptor_www_libwww.c: Add #ifdef RAPTOR_WWW_LIBWWW ... #endif block around content * raptor_www_libfetch.c: Add #ifdef RAPTOR_WWW_LIBFETCH ... #endif block around content Use #ifdef HAVE_SYS_PARAM_H for sys/param.h * raptor_www_curl.c: Add #ifdef RAPTOR_WWW_LIBCURL ... #endif block around content * win32_raptor_config.h: win32 updates from Chris Pointon * raptor_www.c: Calloc fix. (raptor_www_get_connection): Return NULL if no WWW library available. * raptor_internal.h: Correct RAPTOR_CALLOC macro param names. * raptor.h: Export raptor_xml_literal_datatype_uri_string * win32/Makefile.am, win32/README.txt, win32/README: README renamed to README.txt 2004-08-12 Dave Beckett * raptor_nfc.c: Tidy debug messages. Reset prev_class explicitly. 2004-08-11 Dave Beckett * raptor_parse.c (raptor_record_ID): c99 * raptor_nfc.c: Return 0 from raptor_nfc_check on failure * raptor_nfc_test.c: Raptor NFC test * Makefile.am: Added raptor_nfc_test.c, raptor_nfc_data.c, raptor_nfc.c and raptor_nfc.h Added raptor_nfc_test * raptor_utf8.c (raptor_utf8_is_nfc): Use raptor_nfc_check. * raptor_nfc.c, raptor_nfc.h: Unicode NFC * raptor_internal.h: Added prototype for raptor_nfc_check * configure.ac: Check for lengths of u8, u16, u32, char, short, int, long * raptor_nfc_data.c: Unicode NFC data tables * raptor_parse.c: Updated for raptor_set to raptor_id_set renaming. (raptor_record_ID): Pass in the base_uri to the raptor_id_set_add, do not malloc / free a larger string. * raptor_internal.h: Rename the raptor_set* typedef and functions to be raptor_id_set * raptor_set.c: Change the implementation to a list of (set of IDs)-per base URI. Each time a base URI is checked it is swapped with the first in the list. The set of IDs (raptor_base_id_set) takes a lot less memory since it isn't storing the string concat(base URI,ID) but just ID. The capacity and size parts are part of the raptor_base_id_set. Rename the structures and functions to be raptor_id_set not raptor_set. * raptor_parse.c (raptor_end_element_grammar): Add check for a non-empty property element with both a node element child and property attributes. For bad test bad-23.rdf * tests/bad-23.rdf: bad-23.rdf - property attributes and node element content check * tests/Makefile.am: Added bad-23.rdf 2004-08-10 Dave Beckett * libraptor.3: Document check_rdf_id feature 2004-08-02 Dave Beckett * raptor_general.c (raptor_set_parser_strict): Set feature_check_rdf_id default true. * raptor_parse.c (raptor_record_ID): Use feature_check_rdf_id to always return no rdf:ID check failure when feature is disabled. * raptor_general.c (raptor_set_feature, raptor_get_feature): Added RAPTOR_FEATURE_CHECK_RDF_ID (raptor_set_parser_strict): Set feature_check_rdf_id default true. * raptor.h: Added RAPTOR_FEATURE_CHECK_RDF_ID * raptor_internal.h: Added feature_check_rdf_id * ntriples_parse.c (raptor_ntriples_parse_chunk): Move "junk at end of input" test to the end of the function, giving the error only if the current offset isn't at the end of the current line. 2004-07-30 Dave Beckett * raptor_internal.h: Switch to WWW read buffer size of 4096 (from 256 bytes!) * raptor_general.c: Switch to read buffer size of 4096 2004-07-28 Dave Beckett * autogen.sh: move 'rm's inside configure.ac loop * autogen.sh: Ensure subdirs get config.guess, config.sub * win32/raptortest.cpp: Added raptor_init, raptor_finish (untested). 2004-07-27 Dave Beckett * raptor_locator.c: cast for c++ 2004-07-26 Dave Beckett * raptor_general.c: Add #ifndef STANDALONE ... #endif around body. 2004-07-21 Dave Beckett * configure.ac: Bumped version to 1.3.3 * Snapshotted raptor_1_3_2 for 1.3.2 release * configure.ac: Removed configuration for gnome glib, pkgconfig and glib-config to get g_utf8_normalize for Unicode NFC checking. * raptor_utf8.c (raptor_utf8_is_nfc): Removed use of g_utf8_normalize for Unicode NFC checking, it seems to give false negatives, is also rather slow since it does normalization rather than just checking for NFC. * libraptor.3: Updates for 1.3.2 2004-07-16 Dave Beckett * tests/Makefile.am, tests/ex-54.out, tests/ex-54.rdf, tests/warn-03.out, tests/warn-03.rdf: Renamed warn-03 to ex-54 - it is not an error or a warning, the data is good 2004-07-14 Dave Beckett * tests/Makefile.am, tests/bad-22.rdf: bad-22.rdf testing rdf:li forbidden as a property attribute (Graham Klyne) 2004-07-09 Edd Dumbill * raptor_locator.c: add accessors for parts of the raptor_locator struct. * raptor.h: add prototypes for the accessors 2004-07-09 Dave Beckett * ChangeLog: ChangeLog in CVS now 2004-07-08 Dave Beckett * raptor_general.c (raptor_parse_uri_with_connection): Pass up WWW errors to the parser error handler. 2004-06-30 Dave Beckett * configure.ac: Added RAPTOR_PARSER_TURTLE, RAPTOR_PARSER_NTRIPLES and RAPTOR_PARSER_RDFXML all set to 1 * raptor_general.c (raptor_init): Added RAPTOR_PARSER_TURTLE, RAPTOR_PARSER_NTRIPLES and RAPTOR_PARSER_RDFXML * win32_raptor_config.h: 1.3.2 * turtle_parser.y, turtle_lexer.l, strcasecmp.c, rdfdump.c, raptor_xml_writer.c, raptor_xml.c, raptor_www_test.c, raptor_www_libxml.c, raptor_www_libwww.c, raptor_www_libfetch.c, raptor_www_curl.c, raptor_www.c, raptor_win32.c, raptor_utf8.c, raptor_uri.c, raptor_stringbuffer.c, raptor_set.c, raptor_sequence.c, raptor_sax2.c, raptor_rss.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_locator.c, raptor_libxml.c, raptor_identifier.c, raptor_general.c, raptor_expat.c, ntriples_parse.c, Makefile.am, win32_raptor_config.h, win32_config.h: Renamed win32_config.h to win32_raptor_config.h 2004-06-25 Dave Beckett * ntriples_parse.c (raptor_ntriples_parse_line): Make language on a datatyped literal a warning. 2004-06-24 Dave Beckett * libraptor.3: Added raptor_alloc_memory. Note where and why it and raptor_free_memory may need to be used in the descriptiona and next to the methods that it applies to. * raptor_general.c, raptor.h: Added raptor_alloc_memory. Docs. 2004-06-22 Dave Beckett * configure.ac: Added --with-expat-source option to build against an external expat source. Handle old and new style expat source areas. Report expat source dir in summary. Tidy up default messages. Only use expat subdir if it exists. * tests/Makefile.am: AM_LDFLAGS does not need LIBS, libraptor.la includes it all. 2004-06-17 Dave Beckett * Makefile.am: Zap extra $@ on rule line 2004-06-13 Dave Beckett * configure.ac: pkg-config is too noisy on errors * configure.ac: Only muck about with removing -O2 from flags in maintainer mode. 2004-06-12 Dave Beckett * Makefile.am: Added local distclean-compile rule to override the insane one automake uses by default: rm -f *.tab.c * configure.ac: Bumped version to 1.3.2 * Snapshotted raptor_1_3_1 for 1.3.1 release * tests/Makefile.am: add CLEANFILES * tests/Makefile.am: Added TESTS with raptor_empty_test the only one right now. Added C include, linking lines * tests/empty.c: Test of empty C file, just using raptor.h work * raptor_uri.c (raptor_uri_filename_to_uri_string, raptor_uri_uri_string_to_filename_fragment): Casts and char/unsigned char fixes for C++ 2004-06-08 Dave Beckett * raptor_uri.c (raptor_default_new_uri): Avoid free(NULL) for filename. * raptor_general.c (raptor_parse_file): Check before fopen that it is not a directory attempting to be fopen()ed - unix only, with lstat. * raptor_www.c (raptor_www_file_fetch): Check before fopen that it is not a directory attempting to be fopen()ed - unix only, with lstat. * rdfdump.c: Add error for failure of raptor_uri_filename_to_uri_string * raptor_uri.c (raptor_uri_filename_to_uri_string): Unix malloc too large by 2. * raptor_uri.c (raptor_default_new_uri): Zero fragment pointer. * raptor_uri.c (raptor_default_new_uri): Do not use a NULL filename. * raptor_uri.c (raptor_uri_uri_string_to_filename_fragment): Fail if the URI has no path or was going to return an empty string. (assert_filename_to_uri): Test code allow checks for NULL. (main): Test code for silly URIs that should work or fail. 2004-06-06 Dave Beckett * raptor_internal.h: Added RAPTOR_FATAL3 * raptor_uri.c: Fix win32 file/URI encoding to use file:///name and escape things better. (raptor_uri_filename_to_uri_string): Calculate new length correctly, with %-escaping. (raptor_uri_uri_string_to_filename_fragment): Calculate new format. Also do less strlen, strcpy. (main): Change tests to match new win32 file URI, test %-escaping and %-unescaping correctly. 2004-06-04 Dave Beckett * raptor_uri.c: NOTE: Not all below is fully working - 3 tests fail at this point. (raptor_uri_filename_to_uri_string): %-escape ' ' and '%' at least as a minimum. Document this. On Windows, generate file:///c:/ ... not c| (raptor_uri_uri_string_to_filename_fragment): Add %-unescaping. (main): Added test cases for %-escaping, %-expanding * Makefile.am: Added raptor_uri_win32_test 2004-06-03 Dave Beckett * tests/turtle/rdfq-results.ttl: Updated to http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html CVS $Id: recording-query-results.html,v 1.9 2004/06/03 12:41:37 aseaborne Exp $ 2004-05-31 Dave Beckett * raptor_general.c (raptor_parser_error_varargs, raptor_parser_warning_varargs): Chop off trailing \n from messages. * raptor_libxml.c (raptor_libxml_error): Chop off trailing \n correctly. 2004-05-30 Dave Beckett * turtle_lexer.l: Set the uri union field for ':' qname. * turtle_parser.y (raptor_turtle_parse_start): Delete any existing buffer content before starting. * raptor_general.c: Added feature warn_other_parseTypes, default true in lax mode. * raptor_parse.c: Added feature warn_other_parseTypes and used to warn when a parseType Literal is assumed. * raptor_internal.h: Added feature warn_other_parsetypes * raptor.h: Aded feature warn_other_parsetypes * tests/warn-07.out, tests/warn-07.rdf: Replaced by warn-07 * tests/Makefile.am: Remove ex-50, warn-07 covers it * tests/ex-50.out, tests/ex-50.rdf: Replaced by warn-07 * tests/Makefile.am: Add warn-07 Check for right values for warning tests, not just presence of a warning. 2004-05-29 Dave Beckett * autogen.sh: Add --enable-maintainer-mode * configure.ac: Add check for glib-2.0 presence rather than an error barf. 2004-05-28 Dave Beckett * tests/Makefile.am: Add set +e, set -e around multiple tests so they only fail at the end. * configure.ac: Only check flex version in maintainer mode * Makefile.am: Re-order directives and tidy up. Make lex and yacc rules be maintainer only. * Makefile.am: Use automakefile conditionals STRCASECMP and GETOPT for conditional sources. * configure.ac: Use automakefile conditionals STRCASECMP and GETOPT 2004-05-27 Dave Beckett * configure.ac: check for perl * Makefile.am: Add fix-flex and use it * fix-flex: Fix flex output * raptor_internal.h: Added raptor_libxml_free * raptor_parse.c (raptor_xml_parse_start, raptor_xml_parse_terminate): Use raptor_libxml_free to tidy up. * raptor_libxml.c (raptor_libxml_free): Added to tidy up after a parsing. * raptor_parse.c (raptor_xml_parse_terminate): Clean up sax2_element stack after errors. 2004-05-26 Dave Beckett * turtle_lexer.l: Allow _ after : in qnames. Make bare ':' work. * tests/turtle/rdf-schema.out, tests/turtle/rdf-schema.ttl: RDF namespace document * tests/turtle/rdfs-namespace.out, tests/turtle/rdfs-namespace.ttl: RDFS namespace * tests/turtle/Makefile.am: Added test-13, rdf-schema, rdfs-namespace * tests/turtle/test-13.out, tests/turtle/test-13.ttl: test bare : * turtle_parser.y: Fix RAPTOR_DEBUG args in old format. * tests/turtle/Makefile.am: Added test-12 * tests/turtle/test-12.out, tests/turtle/test-12.ttl: test for _ after : in qnames * libraptor.3: Describe use of UTF-8 for literals and strings * libraptor.3: 1.3.1 changes 2004-05-25 Dave Beckett * raptor.h: Added RAPTOR_STATIC for WIN32 when statically linking Fix raptor_print_statement arg s/const// 2004-05-24 Dave Beckett * raptor_general.c (raptor_free_memory, raptor_system_free): Do not return, no return value. 2004-05-21 Dave Beckett * tests/turtle/rdfq-results.ttl, tests/turtle/rdfq-results.out: Replace XML Schema namespace with 2001 versi 2004-05-19 Dave Beckett * rdfdump.c: Includes re-order, doc * rdfdump.c: don't do stdarg.h here - it should be in raptor.h * raptor.h: Add include for stdarg.h to get va_list for raptor_vsnprintf * raptor_xml.c (raptor_xml_escape_string): q should be an unsigned char* * raptor_utf8.c (raptor_unicode_char_to_utf8): Cast for unsigned long to unsigned char * raptor_parse.c (raptor_xml_start_element_handler): Cast for memcpy. * win32_config.h: patch from Jose for VC6 2004-05-18 Dave Beckett * ntriples_parse.c (raptor_ntriples_generate_statement): Remove use of ntriples_parser, not used. 2004-05-15 Dave Beckett * raptor.spec.in: SNAP 2004-05-12 Dave Beckett * turtle_parser.y, turtle_common.h, ntriples_parse.c: Do not allow any language with datatype literals. * tests/turtle/Makefile.am: add zip, tests.zip targets 2004-05-11 Dave Beckett * configure.ac: Bumped version to 1.3.1 * Snapshotted raptor_1_3_0 for 1.3.0 release * turtle_lexer.l: Allow - in qnames, prefix qnames. * tests/turtle/Makefile.am: Added test-11 * tests/turtle/test-11.out, tests/turtle/test-11.ttl: - and _ in qnames, prefixes 2004-05-07 Dave Beckett * raptor_sequence.c, raptor_internal.h: Add assert macros 2004-05-04 Dave Beckett * raptor_general.c, raptor.h: Export raptor_xml_literal_datatype_uri_string * raptor_internal.h: raptor_xml_literal_datatype_uri_string now exported. * libraptor.3: Added 1.3.0 items * raptor_general.c (raptor_parse_uri_with_connection): Document the Accept: header malarky. Only send it if connection is NULL. Use Accept: MIME-TYPE,*/*;q=0.1 * raptor_www_curl.c (raptor_www_curl_fetch): append to slist right * raptor_general.c (raptor_parse_uri_with_connection): Send "Accept: MIME-TYPE ;*/*" to prefer the specified one rather than accept only that. * raptor.h: Added raptor_get_mime_type * raptor_general.c (raptor_parse_uri_with_connection): Set Accept header with mime type of this syntax if there is one * raptor_www.c (raptor_www_set_http_accept): Make accept value overwrite \0 from Accept: * configure.ac: make raptor.rdf * turtle_parser.y, raptor_www_libxml.c, raptor_parse.c, ntriples_parse.c: Fixes for c++ * Makefile.am: added raptor.rdf.in * raptor.rdf.in: DOAP 2004-05-02 Dave Beckett * turtle_parser.y: Add xml_literal_datatype_uri to parser context. (raptor_turtle_parse_init,raptor_turtle_parse_terminate): use above (raptor_turtle_generate_statement): Use above to remove language from all literals except xml literals. * turtle_common.h: Add xml_literal_datatype_uri to parser context. * ntriples_parse.c: Add xml_literal_datatype_uri to parser context. (raptor_ntriples_parse_init,raptor_ntriples_parse_terminate): use above (raptor_ntriples_generate_statement): Use above to remove language from all literals except xml literals. * raptor_identifier.c (raptor_identifier_print): Use raptor_xml_literal_datatype_uri_string and save a string. 2004-04-29 Dave Beckett * rdfdump.c (main): Use raptor_free_memory to free memory allocated in libraptor. * raptor_www_libxml.c (raptor_www_libxml_fetch): Free content type using libxml's xmlFree since it was allocated there. * raptor_www_libxml.c, raptor_www_curl.c (raptor_www_libxml_fetch): Make headers for User-Agent: and/or Accept: if they were set in the raptor_www. * raptor_www.c (raptor_www_set_http_accept): Added. * raptor_internal.h: Added http_accept to raptor_www * raptor.h: Added raptor_www_set_http_accept 2004-04-15 Dave Beckett * raptor_general.c (raptor_guess_parser_name): use strrchr to find *last* . 2004-04-14 Dave Beckett * raptor_sequence.c (raptor_new_sequence): Zap sequence field. * raptor_xml_writer.c (raptor_xml_writer_cdata): Do not copy more bytes than allowed. * Makefile.am: Added raptor_expat.c * raptor_parse.c: Export some expat-only handlers: raptor_xml_unparsed_entity_decl_handler, raptor_xml_external_entity_ref_handler. (raptor_xml_parse_init): Do not call expat init code here. (raptor_xml_parse_start): Call new raptor_expat_init to initialise parser state. * raptor_internal.h: Added RAPTOR_XML_EXPAT only exports including raptor_expat_init prototype. * raptor_expat.c: raptor expat parser 2004-04-13 Dave Beckett * raptor.h: Added xsd and owl namespace URIs * raptor_namespace.c (raptor_namespaces_init): Define xsd, owl when defaults is 2+ 2004-04-11 Dave Beckett * raptor_parse.c: (raptor_xml_parse_start) Free expat/libxml contexts from an earlier parsing to ensure resetting of state * raptor_stringbuffer.c (raptor_stringbuffer_prepend_string_common): Added (raptor_stringbuffer_prepend_counted_string, raptor_stringbuffer_prepend_string): Added, implemented by above internal function. (main): Added tests for prepending. * raptor.h: Add RAPTOR_API for newly exported functions. Add raptor_stringbuffer_prepend_counted_string, raptor_stringbuffer_prepend_string * raptor_stringbuffer.c: (main) printf arg * raptor_internal.h, raptor.h: Moved raptor_stringbuffer to public API * raptor_stringbuffer.c (raptor_stringbuffer_append_stringbuffer): Added. (main): Updated test code for raptor_stringbuffer_append_stringbuffer 2004-04-10 Dave Beckett * raptor_general.c, raptor.h (raptor_guess_parser_name): Added new public class method. (raptor_new_parser_for_content): Now uses above. * raptor_internal.h, raptor.h: Move raptor_unicode_char_to_utf8, raptor_utf8_to_unicode_char to public API. * INSTALL.html: consistency with librdf instructions. update libxml versions. update automake, autoconf minimums. * tests/Makefile.am: fix result codes for split off NFC warnings * tests/Makefile.am: Split off NFC warnings so they can fail noisily when glib isn't present to do the check. * rapper.1: Document -g/--guess flag to guess the parser to use from the identifier (URI or file name). * rdfdump.c: Added -g/--guess flag to use raptor_new_parser_for_content guessing the parser to use from the identifier (URI or file name). * turtle_parser.y, raptor_rss.c, raptor_parse.c, ntriples_parse.c: Added scoring factory method recognise_syntax for rdfxml, ntriples, rss, turtle parsers. * raptor_internal.h: Added parser scoring factory method recognise_syntax. * raptor_general.c (raptor_new_parser_for_content): Added, guessing which parser to instance using scoring factory method recognise_syntax. * raptor.h: Added raptor_new_parser_for_content 2004-04-10 Dave Beckett * raptor_sequence.c: cast for c++ 2004-04-09 Dave Beckett * raptor_parse.c: Removed use of raptor_print_statement_detailed * raptor_internal.h: Removed raptor_print_statement_part_as_ntriples, made static * raptor.h: Deprecate raptor_print_statement_detailed * raptor_general.c (raptor_print_statement_detailed): Restored, was in raptor.h but useless. * raptor_general.c: dates, docucomments (raptor_print_statement_detailed): Deleted - never publically documented or used. 2004-04-08 Dave Beckett * Makefile.am: raptor_sequence_test needs to link with libraptor.la * turtle_parser.y: rename raptor_free_handler,raptor_print_handler -> as raptor_sequence... * raptor.h, raptor_internal.h: Move sequence class to public api. * raptor_sequence.c: rename raptor_free_handler,raptor_print_handler -> as raptor_sequence... (raptor_sequence_print_uri): Added. (raptor_sequence_set_print_handler): Added. * raptor_internal.h, raptor.h: Export raptor_vsnprintf public. 2004-04-06 Dave Beckett * turtle_parser.y (turtle_parse): Remove un-necessary cast. * turtle_parser.y (turtle_parse): Free lexer 2004-04-05 Dave Beckett * rdfdump.c: Added HELP_PAD to format long help description over multiple lines. 2004-03-30 Dave Beckett * tests/turtle/test-00.out: Updated base uri * tests/turtle/Makefile.am: Added rdfq-results * tests/turtle/rdfq-results.out, tests/turtle/rdfq-results.ttl: RDF Query result set example from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html 2004-03-27 Dave Beckett * raptor_general.c, turtle_parser.y, rdfdump.c: casts for C++ * NEWS.html: skeleton 1.3.0 news * configure.ac, autogen.sh: Use some AM_INIT_AUTOMAKE options. Require automake1.7, which requires autoconf 2.54 * examples/Makefile.am: Drop $(shell .. ) which is not portable between makes * raptor-src-config.in, raptor-config.in: emit --help usage to stdout, Support --help and exit 0. 2004-03-26 Dave Beckett * libraptor.3: words * rapper.1: Document -f * TODO.html: bug was libxml2 not me * tests/Makefile.am: Add bad-21 * tests/bad-21.rdf: Check non-namespaced attributes on a property are reported * raptor_parse.c (raptor_xml_start_element_handler): Check element, attributes for non-namespaces once we know we are in rdf processing. Check all named attributes for lack of namespace, error and zap if found. (raptor_process_property_attributes): Skip any deleted attributes. 2004-03-25 Dave Beckett * tests/Makefile.am: Added warn-05, warn-06 * tests/warn-05.out, tests/warn-06.out, tests/warn-05.rdf, tests/warn-06.rdf: Check for warning for unknown rdf namespaced property element, attributes * raptor_parse.c (raptor_process_property_attributes): Generate an error for forbidden rdf names, warning for unknown rdf names. * raptor_parse.c: Merged rdf_attr_info into rdf_syntax_terms_info. Now we can check for unknown rdf: names (raptor_forbidden_nodeElement_name, raptor_forbidden_propertyElement_name, raptor_forbidden_propertyAttribute_name): Return -1 on unknown name. (raptor_start_element_grammar): Generate an error for forbidden rdf names, warning for unknown rdf names. * tests/Makefile.am: Added warn-04 * tests/warn-04.out, tests/warn-04.rdf: Check for warning for unknown rdf namespaced node element * tests/turtle/Makefile.am, tests/Makefile.am: fix grep for Warning output * raptor_general.c, raptor.h: Added raptor_free_memory to dealloc memory returned by raptor functions - some systems need this due to having multiple heaps. * raptor_general.c (raptor_default_generate_id_handler): doh * raptor_general.c (raptor_default_generate_id_handler): Rework not to use tmpid before initialising it. * raptor_general.c (main): Free returned uri * raptor.h: Added raptor_feature_from_uri * Makefile.am: Added raptor_general_test * raptor_general.c (raptor_feature_from_uri): Turn a feature URI into a feature number. (main): Added, testing feature enumerations. * rdfdump.c: note feature values in -f help * rdfdump.c: More help message tidying. * rdfdump.c: Alter HELP_TEXT macro so short arg isn't auto-quoted. Use this to add short option options arg to help. 2004-03-24 Dave Beckett * raptor_general.c (raptor_default_generate_id_handler): Don't bump default genid counter when a user_bnodeid is present. * rdfdump.c: Allow setting feature optional values -f NAME=VALUE (integer). * raptor_general.c, raptor.h: Use raptor_feature type for enumeration calls. * raptor_general.c: Tidy feature labels * rdfdump.c: Tidy -f help message. * rdfdump.c: Re-ordered long_options to be alphabetical by option char. Added -f/--feature FEATURE to set a parser feature. With the value 'help', lists them all using raptor_features_enumerate. * raptor.h: Added raptor_get_feature, raptor_features_enumerate. raptor_set_feature gets a return value. * raptor_general.c (raptor_set_feature): Delete docs, now has an API. Return a failure value. raptor_features_list - static added. (raptor_features_enumerate): Added, to allow returning of parser feature name, URI and/or label. (raptor_get_feature): Added. 2004-03-23 Dave Beckett * TODO.html: Add turtle use of raptor_generate_id * turtle_parser.y (blank): Use raptor_generate_id when a blank identifier name is given, to allow application to change it. 2004-03-21 Dave Beckett * tests/turtle/test-10.out, tests/turtle/test-09.out, turtle_parser.y: Make Turtle integers emit xsd:integer 2004-03-19 Dave Beckett * raptor_parse.c: Twice. * raptor_parse.c: Remove FIXME for other rdf:parseType values - just fall through to Literal * raptor_parse.c: FIXME not relevant. * ntriples_parse.c (raptor_ntriples_generate_statement): Kill a FIXME, fail with an error on bad rdf:_n property. * tests/Makefile.am: Added bad-06.nt * tests/bad-06.nt: bad rdf:_n in ntriples 2004-03-18 Dave Beckett * turtle_parser.y: Added INTEGER_LITERAL. Turn it into a xsd:nonNegativeInteger * turtle_lexer.l: Added INTEGER_LITERAL. * tests/turtle/Makefile.am: Added test-09 test-10 * tests/turtle/test-09.out, tests/turtle/test-09.ttl, tests/turtle/test-10.out, tests/turtle/test-10.ttl: Integer literal tests * tests/Makefile.am, Makefile.am: Ensure rapper is up-to-date and built before tests are run. 2004-03-15 Dave Beckett * tests/warn-03.out, tests/warn-03.rdf: Added warn-03 warning not dieing on NFC in XML literals * tests/Makefile.am: Added warn-03 * raptor_parse.c (raptor_end_element_grammar): For NFC problems in an XML literal, take notice of feature_non_nfc_fatal which defaults to warning, rather than given an error. 2004-02-26 Dave Beckett * tests/turtle/Makefile.am: Added bad-04.ttl * tests/turtle/bad-04.ttl: Check , in collection items fails * tests/turtle/test-07.ttl: Remove , between items - forbidden. * turtle_parser.y (objectList): Remove optional commas for triple objects. (itemList): Added with no commas. (collection): Use itemList not objectList. * tests/turtle/Makefile.am: remove test-09.ttl * tests/turtle/test-09.out, tests/turtle/test-09.ttl: Comma is required or not in collections, not optional 2004-02-24 Dave Beckett * raptor.spec.in: Export library la files * turtle_parser.y (objectList): Allow optional commas in lists of objects - such as in all triple objects and collections. * tests/turtle/test-09.out, tests/turtle/test-09.ttl: Added test for optional comms in a collection * tests/turtle/Makefile.am: Added test-09.ttl 2004-02-23 Dave Beckett * raptor.h: Add stdio.h 2004-02-19 Dave Beckett * n3_lexer.l, turtle_lexer.l (main): Don't re-reset the scanner to its address. * n3_lexer.l, turtle_lexer.l: Remove RAPTOR_IN_REDLAND * turtle_parser.y (main): Use lineno. * turtle_parser.y: comment 2004-01-30 Dave Beckett * Makefile.am: deps * rapper.1: fix changelog * Makefile.am: Make rapper.html * rapper.1: urls 2004-01-25 Dave Beckett * raptor_general.c (raptor_delete_parser_factories): Free alias if it was set. 2004-01-24 Dave Beckett * rdfdump.c: Don't print (default) when listing valid args for -i * rdfdump.c: Use raptor_syntax_name_check to check name; don't make/destroy a parser. * raptor_general.c (raptor_syntax_name_check): Added, to check names. * raptor.h: Added raptor_syntax_name_check * rdfdump.c: Make -i try to make a parser, don't hardcode names. * rdfdump.c: Use raptor_syntaxes_enumerate in -i error * rdfdump.c: Use raptor_syntaxes_enumerate in usage -i help * rapper.1: Updated to mention Turtle. * configure.ac: Bumped version to 1.3.0 * README.html: turtle * Snapshotted raptor_1_2_0 for 1.2.0 release * libraptor.3, README.html, NEWS.html: Updated for 1.2.0 * TODO.html: N-Triples Plus to Turtle 2004-01-22 Dave Beckett * configure.ac: Use AC_PROG_LEX and handle when there is no lex or flex gracefully. AM_PROG_LEX set LEX to a value that caused odd configure output. 2004-01-20 Dave Beckett * configure.ac: Updated output files check from n3/ntriples plus to turtle * turtle_parser.y, raptor_rss.c, raptor_parse.c, ntriples_parse.c: Update to use raptor_parser_register_factory alias argument to register any old or alternate names. * raptor_internal.h: Add alias field to raptor_parser_factory_s. Add alias argument to raptor_parser_register_factory prototype. * raptor_general.c (raptor_parser_register_factory, raptor_get_parser_factory): Added an alias argument, used to register a alternate name which is never used or returned in parser enumerations. * examples/grapper.c: Added a tooltip for the errors/warnings output box. * examples/grapper.c: Use G_TYPE_INT for column 1 of errors * examples/grapper.c: Added errors/warnings box, updated with results of parsing. * Makefile.am: Added ChangeLog.1 2004-01-19 Dave Beckett * raptor_general.c: Define raptor_system_malloc, raptor_system_free * raptor_internal.h: RAPTOR_... not LIBRDF_ * raptor_utf8.c (raptor_utf8_is_nfc): Use SYSTEM_FREE * raptor_internal.h: Define SYSTEM_MALLOC, SYSTEM_FREE 2004-01-18 Dave Beckett * turtle_parser.y: fix double free of first_identifier * turtle_parser.y: Collections generating triples. * turtle_common.h: Add nil/first/rest_uri fields * tests/turtle/test-07.out: Updated as a collection test result. * tests/turtle/Makefile.am: Added test-08 * tests/turtle/test-08.out, tests/turtle/test-08.ttl, tests/turtle/test-07.ttl: collection test * turtle_lexer.l: Added '(' and ')' for collections. * turtle_parser.y: Added collection grammar parts, triples not right yet. * raptor_identifier.c (raptor_copy_identifier): Copy literal languages correctly. * tests/turtle/test-00.out, tests/turtle/Makefile.am, tests/Makefile.am, turtle_parser.y, turtle_lexer.l, turtle_common.h, raptor_internal.h, raptor_general.c, configure.ac, Makefile.am: N-Triples Plus to Turtle n3_ in filenames to turtle_ .ntp to .ttl * rdfdump.c: indenting * rdfdump.c: Allow turtle, don't document ntriples-plus * n3_parser.y, turtle_parser.y: Register under the name turtle 2004-01-14 Dave Beckett * raptor_xml_writer.c, raptor_uri.c, raptor_rss.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_internal.h, raptor_general.c, ntriples_parse.c: RAPTOR_ERROR* and RAPTOR_FATAL* lose their function arg, using __func__ * raptor_general.c (raptor_finish): Remove direct call of raptor_terminate_parser_rdfxml * raptor_parse.c (raptor_xml_parse_finish_factory): Renamed from raptor_terminate_parser_rdfxml and now static. * raptor_internal.h: finish_factory returns void * raptor_internal.h: Added finish_factory factory cleanup method. Removed raptor_terminate_parser_rdfxml. * raptor_general.c (raptor_delete_parser_factories): Free mime type, URI string. Call new finish_factory factory method. 2004-01-07 Dave Beckett * raptor_general.c: year 2004-01-01 Dave Beckett * raptor_general.c: casts for string ops * raptor_www.c, raptor_internal.h, configure.ac: Added WWW access with BSD libfetch. * raptor_www_libfetch.c: WWW access with BSD libfetch raptor2-2.0.15/ChangeLog.40000644000175000017500000025725610172250736012051 000000000000002003-12-31 Dave Beckett * raptor_rss.c, raptor_parse.c, ntriples_parse.c, n3_parser.y: Use expanded raptor_parser_register_factory with mime_type and uri_string args where appropriate. * libraptor.3, raptor.h: Added raptor_syntaxes_enumerate * raptor_general.c (raptor_parser_register_factory): Add mime_type and uri_string args, both optional. (raptor_syntaxes_enumerate): Added to get syntax name, label, mime_type or uri_string - all optional. (raptor_parsers_enumerate): Uses raptor_syntaxes_enumerate. * raptor_internal.h: Store parser mime_type, URI in raptor_parser_factory Update raptor_parser_register_factory to take mime_type, uri_string args. * configure.ac: Bumped version to 1.2.0 * Snapshotted raptor_1_1_0 for 1.1.0 release * configure.ac: Update RAPTOR_LIBTOOL_VERSION to reflect interfaces added, none removed giving current 2:0:1 * NEWS.html: 1.1.0 released 2003-12-31 * libraptor.3: nroff/man style tweaks 2003-12-31 Dave Beckett * libraptor.3: nroff/man style tweaks 2003-12-30 Dave Beckett * NEWS.html: Link to W3C docs for 1.1.0 * configure.ac: words * configure.ac: Make flex version warnings mention N-Triples Plus more 2003-12-30 Dave Beckett * NEWS.html: Link to W3C docs for 1.1.0 * configure.ac: Make flex version warnings mention N-Triples Plus more 2003-12-29 Dave Beckett * TODO.html, README.html, NEWS.html, LICENSE.html, INSTALL.html: XHTML 1 strict * NEWS.html: Prepare for 1.1.0 * libraptor.3: bump date * raptor_stringbuffer.c (main): Do not free as_string returned strings * raptor_stringbuffer.c: brackets * raptor_stringbuffer.c (raptor_free_stringbuffer): Free any constructed string. * raptor_xml_writer.c: Use raptor_stringbuffer to better grow the output cdata. * raptor_stringbuffer.c: stringbuffer now uses unsigned char Removed raptor_new|free_stringbuffer_node - used once, now inlined. (raptor_stringbuffer_append_string_common): Added with common append code merged here. (raptor_stringbuffer_append_counted_string, raptor_stringbuffer_append_string): Added do_copy arg. (main): Test code updated for api changes. * raptor_internal.h: Added prototypes for raptor_stringbuffer class to internal API * Makefile.am: Re-added raptor_stringbuffer.c and raptor_stringbuffer_test 2003-12-23 Dave Beckett * rapper.1: Updated for 1.1.0, -a is gone. Added ntriples-plus * libraptor.3: parser name is ntriples-plus * libraptor.3: Updated for 1.1.0 * raptor.h: remove raptor_namespaces_end_namespace - does not exist. 2003-12-22 Dave Beckett * Makefile.am: Remove raptor_stringbuffer.c/test from dist - not used at present. * configure.ac: Added --with-xml-names to choose XML 1.0 name checking (default) or 1.1 * TODO.html: Added --enable-xml-1-1-names and updated to XML 1.1 PRs * raptor_utf8.c (raptor_unicode_is_namestartchar): Update to Namespaces in XML 1.1 WD http://www.w3.org/TR/2003/PR-xml-names11-20031105/#NT-NCNameStartChar and Extensible Markup Language (XML) 1.1 PR http://www.w3.org/TR/2003/PR-xml11-20031105/#NT-NameStartChar (raptor_unicode_is_namechar): Updated comment, no code changes needed. * tests/ntriplesplus/Makefile.am: No check-warn-rdf tests yet * TODO.html: Added --disable-nfc-check to disable Unicode NFC checking. * raptor_utf8.c: Use RAPTOR_NFC_CHECK to wrap any use of the glib g_utf8_normalize. * configure.ac: Define RAPTOR_NFC_CHECK when NFC check is needed * configure.ac: Added --disable-nfc-check to disable Unicode NFC checking even if a suitable glib is present and providing it. Otherwise, autodetects as before. * TODO.html: I claim the CDATA counting problem with libxml is a libxml bug. * TODO.html: Record win32 file://c: somewhat handled. * TODO.html: Added --disable-nfc-check to disable Unicode NFC checking. * raptor_utf8.c: Use RAPTOR_NFC_CHECK to wrap any use of the glib g_utf8_normalize. * configure.ac: Define RAPTOR_NFC_CHECK when NFC check is needed * configure.ac: Added --disable-nfc-check to disable Unicode NFC checking even if a suitable glib is present and providing it. Otherwise, autodetects as before. * TODO.html: I claim the CDATA counting problem with libxml is a libxml bug. * TODO.html: Record win32 file://c: somewhat handled. 2003-12-19 Dave Beckett * TODO.html: updates, note bug or feature * examples/Makefile.am: Removed REDLAND_LIBS 2003-12-17 Dave Beckett * raptor_parse.c: Update for changed raptor_generate_id handler calls - no const. * raptor_general.c, raptor.h, raptor_internal.h: raptor_generate_id handler does not take const string * raptor_general.c, raptor.h, raptor_internal.h: raptor_generate_id returns non const * ntriples_parse.c (raptor_ntriples_parse_line): Casts, unsigned char* for blank node IDs. * ntriples_parse.c (raptor_ntriples_parse_line): Enforce predicate must be URIref 2003-12-16 Dave Beckett * ntriples_parse.c (raptor_ntriples_parse_line): Pass blank node identifier generation through raptor_generate_id. Rewrite returns into setting rc and jump to cleanup to ensure allocated blank node IDs are freed. * raptor.pc.in: Restore LDFLAGS, LIBS * raptor-src-config.in: Removed --static-libs 2003-12-15 Dave Beckett * raptor.pc.in: Just link -lraptor * configure.ac: Remove use of have_redland for expat sources (no longer shipped with redland anyway) * configure.ac: Remove redland source check. * Makefile.am: No need for librdf.la rule * rdfdump.c, raptor_stringbuffer.c, raptor_set.c, raptor_namespace.c, Makefile.am: Remove all RAPTOR_IN_REDLAND code use of REDLAND_LIBS, REDLAND_CFLAGS. Now the test and rdfdump programs always just use raptor alone. 2003-12-14 Dave Beckett * TODO.html: CDATA sections do not count line numbers at all (seen with libxml) * raptor_general.c (raptor_print_statement_part_as_ntriples): Update call of raptor_print_ntriples_string * raptor.h: Update raptor_print_ntriples_string prototype * raptor_general.c (raptor_print_ntriples_string): Take unsigned const char* 2003-12-08 Dave Beckett * TODO.html: libxml2.6.0 SAX API support done 2003-12-06 Dave Beckett * Makefile.am: Narrower yyerrlabl fix since bison 1.875a no longer requires it * examples/grapper.c: Casts and updates to use URI strings from raptor as unsigned char* and converting to/from gchar* * rdfdump.c, raptor_xml_writer.c, raptor_xml.c, raptor_www_libxml.c, raptor_www.c, raptor_uri.c, raptor_sax2.c, raptor_rss.c, raptor_parse.c, raptor_namespace.c, n3_parser.y, n3_lexer.l: Lots of casts for str* function args, return values between unsigned char* as used for UTF8 and URI strings and char* used by str* functions. Some further casts for strings from XML. * raptor_www_test.c (write_bytes_fh): No return value. (main) Test code casts unsigned char* for URI strings Fix write_content_type and write_bytes_fh set handler methods. * raptor_utf8.c (raptor_unicode_char_to_utf8): unsigned char* arg. (raptor_utf8_is_nfc): unsigned int, cast for unsigned char* * raptor_sequence.c (raptor_sequence_ensure): Use void** not void*. C++ cares. (main): Test code casts to void* for args. * raptor_qname.c (raptor_qname_string_to_uri): cast for signed/unsigned int comparison. * raptor_locator.c (raptor_format_locator): Use raptor_uri_as_counted_string to save a strlen. * raptor_identifier.c: (raptor_identifier_print) fputs arg cast [function for RAPTOR_DEBUG only] * raptor_general.c (raptor_parsers_enumerate): Unsigned int. (raptor_parse_uri_write_bytes): unsigned char* cast. Declare raptor_xml_literal_datatype_uri_string. (raptor_print_statement_detailed): Replace several fprintf with fputs and fputc. (raptor_print_ntriples_string): Use unsigned long/size_t for counts. (raptor_statement_part_as_counted_string): unsigned char* Use raptor_xml_literal_datatype_uri_string. (raptor_statement_part_as_string): unsigned char* (raptor_print_statement_part_as_ntriples): unsigned char*. Replace several fprintf with fputs and fputc. Use raptor_xml_literal_datatype_uri_string (raptor_default_generate_id_handler): Casts for str* functions (raptor_check_ordinal): unsigned char* * ntriples_parse.c: (raptor_ntriples_generate_statement, raptor_ntriples_string_as_utf8_string, raptor_ntriples_parse_line): Updated to take/return unsigned char* args and internals. Update raptor_uri calls for similar changes. Use raptor_xml_literal_datatype_uri_string Lots of casts for str* functions char* arguments. * Makefile.am: Remove maintainer only n3 lex/yacc rules (flex/bison) Post process the bison output to remove unused label to make g++ happier. * raptor_internal.h: Added raptor_xml_literal_datatype_uri_string for the RDF datatype literal URI string, used several times. raptor_check_ordinal takes unsigned char* A couple of lengths, counts become unsigned int. raptor_unicode_char_to_utf8, raptor_format_sax2_element, raptor_xml_writer_cdata, raptor_xml_writer_comment, raptor_xml_writer_as_string changed to take/return unsigned char* for UTF8 strings. * raptor.h: raptor_new_uri_func, raptor_new_uri_from_local_name_func, raptor_new_uri_relative_to_base_func, raptor_uri_as_string_func, raptor_uri_as_counted_string_func URI factory methods changed to all take/return unsigned char* for URI strings raptor_statement_part_as_counted_string, raptor_statement_part_as_string, raptor_new_uri, raptor_new_uri_from_uri_local_name, raptor_new_uri_relative_to_base, raptor_uri_as_string, raptor_uri_as_counted_string URI methods changed to take/return unsigned char* for URI strings raptor_ntriples_string_as_utf8_string changed to return unsigned char* for UTF8 string raptor_uri_resolve_uri_reference, raptor_uri_filename_to_uri_string, raptor_uri_uri_string_to_filename, raptor_uri_uri_string_to_filename_fragment, raptor_uri_is_file_uri Changed to use unsigned char* for URI strings, char* for filenames 2003-12-03 Dave Beckett * TODO.html: ntriples parser should use raptor_generate_id for bnodes 2003-12-01 Dave Beckett * raptor_set.c (raptor_set_stats_print): Debug printing tweak. 2003-11-28 Dave Beckett * raptor_internal.h: raptor_check_ordinal with now unsigned char* arg raptor_sax2 content_cdata now unsigned char* * raptor_general.c (raptor_check_ordinal): unsigned char *name * raptor_parse.c: Lots of char/unsigned char casting. * n3_common.h: Undo n3_syntax_error back to raptor_parser arg. * n3_parser.y: (n3_parser_error) aka yyerror; take a void arg. * n3_common.h: The n3_syntax_error aka yyerror function takes a void arg. * n3_parser.y: Casts for rdf_parser, strings. * n3_lexer.l: Define INPUT_FN as yyinput (C++) or input (otherwise) Add more casts for C++ near rdf_parser, yytext. (copy_token): More casts for malloc and string functions. (copy_string_token): More size_t, casts. * ntriples_parse.c (raptor_ntriples_term): Use a size_t; cast for C++. * ntriples_parse.c (raptor_ntriples_term_valid,raptor_ntriples_term): Change argument names from class to term_class to avoid C++ keyword. * raptor_getopt.h: Protect prototypes for C++ * raptor_stringbuffer.c: casts for RAPTOR_*ALLOC returns * n3_parser.y: oops, raptort -> raptor * n3_parser.y: another cast for RAPTOR_MALLOC return * n3_parser.y: casts for RAPTOR_CALLOC returns * configure.ac: Move adding pkg-config glib2.0 cppflags/libs till after the other libraries since that's more likely to be system wide and least effect libxml2, other libraries that might be elsewhere. Mostly affects OSX which is more sensitive to link order. * raptor_stringbuffer.c (main): declare at start of block * configure.ac: Check for libxml/SAX2.h - the new SAX2 API * raptor_libxml.c: Added a pile of libxml2_* macros to use the libxml2 SAX2 functions when they are present, otherwise the SAX1. Not using the SAX2 parts of the libxml2 API at present. * strcasecmp.c: Add debug message arg casts. * configure.ac: Include libxml/parser.h when checking for other libxml2 headers * ntriples_parse.c: Add some debug message arg casts. (raptor_ntriples_parse_chunk): At end of input, check that there is no remaining junk. * ntriples_parse.c (raptor_ntriples_parse_chunk): Fix line counting problems when \r\n crosses a buffer or when a line ends at the end of a buffer. last_char recorded in state. * TODO.html: N-Triples Plus parser More line counting fixes. * README.html: Added N-Triples Plus parser * raptor_stringbuffer.c (main): Free returned strings. * Makefile.am: Added raptor_stringbuffer.c raptor_stringbuffer_test code * raptor.h: Added raptor_stringbuffer. * raptor_stringbuffer.c: Stringbuffer class for growing strings * raptor_libxml.c (raptor_libxml_init): With libxml2 use raptor_xml_characters_handler for sax->characters. * raptor_parse.c (raptor_cdata_grammar): Added is_cdata arg. (raptor_xml_characters_handler): Added, calling raptor_cdata_grammar. (raptor_xml_cdata_handler): Updated to call raptor_cdata_grammar with is_cdata=1. (raptor_xml_parse_init): With expat use raptor_xml_characters_handler with XML_SetCharacterDataHandler. (raptor_cdata_grammar): Tidy error reporting; do not use raptor_xml_writer_as_string for a simple print. * raptor_internal.h: Added raptor_xml_characters_handler prototype. 2003-11-25 Dave Beckett * manifest.pl: Add withdrawn tests check 2003-11-23 Dave Beckett * tests/ntriplesplus/Makefile.am: Added more N-Triples Plus tests (1-7) and bad (0-3) * tests/ntriplesplus/test-07.out, tests/ntriplesplus/test-07.ntp, tests/ntriplesplus/test-06.out, tests/ntriplesplus/test-06.ntp, tests/ntriplesplus/test-05.out, tests/ntriplesplus/test-05.ntp, tests/ntriplesplus/test-04.out, tests/ntriplesplus/test-04.ntp, tests/ntriplesplus/test-03.out, tests/ntriplesplus/test-03.ntp, tests/ntriplesplus/test-02.out, tests/ntriplesplus/test-02.ntp, tests/ntriplesplus/test-01.out, tests/ntriplesplus/test-01.ntp: More N-Triples Plus tests * tests/ntriplesplus/bad-00.ntp, tests/ntriplesplus/bad-01.ntp, tests/ntriplesplus/bad-02.ntp, tests/ntriplesplus/bad-03.ntp: N-Triples Plus bad tests * n3_lexer.l: In prefix state, always return to initial on matching '.', then error out. (n3_syntax_error): Copy removed here. (main): Init enough more of parser/locator so that n3_syntax_error in main library can be used. 2003-11-21 Dave Beckett * rdfdump.c: extra newline in version * rdfdump.c: extra newline in help 2003-11-19 Dave Beckett * tests/Makefile.am: Added check-ntriples-plus to check N-Triples Plus with the N-Triples tests. * n3_parser.y, n3_lexer.l, n3_common.h: Added lineno to raptor_n3_parser context to track newlines for dos, unix, mac since flex doesn't do that by default with yylineno. * rdfdump.c: tidy help messages * TODO.html: line counting for dos files * ntriples_parse.c: Track newlines correctly for \r\n across chunks; move last_nl into ntriples parser context. (raptor_ntriples_parse_chunk,raptor_ntriples_parse_start): Use and init last_nl in ntriples parser context. 2003-11-16 Dave Beckett * raptor.h: Added raptor_ntriples_string_as_utf8_string * ntriples_parse.c (raptor_ntriples_term): Added allow_utf8 argument and new class RAPTOR_TERM_CLASS_FULL which uses all the passed in string. (raptor_ntriples_string_as_utf8_string): Added, using raptor_ntriples_term as above. (raptor_ntriples_parse_line): Use size_t len args. * rdfdump.c: Use f/puts instead of print/fprintf when there are no %s * raptor_uri.c (raptor_default_new_uri_for_rdf_concept): Remove duplicate strlen(base_uri) 2003-11-15 Dave Beckett * n3_lexer.l: Document more ntriples plus Error out if @prefix's name doesn't match name * TODO.html: todos near xml1.1 names * raptor_utf8.c (raptor_unicode_is_namestartchar): Two | changed to ||. Likely worked anyway 2003-11-11 Dave Beckett * libraptor.3: Noted raptor_set_feature with non_nfc_fatal * raptor.h: Added RAPTOR_FEATURE_NON_NFC_FATAL to pick between NFC errors or warnings. * raptor_general.c (raptor_set_feature): Added RAPTOR_FEATURE_NON_NFC_FATAL to pick between NFC errors or warnings. (raptor_set_parser_strict): Set feature_non_nfc_fatal default off. * raptor_internal.h: Added feature_non_nfc_fatal to pick between NFC errors or warnings. * raptor_parse.c: Put 'quotes' around element/attribute names in messages. Use feature_non_nfc_fatal to pick between NFC errors or warnings. * tests/Makefile.am: check-bad-nfc-rdf - use strict mode * rdfdump.c: Document -m/--mode arg * TODO.html: gzip2/bzip2 api 2003-11-10 Dave Beckett * TODO.html: Note libxml2 2.6.0 SAX2 issues * configure.ac: Added tests/ntriplesplus * tests/ntriplesplus/Makefile.am: N-Triples plus tests * tests/ntriplesplus/test-00.ntp, tests/ntriplesplus/test-00.out: N-Triples Plus default namespace test * tests/Makefile.am: added ntriplesplus dir * raptor_qname.c (raptor_qname_string_to_uri): Keep original name around for error reporting. * rdfdump.c, n3_parser.y: parser now called ntriples-plus * n3_parser.y: parser called ntriplesplus * n3_parser.y (production directive): Fix declaring default namespace prefix 2003-11-09 Dave Beckett * tests/Makefile.am: added bad-20.rdf * tests/bad-20.rdf: check non-namespaced element does not crash parser * raptor_qname.c (raptor_new_qname, raptor_new_qname_from_namespace_local_name): Do not die if no URI for qname is available. It might be which is at least needed for some error reports or for embedded qnames. Caused unnecessary crashes when parsing failed. 2003-11-03 Dave Beckett * raptor_xml.c (main): Make tests less chatty on success * raptor_uri.c (main): Make it less chatty on success * raptor_uri.c (raptor_uri_uri_string_to_filename_fragment): Allow file://a|/ and file://a:/ (main): For WIN32, check the above works. * autogen.sh: remove ltmain.sh libtool before libtoolize * raptor_general.c (raptor_parse_uri_with_connection): Fail before parsing if raptor_www_fetch failed. * raptor_internal.h: Added raptor_www_error_varargs internal prototype. * raptor_www_libxml.c (raptor_www_libxml_http_error): This was just all wrong, printing to stderr and then exit(1). Change to use the proper raptor_www_error_varargs callback. * raptor_www.c (raptor_www_error_varargs): Added, with va_list signature. * raptor_general.c (raptor_parse_file): When uri is given and base_uri is NULL, copy the uri and free it later - fix to match the function documentation. 2003-10-31 Dave Beckett * raptor_general.c (raptor_parse_file): fclose only when fh is not NULL 2003-10-21 Dave Beckett * TODO.html: Note Win32 URI code possible bug * raptor_parse.c (raptor_xml_end_element_handler): For RAPTOR_DEBUG, declare element_name at start of function. 2003-10-20 Dave Beckett * raptor.h: raptor_namespace(s)_(new|free) renamed to raptor_(new|free)_namespace(s) Added raptor_new_qname_from_namespace_local_name * raptor_qname.c (raptor_new_qname_from_namespace_local_name): Added. * raptor_namespace.c: raptor_namespaces_(new|free) renamed to raptor_(new|free)_namespaces * raptor_namespace.c: raptor_namespace_(new|free) renamed to raptor_(new|free)_namespace * raptor_xml_writer.c: raptor_namespaces_free renamed to raptor_namespaces_clear * raptor_parse.c (raptor_xml_start_element_handler): Use raptor_new_sax2_element. raptor_namespaces_free renamed to raptor_namespaces_clear * raptor_internal.h: Added raptor_new_sax2_element * raptor_sax2.c (raptor_new_sax2_element): Added. * raptor.h: Added prototypes for raptor_namespaces_new, raptor_namespaces_clear * raptor_namespace.c (raptor_namespaces_new,raptor_namespaces_free): Added for constructor and destructor. raptor_namespaces_free renamed to raptor_namespaces_clear for emptying a statically allocated namespace stack. * n3_parser.y: raptor_namespaces_free renamed to raptor_namespaces_clear 2003-10-16 Dave Beckett * n3_parser.y: Moved n3 lexer/parser stuff to n3_common.h Added uri field to union. URI_LITERAL and QNAME_LITERAL now are uri. PREFIX now expects an IDENTIFIER to follow. Remove all make qname/uri and free(copied token) sequences since the lexer does it. Added fake yy_init_globals to stop dumb warning. * n3_lexer.l: Make raptor_uris here from lexer tokens (qnames or URIs) For @prefix, recognise following token as an identifier specially rather than try to make it a URI. (n3_token_free): Free string or raptor_uri. (main): Lots of fixups to fake enough n3 parser structure to get it working fairly standalone. * Makefile.am: Added n3_common.h Fixup free of null inside flex-generated lexer. * n3_common.h: N3 parser/lexer shared internals * raptor_internal.h: Moved n3 lexer/parser stuff to n3_common.h * n3_parser.y (n3_qname_to_uri): Replace with call to raptor_qname_string_to_uri and added length parameter. * raptor_qname.c (raptor_new_qname): Replace raptor_namespace_local_name_to_uri with use of raptor_new_uri_from_uri_local_name. (raptor_qname_string_to_uri): Added, making only the URI equivalent to the qname and handling N3/RDQL-style special cases such as "prefix:", ":" and NULL. * raptor_internal.h, raptor.h: Moved raptor_qname, raptor_namespace, raptor_namespace_stack classes into public API. Added raptor_qname_string_to_uri * raptor_namespace.c (raptor_namespace_local_name_to_uri): Removed - only used once internally and was never public. 2003-10-09 Dave Beckett * n3_lexer.l (n3_token_free): Added, for cleanup in debugging. (main): Init and clear token/lval. * tests/Makefile.am: Added ex-53 * tests/ex-53.out, tests/ex-53.rdf: Check allowing optional rdf:RDF * rdfdump.c: --assume/-a feature_assume_is_rdf deleted; rdf:RDF is optional. * raptor_general.c, raptor_parse.c: feature_assume_is_rdf deleted; rdf:RDF is optional. * raptor_internal.h: feature_assume_is_rdf deleted 2003-10-06 Dave Beckett * tests/wine.out, tests/wine.rdf: OWL Wine Ontology from http://www.w3.org/TR/owl-guide/wine.rdf * tests/Makefile.am: Added OWL Wine ontology from http://www.w3.org/TR/owl-guide/wine.rdf as wine.rdf wine.out 2003-09-30 Dave Beckett * TODO.html: NTP lval * n3_parser.y: Remove n3_parser_lex; re-#define yylex to call direct * n3_lexer.l (copy_string_token): Destroy malloced string on error return. * n3_parser.y (n3_parse): Don't delete buffer, pop buffer state; a successful lex does that. * raptor_internal.h: Remove n3_token_print * n3_parser.y: Use reentrant yacc parser. Store the lexer lval in the n3_parser context. Lots of #define trickery to get flex/bison to talk nicely. Make n3_parser_error take an rdf_parser arg (this isn't configurable by bison itself, so is likely fragile). Remove use of extern in lineno; get it from the lexer. Remove N3_Parser global; use rdf_parser local. (n3_parser_error): Update for having rdf_parser arg, update locator lineno from scanner. (n3_syntax_error, n3_qname_to_uri): Get lineno from scanner. (n3_parse): Remove fixmes, no need for protecting globals. (main): Update for reentrant parser; init locator from standalone args. * n3_lexer.l: Remove n3_lexer.c/.h prototypes no longer(?) needed with re-entrant lexer. Remove use of lineno; let lexer do it. Change lexer call to pass in lval from reentrant parser. (n3_token_print): Pass in lval. (main): Update for api changes. 2003-09-29 Dave Beckett * raptor_internal.h: Updates for reentrant lexer. * n3_parser.y: Use reentrant lexer API. Define YYLEX_PARAM to be scanner arg, from current grammar. (n3_parser_lex): Take scanner arg. (n3_syntax_error): Add rdf_parser arg. (n3_parse): Init and destroy reentrant lexer. (raptor_n3_parse_terminate): Tidy up any lexer stuff. (main): Check for file not found, report it. * n3_lexer.l: Switch to reentrant lexer. Pass rdf_parser into code, yyextra internally. (yywrap): Add scanner arg. (copy_string_token, n3_syntax_error): Add rdf_parser arg. (main): Use reentrant calls for lexer to set yyin, get_text. Use yylex_init/yylex_destroy. * Makefile.am: n3_lexer_test depends on raptor_utf8 * raptor_parse.c: Add EXPAT_UTF8_BOM_CRASH fix updates for sax2 changes. * configure.ac: Tweak for old flex version output * configure.ac: Try to check flex is new enough. 2003-09-21 Dave Beckett * n3_parser.y: Minor C reformatting 2003-09-20 Dave Beckett * raptor.h: Added raptor_parsers_enumerate prototype * n3_lexer.l: minor reformatting * n3_lexer.l (copy_string_token): Make \r, \n and \t work * raptor_general.c (raptor_init): Ensure rdf/xml is default parser. (raptor_parsers_enumerate): Added, to enumerate parsers, returning their name & label. * examples/grapper.c: Use raptor_parsers_enumerate to get parser names, labels. * n3_lexer.l: flex archaeology for options * examples/Makefile.am: Don't build examples by default 2003-09-19 Dave Beckett * raptor_www.c, raptor_general.c: Revert to old API for raptor_uri_uri_string_to_filename * raptor.h, raptor_uri.c (raptor_uri_uri_string_to_filename): Restored to old API. (raptor_uri_uri_string_to_filename_fragment): Added with fragment arg. 2003-09-17 Dave Beckett * n3_parser.y (n3_qname_to_uri): Handle NULL (":" in N3) returning the default namespace. It's not quite clear if this is legal. * n3_parser.y (raptor_n3_generate_statement): Do nothing if some part of the triple is NULL. * raptor_internal.h: n3_syntax_error now takes varargs * n3_parser.y (n3_syntax_error): Now takes varargs * n3_lexer.l: n3_syntax_error now takes varargs (copy_string_token): Added \u, \U. Fixed, \r, \n, \t * n3_parser.y: Wrap a debugging printf * n3_lexer.l: For blank literal "_:abc", don't include _: in the id passed to the parser. * n3_parser.y: Throughout replace raptor_new_uri with raptor_copy_uri when copying existing base URI. * n3_parser.y: Throughout: Handle NULL uri string meaning use the base URI * n3_lexer.l: Handle <> (returning NULL) as well as <> with content. (n3_token_print): Update to match. (n3_syntax_error): Simple standalone copy here. * n3_parser.y (n3_parser_error): Set lineno and call raptor_parser_simple_error to pass on the parsing error. (n3_syntax_error): Added. Set lineno and call raptor_parser_error to pass on a general syntax error. (n3_qname_to_uri): Init locator line before calling raptor_new_qname that may fail, calling raptor_parser_simple_error. * raptor_internal.h: Add n3_syntax_error * n3_lexer.l: Call n3_syntax_error on a syntax error * TODO.html: uris work for ntriples+ * examples/grapper.c: Add n3 syntax * n3_parser.y (propertyList): Handle NULL verb, two cases. (raptor_n3_parse_start): No locator column, byte values just yet. * n3_parser.y (n3_qname_to_uri): Call raptor_new_qname with rdf_parser for errors * TODO.html: +RFE to disable NFC linking/check to glib 2003-09-15 Dave Beckett * n3_parser.y: Don't raptor_free_uri shared uris made from qnames * n3_parser.y (n3_parse): Tidy up flex buffers. (raptor_n3_parse_terminate): Destroy any flex state on exit. * n3_parser.y (n3_parse): delete buffer after parse. * n3_parser.y: Free uri strings returned from URI_LITERAL. * raptor_identifier.c (raptor_new_identifier): Note uri, literal_datatype are shared and not copied. * n3_parser.y: Free strings returned from QNAME_LITERAL. * raptor_sequence.c (raptor_new_sequence): Use RAPTOR_MALLOC. (raptor_free_sequence): Free the raptor_sequence. * raptor_identifier.c (raptor_new_identifier): Note id, literal, literal_language are shared and not copied. * n3_parser.y (statement): Free identifier used for subject (propertyList): Free identifier used for verb * n3_parser.y: Track when an identifier is copied using is_malloced (raptor_free_triple): Actually free the triple. * raptor_internal.h, n3_parser.y: raptor_triple now just has 3 items. * n3_parser.y (raptor_n3_parse_terminate): Free namespaces * n3_parser.y (n3_parse): Do not parser NULL or empty string. (raptor_n3_parse_chunk): Do not parser empty buffer. * rdfdump.c: (main) Don't free NULL uri * TODO.html: More N-Triples+ todos * TODO.html, README.html, NEWS.html, INSTALL.html: XHTML fixes, removing align="center" * TODO.html: Some N-Triples+ todos * n3_parser.y: More debugging messages. Recover from errors, don't generate partial triples. (n3_qname_to_uri): Return NULL if raptor_new_qname does not give a URI (some error happened). * n3_lexer.l: Remove END token, should only use EOF Count lines right for \r\n|\r|\n Handle EOF in comments * n3_parser.y: Remove END token, should only use EOF Add more debugging statements. Throughtout, change raptor_new_uri to raptor_new_uri_relative_to_base. (statement): Handle empty propertyList ("[]"). (propertyList 1): Copy verb into objectList, then append propertyList items (if not empty "[]" again). (objectList): Add empty item for "[]", returning NULL. (resource): For [], handle NULL and generate statements here before returning the generated id. (n3_parser_print_statement): Added for test code (main): In test code, init URI module only, create fake static rdf_parser and n3_parser and initialise enough (base URI, and context) so that it works. * n3_parser.y: Add error recovery at '.' 2003-09-14 Dave Beckett * n3_parser.y: raptor_print_triple renamed to raptor_triple_print * n3_parser.y: Only define raptor_print_triple if debugging. * raptor_identifier.c, n3_parser.y: raptor_print_identifier renamed to raptor_identifier_print * n3_parser.y: Raptor N-Triples+/N3 parser * n3_lexer.l: Raptor N-Triples+/N3 lexer * raptor_identifier.c (raptor_identifier_print): Added for debugging * raptor_internal.h: When debugging, raptor_identifier_print * raptor_identifier.c (raptor_new_identifier): Add literal, literal_datatype, literal_language args and handle them. (raptor_init_identifier): Deleted, not used (enough). (raptor_copy_identifier, raptor_free_identifier): Updated for literal, literal language and literal datatype. * rdfdump.c: Use the syntax name (after validation) to intialise the parser rather than an ever-growing set of flags. * raptor_uri.c (raptor_default_new_uri): If the filename had a fragment, re-append it to the file:URI after updating it to be correct. (raptor_uri_uri_string_to_filename): Add fragment_p arg to return the URI fragment after a discovered filename in a file:URI. (assert_uri_to_filename): Update call to raptor_uri_uri_string_to_filename. * raptor_parse.c (raptor_xml_parser): Add namespaces. Elsewhere change rdf_parser->namespaces to rdf_xml_parser->namespaces. (raptor_xml_parse_start): Initialise the namespaces for rdf/xml. * raptor_sequence.c: Raptor sequence ADT * raptor_namespace.c (raptor_namespace_init): Add defaults arg to control which namespaces are added by default. 0=none, 1=xml, 2=... others (main): Update test code to give new arg. * raptor_general.c (raptor_init): Call raptor_init_parser_n3. (raptor_start_parser, raptor_free_parser): Remove namespace code from here; moves into specific parser context code. (raptor_parse_file): Update for raptor_uri_uri_string_to_filename extra arg. * raptor_xml_writer.c: (raptor_new_xml_writer) Update for raptor_namespaces_init defaults arg. * raptor_rss.c (raptor_rss_emit): Use raptor_new_identifier rather than raptor_init_identifier and make items dynamically allocated. * raptor_www.c: (raptor_www_file_fetch) Update for raptor_uri_uri_string_to_filename extra argument. * raptor.h: Add literal, literal_datatype, literal_language to raptor_identifier structure. Add above arguments to raptor_new_identifier. Remove raptor_init_identifier - not used. Add fragment_p argument to raptor_uri_uri_string_to_filename. * raptor_internal.h: Remove namespaces from raptor_parser; now in per-syntax contexts. Updated raptor_namespaces_init to take defaults arg. Added N3 class prototypes, for n3_token_print, raptor_init_parser_n3, n3_parser_lex. Added raptor_triple structure. Added sequence class prototypes. * Makefile.am: Add n3_lexer.c n3_lexer.h both generated from n3_lexer.l by flex; add maintainer-only rules to do that. Add n3_parser.tab.c n3_parser.tab.h generated from n3_parser.y by yacc; add maintainer-only rules to do that. Add raptor_sequence.c and test. * configure.ac: Add lex (flex required) and yacc 2003-09-08 Dave Beckett * configure.ac: Bumped version to 1.1.0 * ntriples.h: deprecated * Snapshotted raptor_1_0_0 for 1.0.0 release * libraptor.3: new date * NEWS.html: Note functions were removed, soname was increased * ntriples.h, Makefile.am: Removed old header ntriples.h * raptor_general.c, raptor.h, ntriples_parse.c: Removed deprecated functions as promised. Changes are described in the libraptor.3 man page. * configure.ac: Updated for Raptor 1.0.0 Shared library soname major now 1 * NEWS.html, libraptor.3: Updated for Raptor 1.0.0 * win32_config.h: Added R_OK define for access() * tests/Makefile.am: test wording for failures 2003-09-05 Dave Beckett * tests/Makefile.am: Added bad-05.nt * tests/bad-05.nt: Bad Unicode character #x110000 * tests/test.out, tests/test.nt: fixes * tests/test.nt: Removed resource18-20 - illegal Unicode chars. Added \U0010FFFF * ntriples_parse.c (raptor_ntriples_term): Forbid Unicode characters outside #x0-#x10FFFF 2003-09-04 Dave Beckett * libraptor.3: Updated for 0.9.13 Added raptor_parse_file_stream. Added new feature normalize_language. Added list of all static variables exported. * configure.ac: Define RAPTOR_VERSION_DECIMAL here and make it an AC_SUBST. * raptor_general.c: Use RAPTOR_VERSION_DECIMAL define. * raptor-config.1: Document --version-decimal and --libtool-libs * raptor-config.in: Added --version-decimal. * rdfdump.c: Allow filename "-" to be used as standard input. When a filename is given, use raptor_parse_file. Adjust the error messages to mention file names when using raptor_parse_file. * raptor.h: Added raptor_parse_file_stream * raptor_general.c (raptor_parse_file_stream): Added, allowing passing in of an existing FILE* stream (with optional filename) and parsing rather than raptor doing the fopen/fclose. (raptor_parse_file): A NULL uri argument now means stdin. * raptor_internal.h, raptor_parse.c: Remove rdf_parser->fh * rdfdump.c: Use raptor_short_copyright_string in usage/help messages * raptor_general.c, raptor.h: Added raptor_short_copyright_string 2003-09-03 Dave Beckett * raptor_general.c (raptor_set_feature): Add new feature normalize_language (raptor_set_parser_strict): Set default for feature normalize_language to true. * raptor.h, raptor_internal.h: Add new feature normalize_language * raptor_parse.c (raptor_xml_start_element_handler): Normalize language to lowercase. After http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier Controlled by a new parser feature 'normalize_language'. * ntriples_parse.c (raptor_ntriples_parse_line): Normalize language to lowercase. After http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier 2003-09-01 Dave Beckett * raptor-config.in: Oops, -lraptor with --libs * configure.ac: Added RAPTOR_LIBTOOL_LIBS for compiling with raptor using libtool. * raptor-config.in: Added exec_prefix to make --libs generate the right -L Added --libtool-libs for compiling with raptor using libtool. 2003-08-31 Dave Beckett * configure.ac: dmalloc enabled only if dmalloc.h is present * tests/Makefile.am: Removed warn-01 re-added accidently. * tests/warn-00.out, tests/warn-00.rdf: Added rdf:bagID warning check * tests/Makefile.am: Added scanning tests and ex-52.svg/out for inside SVG * tests/ex-52.out, tests/ex-52.svg: Check scanning for rdf/xml in SVG * raptor_general.c (raptor_set_parser_strict): Scanning and assuming are never default on, must be enabled * TODO.html: The scanning for rdf:RDF works (--scan argument to rapper) * raptor_parse.c (raptor_xml_start_element_handler): Fix scanning for rdf:RDF. Do parent->child processing if the grammar has a state set up, in this case it is expecting a list of node elements. * rdfdump.c: Set strict before setting other features * rdfdump.c: Use strict_mode * tests/warn-00.out, tests/warn-00.rdf, tests/warn-01.out, tests/warn-01.rdf, tests/warn-03.rdf: These are now errors not warnings * raptor_parse.c (raptor_xml_start_element_handler): Non-namespaced elements are now an error. (raptor_process_property_attributes): Tidy non-namespaced element name. (raptor_start_element_grammar): Give errors if an attempt is made to proceed dealing with elements with no namespace for property or node elements - attributes are caught above. * tests/Makefile.am: Add bad-18.rdf, bad-19.rdf for non-namespaced elements * tests/bad-18.rdf, tests/bad-19.rdf: Test node/property elements without namespaces fail * raptor_internal.h: Add raptor_parser field 'magic' for libxml2 error/warning callback validation. and declare RAPTOR_LIBXML_MAGIC to set use there * raptor_general.c (raptor_new_parser): Set RAPTOR_LIBXML_MAGIC field in structure for libxml2 error/warning callback validation. * ntriples_parse.c (raptor_ntriples_term): Check that the string/URI term was terminated before the end of the string. * tests/Makefile.am: Added bad-04.nt * tests/bad-04.nt: Test for non-terminated URI * raptor_libxml.c (raptor_libxml_warning,raptor_libxml_error): Validate the ctx pointer returned since sometimes it is a ctx, sometimes ctx->userData. The latter is what is expected. * tests/Makefile.am: Oops, run bad ntriples tests in N-Triples mode * rapper.1: Added --version/-v * rdfdump.c: Tidied up option error handling, messages. Added --version/-v 2003-08-30 Dave Beckett * configure.ac: Added --with-dmalloc option default auto for maintainer, no otherwise. 2003-08-25 Dave Beckett * configure.ac: Bumped version to 0.9.13 * Snapshotted raptor_0_9_12 for 0.9.12 release * NEWS.html: Updated for 0.9.12 * raptor_parse.c (raptor_start_element_grammar): With rdf:datatype, do not lose the URI string pointer. For rdf:ID, do not allocate the URI twice. * raptor_parse.c (raptor_generate_statement): Do not set language when a datatype is given. * raptor_xml_writer.c (raptor_new_xml_writer): Initialise writer buffer to an empty string to start (i.e. just \0). (raptor_xml_writer_start_element): Now assume buffer is always present, remove empty buffer case. (raptor_xml_writer_end_element,raptor_xml_writer_cdata): Handle 0 length case, no strncpy. * tests/Makefile.am: Added ex-51. Fix daml+oil test. * tests/ex-51.out, tests/ex-51.rdf: Check empty XML literal works * tests/ex-41.out: No language for datatyped literals. * tests/daml-oil.rdf, tests/daml-oil.out, tests/Makefile.am: Updated to DAML+OIL schema 2001-03 as defined in http://www.daml.org/2001/03/daml+oil-index.html * tests/daml-oil.out, tests/daml-oil.rdf: Added 2000-11-30 http://www.cs.man.ac.uk/%7Ehorrocks/DAML-OIL/daml-oil.rdf * tests/owl-schema.rdf, tests/owl-schema.out: Updated OWL schema http://www.w3.org/2002/07/owl to match that given in OWL Reference 2003-08-18 CR at http://www.w3.org/TR/2003/CR-owl-ref-20030818/#appB * libraptor.3: Updated for 0.9.12 2003-08-21 Dave Beckett * NEWS.html: Updates for 0.9.12 * TODO.html: URI#frag used as URI in retrievals now * Makefile.am: Remove -static from test links * raptor_uri.c (main): Test xmlbase and retrievable URI tranforms. * raptor_uri.c (raptor_uri_resolve_uri_reference): Handle #s relative to a uri-reference with a #fragment. * raptor_www.c: (raptor_www_fetch) Use raptor_new_uri_for_retrieval to ensure that the URI-reference fragments are removed, and the URI path exists. * raptor.h: Added raptor_new_uri_for_retrieval * raptor_uri.c (raptor_new_uri_for_retrieval): Added, strips fragments and ensures / path is present. * INSTALL.html: Builds on Alpha Linux 2.2 * raptor_xml_writer.c (raptor_xml_writer_start_element,raptor_xml_writer_end_element): Use size_t for lengths. * raptor_xml_writer.c (raptor_xml_writer_start_element): Set content_element_seen in parent only if there is a parent. (raptor_xml_writer_end_element): Change current_element to parent only if there is a current element. * TODO.html: NFC checks * tests/Makefile.am: Pull out may-fail NFC checks into a separate set and don't exit 1 if they do fail. Failure is possible since it requires GNOME glib2 which isn't always available. 2003-08-20 Dave Beckett * raptor_general.c (raptor_check_ordinal): parentheses just for gcc 2003-08-17 Dave Beckett * raptor_xml_writer.c: (raptor_xml_writer_end_element) Reset the current_element pointer on finishing. Makes any succeeding cdata do the right thing. * rdfdump.c: Inside redland, don't call raptor_init/finish, it's done by redland's world. 2003-08-13 Dave Beckett * raptor_rss.c (raptor_rss_parse_chunk): Stop working after a user abort of the parser. * raptor_general.c (raptor_check_ordinal): c is not const * rdfdump.c, raptor_xml_writer.c, raptor_xml.c, raptor_www_libwww.c, raptor_utf8.c, raptor_uri.c, raptor_set.c, raptor_sax2.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_locator.c, raptor_libxml.c, raptor_identifier.c, raptor_general.c, ntriples_parse.c: Move dmalloc includes into raptor_internal.h and use everywhere. * raptor_internal.h: Add raptor dmalloc includes here to ensure all raptor code uses it or not consistently. * TODO.html: +URI retrieval 2003-08-08 Dave Beckett * tests/Makefile.am: Added warn-03 * tests/warn-03.rdf: Handle deleting of default namespaces * raptor_parse.c (raptor_xml_start_element_handler): Handle when a name has a namespace but that namespace has no URI such as xmlns="". In that case, the element has non-namespaced parts too, so skip. * ntriples_parse.c (raptor_ntriples_parse_line): Casts so isspace calls get int args. * raptor_uri.c (raptor_uri_is_absolute): Cast so isalpha and isalnum get int args. * tests/Makefile.am: Added ex-50 * tests/ex-50.out, tests/ex-50.rdf: Check parseType with unknown value * raptor_parse.c (raptor_start_element_grammar): Handle parseType="Literal" without duplicating code. * raptor_parse.c (raptor_start_element_grammar): Handle parseType="...." which isn't any of the other known types identically to parseType="Literal". * raptor_general.c (raptor_check_ordinal): Return <0 on failure such as no legal characters at all. * raptor_internal.h: Added raptor_check_ordinal. * ntriples_parse.c (raptor_ntriples_generate_statement): Make RAPTOR_IDENTIFIER_TYPE_ORDINAL predicates for property URI strings that match the rdf:_ pattern with n a decimal integer>0. * raptor_parse.c: Use raptor_check_ordinal for checking in rdf:_ * raptor_general.c (raptor_check_ordinal): Check the in rdf:_ * raptor_general.c (raptor_vsnprintf): Non-portable use of va_list fixed by copying the arguments with va_copy before passing to vsnprintf calls. The symptom was crashes on some architectures where this mattered, such as powerpc. 2003-08-07 Dave Beckett * raptor_general.c (raptor_parse_uri_with_connection): Return failure status. 2003-08-03 Dave Beckett * tests/Makefile.am: Added bad N-Triples tests bad-0[0-3].nt and checks * tests/bad-00.nt, tests/bad-01.nt, tests/bad-02.nt, tests/bad-03.nt: Bad N-Triples * ntriples_parse.c: raptor_ntriples_term_class Added for: (raptor_ntriples_term_valid): Checking validity of a ntriples term - this could be inlined. (raptor_ntriples_string) Renamed to: (raptor_ntriples_term) Use raptor_ntriples_term_valid. (raptor_ntriples_parse_line): Add more checks that whitespec exists between ntriples terms. Error to have typed literals with languages. * tests/test.out, tests/test.nt: Updated to remove language from typed literals * raptor_general.c (raptor_print_statement_detailed): Fix datatype uri output not * TODO.html: 'make check' shouldn't fail on NFC checks that will never work. * raptor_general.c (raptor_parser_simple_error): Call raptor_parser_error_varargs, don't lose the arguments. 2003-07-29 Dave Beckett * configure.ac: Bumped version to 0.9.12 * Snapshotted raptor_0_9_11 for 0.9.11 release * NEWS.html, README.html: words * raptor_sax2.c: struct nsd: use size_t for length. * configure.ac: Ensure the libxml2 xmlReader API is new enough (2.5.0+) such as having xmlParserSeverities. * NEWS.html: More updates for 0.9.11 2003-07-28 Dave Beckett * raptor.h: Update raptor_generate_id_handler to take user_bnodeid arg. * raptor_rss.c: Update calls of raptor_generate_id with user_bnodeid (NULL for existing calls) * raptor_parse.c: Update calls of raptor_generate_id with user_bnodeid (NULL for existing calls) Use it to wrap the rdf:nodeID values for subject and object cases. * raptor_internal.h: raptor_generate_id updated to add user_bnodeid * raptor_general.c (raptor_set_generate_id_handler): Document final argument user_bnodeid from the rdf:nodeID attribute value. (raptor_default_generate_id_handler): Add user_bnodeid, return it if present. (raptor_generate_id): Add user_bnodeid and pass on. * NEWS.html, README.html: words * README.html: Style. RSS tag soup rewording * README.html, INSTALL.html: Updated for 0.9.11 release * raptor_internal.h: Added raptor_xml_writer_comment * TODO.html: NFC checking done. Exclusive XML C14N done. * raptor_namespace.c (raptor_namespace_copy): Don't copy uri and then lose it. * raptor_xml_writer.c: Added current_element for tracking empty/not empty elements. (raptor_xml_writer_comment): Added, just concatenating the content via raptor_xml_writer_cdata. * raptor_parse.c (raptor_xml_comment_handler): Call raptor_xml_writer_comment inside parseType="Literal" * raptor_xml_writer.c: raptor_xml_writer gains stack depth. (raptor_free_xml_writer): Clear any content_cdata before finishing. (raptor_xml_writer_start_element) Add depth to raptor_format_sax2_element calls. Increase it (raptor_xml_writer_start_element,raptor_xml_writer_end_element): Add depth to raptor_format_sax2_element calls. Decrease it and raptor_namespaces_end_for_depth each time. * raptor_namespace.c: Moved error_handler and error_data arguments around. (raptor_namespaces_start_namespace) Gets those as arguments (raptor_namespaces_start_namespace) Added, simpler version of _full (raptor_namespaces_start_namespace_full) Added, was the old interface but less error arguments. (raptor_namespaces_namespace_in_scope): Fix namespace URI comparison. (raptor_namespace_new) Looses error arguments. (raptor_namespace_copy) Added, copy to a new stack with a new depth. * raptor_sax2.c (raptor_format_sax2_element): Gain stack depth argument. Only use namespace declarations when there is a namespace stack present. copy namespaces to new stack when new ones are needed. * raptor_internal.h: Add error_handler and error_data to namespace_stack. raptor_namespaces_start_namespace gets those as arguments raptor_namespace_new looses them raptor_namespaces_start_namespace takes less args raptor_namespaces_start_namespace_full added raptor_namespace_copy added content_cdata_seen and content_element_seen back into sax2_element * raptor_parse.c: Moved content_cdata_seen and content_element_seen back into sax2_element Update for new raptor_namespaces_start_namespace calling convention. * raptor_xml_writer.c: Debug * raptor_namespace.c (raptor_namespaces_format): Fix missing counting : when present * tests/ex-11.rdf, tests/ex-11.out: Updated to declare the html namespace as default, expect it in the N-Triples output. * raptor_namespace.c (raptor_namespaces_namespace_in_scope): Added, checking if a given namespace is declared in scope. (raptor_namespaces_format): Added, returning a string to declare the given namespace. * raptor_xml_writer.c: (raptor_xml_writer_start_element,raptor_xml_writer_end_element): Updated for raptor_format_sax2_element new arguments * raptor_sax2.c (raptor_format_sax2_element): Add raptor_namespace_stack argument. Create xmlns declarations for elements not declared in the current stack state, using raptor_namespaces_format to create the string. * raptor_internal.h: Added prototypes for raptor_namespaces_namespace_in_scope, raptor_namespaces_format raptor_format_sax2_element now takes a raptor_namespace_stack 2003-07-27 Dave Beckett * raptor_internal.h: raptor_xml_writer prototypes take unsigned char* * raptor_parse.c: Move the code building parseType="Literal" strings to raptor_xml_writer class. (raptor_cdata_grammar): Added, just for symmetry mostly, with most code taken from raptor_xml_cdata_handler. * raptor_xml_writer.c: Move the code building parseType="Literal" strings to raptor_xml_writer class. * Makefile.am: Added raptor_xml_writer.c * raptor_xml_writer.c: Initial version * raptor_parse.c: Split content_cdata fields between sax2_element & (RDF/XML specific) element. raptor_element: Add xml_writer field. Various calls changed to use the new raptor_simple_message_handler for error handling implemented as raptor_parser_simple_error here. (raptor_xml_parser_simple_error_handler): Added, matching the raptor_simple_message_handler API and calling raptor_parser_error. (raptor_start_element_grammar): When parseType="Literal" appears, create a new raptor_xml_writer. (raptor_end_element_grammar): When parseType="Literal" ends, delete the raptor_xml_writer. * raptor_sax2.c (raptor_format_sax2_element): Use raptor_simple_message_handler. * raptor_general.c (raptor_start_parse): Use raptor_parser_simple_error with raptor_namespaces_init. (raptor_parser_simple_error): Added, matching the raptor_simple_message_handler API but same as raptor_parser_error. * raptor_xml.c (raptor_xml_escape_string): Use raptor_simple_message_handler. * raptor_qname.c (raptor_new_qname): Use raptor_simple_message_handler. * raptor.h: raptor_sax2_element moved here, semi-public. Re-ordered URI functions earlier. Various methods changed to use (public) raptor_simple_message_handler for error handling. * raptor_internal.h: Delete raptor_internal_message_handler. Added prototype raptor_parser_simple_error, implementing raptor_simple_error_handler API. Various methods changed to use (public) raptor_simple_message_handler for error handling. raptor_sax2_element moved to semi-public raptor.h rdf/xml-specific cdata parts moved from raptor_sax2_element to raptor_element. Added raptor_xml_writer functions. * raptor_namespace.c: Use (public) raptor_simple_message_handler for error handling. 2003-07-24 Dave Beckett * raptor_parse.c (raptor_process_property_attributes): NFC error message tidy. (raptor_end_element_grammar): Fix NFC error reporting and recovery. Report NFC validation failures for XML Literals * tests/Makefile.am: Added bad-15 bad-17 for bad NFC checking * tests/bad-16.rdf, tests/bad-17.rdf, tests/bad-15.rdf: Bad NFC tests for property attribute, element, element ptl * configure.ac: Added check for g_utf8_normalize in glib 2.0 using pkgconfig. Defines HAVE_G_UTF8_NORMALIZE if present. * raptor_internal.h: Added raptor_utf8_is_nfc * raptor_parse.c (raptor_process_property_attributes): Check for valid NFC on property attribute values. (raptor_end_element_grammar): Check for valid NFC on plain literal property element values. * raptor_utf8.c (raptor_utf8_is_nfc): Added Normal Form C checking, using GNOME glib 2.0 g_utf8_normalize initially. * raptor_parse.c (raptor_start_element_grammar): Forbid property attributes and all rdf:* attributes (except rdf:ID) with rdf:parseType * raptor_general.c: (raptor_statement_part_as_counted_string, raptor_print_statement_part_as_ntriples): Do not emit language for datatyped literals. * raptor_parse.c (raptor_process_property_attributes): rdf:li is forbidden as a property attribute * raptor_parse.c: rdf_syntax_terms_info table: rdf:li is forbidden as a property attribute * libraptor.3: Updated raptor_set_feature for RAPTOR_FEATURE_ALLOW_BAGID and RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST * tests/owl-schema.out, tests/ex-39.out: Updated to remove the rdf:type rdf:List triples * raptor_general.c (raptor_set_feature, raptor_set_parser_strict): Added a new feature RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST (user argument) and feature_allow_rdf_type_rdf_List (internal) to generate the rdf:type rdf:List triple from rdf:parseType="Collection". The default is no after latest RDF/XML revisions. Not relevant for daml:Collection which get the daml:List always. * raptor.h: Added a new feature RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST to control rdf:type rdf:List triple generation from rdf:parseType="Collection" (default no) * raptor_internal.h: Added a new feature feature_allow_rdf_type_rdf_List to control rdf:type rdf:List triple generation from rdf:parseType="Collection" (default no) * raptor_parse.c (raptor_start_element_grammar): Remove rdf:type rdf:List triple generation from rdf:parseType="Collection" by default. Not for daml:Collection. Add a new feature feature_allow_rdf_type_rdf_List to control this. 2003-07-22 Dave Beckett * raptor_xml.c (raptor_valid_xml_ID, raptor_xml_escape_string): unsigned long for all unichars. * raptor_internal.h: Update raptor_utf8_to_unicode_char to use unsigned long output. * raptor_utf8.c (raptor_utf8_to_unicode_char): Take and use unsigned long for unichars. * raptor_rss.c: namespace->nspace since might be a C/C++ keyword sometime * raptor_www_curl.c (raptor_www_curl_header_callback): Turn void* into char* * raptor_set.c: Casts * rdfdump.c (rdfdump_error_handler): Cast data into raptor_parser* * raptor_www_curl.c: (raptor_www_curl_write_callback,raptor_www_curl_header_callback): Return unsigned int 0 on failure, cannot return -1 :) * raptor_www.c: Some casts near mallocs * tests/owl-schema.out: Updated to match 2003-03-18 version. * tests/owl-schema.rdf: Updated to 2003-03-18 version (just changed DOS line endings) * ntriples_parse.c (raptor_ntriples_parse_chunk): Handle just the end marker being given i.e. len=0 (and possibly s=NULL) * raptor_parse.c (raptor_xml_end_element_handler): When parsing has been aborted (rdf_parser->failed), clean up used memory rather than just return. element_name is not used except when debugging, so #ifdef it. 2003-07-21 Dave Beckett * raptor.h: Export global statics raptor_copyright_string, raptor_version_string, raptor_version_major, raptor_version_minor, raptor_version_release and raptor_version_decimal * raptor_general.c: Added statics raptor_copyright_string, raptor_version_string, raptor_version_major, raptor_version_minor, raptor_version_release and raptor_version_decimal * Makefile.am: Removed raptor_cc code since ISO may charge a commercial use fee for this list. * raptor_cc.gperf: ISO 3166-1 'The use of ISO 3166-1 in commercial products may be subject to a licence fee.' says the maintenance agency. Goodbye code. See http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html * raptor_parse.c: Free former rdf:about, rdf:resource attribute string values before they are zapped. * raptor_parse.c (raptor_xml_parse_terminate): Delete the sax2 object when cleaning up. * rdfdump.c: Free new uri_string when it's allocated for a filename * rdfdump.c: Tidied usage and help information. * rapper.1: Updated to match current rapper arguments. * Makefile.am: Added raptor_identifier.c * raptor_general.c, raptor_identifier.c: Moved raptor_identifer classes to raptor_identifier.c 2003-07-20 Dave Beckett * rdfdump.c: If first argument is a filename, make it into a file:/// uri. * raptor_uri.c (raptor_default_new_uri): Turn probably-bad file:filename 'URIs' into proper file:///... etc. ones. * raptor_parse.c: Make use of forbidden rdf-namespaced property attributes into errors, as they should be. (raptor_forbidden_propertyAttribute_name): Now used. Reword some error messages. * tests/Makefile.am (check-bad-rdf): Note when bad test succeeds instead of failing * tests/Makefile.am: Added bad-13, bad-14 * tests/bad-14.rdf: rdf:Description is not a legal property attribute * tests/bad-13.rdf: A property element cannot take rdf:about * raptor_uri.c (raptor_new_uri_for_xmlbase): Docs 2003-07-15 Dave Beckett * libraptor.3: formatting * libraptor.3: Added raptor_set_default_generate_id_parameters, raptor_set_generate_id_handler * raptor_general.c (raptor_set_default_generate_id_parameters): Fix it right this time. * raptor_general.c (raptor_set_default_generate_id_parameters): Fix base so the next generated ID uses the integer given, not integer+1 * raptor_general.c (raptor_free_parser): Free any user-set genid prefix. 2003-07-13 Dave Beckett * raptor.h: raptor_genid_type enum added - for RAPTOR_GENID_TYPE_BNODEID, BAGID Added prototypes for raptor_set_generate_id_handler, raptor_set_default_generate_id_parameters. * raptor_general.c (raptor_set_generate_id_handler): Added, to sent the generate ID handler implementation. (raptor_set_default_generate_id_parameters): Added, to sent the generate ID handler parameters for the default implementation ("gen"+integer). (raptor_default_generate_id_handler): Added, moved default code from raptor_generate_id (raptor_generate_id): Use handler if it exists, otherwise the default implementation. * raptor_internal.h: Added generate_id_handler data parts to raptor_parser internals. 2003-06-24 Dave Beckett * tests/Makefile.am: use top_builddir not .. * Makefile.am: add libraptor.la to rapper dependencies 2003-06-23 Dave Beckett * rdfdump.c: Added -e/--ignore-errors otherwise rapper stops parsing after 1st error using raptor_parse_abort. 2003-06-14 Dave Beckett * raptor_rss.c (raptor_rss_insert_identifiers): Back to being legal C99. * libraptor.3: Fix changes for 0.9.11 * libraptor.3: Updated for stuff since 0.9.10 * raptor_rss.c (raptor_rss_insert_identifiers): Init identifier after item * rdfdump.c, configure.ac: Tweak RSS Tag Soup parser words 2003-06-10 Dave Beckett * raptor_parse.c (raptor_xml_start_element_handler): Emit an error for namespace declarations that are RDF namespace URI plus some chars. Emit a warning if a namespace is declared same as RDF one but 1 char short. * tests/Makefile.am: Added bad-12, warn-02 * tests/bad-12.rdf, tests/warn-02.out, tests/warn-02.rdf: Check for bad rdf namespace URI declarations and warn if last char of RDF namespace URI omitted 2003-06-08 Dave Beckett * configure.ac: Fix the check for RSS parser requirements and report it more verbosely. * configure.ac: RSS parser only if libxml/reader.h present (for now). * configure.ac: libcurl reporting * raptor_parse.c (raptor_xml_parse_chunk_): Use sax2->first_read * raptor_parse.c (raptor_xml_parse_start,raptor_xml_parse_chunk_): Don't use first_read on newer libxml2. 2003-06-06 Dave Beckett * raptor_internal.h: raptor_sax2_s: Add first_read #if LIBXML_VERSION < 20425 * raptor_rss.c (raptor_rss_insert_identifiers): Fix GCC-ism, declare variable at start of block. * raptor_parse.c (raptor_xml_parse_init): Move declaration of expat xp to start of function. * examples/raptor_abort.c, examples/grapper.c, strcasecmp.c, rdfdump.c, raptor_xml.c, raptor_www_test.c, raptor_www_libxml.c, raptor_www_libwww.c, raptor_www_curl.c, raptor_www.c, raptor_win32.c, raptor_utf8.c, raptor_uri.c, raptor_set.c, raptor_sax2.c, raptor_rss.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_locator.c, raptor_libxml.c, raptor_general.c, ntriples_parse.c, configure.ac: Merged patch from Jose Kahan to switch to use raptor_config.h (helps people compiling from source with multiple config.h) 2003-06-05 Dave Beckett * examples/grapper.c (fs_ok_button_callback): Use raptor_uri_filename_to_uri_string to make the file URI. (main): If the argument is a filename, make a URI string out of it via raptor_uri_filename_to_uri_string and use it instead of assuming it is a URI. 2003-05-12 Dave Beckett * raptor_xml.c (raptor_xml_escape_string): Changed API - does not require a parser arg. * raptor_internal.h: Moved SAX2 parts and prototypes here. * raptor_general.c: Use RAPTOR_PARSER_RSS to wrap init of RSS parser * raptor.h: Changed prototype of raptor_xml_escape_string - does not require a parser arg. * raptor_parse.c: Split raptor_element/raptor_rdf_xml_parser into SAX2/RDF bits. Lots of function and structure renaming. * configure.ac: Define RAPTOR_PARSER_RSS only when libxml is around * raptor_sax2.c: SAX2 API * Makefile.am: Added raptor_sax2.c 2003-04-28 Dave Beckett * raptor_rss.c (raptor_rss_emit): Use raptor_free_identifier * raptor_rss.c (raptor_rss_emit): Properly init the raptor_identifier items 2003-04-27 Dave Beckett * raptor_rss.c, raptor_parse.c, ntriples_parse.c: Use raptor_parser_register_factory with label param. * raptor.h: Added raptor_get_name, raptor_get_label * raptor_general.c: Added parser label to factory (raptor_parser_register_factory): Add label param, copy it. (raptor_get_name): Added, return name of parser. (raptor_get_label): Added, return label of parser. * raptor_internal.h: Added parser label to factory * examples/grapper.c: Remove some g_printfs Remove use of display qnames - not impl. * raptor_general.c (raptor_statement_part_as_counted_string): Init len for literals with the literal len included * examples/grapper.c: Don't use triples_list for now. (grapper_model_set_syntax): Fix output. (grapper_model_statements_handler): Remove newlines from literals. * raptor_general.c (raptor_statement_part_as_counted_string): Init len for literals. 2003-04-25 Dave Beckett * raptor_set.c: fix doccumment 2003-04-23 Dave Beckett * examples/grapper.c: Replace N-Triples / RDF/XML with dropdown menu and add RSS tag soup. 2003-04-19 Dave Beckett * rdfdump.c: Added -i/--input for rdfxml, ntriples, rss * raptor_internal.h: More RAPTOR_DEBUG macros * raptor_general.c: (raptor_init) Added rss parser via raptor_init_parser_rss when HAVE_LIBXML_XMLREADER_H * Makefile.am: Added raptor_rss.c * raptor_rss.c: Raptor RSS parser 2003-04-17 Dave Beckett * INSTALL.html: Added some links * configure.ac: Bumped version to 0.9.11 * Snapshotted raptor_0_9_10 for 0.9.10 release * TODO.html, NEWS.html: Updated for 0.9.10 release * INSTALL.html: Updated to reflect recent tests. Added examples section, link to libraptor.html Added more configure options docs. * libraptor.3: Added raptor_set_parser_strict Added raptor_www_no_www_library_init_finish * raptor.spec.in: Require curl Added raptor-config, raptor.pc 2003-04-17 Dave Beckett * raptor.spec.in: Require curl Added raptor-config, raptor.pc * tests/Makefile.am: Move rdf:bagID tests to list of tests with warnings for now (while testing in lax mode) 2003-04-15 Dave Beckett * rdfdump.c (print_statements): Print the program name not "rdfdump" hardcoded. 2003-04-14 Dave Beckett * configure.ac: Check for libxml/xmlreader.h 2003-04-13 Dave Beckett * examples/grapper.c: Added about box, triples count. Free some allocated memory. Rest seems lost in gtk. * examples/Makefile.am: Add AM_CFLAGS, LIBS for debugging * raptor_parse.c (raptor_xml_start_element_handler): Don't copy an empty attributes array. * configure.ac: Added raptor.pc * Makefile.am: Added raptor.pc pkgconfig file installing to $(libdir)/pkgconfig * raptor.pc.in: pkgconfig for raptor 2003-04-07 Dave Beckett * TODO.html: words 2003-04-05 Dave Beckett * raptor.h: void arg * examples/raptor_abort.c: Zap curl cleanup. * rdfdump.c: Added -c flag to getopts - oops, missed in last release. Added -m/--mode flag to set strict/lax. Check the values and die with usage. Check the legal values of -o/--output and die with usage. Zap curl cleanup. * raptor_www.c (raptor_www_no_www_library_init_finish): To control global WWW library init/finish * raptor_parse.c: Make bagID optional - removed from language and gives errors (strict), allowed with warnings (lax). lax/strict controlled by feature_allow_bagID * raptor_internal.h: Added feature_allow_bagID * raptor_general.c: Several more docucomments for functions. (raptor_new_parser): Use raptor_set_parser_strict (raptor_set_feature): Added RAPTOR_FEATURE_ALLOW_BAGID (raptor_set_parser_strict): Added to set strict/lax mode flags. * raptor.h: Added RAPTOR_FEATURE_ALLOW_BAGID Added raptor_set_parser_strict Added raptor_www_no_www_library_init_finish 2003-04-03 Dave Beckett * tests/Makefile.am: Added warn-01 * tests/warn-01.out, tests/warn-01.rdf: Check warning on non-prefixed property elements 2003-04-03 Dave Beckett * raptor_parse.c, tests/Makefile.am (raptor_xml_start_element_handler): Error recovery - try to hide that a bad element was found from a parent element, it thinks the element is empty. See tests/warn-00.rdf * tests/warn-00.out, tests/warn-00.rdf: Check warnings 2003-04-02 Dave Beckett * configure.ac, Makefile.am: debian dir elsewhere 2003-04-01 Dave Beckett * TODO.html: docs updated * TODO.html: www tidy by default on raptor_finish * raptor_uri.c (raptor_uri_uri_string_to_filename): Use raptor_strcasecmp (raptor_uri_is_file_uri): Use raptor_strncasecmp 2003-03-31 Dave Beckett * README.html: added libraptor.html * Makefile.am: Added libraptor.html, fix-groff-xhtml * libraptor.3: deleted repeated URI METHODS * libraptor.3: Updated for 0.9.6->present 2003-03-30 Dave Beckett * examples/grapper.c: Use N-triples output style. Pass in URL command line argument * TODO.html: words * TODO.html: XML attribute bugs * Makefile.am: Added raptor_xml.c * raptor_parse.c (raptor_xml_start_element_handler): do XML attribute value normalization for libxml2. Cannot be done properly since the type of the attribute is lost. expat gets it right. (raptor_xml_parse_init): Cast for expat XML_SetExternalEntityRefHandler * raptor_xml.c: Updated for C14N text/attribute node encoding rules. Don't de-UTF8 at the same time. * tests/ex-49.out: > in attribute appears raw * raptor_general.c: (main) Moved raptor_validate_xml_ID, raptor_xml_escape_string test code to raptor_xml.c * raptor_xml.c: Raptor XML routines * raptor_general.c: Moved raptor_validate_xml_ID, raptor_xml_escape_string to raptor_xml.c * tests/Makefile.am: Added ex-49 * tests/ex-49.out, tests/ex-49.rdf: Checking escaping in parseType Literal values with XML attributes * raptor_parse.c (raptor_format_element): Pass in parser for UTF-8 error handling. Use raptor_xml_escape_string for attribute values but only malloc/free if lengths changed. (raptor_xml_end_element_handler): Update to new raptor_xml_escape_string API and only malloc/free it if lengths changed. * raptor_parse.c (raptor_xml_cdata_handler): Use updated raptor_xml_escape_string API * raptor.h: Added raptor_statement_part_as_counted_string, raptor_statement_part_as_string Changed raptor_xml_escape_string API * raptor_general.c (raptor_statement_part_as_counted_string, raptor_statement_part_as_string): Added, making N-triples style output from parts of raptor_statement. (raptor_xml_escape_string): Change API to take an existing buffer/calculate length (main): Update for raptor_xml_escape_string. * examples/Makefile.am: Also clean grapper binary 2003-03-29 Dave Beckett * examples/grapper.c: Added N-Triples parsing * examples/Makefile.am: Don't build grapper usually * examples/grapper.c: Raptor GTK GUI example code * examples/Makefile.am: Added grapper.c * examples/Makefile.am: more deps * raptor_internal.h: Added raptor_print_statement_part_as_ntriples prototype * raptor_general.c: raptor_print_ntriples_string moved to raptor_general.c (raptor_print_statement_part_as_ntriples): Added, internal. (raptor_print_statement_as_ntriples): Now uses above. * ntriples_parse.c: raptor_print_ntriples_string moved to raptor_general.c 2003-03-28 Dave Beckett * examples/Makefile.am: another deps attempt * examples/Makefile.am: typo * examples/Makefile.am: Use LDADD and hunt for @REDLAND_LIBS@ Added $(top_builddir)/../librdf/librdf.la * configure.ac: Hunt for librdf.la in abs dir * rapper.1: added -c/--count * examples/Makefile.am: Fixes to make cross-dir building work. * TODO.html: docs * configure.ac, Makefile.am: Added examples dir * raptor_general.c (raptor_parse_uri_with_connection): Added. (raptor_parse_abort): Added. * raptor.h: Added raptor_parse_uri_with_connection. Added raptor_parse_abort. * examples/raptor_abort.c, examples/Makefile.am: examples * rdfdump.c: Call curl_global_cleanup if using curl to free it's resources. * raptor_www.c (raptor_www_init,raptor_www_finish): Don't init/cleanup curl, we can't guarantee doing this at most once if a handle is passed in. * raptor_www_curl.c (raptor_www_curl_free): Tidy * raptor_www_curl.c (raptor_www_curl_init,raptor_www_curl_free): Use/mark field curl_init_here to note when to cleanup a handle - don't destroy one that was provided. * raptor_internal.h: for curl, record when curl_easy_init was done in raptor * raptor_general.c (raptor_init): Call raptor_www_init (raptor_finsh): Call raptor_www_finish (raptor_parse_uri): Delete www object on failure. * configure.ac: Bumped version to 0.9.10 * Snapshotted raptor_0_9_9 for 0.9.9 release * NEWS.html, README.html: Updated for 0.9.9 release 2003-03-27 Dave Beckett * TODO.html: fixed crashing when rdf/xml parser has no base URI 2003-03-26 Dave Beckett * raptor_set.c: Only use raptor_set_stats_print with RAPTOR_DEBUG * raptor_general.c: Some comment tidying. (raptor_start_parse): Docucomment. Copy the uri into the parser structure (base_uri, locator uri), don't just keep the pointer. (raptor_free_parser): Free the base URI in the structure, if present. * raptor_parse.c (raptor_xml_parse_start): Remove uri arg. Fail if no base URI is given - stored in the parser object * ntriples_parse.c (raptor_ntriples_parse_start): Remove uri arg. * raptor_internal.h: raptor_parser_factory start method: Remove (base) uri arg, it's in the object data. * raptor_www.c: Use RAPTOR_FREE,MALLOC,CALLOC (raptor_www_free): Free the www object. Doh. * TODO.html: raptor_start_parse crash with NULL base URI for rdfxml parser * libraptor.3: raptor_parse_chunk: Takes unsigned char buffer. * libraptor.3: raptor_start_parse: Note NULL base URI ok for ntriples * libraptor.3: Typo: raptor_start_parse not raptor_parse_start * raptor_general.c (raptor_xml_escape_string): Make it work with 10ffff again * raptor_parse.c (raptor_xml_cdata_handler): Cast around raptor_xml_escape_string * raptor_general.c (raptor_xml_escape_string): Null terminate new string * raptor_www_libxml.c, raptor_www.c: Use RAPTOR_WWW_BUFFER_SIZE for I/O buffers * raptor_internal.h: Define RAPTOR_WWW_BUFFER_SIZE for I/O buffers * rdfdump.c: Declare raptor_stats_print when RAPTOR_DEBUG * raptor_general.c: (raptor_stats_print) C99 2003-03-24 Dave Beckett * rdfdump.c: Call raptor_stats_print with RAPTOR_DEBUG * raptor_set.c: Record set hits/misses with RAPTOR_DEBUG (raptor_set_stats_print): Defined with RAPTOR_DEBUG * raptor_internal.h: Move raptor_xml_parser typedef here (still internal). raptor_xml_parser_stats_print, raptor_set_stats_print: Defined with RAPTOR_DEBUG * raptor_parse.c (raptor_xml_parser_stats_print): Defined with RAPTOR_DEBUG * raptor_general.c (raptor_stats_print): Defined with RAPTOR_DEBUG * TODO.html: Fixed escaping rdf:parseType="Literal" content * raptor_parse.c (raptor_xml_cdata_handler): Use raptor_xml_escape_string when content type is an XML literal * raptor_general.c (raptor_xml_escape_string): Now takes and returns lengths Fix assumption of '\0' terminated strings. (main): Update for counted strings * raptor.h: raptor_xml_escape_string now takes and returns lengths * raptor.h: Added raptor_xml_escape_string * Makefile.am: Added raptor_general_test * raptor_general.c (raptor_xml_escape_string): Added, XML-escapes UTF-8 strings. (main): Added set of tests for raptor_xml_escape_string 2003-03-23 Dave Beckett * tests/ex-48.out, tests/ex-48.rdf: ex-48 parse type literal with entity encoding * tests/Makefile.am: Added ex-48 * raptor_www_libxml.c (raptor_www_libxml_fetch): Make this work again * raptor_parse.c (raptor_record_ID): Dealloc item after adding * raptor_parse.c: typo * raptor_parse.c: Remove raptor_id_list implementation for ID checking to use raptor_set. (raptor_xml_parse_init): Init raptor_set for ids. (raptor_xml_parse_terminate): Use raptor_free_set. (raptor_record_ID): Use raptor_set_add to check for unique "ID base-URI" (raptor_free_ID_list): Gone * raptor_uri.c (raptor_default_uri_as_counted_string, raptor_uri_as_counted_string): Added and used in default factory. * raptor.h: Added raptor_uri_as_counted_string. * raptor_internal.h: Added raptor_set and raptor_new_set constructor, raptor_free_set destructor and raptor_set_add only method * Makefile.am: Added raptor_set.c, raptor_set_test * raptor_set.c: Raptor sets for ID checking 2003-03-19 Dave Beckett * tests/Makefile.am: Added OWL namespace document / rdf schema owl-schema.rdf, owl-schema.out * raptor_www.c: init w3c libwww * tests/owl-schema.out, tests/owl-schema.rdf: OWL namespace schema * TODO.html: Bug: encoding & < and > in XML literals. * raptor_www_libwww.c: add fatal does-not-work error 2003-03-18 Dave Beckett * raptor_www_libwww.c: Raptor WWW with W3C libwww * rdfdump.c: Added -c/--count option to just count triples, don't print anything. * raptor_www_test.c: Use raptor_www_init/finish * raptor_www_libxml.c: Handle www->failed and aborting transfer. * raptor_www_curl.c: Handle www->failed and aborting transfer. (raptor_www_curl_init): Use passed-in connection if available. * raptor_www.c (raptor_www_init): Added, for once-only init. (raptor_www_finish): Added, for once-only tidy. (raptor_www_new): Now uses new constructor (raptor_www_new_with_connection): Added, allows re-use of existing www library connection - just curl at present. (raptor_www_get_connection): Added, returns current libwww library connection. (raptor_www_abort): Added to stop a www transaction. (raptor_www_file_fetch): Tidying of errors; handle abort. (raptor_www_fetch): Uses raptor_www_file_fetch for all files. * raptor_internal.h: Added W3C libwww prototypes. * raptor_parse.c: Throughout all SAX event handlers - if rdf_parser->failed set, return immediately, doing no work. * raptor_general.c (raptor_parse_uri_write_bytes): Use raptor_www_abort if parsing fails. (raptor_parse_uri): Return error status. Pass on is_end empty chunk. (raptor_parser_abort): Added, setting failed flag. (raptor_print_statement_detailed): Typo * raptor.h: Added raptor_www_abort * raptor.h: Add raptor_www_init, raptor_www_finish. Add raptor_www_new_with_connection Add raptor_www_get_connection * configure.ac: Added w3c libwww configuring 2003-03-16 Dave Beckett * rdfdump.c: Use raptor_parse_uri * raptor_general.c (raptor_parse_uri_write_bytes): Added, to support: (raptor_parse_uri): Added, using raptor_www to get and deal with all the data in one go. * raptor.h: raptor_parse_uri takes optional base_uri * raptor_www_test.c: Use URI from context. Take www arg on handlers Use raptor_uri * raptor_www_libxml.c, raptor_www_curl.c: Use URI from context. Take www arg on handlers * raptor_www.c (raptor_www_set_userdata): Gone (raptor_www_free): Free request uri (raptor_www_set_write_bytes_handler, raptor_www_set_content_type_handler): Added (raptor_www_file_fetch): pass www to write_bytes (raptor_www_fetch): Don't pass URI on. * raptor_internal.h: Store raptor_uri of request Use new declared write_bytes, content_type handlers *fetch methods don't take URI string * raptor.h: Declare handlers for raptor www write bytes, content type raptor_www_fetch now takes a raptor_uri * raptor_parse.c: Fix broken-fix for broken-expat UTF8 BOM crash. tokens_count is on the rdf_xml_parser not rdf_parser * configure.ac: tweak * configure.ac: tidy libcurl version * raptor_internal.h, configure.ac: No more gnome-xml/libxml.h * configure.ac: Min libxml2 now 2.4.0 * configure.ac: Don't look for xml-config * raptor_general.c (raptor_parse_file): Tidy up if raptor_start_parse fails * raptor_general.c: Removed raptor_start_parse_file - merged into raptor_parse_file * raptor_www.c (raptor_www_file_fetch): Used for RAPTOR_WWW_NONE Report file open errors, correct file read eof handling. (raptor_www_fetch) Use only raptor_www_file_fetch for RAPTOR_WWW_NONE * raptor_general.c (raptor_start_parse_file): Improve file open error message * configure.ac: Added --with-www=none option and RAPTOR_WWW_NONE to indicate it 2003-03-15 Dave Beckett * raptor_www.c (raptor_www_error): Use RAPTOR_FREE * raptor_www_test.c: Call raptor_uri_init * raptor_www_curl.c (raptor_www_curl_fetch): call raptor_www_error * raptor_internal.h: Use raptor_message_handler again * raptor.h: Use raptor_message_handler again in raptor_www_set_error_handler, raptor_www_error * raptor_www.c (raptor_www_free): Tidy locator URI (raptor_www_set_error_handler, raptor_www_error): Use raptor_message_handler again. (raptor_www_error): Use raptor_locator in output, error handler. (raptor_www_fetch): Store the URI string of request in the locator * raptor.h: Declare raptor_www_message_handler (no locator) * raptor_general.c: raptor_vsnprintf now internally visible. * raptor_internal.h: Use different error handler, no parser context. raptor_vsnprintf now internally visible. Added raptor_www_error prototype * raptor_www.c: Only enable raptor_www_file_fetch with libxml, (raptor_www_set_error_handler): Use different error handler, no parser context. * configure.ac, Makefile.am: Added raptor WWW enabling, configuring * raptor_internal.h: Added raptor WWW retrieval internal includes, structs, prototypes * raptor.h: Added raptor WWW retrieval prototypes * raptor_www.c, raptor_www_curl.c, raptor_www_libxml.c, raptor_www_test.c: Raptor WWW retrieval 2003-03-04 Dave Beckett * raptor.h: Export raptor_free_parser with RAPTOR_API * win32_config.h: add trailing #endif * win32_config.h: s/WIN32_LEAD_AND_MEAN/WIN32_LEAN_AND_MEAN/ * raptor_parse.c (raptor_xml_comment_handler): Added - nop at present. (raptor_xml_parse_init): For expat, use raptor_xml_comment_handler * raptor_libxml.c: (raptor_libxml_init) Use raptor_xml_comment_handler * raptor_internal.h: Add raptor_xml_comment_handler prototype * configure.ac: Try to make maintainer mode flags match redland's defaults. 2003-03-03 Dave Beckett * configure.ac, Makefile.am: Fix cflags/cppflags when in redland 2003-03-02 Dave Beckett * tests/ex-46.out, tests/ex-46.rdf: make rdf:li and rdf_2 property elements generate different triples 2003-02-27 Dave Beckett * tests/ex-46.out: fix * tests/Makefile.am: Added ex-47 * tests/ex-47.out, tests/ex-47.rdf: Exercise all rdfs vocab * tests/Makefile.am: Added ex-46 * tests/ex-46.out, tests/ex-46.rdf: Exercise all rdf vocab 2003-02-24 Dave Beckett * win32/raptor.plg, win32/Makefile.am: deleted raptor.plg * win32/raptor.dsp, win32/README: Updated win32 config - from contributed patches 2003-02-23 Dave Beckett * raptor_uri.c: Correct :'s turning into |'s in win32 file URIs 2003-02-20 Dave Beckett * autogen.sh: run libtoolize in each configure.ac dir * win32_config.h: win32 has C99 compatible vsnprintf called _vsnprintf * configure.ac: Check for vsnprintf and check for C99 compatible return value. * raptor_general.c (raptor_vsnprintf): Added for handling compatibilty with vsnprintf that doesn't match C99. 2003-02-19 Dave Beckett * tests/Makefile.am: Use $(ECHO) which may be different from sh's echo * Makefile.am: Changing, moved raptor_getopt.h to rapper_SOURCES after automake manual recommendation. * Makefile.am: Put raptor_getopt.h in noinst_HEADERS * Makefile.am: No need for EXTRA_libraptor_la_SOURCES * Makefile.am: Use LTLIBOBJS for extra libraptor objs * raptor.h: again * raptor.h: don't do deprecated on broken OSX gcc * raptor_getopt.h, getopt.c: No need for prefix * getopt.c: Duh - use raptor getopt header * Makefile.am: Use RAPPER_EXTRA_OBJS to optionally add getopt to rapper only * configure.ac: Add getopt object to RAPPER_EXTRA_OBJS * rdfdump.c: Add raptor_getopt.h for local version * raptor_getopt.h: Define rest of getopt externs * getopt.c: More prefixes * raptor_getopt.h, getopt.c: Public domain getopt * configure.ac: Check for getopt and add getopt.o if it missing. * autogen.sh: try asking the progs for their version - slower, but right * autogen.sh: tidying * acconfig.h: acconfig.h obsoleted * Makefile.am: Use AM_CPPFLAGS * autogen.sh: Min versions are bumpled - 2.52 for autoconf, 1.6 for automake Now hunts for newest, shinyest autoconf and automake/aclocal and uses them whatever is available. 2003-02-18 Dave Beckett * configure.ac: autoconf 2.5x configure.ac * configure.in: Replaced with autoconf 2.5x configure.ac 2003-02-15 Dave Beckett * raptor.h: Move stuff around, consolidate deprecated bits * ntriples_parse.c, rdfdump.c: No need for ntriples.h * raptor.h: Moved all ntriples.h defines here. Defined RAPTOR_DEPRECATED (with gcc 3.1+) and used on old api calls. * ntriples.h: Moved all definitions to raptor.h - this file is now deprecated. 2003-02-14 Dave Beckett * raptor-config.in: No exec-prefix * raptor-config.1: Manual page for raptor-config * Makefile.am: Added raptor-config.1 * rapper.1: EXAMPLE 2003-02-13 Dave Beckett * tests/Makefile.am: $name=>$$name * configure.in: Bumped version to 0.9.9 * Snapshotted raptor_0_9_8 for 0.9.8 release * raptor.spec.in: release is 1 * NEWS.html: Updated for 0.9.8 release 2003-02-12 Dave Beckett * Makefile.am: Restore LICENSE.txt * Makefile.am: No LICENSE.txt in dist * README.html: Updated for 0.9.8 release. * TODO.html: Note some missing conformance bits. * raptor_uri.c (main): Use lstat, reading a selection of dirs to try harder to test relative file URIs. * configure.in: check for sys/stat.h (for raptor_uri_test main) * TODO.html: Note PNG parser * tests/Makefile.am: There is no portable test == operator * TODO.html: Fixed xmlns:foo="" being erroneously allowed. * raptor_parse.c (raptor_xml_start_element_handler): Updated call to raptor_namespaces_start_namespace to use error_handler, error_data parameters * raptor_general.c (raptor_start_parse): Updated call to raptor_namespaces_init to use error_handler, error_data parameters * raptor_internal.h: Updated raptor_namespaces_init, raptor_namespaces_start_namespace, raptor_namespace_new with error_handler, error_data parameters * raptor_namespace.c: (raptor_namespaces_init, raptor_namespaces_start_namespace, raptor_namespace_new): Add error handler and data parameters and use to explain how xmlns:foo="" isn't allowed 2003-02-11 Dave Beckett * raptor_parse.c: multiple objects of a property element (statement) is an error * tests/Makefile.am: Report warnings when they occur. Print the warning text * tests/bad-11.rdf: now xml * tests/Makefile.am: typo - restult * tests/bad-11.rdf: Check xmlns with no namespace name (URI) fails * tests/Makefile.am: Added bad-11 * TODO.html: diagnosed crash on empty xml namespace name (URI) * TODO.html: Fixed empty docs now give error, not crash. * raptor_libxml.c (raptor_libxml_update_document_locator): Handle empty parser context. * tests/Makefile.am: ex-46 now bad-10 * tests/bad-10.rdf, tests/ex-46.rdf, tests/ex-46.out: Now bad-10 * raptor_parse.c (raptor_xml_parse_chunk_): Make an empty rdf/xml bytestream an illegal doc (like expat) and return an error. * TODO.html: Clarified empty files bug * raptor_libxml.c (raptor_libxml_update_document_locator): Don't use loc if it is NULL such as errors before start of XML document. * raptor_libxml.c: Check for xmlSAXHandler externalSubset field, not present in old libxml v1. Whether raptor works after this is unlikely and untested. * configure.in: Add old libxml V1 warning and suggestion * acconfig.h: Added RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET * configure.in: Check for xmlSAXHandler externalSubset field * INSTALL.html: Added libxml1 warning * TODO.html: note some bugs 2003-02-10 Dave Beckett * raptor_locator.c (raptor_print_locator): Only print non-negative line numbers * raptor_parse.c (raptor_xml_parse_chunk_): For libxml, handle first chunk being empty, when the XML parser context, xc, is attempted to be initialiased * tests/Makefile.am: Added ex-46 (Empty file should give 0 triples) * tests/ex-46.out, tests/ex-46.rdf: Empty file should give 0 triples 2003-01-27 Dave Beckett * Makefile.am: Remove $? and replace with $< or full dependencies 2003-01-21 Dave Beckett * ntriples_parse.c: Fix macro IS_ASCII_DIGIT which refused to allow '0'. 2003-01-13 Dave Beckett * rdfdump.1: rdfdump.1 renamed to rapper.1 * raptor.spec.in, tests/Makefile.am, TODO.html, README.html, NEWS.html, Makefile.am, INSTALL.html: rdfdump now rapper * rapper.1: rdfdump.1 renamed to rapper.1 raptor2-2.0.15/LICENSE.txt0000644000175000017500000000562712272273161011751 00000000000000 Raptor RDF Syntax Library - License This package is Free Software available under any one of the specified licenses below, or any newer version of those licenses. All the licenses below are alternatives and if you select one license, that one alone applies. 1. The GNU Lesser General Public License (LGPL) Version 2.1 or any newer version See http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html or COPYING.LIB for the full LGPL 2.1 license text. __________________________________________________________________ Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol. All Rights Reserved. This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License Version 2.1 as published by the Free Software Foundation or any newer version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License Version 2.1 for more details. You should have received a copy of the GNU Lesser General Public License Version 2.1 along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA __________________________________________________________________ 2. GNU General Public License (GPL) V2 or any newer version Under Term 3 of the LGPL Version 2.1, you may choose to license the entire package under the GPL. If that option is chosen, then this package is licensed under the terms of the GPL Version 2 or alternatively, any newer version of the GPL. See COPYING for the full GPL 2.0 license text. 3. The Apache License V2.0 or any newer version See http://www.apache.org/licenses/LICENSE-2.0 or LICENSE-2.0.txt for the full ASL 2.0 license text. Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol. 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. The NOTICE file contains the notices that must be applied according to section 4(d) of the Apache License, Version 2.0. __________________________________________________________________ Copyright (C) 2000-2014 David Beckett Copyright (C) 2000-2005 University of Bristol raptor2-2.0.15/raptor2.spec.in0000644000175000017500000000701111522560552012765 00000000000000# -*- RPM-SPEC -*- %define name @PACKAGE@ %define version @VERSION@ %define release @RPM_RELEASE@ Summary: Raptor RDF Parser Toolkit for Redland Name: %{name} Version: %{version} Release: %{release} Prefix: %{_prefix} License: LGPLv2+ or ASL 2.0 Group: Development/Libraries Source: http://download.librdf.org/source/%{name}-%{version}.tar.gz URL: http://librdf.org/raptor/ BuildRoot: /tmp/%{name}-%{version} BuildRequires: libxml2 libxml2-devel >= 2.6.8 BuildRequires: curl curl-devel BuildRequires: libxslt libxslt-devel Packager: Dave Beckett Docdir: %{_docdir} %description Raptor is the RDF Parser Toolkit for Redland that provides a set of Resource Description Framework (RDF) parsers and serializers, generating RDF triples from the following syntaxes: RDF/XML, N-Triples, TRiG, Turtle, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing RDF triples to syntaxes are: RDF/XML, RSS 1.0, Atom 1.0, N-Triples, XMP, Turtle, GraphViz DOT and JSON. %package devel Summary: Libraries, includes etc to develop with Raptor RDF parser library Group: Development/Libraries Requires: raptor = %{version} Requires: libxml2-devel %description devel Libraries, includes etc to develop with Raptor RDF parser and serializer library. %prep %setup -q %build %configure --enable-release %{__make} OPTIMIZE="$RPM_OPT_FLAGS" %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_mandir}/man1 install -d $RPM_BUILD_ROOT%{_mandir}/man3 %makeinstall %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc *.html %doc %{_mandir}/man1/rapper.1* %doc %{_mandir}/man3/libraptor2.3* %doc %{_datadir}/gtk-doc/html/raptor2/* %{_libdir}/libraptor*.so.* %{prefix}/bin/rapper %files devel %defattr(-, root, root) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %{_libdir}/libraptor*.so %{_libdir}/pkgconfig/raptor2.pc %{prefix}/include/raptor/* %changelog * Fri Jan 5 2007 Dave Beckett - rename files for raptor 2.0.0 - no more raptor-config - do not package libraptor*.la or libraptor*.a files - includes are in a subdir * Fri Jan 5 2007 Dave Beckett - Document Turtle and DOT serializers * Wed Feb 15 2006 Dave Beckett - Add libxslt and libxslt-devel for GRDDL * Wed Dec 20 2005 Dave Beckett - Update description of parsers and serializers. * Wed Nov 9 2005 Dave Beckett - Add gtk-doc documentation * Wed Aug 11 2005 Dave Beckett - Update Source: - Use %makeinstall * Wed Aug 10 2005 Dave Beckett - Use %configure and %{_make} * Thu Sep 9 2004 Dave Beckett - License now LGPL/Apache 2 - Added LICENSE-2.0.txt and NOTICE * Tue May 11 2004 Dave Beckett - Added RELEASE.html * Thu Apr 17 2003 Dave Beckett - Added pkgconfig raptor.pc, raptor-config - Requires curl * Mon Jan 13 2003 Dave Beckett - rdfdump now rapper * Fri Dec 20 2002 Dave Beckett - Updated to have two RPMs for raptor and raptor-devel. Depend on libxml2 as XML parser. raptor2-2.0.15/UPGRADING.html0000644000175000017500000001277012272273150012327 00000000000000 Raptor RDF Syntax Library - Upgrading to the Raptor V2 API

Raptor RDF Syntax Library - Upgrading to the Raptor V2 API

Raptor V2 is a major new version of the Raptor V1 API with many cleanups and changes that include adding, removing and re-ordering parameters, adding and removing return types as well as renaming the functions.

The headers and libraries install to different places or names so that Raptor V1 and Raptor V2 can both be present (including headers) on the same system without clashing. However, if you do try linking the same binary with both libraries, the symbols will clash and the program will fail in mysterious ways if it runs at all. There are only two installed files that overlap - the rapper utility and it's manual page.

Configuration and compiling changes

Raptor V2 uses pkg-config(1) to provide the compile and link parameters whereas Raptor V1 supports that as well as a script raptor-config. The recommended linking approach is now as follows:

  cc -o prog prog.c  `pkg-config raptor2 --cflags` `pkg-config raptor2 --libs`

Shown here as a compile in link all in one line but you typically split that into two stages.

  cc -c `pkg-config raptor2 --cflags` raptor-module.c
  ...
  cc -o prog raptor-module.c ... other modules ... `pkg-config raptor2 --libs`

Code changes

There are significant API changes, which are described in the Release Notes in long summary form with some background to why, in the ChangeLog in very long form. The reference manual contains a section describing what was added, deleted, renamed and otherwise changed for both the functions exported from the library, as well as the typedefs and enum values.

There is no fully automatic way to handle updating the code however there is a perl script provided in the docs directory that renames what it can, and otherwise inserts a WARNING comment near code that needs manual updating. This cannot be automated in some places such as when the fields of the raptor_statement object were replaced with raptor_term pointers. The script is used like perl docs/upgrade-script.pl source files for example

  $ perl docs/upgrade-script.pl prog.c

and then edit the file prog.c and search for WARNING: for any places that manual editing is needed.

Handling Raptor V1 or Raptor V2 in the same code

If you need to handle both APIs in the same codebase as alternatives, it is recommended that you use the following approach.

Create an application #define that records the choice of which API you want to use. You can do this triggered on whichever raptor.h is in the include path by #ifdef RAPTOR_V2_AVAILABLE but that may be dangerous if both libraries and headers are present. A better choice is an application specific define that is determined by a configuration step.

Once the choice is made, it is recommended you convert the code to the Raptor V2 API and then add backwards-compatible macros for the changed functions:

#ifdef APP_WANTS_RAPTOR_V2
/* nop */

#else
#define raptor_v2_function(arg1, arg2, arg3) raptor_v1_function(arg2, arg3)

#endif

Where the code cannot be done by simple expansion such as use of raptor_init() and raptor_finish() in V1 that are replaced by the functions around the world object in V2, use an #ifdef that provides the two code paths.

rasqal in GIT (will be 0.9.20) uses this approach.

Another approach if the Raptor V1 code is in a separate module / source file is to copy it and make a V2 version and then choose the file to use at configure or build time.

librdf 1.0.11 uses this approach.

Either way, basing the interface on the V2 APIs makes it clear what to remove when V1 is no longer supported.

Packaging recommendations for distributors

Since Raptor V2 probably needs to be installed in parallel with V1 for some time, at least for the different libraries and headers, both need to be packaged such that no files clash.

There are, however, two files that are shared after a 'make install': rapper(1) and rapper.1 the manual page.

For packaging systems that split the installation into multiple packages (libraries, headers, docs, debug files), these two files should be in a package of their own that replace and conflict with the earlier files. (This is what I have done with the Debian packages raptor-utils and raptor2-utils). For packaging systems that do not use multiple packages, you will have to either leave these files out of the V2 package or migrate them from the V1 package to the V2 package using dependencies to ensure there are no conflicts.

The advantage of making the V2 version of rapper is that it means the command-line utility under the well known name uses the latest Raptor code.


Copyright 2010-2014 Dave Beckett

raptor2-2.0.15/CMakeLists.txt0000644000175000017500000002332012331732375012657 00000000000000# raptor/CMakeLists.txt # # This file allows building Raptor2 with the CMake configuration tool. # Download CMake in source or binary form from http://www.cmake.org/ # # Original listfile by Daniel Richard G. # This file is in the public domain. # SET(RAPTOR_VERSION_MAJOR 2) SET(RAPTOR_VERSION_MINOR 0) SET(RAPTOR_VERSION_RELEASE 15) SET(RAPTOR_MIN_VERSION_DECIMAL 20015) SET(VERSION "${RAPTOR_VERSION_MAJOR}.${RAPTOR_VERSION_MINOR}.${RAPTOR_VERSION_RELEASE}") MATH(EXPR RAPTOR_VERSION_DECIMAL "${RAPTOR_VERSION_MAJOR} * 10000 + ${RAPTOR_VERSION_MINOR} * 100 + ${RAPTOR_VERSION_RELEASE}") PROJECT(Raptor2 C) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) SET(CMAKE_INCLUDE_CURRENT_DIR 1) ################################################################ # Third-party libraries FIND_PACKAGE(CURL) FIND_PACKAGE(LibXml2) FIND_PACKAGE(LibXslt) #FIND_PACKAGE(YAJL) INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR} ) ################################################################ # Configuration checks INCLUDE(CheckIncludeFile) INCLUDE(CheckIncludeFiles) INCLUDE(CheckFunctionExists) INCLUDE(CheckTypeSize) INCLUDE(CheckStructHasMember) INCLUDE(CheckCSourceCompiles) CHECK_INCLUDE_FILE(errno.h HAVE_ERRNO_H) CHECK_INCLUDE_FILE(fcntl.h HAVE_FCNTL_H) CHECK_INCLUDE_FILE(getopt.h HAVE_GETOPT_H) CHECK_INCLUDE_FILE(limits.h HAVE_LIMITS_H) CHECK_INCLUDE_FILE(math.h HAVE_MATH_H) CHECK_INCLUDE_FILE(setjmp.h HAVE_SETJMP_H) CHECK_INCLUDE_FILE(stddef.h HAVE_STDDEF_H) CHECK_INCLUDE_FILE(stdlib.h HAVE_STDLIB_H) CHECK_INCLUDE_FILE(string.h HAVE_STRING_H) CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) CHECK_INCLUDE_FILE(sys/param.h HAVE_SYS_PARAM_H) CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILE(sys/time.h HAVE_SYS_TIME_H) CHECK_INCLUDE_FILES("sys/time.h;time.h" TIME_WITH_SYS_TIME) CHECK_FUNCTION_EXISTS(access HAVE_ACCESS) CHECK_FUNCTION_EXISTS(_access HAVE__ACCESS) CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT) CHECK_FUNCTION_EXISTS(getopt_long HAVE_GETOPT_LONG) CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) CHECK_FUNCTION_EXISTS(isascii HAVE_ISASCII) CHECK_FUNCTION_EXISTS(setjmp HAVE_SETJMP) CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF) CHECK_FUNCTION_EXISTS(_snprintf HAVE__SNPRINTF) CHECK_FUNCTION_EXISTS(stat HAVE_STAT) CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP) CHECK_FUNCTION_EXISTS(stricmp HAVE_STRICMP) CHECK_FUNCTION_EXISTS(_stricmp HAVE__STRICMP) CHECK_FUNCTION_EXISTS(strtok_r HAVE_STRTOK_R) CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF) CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF) CHECK_FUNCTION_EXISTS(_vsnprintf HAVE__VSNPRINTF) CHECK_TYPE_SIZE("unsigned char" SIZEOF_UNSIGNED_CHAR) CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT) CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT) CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG) CHECK_TYPE_SIZE("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG) IF(LIBXML2_FOUND) SET(CMAKE_REQUIRED_INCLUDES ${LIBXML2_INCLUDE_DIR}) SET(CMAKE_REQUIRED_LIBRARIES ${LIBXML2_LIBRARIES}) CHECK_FUNCTION_EXISTS(xmlCtxtUseOptions HAVE_XMLCTXTUSEOPTIONS) CHECK_FUNCTION_EXISTS(xmlSAX2InternalSubset HAVE_XMLSAX2INTERNALSUBSET) CHECK_STRUCT_HAS_MEMBER( xmlEntity name_length libxml/parser.h RAPTOR_LIBXML_ENTITY_NAME_LENGTH ) CHECK_STRUCT_HAS_MEMBER( xmlEntity etype libxml/parser.h RAPTOR_LIBXML_ENTITY_ETYPE ) CHECK_STRUCT_HAS_MEMBER( xmlSAXHandler initialized libxml/parser.h RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED ) CHECK_STRUCT_HAS_MEMBER( xmlSAXHandler externalSubset libxml/parser.h RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET ) CHECK_C_SOURCE_COMPILES(" #include int main(void){ xmlParserOption foo; foo = XML_PARSE_NONET; return 0; }" RAPTOR_LIBXML_XML_PARSE_NONET ) CHECK_C_SOURCE_COMPILES(" #include int main(void){ htmlParserOption foo; foo = HTML_PARSE_NONET; return 0; }" RAPTOR_LIBXML_HTML_PARSE_NONET ) SET(CMAKE_REQUIRED_INCLUDES) SET(CMAKE_REQUIRED_LIBRARIES) ENDIF(LIBXML2_FOUND) ################################################################ # User-configurable options # # (Note: The CMake GUI displays these in alphabetical order, regardless of # the order we use here) SET(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries instead of static ones.") IF(BUILD_SHARED_LIBS) SET(RAPTOR_STATIC FALSE) ELSE(BUILD_SHARED_LIBS) SET(RAPTOR_STATIC TRUE) ENDIF(BUILD_SHARED_LIBS) SET(RAPTOR_XML_INIT none) IF(LIBXML2_FOUND) SET(RAPTOR_XML_INIT libxml) ENDIF(LIBXML2_FOUND) SET(RAPTOR_XML ${RAPTOR_XML_INIT} CACHE STRING "Which XML library to use (any of \"libxml\", \"none\").") SET(RAPTOR_XML_DEFINE RAPTOR_XML_NONE) IF(RAPTOR_XML STREQUAL "libxml") SET(RAPTOR_XML_DEFINE RAPTOR_XML_LIBXML) ENDIF(RAPTOR_XML STREQUAL "libxml") SET(RAPTOR_WWW_INIT none) IF(LIBXML2_FOUND) SET(RAPTOR_WWW_INIT xml) ENDIF(LIBXML2_FOUND) IF(CURL_FOUND) SET(RAPTOR_WWW_INIT curl) ENDIF(CURL_FOUND) SET(RAPTOR_WWW ${RAPTOR_WWW_INIT} CACHE STRING "Which WWW library to use (any of \"curl\", \"xml\", \"none\").") SET(RAPTOR_WWW_DEFINE RAPTOR_WWW_NONE) IF(RAPTOR_WWW STREQUAL "curl") SET(RAPTOR_WWW_DEFINE RAPTOR_WWW_LIBCURL) ELSEIF(RAPTOR_WWW STREQUAL "xml") SET(RAPTOR_WWW_DEFINE RAPTOR_WWW_LIBXML) ENDIF(RAPTOR_WWW STREQUAL "curl") SET(RAPTOR_XML_1_1 FALSE CACHE BOOL "Use XML version 1.1 name checking.") SET(HAVE_RAPTOR_PARSE_DATE 1) SET(RAPTOR_PARSEDATE 1) SET(RAPTOR_PARSER_RDFXML_INIT FALSE) IF(LIBXML2_FOUND) SET(RAPTOR_PARSER_RDFXML_INIT TRUE) ENDIF(LIBXML2_FOUND) SET(RAPTOR_PARSER_GRDDL_INIT FALSE) IF(LIBXML2_FOUND AND LIBXSLT_FOUND) SET(RAPTOR_PARSER_GRDDL_INIT TRUE) ENDIF(LIBXML2_FOUND AND LIBXSLT_FOUND) SET(RAPTOR_PARSER_RDFXML ${RAPTOR_PARSER_RDFXML_INIT} CACHE BOOL "Build RDF/XML parser.") SET(RAPTOR_PARSER_NTRIPLES TRUE CACHE BOOL "Build N-Triples parser.") SET(RAPTOR_PARSER_TURTLE TRUE CACHE BOOL "Build Turtle parser.") SET(RAPTOR_PARSER_TRIG TRUE CACHE BOOL "Build TRiG parser.") SET(RAPTOR_PARSER_RSS ${LIBXML2_FOUND} CACHE BOOL "Build RSS Tag Soup parser.") SET(RAPTOR_PARSER_GRDDL ${RAPTOR_PARSER_GRDDL_INIT} CACHE BOOL "Build GRDDL parser.") SET(RAPTOR_PARSER_GUESS TRUE CACHE BOOL "Build guess parser.") SET(RAPTOR_PARSER_RDFA ${LIBXML2_FOUND} CACHE BOOL "Build RDFA parser.") SET(RAPTOR_PARSER_JSON ${YAJL_FOUND} CACHE BOOL "Build JSON parser.") SET(RAPTOR_PARSER_NQUADS TRUE CACHE BOOL "Build N-Quads parser.") SET(RAPTOR_SERIALIZER_RDFXML TRUE CACHE BOOL "Build RDF/XML serializer.") SET(RAPTOR_SERIALIZER_NTRIPLES TRUE CACHE BOOL "Build N-Triples serializer.") SET(RAPTOR_SERIALIZER_RDFXML_ABBREV TRUE CACHE BOOL "Build RDF/XML-abbreviated serializer.") SET(RAPTOR_SERIALIZER_TURTLE TRUE CACHE BOOL "Build Turtle serializer.") SET(RAPTOR_SERIALIZER_RSS_1_0 TRUE CACHE BOOL "Build RSS 1.0 serializer.") SET(RAPTOR_SERIALIZER_ATOM TRUE CACHE BOOL "Build Atom 1.0 serializer.") SET(RAPTOR_SERIALIZER_DOT TRUE CACHE BOOL "Build GraphViz DOT serializer.") SET(RAPTOR_SERIALIZER_HTML TRUE CACHE BOOL "Build HTML Table serializer.") SET(RAPTOR_SERIALIZER_JSON TRUE CACHE BOOL "Build JSON serializer.") SET(RAPTOR_SERIALIZER_NQUADS TRUE CACHE BOOL "Build N-Quads serializer.") ################################################################ CONFIGURE_FILE( src/raptor_config_cmake.h.in src/raptor_config.h @ONLY ) ADD_DEFINITIONS(-DHAVE_CONFIG_H) CONFIGURE_FILE( src/raptor2.h.in src/raptor2.h @ONLY ) # On Windows, the test/utility programs usually have DLL dependencies that # make them cumbersome to invoke within IDE environments, so we enable the # test suite only when makefiles are being used. # # Note that a partial solution is described at # # http://www.cmake.org/pipermail/cmake/2009-May/029464.html # # but we don't have a good way of knowing where the third-party DLLs are. # IF(CMAKE_GENERATOR MATCHES "Makefiles") ENABLE_TESTING() ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") SUBDIRS(src) SUBDIRS(utils) ################################################################ FIND_PROGRAM(JING jing) IF(NOT JING STREQUAL "JING-NOTFOUND") SET(HAVE_JING TRUE) ENDIF(NOT JING STREQUAL "JING-NOTFOUND") SET(RAPPER ${CMAKE_BINARY_DIR}/utils/rapper) SET(RDFDIFF ${CMAKE_BINARY_DIR}/utils/rdfdiff) MACRO(RAPPER_TEST NAME_PREFIX COMMAND OUTPUT REFERENCE) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test-${NAME_PREFIX}.cmake " EXECUTE_PROCESS( COMMAND ${COMMAND} TIMEOUT 10 OUTPUT_FILE ${OUTPUT}.raw ERROR_QUIET ) # http://public.kitware.com/Bug/view.php?id=13007 CONFIGURE_FILE( ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT}.raw ${OUTPUT} @ONLY NEWLINE_STYLE UNIX ) ") ADD_TEST("${NAME_PREFIX}:run" ${CMAKE_COMMAND} -P test-${NAME_PREFIX}.cmake) ADD_TEST("${NAME_PREFIX}:cmp" ${CMAKE_COMMAND} -E compare_files ${REFERENCE} ${OUTPUT}) ENDMACRO(RAPPER_TEST NAME_PREFIX COMMAND OUTPUT REFERENCE) MACRO(RAPPER_RDFDIFF_TEST NAME RAPPER_COMMAND RAPPER_OUTPUT RDFDIFF_COMMAND) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test-${NAME}.cmake " SET(rdfdiff_status -1) EXECUTE_PROCESS( COMMAND ${RAPPER_COMMAND} TIMEOUT 10 OUTPUT_FILE ${RAPPER_OUTPUT} ERROR_QUIET RESULT_VARIABLE rapper_status ) IF(rapper_status EQUAL 0 OR rapper_status EQUAL 2) EXECUTE_PROCESS( COMMAND ${RDFDIFF_COMMAND} TIMEOUT 10 OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE rdfdiff_status ) ENDIF(rapper_status EQUAL 0 OR rapper_status EQUAL 2) IF(NOT rdfdiff_status EQUAL 0) MESSAGE(FATAL_ERROR "Test failed.") ENDIF(NOT rdfdiff_status EQUAL 0) ") ADD_TEST(${NAME} ${CMAKE_COMMAND} -P test-${NAME}.cmake) ENDMACRO(RAPPER_RDFDIFF_TEST NAME RAPPER_COMMAND RAPPER_OUTPUT RDFDIFF_COMMAND) SUBDIRS(tests/feeds) SUBDIRS(tests/grddl) SUBDIRS(tests/json) SUBDIRS(tests/ntriples) SUBDIRS(tests/rdfa) SUBDIRS(tests/rdfa11) SUBDIRS(tests/rdfxml) SUBDIRS(tests/trig) #SUBDIRS(tests/turtle) # TODO # end raptor/CMakeLists.txt raptor2-2.0.15/ChangeLog.20000644000175000017500000004027410172250675012037 000000000000002001-12-10 Dave Beckett * Makefile.am: Added dc.rdf to dist * dc.rdf: RDF/XML example file * tests/ex-20.rdf: use rdf:ID 2001-10-10 Dave Beckett * configure.in: Check for xmlParseFile in xml or xml2 2001-10-08 Dave Beckett * tests/Makefile.am: Allow tests with empty correct results file * rdfdump.c: Check that only file: URIs are used 2001-09-21 Dave Beckett * tests/ex-19.rdf: Check omitted rdf:RDF works * tests/ex-20.rdf: Check rdf:ID generates right URI * tests/Makefile.am: Added ex-19, ex-20 Generate N-Triples output with fixed base URI * configure.in: Updated for use of libtool Remove XML_OBJS, use LIBS for xml parser dependencies * Makefile.am: Create dynamic, static library using libtool Reorganised rdfdump compile. * raptor_parse.c (raptor_make_uri_from_id): Take base_uri and use it to create absolute URI from id. Update uses of above function to match changed interface. 2001-09-20 Dave Beckett * rdfdump.c: If quiet, don't even report number of statements * rdfdump.c: Fix help 2001-09-13 Dave Beckett * ntriples_parse.c (raptor_ntriples_string): A little optimising of switch cases * tests/test.nt: Added \u and \U test cases * ntriples_parse.c: Added \U and \U escapes * ntriples_parse.c (raptor_ntriples_unicode_char_to_utf8): (raptor_ntriples_string): Tidy up, in preparation for adding new escapes. * ntriples_parse.c (raptor_ntriples_unicode_char_to_utf8): Added, based on librdf_unicode_char_to_utf8 (raptor_ntriples_string): Added, for handling \ escapes for both "strings" and * tests/Makefile.am: Automate test checks, diffs. Not doing proper model checks yet. * tests/Makefile.am: Add raw output files to dist * configure.in: Moved tests into tests directory * tests/Makefile.am: automakefile for tests * Makefile.am: Moved tests into tests directory 2001-09-10 Dave Beckett * raptor.h: Added comments for raptor_identifier_type 2001-08-21 Dave Beckett * configure.in: Handle libxml v1 (xml-config) and v2 (xml2-config) Report libxml version found in configuring and status * configure.in: Bumped version to 0.9.4 * Snapshotted raptor_0_9_3 for 0.9.3 release * configure.in: When choosing xml parsers, end when one found. * INSTALL.html: Updated for xml parser choosing changes Added N-Triples test * configure.in: Choose an xml parser from any available, --with-xml-parser selects one specifically. * Makefile.am: Use -n for invoking ntriples output; --ntriples only works when GNU getopt_long is around. * rdfdump.c: Add ntriples to short getopt string * configure.in: Update CPPFLAGS from xml-config when it exists and testing for headers. * NEWS.html: Updated for 0.9.3 release 2001-08-17 Dave Beckett * raptor_parse.c (raptor_xml_set_document_locator): Capture SAX document locator (raptor_xml_update_document_locator): Update raptor locator with that info. Update gnome xml/libxml error and warning functions to use the above. 2001-08-15 Dave Beckett * raptor_parse.c (raptor_generate_statement): Handle generating reified statements with IDs as well as URIs etc. * Makefile.am: Added tests/ex-18.rdf * tests/ex-18.rdf: test rdf:Description as document element * raptor_parse.c (raptor_xml_start_element_handler): Process rdf: attributes on document element. (raptor_start_element_grammar): Handle at top level when not present. * raptor_parse.c: Fix it again * raptor_parse.c: Fix things triggered by previous typo fix! * raptor_parse.c: Typo * configure.in: Bumped version to 0.9.3 * TODO.html: Record more fixes * Makefile.am: Started adding test answer files with tests/ex-13.nt * tests/ex-13.nt: N-Triples output for tests/ex-13.rdf * raptor.h: RAPTOR_IDENTIFIER_TYPE_NONE => RAPTOR_IDENTIFIER_TYPE_UNKNOWN different from RAPTOR_URI_SOURCE_NOT_URI to catch uninitialisation * raptor_parse.c: RAPTOR_IDENTIFIER_TYPE_NONE => RAPTOR_IDENTIFIER_TYPE_UNKNOWN (raptor_print_statement_detailed): Added some debug-only tests (raptor_copy_identifier): Oops, copy all fields in identifier. Remove some void* casts no longer needed. When copying DAML collection URI to parent, set type, uri_source too * ntriples_parse.c: Fix for debug output - calculate length of generated terms correctly. * raptor.h: added raptor_identifier for holding (URI, ID, types etc.) raptor_identifier_type enum now union of raptor_subject,predicate,object_type removed feature RAPTOR_FEATURE_INTERPRET_CONTAINERS_AS_TYPEDNODE Added prototypes for raptor_identifier functions * rdfdump.c, ntriples_parse.c: Updates for change with introduction of raptor_identifier * tests/ex-13.rdf: Note results are in tests/ex-13.nt * raptor_parse.c: Major update with pervasive changes Added skipping state to just ignore XML content (not used yet) Removed seq, bag, alt, container parser FSM states. Added rdf:type, rdf:value support when used as attributes. Replaced loads of (URI, ID, literal, type) with raptor_identifier - still more to do Removed feature interpret_containers_as_typedNode - now default. Removed support for 'bare' XML elements - now illegal. Minor bug fixes found from above changes. (raptor_new_identifier): Added (raptor_init_identifier): Added (raptor_copy_identifier): Added (raptor_free_identifier): Added (raptor_process_property_attributes): Lots of updates to handle rdf:type, rdf:value and rdf:_n. * Makefile.am: Added tests/ex-17.rdf * tests/ex-17.rdf: test empty propertyElt off a node * tests/ex-01.rdf: Added the two empty element XML forms * Makefile.am: Added tests/ex-16.rdf * tests/ex-16.rdf: test rdf:value as an attribute * Makefile.am: Added tests/ex-15.rdf * tests/ex-15.rdf: test rdf:type as an attribute * tests/ex-07.rdf: Strictly, Literal not literal 2001-07-26 Dave Beckett * raptor_parse.c: Don't peek at current_element before it is constructed. For elements inside parsetype literal, pass on state to potential child elements. 2001-07-24 Dave Beckett * README.html: Move quality warning from alpha->beta 2001-07-23 Dave Beckett * raptor_parse.c: Updates to get daml:collection stuff working inside Redland 2001-07-22 Dave Beckett * rdfdump.c: Added --output=simple | ntriples to use raptor_print_statement_as_ntriples * raptor.h: Added raptor_print_statement_as_ntriples * raptor_parse.c (raptor_print_statement_as_ntriples): Added. (raptor_make_uri_from_id): No longer uses base_uri. Probably need to do this differently later. Throughout - always store uri_source in parent when copying uris up. Fix some mistakes in uri_source tracking. * ntriples_parse.c: Make _:name not include _: in name * ntriples_parse.c (raptor_ntriples_generate_statement): Handle _:name object stored as strings, not URIs. * raptor_parse.c (raptor_print_statement_detailed): Handle _:name subject, object stored as strings, not URIs. * ntriples_parse.c (raptor_ntriples_generate_statement): Handle _:name subject stored as strings, not URIs. * tests/test.nt: Added tests for all end of lines: CR and CR LF (other lines are all LF) Changed all subject resource names so easier to see missing results. * ntriples_parse.c: Added CR | LF | CR LF handling. Handle space before/after trailing . Various bits of tidying 2001-07-21 Dave Beckett * Makefile.am: Added tests/ex-14.rdf * tests/ex-14.rdf: Test that was crashing * raptor_parse.c: Store propertyElt/rdf:li resource/ID in object, not subject. * configure.in, Makefile.am: Added win32 dir to dist * win32/raptor.dsw, win32/raptor.plg, win32/raptortest.cpp, win32/raptortest.dsp, win32/Makefile.am, win32/raptor.dsp: win32 files * TODO.html: Updated from recent fixes, improvements. * Makefile.am: Added RDF/XML test 11-13 * tests/ex-11.rdf, tests/ex-12.rdf, tests/ex-13.rdf: tests for parseType literal, resource * raptor.h: Updated after patch from Aaron Michal to provide Win32 and daml:collection support * raptor_parse.c: Added patch from Aaron Michal including 1) Win32 support 2) daml:collection support 3) fixes to parseType literal and the raptor_format_element function 4) Fixed passing on varargs in error, warning handlse. 5) Various s/int i/unsigned int i/ I also: Added memory cleanup for daml:collection URIs Fixed some fencepost errors in parseType literal string management * raptor_parse.c: Update comment to match new rdf:value * raptor_parse.c: Added rdf:value property to list of rdf_attr_names 2001-07-21 Dave Beckett * raptor_parse.c: Update comment to match new rdf:value * raptor_parse.c: Added rdf:value property to list of rdf_attr_names 2001-07-16 Dave Beckett * README.html: Updated for ntriples parser. * raptor.h: Make URI function prototypes public * ntriples_parse.c: Handle anonymous nodes passed back properly. 2001-07-13 Dave Beckett * ntriples_parse.c: Tidied some comments * Makefile.am: Added ntriples parser files, test file * rdfdump.c: Added ntriples support, --ntriples arg to invoke it. * raptor_parse.c: Moved raptor_uri stuff to raptor.h Made some uri functions public for ntriples * raptor.h: Define, use raptor_uri typedef here. Add prototypes for raptor_uri functions * ntriples.h, ntriples_parse.c: N-Triples parser * tests/test.nt: N-Triples test cases 2001-07-02 Dave Beckett * NEWS.html: HTML tweak * raptor_parse.c, raptor.spec.in, raptor.h: Now called raptor * Snapshotted raptor_0_9_2 for 0.9.2 release * NEWS.html: Updated for 0.9.2 release * raptor_parse.c, raptor.spec.in, raptor.h, rdfdump.c, configure.in, autogen.sh, acconfig.h, TODO.html, README.html, NEWS.html, Makefile.am, LICENSE.html, INSTALL.html: Now called raptor 2001-06-06 Dave Beckett * README.html: Point to TODO.html, NEWS.html, ChangeLog earlier on. * configure.in: Bumped version to 0.9.2 * NEWS.html: Updated for 0.9.1 release * Snapshotted rapier_0_9_1 for 0.9.1 release 2001-06-04 Dave Beckett * rapier_parse.c: Generate properties connecting parent nodes to contained resources for all parent node types * Makefile.am: Fix test typo2 * Makefile.am: Fix test typo * Makefile.am: Renamed test files * tests/ex-05.rdf, tests/ex-06.rdf, tests/ex-07.rdf, tests/ex-08.rdf, tests/ex-09.rdf, ex-10.rdf, tests/ex-00.rdf, tests/ex-01.rdf, tests/ex-02.rdf, tests/ex-03.rdf, tests/ex-04.rdf: Test RDf/XML files * rapier_parse.c: Fixed some missing frees for IDs, bagIDs Containers now return resource to parent properties. * configure.in: Fix XML_SetNamespaceDeclHandler detection when using expat sources * configure.in: One more return(0); added to AC_TRY_RUN * configure.in: Updated configure for better expat, libxml detection * TODO.html: More todo. * Makefile.am: Run ./rdfdump * rdfdump.c: Count the statements * rapier.h: Added rapier_uri_source * rapier_parse.c: Changed qname to local_name throughout. (rapier_process_property_attributes): Pass in the element with the attributes and the element that contains the resource Added FIXMEs about ID attribute on empty propertyElt. 2001-03-29 Dave Beckett * rapier_parse.c: Replaced internal fields with more evocative names (subject_uri, predicate_uri, object_uri) Added rapier_uri_source for every URI so can follow URI provenance. Pass the URI provenance to the generation of statements Lots of bug squashing for tests ms_4.1_1.rdf (too many statements) and ms_7.4_2.rdf (too few, parseType resource) 2001-03-22 Dave Beckett * rapier_parse.c: Added a cast for c++ 2001-02-22 Dave Beckett * rapier_parse.c: More parseType literal buffer length overruns fixed. 2001-02-21 Dave Beckett * rapier.h: Added librdf_world support when inside Redland * rapier_parse.c: Added librdf_world support when inside Redland (rapier_format_element): Count length of literal XML better - correctly? 2001-02-18 Dave Beckett * rapier_parse.c (rapier_parse_file): Catch more conditional filename deallocs * rapier_parse.c: Split RAPIER_URI_AS_FILENAME into _TO_FILENAME versions, dealloc resulting string when using _TO_ version. 2001-02-09 Dave Beckett * README.html: Moved bugs to separate page. * TODO.html: Rapier todo/bugs 2001-02-04 Dave Beckett * LICENSE.html: Specify particular versions of licenses. * Many files: Change license boilerplate 2001-01-25 Dave Beckett * rapier.h: Prototype changes to use Redland URI objects (when available) for public functions and locators. * rapier_parse.c: Changes to use Redland URI objects (when available) for public functions and locators. * rapier.h: Updated for new prototypes. * rapier_parse.c (rapier_new): No args (rapier_parse_file): Take rapier_uri pointers. * rdfdump.c: Fixed base URI handling, updated to new rapier_new api Added -r, --replace-newlines for replacing newlines with spaces in literals Added -q, --quiet for less messages. * rapier_parse.c: Add child_uri field to pass down to child nodes and use it when rdf:resource used on propertyElts (not rdf:li) inc rdf_attr_count for non RDF M&S attribtues When ID seen on propertyElt, refify. But what to do with bagID then? Fill in many missing bag_uri references when generating statements 2001-01-24 Dave Beckett * configure.in: Define RAPIER_INTERNAL here * rapier_parse.c: Fixes for integration with Redland 2001-01-23 Dave Beckett * rdfdump.c, configure.in, acconfig.h: Added test for needing optind declaration (portability) * rapier_parse.c: s/namespace/nspace/ to make compilable with c++ Added qname_length and value_length to rapier_ns_name and use them to reduce number of strlen()s. Added some more casts for c++, especially near LIBRDF_MALLOC * configure.in: Bumped version to 0.9.1 2001-01-22 Dave Beckett * Snapshotted rapier_0_9_0 for 0.9.0 release * configure.in: Try to detect and use old and new installed expat libs * configure.in: Try a better way to get correct expat headers * rdfdump.c: Use HAVE_GETOPT_H * configure.in: Test for getopt.h (for rdfdump) Test for expat.h, xmlparse.h - expat options. * rapier_parse.c: Use HAVE_EXPAT_H and HAVE_XMLPARSE_H * configure.in: Added fatal error if no XML parser found. * Makefile.am: Add rapier.spec.in to dist * rapier.spec.in: RPM spec * configure.in: Made first version 0.9.0 * rdfdump.c: Tidy comment. * NEWS.html, LICENSE.html, INSTALL.html: Updated style, preparing for release * README.html: Updated features, todo, preparing for release. * rapier_parse.c: Tidy comments. * rapier.h: Changed prototype of container test function * rdfdump.c: Fix error message formatting. * rapier_parse.c: Major updates from 2001-01-21: parseType literal works mostly. Added reification. Fixed some compile-with-Redland problems Made use of more Redland URI concepts (rapier_generate_property): Removed - now use rapier_generate_statement or: (rapier_generate_named_statement): Added - handles statements with predicates that can be either XML names or namespaced names. 2001-01-19 Dave Beckett * Makefile.am: Tidy cflags * configure.in: Made version a lot bigger; alpha quality. Added configurable expat/libxml choice Tidy cflags * config.h.in: Shouldn't be in CVS * NEWS.html, LICENSE.html, INSTALL.html, README.html: First version. * rapier_parse.c: Mostly working except for - reification (ignored), rdf:li as propertyType doesn't work, parseType literal not supported. Little testing. raptor2-2.0.15/ChangeLog.140000644000175000017500000020637512315200217012114 000000000000002013-12-30 Dave Beckett * src/parsedate.y: bison %pure-parser * src/turtle_parser.y: bison %define api.push-pull pull * tests/ntriples/Makefile.am: Add bug-562.out to dist * src/raptor_json_writer.c: (raptor_json_writer_literal_object): No need for strlen * src/raptor_json_writer.c: (raptor_json_writer_quoted): No need for strlen * src/raptor_internal.h, src/raptor_json_writer.c: Add size arg to raptor_json_writer_blank_object (raptor_json_writer_blank_object): use len and save a strlen (raptor_json_writer_term): Update call to above * src/raptor_internal.h, src/raptor_json_writer.c: Add len arg to raptor_json_writer_literal_object (raptor_json_writer_literal_object): Remove use of raptor_json_writer_quoted for constant string. * src/raptor_json_writer.c, src/raptor_serialize_json.c: Use raptor_json_writer_term() in several places (raptor_json_serialize_statement): Use raptor_json_writer_term() for s, p, o. (raptor_json_serialize_avltree_visit): Use raptor_json_writer_term() for final object. * src/raptor_internal.h, src/raptor_json_writer.c: (raptor_json_writer_term): Added * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Inline constant args for raptor_json_writer_literal_object (raptor_json_writer_literal_object): Was always called with same constants so inline them and update callers. 2013-12-29 Dave Beckett * src/raptor_serialize_turtle.c: Use raptor_turtle_writer_raw_counted to save strlen()s * src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Add RAPTOR_DEBUG_ABBREV_NODE for abbreviated serializing debugging Update RDF/XML-Abbrev and Turtle serializer to use it * src/ntriples_parse.c: Allow ' in Fixes Issue #0000562 http://bugs.librdf.org/mantis/view.php?id=562 * tests/ntriples/Makefile.am, tests/ntriples/bug-562.nt, tests/ntriples/bug-562.out: Add bug-562 test files for Issue #0000562 2013-12-13 Dave Beckett * src/raptor_term.c: (raptor_new_term_from_counted_string): Fix memset transposed args. * NEWS.html: word * CMakeLists.txt, NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.13 * Snapshotted raptor2_2_0_12 for 2.0.12 release (GIT f38f4182b8d90a8f457e856e8eaa93cb1f135322) 2013-12-07 Dave Beckett * configure.ac, src/raptor_internal.h: Add a configure test for __func__ since it's not always a macro * tests/nquads-2013/README: Add nquads test README * src/ntriples_parse.c: Make N-Triples / N-Quads parser more carefully handle NUL (raptor_ntriples_parse_chunk): Looks for end_ptr rather than NUL when searching for \n or \r. It also checks for \\ and " 's * src/ntriples_parse.c: Fix code in #ifdef RASQAL_DEBUG * src/ntriples_parse.c: Improve debug messages * src/ntriples_parse.c: (raptor_ntriples_parse_line): No triple if one term failed * src/raptor_ntriples.c: (raptor_parse_turtle_term_internal): Allow 2.0E-1 2013-12-05 Dave Beckett * src/raptor_rfc2396.c: (raptor_uri_normalize_path): end when string does * configure.ac, tests/Makefile.am, tests/nquads-2013/Makefile.am, tests/nquads-2013/comment_following_triple.nq, tests/nquads-2013/langtagged_string.nq, tests/nquads-2013/lantag_with_subtag.nq, tests/nquads-2013/literal.nq, tests/nquads-2013/literal_all_controls.nq, tests/nquads-2013/literal_all_punctuation.nq, tests/nquads-2013/literal_false.nq, tests/nquads-2013/literal_true.nq, tests/nquads-2013/literal_with_2_dquotes.nq, tests/nquads-2013/literal_with_2_squotes.nq, tests/nquads-2013/literal_with_BACKSPACE.nq, tests/nquads-2013/literal_with_CARRIAGE_RETURN.nq, tests/nquads-2013/literal_with_CHARACTER_TABULATION.nq, tests/nquads-2013/literal_with_FORM_FEED.nq, tests/nquads-2013/literal_with_LINE_FEED.nq, tests/nquads-2013/literal_with_REVERSE_SOLIDUS.nq, tests/nquads-2013/literal_with_REVERSE_SOLIDUS2.nq, tests/nquads-2013/literal_with_UTF8_boundaries.nq, tests/nquads-2013/literal_with_dquote.nq, tests/nquads-2013/literal_with_numeric_escape4.nq, tests/nquads-2013/literal_with_numeric_escape8.nq, tests/nquads-2013/literal_with_squote.nq, tests/nquads-2013/manifest.ttl, tests/nquads-2013/minimal_whitespace.nq, tests/nquads-2013/nq-syntax-bad-literal-01.nq, tests/nquads-2013/nq-syntax-bad-literal-02.nq, tests/nquads-2013/nq-syntax-bad-literal-03.nq, tests/nquads-2013/nq-syntax-bad-quint-01.nq, tests/nquads-2013/nq-syntax-bad-uri-01.nq, tests/nquads-2013/nq-syntax-bnode-01.nq, tests/nquads-2013/nq-syntax-bnode-02.nq, tests/nquads-2013/nq-syntax-bnode-03.nq, tests/nquads-2013/nq-syntax-bnode-04.nq, tests/nquads-2013/nq-syntax-bnode-05.nq, tests/nquads-2013/nq-syntax-bnode-06.nq, tests/nquads-2013/nq-syntax-uri-01.nq, tests/nquads-2013/nq-syntax-uri-02.nq, tests/nquads-2013/nq-syntax-uri-03.nq, tests/nquads-2013/nq-syntax-uri-04.nq, tests/nquads-2013/nq-syntax-uri-05.nq, tests/nquads-2013/nq-syntax-uri-06.nq, tests/nquads-2013/nt-syntax-bad-base-01.nq, tests/nquads-2013/nt-syntax-bad-esc-01.nq, tests/nquads-2013/nt-syntax-bad-esc-02.nq, tests/nquads-2013/nt-syntax-bad-esc-03.nq, tests/nquads-2013/nt-syntax-bad-lang-01.nq, tests/nquads-2013/nt-syntax-bad-num-01.nq, tests/nquads-2013/nt-syntax-bad-num-02.nq, tests/nquads-2013/nt-syntax-bad-num-03.nq, tests/nquads-2013/nt-syntax-bad-prefix-01.nq, tests/nquads-2013/nt-syntax-bad-string-01.nq, tests/nquads-2013/nt-syntax-bad-string-02.nq, tests/nquads-2013/nt-syntax-bad-string-03.nq, tests/nquads-2013/nt-syntax-bad-string-04.nq, tests/nquads-2013/nt-syntax-bad-string-05.nq, tests/nquads-2013/nt-syntax-bad-string-06.nq, tests/nquads-2013/nt-syntax-bad-string-07.nq, tests/nquads-2013/nt-syntax-bad-struct-01.nq, tests/nquads-2013/nt-syntax-bad-struct-02.nq, tests/nquads-2013/nt-syntax-bad-uri-01.nq, tests/nquads-2013/nt-syntax-bad-uri-02.nq, tests/nquads-2013/nt-syntax-bad-uri-03.nq, tests/nquads-2013/nt-syntax-bad-uri-04.nq, tests/nquads-2013/nt-syntax-bad-uri-05.nq, tests/nquads-2013/nt-syntax-bad-uri-06.nq, tests/nquads-2013/nt-syntax-bad-uri-07.nq, tests/nquads-2013/nt-syntax-bad-uri-08.nq, tests/nquads-2013/nt-syntax-bad-uri-09.nq, tests/nquads-2013/nt-syntax-bnode-01.nq, tests/nquads-2013/nt-syntax-bnode-02.nq, tests/nquads-2013/nt-syntax-bnode-03.nq, tests/nquads-2013/nt-syntax-datatypes-01.nq, tests/nquads-2013/nt-syntax-datatypes-02.nq, tests/nquads-2013/nt-syntax-file-01.nq, tests/nquads-2013/nt-syntax-file-02.nq, tests/nquads-2013/nt-syntax-file-03.nq, tests/nquads-2013/nt-syntax-str-esc-01.nq, tests/nquads-2013/nt-syntax-str-esc-02.nq, tests/nquads-2013/nt-syntax-str-esc-03.nq, tests/nquads-2013/nt-syntax-string-01.nq, tests/nquads-2013/nt-syntax-string-02.nq, tests/nquads-2013/nt-syntax-string-03.nq, tests/nquads-2013/nt-syntax-subm-01.nq, tests/nquads-2013/nt-syntax-uri-01.nq, tests/nquads-2013/nt-syntax-uri-02.nq, tests/nquads-2013/nt-syntax-uri-03.nq, tests/nquads-2013/nt-syntax-uri-04.nq: Add N-Quads 2013 W3C tests From http://www.w3.org/2013/N-QuadsTests/ via mercurial and https://github.com/dajobe/nquads-tests-w3c-mirror * src/ntriples_parse.c: Check for max allowed terms in N-Triples / N-Quads * src/ntriples_parse.c: Fix error extra " * src/ntriples_parse.c: Check N-Triples and N-Quads are absolute URIs * src/ntriples_parse.c: Check N-Quads has 3/4 terms and N-Triples has 3 (raptor_ntriples_parse_line): Try to find 5th term and error out if it is. 2013-12-04 Dave Beckett * docs/tmpl/section-triples.sgml: Update tmpls 2013-12-03 Dave Beckett * src/raptor_uri.c: (raptor_uri_uri_string_is_absolute): Make a much cheaper test. * src/raptor_turtle_writer.c: (main): remove unused var 2013-12-01 Dave Beckett * NEWS.html: Add 2.0.11 release link * RELEASE.html: 2.0.12 2013-11-30 Dave Beckett * src/raptor_term.c: Port changes from rasqal_ntriples.c * src/raptor_ntriples.c: (raptor_parse_turtle_term_internal): Fix parsing 2013-11-29 Dave Beckett * src/ntriples_parse.c, src/raptor_internal.h, src/raptor_ntriples.c, src/raptor_term.c: Allow reading Turtle numeric strings (raptor_ntriples_parse_term): Gains a allow_turtle argument. (raptor_parse_turtle_term_internal): Added to implement numerics: xsd:integer, xsd:decimal and xsd:double. (raptor_new_term_from_counted_string): Update code and docs to note it allow reading Turtle numeric literals. * src/raptor_concepts.c, src/raptor_turtle_writer.c, src/turtle_parser.y: Use XSD namespace, datatype URIs from raptor_world * src/raptor_concepts.c, src/raptor_internal.h: Declare xsd datatypes uris in raptor_world * src/raptor_json_writer.c: Remove dead code protected by RAPTOR_JSON_WRITER_DATATYPES 2013-11-28 Dave Beckett * src/raptor_ntriples.c, tests/ntriples/test.nt: Check for N-Triples blank node '.' in positions 2-(N-1) * src/raptor_ntriples.c: (raptor_ntriples_parse_term_internal): Internal docs * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_internal.h, src/raptor_ntriples.c, src/raptor_serialize_turtle.c, src/raptor_term.c: Added raptor_new_term_from_counted_string to write a term as N-Triples (raptor_new_term_from_counted_string): Added (raptor_term_to_turtle_counted_string) (raptor_term_to_turtle_string): Added references to new function and N-Triples versions below. (raptor_term_to_counted_string, raptor_term_to_string): Added reference to new function and Turtle versions above. * docs/raptor-1-to-2-map.tsv: fix 2.0.11 changes * src/raptor_ntriples.c: replace references to line with input * src/ntriples_parse.c: real_terms -> terms * src/ntriples_parse.c: (raptor_ntriples_parse_line): No 'x' literal * src/raptor_ntriples.c: (raptor_ntriples_parse_term_internal): Renamed from raptor_ntriples_term * src/raptor_ntriples.c: Make locator optional * src/ntriples_parse.c, src/raptor_internal.h, src/raptor_ntriples.c: Pull all reference to parser out of raptor_ntriples code Pass in world and locator objects, just to return errors. * src/Makefile.am, src/ntriples_parse.c, src/raptor_internal.h, src/raptor_ntriples.c: Add raptor_ntriples.c module exporting raptor_ntriples_parse_term Make N-Triples parser use it * src/ntriples_parse.c: (raptor_ntriples_parse_term): pull out of raptor_ntriples_parse_line() 2013-11-27 Dave Beckett * .gitignore: ignore .dirstamp * tests/ntriples/Makefile.am, tests/ntriples/bad-01.nt: N-Triples 2008 test bad-01.nt is now valid N-Triples 2013 * src/ntriples_parse.c: (raptor_ntriples_term_valid): Do not allow . in bnode This isn't correct; '.' is allowed in positions 1..N-1 but this calling convention of character-by-character cannot check this. * src/ntriples_parse.c, tests/ntriples-2013/Makefile.am: N-Triples 2013: fix bnode ID check (raptor_ntriples_term_valid): For bnodes, allow leading digits, _ and : Allow trailing - and . Fixes N-Triples test nt-syntax-bnode-03.nt No remaining failures * src/ntriples_parse.c, tests/ntriples-2013/Makefile.am: N-Triples 2013: allow \b and \f escapes (raptor_ntriples_term): Add \b and \f to escape check. Fixes N-Triples tests literal_with_BACKSPACE.nt and literal_with_FORM_FEED.nt 1 remaining failure * src/ntriples_parse.c, tests/ntriples-2013/Makefile.am: N-Triples 2013: allow no whitespace between terms (raptor_ntriples_parse_line): Remove whitespace check. Fixes N-Triples test minimal_whitespace.nt 3 remaining failures * tests/ntriples-2013/Makefile.am: check-good-ntriples: fix return result * tests/ntriples-2013/Makefile.am: Run latest set of N-Triples tests: 4 expected failures * tests/ntriples-2013/comment_following_triple.nt, tests/ntriples-2013/langtagged_string.nt, tests/ntriples-2013/lantag_with_subtag.nt, tests/ntriples-2013/literal.nt, tests/ntriples-2013/literal_all_controls.nt, tests/ntriples-2013/literal_all_punctuation.nt, tests/ntriples-2013/literal_false.nt, tests/ntriples-2013/literal_true.nt, tests/ntriples-2013/literal_with_2_dquotes.nt, tests/ntriples-2013/literal_with_2_squotes.nt, tests/ntriples-2013/literal_with_BACKSPACE.nt, tests/ntriples-2013/literal_with_CARRIAGE_RETURN.nt, tests/ntriples-2013/literal_with_CHARACTER_TABULATION.nt, tests/ntriples-2013/literal_with_FORM_FEED.nt, tests/ntriples-2013/literal_with_LINE_FEED.nt, tests/ntriples-2013/literal_with_REVERSE_SOLIDUS.nt, tests/ntriples-2013/literal_with_REVERSE_SOLIDUS2.nt, tests/ntriples-2013/literal_with_UTF8_boundaries.nt, tests/ntriples-2013/literal_with_dquote.nt, tests/ntriples-2013/literal_with_numeric_escape4.nt, tests/ntriples-2013/literal_with_numeric_escape8.nt, tests/ntriples-2013/literal_with_squote.nt, tests/ntriples-2013/manifest.ttl, tests/ntriples-2013/minimal_whitespace.nt, tests/ntriples-2013/nt-syntax-bnode-03.nt: Updated from N-Triples tests in Mercurial 2013-11-24 Dave Beckett * CMakeLists.txt, NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.12 * ChangeLog: Snapshotted raptor2_2_0_11 for 2.0.11 release (GIT 74f5b7e9541d734494ef637ab1acd8f1d193ef30) * librdfa/.gitignore: ignore .o * docs/tmpl/section-uri.sgml, docs/tmpl/section-xml-qname.sgml: Update tmpls * NEWS.html, README.html, ChangeLog: release docs and changes for 2.0.11 * tests/rdfxml/Makefile.am: Add ex-62.out to dist * src/raptor_qname.c: autodocs * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt: Add raptor_qname_format_as_xml to docs * src/raptor_qname.c: Fix pointer as integer issue (raptor_qname_format_as_xml): Pass in integer to raptor_xml_escape_string length arg. * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Updated expected atom feeds output for serialization attributes newlines * tests/rdfxml/ex-38-rdfxmla.out: Updated expected output for serialization attributes newlines * src/raptor_xml_writer.c: Generate namespaces and attributes and xml:lang in canonical order. Fixes Issue #0000554 http://bugs.librdf.org/mantis/view.php?id=554 (raptor_xml_writer_start_element_common): Add attributes and xml:lang to declarations list and sort, then emit namespaces and attributes in separate order - as XML C14N wants * src/raptor2.h.in, src/raptor_qname.c: (raptor_qname_format_as_xml): Added * tests/rdfxml/Makefile.am, tests/rdfxml/ex-63.out, tests/rdfxml/ex-63.rdf: Added ex-63 for Issue #0000554 * src/raptor_rfc2396.c: remove dead condition * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Handle empty ref path * src/raptor_uri.c: Normalize file URIs (raptor_uri_filename_to_uri_string): Use raptor_uri_normalize_path to normalize the resulting URI * src/raptor_internal.h, src/raptor_rfc2396.c: Make raptor_uri_normalize_path internal * src/raptor_rfc2396.c: Handle normalizing reference URIs Fixes Issue #0000556 http://bugs.librdf.org/mantis/view.php?id=556 * src/raptor_rfc2396.c: Pull out URI normalizing (raptor_uri_normalize_path): Added and called from raptor_uri_resolve_uri_reference(). (raptor_uri_resolve_uri_reference): Malloc path_buffer for hierarchical ref, non-hierarchical base case and copy over, then normalize. * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/ntriples_parse.c, src/raptor2.h.in, src/raptor_uri.c: Renamed raptor_uri_string_is_absolute to raptor_uri_uri_string_is_absolute 2013-11-16 Dave Beckett * tests/test.html, tests/test.svg: remove unused test.html test.svg files 2013-11-13 Dave Beckett * src/ntriples_parse.c: Use memmove for overlapping copy [llvm address sanitizer] (raptor_ntriples_term): Use memmove to replace memcpy for an overlapping copy. Found via LLVM address sanitizer in LLVM 3.4 (SVN) with options: export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4 CC='clang -fsanitize=address -O1 -fno-omit-frame-pointer -g' ./configure ... See https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer and http://llvm.org/releases/3.3/tools/clang/docs/AddressSanitizer.html 2013-11-08 Dave Beckett * librdfa/Makefile.am: clean plist files * src/raptor_general.c: 2013 * librdfa/.gitignore: ignore plist * librdfa/.gitignore: ignore .la * librdfa/Makefile.am: Fix make distcheck for librdfa.la * src/Makefile.am: src needs -DLIBRDFA_IN_RAPTOR * librdfa/Makefile.am: Add analyze target * librdfa/Makefile.am, src/Makefile.am: librdfa.la as a convenience library build fixes Do not build strtok for librdfa unless needed. Move -DLIBRDFA_IN_RAPTOR include to librdfa dir only * Makefile.am, librdfa/Makefile.am, src/Makefile.am: Build librdfa.la as a convenience library Trying to get away from the noisy subdir-objects warnings and deprecation messages from newer automakes. 2013-11-02 Dave Beckett * configure.ac: Fix clang test * configure.ac: Check for clang to enable correct discovery of supported warnings 2013-10-30 Dave Beckett * tests/turtle/Makefile.am, tests/turtle/test-35.out: Remove (now) unused turtle warning tests 2013-10-29 Daniel Richard G * configure.ac, src/Makefile.am, tests/Makefile.am, tests/turtle/Makefile.am: Various build system fixes configure.ac: - Place a ":" in the action-if-not-found arguments of the PKG_CHECK_MODULES() calls for LIBXML and LIBCURL to override the default action of quitting with an error, as neither of these libraries are a hard requirement src/Makefile.am: - Add parsedate.c to BUILT_SOURCES so that it can be handled properly - Move the parsedate.c rule into the MAINTAINER_MODE block, as only maintainers should be regenerating this file - Bump the "test" rule down after the test-program rules tests/Makefile.am: - Add ntriples-2013 to SUBDIRS to fix configure script invocation tests/turtle/Makefile.am: - Add logic to prevent breakage when TEST_WARN_FILES is empty 2013-10-02 Dave Beckett * configure.ac, tests/feeds/Makefile.am: Test for jing and skip feed validation tests if it is missing 2013-09-28 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Handle NULL uri [clang] 2013-09-15 Dave Beckett * src/ntriples_parse.c, src/raptor_internal.h, src/turtle_common.h: Move raptor_turtle_check_uri_string prototype to raptor_internal.h 2013-09-13 Dave Beckett * tests/rdfxml/ex-59.nt, tests/rdfxml/ex-59.rdf, tests/rdfxml/ex-60.nt, tests/rdfxml/ex-60.rdf: Update tests with legal N-Triples URIs 2013-09-12 Dave Beckett * src/ntriples_parse.c: Check language tag validity * src/ntriples_parse.c: Use raptor_uri_string_is_absolute to check datatype URI is abs * src/ntriples_parse.c: Use raptor_uri_string_is_absolute to enforce abs URIs for N-Triples * src/raptor2.h.in, src/raptor_uri.c: (raptor_uri_string_is_absolute): Added * src/ntriples_parse.c: Check for bad URIs using turtle function - FIXME * src/ntriples_parse.c: Check for illegal unicode escapes. * src/ntriples_parse.c: Move object_literal_language/datatype to area of code that uses it. * src/ntriples_parse.c: Kill use of terms, term_lengths and term_types * src/ntriples_parse.c: Make literals once during syntax parsing Move language normalization to same area of code * src/ntriples_parse.c: Make URIs in one place during syntax parsing * src/ntriples_parse.c: Pass a raptor_term for graph to raptor_ntriples_generate_statement * src/ntriples_parse.c: Pass a raptor_term for object to raptor_ntriples_generate_statement * src/ntriples_parse.c: Pass a raptor_term for predicate to raptor_ntriples_generate_statement * src/ntriples_parse.c: Pass a raptor_term for subject to raptor_ntriples_generate_statement (raptor_ntriples_parse_line): Make term here and pass to raptor_ntriples_generate_statement subject 2013-09-10 Dave Beckett * src/ntriples_parse.c: Remove special error for legacy N-Triples "foo"-LANGTOKEN * src/ntriples_parse.c: Remove unused RAPTOR_TERM_CLASS_FULL * configure.ac, tests/ntriples-2013/Makefile.am, tests/ntriples-2013/manifest.ttl, tests/ntriples-2013/nt-syntax-bad-base-01.nt, tests/ntriples-2013/nt-syntax-bad-esc-01.nt, tests/ntriples-2013/nt-syntax-bad-esc-02.nt, tests/ntriples-2013/nt-syntax-bad-esc-03.nt, tests/ntriples-2013/nt-syntax-bad-lang-01.nt, tests/ntriples-2013/nt-syntax-bad-num-01.nt, tests/ntriples-2013/nt-syntax-bad-num-02.nt, tests/ntriples-2013/nt-syntax-bad-num-03.nt, tests/ntriples-2013/nt-syntax-bad-prefix-01.nt, tests/ntriples-2013/nt-syntax-bad-string-01.nt, tests/ntriples-2013/nt-syntax-bad-string-02.nt, tests/ntriples-2013/nt-syntax-bad-string-03.nt, tests/ntriples-2013/nt-syntax-bad-string-04.nt, tests/ntriples-2013/nt-syntax-bad-string-05.nt, tests/ntriples-2013/nt-syntax-bad-string-06.nt, tests/ntriples-2013/nt-syntax-bad-string-07.nt, tests/ntriples-2013/nt-syntax-bad-struct-01.nt, tests/ntriples-2013/nt-syntax-bad-struct-02.nt, tests/ntriples-2013/nt-syntax-bad-uri-01.nt, tests/ntriples-2013/nt-syntax-bad-uri-02.nt, tests/ntriples-2013/nt-syntax-bad-uri-03.nt, tests/ntriples-2013/nt-syntax-bad-uri-04.nt, tests/ntriples-2013/nt-syntax-bad-uri-05.nt, tests/ntriples-2013/nt-syntax-bad-uri-06.nt, tests/ntriples-2013/nt-syntax-bad-uri-07.nt, tests/ntriples-2013/nt-syntax-bad-uri-08.nt, tests/ntriples-2013/nt-syntax-bad-uri-09.nt, tests/ntriples-2013/nt-syntax-bnode-01.nt, tests/ntriples-2013/nt-syntax-bnode-02.nt, tests/ntriples-2013/nt-syntax-datatypes-01.nt, tests/ntriples-2013/nt-syntax-datatypes-02.nt, tests/ntriples-2013/nt-syntax-file-01.nt, tests/ntriples-2013/nt-syntax-file-02.nt, tests/ntriples-2013/nt-syntax-file-03.nt, tests/ntriples-2013/nt-syntax-str-esc-01.nt, tests/ntriples-2013/nt-syntax-str-esc-02.nt, tests/ntriples-2013/nt-syntax-str-esc-03.nt, tests/ntriples-2013/nt-syntax-string-01.nt, tests/ntriples-2013/nt-syntax-string-02.nt, tests/ntriples-2013/nt-syntax-string-03.nt, tests/ntriples-2013/nt-syntax-subm-01.nt, tests/ntriples-2013/nt-syntax-uri-01.nt, tests/ntriples-2013/nt-syntax-uri-02.nt, tests/ntriples-2013/nt-syntax-uri-03.nt, tests/ntriples-2013/nt-syntax-uri-04.nt: N-Triples 2013 test suite Current state: all good tests pass. 13 bad tests fail: nt-syntax-bad-uri-01.nt nt-syntax-bad-uri-02.nt nt-syntax-bad-uri-03.nt nt-syntax-bad-uri-04.nt nt-syntax-bad-uri-06.nt nt-syntax-bad-uri-07.nt nt-syntax-bad-uri-08.nt nt-syntax-bad-uri-09.nt nt-syntax-bad-struct-01.nt nt-syntax-bad-struct-02.nt nt-syntax-bad-lang-01.nt nt-syntax-bad-esc-03.nt nt-syntax-bad-string-05.nt 2013-09-09 Dave Beckett * src/ntriples_parse.c: Tidy error column/byte offsets for errors * src/ntriples_parse.c: Support # comments after end of line in N-Triples / NQuads 2013 * tests/ntriples/nt2013-ex3.out: Write expected result in \uHHHH form * tests/ntriples/Makefile.am: check-nt: add rapper failure clause * tests/ntriples/Makefile.am: make check-nt show error output in a rapper failure * tests/ntriples/Makefile.am, tests/ntriples/nt2013-ex1.nt, tests/ntriples/nt2013-ex1.out, tests/ntriples/nt2013-ex2.nt, tests/ntriples/nt2013-ex2.out, tests/ntriples/nt2013-ex3.nt, tests/ntriples/nt2013-ex3.out, tests/ntriples/nt2013-ex4.nt, tests/ntriples/nt2013-ex4.out: Add ntriples 2013 examples from spec 2013-08-27 Dave Beckett * tests/turtle-2013/Makefile.am: Remove dup tests * tests/turtle-2013/README, tests/turtle-2013/localName_with_non_leading_extras.nt: Updated Turtle W3C tests to latest files from repo * tests/turtle-2013/Makefile.am: Add the 4 negative eval tests * CMakeLists.txt, NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.11 * ChangeLog: #changes * 2.0.10 * NEWS.html, RELEASE.html: 2.0.10 2013-08-25 Dave Beckett * src/raptor_xml_writer.c: Make XML writer emit xml:lang on elements Fixes Issue #0000548 http://bugs.librdf.org/mantis/view.php?id=548 * src/ntriples_parse.c, src/raptor_internal.h: Revert "(raptor_normalize_language): Added to normalize to en-US-BLAH" This reverts commit 7b4788f656546be7abdd87122c03ea005e771c17. * src/ntriples_parse.c, src/turtle_lexer.l: Revert "Use raptor_normalize_language to normalize N-Triples and Turtle inputs" This reverts commit 74e9fc1160cbb300cb87445bebcca4033a627e56. Conflicts: src/turtle_lexer.l 2013-08-23 Dave Beckett * src/raptor_concepts.c, src/raptor_internal.h: Add rdf:HTML and rdf:langString from RDF 1.1 concepts RDF 1.1 Concepts and Abstract Syntax W3C Last Call Working Draft 23 July 2013 http://www.w3.org/TR/2013/WD-rdf11-concepts-20130723/ http://www.w3.org/TR/2013/WD-rdf11-concepts-20130723/#section-html http://www.w3.org/TR/2013/WD-rdf11-concepts-20130723/#section-Datatypes 2013-08-12 Dave Beckett * tests/turtle-2013/Makefile.am: Add 4 bad eval tests to check-bad-turtle 2013-08-11 Dave Beckett * tests/turtle-2013/Makefile.am, tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_cha r_boundaries.nt, tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_cha r_boundaries.ttl, tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_cha racter_boundaries.nt, tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_cha racter_boundaries.ttl, tests/turtle-2013/manifest.ttl: Renamed long turtle 2013 test file so it can be stored in tar localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries* -> localName_with_assigned_nfc_bmp_PN_CHARS_BASE_char_boundaries* GNUtar can't handle file names >99 letters tar: raptor2-2.0.10/tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries.ttl: file name is too long (max 99); not dumped tar: raptor2-2.0.10/tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_character_boundaries.nt: file name is too long (max 99); not dumped tar: Exiting with failure status due to previous errors * tests/turtle-2013/test-38.nt: remove unused test-38.nt * tests/turtle-2013/Makefile.am: Add all TEST_OUT_FILES * tests/.gitignore: Ignore raptor_empty_test.trs * src/turtle_lexer.l: cast for language * tests/turtle-2013/Makefile.am: Use turtle parser to read exemplars * scripts/rdfcompare: rdfcompare * tests/turtle-2013/anonymous_blank_node_object.nt, tests/turtle-2013/anonymous_blank_node_subject.nt, tests/turtle-2013/blankNodePropertyList_as_object.nt, tests/turtle-2013/blankNodePropertyList_as_subject.nt, tests/turtle-2013/blankNodePropertyList_containing_collection.nt, tests/turtle-2013/blankNodePropertyList_with_multiple_triples.nt, tests/turtle-2013/collection_object.nt, tests/turtle-2013/collection_subject.nt, tests/turtle-2013/first.nt, tests/turtle-2013/labeled_blank_node_object.nt, tests/turtle-2013/labeled_blank_node_subject.nt, tests/turtle-2013/labeled_blank_node_with_PN_CHARS_BASE_character_b oundaries.nt, tests/turtle-2013/labeled_blank_node_with_leading_digit.nt, tests/turtle-2013/labeled_blank_node_with_leading_underscore.nt, tests/turtle-2013/labeled_blank_node_with_non_leading_extras.nt, tests/turtle-2013/last.nt, tests/turtle-2013/nested_blankNodePropertyLists.nt, tests/turtle-2013/nested_collection.nt, tests/turtle-2013/sole_blankNodePropertyList.nt: Replace official results with raptor expected ones * tests/turtle-2013/Makefile.am: Use rdfcompare to compare * scripts/Makefile.am: Add rdfcompare * src/ntriples_parse.c, src/turtle_lexer.l: Use raptor_normalize_language to normalize N-Triples and Turtle inputs * src/ntriples_parse.c, src/raptor_internal.h: (raptor_normalize_language): Added to normalize to en-US-BLAH * tests/turtle/Makefile.am, tests/turtle/bad-24.ttl, tests/turtle/test-35.ttl: Turtle test for lang and datatype warning is now an error Renamed test-35.ttl to bad-24.ttl * tests/turtle-2013/literal_with_escaped_BACKSPACE.nt: Added missing literal_with_escaped_BACKSPACE.nt * tests/turtle-2013/Makefile.am: Report normalize N-Triples diff * tests/turtle-2013/Makefile.am: Normalize N-Triples expected output before comparing them with diff * src/raptor2.h.in: Make N-Triples allow writing \b and \f * src/ntriples_parse.c: Always allow UTF-8 in N-Triples strings and URIs (N-Triples 2013) (raptor_ntriples_term): Remove allow_utf8 arg and always set it true. * src/ntriples_parse.c, src/raptor_serialize_ntriples.c: Use N-Triples 2013 mime type * src/turtle_common.c: Allow \b \f escapes in Turtle strings 2013-08-10 Dave Beckett * src/turtle_parser.y: Make turtle literals with language and datatype an error (Turtle 2013) Makes test turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl fail as it should. * tests/turtle-2013/Makefile.am: Count and report errors for good tests * tests/turtle-2013/Makefile.am: Update BASE_URI * tests/turtle-2013/Makefile.am: Updated for Turtle 2013 tests * tests/turtle-2013/LITERAL_LONG2_with_UTF8_boundaries.ttl: add missing LITERAL_LONG2_with_UTF8_boundaries.ttl * tests/turtle-2013/IRI_subject.nt, tests/turtle-2013/IRI_with_eight_digit_numeric_escape.nt, tests/turtle-2013/IRI_with_four_digit_numeric_escape.nt, tests/turtle-2013/LITERAL1_with_UTF8_boundaries.nt, tests/turtle-2013/LITERAL2.nt, tests/turtle-2013/LITERAL2_with_UTF8_boundaries.nt, tests/turtle-2013/LITERAL_LONG1.nt, tests/turtle-2013/LITERAL_LONG1_with_UTF8_boundaries.nt, tests/turtle-2013/LITERAL_LONG2.nt, tests/turtle-2013/LITERAL_LONG2_with_UTF8_boundaries.nt, tests/turtle-2013/SPARQL_style_base.nt, tests/turtle-2013/SPARQL_style_prefix.nt, tests/turtle-2013/anonymous_blank_node_object.nt, tests/turtle-2013/anonymous_blank_node_subject.nt, tests/turtle-2013/bareword_integer.nt, tests/turtle-2013/comment_following_localName.nt, tests/turtle-2013/default_namespace_IRI.nt, tests/turtle-2013/labeled_blank_node_with_PN_CHARS_BASE_character_b oundaries.nt, tests/turtle-2013/labeled_blank_node_with_leading_digit.nt, tests/turtle-2013/labeled_blank_node_with_leading_underscore.nt, tests/turtle-2013/labeled_blank_node_with_non_leading_extras.nt, tests/turtle-2013/langtagged_LONG.nt, tests/turtle-2013/literal_with_escaped_CARRIAGE_RETURN.nt, tests/turtle-2013/literal_with_escaped_CHARACTER_TABULATION.nt, tests/turtle-2013/literal_with_escaped_FORM_FEED.nt, tests/turtle-2013/literal_with_escaped_LINE_FEED.nt, tests/turtle-2013/literal_with_numeric_escape8.nt, tests/turtle-2013/old_style_base.nt, tests/turtle-2013/old_style_prefix.nt, tests/turtle-2013/prefix_only_IRI.nt, tests/turtle-2013/prefix_with_PN_CHARS_BASE_character_boundaries.nt , tests/turtle-2013/prefix_with_non_leading_extras.nt, tests/turtle-2013/prefixed_IRI_object.nt, tests/turtle-2013/prefixed_IRI_predicate.nt, tests/turtle-2013/prefixed_name_datatype.nt, tests/turtle-2013/repeated_semis_at_end.nt, tests/turtle-2013/sole_blankNodePropertyList.nt: Add .nt versions of shared result files * tests/turtle-2013/HYPHEN_MINUS_in_localName.nt, tests/turtle-2013/HYPHEN_MINUS_in_localName.ttl, tests/turtle-2013/IRIREF_datatype.nt, tests/turtle-2013/IRIREF_datatype.ttl, tests/turtle-2013/IRI_spo.nt, tests/turtle-2013/IRI_subject.ttl, tests/turtle-2013/IRI_with_all_punctuation.nt, tests/turtle-2013/IRI_with_all_punctuation.ttl, tests/turtle-2013/IRI_with_eight_digit_numeric_escape.ttl, tests/turtle-2013/IRI_with_four_digit_numeric_escape.ttl, tests/turtle-2013/LICENSE, tests/turtle-2013/LITERAL1.nt, tests/turtle-2013/LITERAL1.ttl, tests/turtle-2013/LITERAL1_all_controls.nt, tests/turtle-2013/LITERAL1_all_punctuation.nt, tests/turtle-2013/LITERAL1_all_punctuation.ttl, tests/turtle-2013/LITERAL1_ascii_boundaries.nt, tests/turtle-2013/LITERAL1_with_UTF8_boundaries.ttl, tests/turtle-2013/LITERAL2.ttl, tests/turtle-2013/LITERAL2_ascii_boundaries.nt, tests/turtle-2013/LITERAL2_with_UTF8_boundaries.ttl, tests/turtle-2013/LITERAL_LONG1.ttl, tests/turtle-2013/LITERAL_LONG1_ascii_boundaries.nt, tests/turtle-2013/LITERAL_LONG1_with_1_squote.nt, tests/turtle-2013/LITERAL_LONG1_with_1_squote.ttl, tests/turtle-2013/LITERAL_LONG1_with_2_squotes.nt, tests/turtle-2013/LITERAL_LONG1_with_2_squotes.ttl, tests/turtle-2013/LITERAL_LONG1_with_UTF8_boundaries.ttl, tests/turtle-2013/LITERAL_LONG2.ttl, tests/turtle-2013/LITERAL_LONG2_ascii_boundaries.nt, tests/turtle-2013/LITERAL_LONG2_with_1_squote.nt, tests/turtle-2013/LITERAL_LONG2_with_1_squote.ttl, tests/turtle-2013/LITERAL_LONG2_with_2_squotes.nt, tests/turtle-2013/LITERAL_LONG2_with_2_squotes.ttl, tests/turtle-2013/LITERAL_LONG2_with_REVERSE_SOLIDUS.nt, tests/turtle-2013/LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl, tests/turtle-2013/LITERAL_with_UTF8_boundaries.nt, tests/turtle-2013/README, tests/turtle-2013/SPARQL_style_base.ttl, tests/turtle-2013/SPARQL_style_prefix.ttl, tests/turtle-2013/anonymous_blank_node_object.ttl, tests/turtle-2013/anonymous_blank_node_subject.ttl, tests/turtle-2013/bareword_a_predicate.nt, tests/turtle-2013/bareword_a_predicate.ttl, tests/turtle-2013/bareword_decimal.nt, tests/turtle-2013/bareword_decimal.ttl, tests/turtle-2013/bareword_double.nt, tests/turtle-2013/bareword_double.ttl, tests/turtle-2013/bareword_integer.ttl, tests/turtle-2013/blankNodePropertyList_as_object.nt, tests/turtle-2013/blankNodePropertyList_as_object.ttl, tests/turtle-2013/blankNodePropertyList_as_subject.nt, tests/turtle-2013/blankNodePropertyList_as_subject.ttl, tests/turtle-2013/blankNodePropertyList_containing_collection.nt, tests/turtle-2013/blankNodePropertyList_containing_collection.ttl, tests/turtle-2013/blankNodePropertyList_with_multiple_triples.nt, tests/turtle-2013/blankNodePropertyList_with_multiple_triples.ttl, tests/turtle-2013/collection_object.nt, tests/turtle-2013/collection_object.ttl, tests/turtle-2013/collection_subject.nt, tests/turtle-2013/collection_subject.ttl, tests/turtle-2013/comment_following_PNAME_NS.nt, tests/turtle-2013/comment_following_PNAME_NS.ttl, tests/turtle-2013/comment_following_localName.ttl, tests/turtle-2013/default_namespace_IRI.ttl, tests/turtle-2013/double_lower_case_e.nt, tests/turtle-2013/double_lower_case_e.ttl, tests/turtle-2013/empty_collection.nt, tests/turtle-2013/empty_collection.ttl, tests/turtle-2013/first.nt, tests/turtle-2013/first.ttl, tests/turtle-2013/labeled_blank_node_object.nt, tests/turtle-2013/labeled_blank_node_object.ttl, tests/turtle-2013/labeled_blank_node_subject.nt, tests/turtle-2013/labeled_blank_node_subject.ttl, tests/turtle-2013/labeled_blank_node_with_PN_CHARS_BASE_character_b oundaries.ttl, tests/turtle-2013/labeled_blank_node_with_leading_digit.ttl, tests/turtle-2013/labeled_blank_node_with_leading_underscore.ttl, tests/turtle-2013/labeled_blank_node_with_non_leading_extras.ttl, tests/turtle-2013/langtagged_LONG.ttl, tests/turtle-2013/langtagged_LONG_with_subtag.nt, tests/turtle-2013/langtagged_LONG_with_subtag.ttl, tests/turtle-2013/langtagged_non_LONG.nt, tests/turtle-2013/langtagged_non_LONG.ttl, tests/turtle-2013/lantag_with_subtag.nt, tests/turtle-2013/lantag_with_subtag.ttl, tests/turtle-2013/last.nt, tests/turtle-2013/last.ttl, tests/turtle-2013/literal_false.nt, tests/turtle-2013/literal_false.ttl, tests/turtle-2013/literal_true.nt, tests/turtle-2013/literal_true.ttl, tests/turtle-2013/literal_with_BACKSPACE.nt, tests/turtle-2013/literal_with_BACKSPACE.ttl, tests/turtle-2013/literal_with_CARRIAGE_RETURN.nt, tests/turtle-2013/literal_with_CARRIAGE_RETURN.ttl, tests/turtle-2013/literal_with_CHARACTER_TABULATION.nt, tests/turtle-2013/literal_with_CHARACTER_TABULATION.ttl, tests/turtle-2013/literal_with_FORM_FEED.nt, tests/turtle-2013/literal_with_FORM_FEED.ttl, tests/turtle-2013/literal_with_LINE_FEED.nt, tests/turtle-2013/literal_with_LINE_FEED.ttl, tests/turtle-2013/literal_with_REVERSE_SOLIDUS.nt, tests/turtle-2013/literal_with_REVERSE_SOLIDUS.ttl, tests/turtle-2013/literal_with_escaped_BACKSPACE.ttl, tests/turtle-2013/literal_with_escaped_CARRIAGE_RETURN.ttl, tests/turtle-2013/literal_with_escaped_CHARACTER_TABULATION.ttl, tests/turtle-2013/literal_with_escaped_FORM_FEED.ttl, tests/turtle-2013/literal_with_escaped_LINE_FEED.ttl, tests/turtle-2013/literal_with_numeric_escape4.nt, tests/turtle-2013/literal_with_numeric_escape4.ttl, tests/turtle-2013/literal_with_numeric_escape8.ttl, tests/turtle-2013/localName_with_PN_CHARS_BASE_character_boundaries .nt, tests/turtle-2013/localName_with_PN_CHARS_BASE_character_boundaries .ttl, tests/turtle-2013/localName_with_assigned_nfc_PN_CHARS_BASE_charact er_boundaries.nt, tests/turtle-2013/localName_with_assigned_nfc_PN_CHARS_BASE_charact er_boundaries.ttl, tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_cha racter_boundaries.nt, tests/turtle-2013/localName_with_assigned_nfc_bmp_PN_CHARS_BASE_cha racter_boundaries.ttl, tests/turtle-2013/localName_with_leading_digit.nt, tests/turtle-2013/localName_with_leading_digit.ttl, tests/turtle-2013/localName_with_leading_underscore.nt, tests/turtle-2013/localName_with_leading_underscore.ttl, tests/turtle-2013/localName_with_nfc_PN_CHARS_BASE_character_bounda ries.nt, tests/turtle-2013/localName_with_nfc_PN_CHARS_BASE_character_bounda ries.ttl, tests/turtle-2013/localName_with_non_leading_extras.nt, tests/turtle-2013/localName_with_non_leading_extras.ttl, tests/turtle-2013/localname_with_COLON.nt, tests/turtle-2013/localname_with_COLON.ttl, tests/turtle-2013/manifest.ttl, tests/turtle-2013/negative_numeric.nt, tests/turtle-2013/negative_numeric.ttl, tests/turtle-2013/nested_blankNodePropertyLists.nt, tests/turtle-2013/nested_blankNodePropertyLists.ttl, tests/turtle-2013/nested_collection.nt, tests/turtle-2013/nested_collection.ttl, tests/turtle-2013/number_sign_following_PNAME_NS.nt, tests/turtle-2013/number_sign_following_PNAME_NS.ttl, tests/turtle-2013/number_sign_following_localName.nt, tests/turtle-2013/number_sign_following_localName.ttl, tests/turtle-2013/numeric_with_leading_0.nt, tests/turtle-2013/numeric_with_leading_0.ttl, tests/turtle-2013/objectList_with_two_objects.nt, tests/turtle-2013/objectList_with_two_objects.ttl, tests/turtle-2013/old_style_base.ttl, tests/turtle-2013/old_style_prefix.ttl, tests/turtle-2013/percent_escaped_localName.nt, tests/turtle-2013/percent_escaped_localName.ttl, tests/turtle-2013/positive_numeric.nt, tests/turtle-2013/positive_numeric.ttl, tests/turtle-2013/predicateObjectList_with_two_objectLists.nt, tests/turtle-2013/predicateObjectList_with_two_objectLists.ttl, tests/turtle-2013/prefix_only_IRI.ttl, tests/turtle-2013/prefix_reassigned_and_used.nt, tests/turtle-2013/prefix_reassigned_and_used.ttl, tests/turtle-2013/prefix_with_PN_CHARS_BASE_character_boundaries.tt l, tests/turtle-2013/prefix_with_non_leading_extras.ttl, tests/turtle-2013/prefixed_IRI_object.ttl, tests/turtle-2013/prefixed_IRI_predicate.ttl, tests/turtle-2013/prefixed_name_datatype.ttl, tests/turtle-2013/repeated_semis_at_end.ttl, tests/turtle-2013/repeated_semis_not_at_end.nt, tests/turtle-2013/repeated_semis_not_at_end.ttl, tests/turtle-2013/reserved_escaped_localName.nt, tests/turtle-2013/reserved_escaped_localName.ttl, tests/turtle-2013/sole_blankNodePropertyList.ttl, tests/turtle-2013/test-38.nt, tests/turtle-2013/test-38.ttl, tests/turtle-2013/turtle-eval-bad-01.ttl, tests/turtle-2013/turtle-eval-bad-02.ttl, tests/turtle-2013/turtle-eval-bad-03.ttl, tests/turtle-2013/turtle-eval-bad-04.ttl, tests/turtle-2013/turtle-eval-struct-01.nt, tests/turtle-2013/turtle-eval-struct-01.ttl, tests/turtle-2013/turtle-eval-struct-02.nt, tests/turtle-2013/turtle-eval-struct-02.ttl, tests/turtle-2013/turtle-subm-01.nt, tests/turtle-2013/turtle-subm-27.nt, tests/turtle-2013/turtle-subm-27.ttl, tests/turtle-2013/turtle-syntax-bad-LITERAL2_with_langtag_and_datat ype.ttl, tests/turtle-2013/turtle-syntax-bad-base-02.ttl, tests/turtle-2013/turtle-syntax-bad-base-03.ttl, tests/turtle-2013/turtle-syntax-bad-blank-label-dot-end.ttl, tests/turtle-2013/turtle-syntax-bad-esc-01.ttl, tests/turtle-2013/turtle-syntax-bad-esc-02.ttl, tests/turtle-2013/turtle-syntax-bad-esc-03.ttl, tests/turtle-2013/turtle-syntax-bad-esc-04.ttl, tests/turtle-2013/turtle-syntax-bad-kw-01.ttl, tests/turtle-2013/turtle-syntax-bad-kw-02.ttl, tests/turtle-2013/turtle-syntax-bad-kw-03.ttl, tests/turtle-2013/turtle-syntax-bad-kw-04.ttl, tests/turtle-2013/turtle-syntax-bad-kw-05.ttl, tests/turtle-2013/turtle-syntax-bad-lang-01.ttl, tests/turtle-2013/turtle-syntax-bad-ln-dash-start.ttl, tests/turtle-2013/turtle-syntax-bad-ln-escape-start.ttl, tests/turtle-2013/turtle-syntax-bad-ln-escape.ttl, tests/turtle-2013/turtle-syntax-bad-missing-ns-dot-end.ttl, tests/turtle-2013/turtle-syntax-bad-missing-ns-dot-start.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-01.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-02.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-03.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-04.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-05.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-06.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-09.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-10.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-11.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-12.ttl, tests/turtle-2013/turtle-syntax-bad-ns-dot-end.ttl, tests/turtle-2013/turtle-syntax-bad-ns-dot-start.ttl, tests/turtle-2013/turtle-syntax-bad-num-01.ttl, tests/turtle-2013/turtle-syntax-bad-num-02.ttl, tests/turtle-2013/turtle-syntax-bad-num-03.ttl, tests/turtle-2013/turtle-syntax-bad-num-04.ttl, tests/turtle-2013/turtle-syntax-bad-num-05.ttl, tests/turtle-2013/turtle-syntax-bad-number-dot-in-anon.ttl, tests/turtle-2013/turtle-syntax-bad-pname-01.ttl, tests/turtle-2013/turtle-syntax-bad-pname-02.ttl, tests/turtle-2013/turtle-syntax-bad-pname-03.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-01.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-02.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-04.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-05.ttl, tests/turtle-2013/turtle-syntax-bad-string-01.ttl, tests/turtle-2013/turtle-syntax-bad-string-02.ttl, tests/turtle-2013/turtle-syntax-bad-string-03.ttl, tests/turtle-2013/turtle-syntax-bad-string-04.ttl, tests/turtle-2013/turtle-syntax-bad-string-05.ttl, tests/turtle-2013/turtle-syntax-bad-string-06.ttl, tests/turtle-2013/turtle-syntax-bad-string-07.ttl, tests/turtle-2013/turtle-syntax-bad-struct-01.ttl, tests/turtle-2013/turtle-syntax-bad-struct-02.ttl, tests/turtle-2013/turtle-syntax-bad-struct-03.ttl, tests/turtle-2013/turtle-syntax-bad-struct-04.ttl, tests/turtle-2013/turtle-syntax-bad-struct-05.ttl, tests/turtle-2013/turtle-syntax-bad-struct-06.ttl, tests/turtle-2013/turtle-syntax-bad-struct-07.ttl, tests/turtle-2013/turtle-syntax-bad-struct-08.ttl, tests/turtle-2013/turtle-syntax-bad-struct-09.ttl, tests/turtle-2013/turtle-syntax-bad-struct-10.ttl, tests/turtle-2013/turtle-syntax-bad-struct-11.ttl, tests/turtle-2013/turtle-syntax-bad-struct-12.ttl, tests/turtle-2013/turtle-syntax-bad-struct-13.ttl, tests/turtle-2013/turtle-syntax-bad-struct-14.ttl, tests/turtle-2013/turtle-syntax-bad-struct-15.ttl, tests/turtle-2013/turtle-syntax-bad-struct-16.ttl, tests/turtle-2013/turtle-syntax-bad-struct-17.ttl, tests/turtle-2013/turtle-syntax-bad-uri-01.ttl, tests/turtle-2013/turtle-syntax-bad-uri-02.ttl, tests/turtle-2013/turtle-syntax-bad-uri-03.ttl, tests/turtle-2013/turtle-syntax-bad-uri-04.ttl, tests/turtle-2013/turtle-syntax-bad-uri-05.ttl, tests/turtle-2013/turtle-syntax-base-01.ttl, tests/turtle-2013/turtle-syntax-base-02.ttl, tests/turtle-2013/turtle-syntax-base-03.ttl, tests/turtle-2013/turtle-syntax-base-04.ttl, tests/turtle-2013/turtle-syntax-blank-label.nt, tests/turtle-2013/turtle-syntax-blank-label.ttl, tests/turtle-2013/turtle-syntax-bnode-01.ttl, tests/turtle-2013/turtle-syntax-bnode-02.ttl, tests/turtle-2013/turtle-syntax-bnode-03.ttl, tests/turtle-2013/turtle-syntax-bnode-04.ttl, tests/turtle-2013/turtle-syntax-bnode-05.ttl, tests/turtle-2013/turtle-syntax-bnode-06.ttl, tests/turtle-2013/turtle-syntax-bnode-07.ttl, tests/turtle-2013/turtle-syntax-bnode-08.ttl, tests/turtle-2013/turtle-syntax-bnode-09.ttl, tests/turtle-2013/turtle-syntax-bnode-10.ttl, tests/turtle-2013/turtle-syntax-kw-03.ttl, tests/turtle-2013/turtle-syntax-lists-01.ttl, tests/turtle-2013/turtle-syntax-lists-02.ttl, tests/turtle-2013/turtle-syntax-lists-03.ttl, tests/turtle-2013/turtle-syntax-lists-04.ttl, tests/turtle-2013/turtle-syntax-lists-05.ttl, tests/turtle-2013/turtle-syntax-ln-colons.nt, tests/turtle-2013/turtle-syntax-ln-colons.ttl, tests/turtle-2013/turtle-syntax-ln-dots.nt, tests/turtle-2013/turtle-syntax-ln-dots.ttl, tests/turtle-2013/turtle-syntax-ns-dots.ttl, tests/turtle-2013/turtle-syntax-pname-dots.ttl, tests/turtle-2013/turtle-syntax-pname-esc-01.ttl, tests/turtle-2013/turtle-syntax-pname-esc-02.ttl, tests/turtle-2013/turtle-syntax-pname-esc-03.ttl, tests/turtle-2013/turtle-syntax-prefix-01.ttl, tests/turtle-2013/turtle-syntax-prefix-02.ttl, tests/turtle-2013/turtle-syntax-prefix-03.ttl, tests/turtle-2013/turtle-syntax-prefix-04.ttl, tests/turtle-2013/turtle-syntax-prefix-05.ttl, tests/turtle-2013/turtle-syntax-prefix-06.ttl, tests/turtle-2013/turtle-syntax-prefix-07.ttl, tests/turtle-2013/turtle-syntax-prefix-08.ttl, tests/turtle-2013/turtle-syntax-prefix-09.ttl, tests/turtle-2013/turtle-syntax-str-esc-01.ttl, tests/turtle-2013/turtle-syntax-str-esc-02.ttl, tests/turtle-2013/turtle-syntax-str-esc-03.ttl, tests/turtle-2013/turtle-syntax-string-01.ttl, tests/turtle-2013/turtle-syntax-string-02.ttl, tests/turtle-2013/turtle-syntax-string-03.ttl, tests/turtle-2013/turtle-syntax-string-04.ttl, tests/turtle-2013/turtle-syntax-string-05.ttl, tests/turtle-2013/turtle-syntax-string-06.ttl, tests/turtle-2013/turtle-syntax-string-07.ttl, tests/turtle-2013/turtle-syntax-string-08.ttl, tests/turtle-2013/turtle-syntax-string-09.ttl, tests/turtle-2013/turtle-syntax-string-10.ttl, tests/turtle-2013/turtle-syntax-string-11.ttl, tests/turtle-2013/turtle-syntax-struct-01.ttl, tests/turtle-2013/turtle-syntax-struct-02.ttl, tests/turtle-2013/turtle-syntax-struct-03.ttl, tests/turtle-2013/turtle-syntax-struct-04.ttl, tests/turtle-2013/turtle-syntax-struct-05.ttl, tests/turtle-2013/turtle-syntax-uri-01.ttl, tests/turtle-2013/turtle-syntax-uri-02.ttl, tests/turtle-2013/turtle-syntax-uri-03.ttl, tests/turtle-2013/turtle-syntax-uri-04.ttl, tests/turtle-2013/two_LITERAL_LONG2s.nt, tests/turtle-2013/two_LITERAL_LONG2s.ttl, tests/turtle-2013/underscore_in_localName.nt, tests/turtle-2013/underscore_in_localName.ttl: Import latest Turtle 2013 tests 2013-07-30 Dave Beckett * configure.ac: Revert 53664470aca6c3393fe05724653c7e45d0c52588 * librdfa/.gitignore: Add gitignore for objs in librdfa/ * configure.ac: Add automake option subdir-objects to keep librdfa building 2013-05-31 Dave Beckett * .travis.yml: Add yajl and run tests * .travis.yml: Do an update first * .travis.yml: More travis-ci.org config 2013-04-27 Dave Beckett * scripts/fix-flex: Fix declaration of 'i' in generated flex __scan_bytes function * src/turtle_parser.y: Remove prototypes for column methods that flex 2.5.36+ provides now. * configure.ac, src/turtle_lexer.l: Recommend flex 2.5.36 Remove prototypes for column methods that flex 2.5.36+ provides now. 2013-04-05 Dave Beckett * ChangeLog, ChangeLog.13, Makefile.am: ChangeLog.13 for 2012 2013-03-26 Dave Beckett * docs/tmpl/section-iostream.sgml: Update tmpls 2013-04-05 Dave Beckett * build/pkg.m4, configure.ac: Switch libxml and libcurl to use PKG_PROG_PKG_CONFIG and PKG_CHECK_MODULES Preference is still to xml2-config and curl-config unless --with-curl-config=no --with-xml2-config=no are used * configure.ac: Die if xml2-config or xslt-config point at non executable files Patch from Michael Stahl - thanks Fixes Issue #0000534 http://bugs.librdf.org/mantis/view.php?id=535 * autogen.sh, configure.ac: Modernize LT_INIT call for libtool 2.2+ 2013-03-26 Dave Beckett * src/raptor2.h.in: Document raptor_escaped_write_bitflags enum values * docs/raptor2-sections.txt: Add escaped_write enum and functions * docs/raptor-1-to-2-map.tsv: 2.0.10 changes 2013-03-23 Dave Beckett * configure.ac: Add curl or libxml pkg-config requires iff they were found via pkg-config This enables building a good raptor pkg-config file when raptor is built with libxml or libcurl installs that provide xml2-config / curl-config, includes and libraries but no pkg-config files. 2013-03-12 Dave Beckett * autogen.sh, src/ntriples_parse.c: Handle variations of header macro Fixes Issue #0000532 http://bugs.librdf.org/mantis/view.php?id=532 * .travis.yml: Test travis-ci.org 2013-03-03 Dave Beckett * src/raptor_serialize_turtle.c: (raptor_uri_turtle_write): Wraps raptor_turtle_writer_uri * src/raptor_serialize_turtle.c: (raptor_term_turtle_write): Wraps raptor_turtle_writer_term * src/raptor_serialize_turtle.c: Make raptor_uri_to_turtle_counted_string use a turtle writer. (raptor_uri_to_turtle_counted_string): Use turtle writer and raptor_turtle_writer_uri. Add docs warning about inefficiency * src/raptor_serialize_turtle.c: Add docs warning about inefficiencies (raptor_init_serializer_turtle, raptor_uri_turtle_write, raptor_uri_to_turtle_counted_string, raptor_uri_to_turtle_string): Add doc note warning they are inefficient - a turtle writer is made and destroyed each time - and that a serializer is better. * src/raptor_statement.c: (raptor_statement_print): Use raptor_uri_print * src/raptor_turtle_writer.c: docs * src/raptor_turtle_writer.c: (raptor_turtle_writer_reference): Wraps raptor_uri_escaped_write * src/raptor_internal.h: Remove not needed RAPTOR_INTERNAL_API prefix * src/raptor_internal.h, src/raptor_turtle_writer.c: Added turtle writer methods for writing uris and term (raptor_turtle_writer_uri, raptor_turtle_writer_term): Added to write URIs and terms. * src/raptor2.h.in: Undeprecate raptor_statement_ntriples_write * src/raptor_escaped.c: (raptor_string_escaped_write): 0x7f is never written raw * tests/ntriples/testnq-1.nq, tests/ntriples/testnq-1.out: Remove spaces from test data URIs * src/raptor_escaped.c: (raptor_string_escaped_write): Decode unicode chars * src/raptor_escaped.c: (raptor_term_escaped_write): Encode uri not datatype uri * src/raptor_internal.h, src/raptor_serialize_turtle.c: Make raptor_turtle_is_legal_turtle_qname internal not static * src/raptor_serialize_ntriples.c: ws * src/raptor_serialize_ntriples.c, src/raptor_term.c: Use raptor_term_escaped_write instead of deprecated raptor_term_ntriples_write (raptor_bnodeid_ntriples_write, raptor_statement_ntriples_write): Use raptor_term_escaped_write instead of deprecated raptor_term_ntriples_write 2013-03-02 Dave Beckett * src/raptor_json_writer.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_turtle_writer.c: Use raptor_string_escaped_write instead of raptor_string_python_write (raptor_json_writer_quoted, raptor_json_serialize_avltree_visit, raptor_string_ntriples_write, raptor_turtle_writer_quoted_counted_string): Replace deprecated function with new one (raptor_turtle_writer_quoted_counted_string): Tidy code as well. * src/Makefile.am, src/raptor2.h.in, src/raptor_escaped.c, src/raptor_turtle_writer.c: Added escaped writing module to write Turtle/N-Triples terms Added enum of bitflags raptor_escaped_write_bitflags that describe the escaping wanted. (raptor_string_escaped_write): Added (raptor_string_python_write): Deprecated, now calls raptor_string_escaped_write() with flags. (raptor_term_escaped_write): Added. * src/raptor2.h.in, src/raptor_uri.c: (raptor_uri_escaped_write): Added 2013-02-27 Dave Beckett * tests/turtle-2013/Makefile.am, tests/turtle-2013/manifest.ttl: Remove manifest.ttl from dist 2013-02-26 Dave Beckett * CMakeLists.txt, NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.10 * Snapshotted raptor2_2_0_9 for 2.0.9 release (GIT 32b08d01e8c378b43ca2fee2b849b4d14b36c32d) * INSTALL.html, NEWS.html, RELEASE.html, TODO.html, UPGRADING.html: 2.0.9 2013-02-25 Dave Beckett * NEWS.html, README.html, RELEASE.html: 2.0.9 * src/Makefile.am, src/raptor2.h.in, src/raptor_sparql.c: (raptor_sparql_name_check_type): Removed - not used * Merge pull request #7 from dajobe/turtle-2013 Support Turtle 2013 2013-02-24 Dave Beckett * src/turtle_lexer.l: Terminate parsing at bad URI characters * tests/turtle/Makefile.am: Add bad-15.out bad-17.out bad-18.out bad-21.out bad-22.out to dist * tests/turtle-2013/Makefile.am: README * tests/turtle-2013/README: Add Turtle 2013 Readme * src/turtle_lexer.l: Use raptor_turtle_check_uri_string to valid IRIs in Turtle docs * src/turtle_common.c, src/turtle_common.h: Ensure only an IRI that matches Turtle rules passes parsing (raptor_turtle_check_uri_string): Added to check Turtle URI char rules * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Update Turtle URI writing to match Turtle 2013 encoding (raptor_turtle_writer_reference): Write URIs with Turtle 2013 escaped characters; must escape #x00-#x20<>\"{}|^` * tests/turtle/Makefile.am: Mark turtle tests bad-17 and bad-18 as now good * tests/turtle/bad-17.out, tests/turtle/bad-17.ttl, tests/turtle/bad-18.out, tests/turtle/bad-18.ttl: Mark turtle tests bad-17 and bad-18 as now good * tests/turtle/test-29.ttl: Turtle 2013 changes the way URIs are encoded :/ * src/turtle_parser.y: Fix statement list to match Turtle 2013 rules about '.'s Removes 4 lexer conflicts; now expect 0 * src/turtle_lexer.l: Fix DECIMAL, DOUBLE, INTEGER to match Turtle 2013. '123.' is now an integer followed by '.' not a double * src/turtle_common.c: Check for valid \u and \U escapes in turtle strings (raptor_stringbuffer_append_turtle_string) (raptor_turtle_expand_name_escapes): Added checking code. * src/turtle_lexer.l: Replace QUOTEDURI with Turtle 2013 IRI allowing u-escapes * tests/turtle-2013/Makefile.am: Report error counts and failing tests * src/turtle_lexer.l: ws * src/turtle_common.c, src/turtle_common.h, src/turtle_parser.y: Added turtle_expand_name_escapes for expanding escapes inline * src/turtle_lexer.l: Support '''single long''' quotes * src/turtle_lexer.l: Support 'single' quotes * src/turtle_lexer.l: \. * tests/turtle/Makefile.am, tests/turtle/bad-15.out, tests/turtle/bad-21.out, tests/turtle/bad-22.out: Turtle tests bad-15, bad-21 and bad-22 are good for Turtle 2013 * src/raptor_qname.c: (raptor_qname_string_to_uri): Handle qnames with two :s Need to handle ':foo:...' QNames; just care about first ':' * tests/turtle-2013/Makefile.am: Tidy and report number of errors * src/turtle_lexer.l: Fix Turtle 2013 lexing rules * src/turtle_lexer.l, src/turtle_parser.y: Switch to use LANGTAG for language tag * src/turtle_parser.y: Fixes for debugging bison * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Handle Turtle 2013 \-escapes 2013-02-23 Dave Beckett * src/turtle_parser.y: Be resilient to NULL turtle_parser in errors and qname lookups (turtle_syntax_error, turtle_qname_to_uri): Return NULL if no turtle_parser is present. * src/raptor_namespace.c: (raptor_namespaces_find_namespace): Be resilient to NULL or empty stack. * tests/turtle-2013/Makefile.am: more turtle 2013 syntax tests * src/turtle_parser.y: Allow blankNodePropertyList %expect from 2 to 4: State 25 conflicts: 2 shift/reduce State 59 conflicts: 2 shift/reduce Altered some rules to match Turtle 2013: - predicateObjectList: renamed from propertyList - predicateObjectListOpt: renamed from propertyListOpt - blankNode: renamed from blank and altered to match - subject: add blankNode and collection - object: add collection and blankNodePropertyList * src/turtle_lexer.l, src/turtle_parser.y: Support SPARQL "BASE " and "PREFIX : " for Turtle 2013 * tests/turtle-2013/Makefile.am: Add turtle 2013 syntax check files * tests/turtle-2013/LICENSE, tests/turtle-2013/Makefile.am, tests/turtle-2013/manifest.ttl, tests/turtle-2013/turtle-eval-bad-01.ttl, tests/turtle-2013/turtle-eval-bad-02.ttl, tests/turtle-2013/turtle-eval-bad-03.ttl, tests/turtle-2013/turtle-eval-bad-04.ttl, tests/turtle-2013/turtle-eval-struct-01.nt, tests/turtle-2013/turtle-eval-struct-01.ttl, tests/turtle-2013/turtle-eval-struct-02.nt, tests/turtle-2013/turtle-eval-struct-02.ttl, tests/turtle-2013/turtle-subm-01.nt, tests/turtle-2013/turtle-subm-01.ttl, tests/turtle-2013/turtle-subm-02.nt, tests/turtle-2013/turtle-subm-02.ttl, tests/turtle-2013/turtle-subm-03.nt, tests/turtle-2013/turtle-subm-03.ttl, tests/turtle-2013/turtle-subm-04.nt, tests/turtle-2013/turtle-subm-04.ttl, tests/turtle-2013/turtle-subm-05.nt, tests/turtle-2013/turtle-subm-05.ttl, tests/turtle-2013/turtle-subm-06.nt, tests/turtle-2013/turtle-subm-06.ttl, tests/turtle-2013/turtle-subm-07.nt, tests/turtle-2013/turtle-subm-07.ttl, tests/turtle-2013/turtle-subm-08.nt, tests/turtle-2013/turtle-subm-08.ttl, tests/turtle-2013/turtle-subm-09.nt, tests/turtle-2013/turtle-subm-09.ttl, tests/turtle-2013/turtle-subm-10.nt, tests/turtle-2013/turtle-subm-10.ttl, tests/turtle-2013/turtle-subm-11.nt, tests/turtle-2013/turtle-subm-11.ttl, tests/turtle-2013/turtle-subm-12.nt, tests/turtle-2013/turtle-subm-12.ttl, tests/turtle-2013/turtle-subm-13.nt, tests/turtle-2013/turtle-subm-13.ttl, tests/turtle-2013/turtle-subm-14.nt, tests/turtle-2013/turtle-subm-14.ttl, tests/turtle-2013/turtle-subm-15.nt, tests/turtle-2013/turtle-subm-15.ttl, tests/turtle-2013/turtle-subm-16.nt, tests/turtle-2013/turtle-subm-16.ttl, tests/turtle-2013/turtle-subm-17.nt, tests/turtle-2013/turtle-subm-17.ttl, tests/turtle-2013/turtle-subm-18.nt, tests/turtle-2013/turtle-subm-18.ttl, tests/turtle-2013/turtle-subm-19.nt, tests/turtle-2013/turtle-subm-19.ttl, tests/turtle-2013/turtle-subm-20.nt, tests/turtle-2013/turtle-subm-20.ttl, tests/turtle-2013/turtle-subm-21.nt, tests/turtle-2013/turtle-subm-21.ttl, tests/turtle-2013/turtle-subm-22.nt, tests/turtle-2013/turtle-subm-22.ttl, tests/turtle-2013/turtle-subm-23.nt, tests/turtle-2013/turtle-subm-23.ttl, tests/turtle-2013/turtle-subm-24.nt, tests/turtle-2013/turtle-subm-24.ttl, tests/turtle-2013/turtle-subm-25.nt, tests/turtle-2013/turtle-subm-25.ttl, tests/turtle-2013/turtle-subm-26.nt, tests/turtle-2013/turtle-subm-26.ttl, tests/turtle-2013/turtle-subm-27.nt, tests/turtle-2013/turtle-subm-27.ttl, tests/turtle-2013/turtle-syntax-bad-base-01.ttl, tests/turtle-2013/turtle-syntax-bad-base-02.ttl, tests/turtle-2013/turtle-syntax-bad-base-03.ttl, tests/turtle-2013/turtle-syntax-bad-esc-01.ttl, tests/turtle-2013/turtle-syntax-bad-esc-02.ttl, tests/turtle-2013/turtle-syntax-bad-esc-03.ttl, tests/turtle-2013/turtle-syntax-bad-esc-04.ttl, tests/turtle-2013/turtle-syntax-bad-kw-01.ttl, tests/turtle-2013/turtle-syntax-bad-kw-02.ttl, tests/turtle-2013/turtle-syntax-bad-kw-03.ttl, tests/turtle-2013/turtle-syntax-bad-kw-04.ttl, tests/turtle-2013/turtle-syntax-bad-kw-05.ttl, tests/turtle-2013/turtle-syntax-bad-lang-01.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-01.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-02.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-03.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-04.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-05.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-06.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-07.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-08.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-09.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-10.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-11.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-12.ttl, tests/turtle-2013/turtle-syntax-bad-n3-extras-13.ttl, tests/turtle-2013/turtle-syntax-bad-num-01.ttl, tests/turtle-2013/turtle-syntax-bad-num-02.ttl, tests/turtle-2013/turtle-syntax-bad-num-03.ttl, tests/turtle-2013/turtle-syntax-bad-num-04.ttl, tests/turtle-2013/turtle-syntax-bad-num-05.ttl, tests/turtle-2013/turtle-syntax-bad-pname-01.ttl, tests/turtle-2013/turtle-syntax-bad-pname-02.ttl, tests/turtle-2013/turtle-syntax-bad-pname-03.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-01.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-02.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-03.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-04.ttl, tests/turtle-2013/turtle-syntax-bad-prefix-05.ttl, tests/turtle-2013/turtle-syntax-bad-string-01.ttl, tests/turtle-2013/turtle-syntax-bad-string-02.ttl, tests/turtle-2013/turtle-syntax-bad-string-03.ttl, tests/turtle-2013/turtle-syntax-bad-string-04.ttl, tests/turtle-2013/turtle-syntax-bad-string-05.ttl, tests/turtle-2013/turtle-syntax-bad-string-06.ttl, tests/turtle-2013/turtle-syntax-bad-string-07.ttl, tests/turtle-2013/turtle-syntax-bad-struct-01.ttl, tests/turtle-2013/turtle-syntax-bad-struct-02.ttl, tests/turtle-2013/turtle-syntax-bad-struct-03.ttl, tests/turtle-2013/turtle-syntax-bad-struct-04.ttl, tests/turtle-2013/turtle-syntax-bad-struct-05.ttl, tests/turtle-2013/turtle-syntax-bad-struct-06.ttl, tests/turtle-2013/turtle-syntax-bad-struct-07.ttl, tests/turtle-2013/turtle-syntax-bad-struct-08.ttl, tests/turtle-2013/turtle-syntax-bad-struct-09.ttl, tests/turtle-2013/turtle-syntax-bad-struct-10.ttl, tests/turtle-2013/turtle-syntax-bad-struct-11.ttl, tests/turtle-2013/turtle-syntax-bad-struct-12.ttl, tests/turtle-2013/turtle-syntax-bad-struct-13.ttl, tests/turtle-2013/turtle-syntax-bad-struct-14.ttl, tests/turtle-2013/turtle-syntax-bad-struct-15.ttl, tests/turtle-2013/turtle-syntax-bad-struct-16.ttl, tests/turtle-2013/turtle-syntax-bad-struct-17.ttl, tests/turtle-2013/turtle-syntax-bad-uri-01.ttl, tests/turtle-2013/turtle-syntax-bad-uri-02.ttl, tests/turtle-2013/turtle-syntax-bad-uri-03.ttl, tests/turtle-2013/turtle-syntax-bad-uri-04.ttl, tests/turtle-2013/turtle-syntax-bad-uri-05.ttl, tests/turtle-2013/turtle-syntax-base-01.ttl, tests/turtle-2013/turtle-syntax-base-02.ttl, tests/turtle-2013/turtle-syntax-base-03.ttl, tests/turtle-2013/turtle-syntax-base-04.ttl, tests/turtle-2013/turtle-syntax-bnode-01.ttl, tests/turtle-2013/turtle-syntax-bnode-02.ttl, tests/turtle-2013/turtle-syntax-bnode-03.ttl, tests/turtle-2013/turtle-syntax-bnode-04.ttl, tests/turtle-2013/turtle-syntax-bnode-05.ttl, tests/turtle-2013/turtle-syntax-bnode-06.ttl, tests/turtle-2013/turtle-syntax-bnode-07.ttl, tests/turtle-2013/turtle-syntax-bnode-08.ttl, tests/turtle-2013/turtle-syntax-bnode-09.ttl, tests/turtle-2013/turtle-syntax-bnode-10.ttl, tests/turtle-2013/turtle-syntax-datatypes-01.ttl, tests/turtle-2013/turtle-syntax-datatypes-02.ttl, tests/turtle-2013/turtle-syntax-file-01.ttl, tests/turtle-2013/turtle-syntax-file-02.ttl, tests/turtle-2013/turtle-syntax-file-03.ttl, tests/turtle-2013/turtle-syntax-kw-01.ttl, tests/turtle-2013/turtle-syntax-kw-02.ttl, tests/turtle-2013/turtle-syntax-kw-03.ttl, tests/turtle-2013/turtle-syntax-lists-01.ttl, tests/turtle-2013/turtle-syntax-lists-02.ttl, tests/turtle-2013/turtle-syntax-lists-03.ttl, tests/turtle-2013/turtle-syntax-lists-04.ttl, tests/turtle-2013/turtle-syntax-lists-05.ttl, tests/turtle-2013/turtle-syntax-number-01.ttl, tests/turtle-2013/turtle-syntax-number-02.ttl, tests/turtle-2013/turtle-syntax-number-03.ttl, tests/turtle-2013/turtle-syntax-number-04.ttl, tests/turtle-2013/turtle-syntax-number-05.ttl, tests/turtle-2013/turtle-syntax-number-06.ttl, tests/turtle-2013/turtle-syntax-number-07.ttl, tests/turtle-2013/turtle-syntax-number-08.ttl, tests/turtle-2013/turtle-syntax-number-09.ttl, tests/turtle-2013/turtle-syntax-number-10.ttl, tests/turtle-2013/turtle-syntax-number-11.ttl, tests/turtle-2013/turtle-syntax-pname-esc-01.ttl, tests/turtle-2013/turtle-syntax-pname-esc-02.ttl, tests/turtle-2013/turtle-syntax-pname-esc-03.ttl, tests/turtle-2013/turtle-syntax-prefix-01.ttl, tests/turtle-2013/turtle-syntax-prefix-02.ttl, tests/turtle-2013/turtle-syntax-prefix-03.ttl, tests/turtle-2013/turtle-syntax-prefix-04.ttl, tests/turtle-2013/turtle-syntax-prefix-05.ttl, tests/turtle-2013/turtle-syntax-prefix-06.ttl, tests/turtle-2013/turtle-syntax-prefix-07.ttl, tests/turtle-2013/turtle-syntax-prefix-08.ttl, tests/turtle-2013/turtle-syntax-prefix-09.ttl, tests/turtle-2013/turtle-syntax-str-esc-01.ttl, tests/turtle-2013/turtle-syntax-str-esc-02.ttl, tests/turtle-2013/turtle-syntax-str-esc-03.ttl, tests/turtle-2013/turtle-syntax-string-01.ttl, tests/turtle-2013/turtle-syntax-string-02.ttl, tests/turtle-2013/turtle-syntax-string-03.ttl, tests/turtle-2013/turtle-syntax-string-04.ttl, tests/turtle-2013/turtle-syntax-string-05.ttl, tests/turtle-2013/turtle-syntax-string-06.ttl, tests/turtle-2013/turtle-syntax-string-07.ttl, tests/turtle-2013/turtle-syntax-string-08.ttl, tests/turtle-2013/turtle-syntax-string-09.ttl, tests/turtle-2013/turtle-syntax-string-10.ttl, tests/turtle-2013/turtle-syntax-string-11.ttl, tests/turtle-2013/turtle-syntax-struct-01.ttl, tests/turtle-2013/turtle-syntax-struct-02.ttl, tests/turtle-2013/turtle-syntax-struct-03.ttl, tests/turtle-2013/turtle-syntax-struct-04.ttl, tests/turtle-2013/turtle-syntax-struct-05.ttl, tests/turtle-2013/turtle-syntax-uri-01.ttl, tests/turtle-2013/turtle-syntax-uri-02.ttl, tests/turtle-2013/turtle-syntax-uri-03.ttl, tests/turtle-2013/turtle-syntax-uri-04.ttl: Add Turtle 2013 tests from W3C * src/.gitignore: Exclude .trs files from newer automate test framework * src/turtle_lexer.l: Add Turtle 2013 rules Added PN_CHARS_BASE (no Unicode), PN_CHARS from Turtle 2013 Added BS_ESCAPES based on Turtle 2013 PN_LOCAL escapes Added HEX Added PLX from Turtle 2013 Added BN_LABEL, PN_PREFIX and PN_LOCAL based on Turtle 2013 rules. Redefine QNAME in terms of PN_PREFIX and PN_LOCAL Replace BNAME with BN_LABEL for blank node label Use PN_PREFIX for @prefix prefix * configure.ac, tests/Makefile.am: Add tests/turtle-2013 2013-02-22 Dave Beckett * build/.gitignore: Ignore automake test-driver * src/CMakeLists.txt: Add raptor_sparql.c * src/raptor_sparql.c: comment 2013-02-21 Dave Beckett * src/raptor_sparql.c: docs * src/raptor_sparql.c: (raptor_sparql_name_check): Check hex * src/Makefile.am, src/raptor2.h.in, src/raptor_qname.c, src/raptor_sparql.c: Add sparql name check module * src/raptor_qname.c: (raptor_sparql_name_check): Added to check sparql / turtle names Adds new enum raptor_sparql_name_check_type 2013-02-20 Dave Beckett * src/raptor_www.c: (raptor_www_set_ssl_verify_options): Update docs to match curl latest 2013-02-18 Dave Beckett * INSTALL.html: Document how to find gtkdocize Fixes Issue #0000526 http://bugs.librdf.org/mantis/view.php?id=526 2013-02-13 Dave Beckett * src/raptor_www_curl.c: Never use CURLOPT_SSL_VERIFYHOST with a value of 2 (raptor_www_curl_set_ssl_verify_options): curl 7.28.1 removed the value 1 from being legal: http://daniel.haxx.se/blog/2012/10/25/libcurl-claimed-to-be-dangerous/CURL GIT commit da82f59b697310229ccdf66104d5d65a44dfab98 Sat Oct 27 12:31:39 2012 +0200 Legal values are: 0 to disable host verifying 2 (default) to enable host verifyinging 2013-01-24 Dave Beckett * ChangeLog: 2.0.9 and 2013 2013-01-23 Dave Beckett * librdfa/triple.c: Output correct literal datatypes ^^ librdfa commit f3d10545bc2dd4a7aa940dd11dfcb6c6035e23a4 2013-01-03 Dave Beckett * ChangeLog, LICENSE.html, NEWS.html, README.html, RELEASE.html: 2.0.9 and 2013 raptor2-2.0.15/NEWS0000644000175000017500000006770212425347041010626 00000000000000 Raptor RDF Syntax Library - News 2014-11-01 Raptor2 Version 2.0.15 Released Made several fixes to Turtle / N-Triples family of parsers and serializers Added utility functions for re-entrant sorting of objects and sequences. Made other fixes and improvements including fixing reported issues: 0000574, 0000575, 0000576, 0000577, 0000579, 0000581 and 0000584. See the Raptor2 2.0.15 Release Notes for the full details of the changes. 2014-05-05 Raptor2 Version 2.0.14 Released Many code quality fixes from clang and coverity primarily in error path cleanups (oom) and dead code. Fixed Turtle 1.1 parser about triple quoting alignment with SPARQL A few internal changes. See the Raptor2 2.0.14 Release Notes for the full details of the changes. 2013-01-29 Raptor2 Version 2.0.13 Released Fix configure not finding curl when curl-config --cflags is empty Fixed reported issue: 0000562. See the Raptor2 2.0.13 Release Notes for the full details of the changes. 2013-12-13 Raptor2 Version 2.0.12 Released N-Triples / N-Quads parser updated to pass all the RDF 1.1 2013 tests Added raptor_new_term_from_counted_string() See the Raptor2 2.0.12 Release Notes for the full details of the changes. 2013-11-24 Raptor2 Version 2.0.11 Released Completed support for RDF 1.1 N-Triples (aka N-Triples 2013) Added a few new API calls Made several build, portability and configuration improvements Fixed reported issues: 0000554 and 0000556. See the Raptor2 2.0.11 Release Notes for the full details of the changes. 2013-07-27 Raptor2 Version 2.0.10 Released Completed support for Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013 (Turtle 2013) Added support for N-Triples W3C Working Group Note 09 April 2013 (N-Triples 2013) Added a few new Turtle and N-Triples support functions Update configure to better handle mixed pkg-config settings Fixed reported issues: 0000532, 0000535, 0000545 and 0000548 See the Raptor2 2.0.10 Release Notes for the full details of the changes. 2013-02-26 Raptor2 Version 2.0.9 Released Added full parsing and serializing support for Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013 Added CMake build framework for building Raptor on Microsoft (Daniel Richard G.) Made a few minor fixes and improvements Fixed reported issues: 0000499, 0000508, 0000520, 0000521 and 0000526 See the Raptor2 2.0.9 Release Notes for the full details of the changes. 2012-06-24 Raptor2 Version 2.0.8 Released Added support for RDFa 1.1 via updated librdfa Multiple portability fixes for Windows and Solarises. (Daniel Richard G.) Multiple minor fixes and improvements Fixed reported issues: 0000381, 0000487, 0000505 and 0000507 See the Raptor2 2.0.8 Release Notes for the full details of the changes. 2012-03-22 Raptor2 Version 2.0.7 Released CVE-2012-0037 fixed Removed Expat support Removed internal Unicode NFC code for better and optional ICU Added options for denying file requests and XML entity loading Added options for SSL certificate verifying Fixed reported issues: 0000448 and 0000469 See the Raptor2 2.0.7 Release Notes for the full details of the changes. 2011-11-27 Raptor2 Version 2.0.6 Released Fixed expat support which was broken in 2.0.5 Handle libCurl SSL options before 7.16.4 (2007) Add a few sequence utility methods for sort, reverse and permute See the Raptor2 2.0.6 Release Notes for the full details of the changes. 2011-11-14 Raptor2 Version 2.0.5 Released All parsers and serializers use the W3C Format URIs as their primary URI N-Quads parser can now handle optional context/graph URI Turtle serializer uses official text/turtle mime type Added some additional UTF-8 and snprintf utility functions No longer needs math functions trunc, lround and round. Several internal code style fixes and cleanups Fixed reported issues: 0000465, 0000476, 0000479 and 0000481. See the Raptor2 2.0.5 Release Notes for the full details of the changes. 2011-07-25 Raptor2 Version 2.0.4 Released RDF/JSON parser now supports YAJL V2 Support libcurl 7.21.7 that removed the curl/types.h header TRiG parser now supports the optional ':' in 'uri : { }' syntax WWW module now supports setting SSL client side certificates Fixed reported issues: 0000308, 0000449, 0000451, 0000455, 0000456 and 0000457 See the Raptor2 2.0.4 Release Notes for the full details of the changes. 2011-06-01 Raptor2 Version 2.0.3 Released Added a raptor2.h header Turtle / TRiG parser improvements for larger documents Fixes from LLVM clang static code analyzer Fixed reported issues: 0000437. See the Raptor2 2.0.3 Release Notes for the full details of the changes. 2011-03-20 Raptor2 Version 2.0.2 Released Fixed a too strict version checking bug in raptor_new_world() See the Raptor2 2.0.2 Release Notes for the full details of the changes. 2011-03-20 Raptor Version 2.0.1 Released DO NOT USE. Use 2.0.2 which fixes a too strict version checking bug in raptor_new_world() Some minor fixes: The N-Quads serializer was fixed to output the graph name correctly The RDFa parser built with librdfa can now be linked with the standard librdfa Fixed reported issues: 0000416. See the Raptor 2.0.1 Release Notes for the full details of the changes. 2011-01-03 Raptor Version 2.0.0 Released Raptor 2 final release Some minor API changes since the last beta. Fixed reported issue: 0000405. The Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 2.0.0 provides detailed function, macro, enum and type changes. The upgrading document explains how to upgrade existing Raptor V1 code to the new APIs. See the Raptor 2.0.0 Release Notes for the full details of the changes. 2010-12-01 Raptor Version 1.9.1 Released Raptor 2 second beta release with some API changes. 2.0.0 final expected next. Improved the V1 to V2 upgrading script raptor_new_world() checks Raptor header and library are consistent Constructors now validate the world pointer is from Raptor V2 Added an N-Quads parser Added and removed a few API calls Fixed a few bugs including reported issue 0000402 The Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 1.9.1 provides detailed function, macro, enum and type changes. The upgrading document explains how to upgrade existing Raptor V1 code to the new APIs. See the Raptor 1.9.1 Release Notes for the full details of the changes. 2010-08-16 Raptor Version 1.9.0 Released Raptor 2 first beta release. There may be changes before a stable 2.0.0 API Removed all deprecated functions and typedefs. Renamed all functions to the standard raptor_class_method form. All constructors take a raptor_world argument. URIs are interned and there is no longer a swappable implementation. Statement is now an array of 3-4 RDF Terms to support triples and quads. World object owns logging, blank node ID generation and describing syntaxes. Features are now called options and have typed values. GRDDL parser now saves and restores shared libxslt state. Added serializers for HTML 'html' and N-Quads 'nquads'. Added parser 'json' for JSON-Resource centric and JSON-Triples. Switched to GIT version control hosted by GitHub. Added memory-based AVL-Tree to the public API. Fixed reported issues: 0000357, 0000361, 0000369, 0000370, 0000373 and 0000379 The Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 1.9.0 provides detailed function and type changes. The upgrading document explains how to upgrade existing Raptor V1 code to the new APIs. See the Raptor 1.9.0 Release Notes for the full details of the changes. 2010-01-30 Raptor Version 1.4.21 Released This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway. RDFa parser buffer management problems were fixed Turtle parser and serializer now use QNames correctly against specification RDF/XML parser now resets correctly to detect duplicate rdf:IDs Made a few other minor bug and build fixes Fixed reported issues: 0000318, 0000319, 0000326, 0000331, 0000332 and 0000337 See the Raptor 1.4.21 Release Notes for the full details of the changes. 2009-11-28 Raptor Version 1.4.20 Released Turtle serializing performance improvement by Chris Cannam librdfa RDFa parser updates to fix empty datatype, xml:lang and 1-char prefixes by Manu Sporny Fix a crash when the GRDDL parser reported errors Enable large file support for 32-bit systems Several resilience improvements by Lauri Aalto Other minor portability and bug fixes Fixed reported issues: 0000306 0000307 0000310 and 0000312. See the Raptor 1.4.20 Release Notes for the full details of the changes. 2009-07-19 Raptor Version 1.4.19 Released Many improvements to RSS tag soup (RSSes and Atom) parser and the RSS 1.0 and Atom serializers Several fixes and improvements to the N-Triples, RDFa and RDF/XML parsers and Turtle serializer Improved the use and configuration of static libxml functions for better compatibility Several Win32 portability fixes - Lou Sakey Many internal changes for upcoming Raptor V2 - primarily by Lauri Aalto Many other fixes and resilience improvements. Fixed reported issues: 0000259, 0000262, 0000263, 0000266, 0000269, 0000270, 0000276, 0000277, 0000287, 0000288, 0000289, 0000290, 0000293, 0000296, 0000299 and 0000303. WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering. See the Raptor 1.4.19 Release Notes for the full details of the changes. 2008-06-25 Raptor Version 1.4.18 Released Added an RDFa parser using an embedded version of librdfa by Manu Sporny of Digital Bazaar. Added an Atom 1.0 (RFC 4287) serializer with several output parameters. Improved RSS 1.0 serializer functionality and resilience. Added new API methods for qname, serializer, sequence and XML writer classes. Many other fixes and resilience improvements. Fixed reported issues: 0000186 and 0000255. See the Raptor 1.4.18 Release Notes for the full details of the changes. 2008-03-30 Raptor Version 1.4.17 Released Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples' Added a new public XML SAX2 API class Added a new error handling structure Made the I/O Stream class support reading Added several new API methods. Made several fixes, portability and resilience improvements. Fixed reported issues: 0000252 and 0000245. See the Raptor 1.4.17 Release Notes for the full details of the changes. 2007-10-01 Raptor Version 1.4.16 Released 100% support for the GRDDL W3C Recommendation of 2007-09-11 Turtle parser and serializer were updated to support @base from Turtle 2007-09-11. Turtle and RDF/XML serializers had performance improvements for large graphs. Added a TRiG Parser based on Turtle with named graph support. Several other API changes, fixed and improvements were made. Fixed reported issues: 0000188, 0000192, 0000194, 0000195, 0000207, 0000210, 0000214, 0000216, 0000217, 0000232, 0000237, 0000238 and 0000239 Many other fixes and improvements. See the Raptor 1.4.16 Release Notes for the full details of the changes. 2007-03-26 Raptor Version 1.4.15 Released GRDDL parser substantially updated to support the GRDDL W3C Working Draft 2 March 2007 Errors for XML parsing and URI 404s are reported much better Fixed reported issues: 0000174, 0000177, 0000178, 0000180 Many other minor fixes and improvements. See the Raptor 1.4.15 Release Notes for the full details of the changes. 2007-01-31 Raptor Version 1.4.14 Released New Turtle serializer by Dave Robillard based on the existing RDF/XML-Abbrev serializer. New GraphViz DOT format serializer by Evan Nemerson. GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes. Fixed reported issues: 0000032, 0000141, 0000143, 0000148, 0000155 and 0000157 Many other fixes and improvements. See the Raptor 1.4.14 Release Notes for the full details of the changes. 2006-10-22 Raptor Version 1.4.13 Released Fixed a memory leak in reusing the XML writer Fixed reported issues: 0000134 Minor updates and fixes to tutorial, configuration and build See the Raptor 1.4.13 Release Notes for the full details of the changes. 2006-08-27 Raptor Version 1.4.12 Released Restore serializer enumeration ordering back to that of 1.4.10 which was causing Redland problems when writing type 'application/rdf+xml'. See the Raptor 1.4.12 Release Notes for the gory details. 2006-08-26 Raptor Version 1.4.11 Released Added network request filtering for parsers Improved the GRDDL parser to read Embedded RDF and HCalendar The Guess parser can now be reused to do multiple guesses The RSS 1.0 Serializer now works again Fixed reported issues: 0000014, 0000041, 0000089, 0000091 , 0000110 and 0000112 Made several other changes, fixes and improvements. See the Raptor 1.4.11 Release Notes for the full details of the changes. 2006-07-14 Raptor Version 1.4.10 Released Fixed a crash with RSS Tag Soup parser generating triples too late Fixed a crash with the RDF/XML parser and serializer if a comment was seen outside an element Parsers no longer generate any triple parts of type RAPTOR_IDENTIFIER_TYPE_ORDINAL See the Raptor 1.4.10 Release Notes for the full details of the changes. 2006-04-22 Raptor Version 1.4.9 Released Raptor Tutorial added covering parsing and serializing with examples Raptor Reference Manual now covers 100% of the public API rapper can now pretty-print RDF using namespaces as hints Turtle parser gains boolean literals Requests for content now send appropriate Accept: headers No longer require libxml for rss-tag-soup parser Various Win32 fixes and VC build files updates (John Barstow) Many other bug fixes and changes were made. NOTE: Generation of RAPTOR_IDENTIFIER_TYPE_PREDICATE was removed as deprecated in 1.4.8. See the Raptor 1.4.9 Release Notes for the full details of the changes. 2006-01-03 Raptor Version 1.4.8 Released RSS Tag Soup parser now reads Atom 1.0 and rewrites old Atom 0.3 terms Added a guess parser that picks the parser to use based on protocol information such as HTTP Content-Type Created an enhanced API reference manual with gtk-doc Serializers to build can now be selected at configure time Parsers can now return the namespace prefix/URIs seen in parsing Turtle parser update to version 2006-01-02 (announcement) Fix for URI resolution bugs (win32 fix by John Barstow) Several parser bug fixes for RDF/XML, RSS and GRDDL RDF/XML serializers and XML writer can write XML 1.0 or XML 1.1 Added an alpha Atom 1.0 serializer Added an Adobe XMP (RDF/XML profile) serializer Internal source reorganisation Many other changes, fixes and improvements. NOTE: Raptor will be switching to use Subversion for version control after the 1.4.8 release. See the Redland Subversion site or the online Raptor installation notes for the latest information. See the Raptor 1.4.8 Release Notes for the full details of the changes. 2005-06-08 Raptor Version 1.4.7 Released Fix crashes in the RSS tag soup parser / serializer (Suzan Foster) Fix a crash in the RDF/XML serializers with bad URI predicates. See the Raptor 1.4.7 Release Notes for the full details of the changes. 2005-05-19 Raptor Version 1.4.6 Released Added a Gleaning Resource Descriptions from Dialects of Languages (GRDDL) parser for reading XHTML and XML as RDF triples Updated RSS enclosures support in RSS tag soup parser and RSS 1.0 serializer (Suzan Foster) Fixed several crashes with RSS tag soup parser, RDF/XML-abbrev serializer. The turtle parser now accepts """long literals""" See the Raptor 1.4.6 Release Notes for the full details of the changes. 2005-02-06 Raptor Version 1.4.5 Released Added an RDF/XML with abbreviations serializer (Steve Shepard) Handle RSS 1.1 in RSS tag soup parser More fixes for broken OSX libxml2 See the Raptor 1.4.5 Release Notes for the full details of the changes. 2005-01-15 Raptor Version 1.4.4 Released Fixed crashes in RSS tag soup parser and RSS 1.0 serializer Handle RSS 0.9 namespace in RSS tag soup parser Portability fixes for Win32 (Dave Viner) See the Raptor 1.4.4 Release Notes for the full details of the changes. 2005-01-03 Raptor Version 1.4.3 Released New XML Writer API Improved RDF/XML serializer allowing user namespace declarations and writing relative URIs where possible New RSS 1.0 serializer Updated RSS tag soup parser URI class can write relative URIs (Patch from René Puls) Many other API changes See the Raptor 1.4.3 Release Notes for the full details of the changes. 2004-11-01 Raptor Version 1.4.2 Released Fix raptor_xml_escape_string error return. See the Raptor 1.4.2 Release Notes for the full details of the changes. 2004-10-29 Raptor Version 1.4.1 Released Fixed crashes in URI decoding and RSS enclosures. See the Raptor 1.4.1 Release Notes for the full details of the changes. 2004-10-24 Raptor Version 1.4.0 Released Added a serializing class for writing RDF triples as a syntax Added serializers for RDF/XML and N-Triples Added an I/O stream class for aiding writing Added RSS enclosure support to RSS Tag Soup parser (Suzan Foster) See the Raptor 1.4.0 Release Notes for the full details of the changes. 2004-09-20 Raptor Version 1.3.3 Released License changed to LGPL 2.1/Apache 2 Added a new Unicode NFC checker Rewritten URI parsing and resolving code Added configure selection of RDF parsers Updated the RSS Tag Soup parser to handle Atom 0.3 Updated the Turtle parser to handle large documents (Geoff Chappell) Added a parser feature to disable rdf:ID duplicate checking Updated rdf:ID duplicate value checking implementation Portability fixes for building on win32 (Chris Pointon) See the Raptor 1.3.3 Release Notes for the full details of the changes. 2004-07-21 Raptor Version 1.3.2 Released Added support for compiling against expat source trees (Mark Smith) Added raptor_alloc_memory to allocate memory in raptor, typically needed by handler routines on win32. Make errors in fetching WWW content pass to the main error handler. Added accessor functions for parts of the raptor_locator structure (Edd Dumbill) Disabled the broken Unicode NFC checking via GNOME glib for this release. See the Raptor 1.3.2 Release Notes for the full details of the changes. 2004-06-12 Raptor Version 1.3.1 Released Correct raptor_print_statement declaration argument statement to have one less 'const', to match the code. raptor.h now includes stdarg.h Portability fixes for win32 Updates to Turtle parser to only allow language with non-datatyped literals; allow a '_' immediately after a ':' in qnames and make bare ':' work. Added a warning for unknown rdf:parseType values, when parsing in lax mode. This is controlled by a new parser feature warn_other_parsetypes The Turtle parser was fixed to re-initialise correctly when performing multiple parsings Fixes to the file: URI support for %-escaping and for Win32 filenames See the Raptor 1.3.1 Release Notes for the full details of the changes. 2004-05-11 Raptor Version 1.3.0 Released Updated Turtle parser to fix the collections syntax, add integer literals and allow - in names. Added support for guessing a parser from content or identifiers Completed parser feature support Added sending HTTP Accept: headers for WWW retrieval when possible Added new utility sequence and stringbuffer classes Several other functions added and improvements made. See the Raptor 1.3.0 Release Notes for the full details of the changes. 2004-01-24 Raptor Version 1.2.0 Released Added a Turtle parser (was N-Triples Plus) now with collections. Added raptor_syntaxes_enumerate to get syntax name, label, mime_type or uri_string of all known parsers. Added WWW access via BSD libfetch if available. Updated the GNOME GUI grapper program to report errors and warnings 2003-12-31 Raptor Version 1.1.0 Released Added an N-Triples Plus parser Updated for RDF/XML Revised Working Draft (10 October 2003) allowing rdf:RDF to be optional by default. No further changes were needed for RDF/XML Revised Proposed Recommendation (15 December 2003) Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*. Added the XML namespace, XML namespace stack and XML qname classes to the public API. Added a function to discover supported parsers. Fixes for line number counting in N-Triples Added support for libxml2 SAX2 API for 2.6.0 and later. The N-Triples parser now uses the generate ID code. Added configure options for XML 1.1 names and disabling NFC check code. 2003-09-08 Raptor Version 1.0.0 Released Several long-deprecated functions were removed and consequently the library shared version number was increased to 1 Fixed scanning for rdf:RDF so that RDF/XML in other XML works, such as in SVG raptor-config --libs now works, added --libtool-libs and --version-decimal Check N-Triples legal Unicode character range #x0-#x10FFFF Normalize RDF/XML xml:lang and N-Triples language to lowercase on input Worked around libxml2 bug causing a crash on some error reporting Added raptor_parse_file_stream for parsing a C FILE* Tidied rapper utility argument handling, added --version 2003-08-25 Raptor Version 0.9.12 Released Fix some XML memory leaks in Exclusive XML Canonicalization. Stop parsing RSS tag soup after a user abort Improved N-Triples syntax checking. Crash fixes for 64 bit Alpha/Sparc Linux/Solaris (varargs, size_t) Fixed some other minor memory leaks with rdf:datatype and rdf:ID attributes. 2003-07-29 Raptor Version 0.9.11 Released Completely handles the revised RDF/XML syntax (including post W3C Last Call changes) Added Unicode Normal Form C (NFC) checking for literals (requires GNOME glib 2.0 at present) Added Exclusive XML Canonicalization for XML Literals Added many more checks for bad syntax (mostly illegal property attributes) Updated parseType="Collection" triples after RDF Core WG change Added an experimental RSS Tag Soup parser to read any pile of XML that has elements such as channel, image, item tags with title, description etc inside them into coherent RSS 1.0 RDF triples. (Requires libxml 2.5.0 or newer) API: Added new methods raptor_get_name, raptor_get_label. API: Added new methods raptor_set_default_generate_id_parameters and raptor_set_generate_id_handler to control generation of IDs. API: Modified utility function raptor_xml_escape_string arguments. Ripped out ISO 3166 country code parts since commercial use might be subject to a license fee. Improvements to GTK example 'grapper'. Several internal reorganisations for pulling out a SAX2 API, XML C14N. Other minor bug fixes. 2003-04-17 Raptor Version 0.9.10 Released Added parser lax / strict modes. lax is the default. rdf:bagID now generates a warning in lax mode, an error in strict Added raptor_www_no_www_library_init_finish to allow disabling of WWW library startup/shutdown. Added raptor_parse_abort to abort parsing inside a callback. Added a GTK GUI example program grapper Other minor bug fixes. 2003-03-28 Raptor Version 0.9.9 Released Performance improvements - uses less memory, less repeated small malloc/free sequences, faster for larger files. Added WWW retrieval - can parse from an URI as well as files, given either libcurl or libxml2 is available. Minor bug fixes. Various Win32 configure, building patches Sources updated to use autoconf 1.6+, automake 2.52+ More debian packaging updates. 2003-02-13 Raptor Version 0.9.8 Released Minor bug fixes (synchronising with Redland 0.9.12 release). Fixed crashing on empty files Fixed accepting illegal xmlns:prefix="" (prefix without URI not allowed) N-Triples bnodeIDs can now have '0's Utility program rdfdump renamed to rapper; name conflicted with a common Linux utility. 2002-12-20 Raptor Version 0.9.7 Released Passes about 90% of RDF Core WG Test Cases All memory leaks fixed Portability fixes - compilers, scripts, auto* tools, libxml2 version rdf:ID syntax and duplicates checked rdf:bagID supported Added more conformance tests, errors and warnings. 2002-11-02 Raptor Version 0.9.6 Released Calling API changed to provide a common interface to the RDF parsers. The libraptor.3 manual page describes the changes. Added support for RDF datatyped literals in RDF/XML with rdf:datatype attribute on property elements and N-Triples with the "string"^^. Added support for rdf:parseType="Collection" for RDF Collections URI class allows swappable implementation by applications. URI class now handles file: URIs for Win32 and Unix conventions. Fixes to enable it to work on Apple OSX 10.1, 10.2 (also tested working on Linux/x86, Solaris/sparc, FreeBSD/x86) Many internal changes to support API changes, allow it to work with Redland when compiled as a separate library Reorganised source into separate modules - URI, xml parser, ntriples parser, XML namespaces, XML qnames, locator. More resilience with XML errors and XML parser errors - none of libxml2's XML test suite examples crash raptor. N-Triples parser recovers gracefully from errors in content Packing for debian included Added manual pages libraptor.3 and rapper.1 Added raptor-config script for compiling with the library. 2002-06-08 Raptor Version 0.9.5 Released Many bugs fixed Added full relative URI resolving Work around bugs in libxml and expat (older versions) Support libxml with the use of entities in the document Support xml:lang passing to application 2002-03-27 Raptor Version 0.9.4 Released XML Base support (xml:base) added xml:lang support added with N-Triples lang-string support All N-Triples string escapes implemented N-Triples support with XML literals - xml("") and plain "foo" removed all special code for containers; treated as regular typedNodes rdf:parseType="Literal" now working Builds as shared and static libraries Conformance test suite added 2001-08-21 Raptor Version 0.9.3 Released N-Triples parser added rdf:parseType="Literal" works much better (Aaron Michal and me) DAML collections support added (Aaron Michal) Win32 patch added - I can't confirm my merge didn't break this (Aaron Michal) N-Triples updated to support CR, LF and CR LF endings Make parser generated ids appear distinguised from regular URIs Added N-Triples output Made rdf:type, rdf:value as property attributes work Made empty typed nodes work GNOME xml / libxml error location (line, column) values corrected. 2001-07-03 Raptor Version 0.9.2 Released Now called Raptor 2001-06-06 Raptor Version 0.9.1 Released Many bug fixes Updates for Redland API changes Fixed rdf:parsetype="Literal" buffer overrun Added better XML parser auto-detection for various expats and libxml 2001-01-22 Raptor Version 0.9.0 Released First release __________________________________________________________________ Copyright (C) 2001-2014 Dave Beckett Copyright (C) 2001-2005 University of Bristol raptor2-2.0.15/ChangeLog.100000644000175000017500000010512311472513121012101 000000000000002009-11-29 Dave Beckett * Merge from raptor 1.4.20 release SVNr15728 to trunk 2009-11-28 Dave Beckett * Merge RDFa changes from Raptor branch raptor1 (r15719) * Snapshotted raptor_1_4_20 for 1.4.20 release (SVN 15727) * tests/rdfa/0172.out, tests/rdfa/0172.xhtml, tests/rdfa/0173.out, tests/rdfa/0173.xhtml, tests/rdfa/0174.out, tests/rdfa/0174.xhtml, tests/rdfa/Makefile.am: Added unapproved RDFa tests from librdfa upstream test suite: 0172: empty datatype attribute 0173: empty xml:lang attribute on plain literal 0174: single character namespace prefixes 0172 and 0173 test Issue#0000306 http://bugs.librdf.org/mantis/view.php?id=306 0174 tests Issue#0000310 http://bugs.librdf.org/mantis/view.php?id=310 * librdfa/rdfa.c: (start_element): For raptor, turn a NULL language to "" which is what librdfa expects. * librdfa/curie.c, librdfa/language.c, librdfa/rdfa.c, librdfa/triple.c: Apply librdfa GIT commits up to 5823cb8bffe50fb1b46960f237f7274388cb5f93 commit 5823cb8bffe50fb1b46960f237f7274388cb5f93 Fixed @property CURIE processing unit tests to match code updates. commit a85d8e9e2e3d28452ad03d1ca64fdd98eed1c180 Fixed CURIE processing bug for TC 174. The bug caused single-character prefixed CURIEs to be processed incorrectly. Also fixed @property processing to not use reserved words specified in a very early version of the RDFa spec. Fixed a small bug related to processing CURIEs that have ':' as the second character in the URI string. commit f384b28bf916a2e0c7a7dbc99101a1a44c301965 Fixed plain literal bug uncovered by TC 172. This bug caused plain literals to not be generated when datatype="" was specified and when the content inside the element contained XHTML child nodes. * librdfa/language.c: Apply librdfa GIT commit 9960791ee4beca8e52e5d3a9766aba73d33f0063 Fixed bug that caused unreviewed TC 173 to partially fail. The currently active language, specified via xml:lang, was not being cleared when xml:lang="" was specified. Related to Redland Issue#0000306 http://bugs.librdf.org/mantis/view.php?id=306 2009-11-25 Dave Beckett * librdfa/rdfa.c, src/raptor_abbrev.c: Casts for C++ 2009-11-25 Lauri Aalto * src/raptor_abbrev.c: (raptor_abbrev_subject_lookup): Free node if raptor_new_abbrev_subject() ownership transfer did not succeed. * src/raptor_abbrev.c: (raptor_abbrev_subject_find): Check for failures. * src/raptor_serialize_turtle.c: (raptor_turtle_emit): Free iterators on before returning an error. * src/raptor_abbrev.c, src/raptor_avltree.c: (raptor_avltree_sprout): Always take ownership of passed in node data - free it if malloc fails. Make sure free_fn is not null before calling it. (raptor_abbrev_node_lookup,raptor_abbrev_subject_add_property): raptor_avltree_add() now always takes ownership of added nodes. * src/raptor_internal.h, src/raptor_serialize_rdfxmla.c: fixed indent tabs -> spaces * src/raptor_abbrev.c: (raptor_abbrev_subject_invalidate): Return value expected 2009-11-24 Dave Beckett * many files: Merge from raptor branch raptor1 2009-11-23 Dave Beckett * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl, tests/feeds/test04-result.ttl, tests/rdfxml/Makefile.am, tests/turtle/Makefile.am: Apply SVN r15690 to raptor head 2009-11-15 Dave Beckett * utils/rdfdiff.c: Apply SVN 15667 to raptor trunk 2009-10-10 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Fix XML parser context resource leak if raptor_grddl_fetch_uri fails. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Save and restore error handlers properly - restore loop was broken. Remove memcpy for clarity in copying. 2009-08-25 Dave Beckett * autogen.sh: Update common autogen.sh 2009-08-21 Lauri Aalto * src/raptor_www.c: (raptor_www_set_http_cache_control): Avoid dangling pointers 2009-08-03 Lauri Aalto * src/raptor_internal.h: Fixed comment 2009-07-27 Dave Beckett * src/turtle_parser.y (main): Terminate parser * src/turtle_lexer.l (main): Init world and namespaces so turtle lexing test does not die. * src/raptor_parse.c (raptor_parse_file): Simplify, no need for O_LARGEFILES flag and open/fdopen sequence. * configure.ac: Check for fcntl.h and AC_SYS_LARGEFILE to get large file checks * src/raptor_parse.c: (raptor_parse_file): Use open(2) and apply O_LARGEFILE option to allow 32bit systems to read multi-gigabyte files. 2009-07-23 Dave Beckett * Changelog entries above this are on BRANCH raptor1 * Create raptor 1 branch (SVN r15287) 2009-07-19 Dave Beckett * Tagged for raptor 1.4.19 (SVN r15280) * Snapshotted raptor_1_4_19 for 1.4.19 release (SVN 15279) * src/raptor_serialize_rss.c: (raptor_rss10_emit_item): Handle C++'s picky casting between enum types - that are really integers - to ints. * src/raptor_rss_common.c: static data raptor_rss_fields_info: semantic data errors found by C++'s more strict aliasing. - Fix author item class. - Set URI flag value for atom:schema and atom:href * src/raptor_namespace.c: (raptor_namespaces_init_v2, raptor_namespace_stack_to_array): Casts for C++ in returns from RAPTOR_CALLOC for namespace stacks * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Cast for C++ for arg to xsltSetCtxtSecurityPrefs. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Use memmove for overlapping copy, not memcpy. [valgrind] * src/raptor_serialize_json.c: raptor_json_context - use raptor_statement_v2 for last statement. (raptor_json_serialize_avltree_visit): Make V1 statements for the stored V2 statements. Improve fatal error messages. * src/raptor_statement.c: (raptor_free_statement): Restore actually freeing statement memory - resource leak. * configure.ac: libtool version change. was: current 2 revision 0 age 1 rules steps: 3. source code changed: revision++ = 3 4. interfaces added and changed: current++ = 3, revision = 0 5. interfaces added: age++ = 2 6. interfaces removed: no now: current 3 revision 0 age 2 * docs/libraptor.3: 1.4.19 changes * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): More silly games to prevent stupid gcc warning: ignoring return value of 'strtol', declared with attribute warn_unused_result so use the value and then discard it in a stupid expression. Ditto strtod. * src/raptor_uri.c: (raptor_uri_print_v2): Silly games to prevent stupid gcc warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result but right now there is nowhere to return the error too. * src/raptor_rss.c: (raptor_rss_uplift_fields): Comment out variables used only in debugging. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Ignore unused return values from strtol and strtod used for checking. * utils/rapper.c: Revert r15252 and reapply r14951 on rapper to use experimental V2 APIs again * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_v2.h: Remove raptor_v2.h again - no need to dup this for an internal build. Instead use -DRAPTOR_V2_EXPERIMENTAL when building * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Added raptor_v2.h again - internal only and put scary warning about V2 things into raptor.h * src/raptor.h: use -DRAPTOR_V2_EXPERIMENTAL to enable the V2 structs and functions * src/Makefile.am: Remove raptor_v2.h - bad idea for now * src/Makefile.am, src/raptor.h, src/raptor_internal.h, src/raptor_v2.h: Move public V2 structs and prototypes to internal raptor_v2.h * utils/rapper.c: Revert r14951 on rapper to use V1 APIs only for now * COPYING, COPYING.LIB: Add specific versions of GPL (2) and LGPL (2.1) to source control 2009-07-16 Dave Beckett * docs/raptor-docs.xml, docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml: Add new functions. Add section world for init/cleanup and V2 world stuff * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: (raptor_new_sequence_v2): Renamed from raptor_new_sequence_with_handler_context * tests/rdfxml: Ignore automake outputs * tests/ntriples: Ignore automake outputs * tests/feeds: Ignore ttl outputs * tests/feeds/Makefile.am: (check-serialize-atom): Make test use generated file from build dir. * utils/rapper.c: calloc another feature_value * tests/feeds/Makefile.am: set result=1 on failures * utils/rapper.c: calloc feature_value so that fields are initialised to 0/NULL * Raptor passes 'make check' test suite as of SVN r15234 * src/raptor_serialize_rss.c: Guess whether on input is xml or not based on if it starts with < * tests/feeds/test02-result.atom, tests/feeds/test02-result.ttl, tests/feeds/test02.rdf: Add
...
once to descs * tests/feeds/test02.rdf: use
...
in descriptions * tests/feeds/test03-result.atom: fix relative atom:link @href in expected output * src/raptor_serialize_rss.c: (raptor_rss10_emit_atom_feed): Output relative URIs for * src/raptor_serialize_rss.c: Extra/tidy debug messages 2009-07-15 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use raptor_rss_item_set_uri to always assign item identifier and uri fields correctly. * src/raptor_rss.h, src/raptor_rss_common.c: (raptor_rss_item_set_uri): Added to set the item identifier fields plus the item->uri field correctly. 2009-07-13 Dave Beckett * autogen.sh: Add SHAVE support - disabled by default and enabled for maintainers. libtool V2 needed Add -Wall to automake args Reorder args to remove dups Find config_aux_dir and config_macro_dir and use them for copying in config.{sub,guess} and adjusting aclocal args respectively. 2009-06-21 Dave Beckett * src/raptor_serialize_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement): When mapping fields rss to atom, do not copy into a field that has a value already. 2009-06-13 Dave Beckett * src/raptor_parse.c: (raptor_get_name): Use factory method if present. * src/raptor_guess.c: (raptor_guess_guess_get_name): Implement get_name by passing it on to internal guessed parser. (raptor_guess_parser_register_factory): Register get_name * src/raptor_internal.h: struct raptor_parser_factory_s gains get_name method * src/raptor_guess.c: (raptor_guess_parse_chunk): docs * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Init userCtxt *after* sheet is defined as not NULL. GRDDL transforms now work again. * utils/rapper.c: (main): If counting, do not use a serializer at all. 2009-05-16 Dave Beckett * src/raptor_serialize_rss.c: autodocs * src/raptor_rss.c: (raptor_rss_insert_rss_link): Added to add rss:link from atom:id or (raptor_rss_insert_identifiers): Call above for channel and items. * tests/feeds/test04-result.ttl: items and rss:links point to url not tag: uri * tests/feeds/test05-result.ttl: Moved dc:date to top * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Added more atom:entrymap values 2009-05-12 Dave Beckett * src/raptor_rss.c: (raptor_rss_insert_identifiers): Add an rss:link with /atom:link[@rel="self"]/@href string contents if not already present. * src/raptor_rss.c: (raptor_rss_emit_block): Add resource parameter for the subject of the triples to set. Do not try to play save/restore games with the statement.subject (raptor_rss_emit_item): Pass in item identifier to above. 2009-05-11 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_item): Set the atom author output node type by a quick hack to alter the URIs. 2009-05-10 Dave Beckett * src/raptor_rss.c: raptor_rss_uplift_map merged into raptor_atom_to_rss (raptor_rss_copy_field): Added to do field copy/conversion with pair (raptor_rss_uplift_fields): Iterate over list of conversions and call raptor_rss_copy_field. * src/raptor_rss_common.c: (raptor_rss_field_conversion_date_uplift): Added for converting from junk date to ISO dates. (raptor_rss_date_uplift): Deleted, replaced by above. raptor_atom_to_rss: gains fields from raptor_rss_uplift_map and uses above conversion function to fix rss:pubdate to dc:date * src/raptor_rss.h: Add raptor_rss_field_conversion for converting field values and add to raptor_field_pair * tests/feeds/test05-result.ttl: Add dc:date, atom:id, atom:title fields 2009-05-09 Dave Beckett * tests/feeds/test04-result.ttl: add both rss and renamed atom fields rather than just one: - dc:date & atom:updated - rss:title & atom:title - atom:id - atom:summary * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove renaming of atom terms to rss (raptor_rss_uplift_fields): Add copying of atom to rss terms, not renaming. * src/raptor_rss_common.c: atom:author is a container, not a block raptor_rss_items_info - set value type to RAPTOR_RSS_ITEM_CONTAINER raptor_rss_fields_info - set class to RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS raptor_rss_block_fields_info - remove author from list of blocks * tests/feeds/test04.atom: Restore xhtml namespace to div 2009-05-01 Dave Beckett * docs/tmpl/section-general.sgml: update tmpls * tests/turtle/Makefile.am, tests/turtle/test-32-out.ttl, tests/turtle/test-32.ttl: Added test-32 based on test for http://bugs.librdf.org/mantis/view.php?id=274 * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_collection_items): Notice when a new subject happens and reset property iterator. (raptor_turtle_emit_subject): Look for trees with 2 or more properties to be a potential collection. Fixes Issue#0000277 http://bugs.librdf.org/mantis/view.php?id=277 * src/raptor_parse.c: (raptor_get_feature): Return raw parser int feature. Fixes Issue#0000288 http://bugs.librdf.org/mantis/view.php?id=288 * src/raptor_feature.c: raptor_features_list use bit 16 to record that an int is not a boolean flag. Should refactor these flags for Raptor V2 and alter the raptor_feature_value_type() return. 2009-04-30 Dave Beckett * tests/feeds/Makefile.am: Add atom to turtle expected results to EXPECTED_TTLS * tests/turtle/Makefile.am: Add $(TURTLE_SERIALIZE_RDF_FILES) to dist * tests/turtle/Makefile.am: More fixes for make distcheck testing * tests/turtle/Makefile.am: (check-turtle-parse-ntriples, check-turtle-serialize-rdf): Get filenames from invoking Makefiles in nearby build-dirs not src-dirs, which won't have makefiles in 'make distcheck' mode * tests/ntriples/Makefile.am: Revert r15175 * tests/ntriples/Makefile.am: Make print-nt-test-files work in 'make distcheck' mode * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Make undeclared entity not fatal in parsing - errors are still thrown by the error callback, but parsing continues. Makes http://bugs.librdf.org/mantis/view.php?id=303 easier to deal with - primary data gets out when errors are present; when DTDs are not loaded. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Hunt for error_handlers in parser context user data too. * src/raptor_sax2.c: (raptor_new_sax2): Save correct libxml error handlers 2009-04-24 Dave Beckett * src/raptor.h: Revert raptor_error_handlers ABI change for now 2009-04-23 Dave Beckett * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Protect calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() by libxml flags and if enabled, save and restore the previous values. Added raptor_set_libxml_flags() (raptor V1) and raptor_world_set_libxml_flags() (raptor V2) to set these flags. Flags are defined in new enum raptor_libxml_flags. Fixes Issue#000299 http://bugs.librdf.org/mantis/view.php?id=299 * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Use context-specific libslt security configuration to avoid calling xsltSetDefaultSecurityPrefs(). Also allow user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences() (and in Raptor V2 with raptor_world_set_libxslt_security_preferences method on the world class) Fixes Isssue#0000296 http://bugs.librdf.org/mantis/view.php?id=296 2009-04-21 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_init, raptor_libxml_init_sax_error_handlers): Init per-context structured error handlers to go to raptor_libxml_xmlStructuredErrorFunc * configure.ac: Use RAPTOR_LDFLAGS for rest of internally linked libs for libm, curl, fetch, libxml, expat, libxslt, libinn (for parsedate) * configure.ac, raptor.pc.in, src/Makefile.am: Introduce RAPTOR_LDFLAGS to replace raw LIBS as the internal set of arguments to use in linking. * configure.ac, src/Makefile.am, utils/Makefile.am: Add --enable-debug configure option. use AM_CPPFLAGS for defines and include options Remove unused STANDARD_CFLAGS 2009-03-31 Lauri Aalto * src/raptor_namespace.c: (raptor_new_namespaces_v2): Lowmem fix. Use calloc instead of malloc to have struct members initialized to zero in case raptor_namespaces_init_v2() fails and need to free a partially initialized nstack. 2009-03-30 Dave Beckett * configure.ac, src/raptor_serialize_rss.c: Test for gettimeofday. (raptor_rss10_ensure_atom_feed_valid): Use condition to avoid calling it on windows that doesn't have it. Patch from Lou Sakey 2008-07-31 to redland-dev * src/raptor_sax2.c: (raptor_sax2_finish): Call xmlCleanupParser() libxml call last to avoid an access violation on windows. Patch from Lou Sakey 2008-07-31 to redland-dev. * src/raptor_general.c: (raptor_vsnprintf): Windows vsnprintf() portability patch from Lou Sakey. 2009-03-29 Dave Beckett * configure.ac: Substitute ECHO * src/raptor_rss.c: (raptor_rss_start_element_handler): Make namespaces seen in fields after any potential renames, so they will get declared later. (raptor_rss_end_element_handler): End any blocks in all cases - was not happening when there was no cdata. (raptor_rss_emit_block): Only emit block strings that are not NULL. (raptor_rss_emit_connection): Turn predicate ordinals into URIs since the RAPTOR_IDENTIFIER_TYPE_ORDINAL is deprecated (and turtle serialiser does not handle it). (raptor_rss_uplift_fields): Gain rss_parser arg and mark namespaces seen in renames. * src/raptor_rss_common.c: raptor_rss_fields_info - restore rss:link value to string. raptor_rss_block_fields_info - fix clashing offset for atom author name/email fields. 2009-03-28 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test02-result.atom, tests/feeds/test04-result.ttl, tests/feeds/test04.atom, tests/feeds/test05-result.ttl, tests/feeds/test05.atom: Add test04 and test05 atom parsing to turtle. Update test suite to show errors better and use ECHO macros * tests/feeds/test0[123].rdf:: Rename test0[123].rss to .rdf * tests/turtle/Makefile.am: Use TURTLE_SERIALIZE_RDF_FILES so that ex-62.rdf gets used * tests/turtle/Makefile.am, tests/turtle/test-31-out.ttl, tests/turtle/test-31.ttl: Add tests for serializing rdf:_ properties back to themselves. 2009-03-23 Dave Beckett * tests/feeds/Makefile.am: use conditionals to execute tests in sane order via FEED_TESTS var * tests/feeds/Makefile.am: (check-serialize-atom): Set parser/input base URI for test. * tests/feeds/Makefile.am: notes * tests/feeds/Makefile.am, tests/feeds/test01-result.ttl, tests/feeds/test02-result.ttl, tests/feeds/test03-result.ttl: Add parsing and serializing tests with intermediate turtle results to check * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Renamed RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE to RAPTOR_FEATURE_PREFIX_ELEMENTS (prefixElements) and change meaning; it always declares prefix: and default namespace but this option flips whether it core vocab is in the prefixed or default namespace. * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Do not declare or start namespaces with NULL prefix; only the default namespace *may* do that. 2009-03-20 Dave Beckett * tests/feeds/test01-result.atom: fix namespaces * tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add namespaces back to all expected results * src/raptor_serialize_rss.c: (raptor_rss10_build_xml_names): Enable turning on/off namespaced elements based on feature_alias_default_namespace 2009-03-19 Dave Beckett * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Remove -f aliasDefaultNamespace=0 from tests for now, to enable fixing of other things on their own 2009-03-17 Dave Beckett * tests/feeds/Makefile.am: use $(srcdir) before expected * tests/feeds/Makefile.am: report failure diff the right way around: from expected to actual 2009-03-12 Dave Beckett * tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Fix atom namespaces * tests/feeds/Makefile.am: Set aliasDefaultNamespace=0 * tests/feeds/Makefile.am, tests/feeds/test01-result.atom, tests/feeds/test02-result.atom, tests/feeds/test03-result.atom: Add expected test results, make check works from Makefile alone * tests/feeds/Makefile.am: Fix RAPPER call 2009-03-10 Dave Beckett * tests/feeds/test01.atom, tests/feeds/test02.atom, tests/feeds/test03.atom: Remove atom output - now generated via test * tests/feeds/Makefile.am: fix error in error logging * configure.ac, tests/Makefile.am, tests/feeds, tests/feeds/Makefile.am: automaked tests/feed * tests/feeds/Makefile: Removed, now autogenerated 2009-02-28 Dave Beckett * src/raptor_serialize_rss.c: comments * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Code style, remove if() depth. 2009-02-27 Dave Beckett * src/raptor_rss_common.c: Make itunes:owner container work again. 2009-02-25 Dave Beckett * src/raptor_rss_common.c: fix enclosure class/predicate RDF names * src/raptor_rss.h, src/raptor_rss_common.c: Added RAPTOR_RSS_RDF_ENCLOSURE for enclosure predicate in RDF as well as RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class in RDF * src/raptor_rss.c: (raptor_rss_start_element_handler): Declare as seen the namespace for a block. * src/raptor_rss.h, src/raptor_rss_common.c: Add RAPTOR_ATOM_LINK block type * src/raptor_rss.c: (raptor_rss_emit_block): Emit type URI from cls field, not predicate. 2009-02-23 Dave Beckett * src/raptor_rss.c: raptor_rss_element loses unused rel field * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove unused element attribute recognition and * src/raptor_rss.c: (raptor_rss_start_element_handler): Set enclosure namespace used if an enclosure block was seen. 2009-02-22 Dave Beckett * src/raptor_rss_common.c: raptor_rss_items_info - add block predicate types raptor_rss_fields_info - make atom:author a block. add atom:Author, atom:Category, atom:label, atom:schema and atom:term raptor_rss_block_fields_info - add new predicates for atom:category block add atom:author block * src/raptor_rss.c: raptor_rss_parser gains current_block field to store current metadata block object. (raptor_rss_start_element_handler): Set current_block. (raptor_rss_end_element_handler): Store any cdata in block field with NULL attribute if there is one. * src/raptor_rss.c: (raptor_rss_start_element_handler): Wildcard element name matches for RSS namespaces * src/raptor_rss.c: (raptor_rss_block_set_field): Added. (raptor_rss_start_element_handler): Use above to set a block attribute value * src/raptor_rss.c: raptor_rss_parser - comment. (raptor_rss_start_element_handler): Use raptor_rss_get_current_item to get item. When checking block attributes, skip NULL attribute names - for element cdata * src/raptor_rss.c: (raptor_rss_emit_block): Code style and skip block fields with no name. (raptor_rss_emit_item): Code style. * src/raptor_rss_common.c: raptor_rss_fields_info modify to make rss:link and rss:docs take URLs * src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Use RAPTOR_RSS_RDF_ENCLOSURE_CLASS for enclosure class and RAPTOR_RSS_FIELD_ENCLOSURE for predicate * src/raptor_rss.h: RAPTOR_RSS_BLOCKS_SIZE 10 after removing rss container * src/raptor_rss.h, src/raptor_rss_common.c: Add itunes: namespace and itunes:owner container with fields in namespace itunes: author, subtitle, summary, keywords explicit, image, name, block, category and email * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type loses RAPTOR_RSS_CATEGORY type. raptor_rss_block_fields_info loses rss category - just make it a string value * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_type delete RAPTOR_RSS_UNKNOWN and replace with RAPTOR_RSS_NONE everywhere 2009-02-21 Dave Beckett * src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_field_info renamed from raptor_rss_info * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: raptor_rss_items_info renamed from raptor_rss_types_info raptor_rss_types_info gains a flags field to distinguish blocks from containers. (raptor_rss_add_container): Use flag to only scan containers, not blocks. (raptor_rss_emit_block): Handle all types of blocks. Use the node type from raptor_rss_types_info to emit the node type. Use the raptor_rss_block_fields_info to emit the predicates for all blocks. 2009-02-20 Dave Beckett * src/raptor_rss.c: (raptor_rss_start_element_handler): Code style. * src/raptor_rss.c: (raptor_rss_insert_identifiers): Tidy to use raptor_set_identifier_uri. Indenting. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: (raptor_rss_start_element_handler, raptor_rss_insert_identifiers, raptor_rss10_serialize_statement): Use raptor_set_identifier_uri and raptor_set_identifier_id and refactor to use them better. (raptor_rss_block_make_blank_node, raptor_rss_insert_block_identifiers): Deleted. (raptor_rss_item_equals_statement_subject): Added. (raptor_new_rss_block): Add id argument. * src/raptor_identifier.c, src/raptor_internal.h: Added raptor_set_identifier_uri and raptor_set_identifier_id * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Remove old enclosure core and switch to data-driven raptor_rss_block metadata code. Update copyrights for 2009. typedef raptor_rss_block_fields_info renamed from raptor_rss_block_info and add docs. Renamed field 'attribute' from field_name, attribute_type from field_type. Added rdf predicate info 'field'. raptor_rss_block_fields_info adds predicate info. (raptor_rss_start_element_handler): Read from raptor_rss_block_fields_info. (raptor_rss_insert_block_identifiers): Renamed from raptor_rss_insert_enclosure_identifiers. (raptor_rss_insert_identifiers): Call above with new name. (raptor_rss_emit_block): Use more data tables to emit block. * src/raptor_rss_common.c: Add sentinel to end raptor_rss_blocks_info array * src/raptor_rss.c: (raptor_rss_start_element_handler): Recognise blocks from flags and handle attributes @url, @length and @type - statically for now. * src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_info gains block flag and block_type to use when a block is found. * src/raptor_rss.c: (raptor_rss_start_element_handler): Fix conditions for recognizing inner containers. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Add raptor_rss_block_info to record other metadata blocks configuration: rss enclosues, atom categories, rss category and rss source. Switch raptor_rss_block structure from a list of specific fields to short arrays of urls and strings. (raptor_free_rss_block, raptor_rss_start_element_handler, raptor_rss_insert_enclosure_identifiers, raptor_rss_emit_block): Switch to generic raptor_rss_block URLs, strings 2009-02-20 Lauri Aalto * src/raptor_rss.c: (raptor_rss_emit_block): Compilation fix after function parameter rename 2009-02-19 Dave Beckett * src/raptor_rss.c: (raptor_rss_emit_block): Renamed from raptor_rss_emit_enclosure * src/raptor_rss.h, src/raptor_rss_common.c: Add none raptor node type * src/raptor_rss.c: Code style / whitespace. (raptor_rss_end_element_handler): Use raptor_rss_get_current_item() to get update_item. 2009-02-18 Dave Beckett * src/raptor_rss.c: (raptor_rss_get_current_item): Pull logic out to get item for current type. (raptor_rss_start_element_handler): Fix inner container processing. Look for rdf:about on an item to get item URI there first. Pull out enclosure construction from general field handling. * src/raptor_rss.c: (raptor_rss_start_element_handler): Remove extra code block & outdent. * src/raptor_rss.c: (raptor_rss_promote_namespace_uri): Added for storing namespace change rules. (raptor_rss_start_element_handler): Use above to simplify field search logic. Document how an element matches a field. * src/raptor_rss.c: (raptor_rss_add_container): Add rules about inner containers, setting prev_type if seen and put author element ambiguity rules here. (raptor_rss_start_element_handler): Use above to replace inner container identification code. * src/raptor_rss.c: (raptor_rss_add_container): Added, pulled out of raptor_rss_start_element_handler to include the logic for determining feed type and container from element name. (raptor_rss_start_element_handler): Call above. * src/raptor_rss.c: (raptor_rss_start_element_handler): Comments and tidying control flow when identifying a container for rss_parser->current_type * src/raptor_rss.c: (raptor_rss_block_make_blank_node): Added pulled out of raptor_rss_insert_identifiers (raptor_rss_insert_identifiers): Call above. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_block gains rss_type field (raptor_new_rss_block): Take type as param and use to set node_type. (raptor_rss_insert_enclosure_identifiers): Remove node_type init and let raptor_new_rss_block set it. (raptor_rss_start_element_handler): Call raptor_new_rss_type with param for enclosure. * src/raptor_rss.h: prototype param * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: raptor_rss_item renamed field enclosure to blocks. (raptor_rss_insert_identifiers, raptor_rss_emit_item, raptor_free_rss_item, raptor_rss_item_add_block): Renamed item->enclosure to item->blocks and renamed variables. * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Rename raptor_rss_enclosure to raptor_rss_block throughout and corrected naming convention. (raptor_new_rss_block): Renamed from raptor_rss_new_enclosure. (raptor_rss_item_add_block): Renamed from raptor_rss_item_add_enclosure. (raptor_free_rss_block): Renamed from raptor_enclosure_free. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, utils/rapper.c: Added serializer feature RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE (aliasDefaultNamespace) for atom and rss 1.0 serializers to prevent declaring the default namespace twice with a prefix and without. raptor_feature gains RAPTOR_FEATURE_ALIAS_DEFAULT_NAMESPACE raptor_features_list gains new feature (raptor_turtle_writer_set_feature, raptor_sax2_set_feature, raptor_xml_writer_set_feature, raptor_set_feature, raptor_get_feature, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string): enum extensions for raptor_feature switches. struct raptor_serializer_s gains int field feature_alias_default_namespace raptor_rss10_serializer_context gains a flag free_default_nspace to know when to free default namespace now that it may not be needed. (raptor_rss10_serialize_terminate): Use the free_default_nspace flag. (raptor_rss10_build_xml_names): Implement altered namespace declaration rules. (raptor_new_serializer_v2): Initialise default namespace aliasing to true by default. (raptor_serializer_set_feature): Set flag. * src/raptor_rss.h: document struct raptor_rss_enclosure_s fields 2009-02-18 Lauri Aalto * src/raptor_internal.h, src/raptor_sax2.c: Lowmem fixes in raptor_sax2 (raptor_sax2_s): Internal struct gains "failed" field. (raptor_sax2_parse_start): Check for raptor_namespaces_init_v2() failure and set sax2 struct failure flag. (raptor_sax2_start_element, raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): No-op if sax2 struct in failed state. * src/raptor_namespace.c: (raptor_namespaces_init_v2): Check for alloc failure * src/raptor_namespace.c: (raptor_namespaces_qname_from_uri): Init ns to NULL to prevent use-before-init warnings from some optimizing compilers. 2009-02-17 Dave Beckett * src/raptor_namespace.c: (raptor_namespaces_get_default_namespace): Make this work again - look for default namespace in correct bucket. * librdfa/rdfa.c, src/raptor_internal.h, src/raptor_namespace.c: Replace namespace storage from a linked list to a hash on prefix using raptor_hash_ns_string() witb a DJ Bernstein hash. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug it fixes. Fixes Issue#0000290 http://bugs.librdf.org/mantis/view.php?id=290 2009-02-10 Dave Beckett * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header): For XMP add a cosmetic newline after * src/raptor_rdfxml.c: (raptor_rdfxml_generate_statement): Adjust predicate_type when removing ordinal identifier type from predicate. Fixes Issue#0000293 http://bugs.librdf.org/mantis/view.php?id=293 raptor2-2.0.15/configure.ac0000644000175000017500000011575112415611634012414 00000000000000dnl -*- Mode: autoconf -*- dnl dnl configure.ac - autoconf file for Raptor dnl (Process this file with autoconf to produce a configure script.) dnl dnl Copyright (C) 2000-2011 David Beckett http://www.dajobe.org/ dnl Copyright (C) 2000-2005 University of Bristol, UK http://www.bristol.ac.uk/ dnl dnl This package is Free Software and part of Redland http://librdf.org/ dnl dnl It is licensed under the following three licenses as alternatives: dnl 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version dnl 2. GNU General Public License (GPL) V2 or any newer version dnl 3. Apache License, V2.0 or any newer version dnl dnl You may not use this file except in compliance with at least one of dnl the above three licenses. dnl dnl See LICENSE.html or LICENSE.txt at the top of this package for the dnl complete terms and further detail along with the license texts for dnl the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. dnl dnl AC_PREREQ([2.62]) AC_INIT([Raptor RDF Parser and Serializer library], [2.0.15], [http://bugs.librdf.org/], [raptor2]) AC_CONFIG_SRCDIR([src/raptor_general.c]) AC_CONFIG_HEADERS([src/raptor_config.h]) AC_CONFIG_AUX_DIR(build) AC_CONFIG_MACRO_DIR(build) AM_INIT_AUTOMAKE([1.11 check-news std-options -Wobsolete -Wportability -Wsyntax -Wunsupported -Wextra-portability]) libxml_min_version=2.6.8 libxslt_min_version=1.0.18 libcurl_min_version=7.12.0 libcurl_min_vernum=071200 AC_REVISION($Revision: $)dnl AM_MAINTAINER_MODE release_version=no AC_ARG_ENABLE(release, [ --enable-release Turn on optimizations (for maintainer). ], \ if test "$enableval" = "yes"; then \ release_version=yes fi;) AM_CONDITIONAL(RELEASE_VERSION, test $release_version = yes) if test "$USE_MAINTAINER_MODE" = yes -a $release_version = no; then dnl need to change quotes to allow square brackets changequote(<<, >>)dnl CFLAGS=`echo $CFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` CPPFLAGS=`echo $CPPFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` changequote([, ])dnl fi RPM_RELEASE=SNAP if test "$release_version" = "yes"; then RPM_RELEASE=1 fi AC_SUBST(RPM_RELEASE) dnl Checks for programs. AC_CANONICAL_HOST AM_SANITY_CHECK AM_PROG_AR AC_PROG_CC AM_PROG_CC_C_O AC_MSG_CHECKING(whether $CC is clang) dnl Initialize libtool LT_INIT AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET FLEX_MIN_VERSION=2.5.19 FLEX_REC_VERSION=2.5.36 # Do not want AM_PROG_LEX which adds 'missing' to LEX if it's not around AC_PROG_LEX AC_MSG_CHECKING(flex) if test "$USE_MAINTAINER_MODE" = yes; then # maintainer mode - flex is required if test "X$LEX" = "X:" ; then AC_MSG_RESULT(not present) AC_MSG_WARN(Please get flex from http://flex.sourceforge.net/) AC_MSG_WARN(version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)) AC_MSG_FAILURE(flex not present) fi # some kind of lexer is present if echo "$LEX" | grep flex >/dev/null 2>&1; then # flex is present FLEX_VERSION=`$LEX -V 2>&1 | $AWK '{print $2}'` FLEX_VERSION_DEC=`echo $FLEX_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` FLEX_MIN_VERSION_DEC=`echo $FLEX_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $FLEX_VERSION_DEC -ge $FLEX_MIN_VERSION_DEC; then AC_MSG_RESULT($FLEX_VERSION - OK) else AC_MSG_RESULT(version $FLEX_VERSION - too old) AC_MSG_WARN(Please get flex from http://flex.sourceforge.net/) AC_MSG_WARN(version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)) AC_MSG_FAILURE(flex is too old) fi else AC_MSG_RESULT(present - but is not flex) AC_MSG_WARN(Please get flex from http://flex.sourceforge.net/) AC_MSG_WARN(version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)) AC_MSG_FAILURE($LEX is not not flex) fi else # not maintainer mode; flex is not required AC_MSG_RESULT(not present - not required for non maintainer builds) LEX="$SHELL $missing_dir/missing flex" AC_SUBST(LEX_OUTPUT_ROOT, lex.yy) AC_SUBST(LEXLIB, '') FLEX_VERSION_DEC=00000 fi AC_DEFINE_UNQUOTED(FLEX_VERSION_DECIMAL, $FLEX_VERSION_DEC, [Flex version as a decimal]) BISON_MIN_VERSION=3.0.0 AC_CHECK_PROGS(BISON, bison3 bison) if test "$USE_MAINTAINER_MODE" = yes; then AC_MSG_CHECKING(for GNU bison) # Match these styles of versions # GNU Bison version 1.28 # bison (GNU Bison) 1.875 dnl need to change quotes to allow square brackets changequote(<<, >>)dnl BISON_VERSION=`$BISON --version 2>&1 | sed -ne 's/^.*GNU Bison[^0-9]*//p'` changequote([, ])dnl if test "X$BISON_VERSION" != X; then BISON_VERSION_DEC=`echo $BISON_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` BISON_MIN_VERSION_DEC=`echo $BISON_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $BISON_VERSION_DEC -ge $BISON_MIN_VERSION_DEC; then AC_MSG_RESULT($BISON_VERSION - OK) else AC_MSG_RESULT(version $BISON_VERSION is too old) AC_MSG_WARN(Please get GNU Bison from http://www.gnu.org/software/bison/) AC_MSG_WARN(version $BISON_MIN_VERSION or newer) AC_MSG_FAILURE(GNU Bison too old) fi else AC_MSG_FAILURE($BISON is not GNU bison) fi fi AC_SUBST(BISON) # Find a tar command for 'make dist' AC_CHECK_PROGS(TAR, gnutar gtar tar) AC_CHECK_PROGS(PERL, perl) # Used in tests/feeds AC_CHECK_PROGS(JING, jing) AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AC_CHECK_PROGS(RECHO, echo) RECHO_C= RECHO_N= case `$RECHO -n x` in -n*) case `$RECHO 'xy\c'` in *c*) ;; xy) RECHO_C='\c' ;; esac;; *) RECHO_N='-n' ;; esac dnl compiler checks AC_DEFUN([REDLAND_CC_TRY_FLAG], [ AC_MSG_CHECKING([whether $CC supports $1]) ## backup CFLAGS and werror status redland_save_CFLAGS="$CFLAGS" redland_save_ac_c_werror_flag="${ac_c_werror_flag}" AC_LANG_WERROR CFLAGS="$CFLAGS $1" AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [redland_cc_flag=yes], [redland_cc_flag=no]) ## restore CFLAGS and werror status CFLAGS="$redland_save_CFLAGS" ac_c_werror_flag="${redland_save_ac_c_werror_flag}" if test "X$redland_cc_flag" = "Xyes"; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi AC_MSG_RESULT($redland_cc_flag) ]) # GCC warning options # http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html # # Too noisy: # -Wconversion # -Wformat-nonliteral : variables for format strings # -Wmissing-field-initializers : too noisy in raptor_rss_common.c # -Wsystem-headers : not debugging system # -Wsign-conversion: : many int / unsigned int / size_t # -Wunused-parameter : variables can be marked __attribute__('unused') # # Apple gcc specific (probably): -Wshorten-64-to-32 possible_warnings="\ -Wall \ -Wc++-compat \ -Wextra \ -Wunused \ \ -Waggregate-return \ -Wbad-function-cast \ -Wcast-align \ -Wdeclaration-after-statement \ -Wdisabled-optimization \ -Wdiv-by-zero \ -Wendif-labels \ -Werror-implicit-function-declaration \ -Wfloat-equal \ -Wformat-security \ -Wframe-larger-than=4096 \ -Winit-self \ -Winline \ -Wmissing-declarations \ -Wmissing-format-attribute \ -Wmissing-noreturn \ -Wmissing-prototypes \ -Wnested-externs \ -Wold-style-definition \ -Wpacked \ -Wpointer-arith \ -Wredundant-decls \ -Wshadow \ -Wsign-compare \ -Wstrict-prototypes \ -Wswitch-enum \ -Wundef \ -Wunreachable-code \ -Wunsafe-loop-optimizations \ -Wwrite-strings \ \ -Wshorten-64-to-32 \ -Wno-conversion \ -Wno-format-nonliteral \ -Wno-missing-field-initializers \ -Wno-sign-conversion \ -Wno-system-headers \ -Wno-unused-parameter \ -Wswitch-bool \ -Wlogical-not-parentheses \ -Wsizeof-array-argument \ -Wbool-compare \ -Wc90-c99-compat \ -Wc99-c11-compat \ " warning_cflags= if test "$USE_MAINTAINER_MODE" = yes; then AC_MSG_CHECKING(for supported $CC warning flags) AC_MSG_RESULT($warning_cflags) for warning in $possible_warnings; do REDLAND_CC_TRY_FLAG([$warning], [warning_cflags="$warning_cflags $warning"]) done AC_MSG_CHECKING($CC supports warning flags) AC_MSG_RESULT($warning_cflags) fi MAINTAINER_CPPFLAGS="$warning_cflags" dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(errno.h fcntl.h stdlib.h stddef.h unistd.h string.h limits.h math.h getopt.h sys/stat.h sys/param.h sys/stat.h sys/time.h setjmp.h) AC_CHECK_FUNCS(stat) AC_HEADER_TIME dnl FreeBSD fetch.h needs stdio.h and sys/param.h first AC_CHECK_HEADERS(fetch.h,,, [#include #ifdef HAVE_SYS_PARAM_H #include #endif ]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_C_INLINE AC_MSG_CHECKING(whether __FUNCTION__ is available) AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])], [AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) dnl need to change quotes to allow square brackets changequote(<<, >>)dnl version_major=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\1/'` version_minor=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\2/'` version_release=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\3/'` changequote([, ])dnl version_decimal=`expr $version_major \* 10000 + $version_minor \* 100 + $version_release` # The minimum runtime API version that is supported. MUST be updated at # an API break as well as changing the libtool version min_version_decimal=20000 AC_DEFINE_UNQUOTED(RAPTOR_VERSION_MAJOR, $version_major, [Major version number]) AC_DEFINE_UNQUOTED(RAPTOR_VERSION_MINOR, $version_minor, [Minor version number]) AC_DEFINE_UNQUOTED(RAPTOR_VERSION_RELEASE, $version_release, [Release version number]) AC_DEFINE_UNQUOTED(RAPTOR_VERSION_DECIMAL, $version_decimal, [Release version as a decimal]) AC_DEFINE_UNQUOTED(RAPTOR_MIN_VERSION_DECIMAL, $min_version_decimal, [Minimum supported package version]) # for raptor-config.in RAPTOR_VERSION_MAJOR=$version_major RAPTOR_VERSION_MINOR=$version_minor RAPTOR_VERSION_RELEASE=$version_release RAPTOR_VERSION_DECIMAL=$version_decimal AC_SUBST(RAPTOR_VERSION) AC_SUBST(RAPTOR_VERSION_MAJOR) AC_SUBST(RAPTOR_VERSION_MINOR) AC_SUBST(RAPTOR_VERSION_RELEASE) AC_SUBST(RAPTOR_VERSION_DECIMAL) # Libtool versioning # # CURRENT # The most recent interface number that this library implements. # # REVISION # The implementation number of the CURRENT interface. # # AGE # The difference between the newest and oldest interfaces that this # library implements. In other words, the library implements all the # interface numbers in the range from number `CURRENT - AGE' to # `CURRENT'. # # Rules: # 1. Start with version information of `0:0:0' for each libtool library. # # 2. Update the version information only immediately before a public # release of your software. More frequent updates are unnecessary, # and only guarantee that the current interface number gets larger # faster. # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed since the last public release, # then set AGE to 0. # # syntax: CURRENT[:REVISION[:AGE]] RAPTOR_LIBTOOL_VERSION=0:0:0 AC_SUBST(RAPTOR_LIBTOOL_VERSION) dnl Checks for library functions. AC_CHECK_FUNCS(gettimeofday getopt getopt_long stricmp strcasecmp vsnprintf isascii setjmp strtok_r qsort_r qsort_s) dnl librdfa AM_CONDITIONAL([NEED_STRTOK_R], [test "$ac_cv_func_strtok_r" = "no"]) dnl Check for GNU extension functions oCPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" AC_CHECK_FUNCS(vasprintf) CPPFLAGS="$oCPPFLAGS" AM_CONDITIONAL(STRCASECMP, test $ac_cv_func_strcasecmp = no -a $ac_cv_func_stricmp = no) AM_CONDITIONAL(GETOPT, test $ac_cv_func_getopt = no -a $ac_cv_func_getopt_long = no) AC_MSG_CHECKING(whether need to declare optind) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_GETOPT_H #include #endif]], [[int x=optind;]])], [AC_MSG_RESULT(no)], [AC_DEFINE([NEED_OPTIND_DECLARATION], [1], [need 'extern int optind' declaration?]) AC_MSG_RESULT(yes)]) if test $ac_cv_func_vsnprintf = yes; then AC_MSG_CHECKING([whether vsnprintf has C99 compatible return value]) AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #ifdef HAVE_STDLIB_H #include #endif #include static int is_c99(char *buf, char *s, ...) { va_list args; int r; va_start(args, s); r = vsnprintf(buf, buf ? 5 : 0, s, args); va_end(args); return (r == 7); } int main(void) { char buffer[32]; return (is_c99(NULL, "1234567") ? 0 : 10) + (is_c99(buffer, "1234567") ? 0 : 1); }]])], [AC_DEFINE([HAVE_C99_VSNPRINTF], [1], [vsnprintf has C99 compatible return value]) AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])], [AC_DEFINE([CHECK_VSNPRINTF_RUNTIME], [1], [have to check C99 vsnprintf at runtime because cross compiling])]) fi # Save LIBS oLIBS="$LIBS" RAPTOR_LDFLAGS= AC_SYS_LARGEFILE PKG_PROG_PKG_CONFIG PKG_CONFIG_REQUIRES= dnl libxml - required AC_ARG_WITH(xml2-config, [ --with-xml2-config=PATH Location of libxml xml2-config []], xml2_config="$withval", xml2_config="") if test "X$xml2_config" != "Xno" ; then if test "X$xml2_config" != "X" ; then AC_MSG_CHECKING(for $xml2_config) if test -x $xml2_config ; then XML_CONFIG=$xml2_config AC_MSG_RESULT(yes) else AC_MSG_ERROR([xml2-config not found at specified path $xml2_config]) fi fi if test "X$XML_CONFIG" = "X" ; then AC_CHECK_PROGS(XML_CONFIG, xml2-config) fi fi libxml_source=no if test "X$XML_CONFIG" != "X"; then LIBXML_CFLAGS=`$XML_CONFIG --cflags` LIBXML_LIBS=`$XML_CONFIG --libs` CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" LIBS="$LIBS $LIBXML_LIBS" AC_CHECK_FUNC(xmlCreatePushParserCtxt, have_xmlCreatePushParserCtxt=yes, have_xmlCreatePushParserCtxt=no) AC_MSG_CHECKING(for libxml via xml2-config) if test $have_xmlCreatePushParserCtxt = yes; then libxml_source="xml2-config" LIBXML_VERSION=`$XML_CONFIG --version` fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" else PKG_CHECK_MODULES([LIBXML],[libxml-2.0],[ LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion` libxml_source="pkg-config" ], [:]) AC_MSG_CHECKING(for libxml via pkg-config) fi if test "$libxml_source" != "no"; then AC_MSG_RESULT(yes - $LIBXML_VERSION) else AC_MSG_RESULT(no - not found) fi dnl xslt AC_ARG_WITH(xslt-config, [ --with-xslt-config=PATH Location of libxslt xslt-config []], xslt_config="$withval", xslt_config="") if test "X$xslt_config" != "Xno" ; then if test "X$xslt_config" != "X" ; then AC_MSG_CHECKING(for $xslt_config) if test -x $xslt_config ; then XSLT_CONFIG=$xslt_config AC_MSG_RESULT(yes) else AC_MSG_ERROR([xslt-config not found at specified path $xslt_config]) fi fi if test "X$XSLT_CONFIG" = "X" ; then AC_CHECK_PROGS(XSLT_CONFIG, xslt-config) fi fi dnl curl AC_ARG_WITH(curl-config, [ --with-curl-config=PATH Location of libcurl curl-config []], curl_config="$withval", curl_config="") if test "X$curl_config" != "Xno" ; then if test "X$curl_config" != "X" ; then AC_MSG_CHECKING(for $curl_config) if test -f $curl_config ; then CURL_CONFIG=$curl_config AC_MSG_RESULT(yes) else AC_MSG_RESULT(no - searching PATH) fi fi if test "X$CURL_CONFIG" = "X" ; then AC_CHECK_PROGS(CURL_CONFIG, curl-config) fi fi libcurl_source=no if test "X$CURL_CONFIG" != "X"; then LIBCURL_CFLAGS=`$CURL_CONFIG --cflags` LIBCURL_LIBS=`$CURL_CONFIG --libs` CPPFLAGS="$LIBCURL_CFLAGS $CPPFLAGS" LIBS="$LIBS $LIBCURL_LIBS" AC_CHECK_HEADER(curl/curl.h) AC_CHECK_FUNC(curl_easy_init, have_curl_easy_init=yes, have_curl_easy_init=no) AC_MSG_CHECKING(for libcurl via curl-config) if test $have_curl_easy_init = yes; then libcurl_source="curl-config" LIBCURL_VERSION=`$CURL_CONFIG --version | sed -e 's/^libcurl *//'` fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" else PKG_CHECK_MODULES([LIBCURL],[libcurl],[ LIBCURL_VERSION=`$PKG_CONFIG libcurl --modversion` libcurl_source="pkg-config" ], [:]) AC_MSG_CHECKING(for libcurl via pkg-config) fi if test "$libcurl_source" = "no"; then AC_MSG_RESULT(no - not found) else AC_MSG_RESULT(yes - $LIBCURL_VERSION) fi AC_ARG_WITH(icu-config, [ --with-icu-config=PATH Location of ICU icu-config []], icu_config="$withval", icu_config="") have_icu=no AC_MSG_CHECKING(for ICU) if test "X$icu_config" != "Xno" -a "X$icu_config" != "X" ; then ICU_CONFIG=$icu_config ICU_VERSION=`$ICU_CONFIG --version` have_icu=yes AC_MSG_RESULT(yes - version $ICU_VERSION) else AC_MSG_RESULT(no) fi dnl Note there is NO automated searching for icu-config AC_ARG_WITH(www-config, [ --with-libwww-config=PATH Location of W3C libwww libwww-config []], libwww_config="$withval", libwww_config="") if test "X$libwww_config" != "Xno" -a "X$libwww_config" != "X" ; then AC_MSG_WARN(libwww is no longer supported) fi have_libxml=0 need_libxml=0 oCPPFLAGS="$CPPFLAGS" if test "X$XML_CONFIG" != X; then CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" LIBS="$LIBS $LIBXML_LIBS" AC_CHECK_FUNC(xmlCreatePushParserCtxt, have_xmlCreatePushParserCtxt=yes, have_xmlCreatePushParserCtxt=no) AC_MSG_CHECKING(libxml library) if test $have_xmlCreatePushParserCtxt = yes; then have_libxml=1 libxml_version_dec=`echo $LIBXML_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxml_min_version_dec=`echo $libxml_min_version | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` AC_MSG_RESULT(yes - version $LIBXML_VERSION) if test $libxml_version_dec -lt $libxml_min_version_dec; then AC_MSG_WARN(Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required.) have_libxml=0 fi else AC_MSG_RESULT(no) fi AC_CHECK_HEADERS(libxml/nanohttp.h) AC_CHECK_HEADERS(libxml/parser.h) AC_CHECK_HEADERS(libxml/hash.h libxml/SAX2.h,,, [#ifdef HAVE_LIBXML_PARSER_H #include #endif ]) if test "$ac_cv_header_libxml_parser_h" = no -a "$ac_cv_header_gnome_xml_parser_h" = no; then AC_MSG_WARN(libxml library found but not headers - disabling) have_libxml=0 else AC_MSG_CHECKING(if libxml xmlEntity has name_length field) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_LIBXML_PARSER_H #include #endif ]], [[xmlEntity foo; foo.name_length=0]])], [AC_MSG_RESULT(yes) AC_DEFINE([RAPTOR_LIBXML_ENTITY_NAME_LENGTH], [1], [does libxml struct xmlEntity have a field name_length])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING(if libxml xmlEntity has etype field) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_LIBXML_PARSER_H #include #endif ]], [[xmlEntity foo; foo.etype=0]])], [AC_MSG_RESULT(yes) AC_DEFINE([RAPTOR_LIBXML_ENTITY_ETYPE], [1], [does libxml struct xmlEntity have a field etype])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING(if libxml xmlSAXHandler has initialized field) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_LIBXML_PARSER_H #include #endif ]], [[xmlSAXHandler foo; foo.initialized=0]])], [AC_MSG_RESULT(yes) AC_DEFINE([RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED], [1], [does libxml xmlSAXHandler have initialized field])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING(if libxml xmlSAXHandler has externalSubset field) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_LIBXML_PARSER_H #include #endif ]], [[xmlSAXHandler foo; foo.externalSubset=NULL]])], [AC_MSG_RESULT(yes) AC_DEFINE([RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET], [1], [does libxml xmlSAXHandler have externalSubset field])], [AC_MSG_RESULT(no)]) AC_CHECK_FUNCS(xmlSAX2InternalSubset xmlCtxtUseOptions) AC_MSG_CHECKING(if libxml has parser option XML_PARSE_NONET) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_LIBXML_PARSER_H #include #endif ]], [[xmlParserOption foo; foo = XML_PARSE_NONET]])], [AC_MSG_RESULT(yes) AC_DEFINE([RAPTOR_LIBXML_XML_PARSE_NONET], [1], [does libxml have XML_PARSE_NONET])], [AC_MSG_RESULT(no)]) AC_CHECK_HEADERS(libxml/HTMLparser.h) AC_MSG_CHECKING(if libxml has parser option HTML_PARSE_NONET) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_LIBXML_HTMLPARSER_H #include #endif ]], [[htmlParserOption foo; foo = HTML_PARSE_NONET]])], [AC_MSG_RESULT(yes) AC_DEFINE([RAPTOR_LIBXML_HTML_PARSE_NONET], [1], [does libxml have HTML_PARSE_NONET])], [AC_MSG_RESULT(no)]) fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" have_libxslt=0 if test "X$XSLT_CONFIG" != X; then CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" LIBS="$LIBS `$XSLT_CONFIG --libs`" AC_CHECK_FUNC(xsltSaveResultToString, have_xsltSaveResultToString=yes, have_xsltSaveResultToString=no) AC_MSG_CHECKING(for system libxslt library) if test $have_xsltSaveResultToString = yes; then have_libxslt=1 LIBXSLT_VERSION=`$XSLT_CONFIG --version` libxslt_version_dec=`echo $LIBXSLT_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxslt_min_version_dec=`echo $libxslt_min_version | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` AC_MSG_RESULT(yes - version $LIBXSLT_VERSION) if test $libxslt_version_dec -lt $libxslt_min_version_dec; then AC_MSG_WARN(Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required.) have_libxslt=0 fi else AC_MSG_RESULT(no) fi AC_CHECK_FUNC(xsltInit) AC_CHECK_HEADERS(libxslt/xslt.h) if test "$ac_cv_header_libxslt_xslt_h" = no ; then AC_MSG_WARN(libxslt library found but not headers - disabling) have_libxslt_lib=0 have_libxslt=0 fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" dnl Check for JSON library AC_ARG_WITH(yajl, [ --with-yajl=DIR YAJL installation directory or 'no' to disable (default=auto)], yajl_prefix="$withval", yajl_prefix="none") if test "x$yajl_prefix" != "xno" ; then AC_MSG_CHECKING(for yajl installation) if test "x$yajl_prefix" = "xyes" ; then yajl_prefix="none" fi # Nothing given - search if test "X$yajl_prefix" = "Xnone" ; then for dir in /opt/local /usr/local /usr; do if test -r $dir/include/yajl/yajl_parse.h; then yajl_prefix=$dir break fi done fi if test "X$yajl_prefix" = "Xnone" ; then AC_MSG_RESULT(not found. Get it from http://lloyd.github.com/yajl/ and use --with-yajl=DIR if necessary to configure the installation directory.) else AC_MSG_RESULT($yajl_prefix) if test "$yajl_prefix" = "/usr"; then yajl_prefix= else LDFLAGS="-L$yajl_prefix/lib $LDFLAGS" CPPFLAGS="-I$yajl_prefix/include $CPPFLAGS" fi AC_CHECK_LIB(yajl, yajl_parse, libyajl=1, libyajl=0) AC_CHECK_LIB(yajl, yajl_tree_parse, yajl_api_version=2, yajl_api_version=1) AC_CHECK_HEADERS(yajl/yajl_parse.h) AC_MSG_CHECKING(YAJL API version) AC_MSG_RESULT($yajl_api_version) if test $yajl_api_version = 2; then AC_DEFINE_UNQUOTED(HAVE_YAJL2, 1, [YAJL has API version 2]) fi fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" dnl RDF Parsers rdfxml_parser=no ntriples_parser=no turtle_parser=no trig_parser=no rss_parser=no grddl_parser=no guess_parser=yes rdfa_parser=no json_parser=no nquads_parser=no rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup rdfa nquads" rdf_parsers_enabled= grddl_parser_ok=no AC_MSG_CHECKING(GRDDL parser requirements) if test $have_libxml = 1 -a $have_libxslt = 1; then AC_MSG_RESULT(yes) grddl_parser_ok=yes rdf_parsers_available="$rdf_parsers_available grddl" else AC_MSG_RESULT(no - libxml2 and libxslt are both not available) fi json_parser_ok=no AC_MSG_CHECKING(JSON parser requirements) if test "X$ac_cv_header_yajl_yajl_parse_h" = Xyes -a "X$ac_cv_lib_yajl_yajl_parse" = Xyes; then AC_MSG_RESULT(yes) json_parser_ok=yes rdf_parsers_available="$rdf_parsers_available json" else AC_MSG_RESULT(no - libyajl is not available) fi # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then AC_DEFINE(RAPTOR_PARSER_RDFXML, 1, [Building RDF/XML parser]) AC_DEFINE(RAPTOR_PARSER_NTRIPLES, 1, [Building N-Triples parser]) AC_DEFINE(RAPTOR_PARSER_TURTLE, 1, [Building Turtle parser]) AC_DEFINE(RAPTOR_PARSER_TRIG, 1, [Building TRiG parser]) AC_DEFINE(RAPTOR_PARSER_RSS, 1, [Building RSS Tag Soup parser]) AC_DEFINE(RAPTOR_PARSER_GRDDL, 1, [Building GRDDL parser]) AC_DEFINE(RAPTOR_PARSER_GUESS, 1, [Building guess parser]) AC_DEFINE(RAPTOR_PARSER_RDFA, 1, [Building RDFA parser]) AC_DEFINE(RAPTOR_PARSER_JSON, 1, [Building JSON parser]) AC_DEFINE(RAPTOR_PARSER_NQUADS, 1, [Building N-Quads parser]) fi AC_MSG_CHECKING(RDF parsers required) AC_ARG_ENABLE(parsers, [ --enable-parsers=LIST Use RDF parsers (default=all)], parsers="$enableval") if test "X$parsers" = Xall -o "X$parsers" = X; then parsers="$rdf_parsers_available" AC_MSG_RESULT(all) elif test "X$parsers" = Xnone; then parsers= AC_MSG_RESULT(none) else AC_MSG_RESULT($parsers) fi for parser in $parsers; do p=$parser if test $p = rss-tag-soup; then p=rss fi if test $p = grddl; then if test $grddl_parser_ok != yes; then AC_MSG_WARN(GRDDL parser is not available) continue fi fi if test $p = json; then if test $json_parser_ok != yes; then AC_MSG_WARN(YAJL is not available) continue fi fi eval $p'_parser=yes' NAME=`echo $p | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_PARSER_${NAME} AC_DEFINE_UNQUOTED($n) rdf_parsers_enabled="$rdf_parsers_enabled $parser" done use_nfc=no if test $rdfxml_parser = yes; then need_libxml=1 use_nfc=yes fi if test $rss_parser = yes; then need_libxml=1 fi need_libxslt=0 if test $grddl_parser = yes; then need_libxml=1 need_libxslt=1 fi need_librdfa=no if test $rdfa_parser = yes; then need_libxml=1 need_librdfa=yes fi need_libyajl=0 if test $json_parser = yes; then need_libyajl=1 fi AM_CONDITIONAL(RAPTOR_PARSER_RDFXML, test $rdfxml_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_NTRIPLES, test $ntriples_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_TURTLE, test $turtle_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_TRIG, test $trig_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_RSS, test $rss_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_GRDDL, test $grddl_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_GUESS, test $guess_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_RDFA, test $rdfa_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_JSON, test $json_parser = yes) AM_CONDITIONAL(RAPTOR_PARSER_NQUADS, test $nquads_parser = yes) AM_CONDITIONAL(LIBRDFA, test $need_librdfa = yes) dnl RDF Serializers rdfxml_serializer=no ntriples_serializer=no rdfxml_abbrev_serializer=no turtle_serializer=no rss_1_0_serializer=no atom_serializer=no dot_serializer=no html_serializer=no json_serializer=no nquads_serializer=no rdf_serializers_available="rdfxml rdfxml-abbrev turtle ntriples rss-1.0 dot html json atom nquads" # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then AC_DEFINE(RAPTOR_SERIALIZER_RDFXML, 1, [Building RDF/XML serializer]) AC_DEFINE(RAPTOR_SERIALIZER_NTRIPLES, 1, [Building N-Triples serializer]) AC_DEFINE(RAPTOR_SERIALIZER_RDFXML_ABBREV, 1, [Building RDF/XML-abbreviated serializer]) AC_DEFINE(RAPTOR_SERIALIZER_TURTLE, 1, [Building Turtle serializer]) AC_DEFINE(RAPTOR_SERIALIZER_RSS_1_0, 1, [Building RSS 1.0 serializer]) AC_DEFINE(RAPTOR_SERIALIZER_ATOM, 1, [Building Atom 1.0 serializer]) AC_DEFINE(RAPTOR_SERIALIZER_DOT, 1, [Building GraphViz DOT serializer]) AC_DEFINE(RAPTOR_SERIALIZER_HTML, 1, [Building HTML Table serializer]) AC_DEFINE(RAPTOR_SERIALIZER_JSON, 1, [Building JSON serializer]) AC_DEFINE(RAPTOR_SERIALIZER_NQUADS, 1, [Building N-Quads serializer]) fi AC_MSG_CHECKING(RDF serializers required) AC_ARG_ENABLE(serializers, [ --enable-serializers=LIST Use RDF serializers (default=all)], serializers="$enableval") if test "X$serializers" = Xall -o "X$serializers" = X; then serializers="$rdf_serializers_available" AC_MSG_RESULT(all) elif test "X$serializers" = Xnone; then serializers= AC_MSG_RESULT(none) else AC_MSG_RESULT($serializers) fi for serializer in $serializers; do s=`echo $serializer | tr '.-' '__'` eval $s'_serializer=yes' NAME=`echo $s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_SERIALIZER_${NAME} AC_DEFINE_UNQUOTED($n) rdf_serializers_enabled="$rdf_serializers_enabled $serializer" done AM_CONDITIONAL(RAPTOR_SERIALIZER_RDFXML, test $rdfxml_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_NTRIPLES, test $ntriples_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_RDFXML_ABBREV, test $rdfxml_abbrev_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_TURTLE, test $turtle_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_RSS_1_0, test $rss_1_0_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_ATOM, test $atom_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_DOT, test $dot_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_HTML, test $html_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_JSON, test $json_serializer = yes) AM_CONDITIONAL(RAPTOR_SERIALIZER_NQUADS, test $nquads_serializer = yes) AM_CONDITIONAL(RAPTOR_RSS_COMMON, test $rss_1_0_serializer = yes -o $rss_parser = yes) dnl Enable NFC code only if enabled and used (rdfxml) need_icu=no if test $use_nfc = yes -a $have_icu = yes; then need_icu=yes AC_DEFINE([RAPTOR_ICU_NFC], 1, [Use ICU for Unicode NFC check]) fi AM_CONDITIONAL(RAPTOR_ICU_NFC, test $need_icu = yes) AC_MSG_CHECKING(XML names version) AC_ARG_WITH(xml-names, [ --with-xml-names=1.1|1.0 Select XML version name checking (default=1.0)], xml_names="$withval", xml_names="1.0") if test $xml_names = 1.1; then AC_DEFINE(RAPTOR_XML_1_1, 1, [Check XML 1.1 Names]) fi AC_MSG_RESULT($xml_names) have_libcurl=0 have_libfetch=0 need_libcurl=0 need_libxml_www=0 need_libfetch=0 if test "X$CURL_CONFIG" != X; then CPPFLAGS="$CPPFLAGS $LIBCURL_CFLAGS" LIBS="$LIBS $LIBCURL_LIBS" AC_CHECK_HEADER(curl/curl.h) AC_CHECK_FUNC(curl_easy_init, have_curl_easy_init=yes, have_curl_easy_init=no) AC_MSG_CHECKING(for libcurl library) if test $have_curl_easy_init = yes -a "$ac_cv_header_curl_curl_h" = yes; then libcurl_min_version_dec=`echo $libcurl_min_version | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libcurl_version_dec=`echo $LIBCURL_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $libcurl_version_dec -lt $libcurl_min_version_dec; then AC_MSG_WARN(Using libcurl $LIBCURL_VERSION is unsupported - $libcurl_min_version or newer required.) AC_MSG_RESULT(no - version $LIBCURL_VERSION is too old) else have_libcurl=1 AC_MSG_RESULT(yes - version $LIBCURL_VERSION via $libcurl_source) fi else AC_MSG_RESULT(no) fi fi LIBS="$oLIBS" CPPFLAGS="$oCPPFLAGS" if test "X$ac_cv_header_curl_curl_h" = Xyes; then AC_DEFINE([HAVE_CURL_CURL_H], 1, [Have curl/curl.h]) fi if test $ac_cv_header_fetch_h = yes; then AC_CHECK_LIB(fetch, fetchXGetURL, have_libfetch=1) LIBS="$oLIBS" fi AC_ARG_WITH(www, [ --with-www=NAME Use WWW library - curl (default), xml, libfetch, none], www="$withval", www="curl") for www_name in $www curl xml libfetch none; do case $www_name in curl) if test $have_libcurl = 1; then need_libcurl=1 AC_DEFINE([RAPTOR_WWW_LIBCURL], 1, [Have libcurl WWW library]) break fi ;; xml) if test $have_libxml = 1; then need_libxml=1 need_libxml_www=1 AC_DEFINE([RAPTOR_WWW_LIBXML], 1, [Have libxml available as a WWW library]) break fi ;; libfetch) if test $have_libfetch = 1; then need_libfetch=1 AC_DEFINE([RAPTOR_WWW_LIBFETCH], 1, [Have libfetch WWW library]) break fi ;; none|no) need_libcurl=0 need_libxml_www=0 AC_DEFINE([RAPTOR_WWW_NONE], 1, [No WWW library]) break ;; *) AC_MSG_ERROR(No such WWW library $www_name) ;; esac done AC_MSG_CHECKING(WWW libraries available) www_libraries_available= if test $have_libcurl = 1; then www_libraries_available="$www_libraries_available libcurl $LIBCURL_VERSION" fi if test $have_libxml = 1; then www_libraries_available="$www_libraries_available libxml $LIBXML_VERSION" fi if test $have_libfetch = 1; then www_libraries_available="$www_libraries_available libfetch" fi AC_MSG_RESULT($www_libraries_available) AC_MSG_CHECKING(WWW library to use) www_library= RAPTOR_WWW_LIBRARY=none if test $need_libcurl = 1; then www_library="libcurl $LIBCURL_VERSION via $libcurl_source" RAPTOR_WWW_LIBRARY=libcurl elif test $need_libxml_www = 1; then www_library="libxml $LIBXML_VERSION via $libxml_source" RAPTOR_WWW_LIBRARY=libxml elif test $need_libfetch = 1; then www_library="libfetch" RAPTOR_WWW_LIBRARY=libfetch else www_library=none fi AC_MSG_RESULT($www_library) if test "X$www_library" = Xnone; then AC_MSG_WARN([No WWW library in use - only file: URLs will work]) AC_MSG_WARN([Install libcurl, libxml2 or BSD libfetch for WWW access]) fi if test $need_libcurl = 1; then CPPFLAGS="$CPPFLAGS $LIBCURL_CFLAGS" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $LIBCURL_LIBS" if test libcurl_source = "pkg-config"; then if test "X$PKG_CONFIG_REQUIRES" != X; then PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES," fi PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libcurl >= $libcurl_min_version" fi AC_LIBOBJ(raptor_www_curl) fi dnl ICU for NFC check AC_MSG_CHECKING(NFC library to use) nfc_library=none if test $need_icu = yes; then CPPFLAGS="$CPPFLAGS `$ICU_CONFIG --cppflags-searchpath`" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$ICU_CONFIG --ldflags-searchpath` -licuuc" AC_LIBOBJ(raptor_nfc_icu) nfc_library="ICU $ICU_VERSION" fi AC_MSG_RESULT($nfc_library) have_lininn=no have_inn_parsedate=no oCPPFLAGS="$CPPFLAGS" if test -d /usr/include/inn; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" fi AC_CHECK_HEADER(libinn.h) CPPFLAGS="$oCPPFLAGS" oCPPFLAGS="$CPPFLAGS" if test $ac_cv_header_libinn_h = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" LIBS="$LIBS -L/usr/lib/news -linn" AC_CHECK_LIB(inn, HashMessageID, have_libinn=yes) AC_MSG_CHECKING(parsedate in libinn) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include ]], [[ parsedate("Sun Jun 12 00:04:09 BST 2005", NULL) ]])], [AC_DEFINE([HAVE_INN_PARSEDATE], [1], [INN parsedate function present]) have_inn_parsedate=yes AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" AC_MSG_CHECKING(date parsing source) raptor_parsedate_needed=no if test $have_inn_parsedate = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -L/usr/lib/news -linn" AC_MSG_RESULT(INN parsedate) else if test $need_libcurl = 1; then AC_MSG_RESULT(libcurl curl_getdate) else raptor_parsedate_needed=yes AC_MSG_RESULT(raptor parsedate) fi fi AM_CONDITIONAL(PARSEDATE, test $raptor_parsedate_needed = yes) if test $raptor_parsedate_needed = yes; then AC_DEFINE([HAVE_RAPTOR_PARSE_DATE], 1, [Raptor raptor_parse_date available]) fi if test $need_libfetch = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lfetch" AC_LIBOBJ(raptor_www_libfetch) fi RAPTOR_XML_PARSER=none if test $need_libxml = 1; then if test $have_libxml = 1; then AC_DEFINE(RAPTOR_XML_LIBXML, 1, [Use libxml XML parser]) else AC_MSG_ERROR(libxml2 is not available - please get it from http://xmlsoft.org/) fi if test $need_libxml_www = 1; then AC_LIBOBJ(raptor_www_libxml) fi RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $LIBXML_LIBS" CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" if test libxml_source = "pkg-config"; then if test "X$PKG_CONFIG_REQUIRES" != X; then PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES," fi PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libxml-2.0 >= $libxml_min_version" fi RAPTOR_XML_PARSER=libxml fi AM_CONDITIONAL(RAPTOR_XML_LIBXML, test $need_libxml = 1) if test $need_libxslt = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$XSLT_CONFIG --libs`" CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" fi if test $need_libyajl = 1; then if test "x$yajl_prefix" != "x"; then CPPFLAGS="-I$yajl_prefix/include $CPPFLAGS" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -L$yajl_prefix/lib" fi RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lyajl" fi RAPTOR_LIBTOOLLIBS=libraptor2.la AC_SUBST(RAPTOR_LIBTOOLLIBS) xml_parser="none needed" if test $need_libxml = 1; then xml_parser="libxml $LIBXML_VERSION via $libxml_source" fi # Restore LIBS LIBS="$oLIBS" # Make final changes to cflags MEM= MEM_LIBS= CPPFLAGS="-DRAPTOR_INTERNAL=1 $CPPFLAGS" AC_ARG_WITH(memory-signing, [ --with-memory-signing Sign allocated memory (default=no)], use_memory_signing="$withval", use_memory_signing="no") AC_MSG_CHECKING(using memory signing) AC_MSG_RESULT($use_memory_signing); if test "$use_memory_signing" = yes; then MEM=-DRAPTOR_MEMORY_SIGN=1 MEM_LIBS= fi debug_messages=no AC_ARG_ENABLE(debug, [ --enable-debug Enable debug messages (default no). ], debug_messages=$enableval) if test "$debug_messages" = "yes"; then AC_DEFINE([RAPTOR_DEBUG], [1], [Define to 1 if debug messages are enabled.]) fi if test "$USE_MAINTAINER_MODE" = yes; then AC_DEFINE([MAINTAINER_MODE], [1], [Define to 1 if maintainer mode is enabled.]) CPPFLAGS="$MAINTAINER_CPPFLAGS $CPPFLAGS" fi AC_SUBST(RAPTOR_LDFLAGS) AC_SUBST(PKG_CONFIG_REQUIRES) AC_SUBST(MEM) AC_SUBST(MEM_LIBS) AC_SUBST(RECHO) AC_SUBST(RECHO_N) AC_SUBST(RECHO_C) # Features # lists RAPTOR_PARSERS=$rdf_parsers_enabled AC_SUBST(RAPTOR_PARSERS) RAPTOR_SERIALIZERS=$rdf_serializers_enabled AC_SUBST(RAPTOR_SERIALIZERS) # single values or none AC_SUBST(RAPTOR_WWW_LIBRARY) AC_SUBST(RAPTOR_XML_PARSER) abs_top_srcdir=`cd $srcdir; pwd` AC_SUBST(abs_top_srcdir) abs_top_builddir=`pwd` AC_SUBST(abs_top_builddir) dnl automake 1.11 AM_SILENT_RULES([no]) AC_CONFIG_FILES([Makefile raptor2.spec raptor2.rdf data/Makefile docs/Makefile docs/version.xml examples/Makefile scripts/Makefile src/raptor2.h src/Makefile tests/Makefile tests/feeds/Makefile tests/grddl/Makefile tests/ntriples/Makefile tests/ntriples-2013/Makefile tests/nquads-2013/Makefile tests/rdfa/Makefile tests/rdfa11/Makefile tests/json/Makefile tests/rdfxml/Makefile tests/turtle/Makefile tests/turtle-2013/Makefile tests/trig/Makefile utils/Makefile librdfa/Makefile raptor2.pc]) dnl Check for gtk-doc and docbook GTK_DOC_CHECK([1.3]) AC_OUTPUT AC_MSG_RESULT([ Raptor build summary: RDF parsers available : $rdf_parsers_available RDF parsers enabled :$rdf_parsers_enabled RDF serializers available : $rdf_serializers_available RDF serializers enabled :$rdf_serializers_enabled XML parser : $xml_parser WWW library : $www_library NFC check library : $nfc_library ]) raptor2-2.0.15/docs/0000755000175000017500000000000012425347071011126 500000000000000raptor2-2.0.15/docs/version.xml0000644000175000017500000000000712425347040013246 000000000000002.0.15 raptor2-2.0.15/docs/raptor-parsers.xml0000644000175000017500000002326011660060067014554 00000000000000 Parsers in Raptor (syntax to triples)
Introduction This section describes the parsers that can be compiled into Raptor and their options. The exact parsers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_world_get_parser_description function The options that may be set on parsers can also be queried at run-time with the raptor_world_get_option_description function.
GRDDL parser (name <literal>grddl</literal>) A parser for the Gleaning Resource Descriptions from Dialects of Languages (GRDDL), W3C Proposed Recommendation of 2007-07-16 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed. The GRDDL parser is rather complex and different from the other parsers in that it retrieves URIs, reads HTML documents (possibly with errors), transforms the documents with XSLT and turns the result into a single graph. The default configuration of the GRDDL parser also reads microformats (hcard, hcalendar) and follows <link> tags that point to RDF/XML. Parts of the GRDDL process can be altered by configuration, which are describe below. The GRDDL parser defines 'base', 'Base' and 'url' XSLT parameters with the value of the base URI to allow some XSLT sheets to work. These set of parameters cannot be disabled. If the XSLT transform returns an empty string, no further processing of the result is done, and a warning is generated. The xsl:output method is mapped to result document mime types as follows: 'text' to text/plain; 'xml' to application/xml and 'html' to text/html. Any result that is of type 'application/xml' or unknown mime type is assumed to be RDF/XML. The URIs that are processed during GRDDL operations can be checked and skipped if required using a handler set with the raptor_parser_set_uri_filter() function. If the handler returns non-0, the URI is rejected. This uses raptor_www_set_uri_filter() internally. If the value of option RAPTOR_OPTION_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during GRDDL processing. This uses raptor_www_set_connection_timeout() internally. The hardcoded support for hcard and hcalendar microformats can be disabled by setting parser option RAPTOR_OPTION_MICROFORMATS to 0 or using raptor_parser_set_option() with option RAPTOR_OPTION_STRICT and a boolean value of 1. The GRDDL parser by default will try an XML parser on the content followed by a lax HTML parser. This can be disabled by setting parser option RAPTOR_OPTION_HTML_TAG_SOUP to 0 or using raptor_parser_set_option() with option RAPTOR_OPTION_STRICT and a boolean value of 1. The GRDDL parser by default will try to look for an HTML <link> tag that points to RDF/XML. This can be disabled by setting parser option RAPTOR_OPTION_HTML_LINK to 0 or using raptor_parser_set_option() with option RAPTOR_OPTION_STRICT and a boolean value of 1.
Guess parser (name <literal>guess</literal>) This is a special parser that picks the actual parser to use based on the content type, the content bytes or the content identifier. The content name can be either from a local file or from a URI. If the protocol that delivered the content (such as HTTP) provided a Content Type (aka MIME Type) then this will be the primary means for identifying th ecotnent. The secondary means to identify the content are the bytes of the content (if available), otherwise the content identifier is used, which is the least reliable.
JSON parser (name <literal>json</literal>) A parser for both the resource-centric RDF/JSON syntax as defined by Talis at RDF/JSON Specification and the triples-centric format based on the SPARQL results in JSON format.
N-Triples parser (name <literal>ntriples</literal>) A parser for the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.
RDFa parser - (name <literal>rdfa</literal>) A parser for the RDFa syntax, W3C Candidate Recommendation 20 June 2008 which allows reading XHTML and XML as RDF triples by interpreting attributes on elements to describe which ones have RDF semantics. This is implemented via librdfa linked inside Raptor, written by Manu Sporny of Digital Bazaar, and licensed with the same license as Raptor. This parser is beta quality and passes all but 4 of the RDFa tests as of Raptor 1.4.18.
RDF/XML parser - default (name <literal>rdfxml</literal>) A parser for the standard RDF/XML syntax as revised by the W3C RDF Core working group. This is the default parser in Raptor. Features of this parser: Fully handles the RDF/XML syntax updates for XML Base, xml:lang, RDF datatyping and Collections. Handles all RDF vocabularies such as FOAF, RSS 1.0, Dublin Core, OWL, DOAP Handles rdf:resource / resource attributes Uses expat and/or (GNOME) libxml XML parsers as available or required
RSS Tag Soup parser (name <literal>rss-tag-soup</literal>) A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. This includes support for the Atom 1.0 syndication format defined in IETF RFC 4287 The parser attempts to turn the input into RSS 1.0 RDF triples in the RSS 1.0 model of a syndication feed. This includes triples for RSS Enclosures. True RSS 1.0 when wanted to be used as a full RDF vocabulary, is best parsed by the RDF/XML parser (name rdfxml).
TRiG parser (name <literal>trig</literal>) A parser for the TriG - Turtle with Named Graphs syntax. The parser is alpha quality and may not support the entire TRiG specification.
Turtle Terse RDF Triple Language parser (name <literal>turtle</literal>) A parser for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.
raptor2-2.0.15/docs/html/0000755000175000017500000000000012425347071012072 500000000000000raptor2-2.0.15/docs/html/parser-guess.html0000644000175000017500000000444412425347071015326 00000000000000 Guess parser (name guess)

Guess parser (name guess)

This is a special parser that picks the actual parser to use based on the content type, the content bytes or the content identifier. The content name can be either from a local file or from a URI.

If the protocol that delivered the content (such as HTTP) provided a Content Type (aka MIME Type) then this will be the primary means for identifying th ecotnent.

The secondary means to identify the content are the bytes of the content (if available), otherwise the content identifier is used, which is the least reliable.

raptor2-2.0.15/docs/html/serializer-rss-1-0.html0000644000175000017500000000430512425347071016153 00000000000000 RSS 1.0 serializer (name rss-1.0)

RSS 1.0 serializer (name rss-1.0)

A serializer to the RDF Site Summary (RSS) 1.0 format for describing a syndication feed of items.

By default this only serializes the RDF triples that describe the RSS channel and items found. If serialiser option 'rssTriples' is set to value 'rdf-xml' then any additional triples found will be included in the channel or item output.

raptor2-2.0.15/docs/html/tutorial-serializing.html0000644000175000017500000001054112425347071017062 00000000000000 Serializing RDF triples to a syntax raptor2-2.0.15/docs/html/tutorial-parser-set-namespace-handler.html0000644000175000017500000000521112425347071022172 00000000000000 Set namespace declared handler

Set namespace declared handler

Raptor can report when namespace prefix/URIs are declared in during parsing a syntax such as those in XML, RDF/XML or Turtle. A handler function can be set to receive these declarations using the namespace handler method.

  raptor_namespace_handler namespaces_handler;

  raptor_parser_set_namespace_handler(rdf_parser, user_data, namespaces_handler);

The namespaces_handler takes the following signature:

void
namespaces_handler(void* user_data, raptor_namespace *nspace)
{
  /*  */
}

Note

This may be called multiple times with the same namespace, if the namespace is declared inside different XML sub-trees.

raptor2-2.0.15/docs/html/tutorial-serializer-get-triples.html0000644000175000017500000001315212425347071021151 00000000000000 Get or construct RDF Statements (Triples)

Get or construct RDF Statements (Triples)

An raptor_statement containing the triple terms and optional graph term can be made either by receiving them from a raptor_parser via parsing or can be constructed by hand.

When constructing by hand, the raptor_statement structure should be allocated by the application and the fields filled in. Each statement has three triple terms (subject, predicate, object) and an optional graph term. The subject can be a URI or blank node, the predicate can only be a URI and the object can be a URI, blank node or RDF literal. RDF literals can have either just a Unicode string, a Unicode string and a language or a Unicode string and a datatype URI.

The statement terms are all instances of raptor_term objects constructed with the appropriate constructor for the URI, blank node or rdf literal types. The graph term of the statement is typically a URI or blank node.

Example 3. rdfserialize.c: Serialize 1 triple to RDF/XML (Abbreviated)

#include <stdio.h>
#include <raptor2.h>
#include <stdlib.h>

/* rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev */

int
main(int argc, char *argv[])
{
  raptor_world *world = NULL;
  raptor_serializer* rdf_serializer = NULL;
  unsigned char *uri_string;
  raptor_uri *base_uri;
  raptor_statement* triple;

  world = raptor_new_world();
  
  uri_string = raptor_uri_filename_to_uri_string(argv[1]);
  base_uri = raptor_new_uri(world, uri_string);

  rdf_serializer = raptor_new_serializer(world, "rdfxml-abbrev");
  raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout);
  
  /* Make a triple with URI subject, URI predicate, literal object */
  triple = raptor_new_statement(world);
  triple->subject = raptor_new_term_from_uri_string(world, (const unsigned char*)"http://example.org/subject");
  triple->predicate = raptor_new_term_from_uri_string(world, (const unsigned char*)"http://example.org/predicate");
  triple->object = raptor_new_term_from_literal(world,
                                                (const unsigned char*)"An example literal",
                                                NULL,
                                                (const unsigned char*)"en");

  /* Write the triple */
  raptor_serializer_serialize_statement(rdf_serializer, triple);

  /* Delete the triple */
  raptor_free_statement(triple);

  raptor_serializer_serialize_end(rdf_serializer);
  raptor_free_serializer(rdf_serializer);
  
  raptor_free_uri(base_uri);
  raptor_free_memory(uri_string);

  raptor_free_world(world);
  return 0;
}

Compile it like this:

$ gcc -o rdfserialize rdfserialize.c `pkg-config raptor2 --cflags --libs`

and run it with an optional base URI argument

$ ./rdfserialize
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about="http://example.org/subject">
    <ns0:predicate xmlns:ns0="http://example.org/" xml:lang="en">An example</ns0:predicate>
  </rdf:Description>
</rdf:RDF>


raptor2-2.0.15/docs/html/reference-manual.html0000644000175000017500000003227112425347071016116 00000000000000 Part II. Raptor Reference Manual

Part II. Raptor Reference Manual

This part contains the Raptor Reference Manual which comprehensively describes every class and function of the API.

The previous part contains the Raptor Tutorial explaining how to use the API parts.

For the latest information, see the Raptor Home Page and the main document overview in this document tree.

Table of Contents

Parsers in Raptor (syntax to triples)
Introduction
GRDDL parser (name grddl)
Guess parser (name guess)
JSON parser (name json)
N-Triples parser (name ntriples)
RDFa parser - (name rdfa)
RDF/XML parser - default (name rdfxml)
RSS Tag Soup parser (name rss-tag-soup)
TRiG parser (name trig)
Turtle Terse RDF Triple Language parser (name turtle)
Serializers in Raptor (triples to syntax)
Introduction
Atom 1.0 serializer (name atom)
JSON serializers (name json and name json-triples)
N-Quads serializer - default (name nquads)
N-Triples serializer - default (name ntriples)
RDF/XML serializer (name rdfxml)
RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)
RDF/XML (XMP Profile) serializer (name rdfxml-xmp)
Turtle serializer (name turtle)
RSS 1.0 serializer (name rss-1.0)
GraphViz dot serializer (name dot)
Initialisation — Library startup, shutdown and configuration.
General — General library constants and utility functions
Memory — Memory handling functions
AVL Trees — AVL Trees
Constants — Constant values and strings
Options — Class options
I/O Stream — Providing streaming I/O writing to files, strings or user code.
Locator — Location information for errors, warnings and messages.
Parser — RDF parsers - from a syntax to RDF triples
SAX2 — SAX2 XML Parsing API with namespaces and base URI support.
Sequence — Ordered sequence of items.
Serializer — RDF serializers - from RDF triples to a syntax
String buffer — Append-only strings.
Triples — RDF Triples
Unicode — Unicode and UTF-8 utility functions.
URI — URI class and relative URI computation
WWW — Retrieval of URI content from the web.
XML Namespaces — Namespaces in XML include stacks of Namespaces
XML QName — XML Namespace-qualified names.
XML — XML and XML Writer
Syntax Formats supported in Raptor
Introduction
MIME Types by Parser
MIME Types by Serializer
MIME Types Index
API Changes
Introduction
Changes between raptor2 1.4.21 and 2.0.0
New functions, types and enums
Deleted functions, types and enums
Renamed function and enums
Changed functions and types
Changes between raptor2 2.0.3 and 2.0.4
New functions, types and enums
Changes between raptor2 2.0.4 and 2.0.5
New functions, types and enums
Changes between raptor2 2.0.5 and 2.0.6
New functions, types and enums
Changes between raptor2 2.0.6 and 2.0.7
New functions, types and enums
Changes between raptor2 2.0.7 and 2.0.8
New functions, types and enums
Changes between raptor2 2.0.9 and 2.0.10
New functions, types and enums
Changes between raptor2 2.0.10 and 2.0.11
New functions, types and enums
Changes between raptor2 2.0.11 and 2.0.12
New functions, types and enums
Changes between raptor2 2.0.13 and 2.0.14
New functions, types and enums
Changes between raptor2 2.0.14 and 2.0.15
New functions, types and enums
raptor2-2.0.15/docs/html/raptor2-section-www.html0000644000175000017500000014055712425347071016571 00000000000000 WWW

WWW

WWW — Retrieval of URI content from the web.

Synopsis

typedef             raptor_www;
raptor_www *        raptor_new_www                      (raptor_world *world);
raptor_www *        raptor_new_www_with_connection      (raptor_world *world,
                                                         void *connection);
void                raptor_free_www                     (raptor_www *www);
void                (*raptor_www_write_bytes_handler)   (raptor_www *www,
                                                         void *userdata,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
void                (*raptor_www_content_type_handler)  (raptor_www *www,
                                                         void *userdata,
                                                         const char *content_type);
void                raptor_www_set_user_agent           (raptor_www *www,
                                                         const char *user_agent);
void                raptor_www_set_proxy                (raptor_www *www,
                                                         const char *proxy);
void                raptor_www_set_http_accept          (raptor_www *www,
                                                         const char *value);
int                 raptor_www_set_http_cache_control   (raptor_www *www,
                                                         const char *cache_control);
void                raptor_www_set_write_bytes_handler  (raptor_www *www,
                                                         raptor_www_write_bytes_handler handler,
                                                         void *user_data);
void                raptor_www_set_connection_timeout   (raptor_www *www,
                                                         int timeout);
void                raptor_www_set_content_type_handler (raptor_www *www,
                                                         raptor_www_content_type_handler handler,
                                                         void *user_data);
int                 (*raptor_uri_filter_func)           (void *user_data,
                                                         raptor_uri *uri);
void                raptor_www_set_uri_filter           (raptor_www *www,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);
void                (*raptor_www_final_uri_handler)     (raptor_www *www,
                                                         void *userdata,
                                                         raptor_uri *final_uri);
raptor_uri *        raptor_www_get_final_uri            (raptor_www *www);
void                raptor_www_set_final_uri_handler    (raptor_www *www,
                                                         raptor_www_final_uri_handler handler,
                                                         void *user_data);
int                 raptor_www_fetch                    (raptor_www *www,
                                                         raptor_uri *uri);
int                 raptor_www_fetch_to_string          (raptor_www *www,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p,
                                                         raptor_data_malloc_handler const malloc_handler);
void *              raptor_www_get_connection           (raptor_www *www);
int                 raptor_www_set_ssl_cert_options     (raptor_www *www,
                                                         const char *cert_filename,
                                                         const char *cert_type,
                                                         const char *cert_passphrase);
int                 raptor_www_set_ssl_verify_options   (raptor_www *www,
                                                         int verify_peer,
                                                         int verify_host);
void                raptor_www_abort                    (raptor_www *www,
                                                         const char *reason);

Description

Provides a wrapper to the resolution of URIs to give content using an underlying WWW-retrieval library. The content is delivered by callbacks and includes returning content type for handling content-negotation by the caller as well as chunks of byte content.

Details

raptor_www

raptor_www* raptor_www;

Raptor WWW class


raptor_new_www ()

raptor_www *        raptor_new_www                      (raptor_world *world);

Constructor - create a new raptor_www object.

world :

raptor_world object

Returns :

a new raptor_www or NULL on failure.

raptor_new_www_with_connection ()

raptor_www *        raptor_new_www_with_connection      (raptor_world *world,
                                                         void *connection);

Constructor - create a new raptor_www object over an existing WWW connection.

At present this only works with a libcurl CURL handle object when raptor is compiled with libcurl suppport. Otherwise the connection is ignored. This allows such things as setting up special flags on the curl handle before passing into the constructor.

world :

raptor_world object

connection :

external WWW connection object.

Returns :

a new raptor_www object or NULL on failure.

raptor_free_www ()

void                raptor_free_www                     (raptor_www *www);

Destructor - destroy a raptor_www object.

www :

WWW object.

raptor_www_write_bytes_handler ()

void                (*raptor_www_write_bytes_handler)   (raptor_www *www,
                                                         void *userdata,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Receiving bytes of data from WWW retrieval handler.

Set by raptor_www_set_write_bytes_handler().

www :

WWW object

userdata :

user data

ptr :

data pointer

size :

size of individual item

nmemb :

number of items

raptor_www_content_type_handler ()

void                (*raptor_www_content_type_handler)  (raptor_www *www,
                                                         void *userdata,
                                                         const char *content_type);

Receiving Content-Type: header from WWW retrieval handler.

Set by raptor_www_set_content_type_handler().

www :

WWW object

userdata :

user data

content_type :

content type seen

raptor_www_set_user_agent ()

void                raptor_www_set_user_agent           (raptor_www *www,
                                                         const char *user_agent);

Set the user agent value, for HTTP requests typically.

www :

WWW object

user_agent :

User-Agent string

raptor_www_set_proxy ()

void                raptor_www_set_proxy                (raptor_www *www,
                                                         const char *proxy);

Set the proxy for the WWW object.

The proxy usually a string of the form http://server.domain:port.

www :

WWW object

proxy :

proxy string.

raptor_www_set_http_accept ()

void                raptor_www_set_http_accept          (raptor_www *www,
                                                         const char *value);

Set HTTP Accept header.

www :

raptor_www class

value :

Accept: header value or NULL to have an empty one.

raptor_www_set_http_cache_control ()

int                 raptor_www_set_http_cache_control   (raptor_www *www,
                                                         const char *cache_control);

Set HTTP Cache-Control:header (default none)

The cache_control value can be a string to set it, "" to send a blank header or NULL to not set the header at all.

www :

WWW object

cache_control :

Cache-Control header value (or NULL to disable)

Returns :

non-0 on failure

raptor_www_set_write_bytes_handler ()

void                raptor_www_set_write_bytes_handler  (raptor_www *www,
                                                         raptor_www_write_bytes_handler handler,
                                                         void *user_data);

Set the handler to receive bytes written by the raptor_www implementation.

www :

WWW object

handler :

bytes handler function

user_data :

bytes handler data

raptor_www_set_connection_timeout ()

void                raptor_www_set_connection_timeout   (raptor_www *www,
                                                         int timeout);

Set WWW connection timeout

www :

WWW object

timeout :

Timeout in seconds

raptor_www_set_content_type_handler ()

void                raptor_www_set_content_type_handler (raptor_www *www,
                                                         raptor_www_content_type_handler handler,
                                                         void *user_data);

Set the handler to receive the HTTP Content-Type header value.

This is called if or when the value is discovered during retrieval by the raptor_www implementation. Not all implementations provide access to this.

www :

WWW object

handler :

content type handler function

user_data :

content type handler data

raptor_uri_filter_func ()

int                 (*raptor_uri_filter_func)           (void *user_data,
                                                         raptor_uri *uri);

Callback function for raptor_www_set_uri_filter

user_data :

user data

uri :

raptor_uri URI to check

Returns :

non-0 to filter the URI

raptor_www_set_uri_filter ()

void                raptor_www_set_uri_filter           (raptor_www *www,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);

Set URI filter function for WWW retrieval.

www :

WWW object

filter :

URI filter function

user_data :

User data to pass to filter function

raptor_www_final_uri_handler ()

void                (*raptor_www_final_uri_handler)     (raptor_www *www,
                                                         void *userdata,
                                                         raptor_uri *final_uri);

Receiving the final resolved URI from a WWW retrieval

Set by raptor_www_set_final_uri_handler().

www :

WWW object

userdata :

user data

final_uri :

final URI seen

raptor_www_get_final_uri ()

raptor_uri *        raptor_www_get_final_uri            (raptor_www *www);

Get the WWW final resolved URI.

This returns the URI used after any protocol redirection.

www :

raptor_www object

Returns :

a new URI or NULL if not known.

raptor_www_set_final_uri_handler ()

void                raptor_www_set_final_uri_handler    (raptor_www *www,
                                                         raptor_www_final_uri_handler handler,
                                                         void *user_data);

Set the handler to receive the HTTP Content-Type header value.

This is called if or when the value is discovered during retrieval by the raptor_www implementation. Not all implementations provide access to this.

www :

WWW object

handler :

content type handler function

user_data :

content type handler data

raptor_www_fetch ()

int                 raptor_www_fetch                    (raptor_www *www,
                                                         raptor_uri *uri);

Start a WWW content retrieval for the given URI, returning data via the write_bytes handler.

www :

WWW object

uri :

URI to read from

Returns :

non-0 on failure.

raptor_www_fetch_to_string ()

int                 raptor_www_fetch_to_string          (raptor_www *www,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p,
                                                         raptor_data_malloc_handler const malloc_handler);

Start a WWW content retrieval for the given URI, returning the data in a new string.

If malloc_handler is null, raptor will allocate it using it's own memory allocator. *string_p is set to NULL on failure (and *length_p to 0 if length_p is not NULL).

www :

raptor_www object

uri :

raptor_uri to retrieve

string_p :

pointer to location to hold string

length_p :

pointer to location to hold length of string (or NULL)

malloc_handler :

pointer to malloc() to use to make string (or NULL)

Returns :

non-0 on failure

raptor_www_get_connection ()

void *              raptor_www_get_connection           (raptor_www *www);

Get WWW library connection object.

Return the internal WWW connection handle. For libcurl, this returns the CURL handle and for libxml the context. Otherwise it returns NULL.

www :

raptor_www object

Returns :

connection pointer

raptor_www_set_ssl_cert_options ()

int                 raptor_www_set_ssl_cert_options     (raptor_www *www,
                                                         const char *cert_filename,
                                                         const char *cert_type,
                                                         const char *cert_passphrase);

Set SSL client certificate options (where supported)

www :

WWW object

cert_filename :

SSL client certificate file

cert_type :

SSL client certificate type (default is "PEM")

cert_passphrase :

SSL client certificate password

Returns :

non-0 when setting options is not supported

raptor_www_set_ssl_verify_options ()

int                 raptor_www_set_ssl_verify_options   (raptor_www *www,
                                                         int verify_peer,
                                                         int verify_host);

Set whether SSL verifies the authenticity of the peer's certificate

These options correspond to setting the curl CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options.

www :

WWW object

verify_peer :

SSL verify peer - non-0 to verify peer SSL certificate (default)

verify_host :

SSL verify host - 0 none, non-0 to require a CN match (default).

Returns :

non-0 on failure

raptor_www_abort ()

void                raptor_www_abort                    (raptor_www *www,
                                                         const char *reason);

Abort an ongoing raptor WWW operation and pass back a reason.

This is typically used within one of the raptor WWW handlers when retrieval need no longer continue due to another processing issue or error.

www :

WWW object

reason :

abort reason message
raptor2-2.0.15/docs/html/parser-turtle.html0000644000175000017500000000410012425347071015504 00000000000000 Turtle Terse RDF Triple Language parser (name turtle)

Turtle Terse RDF Triple Language parser (name turtle)

A parser for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.

raptor2-2.0.15/docs/html/serializer-rdfxml-abbrev.html0000644000175000017500000000405212425347071017603 00000000000000 RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)

RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)

An RDF/XML serializer using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.

raptor2-2.0.15/docs/html/raptor2-changes-2-0-3-to-2-0-4.html0000644000175000017500000000532212425347071017412 00000000000000 Changes between raptor2 2.0.3 and 2.0.4

Changes between raptor2 2.0.3 and 2.0.4

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/raptor2-section-memory.html0000644000175000017500000001661212425347071017247 00000000000000 Memory

Memory

Memory — Memory handling functions

Synopsis

void                raptor_free_memory                  (void *ptr);
void *              raptor_alloc_memory                 (size_t size);
void *              raptor_calloc_memory                (size_t nmemb,
                                                         size_t size);

Description

Wrappers around the free, malloc and calloc functions but called from inside the library. Required by some systems to handle multiple-HEAPs and pass memory to and from the library.

Details

raptor_free_memory ()

void                raptor_free_memory                  (void *ptr);

Free memory allocated inside raptor.

Some systems require memory allocated in a library to be deallocated in that library. This function allows memory allocated by raptor to be freed.

Examples include the result of the '_to_' methods that returns allocated memory such as raptor_uri_filename_to_uri_string, raptor_uri_filename_to_uri_string and raptor_uri_uri_string_to_filename_fragment

ptr :

memory pointer

raptor_alloc_memory ()

void *              raptor_alloc_memory                 (size_t size);

Allocate memory inside raptor.

Some systems require memory allocated in a library to be deallocated in that library. This function allows memory to be allocated inside the raptor shared library that can be freed inside raptor either internally or via raptor_free_memory.

Examples include using this in the raptor_world_generate_bnodeid() handler code to create new strings that will be used internally as short identifiers and freed later on by the parsers.

size :

size of memory to allocate

Returns :

the address of the allocated memory or NULL on failure

raptor_calloc_memory ()

void *              raptor_calloc_memory                (size_t nmemb,
                                                         size_t size);

Allocate zeroed array of items inside raptor.

Some systems require memory allocated in a library to be deallocated in that library. This function allows memory to be allocated inside the raptor shared library that can be freed inside raptor either internally or via raptor_free_memory.

Examples include using this in the raptor_world_generate_bnodeid() handler code to create new strings that will be used internally as short identifiers and freed later on by the parsers.

nmemb :

number of members

size :

size of item

Returns :

the address of the allocated memory or NULL on failure
raptor2-2.0.15/docs/html/raptor2-section-iostream.html0000644000175000017500000024023312425347071017560 00000000000000 I/O Stream

I/O Stream

I/O Stream — Providing streaming I/O writing to files, strings or user code.

Synopsis

typedef             raptor_iostream;
int                 (*raptor_iostream_init_func)        (void *context);
void                (*raptor_iostream_finish_func)      (void *context);
int                 (*raptor_iostream_write_byte_func)  (void *context,
                                                         const int byte);
int                 (*raptor_iostream_write_bytes_func) (void *context,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
int                 (*raptor_iostream_write_end_func)   (void *context);
int                 (*raptor_iostream_read_bytes_func)  (void *context,
                                                         void *ptr,
                                                         size_t size,
                                                         size_t nmemb);
int                 (*raptor_iostream_read_eof_func)    (void *context);
                    raptor_iostream_handler;
raptor_iostream *   raptor_new_iostream_from_handler    (raptor_world *world,
                                                         void *user_data,
                                                         const raptor_iostream_handler * const handler);
raptor_iostream *   raptor_new_iostream_from_sink       (raptor_world *world);
raptor_iostream *   raptor_new_iostream_from_filename   (raptor_world *world,
                                                         const char *filename);
raptor_iostream *   raptor_new_iostream_from_file_handle
                                                        (raptor_world *world,
                                                         FILE *handle);
raptor_iostream *   raptor_new_iostream_from_string     (raptor_world *world,
                                                         void *string,
                                                         size_t length);
raptor_iostream *   raptor_new_iostream_to_sink         (raptor_world *world);
raptor_iostream *   raptor_new_iostream_to_filename     (raptor_world *world,
                                                         const char *filename);
raptor_iostream *   raptor_new_iostream_to_file_handle  (raptor_world *world,
                                                         FILE *handle);
raptor_iostream *   raptor_new_iostream_to_string       (raptor_world *world,
                                                         void **string_p,
                                                         size_t *length_p,
                                                         raptor_data_malloc_handler const malloc_handler);
void                raptor_free_iostream                (raptor_iostream *iostr);
int                 raptor_iostream_hexadecimal_write   (unsigned int integer,
                                                         int width,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_read_bytes          (void *ptr,
                                                         size_t size,
                                                         size_t nmemb,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_read_eof            (raptor_iostream *iostr);
unsigned long       raptor_iostream_tell                (raptor_iostream *iostr);
int                 raptor_iostream_counted_string_write
                                                        (const void *string,
                                                         size_t len,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_decimal_write       (int integer,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_string_write        (const void *string,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_write_byte          (const int byte,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_write_bytes         (const void *ptr,
                                                         size_t size,
                                                         size_t nmemb,
                                                         raptor_iostream *iostr);
int                 raptor_iostream_write_end           (raptor_iostream *iostr);
int                 raptor_bnodeid_ntriples_write       (const unsigned char *bnodeid,
                                                         size_t len,
                                                         raptor_iostream *iostr);
enum                raptor_escaped_write_bitflags;
int                 raptor_string_escaped_write         (const unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         unsigned int flags,
                                                         raptor_iostream *iostr);
int                 raptor_term_escaped_write           (const raptor_term *term,
                                                         unsigned int flags,
                                                         raptor_iostream *iostr);
int                 raptor_uri_escaped_write            (raptor_uri *uri,
                                                         raptor_uri *base_uri,
                                                         unsigned int flags,
                                                         raptor_iostream *iostr);
int                 raptor_string_ntriples_write        (const unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         raptor_iostream *iostr);
int                 raptor_string_python_write          (const unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         unsigned int mode,
                                                         raptor_iostream *iostr);

Description

An class providing an I/O writer abstraction that allows generating output that can be stored or passed on to system files, strings allocated in memory (usually via raptor_stringbuffer), system file handles (FILE*) or to a user function.

Details

raptor_iostream

raptor_iostream* raptor_iostream;

Raptor I/O Stream class


raptor_iostream_init_func ()

int                 (*raptor_iostream_init_func)        (void *context);

Handler function for raptor_iostream initialising.

context :

stream context data

Returns :

non-0 on failure.

raptor_iostream_finish_func ()

void                (*raptor_iostream_finish_func)      (void *context);

Handler function for raptor_iostream terminating.

context :

stream context data

raptor_iostream_write_byte_func ()

int                 (*raptor_iostream_write_byte_func)  (void *context,
                                                         const int byte);

Handler function for implementing raptor_iostream_write_byte().

context :

stream context data

byte :

byte to write

Returns :

non-0 on failure.

raptor_iostream_write_bytes_func ()

int                 (*raptor_iostream_write_bytes_func) (void *context,
                                                         const void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Handler function for implementing raptor_iostream_write_bytes().

context :

stream context data

ptr :

pointer to bytes to write

size :

size of item

nmemb :

number of items

Returns :

non-0 on failure.

raptor_iostream_write_end_func ()

int                 (*raptor_iostream_write_end_func)   (void *context);

Handler function for implementing raptor_iostream_write_end().

context :

stream context data

Returns :

non-0 on failure.

raptor_iostream_read_bytes_func ()

int                 (*raptor_iostream_read_bytes_func)  (void *context,
                                                         void *ptr,
                                                         size_t size,
                                                         size_t nmemb);

Handler function for implementing raptor_iostream_read_bytes().

context :

stream context data

ptr :

pointer to buffer to read into

size :

size of buffer

nmemb :

number of items

Returns :

number of items read, 0 or < size on EOF, <0 on failure

raptor_iostream_read_eof_func ()

int                 (*raptor_iostream_read_eof_func)    (void *context);

Handler function for implementing raptor_iostream_read_eof().

context :

stream context data

Returns :

non-0 if EOF

raptor_iostream_handler

typedef struct {
  int version;

  /* V1 functions */
  raptor_iostream_init_func         init;
  raptor_iostream_finish_func       finish;
  raptor_iostream_write_byte_func   write_byte;
  raptor_iostream_write_bytes_func  write_bytes;
  raptor_iostream_write_end_func    write_end;

  /* V2 functions */
  raptor_iostream_read_bytes_func   read_bytes;
  raptor_iostream_read_eof_func     read_eof;
} raptor_iostream_handler;

I/O stream implementation handler structure.

int version;

interface version. Presently 1 or 2.

raptor_iostream_init_func init;

initialisation handler - optional, called at most once (V1)

raptor_iostream_finish_func finish;

finishing handler - optional, called at most once (V1)

raptor_iostream_write_byte_func write_byte;

write byte handler - required (for writing) (V1)

raptor_iostream_write_bytes_func write_bytes;

write bytes handler - required (for writing) (V1)

raptor_iostream_write_end_func write_end;

write end handler - optional (for writing), called at most once (V1)

raptor_iostream_read_bytes_func read_bytes;

read bytes handler - required (for reading) (V2)

raptor_iostream_read_eof_func read_eof;

read EOF handler - required (for reading) (V2)

raptor_new_iostream_from_handler ()

raptor_iostream *   raptor_new_iostream_from_handler    (raptor_world *world,
                                                         void *user_data,
                                                         const raptor_iostream_handler * const handler);

Create a new iostream over a user-defined handler

world :

raptor_world object

user_data :

pointer to context information to pass in to calls

handler :

pointer to handler methods

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_sink ()

raptor_iostream *   raptor_new_iostream_from_sink       (raptor_world *world);

Create a new read iostream from a sink, returning no data.

Provides an I/O source that returns end of input immediately on reads, and throw away all writes. Same as raptor_new_iostream_to_sink()

world :

raptor world

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_filename ()

raptor_iostream *   raptor_new_iostream_from_filename   (raptor_world *world,
                                                         const char *filename);

Constructor - create a new iostream reading from a filename.

world :

raptor world

filename :

Input filename to open and read from

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_file_handle ()

raptor_iostream *   raptor_new_iostream_from_file_handle
                                                        (raptor_world *world,
                                                         FILE *handle);

Constructor - create a new iostream reading from a file_handle.

The handle must already be open for reading. NOTE: This does not fclose the handle when it is finished.

world :

raptor world

handle :

Input file_handle to open and read from

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_from_string ()

raptor_iostream *   raptor_new_iostream_from_string     (raptor_world *world,
                                                         void *string,
                                                         size_t length);

Constructor - create a new iostream reading from a string.

world :

raptor world

string :

pointer to string

length :

length of string

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_sink ()

raptor_iostream *   raptor_new_iostream_to_sink         (raptor_world *world);

Create a new write iostream to a sink, throwing away all data.

Provides an that throw away all writes and returns end of input immediately on reads. Same as raptor_new_iostream_from_sink()

world :

raptor_world object

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_filename ()

raptor_iostream *   raptor_new_iostream_to_filename     (raptor_world *world,
                                                         const char *filename);

Constructor - create a new iostream writing to a filename.

world :

raptor world

filename :

Output filename to open and write to

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_file_handle ()

raptor_iostream *   raptor_new_iostream_to_file_handle  (raptor_world *world,
                                                         FILE *handle);

Constructor - create a new iostream writing to a FILE*.

The handle must already be open for writing. NOTE: This does not fclose the handle when it is finished.

world :

raptor world

handle :

FILE* handle to write to

Returns :

new raptor_iostream object or NULL on failure

raptor_new_iostream_to_string ()

raptor_iostream *   raptor_new_iostream_to_string       (raptor_world *world,
                                                         void **string_p,
                                                         size_t *length_p,
                                                         raptor_data_malloc_handler const malloc_handler);

Constructor - create a new iostream writing to a string.

If malloc_handler is null, raptor will allocate it using it's own memory allocator. *string_p is set to NULL on failure (and *length_p to 0 if length_p is not NULL).

world :

raptor world

string_p :

pointer to location to hold string

length_p :

pointer to location to hold length of string (or NULL)

malloc_handler :

pointer to malloc() to use to make string (or NULL)

Returns :

new raptor_iostream object or NULL on failure

raptor_free_iostream ()

void                raptor_free_iostream                (raptor_iostream *iostr);

Destructor - destroy an iostream.

iostr :

iostream object

raptor_iostream_hexadecimal_write ()

int                 raptor_iostream_hexadecimal_write   (unsigned int integer,
                                                         int width,
                                                         raptor_iostream *iostr);

Write an integer in hexadecimal to the iostream.

Always 0-fills the entire field and writes in uppercase A-F

integer :

unsigned integer to format as hexadecimal

width :

field width

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_iostream_read_bytes ()

int                 raptor_iostream_read_bytes          (void *ptr,
                                                         size_t size,
                                                         size_t nmemb,
                                                         raptor_iostream *iostr);

Read bytes to the iostream.

ptr :

start of buffer to read objects into

size :

size of object

nmemb :

number of objects to read

iostr :

raptor iostream

Returns :

number of objects read, 0 or less than nmemb on EOF, <0 on failure

raptor_iostream_read_eof ()

int                 raptor_iostream_read_eof            (raptor_iostream *iostr);

Check if an read iostream has ended

iostr :

raptor read iostream

Returns :

non-0 if EOF (or not a read iostream)

raptor_iostream_tell ()

unsigned long       raptor_iostream_tell                (raptor_iostream *iostr);

Get the offset in the iostream.

iostr :

raptor iostream

Returns :

offset in iostream

raptor_iostream_counted_string_write ()

int                 raptor_iostream_counted_string_write
                                                        (const void *string,
                                                         size_t len,
                                                         raptor_iostream *iostr);

Write a counted string to the iostream.

string :

string

len :

string length

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_iostream_decimal_write ()

int                 raptor_iostream_decimal_write       (int integer,
                                                         raptor_iostream *iostr);

Write an integer in decimal to the iostream.

integer :

integer to format as decimal

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_iostream_string_write ()

int                 raptor_iostream_string_write        (const void *string,
                                                         raptor_iostream *iostr);

Write a NULL-terminated string to the iostream.

string :

string

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_iostream_write_byte ()

int                 raptor_iostream_write_byte          (const int byte,
                                                         raptor_iostream *iostr);

Write a byte to the iostream.

byte :

byte to write

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_iostream_write_bytes ()

int                 raptor_iostream_write_bytes         (const void *ptr,
                                                         size_t size,
                                                         size_t nmemb,
                                                         raptor_iostream *iostr);

Write bytes to the iostream.

ptr :

start of objects to write

size :

size of object

nmemb :

number of objects

iostr :

raptor iostream

Returns :

number of objects actually written, which may be less than nmemb. <0 on failure

raptor_iostream_write_end ()

int                 raptor_iostream_write_end           (raptor_iostream *iostr);

End writing to the iostream.

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_bnodeid_ntriples_write ()

int                 raptor_bnodeid_ntriples_write       (const unsigned char *bnodeid,
                                                         size_t len,
                                                         raptor_iostream *iostr);

Write a blank node ID in a form legal for N-Triples with _: prefix

bnodeid :

bnode ID to write

len :

length of bnode ID

iostr :

raptor_iostream to write to

Returns :

non-0 on failure

enum raptor_escaped_write_bitflags

typedef enum {
  RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF      = 1,
  RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU    = 2,
  RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8               = 4,
  RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES = 8,

  /* N-Triples - favour writing \u, \U over UTF8 */
  RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF,
  RAPTOR_ESCAPED_WRITE_NTRIPLES_URI     = RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES,

  /* SPARQL literal: allows raw UTF8 for printable literals */
  RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8,

  /* SPARQL long literal: no BS-escapes allowed */
  RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8,

  /* SPARQL uri: have to escape certain characters */
  RAPTOR_ESCAPED_WRITE_SPARQL_URI     = RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 | RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES,

  /* Turtle (2013) escapes are like SPARQL */
  RAPTOR_ESCAPED_WRITE_TURTLE_URI     = RAPTOR_ESCAPED_WRITE_SPARQL_URI,
  RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL,
  RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL,

  /* JSON literals: \b \f \t \r \n and \u \U */
  RAPTOR_ESCAPED_WRITE_JSON_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF
} raptor_escaped_write_bitflags;

Bit flags for raptor_string_escaped_write() and friends.

RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF

Allow \b \f,

RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU

ALlow \t \n \r \u

RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8

Allow UTF-8 for printable U *

RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES

Must escape x00-x20<>\"{}|^` in URIs

RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL

N-Triples literal

RAPTOR_ESCAPED_WRITE_NTRIPLES_URI

N-Triples URI

RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL

SPARQL literal: allows raw UTF8 for printable literals

RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL

SPARQL long literal: no BS-escapes allowed

RAPTOR_ESCAPED_WRITE_SPARQL_URI

SPARQL uri: have to escape certain characters

RAPTOR_ESCAPED_WRITE_TURTLE_URI

Turtle 2013 URIs (like SPARQL)

RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL

Turtle 2013 literals (like SPARQL)

RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL

Turtle 2013 long literals (like SPARQL)

RAPTOR_ESCAPED_WRITE_JSON_LITERAL

JSON literals: \b \f \t \r \n and \u \U

raptor_string_escaped_write ()

int                 raptor_string_escaped_write         (const unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         unsigned int flags,
                                                         raptor_iostream *iostr);

Write a UTF-8 string formatted using different escapes to a raptor_iostream

Supports writing escapes in the Python, N-Triples, Turtle, JSON, SPARQL styles to an iostream.

string :

UTF-8 string to write

len :

length of UTF-8 string

delim :

Terminating delimiter character for string (such as " or >) or \0 for no escaping.

flags :

bit flags - see raptor_escaped_write_bitflags

iostr :

raptor_iostream to write to

Returns :

non-0 on failure such as bad UTF-8 encoding.

raptor_term_escaped_write ()

int                 raptor_term_escaped_write           (const raptor_term *term,
                                                         unsigned int flags,
                                                         raptor_iostream *iostr);

Write a raptor_term formatted with escapes to a raptor_iostream

term :

term to write

flags :

bit flags - see raptor_escaped_write_bitflags

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_uri_escaped_write ()

int                 raptor_uri_escaped_write            (raptor_uri *uri,
                                                         raptor_uri *base_uri,
                                                         unsigned int flags,
                                                         raptor_iostream *iostr);

Write a raptor_uri formatted with escapes to a raptor_iostream

uri :

uri to write

base_uri :

base uri to write relative to (or NULL)

flags :

bit flags - see raptor_escaped_write_bitflags

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_string_ntriples_write ()

int                 raptor_string_ntriples_write        (const unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         raptor_iostream *iostr);

Write an UTF-8 string using N-Triples escapes to an iostream.

string :

UTF-8 string to write

len :

length of UTF-8 string

delim :

Terminating delimiter character for string (such as " or >) or \0 for no escaping.

iostr :

raptor_iostream to write to

Returns :

non-0 on failure such as bad UTF-8 encoding.

raptor_string_python_write ()

int                 raptor_string_python_write          (const unsigned char *string,
                                                         size_t len,
                                                         const char delim,
                                                         unsigned int mode,
                                                         raptor_iostream *iostr);

Write a UTF-8 string using Python-style escapes (N-Triples, Turtle, JSON) to a raptor_iostream

Deprecated: use raptor_string_escaped_write() where the features requested are bits that can be individually chosen.

string :

UTF-8 string to write

len :

length of UTF-8 string

delim :

Terminating delimiter character for string (such as " or >) or \0 for no escaping.

mode :

mode 0=N-Triples mode, 1=Turtle (allow raw UTF-8), 2=Turtle long string (allow raw UTF-8), 3=JSON

iostr :

raptor_iostream to write to

Returns :

non-0 on failure such as bad UTF-8 encoding.
raptor2-2.0.15/docs/html/raptor2-section-stringbuffer.html0000644000175000017500000010020312425347071020425 00000000000000 String buffer

String buffer

String buffer — Append-only strings.

Synopsis

typedef             raptor_stringbuffer;
raptor_stringbuffer * raptor_new_stringbuffer           (void);
void                raptor_free_stringbuffer            (raptor_stringbuffer *stringbuffer);
int                 raptor_stringbuffer_append_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         size_t length,
                                                         int do_copy);
int                 raptor_stringbuffer_append_decimal  (raptor_stringbuffer *stringbuffer,
                                                         int integer);
int                 raptor_stringbuffer_append_hexadecimal
                                                        (raptor_stringbuffer *stringbuffer,
                                                         int hex);
int                 raptor_stringbuffer_append_string   (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         int do_copy);
int                 raptor_stringbuffer_append_stringbuffer
                                                        (raptor_stringbuffer *stringbuffer,
                                                         raptor_stringbuffer *append);
int                 raptor_stringbuffer_append_uri_escaped_counted_string
                                                        (raptor_stringbuffer *sb,
                                                         const char *string,
                                                         size_t length,
                                                         int space_is_plus);
int                 raptor_stringbuffer_prepend_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         size_t length,
                                                         int do_copy);
int                 raptor_stringbuffer_prepend_string  (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         int do_copy);
unsigned char *     raptor_stringbuffer_as_string       (raptor_stringbuffer *stringbuffer);
size_t              raptor_stringbuffer_length          (raptor_stringbuffer *stringbuffer);
int                 raptor_stringbuffer_copy_to_string  (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length);
int                 raptor_stringbuffer_write           (raptor_stringbuffer *sb,
                                                         raptor_iostream *iostr);

Description

A utility class that allows easy construction of strings that grow at the end by appending new strings. Primarily used for constructing/serializing syntaxes into strings by the raptor_iostream and raptor_serializer classes.

Details

raptor_stringbuffer

raptor_stringbuffer* raptor_stringbuffer;

Raptor string buffer class


raptor_new_stringbuffer ()

raptor_stringbuffer * raptor_new_stringbuffer           (void);

Create a new stringbuffer.

Returns :

pointer to a raptor_stringbuffer object or NULL on failure

raptor_free_stringbuffer ()

void                raptor_free_stringbuffer            (raptor_stringbuffer *stringbuffer);

Destroy a stringbuffer.

stringbuffer :

stringbuffer object to destroy.

raptor_stringbuffer_append_counted_string ()

int                 raptor_stringbuffer_append_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         size_t length,
                                                         int do_copy);

Add a counted string to the stringbuffer.

If string is NULL or length is 0, no work is performed.

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

stringbuffer :

raptor stringbuffer

string :

string

length :

length of string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_append_decimal ()

int                 raptor_stringbuffer_append_decimal  (raptor_stringbuffer *stringbuffer,
                                                         int integer);

Add an integer in decimal to the stringbuffer.

stringbuffer :

raptor stringbuffer

integer :

integer to format as decimal and add

Returns :

non-0 on failure

raptor_stringbuffer_append_hexadecimal ()

int                 raptor_stringbuffer_append_hexadecimal
                                                        (raptor_stringbuffer *stringbuffer,
                                                         int hex);

Add an integer formatted in hexdecimal (base 16) to the stringbuffer.

stringbuffer :

raptor stringbuffer

hex :

integer to format

Returns :

non-0 on failure

raptor_stringbuffer_append_string ()

int                 raptor_stringbuffer_append_string   (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         int do_copy);

Add a string to the stringbuffer.

If string is NULL, no work is performed.

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

stringbuffer :

raptor stringbuffer

string :

string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_append_stringbuffer ()

int                 raptor_stringbuffer_append_stringbuffer
                                                        (raptor_stringbuffer *stringbuffer,
                                                         raptor_stringbuffer *append);

Add a stringbuffer to the stringbuffer.

This function removes the content from the appending stringbuffer, making it empty and appends it to the supplied stringbuffer.

stringbuffer :

raptor_stringbuffer

append :

raptor_stringbuffer to append

Returns :

non-0 on failure

raptor_stringbuffer_append_uri_escaped_counted_string ()

int                 raptor_stringbuffer_append_uri_escaped_counted_string
                                                        (raptor_stringbuffer *sb,
                                                         const char *string,
                                                         size_t length,
                                                         int space_is_plus);

Add a URI-escaped version of string to the stringbuffer.

If string is NULL or length is 0, no work is performed.

sb :

raptor stringbuffer

string :

string

length :

length of string

space_is_plus :

if non-0, escape spaces as '+' otherwise percent-encode them

Returns :

non-0 on failure

raptor_stringbuffer_prepend_counted_string ()

int                 raptor_stringbuffer_prepend_counted_string
                                                        (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         size_t length,
                                                         int do_copy);

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

Add a string to the start of the stringbuffer.

stringbuffer :

raptor stringbuffer

string :

string

length :

length of string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_prepend_string ()

int                 raptor_stringbuffer_prepend_string  (raptor_stringbuffer *stringbuffer,
                                                         const unsigned char *string,
                                                         int do_copy);

Add a string to the start of the stringbuffer.

If do_copy is non-0, the passed-in string is copied into new memory otherwise the stringbuffer becomes the owner of the string pointer and will free it when the stringbuffer is destroyed.

stringbuffer :

raptor stringbuffer

string :

string

do_copy :

non-0 to copy the string

Returns :

non-0 on failure

raptor_stringbuffer_as_string ()

unsigned char *     raptor_stringbuffer_as_string       (raptor_stringbuffer *stringbuffer);

Return the stringbuffer as a C string.

Note: the return value is a to a shared string that the stringbuffer allocates and manages.

stringbuffer :

raptor stringbuffer

Returns :

NULL on failure or stringbuffer is empty, otherwise a pointer to a shared copy of the string.

raptor_stringbuffer_length ()

size_t              raptor_stringbuffer_length          (raptor_stringbuffer *stringbuffer);

Return the stringbuffer length.

stringbuffer :

raptor stringbuffer

Returns :

size of stringbuffer

raptor_stringbuffer_copy_to_string ()

int                 raptor_stringbuffer_copy_to_string  (raptor_stringbuffer *stringbuffer,
                                                         unsigned char *string,
                                                         size_t length);

Copy the stringbuffer into a string.

Copies the underlying string to a pre-allocated buffer. The output string is always '\0' terminated.

stringbuffer :

raptor stringbuffer

string :

output string

length :

size of output string

Returns :

non-0 on failure such as stringbuffer is empty, buffer is too small

raptor_stringbuffer_write ()

int                 raptor_stringbuffer_write           (raptor_stringbuffer *sb,
                                                         raptor_iostream *iostr);

Write a stringbuffer to an iostream.

sb :

raptor_stringbuffer to write

iostr :

raptor iostream

Returns :

non-0 on failure
raptor2-2.0.15/docs/html/raptor-formats.html0000644000175000017500000000566112425347071015670 00000000000000 Syntax Formats supported in Raptor

Syntax Formats supported in Raptor

This chapter describes the syntax formats supported by parsers and serializers in Raptor.

Introduction

The parsers and serializers in raptor can handle different MIME Types with different levels of quality (Q). A Q of 1.0 indicates that the parser or serializer will be able to read or write the full format with high quality, and it should be the prefered parser or serializer for that mime type. Lower Q values indicate either additional mime type support (for parsing) or less-preferred mime types (for serializing). A serializer typically has just 1 mime type of Q 1.0; the preferred type.

raptor2-2.0.15/docs/html/parser-trig.html0000644000175000017500000000401212425347071015134 00000000000000 TRiG parser (name trig)

TRiG parser (name trig)

A parser for the TriG - Turtle with Named Graphs syntax.

The parser is alpha quality and may not support the entire TRiG specification.

raptor2-2.0.15/docs/html/parser-rdfxml.html0000644000175000017500000000644512425347071015477 00000000000000 RDF/XML parser - default (name rdfxml)

RDF/XML parser - default (name rdfxml)

A parser for the standard RDF/XML syntax as revised by the W3C RDF Core working group.

This is the default parser in Raptor.

Features of this parser:

raptor2-2.0.15/docs/html/raptor2-section-triples.html0000644000175000017500000024322612425347071017424 00000000000000 Triples

Triples

Triples — RDF Triples

Synopsis

enum                raptor_term_type;
                    raptor_term;
                    raptor_term_value;
                    raptor_term_blank_value;
                    raptor_term_literal_value;
raptor_term *       raptor_new_term_from_blank          (raptor_world *world,
                                                         const unsigned char *blank);
raptor_term *       raptor_new_term_from_counted_blank  (raptor_world *world,
                                                         const unsigned char *blank,
                                                         size_t length);
raptor_term *       raptor_new_term_from_literal        (raptor_world *world,
                                                         const unsigned char *literal,
                                                         raptor_uri *datatype,
                                                         const unsigned char *language);
raptor_term *       raptor_new_term_from_counted_literal
                                                        (raptor_world *world,
                                                         const unsigned char *literal,
                                                         size_t literal_len,
                                                         raptor_uri *datatype,
                                                         const unsigned char *language,
                                                         unsigned char language_len);
raptor_term *       raptor_new_term_from_counted_uri_string
                                                        (raptor_world *world,
                                                         const unsigned char *uri_string,
                                                         size_t length);
raptor_term *       raptor_new_term_from_uri            (raptor_world *world,
                                                         raptor_uri *uri);
raptor_term *       raptor_new_term_from_uri_string     (raptor_world *world,
                                                         const unsigned char *uri_string);
raptor_term *       raptor_new_term_from_counted_string (raptor_world *world,
                                                         unsigned char *string,
                                                         size_t length);
raptor_term *       raptor_term_copy                    (raptor_term *term);
int                 raptor_term_compare                 (const raptor_term *t1,
                                                         const raptor_term *t2);
int                 raptor_term_equals                  (raptor_term *t1,
                                                         raptor_term *t2);
void                raptor_free_term                    (raptor_term *term);
unsigned char *     raptor_term_to_counted_string       (raptor_term *term,
                                                         size_t *len_p);
unsigned char *     raptor_term_to_string               (raptor_term *term);
int                 raptor_term_ntriples_write          (const raptor_term *term,
                                                         raptor_iostream *iostr);
unsigned char *     raptor_term_to_turtle_counted_string
                                                        (raptor_term *term,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri,
                                                         size_t *len_p);
unsigned char *     raptor_term_to_turtle_string        (raptor_term *term,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);
int                 raptor_term_turtle_write            (raptor_iostream *iostr,
                                                         raptor_term *term,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);
                    raptor_statement;
raptor_statement *  raptor_new_statement                (raptor_world *world);
raptor_statement *  raptor_new_statement_from_nodes     (raptor_world *world,
                                                         raptor_term *subject,
                                                         raptor_term *predicate,
                                                         raptor_term *object,
                                                         raptor_term *graph);
void                raptor_free_statement               (raptor_statement *statement);
raptor_statement *  raptor_statement_copy               (raptor_statement *statement);
int                 raptor_statement_compare            (const raptor_statement *s1,
                                                         const raptor_statement *s2);
int                 raptor_statement_equals             (const raptor_statement *s1,
                                                         const raptor_statement *s2);
void                raptor_statement_init               (raptor_statement *statement,
                                                         raptor_world *world);
void                raptor_statement_clear              (raptor_statement *statement);
int                 raptor_statement_print              (const raptor_statement *statement,
                                                         FILE *stream);
int                 raptor_statement_print_as_ntriples  (const raptor_statement *statement,
                                                         FILE *stream);
int                 raptor_statement_ntriples_write     (const raptor_statement *statement,
                                                         raptor_iostream *iostr,
                                                         int write_graph_term);

Description

Representation of RDF statements inside Raptor. They are a 3 or 4-tuple of raptor_term which cover the RDF terms of URI (RAPTOR_TERM_TYPE_URI), Literal (RAPTOR_TERM_TYPE_LITERAL) and Blank Node (RAPTOR_TERM_TYPE_BLANK).

Details

enum raptor_term_type

typedef enum {
  RAPTOR_TERM_TYPE_UNKNOWN = 0,
  RAPTOR_TERM_TYPE_URI     = 1,
  RAPTOR_TERM_TYPE_LITERAL = 2,
  /* unused type 3 */
  RAPTOR_TERM_TYPE_BLANK   = 4
} raptor_term_type;

Type of term in a raptor_statement

Node type 3 is unused but exists to preserve numeric compatibility with librdf_node_type values.

RAPTOR_TERM_TYPE_UNKNOWN

Internal

RAPTOR_TERM_TYPE_URI

RDF URI

RAPTOR_TERM_TYPE_LITERAL

RDF literal

RAPTOR_TERM_TYPE_BLANK

RDF blank node

raptor_term

typedef struct {
  raptor_world* world;

  int usage;

  raptor_term_type type;

  raptor_term_value value;
} raptor_term;

An RDF statement term

raptor_world *world;

world

int usage;

usage reference count (if >0)

raptor_term_type type;

term type

raptor_term_value value;

term values per type

raptor_term_value

typedef union {
  raptor_uri *uri;

  raptor_term_literal_value literal;

  raptor_term_blank_value blank;
} raptor_term_value;

Term value - this typedef exists solely for use in raptor_term

raptor_uri *uri;

uri value when term type is RAPTOR_TERM_TYPE_URI

raptor_term_literal_value literal;

literal value when term type is RAPTOR_TERM_TYPE_LITERAL

raptor_term_blank_value blank;

blank value when term type is RAPTOR_TERM_TYPE_BLANK

raptor_term_blank_value

typedef struct {
  unsigned char *string;
  unsigned int string_len;
} raptor_term_blank_value;

Blank term value - this typedef exists solely for use in raptor_term

unsigned char *string;

literal string

unsigned int string_len;

length of string

raptor_term_literal_value

typedef struct {
  unsigned char *string;
  unsigned int string_len;

  raptor_uri *datatype;

  unsigned char *language;
  unsigned char language_len;
} raptor_term_literal_value;

Literal term value - this typedef exists solely for use in raptor_term

Either datatype or language may be non-NULL but not both.

unsigned char *string;

literal string

unsigned int string_len;

length of string

raptor_uri *datatype;

datatype URI (or NULL)

unsigned char *language;

literal language (or NULL)

unsigned char language_len;

length of language

raptor_new_term_from_blank ()

raptor_term *       raptor_new_term_from_blank          (raptor_world *world,
                                                         const unsigned char *blank);

Constructor - create a new blank node statement term from a UTF-8 encoded blank node ID

Takes a copy of the passed in blank

If blank is NULL or an empty string, creates a new internal identifier and uses it. This will use the handler set with raptor_world_set_generate_bnodeid_parameters()

world :

raptor world

blank :

UTF-8 encoded blank node identifier (or NULL)

Returns :

new term or NULL on failure

raptor_new_term_from_counted_blank ()

raptor_term *       raptor_new_term_from_counted_blank  (raptor_world *world,
                                                         const unsigned char *blank,
                                                         size_t length);

Constructor - create a new blank node statement term from a counted UTF-8 encoded blank node ID

Takes a copy of the passed in blank

If blank is NULL, creates a new internal identifier and uses it. This will use the handler set with raptor_world_set_generate_bnodeid_parameters()

Note: The blank need not be NULL terminated - a NULL will be added to the copied string used.

world :

raptor world

blank :

UTF-8 encoded blank node identifier (or NULL)

length :

length of identifier (or 0)

Returns :

new term or NULL on failure

raptor_new_term_from_literal ()

raptor_term *       raptor_new_term_from_literal        (raptor_world *world,
                                                         const unsigned char *literal,
                                                         raptor_uri *datatype,
                                                         const unsigned char *language);

Constructor - create a new literal statement term

Takes copies of the passed in literal, datatype, language

Only one of language or datatype may be given. If both are given, NULL is returned. If language is the empty string, it is the equivalent to NULL.

world :

raptor world

literal :

UTF-8 encoded literal string (or NULL for empty literal)

datatype :

literal datatype URI (or NULL)

language :

literal language (or NULL)

Returns :

new term or NULL on failure

raptor_new_term_from_counted_literal ()

raptor_term *       raptor_new_term_from_counted_literal
                                                        (raptor_world *world,
                                                         const unsigned char *literal,
                                                         size_t literal_len,
                                                         raptor_uri *datatype,
                                                         const unsigned char *language,
                                                         unsigned char language_len);

Constructor - create a new literal statement term from a counted UTF-8 encoded literal string

Takes copies of the passed in literal, datatype, language

Only one of language or datatype may be given. If both are given, NULL is returned. If language is the empty string, it is the equivalent to NULL.

Note: The literal need not be NULL terminated - a NULL will be added to the copied string used.

world :

raptor world

literal :

UTF-8 encoded literal string (or NULL for empty literal)

literal_len :

length of literal

datatype :

literal datatype URI (or NULL)

language :

literal language (or NULL for no language)

language_len :

literal language length

Returns :

new term or NULL on failure

raptor_new_term_from_counted_uri_string ()

raptor_term *       raptor_new_term_from_counted_uri_string
                                                        (raptor_world *world,
                                                         const unsigned char *uri_string,
                                                         size_t length);

Constructor - create a new URI statement term from a UTF-8 encoded Unicode string

Note: The uri_string need not be NULL terminated - a NULL will be added to the copied string used.

world :

raptor world

uri_string :

UTF-8 encoded URI string.

length :

length of URI string

Returns :

new term or NULL on failure

raptor_new_term_from_uri ()

raptor_term *       raptor_new_term_from_uri            (raptor_world *world,
                                                         raptor_uri *uri);

Constructor - create a new URI statement term

Takes a copy (reference) of the passed in uri

world :

raptor world

uri :

uri

Returns :

new term or NULL on failure

raptor_new_term_from_uri_string ()

raptor_term *       raptor_new_term_from_uri_string     (raptor_world *world,
                                                         const unsigned char *uri_string);

Constructor - create a new URI statement term from a UTF-8 encoded Unicode string

world :

raptor world

uri_string :

UTF-8 encoded URI string.

Returns :

new term or NULL on failure

raptor_new_term_from_counted_string ()

raptor_term *       raptor_new_term_from_counted_string (raptor_world *world,
                                                         unsigned char *string,
                                                         size_t length);

Constructor - create a new term from a Turtle / N-Triples format string in UTF-8

See also raptor_term_to_counted_string() and raptor_term_to_string()

world :

raptor world

string :

N-Triples format string (UTF-8)

length :

length of string (or 0)

Returns :

new term or NULL on failure

raptor_term_copy ()

raptor_term *       raptor_term_copy                    (raptor_term *term);

Copy constructor - get a copy of a statement term

term :

raptor term

Returns :

new term object or NULL on failure

raptor_term_compare ()

int                 raptor_term_compare                 (const raptor_term *t1,
                                                         const raptor_term *t2);

Compare a pair of raptor_term

If types are different, the raptor_term_type order is used.

Resource and datatype URIs are compared with raptor_uri_compare(), blank nodes and literals with strcmp(). If one literal has no language, it is earlier than one with a language. If one literal has no datatype, it is earlier than one with a datatype.

t1 :

first term

t2 :

second term

Returns :

<0 if t1 is before t2, 0 if equal, >0 if t1 is after t2

raptor_term_equals ()

int                 raptor_term_equals                  (raptor_term *t1,
                                                         raptor_term *t2);

Compare a pair of raptor_term for equality

t1 :

first term

t2 :

second term

Returns :

non-0 if the terms are equal

raptor_free_term ()

void                raptor_free_term                    (raptor_term *term);

Destructor - destroy a raptor_term object.

term :

raptor_term object

raptor_term_to_counted_string ()

unsigned char *     raptor_term_to_counted_string       (raptor_term *term,
                                                         size_t *len_p);

Turns a raptor term into a N-Triples format counted string.

Turns the given term into an N-Triples escaped string using all the escapes as defined in http://www.w3.org/TR/rdf-testcases/ntriples

This function uses raptor_term_ntriples_write() to write to an raptor_iostream which is the prefered way to write formatted output.

See also raptor_new_term_from_counted_string() to reverse this.

See also raptor_term_to_turtle_string() to write as Turtle which will include Turtle syntax such as 'true' for booleans and """quoting"""

term :

raptor_term

len_p :

Pointer to location to store length of new string (if not NULL)

Returns :

the new string or NULL on failure. The length of the new string is returned in *len_p if len_p is not NULL.

raptor_term_to_string ()

unsigned char *     raptor_term_to_string               (raptor_term *term);

Turns a raptor term into a N-Triples format string.

Turns the given term into an N-Triples escaped string using all the escapes as defined in http://www.w3.org/TR/rdf-testcases/ntriples

See also raptor_new_term_from_counted_string() to reverse this.

See also raptor_term_to_turtle_string() to write as Turtle which will include Turtle syntax such as 'true' for booleans and """quoting"""

term :

raptor_term

Returns :

the new string or NULL on failure.

raptor_term_ntriples_write ()

int                 raptor_term_ntriples_write          (const raptor_term *term,
                                                         raptor_iostream *iostr);

Write a raptor_term formatted in N-Triples format to a raptor_iostream

Deprecated: Use raptor_term_escaped_write() that allows configuring format detail flags.

term :

term to write

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_term_to_turtle_counted_string ()

unsigned char *     raptor_term_to_turtle_counted_string
                                                        (raptor_term *term,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri,
                                                         size_t *len_p);

Convert raptor_term to a string. Caller has responsibility to free the string.

Note: This creates and destroys several internal objects for each call so for more efficient writing, create a turtle serializer.

See also raptor_term_to_counted_string() which writes in simpler N-Triples with no Turtle abbreviated forms, and is quicker.

term :

term

nstack :

namespace stack

base_uri :

base URI

len_p :

Pointer to location to store length of new string (if not NULL)

Returns :

the new string or NULL on failure. The length of the new string is returned in *len_p if len_p is not NULL.

raptor_term_to_turtle_string ()

unsigned char *     raptor_term_to_turtle_string        (raptor_term *term,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);

Convert raptor_term to a string. Caller has responsibility to free the string.

See also raptor_term_to_counted_string() which writes in simpler N-Triples with no Turtle abbreviated forms, and is quicker.

term :

term

nstack :

namespace stack

base_uri :

base URI

Returns :

the new string or NULL on failure.

raptor_term_turtle_write ()

int                 raptor_term_turtle_write            (raptor_iostream *iostr,
                                                         raptor_term *term,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);

Write raptor_term to a stream in turtle syntax (using QNames).

Note: This creates and destroys several internal objects for each call so for more efficient writing, create a turtle serializer.

iostr :

iostream for writing

term :

term

nstack :

namespace stack

base_uri :

base URI

Returns :

non-0 on failure

raptor_statement

typedef struct {
  raptor_world* world;
  int usage;
  raptor_term* subject;
  raptor_term* predicate;
  raptor_term* object;
  raptor_term* graph;
} raptor_statement;

An RDF triple with optional graph name (quad)

See raptor_term for a description of how the fields may be used. As returned by a parser statement_handler.

raptor_world *world;

world pointer

int usage;

usage count

raptor_term *subject;

statement subject

raptor_term *predicate;

statement predicate

raptor_term *object;

statement object

raptor_term *graph;

statement graph name (or NULL if not present)

raptor_new_statement ()

raptor_statement *  raptor_new_statement                (raptor_world *world);

Constructor - create a new raptor_statement.

world :

raptor world

Returns :

new raptor statement or NULL on failure

raptor_new_statement_from_nodes ()

raptor_statement *  raptor_new_statement_from_nodes     (raptor_world *world,
                                                         raptor_term *subject,
                                                         raptor_term *predicate,
                                                         raptor_term *object,
                                                         raptor_term *graph);

Constructor - create a new raptor_statement from a set of terms

The subject, predicate, object and graph become owned by the statement.

world :

raptor world

subject :

subject term (or NULL)

predicate :

predicate term (or NULL)

object :

object term (or NULL)

graph :

graph name term (or NULL)

Returns :

new raptor statement or NULL on failure

raptor_free_statement ()

void                raptor_free_statement               (raptor_statement *statement);

Destructor

statement :

statement

raptor_statement_copy ()

raptor_statement *  raptor_statement_copy               (raptor_statement *statement);

Copy a raptor_statement.

statement :

statement to copy

Returns :

a new raptor_statement or NULL on error

raptor_statement_compare ()

int                 raptor_statement_compare            (const raptor_statement *s1,
                                                         const raptor_statement *s2);

Compare a pair of raptor_statement

Uses raptor_term_compare() to check ordering between subjects, predicates and objects of statements.

s1 :

first statement

s2 :

second statement

Returns :

<0 if s1 is before s2, 0 if equal, >0 if s1 is after s2

raptor_statement_equals ()

int                 raptor_statement_equals             (const raptor_statement *s1,
                                                         const raptor_statement *s2);

Compare a pair of raptor_statement for equality

s1 :

first statement

s2 :

second statement

Returns :

non-0 if statements are equal

raptor_statement_init ()

void                raptor_statement_init               (raptor_statement *statement,
                                                         raptor_world *world);

Initialize a static raptor_statement.

statement :

statement to initialize

world :

raptor world

raptor_statement_clear ()

void                raptor_statement_clear              (raptor_statement *statement);

Empty a raptor_statement of terms.

statement :

raptor_statement object

raptor_statement_print ()

int                 raptor_statement_print              (const raptor_statement *statement,
                                                         FILE *stream);

Print a raptor_statement to a stream.

statement :

raptor_statement object to print

stream :

FILE* stream

Returns :

non-0 on failure

raptor_statement_print_as_ntriples ()

int                 raptor_statement_print_as_ntriples  (const raptor_statement *statement,
                                                         FILE *stream);

Print a raptor_statement in N-Triples form.

statement :

raptor_statement to print

stream :

FILE* stream

Returns :

non-0 on failure

raptor_statement_ntriples_write ()

int                 raptor_statement_ntriples_write     (const raptor_statement *statement,
                                                         raptor_iostream *iostr,
                                                         int write_graph_term);

Write a raptor_statement formatted in N-Triples or N-Quads format to a raptor_iostream

statement :

statement to write

iostr :

raptor iostream

write_graph_term :

flag to write graph term if present

Returns :

non-0 on failure
raptor2-2.0.15/docs/html/raptor2-changes.html0000644000175000017500000001407012425347071015701 00000000000000 API Changes raptor2-2.0.15/docs/html/raptor2-section-general.html0000644000175000017500000015566112425347071017364 00000000000000 General

General

General — General library constants and utility functions

Synopsis

#define             RAPTOR_VERSION
#define             RAPTOR_VERSION_MAJOR
#define             RAPTOR_VERSION_MINOR
#define             RAPTOR_VERSION_RELEASE
#define             RAPTOR_VERSION_STRING
extern const unsigned int raptor_version_major;
extern const unsigned int raptor_version_minor;
extern const unsigned int raptor_version_release;
extern const unsigned int raptor_version_decimal;
extern const char * const raptor_copyright_string;
extern const char * const raptor_home_url_string;
extern const char * const raptor_license_string;
extern const char * const raptor_short_copyright_string;
extern const char * const raptor_version_string;
extern const unsigned char * const raptor_owl_namespace_uri;
extern const unsigned char * const raptor_rdf_namespace_uri;
extern const unsigned char * const raptor_rdf_schema_namespace_uri;
extern const unsigned char * const raptor_xml_literal_datatype_uri_string;
extern const unsigned char * const raptor_xml_namespace_uri;
extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri;
void                (*raptor_statement_handler)         (void *user_data,
                                                         raptor_statement *statement);
int                 raptor_snprintf                     (char *buffer,
                                                         size_t size,
                                                         const char *format,
                                                         ...);
int                 raptor_vasprintf                    (char **ret,
                                                         const char *format,
                                                         va_list arguments);
char *              raptor_vsnprintf                    (const char *format,
                                                         va_list arguments);
int                 raptor_vsnprintf2                   (char *buffer,
                                                         size_t size,
                                                         const char *format,
                                                         va_list arguments);
void                raptor_sort_r                       (void *base,
                                                         size_t nel,
                                                         size_t width,
                                                         raptor_data_compare_arg_handler compar,
                                                         void *user_data);
void                (*raptor_log_handler)               (void *user_data,
                                                         raptor_log_message *message);
                    raptor_log_message;
enum                raptor_log_level;
const char *        raptor_log_level_get_label          (raptor_log_level level);
enum                raptor_domain;
const char *        raptor_domain_get_label             (raptor_domain domain);
int                 (*raptor_data_compare_handler)      (const void *data1,
                                                         const void *data2);
int                 (*raptor_data_compare_arg_handler)  (const void *data1,
                                                         const void *data2,
                                                         void *user_data);
void                (*raptor_data_context_free_handler) (void *context,
                                                         void *object);
int                 (*raptor_data_context_print_handler)
                                                        (void *context,
                                                         void *object,
                                                         FILE *fh);
void                (*raptor_data_free_handler)         (void *data);
void *              (*raptor_data_malloc_handler)       (size_t size);
int                 (*raptor_data_print_handler)        (void *object,
                                                         FILE *fh);
enum                raptor_syntax_bitflags;
                    raptor_syntax_description;
int                 raptor_syntax_description_validate  (raptor_syntax_description *desc);
                    raptor_type_q;

Description

How to get access to version numbers, set message and error handlers, list the parsed and serialized syntaxes provided in the library and various other utility functions.

Details

RAPTOR_VERSION

#define RAPTOR_VERSION 20015

Raptor library version number

Format: major * 10000 + minor * 100 + release


RAPTOR_VERSION_MAJOR

#define RAPTOR_VERSION_MAJOR 2

Raptor library major version


RAPTOR_VERSION_MINOR

#define RAPTOR_VERSION_MINOR 0

Raptor library minor version


RAPTOR_VERSION_RELEASE

#define RAPTOR_VERSION_RELEASE 15

Raptor library release


RAPTOR_VERSION_STRING

#define RAPTOR_VERSION_STRING "2.0.15"

Raptor library version string


raptor_version_major

extern const unsigned int raptor_version_major;

Raptor major version number.


raptor_version_minor

extern const unsigned int raptor_version_minor;

Raptor minor version number.


raptor_version_release

extern const unsigned int raptor_version_release;

Raptor release version number.


raptor_version_decimal

extern const unsigned int raptor_version_decimal;

Raptor version as a decimal number.

Format: major * 10000 + minor * 100 + release


raptor_copyright_string

extern const char * const raptor_copyright_string;

Copyright string (multiple lines).


raptor_home_url_string

extern const char * const raptor_home_url_string;

Raptor home page URL.


raptor_license_string

extern const char * const raptor_license_string;

Raptor license string.


raptor_short_copyright_string

extern const char * const raptor_short_copyright_string;

Short copyright string (one line).


raptor_version_string

extern const char * const raptor_version_string;

Raptor version as a string.


raptor_owl_namespace_uri

extern const unsigned char * const raptor_owl_namespace_uri;

OWL (owl:) Namespace URI string.


raptor_rdf_namespace_uri

extern const unsigned char * const raptor_rdf_namespace_uri;

RDF Namespace (rdf:) URI string.


raptor_rdf_schema_namespace_uri

extern const unsigned char * const raptor_rdf_schema_namespace_uri;

RDF Schema (rdfs:) Namespace URI string.


raptor_xml_literal_datatype_uri_string

extern const unsigned char * const raptor_xml_literal_datatype_uri_string;

XML Literal datatype (rdf:XMLLiteral) URI string.


raptor_xml_namespace_uri

extern const unsigned char * const raptor_xml_namespace_uri;

XML Namespace (xml:) URI string.


raptor_xmlschema_datatypes_namespace_uri

extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri;

XML Schema datatypes (xsd:) namespace URI string.


raptor_statement_handler ()

void                (*raptor_statement_handler)         (void *user_data,
                                                         raptor_statement *statement);

Statement (triple) reporting handler function.

This handler function set with raptor_parser_set_statement_handler() on a parser receives statements as the parsing proceeds. The statement argument to the handler is shared and must be copied by the caller with raptor_statement_copy().

user_data :

user data

statement :

statement to report

raptor_snprintf ()

int                 raptor_snprintf                     (char *buffer,
                                                         size_t size,
                                                         const char *format,
                                                         ...);

Format output into an allocated sized buffer

This provides a portable version snprintf() over variants on different systems.

If buffer is NULL, calculates the number of bytes needed to allocate for buffer and do no formatting.

buffer :

buffer (or NULL)

size :

bufer size (or 0)

format :

printf-style format string

... :

format arguments

Returns :

number of bytes allocated (excluding NUL) or 0 on failure

raptor_vasprintf ()

int                 raptor_vasprintf                    (char **ret,
                                                         const char *format,
                                                         va_list arguments);

Format output into a new buffer and return it

This is a wrapper around the (GNU) vasprintf function that is not always avaiable.

ret :

pointer to store buffer

format :

printf-style format string

arguments :

format arguments list

Returns :

number of bytes allocated (excluding NUL) or < 0 on failure

raptor_vsnprintf ()

char *              raptor_vsnprintf                    (const char *format,
                                                         va_list arguments);

Format output for a variable arguments list into a newly allocated buffer

Deprecated: This does not actually conform to vsnprintf's calling convention and does not return the allocated buffer length. Use raptor_vsnprintf2() or raptor_vasprintf() instead.

format :

printf-style format string

arguments :

variable arguments list

Returns :

a newly allocated string as the formatted result or NULL on failure

raptor_vsnprintf2 ()

int                 raptor_vsnprintf2                   (char *buffer,
                                                         size_t size,
                                                         const char *format,
                                                         va_list arguments);

Format output for a variable arguments list into an allocated sized buffer.

This is a wrapper around system versions of vsnprintf with different call and return conventions.

If buffer is NULL or size is 0 or the buffer size is too small, returns the number of bytes that would be needed for buffer

buffer :

buffer (or NULL)

size :

size of buffer (or 0)

format :

printf-style format string

arguments :

variable arguments list

Returns :

number of bytes allocated (excluding NUL) or <0 on failure

raptor_sort_r ()

void                raptor_sort_r                       (void *base,
                                                         size_t nel,
                                                         size_t width,
                                                         raptor_data_compare_arg_handler compar,
                                                         void *user_data);

Sort an array with an extra user data arg for the comparison funciton.

Sorts data at base of nel elememnts of width width using comparison function comp that takes args (void* data1, void* data2, user_data) and returns <0, 0, or >0 for object comparison.

base :

the array to be sorted

nel :

the number of elements in the array

width :

the size in bytes of each element of the array

compar :

comparison function

user_data :

a pointer to be passed to the comparison function

raptor_log_handler ()

void                (*raptor_log_handler)               (void *user_data,
                                                         raptor_log_message *message);

Handler function for log messages with location

Used during parsing and serializing for errors and warnings that may include location information. Handlers may be set by raptor_world_set_log_handler().

user_data :

user data

message :

log message

raptor_log_message

typedef struct {
  int code;
  raptor_domain domain;
  raptor_log_level level;
  raptor_locator *locator;
  const char *text;
} raptor_log_message;

Log message.

int code;

error code or < 0 if not used or known

raptor_domain domain;

message domain or RAPTOR_DOMAIN_NONE if not used or known

raptor_log_level level;

log message level

raptor_locator *locator;

location associated with message or NULL if not known

const char *text;

message string

enum raptor_log_level

typedef enum {
  RAPTOR_LOG_LEVEL_NONE,
  RAPTOR_LOG_LEVEL_TRACE,
  RAPTOR_LOG_LEVEL_DEBUG,
  RAPTOR_LOG_LEVEL_INFO,
  RAPTOR_LOG_LEVEL_WARN,
  RAPTOR_LOG_LEVEL_ERROR,
  RAPTOR_LOG_LEVEL_FATAL,
  RAPTOR_LOG_LEVEL_LAST = RAPTOR_LOG_LEVEL_FATAL
} raptor_log_level;

Log levels

RAPTOR_LOG_LEVEL_NONE

Internal

RAPTOR_LOG_LEVEL_TRACE

very fine-grained tracing messages information

RAPTOR_LOG_LEVEL_DEBUG

fine-grained tracing messages suitable for debugging

RAPTOR_LOG_LEVEL_INFO

coarse-grained information messages

RAPTOR_LOG_LEVEL_WARN

warning messages of potentially harmful problems

RAPTOR_LOG_LEVEL_ERROR

error messages where the application can continue

RAPTOR_LOG_LEVEL_FATAL

fatal error message where the application will likely abort

RAPTOR_LOG_LEVEL_LAST

Internal

raptor_log_level_get_label ()

const char *        raptor_log_level_get_label          (raptor_log_level level);

Get label for a log message level

level :

log message level

Returns :

label string or NULL if level is not valid

enum raptor_domain

typedef enum {
  RAPTOR_DOMAIN_NONE,
  RAPTOR_DOMAIN_IOSTREAM,
  RAPTOR_DOMAIN_NAMESPACE,
  RAPTOR_DOMAIN_PARSER,
  RAPTOR_DOMAIN_QNAME,
  RAPTOR_DOMAIN_SAX2,
  RAPTOR_DOMAIN_SERIALIZER,
  RAPTOR_DOMAIN_TERM,
  RAPTOR_DOMAIN_TURTLE_WRITER,
  RAPTOR_DOMAIN_URI,
  RAPTOR_DOMAIN_WORLD,
  RAPTOR_DOMAIN_WWW,
  RAPTOR_DOMAIN_XML_WRITER,
  RAPTOR_DOMAIN_LAST = RAPTOR_DOMAIN_XML_WRITER
} raptor_domain;

Log domain

RAPTOR_DOMAIN_NONE

Internal

RAPTOR_DOMAIN_IOSTREAM

I/O stream

RAPTOR_DOMAIN_NAMESPACE

XML Namespace / namespace stack

RAPTOR_DOMAIN_PARSER

RDF Parser

RAPTOR_DOMAIN_QNAME

XML QName

RAPTOR_DOMAIN_SAX2

XML SAX2

RAPTOR_DOMAIN_SERIALIZER

RDF Serializer

RAPTOR_DOMAIN_TERM

RDF Term

RAPTOR_DOMAIN_TURTLE_WRITER

Turtle Writer

RAPTOR_DOMAIN_URI

RDF Uri

RAPTOR_DOMAIN_WORLD

RDF world

RAPTOR_DOMAIN_WWW

WWW

RAPTOR_DOMAIN_XML_WRITER

XML Writer

RAPTOR_DOMAIN_LAST

Internal

raptor_domain_get_label ()

const char *        raptor_domain_get_label             (raptor_domain domain);

Get label for a domain

domain :

domain

Returns :

label string or NULL if domain is not valid

raptor_data_compare_handler ()

int                 (*raptor_data_compare_handler)      (const void *data1,
                                                         const void *data2);

Function to compare two data objects - signature like strcmp() and function pssed to qsort()

Designed to be passed into generic data structure constructors like raptor_new_avltree().

data1 :

first data object

data2 :

second data object

Returns :

compare value <0 if data1 is before data2, =0 if equal, >0 if data1 is after data2

raptor_data_compare_arg_handler ()

int                 (*raptor_data_compare_arg_handler)  (const void *data1,
                                                         const void *data2,
                                                         void *user_data);

Function to compare two data objects with a user data argument

Designed to be used with raptor_sort_r() and compatible functions such as raptor_sequence_sort_r() which uses it.

data1 :

first object

data2 :

second object

user_data :

user data argument

Returns :

compare value <0 if data1 is before data2, =0 if equal, >0 if data1 is after data2

raptor_data_context_free_handler ()

void                (*raptor_data_context_free_handler) (void *context,
                                                         void *object);

Handler function for freeing a sequence item with a contextual pointer.

Set by raptor_new_sequence_with_context().

context :

context data for the free function

object :

object to free

raptor_data_context_print_handler ()

int                 (*raptor_data_context_print_handler)
                                                        (void *context,
                                                         void *object,
                                                         FILE *fh);

Function function for printing an object with data context to a stream.

Set by raptor_new_sequence_with_context()

context :

context data for the print function

object :

object to print

fh :

FILE* to print to

Returns :

non-0 on failure

raptor_data_free_handler ()

void                (*raptor_data_free_handler)         (void *data);

Typedef for function to free a data object - signature like free()

Designed to be passed into generic data structure constructors like raptor_new_avltree(). If data is NULL, nothing should be done.

data :

data object or NULL

raptor_data_malloc_handler ()

void *              (*raptor_data_malloc_handler)       (size_t size);

Typedef for a function to allocate memory - signature like malloc()

Designed to be passed into constructors like raptor_www_fetch_to_string

size :

data size

Returns :

pointer to newly allocated memory or NULL on failure

raptor_data_print_handler ()

int                 (*raptor_data_print_handler)        (void *object,
                                                         FILE *fh);

Handler function for printing an object to a stream.

Set by raptor_new_sequence()

object :

object to print

fh :

FILE* to print to

Returns :

non-0 on failure

enum raptor_syntax_bitflags

typedef enum {
  RAPTOR_SYNTAX_NEED_BASE_URI = 1
} raptor_syntax_bitflags;

Bit flags for raptor_syntax_description flags field

RAPTOR_SYNTAX_NEED_BASE_URI

the syntax requires a base URI

raptor_syntax_description

typedef struct {
  const char* names;
  unsigned int names_count;

  const char* label;

  const raptor_type_q* mime_types;
  unsigned int mime_types_count;

  const char* uri_strings;
  unsigned int uri_strings_count;

  unsigned int flags;
} raptor_syntax_description;

Description of a syntax or file format.

const char *names;

array of syntax names - the first one (required) is the public name, the rest are aliases. The array is NULL terminated.

unsigned int names_count;

size of names array

const char *label;

long descriptive label for syntax

const raptor_type_q *mime_types;

Array of (MIME type, Q) values associated with the syntax (or NULL). If present the array is NULL terminated.

unsigned int mime_types_count;

size of mime_types array

const char *uri_strings;

array of URIs identifying the syntax (or NULL). The first one if present is the main URI, the rest are aliases. The array is NULL terminated.

unsigned int uri_strings_count;

size of uri_strings array

unsigned int flags;

See raptor_syntax_bitflags for the bits

raptor_syntax_description_validate ()

int                 raptor_syntax_description_validate  (raptor_syntax_description *desc);

Validate a syntax description has the required fields (name, labels) and update counts

desc :

description

Returns :

non-0 on failure

raptor_type_q

typedef struct {
  const char* mime_type;
  size_t mime_type_len;
  unsigned char q;
} raptor_type_q;

(MIME Type, Q) pair

const char *mime_type;

MIME type string

size_t mime_type_len;

length of mime_type

unsigned char q;

Q value 0-10 standing for decimal 0.0-1.0
raptor2-2.0.15/docs/html/raptor2-changes-2-0-11-to-2-0-12.html0000644000175000017500000000466112425347071017555 00000000000000 Changes between raptor2 2.0.11 and 2.0.12

Changes between raptor2 2.0.11 and 2.0.12

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/raptor-serializers.html0000644000175000017500000001040112425347071016535 00000000000000 Serializers in Raptor (triples to syntax)

Serializers in Raptor (triples to syntax)

Introduction

This section describes the serializers that can be compiled into Raptor and their options. The exact serializers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_world_get_serializer_description function

The optional options that may be set on parsers can also be queried at run-time with the raptor_world_get_option_description function.

raptor2-2.0.15/docs/html/serializer-rdfxml.html0000644000175000017500000000426712425347071016354 00000000000000 RDF/XML serializer (name rdfxml)

RDF/XML serializer (name rdfxml)

A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.

raptor2-2.0.15/docs/html/raptor2-section-serializer.html0000644000175000017500000012033112425347071020102 00000000000000 Serializer

Serializer

Serializer — RDF serializers - from RDF triples to a syntax

Synopsis

typedef             raptor_serializer;
raptor_serializer * raptor_new_serializer               (raptor_world *world,
                                                         const char *name);
void                raptor_free_serializer              (raptor_serializer *rdf_serializer);
int                 raptor_serializer_start_to_iostream (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         raptor_iostream *iostream);
int                 raptor_serializer_start_to_filename (raptor_serializer *rdf_serializer,
                                                         const char *filename);
int                 raptor_serializer_start_to_string   (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p);
int                 raptor_serializer_start_to_file_handle
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         FILE *fh);
int                 raptor_serializer_set_namespace     (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         const unsigned char *prefix);
int                 raptor_serializer_set_namespace_from_namespace
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_namespace *nspace);
int                 raptor_serializer_serialize_statement
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_statement *statement);
int                 raptor_serializer_serialize_end     (raptor_serializer *rdf_serializer);
int                 raptor_serializer_flush             (raptor_serializer *rdf_serializer);
const raptor_syntax_description * raptor_serializer_get_description
                                                        (raptor_serializer *rdf_serializer);
raptor_iostream *   raptor_serializer_get_iostream      (raptor_serializer *serializer);
raptor_locator *    raptor_serializer_get_locator       (raptor_serializer *rdf_serializer);
int                 raptor_serializer_set_option        (raptor_serializer *serializer,
                                                         raptor_option option,
                                                         const char *string,
                                                         int integer);
int                 raptor_serializer_get_option        (raptor_serializer *serializer,
                                                         raptor_option option,
                                                         char **string_p,
                                                         int *integer_p);
raptor_world *      raptor_serializer_get_world         (raptor_serializer *rdf_serializer);

Description

The serializing class that allows creating a serializer for writing a particular syntax to an output string, file, file handle or user function (via raptor_iostream).

There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how serializing is performed.

Details

raptor_serializer

raptor_serializer* raptor_serializer;

Raptor Serializer class


raptor_new_serializer ()

raptor_serializer * raptor_new_serializer               (raptor_world *world,
                                                         const char *name);

Constructor - create a new raptor_serializer object.

world :

raptor_world object

name :

the serializer name or NULL for default syntax

Returns :

a new raptor_serializer object or NULL on failure

raptor_free_serializer ()

void                raptor_free_serializer              (raptor_serializer *rdf_serializer);

Destructor - destroy a raptor_serializer object.

rdf_serializer :

raptor_serializer object

raptor_serializer_start_to_iostream ()

int                 raptor_serializer_start_to_iostream (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         raptor_iostream *iostream);

Start serialization to an iostream with given base URI

The passed in iostream does not become owned by the serializer and can be used by the caller after serializing is done. It must be destroyed by the caller.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

iostream :

raptor_iostream to write serialization to

Returns :

non-0 on failure.

raptor_serializer_start_to_filename ()

int                 raptor_serializer_start_to_filename (raptor_serializer *rdf_serializer,
                                                         const char *filename);

Start serializing to a filename.

rdf_serializer :

the raptor_serializer

filename :

filename to serialize to

Returns :

non-0 on failure.

raptor_serializer_start_to_string ()

int                 raptor_serializer_start_to_string   (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         void **string_p,
                                                         size_t *length_p);

Start serializing to a string.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

string_p :

pointer to location to hold string

length_p :

pointer to location to hold length of string (or NULL)

Returns :

non-0 on failure.

raptor_serializer_start_to_file_handle ()

int                 raptor_serializer_start_to_file_handle
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         FILE *fh);

Start serializing to a FILE*.

NOTE: This does not fclose the handle when it is finished.

rdf_serializer :

the raptor_serializer

uri :

base URI or NULL if no base URI is required

fh :

FILE* to serialize to

Returns :

non-0 on failure.

raptor_serializer_set_namespace ()

int                 raptor_serializer_set_namespace     (raptor_serializer *rdf_serializer,
                                                         raptor_uri *uri,
                                                         const unsigned char *prefix);

set a namespace uri/prefix mapping for serializing.

rdf_serializer :

the raptor_serializer

uri :

raptor_uri of namespace or NULL

prefix :

prefix to use or NULL

Returns :

non-0 on failure.

raptor_serializer_set_namespace_from_namespace ()

int                 raptor_serializer_set_namespace_from_namespace
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_namespace *nspace);

Set a namespace uri/prefix mapping for serializing from an existing namespace.

rdf_serializer :

the raptor_serializer

nspace :

raptor_namespace to set

Returns :

non-0 on failure.

raptor_serializer_serialize_statement ()

int                 raptor_serializer_serialize_statement
                                                        (raptor_serializer *rdf_serializer,
                                                         raptor_statement *statement);

Serialize a statement.

rdf_serializer :

the raptor_serializer

statement :

raptor_statement to serialize to a syntax

Returns :

non-0 on failure.

raptor_serializer_serialize_end ()

int                 raptor_serializer_serialize_end     (raptor_serializer *rdf_serializer);

End a serialization.

rdf_serializer :

the raptor_serializer

Returns :

non-0 on failure.

raptor_serializer_flush ()

int                 raptor_serializer_flush             (raptor_serializer *rdf_serializer);

Flush the current serializer output and free any pending state

In serializers that can generate blocks of content, this causes the writing of any current pending block. For example in Turtle this may write all pending triples.

rdf_serializer :

raptor serializer

Returns :

non-0 on failure

raptor_serializer_get_description ()

const raptor_syntax_description * raptor_serializer_get_description
                                                        (raptor_serializer *rdf_serializer);

Get description of the syntaxes of the serializer.

The returned description is static and lives as long as the raptor library (raptor world).

rdf_serializer :

raptor_serializer serializer object

Returns :

description of syntax

raptor_serializer_get_iostream ()

raptor_iostream *   raptor_serializer_get_iostream      (raptor_serializer *serializer);

Get the current serializer iostream.

serializer :

raptor_serializer object

Returns :

the serializer's current iostream or NULL if

raptor_serializer_get_locator ()

raptor_locator *    raptor_serializer_get_locator       (raptor_serializer *rdf_serializer);

Get the serializer raptor locator object.

rdf_serializer :

raptor serializer

Returns :

raptor locator

raptor_serializer_set_option ()

int                 raptor_serializer_set_option        (raptor_serializer *serializer,
                                                         raptor_option option,
                                                         const char *string,
                                                         int integer);

Set serializer option.

If string is not NULL and the option type is numeric, the string value is converted to an integer and used in preference to integer.

If string is NULL and the option type is not numeric, an error is returned.

The string values used are copied.

The allowed options are available via raptor_world_get_option_description().

serializer :

raptor_serializer serializer object

option :

option to set from enumerated raptor_option values

string :

string option value (or NULL)

integer :

integer option value

Returns :

non 0 on failure or if the option is unknown

raptor_serializer_get_option ()

int                 raptor_serializer_get_option        (raptor_serializer *serializer,
                                                         raptor_option option,
                                                         char **string_p,
                                                         int *integer_p);

Get serializer option.

Any string value returned in *string_p is shared and must be copied by the caller.

The allowed options are available via raptor_world_get_option_description().

serializer :

raptor_serializer serializer object

option :

option to get value

string_p :

pointer to where to store string value

integer_p :

pointer to where to store integer value

Returns :

option value or < 0 for an illegal option

raptor_serializer_get_world ()

raptor_world *      raptor_serializer_get_world         (raptor_serializer *rdf_serializer);

Get the raptor_world object associated with a serializer.

rdf_serializer :

raptor serializer

Returns :

raptor_world* pointer
raptor2-2.0.15/docs/html/raptor2-changes-2-0-5-to-2-0-6.html0000644000175000017500000000557412425347071017427 00000000000000 Changes between raptor2 2.0.5 and 2.0.6

Changes between raptor2 2.0.5 and 2.0.6

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/serializer-nquads.html0000644000175000017500000000432412425347071016345 00000000000000 N-Quads serializer - default (name nquads)

N-Quads serializer - default (name nquads)

A serializer to the N-Quads extension to N-Triples, providing an optional 4th context graph term at the end of the line when a named graph is associated with a triple (the triple is contained in a named graph). This is useful for seeing the output of named graphs or dealing with SPARQL Datasets.

raptor2-2.0.15/docs/html/raptor2-section-sax2.html0000644000175000017500000013401112425347071016606 00000000000000 SAX2

SAX2

SAX2 — SAX2 XML Parsing API with namespaces and base URI support.

Synopsis

typedef             raptor_sax2;
raptor_sax2 *       raptor_new_sax2                     (raptor_world *world,
                                                         raptor_locator *locator,
                                                         void *user_data);
void                raptor_free_sax2                    (raptor_sax2 *sax2);
void                (*raptor_sax2_start_element_handler)
                                                        (void *user_data,
                                                         raptor_xml_element *xml_element);
void                (*raptor_sax2_end_element_handler)  (void *user_data,
                                                         raptor_xml_element *xml_element);
void                (*raptor_sax2_characters_handler)   (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         const unsigned char *s,
                                                         int len);
void                (*raptor_sax2_cdata_handler)        (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         const unsigned char *s,
                                                         int len);
void                (*raptor_sax2_comment_handler)      (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         const unsigned char *s);
void                (*raptor_sax2_unparsed_entity_decl_handler)
                                                        (void *user_data,
                                                         const unsigned char *entityName,
                                                         const unsigned char *base,
                                                         const unsigned char *systemId,
                                                         const unsigned char *publicId,
                                                         const unsigned char *notationName);
int                 (*raptor_sax2_external_entity_ref_handler)
                                                        (void *user_data,
                                                         const unsigned char *context,
                                                         const unsigned char *base,
                                                         const unsigned char *systemId,
                                                         const unsigned char *publicId);
void                raptor_sax2_set_start_element_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_start_element_handler handler);
void                raptor_sax2_set_end_element_handler (raptor_sax2 *sax2,
                                                         raptor_sax2_end_element_handler handler);
void                raptor_sax2_set_characters_handler  (raptor_sax2 *sax2,
                                                         raptor_sax2_characters_handler handler);
void                raptor_sax2_set_cdata_handler       (raptor_sax2 *sax2,
                                                         raptor_sax2_cdata_handler handler);
void                raptor_sax2_set_comment_handler     (raptor_sax2 *sax2,
                                                         raptor_sax2_comment_handler handler);
void                raptor_sax2_set_unparsed_entity_decl_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_unparsed_entity_decl_handler handler);
void                raptor_sax2_set_external_entity_ref_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_external_entity_ref_handler handler);
void                raptor_sax2_set_namespace_handler   (raptor_sax2 *sax2,
                                                         raptor_namespace_handler handler);
void                raptor_sax2_set_uri_filter          (raptor_sax2 *sax2,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);
void                raptor_sax2_parse_start             (raptor_sax2 *sax2,
                                                         raptor_uri *base_uri);
int                 raptor_sax2_parse_chunk             (raptor_sax2 *sax2,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);
const unsigned char * raptor_sax2_inscope_xml_language  (raptor_sax2 *sax2);
raptor_uri *        raptor_sax2_inscope_base_uri        (raptor_sax2 *sax2);

Description

A class providing a SAX2 XML parsing API with XML namespaces and XML base support.

Details

raptor_sax2

typedef struct raptor_sax2_s raptor_sax2;

Raptor SAX2 class


raptor_new_sax2 ()

raptor_sax2 *       raptor_new_sax2                     (raptor_world *world,
                                                         raptor_locator *locator,
                                                         void *user_data);

Constructor - Create a new SAX2 with error handlers

world :

raptor world

locator :

raptor locator to use for errors

user_data :

pointer context information to pass to SAX handlers

Returns :

new raptor_sax2 object or NULL on failure

raptor_free_sax2 ()

void                raptor_free_sax2                    (raptor_sax2 *sax2);

Destructor - destroy a SAX2 object

sax2 :

SAX2 object

raptor_sax2_start_element_handler ()

void                (*raptor_sax2_start_element_handler)
                                                        (void *user_data,
                                                         raptor_xml_element *xml_element);

SAX2 start element handler

user_data :

user data

xml_element :

XML element

raptor_sax2_end_element_handler ()

void                (*raptor_sax2_end_element_handler)  (void *user_data,
                                                         raptor_xml_element *xml_element);

SAX2 end element handler

user_data :

user data

xml_element :

XML element

raptor_sax2_characters_handler ()

void                (*raptor_sax2_characters_handler)   (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         const unsigned char *s,
                                                         int len);

SAX2 characters handler

user_data :

user data

xml_element :

XML element

s :

string

len :

string len

raptor_sax2_cdata_handler ()

void                (*raptor_sax2_cdata_handler)        (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         const unsigned char *s,
                                                         int len);

SAX2 CDATA section handler

user_data :

user data

xml_element :

XML element

s :

string

len :

string len

raptor_sax2_comment_handler ()

void                (*raptor_sax2_comment_handler)      (void *user_data,
                                                         raptor_xml_element *xml_element,
                                                         const unsigned char *s);

SAX2 XML comment handler

user_data :

user data

xml_element :

XML element

s :

string

raptor_sax2_unparsed_entity_decl_handler ()

void                (*raptor_sax2_unparsed_entity_decl_handler)
                                                        (void *user_data,
                                                         const unsigned char *entityName,
                                                         const unsigned char *base,
                                                         const unsigned char *systemId,
                                                         const unsigned char *publicId,
                                                         const unsigned char *notationName);

SAX2 unparsed entity (NDATA) handler

user_data :

user data

entityName :

entity name

base :

base URI

systemId :

system ID

publicId :

public ID

notationName :

notation name

raptor_sax2_external_entity_ref_handler ()

int                 (*raptor_sax2_external_entity_ref_handler)
                                                        (void *user_data,
                                                         const unsigned char *context,
                                                         const unsigned char *base,
                                                         const unsigned char *systemId,
                                                         const unsigned char *publicId);

SAX2 external entity reference handler

user_data :

user data

context :

context

base :

base URI

systemId :

system ID

publicId :

public ID

Returns :

0 if processing should not continue because of a fatal error in the handling of the external entity.

raptor_sax2_set_start_element_handler ()

void                raptor_sax2_set_start_element_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_start_element_handler handler);

Set SAX2 start element handler.

sax2 :

SAX2 object

handler :

start element handler

raptor_sax2_set_end_element_handler ()

void                raptor_sax2_set_end_element_handler (raptor_sax2 *sax2,
                                                         raptor_sax2_end_element_handler handler);

Set SAX2 end element handler.

sax2 :

SAX2 object

handler :

end element handler

raptor_sax2_set_characters_handler ()

void                raptor_sax2_set_characters_handler  (raptor_sax2 *sax2,
                                                         raptor_sax2_characters_handler handler);

Set SAX2 characters handler.

sax2 :

SAX2 object

handler :

characters handler

raptor_sax2_set_cdata_handler ()

void                raptor_sax2_set_cdata_handler       (raptor_sax2 *sax2,
                                                         raptor_sax2_cdata_handler handler);

Set SAX2 CDATA handler.

sax2 :

SAX2 object

handler :

CDATA handler

raptor_sax2_set_comment_handler ()

void                raptor_sax2_set_comment_handler     (raptor_sax2 *sax2,
                                                         raptor_sax2_comment_handler handler);

Set SAX2 XML comment handler.

sax2 :

SAX2 object

handler :

comment handler

raptor_sax2_set_unparsed_entity_decl_handler ()

void                raptor_sax2_set_unparsed_entity_decl_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_unparsed_entity_decl_handler handler);

Set SAX2 XML unparsed entity declaration handler.

sax2 :

SAX2 object

handler :

unparsed entity declaration handler

raptor_sax2_set_external_entity_ref_handler ()

void                raptor_sax2_set_external_entity_ref_handler
                                                        (raptor_sax2 *sax2,
                                                         raptor_sax2_external_entity_ref_handler handler);

Set SAX2 XML entity reference handler.

sax2 :

SAX2 object

handler :

entity reference handler

raptor_sax2_set_namespace_handler ()

void                raptor_sax2_set_namespace_handler   (raptor_sax2 *sax2,
                                                         raptor_namespace_handler handler);

Set the XML namespace handler function.

When a prefix/namespace is seen in an XML parser, call the given handler with the prefix string and the raptor_uri namespace URI. Either can be NULL for the default prefix or default namespace.

The handler function does not deal with duplicates so any namespace may be declared multiple times when a namespace is seen in different parts of a document.

sax2 :

raptor_sax2 object

handler :

new namespace callback function

raptor_sax2_set_uri_filter ()

void                raptor_sax2_set_uri_filter          (raptor_sax2 *sax2,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);

Set URI filter function for SAX2 internal retrievals.

sax2 :

SAX2 object

filter :

URI filter function

user_data :

User data to pass to filter function

raptor_sax2_parse_start ()

void                raptor_sax2_parse_start             (raptor_sax2 *sax2,
                                                         raptor_uri *base_uri);

Start an XML SAX2 parse.

sax2 :

sax2 object

base_uri :

base URI

raptor_sax2_parse_chunk ()

int                 raptor_sax2_parse_chunk             (raptor_sax2 *sax2,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);

Parse a chunk of XML data generating SAX2 events

sax2 :

sax2 object

buffer :

input buffer

len :

input buffer lenght

is_end :

non-0 if end of data

Returns :

non-0 on failure

raptor_sax2_inscope_xml_language ()

const unsigned char * raptor_sax2_inscope_xml_language  (raptor_sax2 *sax2);

Get the in-scope XML language

The result is a language string which may be "" if xml:lang="" is given. NULL is returned only if there is no xml:lang in any outer scope.

sax2 :

SAX2 object

Returns :

shared pointer to the XML language or NULL if none is in scope.

raptor_sax2_inscope_base_uri ()

raptor_uri *        raptor_sax2_inscope_base_uri        (raptor_sax2 *sax2);

Get the in-scope base URI

sax2 :

SAX2 object

Returns :

the in-scope base URI shared object or NULL if none is in scope.
raptor2-2.0.15/docs/html/tutorial-parser-set-triple-handler.html0000644000175000017500000000535012425347071021541 00000000000000 Set RDF statement callback handler

Set RDF statement callback handler

The main reason to parse a syntax is to get RDF triples returned and these are return by a user-defined handler function which is called with parameters of a user data pointer and a raptor statement, which includes the triple terms plus the optional named graph term. The handler is set with raptor_parser_set_statement_handler() as follows:

  void
  statement_handler(void* user_data, const raptor_statement* statement)
  {
    /* do something with the statement */
  }

  raptor_parser_set_statement_handler(rdf_parser, user_data, statements_handler);

Setting a stateemnt handler function is optional since parsing without returning statements is a valid use, such as when parsing in order to validate a syntax.

raptor2-2.0.15/docs/html/raptor2-changes-1-4-21-to-2-0-0.html0000644000175000017500000035763412425347071017511 00000000000000 Changes between raptor2 1.4.21 and 2.0.0

Changes between raptor2 1.4.21 and 2.0.0

New functions, types and enums

Functions

Deleted functions, types and enums

Functions

Types

  • raptor_error_handlers - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler()

  • raptor_free_uri_func - Entire URI implementation is internal and not replaceable.

  • raptor_libxml_flags - replaced by raptor_world_set_flags() with raptor_world_flag

  • raptor_message_handler - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler()

  • raptor_message_handler_closure - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler()

  • raptor_new_uri_for_rdf_concept_func - Entire URI implementation is internal and not replaceable.

  • raptor_new_uri_from_uri_local_name_func - Entire URI implementation is internal and not replaceable.

  • raptor_new_uri_func - Entire URI implementation is internal and not replaceable.

  • raptor_new_uri_relative_to_base_func - Entire URI implementation is internal and not replaceable.

  • raptor_ntriples_parser - replaced by raptor_parser

  • raptor_ntriples_term_type - replaced by raptor_term_type

  • raptor_uri_as_counted_string_func - Entire URI implementation is internal and not replaceable.

  • raptor_uri_as_string_func - Entire URI implementation is internal and not replaceable.

  • raptor_uri_compare_func - Entire URI implementation is internal and not replaceable.

  • raptor_uri_copy_func - Entire URI implementation is internal and not replaceable.

  • raptor_uri_equals_func - Entire URI implementation is internal and not replaceable.

  • raptor_uri_handler - Entire URI implementation is internal and not replaceable.

  • raptor_uri_source - URI source was useless.

Enums

  • RAPTOR_FEATURE_ASSUME_IS_RDF - Never used.

  • RAPTOR_FEATURE_START_URI - Never used.

  • RAPTOR_GENID_TYPE_BAGID - There is just one type of generated ID now.

  • RAPTOR_GENID_TYPE_BNODEID - There is just one type of generated ID now.

  • RAPTOR_IDENTIFIER_TYPE_ORDINAL - Deprecated value deleted.

  • RAPTOR_URI_SOURCE_ATTRIBUTE - URI source concept removed.

  • RAPTOR_URI_SOURCE_BLANK_ID - URI source concept removed.

  • RAPTOR_URI_SOURCE_ELEMENT - URI source concept removed.

  • RAPTOR_URI_SOURCE_GENERATED - URI source concept removed.

  • RAPTOR_URI_SOURCE_ID - URI source concept removed.

  • RAPTOR_URI_SOURCE_NOT_URI - URI source concept removed.

  • RAPTOR_URI_SOURCE_UNKNOWN - URI source concept removed.

  • RAPTOR_URI_SOURCE_URI - URI source concept removed.

Renamed function and enums

1.4.21 function 2.0.0 function Notes
raptor_format_locator raptor_locator_format  
raptor_get_feature_count raptor_option_get_count  
raptor_get_locator raptor_parser_get_locator  
raptor_get_name raptor_parser_get_name  
raptor_guess_parser_name_v2 raptor_world_guess_parser_name  
raptor_namespace_copy raptor_namespace_stack_start_namespace  
raptor_namespaces_format raptor_namespace_format_as_xml  
raptor_namespaces_qname_from_uri raptor_new_qname_from_namespace_uri  
raptor_new_namespace_parts_from_string raptor_xml_namespace_string_parse  
raptor_new_parser_for_content_v2 raptor_new_parser_for_content  
raptor_new_parser_v2 raptor_new_parser  
raptor_new_qname_from_namespace_local_name_v2 raptor_new_qname_from_namespace_local_name  
raptor_new_serializer_v2 raptor_new_serializer  
raptor_new_uri_from_id_v2 raptor_new_uri_from_id  
raptor_new_uri_from_uri_local_name_v2 raptor_new_uri_from_uri_local_name  
raptor_new_uri_relative_to_base_v2 raptor_new_uri_relative_to_base  
raptor_new_uri_v2 raptor_new_uri  
raptor_parse_abort raptor_parser_parse_abort  
raptor_parse_chunk raptor_parser_parse_chunk  
raptor_parse_file raptor_parser_parse_file  
raptor_parse_file_stream raptor_parser_parse_file_stream  
raptor_parse_uri raptor_parser_parse_uri  
raptor_parse_uri_with_connection raptor_parser_parse_uri_with_connection  
raptor_serialize_end raptor_serializer_serialize_end  
raptor_serialize_set_namespace raptor_serializer_set_namespace  
raptor_serialize_set_namespace_from_namespace raptor_serializer_set_namespace_from_namespace  
raptor_serialize_start raptor_serializer_start_to_iostream  
raptor_serialize_start_to_file_handle raptor_serializer_start_to_file_handle  
raptor_serialize_start_to_filename raptor_serializer_start_to_filename  
raptor_serialize_start_to_iostream raptor_serializer_start_to_iostream  
raptor_serialize_start_to_string raptor_serializer_start_to_string  
raptor_serializer_syntax_name_check_v2 raptor_world_is_serializer_name  
raptor_set_namespace_handler raptor_parser_set_namespace_handler  
raptor_set_statement_handler raptor_parser_set_statement_handler  
raptor_start_parse raptor_parser_parse_start  
raptor_uri_is_file_uri raptor_uri_uri_string_is_file_uri  
raptor_utf8_check raptor_unicode_check_utf8_string  
raptor_www_free raptor_free_www  
raptor_www_new_v2 raptor_new_www  
raptor_www_new_with_connection_v2 raptor_new_www_with_connection  
1.4.21 enum 2.0.0 enum Notes
RAPTOR_FEATURE_ALLOW_BAGID RAPTOR_OPTION_ALLOW_BAGID  
RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES  
RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES  
RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST  
RAPTOR_FEATURE_ATOM_ENTRY_URI RAPTOR_OPTION_ATOM_ENTRY_URI  
RAPTOR_FEATURE_BNODE_BORDER RAPTOR_OPTION_BNODE_BORDER  
RAPTOR_FEATURE_BNODE_FILL RAPTOR_OPTION_BNODE_FILL  
RAPTOR_FEATURE_CHECK_RDF_ID RAPTOR_OPTION_CHECK_RDF_ID  
RAPTOR_FEATURE_HTML_LINK RAPTOR_OPTION_HTML_LINK  
RAPTOR_FEATURE_HTML_TAG_SOUP RAPTOR_OPTION_HTML_TAG_SOUP  
RAPTOR_FEATURE_JSON_CALLBACK RAPTOR_OPTION_JSON_CALLBACK  
RAPTOR_FEATURE_JSON_EXTRA_DATA RAPTOR_OPTION_JSON_EXTRA_DATA  
RAPTOR_FEATURE_LAST RAPTOR_OPTION_LAST  
RAPTOR_FEATURE_LITERAL_BORDER RAPTOR_OPTION_LITERAL_BORDER  
RAPTOR_FEATURE_LITERAL_FILL RAPTOR_OPTION_LITERAL_FILL  
RAPTOR_FEATURE_MICROFORMATS RAPTOR_OPTION_MICROFORMATS  
RAPTOR_FEATURE_NON_NFC_FATAL RAPTOR_OPTION_NON_NFC_FATAL  
RAPTOR_FEATURE_NORMALIZE_LANGUAGE RAPTOR_OPTION_NORMALIZE_LANGUAGE  
RAPTOR_FEATURE_NO_NET RAPTOR_OPTION_NO_NET  
RAPTOR_FEATURE_PREFIX_ELEMENTS RAPTOR_OPTION_PREFIX_ELEMENTS  
RAPTOR_FEATURE_RELATIVE_URIS RAPTOR_OPTION_RELATIVE_URIS  
RAPTOR_FEATURE_RESOURCE_BORDER RAPTOR_OPTION_RESOURCE_BORDER  
RAPTOR_FEATURE_RESOURCE_FILL RAPTOR_OPTION_RESOURCE_FILL  
RAPTOR_FEATURE_RSS_TRIPLES RAPTOR_OPTION_RSS_TRIPLES  
RAPTOR_FEATURE_SCANNING RAPTOR_OPTION_SCANNING  
RAPTOR_FEATURE_WARN_OTHER_PARSETYPES RAPTOR_OPTION_WARN_OTHER_PARSETYPES  
RAPTOR_FEATURE_WRITER_AUTO_EMPTY RAPTOR_OPTION_WRITER_AUTO_EMPTY  
RAPTOR_FEATURE_WRITER_AUTO_INDENT RAPTOR_OPTION_WRITER_AUTO_INDENT  
RAPTOR_FEATURE_WRITER_INDENT_WIDTH RAPTOR_OPTION_WRITER_INDENT_WIDTH  
RAPTOR_FEATURE_WRITER_XML_DECLARATION RAPTOR_OPTION_WRITER_XML_DECLARATION  
RAPTOR_FEATURE_WRITER_XML_VERSION RAPTOR_OPTION_WRITER_XML_VERSION  
RAPTOR_FEATURE_WRITE_BASE_URI RAPTOR_OPTION_WRITE_BASE_URI  
RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL  
RAPTOR_FEATURE_WWW_HTTP_USER_AGENT RAPTOR_OPTION_WWW_HTTP_USER_AGENT  
RAPTOR_FEATURE_WWW_TIMEOUT RAPTOR_OPTION_WWW_TIMEOUT  
RAPTOR_IDENTIFIER_TYPE_ANONYMOUS RAPTOR_TERM_TYPE_BLANK  
RAPTOR_IDENTIFIER_TYPE_LITERAL RAPTOR_TERM_TYPE_LITERAL  
RAPTOR_IDENTIFIER_TYPE_PREDICATE RAPTOR_TERM_TYPE_URI  
RAPTOR_IDENTIFIER_TYPE_RESOURCE RAPTOR_TERM_TYPE_URI  
RAPTOR_IDENTIFIER_TYPE_UNKNOWN RAPTOR_TERM_TYPE_UNKNOWN  
RAPTOR_IDENTIFIER_TYPE_XML_LITERAL RAPTOR_TERM_TYPE_LITERAL  
RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE Flag setting is done by raptor_world_set_flags()
RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE Flag setting is done by raptor_world_set_flags()
RAPTOR_LOG_LEVEL_WARNING RAPTOR_LOG_LEVEL_WARN  
RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE RAPTOR_TERM_TYPE_BLANK  
RAPTOR_NTRIPLES_TERM_TYPE_LITERAL RAPTOR_TERM_TYPE_LITERAL  
RAPTOR_NTRIPLES_TERM_TYPE_URI_REF RAPTOR_TERM_TYPE_URI  

Changed functions and types

1.4.21 function 2.0.0 function Notes
raptor_feature raptor_feature_from_uri(raptor_uri *uri) raptor_option raptor_world_get_option_from_uri(raptor_world* world, raptor_uri *uri)  
raptor_feature raptor_feature_from_uri_v2(raptor_world* world, raptor_uri *uri) raptor_option raptor_world_get_option_from_uri(raptor_world* world, raptor_uri *uri)  
int raptor_features_enumerate(const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_PARSER
int raptor_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_PARSER
int raptor_format_locator_v2(raptor_world* world, char* buffer, size_t length, raptor_locator* locator) int raptor_locator_format(char* buffer, size_t length, raptor_locator* locator)  
void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri) void raptor_free_uri(raptor_uri *uri)  
int raptor_get_feature(raptor_parser *parser, raptor_feature feature) int raptor_parser_get_option(raptor_parser *parser, raptor_option option, char** string_p, int* integer_p)  
const char* raptor_get_label(raptor_parser *rdf_parser) raptor_syntax_description* raptor_parser_get_description(raptor_parser* rdf_parser) Use label field of returned description.
const char* raptor_get_mime_type(raptor_parser *rdf_parser) raptor_syntax_description* raptor_parser_get_description(raptor_parser* rdf_parser) Use the mime_types array field of returned raptor_syntax_description
int raptor_get_need_base_uri(raptor_parser *rdf_parser) raptor_syntax_description* raptor_parser_get_description(raptor_parser* rdf_parser) Use the RAPTOR_SYNTAX_NEED_BASE_URI bitflag in the flags field of the returned raptor_syntax_description
const char* raptor_guess_parser_name(raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) const char* raptor_world_guess_parser_name(raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier)  
int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width) int raptor_iostream_hexadecimal_write(unsigned int integer, int width, raptor_iostream* iostr)  
int raptor_iostream_read_bytes(raptor_iostream* iostr, void *ptr, size_t size, size_t nmemb) int raptor_iostream_read_bytes(void *ptr, size_t size, size_t nmemb, raptor_iostream* iostr)  
int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte) int raptor_iostream_write_byte(const int byte, raptor_iostream *iostr)  
int raptor_iostream_write_bytes(raptor_iostream *iostr, const void *ptr, size_t size, size_t nmemb) int raptor_iostream_write_bytes(const void *ptr, size_t size, size_t nmemb, raptor_iostream *iostr)  
int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len) int raptor_iostream_counted_string_write(const void *string, size_t len, raptor_iostream *iostr)  
int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer) int raptor_iostream_decimal_write(int integer, raptor_iostream* iostr)  
void raptor_iostream_write_end(raptor_iostream *iostr) int raptor_iostream_write_end(raptor_iostream *iostr)  
int raptor_iostream_write_namespace(raptor_iostream* iostr, raptor_namespace *ns) int raptor_namespace_write(raptor_namespace *ns, raptor_iostream* iostr)  
int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname) int raptor_qname_write(raptor_qname *qname, raptor_iostream* iostr)  
void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement) int raptor_statement_ntriples_write(const raptor_statement *statement, raptor_iostream* iostr, int write_graph_term) Gains extra flag arg to decide whether to write any graph term.
int raptor_iostream_write_string(raptor_iostream *iostr, const void *string) int raptor_iostream_string_write(const void *string, raptor_iostream *iostr)  
int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const unsigned char* string, size_t len, const char delim) int raptor_string_ntriples_write(const unsigned char* string, size_t len, const char delim, raptor_iostream *iostr)  
int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsigned char* string, size_t len, const char delim, int flags) int raptor_string_python_write(const unsigned char* string, size_t len, const char delim, int flags, raptor_iostream *iostr)  
int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_stringbuffer *sb) int raptor_stringbuffer_write(raptor_stringbuffer *sb, raptor_iostream* iostr)  
int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri) int raptor_uri_write(raptor_uri *uri, raptor_iostream *iostr)  
int raptor_iostream_write_uri_v2(raptor_world* world, raptor_iostream *iostr, raptor_uri *uri) int raptor_uri_write(raptor_uri *uri, raptor_iostream *iostr)  
int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, const unsigned char* string, size_t len, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string_any_write(const unsigned char* string, size_t len, char quote, int xml_version, raptor_iostream* iostr)  
int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, raptor_simple_message_handler error_handler, void *error_data, int depth) int raptor_xml_element_write(raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, int depth, raptor_iostream *iostr)  
int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char* string, size_t len, char quote, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string_write(const unsigned char* string, size_t len, char quote, raptor_iostream* iostr)  
const char* raptor_locator_uri_v2(raptor_world* world, raptor_locator *locator) const char* raptor_locator_uri(raptor_locator *locator)  
int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) int raptor_namespaces_init(raptor_world* world, raptor_namespace_stack *nstack, int defaults)  
int raptor_namespaces_init_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_simple_message_handler error_handler, void *error_data, int defaults) int raptor_namespaces_init(raptor_world* world, raptor_namespace_stack *nstack, int defaults)  
raptor_iostream* raptor_new_iostream_from_file_handle(FILE *handle) raptor_iostream* raptor_new_iostream_from_file_handle(raptor_world* world, FILE *handle)  
raptor_iostream* raptor_new_iostream_from_filename(const char* filename) raptor_iostream* raptor_new_iostream_from_filename(raptor_world* world, const char* filename)  
raptor_iostream* raptor_new_iostream_from_handler(void *context, const raptor_iostream_handler *handler) raptor_iostream* raptor_new_iostream_from_handler(raptor_world* world, void *user_data, const raptor_iostream_handler* const handler)  
raptor_iostream* raptor_new_iostream_from_handler2(void *user_data, const raptor_iostream_handler2* const handler2) raptor_iostream* raptor_new_iostream_from_handler(raptor_world* world, void *user_data, const raptor_iostream_handler* const handler)  
raptor_iostream* raptor_new_iostream_from_sink(void) raptor_iostream* raptor_new_iostream_from_sink(raptor_world* world)  
raptor_iostream* raptor_new_iostream_from_string(void *string, size_t length) raptor_iostream* raptor_new_iostream_from_string(raptor_world* world, void *string, size_t length)  
raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle) raptor_iostream* raptor_new_iostream_to_file_handle(raptor_world* world, FILE *handle)  
raptor_iostream* raptor_new_iostream_to_filename(const char* filename) raptor_iostream* raptor_new_iostream_to_filename(raptor_world* world, const char* filename)  
raptor_iostream* raptor_new_iostream_to_sink(void) raptor_iostream* raptor_new_iostream_to_sink(raptor_world* world)  
raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) raptor_iostream* raptor_new_iostream_to_string(raptor_world* world, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size))  
raptor_namespace_stack* raptor_new_namespaces(const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) raptor_namespace_stack* raptor_new_namespaces(raptor_world* world, int defaults)  
raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world, raptor_simple_message_handler error_handler, void *error_data, int defaults) raptor_namespace_stack* raptor_new_namespaces(raptor_world* world, int defaults)  
raptor_parser* raptor_new_parser(const char* name) raptor_parser* raptor_new_parser(raptor_world* world, const char* name)  
raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) raptor_parser* raptor_new_parser_for_content(raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier)  
raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char* name, const unsigned char* value, raptor_simple_message_handler error_handler, void *error_data) raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char* name, const unsigned char* value)  
raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value) raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_world* world, raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value)  
raptor_sax2* raptor_new_sax2(void *user_data, raptor_error_handlers* error_handlers) raptor_sax2* raptor_new_sax2(raptor_world *world, raptor_locator *locator, void* user_data)  
raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* free_handler, raptor_sequence_print_handler* print_handler) raptor_sequence* raptor_new_sequence(raptor_data_free_handler free_handler, raptor_data_print_handler print_handler)  
raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* free_handler, raptor_sequence_print_handler_v2* print_handler, void* handler_context) raptor_sequence* raptor_new_sequence(raptor_data_free_handler free_handler, raptor_data_print_handler print_handler)  
raptor_serializer* raptor_new_serializer(const char* name) raptor_serializer* raptor_new_serializer(raptor_world* world, const char* name)  
raptor_uri* raptor_new_uri(const unsigned char* uri_string) raptor_uri* raptor_new_uri(raptor_world* world, const unsigned char* uri_string)  
raptor_uri* raptor_new_uri_for_rdf_concept(const char* name) raptor_uri* raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char* name)  
raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world, const char* name) raptor_uri* raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char* name)  
raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world, raptor_uri* old_uri) raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri)  
raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* old_uri) raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri)  
raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char* id) raptor_uri* raptor_new_uri_from_id(raptor_world* world, raptor_uri *base_uri, const unsigned char* id)  
raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char* local_name) raptor_uri* raptor_new_uri_from_uri_local_name(raptor_world* world, raptor_uri *uri, const unsigned char* local_name)  
raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const unsigned char* uri_string) raptor_uri* raptor_new_uri_relative_to_base(raptor_world* world, raptor_uri *base_uri, const unsigned char* uri_string)  
raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) raptor_xml_writer* raptor_new_xml_writer(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr)  
raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) raptor_xml_writer* raptor_new_xml_writer(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr)  
const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser, raptor_feature feature) const unsigned char* raptor_parser_get_option(raptor_parser *parser, raptor_option option, char** string_p, int* integer_p)  
int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char* value) int raptor_parser_set_option(raptor_parser *parser, raptor_option option, char* string, int integer)  
int raptor_parsers_enumerate(const unsigned int counter, const char* *name, const char* *label) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, unsigned int counter)  
int raptor_parsers_enumerate_v2(raptor_world* world, const unsigned int counter, const char* *name, const char* *label) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, const unsigned int counter)  
void raptor_print_locator(FILE *stream, raptor_locator* locator) int raptor_locator_print(raptor_locator* locator, FILE *stream)  
void raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_locator* locator) void raptor_locator_print(raptor_locator* locator, FILE *stream)  
void raptor_print_statement(const raptor_statement * statement, FILE *stream) int raptor_statement_print(const raptor_statement * statement, FILE *stream)  
void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream) int raptor_statement_print_as_ntriples(const raptor_statement * statement, FILE *stream)  
void raptor_print_statement_as_ntriples_v2(const raptor_statement_v2 * statement, FILE *stream) int raptor_statement_print_as_ntriples(const raptor_statement * statement, FILE *stream)  
void raptor_print_statement_v2(const raptor_statement_v2 * statement, FILE *stream) int raptor_statement_print(const raptor_statement * statement, FILE *stream)  
raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char* name, size_t name_len, raptor_simple_message_handler error_handler, void *error_data) raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char* name, size_t name_len)  
void raptor_sequence_print(raptor_sequence* seq, FILE* fh) int raptor_sequence_print(raptor_sequence* seq, FILE* fh)  
void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const void *, const void *)) void raptor_sequence_sort(raptor_sequence* seq, raptor_data_compare_handler compare)  
int raptor_serialize_statement(raptor_serializer* rdf_serializer, const raptor_statement *statement) int raptor_serializer_serialize_statement(raptor_serializer* rdf_serializer, raptor_statement *statement)  
int raptor_serializer_features_enumerate(const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_SERIALIZER
int raptor_serializer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_SERIALIZER
int raptor_serializer_get_feature(raptor_serializer *serializer, raptor_feature feature) int raptor_serializer_get_option(raptor_serializer *serializer, raptor_option option)  
const unsigned char* raptor_serializer_get_feature_string(raptor_serializer *serializer, raptor_feature feature) int raptor_serializer_get_option(raptor_serializer *serializer, raptor_option option, char** string_p, int* integer_p)  
int raptor_serializer_set_feature(raptor_serializer *serializer, raptor_feature feature, int value) int raptor_serializer_set_option(raptor_serializer *serializer, raptor_option option, char* string, int integer)  
int raptor_serializer_set_feature_string(raptor_serializer *serializer, raptor_feature feature, const unsigned char* value) int raptor_serializer_set_option(raptor_serializer *serializer, raptor_option option, char* string, int integer)  
int raptor_serializer_syntax_name_check(const char* name) int raptor_world_is_serializer_name(raptor_world* world, const char* name)  
int raptor_serializers_enumerate(const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, unsigned int counter)  
int raptor_serializers_enumerate_v2(raptor_world* world, const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, const unsigned int counter)  
void raptor_set_default_generate_id_parameters(raptor_parser* rdf_parser, char* prefix, int base) void raptor_world_set_generate_bnodeid_parameters(raptor_world* world, char* prefix, int base)  
int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int value) int raptor_parser_set_option(raptor_parser *parser, raptor_option option, char* string, int integer)  
void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler) void raptor_world_set_generate_bnodeid_handler(raptor_world* world, void *user_data, raptor_generate_bnodeid_handler handler)  
void raptor_set_graph_handler(raptor_parser* parser, void *user_data, raptor_graph_handler handler) void raptor_parser_set_graph_mark_handler(raptor_parser* parser, void *user_data, raptor_graph_mark_handler handler)  
void raptor_set_libxslt_security_preferences(void *security_preferences) int raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences)  
int raptor_statement_compare_v2(const raptor_statement_v2 *s1, const raptor_statement_v2 *s2) int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2)  
int raptor_syntax_name_check(const char* name) int raptor_world_is_parser_name(raptor_world* world, const char *name)  
int raptor_syntax_name_check_v2(raptor_world* world, const char* name) int raptor_world_is_parser_name(raptor_world* world, const char *name)  
int raptor_syntaxes_enumerate(const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, const unsigned int counter)  
int raptor_syntaxes_enumerate_v2(raptor_world* world, const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, const unsigned int counter)  
int raptor_unicode_char_to_utf8(raptor_unichar c, unsigned char* output) int raptor_unicode_utf8_string_put_char(raptor_unichar c, unsigned char* output, size_t length)  
unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t* len_p) unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p)  
unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri) unsigned char* raptor_uri_as_string(raptor_uri *uri)  
int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2)  
raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri) raptor_uri* raptor_uri_copy(raptor_uri *uri)  
int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2)  
void raptor_uri_print(const raptor_uri* uri, FILE *stream) int raptor_uri_print(const raptor_uri* uri, FILE *stream)  
void raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE *stream) int raptor_uri_print(const raptor_uri* uri, FILE *stream)  
void raptor_uri_resolve_uri_reference(const unsigned char* base_uri, const unsigned char* reference_uri, unsigned char* buffer, size_t length) size_t raptor_uri_resolve_uri_reference(const unsigned char* base_uri, const unsigned char* reference_uri, unsigned char* buffer, size_t length)  
unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t *len_p) unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p)  
unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p)  
unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri) unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri)  
unsigned char* raptor_uri_to_string_v2(raptor_world* world, raptor_uri *uri) unsigned char* raptor_uri_to_string(raptor_uri *uri)  
int raptor_utf8_to_unicode_char(raptor_unichar* output, const unsigned char* input, int length) int raptor_unicode_utf8_string_get_char(const unsigned char* input, size_t length, raptor_unichar* output)  
void raptor_world_set_libxml_flags(raptor_world *world, int flags) int raptor_world_set_flag(raptor_world *world, raptor_world_flag flag, int value)  
void raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences) int raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences)  
int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler)  
raptor_www* raptor_www_new(void) raptor_www* raptor_new_www(raptor_world* world)  
raptor_www* raptor_www_new_with_connection(void* connection) raptor_www* raptor_new_www_with_connection(raptor_world* world, void* connection)  
int raptor_xml_any_escape_string(const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string_any(raptor_world* world, const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, int xml_version)  
int raptor_xml_escape_string(const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string(raptor_world *world, const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote)  
int raptor_xml_writer_features_enumerate(const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_XML_WRITER
int raptor_xml_writer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_XML_WRITER
int raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer, raptor_feature feature) int raptor_xml_writer_get_option(raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p)  
const unsigned char* raptor_xml_writer_get_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature) const unsigned char* raptor_xml_writer_get_option(raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p)  
int raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer, raptor_feature feature, int value) int raptor_xml_writer_set_option(raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer)  
int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature, const unsigned char* value) int raptor_xml_writer_set_option(raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer)  
1.4.21 type 2.0.0 type Notes
raptor_feature raptor_option And new option RAPTOR_OPTION_STRICT added.
raptor_graph_handler raptor_graph_mark_handler  
raptor_identifier raptor_term Fields changed to be simpler raptor_term_type and raptor_term_value
raptor_identifier_type raptor_term_type Removed several enum values to leave just URI, blank and literal types.
raptor_iostream_handler2 raptor_iostream_handler  
raptor_iostream_write_end_func raptor_iostream_write_end_func handler returns an int
raptor_log_level raptor_log_level Added RAPTOR_LOG_LEVEL_TRACE, RAPTOR_LOG_LEVEL_DEBUG, RAPTOR_LOG_LEVEL_INFO. RAPTOR_LOG_LEVEL_WARNING renamed RAPTOR_LOG_LEVEL_WARN
raptor_sequence_free_function raptor_data_free_handler  
raptor_sequence_free_handler_v2 raptor_data_context_free_handler  
raptor_sequence_print_handler raptor_data_print_handler  
raptor_sequence_print_handler_v2 raptor_data_context_print_handler  
raptor_simple_message_handler raptor_log_handler Replaced by generic raptor log mechanism. See raptor_world_set_log_handler()
raptor_statement raptor_statement fields changed to use raptor_term
raptor_statement_handler raptor_statement_handler added const
raptor_statement_v2 raptor_statement Fields changed to be a 3 or 4 tuple of raptor_term
raptor2-2.0.15/docs/html/tutorial-parser-runtime-info.html0000644000175000017500000000446312425347071020456 00000000000000 Querying parser run-time information

Querying parser run-time information

raptor_parser_get_locator() returns the raptor_locator for the current position in the input stream. The locator structure contains full information on the details of where in the file or URI the current parser has reached.

raptor2-2.0.15/docs/html/tutorial-serializer-example.html0000644000175000017500000001010712425347071020342 00000000000000 Serializing example code

Serializing example code

Example 4. rdfcat.c: Read any RDF syntax and serialize to RDF/XML (Abbreviated)

#include <stdio.h>
#include <raptor2.h>

/* rdfcat.c: parse any RDF syntax and serialize to RDF/XML-Abbrev */

static raptor_serializer* rdf_serializer;

static void
serialize_triple(void* user_data, raptor_statement* triple) 
{
  raptor_serializer_serialize_statement(rdf_serializer, triple);
}

static void
declare_namespace(void* user_data, raptor_namespace *nspace)
{
  raptor_serializer_set_namespace_from_namespace(rdf_serializer, nspace);
}

int
main(int argc, char *argv[])
{
  raptor_world *world = NULL;
  raptor_parser* rdf_parser = NULL;
  unsigned char *uri_string;
  raptor_uri *uri, *base_uri;

  world = raptor_new_world();

  uri_string = raptor_uri_filename_to_uri_string(argv[1]);
  uri = raptor_new_uri(world, uri_string);
  base_uri = raptor_uri_copy(uri);

  /* Ask raptor to work out which parser to use */
  rdf_parser = raptor_new_parser(world, "guess");
  raptor_parser_set_statement_handler(rdf_parser, NULL, serialize_triple);
  raptor_parser_set_namespace_handler(rdf_parser, NULL, declare_namespace);

  rdf_serializer = raptor_new_serializer(world, "rdfxml-abbrev");

  raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout);
  raptor_parser_parse_file(rdf_parser, uri, base_uri);
  raptor_serializer_serialize_end(rdf_serializer);

  raptor_free_serializer(rdf_serializer);
  raptor_free_parser(rdf_parser);

  raptor_free_uri(base_uri);
  raptor_free_uri(uri);
  raptor_free_memory(uri_string);

  raptor_free_world(world);

  return 0;
}

Compile it like this:

$ gcc -o rdfcat rdfcat.c `pkg-config raptor2 --cflags --libs`

and run it on an RDF file as:

$ ./rdfcat raptor.rdf
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://usefulinc.com/ns/doap#">
  <rdf:Description rdf:about="">
    <foaf:maker>
      <foaf:Person>
        <foaf:name>Dave Beckett</foaf:name>
...


raptor2-2.0.15/docs/html/tutorial-parser-features.html0000644000175000017500000000714712425347071017662 00000000000000 Parser options

Parser options

There are several options that can be set on parsers. The exact list of options can be found at run time via the Querying Functionality or in the API reference for raptor_option.

Options are integer enumerations of the raptor_option enum and have typed values that are either booleans, integers or strings. The function that sets options for parsers is raptor_parser_set_option() used as follows:

  /* Set a boolean or integer valued option to value 1 */
  raptor_parser_set_option(rdf_parser, option, NULL, 1);

  /* Set a string valued option to value "abc" */
  raptor_parser_set_option(rdf_parser, option, "abc", -1);

There is a corresponding function for reading the values of parser option raptor_parser_get_option() which takes the option enumeration parameter and returns the boolean / integer or string value correspondingly into the appropriate pointer argument.

  /* Get a boolean or integer option value */
  int int_var;
  raptor_parser_get_option(rdf_parser, option, NULL, &int_var);

  /* Get a string option value */
  char* string_var;
  raptor_parser_get_option(rdf_parser, option, &string_var, NULL);

raptor2-2.0.15/docs/html/parser-json.html0000644000175000017500000000377112425347071015153 00000000000000 JSON parser (name json)

JSON parser (name json)

A parser for both the resource-centric RDF/JSON syntax as defined by Talis at RDF/JSON Specification and the triples-centric format based on the SPARQL results in JSON format.

raptor2-2.0.15/docs/html/parser-rss-tag-soup.html0000644000175000017500000000515212425347071016541 00000000000000 RSS Tag Soup parser (name rss-tag-soup)

RSS Tag Soup parser (name rss-tag-soup)

A parser for the multiple XML RSS formats that use the elements such as channel, item, title, description in different ways. This includes support for the Atom 1.0 syndication format defined in IETF RFC 4287

The parser attempts to turn the input into RSS 1.0 RDF triples in the RSS 1.0 model of a syndication feed. This includes triples for RSS Enclosures.

True RSS 1.0 when wanted to be used as a full RDF vocabulary, is best parsed by the RDF/XML parser (name rdfxml).

raptor2-2.0.15/docs/html/parser-grddl.html0000644000175000017500000001405212425347071015270 00000000000000 GRDDL parser (name grddl)

GRDDL parser (name grddl)

A parser for the Gleaning Resource Descriptions from Dialects of Languages (GRDDL), W3C Proposed Recommendation of 2007-07-16 which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML or XML content into RDF/XML or other RDF syntax which can then be parsed.

The GRDDL parser is rather complex and different from the other parsers in that it retrieves URIs, reads HTML documents (possibly with errors), transforms the documents with XSLT and turns the result into a single graph. The default configuration of the GRDDL parser also reads microformats (hcard, hcalendar) and follows <link> tags that point to RDF/XML. Parts of the GRDDL process can be altered by configuration, which are describe below.

The GRDDL parser defines 'base', 'Base' and 'url' XSLT parameters with the value of the base URI to allow some XSLT sheets to work. These set of parameters cannot be disabled.

If the XSLT transform returns an empty string, no further processing of the result is done, and a warning is generated. The xsl:output method is mapped to result document mime types as follows: 'text' to text/plain; 'xml' to application/xml and 'html' to text/html. Any result that is of type 'application/xml' or unknown mime type is assumed to be RDF/XML.

The URIs that are processed during GRDDL operations can be checked and skipped if required using a handler set with the raptor_parser_set_uri_filter() function. If the handler returns non-0, the URI is rejected. This uses raptor_www_set_uri_filter() internally.

If the value of option RAPTOR_OPTION_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during GRDDL processing. This uses raptor_www_set_connection_timeout() internally.

The hardcoded support for hcard and hcalendar microformats can be disabled by setting parser option RAPTOR_OPTION_MICROFORMATS to 0 or using raptor_parser_set_option() with option RAPTOR_OPTION_STRICT and a boolean value of 1.

The GRDDL parser by default will try an XML parser on the content followed by a lax HTML parser. This can be disabled by setting parser option RAPTOR_OPTION_HTML_TAG_SOUP to 0 or using raptor_parser_set_option() with option RAPTOR_OPTION_STRICT and a boolean value of 1.

The GRDDL parser by default will try to look for an HTML <link> tag that points to RDF/XML. This can be disabled by setting parser option RAPTOR_OPTION_HTML_LINK to 0 or using raptor_parser_set_option() with option RAPTOR_OPTION_STRICT and a boolean value of 1.

raptor2-2.0.15/docs/html/raptor2-changes-2-0-7-to-2-0-8.html0000644000175000017500000001055212425347071017423 00000000000000 Changes between raptor2 2.0.7 and 2.0.8

Changes between raptor2 2.0.7 and 2.0.8

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/tutorial-parser-create.html0000644000175000017500000001014712425347071017301 00000000000000 Create the Parser object

Create the Parser object

The parser can be created directly from a known name such as rdfxml for the W3C Recommendation RDF/XML syntax:

  raptor_parser* rdf_parser;

  rdf_parser = raptor_new_parser(world, "rdfxml");

or the name can be discovered from an description as discussed in Querying Functionality

The parser can also be created by identifying the syntax by a URI, specifying the syntax by a MIME Type, providng an identifier for the content such as filename or URI string or giving some initial content bytes that can be used to guess. Using the raptor_new_parser_for_content() function, all of these can be given as optional parameters, using NULL or 0 for undefined parameters. The constructor will then use as much of this information as possible.

  raptor_parser* rdf_parser;

Create a parser that reads the MIME Type for RDF/XML application/rdf+xml

  rdf_parser = raptor_new_parser_for_content(world, NULL, "application/rdf+xml", NULL, 0, NULL);

Create a parser that can read a syntax identified by the URI for Turtle http://www.dajobe.org/2004/01/turtle/, which has no registered MIME Type at this date:

  syntax_uri = raptor_new_uri(world, "http://www.dajobe.org/2004/01/turtle/");

  rdf_parser = raptor_new_parser_for_content(world, syntax_uri, NULL, NULL, 0, NULL);

Create a parser that recognises the identifier foo.rss:

  rdf_parser = raptor_new_parser_for_content(world, NULL, NULL, NULL, 0, "foo.rss");

Create a parser that recognises the content in buffer:

  rdf_parser = raptor_new_parser_for_content(world, NULL, NULL, buffer, len, NULL);

Any of the constructor calls can return NULL if no matching parser could be found, or the construction failed in another way.

raptor2-2.0.15/docs/html/right.png0000644000175000017500000000073012425347071013635 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2 I%=eIDATx!o@.'**M0$$?1~vIeEuLl&4䝠Bݛ|>$ݶoc Unicode

Unicode

Unicode — Unicode and UTF-8 utility functions.

Synopsis

typedef             raptor_unichar;
int                 raptor_unicode_utf8_string_put_char (raptor_unichar c,
                                                         unsigned char *output,
                                                         size_t length);
int                 raptor_unicode_utf8_string_get_char (const unsigned char *input,
                                                         size_t length,
                                                         raptor_unichar *output);
int                 raptor_unicode_is_xml11_namestartchar
                                                        (raptor_unichar c);
int                 raptor_unicode_is_xml10_namestartchar
                                                        (raptor_unichar c);
int                 raptor_unicode_is_xml11_namechar    (raptor_unichar c);
int                 raptor_unicode_is_xml10_namechar    (raptor_unichar c);
int                 raptor_unicode_check_utf8_string    (const unsigned char *string,
                                                         size_t length);
int                 raptor_unicode_utf8_strlen          (const unsigned char *string,
                                                         size_t length);
size_t              raptor_unicode_utf8_substr          (unsigned char *dest,
                                                         size_t *dest_length_p,
                                                         const unsigned char *src,
                                                         size_t src_length,
                                                         int startingLoc,
                                                         int length);

Description

Functions to support converting to and from Unicode written in UTF-8 which is the native internal string format of all the redland libraries. Includes checking for Unicode names using either the XML 1.0 or XML 1.1 rules.

Details

raptor_unichar

typedef unsigned long raptor_unichar;

raptor Unicode codepoint


raptor_unicode_utf8_string_put_char ()

int                 raptor_unicode_utf8_string_put_char (raptor_unichar c,
                                                         unsigned char *output,
                                                         size_t length);

Encode a Unicode character to a UTF-8 string

If output is NULL, then will calculate the length rather than perform the encoding. This can be used by the called to allocate space and then re-call this function with the new buffer.

c :

Unicode character

output :

UTF-8 string buffer or NULL

length :

length of output buffer

Returns :

number of bytes encoded to output buffer or <0 on failure

raptor_unicode_utf8_string_get_char ()

int                 raptor_unicode_utf8_string_get_char (const unsigned char *input,
                                                         size_t length,
                                                         raptor_unichar *output);

Decode a UTF-8 encoded string to get a Unicode character.

If output is NULL, then will calculate the number of bytes that will be used from the input buffer and not perform the conversion.

input :

UTF-8 string buffer

length :

buffer size

output :

Pointer to the Unicode character or NULL

Returns :

bytes used from input buffer or <0 on failure: -1 input buffer too short or length error, -2 overlong UTF-8 sequence, -3 illegal code positions, -4 code out of range U+0000 to U+10FFFF. In cases -2, -3 and -4 the coded character is stored in the output.

raptor_unicode_is_xml11_namestartchar ()

int                 raptor_unicode_is_xml11_namestartchar
                                                        (raptor_unichar c);

Check if Unicode character is legal to start an XML 1.1 Name

See Namespaces in XML 1.1 REC 2004-02-04 NameStartChar updating Extensible Markup Language (XML) 1.1 REC 2004-02-04 sec 2.3, [4a] excluding the ':'

c :

Unicode character to check

Returns :

non-0 if legal

raptor_unicode_is_xml10_namestartchar ()

int                 raptor_unicode_is_xml10_namestartchar
                                                        (raptor_unichar c);

Check if Unicode character is legal to start an XML 1.0 Name

See Namespaces in XML REC 1999-01-14 updating Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 excluding the ':'

c :

Unicode character to check

Returns :

non-0 if legal

raptor_unicode_is_xml11_namechar ()

int                 raptor_unicode_is_xml11_namechar    (raptor_unichar c);

Check if a Unicode codepoint is a legal to continue an XML 1.1 Name

See Namespaces in XML 1.1 REC 2004-02-04 updating Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 sec 2.3, [4a] excluding the ':'

c :

Unicode character

Returns :

non-0 if legal

raptor_unicode_is_xml10_namechar ()

int                 raptor_unicode_is_xml10_namechar    (raptor_unichar c);

Check if a Unicode codepoint is a legal to continue an XML 1.0 Name

See Namespaces in XML REC 1999-01-14 NCNameChar updating Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04 excluding the ':'

c :

Unicode character

Returns :

non-0 if legal

raptor_unicode_check_utf8_string ()

int                 raptor_unicode_check_utf8_string    (const unsigned char *string,
                                                         size_t length);

Check a string is valid Unicode UTF-8.

string :

UTF-8 string

length :

length of string

Returns :

Non 0 if the string is UTF-8

raptor_unicode_utf8_strlen ()

int                 raptor_unicode_utf8_strlen          (const unsigned char *string,
                                                         size_t length);

Calculate the number of Unicode characters in the given UTF-8 encoded buffer

string :

buffer

length :

buffer length

Returns :

number of characters or <0 if sequence is invalid

raptor_unicode_utf8_substr ()

size_t              raptor_unicode_utf8_substr          (unsigned char *dest,
                                                         size_t *dest_length_p,
                                                         const unsigned char *src,
                                                         size_t src_length,
                                                         int startingLoc,
                                                         int length);

Get a unicode (UTF-8) substring of an existing UTF-8 string

If dest is NULL, returns the number of bytes needed to write and does no work.

dest :

destination string buffer to write to (or NULL)

dest_length_p :

location to store actual destination length (or NULL)

src :

source string

src_length :

source length in bytes

startingLoc :

starting location offset 0 for first Unicode character

length :

number of Unicode characters to copy at offset startingLoc (or < 0)

Returns :

number of bytes used in destination string or 0 on failure
raptor2-2.0.15/docs/html/tutorial-querying-functionality.html0000644000175000017500000001207512425347071021277 00000000000000 Listing built-in functionality

Listing built-in functionality

Raptor can be configured and compiled with support for different lists of parsers and serializers. The list built into the library can be found by means of description functions. These take as input an int counter and return descriptions of the object at that offset in the list. The return value is a pointer to a shared, read-only description of the object, or NULL if the counter has gone too far into the list.

Listing Functionality with Descriptions

Get descriptions of the parser syntaxes

  const raptor_syntax_description*
  raptor_world_get_parser_description(raptor_world* world,
                                      unsigned int counter);

Get descriptions of the serializer syntaxes

  const raptor_syntax_description*
  raptor_world_get_serializer_description(raptor_world* world,
                                          unsigned int counter);

Get descriptions of options

  raptor_option_description*
  raptor_world_get_option_description(raptor_world* world,
                                      const raptor_domain domain,
                                      const raptor_option option);

Call with the appropriate domains for the class such as RAPTOR_DOMAIN_PARSER, RAPTOR_DOMAIN_SERIALIZER etc. See the raptor_domain description for the full list.

These functions can be called directly after creating a raptor world object with raptor_new_world(). This is one way to find a parser (name) by it's MIME Type, the other is to use the mime_type parameter of the raptor_new_parser_for_content().

Example 1. List all parser options using option description

  unsigned int i;
  for(i = 0; i < raptor_option_get_count(); i++) {
    raptor_option_description* od;

    od = raptor_world_get_option_description(world, RAPTOR_DOMAIN_PARSER, i);

    if(od) {
      /* do something with od fields such as od->name, od->label */
    }
  }

There are more examples of this usage in the source for the rapper utility in util/rapper.c.


raptor2-2.0.15/docs/html/tutorial-serializer-features.html0000644000175000017500000000723712425347071020537 00000000000000 Serializer options

Serializer options

There are several options that can be set on serializers. The exact list of options can be found at run time via the Querying Functionality or in the API reference for raptor_option.

Options are integer enumerations of the raptor_option enum and have values that are either booleans, integers or strings. The function that sets options for serializers is: raptor_serializer_set_option() used as follows:

  /* Set a boolean or integer valued option to value 1 */
  raptor_serializer_set_option(rdf_serializer, option, NULL, 1);

  /* Set a string valued option to value "abc" */
  raptor_serializer_set_option(rdf_serializer, option, "abc", -1);

There is a corresponding function for reading the values of serializer option raptor_serializer_get_option() which takes the option enumeration parameter and returns the boolean / integer or string value correspondingly into the appropriate pointer argument.

  /* Get a boolean or integer option value */
  int int_var;
  raptor_serializer_get_option(rdf_serializer, option, NULL, &int_var);

  /* Get a string option value */
  char* string_var;
  raptor_serializer_get_option(rdf_serializer, option, &string_var, NULL);

raptor2-2.0.15/docs/html/home.png0000644000175000017500000000121612425347071013450 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1KvIDATxՕkq?rCp ~CnpCAAJ .B-\'G]:ܠC -(8 Ԁ!fDғklbRoyxwpðIJ<of_-@RHf֟t^ښ$Q|pgv;X^^&s(bwwZF9&3඙ ^IRZUE.0Z]]U PYM8HGIekqqҀ! $۬3n e{-/seeeÌXOͷ$8==USQRR'9-s+B^ Cەs+%<7W :2IENDB`raptor2-2.0.15/docs/html/raptor2-changes-2-0-13-to-2-0-14.html0000644000175000017500000000466112425347071017561 00000000000000 Changes between raptor2 2.0.13 and 2.0.14

Changes between raptor2 2.0.13 and 2.0.14

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/restrict-parser-network-access.html0000644000175000017500000001653512425347071020771 00000000000000 Restrict parser network access

Restrict parser network access

Parsing can cause network requests to be performed, especially if a URI is given as an argument such as with raptor_parser_parse_uri() however there may also be indirect requests such as with the GRDDL parser that retrieves URIs depending on the results of initial parse requests. The URIs requested may not be wanted to be fetched or need to be filtered, and this can be done in three ways.

Filtering parser network requests with option RAPTOR_OPTION_NO_NET

The parser option RAPTOR_OPTION_NO_NET can be set with raptor_parser_set_option() and forbids all network requests. There is no customisation with this approach, for that see the URI filter in the next section.

  rdf_parser = raptor_new_parser(world, "rdfxml");

  /* Disable internal network requests */
  raptor_parser_set_option(rdf_parser, RAPTOR_OPTION_NO_NET, NULL, 1);

Filtering parser network requests with raptor_www_set_uri_filter()

The raptor_www_set_uri_filter() allows setting of a filtering function to operate on all URIs retrieved by a WWW connection. This connection can be used in parsing when operated by hand.

void write_bytes_handler(raptor_www* www, void *user_data, 
                         const void *ptr, size_t size, size_t nmemb) {
{
  raptor_parser* rdf_parser = (raptor_parser*)user_data;

  raptor_parser_parse_chunk(rdf_parser, (unsigned char*)ptr, size*nmemb, 0);
}

int uri_filter(void* filter_user_data, raptor_uri* uri) {
  /* return non-0 to forbid the request */
}

int main(int argc, char *argv[]) { 
  ...

  rdf_parser = raptor_new_parser(world, "rdfxml");
  www = raptor_new_www(world);

  /* filter all URI requests */
  raptor_www_set_uri_filter(www, uri_filter, filter_user_data);

  /* make WWW write bytes to parser */
  raptor_www_set_write_bytes_handler(www, write_bytes_handler, rdf_parser);

  raptor_parser_parse_start(rdf_parser, uri);
  raptor_www_fetch(www, uri);
  /* tell the parser that we are done */
  raptor_parser_parse_chunk(rdf_parser, NULL, 0, 1);

  raptor_free_www(www);
  raptor_free_parser(rdf_parser);

  ...
}

Filtering parser network requests with raptor_parser_set_uri_filter()

The raptor_parser_set_uri_filter() allows setting of a filtering function to operate on all URIs that the parser sees. This operates on the internal raptor_www object used inside parsing to retrieve URIs, similar to that described in the previous section.

  int uri_filter(void* filter_user_data, raptor_uri* uri) {
    /* return non-0 to forbid the request */
  }

  rdf_parser = raptor_new_parser(world, "rdfxml");

  raptor_parser_set_uri_filter(rdf_parser, uri_filter, filter_user_data);

  /* parse content as normal */
  raptor_parser_parse_uri(rdf_parser, uri, base_uri);

Setting timeout for parser network requests with option RAPTOR_OPTION_WWW_TIMEOUT

If the value of option RAPTOR_OPTION_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during parsing (primarily for GRDDL). This uses raptor_www_set_connection_timeout() internally.

  rdf_parser = raptor_new_parser(world, "grddl");

  /* set internal URI retrieval maximum time to 5 seconds */
  raptor_parser_set_option(rdf_parser, RAPTOR_OPTION_WWW_TIMEOUT, NULL, 5);
raptor2-2.0.15/docs/html/parser-ntriples.html0000644000175000017500000000411112425347071016027 00000000000000 N-Triples parser (name ntriples)

N-Triples parser (name ntriples)

A parser for the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.

raptor2-2.0.15/docs/html/raptor2-changes-2-0-14-to-2-0-15.html0000644000175000017500000000731312425347071017560 00000000000000 Changes between raptor2 2.0.14 and 2.0.15

Changes between raptor2 2.0.14 and 2.0.15

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/serializer-turtle.html0000644000175000017500000000411712425347071016371 00000000000000 Turtle serializer (name turtle)

Turtle serializer (name turtle)

A serializer for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.

raptor2-2.0.15/docs/html/tutorial-serializer-to-destination.html0000644000175000017500000001664512425347071021665 00000000000000 Provide a destination for the serialized syntax

Provide a destination for the serialized syntax

The operation of turning RDF triples into a syntax has several alternatives from functions that do most of the work writing to a file or string to functions that allow passing in a raptor_iostream which can be entirely user-constructed.

Serialize to a filename (raptor_serializer_start_to_filename())

Serialize to a new filename (using raptor_new_iostream_to_filename() internally) and uses asf base URI, the file's URI.

  const char *filename = "raptor.rdf";
  raptor_serializer_start_to_filename(rdf_serializer, filename);

Serialize to a string (raptor_serializer_start_to_string())

Serialize to a string that is allocated by the serializer (using raptor_new_iostream_to_string() internally). The resulting string is only constructed after raptor_serializer_serialize_end() is called and at that point it is assigned to the string pointer passed in, with the length written to the optional length pointer. This function takes an optional base URI but may be required by some serializers.

  raptor_uri* uri = raptor_new_uri(world, "http://example.org/base");
  void *string;  /* destination for string */
  size_t length; /* length of constructed string */
  raptor_serializer* rdf_serializer = /* serializer created by some means */ ;

  raptor_serializer_start_to_string(rdf_serializer, uri,
                                    &string, &length);

Serialize to a FILE* file handle (raptor_serializer_start_to_file_handle())

Serialize to an existing open C FILE* file handle (using raptor_new_iostream_to_file_handle() internally). The handle is not closed after serializing is finished. This function takes an optional base URI but may be required by some serializers.

  raptor_uri* uri = raptor_new_uri(world, "http://example.org/base");
  FILE* fh = fopen("raptor.rdf", "wb");
  raptor_serializer* rdf_serializer = /* serializer created by some means */ ;

  raptor_serializer_start_to_file_handle(rdf_serializer, uri, fh);

This is the most flexible serializing method as it allows writing to any raptor_iostream which can be constructed to build any form of user-generated structure via callbacks. The iostream remains owned by the caller that can continue to write to it after the serializing is finished (after raptor_serializer_serialize_end()) is called).

  raptor_uri* uri = raptor_new_uri(world, "http://example.org/base");
  raptor_iostream* iostream = /* iostream initialized by some means */ ;
  raptor_serializer* rdf_serializer = /* serializer created by some means */ ;

  raptor_serializer_start_to_iostream(rdf_serializer, uri, iostream);

  while( /* got RDF triples */ ) {
    raptor_statement* triple = /* ... triple made from somewhere ... */ ;
    raptor_serializer_serialize_statement(rdf_serializer, triple);
  }
  raptor_serializer_serialize_end(rdf_serializer);

  raptor_free_serializer(rdf_serializer);

  /* ... write other stuff to iostream ... */

  raptor_free_iostream(iostream);

raptor2-2.0.15/docs/html/tutorial-serializer-send-triples.html0000644000175000017500000000645512425347071021333 00000000000000 Send RDF Triples to serializer

Send RDF Triples to serializer

Once the serializer has been started, RDF triples can be sent to it via the raptor_serializer_serialize_statement() function with a raptor_statement value.

Once all triples are sent, the serializing must be finished with a call to raptor_serializer_serialize_end(). In particular, only at this point does the raptor_iostream get flushed or any string constructed for raptor_serializer_start_to_string().

  /* start the serializing somehow */
  while( /* got RDF triples */ ) {
    raptor_serializer_serialize_statement(rdf_serializer, triple);
  }
  raptor_serializer_serialize_end(rdf_serializer);
  /* now can use the serializing result (FILE, string, raptor_iostream) */

raptor2-2.0.15/docs/html/tutorial-serializer-create.html0000644000175000017500000000471612425347071020163 00000000000000 Create the Serializer object

Create the Serializer object

The serializer can be created directly from a known name using raptor_new_serializer() such as rdfxml for the W3C Recommendation RDF/XML syntax:

  raptor_serializer* rdf_serializer;

  rdf_serializer = raptor_new_serializer(world, "rdfxml");

or the name can be discovered from an description as discussed in Querying Functionality

raptor2-2.0.15/docs/html/tutorial-serializer-destroy.html0000644000175000017500000000367712425347071020416 00000000000000 Destroy the serializer

Destroy the serializer

To tidy up, delete the serializer object as follows:

  raptor_free_serializer(rdf_serializer);

raptor2-2.0.15/docs/html/tutorial-parser-static-info.html0000644000175000017500000000576212425347071020265 00000000000000 Querying parser static information

Querying parser static information

These methods return information about the constructed parser implementation corresponding to the information available via raptor_world_get_parser_description() for all parsers.

raptor_parser_get_name() returns the parser syntax name, raptor_parser_get_description() returns more detailed description fields including the long label and mime_types for the parser with quality levels.

raptor_parser_get_accept_header() returns a string that would be sent in an HTTP request Accept: header for the syntaxes accepted by this parser only.

raptor2-2.0.15/docs/html/raptor2-section-xml-namespace.html0000644000175000017500000014301312425347071020465 00000000000000 XML Namespaces

XML Namespaces

XML Namespaces — Namespaces in XML include stacks of Namespaces

Synopsis

typedef             raptor_namespace;
raptor_namespace *  raptor_new_namespace_from_uri       (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         raptor_uri *ns_uri,
                                                         int depth);
raptor_namespace_stack * raptor_new_namespaces          (raptor_world *world,
                                                         int defaults);
int                 raptor_namespaces_init              (raptor_world *world,
                                                         raptor_namespace_stack *nstack,
                                                         int defaults);
void                raptor_namespaces_clear             (raptor_namespace_stack *nstack);
void                raptor_free_namespaces              (raptor_namespace_stack *nstack);
void                raptor_namespaces_start_namespace   (raptor_namespace_stack *nstack,
                                                         raptor_namespace *nspace);
int                 raptor_namespaces_start_namespace_full
                                                        (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         const unsigned char *ns_uri_string,
                                                         int depth);
void                raptor_namespaces_end_for_depth     (raptor_namespace_stack *nstack,
                                                         int depth);
raptor_namespace *  raptor_namespaces_get_default_namespace
                                                        (raptor_namespace_stack *nstack);
raptor_namespace *  raptor_namespaces_find_namespace    (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         int prefix_length);
raptor_namespace *  raptor_namespaces_find_namespace_by_uri
                                                        (raptor_namespace_stack *nstack,
                                                         raptor_uri *ns_uri);
int                 raptor_namespaces_namespace_in_scope
                                                        (raptor_namespace_stack *nstack,
                                                         const raptor_namespace *nspace);
raptor_namespace *  raptor_new_namespace                (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         const unsigned char *ns_uri_string,
                                                         int depth);
void                raptor_free_namespace               (raptor_namespace *ns);
raptor_uri *        raptor_namespace_get_uri            (const raptor_namespace *ns);
const unsigned char * raptor_namespace_get_prefix       (const raptor_namespace *ns);
const unsigned char * raptor_namespace_get_counted_prefix
                                                        (const raptor_namespace *ns,
                                                         size_t *length_p);
int                 raptor_namespace_write              (raptor_namespace *ns,
                                                         raptor_iostream *iostr);
typedef             raptor_namespace_stack;
int                 raptor_namespace_stack_start_namespace
                                                        (raptor_namespace_stack *nstack,
                                                         raptor_namespace *ns,
                                                         int new_depth);
unsigned char *     raptor_namespace_format_as_xml      (const raptor_namespace *ns,
                                                         size_t *length_p);
int                 raptor_xml_namespace_string_parse   (const unsigned char *string,
                                                         unsigned char **prefix,
                                                         unsigned char **uri_string);

Description

Two classes that provide an XML namespace - short prefix (or none) and absolute URI (or none) to match the form xmlns...="..." seen in XML. A stack of namespaces raptor_namespace_stack is also provided to handle in-scope namespace calculations that happen inside XML documents where inner namespaces can override outer ones.

Details

raptor_namespace

raptor_namespace* raptor_namespace;

Raptor XML Namespace class


raptor_new_namespace_from_uri ()

raptor_namespace *  raptor_new_namespace_from_uri       (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         raptor_uri *ns_uri,
                                                         int depth);

Constructor - create a new namespace from a prefix and URI object.

This declares but does not enable the namespace declaration (or 'start' it) Use raptor_namespaces_start_namespace() to make the namespace enabled and in scope for binding prefixes.

Alternatively use raptor_namespaces_start_namespace_full() can construct and enable a namespace in one call.

nstack :

namespace stack

prefix :

namespace prefix string

ns_uri :

namespace URI

depth :

depth of namespace in the stack

Returns :

a new raptor_namespace or NULL on failure

raptor_new_namespaces ()

raptor_namespace_stack * raptor_new_namespaces          (raptor_world *world,
                                                         int defaults);

Constructor - create a new raptor_namespace_stack.

See raptor_namespaces_init() for the values of defaults.

world :

raptor_world object

defaults :

namespaces to initialise

Returns :

a new namespace stack or NULL on failure

raptor_namespaces_init ()

int                 raptor_namespaces_init              (raptor_world *world,
                                                         raptor_namespace_stack *nstack,
                                                         int defaults);

Initialise an existing namespaces stack object

This sets up the stack optionally with some common RDF namespaces.

defaults can be 0 for none, 1 for just XML, 2 for RDF, RDFS, OWL and XSD (RDQL uses this) or 3+ undefined.

world :

raptor_world object

nstack :

raptor_namespace_stack to initialise

defaults :

namespaces to initialise.

Returns :

non-0 on error

raptor_namespaces_clear ()

void                raptor_namespaces_clear             (raptor_namespace_stack *nstack);

Empty a namespace stack of namespaces and any other resources.

nstack :

namespace stack

raptor_free_namespaces ()

void                raptor_free_namespaces              (raptor_namespace_stack *nstack);

Destructor - destroy a namespace stack

nstack :

namespace stack

raptor_namespaces_start_namespace ()

void                raptor_namespaces_start_namespace   (raptor_namespace_stack *nstack,
                                                         raptor_namespace *nspace);

Start a namespace on a stack of namespaces.

nstack :

namespace stack

nspace :

namespace to start

raptor_namespaces_start_namespace_full ()

int                 raptor_namespaces_start_namespace_full
                                                        (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         const unsigned char *ns_uri_string,
                                                         int depth);

Create a new namespace and start it on a stack of namespaces.

See raptor_new_namespace() for the meanings of prefix, ns_uri_string and depth for namespaces.

nstack :

namespace stack

prefix :

new namespace prefix (or NULL)

ns_uri_string :

new namespace URI (or NULL)

depth :

new namespace depth

Returns :

non-0 on failure

raptor_namespaces_end_for_depth ()

void                raptor_namespaces_end_for_depth     (raptor_namespace_stack *nstack,
                                                         int depth);

End all namespaces at the given depth in the namespace stack.

nstack :

namespace stack

depth :

depth

raptor_namespaces_get_default_namespace ()

raptor_namespace *  raptor_namespaces_get_default_namespace
                                                        (raptor_namespace_stack *nstack);

Get the current default namespace in-scope in a stack.

nstack :

namespace stack

Returns :

raptor_namespace or NULL if no default namespace is in scope

raptor_namespaces_find_namespace ()

raptor_namespace *  raptor_namespaces_find_namespace    (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         int prefix_length);

Find a namespace in a namespace stack by prefix.

Note that this uses the length so that the prefix may be a prefix (sic) of a longer string. If prefix is NULL, the default namespace will be returned if present, prefix_length length is ignored in this case.

nstack :

namespace stack

prefix :

namespace prefix to find

prefix_length :

length of prefix.

Returns :

raptor_namespace for the prefix or NULL on failure

raptor_namespaces_find_namespace_by_uri ()

raptor_namespace *  raptor_namespaces_find_namespace_by_uri
                                                        (raptor_namespace_stack *nstack,
                                                         raptor_uri *ns_uri);

Find a namespace in a namespace stack by namespace URI.

nstack :

namespace stack

ns_uri :

namespace URI to find

Returns :

raptor_namespace for the URI or NULL on failure

raptor_namespaces_namespace_in_scope ()

int                 raptor_namespaces_namespace_in_scope
                                                        (raptor_namespace_stack *nstack,
                                                         const raptor_namespace *nspace);

Test if a given namespace is in-scope in the namespace stack.

nstack :

namespace stack

nspace :

namespace

Returns :

non-0 if the namespace is in scope.

raptor_new_namespace ()

raptor_namespace *  raptor_new_namespace                (raptor_namespace_stack *nstack,
                                                         const unsigned char *prefix,
                                                         const unsigned char *ns_uri_string,
                                                         int depth);

Constructor - create a new namespace from a prefix and URI string with a depth scope.

This declares but does not enable the namespace declaration (or 'start' it) Use raptor_namespaces_start_namespace() to make the namespace enabled and in scope for binding prefixes.

Alternatively use raptor_namespaces_start_namespace_full() can construct and enable a namespace in one call.

The depth is a way to use the stack of namespaces for providing scoped namespaces where inner scope namespaces override outer scope namespaces. This is primarily for RDF/XML and XML syntaxes that have hierarchical elements. The main use of this is raptor_namespaces_end_for_depth() to disable ('end') all namespaces at a given depth. Otherwise set this to 0.

nstack :

namespace stack

prefix :

namespace prefix string

ns_uri_string :

namespace URI string

depth :

depth of namespace in the stack

Returns :

a new raptor_namespace or NULL on failure

raptor_free_namespace ()

void                raptor_free_namespace               (raptor_namespace *ns);

Destructor - destroy a namespace.

ns :

namespace object

raptor_namespace_get_uri ()

raptor_uri *        raptor_namespace_get_uri            (const raptor_namespace *ns);

Get the namespace URI.

ns :

namespace object

Returns :

namespace URI or NULL

raptor_namespace_get_prefix ()

const unsigned char * raptor_namespace_get_prefix       (const raptor_namespace *ns);

Get the namespace prefix.

ns :

namespace object

Returns :

prefix string or NULL

raptor_namespace_get_counted_prefix ()

const unsigned char * raptor_namespace_get_counted_prefix
                                                        (const raptor_namespace *ns,
                                                         size_t *length_p);

Get the namespace prefix and length.

ns :

namespace object

length_p :

pointer to store length or NULL

Returns :

prefix string or NULL

raptor_namespace_write ()

int                 raptor_namespace_write              (raptor_namespace *ns,
                                                         raptor_iostream *iostr);

Write a formatted namespace to an iostream

ns :

namespace to write

iostr :

raptor iosteram

Returns :

non-0 on failure

raptor_namespace_stack

raptor_namespace_stack* raptor_namespace_stack;

Raptor XML Namespace Stack class


raptor_namespace_stack_start_namespace ()

int                 raptor_namespace_stack_start_namespace
                                                        (raptor_namespace_stack *nstack,
                                                         raptor_namespace *ns,
                                                         int new_depth);

Copy an existing namespace to a namespace stack with a new depth and start it.

The depth is a way to use the stack of namespaces for providing scoped namespaces where inner scope namespaces override outer scope namespaces. This is primarily for RDF/XML and XML syntaxes that have hierarchical elements. The main use of this is raptor_namespaces_end_for_depth() to disable ('end') all namespaces at a given depth. If depths are not being needed it is unlikely this call is ever needed to copy an existing namespace at a new depth.

nstack :

namespace stack

ns :

namespace

new_depth :

new depth

Returns :

non-0 on failure

raptor_namespace_format_as_xml ()

unsigned char *     raptor_namespace_format_as_xml      (const raptor_namespace *ns,
                                                         size_t *length_p);

Format a namespace in an XML style into a newly allocated string.

Generates a string of the form xmlns:prefix="uri", xmlns="uri", xmlns:prefix="" or xmlns="" depending on the namespace's prefix or URI. Double quotes are always used.

If length_p is not NULL, the length of the string is stored in the address it points to.

See also raptor_xml_namespace_string_parse()

ns :

namespace object

length_p :

pointer to length (or NULL)

Returns :

namespace formatted as newly allocated string or NULL on failure

raptor_xml_namespace_string_parse ()

int                 raptor_xml_namespace_string_parse   (const unsigned char *string,
                                                         unsigned char **prefix,
                                                         unsigned char **uri_string);

Parse a string containing an XML style namespace declaration into a namespace prefix and URI pair.

The string is of the form xmlns:prefix="uri", xmlns="uri", xmlns:prefix="" or xmlns="". The quotes can be single or double quotes.

Two values are returned from this function into *prefix and *uri_string. Either but not both may be NULL.

See also raptor_namespace_format_as_xml()

string :

string to parse

prefix :

pointer to location to store namespace prefix

uri_string :

pointer to location to store namespace URI

Returns :

non-0 on failure.
raptor2-2.0.15/docs/html/raptor2.devhelp20000644000175000017500000023601712425347071015047 00000000000000 raptor2-2.0.15/docs/html/tutorial-parser-set-id-handler.html0000644000175000017500000000635612425347071020645 00000000000000 Set the identifier creator handler

Set the identifier creator handler

Identifiers are created in some parsers by generating them automatically or via hints given a syntax. Raptor can customise this process using a user-supplied identifier handler function. For example, in RDF/XML generated blank node identifiers and those those specified rdf:nodeID are passed through this process. Setting a handler allows the identifier generation mechanism to be fully replaced. A lighter alternative is to use raptor_world_set_generate_bnodeid_parameters() to adjust the default algorithm for generated identifiers.

It is used as follows

  raptor_generate_bnodeid_handler bnodeid_handler;

  raptor_world_set_generate_bnodeid_handler(rdf_parser, user_data, bnodeid_handler);

The bnodeid_handler takes the following signature:

unsigned char*
generate_id_handler(void* user_data, unsigned char* user_id)
{
   /* return a new generated ID based on user_id (optional) */
}

where user_id an optional user-supplied identifier, such as the value of a rdf:nodeID in RDF/XML.

raptor2-2.0.15/docs/html/tutorial-parse-strictness.html0000644000175000017500000000451212425347071020054 00000000000000 Set the parsing strictness

Set the parsing strictness

raptor_parser_set_option() with option RAPTOR_OPTION_STRICT allows setting of the parser strictness flag. The default is lax parsing, accepting older or deprecated syntax forms but may generate a warning. Setting to non-0 (true) will cause parser errors to be generated in these cases.

raptor2-2.0.15/docs/html/style.css0000644000175000017500000001210012425347071013656 00000000000000.synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; border: solid 1px #d3d7cf; padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ background: #e6f3ff; border: solid 1px #729fcf; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } @media screen { sup a.footnote { position: relative; top: 0em ! important; } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] { display: inline-block; position: relative; top:-5em; } /* this seems to be a bug in the xsl style sheets when generating indexes */ div.index div.index { top: 0em; } /* make space for the fixed navigation bar and add space at the bottom so that * link targets appear somewhat close to top */ body { padding-top: 3.2em; padding-bottom: 20em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; /* tango:scarlet red 0/1 */ background: #ffe6e6; border: solid 1px #ef2929; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; z-index: 10; } .navigation a, .navigation a:visited { /* tango:scarlet red 3 */ color: #a40000; } .navigation a:hover { /* tango:scarlet red 1 */ color: #ef2929; } td.shortcuts { /* tango:scarlet red 1 */ color: #ef2929; font-size: 80%; white-space: nowrap; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; /* tango:scarlet red 0/1 */ background: #ffe6e6; border: solid 1px #ef2929; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a, a:visited { text-decoration: none; /* tango:sky blue 2 */ color: #3465a4; } a:hover { text-decoration: underline; /* tango:sky blue 1 */ color: #729fcf; } div.table table { border-collapse: collapse; border-spacing: 0px; /* tango:aluminium 3 */ border: solid 1px #babdb6; } div.table table td, div.table table th { /* tango:aluminium 3 */ border: solid 1px #babdb6; padding: 3px; vertical-align: top; } div.table table th { /* tango:aluminium 2 */ background-color: #d3d7cf; } hr { /* tango:aluminium 3 */ color: #babdb6; background: #babdb6; border: none 0px; height: 1px; clear: both; } .footer { padding-top: 3.5em; /* tango:aluminium 3 */ color: #babdb6; text-align: center; font-size: 80%; } .warning { /* tango:orange 0/1 */ background: #ffeed9; border-color: #ffb04f; } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; border-color: #abf562; } .note, .warning { padding: 0.5em; border-width: 1px; border-style: solid; } .note h3, .warning h3 { margin-top: 0.0em } .note p, .warning p { margin-bottom: 0.0em } /* blob links */ h2 .extralinks, h3 .extralinks { float: right; /* tango:aluminium 3 */ color: #babdb6; font-size: 80%; font-weight: normal; } .annotation { /* tango:aluminium 5 */ color: #555753; font-size: 80%; font-weight: normal; } /* code listings */ .listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ .listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ .listing_code .programlisting .function { color: #000000; font-weight: bold; } .listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ .listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ .listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ .listing_code .programlisting .normal { color: #000000; } .listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ .listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ .listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ .listing_code .programlisting .type { color: #000000; } .listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ .listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; padding: 0px; } .listing_lines, .listing_code { margin-top: 0px; margin-bottom: 0px; padding: 0.5em; } .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; } .listing_lines pre, .listing_code pre { margin: 0px; } raptor2-2.0.15/docs/html/index.html0000644000175000017500000005032712425347071014016 00000000000000 Raptor RDF Syntax Library Manual

Dave Beckett

Manual for Raptor 2.0.15

This documentation is Free Software / Open Source - you can redistribute it and/or modify it under the same licenses as Raptor. It is licensed under the following three licenses as alternatives:

  1. GNU Lesser General Public License (LGPL) V2.1 or any newer version

  2. GNU General Public License (GPL) V2 or any newer version

  3. Apache License, V2.0 or any newer version

You may not use this documentation except in compliance with at least one of the above three licenses. See the Raptor site for the full license terms.


Raptor Overview
I. Raptor Tutorial
Initialising and Finishing using the Library
Listing built-in functionality
Parsing syntaxes to RDF Triples
Introduction
Create the Parser object
Parser options
Set RDF statement callback handler
Set parsing log message handlers
Set the identifier creator handler
Set namespace declared handler
Set the parsing strictness
Provide syntax content to parse
Parse the content from a URI (raptor_parser_parse_uri())
Parse the content of a URI using an existing WWW connection (raptor_parser_parse_uri_with_connection())
Parse the content of a C FILE* (raptor_parser_parse_file_stream())
Parse the content of a file URI (raptor_parser_parse_file())
Parse chunks of syntax content provided by the application (raptor_parser_parse_start() and raptor_parser_parse_chunk())
Restrict parser network access
Filtering parser network requests with option RAPTOR_OPTION_NO_NET
Filtering parser network requests with raptor_www_set_uri_filter()
Filtering parser network requests with raptor_parser_set_uri_filter()
Setting timeout for parser network requests with option RAPTOR_OPTION_WWW_TIMEOUT
Querying parser static information
Querying parser run-time information
Aborting parsing
Destroy the parser
Parsing example code
Serializing RDF triples to a syntax
Introduction
Create the Serializer object
Serializer options
Declare namespaces
Set error and warning handlers
Provide a destination for the serialized syntax
Serialize to a filename (raptor_serializer_start_to_filename())
Serialize to a string (raptor_serializer_start_to_string())
Serialize to a FILE* file handle (raptor_serializer_start_to_file_handle())
Serialize to an raptor_iostream (raptor_serializer_start_to_iostream())
Get or construct RDF Statements (Triples)
Send RDF Triples to serializer
Querying serializer run-time information
Destroy the serializer
Serializing example code
II. Raptor Reference Manual
Parsers in Raptor (syntax to triples)
Introduction
GRDDL parser (name grddl)
Guess parser (name guess)
JSON parser (name json)
N-Triples parser (name ntriples)
RDFa parser - (name rdfa)
RDF/XML parser - default (name rdfxml)
RSS Tag Soup parser (name rss-tag-soup)
TRiG parser (name trig)
Turtle Terse RDF Triple Language parser (name turtle)
Serializers in Raptor (triples to syntax)
Introduction
Atom 1.0 serializer (name atom)
JSON serializers (name json and name json-triples)
N-Quads serializer - default (name nquads)
N-Triples serializer - default (name ntriples)
RDF/XML serializer (name rdfxml)
RDF/XML (Abbreviated) serializer (name rdfxml-abbrev)
RDF/XML (XMP Profile) serializer (name rdfxml-xmp)
Turtle serializer (name turtle)
RSS 1.0 serializer (name rss-1.0)
GraphViz dot serializer (name dot)
Initialisation — Library startup, shutdown and configuration.
General — General library constants and utility functions
Memory — Memory handling functions
AVL Trees — AVL Trees
Constants — Constant values and strings
Options — Class options
I/O Stream — Providing streaming I/O writing to files, strings or user code.
Locator — Location information for errors, warnings and messages.
Parser — RDF parsers - from a syntax to RDF triples
SAX2 — SAX2 XML Parsing API with namespaces and base URI support.
Sequence — Ordered sequence of items.
Serializer — RDF serializers - from RDF triples to a syntax
String buffer — Append-only strings.
Triples — RDF Triples
Unicode — Unicode and UTF-8 utility functions.
URI — URI class and relative URI computation
WWW — Retrieval of URI content from the web.
XML Namespaces — Namespaces in XML include stacks of Namespaces
XML QName — XML Namespace-qualified names.
XML — XML and XML Writer
Syntax Formats supported in Raptor
Introduction
MIME Types by Parser
MIME Types by Serializer
MIME Types Index
API Changes
Introduction
Changes between raptor2 1.4.21 and 2.0.0
New functions, types and enums
Deleted functions, types and enums
Renamed function and enums
Changed functions and types
Changes between raptor2 2.0.3 and 2.0.4
New functions, types and enums
Changes between raptor2 2.0.4 and 2.0.5
New functions, types and enums
Changes between raptor2 2.0.5 and 2.0.6
New functions, types and enums
Changes between raptor2 2.0.6 and 2.0.7
New functions, types and enums
Changes between raptor2 2.0.7 and 2.0.8
New functions, types and enums
Changes between raptor2 2.0.9 and 2.0.10
New functions, types and enums
Changes between raptor2 2.0.10 and 2.0.11
New functions, types and enums
Changes between raptor2 2.0.11 and 2.0.12
New functions, types and enums
Changes between raptor2 2.0.13 and 2.0.14
New functions, types and enums
Changes between raptor2 2.0.14 and 2.0.15
New functions, types and enums
Index
raptor2-2.0.15/docs/html/tutorial-parsing.html0000644000175000017500000001374712425347071016220 00000000000000 Parsing syntaxes to RDF Triples

Parsing syntaxes to RDF Triples

Introduction

The typical sequence of operations to parse is to create a parser object, set various handlers and options, start the parsing, send some syntax content to the parser object, finish the parsing and destroy the parser object.

Several parts of this process are optional, including actually using the triple results, which is useful as a syntax checking process.

raptor2-2.0.15/docs/html/tutorial-serializer-runtime-info.html0000644000175000017500000000516312425347071021331 00000000000000 Querying serializer run-time information

Querying serializer run-time information

raptor_serializer_get_iostream() gets the current serializer's raptor_iostream.

raptor_serializer_get_locator() returns the raptor_locator for the current position in the output stream. The locator structure contains full information on the details of where in the file or URI the current serializer has reached.

raptor2-2.0.15/docs/html/raptor2-changes-2-0-10-to-2-0-11.html0000644000175000017500000000522512425347071017550 00000000000000 Changes between raptor2 2.0.10 and 2.0.11

Changes between raptor2 2.0.10 and 2.0.11

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/parser-rdfa.html0000644000175000017500000000455612425347071015120 00000000000000 RDFa parser - (name rdfa)

RDFa parser - (name rdfa)

A parser for the RDFa syntax, W3C Candidate Recommendation 20 June 2008 which allows reading XHTML and XML as RDF triples by interpreting attributes on elements to describe which ones have RDF semantics. This is implemented via librdfa linked inside Raptor, written by Manu Sporny of Digital Bazaar, and licensed with the same license as Raptor.

This parser is beta quality and passes all but 4 of the RDFa tests as of Raptor 1.4.18.

raptor2-2.0.15/docs/html/tutorial-parser-destroy.html0000644000175000017500000000354112425347071017527 00000000000000 Destroy the parser

Destroy the parser

To tidy up, delete the parser object as follows:

  raptor_free_parser(rdf_parser);

raptor2-2.0.15/docs/html/serializer-json.html0000644000175000017500000000442712425347071016027 00000000000000 JSON serializers (name json and name json-triples)

JSON serializers (name json and name json-triples)

Two serializers that write JSON in either a resource-centric format with name json and in a triple-dump format with name json-triples. The resource-centric format is based on the Talis RDF/JSON design and the triple-dump format based on the SPARQL query results in JSON design.

raptor2-2.0.15/docs/html/raptor2-changes-2-0-9-to-2-0-10.html0000644000175000017500000000650012425347071017474 00000000000000 Changes between raptor2 2.0.9 and 2.0.10

Changes between raptor2 2.0.9 and 2.0.10

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/serializer-dot.html0000644000175000017500000000517212425347071015642 00000000000000 GraphViz dot serializer (name dot)

GraphViz dot serializer (name dot)

A serializer to the GraphViz DOT format.

This serializer has a set of associated serializer options that may be set to customise the output colors using raptor_serializer_set_option() with the appropriate option name and value as given below.

RAPTOR_OPTION_RESOURCE_BORDER 	Border color of resource nodes
RAPTOR_OPTION_LITERAL_BORDER 	Border color of literal nodes
RAPTOR_OPTION_BNODE_BORDER 	Border color of blank nodes
RAPTOR_OPTION_RESOURCE_FILL 	Fill color of resource nodes
RAPTOR_OPTION_LITERAL_FILL 	Fill color of literal nodes
RAPTOR_OPTION_BNODE_FILL 	Fill color of blank nodes
raptor2-2.0.15/docs/html/index.sgml0000644000175000017500000020572212425347071014015 00000000000000 raptor2-2.0.15/docs/html/raptor2-section-xml-qname.html0000644000175000017500000007526412425347071017646 00000000000000 XML QName

XML QName

XML QName — XML Namespace-qualified names.

Synopsis

typedef             raptor_qname;
raptor_qname *      raptor_new_qname                    (raptor_namespace_stack *nstack,
                                                         const unsigned char *name,
                                                         const unsigned char *value);
raptor_qname *      raptor_new_qname_from_namespace_local_name
                                                        (raptor_world *world,
                                                         raptor_namespace *ns,
                                                         const unsigned char *local_name,
                                                         const unsigned char *value);
raptor_qname *      raptor_new_qname_from_namespace_uri (raptor_namespace_stack *nstack,
                                                         raptor_uri *uri,
                                                         int xml_version);
raptor_qname *      raptor_qname_copy                   (raptor_qname *qname);
void                raptor_free_qname                   (raptor_qname *name);
int                 raptor_qname_equal                  (raptor_qname *name1,
                                                         raptor_qname *name2);
raptor_uri *        raptor_qname_string_to_uri          (raptor_namespace_stack *nstack,
                                                         const unsigned char *name,
                                                         size_t name_len);
int                 raptor_qname_write                  (raptor_qname *qname,
                                                         raptor_iostream *iostr);
unsigned char *     raptor_qname_format_as_xml          (const raptor_qname *qname,
                                                         size_t *length_p);
const unsigned char * raptor_qname_get_counted_value    (raptor_qname *name,
                                                         size_t *length_p);
const unsigned char * raptor_qname_get_local_name       (raptor_qname *name);
const raptor_namespace * raptor_qname_get_namespace     (raptor_qname *name);
const unsigned char * raptor_qname_get_value            (raptor_qname *name);
unsigned char *     raptor_qname_to_counted_name        (raptor_qname *qname,
                                                         size_t *length_p);

Description

Wraps an XML name inside an associated XML namespace in some XML document context (typically). Mostly used inside parsing XML to manage qnames for XML element and attribute names.

Details

raptor_qname

raptor_qname* raptor_qname;

Raptor XML qname class


raptor_new_qname ()

raptor_qname *      raptor_new_qname                    (raptor_namespace_stack *nstack,
                                                         const unsigned char *name,
                                                         const unsigned char *value);

Constructor - create a new XML qname.

Create a new qname from the local element/attribute name, with optional (attribute) value. The namespace stack is used to look up the name and find the namespace and generate the URI of the qname.

nstack :

namespace stack to look up for namespaces

name :

element or attribute name

value :

attribute value (else is an element)

Returns :

a new raptor_qname object or NULL on failure

raptor_new_qname_from_namespace_local_name ()

raptor_qname *      raptor_new_qname_from_namespace_local_name
                                                        (raptor_world *world,
                                                         raptor_namespace *ns,
                                                         const unsigned char *local_name,
                                                         const unsigned char *value);

Constructor - create a new XML qname.

Create a new qname from the namespace and local element/attribute name, with optional (attribute) value.

world :

raptor_world object

ns :

namespace of qname (or NULL)

local_name :

element or attribute name

value :

attribute value (else is an element)

Returns :

a new raptor_qname object or NULL on failure

raptor_new_qname_from_namespace_uri ()

raptor_qname *      raptor_new_qname_from_namespace_uri (raptor_namespace_stack *nstack,
                                                         raptor_uri *uri,
                                                         int xml_version);

Make an appropriate XML Qname from the namespaces on a namespace stack

Makes a qname from the in-scope namespaces in a stack if the URI matches the prefix and the rest is a legal XML name.

nstack :

namespace stack

uri :

URI to use to make qname

xml_version :

XML Version

Returns :

raptor_qname for the URI or NULL on failure

raptor_qname_copy ()

raptor_qname *      raptor_qname_copy                   (raptor_qname *qname);

Copy constructor - copy an existing XML qname.

qname :

existing qname

Returns :

a new raptor_qname object or NULL on failure

raptor_free_qname ()

void                raptor_free_qname                   (raptor_qname *name);

Destructor - destroy a raptor_qname object.

name :

raptor_qname object

raptor_qname_equal ()

int                 raptor_qname_equal                  (raptor_qname *name1,
                                                         raptor_qname *name2);

Compare two XML Qnames for equality.

name1 :

first raptor_qname

name2 :

second raptor_name

Returns :

non-0 if the qnames are equal.

raptor_qname_string_to_uri ()

raptor_uri *        raptor_qname_string_to_uri          (raptor_namespace_stack *nstack,
                                                         const unsigned char *name,
                                                         size_t name_len);

Get the URI for a qname.

Utility function to turn a string representing a QName in the N3 style, into a new URI representing it. A NULL name or name ":" returns the default namespace URI. A name "p:" returns namespace name (URI) for the namespace with prefix "p".

Partially equivalent to qname = raptor_new_qname(nstack, name, NULL); uri = raptor_uri_copy(qname->uri); raptor_free_qname(qname) but without making the qname, and it also handles the NULL and ":" name cases as well as error checking.

nstack :

raptor_namespace_stack to decode the namespace

name :

QName string or NULL

name_len :

QName string length

Returns :

new raptor_uri object or NULL on failure

raptor_qname_write ()

int                 raptor_qname_write                  (raptor_qname *qname,
                                                         raptor_iostream *iostr);

Write a formatted qname to an iostream

qname :

QName to write

iostr :

raptor iosteram

Returns :

non-0 on failure

raptor_qname_format_as_xml ()

unsigned char *     raptor_qname_format_as_xml          (const raptor_qname *qname,
                                                         size_t *length_p);

Format a qname in an XML style into a newly allocated string.

Generates a string of the form a:b="value" or a="value" depending on the qname's prefix. Double quotes are always used.

If length_p is not NULL, the length of the string is stored in the address it points to.

qname :

qname object

length_p :

pointer to length (or NULL)

Returns :

qname formatted as newly allocated string or NULL on failure

raptor_qname_get_counted_value ()

const unsigned char * raptor_qname_get_counted_value    (raptor_qname *name,
                                                         size_t *length_p);

Get the raptor_value of an XML QName.

name :

raptor_qname object

length_p :

pointer to variable to store length of name (or NULL)

Returns :

the value

raptor_qname_get_local_name ()

const unsigned char * raptor_qname_get_local_name       (raptor_qname *name);

Get the raptor_local_name of an XML QName.

name :

raptor_qname object

Returns :

the local_name

raptor_qname_get_namespace ()

const raptor_namespace * raptor_qname_get_namespace     (raptor_qname *name);

Get the raptor_namespace of an XML QName.

name :

raptor_qname object

Returns :

the namespace

raptor_qname_get_value ()

const unsigned char * raptor_qname_get_value            (raptor_qname *name);

Get the raptor_value of an XML QName.

name :

raptor_qname object

Returns :

the value

raptor_qname_to_counted_name ()

unsigned char *     raptor_qname_to_counted_name        (raptor_qname *qname,
                                                         size_t *length_p);

Get the string form of a QName name

qname :

QName to write

length_p :

pointer to variable to store length of name (or NULL)

Returns :

new string name or NULL on failure
raptor2-2.0.15/docs/html/raptor2-section-avltree.html0000644000175000017500000010202212425347071017370 00000000000000 AVL Trees

AVL Trees

AVL Trees — AVL Trees

Description

AVL Trees

Details

raptor_avltree

typedef struct raptor_avltree_s raptor_avltree;

AVL Tree


enum raptor_avltree_bitflags

typedef enum {
 RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES = 1
} raptor_avltree_bitflags;

Bit flags for AVL Tree class constructor raptor_new_avltree()

RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES

If set raptor_avltree_add() will replace any duplicate items. If not set, raptor_avltree_add() will not replace them and will return status >0 when adding a duplicate. (Default is not set)

raptor_new_avltree ()

raptor_avltree *    raptor_new_avltree                  (raptor_data_compare_handler compare_handler,
                                                         raptor_data_free_handler free_handler,
                                                         unsigned int flags);

AVL Tree Constructor

compare_handler :

item comparison handler for ordering

free_handler :

item free handler (or NULL)

flags :

AVLTree flags - bitmask of raptor_avltree_bitflags flags.

Returns :

new AVL Tree or NULL on failure

raptor_free_avltree ()

void                raptor_free_avltree                 (raptor_avltree *tree);

AVL Tree destructor

tree :

AVLTree object

raptor_avltree_add ()

int                 raptor_avltree_add                  (raptor_avltree *tree,
                                                         void *p_data);

add an item to an AVL Tree

The item added becomes owned by the AVL Tree, and will be freed by the free_handler argument given to raptor_new_avltree().

tree :

AVL Tree object

p_data :

pointer to data item

Returns :

0 on success, >0 if equivalent item exists (and the old element remains in the tree), <0 on failure

raptor_avltree_delete ()

int                 raptor_avltree_delete               (raptor_avltree *tree,
                                                         void *p_data);

Remove an item from an AVL Tree and free it

tree :

AVL Tree object

p_data :

pointer to data item

Returns :

non-0 on failure

raptor_avltree_print ()

int                 raptor_avltree_print                (raptor_avltree *tree,
                                                         FILE *stream);

Print the items in the tree in order to a stream (for debugging)

tree :

AVL Tree

stream :

stream to print to

Returns :

non-0 on failure

raptor_avltree_remove ()

void *              raptor_avltree_remove               (raptor_avltree *tree,
                                                         void *p_data);

Remove an item from an AVL Tree and return it

The item removed is no longer owned by the AVL Tree and is owned by the caller.

tree :

AVL Tree object

p_data :

pointer to data item

Returns :

object or NULL on failure or if not found

raptor_avltree_search ()

void *              raptor_avltree_search               (raptor_avltree *tree,
                                                         const void *p_data);

Find an item in an AVL Tree

tree :

AVL Tree object

p_data :

pointer to data item

Returns :

shared pointer to item (still owned by AVL Tree) or NULL on failure or if not found

raptor_avltree_set_print_handler ()

void                raptor_avltree_set_print_handler    (raptor_avltree *tree,
                                                         raptor_data_print_handler print_handler);

Set the handler for printing an item in a tree

tree :

AVL Tree object

print_handler :

print function

raptor_avltree_size ()

int                 raptor_avltree_size                 (raptor_avltree *tree);

Get the number of items in the AVL Tree

tree :

AVL Tree object

Returns :

number of items in tree

raptor_avltree_visit ()

int                 raptor_avltree_visit                (raptor_avltree *tree,
                                                         raptor_avltree_visit_handler visit_handler,
                                                         void *user_data);

Perform an in-order visit of the items in the AVL Tree

tree :

AVL Tree object

visit_handler :

visit function to call at each item

user_data :

user data pointer fo visit function

Returns :

non-0 if traversal was terminated early by visit_handler

raptor_avltree_iterator

typedef struct raptor_avltree_iterator_s raptor_avltree_iterator;

AVL Tree Iterator as created by raptor_new_avltree_iterator()


raptor_new_avltree_iterator ()

raptor_avltree_iterator * raptor_new_avltree_iterator   (raptor_avltree *tree,
                                                         void *range,
                                                         raptor_data_free_handler range_free_handler,
                                                         int direction);

Get an in-order iterator for the start of a range, or the entire contents

If range is NULL, the entire tree is walked in order. If range specifies a range (i.e. the tree comparison function will 'match' (return 0 for) range and /several/ nodes), the iterator will be placed at the leftmost child matching range, and raptor_avltree_iterator_next will iterate over all nodes (and only nodes) that match range.

tree :

raptor_avltree object

range :

range

range_free_handler :

function to free range object

direction :

<0 to go 'backwards' otherwise 'forwards'

Returns :

a new raptor_avltree_iterator object or NULL on failure

raptor_free_avltree_iterator ()

void                raptor_free_avltree_iterator        (raptor_avltree_iterator *iterator);

AVL Tree Iterator destructor

iterator :

AVL Tree iterator object

raptor_avltree_iterator_get ()

void *              raptor_avltree_iterator_get         (raptor_avltree_iterator *iterator);

Get current iteration object

iterator :

AVL Tree iterator object

Returns :

object or NULL if iteration is finished

raptor_avltree_iterator_is_end ()

int                 raptor_avltree_iterator_is_end      (raptor_avltree_iterator *iterator);

Test if an iteration is finished

iterator :

AVL Tree iterator object

Returns :

non-0 if iteration is finished

raptor_avltree_iterator_next ()

int                 raptor_avltree_iterator_next        (raptor_avltree_iterator *iterator);

Move iteration to next/prev object

iterator :

AVL Tree iterator object

Returns :

non-0 if iteration is finished

raptor_avltree_visit_handler ()

int                 (*raptor_avltree_visit_handler)     (int depth,
                                                         void *data,
                                                         void *user_data);

AVL Tree visitor function as given to raptor_avltree_visit()

depth :

depth of object in tree

data :

data object being visited

user_data :

user data arg to raptor_avltree_visit()

Returns :

non-0 to terminate visit early.
raptor2-2.0.15/docs/html/raptor2-section-world.html0000644000175000017500000011552612425347071017072 00000000000000 Initialisation

Initialisation

Initialisation — Library startup, shutdown and configuration.

Synopsis

typedef             raptor_world;
#define             raptor_new_world
int                 raptor_world_open                   (raptor_world *world);
void                raptor_free_world                   (raptor_world *world);
enum                raptor_world_flag;
int                 raptor_world_set_flag               (raptor_world *world,
                                                         raptor_world_flag flag,
                                                         int value);
int                 raptor_world_set_libxslt_security_preferences
                                                        (raptor_world *world,
                                                         void *security_preferences);
int                 raptor_world_set_log_handler        (raptor_world *world,
                                                         void *user_data,
                                                         raptor_log_handler handler);
const raptor_syntax_description * raptor_world_get_parser_description
                                                        (raptor_world *world,
                                                         unsigned int counter);
int                 raptor_world_is_parser_name         (raptor_world *world,
                                                         const char *name);
const char *        raptor_world_guess_parser_name      (raptor_world *world,
                                                         raptor_uri *uri,
                                                         const char *mime_type,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         const unsigned char *identifier);
const raptor_syntax_description * raptor_world_get_serializer_description
                                                        (raptor_world *world,
                                                         unsigned int counter);
int                 raptor_world_is_serializer_name     (raptor_world *world,
                                                         const char *name);
unsigned char *     raptor_world_generate_bnodeid       (raptor_world *world);
void                raptor_world_set_generate_bnodeid_handler
                                                        (raptor_world *world,
                                                         void *user_data,
                                                         raptor_generate_bnodeid_handler handler);
void                raptor_world_set_generate_bnodeid_parameters
                                                        (raptor_world *world,
                                                         char *prefix,
                                                         int base);
int                 raptor_world_get_parsers_count      (raptor_world *world);
int                 raptor_world_get_serializers_count  (raptor_world *world);

Description

How to initialise and terminate the library, set library-wide configuration flags and options.

Details

raptor_world

typedef struct raptor_world_s raptor_world;

Raptor world class.


raptor_new_world

#define raptor_new_world() raptor_new_world_internal(RAPTOR_VERSION)

Allocate a new raptor_world object.

Allocation of the world and initialization are decoupled to allow changing settings on the world object before init.

Settings and configuration of the world may be made after creating the object and before the world is initialized using methods such as raptor_world_set_flag(), raptor_world_set_log_handler(), raptor_world_set_generate_bnodeid_handler(). Some configuration may not be changed after initialization.

The raptor_world is initialized with raptor_world_open().

Returns :

uninitialized raptor_world object or NULL on failure

raptor_world_open ()

int                 raptor_world_open                   (raptor_world *world);

Initialise the raptor library.

Initializes a raptor_world object created by raptor_new_world(). Allocation and initialization are decoupled to allow changing settings on the world object before init.

The initialized world object is used with subsequent raptor API calls.

world :

raptor_world object

Returns :

non-0 on failure

raptor_free_world ()

void                raptor_free_world                   (raptor_world *world);

Terminate the raptor library.

Destroys the raptor_world object and all related information.

world :

raptor_world object

enum raptor_world_flag

typedef enum {
  RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE = 1,
  RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE = 2,
  RAPTOR_WORLD_FLAG_URI_INTERNING = 3,
  RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH = 4
} raptor_world_flag;

Raptor world flags

These are used by raptor_world_set_flags() to control raptor-wide options across classes. These must be set before raptor_world_open() is called explicitly or implicitly (by creating a raptor object). There is no enumeration function for these flags because they are not user options and must be set before the library is initialised. For similar reasons, there is no get function.

If any libxml handler saving/restoring is enabled, any existing handler and context is saved before parsing and restored afterwards. Otherwise, no saving/restoring is performed.

RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE

if set (non-0 value) - save/restore the libxml generic error handler when raptor library initializes (default set)

RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE

if set (non-0 value) - save/restore the libxml structured error handler when raptor library terminates (default set)

RAPTOR_WORLD_FLAG_URI_INTERNING

if set (non-0 value) - each URI is saved interned in-memory and reused (default set)

RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH

if set (non-0 value) the raptor will neither initialise or terminate the lower level WWW library. Usually in raptor initialising either curl_global_init (for libcurl) are called and in raptor cleanup, curl_global_cleanup is called. This flag allows the application finer control over these libraries such as setting other global options or potentially calling and terminating raptor several times. It does mean that applications which use this call must do their own extra work in order to allocate and free all resources to the system.

raptor_world_set_flag ()

int                 raptor_world_set_flag               (raptor_world *world,
                                                         raptor_world_flag flag,
                                                         int value);

Set library-wide configuration

This function is used to control raptor-wide options across classes. These options must be set before raptor_world_open() is called explicitly or implicitly (by creating a raptor object). There is no enumeration function for these flags because they are not user options and must be set before the library is initialised. For similar reasons, there is no get function.

See the raptor_world_flags documentation for full details of what the flags mean.

world :

world

flag :

flag

value :

value

Returns :

0 on success, non-0 on failure: <0 on errors (-1 if flag is unknown, -2 if value is illegal) and >0 if world is already opened

raptor_world_set_libxslt_security_preferences ()

int                 raptor_world_set_libxslt_security_preferences
                                                        (raptor_world *world,
                                                         void *security_preferences);

Set libxslt security preferences policy object

The security_preferences object will NOT become owned by raptor_world.

If libxslt is compiled into the library, security_preferences should be an xsltSecurityPrefsPtr and will be used to call xsltSetCtxtSecurityPrefs() when an XSLT engine is initialised. If security_preferences is NULL, this will disable all raptor's calls to xsltSetCtxtSecurityPrefs().

If libxslt is not compiled in, the object set here is not used.

world :

world

security_preferences :

security preferences (an xsltSecurityPrefsPtr) or NULL

Returns :

0 on success, non-0 on failure: <0 on errors and >0 if world is already opened

raptor_world_set_log_handler ()

int                 raptor_world_set_log_handler        (raptor_world *world,
                                                         void *user_data,
                                                         raptor_log_handler handler);

Set the message (error, warning, info) handling function.

The function will receive callbacks when messages are generated

world :

world object

user_data :

user data to pass to function

handler :

pointer to the function

Returns :

non-0 on failure

raptor_world_get_parser_description ()

const raptor_syntax_description * raptor_world_get_parser_description
                                                        (raptor_world *world,
                                                         unsigned int counter);

Get parser descriptive syntax information

world :

world object

counter :

index into the list of parsers

Returns :

description or NULL if counter is out of range

raptor_world_is_parser_name ()

int                 raptor_world_is_parser_name         (raptor_world *world,
                                                         const char *name);

Check the name of a parser is known.

world :

world object

name :

the syntax name

Returns :

non 0 if name is a known syntax name

raptor_world_guess_parser_name ()

const char *        raptor_world_guess_parser_name      (raptor_world *world,
                                                         raptor_uri *uri,
                                                         const char *mime_type,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         const unsigned char *identifier);

Guess a parser name for content.

Find a parser by scoring recognition of the syntax by a block of characters, the content identifier or a mime type. The content identifier is typically a filename or URI or some other identifier.

If the guessing finds only low scores, NULL will be returned.

world :

world object

uri :

URI identifying the syntax (or NULL)

mime_type :

mime type identifying the content (or NULL)

buffer :

buffer of content to guess (or NULL)

len :

length of buffer

identifier :

identifier of content (or NULL)

Returns :

a parser name or NULL if no guess could be made

raptor_world_get_serializer_description ()

const raptor_syntax_description * raptor_world_get_serializer_description
                                                        (raptor_world *world,
                                                         unsigned int counter);

Get serializer descriptive syntax information

world :

world object

counter :

index into the list of serializers

Returns :

description or NULL if counter is out of range

raptor_world_is_serializer_name ()

int                 raptor_world_is_serializer_name     (raptor_world *world,
                                                         const char *name);

Check name of a serializer.

world :

raptor_world object

name :

the syntax name

Returns :

non 0 if name is a known syntax name

raptor_world_generate_bnodeid ()

unsigned char *     raptor_world_generate_bnodeid       (raptor_world *world);

Generate an new blank node ID

world :

raptor_world object

Returns :

newly allocated generated ID or NULL on failure

raptor_world_set_generate_bnodeid_handler ()

void                raptor_world_set_generate_bnodeid_handler
                                                        (raptor_world *world,
                                                         void *user_data,
                                                         raptor_generate_bnodeid_handler handler);

Set the generate ID handler function.

Sets the function to generate IDs for the library. The handler is called with the user_data parameter.

The final argument of the callback method is user_bnodeid, the value of the rdf:nodeID attribute that the user provided if any (or NULL). It can either be returned directly as the generated value when present or modified. The passed in value must be free()d if it is not used.

If handler is NULL, the default method is used

world :

raptor_world world object

user_data :

user data pointer for callback

handler :

generate ID callback function

raptor_world_set_generate_bnodeid_parameters ()

void                raptor_world_set_generate_bnodeid_parameters
                                                        (raptor_world *world,
                                                         char *prefix,
                                                         int base);

Set default ID generation parameters.

Sets the parameters for the default algorithm used to generate IDs. The default algorithm uses both prefix and base to generate a new identifier. The exact identifier generated is not guaranteed to be a strict concatenation of prefix and base but will use both parts. The prefix parameter is copied to generate an ID.

For finer control of the generated identifiers, use raptor_world_set_generate_bnodeid_handler().

If prefix is NULL, the default prefix is used (currently "genid") If base is less than 1, it is initialised to 1.

world :

raptor_world object

prefix :

prefix string

base :

integer base identifier

raptor_world_get_parsers_count ()

int                 raptor_world_get_parsers_count      (raptor_world *world);

Get number of parsers

world :

world object

Returns :

number of parsers

raptor_world_get_serializers_count ()

int                 raptor_world_get_serializers_count  (raptor_world *world);

Get number of serializers

world :

world object

Returns :

number of serializers
raptor2-2.0.15/docs/html/raptor-formats-types-index.html0000644000175000017500000002704412425347071020136 00000000000000 MIME Types Index

MIME Types Index

application/atom+xml

  • Atom 1.0 Serializer (atom) with q 1.0

  • RSS Tag Soup Parser (rss-tag-soup) with q 0.3

application/json

  • RDF/JSON Resource-Centric Serializer (json) with q 1.0

  • RDF/JSON (either Triples or Resource-Centric) Parser (json) with q 0.1

  • RDF/JSON Triples Serializer (json-triples) with q 0.0

application/n-triples

  • N-Triples Parser (ntriples) with q 1.0

  • N-Triples Serializer (ntriples) with q 1.0

application/rdf+n3

  • Turtle Terse RDF Triple Language Parser (turtle) with q 0.3

  • Turtle Terse RDF Triple Language Serializer (turtle) with q 0.3

application/rdf+xml

  • RDF/XML Parser (rdfxml) with q 1.0

  • RDF/XML Serializer (rdfxml) with q 1.0

  • RDF/XML (XMP Profile) Serializer (rdfxml-xmp) with q 0.0

  • RDF/XML (Abbreviated) Serializer (rdfxml-abbrev) with q 0.0

application/rss

  • RSS Tag Soup Parser (rss-tag-soup) with q 0.8

  • RSS 1.0 Serializer (rss-1.0) with q 0.3

application/rss+xml

  • RSS 1.0 Serializer (rss-1.0) with q 1.0

  • RSS Tag Soup Parser (rss-tag-soup) with q 0.8

application/turtle

  • Turtle Terse RDF Triple Language Parser (turtle) with q 1.0

  • Turtle Terse RDF Triple Language Serializer (turtle) with q 1.0

application/x-trig

  • TriG - Turtle with Named Graphs Parser (trig) with q 1.0

  • No serializer.

application/x-turtle

  • Turtle Terse RDF Triple Language Parser (turtle) with q 1.0

  • Turtle Terse RDF Triple Language Serializer (turtle) with q 0.8

application/xhtml+xml

  • HTML Table Serializer (html) with q 1.0

  • RDF/A via librdfa Parser (rdfa) with q 0.8

  • Gleaning Resource Descriptions from Dialects of Languages Parser (grddl) with q 0.4

application/xml

  • RSS Tag Soup Parser (rss-tag-soup) with q 0.3

  • RSS 1.0 Serializer (rss-1.0) with q 0.3

text/html

  • HTML Table Serializer (html) with q 1.0

  • RDF/A via librdfa Parser (rdfa) with q 0.6

  • Gleaning Resource Descriptions from Dialects of Languages Parser (grddl) with q 0.2

text/json

  • RDF/JSON (either Triples or Resource-Centric) Parser (json) with q 0.1

  • RDF/JSON Triples Serializer (json-triples) with q 0.1

  • RDF/JSON Resource-Centric Serializer (json) with q 0.1

text/n3

  • Turtle Terse RDF Triple Language Parser (turtle) with q 0.3

  • Turtle Terse RDF Triple Language Serializer (turtle) with q 0.3

text/plain

  • N-Triples Parser (ntriples) with q 0.1

  • N-Triples Serializer (ntriples) with q 0.1

text/rdf

  • RDF/XML Parser (rdfxml) with q 0.6

  • RDF/XML Serializer (rdfxml) with q 0.6

text/rdf+n3

  • Turtle Terse RDF Triple Language Parser (turtle) with q 0.3

  • Turtle Terse RDF Triple Language Serializer (turtle) with q 0.3

text/rss

  • RSS Tag Soup Parser (rss-tag-soup) with q 0.8

  • RSS 1.0 Serializer (rss-1.0) with q 0.3

text/turtle

  • Turtle Terse RDF Triple Language Parser (turtle) with q 1.0

  • Turtle Terse RDF Triple Language Serializer (turtle) with q 1.0

text/x-graphviz

  • GraphViz DOT format Serializer (dot) with q 0.5

  • No parser.

text/x-nquads

  • N-Quads Parser (nquads) with q 1.0

  • N-Quads Serializer (nquads) with q 1.0

text/xml

  • RSS Tag Soup Parser (rss-tag-soup) with q 0.3

  • RSS 1.0 Serializer (rss-1.0) with q 0.3

raptor2-2.0.15/docs/html/serializer-ntriples.html0000644000175000017500000000425212425347071016712 00000000000000 N-Triples serializer - default (name ntriples)

N-Triples serializer - default (name ntriples)

A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.

raptor2-2.0.15/docs/html/tutorial-serializer-declare-namespace.html0000644000175000017500000000661312425347071022247 00000000000000 Declare namespaces

Declare namespaces

Raptor can use namespace prefix/URIs to abbreviate syntax in some syntaxes such as Turtle or any XML syntax including RDF/XML, RSS1.0 and Atom 1.0. These are declared with raptor_serializer_set_namespace() using a prefix and URI argument pair like this:

  const unsigned char* prefix = "ex";
  raptor_uri* uri = raptor_new_uri(world, "http://example.org");

  raptor_serializer_set_namespace(rdf_serializer, prefix, uri);

or raptor_serializer_set_namespace_from_namespace() from an existing namespace. This can be useful when connected up the the namespace declarations that are generated from a parser via a namespace handler set with raptor_parser_set_namespace_handler()

like this:
  static void
  relay_namespaces(void* user_data, raptor_namespace *nspace)
  {
    raptor_serializer_set_namespace_from_namespace(rdf_serializer, nspace);
  }

  ...

  rdf_parser = raptor_new_parser(world, syntax_name);
  raptor_parser_set_namespace_handler(rdf_parser, rdf_serializer, relay_namespaces);
raptor2-2.0.15/docs/html/tutorial-parser-set-error-warning-handlers.html0000644000175000017500000000621112425347071023216 00000000000000 Set parsing log message handlers

Set parsing log message handlers

Any time before parsing is called, a log handler can be set on the world object via the raptor_world_set_log_handler() method to report errors and warnings from parsing. The method takes a user data argument plus a handler callback of type raptor_log_handler with a signature that looks like this:

void
message_handler(void *user_data, raptor_log_message* message)
{
  /* do something with the message */
}

The handler gets the user data pointer as well as a raptor_log_handler pointer that includes associated location information, such as the log level, raptor_locator, and the log message itself. The locator structure contains full information on the details of where in the file or URI the message occurred.

raptor2-2.0.15/docs/html/serializer-rdfxml-xmp.html0000644000175000017500000000410112425347071017141 00000000000000 RDF/XML (XMP Profile) serializer (name rdfxml-xmp)

RDF/XML (XMP Profile) serializer (name rdfxml-xmp)

A serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Embedding means that the XML header is omitted, wheras for other XML serializings, it is always emitted.

raptor2-2.0.15/docs/html/tutorial-parser-abort.html0000644000175000017500000000432112425347071017142 00000000000000 Aborting parsing

Aborting parsing

raptor_parser_parse_abort() allows the current parsing to be aborted, at which point no further triples will be passed to callbacks and the parser will attempt to return control to the application. This is most useful when called inside a handler function which allows the application to decide to stop an active parsing.

raptor2-2.0.15/docs/html/raptor2-section-uri.html0000644000175000017500000023345412425347071016543 00000000000000 URI

URI

URI — URI class and relative URI computation

Synopsis

typedef             raptor_uri;
raptor_uri *        raptor_new_uri                      (raptor_world *world,
                                                         const unsigned char *uri_string);
raptor_uri *        raptor_new_uri_from_counted_string  (raptor_world *world,
                                                         const unsigned char *uri_string,
                                                         size_t length);
raptor_uri *        raptor_new_uri_from_uri_local_name  (raptor_world *world,
                                                         raptor_uri *uri,
                                                         const unsigned char *local_name);
raptor_uri *        raptor_new_uri_from_uri_or_file_string
                                                        (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *uri_or_file_string);
raptor_uri *        raptor_new_uri_relative_to_base     (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *uri_string);
raptor_uri *        raptor_new_uri_relative_to_base_counted
                                                        (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *uri_string,
                                                         size_t uri_len);
raptor_uri *        raptor_new_uri_from_id              (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *id);
raptor_uri *        raptor_new_uri_for_rdf_concept      (raptor_world *world,
                                                         const unsigned char *name);
raptor_uri *        raptor_new_uri_for_xmlbase          (raptor_uri *old_uri);
raptor_uri *        raptor_new_uri_for_retrieval        (raptor_uri *old_uri);
void                raptor_free_uri                     (raptor_uri *uri);
int                 raptor_uri_compare                  (raptor_uri *uri1,
                                                         raptor_uri *uri2);
int                 raptor_uri_equals                   (raptor_uri *uri1,
                                                         raptor_uri *uri2);
raptor_uri *        raptor_uri_copy                     (raptor_uri *uri);
unsigned char *     raptor_uri_as_string                (raptor_uri *uri);
unsigned char *     raptor_uri_as_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);
unsigned char *     raptor_uri_to_relative_counted_uri_string
                                                        (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri,
                                                         size_t *length_p);
unsigned char *     raptor_uri_to_relative_uri_string   (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri);
unsigned char *     raptor_uri_to_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);
unsigned char *     raptor_uri_to_string                (raptor_uri *uri);
size_t              raptor_uri_resolve_uri_reference    (const unsigned char *base_uri,
                                                         const unsigned char *reference_uri,
                                                         unsigned char *buffer,
                                                         size_t length);
unsigned char *     raptor_uri_counted_filename_to_uri_string
                                                        (const char *filename,
                                                         size_t filename_len);
unsigned char *     raptor_uri_filename_to_uri_string   (const char *filename);
int                 raptor_uri_uri_string_is_absolute   (const unsigned char *uri_string);
int                 raptor_uri_uri_string_is_file_uri   (const unsigned char *uri_string);
char *              raptor_uri_uri_string_to_filename   (const unsigned char *uri_string);
char *              raptor_uri_uri_string_to_filename_fragment
                                                        (const unsigned char *uri_string,
                                                         unsigned char **fragment_p);
char *              raptor_uri_uri_string_to_counted_filename_fragment
                                                        (const unsigned char *uri_string,
                                                         size_t *len_p,
                                                         unsigned char **fragment_p,
                                                         size_t *fragment_len_p);
int                 raptor_uri_print                    (const raptor_uri *uri,
                                                         FILE *stream);
raptor_world *      raptor_uri_get_world                (raptor_uri *uri);
int                 raptor_uri_write                    (raptor_uri *uri,
                                                         raptor_iostream *iostr);
int                 raptor_uri_file_exists              (raptor_uri *uri);
int                 raptor_uri_filename_exists          (const unsigned char *path);
unsigned char *     raptor_uri_to_turtle_counted_string (raptor_world *world,
                                                         raptor_uri *uri,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri,
                                                         size_t *len_p);
unsigned char *     raptor_uri_to_turtle_string         (raptor_world *world,
                                                         raptor_uri *uri,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);
int                 raptor_uri_turtle_write             (raptor_world *world,
                                                         raptor_iostream *iostr,
                                                         raptor_uri *uri,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);

Description

A class for absolute URIs used inside raptor and relative URI computation utility functions used inside the main Redland librdf_uri class. Only absolute URIs are provided, with no current access to internals of URIs such as URI scheme, path, authority.

Details

raptor_uri

raptor_uri* raptor_uri;

Raptor URI Class.


raptor_new_uri ()

raptor_uri *        raptor_new_uri                      (raptor_world *world,
                                                         const unsigned char *uri_string);

Constructor - create a raptor URI from a UTF-8 encoded Unicode string.

world :

raptor_world object

uri_string :

URI string.

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_from_counted_string ()

raptor_uri *        raptor_new_uri_from_counted_string  (raptor_world *world,
                                                         const unsigned char *uri_string,
                                                         size_t length);

Constructor - create a raptor URI from a UTF-8 encoded Unicode string.

Note: The uri_string need not be NULL terminated - a NULL will be added to the copied string used.

world :

raptor_world object

uri_string :

URI string.

length :

length of URI string

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_from_uri_local_name ()

raptor_uri *        raptor_new_uri_from_uri_local_name  (raptor_world *world,
                                                         raptor_uri *uri,
                                                         const unsigned char *local_name);

Constructor - create a raptor URI from an existing URI and a local name.

Creates a new URI from the concatenation of the local_name to the uri. This is NOT relative URI resolution, which is done by the raptor_new_uri_relative_to_base() constructor.

world :

raptor_world object

uri :

existing raptor_uri

local_name :

local name

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_from_uri_or_file_string ()

raptor_uri *        raptor_new_uri_from_uri_or_file_string
                                                        (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *uri_or_file_string);

Constructor - create a raptor URI from a string that is a relative or absolute URI or a filename

If the uri_or_file_string is a filename PATH that exists, the result will be a URI file://PATH

world :

raptor_world object

base_uri :

existing base URI

uri_or_file_string :

URI string or filename

Returns :

a new raptor_uri object or NULL on failure

raptor_new_uri_relative_to_base ()

raptor_uri *        raptor_new_uri_relative_to_base     (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *uri_string);

Constructor - create a raptor URI from a base URI and a relative URI string.

Use raptor_new_uri_relative_to_base_counted() if the URI string length is known

world :

raptor_world object

base_uri :

existing base URI

uri_string :

relative URI string

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_relative_to_base_counted ()

raptor_uri *        raptor_new_uri_relative_to_base_counted
                                                        (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *uri_string,
                                                         size_t uri_len);

Constructor - create a raptor URI from a base URI and a relative counted URI string.

world :

raptor_world object

base_uri :

existing base URI

uri_string :

relative URI string

uri_len :

length of URI string (or 0)

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_from_id ()

raptor_uri *        raptor_new_uri_from_id              (raptor_world *world,
                                                         raptor_uri *base_uri,
                                                         const unsigned char *id);

Constructor - create a new URI from a base URI and RDF ID.

This creates a URI equivalent to concatenating base_uri with ## and id.

world :

raptor_world object

base_uri :

existing base URI

id :

RDF ID

Returns :

a new raptor_uri object or NULL on failure.

raptor_new_uri_for_rdf_concept ()

raptor_uri *        raptor_new_uri_for_rdf_concept      (raptor_world *world,
                                                         const unsigned char *name);

Constructor - create a raptor URI for the RDF namespace concept name.

Example: u=raptor_new_uri_for_rdf_concept("value") creates a new URI for the rdf:value term.

world :

raptor_world object

name :

RDF namespace concept

Returns :

a new raptor_uri object or NULL on failure

raptor_new_uri_for_xmlbase ()

raptor_uri *        raptor_new_uri_for_xmlbase          (raptor_uri *old_uri);

Constructor - create a URI suitable for use as an XML Base.

Takes an existing URI and ensures it has a path (default /) and has no fragment or query arguments - XML base does not use these.

old_uri :

URI to transform

Returns :

new raptor_uri object or NULL on failure.

raptor_new_uri_for_retrieval ()

raptor_uri *        raptor_new_uri_for_retrieval        (raptor_uri *old_uri);

Constructor - create a URI suitable for retrieval.

Takes an existing URI and ensures it has a path (default /) and has no fragment - URI retrieval does not use the fragment part.

old_uri :

URI to transform

Returns :

new raptor_uri object or NULL on failure.

raptor_free_uri ()

void                raptor_free_uri                     (raptor_uri *uri);

Destructor - destroy a raptor_uri object

uri :

URI to destroy

raptor_uri_compare ()

int                 raptor_uri_compare                  (raptor_uri *uri1,
                                                         raptor_uri *uri2);

Compare two URIs, ala strcmp.

A NULL URI is always less than (never equal to) a non-NULL URI.

uri1 :

URI 1 (may be NULL)

uri2 :

URI 2 (may be NULL)

Returns :

-1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2

raptor_uri_equals ()

int                 raptor_uri_equals                   (raptor_uri *uri1,
                                                         raptor_uri *uri2);

Check if two URIs are equal.

A NULL URI is not equal to a non-NULL URI.

uri1 :

URI 1 (may be NULL)

uri2 :

URI 2 (may be NULL)

Returns :

non-0 if the URIs are equal

raptor_uri_copy ()

raptor_uri *        raptor_uri_copy                     (raptor_uri *uri);

Constructor - get a copy of a URI.

uri :

URI object

Returns :

a new raptor_uri object or NULL on failure

raptor_uri_as_string ()

unsigned char *     raptor_uri_as_string                (raptor_uri *uri);

Get a string representation of a URI.

Returns a shared pointer to a string representation of uri. This string is shared and must not be freed, otherwise see use the raptor_uri_to_string() or raptor_uri_to_counted_string() methods.

uri :

raptor_uri object

Returns :

shared string representation of URI

raptor_uri_as_counted_string ()

unsigned char *     raptor_uri_as_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);

Get a string representation of a URI with count.

Returns a shared pointer to a string representation of uri along with the length of the string in len_p, if not NULL. This string is shared and must not be freed, otherwise see use the raptor_uri_to_string() or raptor_uri_to_counted_string() methods.

uri :

URI object

len_p :

address of length variable or NULL

Returns :

shared string representation of URI

raptor_uri_to_relative_counted_uri_string ()

unsigned char *     raptor_uri_to_relative_counted_uri_string
                                                        (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri,
                                                         size_t *length_p);

Get the counted relative URI string of a URI against a base URI.

base_uri :

The base absolute URI to resolve against (or NULL)

reference_uri :

The reference absolute URI to use

length_p :

Location to store the length of the relative URI string or NULL

Returns :

A newly allocated relative URI string or NULL on failure

raptor_uri_to_relative_uri_string ()

unsigned char *     raptor_uri_to_relative_uri_string   (raptor_uri *base_uri,
                                                         raptor_uri *reference_uri);

Get the relative URI string of a URI against a base URI.

base_uri :

The base absolute URI to resolve against

reference_uri :

The reference absolute URI to use

Returns :

A newly allocated relative URI string or NULL on failure

raptor_uri_to_counted_string ()

unsigned char *     raptor_uri_to_counted_string        (raptor_uri *uri,
                                                         size_t *len_p);

Get a new counted string for a URI.

If len_p is not NULL, the length of the string is stored in it.

The memory allocated must be freed by the caller and raptor_free_memory() should be used for best portability.

uri :

raptor_uri object

len_p :

Pointer to length (or NULL)

Returns :

new string or NULL on failure

raptor_uri_to_string ()

unsigned char *     raptor_uri_to_string                (raptor_uri *uri);

Get a new string for a URI.

The memory allocated must be freed by the caller and raptor_free_memory() should be used for best portability.

uri :

raptor_uri object

Returns :

new string or NULL on failure

raptor_uri_resolve_uri_reference ()

size_t              raptor_uri_resolve_uri_reference    (const unsigned char *base_uri,
                                                         const unsigned char *reference_uri,
                                                         unsigned char *buffer,
                                                         size_t length);

Resolve a URI against a base URI to create a new absolute URI.

base_uri :

Base URI string

reference_uri :

Reference URI string

buffer :

Destination URI output buffer

length :

Length of destination output buffer

Returns :

length of resolved string or 0 on failure (such as buffer too small)

raptor_uri_counted_filename_to_uri_string ()

unsigned char *     raptor_uri_counted_filename_to_uri_string
                                                        (const char *filename,
                                                         size_t filename_len);

Converts a counted filename to a file: URI.

Handles the OS-specific escaping on turning filenames into URIs and returns a new buffer that the caller must free(). Turns a space in the filename into %20 and '%' into %25.

filename :

The filename to convert

filename_len :

length of filename or 0 to count it here

Returns :

A newly allocated string with the URI or NULL on failure

raptor_uri_filename_to_uri_string ()

unsigned char *     raptor_uri_filename_to_uri_string   (const char *filename);

Converts a filename to a file: URI.

Handles the OS-specific escaping on turning filenames into URIs and returns a new buffer that the caller must free(). Turns a space in the filename into %20 and '%' into %25.

filename :

The filename to convert

Returns :

A newly allocated string with the URI or NULL on failure

raptor_uri_uri_string_is_absolute ()

int                 raptor_uri_uri_string_is_absolute   (const unsigned char *uri_string);

Check if a uri string is an absolute URI

uri_string :

uri to check write

Returns :

>0 if absolute, 0 if not, < 0 on failure

raptor_uri_uri_string_is_file_uri ()

int                 raptor_uri_uri_string_is_file_uri   (const unsigned char *uri_string);

Check if a URI string is a file: URI.

uri_string :

The URI string to check

Returns :

Non zero if URI string is a file: URI

raptor_uri_uri_string_to_filename ()

char *              raptor_uri_uri_string_to_filename   (const unsigned char *uri_string);

Convert a file: URI to a filename.

Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free.

See also raptor_uri_uri_string_to_counted_filename_fragment()

uri_string :

The file: URI to convert

Returns :

A newly allocated string with the filename or NULL on failure

raptor_uri_uri_string_to_filename_fragment ()

char *              raptor_uri_uri_string_to_filename_fragment
                                                        (const unsigned char *uri_string,
                                                         unsigned char **fragment_p);

Convert a file: URI to a filename and fragment.

Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free.

If fragment_p is given, a new string containing the URI fragment is returned, or NULL if none is present

See also raptor_uri_uri_string_to_counted_filename_fragment()

uri_string :

The file: URI to convert

fragment_p :

Address of pointer to store any URI fragment or NULL

Returns :

A newly allocated string with the filename or NULL on failure

raptor_uri_uri_string_to_counted_filename_fragment ()

char *              raptor_uri_uri_string_to_counted_filename_fragment
                                                        (const unsigned char *uri_string,
                                                         size_t *len_p,
                                                         unsigned char **fragment_p,
                                                         size_t *fragment_len_p);

Convert a file: URI to a counted filename and counted fragment.

Handles the OS-specific file: URIs to filename mappings. Returns a new buffer containing the filename that the caller must free.

If len_p is present the length of the filename is returned

If fragment_p is given, a new string containing the URI fragment is returned, or NULL if none is present. If fragment_len_p is present the length is returned in it.

uri_string :

The file: URI to convert

len_p :

address of filename length variable or NULL

fragment_p :

Address of pointer to store any URI fragment or NULL

fragment_len_p :

address of length variable or NULL

Returns :

A newly allocated string with the filename or NULL on failure

raptor_uri_print ()

int                 raptor_uri_print                    (const raptor_uri *uri,
                                                         FILE *stream);

Print a URI to a file handle.

uri :

URI to print

stream :

The file handle to print to

Returns :

non-0 on failure

raptor_uri_get_world ()

raptor_world *      raptor_uri_get_world                (raptor_uri *uri);

Get the raptor_world object associated with a raptor_uri.

uri :

raptor_uri object

Returns :

raptor_world object

raptor_uri_write ()

int                 raptor_uri_write                    (raptor_uri *uri,
                                                         raptor_iostream *iostr);

Write a raptor URI to the iostream.

uri :

URI

iostr :

raptor iostream

Returns :

non-0 on failure

raptor_uri_file_exists ()

int                 raptor_uri_file_exists              (raptor_uri *uri);

Check if a file: URI is a file that exists

uri :

URI string

Returns :

> 0 if file exists, 0 if does not exist, < 0 if not a file URI or error

raptor_uri_filename_exists ()

int                 raptor_uri_filename_exists          (const unsigned char *path);

Check if path points to a file that exists

path :

file path

Returns :

> 0 if file exists, 0 if does not exist, < 0 on error

raptor_uri_to_turtle_counted_string ()

unsigned char *     raptor_uri_to_turtle_counted_string (raptor_world *world,
                                                         raptor_uri *uri,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri,
                                                         size_t *len_p);

Convert raptor_uri to a string. Caller has responsibility to free the string.

Note: This creates and destroys several internal objects for each call so for more efficient writing, create a turtle serializer.

world :

world

uri :

uri

nstack :

namespace stack

base_uri :

base URI

len_p :

Pointer to location to store length of new string (if not NULL)

Returns :

the new string or NULL on failure. The length of the new string is returned in *len_p if len_p is not NULL.

raptor_uri_to_turtle_string ()

unsigned char *     raptor_uri_to_turtle_string         (raptor_world *world,
                                                         raptor_uri *uri,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);

Convert raptor_uri to a string. Caller has responsibility to free the string.

Note: This creates and destroys several internal objects for each call so for more efficient writing, create a turtle serializer.

world :

world

uri :

uri

nstack :

namespace stack

base_uri :

base URI

Returns :

the new string or NULL on failure.

raptor_uri_turtle_write ()

int                 raptor_uri_turtle_write             (raptor_world *world,
                                                         raptor_iostream *iostr,
                                                         raptor_uri *uri,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_uri *base_uri);

Write raptor_uri to a stream in turtle syntax (using QNames).

Note: This creates and destroys several internal objects for each call so for more efficient writing, create a turtle serializer.

world :

world

iostr :

iostream for writing

uri :

uri

nstack :

namespace stack

base_uri :

base URI

Returns :

non-0 on failure
raptor2-2.0.15/docs/html/raptor-parsers.html0000644000175000017500000000761412425347071015674 00000000000000 Parsers in Raptor (syntax to triples)

Parsers in Raptor (syntax to triples)

Introduction

This section describes the parsers that can be compiled into Raptor and their options. The exact parsers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_world_get_parser_description function

The options that may be set on parsers can also be queried at run-time with the raptor_world_get_option_description function.

raptor2-2.0.15/docs/html/tutorial-parser-content.html0000644000175000017500000002120412425347071017504 00000000000000 Provide syntax content to parse

Provide syntax content to parse

The operation of turning syntax into RDF triples has several alternatives from functions that do most of the work starting from a URI to functions that allow passing in data buffers.

Parsing and MIME Types

The mime type of the retrieved content is not used to choose a parser unless the parser is of type guess. The guess parser will send an Accept: header for all known parser syntax mime types (if a URI request is made) and based on the response, including the identifiers used, pick the appropriate parser to execute. See raptor_world_guess_parser_name() for a full discussion of the inputs to the guessing.

Parse the content from a URI (raptor_parser_parse_uri())

The URI is resolved and the content read from it and passed to the parser:

  raptor_parser_parse_uri(rdf_parser, uri, base_uri);

The base_uri is optional (can be NULL) and will default to the uri.

Parse the content of a URI using an existing WWW connection (raptor_parser_parse_uri_with_connection())

The URI is resolved using an existing WWW connection (for example a libcurl CURL handle) to allow for any existing WWW configuration to be reused. See raptor_new_www_with_connection for full details of how this works. The content is then read from the result of resolving the URI:

  raptor_parser_parse_uri_with_connection(rdf_parser, uri, base_uri, connection);

The base_uri is optional (can be NULL) and will default to the uri.

Parse the content of a C FILE* (raptor_parser_parse_file_stream())

Parsing can read from a C STDIO file handle:

  stream = fopen(filename, "rb");
  raptor_parser_parse_file_stream(rdf_parser, stream, filename, base_uri);
  fclose(stream);

This function can use take an optional filename which is used in locator error messages. The base_uri may be required by some parsers and if NULL will cause the parsing to fail. This requirement can be checked by looking at the flags in the parser description using raptor_world_get_parser_description().

Parse the content of a file URI (raptor_parser_parse_file())

Parsing can read from a URI known to be a file: URI:

  raptor_parser_parse_file(rdf_parser, file_uri, base_uri);

This function requires that the file_uri is a file URI, that is raptor_uri_uri_string_is_file_uri( raptor_uri_as_string( file_uri) ) must be true. The base_uri may be required by some parsers and if NULL will cause the parsing to fail.

Parse chunks of syntax content provided by the application (raptor_parser_parse_start() and raptor_parser_parse_chunk())

  raptor_parser_parse_start(rdf_parser, base_uri);
  while(/* not finished getting content */) {
    unsigned char *buffer;
    size_t buffer_len;

    /* ... obtain some syntax content in buffer of size buffer_len bytes ... */

    raptor_parser_parse_chunk(rdf_parser, buffer, buffer_len, 0);
  }
  raptor_parser_parse_chunk(rdf_parser, NULL, 0, 1); /* no data and is_end = 1 */

The base_uri argument to raptor_parser_parse_start() may be required by some parsers and if NULL will cause the parsing to fail.

On the last raptor_parser_parse_chunk() call, or after the loop is ended, the is_end parameter must be set to non-0. Content can be passed with the final call. If no content is present at the end (such as in some kind of end of file situation), then a 0-length buffer_len or NULL buffer can be used.

The minimal case is an entire parse in one chunk as follows:

  raptor_parser_parse_start(rdf_parser, base_uri);
  raptor_parser_parse_chunk(rdf_parser, buffer, buffer_len, 1); /* is_end = 1 */
raptor2-2.0.15/docs/html/raptor2-changes-2-0-4-to-2-0-5.html0000644000175000017500000000706612425347071017423 00000000000000 Changes between raptor2 2.0.4 and 2.0.5

Changes between raptor2 2.0.4 and 2.0.5

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/raptor2-section-xml.html0000644000175000017500000022350012425347071016533 00000000000000 XML

XML

XML — XML and XML Writer

Synopsis

typedef             raptor_xml_element;
raptor_xml_element * raptor_new_xml_element             (raptor_qname *name,
                                                         const unsigned char *xml_language,
                                                         raptor_uri *xml_base);
raptor_xml_element * raptor_new_xml_element_from_namespace_local_name
                                                        (raptor_namespace *ns,
                                                         const unsigned char *name,
                                                         const unsigned char *xml_language,
                                                         raptor_uri *xml_base);
void                raptor_free_xml_element             (raptor_xml_element *element);
raptor_qname *      raptor_xml_element_get_name         (raptor_xml_element *xml_element);
raptor_qname **     raptor_xml_element_get_attributes   (raptor_xml_element *xml_element);
int                 raptor_xml_element_get_attributes_count
                                                        (raptor_xml_element *xml_element);
void                raptor_xml_element_set_attributes   (raptor_xml_element *xml_element,
                                                         raptor_qname **attributes,
                                                         int count);
int                 raptor_xml_element_declare_namespace
                                                        (raptor_xml_element *xml_element,
                                                         raptor_namespace *nspace);
int                 raptor_xml_element_is_empty         (raptor_xml_element *xml_element);
const unsigned char * raptor_xml_element_get_language   (raptor_xml_element *xml_element);
int                 raptor_xml_element_write            (raptor_xml_element *element,
                                                         raptor_namespace_stack *nstack,
                                                         int is_empty,
                                                         int is_end,
                                                         int depth,
                                                         raptor_iostream *iostr);
raptor_xml_writer * raptor_new_xml_writer               (raptor_world *world,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_iostream *iostr);
void                raptor_free_xml_writer              (raptor_xml_writer *xml_writer);
void                raptor_xml_writer_empty_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);
void                raptor_xml_writer_start_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);
void                raptor_xml_writer_end_element       (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);
void                raptor_xml_writer_cdata             (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s);
void                raptor_xml_writer_cdata_counted     (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s,
                                                         unsigned int len);
void                raptor_xml_writer_raw               (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s);
void                raptor_xml_writer_raw_counted       (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s,
                                                         unsigned int len);
void                raptor_xml_writer_comment           (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s);
void                raptor_xml_writer_comment_counted   (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s,
                                                         unsigned int len);
void                raptor_xml_writer_flush             (raptor_xml_writer *xml_writer);
void                raptor_xml_writer_newline           (raptor_xml_writer *xml_writer);
int                 raptor_xml_writer_get_depth         (raptor_xml_writer *xml_writer);
int                 raptor_xml_writer_set_option        (raptor_xml_writer *xml_writer,
                                                         raptor_option option,
                                                         char *string,
                                                         int integer);
int                 raptor_xml_writer_get_option        (raptor_xml_writer *xml_writer,
                                                         raptor_option option,
                                                         char **string_p,
                                                         int *integer_p);
typedef             raptor_xml_writer;
int                 raptor_xml_escape_string_any        (raptor_world *world,
                                                         const unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote,
                                                         int xml_version);
int                 raptor_xml_escape_string_any_write  (const unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         int xml_version,
                                                         raptor_iostream *iostr);
int                 raptor_xml_escape_string            (raptor_world *world,
                                                         const unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote);
int                 raptor_xml_escape_string_write      (const unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         raptor_iostream *iostr);
int                 raptor_xml_name_check               (const unsigned char *string,
                                                         size_t length,
                                                         int xml_version);

Description

XML elements with optional attributes and an XML Writer class that can format raptor_xml_element into output forms, with optional "pretty printing" features such as indenting and collapsing empty elements.

Also includes a utility function raptor_xml_name_check for checking a name is legal in some XML version.

Details

raptor_xml_element

raptor_xml_element* raptor_xml_element;

Raptor XML Element class


raptor_new_xml_element ()

raptor_xml_element * raptor_new_xml_element             (raptor_qname *name,
                                                         const unsigned char *xml_language,
                                                         raptor_uri *xml_base);

Constructor - create a new XML element from a QName

name :

The XML element name

xml_language :

the in-scope XML language (or NULL)

xml_base :

the in-scope XML base URI (or NULL)

Returns :

a new raptor_xml_element or NULL on failure

raptor_new_xml_element_from_namespace_local_name ()

raptor_xml_element * raptor_new_xml_element_from_namespace_local_name
                                                        (raptor_namespace *ns,
                                                         const unsigned char *name,
                                                         const unsigned char *xml_language,
                                                         raptor_uri *xml_base);

Constructor - create a new XML element from an XML namespace and a local name

Added in 1.4.16.

ns :

namespace

name :

the XML element local name

xml_language :

the in-scope XML language (or NULL)

xml_base :

base uri (or NULL)

Returns :

a new raptor_xml_element or NULL on failure

raptor_free_xml_element ()

void                raptor_free_xml_element             (raptor_xml_element *element);

Destructor - destroy a raptor_xml_element object.

element :

XML Element

raptor_xml_element_get_name ()

raptor_qname *      raptor_xml_element_get_name         (raptor_xml_element *xml_element);

Get the XML Name of an XML element

xml_element :

XML Element

Returns :

The Name.

raptor_xml_element_get_attributes ()

raptor_qname **     raptor_xml_element_get_attributes   (raptor_xml_element *xml_element);

Get the array of attributes on the XML element.

Use raptor_xml_element_get_attributes_count() to get the count of the array size.

xml_element :

XML Element

Returns :

the array of qnames or NULL if none are present.

raptor_xml_element_get_attributes_count ()

int                 raptor_xml_element_get_attributes_count
                                                        (raptor_xml_element *xml_element);

Get the number of attributes on the XML element.

xml_element :

XML Element

Returns :

Integer number of attributes - 0 or more.

raptor_xml_element_set_attributes ()

void                raptor_xml_element_set_attributes   (raptor_xml_element *xml_element,
                                                         raptor_qname **attributes,
                                                         int count);

Set the attributes on an XML element.

The attributes array becomes owned by the element after this function.

xml_element :

XML Element

attributes :

Array of XML Qname attributes with values

count :

Length of array

raptor_xml_element_declare_namespace ()

int                 raptor_xml_element_declare_namespace
                                                        (raptor_xml_element *xml_element,
                                                         raptor_namespace *nspace);

Declare a namespace on the XML Element.

xml_element :

XML Element

nspace :

raptor_namespace to declare

Returns :

non-0 if namespace cannot be declared

raptor_xml_element_is_empty ()

int                 raptor_xml_element_is_empty         (raptor_xml_element *xml_element);

Check if an XML Element is empty.

xml_element :

XML Element

Returns :

non-0 if the element is empty.

raptor_xml_element_get_language ()

const unsigned char * raptor_xml_element_get_language   (raptor_xml_element *xml_element);

Get the XML language of the element.

xml_element :

XML Element

Returns :

XML language or NULL if none in scope

raptor_xml_element_write ()

int                 raptor_xml_element_write            (raptor_xml_element *element,
                                                         raptor_namespace_stack *nstack,
                                                         int is_empty,
                                                         int is_end,
                                                         int depth,
                                                         raptor_iostream *iostr);

Write a formatted XML element to a raptor_iostream

element :

XML element to format

nstack :

Namespace stack context to use in formatting

is_empty :

non-0 if element is empty

is_end :

non-0 if this is an end element (else is a start element)

depth :

XML element depth

iostr :

iostream object

Returns :

non-0 on failure

raptor_new_xml_writer ()

raptor_xml_writer * raptor_new_xml_writer               (raptor_world *world,
                                                         raptor_namespace_stack *nstack,
                                                         raptor_iostream *iostr);

Constructor - Create a new XML Writer writing XML to a raptor_iostream

world :

raptor_world object

nstack :

Namespace stack for the writer to start with (or NULL)

iostr :

I/O stream to write to

Returns :

a new raptor_xml_writer object or NULL on failure

raptor_free_xml_writer ()

void                raptor_free_xml_writer              (raptor_xml_writer *xml_writer);

Destructor - Free XML Writer

xml_writer :

XML writer object

raptor_xml_writer_empty_element ()

void                raptor_xml_writer_empty_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);

Write an empty XML element to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

element :

XML element object

raptor_xml_writer_start_element ()

void                raptor_xml_writer_start_element     (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);

Write a start XML element to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

Indents the start element if XML writer option AUTO_INDENT is enabled.

xml_writer :

XML writer object

element :

XML element object

raptor_xml_writer_end_element ()

void                raptor_xml_writer_end_element       (raptor_xml_writer *xml_writer,
                                                         raptor_xml_element *element);

Write an end XML element to the XML writer.

Indents the end element if XML writer option AUTO_INDENT is enabled.

xml_writer :

XML writer object

element :

XML element object

raptor_xml_writer_cdata ()

void                raptor_xml_writer_cdata             (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s);

Write CDATA XML-escaped to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to XML escape and write

raptor_xml_writer_cdata_counted ()

void                raptor_xml_writer_cdata_counted     (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s,
                                                         unsigned int len);

Write counted CDATA XML-escaped to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to XML escape and write

len :

length of string

raptor_xml_writer_raw ()

void                raptor_xml_writer_raw               (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s);

Write a string raw to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to write

raptor_xml_writer_raw_counted ()

void                raptor_xml_writer_raw_counted       (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s,
                                                         unsigned int len);

Write a counted string raw to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

string to write

len :

length of string

raptor_xml_writer_comment ()

void                raptor_xml_writer_comment           (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s);

Write an XML comment to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

comment string to write

raptor_xml_writer_comment_counted ()

void                raptor_xml_writer_comment_counted   (raptor_xml_writer *xml_writer,
                                                         const unsigned char *s,
                                                         unsigned int len);

Write a counted XML comment to the XML writer.

Closes any previous empty element if XML writer option AUTO_EMPTY is enabled.

xml_writer :

XML writer object

s :

comment string to write

len :

length of string

raptor_xml_writer_flush ()

void                raptor_xml_writer_flush             (raptor_xml_writer *xml_writer);

Finish the XML writer.

xml_writer :

XML writer object

raptor_xml_writer_newline ()

void                raptor_xml_writer_newline           (raptor_xml_writer *xml_writer);

Write a newline to the XML writer.

Indents the next line if XML writer option AUTO_INDENT is enabled.

xml_writer :

XML writer object

raptor_xml_writer_get_depth ()

int                 raptor_xml_writer_get_depth         (raptor_xml_writer *xml_writer);

Get the current XML Writer element depth

xml_writer :

raptor_xml_writer xml writer object

Returns :

element stack depth

raptor_xml_writer_set_option ()

int                 raptor_xml_writer_set_option        (raptor_xml_writer *xml_writer,
                                                         raptor_option option,
                                                         char *string,
                                                         int integer);

Set xml_writer option.

If string is not NULL and the option type is numeric, the string value is converted to an integer and used in preference to integer.

If string is NULL and the option type is not numeric, an error is returned.

The string values used are copied.

The allowed options are available via raptor_world_get_option_description().

xml_writer :

raptor_xml_writer xml_writer object

option :

option to set from enumerated raptor_option values

string :

string option value (or NULL)

integer :

integer option value

Returns :

non 0 on failure or if the option is unknown

raptor_xml_writer_get_option ()

int                 raptor_xml_writer_get_option        (raptor_xml_writer *xml_writer,
                                                         raptor_option option,
                                                         char **string_p,
                                                         int *integer_p);

Get xml_writer option.

Any string value returned in *string_p is shared and must be copied by the caller.

The allowed options are available via raptor_world_get_option_description().

xml_writer :

raptor_xml_writer xml_writer object

option :

option to get value

string_p :

pointer to where to store string value

integer_p :

pointer to where to store integer value

Returns :

option value or < 0 for an illegal option

raptor_xml_writer

raptor_xml_writer* raptor_xml_writer;

Raptor XML Writer class


raptor_xml_escape_string_any ()

int                 raptor_xml_escape_string_any        (raptor_world *world,
                                                         const unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote,
                                                         int xml_version);

Return an XML-escaped version a string.

Follows Canonical XML rules on Text Nodes and Attribute Nodes

Both: Replaces & and < with &amp; and &lt; respectively, preserving other characters.

Text Nodes: > is turned into &gt; #xD is turned into &#xD;

Attribute Nodes: > is generated not &gt. #x9, #xA and #xD are turned into &#x9;, &#xA; and &#xD; entities.

If quote is given it can be either of '\'' or '\"' which will be turned into &apos; or &quot; respectively. ASCII NUL ('\0') or any other character will not be escaped.

If buffer is NULL, no work is done but the size of buffer required is returned. The output in buffer remains in UTF-8.

If the input string is empty, a single NUL will be written to the buffer.

world :

raptor world

string :

string to XML escape (UTF-8)

len :

length of string

buffer :

the buffer to use for new string (UTF-8) or NULL to just calculate expected length

length :

buffer size

quote :

optional quote character to escape for attribute content, or 0

xml_version :

XML 1.0 (10) or XML 1.1 (11)

Returns :

the number of bytes required / used or <0 on failure.

raptor_xml_escape_string_any_write ()

int                 raptor_xml_escape_string_any_write  (const unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         int xml_version,
                                                         raptor_iostream *iostr);

Write an XML-escaped version of a string to an iostream.

See raptor_xml_escape_string() for the escapes performed and the conditions on quote and string. XML 1.1 allows additional characters in XML such as U+0001 to U+001F inclusive.

string :

string to XML escape (UTF-8)

len :

length of string

quote :

optional quote character to escape for attribute content, or 0

xml_version :

XML version - 10 (XML 1.0) or 11 (XML 1.1)

iostr :

the raptor_iostream to write to

Returns :

non 0 on failure

raptor_xml_escape_string ()

int                 raptor_xml_escape_string            (raptor_world *world,
                                                         const unsigned char *string,
                                                         size_t len,
                                                         unsigned char *buffer,
                                                         size_t length,
                                                         char quote);

Return an XML 1.0-escaped version a string.

See raptor_xml_escape_string_any() for the conditions on parameters.

world :

raptor world

string :

string to XML 1.0 escape (UTF-8)

len :

length of string

buffer :

the buffer to use for new string (UTF-8) or NULL to just calculate expected length.

length :

buffer size

quote :

optional quote character to escape for attribute content, or 0

Returns :

the number of bytes required / used or <0 on failure.

raptor_xml_escape_string_write ()

int                 raptor_xml_escape_string_write      (const unsigned char *string,
                                                         size_t len,
                                                         char quote,
                                                         raptor_iostream *iostr);

Write an XML 1.0-escaped version of a string to an iostream.

See raptor_xml_escape_string_any_write() for the escapes performed and the conditions on quote and string.

string :

string to XML 1.0 escape (UTF-8)

len :

length of string

quote :

optional quote character to escape for attribute content, or 0

iostr :

the raptor_iostream to write to

Returns :

non 0 on failure

raptor_xml_name_check ()

int                 raptor_xml_name_check               (const unsigned char *string,
                                                         size_t length,
                                                         int xml_version);

Check a string is a legal XML name (and legal UTF8).

xml_version is either 10 (for XML 1.0) or 11 for (XML 1.1). Any other version fails.

string :

UTF-8 name string

length :

length of string

xml_version :

XML version

Returns :

Non 0 if the string is a legal XML name
raptor2-2.0.15/docs/html/tutorial-initialising-finishing.html0000644000175000017500000000417012425347071021202 00000000000000 Initialising and Finishing using the Library

Initialising and Finishing using the Library

Raptor requires initialising a raptor_world object before using any of the classes which take the world object as an argument in their constructors. The function to make the world object is raptor_new_world() and the destructor raptor_free_world().

  raptor_world* world;
  world = raptor_new_world();
  ...
  raptor_free_world(world);

raptor2-2.0.15/docs/html/serializer-atom.html0000644000175000017500000000510512425347071016010 00000000000000 Atom 1.0 serializer (name atom)

Atom 1.0 serializer (name atom)

A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. This serializes an RDF graph written in the RSS 1.0 data model to Atom 1.0 plus optionally writes extra RDF triples.

The extra RDF triples are written into an at:md metadata block, along with at:feedmap and at:entrymap elements to describe the RSS 1.0 predicate to Atom 1.0 elements mappings for the feed and entry blocks respecively. The extra triples are enabled when serializer option 'rssTriples' is set to string value 'atom-triples'.

If no atom triples content type field (at:contentType predicate) is given, the type is set to 'text/html' when writing out an atom:content field in Atom 1.0 format.

raptor2-2.0.15/docs/html/ix01.html0000644000175000017500000020355512425347071013473 00000000000000 Index

Index

R

raptor_alloc_memory, raptor_alloc_memory ()
raptor_avltree, raptor_avltree
raptor_avltree_add, raptor_avltree_add ()
raptor_avltree_bitflags, enum raptor_avltree_bitflags
raptor_avltree_delete, raptor_avltree_delete ()
raptor_avltree_iterator, raptor_avltree_iterator
raptor_avltree_iterator_get, raptor_avltree_iterator_get ()
raptor_avltree_iterator_is_end, raptor_avltree_iterator_is_end ()
raptor_avltree_iterator_next, raptor_avltree_iterator_next ()
raptor_avltree_print, raptor_avltree_print ()
raptor_avltree_remove, raptor_avltree_remove ()
raptor_avltree_search, raptor_avltree_search ()
raptor_avltree_set_print_handler, raptor_avltree_set_print_handler ()
raptor_avltree_size, raptor_avltree_size ()
raptor_avltree_visit, raptor_avltree_visit ()
raptor_avltree_visit_handler, raptor_avltree_visit_handler ()
raptor_bnodeid_ntriples_write, raptor_bnodeid_ntriples_write ()
raptor_calloc_memory, raptor_calloc_memory ()
raptor_copyright_string, raptor_copyright_string
raptor_data_compare_arg_handler, raptor_data_compare_arg_handler ()
raptor_data_compare_handler, raptor_data_compare_handler ()
raptor_data_context_free_handler, raptor_data_context_free_handler ()
raptor_data_context_print_handler, raptor_data_context_print_handler ()
raptor_data_free_handler, raptor_data_free_handler ()
raptor_data_malloc_handler, raptor_data_malloc_handler ()
raptor_data_print_handler, raptor_data_print_handler ()
raptor_domain, enum raptor_domain
raptor_domain_get_label, raptor_domain_get_label ()
raptor_escaped_write_bitflags, enum raptor_escaped_write_bitflags
raptor_free_avltree, raptor_free_avltree ()
raptor_free_avltree_iterator, raptor_free_avltree_iterator ()
raptor_free_iostream, raptor_free_iostream ()
raptor_free_memory, raptor_free_memory ()
raptor_free_namespace, raptor_free_namespace ()
raptor_free_namespaces, raptor_free_namespaces ()
raptor_free_option_description, raptor_free_option_description ()
raptor_free_parser, raptor_free_parser ()
raptor_free_qname, raptor_free_qname ()
raptor_free_sax2, raptor_free_sax2 ()
raptor_free_sequence, raptor_free_sequence ()
raptor_free_serializer, raptor_free_serializer ()
raptor_free_statement, raptor_free_statement ()
raptor_free_stringbuffer, raptor_free_stringbuffer ()
raptor_free_term, raptor_free_term ()
raptor_free_uri, raptor_free_uri ()
raptor_free_world, raptor_free_world ()
raptor_free_www, raptor_free_www ()
raptor_free_xml_element, raptor_free_xml_element ()
raptor_free_xml_writer, raptor_free_xml_writer ()
raptor_graph_mark_flags, enum raptor_graph_mark_flags
raptor_graph_mark_handler, raptor_graph_mark_handler ()
raptor_home_url_string, raptor_home_url_string
raptor_iostream, raptor_iostream
raptor_iostream_counted_string_write, raptor_iostream_counted_string_write ()
raptor_iostream_decimal_write, raptor_iostream_decimal_write ()
raptor_iostream_finish_func, raptor_iostream_finish_func ()
raptor_iostream_handler, raptor_iostream_handler
raptor_iostream_hexadecimal_write, raptor_iostream_hexadecimal_write ()
raptor_iostream_init_func, raptor_iostream_init_func ()
raptor_iostream_read_bytes, raptor_iostream_read_bytes ()
raptor_iostream_read_bytes_func, raptor_iostream_read_bytes_func ()
raptor_iostream_read_eof, raptor_iostream_read_eof ()
raptor_iostream_read_eof_func, raptor_iostream_read_eof_func ()
raptor_iostream_string_write, raptor_iostream_string_write ()
raptor_iostream_tell, raptor_iostream_tell ()
raptor_iostream_write_byte, raptor_iostream_write_byte ()
raptor_iostream_write_bytes, raptor_iostream_write_bytes ()
raptor_iostream_write_bytes_func, raptor_iostream_write_bytes_func ()
raptor_iostream_write_byte_func, raptor_iostream_write_byte_func ()
raptor_iostream_write_end, raptor_iostream_write_end ()
raptor_iostream_write_end_func, raptor_iostream_write_end_func ()
raptor_license_string, raptor_license_string
raptor_locator, raptor_locator
raptor_locator_byte, raptor_locator_byte ()
raptor_locator_column, raptor_locator_column ()
raptor_locator_file, raptor_locator_file ()
raptor_locator_format, raptor_locator_format ()
raptor_locator_line, raptor_locator_line ()
raptor_locator_print, raptor_locator_print ()
raptor_locator_uri, raptor_locator_uri ()
raptor_log_handler, raptor_log_handler ()
raptor_log_level, enum raptor_log_level
raptor_log_level_get_label, raptor_log_level_get_label ()
raptor_log_message, raptor_log_message
raptor_namespace, raptor_namespace
raptor_namespaces_clear, raptor_namespaces_clear ()
raptor_namespaces_end_for_depth, raptor_namespaces_end_for_depth ()
raptor_namespaces_find_namespace, raptor_namespaces_find_namespace ()
raptor_namespaces_find_namespace_by_uri, raptor_namespaces_find_namespace_by_uri ()
raptor_namespaces_get_default_namespace, raptor_namespaces_get_default_namespace ()
raptor_namespaces_init, raptor_namespaces_init ()
raptor_namespaces_namespace_in_scope, raptor_namespaces_namespace_in_scope ()
raptor_namespaces_start_namespace, raptor_namespaces_start_namespace ()
raptor_namespaces_start_namespace_full, raptor_namespaces_start_namespace_full ()
raptor_namespace_format_as_xml, raptor_namespace_format_as_xml ()
raptor_namespace_get_counted_prefix, raptor_namespace_get_counted_prefix ()
raptor_namespace_get_prefix, raptor_namespace_get_prefix ()
raptor_namespace_get_uri, raptor_namespace_get_uri ()
raptor_namespace_handler, raptor_namespace_handler ()
raptor_namespace_stack, raptor_namespace_stack
raptor_namespace_stack_start_namespace, raptor_namespace_stack_start_namespace ()
raptor_namespace_write, raptor_namespace_write ()
raptor_new_avltree, raptor_new_avltree ()
raptor_new_avltree_iterator, raptor_new_avltree_iterator ()
raptor_new_iostream_from_filename, raptor_new_iostream_from_filename ()
raptor_new_iostream_from_file_handle, raptor_new_iostream_from_file_handle ()
raptor_new_iostream_from_handler, raptor_new_iostream_from_handler ()
raptor_new_iostream_from_sink, raptor_new_iostream_from_sink ()
raptor_new_iostream_from_string, raptor_new_iostream_from_string ()
raptor_new_iostream_to_filename, raptor_new_iostream_to_filename ()
raptor_new_iostream_to_file_handle, raptor_new_iostream_to_file_handle ()
raptor_new_iostream_to_sink, raptor_new_iostream_to_sink ()
raptor_new_iostream_to_string, raptor_new_iostream_to_string ()
raptor_new_namespace, raptor_new_namespace ()
raptor_new_namespaces, raptor_new_namespaces ()
raptor_new_namespace_from_uri, raptor_new_namespace_from_uri ()
raptor_new_parser, raptor_new_parser ()
raptor_new_parser_for_content, raptor_new_parser_for_content ()
raptor_new_qname, raptor_new_qname ()
raptor_new_qname_from_namespace_local_name, raptor_new_qname_from_namespace_local_name ()
raptor_new_qname_from_namespace_uri, raptor_new_qname_from_namespace_uri ()
raptor_new_sax2, raptor_new_sax2 ()
raptor_new_sequence, raptor_new_sequence ()
raptor_new_sequence_with_context, raptor_new_sequence_with_context ()
raptor_new_serializer, raptor_new_serializer ()
raptor_new_statement, raptor_new_statement ()
raptor_new_statement_from_nodes, raptor_new_statement_from_nodes ()
raptor_new_stringbuffer, raptor_new_stringbuffer ()
raptor_new_term_from_blank, raptor_new_term_from_blank ()
raptor_new_term_from_counted_blank, raptor_new_term_from_counted_blank ()
raptor_new_term_from_counted_literal, raptor_new_term_from_counted_literal ()
raptor_new_term_from_counted_string, raptor_new_term_from_counted_string ()
raptor_new_term_from_counted_uri_string, raptor_new_term_from_counted_uri_string ()
raptor_new_term_from_literal, raptor_new_term_from_literal ()
raptor_new_term_from_uri, raptor_new_term_from_uri ()
raptor_new_term_from_uri_string, raptor_new_term_from_uri_string ()
raptor_new_uri, raptor_new_uri ()
raptor_new_uri_for_rdf_concept, raptor_new_uri_for_rdf_concept ()
raptor_new_uri_for_retrieval, raptor_new_uri_for_retrieval ()
raptor_new_uri_for_xmlbase, raptor_new_uri_for_xmlbase ()
raptor_new_uri_from_counted_string, raptor_new_uri_from_counted_string ()
raptor_new_uri_from_id, raptor_new_uri_from_id ()
raptor_new_uri_from_uri_local_name, raptor_new_uri_from_uri_local_name ()
raptor_new_uri_from_uri_or_file_string, raptor_new_uri_from_uri_or_file_string ()
raptor_new_uri_relative_to_base, raptor_new_uri_relative_to_base ()
raptor_new_uri_relative_to_base_counted, raptor_new_uri_relative_to_base_counted ()
raptor_new_world, raptor_new_world
raptor_new_www, raptor_new_www ()
raptor_new_www_with_connection, raptor_new_www_with_connection ()
raptor_new_xml_element, raptor_new_xml_element ()
raptor_new_xml_element_from_namespace_local_name, raptor_new_xml_element_from_namespace_local_name ()
raptor_new_xml_writer, raptor_new_xml_writer ()
raptor_option, enum raptor_option
raptor_option_description, raptor_option_description
raptor_option_get_count, raptor_option_get_count ()
raptor_option_get_value_type_label, raptor_option_get_value_type_label ()
raptor_option_value_type, enum raptor_option_value_type
raptor_owl_namespace_uri, raptor_owl_namespace_uri
RAPTOR_OWL_URI, RAPTOR_OWL_URI
raptor_parser, raptor_parser
raptor_parser_get_accept_header, raptor_parser_get_accept_header ()
raptor_parser_get_description, raptor_parser_get_description ()
raptor_parser_get_graph, raptor_parser_get_graph ()
raptor_parser_get_locator, raptor_parser_get_locator ()
raptor_parser_get_name, raptor_parser_get_name ()
raptor_parser_get_option, raptor_parser_get_option ()
raptor_parser_get_world, raptor_parser_get_world ()
raptor_parser_parse_abort, raptor_parser_parse_abort ()
raptor_parser_parse_chunk, raptor_parser_parse_chunk ()
raptor_parser_parse_file, raptor_parser_parse_file ()
raptor_parser_parse_file_stream, raptor_parser_parse_file_stream ()
raptor_parser_parse_iostream, raptor_parser_parse_iostream ()
raptor_parser_parse_start, raptor_parser_parse_start ()
raptor_parser_parse_uri, raptor_parser_parse_uri ()
raptor_parser_parse_uri_with_connection, raptor_parser_parse_uri_with_connection ()
raptor_parser_set_graph_mark_handler, raptor_parser_set_graph_mark_handler ()
raptor_parser_set_namespace_handler, raptor_parser_set_namespace_handler ()
raptor_parser_set_option, raptor_parser_set_option ()
raptor_parser_set_statement_handler, raptor_parser_set_statement_handler ()
raptor_parser_set_uri_filter, raptor_parser_set_uri_filter ()
raptor_qname, raptor_qname
raptor_qname_copy, raptor_qname_copy ()
raptor_qname_equal, raptor_qname_equal ()
raptor_qname_format_as_xml, raptor_qname_format_as_xml ()
raptor_qname_get_counted_value, raptor_qname_get_counted_value ()
raptor_qname_get_local_name, raptor_qname_get_local_name ()
raptor_qname_get_namespace, raptor_qname_get_namespace ()
raptor_qname_get_value, raptor_qname_get_value ()
raptor_qname_string_to_uri, raptor_qname_string_to_uri ()
raptor_qname_to_counted_name, raptor_qname_to_counted_name ()
raptor_qname_write, raptor_qname_write ()
RAPTOR_RDF_MS_URI, RAPTOR_RDF_MS_URI
raptor_rdf_namespace_uri, raptor_rdf_namespace_uri
raptor_rdf_namespace_uri_len, raptor_rdf_namespace_uri_len
raptor_rdf_schema_namespace_uri, raptor_rdf_schema_namespace_uri
RAPTOR_RDF_SCHEMA_URI, RAPTOR_RDF_SCHEMA_URI
raptor_sax2, raptor_sax2
raptor_sax2_cdata_handler, raptor_sax2_cdata_handler ()
raptor_sax2_characters_handler, raptor_sax2_characters_handler ()
raptor_sax2_comment_handler, raptor_sax2_comment_handler ()
raptor_sax2_end_element_handler, raptor_sax2_end_element_handler ()
raptor_sax2_external_entity_ref_handler, raptor_sax2_external_entity_ref_handler ()
raptor_sax2_inscope_base_uri, raptor_sax2_inscope_base_uri ()
raptor_sax2_inscope_xml_language, raptor_sax2_inscope_xml_language ()
raptor_sax2_parse_chunk, raptor_sax2_parse_chunk ()
raptor_sax2_parse_start, raptor_sax2_parse_start ()
raptor_sax2_set_cdata_handler, raptor_sax2_set_cdata_handler ()
raptor_sax2_set_characters_handler, raptor_sax2_set_characters_handler ()
raptor_sax2_set_comment_handler, raptor_sax2_set_comment_handler ()
raptor_sax2_set_end_element_handler, raptor_sax2_set_end_element_handler ()
raptor_sax2_set_external_entity_ref_handler, raptor_sax2_set_external_entity_ref_handler ()
raptor_sax2_set_namespace_handler, raptor_sax2_set_namespace_handler ()
raptor_sax2_set_start_element_handler, raptor_sax2_set_start_element_handler ()
raptor_sax2_set_unparsed_entity_decl_handler, raptor_sax2_set_unparsed_entity_decl_handler ()
raptor_sax2_set_uri_filter, raptor_sax2_set_uri_filter ()
raptor_sax2_start_element_handler, raptor_sax2_start_element_handler ()
raptor_sax2_unparsed_entity_decl_handler, raptor_sax2_unparsed_entity_decl_handler ()
raptor_sequence, raptor_sequence
raptor_sequence_delete_at, raptor_sequence_delete_at ()
raptor_sequence_get_at, raptor_sequence_get_at ()
raptor_sequence_join, raptor_sequence_join ()
raptor_sequence_next_permutation, raptor_sequence_next_permutation ()
raptor_sequence_pop, raptor_sequence_pop ()
raptor_sequence_print, raptor_sequence_print ()
raptor_sequence_push, raptor_sequence_push ()
raptor_sequence_reverse, raptor_sequence_reverse ()
raptor_sequence_set_at, raptor_sequence_set_at ()
raptor_sequence_shift, raptor_sequence_shift ()
raptor_sequence_size, raptor_sequence_size ()
raptor_sequence_sort, raptor_sequence_sort ()
raptor_sequence_sort_r, raptor_sequence_sort_r ()
raptor_sequence_swap, raptor_sequence_swap ()
raptor_sequence_unshift, raptor_sequence_unshift ()
raptor_serializer, raptor_serializer
raptor_serializer_flush, raptor_serializer_flush ()
raptor_serializer_get_description, raptor_serializer_get_description ()
raptor_serializer_get_iostream, raptor_serializer_get_iostream ()
raptor_serializer_get_locator, raptor_serializer_get_locator ()
raptor_serializer_get_option, raptor_serializer_get_option ()
raptor_serializer_get_world, raptor_serializer_get_world ()
raptor_serializer_serialize_end, raptor_serializer_serialize_end ()
raptor_serializer_serialize_statement, raptor_serializer_serialize_statement ()
raptor_serializer_set_namespace, raptor_serializer_set_namespace ()
raptor_serializer_set_namespace_from_namespace, raptor_serializer_set_namespace_from_namespace ()
raptor_serializer_set_option, raptor_serializer_set_option ()
raptor_serializer_start_to_filename, raptor_serializer_start_to_filename ()
raptor_serializer_start_to_file_handle, raptor_serializer_start_to_file_handle ()
raptor_serializer_start_to_iostream, raptor_serializer_start_to_iostream ()
raptor_serializer_start_to_string, raptor_serializer_start_to_string ()
raptor_short_copyright_string, raptor_short_copyright_string
raptor_snprintf, raptor_snprintf ()
raptor_sort_r, raptor_sort_r ()
raptor_statement, raptor_statement
raptor_statement_clear, raptor_statement_clear ()
raptor_statement_compare, raptor_statement_compare ()
raptor_statement_copy, raptor_statement_copy ()
raptor_statement_equals, raptor_statement_equals ()
raptor_statement_handler, raptor_statement_handler ()
raptor_statement_init, raptor_statement_init ()
raptor_statement_ntriples_write, raptor_statement_ntriples_write ()
raptor_statement_print, raptor_statement_print ()
raptor_statement_print_as_ntriples, raptor_statement_print_as_ntriples ()
raptor_stringbuffer, raptor_stringbuffer
raptor_stringbuffer_append_counted_string, raptor_stringbuffer_append_counted_string ()
raptor_stringbuffer_append_decimal, raptor_stringbuffer_append_decimal ()
raptor_stringbuffer_append_hexadecimal, raptor_stringbuffer_append_hexadecimal ()
raptor_stringbuffer_append_string, raptor_stringbuffer_append_string ()
raptor_stringbuffer_append_stringbuffer, raptor_stringbuffer_append_stringbuffer ()
raptor_stringbuffer_append_uri_escaped_counted_string, raptor_stringbuffer_append_uri_escaped_counted_string ()
raptor_stringbuffer_as_string, raptor_stringbuffer_as_string ()
raptor_stringbuffer_copy_to_string, raptor_stringbuffer_copy_to_string ()
raptor_stringbuffer_length, raptor_stringbuffer_length ()
raptor_stringbuffer_prepend_counted_string, raptor_stringbuffer_prepend_counted_string ()
raptor_stringbuffer_prepend_string, raptor_stringbuffer_prepend_string ()
raptor_stringbuffer_write, raptor_stringbuffer_write ()
raptor_string_escaped_write, raptor_string_escaped_write ()
raptor_string_ntriples_write, raptor_string_ntriples_write ()
raptor_string_python_write, raptor_string_python_write ()
raptor_syntax_bitflags, enum raptor_syntax_bitflags
raptor_syntax_description, raptor_syntax_description
raptor_syntax_description_validate, raptor_syntax_description_validate ()
raptor_term, raptor_term
raptor_term_blank_value, raptor_term_blank_value
raptor_term_compare, raptor_term_compare ()
raptor_term_copy, raptor_term_copy ()
raptor_term_equals, raptor_term_equals ()
raptor_term_escaped_write, raptor_term_escaped_write ()
raptor_term_literal_value, raptor_term_literal_value
raptor_term_ntriples_write, raptor_term_ntriples_write ()
raptor_term_to_counted_string, raptor_term_to_counted_string ()
raptor_term_to_string, raptor_term_to_string ()
raptor_term_to_turtle_counted_string, raptor_term_to_turtle_counted_string ()
raptor_term_to_turtle_string, raptor_term_to_turtle_string ()
raptor_term_turtle_write, raptor_term_turtle_write ()
raptor_term_type, enum raptor_term_type
raptor_term_value, raptor_term_value
raptor_type_q, raptor_type_q
raptor_unichar, raptor_unichar
raptor_unicode_check_utf8_string, raptor_unicode_check_utf8_string ()
raptor_unicode_is_xml10_namechar, raptor_unicode_is_xml10_namechar ()
raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml10_namestartchar ()
raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml11_namechar ()
raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml11_namestartchar ()
raptor_unicode_utf8_string_get_char, raptor_unicode_utf8_string_get_char ()
raptor_unicode_utf8_string_put_char, raptor_unicode_utf8_string_put_char ()
raptor_unicode_utf8_strlen, raptor_unicode_utf8_strlen ()
raptor_unicode_utf8_substr, raptor_unicode_utf8_substr ()
raptor_uri, raptor_uri
raptor_uri_as_counted_string, raptor_uri_as_counted_string ()
raptor_uri_as_string, raptor_uri_as_string ()
raptor_uri_compare, raptor_uri_compare ()
raptor_uri_copy, raptor_uri_copy ()
raptor_uri_counted_filename_to_uri_string, raptor_uri_counted_filename_to_uri_string ()
raptor_uri_equals, raptor_uri_equals ()
raptor_uri_escaped_write, raptor_uri_escaped_write ()
raptor_uri_filename_exists, raptor_uri_filename_exists ()
raptor_uri_filename_to_uri_string, raptor_uri_filename_to_uri_string ()
raptor_uri_file_exists, raptor_uri_file_exists ()
raptor_uri_filter_func, raptor_uri_filter_func ()
raptor_uri_get_world, raptor_uri_get_world ()
raptor_uri_print, raptor_uri_print ()
raptor_uri_resolve_uri_reference, raptor_uri_resolve_uri_reference ()
raptor_uri_to_counted_string, raptor_uri_to_counted_string ()
raptor_uri_to_relative_counted_uri_string, raptor_uri_to_relative_counted_uri_string ()
raptor_uri_to_relative_uri_string, raptor_uri_to_relative_uri_string ()
raptor_uri_to_string, raptor_uri_to_string ()
raptor_uri_to_turtle_counted_string, raptor_uri_to_turtle_counted_string ()
raptor_uri_to_turtle_string, raptor_uri_to_turtle_string ()
raptor_uri_turtle_write, raptor_uri_turtle_write ()
raptor_uri_uri_string_is_absolute, raptor_uri_uri_string_is_absolute ()
raptor_uri_uri_string_is_file_uri, raptor_uri_uri_string_is_file_uri ()
raptor_uri_uri_string_to_counted_filename_fragment, raptor_uri_uri_string_to_counted_filename_fragment ()
raptor_uri_uri_string_to_filename, raptor_uri_uri_string_to_filename ()
raptor_uri_uri_string_to_filename_fragment, raptor_uri_uri_string_to_filename_fragment ()
raptor_uri_write, raptor_uri_write ()
raptor_vasprintf, raptor_vasprintf ()
RAPTOR_VERSION, RAPTOR_VERSION
raptor_version_decimal, raptor_version_decimal
RAPTOR_VERSION_MAJOR, RAPTOR_VERSION_MAJOR
raptor_version_major, raptor_version_major
RAPTOR_VERSION_MINOR, RAPTOR_VERSION_MINOR
raptor_version_minor, raptor_version_minor
RAPTOR_VERSION_RELEASE, RAPTOR_VERSION_RELEASE
raptor_version_release, raptor_version_release
RAPTOR_VERSION_STRING, RAPTOR_VERSION_STRING
raptor_version_string, raptor_version_string
raptor_vsnprintf, raptor_vsnprintf ()
raptor_vsnprintf2, raptor_vsnprintf2 ()
raptor_world, raptor_world
raptor_world_flag, enum raptor_world_flag
raptor_world_generate_bnodeid, raptor_world_generate_bnodeid ()
raptor_world_get_option_description, raptor_world_get_option_description ()
raptor_world_get_option_from_uri, raptor_world_get_option_from_uri ()
raptor_world_get_parsers_count, raptor_world_get_parsers_count ()
raptor_world_get_parser_description, raptor_world_get_parser_description ()
raptor_world_get_serializers_count, raptor_world_get_serializers_count ()
raptor_world_get_serializer_description, raptor_world_get_serializer_description ()
raptor_world_guess_parser_name, raptor_world_guess_parser_name ()
raptor_world_is_parser_name, raptor_world_is_parser_name ()
raptor_world_is_serializer_name, raptor_world_is_serializer_name ()
raptor_world_open, raptor_world_open ()
raptor_world_set_flag, raptor_world_set_flag ()
raptor_world_set_generate_bnodeid_handler, raptor_world_set_generate_bnodeid_handler ()
raptor_world_set_generate_bnodeid_parameters, raptor_world_set_generate_bnodeid_parameters ()
raptor_world_set_libxslt_security_preferences, raptor_world_set_libxslt_security_preferences ()
raptor_world_set_log_handler, raptor_world_set_log_handler ()
raptor_www, raptor_www
raptor_www_abort, raptor_www_abort ()
raptor_www_content_type_handler, raptor_www_content_type_handler ()
raptor_www_fetch, raptor_www_fetch ()
raptor_www_fetch_to_string, raptor_www_fetch_to_string ()
raptor_www_final_uri_handler, raptor_www_final_uri_handler ()
raptor_www_get_connection, raptor_www_get_connection ()
raptor_www_get_final_uri, raptor_www_get_final_uri ()
raptor_www_set_connection_timeout, raptor_www_set_connection_timeout ()
raptor_www_set_content_type_handler, raptor_www_set_content_type_handler ()
raptor_www_set_final_uri_handler, raptor_www_set_final_uri_handler ()
raptor_www_set_http_accept, raptor_www_set_http_accept ()
raptor_www_set_http_cache_control, raptor_www_set_http_cache_control ()
raptor_www_set_proxy, raptor_www_set_proxy ()
raptor_www_set_ssl_cert_options, raptor_www_set_ssl_cert_options ()
raptor_www_set_ssl_verify_options, raptor_www_set_ssl_verify_options ()
raptor_www_set_uri_filter, raptor_www_set_uri_filter ()
raptor_www_set_user_agent, raptor_www_set_user_agent ()
raptor_www_set_write_bytes_handler, raptor_www_set_write_bytes_handler ()
raptor_www_write_bytes_handler, raptor_www_write_bytes_handler ()
raptor_xmlschema_datatypes_namespace_uri, raptor_xmlschema_datatypes_namespace_uri
RAPTOR_XMLSCHEMA_DATATYPES_URI, RAPTOR_XMLSCHEMA_DATATYPES_URI
raptor_xml_element, raptor_xml_element
raptor_xml_element_declare_namespace, raptor_xml_element_declare_namespace ()
raptor_xml_element_get_attributes, raptor_xml_element_get_attributes ()
raptor_xml_element_get_attributes_count, raptor_xml_element_get_attributes_count ()
raptor_xml_element_get_language, raptor_xml_element_get_language ()
raptor_xml_element_get_name, raptor_xml_element_get_name ()
raptor_xml_element_is_empty, raptor_xml_element_is_empty ()
raptor_xml_element_set_attributes, raptor_xml_element_set_attributes ()
raptor_xml_element_write, raptor_xml_element_write ()
raptor_xml_escape_string, raptor_xml_escape_string ()
raptor_xml_escape_string_any, raptor_xml_escape_string_any ()
raptor_xml_escape_string_any_write, raptor_xml_escape_string_any_write ()
raptor_xml_escape_string_write, raptor_xml_escape_string_write ()
raptor_xml_literal_datatype_uri_string, raptor_xml_literal_datatype_uri_string
raptor_xml_literal_datatype_uri_string_len, raptor_xml_literal_datatype_uri_string_len
raptor_xml_namespace_string_parse, raptor_xml_namespace_string_parse ()
raptor_xml_namespace_uri, raptor_xml_namespace_uri
raptor_xml_name_check, raptor_xml_name_check ()
raptor_xml_writer, raptor_xml_writer
raptor_xml_writer_cdata, raptor_xml_writer_cdata ()
raptor_xml_writer_cdata_counted, raptor_xml_writer_cdata_counted ()
raptor_xml_writer_comment, raptor_xml_writer_comment ()
raptor_xml_writer_comment_counted, raptor_xml_writer_comment_counted ()
raptor_xml_writer_empty_element, raptor_xml_writer_empty_element ()
raptor_xml_writer_end_element, raptor_xml_writer_end_element ()
raptor_xml_writer_flush, raptor_xml_writer_flush ()
raptor_xml_writer_get_depth, raptor_xml_writer_get_depth ()
raptor_xml_writer_get_option, raptor_xml_writer_get_option ()
raptor_xml_writer_newline, raptor_xml_writer_newline ()
raptor_xml_writer_raw, raptor_xml_writer_raw ()
raptor_xml_writer_raw_counted, raptor_xml_writer_raw_counted ()
raptor_xml_writer_set_option, raptor_xml_writer_set_option ()
raptor_xml_writer_start_element, raptor_xml_writer_start_element ()
raptor2-2.0.15/docs/html/raptor2-changes-2-0-6-to-2-0-7.html0000644000175000017500000001122512425347071017417 00000000000000 Changes between raptor2 2.0.6 and 2.0.7

Changes between raptor2 2.0.6 and 2.0.7

New functions, types and enums

Functions

raptor2-2.0.15/docs/html/left.png0000644000175000017500000000071312425347071013453 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1&[(XIDATx!OPE*ID%~ꊯ"p'ŏ`sܖrKf hmiIz}ܯI.p\`x l?l[,Hk<#c%\AUx[S7n6rzEs1j@NL$ݤi0 5/}\EKIo͓$a0jdFbkIAh>WlC'?tk;|/t*INZ^`y4Nr]׮ J<ڐt`X1@p䀸dZ')hK $V?%]+LsgUK"w53OIENDB`raptor2-2.0.15/docs/html/up.png0000644000175000017500000000062612425347071013150 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2.E#IDATx=J@Fo] !+2[Z<@/9|t$D9nnBjBRIsI:H8UPN1fcsN95M㧖ɵ 束1~pEe$I 7nrDf!;`'ykI䲤sI_]y^^I>O>?YBIENDB`raptor2-2.0.15/docs/html/raptor2-section-constants.html0000644000175000017500000001372712425347071017757 00000000000000 Constants

Constants

Constants — Constant values and strings

Synopsis

extern const unsigned int raptor_rdf_namespace_uri_len;
extern const unsigned int raptor_xml_literal_datatype_uri_string_len;
#define             RAPTOR_RDF_MS_URI
#define             RAPTOR_RDF_SCHEMA_URI
#define             RAPTOR_XMLSCHEMA_DATATYPES_URI
#define             RAPTOR_OWL_URI

Description

Version numbers and often-used namespace URI strings.

Details

raptor_rdf_namespace_uri_len

extern const unsigned int raptor_rdf_namespace_uri_len;

Length of raptor_rdf_namespace_uri string


raptor_xml_literal_datatype_uri_string_len

extern const unsigned int raptor_xml_literal_datatype_uri_string_len;

Length of raptor_xml_literal_datatype_uri_string


RAPTOR_RDF_MS_URI

#define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri

RDF Namespace URI (rdf:).

Copy with raptor_uri_copy() to use.


RAPTOR_RDF_SCHEMA_URI

#define RAPTOR_RDF_SCHEMA_URI raptor_rdf_schema_namespace_uri

RDF Schema Namespace URI (rdfs:).

Copy with raptor_uri_copy() to use.


RAPTOR_XMLSCHEMA_DATATYPES_URI

#define RAPTOR_XMLSCHEMA_DATATYPES_URI raptor_xmlschema_datatypes_namespace_uri

XML Schema Datatypes URI (xsd:).

Copy with raptor_uri_copy() to use.


RAPTOR_OWL_URI

#define RAPTOR_OWL_URI raptor_owl_namespace_uri

OWL Namespace URI (owl:).

Copy with raptor_uri_copy() to use.

raptor2-2.0.15/docs/html/raptor-formats-types-by-parser.html0000644000175000017500000001330312425347071020724 00000000000000 MIME Types by Parser

MIME Types by Parser

Gleaning Resource Descriptions from Dialects of Languages (grddl)

  • text/html with q 0.2

  • application/xhtml+xml with q 0.4

N-Quads (nquads)

  • text/x-nquads with q 1.0

N-Triples (ntriples)

  • application/n-triples with q 1.0

  • text/plain with q 0.1

RDF/A via librdfa (rdfa)

  • text/html with q 0.6

  • application/xhtml+xml with q 0.8

RDF/JSON (either Triples or Resource-Centric) (json)

  • application/json with q 0.1

  • text/json with q 0.1

RDF/XML (rdfxml)

  • application/rdf+xml with q 1.0

  • text/rdf with q 0.6

RSS Tag Soup (rss-tag-soup)

  • application/rss with q 0.8

  • application/rss+xml with q 0.8

  • text/rss with q 0.8

  • application/xml with q 0.3

  • text/xml with q 0.3

  • application/atom+xml with q 0.3

TriG - Turtle with Named Graphs (trig)

  • application/x-trig with q 1.0

Turtle Terse RDF Triple Language (turtle)

  • text/turtle with q 1.0

  • application/x-turtle with q 1.0

  • application/turtle with q 1.0

  • text/n3 with q 0.3

  • text/rdf+n3 with q 0.3

  • application/rdf+n3 with q 0.3

raptor2-2.0.15/docs/html/raptor2-section-option.html0000644000175000017500000007201612425347071017247 00000000000000 Options

Options

Options — Class options

Description

Options for several classes such as raptor_parser, raptor_serializer raptor_sax2 and raptor_xml_writer that can be get and set. Utility functions exist to enumerate them, their description and the parameter type taken.

Details

enum raptor_option

typedef enum {
  RAPTOR_OPTION_SCANNING,
  RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES,
  RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES,
  RAPTOR_OPTION_ALLOW_BAGID,
  RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST,
  RAPTOR_OPTION_NORMALIZE_LANGUAGE,
  RAPTOR_OPTION_NON_NFC_FATAL,
  RAPTOR_OPTION_WARN_OTHER_PARSETYPES,
  RAPTOR_OPTION_CHECK_RDF_ID,
  RAPTOR_OPTION_RELATIVE_URIS,
  RAPTOR_OPTION_WRITER_AUTO_INDENT,
  RAPTOR_OPTION_WRITER_AUTO_EMPTY,
  RAPTOR_OPTION_WRITER_INDENT_WIDTH,
  RAPTOR_OPTION_WRITER_XML_VERSION,
  RAPTOR_OPTION_WRITER_XML_DECLARATION,
  RAPTOR_OPTION_NO_NET,
  RAPTOR_OPTION_RESOURCE_BORDER,
  RAPTOR_OPTION_LITERAL_BORDER,
  RAPTOR_OPTION_BNODE_BORDER,
  RAPTOR_OPTION_RESOURCE_FILL,
  RAPTOR_OPTION_LITERAL_FILL,
  RAPTOR_OPTION_BNODE_FILL,
  RAPTOR_OPTION_HTML_TAG_SOUP,
  RAPTOR_OPTION_MICROFORMATS,
  RAPTOR_OPTION_HTML_LINK,
  RAPTOR_OPTION_WWW_TIMEOUT,
  RAPTOR_OPTION_WRITE_BASE_URI,
  RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL,
  RAPTOR_OPTION_WWW_HTTP_USER_AGENT,
  RAPTOR_OPTION_JSON_CALLBACK,
  RAPTOR_OPTION_JSON_EXTRA_DATA,
  RAPTOR_OPTION_RSS_TRIPLES,
  RAPTOR_OPTION_ATOM_ENTRY_URI,
  RAPTOR_OPTION_PREFIX_ELEMENTS,
  RAPTOR_OPTION_STRICT,
  RAPTOR_OPTION_WWW_CERT_FILENAME,
  RAPTOR_OPTION_WWW_CERT_TYPE,
  RAPTOR_OPTION_WWW_CERT_PASSPHRASE,
  RAPTOR_OPTION_NO_FILE,
  RAPTOR_OPTION_WWW_SSL_VERIFY_PEER,
  RAPTOR_OPTION_WWW_SSL_VERIFY_HOST,
  RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES,
  RAPTOR_OPTION_LAST = RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES
} raptor_option;

Raptor parser, serializer or XML writer options.

RAPTOR_OPTION_SCANNING

If true (default false), the RDF/XML parser will look for embedded rdf:RDF elements inside the XML content, and not require that the XML start with an rdf:RDF root element.

RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES

If true (default true) then the RDF/XML parser will allow non-XML namespaced attributes to be accepted as well as rdf: namespaced ones. For example, 'about' and 'ID' will be interpreted as if they were rdf:about and rdf:ID respectively.

RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES

If true (default true) then the RDF/XML parser will allow unknown parsetypes to be present and will pass them on to the user. Unimplemented at present.

RAPTOR_OPTION_ALLOW_BAGID

If true (default true) then the RDF/XML parser will support the rdf:bagID attribute that was removed from the RDF/XML language when it was revised. This support may be removed in future.

RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST

If true (default false) then the RDF/XML parser will generate the idList rdf:type rdf:List triple in the handling of rdf:parseType="Collection". This triple was removed during the revising of RDF/XML after collections were initially added.

RAPTOR_OPTION_NORMALIZE_LANGUAGE

If true (default true) then XML language values such as from xml:lang will be normalized to lowercase.

RAPTOR_OPTION_NON_NFC_FATAL

If true (default false) then illegal Unicode Normal Form C in literals will give a fatal error, otherwise just a warning.

RAPTOR_OPTION_WARN_OTHER_PARSETYPES

If true (default true) then the RDF/XML parser will warn about unknown rdf:parseType values.

RAPTOR_OPTION_CHECK_RDF_ID

If true (default true) then the RDF/XML will check rdf:ID attribute values for duplicates and cause an error if any are found.

RAPTOR_OPTION_RELATIVE_URIS

If true (default true) then relative URIs will be used wherever possible when serializing.

RAPTOR_OPTION_WRITER_AUTO_INDENT

Automatically indent elements when seriailizing.

RAPTOR_OPTION_WRITER_AUTO_EMPTY

Automatically detect and abbreviate empty elements when serializing.

RAPTOR_OPTION_WRITER_INDENT_WIDTH

Integer number of spaces to use for each indent level when serializing with auto indent.

RAPTOR_OPTION_WRITER_XML_VERSION

Integer XML version XML 1.0 (10) or XML 1.1 (11)

RAPTOR_OPTION_WRITER_XML_DECLARATION

Write XML 1.0 or 1.1 declaration.

RAPTOR_OPTION_NO_NET

Deny network requests inside other requests.

RAPTOR_OPTION_RESOURCE_BORDER

Border color of resource nodes for GraphViz DOT serializer.

RAPTOR_OPTION_LITERAL_BORDER

Border color of literal nodes for GraphViz DOT serializer.

RAPTOR_OPTION_BNODE_BORDER

Border color of blank nodes for GraphViz DOT serializer.

RAPTOR_OPTION_RESOURCE_FILL

Fill color of resource nodes for GraphViz DOT serializer.

RAPTOR_OPTION_LITERAL_FILL

Fill color of literal nodes for GraphViz DOT serializer.

RAPTOR_OPTION_BNODE_FILL

Fill color of blank nodes for GraphViz DOT serializer.

RAPTOR_OPTION_HTML_TAG_SOUP

Use a lax HTML parser if an XML parser fails when read HTML for GRDDL parser.

RAPTOR_OPTION_MICROFORMATS

Look for microformats for GRDDL parser.

RAPTOR_OPTION_HTML_LINK

Look for head <link> to type rdf/xml for GRDDL parser.

RAPTOR_OPTION_WWW_TIMEOUT

Set timeout for internal WWW URI requests for GRDDL parser.

RAPTOR_OPTION_WRITE_BASE_URI

Write base directive for Turtle/N3.

RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL

HTTP Cache-Control: header

RAPTOR_OPTION_WWW_HTTP_USER_AGENT

HTTP User-Agent: header

RAPTOR_OPTION_JSON_CALLBACK

JSON serializer callback function.

RAPTOR_OPTION_JSON_EXTRA_DATA

JSON serializer extra top-level data

RAPTOR_OPTION_RSS_TRIPLES

Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples)

RAPTOR_OPTION_ATOM_ENTRY_URI

Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found.

RAPTOR_OPTION_PREFIX_ELEMENTS

Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed.

RAPTOR_OPTION_STRICT

Boolean. If set, operate in strict conformance mode.

RAPTOR_OPTION_WWW_CERT_FILENAME

String. SSL client certificate filename

RAPTOR_OPTION_WWW_CERT_TYPE

String. SSL client certificate type

RAPTOR_OPTION_WWW_CERT_PASSPHRASE

String. SSL client certificate passphrase

RAPTOR_OPTION_NO_FILE

Deny file reading requests inside other requests.

RAPTOR_OPTION_WWW_SSL_VERIFY_PEER

Integer. SSL verify peer - non-0 to verify peer SSL certificate (default)

RAPTOR_OPTION_WWW_SSL_VERIFY_HOST

Integer. SSL verify host - 0 none, 1 CN match, 2 host match (default). Other values are ignored.

RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES

When reading XML, load external entities.

RAPTOR_OPTION_LAST

Internal

raptor_option_description

typedef struct {
  raptor_domain domain;
  raptor_option option;
  raptor_option_value_type value_type;
  const char* name;
  size_t name_len;
  const char* label;
  raptor_uri* uri;
} raptor_option_description;

Description of an option for a domain.

raptor_domain domain;

domain ID

raptor_option option;

option ID

raptor_option_value_type value_type;

data type of option value

const char *name;

short name for option

size_t name_len;

length of name

const char *label;

description of option

raptor_uri *uri;

URI identifying option

raptor_option_get_count ()

unsigned int        raptor_option_get_count             (void);

Get the count of options defined.

This is prefered to the compile time-only symbol RAPTOR_OPTION_LAST and returns a count of the number of options which is RAPTOR_OPTION_LAST + 1.

Returns :

count of options in the raptor_option enumeration

enum raptor_option_value_type

typedef enum {
  RAPTOR_OPTION_VALUE_TYPE_BOOL,
  RAPTOR_OPTION_VALUE_TYPE_INT,
  RAPTOR_OPTION_VALUE_TYPE_STRING,
  RAPTOR_OPTION_VALUE_TYPE_URI,
  RAPTOR_OPTION_VALUE_TYPE_LAST = RAPTOR_OPTION_VALUE_TYPE_URI
} raptor_option_value_type;

Option value types.

RAPTOR_OPTION_VALUE_TYPE_BOOL

Boolean integer value. Non-0 is true

RAPTOR_OPTION_VALUE_TYPE_INT

Decimal integer value

RAPTOR_OPTION_VALUE_TYPE_STRING

String value

RAPTOR_OPTION_VALUE_TYPE_URI

URI String value.

RAPTOR_OPTION_VALUE_TYPE_LAST

internal

raptor_option_get_value_type_label ()

const char *        raptor_option_get_value_type_label  (const raptor_option_value_type type);

Get a label for a value type

type :

value type

Returns :

label for type or NULL for invalid type

raptor_world_get_option_description ()

raptor_option_description * raptor_world_get_option_description
                                                        (raptor_world *world,
                                                         const raptor_domain domain,
                                                         const raptor_option option);

Get a description of an option for a domain.

The returned description must be freed with raptor_free_option_description().

world :

raptor world object

domain :

domain

option :

option enumeration (0+)

Returns :

option description or NULL on failure or if option is unknown

raptor_free_option_description ()

void                raptor_free_option_description      (raptor_option_description *option_description);

Destructor - free an option description object.

option_description :

option description

raptor_world_get_option_from_uri ()

raptor_option       raptor_world_get_option_from_uri    (raptor_world *world,
                                                         raptor_uri *uri);

Get an option ID from a URI

Option URIs are the concatenation of the string "http://feature.librdf.org/raptor-" plus the short name.

They are automatically returned for any option described with raptor_world_get_option_description().

world :

raptor_world instance

uri :

option URI

Returns :

< 0 if the option is unknown or on error
raptor2-2.0.15/docs/html/tutorial-parser-example.html0000644000175000017500000000664512425347071017501 00000000000000 Parsing example code

Parsing example code

Example 2. rdfprint.c: Parse an RDF/XML file and print the triples

#include <stdio.h>
#include <raptor2.h>

/* rdfprint.c: print triples from parsing RDF/XML */

static void
print_triple(void* user_data, raptor_statement* triple) 
{
  raptor_statement_print_as_ntriples(triple, stdout);
  fputc('\n', stdout);
}

int
main(int argc, char *argv[])
{
  raptor_world *world = NULL;
  raptor_parser* rdf_parser = NULL;
  unsigned char *uri_string;
  raptor_uri *uri, *base_uri;

  world = raptor_new_world();

  rdf_parser = raptor_new_parser(world, "rdfxml");

  raptor_parser_set_statement_handler(rdf_parser, NULL, print_triple);

  uri_string = raptor_uri_filename_to_uri_string(argv[1]);
  uri = raptor_new_uri(world, uri_string);
  base_uri = raptor_uri_copy(uri);

  raptor_parser_parse_file(rdf_parser, uri, base_uri);

  raptor_free_parser(rdf_parser);

  raptor_free_uri(base_uri);
  raptor_free_uri(uri);
  raptor_free_memory(uri_string);

  raptor_free_world(world);

  return 0;
}

Compile it like this:

$ gcc -o rdfprint rdfprint.c `pkg-config raptor2 --cflags --libs`

and run it on an RDF file as:

$ ./rdfprint raptor.rdf
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> .
_:genid1 <http://usefulinc.com/ns/doap#name> "Raptor" .
_:genid1 <http://usefulinc.com/ns/doap#homepage> <http://librdf.org/raptor/> .
...


raptor2-2.0.15/docs/html/raptor2-section-sequence.html0000644000175000017500000011443712425347071017553 00000000000000 Sequence

Sequence

Sequence — Ordered sequence of items.

Description

A utility class that provides access to small sequence of items that grow at the end and require quick ordered and indexed access. Can be used as a queue/FIFO but less efficiently than a stack where the items are added and removed from the end.

Details

raptor_sequence

raptor_sequence* raptor_sequence;

Raptor sequence class


raptor_new_sequence ()

raptor_sequence *   raptor_new_sequence                 (raptor_data_free_handler free_handler,
                                                         raptor_data_print_handler print_handler);

Constructor - create a new sequence with the given handlers.

This creates a sequence over objects that need only the item data pointers in order to print or free the objects.

For example sequences of strings could use handlers (free, NULL) and sequences of raptor_uri could use (raptor_free_uri, raptor_print_uri)

free_handler :

handler to free a sequence item

print_handler :

handler to print a sequence item to a FILE*

Returns :

a new raptor_sequence or NULL on failure

raptor_new_sequence_with_context ()

raptor_sequence *   raptor_new_sequence_with_context    (raptor_data_context_free_handler free_handler,
                                                         raptor_data_context_print_handler print_handler,
                                                         void *handler_context);

Constructor - create a new sequence with the given handlers and handler context.

This creates a sequence over objects that need context + item data pointers in order to print or free the objects.

free_handler :

handler to free a sequence item

print_handler :

handler to print a sequence item to a FILE*

handler_context :

context information to pass to free/print handlers

Returns :

a new raptor_sequence or NULL on failure

raptor_free_sequence ()

void                raptor_free_sequence                (raptor_sequence *seq);

Destructor - free a raptor_sequence

seq :

sequence to destroy

raptor_sequence_delete_at ()

void *              raptor_sequence_delete_at           (raptor_sequence *seq,
                                                         int idx);

Remove an item from a position a sequence, returning it

The item at the offset idx in the sequence is replaced with a NULL pointer and any existing item is returned. The caller owns the resulting item.

seq :

sequence object

idx :

index into sequence to operate at

Returns :

NULL on failure

raptor_sequence_get_at ()

void *              raptor_sequence_get_at              (raptor_sequence *seq,
                                                         int idx);

Retrieve an item at offset index in the sequence.

This is efficient to perform. raptor_sequence is optimised to append/remove from the end of the sequence.

After this call the item is still owned by the sequence.

seq :

sequence to use

idx :

index of item to get

Returns :

the object or NULL if index is out of range (0... sequence size - 1)

raptor_sequence_join ()

int                 raptor_sequence_join                (raptor_sequence *dest,
                                                         raptor_sequence *src);

Join two sequences moving all items from one sequence to the end of another.

After this operation, sequence src will be empty (zero size) but will have the same item capacity as before.

dest :

raptor_sequence destination sequence

src :

raptor_sequence source sequence

Returns :

non-0 on failure

raptor_sequence_next_permutation ()

int                 raptor_sequence_next_permutation    (raptor_sequence *seq,
                                                         raptor_data_compare_handler compare);

Get the next permutation of a sequence in lexicographic order

Assumes the initial order of the items is lexicographically increasing. This function alters the order of the items until the last permuatation is done at which point the contents is reset to the intial order.

Algorithm used is described in http://en.wikipedia.org/wiki/Permutation

The comparison function compare is compatible with that used for qsort() and provides the addresses of pointers to the data that must be dereferenced to get to the stored sequence data.

seq :

int seq

compare :

comparison function

Returns :

non-0 at the last permutation

raptor_sequence_pop ()

void *              raptor_sequence_pop                 (raptor_sequence *seq);

Retrieve the item at the end of the sequence.

Ownership of the item is transferred to the caller, i.e. caller is responsible of freeing the item.

seq :

sequence to use

Returns :

the object or NULL if the sequence is empty

raptor_sequence_print ()

int                 raptor_sequence_print               (raptor_sequence *seq,
                                                         FILE *fh);

Print the sequence contents using the print_handler to print the data items.

seq :

sequence to sort

fh :

file handle

Returns :

non-0 on failure

raptor_sequence_push ()

int                 raptor_sequence_push                (raptor_sequence *seq,
                                                         void *data);

Add an item to the end of the sequence.

The sequence takes ownership of the pushed item and frees it with the free_handler. On failure, the item is freed immediately.

seq :

sequence to add to

data :

item to add

Returns :

non-0 on failure

raptor_sequence_reverse ()

int                 raptor_sequence_reverse             (raptor_sequence *seq,
                                                         int start_index,
                                                         int length);

Reverse a range of elements

seq :

sequence

start_index :

starting index

length :

number of elements to reverse

Returns :

non-0 if arguments are out of range

raptor_sequence_set_at ()

int                 raptor_sequence_set_at              (raptor_sequence *seq,
                                                         int idx,
                                                         void *data);

Replace/set an item in a sequence.

The item at the offset idx in the sequence is replaced with the new item data (which may be NULL). Any existing item is freed with the sequence's free_handler. If necessary the sequence is extended (with NULLs) to handle a larger offset.

The sequence takes ownership of the new data item. On failure, the item is freed immediately.

seq :

sequence object

idx :

index into sequence to operate at

data :

new data item.

Returns :

non-0 on failure

raptor_sequence_shift ()

int                 raptor_sequence_shift               (raptor_sequence *seq,
                                                         void *data);

Add an item to the start of the sequence.

The sequence takes ownership of the shifted item and frees it with the free_handler. On failure, the item is freed immediately.

seq :

sequence to add to

data :

item to add

Returns :

non-0 on failure

raptor_sequence_size ()

int                 raptor_sequence_size                (raptor_sequence *seq);

Get the number of items in a sequence.

seq :

sequence object

Returns :

the sequence size (>=0)

raptor_sequence_sort ()

void                raptor_sequence_sort                (raptor_sequence *seq,
                                                         raptor_data_compare_handler compare);

Sort a sequence inline

The comparison function compare is compatible with that used for qsort() and provides the addresses of pointers to the data that must be dereferenced to get to the stored sequence data.

seq :

sequence to sort

compare :

comparison function with args (a, b)

raptor_sequence_sort_r ()

void                raptor_sequence_sort_r              (raptor_sequence *seq,
                                                         raptor_data_compare_arg_handler compare,
                                                         void *user_data);

Sort a sequence inline with user data

The comparison function compare_r is compatible with that used for raptor_sort_r() and provides the addresses of pointers to the data that must be dereferenced to get to the stored sequence data.

seq :

sequence to sort

compare :

comparison function with args (a, b, user data)

user_data :

User data argument for compare

raptor_sequence_swap ()

int                 raptor_sequence_swap                (raptor_sequence *seq,
                                                         int i,
                                                         int j);

Swap a pair of elements in a sequence

seq :

sequence

i :

first data index

j :

second data index

Returns :

non-0 if arguments are out of range

raptor_sequence_unshift ()

void *              raptor_sequence_unshift             (raptor_sequence *seq);

Retrieve the item at the start of the sequence.

Ownership of the item is transferred to the caller, i.e. caller is responsible of freeing the item.

seq :

sequence to use

Returns :

the object or NULL if the sequence is empty
raptor2-2.0.15/docs/html/tutorial.html0000644000175000017500000002136312425347071014550 00000000000000 Part I. Raptor Tutorial

Part I. Raptor Tutorial

This part describes how to use the Raptor APIs to turn syntaxes into RDF triples and RDF triples into syntaxes.

The next part contains the Raptor Reference Manual which comprehensively describes every class and function of the API.

For the latest information, see the Raptor Home Page and the main document overview in this document tree.

Table of Contents

Initialising and Finishing using the Library
Listing built-in functionality
Parsing syntaxes to RDF Triples
Introduction
Create the Parser object
Parser options
Set RDF statement callback handler
Set parsing log message handlers
Set the identifier creator handler
Set namespace declared handler
Set the parsing strictness
Provide syntax content to parse
Parse the content from a URI (raptor_parser_parse_uri())
Parse the content of a URI using an existing WWW connection (raptor_parser_parse_uri_with_connection())
Parse the content of a C FILE* (raptor_parser_parse_file_stream())
Parse the content of a file URI (raptor_parser_parse_file())
Parse chunks of syntax content provided by the application (raptor_parser_parse_start() and raptor_parser_parse_chunk())
Restrict parser network access
Filtering parser network requests with option RAPTOR_OPTION_NO_NET
Filtering parser network requests with raptor_www_set_uri_filter()
Filtering parser network requests with raptor_parser_set_uri_filter()
Setting timeout for parser network requests with option RAPTOR_OPTION_WWW_TIMEOUT
Querying parser static information
Querying parser run-time information
Aborting parsing
Destroy the parser
Parsing example code
Serializing RDF triples to a syntax
Introduction
Create the Serializer object
Serializer options
Declare namespaces
Set error and warning handlers
Provide a destination for the serialized syntax
Serialize to a filename (raptor_serializer_start_to_filename())
Serialize to a string (raptor_serializer_start_to_string())
Serialize to a FILE* file handle (raptor_serializer_start_to_file_handle())
Serialize to an raptor_iostream (raptor_serializer_start_to_iostream())
Get or construct RDF Statements (Triples)
Send RDF Triples to serializer
Querying serializer run-time information
Destroy the serializer
Serializing example code
raptor2-2.0.15/docs/html/raptor-formats-types-by-serializer.html0000644000175000017500000001455712425347071021615 00000000000000 MIME Types by Serializer

MIME Types by Serializer

Atom 1.0 (atom)

  • application/atom+xml with q 1.0

GraphViz DOT format (dot)

  • text/x-graphviz with q 0.5

HTML Table (html)

  • application/xhtml+xml with q 1.0

  • text/html with q 1.0

N-Quads (nquads)

  • text/x-nquads with q 1.0

N-Triples (ntriples)

  • application/n-triples with q 1.0

  • text/plain with q 0.1

RDF/JSON Resource-Centric (json)

  • application/json with q 1.0

  • text/json with q 0.1

RDF/JSON Triples (json-triples)

  • application/json with q 0.0

  • text/json with q 0.1

RDF/XML (rdfxml)

  • application/rdf+xml with q 1.0

  • text/rdf with q 0.6

RDF/XML (Abbreviated) (rdfxml-abbrev)

  • application/rdf+xml with q 0.0

RDF/XML (XMP Profile) (rdfxml-xmp)

  • application/rdf+xml with q 0.0

RSS 1.0 (rss-1.0)

  • application/rss+xml with q 1.0

  • application/rss with q 0.3

  • text/rss with q 0.3

  • application/xml with q 0.3

  • text/xml with q 0.3

Turtle Terse RDF Triple Language (turtle)

  • text/turtle with q 1.0

  • application/turtle with q 1.0

  • application/x-turtle with q 0.8

  • text/n3 with q 0.3

  • text/rdf+n3 with q 0.3

  • application/rdf+n3 with q 0.3

raptor2-2.0.15/docs/html/raptor2-section-parser.html0000644000175000017500000020000412425347071017221 00000000000000 Parser

Parser

Parser — RDF parsers - from a syntax to RDF triples

Synopsis

typedef             raptor_parser;
raptor_parser *     raptor_new_parser                   (raptor_world *world,
                                                         const char *name);
raptor_parser *     raptor_new_parser_for_content       (raptor_world *world,
                                                         raptor_uri *uri,
                                                         const char *mime_type,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         const unsigned char *identifier);
void                raptor_free_parser                  (raptor_parser *parser);
void                (*raptor_graph_mark_handler)        (void *user_data,
                                                         raptor_uri *graph,
                                                         int flags);
void                (*raptor_namespace_handler)         (void *user_data,
                                                         raptor_namespace *nspace);
void                raptor_parser_set_statement_handler (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_statement_handler handler);
enum                raptor_graph_mark_flags;
void                raptor_parser_set_graph_mark_handler
                                                        (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_graph_mark_handler handler);
void                raptor_parser_set_namespace_handler (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_namespace_handler handler);
const raptor_syntax_description * raptor_parser_get_description
                                                        (raptor_parser *rdf_parser);
raptor_locator *    raptor_parser_get_locator           (raptor_parser *rdf_parser);
void                raptor_parser_parse_abort           (raptor_parser *rdf_parser);
int                 raptor_parser_parse_chunk           (raptor_parser *rdf_parser,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);
int                 raptor_parser_parse_file            (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);
int                 raptor_parser_parse_file_stream     (raptor_parser *rdf_parser,
                                                         FILE *stream,
                                                         const char *filename,
                                                         raptor_uri *base_uri);
int                 raptor_parser_parse_iostream        (raptor_parser *rdf_parser,
                                                         raptor_iostream *iostr,
                                                         raptor_uri *base_uri);
int                 raptor_parser_parse_start           (raptor_parser *rdf_parser,
                                                         raptor_uri *uri);
int                 raptor_parser_parse_uri             (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);
int                 raptor_parser_parse_uri_with_connection
                                                        (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri,
                                                         void *connection);
raptor_uri *        raptor_parser_get_graph             (raptor_parser *rdf_parser);
const char *        raptor_parser_get_name              (raptor_parser *rdf_parser);
int                 raptor_parser_set_option            (raptor_parser *parser,
                                                         raptor_option option,
                                                         const char *string,
                                                         int integer);
int                 raptor_parser_get_option            (raptor_parser *parser,
                                                         raptor_option option,
                                                         char **string_p,
                                                         int *integer_p);
const char *        raptor_parser_get_accept_header     (raptor_parser *rdf_parser);
void                raptor_parser_set_uri_filter        (raptor_parser *parser,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);
raptor_world *      raptor_parser_get_world             (raptor_parser *rdf_parser);

Description

The parsing class that allows creating a parser for reading from a particular syntax (or can guess and use contextual information) that will on demand generate RDF triples to a handler function, as chunks of syntax data are passed into the parser. Parsing can be done from strings in memory, files or from URIs on the web.

There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how parsing is performed.

Details

raptor_parser

raptor_parser* raptor_parser;

Raptor Parser class


raptor_new_parser ()

raptor_parser *     raptor_new_parser                   (raptor_world *world,
                                                         const char *name);

Constructor - create a new raptor_parser object.

world :

world object

name :

the parser name or NULL for default parser

Returns :

a new raptor_parser object or NULL on failure

raptor_new_parser_for_content ()

raptor_parser *     raptor_new_parser_for_content       (raptor_world *world,
                                                         raptor_uri *uri,
                                                         const char *mime_type,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         const unsigned char *identifier);

Constructor - create a new raptor_parser.

Uses raptor_world_guess_parser_name() to find a parser by scoring recognition of the syntax by a block of characters, the content identifier or a mime type. The content identifier is typically a filename or URI or some other identifier.

world :

world object

uri :

URI identifying the syntax (or NULL)

mime_type :

mime type identifying the content (or NULL)

buffer :

buffer of content to guess (or NULL)

len :

length of buffer

identifier :

identifier of content (or NULL)

Returns :

a new raptor_parser object or NULL on failure

raptor_free_parser ()

void                raptor_free_parser                  (raptor_parser *parser);

Destructor - destroy a raptor_parser object.

parser :

raptor_parser object

raptor_graph_mark_handler ()

void                (*raptor_graph_mark_handler)        (void *user_data,
                                                         raptor_uri *graph,
                                                         int flags);

Graph start/end mark handler function.

Records start and end of graphs happening in a stream of generated raptor_statement via the statement handler. The callback starts a graph when flags has RAPTOR_GRAPH_MARK_START bit set.

The start and ends may be either declared in the syntax via some keyword or mechanism such as TRiG {} syntax when flags has bit RAPTOR_GRAPH_MARK_DECLARED set, or be implied by the start/end of the data in other syntaxes, and the bit will be unset.

user_data :

user data

graph :

graph to report, NULL for the default graph

flags :

bitmask of raptor_graph_mark_flags flags

raptor_namespace_handler ()

void                (*raptor_namespace_handler)         (void *user_data,
                                                         raptor_namespace *nspace);

XML Namespace declaration reporting handler set by raptor_parser_set_namespace_handler().

user_data :

user data

nspace :

raptor_namespace declared

raptor_parser_set_statement_handler ()

void                raptor_parser_set_statement_handler (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_statement_handler handler);

Set the statement handler function for the parser.

Use this to set the function to receive statements as the parsing proceeds. The statement argument to handler is shared and must be copied by the caller with raptor_statement_copy().

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

new statement callback function

enum raptor_graph_mark_flags

typedef enum {
  RAPTOR_GRAPH_MARK_START = 1,
  RAPTOR_GRAPH_MARK_DECLARED = 2
} raptor_graph_mark_flags;

Graph mark handler bitmask flags

RAPTOR_GRAPH_MARK_START

mark is start of graph (otherwise is end)

RAPTOR_GRAPH_MARK_DECLARED

mark was declared in syntax rather than implict

raptor_parser_set_graph_mark_handler ()

void                raptor_parser_set_graph_mark_handler
                                                        (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_graph_mark_handler handler);

Set the graph mark handler function for the parser.

See raptor_graph_mark_handler and raptor_graph_mark_flags for the marks that may be returned by the handler.

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

new graph callback function

raptor_parser_set_namespace_handler ()

void                raptor_parser_set_namespace_handler (raptor_parser *parser,
                                                         void *user_data,
                                                         raptor_namespace_handler handler);

Set the namespace handler function for the parser.

When a prefix/namespace is seen in a parser, call the given handler with the prefix string and the raptor_uri namespace URI. Either can be NULL for the default prefix or default namespace.

The handler function does not deal with duplicates so any namespace may be declared multiple times.

parser :

raptor_parser parser object

user_data :

user data pointer for callback

handler :

new namespace callback function

raptor_parser_get_description ()

const raptor_syntax_description * raptor_parser_get_description
                                                        (raptor_parser *rdf_parser);

Get description of the syntaxes of the parser.

The returned description is static and lives as long as the raptor library (raptor world).

rdf_parser :

raptor_parser parser object

Returns :

description of syntax

raptor_parser_get_locator ()

raptor_locator *    raptor_parser_get_locator           (raptor_parser *rdf_parser);

Get the current raptor locator object.

rdf_parser :

raptor parser

Returns :

raptor locator

raptor_parser_parse_abort ()

void                raptor_parser_parse_abort           (raptor_parser *rdf_parser);

Abort an ongoing parsing.

Causes any ongoing generation of statements by a parser to be terminated and the parser to return controlto the application as soon as draining any existing buffers.

Most useful inside raptor_parser_parse_file() or raptor_parser_parse_uri() when the Raptor library is directing the parsing and when one of the callback handlers such as as set by raptor_parser_set_statement_handler() requires to return to the main application code.

rdf_parser :

raptor_parser parser object

raptor_parser_parse_chunk ()

int                 raptor_parser_parse_chunk           (raptor_parser *rdf_parser,
                                                         const unsigned char *buffer,
                                                         size_t len,
                                                         int is_end);

Parse a block of content into triples.

This method can only be called after raptor_parser_parse_start() has initialised the parser.

rdf_parser :

RDF parser

buffer :

content to parse

len :

length of buffer

is_end :

non-0 if this is the end of the content (such as EOF)

Returns :

non-0 on failure.

raptor_parser_parse_file ()

int                 raptor_parser_parse_file            (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);

Parse RDF content at a file URI.

If uri is NULL (source is stdin), then the base_uri is required.

rdf_parser :

parser

uri :

URI of RDF content or NULL to read from standard input

base_uri :

the base URI to use (or NULL if the same)

Returns :

non 0 on failure

raptor_parser_parse_file_stream ()

int                 raptor_parser_parse_file_stream     (raptor_parser *rdf_parser,
                                                         FILE *stream,
                                                         const char *filename,
                                                         raptor_uri *base_uri);

Parse RDF content from a FILE*.

After draining the FILE* stream (EOF), fclose is not called on it.

rdf_parser :

parser

stream :

FILE* of RDF content

filename :

filename of content or NULL if it has no name

base_uri :

the base URI to use

Returns :

non 0 on failure

raptor_parser_parse_iostream ()

int                 raptor_parser_parse_iostream        (raptor_parser *rdf_parser,
                                                         raptor_iostream *iostr,
                                                         raptor_uri *base_uri);

Parse content from an iostream

If the parser requires a base URI and base_uri is NULL, an error will be generated and the function will fail.

rdf_parser :

parser

iostr :

iostream to read from

base_uri :

the base URI to use (or NULL)

Returns :

non 0 on failure, <0 if a required base URI was missing

raptor_parser_parse_start ()

int                 raptor_parser_parse_start           (raptor_parser *rdf_parser,
                                                         raptor_uri *uri);

Start a parse of content with base URI.

Parsers that need a base URI can be identified using a syntax description returned by raptor_world_get_parser_description() statically or raptor_parser_get_description() on a constructed parser.

rdf_parser :

RDF parser

uri :

base URI or may be NULL if no base URI is required

Returns :

non-0 on failure, <0 if a required base URI was missing

raptor_parser_parse_uri ()

int                 raptor_parser_parse_uri             (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri);

Parse the RDF content at URI.

Sends an HTTP Accept: header whent the URI is of the HTTP protocol, see raptor_parser_parse_uri_with_connection() for details including how the base_uri is used.

rdf_parser :

parser

uri :

URI of RDF content

base_uri :

the base URI to use (or NULL if the same)

Returns :

non 0 on failure

raptor_parser_parse_uri_with_connection ()

int                 raptor_parser_parse_uri_with_connection
                                                        (raptor_parser *rdf_parser,
                                                         raptor_uri *uri,
                                                         raptor_uri *base_uri,
                                                         void *connection);

Parse RDF content at URI using existing WWW connection.

If base_uri is not given and during resolution of the URI, a protocol redirection occurs, the final resolved URI will be used as the base URI. If redirection does not occur, the base URI will be uri.

If base_uri is given, it overrides the process above.

When connection is NULL and a MIME Type exists for the parser type, this type is sent in an HTTP Accept: header in the form Accept: MIME-TYPE along with a wildcard of 0.1 quality, so MIME-TYPE is prefered rather than the sole answer. The latter part may not be necessary but should ensure an HTTP 200 response.

rdf_parser :

parser

uri :

URI of RDF content

base_uri :

the base URI to use (or NULL if the same)

connection :

connection object pointer or NULL to create a new one

Returns :

non 0 on failure

raptor_parser_get_graph ()

raptor_uri *        raptor_parser_get_graph             (raptor_parser *rdf_parser);

Get the current graph for the parser

The returned URI is owned by the caller and must be freed with raptor_free_uri()

rdf_parser :

parser

Returns :

raptor_uri* graph name or NULL for the default graph

raptor_parser_get_name ()

const char *        raptor_parser_get_name              (raptor_parser *rdf_parser);

Get the name of a parser.

Use raptor_parser_get_description() to get the alternate names and aliases as well as other descriptive values.

rdf_parser :

raptor_parser parser object

Returns :

the short name for the parser.

raptor_parser_set_option ()

int                 raptor_parser_set_option            (raptor_parser *parser,
                                                         raptor_option option,
                                                         const char *string,
                                                         int integer);

Set parser option.

If string is not NULL and the option type is numeric, the string value is converted to an integer and used in preference to integer.

If string is NULL and the option type is not numeric, an error is returned.

The string values used are copied.

The allowed options are available via raptor_world_get_option_description().

parser :

raptor_parser parser object

option :

option to set from enumerated raptor_option values

string :

string option value (or NULL)

integer :

integer option value

Returns :

non 0 on failure or if the option is unknown

raptor_parser_get_option ()

int                 raptor_parser_get_option            (raptor_parser *parser,
                                                         raptor_option option,
                                                         char **string_p,
                                                         int *integer_p);

Get parser option.

Any string value returned in *string_p is shared and must be copied by the caller.

The allowed options are available via raptor_world_get_option_description().

parser :

raptor_parser parser object

option :

option to get value

string_p :

pointer to where to store string value

integer_p :

pointer to where to store integer value

Returns :

option value or < 0 for an illegal option

raptor_parser_get_accept_header ()

const char *        raptor_parser_get_accept_header     (raptor_parser *rdf_parser);

Get an HTTP Accept value for the parser.

The returned string must be freed by the caller such as with raptor_free_memory().

rdf_parser :

parser

Returns :

a new Accept: header string or NULL on failure

raptor_parser_set_uri_filter ()

void                raptor_parser_set_uri_filter        (raptor_parser *parser,
                                                         raptor_uri_filter_func filter,
                                                         void *user_data);

Set URI filter function for WWW retrieval.

parser :

parser object

filter :

URI filter function

user_data :

User data to pass to filter function

raptor_parser_get_world ()

raptor_world *      raptor_parser_get_world             (raptor_parser *rdf_parser);

Get the raptor_world object associated with a parser.

rdf_parser :

parser

Returns :

raptor_world* pointer
raptor2-2.0.15/docs/html/raptor2-section-locator.html0000644000175000017500000003506612425347071017406 00000000000000 Locator

Locator

Locator — Location information for errors, warnings and messages.

Synopsis

                    raptor_locator;
int                 raptor_locator_print                (raptor_locator *locator,
                                                         FILE *stream);
int                 raptor_locator_format               (char *buffer,
                                                         size_t length,
                                                         raptor_locator *locator);
int                 raptor_locator_line                 (raptor_locator *locator);
int                 raptor_locator_column               (raptor_locator *locator);
int                 raptor_locator_byte                 (raptor_locator *locator);
const char *        raptor_locator_file                 (raptor_locator *locator);
const char *        raptor_locator_uri                  (raptor_locator *locator);

Description

A small structure that can be optionally filled in when errors, warnings or other messages are generated and returned to user code.

Details

raptor_locator

typedef struct {
  raptor_uri *uri;
  const char *file;
  int line;
  int column;
  int byte;  
} raptor_locator;

Location information for an error, warning or information message.

raptor_uri *uri;

URI of location (or NULL)

const char *file;

Filename of location (or NULL)

int line;

Line number of location (or <0 for no line)

int column;

Column number of location (or <0 for no column)

int byte;

Byte number of location (or <0 for no byte)

raptor_locator_print ()

int                 raptor_locator_print                (raptor_locator *locator,
                                                         FILE *stream);

Print a raptor locator to a stream.

locator :

raptor_locator to print

stream :

stream to print to

Returns :

non-0 on failure

raptor_locator_format ()

int                 raptor_locator_format               (char *buffer,
                                                         size_t length,
                                                         raptor_locator *locator);

Format a raptor locator as a string.

If buffer is NULL or length is insufficient for the size of the locator, returns the number of additional bytes required in the buffer to write the locator. Writes a terminating '\0'.

buffer :

buffer to store format

length :

size of buffer (excluding NUL)

locator :

raptor_locator to format

Returns :

0 on success, >0 if additional bytes required in buffer, <0 on failure

raptor_locator_line ()

int                 raptor_locator_line                 (raptor_locator *locator);

Get line number from locator.

locator :

locator

Returns :

integer line number, or -1 if there is no line number available

raptor_locator_column ()

int                 raptor_locator_column               (raptor_locator *locator);

Get column number from locator.

locator :

locator

Returns :

integer column number, or -1 if there is no column number available

raptor_locator_byte ()

int                 raptor_locator_byte                 (raptor_locator *locator);

Get the locator byte offset from locator.

locator :

locator

Returns :

integer byte number, or -1 if there is no byte offset available

raptor_locator_file ()

const char *        raptor_locator_file                 (raptor_locator *locator);

Get file name from locator.

locator :

locator

Returns :

string file name, or NULL if there is no filename available

raptor_locator_uri ()

const char *        raptor_locator_uri                  (raptor_locator *locator);

Get URI from locator.

Returns a pointer to a shared string version of the URI in the locator. This must be copied if it is needed.

locator :

locator

Returns :

string URI, or NULL if there is no URI available
raptor2-2.0.15/docs/html/tutorial-serializer-set-error-warning-handlers.html0000644000175000017500000000624512425347071024102 00000000000000 Set error and warning handlers

Set error and warning handlers

Any time before serializing is started, a log handler can be set on the world object via the raptor_world_set_log_handler() method to report errors and warnings from parsing. The method takes a user data argument plus a handler callback of type raptor_log_handler with a signature that looks like this:

void
message_handler(void *user_data, raptor_log_message* message)
{
  /* do something with the message */
}

The handler gets the user data pointer as well as a raptor_log_handler pointer that includes associated location information, such as the log level, raptor_locator, and the log message itself. The locator structure contains full information on the details of where in the file or URI the message occurred.

raptor2-2.0.15/docs/html/introduction.html0000644000175000017500000000367212425347071015431 00000000000000 Raptor Overview

Raptor Overview

Raptor is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. It also includes supporting functionality for managing Unicode, UTF-8, URIs, retrieving from URIs and reading and writing XML.

raptor2-2.0.15/docs/tmpl/0000755000175000017500000000000012425347071012102 500000000000000raptor2-2.0.15/docs/tmpl/section-parser.sgml0000644000175000017500000000742112425347071015650 00000000000000 Parser RDF parsers - from a syntax to RDF triples The parsing class that allows creating a parser for reading from a particular syntax (or can guess and use contextual information) that will on demand generate RDF triples to a handler function, as chunks of syntax data are passed into the parser. Parsing can be done from strings in memory, files or from URIs on the web. There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how parsing is performed. @world: @name: @Returns: @world: @uri: @mime_type: @buffer: @len: @identifier: @Returns: @parser: @user_data: @graph: @flags: @user_data: @nspace: @parser: @user_data: @handler: @RAPTOR_GRAPH_MARK_START: @RAPTOR_GRAPH_MARK_DECLARED: @parser: @user_data: @handler: @parser: @user_data: @handler: @rdf_parser: @Returns: @rdf_parser: @Returns: @rdf_parser: @rdf_parser: @buffer: @len: @is_end: @Returns: @rdf_parser: @uri: @base_uri: @Returns: @rdf_parser: @stream: @filename: @base_uri: @Returns: @rdf_parser: @iostr: @base_uri: @Returns: @rdf_parser: @uri: @Returns: @rdf_parser: @uri: @base_uri: @Returns: @rdf_parser: @uri: @base_uri: @connection: @Returns: @rdf_parser: @Returns: @rdf_parser: @Returns: @parser: @option: @string: @integer: @Returns: @parser: @option: @string_p: @integer_p: @Returns: @rdf_parser: @Returns: @parser: @filter: @user_data: @rdf_parser: @Returns: raptor2-2.0.15/docs/tmpl/section-memory.sgml0000644000175000017500000000137112425347071015662 00000000000000 Memory Memory handling functions Wrappers around the free, malloc and calloc functions but called from inside the library. Required by some systems to handle multiple-HEAPs and pass memory to and from the library. @ptr: @size: @Returns: @nmemb: @size: @Returns: raptor2-2.0.15/docs/tmpl/raptor2-unused.sgml0000644000175000017500000002735212425347071015611 00000000000000 A factory that allows registering an implementation for the URI class to override the simple internal one (#raptor_uri are char*). Normally used by redland to replace #raptor_uri with #librdf_uri Provide an implementation for the URI class. URI Factory @a: @b: @Returns: @magic: @world: @locator: @last_log_level: @handlers: @world: @error_handlers: @buffer: @length: @locator: @Returns: @RAPTOR_GENID_TYPE_BNODEID: @RAPTOR_GENID_TYPE_BAGID: @user_data: @graph: @iostr: @integer: @width: @Returns: @version: @init: @finish: @write_byte: @write_bytes: @write_end: @read_bytes: @read_eof: @iostr: @string: @len: @Returns: @iostr: @integer: @Returns: @iostr: @ns: @Returns: @iostr: @qname: @Returns: @iostr: @statement: @iostr: @string: @Returns: @iostr: @string: @len: @delim: @Returns: @iostr: @string: @len: @delim: @flags: @Returns: @iostr: @sb: @Returns: @iostr: @uri: @Returns: @iostr: @string: @len: @quote: @xml_version: @Returns: @iostr: @element: @nstack: @is_empty: @is_end: @depth: @Returns: @iostr: @string: @len: @quote: @Returns: @RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE: @RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE: @locator: @Returns: @user_data: @locator: @message: @user_data: @handler: @nstack: @ns: @new_depth: @Returns: @ns: @length_p: @Returns: @nstack: @uri: @xml_version: @Returns: @world: @user_data: @handler2: @Returns: @string: @prefix: @uri_string: @Returns: @option: @Returns: @rdf_parser: @uri: @base_uri: @Returns: @rdf_parser: @stream: @filename: @base_uri: @Returns: @rdf_parser: @uri: @base_uri: @Returns: @rdf_parser: @uri: @base_uri: @connection: @Returns: @parser: @feature: @Returns: @rdf_parser: @Returns: @rdf_parser: @Returns: @rdf_parser: @Returns: @rdf_parser: @type: @Returns: @Returns: @parser: @option: @Returns: @rdf_parser: @prefix: @base: @parser: @feature: @value: @Returns: @parser: @user_data: @handler: @parser: @user_data: @handler: @parser: @option: @value: @Returns: @rdf_parser: @is_strict: @locator: @stream: @string: @delim: @stream: @Returns: @data: @fh: @seq: @print_handler: @rdf_serializer: @Returns: @rdf_serializer: @uri: @prefix: @Returns: @rdf_serializer: @nspace: @Returns: @rdf_serializer: @uri: @fh: @Returns: @rdf_serializer: @filename: @Returns: @rdf_serializer: @uri: @iostream: @Returns: @rdf_serializer: @uri: @string_p: @length_p: @Returns: @rdf_serializer: @statement: @Returns: @serializer: @feature: @Returns: @serializer: @feature: @Returns: @serializer: @option: @Returns: @serializer: @feature: @value: @Returns: @serializer: @feature: @value: @Returns: @serializer: @option: @value: @Returns: @term: @len_p: @Returns: @term: @Returns: @c: @output: @Returns: @string: @length: @Returns: @output: @input: @length: @Returns: @world: @option: @name: @uri: @label: @Returns: @world: @counter: @name: @label: @mime_type: @uri_string: @Returns: @world: @option: @name: @uri: @label: @Returns: @world: @option: @name: @uri: @label: @Returns: @world: @counter: @name: @label: @mime_type: @uri_string: @Returns: @world: @option: @name: @uri: @label: @Returns: @world: @user_data: @handler: @world: @user_data: @handler: @world: @flags: @world: @user_data: @handler: @world: @flags: @world: @www: @world: @Returns: @world: @Returns: @world: @connection: @Returns: @world: @world: @string: @len: @buffer: @length: @quote: @xml_version: @Returns: @string: @len: @quote: @xml_version: @iostr: @Returns: @string: @len: @quote: @iostr: @Returns: @xml_writer: @feature: @Returns: @xml_writer: @feature: @Returns: @xml_writer: @option: @Returns: @xml_writer: @feature: @value: @Returns: @xml_writer: @feature: @value: @Returns: @xml_writer: @option: @value: @Returns: raptor2-2.0.15/docs/tmpl/section-xml.sgml0000644000175000017500000001045212425347071015152 00000000000000 XML XML and XML Writer XML elements with optional attributes and an XML Writer class that can format #raptor_xml_element into output forms, with optional "pretty printing" features such as indenting and collapsing empty elements. Also includes a utility function #raptor_xml_name_check for checking a name is legal in some XML version. @name: @xml_language: @xml_base: @Returns: @ns: @name: @xml_language: @xml_base: @Returns: @element: @xml_element: @Returns: @xml_element: @Returns: @xml_element: @Returns: @xml_element: @attributes: @count: @xml_element: @nspace: @Returns: @xml_element: @Returns: @xml_element: @Returns: @element: @nstack: @is_empty: @is_end: @depth: @iostr: @Returns: @world: @nstack: @iostr: @Returns: @xml_writer: @xml_writer: @element: @xml_writer: @element: @xml_writer: @element: @xml_writer: @s: @xml_writer: @s: @len: @xml_writer: @s: @xml_writer: @s: @len: @xml_writer: @s: @xml_writer: @s: @len: @xml_writer: @xml_writer: @xml_writer: @Returns: @xml_writer: @option: @string: @integer: @Returns: @xml_writer: @option: @string_p: @integer_p: @Returns: @world: @string: @len: @buffer: @length: @quote: @xml_version: @Returns: @string: @len: @quote: @xml_version: @iostr: @Returns: @world: @string: @len: @buffer: @length: @quote: @Returns: @string: @len: @quote: @iostr: @Returns: @string: @length: @xml_version: @Returns: raptor2-2.0.15/docs/tmpl/section-world.sgml0000644000175000017500000000467312425347071015511 00000000000000 Initialisation Library startup, shutdown and configuration. How to initialise and terminate the library, set library-wide configuration flags and options. @Returns: @world: @Returns: @world: @RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE: @RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE: @RAPTOR_WORLD_FLAG_URI_INTERNING: @RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH: @world: @flag: @value: @Returns: @world: @security_preferences: @Returns: @world: @user_data: @handler: @Returns: @world: @counter: @Returns: @world: @name: @Returns: @world: @uri: @mime_type: @buffer: @len: @identifier: @Returns: @world: @counter: @Returns: @world: @name: @Returns: @world: @Returns: @world: @user_data: @handler: @world: @prefix: @base: @world: @Returns: @world: @Returns: raptor2-2.0.15/docs/tmpl/section-sequence.sgml0000644000175000017500000000460012425347071016160 00000000000000 Sequence Ordered sequence of items. A utility class that provides access to small sequence of items that grow at the end and require quick ordered and indexed access. Can be used as a queue/FIFO but less efficiently than a stack where the items are added and removed from the end. @free_handler: @print_handler: @Returns: @free_handler: @print_handler: @handler_context: @Returns: @seq: @seq: @idx: @Returns: @seq: @idx: @Returns: @dest: @src: @Returns: @seq: @compare: @Returns: @seq: @Returns: @seq: @fh: @Returns: @seq: @data: @Returns: @seq: @start_index: @length: @Returns: @seq: @idx: @data: @Returns: @seq: @data: @Returns: @seq: @Returns: @seq: @compare: @seq: @compare: @user_data: @seq: @i: @j: @Returns: @seq: @Returns: raptor2-2.0.15/docs/tmpl/section-uri.sgml0000644000175000017500000001110612425347071015146 00000000000000 URI URI class and relative URI computation A class for absolute URIs used inside raptor and relative URI computation utility functions used inside the main Redland #librdf_uri class. Only absolute URIs are provided, with no current access to internals of URIs such as URI scheme, path, authority. @world: @uri_string: @Returns: @world: @uri_string: @length: @Returns: @world: @uri: @local_name: @Returns: @world: @base_uri: @uri_or_file_string: @Returns: @world: @base_uri: @uri_string: @Returns: @world: @base_uri: @uri_string: @uri_len: @Returns: @world: @base_uri: @id: @Returns: @world: @name: @Returns: @old_uri: @Returns: @old_uri: @Returns: @uri: @uri1: @uri2: @Returns: @uri1: @uri2: @Returns: @uri: @Returns: @uri: @Returns: @uri: @len_p: @Returns: @base_uri: @reference_uri: @length_p: @Returns: @base_uri: @reference_uri: @Returns: @uri: @len_p: @Returns: @uri: @Returns: @base_uri: @reference_uri: @buffer: @length: @Returns: @filename: @filename_len: @Returns: @filename: @Returns: @uri_string: @Returns: @uri_string: @Returns: @uri_string: @Returns: @uri_string: @fragment_p: @Returns: @uri_string: @len_p: @fragment_p: @fragment_len_p: @Returns: @uri: @stream: @Returns: @uri: @Returns: @uri: @iostr: @Returns: @uri: @Returns: @path: @Returns: @world: @uri: @nstack: @base_uri: @len_p: @Returns: @world: @uri: @nstack: @base_uri: @Returns: @world: @iostr: @uri: @nstack: @base_uri: @Returns: raptor2-2.0.15/docs/tmpl/section-serializer.sgml0000644000175000017500000000534212425347071016525 00000000000000 Serializer RDF serializers - from RDF triples to a syntax The serializing class that allows creating a serializer for writing a particular syntax to an output string, file, file handle or user function (via #raptor_iostream). There are also methods to deal with handling errors, warnings and returned triples as well as setting options (features) that can adjust how serializing is performed. @world: @name: @Returns: @rdf_serializer: @rdf_serializer: @uri: @iostream: @Returns: @rdf_serializer: @filename: @Returns: @rdf_serializer: @uri: @string_p: @length_p: @Returns: @rdf_serializer: @uri: @fh: @Returns: @rdf_serializer: @uri: @prefix: @Returns: @rdf_serializer: @nspace: @Returns: @rdf_serializer: @statement: @Returns: @rdf_serializer: @Returns: @rdf_serializer: @Returns: @rdf_serializer: @Returns: @serializer: @Returns: @rdf_serializer: @Returns: @serializer: @option: @string: @integer: @Returns: @serializer: @option: @string_p: @integer_p: @Returns: @rdf_serializer: @Returns: raptor2-2.0.15/docs/tmpl/section-iostream.sgml0000644000175000017500000001210612425347071016173 00000000000000 I/O Stream Providing streaming I/O writing to files, strings or user code. An class providing an I/O writer abstraction that allows generating output that can be stored or passed on to system files, strings allocated in memory (usually via #raptor_stringbuffer), system file handles (FILE*) or to a user function. @context: @Returns: @context: @context: @byte: @Returns: @context: @ptr: @size: @nmemb: @Returns: @context: @Returns: @context: @ptr: @size: @nmemb: @Returns: @context: @Returns: @version: @init: @finish: @write_byte: @write_bytes: @write_end: @read_bytes: @read_eof: @world: @user_data: @handler: @Returns: @world: @Returns: @world: @filename: @Returns: @world: @handle: @Returns: @world: @string: @length: @Returns: @world: @Returns: @world: @filename: @Returns: @world: @handle: @Returns: @world: @string_p: @length_p: @malloc_handler: @Returns: @iostr: @integer: @width: @iostr: @Returns: @ptr: @size: @nmemb: @iostr: @Returns: @iostr: @Returns: @iostr: @Returns: @string: @len: @iostr: @Returns: @integer: @iostr: @Returns: @string: @iostr: @Returns: @byte: @iostr: @Returns: @ptr: @size: @nmemb: @iostr: @Returns: @iostr: @Returns: @bnodeid: @len: @iostr: @Returns: @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF: @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU: @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8: @RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES: @RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL: @RAPTOR_ESCAPED_WRITE_NTRIPLES_URI: @RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL: @RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL: @RAPTOR_ESCAPED_WRITE_SPARQL_URI: @RAPTOR_ESCAPED_WRITE_TURTLE_URI: @RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL: @RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL: @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: @string: @len: @delim: @flags: @iostr: @Returns: @term: @flags: @iostr: @Returns: @uri: @base_uri: @flags: @iostr: @Returns: @string: @len: @delim: @iostr: @Returns: @string: @len: @delim: @mode: @iostr: @Returns: raptor2-2.0.15/docs/tmpl/section-unused.sgml0000644000175000017500000000157012425347071015656 00000000000000 Unused Unused Unused When defined before a function, indicates that the function has been deprecated and may be replaced in a future release. With some versions of gcc this may give a compilation warning. @string_index: @first_to_check_index: @version_decimal: @Returns: raptor2-2.0.15/docs/tmpl/section-stringbuffer.sgml0000644000175000017500000000442612425347071017056 00000000000000 String buffer Append-only strings. A utility class that allows easy construction of strings that grow at the end by appending new strings. Primarily used for constructing/serializing syntaxes into strings by the #raptor_iostream and #raptor_serializer classes. @void: @Returns: @stringbuffer: @stringbuffer: @string: @length: @do_copy: @Returns: @stringbuffer: @integer: @Returns: @stringbuffer: @hex: @Returns: @stringbuffer: @string: @do_copy: @Returns: @stringbuffer: @append: @Returns: @sb: @string: @length: @space_is_plus: @Returns: @stringbuffer: @string: @length: @do_copy: @Returns: @stringbuffer: @string: @do_copy: @Returns: @stringbuffer: @Returns: @stringbuffer: @Returns: @stringbuffer: @string: @length: @Returns: @sb: @iostr: @Returns: raptor2-2.0.15/docs/tmpl/section-xml-qname.sgml0000644000175000017500000000375012425347071016254 00000000000000 XML QName XML Namespace-qualified names. Wraps an XML name inside an associated XML namespace in some XML document context (typically). Mostly used inside parsing XML to manage qnames for XML element and attribute names. @nstack: @name: @value: @Returns: @world: @ns: @local_name: @value: @Returns: @nstack: @uri: @xml_version: @Returns: @qname: @Returns: @name: @name1: @name2: @Returns: @nstack: @name: @name_len: @Returns: @qname: @iostr: @Returns: @qname: @length_p: @Returns: @name: @length_p: @Returns: @name: @Returns: @name: @Returns: @name: @Returns: @qname: @length_p: @Returns: raptor2-2.0.15/docs/tmpl/section-locator.sgml0000644000175000017500000000234612425347071016020 00000000000000 Locator Location information for errors, warnings and messages. A small structure that can be optionally filled in when errors, warnings or other messages are generated and returned to user code. @uri: @file: @line: @column: @byte: @locator: @stream: @Returns: @buffer: @length: @locator: @Returns: @locator: @Returns: @locator: @Returns: @locator: @Returns: @locator: @Returns: @locator: @Returns: raptor2-2.0.15/docs/tmpl/section-avltree.sgml0000644000175000017500000000426212425347071016016 00000000000000 AVL Trees AVL Trees AVL Trees @RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES: @compare_handler: @free_handler: @flags: @Returns: @tree: @tree: @p_data: @Returns: @tree: @p_data: @Returns: @tree: @stream: @Returns: @tree: @p_data: @Returns: @tree: @p_data: @Returns: @tree: @print_handler: @tree: @Returns: @tree: @visit_handler: @user_data: @Returns: @tree: @range: @range_free_handler: @direction: @Returns: @iterator: @iterator: @Returns: @iterator: @Returns: @iterator: @Returns: @depth: @data: @user_data: @Returns: raptor2-2.0.15/docs/tmpl/section-triples.sgml0000644000175000017500000001043212425347071016032 00000000000000 Triples RDF Triples Representation of RDF statements inside Raptor. They are a 3 or 4-tuple of #raptor_term which cover the RDF terms of URI (%RAPTOR_TERM_TYPE_URI), Literal (%RAPTOR_TERM_TYPE_LITERAL) and Blank Node (%RAPTOR_TERM_TYPE_BLANK). @RAPTOR_TERM_TYPE_UNKNOWN: @RAPTOR_TERM_TYPE_URI: @RAPTOR_TERM_TYPE_LITERAL: @RAPTOR_TERM_TYPE_BLANK: @world: @usage: @type: @value: @string: @string_len: @string: @string_len: @datatype: @language: @language_len: @world: @blank: @Returns: @world: @blank: @length: @Returns: @world: @literal: @datatype: @language: @Returns: @world: @literal: @literal_len: @datatype: @language: @language_len: @Returns: @world: @uri_string: @length: @Returns: @world: @uri: @Returns: @world: @uri_string: @Returns: @world: @string: @length: @Returns: @term: @Returns: @t1: @t2: @Returns: @t1: @t2: @Returns: @term: @term: @len_p: @Returns: @term: @Returns: @term: @iostr: @Returns: @term: @nstack: @base_uri: @len_p: @Returns: @term: @nstack: @base_uri: @Returns: @iostr: @term: @nstack: @base_uri: @Returns: @world: @usage: @subject: @predicate: @object: @graph: @world: @Returns: @world: @subject: @predicate: @object: @graph: @Returns: @statement: @statement: @Returns: @s1: @s2: @Returns: @s1: @s2: @Returns: @statement: @world: @statement: @statement: @stream: @Returns: @statement: @stream: @Returns: @statement: @iostr: @write_graph_term: @Returns: raptor2-2.0.15/docs/tmpl/section-unicode.sgml0000644000175000017500000000314712425347071016003 00000000000000 Unicode Unicode and UTF-8 utility functions. Functions to support converting to and from Unicode written in UTF-8 which is the native internal string format of all the redland libraries. Includes checking for Unicode names using either the XML 1.0 or XML 1.1 rules. @c: @output: @length: @Returns: @input: @length: @output: @Returns: @c: @Returns: @c: @Returns: @c: @Returns: @c: @Returns: @string: @length: @Returns: @string: @length: @Returns: @dest: @dest_length_p: @src: @src_length: @startingLoc: @length: @Returns: raptor2-2.0.15/docs/tmpl/section-constants.sgml0000644000175000017500000000145712425347071016373 00000000000000 Constants Constant values and strings Version numbers and often-used namespace URI strings. raptor2-2.0.15/docs/tmpl/section-sax2.sgml0000644000175000017500000000560612425347071015234 00000000000000 SAX2 SAX2 XML Parsing API with namespaces and base URI support. A class providing a SAX2 XML parsing API with XML namespaces and XML base support. @world: @locator: @user_data: @Returns: @sax2: @user_data: @xml_element: @user_data: @xml_element: @user_data: @xml_element: @s: @len: @user_data: @xml_element: @s: @len: @user_data: @xml_element: @s: @user_data: @entityName: @base: @systemId: @publicId: @notationName: @user_data: @context: @base: @systemId: @publicId: @Returns: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @handler: @sax2: @filter: @user_data: @sax2: @base_uri: @sax2: @buffer: @len: @is_end: @Returns: @sax2: @Returns: @sax2: @Returns: raptor2-2.0.15/docs/tmpl/section-www.sgml0000644000175000017500000000604712425347071015203 00000000000000 WWW Retrieval of URI content from the web. Provides a wrapper to the resolution of URIs to give content using an underlying WWW-retrieval library. The content is delivered by callbacks and includes returning content type for handling content-negotation by the caller as well as chunks of byte content. @world: @Returns: @world: @connection: @Returns: @www: @www: @userdata: @ptr: @size: @nmemb: @www: @userdata: @content_type: @www: @user_agent: @www: @proxy: @www: @value: @www: @cache_control: @Returns: @www: @handler: @user_data: @www: @timeout: @www: @handler: @user_data: @user_data: @uri: @Returns: @www: @filter: @user_data: @www: @userdata: @final_uri: @www: @Returns: @www: @handler: @user_data: @www: @uri: @Returns: @www: @uri: @string_p: @length_p: @malloc_handler: @Returns: @www: @Returns: @www: @cert_filename: @cert_type: @cert_passphrase: @Returns: @www: @verify_peer: @verify_host: @Returns: @www: @reason: raptor2-2.0.15/docs/tmpl/section-option.sgml0000644000175000017500000000552712425347071015671 00000000000000 Options Class options Options for several classes such as #raptor_parser, #raptor_serializer #raptor_sax2 and #raptor_xml_writer that can be get and set. Utility functions exist to enumerate them, their description and the parameter type taken. @RAPTOR_OPTION_SCANNING: @RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES: @RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES: @RAPTOR_OPTION_ALLOW_BAGID: @RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST: @RAPTOR_OPTION_NORMALIZE_LANGUAGE: @RAPTOR_OPTION_NON_NFC_FATAL: @RAPTOR_OPTION_WARN_OTHER_PARSETYPES: @RAPTOR_OPTION_CHECK_RDF_ID: @RAPTOR_OPTION_RELATIVE_URIS: @RAPTOR_OPTION_WRITER_AUTO_INDENT: @RAPTOR_OPTION_WRITER_AUTO_EMPTY: @RAPTOR_OPTION_WRITER_INDENT_WIDTH: @RAPTOR_OPTION_WRITER_XML_VERSION: @RAPTOR_OPTION_WRITER_XML_DECLARATION: @RAPTOR_OPTION_NO_NET: @RAPTOR_OPTION_RESOURCE_BORDER: @RAPTOR_OPTION_LITERAL_BORDER: @RAPTOR_OPTION_BNODE_BORDER: @RAPTOR_OPTION_RESOURCE_FILL: @RAPTOR_OPTION_LITERAL_FILL: @RAPTOR_OPTION_BNODE_FILL: @RAPTOR_OPTION_HTML_TAG_SOUP: @RAPTOR_OPTION_MICROFORMATS: @RAPTOR_OPTION_HTML_LINK: @RAPTOR_OPTION_WWW_TIMEOUT: @RAPTOR_OPTION_WRITE_BASE_URI: @RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL: @RAPTOR_OPTION_WWW_HTTP_USER_AGENT: @RAPTOR_OPTION_JSON_CALLBACK: @RAPTOR_OPTION_JSON_EXTRA_DATA: @RAPTOR_OPTION_RSS_TRIPLES: @RAPTOR_OPTION_ATOM_ENTRY_URI: @RAPTOR_OPTION_PREFIX_ELEMENTS: @RAPTOR_OPTION_STRICT: @RAPTOR_OPTION_WWW_CERT_FILENAME: @RAPTOR_OPTION_WWW_CERT_TYPE: @RAPTOR_OPTION_WWW_CERT_PASSPHRASE: @RAPTOR_OPTION_NO_FILE: @RAPTOR_OPTION_WWW_SSL_VERIFY_PEER: @RAPTOR_OPTION_WWW_SSL_VERIFY_HOST: @RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES: @RAPTOR_OPTION_LAST: @domain: @option: @value_type: @name: @name_len: @label: @uri: @void: @Returns: @RAPTOR_OPTION_VALUE_TYPE_BOOL: @RAPTOR_OPTION_VALUE_TYPE_INT: @RAPTOR_OPTION_VALUE_TYPE_STRING: @RAPTOR_OPTION_VALUE_TYPE_URI: @RAPTOR_OPTION_VALUE_TYPE_LAST: @type: @Returns: @world: @domain: @option: @Returns: @option_description: @world: @uri: @Returns: raptor2-2.0.15/docs/tmpl/section-general.sgml0000644000175000017500000001147012425347071015770 00000000000000 General General library constants and utility functions How to get access to version numbers, set message and error handlers, list the parsed and serialized syntaxes provided in the library and various other utility functions. @user_data: @statement: @buffer: @size: @format: @...: @Returns: @ret: @format: @arguments: @Returns: @format: @arguments: @Returns: @buffer: @size: @format: @arguments: @Returns: @base: @nel: @width: @compar: @user_data: @user_data: @message: @code: @domain: @level: @locator: @text: @RAPTOR_LOG_LEVEL_NONE: @RAPTOR_LOG_LEVEL_TRACE: @RAPTOR_LOG_LEVEL_DEBUG: @RAPTOR_LOG_LEVEL_INFO: @RAPTOR_LOG_LEVEL_WARN: @RAPTOR_LOG_LEVEL_ERROR: @RAPTOR_LOG_LEVEL_FATAL: @RAPTOR_LOG_LEVEL_LAST: @level: @Returns: @RAPTOR_DOMAIN_NONE: @RAPTOR_DOMAIN_IOSTREAM: @RAPTOR_DOMAIN_NAMESPACE: @RAPTOR_DOMAIN_PARSER: @RAPTOR_DOMAIN_QNAME: @RAPTOR_DOMAIN_SAX2: @RAPTOR_DOMAIN_SERIALIZER: @RAPTOR_DOMAIN_TERM: @RAPTOR_DOMAIN_TURTLE_WRITER: @RAPTOR_DOMAIN_URI: @RAPTOR_DOMAIN_WORLD: @RAPTOR_DOMAIN_WWW: @RAPTOR_DOMAIN_XML_WRITER: @RAPTOR_DOMAIN_LAST: @domain: @Returns: @data1: @data2: @Returns: @data1: @data2: @user_data: @Returns: @context: @object: @context: @object: @fh: @Returns: @data: @size: @Returns: @object: @fh: @Returns: @RAPTOR_SYNTAX_NEED_BASE_URI: @names: @names_count: @label: @mime_types: @mime_types_count: @uri_strings: @uri_strings_count: @flags: @desc: @Returns: @mime_type: @mime_type_len: @q: raptor2-2.0.15/docs/tmpl/section-xml-namespace.sgml0000644000175000017500000000607112425347071017106 00000000000000 XML Namespaces Namespaces in XML include stacks of Namespaces Two classes that provide an XML namespace - short prefix (or none) and absolute URI (or none) to match the form xmlns...="..." seen in XML. A stack of namespaces #raptor_namespace_stack is also provided to handle in-scope namespace calculations that happen inside XML documents where inner namespaces can override outer ones. @nstack: @prefix: @ns_uri: @depth: @Returns: @world: @defaults: @Returns: @world: @nstack: @defaults: @Returns: @nstack: @nstack: @nstack: @nspace: @nstack: @prefix: @ns_uri_string: @depth: @Returns: @nstack: @depth: @nstack: @Returns: @nstack: @prefix: @prefix_length: @Returns: @nstack: @ns_uri: @Returns: @nstack: @nspace: @Returns: @nstack: @prefix: @ns_uri_string: @depth: @Returns: @ns: @ns: @Returns: @ns: @Returns: @ns: @length_p: @Returns: @ns: @iostr: @Returns: @nstack: @ns: @new_depth: @Returns: @ns: @length_p: @Returns: @string: @prefix: @uri_string: @Returns: raptor2-2.0.15/docs/Makefile.am0000644000175000017500000001031712421010765013075 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor docs # # Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # The name of the module. DOC_MODULE=raptor2 # The top-level SGML file. DOC_MAIN_SGML_FILE=raptor-docs.xml # Extra options to supply to gtkdoc-scan SCAN_OPTIONS= --deprecated-guards="RAPTOR_DISABLE_DEPRECATED" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR=../src # Used for dependencies HFILE_GLOB=$(builddir)/raptor-fake.h CFILE_GLOB=$(top_srcdir)/src/raptor_*.c IGNORE_CFILES= \ n3_lexer.c \ n3_parser.c \ raptor_nfc_test.c \ raptor_rss_common.c \ raptor_xsd.c \ turtle_lexer.c \ turtle_parser.c \ turtle_common.c \ parsedate.c \ strcasecmp.c # Use fixed version of raptor2.h EXTRA_HFILES=$(builddir)/raptor-fake.h # Headers to ignore: yes raptor2.h is intended to be in this list # since it is added as a fixed file raptor-fake.h by EXTRA_HFILES above IGNORE_HFILES= \ n3_common.h \ n3_lexer.h \ n3_parser.h \ parsedate.h \ raptor.h \ raptor2.h \ raptor_config.h \ raptor_internal.h \ raptor_nfc.h \ raptor_rss.h \ turtle_common.h \ turtle_lexer.h \ turtle_parser.h \ git-version.h # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. AM_CPPFLAGS = GTKDOC_LIBS = # Extra options to supply to gtkdoc-mkdb MKDB_OPTIONS=--sgml-mode --output-format=xml --ignore-files="$(IGNORE_CFILES)" # Extra options to supply to gtkdoc-mktmpl MKTMPL_OPTIONS= # Non-autogenerated (XML, other) files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ raptor-changes.xml \ raptor-formats.xml \ raptor-parsers.xml \ raptor-serializers.xml \ raptor-tutorial-intro.xml \ raptor-tutorial-querying-functionality.xml \ raptor-tutorial-parsing.xml \ raptor-tutorial-serializing.xml \ version.xml \ rdfprint.c \ rdfcat.c \ rdfserialize.c # Images to copy into HTML directory HTML_IMAGES = # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS= # gtkdoc might not define this DISTCLEANFILES= include $(top_srcdir)/gtk-doc.make man_MANS = libraptor2.3 EXTRA_DIST+= \ libraptor2.html \ raptor1-eol.html \ $(man_MANS) \ version.xml.in \ upgrade-script.pl \ raptor-changes.tsv DISTCLEANFILES+= \ raptor-fake.h raptor-fake.h: $(top_builddir)/src/raptor2.h $(top_srcdir)/scripts/fix-gtkdoc-header.pl $(PERL) $(top_srcdir)/scripts/fix-gtkdoc-header.pl < $< > $@ if MAINTAINER_MODE libraptor2.html: $(srcdir)/libraptor2.3 $(top_srcdir)/scripts/fix-groff-xhtml -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(top_srcdir)/scripts/fix-groff-xhtml $@ rdfcat.c: $(top_srcdir)/examples/rdfcat.c $(install_sh_DATA) $? $@ rdfprint.c: $(top_srcdir)/examples/rdfprint.c $(install_sh_DATA) $? $@ rdfserialize.c: $(top_srcdir)/examples/rdfserialize.c $(install_sh_DATA) $? $@ raptor-tutorial-parsing.xml: rdfcat.c raptor-tutorial-serializing.xml: rdfprint.c rdfserialize.c raptor-changes.xml: $(srcdir)/raptor-changes.tsv $(top_srcdir)/scripts/process-changes.pl $(PERL) $(top_srcdir)/scripts/process-changes.pl --docbook-xml $@ $(PACKAGE) $(srcdir)/raptor-changes.tsv raptor-formats.xml: $(top_builddir)/scripts/build-formats $(top_builddir)/scripts/build-formats > $@ $(top_builddir)/scripts/build-formats: cd $(top_builddir)/scripts && $(MAKE) build-formats upgrade-script.pl: $(top_srcdir)/scripts/process-changes.pl $(srcdir)/raptor-changes.tsv $(PERL) $(top_srcdir)/scripts/process-changes.pl --upgrade-script $@ $(PACKAGE) $(srcdir)/raptor-changes.tsv endif dist-hook-local: docs raptor2-2.0.15/docs/raptor-serializers.xml0000644000175000017500000001417711660060067015440 00000000000000 Serializers in Raptor (triples to syntax)
Introduction This section describes the serializers that can be compiled into Raptor and their options. The exact serializers supported may vary by different builds of raptor and can be queried at run-time by use of the raptor_world_get_serializer_description function The optional options that may be set on parsers can also be queried at run-time with the raptor_world_get_option_description function.
Atom 1.0 serializer (name <literal>atom</literal>) A serializer to the Atom 1.0 syndication format defined in IETF RFC 4287. This serializes an RDF graph written in the RSS 1.0 data model to Atom 1.0 plus optionally writes extra RDF triples. The extra RDF triples are written into an at:md metadata block, along with at:feedmap and at:entrymap elements to describe the RSS 1.0 predicate to Atom 1.0 elements mappings for the feed and entry blocks respecively. The extra triples are enabled when serializer option 'rssTriples' is set to string value 'atom-triples'. If no atom triples content type field (at:contentType predicate) is given, the type is set to 'text/html' when writing out an atom:content field in Atom 1.0 format.
JSON serializers (name <literal>json</literal> and name <literal>json-triples</literal>) Two serializers that write JSON in either a resource-centric format with name json and in a triple-dump format with name json-triples. The resource-centric format is based on the Talis RDF/JSON design and the triple-dump format based on the SPARQL query results in JSON design.
N-Quads serializer - default (name <literal>nquads</literal>) A serializer to the N-Quads extension to N-Triples, providing an optional 4th context graph term at the end of the line when a named graph is associated with a triple (the triple is contained in a named graph). This is useful for seeing the output of named graphs or dealing with SPARQL Datasets.
N-Triples serializer - default (name <literal>ntriples</literal>) A serializer to the N-Triples syntax as used by the W3C RDF Core working group for the RDF Test Cases.
RDF/XML serializer (name <literal>rdfxml</literal>) A serializer to the standard RDF/XML syntax as revised by the W3C RDF Core working group. This writes a plain triple-based RDF/XML serialization with no optimisation or pretty-printing.
RDF/XML (Abbreviated) serializer (name <literal>rdfxml-abbrev</literal>) An RDF/XML serializer using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.
RDF/XML (XMP Profile) serializer (name <literal>rdfxml-xmp</literal>) A serializer to the Adobe XMP profile of RDF/XML suitable for embedding inside an external document. Embedding means that the XML header is omitted, wheras for other XML serializings, it is always emitted.
Turtle serializer (name <literal>turtle</literal>) A serializer for the Turtle Terse RDF Triple Language syntax, designed as a useful subset of Notation 3.
RSS 1.0 serializer (name <literal>rss-1.0</literal>) A serializer to the RDF Site Summary (RSS) 1.0 format for describing a syndication feed of items. By default this only serializes the RDF triples that describe the RSS channel and items found. If serialiser option 'rssTriples' is set to value 'rdf-xml' then any additional triples found will be included in the channel or item output.
GraphViz dot serializer (name <literal>dot</literal>) A serializer to the GraphViz DOT format. This serializer has a set of associated serializer options that may be set to customise the output colors using raptor_serializer_set_option() with the appropriate option name and value as given below. RAPTOR_OPTION_RESOURCE_BORDER Border color of resource nodes RAPTOR_OPTION_LITERAL_BORDER Border color of literal nodes RAPTOR_OPTION_BNODE_BORDER Border color of blank nodes RAPTOR_OPTION_RESOURCE_FILL Fill color of resource nodes RAPTOR_OPTION_LITERAL_FILL Fill color of literal nodes RAPTOR_OPTION_BNODE_FILL Fill color of blank nodes
raptor2-2.0.15/docs/raptor2-overrides.txt0000644000175000017500000000177611660060067015210 00000000000000 raptor_iostream raptor_iostream* raptor_iostream; raptor_namespace raptor_namespace* raptor_namespace; raptor_namespace_stack raptor_namespace_stack* raptor_namespace_stack; raptor_parser raptor_parser* raptor_parser; raptor_qname raptor_qname* raptor_qname; raptor_sequence raptor_sequence* raptor_sequence; raptor_serializer raptor_serializer* raptor_serializer; raptor_stringbuffer raptor_stringbuffer* raptor_stringbuffer; raptor_uri raptor_uri* raptor_uri; raptor_www raptor_www* raptor_www; raptor_xml_element raptor_xml_element* raptor_xml_element; raptor_xml_writer raptor_xml_writer* raptor_xml_writer; raptor2-2.0.15/docs/Makefile.in0000644000175000017500000007242412425344565013131 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor docs # # Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module. DOC_MODULE = raptor2 # The top-level SGML file. DOC_MAIN_SGML_FILE = raptor-docs.xml # Extra options to supply to gtkdoc-scan SCAN_OPTIONS = --deprecated-guards="RAPTOR_DISABLE_DEPRECATED" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR = ../src # Used for dependencies HFILE_GLOB = $(builddir)/raptor-fake.h CFILE_GLOB = $(top_srcdir)/src/raptor_*.c IGNORE_CFILES = \ n3_lexer.c \ n3_parser.c \ raptor_nfc_test.c \ raptor_rss_common.c \ raptor_xsd.c \ turtle_lexer.c \ turtle_parser.c \ turtle_common.c \ parsedate.c \ strcasecmp.c # Use fixed version of raptor2.h EXTRA_HFILES = $(builddir)/raptor-fake.h # Headers to ignore: yes raptor2.h is intended to be in this list # since it is added as a fixed file raptor-fake.h by EXTRA_HFILES above IGNORE_HFILES = \ n3_common.h \ n3_lexer.h \ n3_parser.h \ parsedate.h \ raptor.h \ raptor2.h \ raptor_config.h \ raptor_internal.h \ raptor_nfc.h \ raptor_rss.h \ turtle_common.h \ turtle_lexer.h \ turtle_parser.h \ git-version.h # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. AM_CPPFLAGS = GTKDOC_LIBS = # Extra options to supply to gtkdoc-mkdb MKDB_OPTIONS = --sgml-mode --output-format=xml --ignore-files="$(IGNORE_CFILES)" # Extra options to supply to gtkdoc-mktmpl MKTMPL_OPTIONS = # Non-autogenerated (XML, other) files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ raptor-changes.xml \ raptor-formats.xml \ raptor-parsers.xml \ raptor-serializers.xml \ raptor-tutorial-intro.xml \ raptor-tutorial-querying-functionality.xml \ raptor-tutorial-parsing.xml \ raptor-tutorial-serializing.xml \ version.xml \ rdfprint.c \ rdfcat.c \ rdfserialize.c # Images to copy into HTML directory HTML_IMAGES = # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS = # gtkdoc might not define this DISTCLEANFILES = raptor-fake.h @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) libraptor2.html \ raptor1-eol.html $(man_MANS) version.xml.in upgrade-script.pl \ raptor-changes.tsv DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp man_MANS = libraptor2.3 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/gtk-doc.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man3dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.3[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(MANS) all-local installdirs: for dir in "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local uninstall-man uninstall-man: uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man3 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local uninstall-man uninstall-man3 @ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @ENABLE_GTK_DOC_FALSE@all-local: docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### setup-build.stamp: -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ echo ' DOC Preparing build'; \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi @touch setup-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo ' DOC Scanning header files' @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ echo " DOC Introspecting gobjects"; \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo ' DOC Rebuilding template files' @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo ' DOC Building XML' @-chmod -R u+w $(srcdir) @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building PDF' @rm -f $(DOC_MODULE).pdf @mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ rm -rf tmpl; \ fi maintainer-clean-local: clean @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs raptor-fake.h: $(top_builddir)/src/raptor2.h $(top_srcdir)/scripts/fix-gtkdoc-header.pl $(PERL) $(top_srcdir)/scripts/fix-gtkdoc-header.pl < $< > $@ @MAINTAINER_MODE_TRUE@libraptor2.html: $(srcdir)/libraptor2.3 $(top_srcdir)/scripts/fix-groff-xhtml @MAINTAINER_MODE_TRUE@ -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(top_srcdir)/scripts/fix-groff-xhtml $@ @MAINTAINER_MODE_TRUE@rdfcat.c: $(top_srcdir)/examples/rdfcat.c @MAINTAINER_MODE_TRUE@ $(install_sh_DATA) $? $@ @MAINTAINER_MODE_TRUE@rdfprint.c: $(top_srcdir)/examples/rdfprint.c @MAINTAINER_MODE_TRUE@ $(install_sh_DATA) $? $@ @MAINTAINER_MODE_TRUE@rdfserialize.c: $(top_srcdir)/examples/rdfserialize.c @MAINTAINER_MODE_TRUE@ $(install_sh_DATA) $? $@ @MAINTAINER_MODE_TRUE@raptor-tutorial-parsing.xml: rdfcat.c @MAINTAINER_MODE_TRUE@raptor-tutorial-serializing.xml: rdfprint.c rdfserialize.c @MAINTAINER_MODE_TRUE@raptor-changes.xml: $(srcdir)/raptor-changes.tsv $(top_srcdir)/scripts/process-changes.pl @MAINTAINER_MODE_TRUE@ $(PERL) $(top_srcdir)/scripts/process-changes.pl --docbook-xml $@ $(PACKAGE) $(srcdir)/raptor-changes.tsv @MAINTAINER_MODE_TRUE@raptor-formats.xml: $(top_builddir)/scripts/build-formats @MAINTAINER_MODE_TRUE@ $(top_builddir)/scripts/build-formats > $@ @MAINTAINER_MODE_TRUE@$(top_builddir)/scripts/build-formats: @MAINTAINER_MODE_TRUE@ cd $(top_builddir)/scripts && $(MAKE) build-formats @MAINTAINER_MODE_TRUE@upgrade-script.pl: $(top_srcdir)/scripts/process-changes.pl $(srcdir)/raptor-changes.tsv @MAINTAINER_MODE_TRUE@ $(PERL) $(top_srcdir)/scripts/process-changes.pl --upgrade-script $@ $(PACKAGE) $(srcdir)/raptor-changes.tsv dist-hook-local: docs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/docs/raptor-changes.tsv0000644000175000017500000025573112425333224014531 00000000000000# OLD VERSIONOLD RETURNOLD NAMEOLD ARGSNEW VERSIONNEW RETURNNEW NAMENEW ARGSNOTES # OLD VERSIONtypeOLD NAME-NEW VERSIONtypeNEW NAME-NOTES # OLD VERSIONenumOLD NAME-NEW VERSIONtypeNEW NAME-NOTES # # Functions # 1.4.21 void* raptor_alloc_memory (size_t size) 2.0.0 void* raptor_alloc_memory (size_t size) - 1.4.21 void* raptor_calloc_memory (size_t nmemb, size_t size) 2.0.0 void* raptor_calloc_memory (size_t nmemb, size_t size) - 1.4.21 int raptor_compare_strings (const void *a, const void *b) 2.0.0 - - - Trivial utility function removed. 1.4.21 int raptor_copy_identifier (raptor_identifier *dest, raptor_identifier *src) 2.0.0 - - - Use raptor_term_copy() with #raptor_term objects. 1.4.21 void raptor_error_handlers_init (raptor_error_handlers* error_handlers) 2.0.0 - - - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() 1.4.21 void raptor_error_handlers_init_v2 (raptor_world* world, raptor_error_handlers* error_handlers) 2.0.0 - - - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() 1.4.21 raptor_feature raptor_feature_from_uri (raptor_uri *uri) 2.0.0 raptor_option raptor_world_get_option_from_uri (raptor_world* world, raptor_uri *uri) - 1.4.21 raptor_feature raptor_feature_from_uri_v2 (raptor_world* world, raptor_uri *uri) 2.0.0 raptor_option raptor_world_get_option_from_uri (raptor_world* world, raptor_uri *uri) - 1.4.21 int raptor_feature_value_type (const raptor_feature feature) 2.0.0 - - - Use raptor_world_get_option_description() for the option and access the value_type field. 1.4.21 int raptor_features_enumerate (const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_PARSER 1.4.21 int raptor_features_enumerate_v2 (raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_PARSER 1.4.21 void raptor_finish (void) 2.0.0 - - - Use raptor_free_world() with #raptor_world object. 1.4.21 int raptor_format_locator (char* buffer, size_t length, raptor_locator* locator) 2.0.0 int raptor_locator_format (char* buffer, size_t length, raptor_locator* locator) - 1.4.21 int raptor_format_locator_v2 (raptor_world* world, char* buffer, size_t length, raptor_locator* locator) 2.0.0 int raptor_locator_format (char* buffer, size_t length, raptor_locator* locator) - 1.4.21 void raptor_free_identifier (raptor_identifier *identifier) 2.0.0 - - - Use raptor_free_term() with #raptor_term objects. 1.4.21 void raptor_free_iostream (raptor_iostream *iostr) 2.0.0 void raptor_free_iostream (raptor_iostream *iostr) - 1.4.21 void raptor_free_memory (void *ptr) 2.0.0 void raptor_free_memory (void *ptr) - 1.4.21 void raptor_free_namespace (raptor_namespace *ns) 2.0.0 void raptor_free_namespace (raptor_namespace *ns) - 1.4.21 void raptor_free_namespaces (raptor_namespace_stack *nstack) 2.0.0 void raptor_free_namespaces (raptor_namespace_stack *nstack) - 1.4.21 void raptor_free_parser (raptor_parser* parser) 2.0.0 void raptor_free_parser (raptor_parser* parser) - 1.4.21 void raptor_free_qname (raptor_qname* name) 2.0.0 void raptor_free_qname (raptor_qname* name) - 1.4.21 void raptor_free_sax2 (raptor_sax2 *sax2) 2.0.0 void raptor_free_sax2 (raptor_sax2 *sax2) - 1.4.21 void raptor_free_sequence (raptor_sequence* seq) 2.0.0 void raptor_free_sequence (raptor_sequence* seq) - 1.4.21 void raptor_free_serializer (raptor_serializer* rdf_serializer) 2.0.0 void raptor_free_serializer (raptor_serializer* rdf_serializer) - 1.4.21 void raptor_free_stringbuffer (raptor_stringbuffer *stringbuffer) 2.0.0 void raptor_free_stringbuffer (raptor_stringbuffer *stringbuffer) - 1.4.21 void raptor_free_uri (raptor_uri *uri) 2.0.0 void raptor_free_uri (raptor_uri *uri) - 1.4.21 void raptor_free_uri_v2 (raptor_world* world, raptor_uri *uri) 2.0.0 void raptor_free_uri (raptor_uri *uri) - 1.4.21 void raptor_free_world (raptor_world* world) 2.0.0 void raptor_free_world (raptor_world* world) - 1.4.21 void raptor_free_xml_element (raptor_xml_element *element) 2.0.0 void raptor_free_xml_element (raptor_xml_element *element) - 1.4.21 void raptor_free_xml_writer (raptor_xml_writer* xml_writer) 2.0.0 void raptor_free_xml_writer (raptor_xml_writer* xml_writer) - 1.4.21 int raptor_get_feature (raptor_parser *parser, raptor_feature feature) 2.0.0 int raptor_parser_get_option (raptor_parser *parser, raptor_option option, char** string_p, int* integer_p) - 1.4.21 unsigned int raptor_get_feature_count (void) 2.0.0 unsigned int raptor_option_get_count (void) - 1.4.21 const char* raptor_get_label (raptor_parser *rdf_parser) 2.0.0 raptor_syntax_description* raptor_parser_get_description (raptor_parser* rdf_parser) Use label field of returned description. 1.4.21 raptor_locator* raptor_get_locator (raptor_parser* rdf_parser) 2.0.0 raptor_locator* raptor_parser_get_locator (raptor_parser* rdf_parser) - 1.4.21 const char* raptor_get_mime_type (raptor_parser *rdf_parser) 2.0.0 raptor_syntax_description* raptor_parser_get_description (raptor_parser* rdf_parser) Use the mime_types array field of returned #raptor_syntax_description 1.4.21 const char* raptor_get_name (raptor_parser *rdf_parser) 2.0.0 const char* raptor_parser_get_name (raptor_parser *rdf_parser) - 1.4.21 int raptor_get_need_base_uri (raptor_parser *rdf_parser) 2.0.0 raptor_syntax_description* raptor_parser_get_description (raptor_parser* rdf_parser) Use the #RAPTOR_SYNTAX_NEED_BASE_URI bitflag in the flags field of the returned #raptor_syntax_description 1.4.21 const char* raptor_guess_parser_name (raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) 2.0.0 const char* raptor_world_guess_parser_name (raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) - 1.4.21 const char* raptor_guess_parser_name_v2 (raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) 2.0.0 const char* raptor_world_guess_parser_name (raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) - 1.4.21 void raptor_init (void) 2.0.0 - - - Use raptor_new_world() to create a new #raptor_world object. 1.4.21 int raptor_iostream_format_hexadecimal (raptor_iostream* iostr, unsigned int integer, int width) 2.0.0 int raptor_iostream_hexadecimal_write (unsigned int integer, int width, raptor_iostream* iostr) - 1.4.21 size_t raptor_iostream_get_bytes_written_count (raptor_iostream *iostr) 2.0.0 - - - Deprecated for raptor_iostream_tell(). 1.4.21 int raptor_iostream_read_bytes (raptor_iostream* iostr, void *ptr, size_t size, size_t nmemb) 2.0.0 int raptor_iostream_read_bytes (void *ptr, size_t size, size_t nmemb, raptor_iostream* iostr) - 1.4.21 int raptor_iostream_read_eof (raptor_iostream *iostr) 2.0.0 int raptor_iostream_read_eof (raptor_iostream *iostr) - 1.4.21 unsigned long raptor_iostream_tell (raptor_iostream *iostr) 2.0.0 unsigned long raptor_iostream_tell (raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_byte (raptor_iostream *iostr, const int byte) 2.0.0 int raptor_iostream_write_byte (const int byte, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_bytes (raptor_iostream *iostr, const void *ptr, size_t size, size_t nmemb) 2.0.0 int raptor_iostream_write_bytes (const void *ptr, size_t size, size_t nmemb, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_counted_string (raptor_iostream *iostr, const void *string, size_t len) 2.0.0 int raptor_iostream_counted_string_write (const void *string, size_t len, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_decimal (raptor_iostream* iostr, int integer) 2.0.0 int raptor_iostream_decimal_write (int integer, raptor_iostream* iostr) - 1.4.21 void raptor_iostream_write_end (raptor_iostream *iostr) 2.0.0 int raptor_iostream_write_end (raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_namespace (raptor_iostream* iostr, raptor_namespace *ns) 2.0.0 int raptor_namespace_write (raptor_namespace *ns, raptor_iostream* iostr) - 1.4.21 int raptor_iostream_write_qname (raptor_iostream* iostr, raptor_qname *qname) 2.0.0 int raptor_qname_write (raptor_qname *qname, raptor_iostream* iostr) - 1.4.21 void raptor_iostream_write_statement_ntriples (raptor_iostream* iostr, const raptor_statement *statement) 2.0.0 int raptor_statement_ntriples_write (const raptor_statement *statement, raptor_iostream* iostr, int write_graph_term) Gains extra flag arg to decide whether to write any graph term. 1.4.21 int raptor_iostream_write_string (raptor_iostream *iostr, const void *string) 2.0.0 int raptor_iostream_string_write (const void *string, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_string_ntriples (raptor_iostream *iostr, const unsigned char* string, size_t len, const char delim) 2.0.0 int raptor_string_ntriples_write (const unsigned char* string, size_t len, const char delim, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_string_python (raptor_iostream *iostr, const unsigned char* string, size_t len, const char delim, int flags) 2.0.0 int raptor_string_python_write (const unsigned char* string, size_t len, const char delim, int flags, raptor_iostream *iostr) - 1.4.21 void raptor_iostream_write_string_turtle (raptor_iostream *iostr, const unsigned char* string, size_t len) 2.0.0 - - - Deprecated for raptor_string_python_write(). 1.4.21 int raptor_iostream_write_stringbuffer (raptor_iostream* iostr, raptor_stringbuffer *sb) 2.0.0 int raptor_stringbuffer_write (raptor_stringbuffer *sb, raptor_iostream* iostr) - 1.4.21 int raptor_iostream_write_uri (raptor_iostream *iostr, raptor_uri *uri) 2.0.0 int raptor_uri_write (raptor_uri *uri, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_uri_v2 (raptor_world* world, raptor_iostream *iostr, raptor_uri *uri) 2.0.0 int raptor_uri_write (raptor_uri *uri, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_xml_any_escaped_string (raptor_iostream* iostr, const unsigned char* string, size_t len, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) 2.0.0 int raptor_xml_escape_string_any_write (const unsigned char* string, size_t len, char quote, int xml_version, raptor_iostream* iostr) - 1.4.21 int raptor_iostream_write_xml_element (raptor_iostream *iostr, raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, raptor_simple_message_handler error_handler, void *error_data, int depth) 2.0.0 int raptor_xml_element_write (raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, int depth, raptor_iostream *iostr) - 1.4.21 int raptor_iostream_write_xml_escaped_string (raptor_iostream* iostr, const unsigned char* string, size_t len, char quote, raptor_simple_message_handler error_handler, void *error_data) 2.0.0 int raptor_xml_escape_string_write (const unsigned char* string, size_t len, char quote, raptor_iostream* iostr) - 1.4.21 int raptor_locator_byte (raptor_locator *locator) 2.0.0 int raptor_locator_byte (raptor_locator *locator) - 1.4.21 int raptor_locator_column (raptor_locator *locator) 2.0.0 int raptor_locator_column (raptor_locator *locator) - 1.4.21 const char* raptor_locator_file (raptor_locator *locator) 2.0.0 const char* raptor_locator_file (raptor_locator *locator) - 1.4.21 int raptor_locator_line (raptor_locator *locator) 2.0.0 int raptor_locator_line (raptor_locator *locator) - 1.4.21 const char* raptor_locator_uri (raptor_locator *locator) 2.0.0 const char* raptor_locator_uri (raptor_locator *locator) - 1.4.21 const char* raptor_locator_uri_v2 (raptor_world* world, raptor_locator *locator) 2.0.0 const char* raptor_locator_uri (raptor_locator *locator) - 1.4.21 int raptor_namespace_copy (raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth) 2.0.0 int raptor_namespace_stack_start_namespace (raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth) - 1.4.21 const unsigned char* raptor_namespace_get_counted_prefix (const raptor_namespace *ns, size_t *length_p) 2.0.0 const unsigned char* raptor_namespace_get_counted_prefix (const raptor_namespace *ns, size_t *length_p) - 1.4.21 const unsigned char* raptor_namespace_get_prefix (const raptor_namespace *ns) 2.0.0 const unsigned char* raptor_namespace_get_prefix (const raptor_namespace *ns) - 1.4.21 raptor_uri* raptor_namespace_get_uri (const raptor_namespace *ns) 2.0.0 raptor_uri* raptor_namespace_get_uri (const raptor_namespace *ns) - 1.4.21 void raptor_namespaces_clear (raptor_namespace_stack *nstack) 2.0.0 void raptor_namespaces_clear (raptor_namespace_stack *nstack) - 1.4.21 void raptor_namespaces_end_for_depth (raptor_namespace_stack *nstack, int depth) 2.0.0 void raptor_namespaces_end_for_depth (raptor_namespace_stack *nstack, int depth) - 1.4.21 raptor_namespace* raptor_namespaces_find_namespace (raptor_namespace_stack *nstack, const unsigned char* prefix, int prefix_length) 2.0.0 raptor_namespace* raptor_namespaces_find_namespace (raptor_namespace_stack *nstack, const unsigned char* prefix, int prefix_length) - 1.4.21 raptor_namespace* raptor_namespaces_find_namespace_by_uri (raptor_namespace_stack *nstack, raptor_uri *ns_uri) 2.0.0 raptor_namespace* raptor_namespaces_find_namespace_by_uri (raptor_namespace_stack *nstack, raptor_uri *ns_uri) - 1.4.21 unsigned char* raptor_namespaces_format (const raptor_namespace *ns, size_t *length_p) 2.0.0 unsigned char* raptor_namespace_format_as_xml (const raptor_namespace *ns, size_t *length_p) - 1.4.21 raptor_namespace* raptor_namespaces_get_default_namespace (raptor_namespace_stack *nstack) 2.0.0 raptor_namespace* raptor_namespaces_get_default_namespace (raptor_namespace_stack *nstack) - 1.4.21 int raptor_namespaces_init (raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) 2.0.0 int raptor_namespaces_init (raptor_world* world, raptor_namespace_stack *nstack, int defaults) - 1.4.21 int raptor_namespaces_init_v2 (raptor_world* world, raptor_namespace_stack *nstack, raptor_simple_message_handler error_handler, void *error_data, int defaults) 2.0.0 int raptor_namespaces_init (raptor_world* world, raptor_namespace_stack *nstack, int defaults) - 1.4.21 int raptor_namespaces_namespace_in_scope (raptor_namespace_stack *nstack, const raptor_namespace *nspace) 2.0.0 int raptor_namespaces_namespace_in_scope (raptor_namespace_stack *nstack, const raptor_namespace *nspace) - 1.4.21 raptor_qname* raptor_namespaces_qname_from_uri (raptor_namespace_stack *nstack, raptor_uri *uri, int xml_version) 2.0.0 raptor_qname* raptor_new_qname_from_namespace_uri (raptor_namespace_stack *nstack, raptor_uri *uri, int xml_version) - 1.4.21 void raptor_namespaces_start_namespace (raptor_namespace_stack *nstack, raptor_namespace *nspace) 2.0.0 void raptor_namespaces_start_namespace (raptor_namespace_stack *nstack, raptor_namespace *nspace) - 1.4.21 int raptor_namespaces_start_namespace_full (raptor_namespace_stack *nstack, const unsigned char* prefix, const unsigned char* ns_uri_string, int depth) 2.0.0 int raptor_namespaces_start_namespace_full (raptor_namespace_stack *nstack, const unsigned char* prefix, const unsigned char* ns_uri_string, int depth) - 1.4.21 raptor_identifier* raptor_new_identifier (raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char* id, const unsigned char* literal, raptor_uri *literal_datatype, const unsigned char* literal_language) 2.0.0 - - - Replaced by raptor_new_term_from_blank(), raptor_new_term_from_literal() or raptor_new_term_from_blank() and #raptor_term class. 1.4.21 raptor_identifier* raptor_new_identifier_v2 (raptor_world* world, raptor_identifier_type type, raptor_uri *uri, raptor_uri_source uri_source, const unsigned char* id, const unsigned char* literal, raptor_uri *literal_datatype, const unsigned char* literal_language) 2.0.0 - - - Replaced by raptor_new_term_from_blank(), raptor_new_term_from_literal() or raptor_new_term_from_blank() and #raptor_term class. 1.4.21 raptor_iostream* raptor_new_iostream_from_file_handle (FILE *handle) 2.0.0 raptor_iostream* raptor_new_iostream_from_file_handle (raptor_world* world, FILE *handle) - 1.4.21 raptor_iostream* raptor_new_iostream_from_filename (const char* filename) 2.0.0 raptor_iostream* raptor_new_iostream_from_filename (raptor_world* world, const char* filename) - 1.4.21 raptor_iostream* raptor_new_iostream_from_handler (void *context, const raptor_iostream_handler *handler) 2.0.0 raptor_iostream* raptor_new_iostream_from_handler (raptor_world* world, void *user_data, const raptor_iostream_handler* const handler) - 1.4.21 raptor_iostream* raptor_new_iostream_from_handler2 (void *user_data, const raptor_iostream_handler2* const handler2) 2.0.0 raptor_iostream* raptor_new_iostream_from_handler (raptor_world* world, void *user_data, const raptor_iostream_handler* const handler) - 1.4.21 raptor_iostream* raptor_new_iostream_from_sink (void) 2.0.0 raptor_iostream* raptor_new_iostream_from_sink (raptor_world* world) - 1.4.21 raptor_iostream* raptor_new_iostream_from_string (void *string, size_t length) 2.0.0 raptor_iostream* raptor_new_iostream_from_string (raptor_world* world, void *string, size_t length) - 1.4.21 raptor_iostream* raptor_new_iostream_to_file_handle (FILE *handle) 2.0.0 raptor_iostream* raptor_new_iostream_to_file_handle (raptor_world* world, FILE *handle) - 1.4.21 raptor_iostream* raptor_new_iostream_to_filename (const char* filename) 2.0.0 raptor_iostream* raptor_new_iostream_to_filename (raptor_world* world, const char* filename) - 1.4.21 raptor_iostream* raptor_new_iostream_to_sink (void) 2.0.0 raptor_iostream* raptor_new_iostream_to_sink (raptor_world* world) - 1.4.21 raptor_iostream* raptor_new_iostream_to_string (void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) 2.0.0 raptor_iostream* raptor_new_iostream_to_string (raptor_world* world, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) - 1.4.21 raptor_namespace* raptor_new_namespace (raptor_namespace_stack *nstack, const unsigned char* prefix, const unsigned char* ns_uri_string, int depth) 2.0.0 raptor_namespace* raptor_new_namespace (raptor_namespace_stack *nstack, const unsigned char* prefix, const unsigned char* ns_uri_string, int depth) - 1.4.21 raptor_namespace* raptor_new_namespace_from_uri (raptor_namespace_stack *nstack, const unsigned char* prefix, raptor_uri* ns_uri, int depth) 2.0.0 raptor_namespace* raptor_new_namespace_from_uri (raptor_namespace_stack *nstack, const unsigned char* prefix, raptor_uri* ns_uri, int depth) - 1.4.21 int raptor_new_namespace_parts_from_string (const unsigned char* string, unsigned char* *prefix, unsigned char* *uri_string) 2.0.0 int raptor_xml_namespace_string_parse (const unsigned char* string, unsigned char* *prefix, unsigned char* *uri_string) - 1.4.21 raptor_namespace_stack* raptor_new_namespaces (const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) 2.0.0 raptor_namespace_stack* raptor_new_namespaces (raptor_world* world, int defaults) - 1.4.21 raptor_namespace_stack* raptor_new_namespaces_v2 (raptor_world* world, raptor_simple_message_handler error_handler, void *error_data, int defaults) 2.0.0 raptor_namespace_stack* raptor_new_namespaces (raptor_world* world, int defaults) - 1.4.21 raptor_parser* raptor_new_parser (const char* name) 2.0.0 raptor_parser* raptor_new_parser (raptor_world* world, const char* name) - 1.4.21 raptor_parser* raptor_new_parser_for_content (raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) 2.0.0 raptor_parser* raptor_new_parser_for_content (raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) - 1.4.21 raptor_parser* raptor_new_parser_for_content_v2 (raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) 2.0.0 raptor_parser* raptor_new_parser_for_content (raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) - 1.4.21 raptor_parser* raptor_new_parser_v2 (raptor_world* world, const char* name) 2.0.0 raptor_parser* raptor_new_parser (raptor_world* world, const char* name) - 1.4.21 raptor_qname* raptor_new_qname (raptor_namespace_stack *nstack, const unsigned char* name, const unsigned char* value, raptor_simple_message_handler error_handler, void *error_data) 2.0.0 raptor_qname* raptor_new_qname (raptor_namespace_stack *nstack, const unsigned char* name, const unsigned char* value) - 1.4.21 raptor_qname* raptor_new_qname_from_namespace_local_name (raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value) 2.0.0 raptor_qname* raptor_new_qname_from_namespace_local_name (raptor_world* world, raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value) - 1.4.21 raptor_qname* raptor_new_qname_from_namespace_local_name_v2 (raptor_world* world, raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value) 2.0.0 raptor_qname* raptor_new_qname_from_namespace_local_name (raptor_world* world, raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value) - 1.4.21 raptor_sax2* raptor_new_sax2 (void *user_data, raptor_error_handlers* error_handlers) 2.0.0 raptor_sax2* raptor_new_sax2 (raptor_world *world, raptor_locator *locator, void* user_data) - 1.4.21 raptor_sequence* raptor_new_sequence (raptor_sequence_free_handler* free_handler, raptor_sequence_print_handler* print_handler) 2.0.0 raptor_sequence* raptor_new_sequence (raptor_data_free_handler free_handler, raptor_data_print_handler print_handler) - 1.4.21 raptor_sequence* raptor_new_sequence_v2 (raptor_sequence_free_handler_v2* free_handler, raptor_sequence_print_handler_v2* print_handler, void* handler_context) 2.0.0 raptor_sequence* raptor_new_sequence (raptor_data_free_handler free_handler, raptor_data_print_handler print_handler) - 1.4.21 raptor_serializer* raptor_new_serializer (const char* name) 2.0.0 raptor_serializer* raptor_new_serializer (raptor_world* world, const char* name) - 1.4.21 raptor_serializer* raptor_new_serializer_v2 (raptor_world* world, const char* name) 2.0.0 raptor_serializer* raptor_new_serializer (raptor_world* world, const char* name) - 1.4.21 raptor_stringbuffer* raptor_new_stringbuffer (void) 2.0.0 raptor_stringbuffer* raptor_new_stringbuffer (void) - 1.4.21 raptor_uri* raptor_new_uri (const unsigned char* uri_string) 2.0.0 raptor_uri* raptor_new_uri (raptor_world* world, const unsigned char* uri_string) - 1.4.21 raptor_uri* raptor_new_uri_for_rdf_concept (const char* name) 2.0.0 raptor_uri* raptor_new_uri_for_rdf_concept (raptor_world* world, const unsigned char* name) - 1.4.21 raptor_uri* raptor_new_uri_for_rdf_concept_v2 (raptor_world* world, const char* name) 2.0.0 raptor_uri* raptor_new_uri_for_rdf_concept (raptor_world* world, const unsigned char* name) - 1.4.21 raptor_uri* raptor_new_uri_for_retrieval (raptor_uri* old_uri) 2.0.0 raptor_uri* raptor_new_uri_for_retrieval (raptor_uri* old_uri) - 1.4.21 raptor_uri* raptor_new_uri_for_retrieval_v2 (raptor_world* world, raptor_uri* old_uri) 2.0.0 raptor_uri* raptor_new_uri_for_retrieval (raptor_uri* old_uri) - 1.4.21 raptor_uri* raptor_new_uri_for_xmlbase (raptor_uri* old_uri) 2.0.0 raptor_uri* raptor_new_uri_for_xmlbase (raptor_uri* old_uri) - 1.4.21 raptor_uri* raptor_new_uri_for_xmlbase_v2 (raptor_world* world, raptor_uri* old_uri) 2.0.0 raptor_uri* raptor_new_uri_for_xmlbase (raptor_uri* old_uri) - 1.4.21 raptor_uri* raptor_new_uri_from_id (raptor_uri *base_uri, const unsigned char* id) 2.0.0 raptor_uri* raptor_new_uri_from_id (raptor_world* world, raptor_uri *base_uri, const unsigned char* id) - 1.4.21 raptor_uri* raptor_new_uri_from_id_v2 (raptor_world* world, raptor_uri *base_uri, const unsigned char* id) 2.0.0 raptor_uri* raptor_new_uri_from_id (raptor_world* world, raptor_uri *base_uri, const unsigned char* id) - 1.4.21 raptor_uri* raptor_new_uri_from_uri_local_name (raptor_uri *uri, const unsigned char* local_name) 2.0.0 raptor_uri* raptor_new_uri_from_uri_local_name (raptor_world* world, raptor_uri *uri, const unsigned char* local_name) - 1.4.21 raptor_uri* raptor_new_uri_from_uri_local_name_v2 (raptor_world* world, raptor_uri *uri, const unsigned char* local_name) 2.0.0 raptor_uri* raptor_new_uri_from_uri_local_name (raptor_world* world, raptor_uri *uri, const unsigned char* local_name) - 1.4.21 raptor_uri* raptor_new_uri_relative_to_base (raptor_uri *base_uri, const unsigned char* uri_string) 2.0.0 raptor_uri* raptor_new_uri_relative_to_base (raptor_world* world, raptor_uri *base_uri, const unsigned char* uri_string) - 1.4.21 raptor_uri* raptor_new_uri_relative_to_base_v2 (raptor_world* world, raptor_uri *base_uri, const unsigned char* uri_string) 2.0.0 raptor_uri* raptor_new_uri_relative_to_base (raptor_world* world, raptor_uri *base_uri, const unsigned char* uri_string) - 1.4.21 raptor_uri* raptor_new_uri_v2 (raptor_world* world, const unsigned char* uri_string) 2.0.0 raptor_uri* raptor_new_uri (raptor_world* world, const unsigned char* uri_string) - 1.4.21 raptor_world* raptor_new_world (void) 2.0.0 raptor_world* raptor_new_world (void) - 1.4.21 raptor_xml_element* raptor_new_xml_element (raptor_qname* name, const unsigned char* xml_language, raptor_uri* xml_base) 2.0.0 raptor_xml_element* raptor_new_xml_element (raptor_qname* name, const unsigned char* xml_language, raptor_uri* xml_base) - 1.4.21 raptor_xml_element* raptor_new_xml_element_from_namespace_local_name (raptor_namespace *ns, const unsigned char* name, const unsigned char* xml_language, raptor_uri *xml_base) 2.0.0 raptor_xml_element* raptor_new_xml_element_from_namespace_local_name (raptor_namespace *ns, const unsigned char* name, const unsigned char* xml_language, raptor_uri *xml_base) - 1.4.21 raptor_xml_writer* raptor_new_xml_writer (raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) 2.0.0 raptor_xml_writer* raptor_new_xml_writer (raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr) - 1.4.21 raptor_xml_writer* raptor_new_xml_writer_v2 (raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) 2.0.0 raptor_xml_writer* raptor_new_xml_writer (raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr) - 1.4.21 unsigned char* raptor_ntriples_string_as_utf8_string (raptor_parser* rdf_parser, const unsigned char* src, int len, size_t *dest_lenp) 2.0.0 - - - Deprecated internal debug function. 1.4.21 const char* raptor_ntriples_term_as_string (raptor_ntriples_term_type term) 2.0.0 - - - Deprecated internal debug function. 1.4.21 void raptor_parse_abort (raptor_parser* rdf_parser) 2.0.0 void raptor_parser_parse_abort (raptor_parser* rdf_parser) - 1.4.21 int raptor_parse_chunk (raptor_parser* rdf_parser, const unsigned char* buffer, size_t len, int is_end) 2.0.0 int raptor_parser_parse_chunk (raptor_parser* rdf_parser, const unsigned char* buffer, size_t len, int is_end) - 1.4.21 int raptor_parse_file (raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) 2.0.0 int raptor_parser_parse_file (raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) - 1.4.21 int raptor_parse_file_stream (raptor_parser* rdf_parser, FILE *stream, const char* filename, raptor_uri *base_uri) 2.0.0 int raptor_parser_parse_file_stream (raptor_parser* rdf_parser, FILE *stream, const char* filename, raptor_uri *base_uri) - 1.4.21 int raptor_parse_uri (raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) 2.0.0 int raptor_parser_parse_uri (raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) - 1.4.21 int raptor_parse_uri_with_connection (raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection) 2.0.0 int raptor_parser_parse_uri_with_connection (raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection) - 1.4.21 const char* raptor_parser_get_accept_header (raptor_parser* rdf_parser) 2.0.0 const char* raptor_parser_get_accept_header (raptor_parser* rdf_parser) - 1.4.21 const unsigned char* raptor_parser_get_feature_string (raptor_parser *parser, raptor_feature feature) 2.0.0 const unsigned char* raptor_parser_get_option (raptor_parser *parser, raptor_option option, char** string_p, int* integer_p) - 1.4.21 raptor_world* raptor_parser_get_world (raptor_parser* rdf_parser) 2.0.0 raptor_world* raptor_parser_get_world (raptor_parser* rdf_parser) - 1.4.21 int raptor_parser_set_feature_string (raptor_parser *parser, raptor_feature feature, const unsigned char* value) 2.0.0 int raptor_parser_set_option (raptor_parser *parser, raptor_option option, char* string, int integer) - 1.4.21 void raptor_parser_set_uri_filter (raptor_parser* parser, raptor_uri_filter_func filter, void* user_data) 2.0.0 void raptor_parser_set_uri_filter (raptor_parser* parser, raptor_uri_filter_func filter, void* user_data) - 1.4.21 int raptor_parsers_enumerate (const unsigned int counter, const char* *name, const char* *label) 2.0.0 raptor_syntax_description* raptor_world_get_parser_description (raptor_world* world, unsigned int counter) - 1.4.21 int raptor_parsers_enumerate_v2 (raptor_world* world, const unsigned int counter, const char* *name, const char* *label) 2.0.0 raptor_syntax_description* raptor_world_get_parser_description (raptor_world* world, const unsigned int counter) - 1.4.21 void raptor_print_locator (FILE *stream, raptor_locator* locator) 2.0.0 int raptor_locator_print (raptor_locator* locator, FILE *stream) - 1.4.21 void raptor_print_locator_v2 (raptor_world* world, FILE *stream, raptor_locator* locator) 2.0.0 void raptor_locator_print (raptor_locator* locator, FILE *stream) - 1.4.21 int raptor_print_ntriples_string (FILE *stream, const unsigned char* string, const char delim) 2.0.0 - - - Use raptor_string_ntriples_write() with a #raptor_iostream 1.4.21 void raptor_print_statement (const raptor_statement * statement, FILE *stream) 2.0.0 int raptor_statement_print (const raptor_statement * statement, FILE *stream) - 1.4.21 void raptor_print_statement_as_ntriples (const raptor_statement * statement, FILE *stream) 2.0.0 int raptor_statement_print_as_ntriples (const raptor_statement * statement, FILE *stream) - 1.4.21 void raptor_print_statement_as_ntriples_v2 (const raptor_statement_v2 * statement, FILE *stream) 2.0.0 int raptor_statement_print_as_ntriples (const raptor_statement * statement, FILE *stream) - 1.4.21 void raptor_print_statement_detailed (const raptor_statement * statement, int detailed, FILE *stream) 2.0.0 - - - Deprecated internal function. 1.4.21 void raptor_print_statement_v2 (const raptor_statement_v2 * statement, FILE *stream) 2.0.0 int raptor_statement_print (const raptor_statement * statement, FILE *stream) - 1.4.21 raptor_qname* raptor_qname_copy (raptor_qname *qname) 2.0.0 raptor_qname* raptor_qname_copy (raptor_qname *qname) - 1.4.21 int raptor_qname_equal (raptor_qname *name1, raptor_qname *name2) 2.0.0 int raptor_qname_equal (raptor_qname *name1, raptor_qname *name2) - 1.4.21 const unsigned char* raptor_qname_get_counted_value (raptor_qname* name, size_t* length_p) 2.0.0 const unsigned char* raptor_qname_get_counted_value (raptor_qname* name, size_t* length_p) - 1.4.21 const unsigned char* raptor_qname_get_local_name (raptor_qname* name) 2.0.0 const unsigned char* raptor_qname_get_local_name (raptor_qname* name) - 1.4.21 const raptor_namespace* raptor_qname_get_namespace (raptor_qname* name) 2.0.0 const raptor_namespace* raptor_qname_get_namespace (raptor_qname* name) - 1.4.21 const unsigned char* raptor_qname_get_value (raptor_qname* name) 2.0.0 const unsigned char* raptor_qname_get_value (raptor_qname* name) - 1.4.21 raptor_uri* raptor_qname_string_to_uri (raptor_namespace_stack *nstack, const unsigned char* name, size_t name_len, raptor_simple_message_handler error_handler, void *error_data) 2.0.0 raptor_uri* raptor_qname_string_to_uri (raptor_namespace_stack *nstack, const unsigned char* name, size_t name_len) - 1.4.21 unsigned char* raptor_qname_to_counted_name (raptor_qname *qname, size_t* length_p) 2.0.0 unsigned char* raptor_qname_to_counted_name (raptor_qname *qname, size_t* length_p) - 1.4.21 raptor_uri* raptor_sax2_inscope_base_uri (raptor_sax2* sax2) 2.0.0 raptor_uri* raptor_sax2_inscope_base_uri (raptor_sax2* sax2) - 1.4.21 const unsigned char* raptor_sax2_inscope_xml_language (raptor_sax2* sax2) 2.0.0 const unsigned char* raptor_sax2_inscope_xml_language (raptor_sax2* sax2) - 1.4.21 int raptor_sax2_parse_chunk (raptor_sax2* sax2, const unsigned char* buffer, size_t len, int is_end) 2.0.0 int raptor_sax2_parse_chunk (raptor_sax2* sax2, const unsigned char* buffer, size_t len, int is_end) - 1.4.21 void raptor_sax2_parse_start (raptor_sax2 *sax2, raptor_uri *base_uri) 2.0.0 void raptor_sax2_parse_start (raptor_sax2 *sax2, raptor_uri *base_uri) - 1.4.21 void raptor_sax2_set_cdata_handler (raptor_sax2* sax2, raptor_sax2_cdata_handler handler) 2.0.0 void raptor_sax2_set_cdata_handler (raptor_sax2* sax2, raptor_sax2_cdata_handler handler) - 1.4.21 void raptor_sax2_set_characters_handler (raptor_sax2* sax2, raptor_sax2_characters_handler handler) 2.0.0 void raptor_sax2_set_characters_handler (raptor_sax2* sax2, raptor_sax2_characters_handler handler) - 1.4.21 void raptor_sax2_set_comment_handler (raptor_sax2* sax2, raptor_sax2_comment_handler handler) 2.0.0 void raptor_sax2_set_comment_handler (raptor_sax2* sax2, raptor_sax2_comment_handler handler) - 1.4.21 void raptor_sax2_set_end_element_handler (raptor_sax2* sax2, raptor_sax2_end_element_handler handler) 2.0.0 void raptor_sax2_set_end_element_handler (raptor_sax2* sax2, raptor_sax2_end_element_handler handler) - 1.4.21 void raptor_sax2_set_external_entity_ref_handler (raptor_sax2* sax2, raptor_sax2_external_entity_ref_handler handler) 2.0.0 void raptor_sax2_set_external_entity_ref_handler (raptor_sax2* sax2, raptor_sax2_external_entity_ref_handler handler) - 1.4.21 void raptor_sax2_set_namespace_handler (raptor_sax2* sax2, raptor_namespace_handler handler) 2.0.0 void raptor_sax2_set_namespace_handler (raptor_sax2* sax2, raptor_namespace_handler handler) - 1.4.21 void raptor_sax2_set_start_element_handler (raptor_sax2* sax2, raptor_sax2_start_element_handler handler) 2.0.0 void raptor_sax2_set_start_element_handler (raptor_sax2* sax2, raptor_sax2_start_element_handler handler) - 1.4.21 void raptor_sax2_set_unparsed_entity_decl_handler (raptor_sax2* sax2, raptor_sax2_unparsed_entity_decl_handler handler) 2.0.0 void raptor_sax2_set_unparsed_entity_decl_handler (raptor_sax2* sax2, raptor_sax2_unparsed_entity_decl_handler handler) - 1.4.21 void* raptor_sequence_delete_at (raptor_sequence* seq, int idx) 2.0.0 void* raptor_sequence_delete_at (raptor_sequence* seq, int idx) - 1.4.21 void* raptor_sequence_get_at (raptor_sequence* seq, int idx) 2.0.0 void* raptor_sequence_get_at (raptor_sequence* seq, int idx) - 1.4.21 int raptor_sequence_join (raptor_sequence* dest, raptor_sequence *src) 2.0.0 int raptor_sequence_join (raptor_sequence* dest, raptor_sequence *src) - 1.4.21 void* raptor_sequence_pop (raptor_sequence* seq) 2.0.0 void* raptor_sequence_pop (raptor_sequence* seq) - 1.4.21 void raptor_sequence_print (raptor_sequence* seq, FILE* fh) 2.0.0 int raptor_sequence_print (raptor_sequence* seq, FILE* fh) - 1.4.21 void raptor_sequence_print_string (char* data, FILE *fh) 2.0.0 - - - Trivial utility function removed. 1.4.21 void raptor_sequence_print_uri (char* data, FILE *fh) 2.0.0 - - - Deprecated for raptor_uri_print() 1.4.21 int raptor_sequence_push (raptor_sequence* seq, void *data) 2.0.0 int raptor_sequence_push (raptor_sequence* seq, void *data) - 1.4.21 int raptor_sequence_set_at (raptor_sequence* seq, int idx, void *data) 2.0.0 int raptor_sequence_set_at (raptor_sequence* seq, int idx, void *data) - 1.4.21 void raptor_sequence_set_print_handler (raptor_sequence *seq, raptor_sequence_print_handler *print_handler) 2.0.0 - - - Use the argument in the raptor_new_sequence() constructor instead. 1.4.21 void raptor_sequence_set_print_handler_v2 (raptor_sequence *seq, raptor_sequence_print_handler_v2 *print_handler) 2.0.0 - - - Use the argument in the raptor_new_sequence() constructor instead. 1.4.21 int raptor_sequence_shift (raptor_sequence* seq, void *data) 2.0.0 int raptor_sequence_shift (raptor_sequence* seq, void *data) - 1.4.21 int raptor_sequence_size (raptor_sequence* seq) 2.0.0 int raptor_sequence_size (raptor_sequence* seq) - 1.4.21 void raptor_sequence_sort (raptor_sequence* seq, int(*compare)(const void *, const void *)) 2.0.0 void raptor_sequence_sort (raptor_sequence* seq, raptor_data_compare_handler compare) - 1.4.21 void* raptor_sequence_unshift (raptor_sequence* seq) 2.0.0 void* raptor_sequence_unshift (raptor_sequence* seq) - 1.4.21 int raptor_serialize_end (raptor_serializer *rdf_serializer) 2.0.0 int raptor_serializer_serialize_end (raptor_serializer *rdf_serializer) - 1.4.21 int raptor_serialize_set_namespace (raptor_serializer* rdf_serializer, raptor_uri *uri, const unsigned char* prefix) 2.0.0 int raptor_serializer_set_namespace (raptor_serializer* rdf_serializer, raptor_uri *uri, const unsigned char* prefix) - 1.4.21 int raptor_serialize_set_namespace_from_namespace (raptor_serializer* rdf_serializer, raptor_namespace *nspace) 2.0.0 int raptor_serializer_set_namespace_from_namespace (raptor_serializer* rdf_serializer, raptor_namespace *nspace) - 1.4.21 int raptor_serialize_start (raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) 2.0.0 int raptor_serializer_start_to_iostream (raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) - 1.4.21 int raptor_serialize_start_to_file_handle (raptor_serializer *rdf_serializer, raptor_uri *uri, FILE *fh) 2.0.0 int raptor_serializer_start_to_file_handle (raptor_serializer *rdf_serializer, raptor_uri *uri, FILE *fh) - 1.4.21 int raptor_serialize_start_to_filename (raptor_serializer *rdf_serializer, const char* filename) 2.0.0 int raptor_serializer_start_to_filename (raptor_serializer *rdf_serializer, const char* filename) - 1.4.21 int raptor_serialize_start_to_iostream (raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) 2.0.0 int raptor_serializer_start_to_iostream (raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) - 1.4.21 int raptor_serialize_start_to_string (raptor_serializer *rdf_serializer, raptor_uri *uri, void **string_p, size_t *length_p) 2.0.0 int raptor_serializer_start_to_string (raptor_serializer *rdf_serializer, raptor_uri *uri, void **string_p, size_t *length_p) - 1.4.21 int raptor_serialize_statement (raptor_serializer* rdf_serializer, const raptor_statement *statement) 2.0.0 int raptor_serializer_serialize_statement (raptor_serializer* rdf_serializer, raptor_statement *statement) - 1.4.21 int raptor_serializer_features_enumerate (const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_SERIALIZER 1.4.21 int raptor_serializer_features_enumerate_v2 (raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_SERIALIZER 1.4.21 int raptor_serializer_get_feature (raptor_serializer *serializer, raptor_feature feature) 2.0.0 int raptor_serializer_get_option (raptor_serializer *serializer, raptor_option option) - 1.4.21 const unsigned char* raptor_serializer_get_feature_string (raptor_serializer *serializer, raptor_feature feature) 2.0.0 int raptor_serializer_get_option (raptor_serializer *serializer, raptor_option option, char** string_p, int* integer_p) - 1.4.21 raptor_iostream* raptor_serializer_get_iostream (raptor_serializer *serializer) 2.0.0 raptor_iostream* raptor_serializer_get_iostream (raptor_serializer *serializer) - 1.4.21 raptor_locator* raptor_serializer_get_locator (raptor_serializer *rdf_serializer) 2.0.0 raptor_locator* raptor_serializer_get_locator (raptor_serializer *rdf_serializer) - 1.4.21 raptor_world* raptor_serializer_get_world (raptor_serializer* rdf_serializer) 2.0.0 raptor_world* raptor_serializer_get_world (raptor_serializer* rdf_serializer) - 1.4.21 void raptor_serializer_set_error_handler (raptor_serializer* serializer, void *user_data, raptor_message_handler handler) 2.0.0 - - - Replaced by raptor_world_set_log_handler() on the #raptor_world object. 1.4.21 int raptor_serializer_set_feature (raptor_serializer *serializer, raptor_feature feature, int value) 2.0.0 int raptor_serializer_set_option (raptor_serializer *serializer, raptor_option option, char* string, int integer) - 1.4.21 int raptor_serializer_set_feature_string (raptor_serializer *serializer, raptor_feature feature, const unsigned char* value) 2.0.0 int raptor_serializer_set_option (raptor_serializer *serializer, raptor_option option, char* string, int integer) - 1.4.21 void raptor_serializer_set_warning_handler (raptor_serializer* serializer, void *user_data, raptor_message_handler handler) 2.0.0 - - - Replaced by raptor_world_set_log_handler() on the #raptor_world object. 1.4.21 int raptor_serializer_syntax_name_check (const char* name) 2.0.0 int raptor_world_is_serializer_name (raptor_world* world, const char* name) - 1.4.21 int raptor_serializer_syntax_name_check_v2 (raptor_world* world, const char* name) 2.0.0 int raptor_world_is_serializer_name (raptor_world* world, const char* name) - 1.4.21 int raptor_serializers_enumerate (const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) 2.0.0 const raptor_syntax_description* raptor_world_get_serializer_description (raptor_world* world, unsigned int counter) - 1.4.21 int raptor_serializers_enumerate_v2 (raptor_world* world, const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) 2.0.0 const raptor_syntax_description* raptor_world_get_serializer_description (raptor_world* world, const unsigned int counter) - 1.4.21 void raptor_set_default_generate_id_parameters (raptor_parser* rdf_parser, char* prefix, int base) 2.0.0 void raptor_world_set_generate_bnodeid_parameters (raptor_world* world, char* prefix, int base) - 1.4.21 void raptor_set_error_handler (raptor_parser* parser, void *user_data, raptor_message_handler handler) 2.0.0 - - - Replaced by raptor_world_set_log_handler() on the #raptor_world object. 1.4.21 void raptor_set_fatal_error_handler (raptor_parser* parser, void *user_data, raptor_message_handler handler) 2.0.0 - - - Replaced by raptor_world_set_log_handler() on the #raptor_world object. 1.4.21 int raptor_set_feature (raptor_parser *parser, raptor_feature feature, int value) 2.0.0 int raptor_parser_set_option (raptor_parser *parser, raptor_option option, char* string, int integer) - 1.4.21 void raptor_set_generate_id_handler (raptor_parser* parser, void *user_data, raptor_generate_id_handler handler) 2.0.0 void raptor_world_set_generate_bnodeid_handler (raptor_world* world, void *user_data, raptor_generate_bnodeid_handler handler) - 1.4.21 void raptor_set_graph_handler (raptor_parser* parser, void *user_data, raptor_graph_handler handler) 2.0.0 void raptor_parser_set_graph_mark_handler (raptor_parser* parser, void *user_data, raptor_graph_mark_handler handler) - 1.4.21 void raptor_set_libxslt_security_preferences (void *security_preferences) 2.0.0 int raptor_world_set_libxslt_security_preferences (raptor_world *world, void *security_preferences) - 1.4.21 void raptor_set_namespace_handler (raptor_parser* parser, void *user_data, raptor_namespace_handler handler) 2.0.0 void raptor_parser_set_namespace_handler (raptor_parser* parser, void *user_data, raptor_namespace_handler handler) - 1.4.21 void raptor_set_parser_strict (raptor_parser* rdf_parser, int is_strict) 2.0.0 - - - Replaced by raptor_parser_set_option() with option RAPTOR_OPTION_STRICT 1.4.21 void raptor_set_statement_handler (raptor_parser* parser, void *user_data, raptor_statement_handler handler) 2.0.0 void raptor_parser_set_statement_handler (raptor_parser* parser, void *user_data, raptor_statement_handler handler) - 1.4.21 void raptor_set_warning_handler (raptor_parser* parser, void *user_data, raptor_message_handler handler) 2.0.0 - - - Replaced by raptor_world_set_log_handler() on the #raptor_world object. 1.4.21 int raptor_start_parse (raptor_parser *rdf_parser, raptor_uri *uri) 2.0.0 int raptor_parser_parse_start (raptor_parser *rdf_parser, raptor_uri *uri) - 1.4.21 int raptor_statement_compare (const raptor_statement *s1, const raptor_statement *s2) 2.0.0 int raptor_statement_compare (const raptor_statement *s1, const raptor_statement *s2) - 1.4.21 int raptor_statement_compare_v2 (const raptor_statement_v2 *s1, const raptor_statement_v2 *s2) 2.0.0 int raptor_statement_compare (const raptor_statement *s1, const raptor_statement *s2) - 1.4.21 unsigned char* raptor_statement_part_as_counted_string (const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char* literal_language, size_t* len_p) 2.0.0 - - - Better done via methods of #raptor_term class such as raptor_term_to_counted_string(). 1.4.21 unsigned char* raptor_statement_part_as_counted_string_v2 (raptor_world* world, const void *term, raptor_identifier_type type, raptor_uri* literal_datatype, const unsigned char* literal_language, size_t* len_p) 2.0.0 - - - Better done via methods of #raptor_term class such as raptor_term_to_counted_string(). 1.4.21 unsigned char* raptor_statement_part_as_string () 2.0.0 - - - Better done via methods of #raptor_term class such as raptor_term_to_string(). 1.4.21 unsigned char* raptor_statement_part_as_string_v2 () 2.0.0 - - - Better done via methods of #raptor_term class such as raptor_term_to_string(). 1.4.21 int raptor_stringbuffer_append_counted_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, size_t length, int do_copy) 2.0.0 int raptor_stringbuffer_append_counted_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, size_t length, int do_copy) - 1.4.21 int raptor_stringbuffer_append_decimal (raptor_stringbuffer* stringbuffer, int integer) 2.0.0 int raptor_stringbuffer_append_decimal (raptor_stringbuffer* stringbuffer, int integer) - 1.4.21 int raptor_stringbuffer_append_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, int do_copy) 2.0.0 int raptor_stringbuffer_append_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, int do_copy) - 1.4.21 int raptor_stringbuffer_append_stringbuffer (raptor_stringbuffer* stringbuffer, raptor_stringbuffer* append) 2.0.0 int raptor_stringbuffer_append_stringbuffer (raptor_stringbuffer* stringbuffer, raptor_stringbuffer* append) - 1.4.21 unsigned char* raptor_stringbuffer_as_string (raptor_stringbuffer* stringbuffer) 2.0.0 unsigned char* raptor_stringbuffer_as_string (raptor_stringbuffer* stringbuffer) - 1.4.21 int raptor_stringbuffer_copy_to_string (raptor_stringbuffer* stringbuffer, unsigned char* string, size_t length) 2.0.0 int raptor_stringbuffer_copy_to_string (raptor_stringbuffer* stringbuffer, unsigned char* string, size_t length) - 1.4.21 size_t raptor_stringbuffer_length (raptor_stringbuffer* stringbuffer) 2.0.0 size_t raptor_stringbuffer_length (raptor_stringbuffer* stringbuffer) - 1.4.21 int raptor_stringbuffer_prepend_counted_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, size_t length, int do_copy) 2.0.0 int raptor_stringbuffer_prepend_counted_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, size_t length, int do_copy) - 1.4.21 int raptor_stringbuffer_prepend_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, int do_copy) 2.0.0 int raptor_stringbuffer_prepend_string (raptor_stringbuffer* stringbuffer, const unsigned char* string, int do_copy) - 1.4.21 int raptor_syntax_name_check (const char* name) 2.0.0 int raptor_world_is_parser_name (raptor_world* world, const char *name) - 1.4.21 int raptor_syntax_name_check_v2 (raptor_world* world, const char* name) 2.0.0 int raptor_world_is_parser_name (raptor_world* world, const char *name) - 1.4.21 int raptor_syntaxes_enumerate (const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) 2.0.0 raptor_syntax_description* raptor_world_get_parser_description (raptor_world* world, const unsigned int counter) - 1.4.21 int raptor_syntaxes_enumerate_v2 (raptor_world* world, const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) 2.0.0 raptor_syntax_description* raptor_world_get_parser_description (raptor_world* world, const unsigned int counter) - 1.4.21 int raptor_unicode_char_to_utf8 (raptor_unichar c, unsigned char* output) 2.0.0 int raptor_unicode_utf8_string_put_char (raptor_unichar c, unsigned char* output, size_t length) - 1.4.21 int raptor_unicode_is_xml10_namechar (raptor_unichar c) 2.0.0 int raptor_unicode_is_xml10_namechar (raptor_unichar c) - 1.4.21 int raptor_unicode_is_xml10_namestartchar (raptor_unichar c) 2.0.0 int raptor_unicode_is_xml10_namestartchar (raptor_unichar c) - 1.4.21 int raptor_unicode_is_xml11_namechar (raptor_unichar c) 2.0.0 int raptor_unicode_is_xml11_namechar (raptor_unichar c) - 1.4.21 int raptor_unicode_is_xml11_namestartchar (raptor_unichar c) 2.0.0 int raptor_unicode_is_xml11_namestartchar (raptor_unichar c) - 1.4.21 unsigned char* raptor_uri_as_counted_string (raptor_uri *uri, size_t* len_p) 2.0.0 unsigned char* raptor_uri_as_counted_string (raptor_uri *uri, size_t* len_p) - 1.4.21 unsigned char* raptor_uri_as_counted_string_v2 (raptor_world* world, raptor_uri *uri, size_t* len_p) 2.0.0 unsigned char* raptor_uri_as_counted_string (raptor_uri *uri, size_t* len_p) - 1.4.21 unsigned char* raptor_uri_as_string (raptor_uri *uri) 2.0.0 unsigned char* raptor_uri_as_string (raptor_uri *uri) - 1.4.21 unsigned char* raptor_uri_as_string_v2 (raptor_world* world, raptor_uri *uri) 2.0.0 unsigned char* raptor_uri_as_string (raptor_uri *uri) - 1.4.21 int raptor_uri_compare (raptor_uri* uri1, raptor_uri* uri2) 2.0.0 int raptor_uri_compare (raptor_uri* uri1, raptor_uri* uri2) - 1.4.21 int raptor_uri_compare_v2 (raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) 2.0.0 int raptor_uri_compare (raptor_uri* uri1, raptor_uri* uri2) - 1.4.21 raptor_uri* raptor_uri_copy (raptor_uri *uri) 2.0.0 raptor_uri* raptor_uri_copy (raptor_uri *uri) - 1.4.21 raptor_uri* raptor_uri_copy_v2 (raptor_world* world, raptor_uri *uri) 2.0.0 raptor_uri* raptor_uri_copy (raptor_uri *uri) - 1.4.21 int raptor_uri_equals (raptor_uri* uri1, raptor_uri* uri2) 2.0.0 int raptor_uri_equals (raptor_uri* uri1, raptor_uri* uri2) - 1.4.21 int raptor_uri_equals_v2 (raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) 2.0.0 int raptor_uri_equals (raptor_uri* uri1, raptor_uri* uri2) - 1.4.21 unsigned char* raptor_uri_filename_to_uri_string (const char* filename) 2.0.0 unsigned char* raptor_uri_filename_to_uri_string (const char* filename) - 1.4.21 void raptor_uri_get_handler (const raptor_uri_handler **handler, void **context) 2.0.0 - - - Entire URI implementation is internal and not replaceable. 1.4.21 void raptor_uri_get_handler_v2 (raptor_world* world, const raptor_uri_handler **handler, void **context) 2.0.0 - - - Entire URI implementation is internal and not replaceable. 1.4.21 int raptor_uri_is_file_uri (const unsigned char* uri_string) 2.0.0 int raptor_uri_uri_string_is_file_uri (const unsigned char* uri_string) - 1.4.21 void raptor_uri_print (const raptor_uri* uri, FILE *stream) 2.0.0 int raptor_uri_print (const raptor_uri* uri, FILE *stream) - 1.4.21 void raptor_uri_print_v2 (raptor_world* world, const raptor_uri* uri, FILE *stream) 2.0.0 int raptor_uri_print (const raptor_uri* uri, FILE *stream) - 1.4.21 void raptor_uri_resolve_uri_reference (const unsigned char* base_uri, const unsigned char* reference_uri, unsigned char* buffer, size_t length) 2.0.0 size_t raptor_uri_resolve_uri_reference (const unsigned char* base_uri, const unsigned char* reference_uri, unsigned char* buffer, size_t length) - 1.4.21 void raptor_uri_set_handler (const raptor_uri_handler *handler, void *context) 2.0.0 - - - Entire URI implementation is internal and not replaceable. 1.4.21 void raptor_uri_set_handler_v2 (raptor_world* world, const raptor_uri_handler *handler, void *context) 2.0.0 - - - Entire URI implementation is internal and not replaceable. 1.4.21 unsigned char* raptor_uri_to_counted_string (raptor_uri *uri, size_t *len_p) 2.0.0 unsigned char* raptor_uri_to_counted_string (raptor_uri *uri, size_t *len_p) - 1.4.21 unsigned char* raptor_uri_to_counted_string_v2 (raptor_world* world, raptor_uri *uri, size_t *len_p) 2.0.0 unsigned char* raptor_uri_to_counted_string (raptor_uri *uri, size_t *len_p) - 1.4.21 unsigned char* raptor_uri_to_relative_counted_uri_string (raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) 2.0.0 unsigned char* raptor_uri_to_relative_counted_uri_string (raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) - 1.4.21 unsigned char* raptor_uri_to_relative_counted_uri_string_v2 (raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) 2.0.0 unsigned char* raptor_uri_to_relative_counted_uri_string (raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) - 1.4.21 unsigned char* raptor_uri_to_relative_uri_string (raptor_uri *base_uri, raptor_uri *reference_uri) 2.0.0 unsigned char* raptor_uri_to_relative_uri_string (raptor_uri *base_uri, raptor_uri *reference_uri) - 1.4.21 unsigned char* raptor_uri_to_relative_uri_string_v2 (raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri) 2.0.0 unsigned char* raptor_uri_to_relative_uri_string (raptor_uri *base_uri, raptor_uri *reference_uri) - 1.4.21 unsigned char* raptor_uri_to_string (raptor_uri *uri) 2.0.0 unsigned char* raptor_uri_to_string (raptor_uri *uri) - 1.4.21 unsigned char* raptor_uri_to_string_v2 (raptor_world* world, raptor_uri *uri) 2.0.0 unsigned char* raptor_uri_to_string (raptor_uri *uri) - 1.4.21 int raptor_uri_uri_string_is_file_uri (const unsigned char* uri_string) 2.0.0 int raptor_uri_uri_string_is_file_uri (const unsigned char* uri_string) - 1.4.21 char* raptor_uri_uri_string_to_filename (const unsigned char* uri_string) 2.0.0 char* raptor_uri_uri_string_to_filename (const unsigned char* uri_string) - 1.4.21 char* raptor_uri_uri_string_to_filename_fragment (const unsigned char* uri_string, unsigned char* *fragment_p) 2.0.0 char* raptor_uri_uri_string_to_filename_fragment (const unsigned char* uri_string, unsigned char* *fragment_p) - 1.4.21 int raptor_utf8_check (const unsigned char* string, size_t length) 2.0.0 int raptor_unicode_check_utf8_string (const unsigned char* string, size_t length) - 1.4.21 int raptor_utf8_to_unicode_char (raptor_unichar* output, const unsigned char* input, int length) 2.0.0 int raptor_unicode_utf8_string_get_char (const unsigned char* input, size_t length, raptor_unichar* output) - 1.4.21 char* raptor_vsnprintf (const char* message, va_list arguments) 2.0.0 char* raptor_vsnprintf (const char* message, va_list arguments) - 1.4.21 int raptor_world_open (raptor_world* world) 2.0.0 int raptor_world_open (raptor_world* world) - 1.4.21 void raptor_world_set_libxml_flags (raptor_world *world, int flags) 2.0.0 int raptor_world_set_flag (raptor_world *world, raptor_world_flag flag, int value) - 1.4.21 void raptor_world_set_libxslt_security_preferences (raptor_world *world, void *security_preferences) 2.0.0 int raptor_world_set_libxslt_security_preferences (raptor_world *world, void *security_preferences) - 1.4.21 void raptor_www_abort (raptor_www *www, const char* reason) 2.0.0 void raptor_www_abort (raptor_www *www, const char* reason) - 1.4.21 int raptor_www_fetch (raptor_www *www, raptor_uri *uri) 2.0.0 int raptor_www_fetch (raptor_www *www, raptor_uri *uri) - 1.4.21 int raptor_www_fetch_to_string (raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) 2.0.0 int raptor_www_fetch_to_string (raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler) - 1.4.21 void raptor_www_finish (void) 2.0.0 - - - No need for this to be public. 1.4.21 void raptor_www_finish_v2 (raptor_world* world) 2.0.0 - - - No need for this to be public. 1.4.21 void raptor_www_free (raptor_www *www) 2.0.0 void raptor_free_www (raptor_www *www) - 1.4.21 void* raptor_www_get_connection (raptor_www *www) 2.0.0 void* raptor_www_get_connection (raptor_www *www) - 1.4.21 raptor_uri* raptor_www_get_final_uri (raptor_www* www) 2.0.0 raptor_uri* raptor_www_get_final_uri (raptor_www* www) - 1.4.21 void raptor_www_init (void) 2.0.0 - - - No need for this to be public. 1.4.21 int raptor_www_init_v2 (raptor_world* world) 2.0.0 - - - No need for this to be public. 1.4.21 raptor_www* raptor_www_new (void) 2.0.0 raptor_www* raptor_new_www (raptor_world* world) - 1.4.21 raptor_www* raptor_www_new_v2 (raptor_world* world) 2.0.0 raptor_www* raptor_new_www (raptor_world* world) - 1.4.21 raptor_www* raptor_www_new_with_connection (void* connection) 2.0.0 raptor_www* raptor_new_www_with_connection (raptor_world* world, void* connection) - 1.4.21 raptor_www* raptor_www_new_with_connection_v2 (raptor_world* world, void* connection) 2.0.0 raptor_www* raptor_new_www_with_connection (raptor_world* world, void* connection) - 1.4.21 void raptor_www_no_www_library_init_finish (void) 2.0.0 - - - Deprecated for raptor_world_set_flag(). 1.4.21 void raptor_www_no_www_library_init_finish_v2 (raptor_world* world) 2.0.0 - - - Deprecated for raptor_world_set_flag(). 1.4.21 void raptor_www_set_connection_timeout (raptor_www* www, int timeout) 2.0.0 void raptor_www_set_connection_timeout (raptor_www* www, int timeout) - 1.4.21 void raptor_www_set_content_type_handler (raptor_www *www, raptor_www_content_type_handler handler, void *user_data) 2.0.0 void raptor_www_set_content_type_handler (raptor_www *www, raptor_www_content_type_handler handler, void *user_data) - 1.4.21 void raptor_www_set_error_handler (raptor_www *www, raptor_message_handler error_handler, void *error_data) 2.0.0 - - - Replaced by raptor_world_set_log_handler() on the #raptor_world object. 1.4.21 void raptor_www_set_final_uri_handler (raptor_www* www, raptor_www_final_uri_handler handler, void *user_data) 2.0.0 void raptor_www_set_final_uri_handler (raptor_www* www, raptor_www_final_uri_handler handler, void *user_data) - 1.4.21 void raptor_www_set_http_accept (raptor_www *www, const char* value) 2.0.0 void raptor_www_set_http_accept (raptor_www *www, const char* value) - 1.4.21 int raptor_www_set_http_cache_control (raptor_www* www, const char* cache_control) 2.0.0 int raptor_www_set_http_cache_control (raptor_www* www, const char* cache_control) - 1.4.21 void raptor_www_set_proxy (raptor_www *www, const char* proxy) 2.0.0 void raptor_www_set_proxy (raptor_www *www, const char* proxy) - 1.4.21 void raptor_www_set_uri_filter (raptor_www* www, raptor_uri_filter_func filter, void* user_data) 2.0.0 void raptor_www_set_uri_filter (raptor_www* www, raptor_uri_filter_func filter, void* user_data) - 1.4.21 void raptor_www_set_user_agent (raptor_www *www, const char* user_agent) 2.0.0 void raptor_www_set_user_agent (raptor_www *www, const char* user_agent) - 1.4.21 void raptor_www_set_write_bytes_handler (raptor_www *www, raptor_www_write_bytes_handler handler, void *user_data) 2.0.0 void raptor_www_set_write_bytes_handler (raptor_www *www, raptor_www_write_bytes_handler handler, void *user_data) - 1.4.21 int raptor_xml_any_escape_string (const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) 2.0.0 int raptor_xml_escape_string_any (raptor_world* world, const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, int xml_version) - 1.4.21 int raptor_xml_element_declare_namespace (raptor_xml_element* xml_element, raptor_namespace *nspace) 2.0.0 int raptor_xml_element_declare_namespace (raptor_xml_element* xml_element, raptor_namespace *nspace) - 1.4.21 raptor_qname** raptor_xml_element_get_attributes (raptor_xml_element* xml_element) 2.0.0 raptor_qname** raptor_xml_element_get_attributes (raptor_xml_element* xml_element) - 1.4.21 int raptor_xml_element_get_attributes_count (raptor_xml_element* xml_element) 2.0.0 int raptor_xml_element_get_attributes_count (raptor_xml_element* xml_element) - 1.4.21 const unsigned char* raptor_xml_element_get_language (raptor_xml_element* xml_element) 2.0.0 const unsigned char* raptor_xml_element_get_language (raptor_xml_element* xml_element) - 1.4.21 raptor_qname* raptor_xml_element_get_name (raptor_xml_element *xml_element) 2.0.0 raptor_qname* raptor_xml_element_get_name (raptor_xml_element *xml_element) - 1.4.21 int raptor_xml_element_is_empty (raptor_xml_element* xml_element) 2.0.0 int raptor_xml_element_is_empty (raptor_xml_element* xml_element) - 1.4.21 void raptor_xml_element_set_attributes (raptor_xml_element* xml_element, raptor_qname **attributes, int count) 2.0.0 void raptor_xml_element_set_attributes (raptor_xml_element* xml_element, raptor_qname **attributes, int count) - 1.4.21 int raptor_xml_escape_string (const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data) 2.0.0 int raptor_xml_escape_string (raptor_world *world, const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote) - 1.4.21 int raptor_xml_name_check (const unsigned char* string, size_t length, int xml_version) 2.0.0 int raptor_xml_name_check (const unsigned char* string, size_t length, int xml_version) - 1.4.21 void raptor_xml_writer_cdata (raptor_xml_writer* xml_writer, const unsigned char* s) 2.0.0 void raptor_xml_writer_cdata (raptor_xml_writer* xml_writer, const unsigned char* s) - 1.4.21 void raptor_xml_writer_cdata_counted (raptor_xml_writer* xml_writer, const unsigned char* s, unsigned int len) 2.0.0 void raptor_xml_writer_cdata_counted (raptor_xml_writer* xml_writer, const unsigned char* s, unsigned int len) - 1.4.21 void raptor_xml_writer_comment (raptor_xml_writer* xml_writer, const unsigned char* s) 2.0.0 void raptor_xml_writer_comment (raptor_xml_writer* xml_writer, const unsigned char* s) - 1.4.21 void raptor_xml_writer_comment_counted (raptor_xml_writer* xml_writer, const unsigned char* s, unsigned int len) 2.0.0 void raptor_xml_writer_comment_counted (raptor_xml_writer* xml_writer, const unsigned char* s, unsigned int len) - 1.4.21 void raptor_xml_writer_empty_element (raptor_xml_writer* xml_writer, raptor_xml_element *element) 2.0.0 void raptor_xml_writer_empty_element (raptor_xml_writer* xml_writer, raptor_xml_element *element) - 1.4.21 void raptor_xml_writer_end_element (raptor_xml_writer* xml_writer, raptor_xml_element *element) 2.0.0 void raptor_xml_writer_end_element (raptor_xml_writer* xml_writer, raptor_xml_element *element) - 1.4.21 int raptor_xml_writer_features_enumerate (const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_XML_WRITER 1.4.21 int raptor_xml_writer_features_enumerate_v2 (raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_XML_WRITER 1.4.21 void raptor_xml_writer_flush (raptor_xml_writer* xml_writer) 2.0.0 void raptor_xml_writer_flush (raptor_xml_writer* xml_writer) - 1.4.21 int raptor_xml_writer_get_depth (raptor_xml_writer *xml_writer) 2.0.0 int raptor_xml_writer_get_depth (raptor_xml_writer *xml_writer) - 1.4.21 int raptor_xml_writer_get_feature (raptor_xml_writer *xml_writer, raptor_feature feature) 2.0.0 int raptor_xml_writer_get_option (raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p) - 1.4.21 const unsigned char* raptor_xml_writer_get_feature_string (raptor_xml_writer *xml_writer, raptor_feature feature) 2.0.0 const unsigned char* raptor_xml_writer_get_option (raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p) - 1.4.21 void raptor_xml_writer_newline (raptor_xml_writer* xml_writer) 2.0.0 void raptor_xml_writer_newline (raptor_xml_writer* xml_writer) - 1.4.21 void raptor_xml_writer_raw (raptor_xml_writer* xml_writer, const unsigned char* s) 2.0.0 void raptor_xml_writer_raw (raptor_xml_writer* xml_writer, const unsigned char* s) - 1.4.21 void raptor_xml_writer_raw_counted (raptor_xml_writer* xml_writer, const unsigned char* s, unsigned int len) 2.0.0 void raptor_xml_writer_raw_counted (raptor_xml_writer* xml_writer, const unsigned char* s, unsigned int len) - 1.4.21 int raptor_xml_writer_set_feature (raptor_xml_writer *xml_writer, raptor_feature feature, int value) 2.0.0 int raptor_xml_writer_set_option (raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer) - 1.4.21 int raptor_xml_writer_set_feature_string (raptor_xml_writer *xml_writer, raptor_feature feature, const unsigned char* value) 2.0.0 int raptor_xml_writer_set_option (raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer) - 1.4.21 void raptor_xml_writer_start_element (raptor_xml_writer* xml_writer, raptor_xml_element *element) 2.0.0 void raptor_xml_writer_start_element (raptor_xml_writer* xml_writer, raptor_xml_element *element) - 1.4.21 - - - 2.0.0 int raptor_avltree_add (raptor_avltree* tree, void* p_data) - 1.4.21 - - - 2.0.0 int raptor_avltree_delete (raptor_avltree* tree, void* p_data) - 1.4.21 - - - 2.0.0 void* raptor_avltree_iterator_get (raptor_avltree_iterator* iterator) - 1.4.21 - - - 2.0.0 int raptor_avltree_iterator_is_end (raptor_avltree_iterator* iterator) - 1.4.21 - - - 2.0.0 int raptor_avltree_iterator_next (raptor_avltree_iterator* iterator) - 1.4.21 - - - 2.0.0 int raptor_avltree_print (raptor_avltree* tree, FILE* stream) - 1.4.21 - - - 2.0.0 void* raptor_avltree_remove (raptor_avltree* tree, void* p_data) - 1.4.21 - - - 2.0.0 void* raptor_avltree_search (raptor_avltree* tree, const void* p_data) - 1.4.21 - - - 2.0.0 void raptor_avltree_set_print_handler (raptor_avltree* tree, raptor_data_print_handler print_handler) - 1.4.21 - - - 2.0.0 int raptor_avltree_size (raptor_avltree* tree) - 1.4.21 - - - 2.0.0 int raptor_avltree_visit (raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data) - 1.4.21 - - - 2.0.0 const char* raptor_domain_get_label (raptor_domain domain) - 1.4.21 - - - 2.0.0 void raptor_free_avltree (raptor_avltree* tree) - 1.4.21 - - - 2.0.0 void raptor_free_avltree_iterator (raptor_avltree_iterator* iterator) - 1.4.21 - - - 2.0.0 void raptor_free_option_description (raptor_option_description* option_description) - 1.4.21 - - - 2.0.0 void raptor_free_statement (raptor_statement *statement) - 1.4.21 - - - 2.0.0 void raptor_free_term (raptor_term *term) - 1.4.21 - - - 2.0.0 const char* raptor_log_level_get_label (raptor_log_level level) - 1.4.21 - - - 2.0.0 raptor_avltree* raptor_new_avltree (raptor_data_compare_handler compare_handler, raptor_data_free_handler free_handler, unsigned int flags) - 1.4.21 - - - 2.0.0 raptor_avltree_iterator* raptor_new_avltree_iterator (raptor_avltree* tree, void* range, raptor_data_free_handler range_free_handler, int direction) - 1.4.21 - - - 2.0.0 raptor_sequence* raptor_new_sequence_with_context (raptor_data_context_free_handler* free_handler, raptor_data_context_print_handler* print_handler, void* handler_context) - 1.4.21 - - - 2.0.0 raptor_term* raptor_new_term_from_blank (raptor_world* world, const unsigned char* blank) - 1.4.21 - - - 2.0.0 raptor_term* raptor_new_term_from_counted_blank (raptor_world* world, const unsigned char* blank, size_t length) - 1.4.21 - - - 2.0.0 raptor_term* raptor_new_term_from_literal (raptor_world* world, const unsigned char* literal, raptor_uri* datatype, const unsigned char* language) - 1.4.21 - - - 2.0.0 raptor_term* raptor_new_term_from_counted_literal (raptor_world* world, const unsigned char* literal, size_t literal_len, raptor_uri* datatype, const unsigned char* language, unsigned char language_len) - 1.4.21 - - - 2.0.0 raptor_term* raptor_new_term_from_uri (raptor_world* world, raptor_uri* uri) - 1.4.21 - - - 2.0.0 raptor_uri* raptor_new_uri_from_counted_string (raptor_world* world, const unsigned char* uri_string, size_t length) - 1.4.21 - - - 2.0.0 const char* raptor_option_get_value_type_label (const raptor_option_value_type type) - 1.4.21 - - - 2.0.0 raptor_uri* raptor_parser_get_graph (raptor_parser* rdf_parser) - 1.4.21 - - - 2.0.0 int raptor_parser_parse_iostream (raptor_parser* rdf_parser, raptor_iostream *iostr, raptor_uri *base_uri) - 1.4.21 - - - 2.0.0 unsigned char* raptor_world_generate_bnodeid (raptor_world *world) - 1.4.21 - - - 2.0.0 int raptor_serializer_flush (raptor_serializer *rdf_serializer) - 1.4.21 - - - 2.0.0 raptor_syntax_description* raptor_serializer_get_description (raptor_serializer* rdf_serializer) - 1.4.21 - - - 2.0.0 raptor_statement* raptor_new_statement (raptor_world *world) - 1.4.21 - - - 2.0.0 raptor_statement* raptor_new_statement_from_nodes (raptor_world* world, raptor_term *subject, raptor_term *predicate, raptor_term *object, raptor_term *graph) - 1.4.21 - - - 2.0.0 void raptor_statement_init (raptor_statement *statement, raptor_world *world) - 1.4.21 - - - 2.0.0 void raptor_statement_clear (raptor_statement *statement) - 1.4.21 - - - 2.0.0 raptor_statement* raptor_statement_copy (raptor_statement *statement) - 1.4.21 - - - 2.0.0 int raptor_statement_equals (const raptor_statement* s1, const raptor_statement* s2) - 1.4.21 - - - 2.0.0 unsigned char* raptor_term_to_counted_string (raptor_term *term, size_t* len_p) - 1.4.21 - - - 2.0.0 unsigned char* raptor_term_to_string (raptor_term *term) - 1.4.21 - - - 2.0.0 int raptor_term_compare (const raptor_term *t1, const raptor_term *t2) - 1.4.21 - - - 2.0.0 raptor_term* raptor_term_copy (raptor_term* term) - 1.4.21 - - - 2.0.0 int raptor_term_equals (raptor_term* term1, raptor_term* term2) - 1.4.21 - - - 2.0.0 int raptor_term_ntriples_write (const raptor_term *term, raptor_iostream* iostr) - 1.4.21 - - - 2.0.0 raptor_world* raptor_uri_get_world (raptor_uri *uri) - 1.4.21 - - - 2.0.0 raptor_option_description* raptor_world_get_option_description (raptor_world* world, const raptor_domain domain, const raptor_option option) - 1.4.21 - - - 2.0.0 int raptor_world_is_parser_name (raptor_world* world, const char* name) - 1.4.21 - - - 2.0.0 int raptor_world_set_log_handler (raptor_world *world, void *user_data, raptor_log_handler handler) - 1.4.21 - - - 2.0.0 int raptor_syntax_description_validate (raptor_syntax_description* desc) - 2.0.3 - - - 2.0.4 int raptor_bnodeid_ntriples_write (const unsigned char *bnodeid, size_t len, raptor_iostream *iostr) - 2.0.3 - - - 2.0.4 int raptor_www_set_ssl_cert_options (raptor_www* www, const char* cert_filename, const char* cert_type, const char* cert_passphrase) - 2.0.4 - - - 2.0.5 int raptor_unicode_utf8_strlen (const unsigned char *string, size_t length) - 2.0.4 - - - 2.0.5 size_t raptor_unicode_utf8_substr (unsigned char* dest, size_t* dest_length_p, const unsigned char* src, size_t src_length, int startingLoc, int length) - 2.0.4 - - - 2.0.5 int raptor_vsnprintf2 (char *buffer, size_t size, const char *format, va_list arguments) Deprecates raptor_vsnprintf() 2.0.4 - - - 2.0.5 int raptor_snprintf (char *buffer, size_t size, const char *format, ...) - 2.0.4 - - - 2.0.5 int raptor_vasprintf (char **ret, const char *format, va_list arguments) - 2.0.5 - - - 2.0.6 int raptor_sequence_swap (raptor_sequence* seq, int i, int j) - 2.0.5 - - - 2.0.6 int raptor_sequence_reverse (raptor_sequence* seq, int start_index, int length) - 2.0.5 - - - 2.0.6 int raptor_sequence_next_permutation (raptor_sequence *seq, raptor_data_compare_handler compare) - 2.0.6 - - - 2.0.7 char* raptor_uri_uri_string_to_counted_filename_fragment (const unsigned char *uri_string, size_t* len_p, unsigned char **fragment_p, size_t* fragment_len_p) - 2.0.6 - - - 2.0.7 int raptor_uri_file_exists (raptor_uri* uri) - 2.0.6 - - - 2.0.7 int raptor_uri_filename_exists (const unsigned char* path) - 2.0.6 - - - 2.0.7 raptor_uri* raptor_new_uri_from_uri_or_file_string (raptor_world* world, raptor_uri* base_uri, const unsigned char* uri_or_file_string) - 2.0.6 - - - 2.0.7 void raptor_sax2_set_uri_filter (raptor_sax2* sax2, raptor_uri_filter_func filter, void *user_data) - 2.0.6 - - - 2.0.7 int raptor_www_set_ssl_verify_options (raptor_www* www, int verify_peer, int verify_host) - 2.0.7 - - - 2.0.8 int raptor_uri_turtle_write (raptor_world *world, raptor_iostream* iostr, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri) - 2.0.7 - - - 2.0.8 int raptor_term_turtle_write (raptor_iostream* iostr, raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri) - 2.0.7 - - - 2.0.8 unsigned char* raptor_uri_to_turtle_counted_string (raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p) - 2.0.7 - - - 2.0.8 unsigned char* raptor_uri_to_turtle_string (raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri) - 2.0.7 - - - 2.0.8 unsigned char* raptor_term_to_turtle_counted_string (raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p) - 2.0.7 - - - 2.0.8 unsigned char* raptor_term_to_turtle_string (raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri) - 2.0.7 - - - 2.0.8 raptor_uri* raptor_new_uri_relative_to_base_counted (raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string, size_t uri_len) - 2.0.9 - - - 2.0.10 int raptor_string_escaped_write (const unsigned char *string, size_t len, const char delim, unsigned int flags, raptor_iostream *iostr) - 2.0.9 - - - 2.0.10 int raptor_term_escaped_write (const raptor_term *term, unsigned int flags, raptor_iostream* iostr) - 2.0.9 - - - 2.0.10 int raptor_uri_escaped_write (raptor_uri* uri, raptor_uri* base_uri, unsigned int flags, raptor_iostream *iostr) - 2.0.10 - - - 2.0.11 int raptor_uri_uri_string_is_absolute (const unsigned char* uri_string) - 2.0.10 - - - 2.0.11 unsigned char* raptor_qname_format_as_xml (const raptor_qname *qname, size_t *length_p) - 2.0.11 - - - 2.0.12 raptor_term* raptor_new_term_from_counted_string (raptor_world* world, unsigned char* string, size_t length) - 2.0.13 - - - 2.0.14 unsigned char* raptor_uri_counted_filename_to_uri_string (const char *filename, size_t filename_len) - 2.0.14 - - - 2.0.15 void raptor_sort_r (void *base, size_t nel, size_t width, raptor_data_compare_arg_handler compar, void *user_data) - 2.0.14 - - - 2.0.15 void raptor_sequence_sort_r (raptor_sequence* seq, raptor_data_compare_arg_handler compare, void* user_data) Uses raptor_sort_r() internally. 2.0.14 - - - 2.0.15 int raptor_world_get_parsers_count (raptor_world* world) - 2.0.14 - - - 2.0.15 int raptor_world_get_serializers_count (raptor_world* world) - # # Types # 1.4.21 type raptor_error_handlers - 2.0.0 type - - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() 1.4.21 type raptor_feature - 2.0.0 type raptor_option - And new option RAPTOR_OPTION_STRICT added. 1.4.21 type raptor_free_uri_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_graph_handler - 2.0.0 type raptor_graph_mark_handler - - 1.4.21 type raptor_identifier - 2.0.0 type raptor_term - Fields changed to be simpler #raptor_term_type and #raptor_term_value 1.4.21 type raptor_identifier_type - 2.0.0 type raptor_term_type - Removed several enum values to leave just URI, blank and literal types. 1.4.21 type raptor_iostream_handler2 - 2.0.0 type raptor_iostream_handler - - 1.4.21 type raptor_iostream_write_end_func - 2.0.0 type raptor_iostream_write_end_func - handler returns an int 1.4.21 type raptor_libxml_flags - 2.0.0 type - - replaced by raptor_world_set_flags() with #raptor_world_flag 1.4.21 type raptor_log_level - 2.0.0 type raptor_log_level - Added RAPTOR_LOG_LEVEL_TRACE, RAPTOR_LOG_LEVEL_DEBUG, RAPTOR_LOG_LEVEL_INFO. RAPTOR_LOG_LEVEL_WARNING renamed RAPTOR_LOG_LEVEL_WARN 1.4.21 type raptor_message_handler - 2.0.0 type - - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() 1.4.21 type raptor_message_handler_closure - 2.0.0 type - - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() 1.4.21 type raptor_new_uri_for_rdf_concept_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_new_uri_from_uri_local_name_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_new_uri_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_new_uri_relative_to_base_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_ntriples_parser - 2.0.0 type - - replaced by #raptor_parser 1.4.21 type raptor_ntriples_term_type - 2.0.0 type - - replaced by #raptor_term_type 1.4.21 type raptor_sequence_free_function - 2.0.0 type raptor_data_free_handler - - 1.4.21 type raptor_sequence_free_handler_v2 - 2.0.0 type raptor_data_context_free_handler - - 1.4.21 type raptor_sequence_print_handler - 2.0.0 type raptor_data_print_handler - - 1.4.21 type raptor_sequence_print_handler_v2 - 2.0.0 type raptor_data_context_print_handler - - 1.4.21 type raptor_simple_message_handler - 2.0.0 type raptor_log_handler - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() 1.4.21 type raptor_statement - 2.0.0 type raptor_statement - fields changed to use #raptor_term 1.4.21 type raptor_statement_handler - 2.0.0 type raptor_statement_handler - added const 1.4.21 type raptor_statement_v2 - 2.0.0 type raptor_statement - Fields changed to be a 3 or 4 tuple of #raptor_term 1.4.21 type raptor_uri_as_counted_string_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_uri_as_string_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_uri_compare_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_uri_copy_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_uri_equals_func - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_uri_handler - 2.0.0 type - - Entire URI implementation is internal and not replaceable. 1.4.21 type raptor_uri_source - 2.0.0 type - - URI source was useless. 1.4.21 type - - 2.0.0 type raptor_avltree - - 1.4.21 type - - 2.0.0 type raptor_avltree_bitflags - - 1.4.21 type - - 2.0.0 type raptor_avltree_iterator - - 1.4.21 type - - 2.0.0 type raptor_avltree_visit_handler - - 1.4.21 type - - 2.0.0 type raptor_data_compare_handler - - 1.4.21 type - - 2.0.0 type raptor_data_context_free_handler - - 1.4.21 type - - 2.0.0 type raptor_data_malloc_handler - - 1.4.21 type - - 2.0.0 type raptor_domain - - 1.4.21 type - - 2.0.0 type raptor_graph_mark_flags - - 1.4.21 type - - 2.0.0 type raptor_log_message - - 1.4.21 type - - 2.0.0 type raptor_option_description - - 1.4.21 type - - 2.0.0 type raptor_option_value_type - - 1.4.21 type - - 2.0.0 type raptor_syntax_bitflags - - 1.4.21 type - - 2.0.0 type raptor_syntax_description - - 1.4.21 type - - 2.0.0 type raptor_term_blank_value - - 1.4.21 type - - 2.0.0 type raptor_term_literal_value - - 1.4.21 type - - 2.0.0 type raptor_term_value - - 1.4.21 type - - 2.0.0 type raptor_type_q - - 2.0.9 type - - 2.0.10 type raptor_escaped_write_bitflags - - 2.0.14 type - - 2.0.15 type raptor_data_compare_arg_handler - Used by raptor_sort_r() # # Enums # 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_UNKNOWN - 2.0.0 enum RAPTOR_TERM_TYPE_UNKNOWN - - 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_RESOURCE - 2.0.0 enum RAPTOR_TERM_TYPE_URI - - 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_ANONYMOUS - 2.0.0 enum RAPTOR_TERM_TYPE_BLANK - - 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_PREDICATE - 2.0.0 enum RAPTOR_TERM_TYPE_URI - - 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_ORDINAL - 2.0.0 enum - - Deprecated value deleted. 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_LITERAL - 2.0.0 enum RAPTOR_TERM_TYPE_LITERAL - - 1.4.21 enum RAPTOR_IDENTIFIER_TYPE_XML_LITERAL - 2.0.0 enum RAPTOR_TERM_TYPE_LITERAL - - 1.4.21 enum RAPTOR_URI_SOURCE_UNKNOWN - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_NOT_URI - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_ELEMENT - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_ATTRIBUTE - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_ID - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_URI - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_GENERATED - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_URI_SOURCE_BLANK_ID - 2.0.0 enum - - URI source concept removed. 1.4.21 enum RAPTOR_NTRIPLES_TERM_TYPE_URI_REF - 2.0.0 enum RAPTOR_TERM_TYPE_URI - - 1.4.21 enum RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE - 2.0.0 enum RAPTOR_TERM_TYPE_BLANK - - 1.4.21 enum RAPTOR_NTRIPLES_TERM_TYPE_LITERAL - 2.0.0 enum RAPTOR_TERM_TYPE_LITERAL - - 1.4.21 enum RAPTOR_FEATURE_SCANNING - 2.0.0 enum RAPTOR_OPTION_SCANNING - - 1.4.21 enum RAPTOR_FEATURE_ASSUME_IS_RDF - 2.0.0 enum - - Never used. 1.4.21 enum RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES - 2.0.0 enum RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES - - 1.4.21 enum RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES - 2.0.0 enum RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES - - 1.4.21 enum RAPTOR_FEATURE_ALLOW_BAGID - 2.0.0 enum RAPTOR_OPTION_ALLOW_BAGID - - 1.4.21 enum RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST - 2.0.0 enum RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST - - 1.4.21 enum RAPTOR_FEATURE_NORMALIZE_LANGUAGE - 2.0.0 enum RAPTOR_OPTION_NORMALIZE_LANGUAGE - - 1.4.21 enum RAPTOR_FEATURE_NON_NFC_FATAL - 2.0.0 enum RAPTOR_OPTION_NON_NFC_FATAL - - 1.4.21 enum RAPTOR_FEATURE_WARN_OTHER_PARSETYPES - 2.0.0 enum RAPTOR_OPTION_WARN_OTHER_PARSETYPES - - 1.4.21 enum RAPTOR_FEATURE_CHECK_RDF_ID - 2.0.0 enum RAPTOR_OPTION_CHECK_RDF_ID - - 1.4.21 enum RAPTOR_FEATURE_RELATIVE_URIS - 2.0.0 enum RAPTOR_OPTION_RELATIVE_URIS - - 1.4.21 enum RAPTOR_FEATURE_START_URI - 2.0.0 enum - - Never used. 1.4.21 enum RAPTOR_FEATURE_WRITER_AUTO_INDENT - 2.0.0 enum RAPTOR_OPTION_WRITER_AUTO_INDENT - - 1.4.21 enum RAPTOR_FEATURE_WRITER_AUTO_EMPTY - 2.0.0 enum RAPTOR_OPTION_WRITER_AUTO_EMPTY - - 1.4.21 enum RAPTOR_FEATURE_WRITER_INDENT_WIDTH - 2.0.0 enum RAPTOR_OPTION_WRITER_INDENT_WIDTH - - 1.4.21 enum RAPTOR_FEATURE_WRITER_XML_VERSION - 2.0.0 enum RAPTOR_OPTION_WRITER_XML_VERSION - - 1.4.21 enum RAPTOR_FEATURE_WRITER_XML_DECLARATION - 2.0.0 enum RAPTOR_OPTION_WRITER_XML_DECLARATION - - 1.4.21 enum RAPTOR_FEATURE_NO_NET - 2.0.0 enum RAPTOR_OPTION_NO_NET - - 1.4.21 enum RAPTOR_FEATURE_RESOURCE_BORDER - 2.0.0 enum RAPTOR_OPTION_RESOURCE_BORDER - - 1.4.21 enum RAPTOR_FEATURE_LITERAL_BORDER - 2.0.0 enum RAPTOR_OPTION_LITERAL_BORDER - - 1.4.21 enum RAPTOR_FEATURE_BNODE_BORDER - 2.0.0 enum RAPTOR_OPTION_BNODE_BORDER - - 1.4.21 enum RAPTOR_FEATURE_RESOURCE_FILL - 2.0.0 enum RAPTOR_OPTION_RESOURCE_FILL - - 1.4.21 enum RAPTOR_FEATURE_LITERAL_FILL - 2.0.0 enum RAPTOR_OPTION_LITERAL_FILL - - 1.4.21 enum RAPTOR_FEATURE_BNODE_FILL - 2.0.0 enum RAPTOR_OPTION_BNODE_FILL - - 1.4.21 enum RAPTOR_FEATURE_HTML_TAG_SOUP - 2.0.0 enum RAPTOR_OPTION_HTML_TAG_SOUP - - 1.4.21 enum RAPTOR_FEATURE_MICROFORMATS - 2.0.0 enum RAPTOR_OPTION_MICROFORMATS - - 1.4.21 enum RAPTOR_FEATURE_HTML_LINK - 2.0.0 enum RAPTOR_OPTION_HTML_LINK - - 1.4.21 enum RAPTOR_FEATURE_WWW_TIMEOUT - 2.0.0 enum RAPTOR_OPTION_WWW_TIMEOUT - - 1.4.21 enum RAPTOR_FEATURE_WRITE_BASE_URI - 2.0.0 enum RAPTOR_OPTION_WRITE_BASE_URI - - 1.4.21 enum RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL - 2.0.0 enum RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL - - 1.4.21 enum RAPTOR_FEATURE_WWW_HTTP_USER_AGENT - 2.0.0 enum RAPTOR_OPTION_WWW_HTTP_USER_AGENT - - 1.4.21 enum RAPTOR_FEATURE_JSON_CALLBACK - 2.0.0 enum RAPTOR_OPTION_JSON_CALLBACK - - 1.4.21 enum RAPTOR_FEATURE_JSON_EXTRA_DATA - 2.0.0 enum RAPTOR_OPTION_JSON_EXTRA_DATA - - 1.4.21 enum RAPTOR_FEATURE_RSS_TRIPLES - 2.0.0 enum RAPTOR_OPTION_RSS_TRIPLES - - 1.4.21 enum RAPTOR_FEATURE_ATOM_ENTRY_URI - 2.0.0 enum RAPTOR_OPTION_ATOM_ENTRY_URI - - 1.4.21 enum RAPTOR_FEATURE_PREFIX_ELEMENTS - 2.0.0 enum RAPTOR_OPTION_PREFIX_ELEMENTS - - 1.4.21 enum RAPTOR_FEATURE_LAST - 2.0.0 enum RAPTOR_OPTION_LAST - - 1.4.21 enum RAPTOR_GENID_TYPE_BNODEID - 2.0.0 enum - - There is just one type of generated ID now. 1.4.21 enum RAPTOR_GENID_TYPE_BAGID - 2.0.0 enum - - There is just one type of generated ID now. 1.4.21 enum RAPTOR_LOG_LEVEL_NONE - 2.0.0 enum RAPTOR_LOG_LEVEL_NONE - - 1.4.21 enum - - 2.0.0 enum RAPTOR_LOG_LEVEL_TRACE - - 1.4.21 enum - - 2.0.0 enum RAPTOR_LOG_LEVEL_DEBUG - - 1.4.21 enum - - 2.0.0 enum RAPTOR_LOG_LEVEL_INFO - - 1.4.21 enum RAPTOR_LOG_LEVEL_WARNING - 2.0.0 enum RAPTOR_LOG_LEVEL_WARN - - 1.4.21 enum RAPTOR_LOG_LEVEL_ERROR - 2.0.0 enum RAPTOR_LOG_LEVEL_ERROR - - 1.4.21 enum RAPTOR_LOG_LEVEL_FATAL - 2.0.0 enum RAPTOR_LOG_LEVEL_FATAL - - 1.4.21 enum RAPTOR_LOG_LEVEL_LAST - 2.0.0 enum RAPTOR_LOG_LEVEL_LAST - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_NONE - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_IOSTREAM - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_NAMESPACE - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_PARSER - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_QNAME - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_SAX2 - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_SERIALIZER - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_TERM - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_TURTLE_WRITER - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_URI - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_WORLD - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_WWW - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_XML_WRITER - - 1.4.21 enum - - 2.0.0 enum RAPTOR_DOMAIN_LAST - - 1.4.21 enum - - 2.0.0 enum RAPTOR_GRAPH_MARK_START - - 1.4.21 enum - - 2.0.0 enum RAPTOR_GRAPH_MARK_DECLARED - - 1.4.21 enum RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE - 2.0.0 enum RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE - Flag setting is done by raptor_world_set_flags() 1.4.21 enum RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE - 2.0.0 enum RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE - Flag setting is done by raptor_world_set_flags() 1.4.21 enum - - 2.0.0 enum RAPTOR_WORLD_FLAG_URI_INTERNING - - 1.4.21 enum - - 2.0.0 enum RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH - - 1.4.21 enum - - 2.0.0 enum RAPTOR_OPTION_VALUE_TYPE_BOOL - - 1.4.21 enum - - 2.0.0 enum RAPTOR_OPTION_VALUE_TYPE_INT - - 1.4.21 enum - - 2.0.0 enum RAPTOR_OPTION_VALUE_TYPE_STRING - - 1.4.21 enum - - 2.0.0 enum RAPTOR_OPTION_VALUE_TYPE_URI - - 1.4.21 enum - - 2.0.0 enum RAPTOR_OPTION_VALUE_TYPE_LAST - - 2.0.6 enum - - 2.0.7 enum RAPTOR_OPTION_NO_FILE - - 2.0.6 enum - - 2.0.7 enum RAPTOR_OPTION_WWW_SSL_VERIFY_PEER - - 2.0.6 enum - - 2.0.7 enum RAPTOR_OPTION_WWW_SSL_VERIFY_HOST - - 2.0.6 enum - - 2.0.7 enum RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES - - raptor2-2.0.15/docs/rdfserialize.c0000644000175000017500000000304011556054034013670 00000000000000#include #include #include /* rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev */ int main(int argc, char *argv[]) { raptor_world *world = NULL; raptor_serializer* rdf_serializer = NULL; unsigned char *uri_string; raptor_uri *base_uri; raptor_statement* triple; world = raptor_new_world(); uri_string = raptor_uri_filename_to_uri_string(argv[1]); base_uri = raptor_new_uri(world, uri_string); rdf_serializer = raptor_new_serializer(world, "rdfxml-abbrev"); raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout); /* Make a triple with URI subject, URI predicate, literal object */ triple = raptor_new_statement(world); triple->subject = raptor_new_term_from_uri_string(world, (const unsigned char*)"http://example.org/subject"); triple->predicate = raptor_new_term_from_uri_string(world, (const unsigned char*)"http://example.org/predicate"); triple->object = raptor_new_term_from_literal(world, (const unsigned char*)"An example literal", NULL, (const unsigned char*)"en"); /* Write the triple */ raptor_serializer_serialize_statement(rdf_serializer, triple); /* Delete the triple */ raptor_free_statement(triple); raptor_serializer_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_uri(base_uri); raptor_free_memory(uri_string); raptor_free_world(world); return 0; } raptor2-2.0.15/docs/rdfcat.c0000644000175000017500000000272211556054034012456 00000000000000#include #include /* rdfcat.c: parse any RDF syntax and serialize to RDF/XML-Abbrev */ static raptor_serializer* rdf_serializer; static void serialize_triple(void* user_data, raptor_statement* triple) { raptor_serializer_serialize_statement(rdf_serializer, triple); } static void declare_namespace(void* user_data, raptor_namespace *nspace) { raptor_serializer_set_namespace_from_namespace(rdf_serializer, nspace); } int main(int argc, char *argv[]) { raptor_world *world = NULL; raptor_parser* rdf_parser = NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; world = raptor_new_world(); uri_string = raptor_uri_filename_to_uri_string(argv[1]); uri = raptor_new_uri(world, uri_string); base_uri = raptor_uri_copy(uri); /* Ask raptor to work out which parser to use */ rdf_parser = raptor_new_parser(world, "guess"); raptor_parser_set_statement_handler(rdf_parser, NULL, serialize_triple); raptor_parser_set_namespace_handler(rdf_parser, NULL, declare_namespace); rdf_serializer = raptor_new_serializer(world, "rdfxml-abbrev"); raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout); raptor_parser_parse_file(rdf_parser, uri, base_uri); raptor_serializer_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_free_world(world); return 0; } raptor2-2.0.15/docs/raptor-formats.xml0000644000175000017500000004511112425347056014555 00000000000000 Syntax Formats supported in Raptor This chapter describes the syntax formats supported by parsers and serializers in Raptor.
Introduction The parsers and serializers in raptor can handle different MIME Types with different levels of quality (Q). A Q of 1.0 indicates that the parser or serializer will be able to read or write the full format with high quality, and it should be the prefered parser or serializer for that mime type. Lower Q values indicate either additional mime type support (for parsing) or less-preferred mime types (for serializing). A serializer typically has just 1 mime type of Q 1.0; the preferred type.
MIME Types by Parser Gleaning Resource Descriptions from Dialects of Languages (grddl) text/html with q 0.2 application/xhtml+xml with q 0.4 N-Quads (nquads) text/x-nquads with q 1.0 N-Triples (ntriples) application/n-triples with q 1.0 text/plain with q 0.1 RDF/A via librdfa (rdfa) text/html with q 0.6 application/xhtml+xml with q 0.8 RDF/JSON (either Triples or Resource-Centric) (json) application/json with q 0.1 text/json with q 0.1 RDF/XML (rdfxml) application/rdf+xml with q 1.0 text/rdf with q 0.6 RSS Tag Soup (rss-tag-soup) application/rss with q 0.8 application/rss+xml with q 0.8 text/rss with q 0.8 application/xml with q 0.3 text/xml with q 0.3 application/atom+xml with q 0.3 TriG - Turtle with Named Graphs (trig) application/x-trig with q 1.0 Turtle Terse RDF Triple Language (turtle) text/turtle with q 1.0 application/x-turtle with q 1.0 application/turtle with q 1.0 text/n3 with q 0.3 text/rdf+n3 with q 0.3 application/rdf+n3 with q 0.3
MIME Types by Serializer Atom 1.0 (atom) application/atom+xml with q 1.0 GraphViz DOT format (dot) text/x-graphviz with q 0.5 HTML Table (html) application/xhtml+xml with q 1.0 text/html with q 1.0 N-Quads (nquads) text/x-nquads with q 1.0 N-Triples (ntriples) application/n-triples with q 1.0 text/plain with q 0.1 RDF/JSON Resource-Centric (json) application/json with q 1.0 text/json with q 0.1 RDF/JSON Triples (json-triples) application/json with q 0.0 text/json with q 0.1 RDF/XML (rdfxml) application/rdf+xml with q 1.0 text/rdf with q 0.6 RDF/XML (Abbreviated) (rdfxml-abbrev) application/rdf+xml with q 0.0 RDF/XML (XMP Profile) (rdfxml-xmp) application/rdf+xml with q 0.0 RSS 1.0 (rss-1.0) application/rss+xml with q 1.0 application/rss with q 0.3 text/rss with q 0.3 application/xml with q 0.3 text/xml with q 0.3 Turtle Terse RDF Triple Language (turtle) text/turtle with q 1.0 application/turtle with q 1.0 application/x-turtle with q 0.8 text/n3 with q 0.3 text/rdf+n3 with q 0.3 application/rdf+n3 with q 0.3
MIME Types Index application/atom+xml Atom 1.0 Serializer (atom) with q 1.0 RSS Tag Soup Parser (rss-tag-soup) with q 0.3 application/json RDF/JSON Resource-Centric Serializer (json) with q 1.0 RDF/JSON (either Triples or Resource-Centric) Parser (json) with q 0.1 RDF/JSON Triples Serializer (json-triples) with q 0.0 application/n-triples N-Triples Parser (ntriples) with q 1.0 N-Triples Serializer (ntriples) with q 1.0 application/rdf+n3 Turtle Terse RDF Triple Language Parser (turtle) with q 0.3 Turtle Terse RDF Triple Language Serializer (turtle) with q 0.3 application/rdf+xml RDF/XML Parser (rdfxml) with q 1.0 RDF/XML Serializer (rdfxml) with q 1.0 RDF/XML (XMP Profile) Serializer (rdfxml-xmp) with q 0.0 RDF/XML (Abbreviated) Serializer (rdfxml-abbrev) with q 0.0 application/rss RSS Tag Soup Parser (rss-tag-soup) with q 0.8 RSS 1.0 Serializer (rss-1.0) with q 0.3 application/rss+xml RSS 1.0 Serializer (rss-1.0) with q 1.0 RSS Tag Soup Parser (rss-tag-soup) with q 0.8 application/turtle Turtle Terse RDF Triple Language Parser (turtle) with q 1.0 Turtle Terse RDF Triple Language Serializer (turtle) with q 1.0 application/x-trig TriG - Turtle with Named Graphs Parser (trig) with q 1.0 No serializer. application/x-turtle Turtle Terse RDF Triple Language Parser (turtle) with q 1.0 Turtle Terse RDF Triple Language Serializer (turtle) with q 0.8 application/xhtml+xml HTML Table Serializer (html) with q 1.0 RDF/A via librdfa Parser (rdfa) with q 0.8 Gleaning Resource Descriptions from Dialects of Languages Parser (grddl) with q 0.4 application/xml RSS Tag Soup Parser (rss-tag-soup) with q 0.3 RSS 1.0 Serializer (rss-1.0) with q 0.3 text/html HTML Table Serializer (html) with q 1.0 RDF/A via librdfa Parser (rdfa) with q 0.6 Gleaning Resource Descriptions from Dialects of Languages Parser (grddl) with q 0.2 text/json RDF/JSON (either Triples or Resource-Centric) Parser (json) with q 0.1 RDF/JSON Triples Serializer (json-triples) with q 0.1 RDF/JSON Resource-Centric Serializer (json) with q 0.1 text/n3 Turtle Terse RDF Triple Language Parser (turtle) with q 0.3 Turtle Terse RDF Triple Language Serializer (turtle) with q 0.3 text/plain N-Triples Parser (ntriples) with q 0.1 N-Triples Serializer (ntriples) with q 0.1 text/rdf RDF/XML Parser (rdfxml) with q 0.6 RDF/XML Serializer (rdfxml) with q 0.6 text/rdf+n3 Turtle Terse RDF Triple Language Parser (turtle) with q 0.3 Turtle Terse RDF Triple Language Serializer (turtle) with q 0.3 text/rss RSS Tag Soup Parser (rss-tag-soup) with q 0.8 RSS 1.0 Serializer (rss-1.0) with q 0.3 text/turtle Turtle Terse RDF Triple Language Parser (turtle) with q 1.0 Turtle Terse RDF Triple Language Serializer (turtle) with q 1.0 text/x-graphviz GraphViz DOT format Serializer (dot) with q 0.5 No parser. text/x-nquads N-Quads Parser (nquads) with q 1.0 N-Quads Serializer (nquads) with q 1.0 text/xml RSS Tag Soup Parser (rss-tag-soup) with q 0.3 RSS 1.0 Serializer (rss-1.0) with q 0.3
raptor2-2.0.15/docs/raptor-tutorial-parsing.xml0000644000175000017500000005445611660060067016414 00000000000000 Parsing syntaxes to RDF Triples
Introduction The typical sequence of operations to parse is to create a parser object, set various handlers and options, start the parsing, send some syntax content to the parser object, finish the parsing and destroy the parser object. Several parts of this process are optional, including actually using the triple results, which is useful as a syntax checking process.
Create the Parser object The parser can be created directly from a known name such as rdfxml for the W3C Recommendation RDF/XML syntax: raptor_parser* rdf_parser; rdf_parser = raptor_new_parser(world, "rdfxml"); or the name can be discovered from an description as discussed in Querying Functionality The parser can also be created by identifying the syntax by a URI, specifying the syntax by a MIME Type, providng an identifier for the content such as filename or URI string or giving some initial content bytes that can be used to guess. Using the raptor_new_parser_for_content() function, all of these can be given as optional parameters, using NULL or 0 for undefined parameters. The constructor will then use as much of this information as possible. raptor_parser* rdf_parser; Create a parser that reads the MIME Type for RDF/XML application/rdf+xml rdf_parser = raptor_new_parser_for_content(world, NULL, "application/rdf+xml", NULL, 0, NULL); Create a parser that can read a syntax identified by the URI for Turtle http://www.dajobe.org/2004/01/turtle/, which has no registered MIME Type at this date: syntax_uri = raptor_new_uri(world, "http://www.dajobe.org/2004/01/turtle/"); rdf_parser = raptor_new_parser_for_content(world, syntax_uri, NULL, NULL, 0, NULL); Create a parser that recognises the identifier foo.rss: rdf_parser = raptor_new_parser_for_content(world, NULL, NULL, NULL, 0, "foo.rss"); Create a parser that recognises the content in buffer: rdf_parser = raptor_new_parser_for_content(world, NULL, NULL, buffer, len, NULL); Any of the constructor calls can return NULL if no matching parser could be found, or the construction failed in another way.
Parser options There are several options that can be set on parsers. The exact list of options can be found at run time via the Querying Functionality or in the API reference for raptor_option. Options are integer enumerations of the raptor_option enum and have typed values that are either booleans, integers or strings. The function that sets options for parsers is raptor_parser_set_option() used as follows: /* Set a boolean or integer valued option to value 1 */ raptor_parser_set_option(rdf_parser, option, NULL, 1); /* Set a string valued option to value "abc" */ raptor_parser_set_option(rdf_parser, option, "abc", -1); There is a corresponding function for reading the values of parser option raptor_parser_get_option() which takes the option enumeration parameter and returns the boolean / integer or string value correspondingly into the appropriate pointer argument. /* Get a boolean or integer option value */ int int_var; raptor_parser_get_option(rdf_parser, option, NULL, &int_var); /* Get a string option value */ char* string_var; raptor_parser_get_option(rdf_parser, option, &string_var, NULL);
Set RDF statement callback handler The main reason to parse a syntax is to get RDF triples returned and these are return by a user-defined handler function which is called with parameters of a user data pointer and a raptor statement, which includes the triple terms plus the optional named graph term. The handler is set with raptor_parser_set_statement_handler() as follows: void statement_handler(void* user_data, const raptor_statement* statement) { /* do something with the statement */ } raptor_parser_set_statement_handler(rdf_parser, user_data, statements_handler); Setting a stateemnt handler function is optional since parsing without returning statements is a valid use, such as when parsing in order to validate a syntax.
Set parsing log message handlers Any time before parsing is called, a log handler can be set on the world object via the raptor_world_set_log_handler() method to report errors and warnings from parsing. The method takes a user data argument plus a handler callback of type raptor_log_handler with a signature that looks like this: void message_handler(void *user_data, raptor_log_message* message) { /* do something with the message */ } The handler gets the user data pointer as well as a raptor_log_handler pointer that includes associated location information, such as the log level, raptor_locator, and the log message itself. The locator structure contains full information on the details of where in the file or URI the message occurred.
Set the identifier creator handler Identifiers are created in some parsers by generating them automatically or via hints given a syntax. Raptor can customise this process using a user-supplied identifier handler function. For example, in RDF/XML generated blank node identifiers and those those specified rdf:nodeID are passed through this process. Setting a handler allows the identifier generation mechanism to be fully replaced. A lighter alternative is to use raptor_world_set_generate_bnodeid_parameters() to adjust the default algorithm for generated identifiers. It is used as follows raptor_generate_bnodeid_handler bnodeid_handler; raptor_world_set_generate_bnodeid_handler(rdf_parser, user_data, bnodeid_handler); The bnodeid_handler takes the following signature: unsigned char* generate_id_handler(void* user_data, unsigned char* user_id) { /* return a new generated ID based on user_id (optional) */ } where user_id an optional user-supplied identifier, such as the value of a rdf:nodeID in RDF/XML.
Set namespace declared handler Raptor can report when namespace prefix/URIs are declared in during parsing a syntax such as those in XML, RDF/XML or Turtle. A handler function can be set to receive these declarations using the namespace handler method. raptor_namespace_handler namespaces_handler; raptor_parser_set_namespace_handler(rdf_parser, user_data, namespaces_handler); The namespaces_handler takes the following signature: void namespaces_handler(void* user_data, raptor_namespace *nspace) { /* */ } This may be called multiple times with the same namespace, if the namespace is declared inside different XML sub-trees.
Set the parsing strictness raptor_parser_set_option() with option RAPTOR_OPTION_STRICT allows setting of the parser strictness flag. The default is lax parsing, accepting older or deprecated syntax forms but may generate a warning. Setting to non-0 (true) will cause parser errors to be generated in these cases.
Provide syntax content to parse The operation of turning syntax into RDF triples has several alternatives from functions that do most of the work starting from a URI to functions that allow passing in data buffers. Parsing and MIME Types The mime type of the retrieved content is not used to choose a parser unless the parser is of type guess. The guess parser will send an Accept: header for all known parser syntax mime types (if a URI request is made) and based on the response, including the identifiers used, pick the appropriate parser to execute. See raptor_world_guess_parser_name() for a full discussion of the inputs to the guessing.
Parse the content from a URI (<link linkend="raptor-parser-parse-uri"><function>raptor_parser_parse_uri()</function></link>) The URI is resolved and the content read from it and passed to the parser: raptor_parser_parse_uri(rdf_parser, uri, base_uri); The base_uri is optional (can be NULL) and will default to the uri.
Parse the content of a URI using an existing WWW connection (<link linkend="raptor-parser-parse-uri-with-connection"><function>raptor_parser_parse_uri_with_connection()</function></link>) The URI is resolved using an existing WWW connection (for example a libcurl CURL handle) to allow for any existing WWW configuration to be reused. See raptor_new_www_with_connection for full details of how this works. The content is then read from the result of resolving the URI: raptor_parser_parse_uri_with_connection(rdf_parser, uri, base_uri, connection); The base_uri is optional (can be NULL) and will default to the uri.
Parse the content of a C <literal>FILE*</literal> (<link linkend="raptor-parser-parse-file-stream"><function>raptor_parser_parse_file_stream()</function></link>) Parsing can read from a C STDIO file handle: stream = fopen(filename, "rb"); raptor_parser_parse_file_stream(rdf_parser, stream, filename, base_uri); fclose(stream); This function can use take an optional filename which is used in locator error messages. The base_uri may be required by some parsers and if NULL will cause the parsing to fail. This requirement can be checked by looking at the flags in the parser description using raptor_world_get_parser_description().
Parse the content of a file URI (<link linkend="raptor-parser-parse-file"><function>raptor_parser_parse_file()</function></link>) Parsing can read from a URI known to be a file: URI: raptor_parser_parse_file(rdf_parser, file_uri, base_uri); This function requires that the file_uri is a file URI, that is raptor_uri_uri_string_is_file_uri( raptor_uri_as_string( file_uri) ) must be true. The base_uri may be required by some parsers and if NULL will cause the parsing to fail.
Parse chunks of syntax content provided by the application (<link linkend="raptor-parser-parse-start"><function>raptor_parser_parse_start()</function></link> and <link linkend="raptor-parser-parse-chunk"><function>raptor_parser_parse_chunk()</function></link>) raptor_parser_parse_start(rdf_parser, base_uri); while(/* not finished getting content */) { unsigned char *buffer; size_t buffer_len; /* ... obtain some syntax content in buffer of size buffer_len bytes ... */ raptor_parser_parse_chunk(rdf_parser, buffer, buffer_len, 0); } raptor_parser_parse_chunk(rdf_parser, NULL, 0, 1); /* no data and is_end = 1 */ The base_uri argument to raptor_parser_parse_start() may be required by some parsers and if NULL will cause the parsing to fail. On the last raptor_parser_parse_chunk() call, or after the loop is ended, the is_end parameter must be set to non-0. Content can be passed with the final call. If no content is present at the end (such as in some kind of end of file situation), then a 0-length buffer_len or NULL buffer can be used. The minimal case is an entire parse in one chunk as follows: raptor_parser_parse_start(rdf_parser, base_uri); raptor_parser_parse_chunk(rdf_parser, buffer, buffer_len, 1); /* is_end = 1 */
Restrict parser network access Parsing can cause network requests to be performed, especially if a URI is given as an argument such as with raptor_parser_parse_uri() however there may also be indirect requests such as with the GRDDL parser that retrieves URIs depending on the results of initial parse requests. The URIs requested may not be wanted to be fetched or need to be filtered, and this can be done in three ways.
Filtering parser network requests with option <link linkend="RAPTOR-OPTION-NO-NET:CAPS"><literal>RAPTOR_OPTION_NO_NET</literal></link> The parser option RAPTOR_OPTION_NO_NET can be set with raptor_parser_set_option() and forbids all network requests. There is no customisation with this approach, for that see the URI filter in the next section. rdf_parser = raptor_new_parser(world, "rdfxml"); /* Disable internal network requests */ raptor_parser_set_option(rdf_parser, RAPTOR_OPTION_NO_NET, NULL, 1);
Filtering parser network requests with <link linkend="raptor-www-set-uri-filter"><function>raptor_www_set_uri_filter()</function></link> The raptor_www_set_uri_filter() allows setting of a filtering function to operate on all URIs retrieved by a WWW connection. This connection can be used in parsing when operated by hand. void write_bytes_handler(raptor_www* www, void *user_data, const void *ptr, size_t size, size_t nmemb) { { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_parser_parse_chunk(rdf_parser, (unsigned char*)ptr, size*nmemb, 0); } int uri_filter(void* filter_user_data, raptor_uri* uri) { /* return non-0 to forbid the request */ } int main(int argc, char *argv[]) { ... rdf_parser = raptor_new_parser(world, "rdfxml"); www = raptor_new_www(world); /* filter all URI requests */ raptor_www_set_uri_filter(www, uri_filter, filter_user_data); /* make WWW write bytes to parser */ raptor_www_set_write_bytes_handler(www, write_bytes_handler, rdf_parser); raptor_parser_parse_start(rdf_parser, uri); raptor_www_fetch(www, uri); /* tell the parser that we are done */ raptor_parser_parse_chunk(rdf_parser, NULL, 0, 1); raptor_free_www(www); raptor_free_parser(rdf_parser); ... }
Filtering parser network requests with <link linkend="raptor-parser-set-uri-filter"><function>raptor_parser_set_uri_filter()</function></link> The raptor_parser_set_uri_filter() allows setting of a filtering function to operate on all URIs that the parser sees. This operates on the internal raptor_www object used inside parsing to retrieve URIs, similar to that described in the previous section. int uri_filter(void* filter_user_data, raptor_uri* uri) { /* return non-0 to forbid the request */ } rdf_parser = raptor_new_parser(world, "rdfxml"); raptor_parser_set_uri_filter(rdf_parser, uri_filter, filter_user_data); /* parse content as normal */ raptor_parser_parse_uri(rdf_parser, uri, base_uri);
Setting timeout for parser network requests with option <link linkend="RAPTOR-OPTION-WWW-TIMEOUT:CAPS"><literal>RAPTOR_OPTION_WWW_TIMEOUT</literal></link> If the value of option RAPTOR_OPTION_WWW_TIMEOUT if set to a number >0, it is used as the timeout in seconds for retrieving of URIs during parsing (primarily for GRDDL). This uses raptor_www_set_connection_timeout() internally. rdf_parser = raptor_new_parser(world, "grddl"); /* set internal URI retrieval maximum time to 5 seconds */ raptor_parser_set_option(rdf_parser, RAPTOR_OPTION_WWW_TIMEOUT, NULL, 5);
Querying parser static information These methods return information about the constructed parser implementation corresponding to the information available via raptor_world_get_parser_description() for all parsers. raptor_parser_get_name() returns the parser syntax name, raptor_parser_get_description() returns more detailed description fields including the long label and mime_types for the parser with quality levels. raptor_parser_get_accept_header() returns a string that would be sent in an HTTP request Accept: header for the syntaxes accepted by this parser only.
Querying parser run-time information raptor_parser_get_locator() returns the raptor_locator for the current position in the input stream. The locator structure contains full information on the details of where in the file or URI the current parser has reached.
Aborting parsing raptor_parser_parse_abort() allows the current parsing to be aborted, at which point no further triples will be passed to callbacks and the parser will attempt to return control to the application. This is most useful when called inside a handler function which allows the application to decide to stop an active parsing.
Destroy the parser To tidy up, delete the parser object as follows: raptor_free_parser(rdf_parser);
Parsing example code <filename>rdfprint.c</filename>: Parse an RDF/XML file and print the triples Compile it like this: $ gcc -o rdfprint rdfprint.c `pkg-config raptor2 --cflags --libs` and run it on an RDF file as: $ ./rdfprint raptor.rdf _:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> . _:genid1 <http://usefulinc.com/ns/doap#name> "Raptor" . _:genid1 <http://usefulinc.com/ns/doap#homepage> <http://librdf.org/raptor/> . ...
raptor2-2.0.15/docs/raptor-tutorial-intro.xml0000644000175000017500000000134611660060067016072 00000000000000 Initialising and Finishing using the Library Raptor requires initialising a raptor_world object before using any of the classes which take the world object as an argument in their constructors. The function to make the world object is raptor_new_world() and the destructor raptor_free_world(). raptor_world* world; world = raptor_new_world(); ... raptor_free_world(world); raptor2-2.0.15/docs/raptor2-sections.txt0000644000175000017500000003064712425347071015037 00000000000000
section-world raptor_world raptor_new_world raptor_world_open raptor_free_world raptor_world_flag raptor_world_set_flag raptor_world_set_libxslt_security_preferences raptor_world_set_log_handler raptor_world_get_parser_description raptor_world_is_parser_name raptor_world_guess_parser_name raptor_world_get_serializer_description raptor_world_is_serializer_name raptor_world_generate_bnodeid raptor_world_set_generate_bnodeid_handler raptor_world_set_generate_bnodeid_parameters raptor_world_get_parsers_count raptor_world_get_serializers_count
section-general RAPTOR_VERSION RAPTOR_VERSION_MAJOR RAPTOR_VERSION_MINOR RAPTOR_VERSION_RELEASE RAPTOR_VERSION_STRING raptor_version_major raptor_version_minor raptor_version_release raptor_version_decimal raptor_copyright_string raptor_home_url_string raptor_license_string raptor_short_copyright_string raptor_version_string raptor_owl_namespace_uri raptor_rdf_namespace_uri raptor_rdf_schema_namespace_uri raptor_xml_literal_datatype_uri_string raptor_xml_namespace_uri raptor_xmlschema_datatypes_namespace_uri raptor_statement_handler raptor_snprintf raptor_vasprintf raptor_vsnprintf raptor_vsnprintf2 raptor_sort_r raptor_log_handler raptor_log_message raptor_log_level raptor_log_level_get_label raptor_domain raptor_domain_get_label raptor_data_compare_handler raptor_data_compare_arg_handler raptor_data_context_free_handler raptor_data_context_print_handler raptor_data_free_handler raptor_data_malloc_handler raptor_data_print_handler raptor_syntax_bitflags raptor_syntax_description raptor_syntax_description_validate raptor_type_q
section-option raptor_option raptor_option_description raptor_option_get_count raptor_option_value_type raptor_option_get_value_type_label raptor_world_get_option_description raptor_free_option_description raptor_world_get_option_from_uri
section-memory raptor_free_memory raptor_alloc_memory raptor_calloc_memory
section-triples raptor_term_type raptor_term raptor_term_value raptor_term_blank_value raptor_term_literal_value raptor_new_term_from_blank raptor_new_term_from_counted_blank raptor_new_term_from_literal raptor_new_term_from_counted_literal raptor_new_term_from_counted_uri_string raptor_new_term_from_uri raptor_new_term_from_uri_string raptor_new_term_from_counted_string raptor_term_copy raptor_term_compare raptor_term_equals raptor_free_term raptor_term_to_counted_string raptor_term_to_string raptor_term_ntriples_write raptor_term_to_turtle_counted_string raptor_term_to_turtle_string raptor_term_turtle_write raptor_statement raptor_new_statement raptor_new_statement_from_nodes raptor_free_statement raptor_statement_copy raptor_statement_compare raptor_statement_equals raptor_statement_init raptor_statement_clear raptor_statement_print raptor_statement_print_as_ntriples raptor_statement_ntriples_write
section-constants raptor_rdf_namespace_uri_len raptor_xml_literal_datatype_uri_string_len RAPTOR_RDF_MS_URI RAPTOR_RDF_SCHEMA_URI RAPTOR_XMLSCHEMA_DATATYPES_URI RAPTOR_OWL_URI
section-avltree raptor_avltree raptor_avltree_bitflags raptor_new_avltree raptor_free_avltree raptor_avltree_add raptor_avltree_delete raptor_avltree_print raptor_avltree_remove raptor_avltree_search raptor_avltree_set_print_handler raptor_avltree_size raptor_avltree_visit raptor_avltree_iterator raptor_new_avltree_iterator raptor_free_avltree_iterator raptor_avltree_iterator_get raptor_avltree_iterator_is_end raptor_avltree_iterator_next raptor_avltree_visit_handler
section-parser raptor_parser raptor_new_parser raptor_new_parser_for_content raptor_free_parser raptor_graph_mark_handler raptor_namespace_handler raptor_parser_set_statement_handler raptor_graph_mark_flags raptor_parser_set_graph_mark_handler raptor_parser_set_namespace_handler raptor_parser_get_description raptor_parser_get_locator raptor_parser_parse_abort raptor_parser_parse_chunk raptor_parser_parse_file raptor_parser_parse_file_stream raptor_parser_parse_iostream raptor_parser_parse_start raptor_parser_parse_uri raptor_parser_parse_uri_with_connection raptor_parser_get_graph raptor_parser_get_name raptor_parser_set_option raptor_parser_get_option raptor_parser_get_accept_header raptor_parser_set_uri_filter raptor_parser_get_world
section-locator raptor_locator raptor_locator_print raptor_locator_format raptor_locator_line raptor_locator_column raptor_locator_byte raptor_locator_file raptor_locator_uri
section-serializer raptor_serializer raptor_new_serializer raptor_free_serializer raptor_serializer_start_to_iostream raptor_serializer_start_to_filename raptor_serializer_start_to_string raptor_serializer_start_to_file_handle raptor_serializer_set_namespace raptor_serializer_set_namespace_from_namespace raptor_serializer_serialize_statement raptor_serializer_serialize_end raptor_serializer_flush raptor_serializer_get_description raptor_serializer_get_iostream raptor_serializer_get_locator raptor_serializer_set_option raptor_serializer_get_option raptor_serializer_get_world
section-uri raptor_uri raptor_new_uri raptor_new_uri_from_counted_string raptor_new_uri_from_uri_local_name raptor_new_uri_from_uri_or_file_string raptor_new_uri_relative_to_base raptor_new_uri_relative_to_base_counted raptor_new_uri_from_id raptor_new_uri_for_rdf_concept raptor_new_uri_for_xmlbase raptor_new_uri_for_retrieval raptor_free_uri raptor_uri_compare raptor_uri_equals raptor_uri_copy raptor_uri_as_string raptor_uri_as_counted_string raptor_uri_to_relative_counted_uri_string raptor_uri_to_relative_uri_string raptor_uri_to_counted_string raptor_uri_to_string raptor_uri_resolve_uri_reference raptor_uri_counted_filename_to_uri_string raptor_uri_filename_to_uri_string raptor_uri_uri_string_is_absolute raptor_uri_uri_string_is_file_uri raptor_uri_uri_string_to_filename raptor_uri_uri_string_to_filename_fragment raptor_uri_uri_string_to_counted_filename_fragment raptor_uri_print raptor_uri_get_world raptor_uri_write raptor_uri_file_exists raptor_uri_filename_exists raptor_uri_to_turtle_counted_string raptor_uri_to_turtle_string raptor_uri_turtle_write
section-stringbuffer raptor_stringbuffer raptor_new_stringbuffer raptor_free_stringbuffer raptor_stringbuffer_append_counted_string raptor_stringbuffer_append_decimal raptor_stringbuffer_append_hexadecimal raptor_stringbuffer_append_string raptor_stringbuffer_append_stringbuffer raptor_stringbuffer_append_uri_escaped_counted_string raptor_stringbuffer_prepend_counted_string raptor_stringbuffer_prepend_string raptor_stringbuffer_as_string raptor_stringbuffer_length raptor_stringbuffer_copy_to_string raptor_stringbuffer_write
section-sequence raptor_sequence raptor_new_sequence raptor_new_sequence_with_context raptor_free_sequence raptor_sequence_delete_at raptor_sequence_get_at raptor_sequence_join raptor_sequence_next_permutation raptor_sequence_pop raptor_sequence_print raptor_sequence_push raptor_sequence_reverse raptor_sequence_set_at raptor_sequence_shift raptor_sequence_size raptor_sequence_sort raptor_sequence_sort_r raptor_sequence_swap raptor_sequence_unshift
section-www raptor_www raptor_new_www raptor_new_www_with_connection raptor_free_www raptor_www_write_bytes_handler raptor_www_content_type_handler raptor_www_set_user_agent raptor_www_set_proxy raptor_www_set_http_accept raptor_www_set_http_cache_control raptor_www_set_write_bytes_handler raptor_www_set_connection_timeout raptor_www_set_content_type_handler raptor_uri_filter_func raptor_www_set_uri_filter raptor_www_final_uri_handler raptor_www_get_final_uri raptor_www_set_final_uri_handler raptor_www_fetch raptor_www_fetch_to_string raptor_www_get_connection raptor_www_set_ssl_cert_options raptor_www_set_ssl_verify_options raptor_www_abort
section-iostream raptor_iostream raptor_iostream_init_func raptor_iostream_finish_func raptor_iostream_write_byte_func raptor_iostream_write_bytes_func raptor_iostream_write_end_func raptor_iostream_read_bytes_func raptor_iostream_read_eof_func raptor_iostream_handler raptor_new_iostream_from_handler raptor_new_iostream_from_sink raptor_new_iostream_from_filename raptor_new_iostream_from_file_handle raptor_new_iostream_from_string raptor_new_iostream_to_sink raptor_new_iostream_to_filename raptor_new_iostream_to_file_handle raptor_new_iostream_to_string raptor_free_iostream raptor_iostream_hexadecimal_write raptor_iostream_read_bytes raptor_iostream_read_eof raptor_iostream_tell raptor_iostream_counted_string_write raptor_iostream_decimal_write raptor_iostream_string_write raptor_iostream_write_byte raptor_iostream_write_bytes raptor_iostream_write_end raptor_bnodeid_ntriples_write raptor_escaped_write_bitflags raptor_string_escaped_write raptor_term_escaped_write raptor_uri_escaped_write raptor_string_ntriples_write raptor_string_python_write
section-sax2 raptor_sax2 raptor_new_sax2 raptor_free_sax2 raptor_sax2_start_element_handler raptor_sax2_end_element_handler raptor_sax2_characters_handler raptor_sax2_cdata_handler raptor_sax2_comment_handler raptor_sax2_unparsed_entity_decl_handler raptor_sax2_external_entity_ref_handler raptor_sax2_set_start_element_handler raptor_sax2_set_end_element_handler raptor_sax2_set_characters_handler raptor_sax2_set_cdata_handler raptor_sax2_set_comment_handler raptor_sax2_set_unparsed_entity_decl_handler raptor_sax2_set_external_entity_ref_handler raptor_sax2_set_namespace_handler raptor_sax2_set_uri_filter raptor_sax2_parse_start raptor_sax2_parse_chunk raptor_sax2_inscope_xml_language raptor_sax2_inscope_base_uri
section-xml raptor_xml_element raptor_new_xml_element raptor_new_xml_element_from_namespace_local_name raptor_free_xml_element raptor_xml_element_get_name raptor_xml_element_get_attributes raptor_xml_element_get_attributes_count raptor_xml_element_set_attributes raptor_xml_element_declare_namespace raptor_xml_element_is_empty raptor_xml_element_get_language raptor_xml_element_write raptor_new_xml_writer raptor_free_xml_writer raptor_xml_writer_empty_element raptor_xml_writer_start_element raptor_xml_writer_end_element raptor_xml_writer_cdata raptor_xml_writer_cdata_counted raptor_xml_writer_raw raptor_xml_writer_raw_counted raptor_xml_writer_comment raptor_xml_writer_comment_counted raptor_xml_writer_flush raptor_xml_writer_newline raptor_xml_writer_get_depth raptor_xml_writer_set_option raptor_xml_writer_get_option raptor_xml_writer raptor_xml_escape_string_any raptor_xml_escape_string_any_write raptor_xml_escape_string raptor_xml_escape_string_write raptor_xml_name_check
section-xml-qname raptor_qname raptor_new_qname raptor_new_qname_from_namespace_local_name raptor_new_qname_from_namespace_uri raptor_qname_copy raptor_free_qname raptor_qname_equal raptor_qname_string_to_uri raptor_qname_write raptor_qname_format_as_xml raptor_qname_get_counted_value raptor_qname_get_local_name raptor_qname_get_namespace raptor_qname_get_value raptor_qname_to_counted_name
section-xml-namespace raptor_namespace raptor_new_namespace_from_uri raptor_new_namespaces raptor_namespaces_init raptor_namespaces_clear raptor_free_namespaces raptor_namespaces_start_namespace raptor_namespaces_start_namespace_full raptor_namespaces_end_for_depth raptor_namespaces_get_default_namespace raptor_namespaces_find_namespace raptor_namespaces_find_namespace_by_uri raptor_namespaces_namespace_in_scope raptor_new_namespace raptor_free_namespace raptor_namespace_get_uri raptor_namespace_get_prefix raptor_namespace_get_counted_prefix raptor_namespace_write raptor_namespace_stack raptor_namespace_stack_start_namespace raptor_namespace_format_as_xml raptor_xml_namespace_string_parse
section-unicode raptor_unichar raptor_unicode_utf8_string_put_char raptor_unicode_utf8_string_get_char raptor_unicode_is_xml11_namestartchar raptor_unicode_is_xml10_namestartchar raptor_unicode_is_xml11_namechar raptor_unicode_is_xml10_namechar raptor_unicode_check_utf8_string raptor_unicode_utf8_strlen raptor_unicode_utf8_substr
section-unused RAPTOR_API RAPTOR_DEPRECATED RAPTOR_PRINTF_FORMAT RAPTOR_V2_AVAILABLE raptor_new_world_internal
raptor2-2.0.15/docs/raptor-changes.xml0000644000175000017500000032113112425344320014500 00000000000000 API Changes This chapter describes the API changes for raptor2.
Introduction The following sections describe the changes in the API between versions including additions, deletions, renames (retaining the same number of parameters, types and return value type) and more complex changes to functions, types and enums.
Changes between raptor2 1.4.21 and 2.0.0
New functions, types and enums Functions int raptor_avltree_add(raptor_avltree* tree, void* p_data) int raptor_avltree_delete(raptor_avltree* tree, void* p_data) void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator) int raptor_avltree_iterator_is_end(raptor_avltree_iterator* iterator) int raptor_avltree_iterator_next(raptor_avltree_iterator* iterator) int raptor_avltree_print(raptor_avltree* tree, FILE* stream) void* raptor_avltree_remove(raptor_avltree* tree, void* p_data) void* raptor_avltree_search(raptor_avltree* tree, const void* p_data) void raptor_avltree_set_print_handler(raptor_avltree* tree, raptor_data_print_handler print_handler) int raptor_avltree_size(raptor_avltree* tree) int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data) const char* raptor_domain_get_label(raptor_domain domain) void raptor_free_avltree(raptor_avltree* tree) void raptor_free_avltree_iterator(raptor_avltree_iterator* iterator) void raptor_free_option_description(raptor_option_description* option_description) void raptor_free_statement(raptor_statement *statement) void raptor_free_term(raptor_term *term) const char* raptor_log_level_get_label(raptor_log_level level) raptor_avltree* raptor_new_avltree(raptor_data_compare_handler compare_handler, raptor_data_free_handler free_handler, unsigned int flags) raptor_avltree_iterator* raptor_new_avltree_iterator(raptor_avltree* tree, void* range, raptor_data_free_handler range_free_handler, int direction) raptor_sequence* raptor_new_sequence_with_context(raptor_data_context_free_handler* free_handler, raptor_data_context_print_handler* print_handler, void* handler_context) raptor_statement* raptor_new_statement(raptor_world *world) raptor_statement* raptor_new_statement_from_nodes(raptor_world* world, raptor_term *subject, raptor_term *predicate, raptor_term *object, raptor_term *graph) raptor_term* raptor_new_term_from_blank(raptor_world* world, const unsigned char* blank) raptor_term* raptor_new_term_from_counted_blank(raptor_world* world, const unsigned char* blank, size_t length) raptor_term* raptor_new_term_from_counted_literal(raptor_world* world, const unsigned char* literal, size_t literal_len, raptor_uri* datatype, const unsigned char* language, unsigned char language_len) raptor_term* raptor_new_term_from_literal(raptor_world* world, const unsigned char* literal, raptor_uri* datatype, const unsigned char* language) raptor_term* raptor_new_term_from_uri(raptor_world* world, raptor_uri* uri) raptor_uri* raptor_new_uri_from_counted_string(raptor_world* world, const unsigned char* uri_string, size_t length) const char* raptor_option_get_value_type_label(const raptor_option_value_type type) raptor_uri* raptor_parser_get_graph(raptor_parser* rdf_parser) int raptor_parser_parse_iostream(raptor_parser* rdf_parser, raptor_iostream *iostr, raptor_uri *base_uri) int raptor_serializer_flush(raptor_serializer *rdf_serializer) raptor_syntax_description* raptor_serializer_get_description(raptor_serializer* rdf_serializer) void raptor_statement_clear(raptor_statement *statement) raptor_statement* raptor_statement_copy(raptor_statement *statement) int raptor_statement_equals(const raptor_statement* s1, const raptor_statement* s2) void raptor_statement_init(raptor_statement *statement, raptor_world *world) int raptor_syntax_description_validate (raptor_syntax_description* desc) int raptor_term_compare(const raptor_term *t1, const raptor_term *t2) raptor_term* raptor_term_copy(raptor_term* term) int raptor_term_equals(raptor_term* term1, raptor_term* term2) int raptor_term_ntriples_write(const raptor_term *term, raptor_iostream* iostr) unsigned char* raptor_term_to_counted_string(raptor_term *term, size_t* len_p) unsigned char* raptor_term_to_string(raptor_term *term) raptor_world* raptor_uri_get_world(raptor_uri *uri) unsigned char* raptor_world_generate_bnodeid(raptor_world *world) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) int raptor_world_is_parser_name(raptor_world* world, const char* name) int raptor_world_set_log_handler(raptor_world *world, void *user_data, raptor_log_handler handler) Types raptor_avltree raptor_avltree_bitflags raptor_avltree_iterator raptor_avltree_visit_handler raptor_data_compare_handler raptor_data_context_free_handler raptor_data_malloc_handler raptor_domain raptor_graph_mark_flags raptor_log_message raptor_option_description raptor_option_value_type raptor_syntax_bitflags raptor_syntax_description raptor_term_blank_value raptor_term_literal_value raptor_term_value raptor_type_q Enums RAPTOR_DOMAIN_IOSTREAM RAPTOR_DOMAIN_LAST RAPTOR_DOMAIN_NAMESPACE RAPTOR_DOMAIN_NONE RAPTOR_DOMAIN_PARSER RAPTOR_DOMAIN_QNAME RAPTOR_DOMAIN_SAX2 RAPTOR_DOMAIN_SERIALIZER RAPTOR_DOMAIN_TERM RAPTOR_DOMAIN_TURTLE_WRITER RAPTOR_DOMAIN_URI RAPTOR_DOMAIN_WORLD RAPTOR_DOMAIN_WWW RAPTOR_DOMAIN_XML_WRITER RAPTOR_GRAPH_MARK_DECLARED RAPTOR_GRAPH_MARK_START RAPTOR_LOG_LEVEL_DEBUG RAPTOR_LOG_LEVEL_INFO RAPTOR_LOG_LEVEL_TRACE RAPTOR_OPTION_VALUE_TYPE_BOOL RAPTOR_OPTION_VALUE_TYPE_INT RAPTOR_OPTION_VALUE_TYPE_LAST RAPTOR_OPTION_VALUE_TYPE_STRING RAPTOR_OPTION_VALUE_TYPE_URI RAPTOR_WORLD_FLAG_URI_INTERNING RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH
Deleted functions, types and enums Functions raptor_compare_strings - Trivial utility function removed. raptor_copy_identifier - Use raptor_term_copy() with raptor_term objects. raptor_error_handlers_init - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() raptor_error_handlers_init_v2 - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() raptor_feature_value_type - Use raptor_world_get_option_description() for the option and access the value_type field. raptor_finish - Use raptor_free_world() with raptor_world object. raptor_free_identifier - Use raptor_free_term() with raptor_term objects. raptor_init - Use raptor_new_world() to create a new raptor_world object. raptor_iostream_get_bytes_written_count - Deprecated for raptor_iostream_tell(). raptor_iostream_write_string_turtle - Deprecated for raptor_string_python_write(). raptor_new_identifier - Replaced by raptor_new_term_from_blank(), raptor_new_term_from_literal() or raptor_new_term_from_blank() and raptor_term class. raptor_new_identifier_v2 - Replaced by raptor_new_term_from_blank(), raptor_new_term_from_literal() or raptor_new_term_from_blank() and raptor_term class. raptor_ntriples_string_as_utf8_string - Deprecated internal debug function. raptor_ntriples_term_as_string - Deprecated internal debug function. raptor_print_ntriples_string - Use raptor_string_ntriples_write() with a raptor_iostream raptor_print_statement_detailed - Deprecated internal function. raptor_sequence_print_string - Trivial utility function removed. raptor_sequence_print_uri - Deprecated for raptor_uri_print() raptor_sequence_set_print_handler - Use the argument in the raptor_new_sequence() constructor instead. raptor_sequence_set_print_handler_v2 - Use the argument in the raptor_new_sequence() constructor instead. raptor_serializer_set_error_handler - Replaced by raptor_world_set_log_handler() on the raptor_world object. raptor_serializer_set_warning_handler - Replaced by raptor_world_set_log_handler() on the raptor_world object. raptor_set_error_handler - Replaced by raptor_world_set_log_handler() on the raptor_world object. raptor_set_fatal_error_handler - Replaced by raptor_world_set_log_handler() on the raptor_world object. raptor_set_parser_strict - Replaced by raptor_parser_set_option() with option RAPTOR_OPTION_STRICT raptor_set_warning_handler - Replaced by raptor_world_set_log_handler() on the raptor_world object. raptor_statement_part_as_counted_string - Better done via methods of raptor_term class such as raptor_term_to_counted_string(). raptor_statement_part_as_counted_string_v2 - Better done via methods of raptor_term class such as raptor_term_to_counted_string(). raptor_statement_part_as_string - Better done via methods of raptor_term class such as raptor_term_to_string(). raptor_statement_part_as_string_v2 - Better done via methods of raptor_term class such as raptor_term_to_string(). raptor_uri_get_handler - Entire URI implementation is internal and not replaceable. raptor_uri_get_handler_v2 - Entire URI implementation is internal and not replaceable. raptor_uri_set_handler - Entire URI implementation is internal and not replaceable. raptor_uri_set_handler_v2 - Entire URI implementation is internal and not replaceable. raptor_www_finish - No need for this to be public. raptor_www_finish_v2 - No need for this to be public. raptor_www_init - No need for this to be public. raptor_www_init_v2 - No need for this to be public. raptor_www_no_www_library_init_finish - Deprecated for raptor_world_set_flag(). raptor_www_no_www_library_init_finish_v2 - Deprecated for raptor_world_set_flag(). raptor_www_set_error_handler - Replaced by raptor_world_set_log_handler() on the raptor_world object. Types raptor_error_handlers - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() raptor_free_uri_func - Entire URI implementation is internal and not replaceable. raptor_libxml_flags - replaced by raptor_world_set_flags() with raptor_world_flag raptor_message_handler - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() raptor_message_handler_closure - Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() raptor_new_uri_for_rdf_concept_func - Entire URI implementation is internal and not replaceable. raptor_new_uri_from_uri_local_name_func - Entire URI implementation is internal and not replaceable. raptor_new_uri_func - Entire URI implementation is internal and not replaceable. raptor_new_uri_relative_to_base_func - Entire URI implementation is internal and not replaceable. raptor_ntriples_parser - replaced by raptor_parser raptor_ntriples_term_type - replaced by raptor_term_type raptor_uri_as_counted_string_func - Entire URI implementation is internal and not replaceable. raptor_uri_as_string_func - Entire URI implementation is internal and not replaceable. raptor_uri_compare_func - Entire URI implementation is internal and not replaceable. raptor_uri_copy_func - Entire URI implementation is internal and not replaceable. raptor_uri_equals_func - Entire URI implementation is internal and not replaceable. raptor_uri_handler - Entire URI implementation is internal and not replaceable. raptor_uri_source - URI source was useless. Enums RAPTOR_FEATURE_ASSUME_IS_RDF - Never used. RAPTOR_FEATURE_START_URI - Never used. RAPTOR_GENID_TYPE_BAGID - There is just one type of generated ID now. RAPTOR_GENID_TYPE_BNODEID - There is just one type of generated ID now. RAPTOR_IDENTIFIER_TYPE_ORDINAL - Deprecated value deleted. RAPTOR_URI_SOURCE_ATTRIBUTE - URI source concept removed. RAPTOR_URI_SOURCE_BLANK_ID - URI source concept removed. RAPTOR_URI_SOURCE_ELEMENT - URI source concept removed. RAPTOR_URI_SOURCE_GENERATED - URI source concept removed. RAPTOR_URI_SOURCE_ID - URI source concept removed. RAPTOR_URI_SOURCE_NOT_URI - URI source concept removed. RAPTOR_URI_SOURCE_UNKNOWN - URI source concept removed. RAPTOR_URI_SOURCE_URI - URI source concept removed.
Renamed function and enums
1.4.21 function 2.0.0 function Notes
raptor_format_locator raptor_locator_format  
raptor_get_feature_count raptor_option_get_count  
raptor_get_locator raptor_parser_get_locator  
raptor_get_name raptor_parser_get_name  
raptor_guess_parser_name_v2 raptor_world_guess_parser_name  
raptor_namespace_copy raptor_namespace_stack_start_namespace  
raptor_namespaces_format raptor_namespace_format_as_xml  
raptor_namespaces_qname_from_uri raptor_new_qname_from_namespace_uri  
raptor_new_namespace_parts_from_string raptor_xml_namespace_string_parse  
raptor_new_parser_for_content_v2 raptor_new_parser_for_content  
raptor_new_parser_v2 raptor_new_parser  
raptor_new_qname_from_namespace_local_name_v2 raptor_new_qname_from_namespace_local_name  
raptor_new_serializer_v2 raptor_new_serializer  
raptor_new_uri_from_id_v2 raptor_new_uri_from_id  
raptor_new_uri_from_uri_local_name_v2 raptor_new_uri_from_uri_local_name  
raptor_new_uri_relative_to_base_v2 raptor_new_uri_relative_to_base  
raptor_new_uri_v2 raptor_new_uri  
raptor_parse_abort raptor_parser_parse_abort  
raptor_parse_chunk raptor_parser_parse_chunk  
raptor_parse_file raptor_parser_parse_file  
raptor_parse_file_stream raptor_parser_parse_file_stream  
raptor_parse_uri raptor_parser_parse_uri  
raptor_parse_uri_with_connection raptor_parser_parse_uri_with_connection  
raptor_serialize_end raptor_serializer_serialize_end  
raptor_serialize_set_namespace raptor_serializer_set_namespace  
raptor_serialize_set_namespace_from_namespace raptor_serializer_set_namespace_from_namespace  
raptor_serialize_start raptor_serializer_start_to_iostream  
raptor_serialize_start_to_file_handle raptor_serializer_start_to_file_handle  
raptor_serialize_start_to_filename raptor_serializer_start_to_filename  
raptor_serialize_start_to_iostream raptor_serializer_start_to_iostream  
raptor_serialize_start_to_string raptor_serializer_start_to_string  
raptor_serializer_syntax_name_check_v2 raptor_world_is_serializer_name  
raptor_set_namespace_handler raptor_parser_set_namespace_handler  
raptor_set_statement_handler raptor_parser_set_statement_handler  
raptor_start_parse raptor_parser_parse_start  
raptor_uri_is_file_uri raptor_uri_uri_string_is_file_uri  
raptor_utf8_check raptor_unicode_check_utf8_string  
raptor_www_free raptor_free_www  
raptor_www_new_v2 raptor_new_www  
raptor_www_new_with_connection_v2 raptor_new_www_with_connection  
1.4.21 enum 2.0.0 enum Notes
RAPTOR_FEATURE_ALLOW_BAGID RAPTOR_OPTION_ALLOW_BAGID  
RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES  
RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES  
RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST  
RAPTOR_FEATURE_ATOM_ENTRY_URI RAPTOR_OPTION_ATOM_ENTRY_URI  
RAPTOR_FEATURE_BNODE_BORDER RAPTOR_OPTION_BNODE_BORDER  
RAPTOR_FEATURE_BNODE_FILL RAPTOR_OPTION_BNODE_FILL  
RAPTOR_FEATURE_CHECK_RDF_ID RAPTOR_OPTION_CHECK_RDF_ID  
RAPTOR_FEATURE_HTML_LINK RAPTOR_OPTION_HTML_LINK  
RAPTOR_FEATURE_HTML_TAG_SOUP RAPTOR_OPTION_HTML_TAG_SOUP  
RAPTOR_FEATURE_JSON_CALLBACK RAPTOR_OPTION_JSON_CALLBACK  
RAPTOR_FEATURE_JSON_EXTRA_DATA RAPTOR_OPTION_JSON_EXTRA_DATA  
RAPTOR_FEATURE_LAST RAPTOR_OPTION_LAST  
RAPTOR_FEATURE_LITERAL_BORDER RAPTOR_OPTION_LITERAL_BORDER  
RAPTOR_FEATURE_LITERAL_FILL RAPTOR_OPTION_LITERAL_FILL  
RAPTOR_FEATURE_MICROFORMATS RAPTOR_OPTION_MICROFORMATS  
RAPTOR_FEATURE_NON_NFC_FATAL RAPTOR_OPTION_NON_NFC_FATAL  
RAPTOR_FEATURE_NORMALIZE_LANGUAGE RAPTOR_OPTION_NORMALIZE_LANGUAGE  
RAPTOR_FEATURE_NO_NET RAPTOR_OPTION_NO_NET  
RAPTOR_FEATURE_PREFIX_ELEMENTS RAPTOR_OPTION_PREFIX_ELEMENTS  
RAPTOR_FEATURE_RELATIVE_URIS RAPTOR_OPTION_RELATIVE_URIS  
RAPTOR_FEATURE_RESOURCE_BORDER RAPTOR_OPTION_RESOURCE_BORDER  
RAPTOR_FEATURE_RESOURCE_FILL RAPTOR_OPTION_RESOURCE_FILL  
RAPTOR_FEATURE_RSS_TRIPLES RAPTOR_OPTION_RSS_TRIPLES  
RAPTOR_FEATURE_SCANNING RAPTOR_OPTION_SCANNING  
RAPTOR_FEATURE_WARN_OTHER_PARSETYPES RAPTOR_OPTION_WARN_OTHER_PARSETYPES  
RAPTOR_FEATURE_WRITER_AUTO_EMPTY RAPTOR_OPTION_WRITER_AUTO_EMPTY  
RAPTOR_FEATURE_WRITER_AUTO_INDENT RAPTOR_OPTION_WRITER_AUTO_INDENT  
RAPTOR_FEATURE_WRITER_INDENT_WIDTH RAPTOR_OPTION_WRITER_INDENT_WIDTH  
RAPTOR_FEATURE_WRITER_XML_DECLARATION RAPTOR_OPTION_WRITER_XML_DECLARATION  
RAPTOR_FEATURE_WRITER_XML_VERSION RAPTOR_OPTION_WRITER_XML_VERSION  
RAPTOR_FEATURE_WRITE_BASE_URI RAPTOR_OPTION_WRITE_BASE_URI  
RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL  
RAPTOR_FEATURE_WWW_HTTP_USER_AGENT RAPTOR_OPTION_WWW_HTTP_USER_AGENT  
RAPTOR_FEATURE_WWW_TIMEOUT RAPTOR_OPTION_WWW_TIMEOUT  
RAPTOR_IDENTIFIER_TYPE_ANONYMOUS RAPTOR_TERM_TYPE_BLANK  
RAPTOR_IDENTIFIER_TYPE_LITERAL RAPTOR_TERM_TYPE_LITERAL  
RAPTOR_IDENTIFIER_TYPE_PREDICATE RAPTOR_TERM_TYPE_URI  
RAPTOR_IDENTIFIER_TYPE_RESOURCE RAPTOR_TERM_TYPE_URI  
RAPTOR_IDENTIFIER_TYPE_UNKNOWN RAPTOR_TERM_TYPE_UNKNOWN  
RAPTOR_IDENTIFIER_TYPE_XML_LITERAL RAPTOR_TERM_TYPE_LITERAL  
RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE Flag setting is done by raptor_world_set_flags()
RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE Flag setting is done by raptor_world_set_flags()
RAPTOR_LOG_LEVEL_WARNING RAPTOR_LOG_LEVEL_WARN  
RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE RAPTOR_TERM_TYPE_BLANK  
RAPTOR_NTRIPLES_TERM_TYPE_LITERAL RAPTOR_TERM_TYPE_LITERAL  
RAPTOR_NTRIPLES_TERM_TYPE_URI_REF RAPTOR_TERM_TYPE_URI  
Changed functions and types
1.4.21 function 2.0.0 function Notes
raptor_feature raptor_feature_from_uri(raptor_uri *uri) raptor_option raptor_world_get_option_from_uri(raptor_world* world, raptor_uri *uri)  
raptor_feature raptor_feature_from_uri_v2(raptor_world* world, raptor_uri *uri) raptor_option raptor_world_get_option_from_uri(raptor_world* world, raptor_uri *uri)  
int raptor_features_enumerate(const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_PARSER
int raptor_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_PARSER
int raptor_format_locator_v2(raptor_world* world, char* buffer, size_t length, raptor_locator* locator) int raptor_locator_format(char* buffer, size_t length, raptor_locator* locator)  
void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri) void raptor_free_uri(raptor_uri *uri)  
int raptor_get_feature(raptor_parser *parser, raptor_feature feature) int raptor_parser_get_option(raptor_parser *parser, raptor_option option, char** string_p, int* integer_p)  
const char* raptor_get_label(raptor_parser *rdf_parser) raptor_syntax_description* raptor_parser_get_description(raptor_parser* rdf_parser) Use label field of returned description.
const char* raptor_get_mime_type(raptor_parser *rdf_parser) raptor_syntax_description* raptor_parser_get_description(raptor_parser* rdf_parser) Use the mime_types array field of returned raptor_syntax_description
int raptor_get_need_base_uri(raptor_parser *rdf_parser) raptor_syntax_description* raptor_parser_get_description(raptor_parser* rdf_parser) Use the RAPTOR_SYNTAX_NEED_BASE_URI bitflag in the flags field of the returned raptor_syntax_description
const char* raptor_guess_parser_name(raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) const char* raptor_world_guess_parser_name(raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier)  
int raptor_iostream_format_hexadecimal(raptor_iostream* iostr, unsigned int integer, int width) int raptor_iostream_hexadecimal_write(unsigned int integer, int width, raptor_iostream* iostr)  
int raptor_iostream_read_bytes(raptor_iostream* iostr, void *ptr, size_t size, size_t nmemb) int raptor_iostream_read_bytes(void *ptr, size_t size, size_t nmemb, raptor_iostream* iostr)  
int raptor_iostream_write_byte(raptor_iostream *iostr, const int byte) int raptor_iostream_write_byte(const int byte, raptor_iostream *iostr)  
int raptor_iostream_write_bytes(raptor_iostream *iostr, const void *ptr, size_t size, size_t nmemb) int raptor_iostream_write_bytes(const void *ptr, size_t size, size_t nmemb, raptor_iostream *iostr)  
int raptor_iostream_write_counted_string(raptor_iostream *iostr, const void *string, size_t len) int raptor_iostream_counted_string_write(const void *string, size_t len, raptor_iostream *iostr)  
int raptor_iostream_write_decimal(raptor_iostream* iostr, int integer) int raptor_iostream_decimal_write(int integer, raptor_iostream* iostr)  
void raptor_iostream_write_end(raptor_iostream *iostr) int raptor_iostream_write_end(raptor_iostream *iostr)  
int raptor_iostream_write_namespace(raptor_iostream* iostr, raptor_namespace *ns) int raptor_namespace_write(raptor_namespace *ns, raptor_iostream* iostr)  
int raptor_iostream_write_qname(raptor_iostream* iostr, raptor_qname *qname) int raptor_qname_write(raptor_qname *qname, raptor_iostream* iostr)  
void raptor_iostream_write_statement_ntriples(raptor_iostream* iostr, const raptor_statement *statement) int raptor_statement_ntriples_write(const raptor_statement *statement, raptor_iostream* iostr, int write_graph_term) Gains extra flag arg to decide whether to write any graph term.
int raptor_iostream_write_string(raptor_iostream *iostr, const void *string) int raptor_iostream_string_write(const void *string, raptor_iostream *iostr)  
int raptor_iostream_write_string_ntriples(raptor_iostream *iostr, const unsigned char* string, size_t len, const char delim) int raptor_string_ntriples_write(const unsigned char* string, size_t len, const char delim, raptor_iostream *iostr)  
int raptor_iostream_write_string_python(raptor_iostream *iostr, const unsigned char* string, size_t len, const char delim, int flags) int raptor_string_python_write(const unsigned char* string, size_t len, const char delim, int flags, raptor_iostream *iostr)  
int raptor_iostream_write_stringbuffer(raptor_iostream* iostr, raptor_stringbuffer *sb) int raptor_stringbuffer_write(raptor_stringbuffer *sb, raptor_iostream* iostr)  
int raptor_iostream_write_uri(raptor_iostream *iostr, raptor_uri *uri) int raptor_uri_write(raptor_uri *uri, raptor_iostream *iostr)  
int raptor_iostream_write_uri_v2(raptor_world* world, raptor_iostream *iostr, raptor_uri *uri) int raptor_uri_write(raptor_uri *uri, raptor_iostream *iostr)  
int raptor_iostream_write_xml_any_escaped_string(raptor_iostream* iostr, const unsigned char* string, size_t len, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string_any_write(const unsigned char* string, size_t len, char quote, int xml_version, raptor_iostream* iostr)  
int raptor_iostream_write_xml_element(raptor_iostream *iostr, raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, raptor_simple_message_handler error_handler, void *error_data, int depth) int raptor_xml_element_write(raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, int depth, raptor_iostream *iostr)  
int raptor_iostream_write_xml_escaped_string(raptor_iostream* iostr, const unsigned char* string, size_t len, char quote, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string_write(const unsigned char* string, size_t len, char quote, raptor_iostream* iostr)  
const char* raptor_locator_uri_v2(raptor_world* world, raptor_locator *locator) const char* raptor_locator_uri(raptor_locator *locator)  
int raptor_namespaces_init(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) int raptor_namespaces_init(raptor_world* world, raptor_namespace_stack *nstack, int defaults)  
int raptor_namespaces_init_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_simple_message_handler error_handler, void *error_data, int defaults) int raptor_namespaces_init(raptor_world* world, raptor_namespace_stack *nstack, int defaults)  
raptor_iostream* raptor_new_iostream_from_file_handle(FILE *handle) raptor_iostream* raptor_new_iostream_from_file_handle(raptor_world* world, FILE *handle)  
raptor_iostream* raptor_new_iostream_from_filename(const char* filename) raptor_iostream* raptor_new_iostream_from_filename(raptor_world* world, const char* filename)  
raptor_iostream* raptor_new_iostream_from_handler(void *context, const raptor_iostream_handler *handler) raptor_iostream* raptor_new_iostream_from_handler(raptor_world* world, void *user_data, const raptor_iostream_handler* const handler)  
raptor_iostream* raptor_new_iostream_from_handler2(void *user_data, const raptor_iostream_handler2* const handler2) raptor_iostream* raptor_new_iostream_from_handler(raptor_world* world, void *user_data, const raptor_iostream_handler* const handler)  
raptor_iostream* raptor_new_iostream_from_sink(void) raptor_iostream* raptor_new_iostream_from_sink(raptor_world* world)  
raptor_iostream* raptor_new_iostream_from_string(void *string, size_t length) raptor_iostream* raptor_new_iostream_from_string(raptor_world* world, void *string, size_t length)  
raptor_iostream* raptor_new_iostream_to_file_handle(FILE *handle) raptor_iostream* raptor_new_iostream_to_file_handle(raptor_world* world, FILE *handle)  
raptor_iostream* raptor_new_iostream_to_filename(const char* filename) raptor_iostream* raptor_new_iostream_to_filename(raptor_world* world, const char* filename)  
raptor_iostream* raptor_new_iostream_to_sink(void) raptor_iostream* raptor_new_iostream_to_sink(raptor_world* world)  
raptor_iostream* raptor_new_iostream_to_string(void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) raptor_iostream* raptor_new_iostream_to_string(raptor_world* world, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size))  
raptor_namespace_stack* raptor_new_namespaces(const raptor_uri_handler *uri_handler, void *uri_context, raptor_simple_message_handler error_handler, void *error_data, int defaults) raptor_namespace_stack* raptor_new_namespaces(raptor_world* world, int defaults)  
raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world, raptor_simple_message_handler error_handler, void *error_data, int defaults) raptor_namespace_stack* raptor_new_namespaces(raptor_world* world, int defaults)  
raptor_parser* raptor_new_parser(const char* name) raptor_parser* raptor_new_parser(raptor_world* world, const char* name)  
raptor_parser* raptor_new_parser_for_content(raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier) raptor_parser* raptor_new_parser_for_content(raptor_world* world, raptor_uri *uri, const char* mime_type, const unsigned char* buffer, size_t len, const unsigned char* identifier)  
raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char* name, const unsigned char* value, raptor_simple_message_handler error_handler, void *error_data) raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char* name, const unsigned char* value)  
raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value) raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_world* world, raptor_namespace *ns, const unsigned char* local_name, const unsigned char* value)  
raptor_sax2* raptor_new_sax2(void *user_data, raptor_error_handlers* error_handlers) raptor_sax2* raptor_new_sax2(raptor_world *world, raptor_locator *locator, void* user_data)  
raptor_sequence* raptor_new_sequence(raptor_sequence_free_handler* free_handler, raptor_sequence_print_handler* print_handler) raptor_sequence* raptor_new_sequence(raptor_data_free_handler free_handler, raptor_data_print_handler print_handler)  
raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* free_handler, raptor_sequence_print_handler_v2* print_handler, void* handler_context) raptor_sequence* raptor_new_sequence(raptor_data_free_handler free_handler, raptor_data_print_handler print_handler)  
raptor_serializer* raptor_new_serializer(const char* name) raptor_serializer* raptor_new_serializer(raptor_world* world, const char* name)  
raptor_uri* raptor_new_uri(const unsigned char* uri_string) raptor_uri* raptor_new_uri(raptor_world* world, const unsigned char* uri_string)  
raptor_uri* raptor_new_uri_for_rdf_concept(const char* name) raptor_uri* raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char* name)  
raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world, const char* name) raptor_uri* raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char* name)  
raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world, raptor_uri* old_uri) raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri)  
raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world, raptor_uri* old_uri) raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri)  
raptor_uri* raptor_new_uri_from_id(raptor_uri *base_uri, const unsigned char* id) raptor_uri* raptor_new_uri_from_id(raptor_world* world, raptor_uri *base_uri, const unsigned char* id)  
raptor_uri* raptor_new_uri_from_uri_local_name(raptor_uri *uri, const unsigned char* local_name) raptor_uri* raptor_new_uri_from_uri_local_name(raptor_world* world, raptor_uri *uri, const unsigned char* local_name)  
raptor_uri* raptor_new_uri_relative_to_base(raptor_uri *base_uri, const unsigned char* uri_string) raptor_uri* raptor_new_uri_relative_to_base(raptor_world* world, raptor_uri *base_uri, const unsigned char* uri_string)  
raptor_xml_writer* raptor_new_xml_writer(raptor_namespace_stack *nstack, const raptor_uri_handler *uri_handler, void *uri_context, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) raptor_xml_writer* raptor_new_xml_writer(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr)  
raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr, raptor_simple_message_handler error_handler, void *error_data, int canonicalize) raptor_xml_writer* raptor_new_xml_writer(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr)  
const unsigned char* raptor_parser_get_feature_string(raptor_parser *parser, raptor_feature feature) const unsigned char* raptor_parser_get_option(raptor_parser *parser, raptor_option option, char** string_p, int* integer_p)  
int raptor_parser_set_feature_string(raptor_parser *parser, raptor_feature feature, const unsigned char* value) int raptor_parser_set_option(raptor_parser *parser, raptor_option option, char* string, int integer)  
int raptor_parsers_enumerate(const unsigned int counter, const char* *name, const char* *label) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, unsigned int counter)  
int raptor_parsers_enumerate_v2(raptor_world* world, const unsigned int counter, const char* *name, const char* *label) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, const unsigned int counter)  
void raptor_print_locator(FILE *stream, raptor_locator* locator) int raptor_locator_print(raptor_locator* locator, FILE *stream)  
void raptor_print_locator_v2(raptor_world* world, FILE *stream, raptor_locator* locator) void raptor_locator_print(raptor_locator* locator, FILE *stream)  
void raptor_print_statement(const raptor_statement * statement, FILE *stream) int raptor_statement_print(const raptor_statement * statement, FILE *stream)  
void raptor_print_statement_as_ntriples(const raptor_statement * statement, FILE *stream) int raptor_statement_print_as_ntriples(const raptor_statement * statement, FILE *stream)  
void raptor_print_statement_as_ntriples_v2(const raptor_statement_v2 * statement, FILE *stream) int raptor_statement_print_as_ntriples(const raptor_statement * statement, FILE *stream)  
void raptor_print_statement_v2(const raptor_statement_v2 * statement, FILE *stream) int raptor_statement_print(const raptor_statement * statement, FILE *stream)  
raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char* name, size_t name_len, raptor_simple_message_handler error_handler, void *error_data) raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char* name, size_t name_len)  
void raptor_sequence_print(raptor_sequence* seq, FILE* fh) int raptor_sequence_print(raptor_sequence* seq, FILE* fh)  
void raptor_sequence_sort(raptor_sequence* seq, int(*compare)(const void *, const void *)) void raptor_sequence_sort(raptor_sequence* seq, raptor_data_compare_handler compare)  
int raptor_serialize_statement(raptor_serializer* rdf_serializer, const raptor_statement *statement) int raptor_serializer_serialize_statement(raptor_serializer* rdf_serializer, raptor_statement *statement)  
int raptor_serializer_features_enumerate(const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_SERIALIZER
int raptor_serializer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_SERIALIZER
int raptor_serializer_get_feature(raptor_serializer *serializer, raptor_feature feature) int raptor_serializer_get_option(raptor_serializer *serializer, raptor_option option)  
const unsigned char* raptor_serializer_get_feature_string(raptor_serializer *serializer, raptor_feature feature) int raptor_serializer_get_option(raptor_serializer *serializer, raptor_option option, char** string_p, int* integer_p)  
int raptor_serializer_set_feature(raptor_serializer *serializer, raptor_feature feature, int value) int raptor_serializer_set_option(raptor_serializer *serializer, raptor_option option, char* string, int integer)  
int raptor_serializer_set_feature_string(raptor_serializer *serializer, raptor_feature feature, const unsigned char* value) int raptor_serializer_set_option(raptor_serializer *serializer, raptor_option option, char* string, int integer)  
int raptor_serializer_syntax_name_check(const char* name) int raptor_world_is_serializer_name(raptor_world* world, const char* name)  
int raptor_serializers_enumerate(const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, unsigned int counter)  
int raptor_serializers_enumerate_v2(raptor_world* world, const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, const unsigned int counter)  
void raptor_set_default_generate_id_parameters(raptor_parser* rdf_parser, char* prefix, int base) void raptor_world_set_generate_bnodeid_parameters(raptor_world* world, char* prefix, int base)  
int raptor_set_feature(raptor_parser *parser, raptor_feature feature, int value) int raptor_parser_set_option(raptor_parser *parser, raptor_option option, char* string, int integer)  
void raptor_set_generate_id_handler(raptor_parser* parser, void *user_data, raptor_generate_id_handler handler) void raptor_world_set_generate_bnodeid_handler(raptor_world* world, void *user_data, raptor_generate_bnodeid_handler handler)  
void raptor_set_graph_handler(raptor_parser* parser, void *user_data, raptor_graph_handler handler) void raptor_parser_set_graph_mark_handler(raptor_parser* parser, void *user_data, raptor_graph_mark_handler handler)  
void raptor_set_libxslt_security_preferences(void *security_preferences) int raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences)  
int raptor_statement_compare_v2(const raptor_statement_v2 *s1, const raptor_statement_v2 *s2) int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2)  
int raptor_syntax_name_check(const char* name) int raptor_world_is_parser_name(raptor_world* world, const char *name)  
int raptor_syntax_name_check_v2(raptor_world* world, const char* name) int raptor_world_is_parser_name(raptor_world* world, const char *name)  
int raptor_syntaxes_enumerate(const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, const unsigned int counter)  
int raptor_syntaxes_enumerate_v2(raptor_world* world, const unsigned int counter, const char* *name, const char* *label, const char* *mime_type, const unsigned char* *uri_string) raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, const unsigned int counter)  
int raptor_unicode_char_to_utf8(raptor_unichar c, unsigned char* output) int raptor_unicode_utf8_string_put_char(raptor_unichar c, unsigned char* output, size_t length)  
unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t* len_p) unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p)  
unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri) unsigned char* raptor_uri_as_string(raptor_uri *uri)  
int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2)  
raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri) raptor_uri* raptor_uri_copy(raptor_uri *uri)  
int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1, raptor_uri* uri2) int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2)  
void raptor_uri_print(const raptor_uri* uri, FILE *stream) int raptor_uri_print(const raptor_uri* uri, FILE *stream)  
void raptor_uri_print_v2(raptor_world* world, const raptor_uri* uri, FILE *stream) int raptor_uri_print(const raptor_uri* uri, FILE *stream)  
void raptor_uri_resolve_uri_reference(const unsigned char* base_uri, const unsigned char* reference_uri, unsigned char* buffer, size_t length) size_t raptor_uri_resolve_uri_reference(const unsigned char* base_uri, const unsigned char* reference_uri, unsigned char* buffer, size_t length)  
unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world, raptor_uri *uri, size_t *len_p) unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p)  
unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p)  
unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world, raptor_uri *base_uri, raptor_uri *reference_uri) unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri)  
unsigned char* raptor_uri_to_string_v2(raptor_world* world, raptor_uri *uri) unsigned char* raptor_uri_to_string(raptor_uri *uri)  
int raptor_utf8_to_unicode_char(raptor_unichar* output, const unsigned char* input, int length) int raptor_unicode_utf8_string_get_char(const unsigned char* input, size_t length, raptor_unichar* output)  
void raptor_world_set_libxml_flags(raptor_world *world, int flags) int raptor_world_set_flag(raptor_world *world, raptor_world_flag flag, int value)  
void raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences) int raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences)  
int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, void *(*malloc_handler)(size_t size)) int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler)  
raptor_www* raptor_www_new(void) raptor_www* raptor_new_www(raptor_world* world)  
raptor_www* raptor_www_new_with_connection(void* connection) raptor_www* raptor_new_www_with_connection(raptor_world* world, void* connection)  
int raptor_xml_any_escape_string(const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, int xml_version, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string_any(raptor_world* world, const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, int xml_version)  
int raptor_xml_escape_string(const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote, raptor_simple_message_handler error_handler, void *error_data) int raptor_xml_escape_string(raptor_world *world, const unsigned char* string, size_t len, unsigned char* buffer, size_t length, char quote)  
int raptor_xml_writer_features_enumerate(const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_XML_WRITER
int raptor_xml_writer_features_enumerate_v2(raptor_world* world, const raptor_feature feature, const char* *name, raptor_uri **uri, const char* *label) raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) Call with domain = RAPTOR_DOMAIN_XML_WRITER
int raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer, raptor_feature feature) int raptor_xml_writer_get_option(raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p)  
const unsigned char* raptor_xml_writer_get_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature) const unsigned char* raptor_xml_writer_get_option(raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p)  
int raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer, raptor_feature feature, int value) int raptor_xml_writer_set_option(raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer)  
int raptor_xml_writer_set_feature_string(raptor_xml_writer *xml_writer, raptor_feature feature, const unsigned char* value) int raptor_xml_writer_set_option(raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer)  
1.4.21 type 2.0.0 type Notes
raptor_feature raptor_option And new option RAPTOR_OPTION_STRICT added.
raptor_graph_handler raptor_graph_mark_handler  
raptor_identifier raptor_term Fields changed to be simpler raptor_term_type and raptor_term_value
raptor_identifier_type raptor_term_type Removed several enum values to leave just URI, blank and literal types.
raptor_iostream_handler2 raptor_iostream_handler  
raptor_iostream_write_end_func raptor_iostream_write_end_func handler returns an int
raptor_log_level raptor_log_level Added RAPTOR_LOG_LEVEL_TRACE, RAPTOR_LOG_LEVEL_DEBUG, RAPTOR_LOG_LEVEL_INFO. RAPTOR_LOG_LEVEL_WARNING renamed RAPTOR_LOG_LEVEL_WARN
raptor_sequence_free_function raptor_data_free_handler  
raptor_sequence_free_handler_v2 raptor_data_context_free_handler  
raptor_sequence_print_handler raptor_data_print_handler  
raptor_sequence_print_handler_v2 raptor_data_context_print_handler  
raptor_simple_message_handler raptor_log_handler Replaced by generic raptor log mechanism. See raptor_world_set_log_handler()
raptor_statement raptor_statement fields changed to use raptor_term
raptor_statement_handler raptor_statement_handler added const
raptor_statement_v2 raptor_statement Fields changed to be a 3 or 4 tuple of raptor_term
Changes between raptor2 2.0.3 and 2.0.4
New functions, types and enums Functions int raptor_bnodeid_ntriples_write(const unsigned char *bnodeid, size_t len, raptor_iostream *iostr) int raptor_www_set_ssl_cert_options(raptor_www* www, const char* cert_filename, const char* cert_type, const char* cert_passphrase)
Changes between raptor2 2.0.4 and 2.0.5
New functions, types and enums Functions int raptor_snprintf(char *buffer, size_t size, const char *format, ...) int raptor_unicode_utf8_strlen(const unsigned char *string, size_t length) size_t raptor_unicode_utf8_substr(unsigned char* dest, size_t* dest_length_p, const unsigned char* src, size_t src_length, int startingLoc, int length) int raptor_vasprintf(char **ret, const char *format, va_list arguments) int raptor_vsnprintf2(char *buffer, size_t size, const char *format, va_list arguments) - Deprecates raptor_vsnprintf()
Changes between raptor2 2.0.5 and 2.0.6
New functions, types and enums Functions int raptor_sequence_next_permutation(raptor_sequence *seq, raptor_data_compare_handler compare) int raptor_sequence_reverse(raptor_sequence* seq, int start_index, int length) int raptor_sequence_swap(raptor_sequence* seq, int i, int j)
Changes between raptor2 2.0.6 and 2.0.7
New functions, types and enums Functions raptor_uri* raptor_new_uri_from_uri_or_file_string(raptor_world* world, raptor_uri* base_uri, const unsigned char* uri_or_file_string) void raptor_sax2_set_uri_filter(raptor_sax2* sax2, raptor_uri_filter_func filter, void *user_data) int raptor_uri_file_exists(raptor_uri* uri) int raptor_uri_filename_exists(const unsigned char* path) char* raptor_uri_uri_string_to_counted_filename_fragment(const unsigned char *uri_string, size_t* len_p, unsigned char **fragment_p, size_t* fragment_len_p) int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host) Enums RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES RAPTOR_OPTION_NO_FILE RAPTOR_OPTION_WWW_SSL_VERIFY_HOST RAPTOR_OPTION_WWW_SSL_VERIFY_PEER
Changes between raptor2 2.0.7 and 2.0.8
New functions, types and enums Functions raptor_uri* raptor_new_uri_relative_to_base_counted(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string, size_t uri_len) unsigned char* raptor_term_to_turtle_counted_string(raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p) unsigned char* raptor_term_to_turtle_string(raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri) int raptor_term_turtle_write(raptor_iostream* iostr, raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri) unsigned char* raptor_uri_to_turtle_counted_string(raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p) unsigned char* raptor_uri_to_turtle_string(raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri) int raptor_uri_turtle_write(raptor_world *world, raptor_iostream* iostr, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri)
Changes between raptor2 2.0.9 and 2.0.10
New functions, types and enums Functions int raptor_string_escaped_write(const unsigned char *string, size_t len, const char delim, unsigned int flags, raptor_iostream *iostr) int raptor_term_escaped_write(const raptor_term *term, unsigned int flags, raptor_iostream* iostr) int raptor_uri_escaped_write(raptor_uri* uri, raptor_uri* base_uri, unsigned int flags, raptor_iostream *iostr) Types raptor_escaped_write_bitflags
Changes between raptor2 2.0.10 and 2.0.11
New functions, types and enums Functions unsigned char* raptor_qname_format_as_xml(const raptor_qname *qname, size_t *length_p) int raptor_uri_uri_string_is_absolute(const unsigned char* uri_string)
Changes between raptor2 2.0.11 and 2.0.12
New functions, types and enums Functions raptor_term* raptor_new_term_from_counted_string(raptor_world* world, unsigned char* string, size_t length)
Changes between raptor2 2.0.13 and 2.0.14
New functions, types and enums Functions unsigned char* raptor_uri_counted_filename_to_uri_string(const char *filename, size_t filename_len)
Changes between raptor2 2.0.14 and 2.0.15
New functions, types and enums Functions void raptor_sequence_sort_r(raptor_sequence* seq, raptor_data_compare_arg_handler compare, void* user_data) - Uses raptor_sort_r() internally. void raptor_sort_r(void *base, size_t nel, size_t width, raptor_data_compare_arg_handler compar, void *user_data) int raptor_world_get_parsers_count(raptor_world* world) int raptor_world_get_serializers_count(raptor_world* world) Types raptor_data_compare_arg_handler - Used by raptor_sort_r()
raptor2-2.0.15/docs/raptor1-eol.html0000644000175000017500000001006011660060067014073 00000000000000 Raptor RDF Syntax Library - Raptor 1 End of Life (EOL)

Raptor RDF Syntax Library - Raptor 1 End of Life (EOL)

End of life timeline

Nov 2010 onwards

  1. Raptor V1 last release remains 1.4.21 of 2010-01-30
  2. Raptor V2 release 2.0.0 will happen "soon".
  3. The next Rasqal release will support Raptor V2 only.
  4. The next librdf release will support Raptor V2 only (and require a Rasqal built with Raptor V2).

In the style of open source I've been using for the Redland libraries, which might be described as "release when it's ready, not release by date", these dates may slip a little but the intention is that Raptor V2 becomes the mainline.

I do NOT rule out that there will be another Raptor V1 release but it will be ONLY for security issues (including data loss or crashes). It will contain minimal changes and not add any new features or fix any other type of bug.

Developer Actions

If you use the Raptor V1 ABI/API directly, you will need to upgrade. If you want to write conditional code, that's possible. The redland librdf GIT source (or 1.0.12) uses the approach of macros that rewrite V2 into V1 forms and I recommend this way since dropping Raptor V1 support then amounts to removing the macros.

The Raptor V2 API documentation has a detailed section on the changes and there is also an upgrading document plus it points to a perl script docs/upgrade-script.pl (also in the Raptor V2 distribution) that automates some of the work (renames mostly) and leaves markers where a human has to fix.

The Raptor V1 API documentation will remain in a frozen state available at http://librdf.org/raptor/api-1.4/

Packager Actions

If you are a packager of the redland libraries, you need to prepare for the Raptor V1 / Raptor V2 transition which can vary depending on your distribution's standards. The two versions share two files: the rapper binary and the rapper.1 man page. I do not want to rename them to rapper2 etc. since rapper is a well known utility name in RDF and I want 'rapper' to provide the latest version.

In the Debian packaging which I maintain, these are already planned to be in separate packages so that both libraries can be installed and you can choose the raptor-utils2 package over raptor-utils (V1).

In other distributions where everything is in one package (BSD Ports for example) you may have to move the rapper/rapper.1 files to the raptor V2 package and create a new raptor1 package without them. i.e. something like this

Raptor V1 package 1.4.21-X:
/usr/lib/libraptor1.so.1* ...
(no /usr/bin/rapper or /usr/share/man/man1/rapper.1 )
Raptor V2 package 2.0.0-1:
/usr/lib/libraptor2.so.0* ...
/usr/bin/rapper
/usr/share/man/man1/rapper.1
conflicts with older raptor1 packages before 1.4.21-X

The other thing to deal with is that when Rasqal is built against Raptor V2, it has internal change that mean librdf has to also be built against rasqal-with-raptor2. This needs enforcing with packaging dependencies.

This packaging work can be done/started as soon as Raptor V2 2.0.0 is released which will be "soon".

Dave Beckett, 2010-11-07


Copyright (C) 2010 Dave Beckett

raptor2-2.0.15/docs/raptor-tutorial-serializing.xml0000644000175000017500000003533511660060067017264 00000000000000 Serializing RDF triples to a syntax
Introduction The typical sequence of operations to serialize is to create a serializer object, set various callback and features, start the serializing, send some RDF triples to the serializer object, finish the serializing and destroy the serializer object.
Create the Serializer object The serializer can be created directly from a known name using raptor_new_serializer() such as rdfxml for the W3C Recommendation RDF/XML syntax: raptor_serializer* rdf_serializer; rdf_serializer = raptor_new_serializer(world, "rdfxml"); or the name can be discovered from an description as discussed in Querying Functionality
Serializer options There are several options that can be set on serializers. The exact list of options can be found at run time via the Querying Functionality or in the API reference for raptor_option. Options are integer enumerations of the raptor_option enum and have values that are either booleans, integers or strings. The function that sets options for serializers is: raptor_serializer_set_option() used as follows: /* Set a boolean or integer valued option to value 1 */ raptor_serializer_set_option(rdf_serializer, option, NULL, 1); /* Set a string valued option to value "abc" */ raptor_serializer_set_option(rdf_serializer, option, "abc", -1); There is a corresponding function for reading the values of serializer option raptor_serializer_get_option() which takes the option enumeration parameter and returns the boolean / integer or string value correspondingly into the appropriate pointer argument. /* Get a boolean or integer option value */ int int_var; raptor_serializer_get_option(rdf_serializer, option, NULL, &int_var); /* Get a string option value */ char* string_var; raptor_serializer_get_option(rdf_serializer, option, &string_var, NULL);
Declare namespaces Raptor can use namespace prefix/URIs to abbreviate syntax in some syntaxes such as Turtle or any XML syntax including RDF/XML, RSS1.0 and Atom 1.0. These are declared with raptor_serializer_set_namespace() using a prefix and URI argument pair like this: const unsigned char* prefix = "ex"; raptor_uri* uri = raptor_new_uri(world, "http://example.org"); raptor_serializer_set_namespace(rdf_serializer, prefix, uri); or raptor_serializer_set_namespace_from_namespace() from an existing namespace. This can be useful when connected up the the namespace declarations that are generated from a parser via a namespace handler set with raptor_parser_set_namespace_handler() like this: static void relay_namespaces(void* user_data, raptor_namespace *nspace) { raptor_serializer_set_namespace_from_namespace(rdf_serializer, nspace); } ... rdf_parser = raptor_new_parser(world, syntax_name); raptor_parser_set_namespace_handler(rdf_parser, rdf_serializer, relay_namespaces);
Set error and warning handlers Any time before serializing is started, a log handler can be set on the world object via the raptor_world_set_log_handler() method to report errors and warnings from parsing. The method takes a user data argument plus a handler callback of type raptor_log_handler with a signature that looks like this: void message_handler(void *user_data, raptor_log_message* message) { /* do something with the message */ } The handler gets the user data pointer as well as a raptor_log_handler pointer that includes associated location information, such as the log level, raptor_locator, and the log message itself. The locator structure contains full information on the details of where in the file or URI the message occurred.
Provide a destination for the serialized syntax The operation of turning RDF triples into a syntax has several alternatives from functions that do most of the work writing to a file or string to functions that allow passing in a raptor_iostream which can be entirely user-constructed.
Serialize to a filename (<link linkend="raptor-serializer-start-to-filename"><function>raptor_serializer_start_to_filename()</function></link>) Serialize to a new filename (using raptor_new_iostream_to_filename() internally) and uses asf base URI, the file's URI. const char *filename = "raptor.rdf"; raptor_serializer_start_to_filename(rdf_serializer, filename);
Serialize to a string (<link linkend="raptor-serializer-start-to-string"><function>raptor_serializer_start_to_string()</function></link>) Serialize to a string that is allocated by the serializer (using raptor_new_iostream_to_string() internally). The resulting string is only constructed after raptor_serializer_serialize_end() is called and at that point it is assigned to the string pointer passed in, with the length written to the optional length pointer. This function takes an optional base URI but may be required by some serializers. raptor_uri* uri = raptor_new_uri(world, "http://example.org/base"); void *string; /* destination for string */ size_t length; /* length of constructed string */ raptor_serializer* rdf_serializer = /* serializer created by some means */ ; raptor_serializer_start_to_string(rdf_serializer, uri, &string, &length);
Serialize to a FILE* file handle (<link linkend="raptor-serializer-start-to-file-handle"><function>raptor_serializer_start_to_file_handle()</function></link>) Serialize to an existing open C FILE* file handle (using raptor_new_iostream_to_file_handle() internally). The handle is not closed after serializing is finished. This function takes an optional base URI but may be required by some serializers. raptor_uri* uri = raptor_new_uri(world, "http://example.org/base"); FILE* fh = fopen("raptor.rdf", "wb"); raptor_serializer* rdf_serializer = /* serializer created by some means */ ; raptor_serializer_start_to_file_handle(rdf_serializer, uri, fh);
Serialize to an <link linkend="raptor-iostream"><type>raptor_iostream</type></link> (<link linkend="raptor-serializer-start-to-iostream"><function>raptor_serializer_start_to_iostream()</function></link>) This is the most flexible serializing method as it allows writing to any raptor_iostream which can be constructed to build any form of user-generated structure via callbacks. The iostream remains owned by the caller that can continue to write to it after the serializing is finished (after raptor_serializer_serialize_end()) is called). raptor_uri* uri = raptor_new_uri(world, "http://example.org/base"); raptor_iostream* iostream = /* iostream initialized by some means */ ; raptor_serializer* rdf_serializer = /* serializer created by some means */ ; raptor_serializer_start_to_iostream(rdf_serializer, uri, iostream); while( /* got RDF triples */ ) { raptor_statement* triple = /* ... triple made from somewhere ... */ ; raptor_serializer_serialize_statement(rdf_serializer, triple); } raptor_serializer_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); /* ... write other stuff to iostream ... */ raptor_free_iostream(iostream);
Get or construct RDF Statements (Triples) An raptor_statement containing the triple terms and optional graph term can be made either by receiving them from a raptor_parser via parsing or can be constructed by hand. When constructing by hand, the raptor_statement structure should be allocated by the application and the fields filled in. Each statement has three triple terms (subject, predicate, object) and an optional graph term. The subject can be a URI or blank node, the predicate can only be a URI and the object can be a URI, blank node or RDF literal. RDF literals can have either just a Unicode string, a Unicode string and a language or a Unicode string and a datatype URI. The statement terms are all instances of raptor_term objects constructed with the appropriate constructor for the URI, blank node or rdf literal types. The graph term of the statement is typically a URI or blank node. <filename>rdfserialize.c</filename>: Serialize 1 triple to RDF/XML (Abbreviated) Compile it like this: $ gcc -o rdfserialize rdfserialize.c `pkg-config raptor2 --cflags --libs` and run it with an optional base URI argument $ ./rdfserialize <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://example.org/subject"> <ns0:predicate xmlns:ns0="http://example.org/" xml:lang="en">An example</ns0:predicate> </rdf:Description> </rdf:RDF>
Send RDF Triples to serializer Once the serializer has been started, RDF triples can be sent to it via the raptor_serializer_serialize_statement() function with a raptor_statement value. Once all triples are sent, the serializing must be finished with a call to raptor_serializer_serialize_end(). In particular, only at this point does the raptor_iostream get flushed or any string constructed for raptor_serializer_start_to_string(). /* start the serializing somehow */ while( /* got RDF triples */ ) { raptor_serializer_serialize_statement(rdf_serializer, triple); } raptor_serializer_serialize_end(rdf_serializer); /* now can use the serializing result (FILE, string, raptor_iostream) */
Querying serializer run-time information raptor_serializer_get_iostream() gets the current serializer's raptor_iostream. raptor_serializer_get_locator() returns the raptor_locator for the current position in the output stream. The locator structure contains full information on the details of where in the file or URI the current serializer has reached.
Destroy the serializer To tidy up, delete the serializer object as follows: raptor_free_serializer(rdf_serializer);
Serializing example code <filename>rdfcat.c</filename>: Read any RDF syntax and serialize to RDF/XML (Abbreviated) Compile it like this: $ gcc -o rdfcat rdfcat.c `pkg-config raptor2 --cflags --libs` and run it on an RDF file as: $ ./rdfcat raptor.rdf <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://usefulinc.com/ns/doap#"> <rdf:Description rdf:about=""> <foaf:maker> <foaf:Person> <foaf:name>Dave Beckett</foaf:name> ...
raptor2-2.0.15/docs/upgrade-script.pl0000644000175000017500000012472712425344320014343 00000000000000#!/usr/bin/perl -pi~ # Perl script to upgrade raptor2 1.4.21 to 2.0.0 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->predicate_type|->predicate.type|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions s|^(.*raptor_compare_strings.*)$|/\* WARNING: raptor_compare_strings - deleted. Trivial utility function removed. \*/ $1|g; s|^(.*raptor_copy_identifier.*)$|/\* WARNING: raptor_copy_identifier - deleted. Use raptor_term_copy() with #raptor_term objects. \*/ $1|g; s|^(.*raptor_error_handlers_init.*)$|/\* WARNING: raptor_error_handlers_init - deleted. Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() \*/ $1|g; s|^(.*raptor_error_handlers_init_v2.*)$|/\* WARNING: raptor_error_handlers_init_v2 - deleted. Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() \*/ $1|g; s|^(.*raptor_feature_value_type.*)$|/\* WARNING: raptor_feature_value_type - deleted. Use raptor_world_get_option_description() for the option and access the value_type field. \*/ $1|g; s|^(.*raptor_finish.*)$|/\* WARNING: raptor_finish - deleted. Use raptor_free_world() with #raptor_world object. \*/ $1|g; s|^(.*raptor_free_identifier.*)$|/\* WARNING: raptor_free_identifier - deleted. Use raptor_free_term() with #raptor_term objects. \*/ $1|g; s|^(.*raptor_init.*)$|/\* WARNING: raptor_init - deleted. Use raptor_new_world() to create a new #raptor_world object. \*/ $1|g; s|^(.*raptor_iostream_get_bytes_written_count.*)$|/\* WARNING: raptor_iostream_get_bytes_written_count - deleted. Deprecated for raptor_iostream_tell(). \*/ $1|g; s|^(.*raptor_iostream_write_string_turtle.*)$|/\* WARNING: raptor_iostream_write_string_turtle - deleted. Deprecated for raptor_string_python_write(). \*/ $1|g; s|^(.*raptor_new_identifier.*)$|/\* WARNING: raptor_new_identifier - deleted. Replaced by raptor_new_term_from_blank(), raptor_new_term_from_literal() or raptor_new_term_from_blank() and #raptor_term class. \*/ $1|g; s|^(.*raptor_new_identifier_v2.*)$|/\* WARNING: raptor_new_identifier_v2 - deleted. Replaced by raptor_new_term_from_blank(), raptor_new_term_from_literal() or raptor_new_term_from_blank() and #raptor_term class. \*/ $1|g; s|^(.*raptor_ntriples_string_as_utf8_string.*)$|/\* WARNING: raptor_ntriples_string_as_utf8_string - deleted. Deprecated internal debug function. \*/ $1|g; s|^(.*raptor_ntriples_term_as_string.*)$|/\* WARNING: raptor_ntriples_term_as_string - deleted. Deprecated internal debug function. \*/ $1|g; s|^(.*raptor_print_ntriples_string.*)$|/\* WARNING: raptor_print_ntriples_string - deleted. Use raptor_string_ntriples_write() with a #raptor_iostream \*/ $1|g; s|^(.*raptor_print_statement_detailed.*)$|/\* WARNING: raptor_print_statement_detailed - deleted. Deprecated internal function. \*/ $1|g; s|^(.*raptor_sequence_print_string.*)$|/\* WARNING: raptor_sequence_print_string - deleted. Trivial utility function removed. \*/ $1|g; s|^(.*raptor_sequence_print_uri.*)$|/\* WARNING: raptor_sequence_print_uri - deleted. Deprecated for raptor_uri_print() \*/ $1|g; s|^(.*raptor_sequence_set_print_handler.*)$|/\* WARNING: raptor_sequence_set_print_handler - deleted. Use the argument in the raptor_new_sequence() constructor instead. \*/ $1|g; s|^(.*raptor_sequence_set_print_handler_v2.*)$|/\* WARNING: raptor_sequence_set_print_handler_v2 - deleted. Use the argument in the raptor_new_sequence() constructor instead. \*/ $1|g; s|^(.*raptor_serializer_set_error_handler.*)$|/\* WARNING: raptor_serializer_set_error_handler - deleted. Replaced by raptor_world_set_log_handler() on the #raptor_world object. \*/ $1|g; s|^(.*raptor_serializer_set_warning_handler.*)$|/\* WARNING: raptor_serializer_set_warning_handler - deleted. Replaced by raptor_world_set_log_handler() on the #raptor_world object. \*/ $1|g; s|^(.*raptor_set_error_handler.*)$|/\* WARNING: raptor_set_error_handler - deleted. Replaced by raptor_world_set_log_handler() on the #raptor_world object. \*/ $1|g; s|^(.*raptor_set_fatal_error_handler.*)$|/\* WARNING: raptor_set_fatal_error_handler - deleted. Replaced by raptor_world_set_log_handler() on the #raptor_world object. \*/ $1|g; s|^(.*raptor_set_parser_strict.*)$|/\* WARNING: raptor_set_parser_strict - deleted. Replaced by raptor_parser_set_option() with option RAPTOR_OPTION_STRICT \*/ $1|g; s|^(.*raptor_set_warning_handler.*)$|/\* WARNING: raptor_set_warning_handler - deleted. Replaced by raptor_world_set_log_handler() on the #raptor_world object. \*/ $1|g; s|^(.*raptor_statement_part_as_counted_string.*)$|/\* WARNING: raptor_statement_part_as_counted_string - deleted. Better done via methods of #raptor_term class such as raptor_term_to_counted_string(). \*/ $1|g; s|^(.*raptor_statement_part_as_counted_string_v2.*)$|/\* WARNING: raptor_statement_part_as_counted_string_v2 - deleted. Better done via methods of #raptor_term class such as raptor_term_to_counted_string(). \*/ $1|g; s|^(.*raptor_statement_part_as_string.*)$|/\* WARNING: raptor_statement_part_as_string - deleted. Better done via methods of #raptor_term class such as raptor_term_to_string(). \*/ $1|g; s|^(.*raptor_statement_part_as_string_v2.*)$|/\* WARNING: raptor_statement_part_as_string_v2 - deleted. Better done via methods of #raptor_term class such as raptor_term_to_string(). \*/ $1|g; s|^(.*raptor_uri_get_handler.*)$|/\* WARNING: raptor_uri_get_handler - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_get_handler_v2.*)$|/\* WARNING: raptor_uri_get_handler_v2 - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_set_handler.*)$|/\* WARNING: raptor_uri_set_handler - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_set_handler_v2.*)$|/\* WARNING: raptor_uri_set_handler_v2 - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_www_finish.*)$|/\* WARNING: raptor_www_finish - deleted. No need for this to be public. \*/ $1|g; s|^(.*raptor_www_finish_v2.*)$|/\* WARNING: raptor_www_finish_v2 - deleted. No need for this to be public. \*/ $1|g; s|^(.*raptor_www_init.*)$|/\* WARNING: raptor_www_init - deleted. No need for this to be public. \*/ $1|g; s|^(.*raptor_www_init_v2.*)$|/\* WARNING: raptor_www_init_v2 - deleted. No need for this to be public. \*/ $1|g; s|^(.*raptor_www_no_www_library_init_finish.*)$|/\* WARNING: raptor_www_no_www_library_init_finish - deleted. Deprecated for raptor_world_set_flag(). \*/ $1|g; s|^(.*raptor_www_no_www_library_init_finish_v2.*)$|/\* WARNING: raptor_www_no_www_library_init_finish_v2 - deleted. Deprecated for raptor_world_set_flag(). \*/ $1|g; s|^(.*raptor_www_set_error_handler.*)$|/\* WARNING: raptor_www_set_error_handler - deleted. Replaced by raptor_world_set_log_handler() on the #raptor_world object. \*/ $1|g; # Deleted types s|^(.*raptor_error_handlers.*)$|/\* WARNING: raptor_error_handlers - deleted. Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() \*/ $1|g; s|^(.*raptor_free_uri_func.*)$|/\* WARNING: raptor_free_uri_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_libxml_flags.*)$|/\* WARNING: raptor_libxml_flags - deleted. replaced by raptor_world_set_flags() with #raptor_world_flag \*/ $1|g; s|^(.*raptor_message_handler.*)$|/\* WARNING: raptor_message_handler - deleted. Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() \*/ $1|g; s|^(.*raptor_message_handler_closure.*)$|/\* WARNING: raptor_message_handler_closure - deleted. Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() \*/ $1|g; s|^(.*raptor_new_uri_for_rdf_concept_func.*)$|/\* WARNING: raptor_new_uri_for_rdf_concept_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_new_uri_from_uri_local_name_func.*)$|/\* WARNING: raptor_new_uri_from_uri_local_name_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_new_uri_func.*)$|/\* WARNING: raptor_new_uri_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_new_uri_relative_to_base_func.*)$|/\* WARNING: raptor_new_uri_relative_to_base_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_ntriples_parser.*)$|/\* WARNING: raptor_ntriples_parser - deleted. replaced by #raptor_parser \*/ $1|g; s|^(.*raptor_ntriples_term_type.*)$|/\* WARNING: raptor_ntriples_term_type - deleted. replaced by #raptor_term_type \*/ $1|g; s|^(.*raptor_uri_as_counted_string_func.*)$|/\* WARNING: raptor_uri_as_counted_string_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_as_string_func.*)$|/\* WARNING: raptor_uri_as_string_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_compare_func.*)$|/\* WARNING: raptor_uri_compare_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_copy_func.*)$|/\* WARNING: raptor_uri_copy_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_equals_func.*)$|/\* WARNING: raptor_uri_equals_func - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_handler.*)$|/\* WARNING: raptor_uri_handler - deleted. Entire URI implementation is internal and not replaceable. \*/ $1|g; s|^(.*raptor_uri_source.*)$|/\* WARNING: raptor_uri_source - deleted. URI source was useless. \*/ $1|g; # Deleted enums s|^(.*RAPTOR_IDENTIFIER_TYPE_ORDINAL.*)$|/\* WARNING: RAPTOR_IDENTIFIER_TYPE_ORDINAL - deleted. Deprecated value deleted. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_UNKNOWN.*)$|/\* WARNING: RAPTOR_URI_SOURCE_UNKNOWN - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_NOT_URI.*)$|/\* WARNING: RAPTOR_URI_SOURCE_NOT_URI - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_ELEMENT.*)$|/\* WARNING: RAPTOR_URI_SOURCE_ELEMENT - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_ATTRIBUTE.*)$|/\* WARNING: RAPTOR_URI_SOURCE_ATTRIBUTE - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_ID.*)$|/\* WARNING: RAPTOR_URI_SOURCE_ID - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_URI.*)$|/\* WARNING: RAPTOR_URI_SOURCE_URI - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_GENERATED.*)$|/\* WARNING: RAPTOR_URI_SOURCE_GENERATED - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_URI_SOURCE_BLANK_ID.*)$|/\* WARNING: RAPTOR_URI_SOURCE_BLANK_ID - deleted. URI source concept removed. \*/ $1|g; s|^(.*RAPTOR_FEATURE_ASSUME_IS_RDF.*)$|/\* WARNING: RAPTOR_FEATURE_ASSUME_IS_RDF - deleted. Never used. \*/ $1|g; s|^(.*RAPTOR_FEATURE_START_URI.*)$|/\* WARNING: RAPTOR_FEATURE_START_URI - deleted. Never used. \*/ $1|g; s|^(.*RAPTOR_GENID_TYPE_BNODEID.*)$|/\* WARNING: RAPTOR_GENID_TYPE_BNODEID - deleted. There is just one type of generated ID now. \*/ $1|g; s|^(.*RAPTOR_GENID_TYPE_BAGID.*)$|/\* WARNING: RAPTOR_GENID_TYPE_BAGID - deleted. There is just one type of generated ID now. \*/ $1|g; # Renamed functions s|raptor_format_locator\(|raptor_locator_format\(|g; s|raptor_get_feature_count\(|raptor_option_get_count\(|g; s|raptor_get_locator\(|raptor_parser_get_locator\(|g; s|raptor_get_name\(|raptor_parser_get_name\(|g; s|raptor_guess_parser_name_v2\(|raptor_world_guess_parser_name\(|g; s|raptor_namespace_copy\(|raptor_namespace_stack_start_namespace\(|g; s|raptor_namespaces_format\(|raptor_namespace_format_as_xml\(|g; s|raptor_namespaces_qname_from_uri\(|raptor_new_qname_from_namespace_uri\(|g; s|raptor_new_namespace_parts_from_string\(|raptor_xml_namespace_string_parse\(|g; s|raptor_new_parser_for_content_v2\(|raptor_new_parser_for_content\(|g; s|raptor_new_parser_v2\(|raptor_new_parser\(|g; s|raptor_new_qname_from_namespace_local_name_v2\(|raptor_new_qname_from_namespace_local_name\(|g; s|raptor_new_serializer_v2\(|raptor_new_serializer\(|g; s|raptor_new_uri_from_id_v2\(|raptor_new_uri_from_id\(|g; s|raptor_new_uri_from_uri_local_name_v2\(|raptor_new_uri_from_uri_local_name\(|g; s|raptor_new_uri_relative_to_base_v2\(|raptor_new_uri_relative_to_base\(|g; s|raptor_new_uri_v2\(|raptor_new_uri\(|g; s|raptor_parse_abort\(|raptor_parser_parse_abort\(|g; s|raptor_parse_chunk\(|raptor_parser_parse_chunk\(|g; s|raptor_parse_file\(|raptor_parser_parse_file\(|g; s|raptor_parse_file_stream\(|raptor_parser_parse_file_stream\(|g; s|raptor_parse_uri\(|raptor_parser_parse_uri\(|g; s|raptor_parse_uri_with_connection\(|raptor_parser_parse_uri_with_connection\(|g; s|raptor_serialize_end\(|raptor_serializer_serialize_end\(|g; s|raptor_serialize_set_namespace\(|raptor_serializer_set_namespace\(|g; s|raptor_serialize_set_namespace_from_namespace\(|raptor_serializer_set_namespace_from_namespace\(|g; s|raptor_serialize_start\(|raptor_serializer_start_to_iostream\(|g; s|raptor_serialize_start_to_file_handle\(|raptor_serializer_start_to_file_handle\(|g; s|raptor_serialize_start_to_filename\(|raptor_serializer_start_to_filename\(|g; s|raptor_serialize_start_to_iostream\(|raptor_serializer_start_to_iostream\(|g; s|raptor_serialize_start_to_string\(|raptor_serializer_start_to_string\(|g; s|raptor_serializer_syntax_name_check_v2\(|raptor_world_is_serializer_name\(|g; s|raptor_set_namespace_handler\(|raptor_parser_set_namespace_handler\(|g; s|raptor_set_statement_handler\(|raptor_parser_set_statement_handler\(|g; s|raptor_start_parse\(|raptor_parser_parse_start\(|g; s|raptor_uri_is_file_uri\(|raptor_uri_uri_string_is_file_uri\(|g; s|raptor_utf8_check\(|raptor_unicode_check_utf8_string\(|g; s|raptor_www_free\(|raptor_free_www\(|g; s|raptor_www_new_v2\(|raptor_new_www\(|g; s|raptor_www_new_with_connection_v2\(|raptor_new_www_with_connection\(|g; # Renamed enums s|RAPTOR_IDENTIFIER_TYPE_UNKNOWN|RAPTOR_TERM_TYPE_UNKNOWN|g; s|RAPTOR_IDENTIFIER_TYPE_RESOURCE|RAPTOR_TERM_TYPE_URI|g; s|RAPTOR_IDENTIFIER_TYPE_ANONYMOUS|RAPTOR_TERM_TYPE_BLANK|g; s|RAPTOR_IDENTIFIER_TYPE_PREDICATE|RAPTOR_TERM_TYPE_URI|g; s|RAPTOR_IDENTIFIER_TYPE_LITERAL|RAPTOR_TERM_TYPE_LITERAL|g; s|RAPTOR_IDENTIFIER_TYPE_XML_LITERAL|RAPTOR_TERM_TYPE_LITERAL|g; s|RAPTOR_NTRIPLES_TERM_TYPE_URI_REF|RAPTOR_TERM_TYPE_URI|g; s|RAPTOR_NTRIPLES_TERM_TYPE_BLANK_NODE|RAPTOR_TERM_TYPE_BLANK|g; s|RAPTOR_NTRIPLES_TERM_TYPE_LITERAL|RAPTOR_TERM_TYPE_LITERAL|g; s|RAPTOR_FEATURE_SCANNING |RAPTOR_OPTION_SCANNING|g; s|RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES|RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES|g; s|RAPTOR_FEATURE_ALLOW_OTHER_PARSETYPES|RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES|g; s|RAPTOR_FEATURE_ALLOW_BAGID|RAPTOR_OPTION_ALLOW_BAGID|g; s|RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST|RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST|g; s|RAPTOR_FEATURE_NORMALIZE_LANGUAGE|RAPTOR_OPTION_NORMALIZE_LANGUAGE|g; s|RAPTOR_FEATURE_NON_NFC_FATAL|RAPTOR_OPTION_NON_NFC_FATAL|g; s|RAPTOR_FEATURE_WARN_OTHER_PARSETYPES|RAPTOR_OPTION_WARN_OTHER_PARSETYPES|g; s|RAPTOR_FEATURE_CHECK_RDF_ID|RAPTOR_OPTION_CHECK_RDF_ID|g; s|RAPTOR_FEATURE_RELATIVE_URIS|RAPTOR_OPTION_RELATIVE_URIS|g; s|RAPTOR_FEATURE_WRITER_AUTO_INDENT|RAPTOR_OPTION_WRITER_AUTO_INDENT|g; s|RAPTOR_FEATURE_WRITER_AUTO_EMPTY|RAPTOR_OPTION_WRITER_AUTO_EMPTY|g; s|RAPTOR_FEATURE_WRITER_INDENT_WIDTH|RAPTOR_OPTION_WRITER_INDENT_WIDTH|g; s|RAPTOR_FEATURE_WRITER_XML_VERSION|RAPTOR_OPTION_WRITER_XML_VERSION|g; s|RAPTOR_FEATURE_WRITER_XML_DECLARATION|RAPTOR_OPTION_WRITER_XML_DECLARATION|g; s|RAPTOR_FEATURE_NO_NET|RAPTOR_OPTION_NO_NET|g; s|RAPTOR_FEATURE_RESOURCE_BORDER|RAPTOR_OPTION_RESOURCE_BORDER|g; s|RAPTOR_FEATURE_LITERAL_BORDER|RAPTOR_OPTION_LITERAL_BORDER|g; s|RAPTOR_FEATURE_BNODE_BORDER|RAPTOR_OPTION_BNODE_BORDER|g; s|RAPTOR_FEATURE_RESOURCE_FILL|RAPTOR_OPTION_RESOURCE_FILL|g; s|RAPTOR_FEATURE_LITERAL_FILL|RAPTOR_OPTION_LITERAL_FILL|g; s|RAPTOR_FEATURE_BNODE_FILL|RAPTOR_OPTION_BNODE_FILL|g; s|RAPTOR_FEATURE_HTML_TAG_SOUP|RAPTOR_OPTION_HTML_TAG_SOUP|g; s|RAPTOR_FEATURE_MICROFORMATS|RAPTOR_OPTION_MICROFORMATS|g; s|RAPTOR_FEATURE_HTML_LINK|RAPTOR_OPTION_HTML_LINK|g; s|RAPTOR_FEATURE_WWW_TIMEOUT|RAPTOR_OPTION_WWW_TIMEOUT|g; s|RAPTOR_FEATURE_WRITE_BASE_URI|RAPTOR_OPTION_WRITE_BASE_URI|g; s|RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL|RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL|g; s|RAPTOR_FEATURE_WWW_HTTP_USER_AGENT|RAPTOR_OPTION_WWW_HTTP_USER_AGENT|g; s|RAPTOR_FEATURE_JSON_CALLBACK|RAPTOR_OPTION_JSON_CALLBACK|g; s|RAPTOR_FEATURE_JSON_EXTRA_DATA|RAPTOR_OPTION_JSON_EXTRA_DATA|g; s|RAPTOR_FEATURE_RSS_TRIPLES|RAPTOR_OPTION_RSS_TRIPLES|g; s|RAPTOR_FEATURE_ATOM_ENTRY_URI|RAPTOR_OPTION_ATOM_ENTRY_URI|g; s|RAPTOR_FEATURE_PREFIX_ELEMENTS|RAPTOR_OPTION_PREFIX_ELEMENTS|g; s|RAPTOR_FEATURE_LAST|RAPTOR_OPTION_LAST|g; s|RAPTOR_LOG_LEVEL_WARNING|RAPTOR_LOG_LEVEL_WARN|g; s|RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE|RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE|g; s|RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE|RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE|g; # Changed functions s|^(.*)(raptor_feature_from_uri)(.*)$|/\* WARNING: raptor_feature_from_uri. \*/ ${1}raptor_world_get_option_from_uri${3}|g; s|^(.*)(raptor_feature_from_uri_v2)(.*)$|/\* WARNING: raptor_feature_from_uri_v2. \*/ ${1}raptor_world_get_option_from_uri${3}|g; s|^(.*)(raptor_features_enumerate)(.*)$|/\* WARNING: raptor_features_enumerate. Call with domain = RAPTOR_DOMAIN_PARSER \*/ ${1}raptor_world_get_option_description${3}|g; s|^(.*)(raptor_features_enumerate_v2)(.*)$|/\* WARNING: raptor_features_enumerate_v2. Call with domain = RAPTOR_DOMAIN_PARSER \*/ ${1}raptor_world_get_option_description${3}|g; s|^(.*)(raptor_format_locator_v2)(.*)$|/\* WARNING: raptor_format_locator_v2. \*/ ${1}raptor_locator_format${3}|g; s|^(.*)(raptor_free_uri_v2)(.*)$|/\* WARNING: raptor_free_uri_v2. \*/ ${1}raptor_free_uri${3}|g; s|^(.*)(raptor_get_feature)(.*)$|/\* WARNING: raptor_get_feature. \*/ ${1}raptor_parser_get_option${3}|g; s|^(.*)(raptor_get_label)(.*)$|/\* WARNING: raptor_get_label. Use label field of returned description. \*/ ${1}raptor_parser_get_description${3}|g; s|^(.*)(raptor_get_mime_type)(.*)$|/\* WARNING: raptor_get_mime_type. Use the mime_types array field of returned #raptor_syntax_description \*/ ${1}raptor_parser_get_description${3}|g; s|^(.*)(raptor_get_need_base_uri)(.*)$|/\* WARNING: raptor_get_need_base_uri. Use the #RAPTOR_SYNTAX_NEED_BASE_URI bitflag in the flags field of the returned #raptor_syntax_description \*/ ${1}raptor_parser_get_description${3}|g; s|^(.*)(raptor_guess_parser_name)(.*)$|/\* WARNING: raptor_guess_parser_name. \*/ ${1}raptor_world_guess_parser_name${3}|g; s|^(.*)(raptor_iostream_format_hexadecimal)(.*)$|/\* WARNING: raptor_iostream_format_hexadecimal. \*/ ${1}raptor_iostream_hexadecimal_write${3}|g; s|^(.*)(raptor_iostream_read_bytes)(.*)$|/\* WARNING: raptor_iostream_read_bytes. \*/ ${1}raptor_iostream_read_bytes${3}|g; s|^(.*)(raptor_iostream_write_byte)(.*)$|/\* WARNING: raptor_iostream_write_byte. \*/ ${1}raptor_iostream_write_byte${3}|g; s|^(.*)(raptor_iostream_write_bytes)(.*)$|/\* WARNING: raptor_iostream_write_bytes. \*/ ${1}raptor_iostream_write_bytes${3}|g; s|^(.*)(raptor_iostream_write_counted_string)(.*)$|/\* WARNING: raptor_iostream_write_counted_string. \*/ ${1}raptor_iostream_counted_string_write${3}|g; s|^(.*)(raptor_iostream_write_decimal)(.*)$|/\* WARNING: raptor_iostream_write_decimal. \*/ ${1}raptor_iostream_decimal_write${3}|g; s|^(.*)(raptor_iostream_write_end)(.*)$|/\* WARNING: raptor_iostream_write_end. \*/ ${1}raptor_iostream_write_end${3}|g; s|^(.*)(raptor_iostream_write_namespace)(.*)$|/\* WARNING: raptor_iostream_write_namespace. \*/ ${1}raptor_namespace_write${3}|g; s|^(.*)(raptor_iostream_write_qname)(.*)$|/\* WARNING: raptor_iostream_write_qname. \*/ ${1}raptor_qname_write${3}|g; s|^(.*)(raptor_iostream_write_statement_ntriples)(.*)$|/\* WARNING: raptor_iostream_write_statement_ntriples. Gains extra flag arg to decide whether to write any graph term. \*/ ${1}raptor_statement_ntriples_write${3}|g; s|^(.*)(raptor_iostream_write_string)(.*)$|/\* WARNING: raptor_iostream_write_string. \*/ ${1}raptor_iostream_string_write${3}|g; s|^(.*)(raptor_iostream_write_string_ntriples)(.*)$|/\* WARNING: raptor_iostream_write_string_ntriples. \*/ ${1}raptor_string_ntriples_write${3}|g; s|^(.*)(raptor_iostream_write_string_python)(.*)$|/\* WARNING: raptor_iostream_write_string_python. \*/ ${1}raptor_string_python_write${3}|g; s|^(.*)(raptor_iostream_write_stringbuffer)(.*)$|/\* WARNING: raptor_iostream_write_stringbuffer. \*/ ${1}raptor_stringbuffer_write${3}|g; s|^(.*)(raptor_iostream_write_uri)(.*)$|/\* WARNING: raptor_iostream_write_uri. \*/ ${1}raptor_uri_write${3}|g; s|^(.*)(raptor_iostream_write_uri_v2)(.*)$|/\* WARNING: raptor_iostream_write_uri_v2. \*/ ${1}raptor_uri_write${3}|g; s|^(.*)(raptor_iostream_write_xml_any_escaped_string)(.*)$|/\* WARNING: raptor_iostream_write_xml_any_escaped_string. \*/ ${1}raptor_xml_escape_string_any_write${3}|g; s|^(.*)(raptor_iostream_write_xml_element)(.*)$|/\* WARNING: raptor_iostream_write_xml_element. \*/ ${1}raptor_xml_element_write${3}|g; s|^(.*)(raptor_iostream_write_xml_escaped_string)(.*)$|/\* WARNING: raptor_iostream_write_xml_escaped_string. \*/ ${1}raptor_xml_escape_string_write${3}|g; s|^(.*)(raptor_locator_uri_v2)(.*)$|/\* WARNING: raptor_locator_uri_v2. \*/ ${1}raptor_locator_uri${3}|g; s|^(.*)(raptor_namespaces_init)(.*)$|/\* WARNING: raptor_namespaces_init. \*/ ${1}raptor_namespaces_init${3}|g; s|^(.*)(raptor_namespaces_init_v2)(.*)$|/\* WARNING: raptor_namespaces_init_v2. \*/ ${1}raptor_namespaces_init${3}|g; s|^(.*)(raptor_new_iostream_from_file_handle)(.*)$|/\* WARNING: raptor_new_iostream_from_file_handle. \*/ ${1}raptor_new_iostream_from_file_handle${3}|g; s|^(.*)(raptor_new_iostream_from_filename)(.*)$|/\* WARNING: raptor_new_iostream_from_filename. \*/ ${1}raptor_new_iostream_from_filename${3}|g; s|^(.*)(raptor_new_iostream_from_handler)(.*)$|/\* WARNING: raptor_new_iostream_from_handler. \*/ ${1}raptor_new_iostream_from_handler${3}|g; s|^(.*)(raptor_new_iostream_from_handler2)(.*)$|/\* WARNING: raptor_new_iostream_from_handler2. \*/ ${1}raptor_new_iostream_from_handler${3}|g; s|^(.*)(raptor_new_iostream_from_sink)(.*)$|/\* WARNING: raptor_new_iostream_from_sink. \*/ ${1}raptor_new_iostream_from_sink${3}|g; s|^(.*)(raptor_new_iostream_from_string)(.*)$|/\* WARNING: raptor_new_iostream_from_string. \*/ ${1}raptor_new_iostream_from_string${3}|g; s|^(.*)(raptor_new_iostream_to_file_handle)(.*)$|/\* WARNING: raptor_new_iostream_to_file_handle. \*/ ${1}raptor_new_iostream_to_file_handle${3}|g; s|^(.*)(raptor_new_iostream_to_filename)(.*)$|/\* WARNING: raptor_new_iostream_to_filename. \*/ ${1}raptor_new_iostream_to_filename${3}|g; s|^(.*)(raptor_new_iostream_to_sink)(.*)$|/\* WARNING: raptor_new_iostream_to_sink. \*/ ${1}raptor_new_iostream_to_sink${3}|g; s|^(.*)(raptor_new_iostream_to_string)(.*)$|/\* WARNING: raptor_new_iostream_to_string. \*/ ${1}raptor_new_iostream_to_string${3}|g; s|^(.*)(raptor_new_namespaces)(.*)$|/\* WARNING: raptor_new_namespaces. \*/ ${1}raptor_new_namespaces${3}|g; s|^(.*)(raptor_new_namespaces_v2)(.*)$|/\* WARNING: raptor_new_namespaces_v2. \*/ ${1}raptor_new_namespaces${3}|g; s|^(.*)(raptor_new_parser)(.*)$|/\* WARNING: raptor_new_parser. \*/ ${1}raptor_new_parser${3}|g; s|^(.*)(raptor_new_parser_for_content)(.*)$|/\* WARNING: raptor_new_parser_for_content. \*/ ${1}raptor_new_parser_for_content${3}|g; s|^(.*)(raptor_new_qname)(.*)$|/\* WARNING: raptor_new_qname. \*/ ${1}raptor_new_qname${3}|g; s|^(.*)(raptor_new_qname_from_namespace_local_name)(.*)$|/\* WARNING: raptor_new_qname_from_namespace_local_name. \*/ ${1}raptor_new_qname_from_namespace_local_name${3}|g; s|^(.*)(raptor_new_sax2)(.*)$|/\* WARNING: raptor_new_sax2. \*/ ${1}raptor_new_sax2${3}|g; s|^(.*)(raptor_new_sequence)(.*)$|/\* WARNING: raptor_new_sequence. \*/ ${1}raptor_new_sequence${3}|g; s|^(.*)(raptor_new_sequence_v2)(.*)$|/\* WARNING: raptor_new_sequence_v2. \*/ ${1}raptor_new_sequence${3}|g; s|^(.*)(raptor_new_serializer)(.*)$|/\* WARNING: raptor_new_serializer. \*/ ${1}raptor_new_serializer${3}|g; s|^(.*)(raptor_new_uri)(.*)$|/\* WARNING: raptor_new_uri. \*/ ${1}raptor_new_uri${3}|g; s|^(.*)(raptor_new_uri_for_rdf_concept)(.*)$|/\* WARNING: raptor_new_uri_for_rdf_concept. \*/ ${1}raptor_new_uri_for_rdf_concept${3}|g; s|^(.*)(raptor_new_uri_for_rdf_concept_v2)(.*)$|/\* WARNING: raptor_new_uri_for_rdf_concept_v2. \*/ ${1}raptor_new_uri_for_rdf_concept${3}|g; s|^(.*)(raptor_new_uri_for_retrieval_v2)(.*)$|/\* WARNING: raptor_new_uri_for_retrieval_v2. \*/ ${1}raptor_new_uri_for_retrieval${3}|g; s|^(.*)(raptor_new_uri_for_xmlbase_v2)(.*)$|/\* WARNING: raptor_new_uri_for_xmlbase_v2. \*/ ${1}raptor_new_uri_for_xmlbase${3}|g; s|^(.*)(raptor_new_uri_from_id)(.*)$|/\* WARNING: raptor_new_uri_from_id. \*/ ${1}raptor_new_uri_from_id${3}|g; s|^(.*)(raptor_new_uri_from_uri_local_name)(.*)$|/\* WARNING: raptor_new_uri_from_uri_local_name. \*/ ${1}raptor_new_uri_from_uri_local_name${3}|g; s|^(.*)(raptor_new_uri_relative_to_base)(.*)$|/\* WARNING: raptor_new_uri_relative_to_base. \*/ ${1}raptor_new_uri_relative_to_base${3}|g; s|^(.*)(raptor_new_xml_writer)(.*)$|/\* WARNING: raptor_new_xml_writer. \*/ ${1}raptor_new_xml_writer${3}|g; s|^(.*)(raptor_new_xml_writer_v2)(.*)$|/\* WARNING: raptor_new_xml_writer_v2. \*/ ${1}raptor_new_xml_writer${3}|g; s|^(.*)(raptor_parser_get_feature_string)(.*)$|/\* WARNING: raptor_parser_get_feature_string. \*/ ${1}raptor_parser_get_option${3}|g; s|^(.*)(raptor_parser_set_feature_string)(.*)$|/\* WARNING: raptor_parser_set_feature_string. \*/ ${1}raptor_parser_set_option${3}|g; s|^(.*)(raptor_parsers_enumerate)(.*)$|/\* WARNING: raptor_parsers_enumerate. \*/ ${1}raptor_world_get_parser_description${3}|g; s|^(.*)(raptor_parsers_enumerate_v2)(.*)$|/\* WARNING: raptor_parsers_enumerate_v2. \*/ ${1}raptor_world_get_parser_description${3}|g; s|^(.*)(raptor_print_locator)(.*)$|/\* WARNING: raptor_print_locator. \*/ ${1}raptor_locator_print${3}|g; s|^(.*)(raptor_print_locator_v2)(.*)$|/\* WARNING: raptor_print_locator_v2. \*/ ${1}raptor_locator_print${3}|g; s|^(.*)(raptor_print_statement)(.*)$|/\* WARNING: raptor_print_statement. \*/ ${1}raptor_statement_print${3}|g; s|^(.*)(raptor_print_statement_as_ntriples)(.*)$|/\* WARNING: raptor_print_statement_as_ntriples. \*/ ${1}raptor_statement_print_as_ntriples${3}|g; s|^(.*)(raptor_print_statement_as_ntriples_v2)(.*)$|/\* WARNING: raptor_print_statement_as_ntriples_v2. \*/ ${1}raptor_statement_print_as_ntriples${3}|g; s|^(.*)(raptor_print_statement_v2)(.*)$|/\* WARNING: raptor_print_statement_v2. \*/ ${1}raptor_statement_print${3}|g; s|^(.*)(raptor_qname_string_to_uri)(.*)$|/\* WARNING: raptor_qname_string_to_uri. \*/ ${1}raptor_qname_string_to_uri${3}|g; s|^(.*)(raptor_sequence_print)(.*)$|/\* WARNING: raptor_sequence_print. \*/ ${1}raptor_sequence_print${3}|g; s|^(.*)(raptor_sequence_sort)(.*)$|/\* WARNING: raptor_sequence_sort. \*/ ${1}raptor_sequence_sort${3}|g; s|^(.*)(raptor_serialize_statement)(.*)$|/\* WARNING: raptor_serialize_statement. \*/ ${1}raptor_serializer_serialize_statement${3}|g; s|^(.*)(raptor_serializer_features_enumerate)(.*)$|/\* WARNING: raptor_serializer_features_enumerate. Call with domain = RAPTOR_DOMAIN_SERIALIZER \*/ ${1}raptor_world_get_option_description${3}|g; s|^(.*)(raptor_serializer_features_enumerate_v2)(.*)$|/\* WARNING: raptor_serializer_features_enumerate_v2. Call with domain = RAPTOR_DOMAIN_SERIALIZER \*/ ${1}raptor_world_get_option_description${3}|g; s|^(.*)(raptor_serializer_get_feature)(.*)$|/\* WARNING: raptor_serializer_get_feature. \*/ ${1}raptor_serializer_get_option${3}|g; s|^(.*)(raptor_serializer_get_feature_string)(.*)$|/\* WARNING: raptor_serializer_get_feature_string. \*/ ${1}raptor_serializer_get_option${3}|g; s|^(.*)(raptor_serializer_set_feature)(.*)$|/\* WARNING: raptor_serializer_set_feature. \*/ ${1}raptor_serializer_set_option${3}|g; s|^(.*)(raptor_serializer_set_feature_string)(.*)$|/\* WARNING: raptor_serializer_set_feature_string. \*/ ${1}raptor_serializer_set_option${3}|g; s|^(.*)(raptor_serializer_syntax_name_check)(.*)$|/\* WARNING: raptor_serializer_syntax_name_check. \*/ ${1}raptor_world_is_serializer_name${3}|g; s|^(.*)(raptor_serializers_enumerate)(.*)$|/\* WARNING: raptor_serializers_enumerate. \*/ ${1}raptor_world_get_serializer_description${3}|g; s|^(.*)(raptor_serializers_enumerate_v2)(.*)$|/\* WARNING: raptor_serializers_enumerate_v2. \*/ ${1}raptor_world_get_serializer_description${3}|g; s|^(.*)(raptor_set_default_generate_id_parameters)(.*)$|/\* WARNING: raptor_set_default_generate_id_parameters. \*/ ${1}raptor_world_set_generate_bnodeid_parameters${3}|g; s|^(.*)(raptor_set_feature)(.*)$|/\* WARNING: raptor_set_feature. \*/ ${1}raptor_parser_set_option${3}|g; s|^(.*)(raptor_set_generate_id_handler)(.*)$|/\* WARNING: raptor_set_generate_id_handler. \*/ ${1}raptor_world_set_generate_bnodeid_handler${3}|g; s|^(.*)(raptor_set_graph_handler)(.*)$|/\* WARNING: raptor_set_graph_handler. \*/ ${1}raptor_parser_set_graph_mark_handler${3}|g; s|^(.*)(raptor_set_libxslt_security_preferences)(.*)$|/\* WARNING: raptor_set_libxslt_security_preferences. \*/ ${1}raptor_world_set_libxslt_security_preferences${3}|g; s|^(.*)(raptor_statement_compare_v2)(.*)$|/\* WARNING: raptor_statement_compare_v2. \*/ ${1}raptor_statement_compare${3}|g; s|^(.*)(raptor_syntax_name_check)(.*)$|/\* WARNING: raptor_syntax_name_check. \*/ ${1}raptor_world_is_parser_name${3}|g; s|^(.*)(raptor_syntax_name_check_v2)(.*)$|/\* WARNING: raptor_syntax_name_check_v2. \*/ ${1}raptor_world_is_parser_name${3}|g; s|^(.*)(raptor_syntaxes_enumerate)(.*)$|/\* WARNING: raptor_syntaxes_enumerate. \*/ ${1}raptor_world_get_parser_description${3}|g; s|^(.*)(raptor_syntaxes_enumerate_v2)(.*)$|/\* WARNING: raptor_syntaxes_enumerate_v2. \*/ ${1}raptor_world_get_parser_description${3}|g; s|^(.*)(raptor_unicode_char_to_utf8)(.*)$|/\* WARNING: raptor_unicode_char_to_utf8. \*/ ${1}raptor_unicode_utf8_string_put_char${3}|g; s|^(.*)(raptor_uri_as_counted_string_v2)(.*)$|/\* WARNING: raptor_uri_as_counted_string_v2. \*/ ${1}raptor_uri_as_counted_string${3}|g; s|^(.*)(raptor_uri_as_string_v2)(.*)$|/\* WARNING: raptor_uri_as_string_v2. \*/ ${1}raptor_uri_as_string${3}|g; s|^(.*)(raptor_uri_compare_v2)(.*)$|/\* WARNING: raptor_uri_compare_v2. \*/ ${1}raptor_uri_compare${3}|g; s|^(.*)(raptor_uri_copy_v2)(.*)$|/\* WARNING: raptor_uri_copy_v2. \*/ ${1}raptor_uri_copy${3}|g; s|^(.*)(raptor_uri_equals_v2)(.*)$|/\* WARNING: raptor_uri_equals_v2. \*/ ${1}raptor_uri_equals${3}|g; s|^(.*)(raptor_uri_print)(.*)$|/\* WARNING: raptor_uri_print. \*/ ${1}raptor_uri_print${3}|g; s|^(.*)(raptor_uri_print_v2)(.*)$|/\* WARNING: raptor_uri_print_v2. \*/ ${1}raptor_uri_print${3}|g; s|^(.*)(raptor_uri_resolve_uri_reference)(.*)$|/\* WARNING: raptor_uri_resolve_uri_reference. \*/ ${1}raptor_uri_resolve_uri_reference${3}|g; s|^(.*)(raptor_uri_to_counted_string_v2)(.*)$|/\* WARNING: raptor_uri_to_counted_string_v2. \*/ ${1}raptor_uri_to_counted_string${3}|g; s|^(.*)(raptor_uri_to_relative_counted_uri_string_v2)(.*)$|/\* WARNING: raptor_uri_to_relative_counted_uri_string_v2. \*/ ${1}raptor_uri_to_relative_counted_uri_string${3}|g; s|^(.*)(raptor_uri_to_relative_uri_string_v2)(.*)$|/\* WARNING: raptor_uri_to_relative_uri_string_v2. \*/ ${1}raptor_uri_to_relative_uri_string${3}|g; s|^(.*)(raptor_uri_to_string_v2)(.*)$|/\* WARNING: raptor_uri_to_string_v2. \*/ ${1}raptor_uri_to_string${3}|g; s|^(.*)(raptor_utf8_to_unicode_char)(.*)$|/\* WARNING: raptor_utf8_to_unicode_char. \*/ ${1}raptor_unicode_utf8_string_get_char${3}|g; s|^(.*)(raptor_world_set_libxml_flags)(.*)$|/\* WARNING: raptor_world_set_libxml_flags. \*/ ${1}raptor_world_set_flag${3}|g; s|^(.*)(raptor_world_set_libxslt_security_preferences)(.*)$|/\* WARNING: raptor_world_set_libxslt_security_preferences. \*/ ${1}raptor_world_set_libxslt_security_preferences${3}|g; s|^(.*)(raptor_www_fetch_to_string)(.*)$|/\* WARNING: raptor_www_fetch_to_string. \*/ ${1}raptor_www_fetch_to_string${3}|g; s|^(.*)(raptor_www_new)(.*)$|/\* WARNING: raptor_www_new. \*/ ${1}raptor_new_www${3}|g; s|^(.*)(raptor_www_new_with_connection)(.*)$|/\* WARNING: raptor_www_new_with_connection. \*/ ${1}raptor_new_www_with_connection${3}|g; s|^(.*)(raptor_xml_any_escape_string)(.*)$|/\* WARNING: raptor_xml_any_escape_string. \*/ ${1}raptor_xml_escape_string_any${3}|g; s|^(.*)(raptor_xml_escape_string)(.*)$|/\* WARNING: raptor_xml_escape_string. \*/ ${1}raptor_xml_escape_string${3}|g; s|^(.*)(raptor_xml_writer_features_enumerate)(.*)$|/\* WARNING: raptor_xml_writer_features_enumerate. Call with domain = RAPTOR_DOMAIN_XML_WRITER \*/ ${1}raptor_world_get_option_description${3}|g; s|^(.*)(raptor_xml_writer_features_enumerate_v2)(.*)$|/\* WARNING: raptor_xml_writer_features_enumerate_v2. Call with domain = RAPTOR_DOMAIN_XML_WRITER \*/ ${1}raptor_world_get_option_description${3}|g; s|^(.*)(raptor_xml_writer_get_feature)(.*)$|/\* WARNING: raptor_xml_writer_get_feature. \*/ ${1}raptor_xml_writer_get_option${3}|g; s|^(.*)(raptor_xml_writer_get_feature_string)(.*)$|/\* WARNING: raptor_xml_writer_get_feature_string. \*/ ${1}raptor_xml_writer_get_option${3}|g; s|^(.*)(raptor_xml_writer_set_feature)(.*)$|/\* WARNING: raptor_xml_writer_set_feature. \*/ ${1}raptor_xml_writer_set_option${3}|g; s|^(.*)(raptor_xml_writer_set_feature_string)(.*)$|/\* WARNING: raptor_xml_writer_set_feature_string. \*/ ${1}raptor_xml_writer_set_option${3}|g; # Changed types s|^(.*)(raptor_feature)(.*)$|/\* WARNING: raptor_feature. And new option RAPTOR_OPTION_STRICT added. \*/ ${1}raptor_option${3}|g; s|^(.*)(raptor_graph_handler)(.*)$|/\* WARNING: raptor_graph_handler. \*/ ${1}raptor_graph_mark_handler${3}|g; s|^(.*)(raptor_identifier)(.*)$|/\* WARNING: raptor_identifier. Fields changed to be simpler #raptor_term_type and #raptor_term_value \*/ ${1}raptor_term${3}|g; s|^(.*)(raptor_identifier_type)(.*)$|/\* WARNING: raptor_identifier_type. Removed several enum values to leave just URI, blank and literal types. \*/ ${1}raptor_term_type${3}|g; s|^(.*)(raptor_iostream_handler2)(.*)$|/\* WARNING: raptor_iostream_handler2. \*/ ${1}raptor_iostream_handler${3}|g; s|^(.*)(raptor_iostream_write_end_func)(.*)$|/\* WARNING: raptor_iostream_write_end_func. handler returns an int \*/ ${1}raptor_iostream_write_end_func${3}|g; s|^(.*)(raptor_log_level)(.*)$|/\* WARNING: raptor_log_level. Added RAPTOR_LOG_LEVEL_TRACE, RAPTOR_LOG_LEVEL_DEBUG, RAPTOR_LOG_LEVEL_INFO. RAPTOR_LOG_LEVEL_WARNING renamed RAPTOR_LOG_LEVEL_WARN \*/ ${1}raptor_log_level${3}|g; s|^(.*)(raptor_sequence_free_function)(.*)$|/\* WARNING: raptor_sequence_free_function. \*/ ${1}raptor_data_free_handler${3}|g; s|^(.*)(raptor_sequence_free_handler_v2)(.*)$|/\* WARNING: raptor_sequence_free_handler_v2. \*/ ${1}raptor_data_context_free_handler${3}|g; s|^(.*)(raptor_sequence_print_handler)(.*)$|/\* WARNING: raptor_sequence_print_handler. \*/ ${1}raptor_data_print_handler${3}|g; s|^(.*)(raptor_sequence_print_handler_v2)(.*)$|/\* WARNING: raptor_sequence_print_handler_v2. \*/ ${1}raptor_data_context_print_handler${3}|g; s|^(.*)(raptor_simple_message_handler)(.*)$|/\* WARNING: raptor_simple_message_handler. Replaced by generic raptor log mechanism. See raptor_world_set_log_handler() \*/ ${1}raptor_log_handler${3}|g; s|^(.*)(raptor_statement)(.*)$|/\* WARNING: raptor_statement. fields changed to use #raptor_term \*/ ${1}raptor_statement${3}|g; s|^(.*)(raptor_statement_handler)(.*)$|/\* WARNING: raptor_statement_handler. added const \*/ ${1}raptor_statement_handler${3}|g; s|^(.*)(raptor_statement_v2)(.*)$|/\* WARNING: raptor_statement_v2. Fields changed to be a 3 or 4 tuple of #raptor_term \*/ ${1}raptor_statement${3}|g; # Perl script to upgrade raptor2 2.0.3 to 2.0.4 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.4 to 2.0.5 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.5 to 2.0.6 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.6 to 2.0.7 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.7 to 2.0.8 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.9 to 2.0.10 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.10 to 2.0.11 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.11 to 2.0.12 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.13 to 2.0.14 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types # Perl script to upgrade raptor2 2.0.14 to 2.0.15 # Replace statement fields with term fields. s|->object|->object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */|g; s|->subject_type|->subject.type|g; s|->object_type|->object.type|g; s|->subject|->subject.value.uri or subject.value.blank.string /* WARNING: must choose one */|g; s|->predicate|->predicate.value.uri|g; s|->object_literal_datatype|->object.value.literal.datatype|g; s|->predicate_type|->predicate.type|g; s|->object_literal_language|->object.value.literal.language|g; # Deleted functions # Deleted types # Deleted enums # Renamed functions # Renamed enums # Changed functions # Changed types raptor2-2.0.15/docs/libraptor2.30000644000175000017500000001055211660060067013212 00000000000000.\" .\" libraptor2.3 - Raptor2 library manual page .\" .\" Copyright (C) 2002-2010 David Beckett - http://www.dajobe.org/ .\" Copyright (C) 2002-2005 University of Bristol, UK .\" .TH libraptor2 3 "2010-08-16" .\" Please adjust this date whenever revising the manpage. .SH NAME libraptor2 \- Raptor RDF syntax library 2.0 .SH SYNOPSIS .nf .B #include .br .br .BI world = raptor_new_world( ); .br .BI "raptor_parser *" p = raptor_new_parser( world , "rdfxml" ); .br .BI raptor_set_statement_handler( p , NULL , print_triples ); .br .BI "raptor_uri *" file_uri = raptor_new_uri( world , "http://example.org/" ); .br .BI raptor_parser_parse_file( p , file_uri , base_uri ); .br .BI raptor_parser_parse_uri( p , uri , NULL ); .br .BI raptor_free_parser( p ); .br .BI raptor_free_uri( file_uri ); .br .BI raptor_free_world( world ); .br .B cc prog.c -o prog `pkg-config raptor2 --cflags` `pkg-config raptor2 --libs` .br .fi .SH DESCRIPTION The \fIRaptor\fP library provides a high-level interface to a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into syntaxes. .LP The supported parsing syntaxes include RDF/XML, N-Triples, Turtle, TRiG, RSS tag soup (including all RSS and Atoms), GRDDL, RDF/JSON, RDFa and the serializing syntaxes include RDF/XML (3 varieties), N-Quads, N-Triples, Turtle, RSS 1.0, Atom 1.0, GraphViz DOT and RDF/JSON. The RDF/XML parser can use either \fIexpat\fP or \fIlibxml\fP XML parsers for providing the SAX event stream. The library functions are arranged in an object-oriented style with constructors, destructors and method calls. The statements and error messages are delivered via callback functions. .LP Raptor also contains classes to support the RDF graph triples: a statement object containing term objects and support for RDF URI-References for both parsing them and resolving / retrieval of URIs. .LP It some utility classes such as an I/O Stream abstraction for supporting reading and writing to and from a variety of locations, AVL Trees, String buffers and Sequences. .LP Raptor uses Unicode strings for RDF literals and URIs and preserves them throughout the library. It uses the UTF-8 encoding of Unicode at the API for passing in or returning Unicode strings. It is intended that the preservation of Unicode for URIs supports Internationalized Resource Identifiers (IRIs). .SH "API REFERENCE" See the HTML API docs that may be installed system wide at /usr/share/gtk-doc/html/raptor2/ or on the web at .UR http://librdf.org/raptor/api/ http://librdf.org/raptor/api/ .UE .SH API CHANGES See the Raptor API docs changes section at .UR http://librdf.org/raptor/api/raptor-changes.html http://librdf.org/raptor/api/raptor-changes.html .UE and the upgrading information when converting from libraptor(1) code at .UR http://librdf.org/raptor/UPGRADING.html http://librdf.org/raptor/UPGRADING.html .UE .br .SH "CONFORMING TO" \fIRDF/XML Syntax (Revised)\fP, Dave Beckett (ed.) W3C Recommendation, .UR http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-syntax-grammar/ .UE \fIN-Triples\fP, in \fIRDF Test Cases\fP, Jan Grant and Dave Beckett (eds.) W3C Recommendation, .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE \fITurtle - Terse RDF Triple Language\fP, Dave Beckett, .UR http://www.dajobe.org/2004/01/turtle/ http://www.dajobe.org/2004/01/turtle/ .UE \fIRSS 0.91 spec revision 3\fP, Dan Libby, Netscape, .UR http://my.netscape.com/publish/formats/rss-spec-0.91.html http://my.netscape.com/publish/formats/rss-spec-0.91.html .UE \fIRDF Site Summary (RSS) 1.0\fP, .UR http://purl.org/rss/1.0/spec http://purl.org/rss/1.0/spec .UE \fIAtom 1.0 syndication format\fP, RFC 4287, .UR http://www.ietf.org/rfc/rfc4287.txt http://www.ietf.org/rfc/rfc4287.txt .UE \fIGleaning Resource Descriptions from Dialects of Languages (GRDDL)\fP, Dan Connolly (ed.), W3C Recommendation, 2007-09-11, .UR http://www.w3.org/TR/2007/REC-grddl-20070911/ http://www.w3.org/TR/2007/REC-grddl-20070911/ .UE \fIRDFa in XHTML: Syntax and Processing\fP, Ben Adida, Mark Birbeck, Shane McCarron, Steven Pemberton (eds.) W3C Recommendation, 2008-10-14, .UR http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/ http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/ .UE .SH SEE ALSO .BR rapper(1) .SH AUTHOR Dave Beckett - .UR http://www.dajobe.org/ http://www.dajobe.org/ .UE raptor2-2.0.15/docs/raptor-tutorial-querying-functionality.xml0000644000175000017500000000621011660060067021463 00000000000000 Listing built-in functionality Raptor can be configured and compiled with support for different lists of parsers and serializers. The list built into the library can be found by means of description functions. These take as input an int counter and return descriptions of the object at that offset in the list. The return value is a pointer to a shared, read-only description of the object, or NULL if the counter has gone too far into the list. Listing Functionality with Descriptions Get descriptions of the parser syntaxes const raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, unsigned int counter); Get descriptions of the serializer syntaxes const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, unsigned int counter); Get descriptions of options raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option); Call with the appropriate domains for the class such as RAPTOR_DOMAIN_PARSER, RAPTOR_DOMAIN_SERIALIZER etc. See the raptor_domain description for the full list. These functions can be called directly after creating a raptor world object with raptor_new_world(). This is one way to find a parser (name) by it's MIME Type, the other is to use the mime_type parameter of the raptor_new_parser_for_content(). List all parser options using option description unsigned int i; for(i = 0; i < raptor_option_get_count(); i++) { raptor_option_description* od; od = raptor_world_get_option_description(world, RAPTOR_DOMAIN_PARSER, i); if(od) { /* do something with od fields such as od->name, od->label */ } } There are more examples of this usage in the source for the rapper utility in util/rapper.c. raptor2-2.0.15/docs/raptor2.types0000644000175000017500000000000012425347071013513 00000000000000raptor2-2.0.15/docs/version.xml.in0000644000175000017500000000001211660060067013650 00000000000000@VERSION@ raptor2-2.0.15/docs/libraptor2.html0000644000175000017500000001503411660060252014010 00000000000000 libraptor2

libraptor2


NAME

libraptor2 − Raptor RDF syntax library 2.0

SYNOPSIS

#include <raptor2.h>

world=raptor_new_world();
raptor_parser *
p=raptor_new_parser(world,rdfxml);
raptor_set_statement_handler(
p,NULL,print_triples);
raptor_uri *
file_uri=raptor_new_uri(world,http://example.org/);
raptor_parser_parse_file(
p,file_uri,base_uri);
raptor_parser_parse_uri(
p,uri,NULL);
raptor_free_parser(
p);
raptor_free_uri(
file_uri);
raptor_free_world(
world);

cc prog.c -o prog ’pkg-config raptor2 --cflags’ ’pkg-config raptor2 --libs’

DESCRIPTION

The Raptor library provides a high-level interface to a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into syntaxes.

The supported parsing syntaxes include RDF/XML, N-Triples, Turtle, TRiG, RSS tag soup (including all RSS and Atoms), GRDDL, RDF/JSON, RDFa and the serializing syntaxes include RDF/XML (3 varieties), N-Quads, N-Triples, Turtle, RSS 1.0, Atom 1.0, GraphViz DOT and RDF/JSON. The RDF/XML parser can use either expat or libxml XML parsers for providing the SAX event stream. The library functions are arranged in an object-oriented style with constructors, destructors and method calls. The statements and error messages are delivered via callback functions.

Raptor also contains classes to support the RDF graph triples: a statement object containing term objects and support for RDF URI-References for both parsing them and resolving / retrieval of URIs.

It some utility classes such as an I/O Stream abstraction for supporting reading and writing to and from a variety of locations, AVL Trees, String buffers and Sequences.

Raptor uses Unicode strings for RDF literals and URIs and preserves them throughout the library. It uses the UTF-8 encoding of Unicode at the API for passing in or returning Unicode strings. It is intended that the preservation of Unicode for URIs supports Internationalized Resource Identifiers (IRIs).

API REFERENCE

See the HTML API docs that may be installed system wide at /usr/share/gtk-doc/html/raptor2/ or on the web at http://librdf.org/raptor/api/

API CHANGES

See the Raptor API docs changes section at http://librdf.org/raptor/api/raptor-changes.html and the upgrading information when converting from libraptor(1) code at http://librdf.org/raptor/UPGRADING.html

CONFORMING TO

RDF/XML Syntax (Revised), Dave Beckett (ed.) W3C Recommendation, http://www.w3.org/TR/rdf-syntax-grammar/

N-Triples, in RDF Test Cases, Jan Grant and Dave Beckett (eds.) W3C Recommendation, http://www.w3.org/TR/rdf-testcases/#ntriples

Turtle - Terse RDF Triple Language, Dave Beckett, http://www.dajobe.org/2004/01/turtle/

RSS 0.91 spec revision 3, Dan Libby, Netscape, http://my.netscape.com/publish/formats/rss-spec-0.91.html

RDF Site Summary (RSS) 1.0, http://purl.org/rss/1.0/spec

Atom 1.0 syndication format, RFC 4287, http://www.ietf.org/rfc/rfc4287.txt

Gleaning Resource Descriptions from Dialects of Languages (GRDDL), Dan Connolly (ed.), W3C Recommendation, 2007-09-11, http://www.w3.org/TR/2007/REC-grddl-20070911/

RDFa in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane McCarron, Steven Pemberton (eds.)
W3C Recommendation, 2008-10-14, http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/

SEE ALSO

rapper(1)

AUTHOR

Dave Beckett - http://www.dajobe.org/


Copyright 2002-2011 Dave Beckett
2002-2011 University of Bristol

raptor2-2.0.15/docs/rdfprint.c0000644000175000017500000000163211556054034013042 00000000000000#include #include /* rdfprint.c: print triples from parsing RDF/XML */ static void print_triple(void* user_data, raptor_statement* triple) { raptor_statement_print_as_ntriples(triple, stdout); fputc('\n', stdout); } int main(int argc, char *argv[]) { raptor_world *world = NULL; raptor_parser* rdf_parser = NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; world = raptor_new_world(); rdf_parser = raptor_new_parser(world, "rdfxml"); raptor_parser_set_statement_handler(rdf_parser, NULL, print_triple); uri_string = raptor_uri_filename_to_uri_string(argv[1]); uri = raptor_new_uri(world, uri_string); base_uri = raptor_uri_copy(uri); raptor_parser_parse_file(rdf_parser, uri, base_uri); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_free_world(world); return 0; } raptor2-2.0.15/docs/raptor-docs.xml0000644000175000017500000001301012333764117014022 00000000000000 ]> Raptor RDF Syntax Library Manual Manual for Raptor &version; Dave Beckett
http://www.dajobe.org/
This documentation is Free Software / Open Source - you can redistribute it and/or modify it under the same licenses as Raptor. It is licensed under the following three licenses as alternatives: GNU Lesser General Public License (LGPL) V2.1 or any newer version GNU General Public License (GPL) V2 or any newer version Apache License, V2.0 or any newer version You may not use this documentation except in compliance with at least one of the above three licenses. See the Raptor site for the full license terms. 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 Dave Beckett 2001 2002 2003 2004 2005 University of Bristol
Raptor Overview Raptor is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. It also includes supporting functionality for managing Unicode, UTF-8, URIs, retrieving from URIs and reading and writing XML. Raptor Tutorial This part describes how to use the Raptor APIs to turn syntaxes into RDF triples and RDF triples into syntaxes. The next part contains the Raptor Reference Manual which comprehensively describes every class and function of the API. For the latest information, see the Raptor Home Page and the main document overview in this document tree. Raptor Reference Manual This part contains the Raptor Reference Manual which comprehensively describes every class and function of the API. The previous part contains the Raptor Tutorial explaining how to use the API parts. For the latest information, see the Raptor Home Page and the main document overview in this document tree. Index
raptor2-2.0.15/ChangeLog.60000644000175000017500000017015210532441037012034 000000000000002005-12-21 Dave Beckett * configure.ac, raptor.spec.in, Makefile.am: Write rpm release as 1 (with --enable-release) or SNAP otherwise. * src/turtle_parser.y, src/raptor_general.c, utils/rapper.1: updated urls * docs/tmpl/section-feature.sgml: Added @RAPTOR_FEATURE_WRITER_XML_DECLARATION 2005-12-20 Dave Beckett * utils/Makefile.am: Added rapper.html to dist * raptor-src-config.in, LICENSE.html, Makefile.am, manifest.pl, configure.ac: ILRT/UB link updates 2005-11-30 Dave Beckett * src/raptor_xml_writer.c (raptor_xml_writer_indent): Fix writing an extra newline at doc start. 2005-11-26 Dave Beckett * src/raptor_xml_writer.c: Add automatic writing of the XML declaration (dependent on the XML version). (raptor_xml_writer_write_xml_declaration): Added, to support this. New feature RAPTOR_FEATURE_WRITER_XML_DECLARATION can disable this. (main): Update the test code to expect an XML declaration in the string. * src/raptor_parse.c: Add do-nothing switch cases for RAPTOR_FEATURE_WRITER_XML_DECLARATION. * src/raptor_serialize_rdfxmla.c: Add Adobe XMP compatible output as new serializer rdfxml-xmp based on patch from Sid Steward. Duplicate predicates are ignored for a single subject. * src/raptor_serialize_rdfxml.c: Defer writing xml declaration to the xml writer. * src/raptor_serialize.c: Add XML declaration writing feature support (RAPTOR_FEATURE_WRITER_XML_DECLARATION) for serializer. 2005-11-25 Dave Beckett * configure.ac: Add test X = 1 for expat and libxml tests. Fixes Issue#0000060 2005-11-22 Dave Beckett * src/raptor_feature.c: Added RAPTOR_FEATURE_WRITER_XML_DECLARATION feature. * src/raptor.h: Added RAPTOR_FEATURE_WRITER_XML_DECLARATION to control generating the XML declaration on serializers and XML writer. 2005-11-10 Dave Beckett * raptor.spec.in: Add gtk-doc docs to rpm 2005-11-04 Dave Beckett * docs/tmpl/section-xml.sgml: new functions * docs/tmpl/section-feature.sgml: New feature * docs/libraptor.3: Updated for 1.4.8 2005-11-02 Dave Beckett * docs/raptor-sections.txt: Added raptor_iostream_write_xml_any_escaped_string raptor_xml_any_escape_string * src/turtle_parser.y, src/raptor_internal.h, src/n3_parser.y: Added RAPTOR_ASSERT with no return value and use it for turtle and n3 parsers. Some compilers complain at an empty 3rd macro arg with RAPTOR_ASSERT_RETURN. * src/raptor_serialize_rss.c: remove ;; * src/raptor_rdfxml.c (raptor_generate_statement): Make predicate type fix in reifying. * src/raptor_rdfxml.c (raptor_generate_statement): Make predicate revert fix actually work. * RELEASE.html: Updates for 1.4.8 * src/raptor_rdfxml.c, src/turtle_parser.y, src/raptor_rss.c, src/raptor.h, src/ntriples_parse.c, src/n3_parser.y: Revert RAPTOR_IDENTIFIER_TYPE_PREDICATE to RAPTOR_IDENTIFIER_TYPE_RESOURCE change for predicates until the next release. 2005-09-21 Dave Beckett * src/raptor_uri.c: (raptor_new_uri_for_xmlbase, raptor_new_uri_for_retrieval): Set ud->path_len to 1 when adding a default path of / Fixes bug 0000045 http://bugs.librdf.org/mantis/view.php?id=45 2005-09-20 Dave Beckett * src/raptor_serialize_rdfxmla.c (raptor_rdfxmla_serialize_start): Pass down xml_version to the raptor_xml_writer and write the versioned header. * src/raptor_serialize_rdfxml.c (raptor_rdfxml_serialize_start): Pass down xml_version to the raptor_xml_writer and write the versioned header. * src/raptor_xml_writer.c: Add xml_version to raptor_xml_writer structure. (raptor_iostream_write_xml_element_start): Add xml_version field and pass it down to the XML escape function. (raptor_new_xml_writer): Init xml_version to 10. (raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_cdata, raptor_xml_writer_cdata_counted): Pass down xml_version. (raptor_xml_writer_set_feature, raptor_xml_writer_get_feature): Handle RAPTOR_FEATURE_WRITER_XML_VERSION. * src/raptor_xml.c (raptor_xml_any_escape_string, raptor_iostream_write_xml_any_escaped_string): Added, handling XML 1.0 or XML 1.1 Error if writing #x1-#x1f (excluding #x9, #xA, #xD) or #x7F for XML 1.0 * src/raptor_serialize.c (raptor_serializer_set_feature, raptor_serializer_get_feature): Add RAPTOR_FEATURE_WRITER_XML_VERSION * src/raptor_parse.c: switch on enum updates for feature RAPTOR_FEATURE_WRITER_XML_VERSION for serializer and xml writer * src/raptor_feature.c: Added RAPTOR_FEATURE_WRITER_XML_VERSION for serializer and xml writer with short name xmlVersion * src/raptor.h: Added RAPTOR_FEATURE_WRITER_XML_VERSION for serializer, xml writer. Added prototypes for raptor_xml_any_escape_string and raptor_iostream_write_xml_any_escaped_string * src/raptor_internal.h: raptor_serializer_s gains an xml_version field * src/raptor_sax2.c (raptor_sax2_parse_chunk): Once more with static buffer, no vsnprintf * src/raptor_sax2.c (raptor_sax2_parse_chunk): Fix error message with 2 args for expat using raptor_vsnprintf. * src/raptor_namespace.c (raptor_namespaces_format): XML escape the written namespace name URI * tests/ex-59.rdf: correct result * tests/ex-59.nt, tests/ex-59.rdf: Test rdfxml serializer escapes dquote in uri attrs * tests/Makefile.am: Added RDF_SERIALIZE_TEST_FILES, RDF_SERIALIZE_OUT_FILES and ex-59 for testing the rdfxml serializer * examples/Makefile.am: fix libraptor.la dir 2005-09-18 Dave Beckett * src/raptor_rdfxml.c (raptor_generate_statement): When reifiying, just copy predicate_type. * src/raptor_uri.c (raptor_uri_equals): Alter to accept NULL pointers, which do not compare equal to a non-NULL URI. NULL does equal NULL. * src/raptor.h: Document that RAPTOR_IDENTIFIER_TYPE_PREDICATE is never generated by a parser from now, replaced by RAPTOR_IDENTIFIER_TYPE_RESOURCE and RAPTOR_IDENTIFIER_TYPE_XML_LITERAL replaced by RAPTOR_IDENTIFIER_TYPE_LITERAL with the rdf:XMLLiteral datatype. * src/n3_parser.y, src/ntriples_parse.c, src/turtle_parser.y, src/raptor_rss.c, src/raptor_rdfxml.c: Replace all RAPTOR_IDENTIFIER_TYPE_PREDICATE with RAPTOR_IDENTIFIER_TYPE_RESOURCE * src/raptor_rdfxml.c: Added a new concept for rdf:XMLLiteral Rename RAPTOR_N_CONCEPTS to RAPTOR_RDFXML_N_CONCEPTS (raptor_rdfxml_parse_init): Init it. (raptor_end_element_grammar): Never generate RAPTOR_IDENTIFIER_TYPE_XML_LITERAL, instead generate a RAPTOR_IDENTIFIER_TYPE_LITERAL with the rdf:XMLLiteral datatype. 2005-09-16 Dave Beckett * docs/libraptor.3: Update for 1.4.8 - added raptor_set_namespace_handler * src/raptor_www.c, src/raptor.h: Revert: remove raptor_www_set_source_uri, raptor_www_set_source_file_handle, raptor_www_retrieve and raptor_www_retrieve_to_string 2005-09-15 Dave Beckett * src/raptor.h: delete unused raptor_www_fetch_to_string prototype * src/raptor_www.c: autodocs (raptor_www_set_source_uri): Added to set URI for content source (raptor_www_set_source_file_handle): Added to set URI for content source. (raptor_www_file_handle_fetch): Added, with guts of raptor_www_file_fetch. (raptor_www_file_fetch): Modified to call raptor_www_file_handle_fetch. (raptor_www_retrieve): Added to retrieve from whatever source (URI or handle). (raptor_www_retrieve_to_string): Added to retrieve from whatever source (URI or handle) into a string. (raptor_www_fetch): Now a wrapper over raptor_www_retrieve. (raptor_www_fetch_to_string): Now a wrapper over raptor_www_retrieve_to_string. * src/raptor.h: Added prototypes for raptor_www_set_source_uri, raptor_www_set_source_file_handle, raptor_www_retrieve, raptor_www_retrieve_to_string and raptor_www_fetch_from_file_handle * src/raptor_internal.h: (struct raptor_www_s) gains a handle field * src/raptor_parse.c: autodocs * src/ntriples_parse.c: autodocs and some code style fixes 2005-09-14 Dave Beckett * docs/tmpl/section-parser.sgml: new functions 2005-09-10 Dave Beckett * src/raptor_expat.c: Updates to use new raptor_sax2 handler style. The user data now points at the raptor_sax2* object, not the parser. (raptor_expat_init): send SAX2 events to core raptor_sax2_EVENT routines. (raptor_expat_update_document_locator): Moved from raptor_parser.c * src/raptor_libxml.c: Updates to use new raptor_sax2 handler style. The user data now points at the raptor_sax2* object, not the parser. All raptor_parser* references are gone and error/fatal error/warnings are returned via handler/data pairs. (raptor_libxml_call_handler): Added to aid returning messages. Deleted old and unused internal entity resolution code. (raptor_libxml_init): send SAX2 events to core raptor_sax2_EVENT routines. * src/raptor_internal.h: Removed old and hardly tested internal handling of libxml entities * src/raptor_rdfxml.c: Rename raptor_xml_* to raptor_rdfxml_* in structs and functions. (raptor_rdfxml_start_element_handler, raptor_rdfxml_end_element_handler, raptor_cdata_grammar): Move expat BOM fixes to raptor_sax2.c (raptor_rdfxml_parse_init): Use new raptor_sax2_set_EVENT_handler methods. Use raptor_sax2_set_locator. (raptor_get_libxml_context, raptor_set_libxml_document_locator, raptor_get_libxml_document_locator, raptor_get_libxml_entities, raptor_set_libxml_entities, raptor_expat_update_document_locator): Deleted or merged into raptor_sax2.c * src/raptor_parse.c (raptor_parser_fatal_error_message_handler, raptor_parser_error_message_handler, raptor_parser_warning_message_handler): Added handlers that take location in same style as user message handler callbacks. (raptor_stats_print): Update for raptor_rdfxml_parser * src/raptor_locator.c (raptor_update_document_locator): Moved to raptor_sax2.c * src/raptor_general.c (raptor_init, raptor_finish): Call raptor_init_sax2 and raptor_finish_sax2 respectively. * src/raptor_internal.h: Removed several libxml/expat/rdxml functions used to be too friendly with internals of other classes. Renamed raptor_xml_parser to raptor_rdfxml_parser. Updated prototype of raptor_libxml_update_document_locator. Added new parser handler prototypes raptor_parser_error_message_handler, raptor_parser_fatal_error_message_handler and raptor_parser_warning_message_handler Added handlers for SAX2 events - start element, end element, characters, cdata, comment, unparsed_entity_decl, external_entity_ref named as raptor_sax2_EVENT_handler. raptor_sax2 gains a magic field as this is used as the user data for libxml. raptor_sax2 uses the handler typedefs for the event handlers. raptor_sax2 gains erorr, fatal and warning handler and data fields. Added prototypes for raptor_init_sax2 and raptor_finish_sax2. Updated prototype for raptor_new_sax2. Added prototypes for raptor_sax2_set_start_element_handler, raptor_sax2_set_end_element_handler, raptor_sax2_set_characters_handler, raptor_sax2_set_cdata_handler, raptor_sax2_set_comment_handler, raptor_sax2_set_unparsed_entity_decl_handler and raptor_sax2_set_external_entity_ref_handler Added prototype for raptor_sax2_set_locator. Added prototypes for: raptor_sax2_start_element raptor_sax2_end_element, raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl and raptor_sax2_external_entity_ref. * src/raptor_sax2.c: Now a more complete class (raptor_init_sax2, raptor_finish_sax2): Added, calling any static initialising/finishing. (raptor_new_sax2): Added error, fatal_error and warning data and handler registers. Register magic for libxml2 user_data fixups (raptor_sax2_set_start_element_handler, raptor_sax2_set_end_element_handler, raptor_sax2_set_characters_handler, raptor_sax2_set_cdata_handler, raptor_sax2_set_comment_handler, raptor_sax2_set_unparsed_entity_decl_handler, raptor_sax2_set_external_entity_ref_handler): Added for setting SAX2 callback handlers. (raptor_sax2_set_locator): Added, to set SAX2 file locator. (raptor_sax2_parse_chunk): Update for new handlers, remove all mention of raptor_parser. Use this object (raptor_sax2*) as the user data now, not an external raptor_parser*. (raptor_sax2_update_document_locator): Added, updating the current location for the internal parser. (raptor_sax2_start_element): Added, internal function calling the start element handler, adding various workarounds needed. (raptor_sax2_end_element): Added, internal function calling the end element handler, adding various workarounds needed. (raptor_sax2_characters, raptor_sax2_cdata, raptor_sax2_comment, raptor_sax2_unparsed_entity_decl, raptor_sax2_external_entity_ref): Added, internal functions calling the same-named handler. 2005-09-09 Dave Beckett * src/raptor_qname.c: autodocs * docs/raptor-sections.txt: Added new functions. * src/raptor_internal.h (raptor_parser_s): Add new fields to the end of the struct; add unused1 to try to make old offsets work * src/raptor_namespace.c (raptor_namespaces_init): Remove un-necessary casts for constant namespace names. * src/raptor_uri.c (raptor_uri_uri_string_to_filename_fragment): For win32, only remove leading / if there is one present. (patch from John C. Barstow) (main): Correct test case result to match above. * src/raptor_xslt.c (raptor_xslt_parse_chunk): If the content is in one chunk and is_end is true, call xmlParseChunk with the is_end flag. (patch from René Puls) 2005-09-07 Dave Beckett * src/n3_parser.y, src/turtle_parser.y (statement): Handle error recovery when subject is NULL 2005-09-06 Dave Beckett * src/turtle_common.c (raptor_stringbuffer_append_turtle_string): Do not check unsigned for <0 * src/raptor_xml.c (raptor_xml_name_check): Do not check unsigned for <0 * src/raptor_utf8.c (raptor_utf8_check): Do not check unsigned for <0 * src/raptor_serialize.c (raptor_serializers_enumerate): counter can never be <0 * src/raptor_rdfxml.c (raptor_element_content_type_as_string): Do not check unsigned for <0 * src/raptor_feature.c (raptor_feature_value_type): Do not check unsigned for <0 * src/ntriples_parse.c (raptor_ntriples_term): Do not check unsigned for <0 * src/raptor_parse.c (raptor_syntaxes_enumerate): counter can never be <0 2005-08-24 Dave Beckett * src/Makefile.am: Add more conditional compiles for serializers * src/Makefile.am: Added raptor_serialize_rdfxml.c raptor_serialize_ntriples.c raptor_serialize_simple.c * src/raptor_serialize.c: Moved specific serializers into separate files - rdfxml, ntriples, simple * src/raptor_serialize_rdfxml.c: RDF/XML serializer * src/raptor_serialize_ntriples.c: N-Triples serializer * src/raptor_serialize_simple.c: Simple serializer * src/raptor-config.in, src/raptor-config.1: s/features/options/ so not to confuse with raptor_feature * utils/rapper.c: Add HELP_TEXT_LONG to deal with help that has no short option. * utils/rapper.c: fix --show-namespaces help * utils/rapper.1: Added --show-namespaces * utils/rapper.c: (print_namespaces) Added Added --show-namespaces option - long options only. * src/turtle_parser.y, src/raptor_rdfxml.c, src/n3_parser.y: Handle raptor_new_namespace failing. * src/turtle_parser.y, src/raptor_rdfxml.c, src/n3_parser.y: Remove calls to raptor_namespaces_start_namespace_full and use the three functions raptor_new_namespace, raptor_namespaces_start_namespace and raptor_parser_start_namespace instead. * src/raptor_parse.c (raptor_set_namespace_handler): Added. New user method. (raptor_parser_start_namespace): Added. Internal function to operate when namespaces are declared. * src/raptor.h: Added raptor_namespace_handler typedef. Added raptor_set_namespace_handler prototype. * src/raptor_internal.h: raptor_parser_s gains namespace_handler and namespace_handler_user_data fields. Added raptor_parser_start_namespace prototype. 2005-08-24 Dave Beckett * tests/Makefile.am: link to libxml2 bug report * src/raptor_rss.c (raptor_rss_emit_type_triple, raptor_rss_emit_enclosure, raptor_rss_emit_connection): Zap literal language and datatype before setting up statement objects. * src/ntriples_parse.c (raptor_ntriples_generate_statement): Zap literal language and datatype before setting up statement objects. * src/n3_parser.y (raptor_n3_generate_statement): Zap literal language and datatype for !literals. Add assertion. * src/raptor_internal.h (RAPTOR_ASSERT_RETURN): Remove ()s around return to allow no-value. * src/turtle_parser.y (raptor_turtle_generate_statement): Zap literal language and datatype for !literals. Add assertion. 2005-08-22 Dave Beckett * src/raptor.h: autodocs fixes * src/raptor.h: autodocs * docs/raptor-sections.txt: raptor_uri_init now internal * src/raptor_parse.c: autodocs * docs/tmpl/section-unused.sgml: raptor_uri_init now internal * docs/tmpl/section-general.sgml, src/raptor_internal.h: Remove unused container_test_handler function. * src/raptor.h, src/raptor_xml.c, src/raptor_sequence.c, src/raptor_iostream.c, src/raptor_stringbuffer.c: autodocs * docs/raptor-sections.txt: No raptor_container_test_handler * src/raptor.h: raptor_uri_init was internal * src/raptor_uri.c: autodocs * src/raptor_internal.h: raptor_uri_init was internal * src/raptor_uri.c: autodocs 2005-08-19 Dave Beckett * Makefile.am: Enable gtk doc with make distcheck * docs/tmpl/section-xml-namespace.sgml: args * src/raptor_namespace.c, src/raptor.h, src/raptor_xml.c, src/raptor_serialize.c, src/raptor_qname.c, src/raptor_parse.c, src/raptor_iostream.c, src/raptor_sequence.c, src/raptor_general.c, src/raptor_feature.c: autodocs * docs/version.xml.in: version.xml.in * docs/tmpl/section-serializer.sgml: whitespace * src/raptor_sequence.c: autodocs * src/raptor_xml.c (raptor_xml_escape_string): autodocs escapes * src/ntriples_parse.c, src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_rdfxmla.c, src/raptor_set.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_utf8.c, src/raptor_www.c, src/raptor_www_libwww.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/turtle_common.c: autodocs reformatted for gtk-doc * docs/tmpl/section-constants.sgml, docs/tmpl/section-feature.sgml, docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-memory.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-stringbuffer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-unicode.sgml, docs/tmpl/section-unused.sgml, docs/tmpl/section-uri-factory.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-www.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: initial templates * docs/raptor-docs.xml: fix * docs/raptor-docs.xml, docs/raptor-overrides.txt, docs/raptor-sections.txt: gtk-doc files * docs/Makefile.am, configure.ac: Enable gtk-doc * configure.ac: check for gtk-doc 2005-08-19 Dave Beckett * src/raptor-config.1: Document --features and --help. Order flags alphabetically in summary and body. * src/raptor-config.in: Add --features argument to list configured or discovered features of the raptor library * configure.ac: Add AC_SUBSTs for recording discovered features: RAPTOR_WWW_LIBRARY (or none), RAPTOR_XML_PARSER (or none), RAPTOR_PARSERS (list) and RAPTOR_SERIALIZERS (list). 2005-08-18 Dave Beckett * src/raptor_sax2.c (raptor_sax2_parse_start): Fix for expat * src/raptor_rdfxml.c (raptor_xml_unparsed_entity_decl_handler, raptor_xml_external_entity_ref_handler): Casts for gcc4 * src/raptor_expat.c (raptor_expat_init): Casts for expat to use sax2 handlers. * src/raptor_internal.h: Move raptor_sax2 declaration outside libxml-only block Fixup general arguments for raptor_xml_unparsed_entity_decl_handler and raptor_xml_external_entity_ref_handler. * src/raptor_rdfxml.c (raptor_xml_unparsed_entity_decl_handler, raptor_xml_external_entity_ref_handler): Generalise args from expat-specific. (raptor_xml_parse_init): Init sax2 handler fields * src/raptor_libxml.c (raptor_libxml_init): Use sax2 structure handlers * src/raptor_expat.c (raptor_expat_init): Use sax2 structure handlers * src/raptor_internal.h: raptor_sax2 gains handlers for start/end element, characters, cdata, comment, unparsed entity declaration, extenal entity reference. * src/raptor_sax2.c (raptor_sax2_parse_start): Init expat and libxml the same * src/raptor_libxml.c (raptor_libxml_init): Take raptor_sax2* and raptor_uri* args * src/raptor_expat.c (raptor_expat_init): Take raptor_sax2* and raptor_uri* args * src/raptor_internal.h: raptor_libxml_init and raptor_expat_init take same args * src/turtle_parser.y, src/raptor_xslt.c, src/raptor_rss.c, src/raptor_rdfxml.c, src/raptor_guess.c, src/ntriples_parse.c, src/n3_parser.y: Update uses of raptor_parser_register_factory to remove alias argument and add calls to raptor_parser_factory_add_alias for raptor (rdfxml) and ntriplesplus (turtle) * src/raptor_internal.h: Update raptor_parser_register_factory prototype to return the registered factory and remove the alias arg. Added prototype for raptor_parser_factory_add_alias * src/raptor_parse.c (raptor_parser_register_factory): Now returns the registered factory. Removed alias arg into new function: (raptor_parser_factory_add_alias): Added. 2005-08-17 Dave Beckett * src/Makefile.am: maintainer clean n3 files * src/Makefile.am: clean n3 tests * src/n3_lexer.l (n3_lexer_syntax_error): Added, from turtle. * src/n3_lexer.l: Added n3_lexer_syntax_error (\"\"\"): Copy just the len and always terminate the string. (n3_copy_string_token): Handle empty strings without stringbuffer and use raptor_stringbuffer_append_turtle_string for escapes. Ensure string is always termianted. * src/n3_common.h: added stringbuffer field * src/turtle_parser.y: Expect 9 conflicts. Added FLOATING_LITERAL (FLOATING_LITERAL): Use raptor_new_identifier_from_double common with n3. * src/n3_parser.y (FLOATING_LITERAL): Use raptor_new_identifier_from_double common with turtle. * src/turtle_lexer.l (\"\"\"): Copy just the len and always terminate the string. Added doubles to Turtle. (turtle_copy_string_token): Handle empty strings without stringbuffer. Ensure string is always termianted. (turtle_token_print): Print FLOATING_LITERAL * tests/turtle/test-20.ttl, tests/turtle/test-20.out, tests/turtle/Makefile.am: Add test-20 for empty literals * tests/turtle/Makefile.am: re-add test-19 2005-08-16 Dave Beckett * src/raptor_internal.h: Added raptor_new_identifier_from_double pointer * src/raptor_xsd.c: raptor_xsd.c * src/Makefile.am: Added raptor_xsd.c * src/n3_parser.y, src/n3_lexer.l: Add double constants to N3 parser * src/n3_lexer.l (main): Make uri_string an unsigned char* * tests/turtle/Makefile.am: remove test-19 for now, no double constants * tests/turtle/Makefile.am, tests/turtle/test-19.out, tests/turtle/test-19.ttl: added test-19 for 1.0 as a double * src/Makefile.am: Add turtle_common.c * tests/turtle/test-18.out: Remove header/footer * src/turtle_parser.y: 2005 * src/turtle_lexer.l: Added turtle_lexer_syntax_error Build up long strings inside a stringbuffer with raptor_stringbuffer_append_turtle_string and avoid greedy match of """s (turtle_copy_string_token): Use raptor_stringbuffer_append_turtle_string (turtle_lexer_syntax_error): Added. * src/raptor_internal.h: Added raptor_stringbuffer_append_turtle_string prototype * src/turtle_common.h: Added raptor_stringbuffer* field sb * src/turtle_common.c: Raptor Turtle common code with raptor_stringbuffer_append_turtle_string from raptor_turtle.l * tests/turtle/Makefile.am, tests/turtle/test-18.out, tests/turtle/test-18.ttl: Added test-18 for multiple long literals with escapes * src/raptor_serialize_rss.c (raptor_rss10_emit_item): Die in debug mode with NULL item - all calls to this are currently wrapped with a check. (raptor_rss10_emit_item): Do not emit atom author when no such item exists. * manifest.pl: typo 2005-08-11 Dave Beckett * autogen.sh: Rewrite with functions, generalize to any redland package. Add docs. * raptor.spec.in: - Update Source: - Use %makeinstall 2005-08-10 Dave Beckett * raptor.spec.in: Use %configure and %{_make} 2005-08-08 Dave Beckett * src/raptor_rss_common.c, src/raptor_rss.c, src/raptor_internal.h: Move time.h and sys/time.h #ifdef and includes to raptor_internal.h since time_t is mentioned there and visible to all files. * tests/Makefile.am: adjust -I to point to srcdir for raptor_empty_test 2005-07-31 Dave Beckett * src/raptor_xml_writer.c (main): syntax * src/raptor_uri.c: Add (void) casts for fwrite debug messages * src/raptor_xml_writer.c, src/raptor_rdfxml.c, src/raptor_nfc_test.c: Add (void) casts for fwrite debug messages * Source re-organisation - libraptor code moved to new src/ dir. rapper and rdfdif moved to new utils/ dir. Other manual pages to docs/. 2005-07-27 Dave Beckett * Makefile.am: Add n3_lexer_test, n3_parser_test for maintainer * n3_parser.y, turtle_parser.y (main): Make it compile * n3_parser.y: Updates from turtle_parser.y: gcc4 ignored return warning fixes: (main): Check fread() return value and throw a user error. (main): Fix for gcc4 (main) Move filename here * examples/grapper.c: Add author url * raptor_rss.c (raptor_rss_uplift_fields): Add possibility of normalizing fields, but no code to do it yet. * raptor_rss_common.c (raptor_rss_date_uplift): fail and do nothing if function returns <0 * raptor_rss.c (raptor_rss_uplift_fields): Moved date code into raptor_rss_date_uplift and call it. * raptor_rss.h: Added raptor_rss_date_uplift prototype * raptor_rss_common.c (raptor_rss_date_uplift): Added, pulled out of raptor_rss.c * turtle_parser.y: gcc4 ignored return warning fixes: (main): Check fread() return value and throw a user error. 2005-07-25 Dave Beckett * examples/grapper.c (fs_ok_button_callback): Protect from defining when when not used as a callback. (open_button_callback): cast for gcc4 2005-07-24 Dave Beckett * raptor_rss.c (raptor_rss_parser_processNode): for rss:link and atom:link with href, allow multiple link for atom, and continue to ignore all but for rss. * raptor_rss_common.c: Tidying. Added atom:feed and atom:entry to raptor_rss_types_info. Declare atom namespace URI string raptor_atom_namespace_uri * raptor_rss.h: Added RAPTOR_ATOM_FEED, RAPTOR_ATOM_ENTRY. * raptor_serialize_rss.c: Add atom 1.0 serializing by generalising rss 1.0 serializing. Change field names to reflect this rdf_nspace -> default_nspace, rdf_RDF_element -> root_element. Add is_atom flag. (raptor_rss10_serialize_init): Init is_atom flag. (raptor_rss10_move_statements, raptor_rss10_store_statement): Rename back fields translated to rss: namespace. (raptor_rss10_build_xml_names): Init namespace qname for rss/atom. Declare the default namespace to rss/atom. Ignore all item types but rss:item for atom; all but atom:author for rss. For item node type use atom:entry / rss:item. (raptor_rss10_emit_item): Add emit_container flag to prevent generating the containing elements. For atom:author, generate it inline for atom, ignore it for rss. When generating URI-valued fields for atom, make them element content. For atom, do not generate rdf:Seq block. (raptor_rss10_serialize_end): Only emit node type rss:item (aka atom:entry) for atom. (raptor_init_serializer_atom): Added. * configure.ac: Added atom serializer, enabled for maintainer only. * raptor_general.c (raptor_init): Add call to raptor_init_serializer_atom if enabled * raptor_internal.h: Added prototype for raptor_init_serializer_atom Added raptor_atom_namespace_uri * raptor_serialize_rss.c (raptor_rss10_serialize_end): End with an error if no rss channel was found. * Makefile.am: Use RAPTOR_SERIALIZER_RSS_1_0 for new separate rss serializer. Use RAPTOR_RSS_COMMON when either rss parser or serializer is needed. * configure.ac: RSS 1.0 serializer is always available and does not need the libxml requirements of the RSS tag soup parser. Added RAPTOR_SERIALIZER_RSS_1_0 define and makefile conditional. Added RAPTOR_RSS_COMMON when any rss code is needed. * raptor_rss.c, raptor_rss_common.c, raptor_serialize_rss.c: Moved common code between parser and serializer from raptor_rss.c into new raptor_rss_common.c as new class raptor_rss_model. Moved rss-1.0 serializer into new raptor_serialize_rss.c. Both can be compiled independent of the other. * raptor_rss.h: Redland Parser Toolkit Internal RSS Model and API * raptor_internal.h: Add RAPTOR_PARSEDATE_FUNCTION macro for parsedate.c * raptor_general.c (raptor_init): Use define RAPTOR_SERIALIZER_RSS_1_0 to call raptor_init_serializer_rss10 * raptor_xml.c, raptor_sax2.c: Moved raptor_new_xml_element, raptor_free_xml_element, raptor_xml_element_set_attributes, raptor_xml_element_declare_namespace, raptor_print_xml_element, raptor_iostream_write_xml_element from raptor_sax2.c to raptor_xml.c 2005-07-23 Dave Beckett * raptor_rss.c: More base URIs on base URIs fixes. (raptor_rss_parser_processNode): Ensure base URI is always copied at start element, always freed at end element. Make sure xml:base processing is done for all elements including document and typed-node ones. (raptor_rss_parse_chunk): Remove duplicate document base URI setting. 2005-07-22 Dave Beckett * raptor_rss.c: raptor_rss_info gains flags field to store RAPTOR_RSS_INFO_FLAG_URI_VALUE where the value of the element value is always a URI. Apply that to atom:id, atom:icon and atom:logo. struct raptor_rss_parser_context_s gains a sequence of base URIs per-element. (raptor_rss_context_init, raptor_rss_context_terminate): Init and free sequence of base URIs. (raptor_rss_parse_start): Start base URI sequence with parser base URI. (raptor_rss_parser_processNode): Init base_uri from top of stack of base URIs. Update base_uri from an xml:base arg, relative to the current base URI. Use the base URI for all URi constructions. Push the new base URI after an element has been found. Pop the base URI at the end of an element. At the end of an element, if the field always has a URI value, convert it. (raptor_rss_parse_chunk): Init the URI sequence with the parser base URI. * raptor_rss.c: map raptor_atom_to_rss: turn more atom cloned rss fields into rss fields. (raptor_rss_uplift_fields): Change default action to copy (duplicate) fields. (raptor_rss10_emit_item): Do not emit link to atom:author types in rss1.0 (raptor_rss10_serialize_end): Do not emit atom:author type in rss1.0 * raptor_rss.c: Added atom 1.0 namespace (ATOM1_0_NAMESPACE_URI, ASTOM1_0_NS) and terms. Turn old atom 0.3 terms into 1.0 versions where known using raptor_atom_to_rss. (raptor_rss_parser_processNode): Handle atom feed element properly, make a new channel item. Convert atom 0.3 namespaced elements to atom 1.0 Use atom:id to get a URI for the feed/entry Copy atom:published to dc:date and atom:rights to dc:rights via raptor_rss_uplift_map. (raptor_rss_uplift_fields): Copy dc:date and atom:rights * raptor_rss.c: Added content: namespace CONTENT_NAMESPACE_URI, prefix "content:" Added content:encoded field RAPTOR_RSS_FIELD_CONTENT_ENCODED (raptor_rss_uplift_fields): Added an uplift from description to content:encoded (raptor_rss10_emit_item): Write content:encoded using 2005-07-19 Dave Beckett * raptor_guess.c (raptor_guess_parse_chunk): unused var parser * ntriples_parse.c (raptor_init_parser_ntriples): Do not register interest in text/plain -- too general. 2005-07-18 Dave Beckett * raptor_guess.c: Slim down, to use raptor_parser_exec. (raptor_guess_parse_start): Deleted again. (raptor_guess_parse_chunk): Use guessing and raptor_parser_exec to switch to the right parser. * raptor_internal.h: Added prototype to raptor_parser_exec * raptor_parse.c (raptor_parser_exec): Added to turn one parser type into another in-situ. * rdfdump.c: make -g invoke the guess parser and report the resulting parser at the first triple returned * raptor_guess.c (raptor_guess_parse_start): Added. (raptor_guess_parse_chunk): Pass in buffer to raptor_guess_parser_name since we have it. Work with no content_type such as when using a filename alone. * ntriples_parse.c (raptor_ntriples_parse_chunk): Handle ending on \r\n by updating 'start' by 1 position. * ntriples_parse.c (raptor_ntriples_term): Check sscanf return to catch bad \u or \U hex escape. * turtle_lexer.l (turtle_copy_string_token): Check sscanf return to catch bad \u or \U hex escape. * raptor_general.c (raptor_init): Added guessing parser * configure.ac, Makefile.am: Added raptor_guess.c * raptor_guess.c: guessing parser using content type and an internal parser * raptor_xslt.c (raptor_xslt_parse_start): No need to init column, byte locator. * raptor_rdfxml.c (raptor_xml_parse_recognise_syntax): Guess that application/xml is likely RDF/XML * raptor_internal.h: raptor_parser_factory_s gains a content_type_handler field. * raptor_parse.c (raptor_start_parse): Init locator line, column, byte to -1 (unknown) (raptor_parse_uri_content_type_handler): Added to handle raptor_www content type field return. Pass on to factory method content_type_handler if present. (raptor_parse_uri_with_connection): Init raptor_parse_uri_content_type_handler to receive raptor_www callbacks using raptor_www_set_content_type_handler. (raptor_guess_parser_name): Check static buffer size for overflow. Add some comments. * raptor_xslt.c (raptor_xslt_parse_start): Use raptor_parser_copy_user_state * raptor_parse.c (raptor_parser_copy_user_state): Added. * raptor_internal.h: Added prototype for raptor_parser_copy_user_state * tests/ex-58.rdf, tests/ex-58.out, tests/Makefile.am: Added ex-58. See http://lists.w3.org/Archives/Public/www-archive/2005Jul/0017.html for discussion. * raptor_rdfxml.c (raptor_end_element_grammar): When emitting literals, handle a datatyped empty literal. Merge the property element/member property element code. * tests/ex-57.rdf, tests/ex-57.out, tests/Makefile.am: Added ex-57. See http://lists.w3.org/Archives/Public/www-rdf-comments/2005AprJun/0000.html for discussion. 2005-07-13 Dave Beckett * turtle_lexer.l: Switch qname, blank node and prefix definitions to SPARQL ones. (main): Fixes for gcc4 * turtle_parser.y (main): Fix for gcc4 * raptor_utf8.c (raptor_unicode_is_xml11_namechar): Call raptor_unicode_is_xml11_namestartchar. 2005-07-01 Dave Beckett * configure.ac: Check for isascii, for parsedate.y * parsedate.y: Update source links 2005-06-29 Dave Beckett * raptor_rss.c (raptor_rss_uplift_fields): Fix valid condition. * raptor_rss.c: raptor_rss_uplift_map - added, rss091:pubDate -> dc:date in ISO format (raptor_rss_uplift_fields): Added, to search for fields to uplift. (raptor_rss_uplift_items): Added, to scan items to uplift. (raptor_rss_parse_chunk): Call raptor_rss_uplift_items. 2005-06-17 Dave Beckett * raptor.spec.in: License not Copyright header 2005-06-12 Dave Beckett * raptor_rss.c: update for INN parsedate * configure.ac: Look for parsedate in libINN 2005-06-11 Dave Beckett * Makefile.am: Add parsedate.y to EXTRA_DIST * configure.ac: Better check for parsedate function * raptor_rss.c: Add the time includes for AC_HEADER_TIME * configure.ac: Add the standard AC_HEADER_TIME checks. * raptor_rss.c: Turn rss091:date into dc:date using a date parsing function PARSEDATE_FUNCTION to decode it and strftiem to make the new ISO format. * configure.ac: Get date parsing code from parsedate, curl curl_getdate or raptor parsedate if neither is available. * Makefile.am: Add parsedate.c if PARSEDATE defined Build parsedate.c from parsedate.y * parsedate.y: Fixes to build in raptor * parsedate.y: Imported public domain date parsing code from http://cvs.php.net/php-src/ext/standard/parsedate.y 2005-06-10 Dave Beckett * raptor_rss.c: Added Suzan Foster to copyright 2005-06-08 Dave Beckett * rdfdiff.c: Casts for c++ * win32_raptor_config.h, configure.ac: Bumped version to 1.4.8 * Snapshotted raptor_1_4_7 for 1.4.7 release * libraptor.3: Note no changes in 1.4.6 and 1.4.7 2005-06-07 Dave Beckett * raptor_serialize_rdfxmla.c (raptor_new_qname_from_resource): Fail to split predicate if entire uri is an XML name - it's probably not an absolute URI. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Fail to split predicate if entire uri is an XML name - it's probably not an absolute URI. * raptor_namespace.c (raptor_namespaces_find_namespace_by_uri): Return NULL if ns_uri is NULL. 2005-06-06 Dave Beckett * raptor_rss.c (raptor_rss_emit): Fix crash when no RSS channel is present (Suzan Foster) 2005-06-01 Dave Beckett * Makefile.am: Added ChangeLog.[2-5] * ChangeLog: 2004 to ChangeLog.5 * raptor_rss.c (raptor_rss_parser_processNode): Copy attribute value before storing in the item field. 2005-05-25 Dave Beckett * raptor_xslt.c: docs 2005-05-22 Dave Beckett * configure.ac: Test for libxslt/xslt.h as well as library, and disable if missing. 2005-05-19 Dave Beckett * configure.ac, win32_raptor_config.h: Bumped version to 1.4.7 * Snapshotted raptor_1_4_6 for 1.4.6 release * win32/Makefile.am, win32/rapper.vcproj, win32/raptor.sln, win32/raptor.vcproj, win32/raptortest.vcproj: Import configuration from John Barstow * win32/README.txt: updates * win32_raptor_config.h: Switch to libxml * win32_raptor_config.h: Spelling: RAPTOR_INLINE * raptor_general.c (raptor_init): Added conditionals around serializers: RAPTOR_SERIALIZER_RDFXML/NTRIPLES/RDFXML_ABBREV * Makefile.am: Added conditionally included RAPTOR_SERIALIZER_RDFXML_ABBREV * configure.ac: Added --enable-serializers=LIST and serializers to summary. Reformat other help messages to match. 2005-05-18 Dave Beckett * turtle_parser.y: (main) Move filename here * configure.ac: Add proper check for libxslt * configure.ac: default memory-signing no * configure.ac, rdfdump.c: Bugs to http://bugs.librdf.org/ 2005-05-17 Dave Beckett * raptor_identifier.c, raptor_parse.c, raptor_serialize.c, raptor_serialize_rdfxmla.c, raptor_sax2.c, raptor_rdfxml.c: Casts for RAPTOR_FREE * configure.ac: usage message formatting * raptor_general.c (raptor_free_statement): Casts for RAPTOR_FREE * configure.ac: Added --with-memory-signing raptor signing memory debugging Reformatted some other --with help messages. * raptor_general.c (raptor_sign_malloc, raptor_sign_calloc, raptor_sign_realloc, raptor_sign_free): Added raptor signing memory debugging trigged by RAPTOR_MEMORY_SIGN. * raptor_internal.h: Added raptor signing memory debugging trigged by RAPTOR_MEMORY_SIGN * n3_lexer.l: Use RAPTOR_MALLOC, RAPTOR_FREE * n3_parser.y, turtle_parser.y (directive, resource): Use RAPTOR_MALLOC, RAPTOR_FREE * turtle_lexer.l: Use RAPTOR_MALLOC, RAPTOR_FREE * rdfdiff.c: (rdfdiff_new_file, rdfdiff_new_blank) Use RAPTOR_MALLOC rather than strdup. * raptor_www_curl.c (raptor_www_curl_header_callback): Use RAPTOR_MALLOC on type field data. * rdfdump.c: Add raptor_finish() before usage exit 2005-05-13 Dave Beckett * raptor_rss.c: Casts for C++ * raptor_serialize_rdfxmla.c (raptor_rdfxmla_serialize_init, raptor_rdfxmla_serialize_terminate): Init/free rdf_xml_literal_uri for the rdf:XMLLiteral URI. (raptor_rdfxmla_serialize_statement): Turn datatyped literals that are rdf:XMLLiteral into inline XML, not escaped. 2005-05-12 Dave Beckett * raptor_serialize.c (raptor_rdfxml_serialize_init, raptor_rdfxml_serialize_terminate): Init/free rdf_xml_literal_uri for the rdf:XMLLiteral URI. (raptor_rdfxml_serialize_statement): Turn datatyped literals that are rdf:XMLLiteral into inline XML, not escaped. 2005-05-10 Dave Beckett * configure.ac: Change quotes around bison test * configure.ac: Try to work for older bison version styles 2005-05-08 Dave Beckett * raptor_rss.c: Update from Suzan Foster to reflect the latest status of the enclosure vocabulary and allow multiple common items and fields. Fields in items are now a linked list of raptor_rss_field items. (raptor_rss_context_init): Empty common area. (raptor_enclosure_free): Use raptor_enclosure_free to empty enclosure list. (raptor_rss_field_free): Added to free a list of rss fields. (raptor_clear_rss_item): Use raptor_rss_field_free for freeing duplicate fields. (raptor_clear_rss_common_items): added to empty common item field lists. (raptor_rss_context_terminate): Empty common item fields with raptor_clear_rss_common_items. (raptor_rss_new_field): Added. (raptor_rss_enclosure_add): Added. (raptor_rss_field_add): Added to add a new field value to the list of values for one field item. (raptor_rss_common_add): Added to add a new common item to the list of common items for the current type. (raptor_rss_common_get): Added to get the last common item for the current type. (raptor_rss_parser_processNode): Updates for new fields structure. (raptor_rss_insert_enclosure_identifiers): Update for handling uris and bnodes. (raptor_rss_insert_identifiers): Update for lists for common items and lists of ields. (raptor_rss_emit_enclosure): Update for handling uris and bnodes. (raptor_rss_emit_item, raptor_rss_emit, raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_serialize_statement, raptor_rss10_build_xml_names): Updates for lists of common items and lists of fields. (raptor_rss10_emit_item): Added fix for moving fields to the item when they got stuck on the enclosure when the enclosure uri = the guid. Updates for lists of common items and lists of fields. (raptor_rss10_serialize_end): Updates for lists of common items and lists of fields. 2005-05-04 Dave Beckett * win32_raptor_config.h: Added SIZEOF_UNSIGNED_SHORT 2005-04-17 Dave Beckett * autogen.sh: allow envariables to override the programs 2005-04-16 Dave Beckett * raptor_iostream.c (raptor_string_iostream_finish): Fixes bug 0000021: the output of to_string for an empty model should always be parsable and result in an empty model http://bugs.librdf.org/mantis/view.php?id=21 * raptor_iostream.c (raptor_string_iostream_finish): Return an empty string "" (aka 1 byte, \0) when the stringbuffer is NULL, do not return the NULL. 2005-04-14 Dave Beckett * raptor_parse.c: docs typo 2005-04-11 Dave Beckett * tests/Makefile.am, tests/ex-56.out, tests/ex-56.rdf: Added ex-56 test that relative URIs in datatypes work (Graham Klyne) 2005-04-08 Dave Beckett * raptor_xml_writer.c, raptor_serialize_rdfxmla.c, raptor_serialize.c, raptor_rdfxml.c, raptor_parse.c, raptor_general.c: Add missing switch cases to make -Wswitch-enum happy. * configure.ac: More gcc -W flags in maintainer mode. * raptor_xslt.c: Casts for C++ 2005-04-07 Dave Beckett * raptor_xslt.c (raptor_init_parser_grddl): Expand grddl parser description. * libraptor.3: Added missing 1.4.5 API changes, adding XML writer features and support functions as used by the rdf/xml-abbrev serializer. * tests/Makefile.am: test should use = not == for string compare portability 2005-04-06 Dave Beckett * raptor_xslt.c: Added a list of XPaths to try, fixed searching for a profile. Now handles 2 XHTML forms and XML. (raptor_xslt_parse_chunk): Walk through the list of XPaths. Do not give an error if no GRDDL is found, 0 triples are ok. * raptor_libxml.c (raptor_libxml_error_common): Added, passing in prefix and is_fatal flag. Handle NULL ctx and hence NULL parser. (raptor_libxml_error, raptor_libxml_generic_error, raptor_libxml_fatal_error, raptor_libxml_validation_error): Use the new function, share very common code. * raptor_parse.c (raptor_parser_error_varargs): Survive a NULL parser. * raptor_rdfxml.c (raptor_get_libxml_context, raptor_set_libxml_document_locator, raptor_get_libxml_document_locator): Survive NULL rdf_parser calls. * raptor_internal.h: Added raptor_libxml_init_generic_error_handlers prototype * raptor_xslt.c (raptor_xslt_parse_start): Init column, byte to -1 (raptor_xslt_xmlStructuredErrorFunc): Added, not tested. (raptor_xslt_parse_chunk): Ensure last chunk with is_end is always run. Report error if no XML DOM made. Set xslt context structured error handler to raptor_xslt_xmlStructuredErrorFunc. 2005-04-04 Dave Beckett * raptor_xslt.c (raptor_xslt_parse_chunk): Declare 'nodes' at top of block. Init doc_txt/doc_txt_len earlier so do not free junk. Get the base URI string from the XML doc if it exists. 2005-03-25 Dave Beckett * configure.ac: Added --with-xslt-config Added grddl parser and checking. Added simple search for libxslt needed by grddl. * Makefile.am: Added grddl if RAPTOR_PARSER_GRDDL * raptor_general.c (raptor_init): Added grddl * raptor_libxml.c (raptor_libxml_init_sax_error_handlers): Added to just init the static error handlers for libxml for grddl. * raptor_internal.h: Export raptor_libxml_init_sax_error_handlers for grddl. Added raptor_init_parser_grddl * raptor_xslt.c: Generates triples via in internal rdf/xml parser. (raptor_xslt_parse_start): Copy any user-set handlers to the internal rdf/xml parser. (main): Deleted, experimental code merged. * raptor_xslt.c: Reformed test code into parser named 'grddl' (raptor_xslt_parse_init, raptor_xslt_parse_terminate, raptor_xslt_parse_start, raptor_xslt_parse_chunk, raptor_xslt_parse_recognise_syntax, raptor_xslt_parser_register_factory, raptor_init_parser_xslt): Added 2005-03-24 Dave Beckett * raptor_xslt.c: Fix some memory leaks. * raptor_xslt.c: Remove commented out standalone xslt * Makefile.am: Added bodge raptor_xslt_test * raptor_xslt.c: Raptor GRDDL XSLT * raptor_parse.c (raptor_parse_chunk): docs 2005-03-10 Dave Beckett * n3_lexer.l, turtle_lexer.l: Tidy to use .|\n to match any char * n3_lexer.l, turtle_lexer.l: Added """long literals""" Use yyterminate() to end on errors * tests/turtle/bad-14.ttl, tests/turtle/test-17.ttl, tests/turtle/test-17.out: long literals * tests/turtle/Makefile.am: Added test-17.ttl bad-14.ttl for long literals 2005-03-06 Dave Beckett * raptor_serialize_rdfxmla.c (raptor_new_qname_from_resource): Use maximal xml name length for splitting predicate. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Use maximal xml name length for splitting predicate. 2005-02-21 Dave Beckett * examples/Makefile.am: Add gconf-2.0 to grapper args 2005-02-16 Dave Beckett * examples/grapper.c: Added gconf storing of window width/height at namespace /apps/grapper 2005-02-14 Dave Beckett * win32_raptor_config.h: Define RASQAL_INLINE to __inline * raptor_nfc.c: Change inline to RAPTOR_INLINE * raptor_internal.h: Define RAPTOR_INLINE to inline if not alerady defined to something else 2005-02-12 Dave Beckett * raptor_serialize_rdfxmla.c (raptor_rdfxmla_emit_subject_list_items, raptor_rdfxmla_emit_subject_properties, raptor_rdfxmla_emit_subject, raptor_rdfxmla_serialize_start): Copy base URIs only when they are not NULL. (raptor_rdfxmla_serialize_statement): Handle predicate type RAPTOR_IDENTIFIER_TYPE_RESOURCE as an alternative. 2005-02-10 Dave Beckett * raptor_xml.c (raptor_valid_xml_ID): Just return an error status, don't error out here. 2005-02-08 Dave Beckett * Makefile.am: Add n3_lexer.l n3_parser.y to EXTRA_DIST otherwise building with --enable-maintainer-mode from tarball will fail. * raptor_rss.c: Add RSS enclosures serializing into RSS 1.0 raptor_rss10_serializer_context gains enclosures sequence (raptor_rss10_serialize_init, raptor_rss10_serialize_terminate): Init, free enclosures sequence. (raptor_rss10_store_statement): If subject isn't an RSS item, see if it is an enclosure and if so, set the type. (raptor_rss10_serialize_statement): If type is enclosure, walk the list of enclosures and add a new one if not seen already. (raptor_rss10_emit_item): Add indent arg as this is called recursively. Use it to print spaces from the raptor_rss10_spaces constant. Only serialize an rdf:about if the item has a URI. If field is enc:enclosure, find the enclosure item and write it indented further recursively calling raptor_rss10_emit_item. * raptor_rss.c: re-comment back item enclosure thing 2005-02-07 Dave Beckett * raptor_rss.c (raptor_rss_parser_processNode): Do not assign 'alternate' attribute values when there's no field to use. 2005-02-06 Dave Beckett * configure.ac, win32_raptor_config.h: Bumped version to 1.4.6 * Snapshotted raptor_1_4_5 for 1.4.5 release 2005-02-04 Dave Beckett * autogen.sh: Add autoheader and libtoolize to the path search. * configure.ac: AM_PROG_LIBTOOL to AC_PROG_LIBTOOL seems to make things happier 2005-02-03 Dave Beckett * configure.ac: In maintainer mode, stop if there is no flex. * configure.ac: In maintainer mode, stop if flex is too old or YACC is not GNU bison. * raptor_libxml.c: Use RAPTOR_LIBXML_XMLSAX2INTERNALSUBSET test for a function rather than HAVE_LIBXML_SAX2_H test for a header to work on OSX 10.3.x which has inconsistent system libxml shared library/headers. * configure.ac: Test for xmlSAX2InternalSubset so that it checks for the broken OSX 10.3.x libxml features in the shared library rather than the ones declared in the inconsistent header. 2005-02-02 Dave Beckett * raptor.rdf.in: Updates for schema * tests/Makefile.am (check-rdfxmla): rdfdiff should read $name-rdfxmla.rdf from builddir 2005-02-01 Dave Beckett * rdfdiff.c: C style Move more declarations to start of blocks. * rdfdiff.c (rdfdiff_free_file): Restore what I broke. * rdfdiff.c: C style Move more declarations to start of blocks. * raptor_xml_writer.c (raptor_xml_writer_end_element): Move int decl to start of block. * raptor_serialize_rdfxmla.c (raptor_unique_id): Terminate string right again after I broke it. * rdfdiff.c, raptor_serialize_rdfxmla.c: Casts for C++ * raptor_serialize_rdfxmla.c: C style (raptor_rdfxmla_emit_subject_list_items, raptor_rdfxmla_emit_subject_properties): Declare i at start of block. * rapper.1: rdfxml-abbrev * rdfdump.c: Widen help formatting for longer serializer name * raptor_xml_writer.c: Various C style fixes. Make an enum for raptor_xml_writer_flags. Added XML_WRITER_ prefixes to macro and defines. Moved spaces_buffer to module static. Noted struct nsd and namespaces sorting are duplicated code. Docucomments for several methods (not yet used by doc system) noting use of the flags. * Makefile.am: clean rdfdiff * Makefile.am: rdfdiff to EXTRA_PROGRAMS for now * Imported rdf/xml with abbreviations serializer 'rdfxml-abbrev' written by Steve Shepard . Steve's changes are as follows: * Makefile.am: Added dependencies for rdfdiff.c and raptor_serializer_rdfxmla.c * raptor.h: Added RAPTOR_FEATURE enums and api for new xml_writer features that support auto-indentation and auto-empty element detection. * raptor_feature.c: Added support for new xml_writer auto-indentation and auto-empty features. * raptor_general.c: Initialization of rdfxml-abbrev serializer. * raptor_internal.h: Prototype for void raptor_init_serializer_rdfxmla(void); * raptor_serialize_rdfxmla.c: New rdfxml raptor_serializer that handles some of the abbreviations specified by "RDF/XML Syntax Specification (Revised)." * rdfdiff.c: New tool to diff rdf files. * tests/Makefile.am: Added tests for rdfdiff and the rdfxml-abbrev serialization format. 2005-01-26 Dave Beckett * rapper.1: mention what RSS tag soup can do * turtle_parser.y, n3_parser.y: Rename raptor_new_triple/raptor_free_triple to have n3/turtle in the name. * raptor_internal.h, raptor_general.c, n3_parser.y, n3_lexer.l, n3_common.h, configure.ac, Makefile.am: Update Notation3 code with later Turtle improvements. Built it with maintainer mode only. * turtle_lexer.l (turtle_copy_token): Renamed from copy_token (turtle_copy_string_token): Renamed from copy_string_token. (main): filename moved here from global! 2005-01-24 Dave Beckett * raptor_rss.c (raptor_rss_emit_item): Do not emit an items property, that's only done by raptor_rss_emit_connection. 2005-01-22 Dave Beckett * raptor_rss.c: Added RSS1.1 namespace http://inamidst.com/rss1.1/ (raptor_rss_parser_processNode): Turn Channel into RSS type channel. (raptor_rss_emit_type_triple, raptor_rss_emit_enclosure, raptor_rss_emit_item, raptor_rss_emit_connection, raptor_rss_emit): Add error return value and stop if there is no identifier. (raptor_rss_emit): Stop if channel or any item has no identifier. (raptor_rss_parse_chunk): Pass on failures from above to user. (raptor_rss10_build_xml_names): Replace RSS1.1 namespace with RSS1.0 (raptor_rss10_emit_item): Add item_type arg and use it to only emit items for the channel. 2005-01-21 Dave Beckett * raptor.h: Added const to src arg of raptor_ntriples_string_as_utf8_string. * libraptor.3: Deprecate raptor_ntriples_string_as_utf8_string * raptor.h: Deprecate raptor_ntriples_string_as_utf8_string - rather too internal to be useful, since it only works with a parser. * ntriples_parse.c (raptor_ntriples_term_valid): Remove rdf_parser arg; only for a fatal error - just die. (raptor_ntriples_term): Make start a const arg. When copying UTF8 bytes, move on the correct number of bytes in src and dest. Update use of raptor_ntriples_term_valid. (raptor_ntriples_string_as_utf8_string, raptor_ntriples_parse_line): Update uses of raptor_ntriples_term_valid. 2005-01-17 Dave Beckett * raptor_general.c (raptor_statement_part_as_counted_string): Declare language_len to NULL, uri_string as unsigned char*. 2005-01-16 Dave Beckett * raptor_rss.c (raptor_rss10_emit_item): Copy original base_uri each time, a raptor_new_xml_element is made and don't lose the original reference. * raptor_xml_writer.c (main): Copy original base_uri each time, don't lose the original reference. 2005-01-15 Dave Beckett * raptor_general.c (raptor_statement_part_as_counted_string): Initialise language_len, uri_string used in some cases to prevent gcc warnings. * configure.ac, win32_raptor_config.h: Bumped version to 1.4.5 * Snapshotted raptor_1_4_4 for 1.4.4 release * raptor_rss.c (raptor_rss10_emit_item): Portability - declare rdf_Seq* variables at start of block. 2005-01-13 Dave Beckett * win32_raptor_config.h, win32/Makefile.am, win32/rapper.dsp, win32/raptor.dsp, win32/raptor.dsw, win32/raptortest.dsp: win32 build update (patch from Dave Viner) * win32_raptor_config.h: RAPTOR_INTERNAL should be defined in the build configuration 2005-01-12 Dave Beckett * raptor_rss.c: Recognise old RSS 0.9 namespace and handle it as rss 1.0. 2005-01-04 Dave Beckett * raptor_serialize.c: (raptor_rdfxml_serialize_start, raptor_rdfxml_serialize_statement): Only copy non-NULL base URIs * raptor_rss.c: (raptor_rss10_move_statements, raptor_rss10_store_statement, raptor_rss10_build_xml_names, raptor_rss10_emit_item):Handle predicates of type RAPTOR_IDENTIFIER_TYPE_RESOURCE as well as type RAPTOR_IDENTIFIER_TYPE_PREDICATE * raptor_general.c (raptor_free_statement): Free predicate URIs that were RAPTOR_IDENTIFIER_TYPE_RESOURCE * raptor_uri.c (raptor_uri_to_relative_counted_uri_string): Handle no path in base URI (main): Add test for that and test for no path in both. * raptor_uri.c (raptor_uri_to_relative_counted_uri_string): Handle no path in reference URI (main): Add test for that 2005-01-03 Dave Beckett * configure.ac, win32_raptor_config.h: Bumped version to 1.4.4 * Snapshotted raptor_1_4_3 for 1.4.3 release * raptor_rdfxml.c (raptor_xml_start_element_handler): Updates for unsigned char* string namespace URI strings. * raptor_namespace.c: Turn namespace URI string constants into unsigned char* strings. * raptor_identifier.c (raptor_identifier_print): Casts for printing rdf:XMLLiteral URI string constant. * raptor_general.c: Turn rdf:XMLLiteral URI string constant into a unsigned char* string. (raptor_print_statement, raptor_print_statement_part_as_ntriples): Casts for printing above constants. * raptor_uri.c (raptor_default_new_uri_for_rdf_concept): Use RDF namespace URI string constants. * Makefile.am: Link libraptor.la for URI tests, to get the namespace URI string constants. * raptor.h: Turn namespace URI string constants into unsigned char* strings. Change namespace URI defines into uses of the constants. * rdfdump.c (main): Init parser_feature and serializer_feature to -1 to avoid compiler warnings. * raptor_rss.c (raptor_rss10_serialize_statement): Init item to NULL to avoid a compiler warning. * rdfdump.c, raptor_uri.c, raptor_serialize.c, raptor_rss.c, raptor_parse.c: Casts for c++ * raptor.h: remove old comment re xml writer 2005-01-02 Dave Beckett * rdfdump.c: set serializer features before starting to serialize * rdfdump.c: Actually set parser feature values again. Set strings for parser or serializer string feature values. * raptor_general.c: 2005 copyrights * rapper.1: No simple output format anymore * rapper.1: Added RSS 1.0 ref 2005-01-01 Dave Beckett * rapper.1: Update for new parser, serializers, xmlns syntax * raptor_serialize.c (raptor_serializer_set_feature_string): Docs, and return values for integer value features (raptor_serializer_get_feature_string): Return a new string for the start uri if set. * raptor_parse.c (raptor_parser_set_feature_string): Docs, and return values for integer value features * libraptor.3, raptor.h: Added raptor_uri_to_counted_string and raptor_uri_to_string * raptor_uri.c (raptor_uri_to_counted_string,raptor_uri_to_string): Added. * libraptor.3: changelog edit - cluster 1.4.3 entries by class * libraptor.3: Added raptor_parser_get_feature_string, raptor_parser_set_feature_string, raptor_serializer_set_feature_string, raptor_serializer_get_feature_string, raptor_feature_value_type, raptor_namespaces_find_namespace_by_uri * raptor_serialize.c, raptor_general.c: Use raptor_rdf_namespace_uri and raptor_rdf_namespace_uri_len to replace some constants. * raptor_serialize.c (raptor_rdfxml_serialize_statement): Handle ordinal subject and objects. * raptor_serialize.c: Add XML Writer to raptor_rdfxml_serializer_context, delete depth. (raptor_rdfxml_serialize_init): Delete depth stuff. (raptor_rdfxml_serialize_terminate): Tidy up xml writer, namespaces and rdf:RDF element. (raptor_rdfxml_serialize_declare_namespace): Don't copy uri, prefixes since raptor_new_namesapce_from_uri copies them anyway. (raptor_rdfxml_serialize_start): Convert to use xml writer. (raptor_rdfxml_serialize_write_xml_attribute): Deleted. (raptor_rdfxml_serialize_statement, raptor_rdfxml_serialize_end): Convert to use xml writer. * raptor_xml_writer.c (raptor_xml_writer_empty_element): Ensure namespace declarations are removed at end of element. * raptor.h: Added raptor_namespaces_find_namespace_by_uri * raptor_namespace.c (raptor_namespaces_find_namespace_by_uri): Added. * libraptor.3, raptor_sax2.c, raptor_rss.c, raptor.h: raptor_xml_declare_namespace renamed to raptor_xml_element_declare_namespace * raptor_rss.c (raptor_rss10_build_xml_names): Use raptor_xml_declare_namespace * raptor_rss.c: (raptor_rss10_build_xml_names): Use raptor_xml_declare_namespace * raptor_sax2.c, raptor.h: raptor_sax2_declare_namespace renamed to raptor_xml_declare_namespace * raptor_serialize.c (raptor_new_serializer): Default to emitting relative URIs * raptor_serialize.c (raptor_rdfxml_serialize_ok_xml_name): Deleted. (raptor_rdfxml_serialize_statement): Replace use of raptor_rdfxml_serialize_ok_xml_name with raptor_xml_name_check for XML 1.0 names. * raptor_sax2.c, raptor_rdfxml.c, raptor.h, libraptor.3: Rename raptor_xml_element_get_element to raptor_xml_element_get_name * raptor_rss.c: Added rss:image and rss:textinput properties * raptor_rss.c (raptor_rss10_store_statement): Don't lose statements that are about a known type node, but of unknown predicate. (raptor_rss10_serialize_end): Add more debug info on remaining statements. * raptor_rdfxml.c (raptor_start_element_grammar): Update raptor_new_xml_writer call. * raptor.h: raptor_new_xml_writer gets nstack parameter. raptor_xml_writer_start_namespace_full deleted * libraptor.3: raptor_new_xml_writer gets nstack param. raptor_xml_writer_start_namespace_full gone * raptor_general.c (raptor_free_statement): Don't free null pointers. raptor2-2.0.15/RELEASE.html0000644000175000017500000050765212425345013012075 00000000000000 Raptor RDF Syntax Library - Release Notes

Raptor RDF Syntax Library - Release Notes

Raptor2 2.0.15 changes

This release mainly made general bug fixes as well as several fixes to the Turtle / N-Triples family of parsers and serializers. It added utility functions for re-entrant sorting of objects and sequences and a few other useful methods.

Issues Fixed:

  • 0000574: Language tags with underscore
  • 0000575: Wrong API or wrong API documentation
  • 0000576: Wrong assert for a counted string being nul terminated
  • 0000577: iri parsing does not conform to REC-n-quads-20140225
  • 0000579: raptor_world_generate_bnodeid accepts world not parser
  • 0000581: My patch for parser and serializers count
  • 0000584: raptor fails to parse trig files with dos line endings

Parser changes

Fixed raptor_grddl_filter_triples() check for three URIs which has been broken since 2007 but just did more work. Found via gcc5 warning.

The TRiG parser now accepts \r newlines between the graph name and the following '{'. Fixes Issue #0000584

Turtle, TRiG, N-Triples and N-Quads parsers now check escapes correctly for URI strings. \t \b \n \r \f are forbidden. Check that raw ' ' or \u0020, \u003C or \u003E are also not accepted. Fixes Issue #0000577

N-Triples / N-Quads parsers nwo accept '_' as an alias for '-' in lang strings. '_' is not legal. Fixes Issue #0000574

Updated RDFa parser (librdfa) to support full URLs for typeof from upstream. Re-checked several tests which have been passing for some time but the expected output was not a correct conversion from the testsuite sparql.

Serializer changes

Turtle serializer now writes () instead of rdf:nil via Pull Request #16 from Richard H. McCullough. Thanks!

I/O-stream class changes

raptor_iostream_decimal_write() and raptor_iostream_hexadecimal_write now return non-0 if they do not succeed in writing successfully. Fixes Issue #0000575

Term class changes

raptor_new_term_from_blank() now also accepts "" as the same as a NULL blank node ID argument.

URI class changes

Fixed raptor_uri_counted_filename_to_uri_string() to use the passed in len, not look for end NUL char and count lengths. Fixes Issue #0000576.

raptor_new_uri_from_counted_string() no longer assumes a NUL terminated string. Remove a debug assert and use fwrite() to emit the counted URI string to the debug file handler.

Fixed raptor_uri_normalize_path() to check the size of output buffer is big enough.

Writer class changes

Fixed raptor_turtle_writer_quoted_counted_string() to use the passed in length, drop the strlen() call and use the length internally. Fixes Issue #0000576.

World class changes

Added raptor_world_get_parsers_count() and raptor_world_get_serializers_count() with patch from Victor Porton. Thanks! Fixes Issue #0000581.

Other Changes

Made raptor work with Travis CI again; have to download and install Bison 3.

Added raptor_sort_r() and raptor_sequence_sort_r() re-entrant sort utility methods based on the public domain sort_r code by Isaac Turner.

Ensure raptor_locator_format() always adds a NUL to terminate the output string.

Fix a -99 <= var <= 99 timezone interval check. Thanks to Richard Trieu for the report.

Improve configure warning check using AC_LANG_WERROR

Use C99 __FUNCTION__ replacing __func__ from C90.

Improve build-time flex and bison output to be more silent.

Added Intel C compiler (icc) support from Sebastian Freundt (hroptatyr on GitHub) - Thanks.

Raptor2 2.0.14 changes

Many code quality fixes from clang and coverity primarily in error path cleanups (out of memory cases) and dead code.

Parser changes

Turtle 1.1 parser: fixes about triple quoting alignment with SPARQL from the www-rdf-comments list post REC report of problem and expected answer.

Other changes

Fixed RDFa 1.0 and RDFa 1.1 test suites to properly report failures.

Updated the fix-flex and fix-bison scripts to remove dead code that clang and coverity complain about.

Raptor2 2.0.13 changes

Issues Fixed:

  • 0000562: N-Quads parsing of URIs with ' fails

Parser changes

The N-Triples / N-Quads parser was updated to allow ' in URIs. Fixes Issue #0000562.

Configuration changes

Use the discovery of the xml2-config(1) / curl-config(1) programs as test for presence of the libraries. This fixes the issue where that after configuring, curl was present but was not used for WWW fetching. This is seen when the output of curl-config --cflags is empty / whitespace.

Updated to use the AC_CHECK_PROGS macro to find jing since AC_CHECK_PROG doesn't default to setting it as found when present!

Internal changes

The Turtle and parsedate parsers and the turtle lexer were updated to use and require Bison 3.0.0.

The JSON and turtle writers were updated to save several expensive strlen() calls.

Raptor2 2.0.12 changes

Parser changes

The N-Triples / N-Quads parser was updated to pass all the two test suites for the updated specifications:

The main fixes were:

  • allow \b and \f escapes (from Turtle, SPARQL)
  • fix the allowed blank node identifier characters
  • require all URIs to be absolute
  • handle a single short document with no end of line
  • support NULs inside literals
  • handle unescaped newlines inside literals

Term class changes

Added raptor_new_term_from_counted_string() to create a term from a Turtle or N-Triples string syntax. This is the opposite of raptor_term_to_turtle_counted_string() and raptor_term_to_turtle_string() and also reads the strings created by raptor_term_to_counted_string() and raptor_term_to_string().

Raptor2 2.0.11 changes

Issues Fixed:

  • 0000556: Problem with relative URI in rdf:about, rdf:resource etc.
  • 0000554: RDF/XML serializer does not canonicalize attribute order in XMLLiterals

Parser changes

N-Triples parser was updated to support all of RDF 1.1 N-Triples - A line-based syntax for an RDF graph (aka N-Triples 2013) It now supports # comments after the end of lines, checks for illegal unicode escapes, checks for bad URIs and checks language tags. Also removed support for legacy N-Triples "foo"-LANGTOKEN. Many internal changes were also made.

RDF/XML parser fixed the XML Canonicalization so that it writes the XML attributes in sorted order. Fixes Issue #0000554.

URI class changes

Added raptor_uri_uri_string_is_absolute() to check if a URI is absolute.

QName class changes

Added raptor_qname_format_as_xml() to turn a qname into an XML declaration.

Configuration and build changes

Restructured code to build an internal librdfa convenience library (never installed) so that newer automake will stop moaning about subdir-objects.

configure now checks for clang to correctly find supported warnings.

Various portability and build fixes (Daniel Richard G)

Build fixes: make check will now work if jing is not installed (for feed XML generation validation).

Other changes

Fixed a few issues found with LLVM 3.4 (SVN) run with address sanitizing.

Raptor2 2.0.10 changes

Issues Fixed:

  • 0000532: configure.ac: required file `src/raptor_config.h.in' not found
  • 0000535: configure accepts bogus values for --with-xml2-config
  • 0000545: Reopen issue 503
  • 0000548: xml:lang inside rdf:parseType="Literal" are removed in parsed output

Parser changes

Turtle parser was updated to handle Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013 (Turtle 2013) The main changes were to align with SPARQL-style blank node names, prefixes and local names.

N-Triples parser was updated to handle N-Triples - A line-based syntax for an RDF graph W3C Working Group Note 09 April 2013 (N-Triples 2013) The main changes were to allow \b \f, UTF-8 in strings and URIs and the SPARQL-style blank node names.

RDF/XML parser updated to understand the new RDF 1.1 datatypes: rdf:HTML and rdf:langString

Serializer changes

Updated N-Triples and Turtle serializers (via writers) for 2013 versions based on SPARQL 1.1 definitions. These new formats have incompatible changes.

Added functions for writing escaped Turtle / N-Triples terms:

int raptor_string_escaped_write(const unsigned char *string,
  size_t len, const char delim, unsigned int flags, raptor_iostream *iostr);

int raptor_term_escaped_write(const raptor_term *term, unsigned int flags,
  raptor_iostream* iostr);

int raptor_uri_escaped_write(raptor_uri* uri, raptor_uri* base_uri,
  unsigned int flags, raptor_iostream *iostr);

These uses the new new raptor_escaped_write_bitflags enum bitflag values for the flags argument.

Deprecated raptor_string_python_write() for raptor_string_escaped_write() with flags.

Configuration and build changes

configure now recommends flex 2.5.36

configure was updated to switch configuring libxml and libcurl to use the PKG_PROG_PKG_CONFIG and PKG_CHECK_MODULES macros. The preference remains to prefer looking for the xml2-config and curl-config programs before trying pkg-config unless --with-curl-config=no --with-xml2-config=no are used.

configure now dies if xml2-config or xslt-config point at non executable files. Patch from Michael Stahl - thanks. Fixes Issue #0000534

configure now adds curl or libxml pkg-config requires only if they were found via pkg-config; this prevents unnecessary dependency on pkg-config files if they are not needed.

Updated autogen.sh and code to handle variations of header macro. Fixes Issue #0000532

Raptor2 2.0.9 changes

Issues Fixed:

  • 0000499: Turtle parser fails to correctly parse valid syntax
  • 0000508: Raptor objects to possibly valid Turtle syntax
  • 0000520: compilation failure
  • 0000521: Python RDF 1.0.14.1 segfault when one tries to parse xhtml+rdf using the RDFa parser
  • 0000526: Document how to find gtkdocize in INSTALL.html

Parser Changes

RDFa parser: Handle non-namespaced elements without crash in RDFa. Fixes Issue #0000521

Turtle Parser: Added full support for Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013

This includes accepting new keywords from SPARQL (BASE and PREFIX), triples forms and details of the characters allowed in URIs, Literals, Prefix Names, Local Names and Blank Node identifiers. Some existing documents that used \-escapes in URIs to encode characters not allowed in URIs, are now forbidden. For example ASCII 32 (0x20) - space, which should be written as %20.

Serializer changes

Turtle Serializer: Added full support for Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013 which particular effects the encoding of URIs in the serializer.

Configuration and build changes

Added CMake build framework for building Raptor on Microsoft Windows. Removed the old win32/ area and win32_raptor_config.h references. Contributed by Daniel Richard G. for Teragram Inc.

Ensure that a small system BUFSIZ does not affect parser guessing Patch from Daniel Richard G for Teragram Inc.

Added a compile-time check for raptor_world_guess_parser_name() to ensure that RAPTOR_READ_BUFFER_SIZE is at least as large as FIRSTN, because otherwise the guesser sees fewer than FIRSTN bytes from the document. Patch from Daniel Richard G for Teragram Inc.

Update configure to allow xml2-config and curl-config to work for libxml and libcurl. It now report on the source of xml, curl libraries in the configuration status.

autogen.sh updates to abort the run if a configuring program fails, Generate NEWS with old timestamp if missing so automake can run.

Handle the libxml2 ret->checked field not being present in older libxml2 versions. The entities checked field was added 2006-10-10 in libxml2 GIT commit a37a6ad91a61d168ecc4b29263def3363fff4da6and released in libxml2 2.6.27 on 2006-10-25. Fixes Issue #0000520

Other changes

raptor_www_set_ssl_verify_options() now supports the Curl 7.28.1 removal of CURLOPT_SSL_VERIFYHOST with a value of 2. Now verify_host non-0 means to verify CN, 0 means to not verify.

Remove -m MODE from the rapper(1) help message which was removed in commit f94fa561db05b21132b14a2b72f05b77e666c252 on Wed Apr 28 21:31:54 2010 -0700 as part of the Raptor V2 work.

Raptor2 2.0.8 changes

Issues Fixed:

  • 0000381: Raptor incorrectly serializes turtle lists when list nodes are URIs.
  • 0000487: Does raptor_world_guess_parser_name [librdf_parser_guess_name2] ever return NULL?
  • 0000505: Parsing certain escaped unicode strings in Turtle cases an error
  • 0000507: Turtle parse error causes fatal error

Parser class changes

Guessing a parser with raptor_world_guess_parser_name() now returns NULL failure when the guess is very poor, rather just return the first bad result. Fixes Issue #0000487 which was reported in Redland librdf but is implemented here.

Guess parser: now returns error file and line location information from the guessed parser.

RDFa parser: Updated librdfa to the latest GIT supporting RDFa 1.1 with 30 tests still not passing - mostly issues in the core librdfa. Made several resilience and crash fixes. Updated the RDFa 1.0 test suite to latest tests and made fixes. The RDFa parser now accepts aliases 'rdfa10', 'rdfa11' and the default 'rdfa' is RDFa 1.1

RSS tag soup parser: Use time() when gettimeofday() is not available. Fix several reference leaks.

RDF/XML parser: The range of RDF/XML entity recognizing heuristic was broadened to allow recognition of documents produced by Stanford's Protege software (and possibly others). Fixed some parser memory leaks / double frees.

Turtle parser: Do not report multiple errors for Turtle string decoding problems. When a Turtle qname cannot be found, a fatal error is no longer generated but a regular error message giving information on the qname that failed (usually due to unknown prefix). Fixes Issue #0000507

SAX2 API changes

raptor_sax2_inscope_xml_language() will now return "" for explicit no language (xml:lang="") as well as NULL for undefined language (no xml:lang present).

Serializer class changes

Turtle: Do not emit a Turtle (...) collection if the list item is a URI. This fixes Issue #0000381.

Term class changes

Added raptor_term_to_turtle_counted_string() counted string form of raptor_term_to_turtle_string.

Unicode class changes

raptor_unicode_utf8_string_put_char() and raptor_unicode_utf8_string_get_char() now allow reading / writing U+D800 to U+DFFF (UTF-16 surrogates). rather than returning failure. BOMs remain forbidden - definitely not UTF-8. Fixes Issue #0000505

URI class changes

Fixed URI resolving with reference (relative) URIs that are bare queries like '?y' with no path. Now matches the specification RFC3986 section 5.4.1 Normal Examples.

Added raptor_new_uri_relative_to_base_counted() to construct URI relative to current base.

Added raptor_uri_to_turtle_counted_string() counted string form of raptor_uri_to_turtle_string.

WWW class changes

The Curl WWW implementation now interprets Content-Locationcode> header as absolute or relative URI.

Configuration and build changes

All configure --with-foo options now handle --without-foo (and --with-foo=no) to disable attempting to find the value in the PATH. This can be used with --with-xml2-config, --with-xslt-config, --with-curl-config, --with-icu-config and --with-libwww-config where the value 'no' or --without-foo can be used to disable it and prevent automatic searches for the config script in the PATH.

The -DRAPTOR_DEBUG and -DMAINTAINER_MODE flags are now written to the config header instead of added to CPPFLAGS.

The -g flag is no longer added to CFLAGS or CPPFLAGS with --enable-debug.

The existing --disable-release (default) now correctly removes -O options in flag variables for the maintainer.

autogen.sh now looks for the environment variable NOCONFIGURE to prevent it running configure at the end of the auto generation run.

The configure vsnprintf() check was made more comprehensive.

Other changes

Multiple portability improvements to vsnprintf code and macros. Also fixed uninitialized variable problems in non-c99 variant of raptor_vsnprintf2(). Thanks to John Emmas for reporting.

Multiple portability fixes for building out of the source tree. Out of source tree 'make check' and 'make dist' should both work. Thanks to Daniel Richard G. for the patches.

Multiple portability fixes for building on old Solaris versions. Thanks to Daniel Richard G. for the patches.

Multiple portability fixes for building on Windows including strcasecmp(), windows headers, configuration fixes, parsedate code, URI test builds, vsnprintf building. Thanks to Daniel Richard G. for the patches.

Updated the example rdfguess to accept a file called or no arguments to read from stdin.

Raptor2 2.0.7 changes

CVE-2012-0037 fixed

Issues Fixed:

  • 0000448: Turtle parser does not return error status from turtle_parse_chunk()
  • 0000469: Allow rapper to bypass server SSL certs checks in libcurl

Removed Expat support since expat has not had a release in years and libxml2 works well. This allows some code simplification. Updated configure so that if Raptor is configured with no parser that requires an XML parser, libxml2 will not be required.

Removed internal Unicode NFC checking code used for checking RDF/XML literals conformance which was expensive to check and a large of compiled-in static dataset that was rather out of date. Replaced with optional compiled use of ICU. If ICU is not explicitly configured, no literal checking is done.

Options changes

Added new options:

RAPTOR_OPTION_NO_FILE
Deny file requests during parsing. Enabled by default.
RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES
Allow loading of XML external entity loading. Disabled by default.
RAPTOR_OPTION_WWW_SSL_VERIFY_PEER
Controls verifying an SSL peer during parsing / WWW. Takes an integer value: non-0 to verify peer SSL certificate (default 1).
RAPTOR_OPTION_WWW_SSL_VERIFY_HOST
Controls verifying an SSL host during parsing / WWW. Takes an integer value: 0 none, 1 CN match, 2 host match (default). Other values are ignored.

Parser class changes

The RDF/XML, RSS Tag Soup and RDFa parsers now pass on network, file and entity loading parser options to the internal SAX2 to enable enforcing of network, file and entity loading policy.

RDF/JSON parser handles an API change between YAJL V1 and V2.

Turtle parser now returns parser errors to raptor_parse_chunk(). Fixes Issue #0000488

SAX2 class changes

Added raptor_sax2_set_uri_filter() to set a URI filter for any SAX2 calls that do internal lookups of URIs.

Control file and network loading inside SAX2. Option RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES now enforces loading external XML entities and is by default enabled. If enabled, RAPTOR_OPTION_NO_FILE and RAPTOR_OPTION_NO_NET are also checked. All URIs loaded are also passed through any URI filter, if set by raptor_sax2_set_uri_filter().

URI class changes

Added new URI constructor raptor_new_uri_from_uri_or_file_string() to build a URI from a URI string or a filename string, normalizing the result to a file: URI.

Added raptor_uri_uri_string_to_counted_filename_fragment() to turn a URI string to a filename and URI fragment along with string output string counts.

Added utility methods for checking if a file: URI or filename is a file that exists: raptor_uri_file_exists() and raptor_uri_filename_exists()

WWW class changes

Added raptor_www_set_ssl_verify_options() to set SSL verify options. Fixes Issue# 0000469.

The raptor_www_fetch() call now returns the status from any URI filter that returns a non-0 response.

Build changes

Added --with-icu-config=PATH option to enable use of ICU for NFC checking.

Requires automake 1.11.2+ for -Wextra-portability

configure uses AM_PROG_AR to make automake -Wextra-portability happy.

Raptor2 2.0.6 changes

Fixed expat support which was broken in 2.0.5

Handle libCurl SSL options before 7.16.4 (that's 2007) since old libcurl is still around on Enterprise (that means old) linux systems.

Sequence Changes

Added utility functions to swap elements, reverse the sequence and generate permuations:

    int raptor_sequence_swap(raptor_sequence* seq,
      int i, int j);

    int raptor_sequence_reverse(raptor_sequence* seq,
      int start_index, int length);

    int raptor_sequence_next_permutation(raptor_sequence *seq,
      raptor_data_compare_handler compare);

Raptor2 2.0.5 changes

Issues Fixed:

  • 0000465: c99 snprintf usage
  • 0000476: Add Format URIs to raptor_syntax_descriptions
  • 0000479: raptor 2.0.4 : -i nquads fails to treat the context term as optional bugs.librdf.org
  • 0000481: Invalid unicode characters cause raptor to emit infinite output while converting n-quads to n-triples

Parser class changes

Updated all parser URIs to use the W3C Format URIs as the primary URIs. Existing URIs become aliases. (Nicholas J Humfrey)

GRDDL parser: Correctly set the base_uri when resolving the sheet URI.

N-Quads parser: Make context optional. (Lauri Aalto) Fixes Issue #0000479.
When guessing formats, make N-Quads always beat N-Triples since since now all ntriples parse fine with the nquads parser. (Lauri Aalto)

RDFA parser: fix when building with 64-bit systems to prevent value truncation.

Turtle parser: now uses the official text/turtle mime type in the syntax recognizing code.

Serializer class changes

Updated all serializer URIs to use the W3C Format URIs as the primary URIs. Existing URIs become aliases. (Nicholas J Humfrey)

Turtle serializer now uses the official text/turtle mime type in the syntax recognizing code. Do not generate infinite output when the input Unicode UTF-8 encoding is bad. Fixes Issue #000481.

Unicode class changes

Added new utility functions for calculating number of Unicode characters in a UTF-8 string raptor_unicode_utf8_strlen() and getting a subset of a UTF-8 string raptor_unicode_utf8_substr():

    int raptor_unicode_utf8_strlen(const unsigned char *string,
        size_t length);

    size_t raptor_unicode_utf8_substr(
        unsigned char* dest, size_t* dest_length_p,
        const unsigned char* src, size_t src_length,
        int startingLoc, int length);

URI class changes

raptor_uri_string_to_relative_uri_string() now compares URI paths not files. (Joe Presbrey) Fixes Issue #0000472

Build changes

The library no longer needs trunc(), lround(), round() or anything else from libm. Removed the checks for these functions from configure.

configure no longer enables debug messages by default for --enable-maintainer-mode but now requires the --enable-debug option to be given.

Other changes

Records GIT version in the version string when building from GIT sources with --enable-maintainer-mode. This makes it clearer when an non-released version is being used.

Added internal raptor_format_integer() which enabled the removal of all internal use of snprintf().

Added raptor_vsnprintf2() deprecating raptor_vsnprintf() which does not actually have the vsnprintf() calling contention. Added raptor_snprintf() with snprintf() calling convention. Added raptor_vasprintf() with vasprintf() (GNU) calling convention.

    int raptor_vsnprintf2(char *buffer, size_t size, 
			  const char *format, va_list arguments);
    int raptor_snprintf(char *buffer, size_t size, const char *format, ...);

    int raptor_vasprintf(char **ret, const char *format, va_list arguments);

raptor_locator_format() now picks a large enough buffer size if snprintf() is likely not portable, when HAVE_C99_VSNPRINTF is not defined. Fixes Issue #0000465

Internal code style changes for how allocation is done and casting with new macros.

RAPTOR_GOOD_CAST: code checks or logic ensures cast will not truncate

RAPTOR_BAD_CAST: value may be truncated; may require API change/break. Might be unrealistic e.g. a >4G error message, qname prefix.

Some good uses:

  • narrowing a known, checked unicode char to a U16

Some 'bad' uses:

  • only handing error messages, literal language, qname prefixes of a max len constrained by int
  • passing in data to libxml constrained by int max len
  • locator column field constrained to int size

Some bad uses:

  • iostream read_bytes and write-bytes methods return int but could easily return a lot more in the size_t range (compare to fread). API change needed.
  • locator byte field constrained to int size. should be size_t
  • raptor_nfc_check returns int offset into a buffer that could be larger
  • raptor_ntriples_parser_context changed line_length and offset to size_t
  • raptor_turtle_parser changed buffer_length to size_t

Updated code to use size_t for sizes such as those from strlen() and ptrdiff_t for pointer differences so that on 64-bit architectures, values are not potentially truncated to size of int.

Raptor2 2.0.4 changes

Issues Fixed:

  • 0000308: undefined reference to round and trunc while cross compiling for mipsel
  • 0000449: ntriples serializer and parser inconsistent w.r.t. _ in name tokens
  • 0000451: Incorrect qname definition in TRiG parser
  • 0000455: Incorrect AVL tree operations. [ with fix ]
  • 0000456: raptor-2.0.3 fails to build against yajl-2.0.2 API
  • 0000457: raptor-2.0.3 fails to build with curl-7.21.7

Parser class changes

The raptor_option enumeration gains values for setting SSL client side certificates: RAPTOR_OPTION_WWW_CERT_FILENAME for the certificate filename, RAPTOR_OPTION_WWW_CERT_TYPE for the certificate type and RAPTOR_OPTION_WWW_CERT_PASSPHRASE for the certificate passphrase.

raptor_parser_parse_uri_with_connection() (which is called by raptor_parse_uri()) now uses raptor_www_set_ssl_cert_options() to turn the parser options above into settings on the WWW object.

RDF/JSON parser: Gains support for building with YAJL V2. Note that YAJL V1 and V2 both install the same library name 'libyajl' even though they have different ABI and APIs.

TRiG parser: Fixed to support the legal uri : { ... } syntax naming a graph where the ':' is optional.

Turtle parser: Modified to not include the internal input() function in the lexer which is never needed.

Serializer class changes

N-Triples and Turtle serializers: Now use raptor_bnodeid_ntriples_write() to always write legal blank node IDs.

WWW class changes

Added support for raptor_www to handle setting SSL client certificate options during WWW retrieval.

Added raptor_www_set_ssl_cert_options() method to set the SSL client certificates on a WWW object.

Other changes

Make Raptor build against Curl 7.21.7 which removed a header file that was made an empty file in the libcurl source code on April 26 2004 around version 7.12.0 which is now the minimum version Raptor supports..

Fixed an AVL Tree issue during deletion that messes up some pointers. Patch from 'v-for-vandal'. Thanks.

Added a utility function raptor_bnodeid_ntriples_write() to write a N-Triples blank node ID in legal form, replacing any letters not in the allowed set.

Expanded GCC warnings and corrected a few internal uses of int when size_t was meant. Others remain.

Reduced stack use of raptor_www_file_handle_fetch() and raptor_parser_parse_iostream() by moving I/O buffer to the www or parser objects respectively.

Raptor2 2.0.3 changes

The main change is to add the new main header file raptor2.h. The new header has been added to allow applications to be sure they have got the raptor V2 header (with #include <raptor2.h> and not the raptor V1 header file (#include <raptor.h>). The raptor.h header will NOT be removed until the next major raptor release (V3).

Turtle / TRiG parser changes

Alter the parser to not use a large token stack when parsing TRiG graphs, enabling the parser to handle much larger files. The parser still gathers all input into a single memory segment so the maximum amount of input is probably memory size/3.

TRiG parser now allows a QName for the graph name.

Attempted to make the parser handle streaming lexing and parsing but only partially successful; bison could be made to stream parse but flex could not be made to stream lex. This meant it could not be convinced to return a "need more input" response at the end of a chunk of data and continue lexing later.

Fix value ownership fix graph name. Fixes Issue #0000437

Other Changes

Raptor was ran through the LLVM clang static code analyzer and several issues fixed, mostly in unused variables and in unlikely error recovery conditions. Some actual potential crash bugs were found:

  1. The workaround for ancient libxml2 error handling in raptor_libxml_xmlStructuredError_handler_parsing() was broken for some time, so that probably means nobody uses old libxml2.
  2. librdfa URI resolving in rdfa_resolve_uri() used unallocated memory in some relative URI cases.

Bison 2.4 is required to build Raptor from GIT source with no pregenerated files.

Raptor2 2.0.2 changes

Fixed a too strict version checking bug in raptor_new_world()

Raptor 2.0.1 Changes

DO NOT USE. Use 2.0.2 which fixes a too strict version checking bug in raptor_new_world()

Parser class changes

The internal librdfa parser that uses Raptor internals now exports symbols prefixed with raptor_librdfa so that Raptor can be linked with the standard librdfa in applications without symbol clashes. Fixes Issue #0000416

Serializer class changes

The N-Quads serializer was fixed to output the graph name in the fourth column, instead of repeating the object.

Internal changes

Replaced all internal fatal errors that went to an abort() with regular logged error.

Raptor 2.0.0 Changes

Raptor V2 final release. See the release notes for 1.9.0 and 1.9.1 for the major changes in Raptor V2.

API changes since 1.9.1 beta

Added raptor_syntax_description_validate() to public API to validate and compute counts for syntax descriptions. Primarily this is for use by Rasqal.

The raptor_syntax_description now has an array of URI strings instead of a single one, to allow URI aliasing. This is primarily for use by Rasqal.

Fixed guessing by URI in raptor_world_guess_parser_name() which was not working.

Fixed Issues:

  • 0000405: RDFa parser does not handle base href with single quoted value

Raptor 1.9.1 Changes

1.9.1 is the second beta release of Raptor 2 and intended to be the last release before 2.0.0.

Raptor V1 to V2 upgrading changes

Improved the upgrade-script.pl raptor V1 to V2 upgrade script to handle changes to enums and macros as well as handle statement field renaming. Updated the generated documentation to also include enum and macro changes.

Added defensive code in each constructor to check the passed-in raptor world object is a valid Raptor V2 world rather than V1. It generates a warning once per run of the program.

The raptor_new_world() function is now a macro that calls an internal function raptor_check_world_internal() with a version macro argument to detect when Raptor V2 is invoked with an inconsistent header and library.

AVLTree class changes

Free the iterator at the end of debug method raptor_avltree_print().

I/O Stream class changes

Fix major copying too much error in the internal raptor_read_string_iostream_read_bytes() memcpy that could cause crashes - the function always copied the maximum amount the user requested in the read method even if the string was smaller.

Parser class changes

JSON parser: Made relative URIs option work.

N-Quads parser: Added. The serializer already existed.

librdfa parser: Updated to latest librdfa GIT 1a1a08c790b7649a7f6c12fb9e40c0d3dbe70481

Serializer class changes

Fix raptor_serializer_start_to_iostream() to prevent crash when this method is used more than once on the same serializer.

RSS/Atom serializer: Fix crashes with feeds containing entries with blank node items.

Stringbuffer class changes

Added utility methods raptor_stringbuffer_append_uri_escaped_counted_string() and raptor_stringbuffer_append_hexadecimal().

Term class changes

Deleted raptor_term_as_counted_string() and raptor_term_as_string(). Since 1.9.0 was an unstable API, this is allowed.

Added raptor_term_to_counted_string() replacing deleted raptor_term_as_counted_string().

Added raptor_term_to_string() replacing deleted raptor_term_as_string().

URI class changes

Added convenience methods for constructing URI terms from strings: raptor_new_term_from_counted_uri_string() and raptor_new_term_from_uri_string().

Use string lengths in equals and comparisons for faster checking. Use memcmp() instead of strncmp() when lengths are known and the same.

WWW class changes

The CURL WWW module now looks for and uses the HTTP response Content-Location: header to get the base URI for content retrievals. This allows these base URIs to be used in parsing content retrived from URIs. Fixes Issue #0000402

Raptor 1.9.0 Changes

1.9.0 is the first beta release of Raptor 2. There may be changes and additional releases before version 2.0.0 with the final stable API.

This is a major update and cleanup to the Raptor API and ABI with additions, removals and changes. There are also major restructurings of the internal code and cleanups. There are also some new features in the form of additional APIs, new serializers and parsers.

The details of the additions, removals and changes of functions, structures, typedefs and enums are listed in the Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 1.9.0. The upgrading document explains how to upgrade existing code that uses the V1 APIs to use the new APIs.

The major changes in this release are:

  • Removed all deprecated functions and typedefs.
  • Renamed all functions to the standard raptor_class_method form.
  • All constructors take a raptor_world argument.
  • URIs are interned and there is no longer a swappable implementation.
  • Statement is now an array of 3-4 RDF Terms to support triples and quads.
  • World object owns logging, blank node ID generation and describing syntaxes.
  • Features are now called options and have typed values.
  • GRDDL parser now saves and restores shared libxslt state.
  • Added serializers for HTML 'html' and N-Quads 'nquads'.
  • Added parser 'json' for JSON-Resource centric and JSON-Triples.
  • Switched to GIT version control hosted by GitHub.
  • Added memory-based AVL-Tree to the public API.

Fixed Issues:

  • 0000357: raptor_term_as_string does not return N-Triples escaped string, although API says so
  • 0000361: HTML Table serializer
  • 0000369: Unescaped quotes in long literals (Turtle/N3) cause parser failure if at the end of the literal
  • 0000370: Odd behaviour regarding the parsing of Trig files
  • 0000373: Remove deprecated GTK symbols
  • 0000379: raptor libxslt security policy conflicts with apps that also use libxslt and set security policy

General changes

Renamed the library name and package tarball name to a new separate names (libraptor2, raptor2-X.tar.gz) so they can be distinguished and installed into the same system as raptor 1 without file clashes. Note: This does not apply to the rapper(1) utility and it's manual page which are in both packages. Packagers should stop packaging the rapper(1) binary and the rapper manual page from raptor 1, in preference to the raptor 2 version.

Nicholas J Humfrey is a new committer.

A utility script docs/upgrade-script.pl is automatically generated from the changes data to aid migrating from Raptor 1 to Raptor 2 APIs. If it is not a simple rename, the script annotates the change as a comment near the code.

Raptor's Statement, Term and URI classes can fully replace librdf's librdf_statement, librdf_node and librdf_uri classes. This has been tested with GIT versions when both Rasqal and librdf are configured with --with-raptor2. When raptor 2 is stable, Rasqal and librdf will default to use these..

Documentation changes

The API reference manual now includes an automatically generated reference section on the functions and types that were added, removed and changed between raptor 1 and raptor 2 APIs. It also includes an automatically generated section on the parser and serializers with their names, mime types and Q values.

The tutorial examples were updated to the Raptor 2 APIs.

NOTE: At this time, the descriptive parts of the tutorial have NOT been updated to use the Raptor 2 API.

World class changes

A log handler function for receiving warnings and errors (fatal or other) are now all sent to a single log handler of type raptor_log_handler registered to the world class with raptor_world_set_log_handler(), rather than handlers set for each parser, sax2, serializer or www instance. Several constructors lose error handler and error data parameters consequently.

The enumerating approach for listing the known parsers and serializers and writing into variables passed in, was replaced with methods that return pointers to static raptor_syntax_description objects to allow more parameters to be returned. This allowed the removal of multiple older calls that kept having to gain new return arguments. The description also returns a list of (mime type, qname) pairs using a new typedef raptor_type_q. It includes a set of bitflags for some simple information such as RAPTOR_SYNTAX_NEED_BASE_URI to describe when a syntax requires a base URI passed in, otherwise is not needed or optional.

raptor_world_set_libxml_flags() is replaced with raptor_world_set_flag() which are simple flags that require no initialisation of the world since they are used before it is opened. This means that it cannot use the Options module for world flags. New flag RAPTOR_WORLD_FLAGS_URI_INTERNING allows disabling of the URI interning using an AVL-Tree which can use up memory.

raptor_world_set_libxslt_security_preferences() and raptor_world_set_log_handler() gains an int return value to report failure if world is already opened.

Moved the generation of blank node IDs from the parsers (many objects) to the world class (1 object). Cannot think of good reasons why the blank node ID generation policy needs to be different per-parser. Enumeration raptor_genid_type was deleted since only the blank node type was ever used.

AVL Tree changes

The internal memory-based AVL Tree implementation is exposed as a public API.

Features changes

Replaced with raptor_options

Identifier class changes

Replaced with Term class.

raptor_identifier_type enum was removed and replaced with enum raptor_term_type and a smaller set of 3 possible term types. The enum values match the int values used in librdf_node_type.

I/O Stream class changes

Constructors all gain a world argument.

Some methods now return an int error status such as raptor_iostream_write_end()

Many classes iostream writing methods and methods of the iostream class itself were changed to follow the standard raptor_CLASS_write naming convention and to put the iostream argument at the end.

Deprecated typedef raptor_iostream_handler was removed

Deprecated functions were removed: raptor_new_iostream_from_handler(), raptor_iostream_get_bytes_written_count() and raptor_iostream_write_string_turtle()

Locator changes

Renamed some methods to follow the raptor_locator_method standard.

Namespaces and namespace stack classes changes

Constructors all gain a world argument and lose error handler, error data arguments.

Options

A new name for what were called features in Raptor 1 and this was expanded to allow use of values types string, integer and boolean. Options can be set on multiple classes such as parser, serializer but are centrally described using the new raptor_option_description structure.

The option get / set operations were reduced from multiple methods per class for getting / setting an int, int / string to just one get and one set, with optional parameters. It can also handle adding new types later, which will be passed in as strings and converted internally.

The options code introduces a new enum raptor_domain which essentially is for describing a class such as parser. For example options listed for domain RAPTOR_DOMAIN_PARSER will be usable with the parser option get and set methods raptor_parser_get_option(parser, ...) and raptor_parser_set_option(parser, ...).

Parser class changes

raptor_parser_set_strict() was removed and replaced with a new parser option RAPTOR_OPTION_STRICT.

Parser object methods to return information about the parser class were removed since they can be done instead via fields of the static object returned from raptor_world_get_parser_description(). Deleted functions include raptor_parser_get_label(), raptor_parser_get_mime_type(), and raptor_parser_get_need_base_uri().

Parsing may generate start graph and end graph events for syntaxes that return graph names such as TRiG. These are returned by the handler of typedef raptor_graph_mark_handler set by new function raptor_parser_set_graph_mark_handler() which returns a start or end event of type enum raptor_graph_mark_flags.

raptor_parser_get_accept_header() fixed length of static string to ensure NUL is copied.

Many functions were renamed to match the raptor_parser_method naming standard. Some of these get a long longer, but are at least consistent. For example raptor_parse_uri() becomes raptor_parser_parse_uri().

Deprecated typedef raptor_ntriples_parser was removed.

Deprecated functions were removed: raptor_ntriples_term_as_string(), and raptor_ntriples_string_as_utf8_string()

The librdfa parser was updated with the latest updates to the RDFa syntax (first, rel/rev, whitespace, xml:lang) and fixes issues with non-terminated strings.

The GRDDL parser now saves and restores the libxslt global state (handlers, security preferences) so that it does not affect other applications in the same memory space. Part of this can be overridden with raptor_world_set_libxslt_security_preferences() which allows user code to disable raptor touching the security preferences entirely. Fixes Issue #0000379

The RDF/XML parser never generated special names for bag IDs (bagidNNN), so all support for that has been removed.

The RDF/XML parser uses the new reference-counted URIs and raptor terms to prevent a lot of malloc/free for temporary uses.

Removed RDF/XML parser feature RAPTOR_FEATURE_ASSUME_IS_RDF since it did nothing since at least 2003, maybe earlier.

Added a JSON parser (name 'json') that can read both the resource-centric and triples JSON RDF formats. Requires the YAJL JSON parser library. Contributed by Nicholas J Humfrey.

Moved the generation of blank node IDs from the parsers (many objects) to the world class (1 object). Cannot think of good reasons why the blank node ID generation policy needs to be different per-parser.

QName class changes

Constructors all gain a world argument and lose error handler, error data arguments.

Sequence changes

Use new generic raptor_data_free_handler, raptor_data_print_handler, raptor_data_context_free_handler, raptor_data_context_print_handler data-focused handlers which are shared with the AVL Tree.

Serializer class changes

Added raptor_serializer_flush() for user code to indicate to a serializer to flush state since the application knows a block has been ended, or it needs to save memory. No serializer currently implements this, but it is expected the abbreviated serializers that use a lot of state - Turtle, RDF/XML-Abbrev - would benefit from this.

Added an HTML Table serializer with name 'table' contributed by Nicholas J Humfrey.

Removed the obsolete 'simple' serializer from the source code. N-Triples is an appropriate simple (and well-defined) replacement syntax.

Statement class changes

This was made a more regular class that can be created, copied and freed using reference counting. The structure changed to be an array of 4 raptor terms rather than a complex union focused on the allowed RDF Statements. This change allows representing non-RDF triples as well as triples with named graphs (also known as quads).

raptor_statement_part_as_counted_string() turns into a method of the new Term class, as a "statement part" is now represented as a Term.

Term class changes

This new class with an open structure replaces raptor_identifier and was created to represent an RDF Term: literal, URI or blank node and is reference counted and dynamic. It is a union of fields for three types.

This class can fully replace librdf's librdf_node when both Rasqal and librdf are built with --with-raptor2. The semantics of comparison (ordering) and equality are the same.

Unicode changes

Several utility functions were renamed to match their functionality more accurately and be associated with the Unicode module set of functions. For example raptor_utf8_check() was renamed to raptor_unicode_check_utf8_string()

URI class changes

The whole concept of URI handlers was removed, there is no longer a way to replace the implementation of the URI class. The implementation built in now interns URIs string so that a single URIs for a string is only ever in memory once, but reference counted. This is what Redland librdf has done for many years, and librdf can fully use this.

Deprecated functions were removed: raptor_uri_is_file_uri().

The raptor_uri_resolve_uri_reference() now returns the length of the URI written into the buffer.

WWW class changes

Rename several of the functions to the standard constructor, destructor and method naming format.

XML Writer class changes

Constructors all gain a world argument and lose error handler, error data arguments.

Configuration changes

Added configure argument --with-yajl=DIR (or 'no') to set the prefix where YAJL libraries and headers are installed.

Raptor headers are now installed in a sub-directory of PREFIX/include.

raptor-config was removed. Building against raptor 2 should be done only using pkg-config with either --cflags or --libs arguments like this:

  cc -o prog prog.c `pkg-config raptor2 --cflags`  `pkg-config raptor2 --libs`

Internal changes

Code style: lots of changes mostly adding lots more whitespace such as to show control change (if, while) or early function exit (return).

All strcpy() with known lengths and strncpy() were replaced with memcpy() which is quicker and compilers optimize better.

Code style: use TYPE* var_name = RAPTOR_CALLOC(TYPE, 1, sizeof(*var_name)) rather than repeat the type name which can be error-prone.

Code style: put whitespace round assignment and operators i.e. use c = a + b rather than c=a+b.

Code style: removed some strdup()s.

Code style: try to remove un-necessary strlen() by tending to pass around a string with it's length, a counted string. This meant adding a few new constructors such as for the URI and Term classes.

Code style: methods called with a NULL object return failure and destructors called with a NULL object return silently rather than the former mix of crashing or abort()ing.

Code style: copy constructor is now called raptor_class_copy() rather than raptor_new_class_from_class() for brevity.

Code style: print methods return an int return status indicating success.

rapper Utility changes

Print out the option types next to the description in the -f help usage message.

Removed unused -a flag from code.

Did NOT rename -f option to match the renaming of features to options in the API. Not needed.

Removed long deprecated -n flag which was shortcut for selecting the N-Triples parser and can be done with -i ntriples

Removed -s/--scan flag since it is an option of a single parser (RDF/XML) which can be done with -f/--feature scanForRDF.

Other changes

Removed support for building raptor with dmalloc debugging (removing --with-dmalloc configure argument). Valgrind wins.

The example 'grapper' GNOME GUI utility for raptor was updated to the latest GTK APIs (2.5.0+ but still quite old) so that it builds with all the GTK 'disable deprecated' flags set. The UI is not quite correct though - the preferences menu is broken.

Switched to GIT version control, hosted by GitHub. The latest raptor 1 code is available on branch 'raptor1' as well as from the release tags for specific versions.

Raptor 1.4.21 Changes

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway.

Fixed Issues:

  • 0000318: Cannot end a Turtle literal with \\ inside triple-quotes
  • 0000319: ntriples parser does not register that it accepts ntriples mime type - text/plain
  • 0000326: Turtle parser allows '.' in qnames which is not-to-spec
  • 0000331: Turtle long literals with raw newlines do not count line numbers correctly
  • 0000332: RDFXML parser finds duplicates and misbehaves (when it shouldn't)
  • 0000337: raptor/turtle outputs invalid qnames which cause syntax errors on parsing

Parser changes

N-Triples parser: Declare acceptance of text/plain mime type with q=0.1

RDFA parser (via librdfa): Updated to fix some buffer management problems when it was passed large blocks (4096 bytes or more), a few memory leaks and some other minor bugs.

RDF/XML parser: Properly reset the ID-checking set at the start of each parse.

Turtle parser: Allow \\ at the end of triple-quoted literals. Forbid '.'s in prefixes and qnames (follow specification). Properly count newlines inside the literals for error reporting.

Serializer changes

Turtle serializer: Forbid '.'s in prefixes and qnames (follow specification).

Other Changes

Updated configure and the build system to use silent rules for the maintainer (by default), or when --enable-silent-rules is passed to configure. This feature requires building with automake 1.11 which requires autoconf 2.62 or newer when building from GIT.

autogen.sh script was updated to enforce the autotools versions above.

Raptor 1.4.20 Changes

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

Fixed Issues:

  • 0000306: rapper doesn't handle datatype=""and xml:lang="" properly with RDFa
  • 0000307: configure fails at vnsprintf test when cross compiling
  • 0000310: Raptor does not like single character namespaces with RDFa
  • 0000312: Ununitialized pointer in example rdfserialize.c causes crash

Parser Changes

GRDDL parser: Fix XML parser context resource leak if raptor_grddl_fetch_uri() fails. Save and restore error handlers properly to prevent crashes when an error is reported during parsing.

RDFA parser (via librdfa): Update to latest librdfa GIT sources with head a438ce68a40e04b399ec2b2c613d0c867d9315c7
now moved to http://github.com/msporny/librdfa to fix handling single character namespaces (Issue #0000310), empty datatype attribute and empty xml:lang attributes (Issue #0000306)

Added three unapproved RDFa tests 0172, 0173 and 0174 to cover the fixes above.

Serializer Changes

Turtle serializer: Applied scalability patch from Chris Cannam. This switches the serializer to use a raptor_avltree instead of a raptor_sequence for the subject and blanks used with raptor_abbrev_node_lookup(). This fixes a performance problem in the serializing and moves lookups from O(N) to O(log N) - from list to balanced tree.

Other Changes

If cross compiling, check for vsnprintf() C99 compatible at runtime by setting define CHECK_VSNPRINTF_RUNTIME during configuration. Fixes Issue #0000307

Use calloc() for allocating a raptor_statement in rdfserializer.c example code to properly initialise state. Fixes Issue #0000312

Use AC_SYS_LARGEFILE to get large file IO checks which allows 32-bit systems to read multi-gigabyte files.

autogen.sh script fix for if test when uname is not in standard OSX dir.

Raptor 1.4.19 Changes

WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

Fixed Issues:

  • 0000259: Fix NFC check for legal combiner sequence
  • 0000262: Error when raptor_new_uri() fails in Turtle parser
  • 0000263: Invalid turtle output syntax on empty integer/double/decimal literals
  • 0000266: Default/atom namespace in atom serializer output
  • 0000269: strstr is called in raptor_parse_chunk() on a buffer string, where it should be called on a null-terminating string.
  • 0000270: RSS serializer fixes for g++
  • 0000276: Fix raptor_sequence_set_at() when setting beyond end
  • 0000277: broken collection abbreviation in turtle serialization
  • 0000287: Fix raptor_sax2_parse_chunk() calling raptor_log_error_to_handlers() with expat
  • 0000288: raptor_get_feature function does not return feature value
  • 0000289: Fix RDFa parser problem when there is a subject and predicate specified on an element, but no child nodes for the object literal
  • 0000290: Fix performance problems when turtle parsing with lots of namespaces
  • 0000293: Fix RDF/XML Parser problem with legacy ordinal predicates
  • 0000296: Avoid calling xsltSetDefaultSecurityPrefs()
  • 0000299: Avoid calling xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc()
  • 0000303: rdfa parser does not parse content as RDFa which librdfa+expat alone handles

Parser Changes

raptor_get_feature() now returns the integer value rather than just 1 or 0.
Issue #0000288

Guess parser: return name of guessed parser not 'guess'.

N-Triples parser: Produce error messages when raptor_new_uri() fails.
Issue #0000262

RDFa parser: Fix problem when there is a subject and predicate specified on an element, but no child nodes for the object literal using latest librdfa GIT source with head 2ddcb3f9e010d0b3d9ee546e807539be5da1b14a
Issue #0000289

RSS tag soup parser: Huge internal changes:
Recording more atom core structures in triples (such as author, contributor - person) rather than only channels and items
Introduced a new 'blocks' concept to record single element structured items such as atom category, link and rss enclosure
Added itunes namespace and container.

RDF/XML Parser: Adjust predicate_type when removing ordinal identifier type from predicate.
Issue #0000293

Serializer Changes

Atom 1.0 serializer: Now tested and takes more care to try to generate valid Atom 1.0

Turtle serializer: Validate XSD integer, decimal and double literal output. Emit special short forms only if the whole literal value is consumed by strtol() (for integers) or strtod() (for decimals and doubles). Otherwise produce a warning and emit literal in the normal "value"^^<datatype_uri> format.
Issue #0000263
Fix broken collection abbreviation
Issue #0000277

RSS serializer: Fixes for g++
Issue #0000270
Added a new serializer feature RAPTOR_FEATURE_PREFIX_ELEMENTS (short name prefixElements) for atom and rss 1.0 serializers to decide whether core elements in the default namespace are declared with the prefix or without a prefix.
Removed generation of deprecated predicate ordinals of type RAPTOR_IDENTIFIER_TYPE_ORDINAL and replace with resource type URIs

XML Support Changes

Removed generic calls to xmlSetStructuredErrorFunc() and xmlSetGenericErrorFunc() which can be a problem when libxml is shared with other code in memory. They may be called optionally but will do a save/restore of the existing functions. This protection is enabled by the new API call raptor_set_libxml_flags() to set the flags from values in enum raptor_libxml_flags.
Issue #0000299

Use context-specific libslt security configuration to avoid calling generic call xsltSetDefaultSecurityPrefs() which can be a problem when libxslt is shared with other code in memory. Allow the user to set the policy for raptor globally with new API function raptor_set_libxslt_security_preferences().
Issue #0000296

Make libxml SAX2 structured errors register parser-specific handler function raptor_libxml_xmlStructuredErrorFunc() instead of libxml global structured error handler. The libxml flag method above can still enable registerding the global error handlers.

In raptor_sax2_parse_chunk() fixed calls to raptor_log_error_to_handlers() when built with expat.
Issue #0000287

Other Changes

Win32 portability fixes from Lou Sakey:

  • Handle absence of gettimeofday()
  • Call xmlCleanupParser() libxml call last to avoid an access violation on windows.
  • Windows vsnprintf() portability patch
  • raptor_sequence_set_at() fixed to maintain the design contract: provide "size" consecutive items in "sequence" starting from "start" even when setting items more than +1 offset beyond the end of sequence.
    Issue #0000276

rapper(1) utility changes: if counting, do not use a serializer at all.

Internal Changes

More internal changes to be more resiliant after allocation failure (Lauri Aalto)

Reorganised tests in source tree to pull out specific directories for RDF/XML, Turtle, etc.

Use a DJ Bernstein hash to replace a linked list for storing a stack of namespaces. This makes turtle parsing with lots of namespaces (100s) much faster. Based on the initial patch in the bug.
Issue #0000290

Use new internal raptor_memstr() function to compare a string against a buffer that may not be NUL terminated.
Issue #0000269

raptor_error_handlers: API structure gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_error_handlers) changed. Source compatibility not broken.

raptor_identifier: API structure gains world field. BINARY COMPATIBILITY BREAK: sizeof(raptor_identifier) changed. Source compatibility not broken.

More fixes for compiling with C++

Move some more static data as constant to enable more efficient compilation - moves to data segment of object binary.

Use memmove for overlapping copy, not memcpy when doing relative URI resolving.

Raptor V2 Preparation Changes

Lots of internal changes were made by Lauri Aalto preparing for Raptor V2 to fully attach all static data and config to a new raptor_world object. A new static instance of this class is now used internally behind the existing V1 API and will be required to be constructed by the library user for the V2 API with a new constructor/destructor.

NOTE: The method names here are illustrative of the final V2 names but are not confirmed - These functions are not supported in the 1.4.x series. Some methods will still be altered for fields and (raptor_world) parameters. All constructors should have it as a parameter. All methods will not have them (so for example, all the URI methods named _v2 will lose the world parameter and just have the URI parameter - but that is also because the URI handler/context part will go into raptor_world in V2)

To use the unsupported and experimental V2 functions, define -DRAPTOR_V2_EXPERIMENTAL=1 when building with raptor.

Added raptor_world typedef.

Added raptor world class constructor raptor_world* raptor_new_world(void) and initializer: int raptor_world_open(raptor_world* world)

Added world class destructor: void raptor_free_world(raptor_world* world)

Added new V2 methods:

  void raptor_world_set_libxslt_security_preferences(raptor_world *world,
    void *security_preferences)

  void raptor_world_set_libxml_flags(raptor_world *world,  int flags)

  void raptor_error_handlers_init_v2(raptor_world* world,
    raptor_error_handlers* error_handlers);

Added V2 methods that are versions of existing methods, named with _v2 suffix:

  int raptor_parsers_enumerate_v2(raptor_world* world,
    const unsigned int counter, const char **name, const char **label)

  int raptor_syntax_name_check_v2(raptor_world* world, const char *name);

  void raptor_print_locator_v2(raptor_world* world, FILE *stream,
    raptor_locator* locator);

  const char *raptor_locator_uri_v2(raptor_world* world,
    raptor_locator *locator);

  int raptor_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name,
    raptor_uri **uri, const char **label);

  int raptor_serializers_enumerate_v2(raptor_world* world,
    const unsigned int counter, const char **name, const char **label,
    const char **mime_type, const unsigned char **uri_string);

  int raptor_serializer_syntax_name_check_v2(raptor_world* world,
    const char *name);

  int raptor_serializer_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name,  raptor_uri **uri,
    const char **label);

Added world pointer to raptor_identifier object

Added V2 identifier class constructor:

  raptor_identifier* raptor_new_identifier_v2(raptor_world* world,
    raptor_identifier_type type, raptor_uri *uri,
    raptor_uri_source uri_source, const unsigned char *id,
    const unsigned char *literal, raptor_uri *literal_datatype,
    const unsigned char *literal_language);

Added V2 parser class method:

  raptor_parser* raptor_new_parser_for_content_v2(raptor_world* world,
    raptor_uri *uri, const char *mime_type, const unsigned char *buffer,
    size_t len, const unsigned char *identifier)
  raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser);

Added V2 serializer class constructor and method:

  raptor_serializer* raptor_new_serializer_v2(raptor_world* world,
    const char *name)
  raptor_world* raptor_serializer_get_world(raptor_serializer* rdf_serializer)

Added V2 statement class raptor_statement_v2 typdef for future replacing of raptor_statement

Added V2 statement class methods:

  void raptor_print_statement_v2(const raptor_statement_v2 * statement,
    FILE *stream);

  unsigned char* raptor_statement_part_as_counted_string_v2(raptor_world* world,
    const void *term, raptor_identifier_type type,
    raptor_uri* literal_datatype, const unsigned char *literal_language,
    size_t* len_p);

  unsigned char* raptor_statement_part_as_string_v2(raptor_world* world,
    const void *term, raptor_identifier_type type,
    raptor_uri* literal_datatype, const unsigned char *literal_language);  

  int raptor_statement_compare_v2(const raptor_statement_v2 *s1,
    const raptor_statement_v2 *s2);

Added V2 uri class methods:

  unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p);

  raptor_uri* raptor_new_uri_v2(raptor_world* world,
    const unsigned char *uri_string);

  raptor_uri* raptor_new_uri_from_uri_local_name_v2(raptor_world* world,
    raptor_uri *uri, const unsigned char *local_name);

  raptor_uri* raptor_new_uri_relative_to_base_v2(raptor_world* world,
    raptor_uri *base_uri, const unsigned char *uri_string);

  raptor_uri* raptor_new_uri_from_id_v2(raptor_world* world,
    raptor_uri *base_uri, const unsigned char *id);

  raptor_uri* raptor_new_uri_for_rdf_concept_v2(raptor_world* world,
    const char *name);

  void raptor_free_uri_v2(raptor_world* world, raptor_uri *uri);

  int raptor_uri_equals_v2(raptor_world* world, raptor_uri* uri1,
    raptor_uri* uri2);

  int raptor_uri_compare_v2(raptor_world* world, raptor_uri* uri1,
    raptor_uri* uri2);

  raptor_uri* raptor_uri_copy_v2(raptor_world* world, raptor_uri *uri);

  unsigned char* raptor_uri_as_string_v2(raptor_world* world, raptor_uri *uri);

  unsigned char* raptor_uri_as_counted_string_v2(raptor_world* world,
    raptor_uri *uri, size_t* len_p);

  raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_xmlbase_v2(raptor_world* world,
    raptor_uri* old_uri);

  raptor_uri* raptor_new_uri_for_retrieval_v2(raptor_world* world,
    raptor_uri* old_uri);

  unsigned char* raptor_uri_to_relative_counted_uri_string_v2(raptor_world* world,
    raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p);

  unsigned char* raptor_uri_to_relative_uri_string_v2(raptor_world* world,
    raptor_uri *base_uri,  raptor_uri *reference_uri);

  void raptor_uri_print_v2(raptor_world* world,
    const raptor_uri* uri, FILE *stream);

  unsigned char* raptor_uri_to_counted_string_v2(raptor_world* world,
    raptor_uri *uri, size_t *len_p);

  void raptor_uri_set_handler_v2(raptor_world* world,
    const raptor_uri_handler *handler, void *context);

  void raptor_uri_get_handler_v2(raptor_world* world,
    const raptor_uri_handler **handler, void **context);

Added V2 www class methods:

  raptor_www *raptor_www_new_with_connection_v2(raptor_world* world,
    void* connection);

Added V2 qname class methods:

  raptor_qname* raptor_new_qname_from_namespace_local_name_v2(raptor_world* world,
    raptor_namespace *ns, const unsigned char *local_name,
    const unsigned char *value);

Added V2 namespace class methods:

  raptor_namespace_stack* raptor_new_namespaces_v2(raptor_world* world,
    raptor_simple_message_handler error_handler, void *error_data, int defaults);

  int raptor_namespaces_init_v2(raptor_world* world,
    raptor_namespace_stack *nstack,
    raptor_simple_message_handler error_handler, void *error_data,
    int defaults);

Added V2 sequence class typedefs and methods:

  typedef void (raptor_sequence_free_handler_v2(void* context, void* object));

  typedef void (raptor_sequence_print_handler_v2(void *context, void *object,
    FILE *fh));

  raptor_sequence* raptor_new_sequence_v2(raptor_sequence_free_handler_v2* free_handler,
    raptor_sequence_print_handler_v2* print_handler, void* handler_context);

  void raptor_sequence_set_print_handler_v2(raptor_sequence *seq,
    raptor_sequence_print_handler_v2 *print_handler);

Added V2 iostream class methods:

  int raptor_iostream_write_uri_v2(raptor_world* world,
    raptor_iostream *iostr,  raptor_uri *uri);

  void raptor_iostream_write_statement_ntriples_v2(raptor_world* world,
    raptor_iostream* iostr, const raptor_statement *statement);

Added V2 xml writer class methods:

  raptor_xml_writer* raptor_new_xml_writer_v2(raptor_world* world,
    raptor_namespace_stack *nstack, raptor_iostream* iostr,
    raptor_simple_message_handler error_handler, void *error_data,
    int canonicalize);

  int raptor_xml_writer_features_enumerate_v2(raptor_world* world,
    const raptor_feature feature, const char **name, raptor_uri **uri,
    const char **label);

Raptor 1.4.18 Changes

Fixed Issues:

  • 0000186: Add RDFa support to Raptor
  • 0000255: rss-tag-soup serializer does not generate namespaces so re-serializing in rdf/xml looks wierd for atom

Parser Changes

A new RDFa parser was added (name rdfa) using librdfa to implement it. librdfa is linked as part of Raptor and written by Manu Sporny of Digital Bazaar, licensed with the same license as Raptor.

The RDFa test suite was added to the test and (via librdfa) Raptor passes all but 4 tests which fail due to different output xmlns attribute ordering (which does not matter to XML parsers).

Serializer Changes

Added new function raptor_serialize_start_to_iostream() to have the new semantics of not owning and destroying the passed-in iostream. This allows the caller to serialize to an existing iostream and then to continue to write to it. raptor_serialize_start() owns and then closes the iostream that is passed in.

A new Atom Syndication Format 1.0 (RFC 4287) serializer was added (name atom) using the RSS 1.0 RDF triple model with mapping to atom terms and consideration of atom output format conditions.

RSS 1.0 serializer

  • Allow setting output namespaces for the serializer
  • Allow writing extra RDF triples as RDF/XML attached to RSS items.
  • Recognize predicates with XML Literal and emit as parseType="Literal" or when content:encoded, as a CDATA block, by RSS 1.0 convention.
  • Removed code assumptions about triples appearing in a certain order.
  • Free namespaces and stack in correct order

Turtle serializer now respects the writeBaseURI feature to control generating the @base directive.

Abbreviated serializers (RDF/XML Abbrev and Turtle) now remove duplicate triples.

Added feature RAPTOR_FEATURE_RSS_TRIPLES to add RDF triples to RSS 1.0 or Atom serializer output with values 'rdfxml' or 'atom-triples'. Atom triples writes at:map sections for the atom:entry elements and at:feedmap and at:entrymap sections to the atom:feed elements. at:contentType is used to provide a type attribute value for an atom:content that has a URI value.

Added RAPTOR_FEATURE_ATOM_ENTRY_URI for the Atom serializer to set the URI of an atom entry. If the URI matches the URI of an entry item in the RDF mode of the channel, then an Atom Entry document is generated rather than an Atom Feed document.

QName Class Changes

Added raptor_qname_to_counted_name() to get a formatted qname for a name.

raptor_new_qname_from_namespace_local_name() will accept a NULL namespace to construct a namespace-less qname.

Sequence Class Changes

raptor_sequence_set_at() now handles setting an item at an index in the sequence beyond capacity+1 to automatically extend.

Added raptor_sequence_delete_at() to delete an item at a position in a sequence and return it.

URI Class Changes

raptor_uri_to_relative_counted_uri_string() now has support for a base URI with scheme and authority but no path, so the result can be a relative URI starting with '/'.

XML Writer Class Changes

XML Writer allows adding newlines via raptor_xml_writer_newline() which requires use of raptor_xml_writer_flush() to indicate when XML writer output is finished.

Added raptor_xml_writer_get_depth() to get the current XML writer element stack depth.

Other Changes

Many more resiliance checks were added.

Removed all calls to abort() in code on fatal errors. This requires using setjmp and longjmp inside parsers built with flex and bison.

The Turtle writer may optionally generate @base depending on flags. (This is used by Turtle serializer to handle the writeBaseURI feature)

Tidied error messages for rapper(1) when parsing stdin.

raptor_init() and raptor_finish() use a reference count to ensure initialising and terminating happen at most once each.

Raptor 1.4.17 Changes

The main changes to this release are:

Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples'.

Made I/O Stream class raptor_iostream support reading as well as writing with new constructors and new methods.

Added a new public SAX2 API class raptor_sax2 exposing the existing internal API which has been around since the first release of Raptor 8 years ago and runs on top of either expat or libxml2.

Added new public error handlers structure raptor_error_handlers containing a set of (function, data pointers) pairs called raptor_handler_closure for each error log level. Added raptor_log_level enum for the error log level. Added an initialization function for the structure, raptor_error_handlers_init().

Several other API changes, fixes and improvements were made.

Fixed Issues:

  • 0000252: Allow controlling of cache headers in Raptor
  • 0000245: Extra classes added to an OWL object

I/O Stream class changes

Made I/O Stream class raptor_iostream support reading data in addition to writing. (Dave B):

  • Deprecated raptor_iostream_handler structure for new raptor_iostream_handler2 structure which contains the new factory functions for reading.
  • Added new read I/O stream factory handler typedefs raptor_iostream_read_bytes_func and raptor_iostream_read_eof_func.
  • Added new raptor_new_iostream_from_handler2() I/O stream constructor to allow building of read and write iostreams deprecating raptor_new_iostream_from_handler().
  • Added new raptor_iostream_tell() deprecating raptor_iostream_get_bytes_written_count.
  • Added new read I/O Stream constructors: raptor_new_iostream_from_sink(), raptor_new_iostream_from_filename() raptor_new_iostream_from_file_handle() and raptor_new_iostream_from_string()
  • Added new read I/O Stream methods raptor_iostream_read_bytes() and and raptor_iostream_read_eof().

Added new write I/O Stream method raptor_iostream_write_string_python() to write an encoded string to an I/O stream using python / JSON / Turtle / N-Triples / SPARQL escaping rules. (Dave B)

Serializer Class Changes

Added two new JSON serializers (Dave B):

  1. Resource-centric serializer named json based on Talis RDF/JSON Specification
  2. Triple-centric serializer named json-triples based on the SPARQL results in JSON format.

Added new serializer features for the JSON serializers (DaveB):

  • RAPTOR_FEATURE_JSON_CALLBACK (name 'jsonCallback') to set the top-level callback function name wrapper above the outer object.
  • RAPTOR_FEATURE_JSON_EXTRA_DATA (name 'jsonExtraData') to add extra top-level JSON object data.

Example of using the resource-centric serializer while defining a callback:

$ rapper -q -o json -f jsonCallback=foo http://librdf.org/raptor/raptor.rdf
foo(
{
  "http://librdf.org/raptor/#raptor" : {
    "http://usefulinc.com/ns/doap#description" : [ {
...

Statement Class Changes

Added raptor_statement_compare() to provide an ordering between raptor_statement objects. (Dave B)

Parser Class Changes

Added new parser features to control HTTP headers in web requests (Dave B, based on a patch in the bug):
Also never Pragma: header with libcurl ever.
Fixes Issue #0000252

  • RAPTOR_FEATURE_WWW_HTTP_CACHE_CONTROL to control sending Cache-Control (default: none)
  • RAPTOR_FEATURE_WWW_HTTP_USER_AGENT to control sending User-Agent (default: none)

Turtle parser:

  • Added tests to forbid ' and '''-quoted strings and to forbid () in triple predicate position following the updated Turtle spec. (Dave B)
  • Write ';' statement terminators with a leading space for consistency with '.' terminator. (Dave R)
  • Remove canonicalisation of integer and double to match Turtle latest spec. (Dave B)

QName Class Changes

Added new methods raptor_qname_get_local_name(), raptor_qname_get_value() and raptor_qname_get_counted_value(). (Dave B)

SAX2 Class Changes

Added new public SAX2 API class raptor_sax2 exposind th existing internal one which has been around since the first release of Raptor 8 years ago and runs on top of either expat or libxml2. (Dave B)

  • Constructor: raptor_new_sax2()
  • Destructor: raptor_free_sax2()
  • XML handler methods: raptor_sax2_set_start_element_handler(), raptor_sax2_set_end_element_handler(), raptor_sax2_set_characters_handler(), raptor_sax2_set_cdata_handler(), raptor_sax2_set_comment_handler(), raptor_sax2_set_unparsed_entity_decl_handler() and raptor_sax2_set_external_entity_ref_handler().
  • XML handler factory typedefs: raptor_sax2_start_element_handler, raptor_sax2_end_element_handler, raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler, raptor_sax2_unparsed_entity_decl_handler and raptor_sax2_external_entity_ref_handler.
  • Set XML Namespace handler method: raptor_sax2_set_namespace_handler()
  • Parsing methods: raptor_sax2_parse_start() and raptor_sax2_parse_chunk()
  • Other methods: raptor_sax2_inscope_xml_language() and raptor_sax2_inscope_base_uri()

Serializer Class Changes

Abbreviated serializers (RDF/XML-Abbrev and Turtle):

  • Switched from using a sequence to using an AVL Tree with a cursor to more efficiently (faster) group/sort triples by subject. This changes the previous syntax output order but has no semantic difference. (Dave B)
  • Use the AVL Tree to remove duplicate triples. (Dave B)
    Fixes Issue #0000245

Turtle serializer:

  • Feature RAPTOR_FEATURE_WRITE_BASE_URI added to control writing @base directive to Turtle. (Dave R)
  • Remove canonicalisation of integer and double to match Turtle latest spec. (Dave B)

URI Class Changes

Update URI resolving for RFC3986 changes (Dave B)

WWW Class Changes

Added new method raptor_www_set_http_cache_control() to set the HTTP Cache-Control: header in requests. (Dave B, based on a patch in the bug)
Fixes Issue #0000252

XML Class Changes

Added new method raptor_xml_element_get_language() to get the language associated with an element. (Dave B)

Portability and Resilience Changes

Pass on error failures in parser and serializer factory construction. (Lauri)

Abbreviated serializers (RDF/XML-abbrev and Turtle): low memory and allocation failure fixes. (Lauri)

Altered API function signatures of raptor_uri_set_handler(), raptor_uri_get_handler(), raptor_new_namespaces(), raptor_namespaces_init() and raptor_new_xml_writer() to add appropriate consts. (Lauri)

Portability fixes for RAPTOR_API and other macros. (Lauri)

Removal of many sets of writable static data in N-Triples parser, URI class, Unicode NFC code, libxml support, Turtle writer and XML writer. (Lauri)

Portability fixes for round() and trunc() that are not always available in libc but might be in libm. (Dave B)

Turtle/N3 parsers and serializers, RDF/XML_Abbrev serializer: many low memory fixes and better out of memory errors. (Lauri)

Other Changes

Rewrote internal error log functions to use new error handlers structures and simplify the calls. (Dave B)

Expanded internal raptor_avltree datatype support to add a cursor, allowing it to be used for creating large ordered sequences that need to be walked. (Dave B)

Updated rdfdiff utility to handle duplicate triples in inputs. (Dave B)

raptor_sequence_shift() and raptor_sequence_unshift() are now as efficient as the sequence push and pop operations: O(1). (Lauri)

autogen.sh was updated.

rapper utility can now accept multiple -f / --feature options; previously only one parser and one serializer feature was possible.

Raptor 1.4.16 Changes

The main changes to this release are:

Provide 100% support for the GRDDL W3C Recommendation of 2007-09-11.

The Turtle parser and serializer were updated to support @base for specifying a base URI, following Turtle of 2007-09-11.

The Turtle and RDF/XML serializers had performance improvements for large graphs.

Added a TRiG Parser based on Turtle with named graph support.

Several other API changes, fixes and improvements were made.

Fixed Issues:

  • 0000188: Wrong RAPTOR_API definition for mingw
  • 0000192: raptor_uri_filename_to_uri_string() - getcwd() loop error
  • 0000194: parser and serializer don't recognize the same mime types
  • 0000195: Compile error in raptor_serialize.c debug code
  • 0000207: RDF file can be parsed, but not then serialised.
  • 0000210: RAPTOR_FEATURE_WRITER_XML_DECLARATION broken in Ruby
  • 0000214: Empty rdf:about, plus base-uri, produces incorrect turtle output
  • 0000216: flickrdf segfaults at raptor_serialize_end!
  • 0000217: flickrdf segfaults at raptor_serialize_end!
  • 0000232: libraptor does not correctly free up libxml error handler, causing crashes in subsequent calls to libxml error handlers
  • 0000237: raptor_sequence robustness: item ownership on insert error
  • 0000238: GRDDL parser in SVN overwrites blank nodes when merging graphs
  • 0000239: GRDDL parser in SVN returns 60 less triples with http://www.w3.org/

Namespaces Class Changes

raptor_namespaces_init() now returns an integer status.

Parser Class Changes

Added raptor_graph_handler typedef and raptor_set_graph_handler() to return named graph identifiers during parsing, initially for the TRiG parser.

These were added the GRDDL parser:

  • RAPTOR_FEATURE_MICROFORMATS (microformats) to enable hCard and hCal microformats
  • RAPTOR_FEATURE_HTML_TAG_SOUP (htmlTagSoup) to use the HTML tag soup parser if the XML parsing fails
  • RAPTOR_FEATURE_HTML_LINK (htmlLink) to enable html <link>
  • RAPTOR_FEATURE_WWW_TIMEOUT (wwwTimeout) for setting URI retrieval timeouts during processing

XML Element Class Changes

Added raptor_new_xml_element_from_namespace_local_name() constructor to make an XML element from a local name relative to a raptor_namespace.

Unicode Class Changes

Defined a new raptor_unichar typedef for a Unicode codepoint defined as unsigned long which was the previous type used. Altered the Unicode function to take it as a parameter. raptor_unicode_char_to_utf8(), raptor_utf8_to_unicode_char(), raptor_unicode_is_xml11_namestartchar(), raptor_unicode_is_xml10_namestartchar(), raptor_unicode_is_xml11_namechar() and raptor_unicode_is_xml10_namechar().

URI Class Changes

Added raptor_uri_compare() and raptor_uri_compare_func function pointer for implementing it in the raptor_uri_handler. The handler now has a version field initialised to trigger the new factory method for uri compare when the version is 2 or more.

WWW Class Changes

Added raptor_www_set_connection_timeout() to set the WWW retrieval connection timeout in seconds.

Added raptor_www_final_uri_handler typedef and raptor_www_set_final_uri_handler() to return the final URI seen during WWW retrieval such as after redirects.

Added raptor_www_get_final_uri() to return the final URI after a WWW retrieval which might include redirects.

Parser Changes

The GRDDL parser/processor was substantially updated and now supports 100% of the Gleaning Resource Descriptions from Dialects of Languages (GRDDL) syntax, W3C Recommendation of 2007-09-11:

  • Transforming XML with XSLT 1.0
  • Processing XML namespaces.
  • Transforming XHTML with XSLT 1.0
  • Processing HTML profiles.
  • Handling of base URIs and URI redirects.
  • XInclude processing.
  • Parsing as RDF/XML when it is recognised after a transform.

it also:

  • Handles hCard and hCal microformats when feature RAPTOR_FEATURE_MICROFORMATS is enabled (default enabled).
  • Handles <link type="application/rdf+xml" href="URI" /> to RDF/XML content when feature RAPTOR_FEATURE_HTML_LINK is enabled (default enabled).
  • Attempts parsing with libxml's HTML parser if XML parsing fails, when feature RAPTOR_FEATURE_HTML_TAG_SOUP is enabled (default enabled).
  • Discards errors during recursive processing such as 404s, failure to parse, failure of XSLT processing.
  • Uses XSLT security - denies reading, writing to files, directories or writing to network.
  • Accepts the RAPTOR_FEATURE_NO_NET feature to prevent all networking.
  • Allows fine-grained URI filtering with raptor_parser_set_uri_filter().

RDF/XML parser recognising was updated to just the start of the document for guessing if it should handle content and to try to avoid html URLs.

RSS Tag soup parser recognising was updated to accept with the string 'feed' in the identifier.

TRiG Parser was added based on the Turtle parser, adding named graphs. It returns name graph URis via a callback set with new API call raptor_set_graph_handler()

Turtle parser added @base support, fixed turtle escapes to URIs. Recognising was updated to look for @prefix early in the document.

Serializer Changes

Turtle serialiser changes:

  • Generate @base when an output base URI is given.
  • Properly format Turtle XSD doubles using new snprintf code.
  • Fix unwanted blank line at end of Turtle list abbreviation.
  • Use AVL Tree rather than sequence for significant performance improvement for large serialisations.

RDF/XML serialiser was changed to emit a legal empty RDF/XML document when no triples are serialised and to skip emitting statements with bad predicate uris rather than returning an error.

RDF/XML Abbrev serialiser was changed to use an AVL tree rather than sequence for significant performance improvement for large serialisations.

rapper Utility Changes

Added an --show-graphs option to print named graph URIs as seen (such as with TRiG).

Added -I / --input-uri and -O / --output-uri options to set the input / parsing and output / serializing base URIs separately. Defaults remain the same - the serializer base URI defaults to the input base URI, however it was set.

Portability Changes

Fixes for when building from Subversion on cygwin (EOL issues, Makefiles).

Remove unused semicolons for prevention of compiler warnings.

Fix some uninitialized variables that some compilers complain about.

Allow RAPTOR_ASSERT_DIE to be externally defined.

Allow RAPTOR_WWW_BUFFER_SIZE to be externally defined.

Other Changes

autogen.sh was updated to handle program versions better using an inline perl helper.

Start to add resiliance to memory allocation failures and errors inside the library.

Added AVL Tree code to make much faster key:value lookups. This is used for RDF/XML parser XML ID checks and in the 'abbrev' serializers - Turtle and RDF/XML-Abbrev for looking up nodes.

Better libxml error messages are now returned, mentioning some of the names and values that caused the error.

Raptor 1.4.15 Changes

General Changes

GRDDL parser now passes the (unapproved) test suite for the GRDDL W3C Working Draft 2 March 2007 except for two tests that have been reported as having errors.

When using libcurl as the WWW retrieval library, errors in resolving a URI such as not found (404) are now reported as proper errors and cause parsing to fail rather than just return no triples.

Some improvments where made to guessing for a parser to match some content. Firstly, any mime type with Q <10 is added to the score, don't lose the influence of the mime type entirely. The consequence of this is that Turtle can pretend to be a partial N3 parser. Secondly, the XHTML mime type is now correctly recognised by the GRDDL parser rather than the RSS Tag Soup parser.

Fixed Issues:

  • #0000174: Serializing to rdfxml* with a base_uri doesn't set the xml:base attribute, but does truncate rdf:about and rdf:resource values
  • #0000177: Some URI references mis-resolved
  • #0000178: No errors from accessing 404 URIs
  • #0000180: messages garble output to stdout

Parser and Serializer Changes

Added better error reporting for XML errors using the libxml structured error reporing api. From

$ rapper -i grddl http://librdf.org/LICENSE.txt
rapper: Parsing URI http://librdf.org/LICENSE.txt
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - http://librdf.org/LICENSE.txt:2: 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - parser 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - error : 
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error - Document is empty
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error -                   Redland RDF Application Framework - License
rapper: Error - URI http://librdf.org/LICENSE.txt - XML error -                   ^
rapper: Failed to parse URI http://librdf.org/LICENSE.txt grddl content
rapper: Parsing returned 0 triples

To this:

$ rapper -i grddl http://librdf.org/LICENSE.txt
rapper: Parsing URI http://librdf.org/LICENSE.txt
rapper: Error - URI http://librdf.org/LICENSE.txt:1 - XML parser error: Document is empty
rapper: Error - URI http://librdf.org/LICENSE.txt:1 - XInclude processing failed for GRDDL document
rapper: Failed to parse URI http://librdf.org/LICENSE.txt grddl content
rapper: Parsing returned 0 triples

GRDDL parser updated to support the GRDDL W3C Working Draft 2 March 2007:

  • Namespace and profile URI handling now works.
  • Run XML Include processing
  • Throw away XML validation errors
  • When a namespace URI is seen that was RDF/XML Mime type, run the RDF/XML parser on the content.
  • Look for substrings inside rel attributes when looking for profiles.
  • Return a warning and do not fail if XSLT sheet is not found
  • Use libxml structured errors for better reporting
  • Removed old hard-coded xslt scripts

Turtle parser was changed to accept the N3 mime type text/rdf+n3 at low Q(quality) so it might work for N3 that is the RDF subset - quite common.

Changed the RSS Tag Soup parser and RSS 1.0 serializer to stop sharing use of the declared namespaces so that when using both at the same time, there is no double-free of the same objects.

Correct the content: namespace URI in the RSS parser and serializers.

Other Changes

rapper gains a -t/--trace option to show URIs traversed. Handy for GRDDL.

raptor_uri_resolve_uri_reference() no longer goes past the end of buffer when the relative URI is ,/

Added an internal API for capturing parsed data as it is seen. Use by GRDDL parser but with no public API.

Added an internal API for structured error reporting. Updates made throughout the library but with no public API.

Internal API raptor_new_sax2() signature changed to just have an error_handlers pointer argument rather than multiple function / user_data pairs.

Raptor 1.4.14 Changes

General Changes

Added a Turtle Terse RDF Triple Language serialiser by Dave Robillard based on the existing RDF/XML-Abbrev serialiser.

Added a GraphViz DOT format serialiser by Evan Nemerson.

The GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes.

Fixed Issues:

  • #0000032: GRDDL indirection feature request
  • #0000141: Crash when GRDDL parser is used with a used-generated blank node ID prefix.
  • #0000143: Crash when GRDDL parser fails to retrieve URI.
  • #0000148: A public function to generate a blank ID would be nice though.
  • #0000155: entity processing in literal property elements (with libxml)
  • #0000157: Crash when RDF/XML Abbrev serializer sees a rdf:type predicate with a literal object.

Configuration Changes

raptor-config gains a --private-libs for the internal libraries used in building raptor, with the public ones only emitted with --libs.

raptor.pc now uses Libs.private for internal dynamically linked libraries.

The libxml minimum version is now 2.6.8 since 2.6.7 crashes on PPC64 Linux. 2.6.8 was released March 2004 so this should be no burden.

Do not use PATH_MAX so raptor can build on Hurd.

Parser Changes

RDF/XML parser now looks for the RDF/XML root element and namespace declaration in the initial bytes of content when guessing. This allows content that is in other mime types such as application/xml to be more likely guessed as RDF/XML.

When guessing a parser to use, if an an exact match is found for the mime type (q=10), then that parser is used.

The GRDDL parser has several changes:

  • Recurses through the root element's namespace URI and the profile URIs. It excludes several common namespace URIs from processing (XHTML, RDF/XML, XML Schema) and does not traverse the GRDDL profile URI itself.
  • Tries to guess which of the RDF/XML or Turtle parser is wanted from an XSLT result. Guessing is performed because not all the XSLT sheets used in the demonstrations set the mime type to match Turtle's unregistered type, or because the return no mime type, or return an XML one, when it was expected RDF/XML would be received.
  • Watches the processed URIs and never visits the same URI more than once in a session.
  • Passes on general XSLT errors to raptor rather than letting the default (printing to stderr) work.
  • Declares XSLT 'base' and 'Base' parameters to allow some XSLT sheets to work - pragmatism.

Serializer Changes

Added a new Turtle Terse RDF Triple Language serializer and two new internal APIs based on the existing RDF/XML-Abbrev serialiser, written by Dave Robillard:

  • turtle_writer for serializing triples to Turtle This may be moved to the public API in a future release.
  • raptor_abbrev for the common 'abbreviated serializer' core that is shared between the RDF/XML-Abbrev and Turtle serializer.

Added a new GraphViz DOT format serialiser writen by Evan Nemerson.

Note that testing the turtle serializing (make test) requires the rdfdiff -u and a few of the tests take some time to run.

Other Changes

Added raptor_home_url_string and raptor_license_string exported strings.

Added raptor_parser_generate_id() as a public function to generate an identifier for a parser.

rdfdiff gains the -u/--base-uri option to specify the from file base URI so that if the from file is a local file or relative URI, it can be given an absolute base.

Failures to retrieve content from a URI using the raptor_www class implementations now return a failure as well as setting the HTTP status code to 403 or 404 as appropriate. Previously success may have been returned with no bytes.

Raptor 1.4.13 Changes

General Changes

Prevent losing memory for a raptor_xml_writer when a serializer is reused several times.

Fixed issues reported on the Redland Issue Tracker:

  • Issue #0000134: Check for equal scheme and authority during construction of relative URIs from two absolute URIs.

Configuration Changes

In maintainer mode, add all the supported compiler -W warning flags to the CFLAGS.

Allow LEX to be set to things that aren't exactly 'flex'.

Documentation Changes

Added single triple serializing example to the tutorial to demonstrate serializing without parsing and building a raptor_statement.

Other Changes

Declare several raptor functions with GCC printf-formatting attributes when using a new enough GCC.

RDF/XML parser now creates literals with raptor_stringbuffer so that it does a lot less copying when constructing longer literals.

Added single raptor_statement serializing example to demonstrate serializing alone without parsing.

Raptor 1.4.12 Changes

Restored the order of serialized syntaxes back to the same as in Raptor 1.4.10 which Redland was relying on - asking to serialize to mime type 'application/rdf+xml' without specifying a parser name in Redland with Raptor 1.4.11 wrote it in XMP instead of RDF/XML as it used to. This happened more often with language bindings. That problem will be fixed in a future release of Redland but for now, this stops wierd things like that happening.

Raptor 1.4.11 Changes

General Changes

Added raptor_get_feature_count() to return the count of features, in preference to using the macro value RAPTOR_FEATURE_LAST.

Added raptor_www_set_uri_filter() method of the WWW class (raptor_www) objects to have an optional URI filter function that checks if the URL given is allowed to be retrieved, or denied entirely.

Fixed issues reported on the Redland Issue Tracker:

  • #0000112: raptor_namespaces_qname_from_uri not public API?
  • #0000110: strcasecmp problem under windows (raptor_rss.c does not compile)
  • #0000091: guess parser should guess the syntax each time it is run, not be fixed
  • #0000089: Add a NONET feature to prevent network fetches
  • #0000041: Allow multiple transformation URLs in data-view:transformation property
  • #0000014: bNode content written twice in rdfxml-abbrev output mode

Documentation Changes

The Raptor Reference Manual now includes descriptions of all the parsers and serializers and the tutorial has a new section describing how to filter URIs and deny network requests.

Parser Changes

Added functionality to prevent network requests either via setting a new feature RAPTOR_FEATURE_NO_NET that denies network requests during a parser operation or with a URI filter function raptor_parser_set_uri_filter(). This function uses raptor_www_set_uri_filter() internally.

Added raptor_get_need_base_uri() to tell if a parser requires a base URI argument. Presently the N-Triples parser is the only parser that does not require a base URI. raptor_start_parse() will now throw an error if no base URI is given and it is needed.

The GRDDL parser was changed to handle a list of URIs in the profile so it now can support dataview:transformation in XML taking a list of transformations as defined in The GRDDL profile for XHTML part of the GRDDL specification. It now also recognises Embedded RDF and HCalendar using well known XPaths and transforms them to RDF triples using well known XSLT sheet URIs.

The Guess parser now resets after each parse and does a fresh guess on the syntax based on the incoming information. Fixes Issue #0000091

The Turtle parser (and experimental N3 parser) were changed to now require base URIs as they always should have. The error messages when reporting problems with grammar tokens now return better responses. Added better memory cleanup during parser error recovery.

Serializer Changes

The RSS 1.0 Serializer now works again.

Updated the RDF/XML Abbreviated serializer to do proper reference counting on the blank/resource nodes used as subjects and objects to prevent dual-triple generation. Fixes the reported Issue #0000014

Other Changes

The internal SAX2 API can also prevent network fetches with the feature RAPTOR_FEATURE_NO_NET.

Fixed a SAX2 problem that caused parsers that use it to leak memory for 1 URI, affected RDF/XML and RSS Tag Soup.

rapper help and verbose message formats were tidied.

Raptor 1.4.10 Changes

General Changes

No parser will now generate a triple with an identifier type RAPTOR_IDENTIFIER_TYPE_ORDINAL. Only identifier type resource, anonymous (blank node) and literal will be generated. All serializers will convert any RAPTOR_IDENTIFIER_TYPE_ORDINAL type on input to type resource.

Configuration Changes

No longer adds LDFLAGS to pkgconfig file raptor.pc and raptor-config fixing Issue #0000097.

Parser Changes

All parsers no longer generate a triple with an identifier type RAPTOR_IDENTIFIER_TYPE_ORDINAL, as deprecated in 1.4.8. The replacement type generated is RAPTOR_IDENTIFIER_TYPE_RESOURCE.

The RSS Tag Soup (rss-tag-soup) parser now makes the triples appear before parser destruction. This caused odd symptoms like parsing in python returning no triples and the parser then crashing during object destruction.

The RDF/XML (rdfxml) parser no longer crashes if a comment is seen outside an element, such as before or after the root element.

Serializer Changes

The RDF/XML (rdfxml) serializer no longer crashes if the serializer is used more than once.

Raptor 1.4.9 Changes

Configuration and Build Changes

Now using Subversion for version control and the Raptor installation instructions explain how to get Raptor from Subversion.

configure now allows --enable-parsers=node and --enable-serializers=none. Using both is possible!

No longer require libxml2 for the RSS Tag Soup parser

Various Win32 fixes and VC build files updates from John Barstow.

Documentation Changes

A new Raptor Tutorial was written covering using all parsing and serializing functions along with example code.

The Raptor Reference Manual now covers 100% of all functions, structs and defines with gtkdoc generated documentation.

rapper utility Changes

rapper now uses namespaces found in parsing to give hints to the serializer as to how to format the output. The result of this is that rapper can be used as an RDF pretty-printer and is especially good at such things as turning flat N-Triples to RDF/XML or RDF/XML-Abbrev. such as:

rapper -q -i ntriples -o rdfxml-abbrev example.nt

Parser Changes

All parsers no longer generate RAPTOR_IDENTIFIER_TYPE_PREDICATE as the statement predicate type, as deprecated in 1.4.8. The replacement type generated is RAPTOR_IDENTIFIER_TYPE_RESOURCE.

The Turtle parser now has true and false boolean literals, which were accidently omiited from the parser in the 1.4.8 update.

Parsers can register capabilities for handling multiple mime types with Q values. These are then used in WWW requests for content in the Accept: header for HTTP. Added raptor_parser_factory_add_mime_type for registering, raptor_parser_get_accept_header to get the accept header values for the types supported by one parser.

From the previous change, the RSS parser now accepts several unregistered RSS mime types as well as the registered Atom one; the RDF/XML parser accepts unregistered mime type text/rdf seen occasionally; the Turtle parser accepts several experimental mime types. All unregistered or experimental types are accepted with lower Q than any registered type.

The RSS Tag Soup parser for RSS* and Atom no longer requires libxml2 (for it's XML Reader API). Internal changes mean that it will fully work on top of expat.

Serializer Changes

The RSS/Atom serializer now uses input namespace declarations to choose namespaces on output.

Added raptor_serialize_set_namespace_from_namespace to set a namespace for serializing from an existing raptor_namespace.

Serializing to RDF/XML (or RDF/XML Abbrev) now does not double-free URI strings. Fixes Issue #0000065

RSS serializer no longer writes the XML header twice.

IOStream Class Changes

Added raptor_iostream_write_uri to directly write a URI to an iostream without the need to go via a string.

Fixed bug in raptor_iostream_write_xml_any_escaped_string failing to write ';' after escaping U+0009 and U+000A

Namespaces Class Changes

Added raptor_namespaces_qname_from_uri to do URI splitting into qname prefering to use the current in-scope namespaces before having to search.

raptor_namespaces_format now NULL-terminates the namespace string. Fixes Issue #0000062

Added raptor_namespace_get_counted_prefix to return a namespace prefix and it's length.

QName Class Changes

Added raptor_qname_get_namespace to get the namespace associated with a QName.

StringBuffer Class Changes

raptor_stringbuffer_append_counted_string and raptor_stringbuffer_append_string now Do nothing on appending a NULL string or a string of length 0. Fixes Issue #0000073

Unicode Class Changes

raptor_utf8_to_unicode_char now also checks for overlong UTF-8 sequences, illegal code positions or out of range codes.

URI Class Changes

Deprecated raptor_uri_is_file_uri which takes a URI string argument for new function raptor_uri_string_is_file_uri which more clearly says that.

Changed all URI string calloc/mallocs to add enough room for a full pointer at the string end to stop valgrind moaning on 64bit systems when looking for the end of string NUL.

raptor_uri_set_handler and raptor_new_iostream_from_handler now take const handler arguments.

WWW Class Changes

Get the curl success status into a long, not an int which causes failure on 64 bit. Fixes Issue #0000075

WWW requests for content to parse now always send an appropriate Accept: header with Q values for the parser, or for the guess parser, all supported mime types.

Internal Changes

Added XML element methods raptor_xml_element_get_attributes and raptor_xml_element_get_attributes_count, raptor_xml_element_is_empty to the SAX2 API.

Many internal changes were made to the SAX2 API to finally separate XML and RDF/XML parts. The SAX2 API is now fully usable on either libxml2 or expat. That last sentence implies a lot of work, by the way.

Raptor 1.4.8 Changes

General Changes

A large source re-arrangement was performed. All C sources and headers that build the library are now in the src dir, general documentation in the doc dir and utilities in the utils dir. This both tidied up the mixture of files at the top level and also enabled better use with gtk-doc.

Future API change: From the next release of Raptor, raptor_statement predicates will return identifiers of type RAPTOR_IDENTIFIER_TYPE_RESOURCE instead of RAPTOR_IDENTIFIER_TYPE_PREDICATE. Identifiers of type RAPTOR_IDENTIFIER_TYPE_ORDINAL may no longer be returned in any statement position (to be confirmed).

Version Control change: Raptor will be switching to use Subversion for version control after the 1.4.8 release. Please check the Redland Subversion site for the latest status or the online Raptor installation notes for the raptor specific subversion installation information.

Configuration Changes

The autogen.sh script for building from CVS was revamped to be more modular.

configure now takes an --enable-gtk-doc option to enable building of the documentation using the gtk-doc utility. It is by default enabled only if the utility is available.

Added a new configure option --enable-serializers (in 1.4.7) to allow the selection of the required RDF serializers from any of those supported.

raptor-config now has a --options argument to list the configured or discovered options of the library such as parsers, serializers and other choices.

Documentation Changes

The GNOME gtk-doc program is now used to automatically extract documentation from source comments into reference documentation. This is then merged with templates and additional documentation to provide a reference manual for raptor as XML document which is turned into HTML along with GNOME devhelp support.

This new documentation intended to replace the libraptor manual page/web page as easier to read document with scope for better expanding with more detail of raptor including examples and tutorial information. The manual page will continue to contain the summary information for the present.

Portability Changes

Fixed a long-standing URI resolution bug on win32 - only remove leading / if there is one present (patch from John C. Barstow)

rapper utility Changes

Altered the -g argument to invoke the guessing parser rather than guess on file/URI name alone. This is now equivalent to choosing an input syntax of guess with -i guess.

Added a --show-namespaces long option (no short version) to show namespaces that are declared in the parsed content.

Parser Changes

A new guessing parser was added, picking the actual parser to use at run-time based on protocol or other information.

Allow a content type returned by a protocol (such as HTTP) to enable choosing of parser at run-time. Added a new optional parser factory method content_type_handler to return this.

Allow parsers to handle several syntaxes rather than only 1 or 2.

Parsers can now return namespace prefix/URI declarations as they are given in the content by the means of a new handler type raptor_namespace_handler and parser method raptor_set_namespace_handler. Duplicate namespace prefix/URIs can be returned.

GRDDL Parser Changes

Bug fix when the entire content is in one chunk (René Puls).

Guessing Parser Changes

A new parser that guesses the actual parser to use at run-time based on a combination of MIME Content-Type, file or URI name and in future, iniital bytes of the content. If the Content-Type is an exact match to a known parser, it is always chosen before trying heuristics.

RDF/XML Parser Changes

When emitting literals, handle a datatyped empty literal. This is a post-REC errata for the revised RDF/XML recommendation. See archived example for further information.

RSS Tag Soup Parser Changes

Added atom 1.0 support including use of the new namespace. Atom 0.3 namespace terms are turned into new properties. Replace atom copies of Dublin Core or RSS properties with the original terms:

Atom 1.0 term Original term
atom:content rss:description
atom:id rss:link
atom:published dc:date
atom:rights dc:rights
atom:title rss:title

Apply the in-scope base URI (such as from xml:base) to atom 1.0 fields that take URI values: atom:id, atom:icon and atom:logo.

Added optional date parsing code to turn XML RSS date fields into ISO format ones, suitable for Atom and XML schema datatypes format. Will use library parsedate code from curl or INN if available.

XML RSS field pubDate is now turned into Dublin Core dc:date field in the ISO format.

XML RSS field content is turned into content:encoded in RDF triples on output with escaping.

Turtle Parser Changes

Updated to support Turtle version 2006-01-02 (announcement).

Switch qname, blank node and prefix definitions to SPARQL ones.

Check for illegal not-hexadecimal \u and \U escape values.

Fix greedy matching of long literals ("""....""") that ended on the last """ found rather than the first.

Added double and decimal constants.

Added optional +- sign to all numeric constants.

Allow \" escape inside long strings.

Take care to reset the generated raptor_statement language and datatype fields when not used.

Serializer Changes

Added a new Atom 1.0 serializer (name atom) by parameterising the RSS 1.0 serializer.

Added a new Adobe XMP compatible serializer (name rdfxml-xmp) by parameterising the RDF/XML Abbreviated serializer. Patch provided by Sid Steward.

All serializers can be chosen at configure time from those available using configure option --enable-serializers.

The RSS parser and serializer can now be independently enabled or disabled. The RSS serializer no longer requires an XML parser.

RDF/XML Serializer / XML Writer Changes

A new XML Writer feature RAPTOR_FEATURE_WRITER_XML_VERSION was added to allow chosing XML 1.0 (value 10) or XML 1.1 output (value 11). This feature is also accepted by serializers as an option and used by the RDF/XML and RDF/XML-Abbrev serializers.

A new XML Writer feature RAPTOR_FEATURE_WRITER_XML_DECLARATION was added to allow omitting the XML declaration (default true).

Added functions raptor_xml_any_escape_string() and raptor_iostream_write_xml_any_escaped_string() which take an XML version. The XML 1.0 functions give errors when attempting to write #x1-#x1f (excluding #x9, #xA, #xD) or #x7F.

Atom 1.0 Serializer Changes

Added a new serializer using the Atom 1.0 format and namespace. This reads RDF triples in the RSS 1.0 model, along with any additional atom 1.0 properties and serializes an Atom 1.0 feed file.

Adobe XMP Serializer Changes

Added a new serializer writing RDF/XML in the profile used by Adobe XMP. Note that this does require RDF triples to be used in a certain style; for example all triple subjects are the "current documment" giving rdf:about="".

URI Class Changes

Fix a bug when adding a default path of / to a URI in functions raptor_new_uri_for_xmlbase() and raptor_new_uri_for_retrieval(). (Bug #0000045)

raptor_uri_equals was altered to accept NULL pointers, which do not compare equal to a non-NULL URI. NULL does equal NULL.

Internal Changes

The internal SAX2 class was extensively changed so that remaining interdependencies with the RDF/XML parser were removed and it can now be re-used for other syntaxes cleanly. Several functions were modified or added.

Removed old and hardly-tested internal support for XML entity resolution (libxml only).

Various fixes for GCC 4 warnings.

Raptor 1.4.7 Changes

Fix a couple of crashes in the RSS tag soup parser / serializer (Dave Beckett, Suzan Foster).

configure now looks for the libxslt/xslt.h header as well as the libxslt library and disables XSLT and GRDDL support it if is missing. This catches systems with the libraries without headers as has happened on some OSX versions.

In serializers rdfxml and rdfxml-abbrev, report failure to serialize to RDF/XML if the predicate URI is not absolute.

Raptor 1.4.6 Changes

Added --with-xslt-config configure option

Added a new parser for Gleaning Resource Descriptions from Dialects of Languages (GRDDL) which allows reading XHTML and XML as RDF triples by using profiles in the document that declare XSLT transforms from the XHTML/XML content into RDF/XML which is the RDF content. It does not support all the GRDDL styles, for example dataview:namespaceTransformation, or perform recursive transformations.

The turtle parser now accepts """long literals"""

XML writer feature support were added in 1.4.5 and not documented. The new functions are: raptor_xml_writer_features_enumerate, raptor_xml_writer_set_feature, raptor_xml_writer_set_feature_string, raptor_xml_writer_get_feature and raptor_xml_writer_get_feature_string. The three XML writer features added are \fBRAPTOR_FEATURE_WRITER_AUTO_INDENT\fR with boolean value (default true) to auto-indent the XML, \fBRAPTOR_FEATURE_WRITER_AUTO_EMPTY\fR with boolean value (default true) to automatically generate empty elements if a start/end element sequence has no content and \fBRAPTOR_FEATURE_WRITER_INDENT_WIDTH\fR with an integer value (default 2) to set the indenting level for the XML.

New build configuration and portability fixes for win32 (John Barstow)

Portability fixes for win32 - added SIZEOF_UNSIGNED_SHORT (Dave Viner, others)

Added a signing memory debugging system to aid checking when raptor-allocated memory is freed in another library or vice-versa enabled by --with-memory-signing configure option (defaults to on in maintainer mode).

Fixed a few internal malloc/frees to use RAPTOR_MALLOC / RAPTOR_FREE so that the above signed memory system worked.

RDF/XML serializer: Use the maximal name when splitting a predicate.
Turn datatyped literals that are rdf:XMLLiteral into inline XML with rdf:parseType="Literal" rather than XML-escaped.

RDF/XML abbreviated serializer: Fix a crash when there is a NULL base URI. Use the maximal name when splitting a predicate.
Turn datatyped literals that are rdf:XMLLiteral into inline XML with rdf:parseType="Literal" rather than XML-escaped.

RSS tag soup parser: Fix crash with unexpected use of alternate attribute.
Update from Suzan Foster to reflect the latest status of the enclosure vocabulary and allow multiple common items and fields.

RSS 1.0 serializer: Added RSS enclosures serializing.

grapper example GTK program now stores the window width and height using gconf2.

Raptor 1.4.5 Changes

Added a new RDF/XML with abbreviations serializer rdfxml-abbrev written by Steve Shepard which handles several of the abbreviations specified by the RDF/XML Syntax Specification (Revised) W3C Recommendation. It is suitable for writing small documents as there are known scaling issues.

The RSS tag soup parser was updated to work better when there is no base URI given. It also now supports reading the RSS 1.1 format and turning it into RSS 1.0 model triples.

Deprecated raptor_ntriples_string_as_utf8_string as rather too internal to be useful, since it only works with a parser.

More fixes to work around the broken libxml2 on Apple OSX 10.3.x with inconsistent shared libraries / headers.

Experimental and incomplete Notation 3 parser - updated to match changes to Turtle. CVS changes only, not enabled in standard builds.

Raptor 1.4.4 Changes

Make the RSS tag soup parser handle RSS 0.9 namespace elements by turning them into RSS 1.0.

Fix a couple of crashes in the RSS 1.0 serialiser when no base URI is used.

Make raptor_uri_to_relative_counted_uri_string work when the base or reference URI have no paths such as like http://example.org

Added portability fixes for Win32 to get Raptor 1.4.3 building with MS Visual Studio using expat and libcurl. The RAPTOR_INTERNAL define was moved to the build configuration and defines added for integral type sizes. Patch from Dave Viner (dviner at apache dot org).

Raptor 1.4.3 Changes

A release with the major new feature of an XML writer API. This is now used along with a new supporting XML element class to improve the existing RDF/XML serializer and to provide a new RSS 1.0 serializer.

This API it is also used by the next release of Rasqal to provide serializing of query results to XML.

The new raptor_xml_writer class functions added are: raptor_new_xml_writer (constructor), raptor_free_xml_writer (destructor), raptor_xml_writer_empty_element, raptor_xml_writer_start_element, raptor_xml_writer_end_element, raptor_xml_writer_cdata, raptor_xml_writer_cdata_counted, raptor_xml_writer_raw, raptor_xml_writer_raw_counted, raptor_xml_writer_comment and raptor_xml_writer_comment_counted.

The new raptor_xml_element class functions added are: raptor_new_xml_element (constructor), raptor_free_xml_element (destructor), raptor_xml_element_get_name, raptor_xml_element_set_attributes, raptor_xml_element_declare_namespace and raptor_iostream_write_xml_element.

Parser Changes

RSS tag soup parser now works with older libxml2s (2.5.10+), including the one shipped with some Apple OSX versions that has an inconsistent header file and library.

RSS tag soup parser recognises/scores more common XML RSS file names.

RSS tag soup parser turns XML RSS <guid isPermaLink="true">val</guid> into RDF/XML form <guid rdf:resource="val"/>, leaving the non isPermaLink form to be a literal value.

A bug was found in libxml2 that causes double expanding of XML entities in RDF/XML. This has been reported but cannot be worked around from raptor. The expat XML parser can be used as an alternative, as it does not have this problem. A test was added for this bug but it will not cause the test suite ('make check') to fail.

Added additional Turtle parser tests that cover Notation 3 syntax that is not part of the Turtle language.

Added raptor_parser_set_feature_string and raptor_parser_get_feature_string methods to set/get string feature values.

Serializer Changes

Added feature relative_uris for serializers. This is used by the RDF/XML serializer and enabled by default.

Added feature start_uri for serializers with a string value to set the start URI for serializing. Not used at present.

Added new methods raptor_serializer_features_enumerate to list serializer features and functions to set/get serializer feature integer or strings values: raptor_serializer_set_feature, raptor_serializer_get_feature, raptor_serializer_set_feature_string and raptor_serializer_get_feature_string.

Added raptor_serialize_set_namespace to allow user declaration of prefix/URI namespaces pairs as serializing hints.

the RDF/XML serializer was improved using the new XML Writer class so it now uses any user-declared namespace hints in it's output and emits relative URIs whenever possible. The latter was provided by a patch from René Puls.

A new RSS 1.0 serializer was added, using the new XML Writer class and using the same structures, classes and properties as the RSS tag soup parser.

URI class changes

Added relative URI generating code from a patch written by René Puls and provide this with two new methods raptor_uri_to_relative_uri_string and raptor_uri_to_relative_counted_uri_string.

Added raptor_uri_print to print a URI to a file handle.

Added methods raptor_uri_to_string and raptor_uri_to_counted_string to return a URI as newly allocated strings.

I/O Stream Changes

Many classes gained methods to write to iostreams, supporting the new XML Writer class functionality. The added methods are: raptor_iostream_write_namespace, raptor_iostream_write_ntriples_string, raptor_iostream_write_qname, raptor_iostream_write_statement_ntriples, raptor_iostream_write_stringbuffer, raptor_iostream_write_xml_element and raptor_iostream_write_xml_escaped_string.

Namespace Class Changes

Added raptor_namespace_copy copy constructor and raptor_new_namespace_from_uri constructor to build a namespace from a raptor_uri object.

Added utility function raptor_new_namespace_parts_from_string to decode syntax of the form xmlns:prefix="uri" into prefix and uri string pairs.

Added raptor_namespaces_find_namespace_by_uri method for namespace stack to find a declared namespace by URI. This complements raptor_namespaces_find_namespace which already provides searching by prefix.

Unicode and UTF-8 Changes

Added several methods for checking characters forming parts of XML 1.0 or XML 1.1 names: raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namechar and raptor_unicode_is_xml11_namechar.

Added a function raptor_utf8_check to check that a string is legal UTF-8 and all the encoded Unicode characters are in the range U+0 <= character <= U+10FFFF

Added a function raptor_xml_name_check to check that a string is a legal XML name (1.0 or 1.1) as well as legal UTF-8.

Other Changes

Feature support: Added raptor_feature_value_type to determine value of a feature - either integer (most) or string.

XML QName class: Added raptor_qname_copy copy constructor.

Sequence class: Added raptor_sequence_join to join two sequences of items, leaving one empty.

Statement class: Added raptor_statement_copy copy constructor and raptor_free_statement destructor. Previously these were internal to raptor.

The rapper utility was modified to add a feature form: -f xmlns:PREFIX="URI" allowing the setting of output serializer namespaces.

The namespace URI string constants exported by raptor are now of type unsigned char*.

Raptor 1.4.2 Changes

Make raptor_xml_escape_string fail correctly when given bad UTF-8 to escape.

Raptor 1.4.1 Changes

Fixed a buffer overrun in decoding a URI scheme in raptor_uri constructors such as raptor_new_uri.

Fixed a crash in RSS enclosures crash when the url attribute seen on a non-<enclosure> element

raptor_xml_escape_string return value has changed to be an int, returning <0 on failure. This allows the empty string encoding an empty string case to work and be distinguished from an error.

Raptor 1.4.0 Changes

A release with the major new feature of providing serializing of RDF triples to syntaxes. It also added a new support class for I/O streams and had other minor fixes.

Added a Raptor Serializer class (raptor_serializer) with similar style to Parser (raptor_parser). Two serializers are provided, for RDF/XML and N-Triples. The serializing can be done to files, C FILE* or to strings. The raptor_iostream class that provides this also allows writing to any other form by creating a custom iostream.

The new raptor_serializer class functions added are: raptor_serializers_enumerate, raptor_serializer_syntax_name_check, raptor_new_serializer, raptor_free_serializer, raptor_serialize_start, raptor_serialize_start_to_filename, raptor_serialize_start_to_string, raptor_serialize_start_to_file_handle, raptor_serialize_statement, raptor_serialize_end, raptor_serializer_get_iostream, raptor_serializer_set_error_handler, raptor_serializer_set_warning_handler and raptor_serializer_get_locator

Added a Raptor I/O stream abstraction in raptor_iostream class to support serializing of RDF to multiple output streams such as to filenames, to C standard I/O FILE* handles and to strings especially for cross-language use. A raptor_iostream_handler can be used to construct a user-defined iostream.

The new raptor_iostream class functions added are: raptor_new_iostream_from_handler, raptor_new_iostream_to_sink, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_free_iostream, raptor_iostream_write_bytes, raptor_iostream_write_byte, raptor_iostream_write_end, raptor_iostream_write_string, raptor_iostream_write_counted_string, raptor_iostream_get_bytes_written_count, raptor_iostream_write_decimal and raptor_iostream_format_hexadecimal.

The rapper utility was modified to use serializer class so that the output formats supported are now N-Triples (-o ntriples) - the default, and RDF/XML (-o rdfxml).

Raptor now exports more static namespace URI strings for general application use: raptor_xml_namespace_uri, raptor_rdf_namespace_uri, raptor_rdf_schema_namespace_uri, raptor_xmlschema_datatypes_namespace_uri, raptor_owl_namespace_uri, and the length raptor_rdf_namespace_uri_len.

The raptor_stringbuffer class gained a new method raptor_stringbuffer_copy_to_string which allows efficient copy-out of a constructed string.

The raptor_www class gained a new method raptor_www_fetch_to_string to allow retrieving of web content as a single string.

RSS tag soup parser gained support for generating triples for enclosures, after a patch from Suzan Foster. Changes made include correcting the enclosures namespace and tidying some memory leaks.

Raptor 1.3.3 Changes

A release with major improvements along with several minor fixes.

Raptor's License was changed from LGPL 2.1/MPL 1.1 to LGPL 2.1/Apache 2

Thanks to Chris Pointon for several patches to make Raptor easier to build under Win32 which were applied, with some slight modifications.

Increased WWW content retrieval buffer size from 256 bytes to 4K since this was causing problems for even moderate size documents.

After testing raptor on a very large RDF/XML file with many rdf:ID values, the check for duplicate values was found to be inefficient in memory and slow. The implementation was improved to be more memory efficient and a new parser feature check_rdf_id was added to disable checking (default is enabled).

Added a new Unicode NFC checker to replace the functionality formally available by calling the GNOME glib function g_utf8_normalize. This new checker is done via several tables and adds approximately 50K to the object size of the library when compiled on x86. This code and tables can be disabled with configure option --disable-nfc-check causing all checks to succeed.

Fix the exporting of raptor_xml_literal_datatype_uri_string and raptor_xml_literal_datatype_uri_string_len as constants for use by applications. Previously raptor.h wasn't doing this correctly.

Added raptor_calloc_memory for allocating zeroed memory inside raptor, for use by applications passing memory in/out of raptor.

Added a new configure option --enable-parsers to allow the selection of the required RDF parsers from any of those supported (RDF/XML, Turtle, N-Triples, RSS tag soup).

Reorganised the sources to split parsing support from RDF/XML to support compiling without this parser.

Updated the RSS Tag Soup parser to start to handle the Atom 0.3 currently being standardised by the IETF Atom Publishing Format and Protocol working group.

Altered the Turtle parser to work with large source documents that exceeded bison limits. Thanks to Geoff Chappell for providing a fix for this.

Rewrote the URI parsing to create an internal structure and improved the relative URI resolving in preparation for future work such as potentially supporting URI canonicalisation such as proposed to be used by Atom.

Raptor 1.3.2 Changes

A release with some minor fixes.

Added a new configure option --with-expat-source=DIR to allow the use of external expat source trees in either the old or newer directory structure style. (Patch from Mark Smith).

Added raptor_alloc_memory for handlers that need to allocate memory in the same heap as raptor uses for raptor_free_memory. This is mostly useful for allocating memory that is freed by raptor in error, ID and statement handlers on win32 which has separate heaps for different DLLs.

A bug was fixed where errors which happened when fetching WWW content were always printed to stderr. They are now passed to the main error routines which allows applications to retrieve them.

Accessor functions were added for parts of the public raptor_locator structure which makes it possible to get structured error information from language bindings via Redland (Patch from Edd Dumbill). The new functions are:

  • int raptor_locator_line(raptor_locator *locator);
  • int raptor_locator_column(raptor_locator *locator);
  • int raptor_locator_byte(raptor_locator *locator);
  • const char * raptor_locator_file(raptor_locator *locator);
  • const char * raptor_locator_uri(raptor_locator *locator);

The Unicode Normal Form C (NFC) checking via the GNOME glib library function g_utf8_normalize is broken, comparing the data it says is failed against other NFC checkers. It is also slower than need be since it is doing full normalizing rather than just checking for NFC, and adds a rather large dependency for just one function. A new portable checker will be added in a later release.

Raptor 1.3.1 Changes

A release primarily to fix some win32 and portability issues.

raptor.h now includes stdarg.h

Corrected the raptor_print_statement declaration in raptor.h for the argument statement to have one less 'const' which matches the actual code.

Made several portability fixes for compiling natively on win32 which doesn't quite do POSIX or C99.

Changed the support for file: URIs and converting to and from filenames. It now %-escapes spaces and % characters on conversion to and from filenames with raptor_uri_uri_string_to_filename, raptor_uri_uri_string_to_filename_fragment and raptor_uri_filename_to_uri_string. For Win32, more tests were added and the format of URIs supported corrected to use the file:///c: form rather than file://c|/

URIs that resolve to directories now return an error when lstat is available to check.

Parser Changes

The Turtle parser was updated to only allow language with non-datatyped literals, allow a '_' immediately after a ':' in qnames and to make a bare ':' qname work correctly.

The Turtle parser was fixed to re-initialise correctly when performing multiple parsings. The other parsers already did this correctly.

Added a warning to the RDF/XML parser for unknown rdf:parseType values, when parsing in lax mode - which is the default. It now tells the user when the parsing is working as 'Literal' mode by finding an unknown value. This is controlled by a new parser feature warn_other_parsetypes which is default set true in lax mode. Parser modes are controlled by the raptor_set_parser_strict method.

Raptor 1.3.0 Changes

A release primarily to provide support for the new Rasqal RDF query library but with some new features and fixes.

Parser Changes

Added a new constructor raptor_new_parser_for_content to guess the parser to use from hints in URIs or content, using a new utility function raptor_guess_parser_name.

Additional checks were added to the RDF/XML parser for RDF-namespaced names in element and attributes and if they are forbidden giving an error otherwise if unknown, giving a warning.

The Turtle parser was updated to correct the collections syntax, allow '-' in names and QNames and to add integer literals. This parser now correctly uses raptor_generate_id when a blank identifier name is needed.

Completed parser feature support by adding raptor_get_feature, raptor_feature_from_uri, and raptor_features_enumerate to get values and enable discovery of supported features at run time. raptor_set_feature was changed to give return a success value

Added a new method raptor_get_mime_type to get the MIME type of the syntax for a parser

raptor_parse_uri_with_connection (which is called by raptor_parse_uri) now sets the HTTP Accept: header to the MIME type of the parser in WWW requests using the new raptor_www_set_http_accept().

rapper changes

Added options -f/--feature for setting features and -g/--guess for guessing syntax from some content or identifiers. See rapper(1) for all rapper options.

Utility function changes

Added raptor_syntax_name_check to check for valid syntax language names.

Added raptor_free_memory to free memory returned by raptor functions.

Added Unicode utility functions raptor_unicode_char_to_utf8 and raptor_utf8_to_unicode_char.

Exported URI string raptor_xml_literal_datatype_uri_string.

Deprecated raptor_print_statement_detailed always intended to be internal.

WWW Class changes

Added support to set the HTTP Accept: header for curl and libxml2 when retrieving HTTP content by the new raptor_www_set_http_accept method.

New classes - Sequence and Stringbuffer

Added a utility class raptor_sequence providing simple sequences that can handle stacks and queues

Added a utility class raptor_stringbuffer for constructing strings from substrings appended or prepended.

Raptor 0.9.0 - Raptor 1.2.0 Changes

Release notes for 1.2.0 and earlier are in the NEWS page or ChangeLog


Copyright (C) 2003-2014 Dave Beckett
Copyright (C) 2003-2005 University of Bristol

raptor2-2.0.15/LICENSE.html0000644000175000017500000000747312272273150012075 00000000000000 Raptor RDF Syntax Library - License

Raptor RDF Syntax Library - License

This package is Free Software available under any one of the specified licenses below, or any newer version of those licenses. All the licenses below are alternatives and if you select one license, that one alone applies.

1. The GNU Lesser General Public License (LGPL) Version 2.1 or any newer version

See http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html or COPYING.LIB for the full LGPL 2.1 license text.


Copyright (C) 2000-2014 David Beckett
Copyright (C) 2000-2005 University of Bristol. All Rights Reserved.

This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License Version 2.1 as published by the Free Software Foundation or any newer version.

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

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


2. GNU General Public License (GPL) V2 or any newer version

Under Term 3 of the LGPL Version 2.1, you may choose to license the entire package under the GPL. If that option is chosen, then this package is licensed under the terms of the GPL Version 2 or alternatively, any newer version of the GPL. See COPYING for the full GPL 2.0 license text.

3. The Apache License V2.0 or any newer version

See http://www.apache.org/licenses/LICENSE-2.0 or LICENSE-2.0.txt for the full ASL 2.0 license text.

Copyright (C) 2000-2014 David Beckett
Copyright (C) 2000-2005 University of Bristol.

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.

The NOTICE file contains the notices that must be applied according to section 4(d) of the Apache License, Version 2.0.


Copyright (C) 2000-2014 David Beckett
Copyright (C) 2000-2005 University of Bristol

raptor2-2.0.15/ChangeLog.30000644000175000017500000017460310172250716012040 000000000000002002-12-22 Dave Beckett * raptor_uri.c: (main) Try test again with /etc - surely that is least likely to be a symlink? * tests/Makefile.am: check-bad-rdf: turn off bourne shell exiting while running tests expected to fail. * tests/Makefile.am: Set baseuri from test file basename; ensure no dirs are in the base URI 2002-12-21 Dave Beckett * configure.ac: Removed just for now 2002-12-20 Dave Beckett * NEWS.html: tweak * configure.in: Bumped version to 0.9.8 * NEWS.html: date * Snapshotted raptor_0_9_7 for 0.9.7 release * raptor.spec.in: Updated for 0.9.7 release 2002-12-19 Dave Beckett * INSTALL.html, README.html, NEWS.html: Updated for 0.9.7 release * acconfig.h: Seems like PACKAGE and VERSION are not needed here, and later autoconfs generate headers that moan. * raptor_parse.c, raptor_general.c: castings * raptor.h: Indent CPP directives after column 1 # for lame C compiler * TODO.html: Updated after recent bug fixes * tests/Makefile.am: test(1) string equality is = not == 2002-12-18 Dave Beckett * autogen.sh: Delete autom4te too * configure.ac: auto-configure source for newer autoconfs 2002-12-16 Dave Beckett * raptor_uri.c (main): Use /bin to test, seems more likely to be around on more posix systems such as OSX * raptor_parse.c (raptor_generate_statement): Handle NULL reified being passed. (raptor_process_property_attributes): Property attributes are never reified explicitly but may be in a bag. (raptor_start_element_grammar,raptor_end_element_grammar): Turn bad uses of bag:ID into errors not warnings. * tests/Makefile.am: Added more bag:ID checks (44-45) and errors (bad 05-09) Make test failures stop the 'make check'. * tests/bad-05.rdf, tests/bad-06.rdf, tests/bad-07.rdf, tests/bad-08.rdf, tests/bad-09.rdf, tests/ex-48.rdf, tests/ex-49.rdf, tests/ex-50.rdf, tests/ex-46.rdf, tests/ex-47.rdf, tests/ex-48.out, tests/ex-49.out, tests/ex-50.out, tests/ex-46.out, tests/ex-47.out: Turned rdf:bagID property element checks into errors * raptor_parse.c: Add rdf:bagID checks - only allow it in the two cases it is in the grammar - on a node element and an empty property element. Otherwise emit warnings since there is no error test case yet. * tests/ex-50.out, tests/ex-50.rdf, tests/ex-44.out, tests/ex-45.out, tests/ex-46.out, tests/ex-47.out, tests/ex-48.out, tests/ex-49.out, tests/ex-44.rdf, tests/ex-45.rdf, tests/ex-46.rdf, tests/ex-47.rdf, tests/ex-48.rdf, tests/ex-49.rdf: Checking rdf:bagID ignored on other property element cases * raptor_parse.c (raptor_generate_statement): Handles generating a reified statement ID for use with bagID and then reiifying the statement too. * tests/Makefile.am: Add ex-43 * tests/ex-43.out, tests/ex-43.rdf: Test rdf:bagID when property elements need generated reified ID * raptor_parse.c (raptor_generate_statement): Gain bag_element argument, use it throughout to indicate the element to find the rdf:bagID if any. (raptor_start_element_grammar): Generate _:bagid rdf:type rdf:Bag when rdf:bagID appears on node element. * tests/ex-42.out: Correct for actual output order 2002-12-15 Dave Beckett * tests/ex-03.rdf, tests/ex-03.out: correct this now that rdf:bagID support begins to work * tests/Makefile.am: Added ex-42 * tests/ex-42.out, tests/ex-42.rdf: rdf:bagID * tests/bad-04.rdf: Check rdf:ID and rdf:bagID with same value fails * tests/bad-02.rdf: Duplicate rdf:ID names * raptor_parse.c: Make debug less chatty about cdata, unless RAPTOR_DEBUG_CDATA defined. * raptor_parse.c (raptor_record_ID): Added, notes rdf:ID and rdf:bagID values, checks for duplicates (per in-scope base-URI). (raptor_free_ID_list): Added, frees structure above. (raptor_xml_start_element_handler): Handle xml:base using raptor_new_uri_for_xmlbase to strip/fix parts that aren't used. (raptor_start_element_grammar): Check for illegal rdf:ID, rdf:bagID and rdf:nodeID using raptor_valid_xml_ID. Check for duplicate rdf:ID and rdf:bagID values using raptor_record_ID. Only allow parsetype "Literal", "Resource" and "Collection", not case-equivalents. Check for and forbid property attributes on a literal property elemnent. * Makefile.am: Added raptor_utf8.c * raptor_internal.h: Export less from raptor_utf8.c * raptor_general.c (raptor_valid_xml_ID): Use raptor_unicode_is_namestartchar and raptor_unicode_is_namechar. * raptor_utf8.c: Raptor UTF-8 and Unicode support * tests/bad-03.rdf: Check rdf:ID and rdf:bagID values * tests/Makefile.am: Added bad-02 to bad-04 * raptor_uri.c (raptor_uri_construct): Internal; constructs a uri-ref string from the parts. (raptor_new_uri_for_xmlbase): Ad (raptor_uri_resolve_uri_reference): Copy reference path across when reference URI has one. Work for path components that are >1 letter long. (raptor_new_uri_for_xmlbase): Added, makes a new uri from an existing one, suitable for xml:base (no fragment, query; path must be present). (main): Make test cases use example.org. Add checks for the above bugs. * raptor.h: Added prototype for raptor_new_uri_for_xmlbase * ntriples_parse.c: raptor_ntriples_unicode_char_to_utf8 now raptor_unicode_char_to_utf8 raptor_ntriples_utf8_to_unicode_char now raptor_unicode_utf8_to_unicode_char (raptor_print_ntriples_string): Allow no delimiter. * raptor_internal.h: Added prototypes for raptor_valid_xml_ID Added prototypes for raptor_unicode_is_* methods. The ntriples_* utf8/unicode methods are now raptor_unicode_* * raptor_general.c (raptor_print_statement_as_ntriples): N-Triples escape URIs (for IRI compatibility). (raptor_validate_xml_ID): Added, checks that the syntax of attributes matching xml:ID are correct matching http://www.w3.org/TR/REC-xml-names/#NT-NCName * rdfdump.c: Exit 1 on error, 2 on warnings. * README.html: Words 2002-12-13 Dave Beckett * tests/ex-41.rdf, tests/ex-41.out: Add rdf:datatype test with xml:lang * raptor_parse.c: Don't care state about numbers * raptor_parse.c (raptor_xml_end_element_handler): Don't check for unbalanced XML; the XML parsers do that * raptor_parse.c: Update parser states to match http://www.w3.org/TR/rdf-syntax-grammar/ names. Fix comments to also match. rdf_syntax_terms_info - added to describe forbidden nodeEl, propEl, propAttr (raptor_forbidden_nodeElement_name, raptor_forbidden_propertyElement_name): Added, using above * rdfdump.c: Exit with code 2 if there were warnings. * raptor_parse.c: Zap xml:lang attr 2002-12-10 Dave Beckett * configure.in: Added raptor-config * Makefile.am: Added raptor-src-config * raptor-src-config.in: raptor-src-config source 2002-12-04 Dave Beckett * raptor_parse.c (raptor_xml_start_element_handler): Save away the element attributes in an allocated array, restore the pointers later. This allows the XML parser to free them correctly. (raptor_xml_end_element_handler): Call raptor_free_qname again to tidy up. (raptor_init_parser_rdfxml): Initialise libxml2 explicitly (raptor_terminate_parser_rdfxml): Added, cleaning up libxml2. * raptor_libxml.c (raptor_libxml_endDocument): free the libxml2 Doc that is created but never freed by the SAX methods. * raptor_internal.h, raptor_general.c: Added raptor_terminate_parser_rdfxml() for closing rdfxml parser factory. 2002-12-03 Dave Beckett * raptor_libxml.c (raptor_libxml_internalSubset, raptor_libxml_externalSubset): No return value. * raptor.h: Update prototype for unsigned char arg. * raptor_parse.c: Yet more casts, for expat XML_Char as char* * raptor_uri.c (raptor_free_uri): There is no return value * raptor_uri.c, raptor_qname.c, raptor_parse.c, raptor_namespace.c, raptor_general.c, raptor.h, ntriples_parse.c: More unsigned char to char fixes, other castings enough to make g++ happy. * raptor_parse.c, raptor_qname.c, raptor_namespace.c, raptor_general.c, raptor_internal.h: Use unsigned char for UTF-8 strings rather than char (That means all XML names, content, buffers) * raptor_parse.c: Delete HAVE_XML_SetNamespaceDeclHandler - never used Don't merge expat XML_Char (char) and libxml2 xmlChar (unsigned char). Work with unsigned char always. * raptor_internal.h: Don't merge expat XML_Char (char) and libxml2 xmlChar (unsigned char). Work with unsigned char always. * configure.in, acconfig.h: Delete HAVE_XML_SetNamespaceDeclHandler - never used * raptor_parse.c (raptor_element_has_property_attributes): Unused rdf_parser arg zapped. * raptor_parse.c (raptor_xml_parse_chunk_): Don't assign a negative number to size_t len, it is probably unsigned. * raptor_parse.c (raptor_free_element): Use raptor_free_uri on datatype URI * raptor_parse.c, raptor.h: Removed trailing ','s in enums 2002-12-02 Dave Beckett * ntriples_parse.c (raptor_ntriples_string): sscanf format lx 2002-11-28 Dave Beckett * TODO.html: Note suggestion to trim spaces around urls in lax/default mode 2002-11-27 Dave Beckett * INSTALL.html: Now works with old libxml 2.3.5 (released 2001-03-23) * raptor_libxml.c (raptor_libxml_init): Use RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED to see if libxml xmlSAXHandler has an initialized field * configure.in: Check libxml xmlSAXHandler has initialized field defining RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED if so * acconfig.h: Added RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED * INSTALL.html: Updated supported versions 2002-11-26 Dave Beckett * win32_config.h, configure.in, rdfdump.c, raptor_uri.c, raptor_parse.c, raptor_libxml.c, raptor_general.c, ntriples_parse.c: stdarg.h is now a required header. * configure.in: Added --with-xml2-config to set location of libxml xml2-config program. 2002-11-24 Dave Beckett * raptor_parse.c (raptor_xml_start_element_handler): Don't free raptor_free_qname(element_name) here, raptor_free_element does it. 2002-11-21 Dave Beckett * configure.in: Make it use expat sources if this is part of Redland, ../expat dir exists and there is no installed expat system library * raptor_parse.c (raptor_xml_parse_chunk_): Only use the libxml2 bug workaround for small buffers for libxml2 versions lower than 2.4.25 * tests/Makefile.am: Report error status from standard rdf/xml tests, even if the answer was correct. * tests/ex-03.rdf: Remove aboutEach* and bare bagID 2002-11-19 Dave Beckett * TODO.html: XML parser choice * tests/test.out, tests/test.nt, tests/ex-11.out, tests/ex-07.out, raptor_parse.c, raptor_general.c, ntriples_parse.c: rdfs:XMLLiteral now rdf:XMLLiteral Add rdf:nil to allowed rdf namespace terms * raptor_parse.c: More error/warnings rewordings * raptor_parse.c: Remove M&S from some comments, messages. Use RDF namespace. * raptor_parse.c: Improve warning about multiple object nodes for a property element. 2002-11-07 Dave Beckett * tests/test.out: typo * tests/test.out, tests/ex-11.out, tests/ex-07.out: Remove xml"" tests, replacing with "foo"<...> form. * raptor_general.c: Remove xml"" (stage 1). (raptor_print_statement_detailed): Output this as a datatyped literal. (raptor_print_statement_as_ntriples): Output the "foo"<..> datatype N-Triples form. * ntriples_parse.c: Remove xml"" (stage 1). Parsing it works but gives an error. Never output. (raptor_ntriples_generate_statement): Output "foo"<...> for xml literal. Remove is_xml argument. (raptor_ntriples_parse_line): For XML literal (old xml""), parse, give an error and emit it in the datatype form. 2002-11-02 Dave Beckett * README.html: Updated after 0.9.6 release - sigh! * NEWS.html: fix 0.9.6 release date * configure.in: Bumped version to 0.9.7 * Snapshotted raptor_0_9_6 for 0.9.6 release * NEWS.html, TODO.html: Updated for 0.9.6 * raptor_parse.c: rdf_attr_info gains allowed_unprefixed_on_attribute to suppress warning. * libraptor.3: Updated for 0.9.6 * tests/test.out: minor fix * rdfdump.1: Add -a/--assume option. * raptor.h: Tweak uri factory method typedefs, prefix with raptor_ * raptor.h: raptor_start_parse_file: Made an internal method * raptor_general.c (raptor_start_parse_file): Made an internal method * tests/test.nt: minor fix * tests/test.out, tests/test.nt: Added tests for datatyped literals with/without language * ntriples_parse.c (raptor_ntriples_string): Added N-Triples datatype (^^) parsing. 2002-11-01 Dave Beckett * ntriples_parse.c (raptor_ntriples_generate_Statement): Added datatypes argument, will set the URI if the string is passed in. 2002-10-31 Dave Beckett * raptor_parse.c: Check for rdf:datatype on property/member elements * tests/Makefile.am: Added ex-41 * tests/ex-41.out, tests/ex-41.rdf: Added rdf:datatype tests * raptor_parse.c (raptor_free_element): Free xml:lang values * raptor_parse.c: alternatively, don't zap the pointer and let cleanup grab it. * raptor_parse.c: free rdf:about attribute value before discarding pointer. * raptor_general.c (raptor_parse_file): Always free filename. * raptor_uri.c (raptor_uri_filename_to_uri_string): Fix length of buffer for unix when file name is recalculated from getcwd(). * raptor_namespace.c (raptor_namespaces_free): Don't need non-NULL context to do freeing. * ntriples_parse.c: Update to handle xml"string"@lang format (and warn about older one) * ntriples_parse.c: Update to handle "string"@lang format (and warn about older one) * tests/test.out, tests/test.nt, tests/rdfs-namespace.out, tests/rdf-schema.out, tests/ex-29.out: Update to "string"@lang format. * raptor_general.c (raptor_print_statement_as_ntriples): Update to "string"@lang format. Add datatype URI. * rdfdump.c (main): Init uri_string variables * raptor_internal.h, ntriples_parse.c, raptor_namespace.c, raptor_parse.c, raptor_qname.c, raptor_uri.c, raptor_general.c, raptor_libxml.c: LIBRDF_ macros now RAPTOR_ * raptor_internal.h: Remove raptor_uri_init * raptor.h: Added raptor_uri_init * raptor_namespace.c: (main) Updates for initialising URI class in/outside redland * rdfdump.c: When RAPTOR_IN_REDLAND, include * rdfdump.c: Use raptor URI calls. Use raptor_init/raptor_finish - now required. * raptor_general.c (raptor_init): Now compulsory * raptor_parse.c, raptor_locator.c, raptor_namespace.c: macro RAPTOR_URI_AS_STRING -> raptor_uri_as_string * raptor_internal.h: Removed macro RAPTOR_URI_AS_STRING * raptor_general.c: macro RAPTOR_URI_AS_STRING -> raptor_uri_as_string * raptor.h: Added raptor_uri_as_string and uri class method * raptor_uri.c (raptor_default_uri_as_string): Added (raptor_uri_as_string): Added, using above for default class. (raptor_uri_init_default_handler): Register the above * raptor_general.c: Use RAPTOR_URI_AS_STRING for getting uri string to make a filename. * raptor_parse.c: Remove uses of IS_RDF_MS_CONCEPT with raptor_uri_equals. Define more concepts for rdf:RDF, rdf:Description and rdf:li * raptor_internal.h: remove IS_RDF_MS_CONCEPT * raptor_qname.c: macro RAPTOR_FREE_URI -> raptor_free_uri * raptor_internal.h: delete macros RAPTOR_FREE_URI, RAPTOR_URI_TO_FILENAME * raptor_general.c: macro RAPTOR_FREE_URI -> raptor_free_uri macro RAPTOR_URI_TO_FILENAME -> raptor_uri_uri_string_to_filename (only use) * ntriples_parse.c: macro RAPTOR_FREE_URI => raptor_free_uri * raptor_uri.c: Add some casts now raptor_uri is a typedef for void* * raptor_internal.h, raptor.h: Remove more RAPTOR_IN_REDLAND prototypes * ntriples.h: Remove more RAPTOR_IN_REDLAND * rdfdump.c: Remove more RAPTOR_IN_REDLAND and old API * raptor_parse.c: Re-add DAML Collection info to rdf_content_type_info table - just plain luck that this was working without it. Add concept URIs table to rdf_xml_parser structure. Change concepts macros to point to the parts of that table. Remove most of the RAPTOR_IN_REDLAND stuff, consequently. * raptor_namespace.c (raptor_namespaces_free): Handle being called when handler/context empty. * raptor_namespace.c: Use raptor_namespace struct raptor_namespace_stack field to get uri handler/context * raptor_internal.h: raptor_namespace: add raptor_namespace_stack field * raptor_general.c (raptor_start_parse): Use changed raptor_namespaces_init call. * raptor_namespace.c: Remove RAPTOR_REDLAND code and use uri_handlre/context args (raptor_namespaces_init): Now takes uri handler, context args. Initialises rdf/rdfs namespace URIs. (raptor_namespaces_free): Free rdf/rdfs namespace URIs. * raptor_general.c: Remove RAPTOR_REDLAND code Call raptor_namespaces_init with raptor URI handler, context * raptor_internal.h: Remove RAPTOR_REDLAND definitions and double prototypes. Added uri_handler, uri_context, rdf_ms_uri, rdf_schema_uri to raptor_namespace_stack. * ntriples_parse.c: Remove RAPTOR_REDLAND code * raptor_uri.c (raptor_uri_get_handler): Added * raptor.h: Added raptor-uri_get_handler. * raptor_uri.c: rename raptor_current_uri_* -> raptor_uri_current_* * raptor_uri.c: Use raptor_current_uri_handler, raptor_current_uri_context throughout. 2002-10-30 Dave Beckett * raptor_uri.c (raptor_uri_set_handler): Added, initialising the static variables raptor_current_uri_handler, raptor_current_uri_context. raptor_init_uri_class -> raptor_uri_init * raptor_general.c, raptor_internal.h: raptor_init_uri_class -> raptor_uri_init * raptor.h: Added raptor_uri_set_handler * raptor_uri.c: raptor_copy_uri -> raptor_uri_copy (raptor_default_uri_copy): Added (raptor_init_uri_default_handler): Added to re-init the default uri class. (raptor_init_uri_class): To initialise the uri class with default handler * raptor_internal.h: Declare uri class init prototypes. * raptor_parse.c, raptor_general.c: raptor_copy_uri -> raptor_uri_copy * raptor.h: raptor_copy_uri -> raptor_uri_copy Added uri handler func definitions. Added raptor_uri_handler, using above funcs 2002-10-15 Dave Beckett * raptor_qname.c: Remove only RAPTOR_IN_REDLAND use - not required. * raptor_uri.c: Updated copyright * ntriples_parse.c: Removed raptor_make_uri; use raptor_new_uri_relative_to_base directly. * raptor.h: Removed raptor_new_uri_from_base_name prototype * raptor.h: Removed all raptor_make_uri prototypes. Added prototypes for raptor_new_uri_relative_to_base, raptor_new_uri_from_id, raptor_new_uri_from_base_name, raptor-new_uri_for_rdf_concept. * raptor_parse.c: RAPTOR_FREE_URI (macro) to raptor_free_uri (method) Removed raptor_make_uri; use raptor_new_uri_relative_to_base directly. Removed raptor_make_uri_from_id: use raptor_new_uri_from_id directly Use raptor_new_uri_for_rdf_concept * raptor_uri.c: Typo. Removed raptor_make_uri; use raptor_new_uri_relative_to_base directly. (raptor_default_new_uri_for_rdf_concept, raptor_new_uri_for_rdf_concept): Added to get URI of rdf:thing 2002-10-13 Dave Beckett * raptor_uri.c (raptor_default_new_uri_relative_to_base, raptor_new_uri_relative_to_base): Added (raptor_new_uri_from_id): Added, was make_uri_from_id (raptor_new_uri_from_base_name): Added, was make_uri_from_base_name * raptor.h: Added new uri methods, soon-to-be old make_uri_* ones * raptor_internal.h: Move uri calls to raptor.h * raptor_parse.c: Remove unused rdf_parser argument of raptor_make_uri_from_id calls. * raptor_uri.c (raptor_make_uri_from_id): Remove unused rdf_parser argument * raptor_uri.c: Start of skeleton code for URI class, along with default methods. (raptor_default_new_uri, raptor_new_uri): Added (raptor_default_new_uri_from_uri_local_name, raptor_new_uri_from_uri_local_name): Added (raptor_default_free_uri,raptor_free_uri): Added (raptor_default_uri_equals, raptor_uri_equals): Added (raptor_make_uri, raptor_make_uri_from_id, raptor_make_uri_from_base_name):Moved from raptor_general.c * raptor_general.c: Move raptor_make_uri, raptor_make_uri_from_id, raptor_make_uri_from_base_name to raptor_uri.c 2002-10-12 Dave Beckett * raptor_parse.c (raptor_xml_parse_terminate): Moved all of raptor_xml_parse_clean here, deleted it. * rdfdump.c: Updated to newest calling API - no special ntriples calls. * raptor_general.c, raptor.h: Tweak raptor_new_parser prototype. * libraptor.3: Updated to describe features * libraptor.3: Updated for shared parser core api * raptor_parse.c: Add raptor_xml_parser here - private struct. * raptor_internal.h: Moved raptor_xml_parser to private file. * raptor_general.c: Tidy raptor_new old api note. * ntriples.h: Updated ntriples parser to new registering API. * ntriples_parse.c: Converted to the new factory-based API. raptor_ntriples_parser_context (and struct version _s) now allocated by main parser code. Use raptor_parser for most methods and calls. (raptor_ntriples_parse_init, raptor_ntriples_parse_terminate): Added (raptor_ntriples_new): Replaced with wrapper around raptor_new_parser("ntriples"). (raptor_ntriples_free): Replaced with wrapper around raptor_free_parser (raptor_ntriples_set_error_handler, raptor_ntriples_set_fatal_error_handler, raptor_ntriples_set_statement_handler, raptor_ntriples_parser_error, raptor_ntriples_parser_fatal_error, raptor_ntriples_parse_file): Replaced with wrappers around general methods. (raptor_ntriples_parse_chunk): Renamed from raptor_ntriples_parse (raptor_ntriples_parse_start): Added from parts of old raptor_ntriples_parse_file. (raptor_ntriples_parser_register_factory): Added to register this with the main system. (raptor_init_parser_ntriples): Added to register this module. 2002-10-11 Dave Beckett * raptor_internal.h: Moved raptor_parser_s here, for use across the library. Lots of rearranging and reordering to move structs earlier. Added raptor_parser_factory_s and typedef. Added prototypes for factory registration calls. * raptor_parse.c: Now uses factory and parser-specific context. (raptor_xml_new, raptor_xml_free, raptor_xml_parse_init): Moved most code to raptor_new_parser, raptor_free_parser, raptor_start_parse (raptor_xml_parse_init_file): Gone. Renamed to match factory methods - raptor_xml_parse_terminate. (raptor_parse_file): Moved to raptor_general.c (raptor_xml_parser_register_factory): Added, for registering factory. (raptor_init_parser_rdfxml): Register parser type "rdfxml". * raptor_general.c: Added parser factory functions and use them via new API. (raptor_init, raptor_finish): Added to start/end raptor. (raptor_delete_parser_factories): Added, helper for cleanup. (raptor_parser_register_factory): Added, for registering parsers (raptor_get_parser_factory): Added, helper for finding a parser (raptor_new_parser): New constructor, uses factory and initialises only general parts of parser. (raptor_start_parse): New method to (re)initialise a particular parse. (raptor_start_parse_file): New method to start parsing from a filename. (raptor_parse_chunk): New method to parse content from memory. (raptor_free_parser): New destructor. (raptor_parse_file): Moved from raptor_parse.c and made general. (raptor_new): Old API constructor, now written over new constructor. (raptor_free): Old API destructor, now just calls new destructor. (raptor_set_world): Temporary redland support. * raptor_namespace.c (raptor_namespaces_free): Zap top of stack when done, so can work when called multiple times. * raptor.h: Added raptor_init(), raptor_finish() Deprecate raptor_new(), raptor_free(). Added raptor_new_praser(), raptor_free_parser(), raptor_start_parser(), raptor_start_parse_file(), raptor_parse_chunk() Temporarily use raptor_set_redland_world. 2002-10-10 Dave Beckett * Makefile.am: Added raptor_general.c * raptor.h: raptor_print_statement_detailed: Now public. * raptor_internal.h, raptor_parse.c, raptor_general.c: Split general parsing routines into raptor_general.c leaving the rdf/xml parsing specific parts in raptor_parse.c. The general raptor_parser structure moved to raptor_internal.h leaving a new raptor_xml_parser for raptor_parse.c [rdf/xml]. 2002-10-07 Dave Beckett * tests/test.html, tests/test.svg: Embedded rdf:RDF tests * raptor_general.c, raptor_parse.c: Call dummy (length calculating) vsnprintf call with a 1-byte buffer rather than NULL - OSX seems unhappy with that. Try to get rdf:RDF scanning working by adding at_grammar_start check rather than apply at all state unknown points. 2002-09-29 Dave Beckett * tests/Makefile.am: Split the checks into classes; ex-19.rdf is for when rdf is assumed since it ommits rdf:RDF, and hence is not really rdf/xml. * rdfdump.c: Added -a,--assume to set feature assume_is_rdf * raptor_general.c, raptor_parse.c: Added rdf:datatype built in. Literal datatype URI stored in containing property element. Added feature_assume_is_rdf to make rdf:RDF optional. (raptor_generate_statement): Add literal datatype URI argument. (raptor_xml_parse_chunk_): Return parser errors in initial XML_Parse correctly - check if it happens even if end of data. Similarly for libxml's xmlParseChunk. (raptor_set_feature): Added feature assume_is_rdf (raptor_print_statement_detailed): Added literal datatype URI printing. (raptor_process_property_attributes): Warn about unqualified (property) attributes, don't try to process them. (raptor_start_element_grammar): Added feature assume_is_rdf splitting scanning for rdf:RDF (feature scanning) and ignoring it (feature assume) * raptor_qname.c (raptor_new_qname): Don't die on non-namespaced XML; could be used in skipping or other processing. * raptor.h: added assume_is_feature datatypes built in raptor_print_ntriples_string now returns an int * LICENSE.html: Tidy intro, update dates * ntriples_parse.c: change anon->bnodeid Add ASCII rather than is* locale-tests and validate bnodeIDs with the macros (parse_ntriples_string): Check for invalid ASCII chars. Tidy error reporting for end of line. (raptor_ntriples_parse_line): Add validation of bnodeIDs (raptor_ntriples_parse_file): Comments (raptor_print_ntriples_string): Handle failure, add a return code * ntriples.h: change anon->bnodeid * configure.in: datatypes built in now * Makefile.am: Clean the test programs 2002-09-19 Dave Beckett * Makefile.am: Restore rule to make librdf.la for when embedded in Redland * TODO.html: remove duplicate bagID bug * TODO.html: CDATA works with libxml now * raptor_libxml.c (raptor_libxml_init): Enable handling of cdata blocks - by registering callback to raptor_xml_cdata_handler * tests/ex-40.out: Fix node * tests/Makefile.am: Added ex-40 * tests/ex-40.out, tests/ex-40.rdf: Check XML CDATA sections * Makefile.am: dist-hook added to copy pre-built README and NEWS to release 2002-09-18 Dave Beckett * raptor_namespace.c (raptor_namespace_new): Fix debug message to report no URI for namespace. * raptor_namespace.c (raptor_namespace_new): Make xmlns="" work when compiling inside Redland. 2002-09-16 Dave Beckett * raptor_parse.c (raptor_xml_parse_chunk_): For libxml, don't pass in filename to xmlCreatePushParserCtxt, we may not always have one. For lbixml, return correctly from initial parsing. (raptor_xml_parse_chunk): Add docucomments. (raptor_parse_file): Terminate loop on end of file as well as error. * Makefile.am: Added REDLAND_LIBS to raptor_namespace_test to make it work inside redland 2002-09-12 Dave Beckett * TODO.html: daml:collection fixed * raptor_parse.c (raptor_parse_file): Split into: raptor_xml_parse_init, raptor_xml_parse_init_file, raptor_xml_parse_clean and raptor_xml_parse_chunk to allow more flexible APIs. (raptor_xml_parse_chunk_): Added, doing the main work of raptor_xml_parse_chunk but without error checking. (raptor_xml_parse_handle_errors): Added to process errors from an XML parser during parsing. * raptor_namespace.c: Make it work inside redland too. Fix standalone tests inside redland. 2002-09-11 Dave Beckett * raptor_internal.h: Moved namespace and qname definitions and prototypes here from raptor_parse.c * Makefile.am: Added raptor_namespace.c raptor_qname.c * raptor_parse.c: Moved namespace code to raptor_namespace.c, qname code to raptor_qname.c and renamed raptor_ns_map, raptor_ns_na,e to match. * raptor_qname.c: Raptor XML qname * raptor_namespace.c: Raptor XML namespace classes 2002-09-01 Dave Beckett * raptor_parse.c: Use updated LIBRDF_RS URI names * raptor_parse.c: Added rdf:parseType="Collection" after daml:collection code * tests/Makefile.am: Added test ex-39 for parseType Collection * tests/ex-39.out, tests/ex-39.rdf: rdf:parseType="Collection" test * raptor_parse.c: Change daml:Collection, daml:* comments to Collection, rdf:List etc. 2002-08-31 Dave Beckett * raptor_parse.c (raptor_end_element_grammar): Generate rdf:nodeID, store in id, not URI field. Rearrange three calls of raptor_process_property_attributes into one. * tests/Makefile.am: Use ECHO_N and ECHO_C to do portable echo without newline * configure.in: Pass on echo pre/postfix args needed for echoing without a newline * tests/Makefile.am: Instead of ignoring warnings, make make ignore exit codes from rdfdump * tests/Makefile.am: Ignore warnings (for now) in tests * tests/Makefile.am: Remove RDF_TEST_ANSWER_FILES - not used * raptor_parse.c (raptor_start_element_grammar): Don't copy URIs from daml:collection to the contained nodes. * tests/ex-34.out: Now correct. 2002-08-29 Dave Beckett * tests/Makefile.am: Added ex-38 * tests/ex-38.rdf, tests/ex-38.out: Test daml:Collection with rdf:ID * tests/ex-37.out: switch order again * raptor_parse.c (raptor_element_has_property_attributes): Check for rdf: properties too * tests/ex-37.out: Correct order, nodes in result * tests/ex-37.out, tests/ex-37.rdf: rdf:type attribute on empty property * tests/Makefile.am: Added ex-37 2002-08-28 Dave Beckett * raptor_parse.c: Fixed empty daml:Collection handling * raptor_uri.c: Minor strcat/strcpy optimisation * tests/ex-34.rdf: Renamed nodes so prop2 goes with node2 etc. * tests/ex-34.out: renamed genids to more match output * tests/ex-35.out, tests/ex-35.rdf, tests/ex-36.out, tests/ex-36.rdf: Added more daml:Collection checks * tests/ex-24.out: output order changed, same triples * tests/Makefile.am: Added ex-35, ex-36 for more daml:Collection checks * tests/ex-12.out: output order changed, same triples 2002-08-22 Dave Beckett * raptor_parse.c: removed fn not used * raptor_parse.c: Update xml namespaces comment with NE05 errata * raptor_parse.c: Removed use of obsolete object_is_literal statement field Added rdf datatypes test code * ntriples_parse.c: Removed use of obsolete object_is_literal statement field * raptor.h: Add statement object datatype uri * configure.in: Add rdf datatypes test flag --enable-rdf-datatypes * acconfig.h: Add rdf datatypes test flag 2002-08-21 Dave Beckett * TODO.html: Updates: OSX compiling works (from packaged sources) Still works with latest expat (1.95.2), libxml (2.4.23) 2002-08-20 Dave Beckett * raptor_uri.c (raptor_uri_uri_string_to_filename): Freeing wrong things * ntriples_parse.c, raptor_parse.c, raptor_internal.h: Remove RAPTOR_URI_AS_FILENAME * raptor.h: Added raptor_uri_is_file_uri * configure.in: Added limits.h check * raptor_internal.h: Added raptor_strncasecmp * raptor_uri.c (raptor_uri_is_file_uri): Added. * Makefile.am: Added strcasecmp_test * strcasecmp.c (raptor_strncasecmp): Added (assert_strcasecmp, assert_strncasecmp): Added for testing. (main) Added to run tests * raptor_uri.c: (raptor_uri_filename_to_uri_string); For unix filename "foo", get dir and name it "/dir/foo". (main): Check above works using /tmp dir - warn if can't chdir(/tmp) * raptor_internal.h: Replaced raptor_file_uri_to_filename with aptor_file_uri_to_filename * raptor_parse.c, ntriples_parse.c: Removed raptor_file_uri_to_filename * raptor_uri.c (raptor_uri_filename_to_uri_string, raptor_uri_uri_string_to_filename): fix unix relative file file:foo and bad win32 authority check. (main): Check unix foo/file:foo works * raptor.h: Added raptor_uri_filename_to_uri_string and raptor_uri_uri_string_to_filename * raptor_uri.c (raptor_uri_filename_to_uri_string): Added for filename to file: URI for win32 and unix. (raptor_uri_uri_string_to_filename): Added for file: URI to filename for win32 and unix. (assert_filename_to_uri,assert_uri_to_filename): Added for regression testing. (main): Tests for win32 / unix filename / file:URIs 2002-08-19 Dave Beckett * INSTALL.html: Added some more xml library versions * raptor_parse.c: Remove a lot of raptor_update_document_locator calls and add them to the start of several functions. Replace some expat-specific stuff with general calls. * raptor_parse.c: Add raptor_update_document_locator calls before every parser error or warning. (raptor_expat_update_document_locator): Added. * raptor_internal.h: Export raptor_libxml_update_document_locator Export raptor_expat_update_document_locator Export raptor_update_document_locator * raptor_libxml.c (raptor_libxml_update_document_locator): Now not static. Remove column numbers - they seem to be total fiction. * raptor_locator.c (raptor_update_document_locator): Added. * raptor_parse.c (raptor_xml_cdata_handler): Allow to be ignored when there is no element (XML very damaged) * rdfdump.c: Tidy output formatting * raptor_libxml.c: Delete extra '\n' at end of XML parsing messages; that's up to the app to add. * raptor_parse.c: Removed some \n-s from warning/error messages * raptor_locator.c (raptor_format_locator): Don't count \0 in buffer size. * Makefile.am: Added raptor_locator.c * raptor.h: Added raptor_format_locator * raptor_locator.c: Raptor parsing locator functions * raptor_parse.c: Moved raptor_print_locator to raptor_locator.c * rdfdump.c: Updated for raptor error handlers passed on as strings, not va_list * ntriples_parse.c: raptor errors passed on as strings, not va_list (raptor_ntriples_parser_error, raptor_ntriples_parser_fatal_error): Turn va_list into a string. * raptor_parse.c: raptor errors passed on as strings, not va_list (raptor_parser_fatal_error_varargs, raptor_parser_error_varargs, raptor_parser_warning_varargs): Turn va_list into a string. * raptor.h: raptor errors passed on as strings, not va_list 2002-08-18 Dave Beckett * Makefile.am: Add LTLIBOBJS to raptor library, not rdfdump * configure.in: Set LIBOBJS and LTLIBOBJS * configure.in: Check for strcasecmp, stricmp or use compatibility version * raptor_internal.h: Define raptor_strcasecmp to library routine, or leave alone for compatibility function. * Makefile.am: Added @LIBOBJS@ and strcasecmp.c * strcasecmp.c: strcasecmp compatibility * raptor_parse.c: strcasecmp now raptor_strcasecmp, will be defined to right function * win32_config.h: Don't use macros for strcasecmp; now handled generally * Makefile.am: Added raptor_internal.h, win32_config.h to noinst headers Added raptor_win32.c * raptor_win32.c: Raptor WIN32 support functions * win32_config.h: Raptor WIN32 hard-coded config * rdfdump.c: Tidying up stdlib.h, dmalloc.h includes. Include win32_config.h #ifdef WIN32 * raptor_parse.c, raptor_uri.c: Tidying up stdlib.h, dmalloc.h includes. Removed stuff duplicated in raptor.h/raptor_internal.h Include win32_config.h #ifdef WIN32 * raptor_libxml.c: Tidying up stdlib.h, dmalloc.h includes. Include win32_config.h #ifdef WIN32 * ntriples_parse.c: Tidying up stdlib.h, dmalloc.h includes. Removed stuff duplicated in raptor.h/raptor_internal.h Include win32_config.h #ifdef WIN32 * raptor_internal.h: Moved libxml includes, defines and structs here. Declared extern function prototypes for libxml interface. * raptor_parse.c: Use errno.h, not extern int errno Moved most libxml code to new raptor_libxml.c Moved necessary includes, defines and structs to raptor_internal.h Some renaming of functions; raptor_libxml* for those related to libxml Some functions now not static. Added some necessary methods for accessing raptor_parser structure for libxml. (raptor_get_locator): Added; new public method. * raptor.h: Added raptor_get_locator * ntriples_parse.c: Use errno.h, not extern int errno * Makefile.am: Added raptor_libxml.c * raptor_uri.c: Use errno.h if present * raptor_libxml.c: Raptor libxml functions * raptor_parse.c: Added 12 wrapper functions for libxml handlers, passing on the right context to them, to enable handling of entities and resolving them. (raptor_xml_update_document_locator): Handle if in document subset Changed internal raptor fatal_error, error, warning functions to have varargs versions that libxml can use. (raptor_new): Initialise new libxml handler wrappers 2002-08-17 Dave Beckett * rdfdump.c: Set ntriples error handler * ntriples_parse.c: Added fatal/non-fatal error handlers/functions. (raptor_ntriples_set_error_handler): Added. (raptor_ntriples_string): Documented args; now returns failure status. (raptor_ntriples_parser_error): Added for non-fatal errors (bad lines). (raptor_ntriples_parser_fatal_error): Fix passing on va_list arguments. * ntriples.h: Added raptor_ntriples_set_error_handler 2002-08-13 Dave Beckett * configure.in: Add check for errno.h Only link dmalloc if dmalloc.h is present (maintainer mode) * ntriples_parse.c: Add use of errno.h if present * raptor_parse.c: Add use of errno.h if present Minor comments fix When rdf:Description seen, go straight to state DESCRIPTION rather than via OBJ 2002-08-07 Dave Beckett * raptor_parse.c: Added rdf:List, rdf:first, rdf:rest (not used yet) Added rdf:nodeID for bnodes as subject/objects like rdf:about/rdf:resource * raptor.h: Added RAPTOR_URI_SOURCE_BLANK_ID (for rdf:nodeID) 2002-07-29 Dave Beckett * configure.in: default xml parser now libxml * INSTALL.html: Update --with-xml-parser docs 2002-07-28 Dave Beckett * autogen.sh: Fix use of srcdir/find * Makefile.am: Add -I's for compiling test programs 2002-07-22 Dave Beckett * TODO.html: moved Redland parser todos here 2002-07-20 Dave Beckett * tests/Makefile.am: Added ex-34 * tests/ex-34.out, tests/ex-34.rdf: Test daml:collection lists with blank nodes * configure.in: Modify cflags to use redland srcdir not builddir * Makefile.am: zap 'finish' stuff 2002-07-17 Dave Beckett * raptor_parse.c (raptor_end_element_grammar): Get rdf:ID working on empty propertyElt with rdf:parseType="Resource" * raptor_parse.c: Added reified raptor_identifier, changed code to use it for rdf:ID value Store rdf:bagID in bag raptor_identifier * raptor_parse.c (raptor_element_has_property_attributes): Created, returns true iff a property element has property attributes (raptor_start_element_grammar): For property elements, move handing property attributes to close of element, only then can the resource URI be known. (raptor_end_element_grammar): Update after above change. For property elements that are empty (empty literal), create a new blank node and hang the property attributes off that. * raptor_parse.c: Warn and continue when element content is seen inside a 2002-07-15 Dave Beckett * tests/Makefile.am: make check sh stuff not echo * tests/Makefile.am: Add ex-33 * tests/ex-33.out, tests/ex-33.rdf: Check properties work off node generated by empty propertyElt 2002-07-15 Dave Beckett * tests/Makefile.am: make check sh stuff not echo * tests/Makefile.am: Add ex-33 * tests/ex-33.out, tests/ex-33.rdf: Check properties work off node generated by empty propertyElt 2002-07-14 Dave Beckett * Makefile.am: Add REDLAND_LIBS to rdfdump dependencies Add rule to build librdf.la if needed 2002-07-13 Dave Beckett * Makefile.am: Zap -static arg for rdfdump, seems to annoy libtool Pass on redland libs, cflags as necessary * ntriples.h: Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND * rdfdump.c: Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND Update to newest librdf world open/close calls * raptor_parse.c: Tidy - 2 includes of stdlib.h Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND * raptor_internal.h: Lose all redland includes - for app code * raptor.h: Include librdf and uri headers when in Redland Change all LIBRDF_INTERNAL to RAPTOR_IN_REDLAND * configure.in: Define REDLAND_LIBS, REDLAND_CPPFLAGS for use when building in redland * raptor_parse.c: Moved debugging stuff to raptor_internal.h Use updated raptor includes * rdfdump.c: Use updated raptor includes * raptor_uri.c: Don't include Redland rdf_config.h Use updated raptor includes * ntriples_parse.c: Use updated raptor includes * raptor.h: Removed all standard includes Moved URI stuff to raptor_internal.h except for typedef (needed for prototypes) * raptor_internal.h: Internal raptor definitions * Makefile.am: Added raptor_internal.h * configure.in: Fix raptor in redland check. * ntriples_parse.c, raptor_parse.c: don't include redland rdf_config.h - use ours * configure.in, acconfig.h: added RAPTOR_IN_REDLAND 2002-07-12 Dave Beckett * raptor.h: include stdarg.h here * tests/Makefile.am: Added ex-32 * tests/ex-32.out, tests/ex-32.rdf: Test property attributes with rdf:resource * raptor_parse.c (raptor_process_property_attributes): Pass in an optional identifier to use for the resource node. Use that to process property attributes along with rdf:resource, at the close of the (empty) propertyElt. 2002-07-11 Dave Beckett * raptor_uri.c (raptor_uri_resolve_uri_reference): Handle base URI without a path such as "http://example.org" * Makefile.am: Tidy test program args +$(DEFS) to add crucial -DHAVE_CONFIG_H * rdfdump.c (rdfdump_error_handler): Use va_list form (rdfdump_warning_handler): Use va_list form * raptor_parse.c (raptor_xml_start_element_handler): Warn about unqualified rdf: attributes * ntriples_parse.c (raptor_ntriples_parser_fatal_error): now passes on va_list * raptor.h: API change: raptor_message_handler callback now takes a va_list as final argument * rdfdump.c: Make warning/error messages neater * rdfdump.c: Added -w - ignore warnings (rdfdump_warning_handler): Added (rdfdump_error_handler): Added Count warnings, errors and exit with #errors, or 128+#warnings * raptor_parse.c: When a property has multiple objects, give an error and skip the rest of that element * tests/Makefile.am: Added bad-01.rdf * tests/bad-01.rdf: A property must have only one node value * rdfdump.c: (rdfdump_error_handler) Added. Exit 1 on an error, don't keep going * tests/Makefile.am: Fix bad test checking again 2002-07-10 Dave Beckett * Makefile.am: Added LOCAL_LIB_DIR for finish * Makefile.am: Fix args for compiling tests 2002-07-07 Dave Beckett * Makefile.am: Added finish target to install to lib Tidy up test program building * raptor_parse.c: Allow non-namespaced elements to be recognised and skipped 2002-06-30 Dave Beckett * tests/Makefile.am: typo * Makefile.am: Added 'make deb' target * tests/rdf-schema.out, tests/rdfs-namespace.out: RDFS schema answers * tests/Makefile.am: Fix rdfs checks * tests/Makefile.am: Add two RDFS schema namespaces * tests/rdf-schema.rdf, tests/rdfs-namespace.rdf: RDFS schemas * raptor_parse.c: (raptor_parser_error) Make this default to exit(1) (raptor_start_element_grammar): Die when a second object is tried to be set for a statement * tests/Makefile.am: Check negative tests correctly * autogen.sh: Add libtoolize cleanup, check and run * configure.in: fix AC_OUTPUT * Makefile.am, configure.in: Added debian dir 2002-06-26 Dave Beckett * win32/README: win32 README * autogen.sh: Added GNU config.* copy test 2002-06-14 cmdjb * tests/Makefile.am: Added bad test checking Added bad-00.rdf * tests/bad-00.rdf: Added bad test 00 * configure.in: Added raptor-config * libraptor.3, rdfdump.1: Raptor manual pages * Makefile.am: Added raptor-config Added manual pages Make rdfdump static only for maintainer * raptor-config.in: Raptor configuration script 2002-06-08 Dave Beckett * raptor_parse.c (raptor_generate_id): Hack - make genids be sequential through lifetime of code, not start from 1 again at parsing. * raptor.h: Add some RAPTOR_API defs for newer functions * configure.in: Use NULL for XML_ParserCreate in first check too * configure.in: Bumped version to 0.9.6 * Snapshotted raptor_0_9_5 for 0.9.5 release * autogen.sh: Delete libtool generated files before running automake (which invokes libtoolize to do this) * configure.in: Remove duplicate check of stdlib.h * Makefile.am: Pass on -D defs when building tests * raptor_uri.c: Include stdlib.h for malloc * configure.in: Call XML_ParserCreate with NULL to prevent crash (seen on alpha) * configure.in: Check for required libxml function xmlCreatePushParserCtxt (libxml 1.8.3+) * NEWS.html: Updated for 0.9.5 release * TODO.html: tidy * Makefile.am: Don't compile raptor_cc.c into library, for this release (not used yet). 2002-06-06 Dave Beckett * tests/Makefile.am: Added ex-31 * tests/ex-31.out, tests/ex-31.rdf: Tests for rdf:li with parseType Resource * raptor_parse.c: Make rdf:li work with parseType resource 2002-06-05 Dave Beckett * raptor_parse.c: made rdf:foo (unknown) attribute generate the statement and a warning * raptor_parse.c: Add further allowed rdf: properties (subject, predicate, object) and classes (Seq Bag Alt Statement Property) 2002-06-04 Dave Beckett * raptor_parse.c (raptor_make_uri_from_id,raptor_make_uri): Fold in relative URI resolution. (raptor_make_uri_from_base_name): Added (raptor_process_property_attributes): Use latter to create rdf: names * configure.in: Check for stdlib.h * raptor_uri.c: Remove prototype => raptor.h * raptor.h: A little tidying. Export raptor_uri_resolve_uri_reference * raptor_uri.c: comment * raptor_uri.c (raptor_uri_parse): Update comments (raptor_uri_resolve_uri_reference): Lots more comments. Rejigged structure to tidy up in one place. Removed all static buffers. * tests/Makefile.am: Added ex-30 * tests/ex-30.out, tests/ex-30.rdf: Tests that bare about attr works with a default ns * raptor_parse.c (raptor_make_namespaced_name): Make bare 'about' attribute (etc) work even when a default namespace is declared. 2002-06-03 Dave Beckett * raptor_parse.c: Don't pass parsetype_resource child element state to parent element->child_element - i.e. proto state of next child element 2002-06-02 Dave Beckett * raptor_parse.c: attribute => attr to fix gcc warning about shadowing a global (?why) * raptor_parse.c: RBS -> RAPTOR_XML_READ_BUFFER_SIZE (raptor_parse_file) Added work around for some libxml versions failing to work when file is smaller than buffer size. 2002-05-31 Dave Beckett * raptor_parse.c: Various places: fix a bunch of casts to make g++ happy Replace several unsigned int i with int i when used as array index. * ntriples_parse.c: Various places: fix a bunch of casts to make g++ happy Replace several unsigned int i with int i when used as array index. (raptor_ntriples_string): Fix %c in format string (raptor_ntriples_unicode_char_to_utf8): Use unsigned long 2002-05-29 Dave Beckett * raptor_parse.c: fix xml_language qualifier * tests/Makefile.am: Add ex-29 * tests/ex-29.out, tests/ex-29.rdf: Test xml:lang info gets passed to output * raptor_parse.c (raptor_xml_end_element_handler): Don't pop element before doing end grammar, so that rdf_parser->current_element is correct during end grammar work. * raptor_parse.c, ntriples_parse.c: Include stdlib.h for some prototypes. 2002-05-28 Dave Beckett * raptor_parse.c (raptor_end_element_grammar): When zapping content_cdata, always make length 0 2002-05-26 Dave Beckett * tests/ex-28.out, tests/ex-28.rdf: Test case for property after parseType resource property inherting parseType resource-ness * tests/Makefile.am: Added test case 28 * raptor_parse.c (raptor_start_element_grammar): Don't copy the parsetype-resource generated node URI up to parent element * tests/Makefile.am: Added test case 27 * tests/ex-27.out, tests/ex-27.rdf: Test case for wrong ID on 3rd parseType resource off a node 2002-05-24 Dave Beckett * ntriples_parse.c: Wrap errno with #ifndef WIN32 2002-05-08 Dave Beckett * raptor_parse.c: Lessen some librdf compile warnings about char* and xmlChar* strings * raptor_parse.c (raptor_free_xml_entity): Moved earlier in code (raptor_xml_new_entity): Use LIBRDF_MALLOC 2002-05-07 Dave Beckett * acconfig.h: Added libxml xmlEntity field defs * configure.in: Check less libxml headers. If libxml main headers missing, disable library Check for xmlEntity fields name_length and etype * raptor_parse.c: Added new entity recording, expanding stuff for libxml (raptor_xml_add_entity, raptor_xml_new_entity, raptor_xml_entity_decl, raptor_xml_get_entity, raptor_xml_free_entity, raptor_xml_free_entities): Added or substantially updated 2002-04-29 Dave Beckett * raptor_parse.c: tail_id is a char*, not a redland URI 2002-04-28 Dave Beckett * raptor_parse.c: (raptor_new) Initialise entities table count to 0 since xmlCreateEntitiesTable sometimes doesn't do it. 2002-04-27 Dave Beckett * acconfig.h, configure.in, raptor_parse.c: renamed NEED_EXPAT/LIBXML to RAPTOR_XML_EXPAT/LIBXML so that raptor can be linked to apps (such as Redland) that may have both * configure.in: Added configure warning about failure of expat UTF8 BOM and how to fix. * configure.in: Perform expat BOM check only when a working expat found * raptor_parse.c, configure.in, acconfig.h: Rename EXPAT_ERROR_CRASH to EXPAT_NO_UTF8_BOM - expat 1.95.1 fails on an initial UTF-8 BOM sequence. expat 1.95.2 onwards fixes this. * acconfig.h: Added EXPAT_ERROR_CRASH * raptor_parse.c: If EXPAT_ERROR_CRASH then count XML tokens and only try to get line, col, byte counts after 1 token has been seen. * configure.in: Add test for expat failure in error reporting before 2002-04-24 Dave Beckett * INSTALL.html: Added CVS instructions, tidied and expanded * tests/ex-22.rdf: ex-22 2002-04-22 Dave Beckett * configure.in: Look for gnome-xml/xmlmemory.h header * raptor_parse.c: Add a bunch of stuff for libxml1 to handle adding/removing entity decls (raptor_xml_free_entity): Now libxml2 only (raptor_xml_libxml1_add_entry): Added, libxml1 only (raptor_xml_add_entity): Call libxml2 code or raptor_xml_libxml1_add_entry for libxml1 (xmlHashLookup): Added, libxml1 only * tests/Makefile.am: Added ex-26 * tests/ex-26.out, tests/ex-26.rdf: Test entities get expanded in attributes * configure.in: Look for libxml/parser.h libxml/hash.h * raptor_parse.c: For libxml, Use libxml/parser.h (v2) or gnome-xml/parser.h (v1) Include libxml/hash.h for v2 Add xml entities support (raptor_xml_free_entity): Pulled from xmlFreeEntity (raptor_xml_add_entity): Pulled from xmlAddEntity (slight change to API) (raptor_xml_entity_decl): Added (raptor_xml_get_entity): Added (raptor_new): Use raptor_xml_entity_decl, raptor_xml_get_entity and ask for them to be called. (raptor_parse_file): Free entity stuff. 2002-04-17 Dave Beckett * tests/Makefile.am: Added ex-25* * tests/ex-25.out, tests/ex-25.rdf: Check mixing rdf:li and rdf:_n works * raptor_parse.c (raptor_print_statement_detailed): Handle printing ordinal objects * raptor_parse.c (raptor_print_statement_as_ntriples): Handle printing ordinal objects * raptor_parse.c (raptor_xml_end_element_handler): Don't overwrite state PROPERTYELT with MEMBER, it will be switched over when necessary. * raptor_parse.c: Make unknown/other parsetypes work like Literal 2002-04-05 Dave Beckett * Makefile.am: Re-add raptor_cc.c raptor_uri.c to sources, tests, distribution 2002-03-27 Dave Beckett * configure.in: Bumped version to 0.9.5 * Snapshotted raptor_0_9_4 for 0.9.4 release * configure.in: Added check for GNU tar * Makefile.am: Added TAR * INSTALL.html, LICENSE.html: Updated HTML. * README.html: Updated for 0.9.4 release Updated HTML. * TODO.html: Updated HTML. * NEWS.html: Added notes for 0.9.4 release Updated HTML. * NEWS.html: Tidy footer * Makefile.am: Remove raptor_cc, raptor_uri stuff from distribution for this release * raptor_parse.c: Or instead, add const to tail_id * raptor_parse.c: Remove const from idList 2002-03-26 Dave Beckett * Makefile.am: Don't compile the as-yet unused raptor_cc raptor_uri into the library, for now. * configure.in: Try to ensure -g is used in --maintainer-mode * raptor_parse.c: daml:collection changes Use a genid (char*) for storing daml:list last anon node Replace all uses of the URI with the id Make a typedNode inside a daml:collection generate the rdf:type statement Move the daml:nil generation to the parent property * TODO.html: Some more bugs in daml:collection (but others fixed) Noted rdf:bagID isn't complete * tests/Makefile.am: Added ex-24.rdf ex-24.out * tests/ex-12.out: Correct test result. * tests/ex-24.rdf, tests/ex-24.out: Added to test daml:collection with typed nodes inside 2002-03-24 Dave Beckett * tests/ex-17.out: Fix answer; gives an empty literal 2002-03-23 Dave Beckett * TODO.html: Note xml:base and xml:lang support added * raptor_parse.c (raptor_generate_statement): Only process language for literal objects 2002-03-17 cmdjb * raptor_parse.c: Added xml:lang and xml:base support Use raptor_inscope_base_uri throughout, any time a URI is created in a document. Delete/ignore other xml* attributes when seen; XML spec governs their use. (raptor_generate_statement): Add language support. (make_uri_from_id): Use raptor_inscope_base_uri (raptor_start_element_grammar): Updated node state comments (raptor_inscope_xml_language): Added (raptor_inscope_base_uri): Added * Makefile.am: Added raptor_uri.c * raptor_uri.c: Raptor URI resolving implementation 2002-03-12 cmdjb * configure.in: Added --enable-release to turn on -O2 * configure.in: Strip -O2 from maintainer mode cflags * raptor_parse.c: Fix parseType resource (pTr) inside parseType resource. Don't copy up the pTr element object to parent element, since the pTr property is the 'parent' of the pTr object * tests/Makefile.am: Added ex-23 * tests/ex-23.out, tests/ex-23.rdf: Added test for embedded parseType Resource * raptor_parse.c: Skip elements with aboutEach or aboutEachPrefix * tests/test.out, tests/test.nt: Added xml literals and lang-string literals * ntriples_parse.c: Replaced xml(...) with xml"..." throughout Got "string"-lang working. 2002-03-11 Dave Beckett * raptor_parse.c (raptor_print_statement_as_ntriples): Updated for xml"foo" / xml"foo"-en N-Triples format * tests/ex-11.out, tests/ex-07.out: Updated for xml"foo" / xml"foo"-en N-Triples format 2002-03-06 Dave Beckett * raptor_parse.c: Added content type property_content set when content type isn't unknown, but known to be value of a property * tests/ex-22.out: Fixed for ordering actually generated * raptor_parse.c: Handle bare rdf attributes correctly; only check when they have no namespace. Handle sequence of description/typed node blocks by handling both as typed nodes and changing to description if necessary. * tests/ex-21.out: Correct typos * raptor.h: Removed aboutEach* identifier types * raptor.h: Added prototype for raptor_print_ntriples_string * ntriples_parse.c (raptor_print_ntriples_string): Added docu-comment * tests/Makefile.am: Addex ex-22 * tests/ex-22.out: Fix base URI of answers * tests/Makefile.am: Made tests report pass/fail and return exit code to match this * tests/ex-21.out, tests/ex-22.out, tests/test.out, tests/ex-09.out, tests/ex-10.out, tests/ex-11.out, tests/ex-12.out, tests/ex-13.out, tests/ex-14.out, tests/ex-15.out, tests/ex-16.out, tests/ex-17.out, tests/ex-18.out, tests/ex-19.out, tests/ex-20.out, tests/22-rdf-syntax-ns.out, tests/ex-00.out, tests/ex-01.out, tests/ex-02.out, tests/ex-03.out, tests/ex-04.out, tests/ex-05.out, tests/ex-06.out, tests/ex-07.out, tests/ex-08.out: Test N-Triples answers 2002-03-05 Dave Beckett * ntriples_parse.c: Added some missing prototypes. (raptor_ntriples_generate_statement): Added support for literal language, is_XML throughout. Generate string/XML literals. (raptor_ntriples_utf8_to_unicode_char): Added based on librdf_utf8_to_unicode_char (raptor_ntriples_string): Move the start pointer once the string has been parsed. Added literal language (partial), XML support (done) (raptor_print_ntriples_string): Added; writes a ntriples-escaped string, handling all escapes. Uses raptor_ntriples_utf8_to_unicode_char * raptor_cc.gperf: A little strlen removal/optimising. Added more test cases * raptor.h: raptor_statement: Added object_literal language, is_XML flag * Makefile.am: Added raptor_cc.c, raptor_cc.gperf and unit test * raptor_cc.gperf: Added function documentation. Use constant pointers to constant strings Tidy testing messages * raptor_cc.gperf: Raptor ISO 3166 country code handling * raptor_parse.c (raptor_print_statement_as_ntriples): Start updating N-Triples output for xml() support and quote the literals using raptor_print_ntriples_string * raptor_parse.c: Removed more aboutEach, aboutEachPrefix mentions * raptor_parse.c: Generate statement for parseType resource between parent and content * tests/Makefile.am, tests/ex-21.rdf: Test that rdf: namespace prefixes work * tests/ex-13.rdf: Fix comment 2002-02-05 Dave Beckett * raptor_parse.c (raptor_start_element_grammar): Change a series of if statements about state, to be based on a switch on content_type * raptor_parse.c (raptor_start_element_grammar): parseType Literal uses content_type XML Literal Add XML_LITERAL content type to be used when preserved is * raptor_parse.c (raptor_start_element_grammar): Moved property rdf:resource checking to end element * raptor_parse.c (raptor_start_element_grammar): FOr rdf:li properties, don't loop around state * raptor_parse.c (raptor_start_element_grammar): Use content_type not state for finding daml collections. * raptor_parse.c (raptor_start_element_grammar): Remove explicit checks for built-in container types. * raptor_parse.c: Removed old block_type comment * raptor_parse.c: Remove IN_RDF reference * raptor_parse.c: Change content_type / child_content_type when the state / child_state is set Change content_type when parseType changes. * raptor_parse.c (raptor_xml_cdata_handler): Changed to handle a few state exceptions and then work on a content_type basis. When reading a property value, if non-whitespace content is found, set the content type to be literal. * raptor_parse.c (raptor_xml_end_element_handler): If there is a parent, pass the last state of this element back up. * raptor_parse.c (raptor_xml_start_element_handler): Update literal handling to use element content_type. Initialise to unknown, then from the value passed from the parent element if there is one. Use the flags of the content type to do the checks. Ensure that when an element is found as a property value, content type switches to RESOURCE to expect a resource (node). * raptor_parse.c: Added a bunch of LIBRDF_DEBUG* statements; tided output of others. * raptor_parse.c: typed_node=>typedNode * raptor_parse.c: Deleted states 6.29 (referencedItem) and 6.30 (inlineItem); now that rdf:li is the same as any other property * raptor_parse.c: More EMPTY=>RESOURCE; code at this stage won't work * raptor_parse.c: Added some new content types Uses of type EMPTY replaced with RESOURCE * raptor_parse.c: (raptor_xml_start_element_handler): Initialise user_data, locator inside code body; gcc3.x wasn't doing it in the order of declarations. * raptor_parse.c: Added RAPTOR_ELEMENT_CONTENT_TYPE_LAST to make it compile again * raptor_parse.c: comment tidy * raptor_parse.c: Added child_content_type to parser state * raptor_parse.c: Added rdf_content_type_info (raptor_element_content_type_as_string): Added * raptor_parse.c: Removed raptor_typed_node_block_type * raptor_parse.c: Include dmalloc.h (optionally) after stdlib.h - keeps some gcc3 versions happier 2002-02-03 Dave Beckett * tests/Makefile.am: Added 22-rdf-syntax-ns.rdf rdf namespace test * tests/22-rdf-syntax-ns.rdf: Added RDF namespace schema to tests * tests/ex-11.rdf: Use parseType 'Literal' (specific value) rather than 'literal' which just gets turned into parseType literal by the default rules. * tests/Makefile.am: Throw away stderr on make check; if it fails, I can find out by hand raptor2-2.0.15/scripts/0000755000175000017500000000000012425347074011670 500000000000000raptor2-2.0.15/scripts/Makefile.am0000644000175000017500000000224512414070650013636 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor libraptor # # Copyright (C) 2010, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # EXTRA_DIST= \ fix-bison.pl \ fix-flex.pl \ fix-groff-xhtml \ fix-gtkdoc-header.pl \ process-changes.pl \ rdfcompare CLEANFILES = if MAINTAINER_MODE EXTRA_PROGRAMS = build-formats CLEANFILES += build-formats build_formats_SOURCES = build-formats.c build_formats_LDADD= $(top_builddir)/src/libraptor2.la endif $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) libraptor2.la raptor2-2.0.15/scripts/Makefile.in0000644000175000017500000004343612425344566013672 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor libraptor # # Copyright (C) 2010, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @MAINTAINER_MODE_TRUE@EXTRA_PROGRAMS = build-formats$(EXEEXT) @MAINTAINER_MODE_TRUE@am__append_1 = build-formats subdir = scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__build_formats_SOURCES_DIST = build-formats.c @MAINTAINER_MODE_TRUE@am_build_formats_OBJECTS = \ @MAINTAINER_MODE_TRUE@ build-formats.$(OBJEXT) build_formats_OBJECTS = $(am_build_formats_OBJECTS) @MAINTAINER_MODE_TRUE@build_formats_DEPENDENCIES = \ @MAINTAINER_MODE_TRUE@ $(top_builddir)/src/libraptor2.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(build_formats_SOURCES) DIST_SOURCES = $(am__build_formats_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ fix-bison.pl \ fix-flex.pl \ fix-groff-xhtml \ fix-gtkdoc-header.pl \ process-changes.pl \ rdfcompare CLEANFILES = $(am__append_1) @MAINTAINER_MODE_TRUE@build_formats_SOURCES = build-formats.c @MAINTAINER_MODE_TRUE@build_formats_LDADD = $(top_builddir)/src/libraptor2.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu scripts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): build-formats$(EXEEXT): $(build_formats_OBJECTS) $(build_formats_DEPENDENCIES) $(EXTRA_build_formats_DEPENDENCIES) @rm -f build-formats$(EXEEXT) $(AM_V_CCLD)$(LINK) $(build_formats_OBJECTS) $(build_formats_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build-formats.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) libraptor2.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/scripts/fix-gtkdoc-header.pl0000644000175000017500000000177711472513121015433 00000000000000#!/usr/bin/perl -w # # Edit raptor.h so that gtk-doc is happy about it # # USAGE: # perl fix-gtkc-header.pl < raptor.h > raptor.i # # Copyright (C) 2010, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. while(<>) { # Remove trailing macros s{RAPTOR_PRINTF_FORMAT\(\d+, \d+\);}{;}; # gtk-doc hates const in some places s/const char\* const\* (\w+)/const char\* $1/; print; } raptor2-2.0.15/scripts/rdfcompare0000755000175000017500000000171312222044704013647 00000000000000#!/bin/sh # # Compare two RDF graphs # # Needs an external utility to do a true graph compare. # PROGRAM=`basename $0` CMP=cmp DIFF=diff tmpdiff=/tmp/rdfcompare$$ if [ $# -lt 1 ] ; then echo "$PROGRAM: compare two RDF graphs for isomorphism" 1>&2 echo "USAGE: $PROGRAM RDF-FILE-1 RDF-FILE-2" 1>&2 echo "where both files are RDF graphs serialized as N-Triples" 1>&2 exit 0 fi # Try a simple compare first $CMP $1 $2 2>&1 status=$? if test $status -eq 0; then exit 0 fi echo "$program: Doing an RDF graph compare" 1>&2 if test "X$NTC" != X; then $NTC $1 $2 > $tmpdiff 2>&1 status=$? if test $status != 0; then $DIFF -u $1 $2 fi elif test "X$JENAROOT" != X; then RDFCOMPARE="$JENAROOT/bin/rdfcompare" $RDFCOMPARE $1 $2 N-TRIPLE N-TRIPLE status=$? if test $status != 0; then $DIFF -u $1 $2 fi else $DIFF -u $1 $2 > $tmpdiff status=$? if test $status != 0; then cat $tmpdiff rm $tmpdiff fi fi exit $status raptor2-2.0.15/scripts/fix-bison.pl0000644000175000017500000000432512414070650014036 00000000000000#!/usr/bin/perl # # Format output generated by bison # # Usage: # bison -b brql_parser -p brql_parser_ -d -v brql_parser.y # perl fix-bison brql_parser.tab.c > $tmp # mv $tmp brql_parser.tab.c # # Copyright (C) 2004-2014, David Beckett http://www.dajobe.org/ # Copyright (C) 2004, University of Bristol, UK http://www.bristol.ac.uk/ # my $seen_yyerrlab1=0; my $line_offset=1; # #line directives always refer to the NEXT line while(<>) { # Remove code that causes a warning if(/Suppress GCC warning that yyerrlab1/) { do { $_=<>; $line_offset--; # skipped a line } while(!/^\#endif/); $line_offset--; # skipped a line next; } $seen_yyerrlab1=1 if /goto yyerrlab1/; s/^yyerrlab1:// unless $seen_yyerrlab1; # Do not use macro name for a temporary variable s/unsigned int yylineno = /unsigned int yylineno_tmp = /; s/yyrule - 1, yylineno\)/yyrule - 1, yylineno_tmp\)/; # Do not (re)define prototypes that the system did better if(m%^void \*malloc\s*\(%) { $line_offset--; # skipped a line next; } if(m%^void free\s*\(%) { $line_offset--; # skipped a line next; } if(m%^\# undef YYCASE_$%) { # Add a default value for yyformat for coverity CID 10838 my $line=$_; print qq{ default: yyformat = YY_("syntax error");\n}; $line_offset++; # extra line print $line; next; } if(m%yysyntax_error_status = YYSYNTAX_ERROR%) { # Set yytoken to non-negative value for coverity CID 29259 my $line=$_; print qq{if(yytoken < 0) yytoken = YYUNDEFTOK;\n}; $line_offset++; # extra line print $line; next; } # Suppress warnings about empty declarations s/(^static int .*_init_globals.*);$/$1/; # Fixup pending filename renaming, see above. # Fix line numbers. my $line=$. +$line_offset; s/^(\#line) \d+ (.*)\.tab\.c/$1 $line $2.c/; # Remove always false condition if(m%if \(/\*CONSTCOND\*/ 0\)%) { $line_offset--; # skipped a line $_ = <>; $line_offset--; # skipped a line next; } # Remove always false condition; this macro is #defined to 0 if(m%if \(yytable_value_is_error \(yyn\)\)%) { $line_offset--; # skipped a line $_ = <>; $line_offset--; # skipped a line next; } print; } raptor2-2.0.15/scripts/process-changes.pl0000755000175000017500000005135512421010765015233 00000000000000#!/usr/bin/perl -w # # Format changes TSV file # # USAGE: # process-changes.pl [OPTIONS] CHANGES-TSV-FILE # # Copyright (C) 2010-2011, David Beckett http://www.dajobe.org/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # # Example of Format (9 fields): # OLD VERSIONtype | enum | OLD RETURNOLD NAMEOLD ARGSNEW VERSIONtype | enum | NEW RETURNNEW NAMENEW ARGSNOTES # # Functions # 0.9.21voidoldfunctionor-(args)0.9.22voidnewfunctionor-(args)NOTES # Types # 0.9.21typeoldtypenameor--0.9.22typenewtypeor--NOTES # Enums # 0.9.21enumoldenumvalueor--0.9.22enumnewenumvalueor--NOTES # use strict; use File::Basename; use IO::File; use Getopt::Long; use Pod::Usage; our $program = basename $0; our $nbsp = ' '; our $id_prefix = undef; sub print_start_chapter_as_docbook_xml($$$$) { my($fh, $id, $title, $intro_para)=@_; print $fh <<"EOT"; $title $intro_para EOT } sub print_end_chapter_as_docbook_xml($) { my($fh)=@_; print $fh <<"EOT"; EOT } sub print_docbook_xml($$$@) { my($fh, $id, $title, @list)=@_; print $fh <<"EOT";
$title EOT print $fh <<"EOT";
EOT } sub print_start_section_as_docbook_xml($$$) { my($fh, $id, $title)=@_; print $fh <<"EOT";
$title EOT } sub format_function_name_as_docbook_xml($) { my($name)=@_; my $escaped_name = $name; $escaped_name =~ s/_/-/g; return qq{$name}; } sub format_type_name_as_docbook_xml($) { my($name)=@_; my $escaped_name = $name; $escaped_name =~ s/_/-/g; if($escaped_name =~ /^[-A-Z0-9]+$/) { $escaped_name .= ":CAPS"; } return qq{$name}; } sub format_enum_name_as_docbook_xml($) { my($name)=@_; my $escaped_name = $name; $escaped_name =~ s/_/-/g; if($escaped_name =~ /^[-A-Z0-9]+$/) { $escaped_name .= ":CAPS"; } return qq{$name}; } sub format_fn_sig($$$$$) { my($format_name, $show_sig, $fn_return, $fn_name, $fn_args)=@_; my $formatted_name = $format_name ? format_function_name_as_docbook_xml($fn_name) : $fn_name; return $show_sig ? $fn_return . " " . $formatted_name . $fn_args : $formatted_name; } sub format_notes($$) { my($is_inline,$notes)=@_; if ($notes eq '') { return $is_inline ? '' : $nbsp; } $notes =~ s{#((?:raptor|librdf|rasqal)\w+)}{format_type_name_as_docbook_xml($1)}ge; $notes =~ s{#?((?:RAPTOR|LIBRDF|RASQAL)_\w+)}{format_enum_name_as_docbook_xml($1)}ge; $notes =~ s{((?:raptor|librdf|rasqal)_\w+?)\(}{format_function_name_as_docbook_xml($1)."("}ge; return $is_inline ? "- " . $notes : $notes; } sub print_functions_list_as_docbook_xml($$$$@) { my($fh, $title, $format_name, $show_sig, @list)=@_; return if !@list; print $fh <<"EOT"; Functions EOT print $fh " $title\n" if defined $title; # Sort by fn_name name @list = sort { $a->[1] cmp $b->[1] } @list; for my $item (@list) { my($fn_return, $fn_name, $fn_args, $notes) = @$item; my $formatted_fn = format_fn_sig($format_name, $show_sig, $fn_return, $fn_name, $fn_args); $notes = format_notes(1, $notes); print $fh " $formatted_fn $notes\n"; } print $fh <<"EOT"; EOT } sub format_type_sig($$) { my($format_name, $type_name)=@_; return $format_name ? format_type_name_as_docbook_xml($type_name) : $type_name; } sub format_enum_sig($$) { my($format_name, $enum_name)=@_; return $format_name ? format_enum_name_as_docbook_xml($enum_name) : $enum_name; } sub print_types_list_as_docbook_xml($$$$@) { my($fh, $title, $format_name, $show_sig, @list)=@_; return if !@list; print $fh <<"EOT"; Types EOT print $fh " $title\n" if defined $title; # Sort by type name @list = sort { $a->[0] cmp $b->[0] } @list; for my $item (@list) { my($type_name, $notes) = @$item; my $formatted_fn = format_type_sig($format_name, $type_name); $notes = format_notes(1, $notes); print $fh " $formatted_fn $notes\n"; } print $fh <<"EOT"; EOT } sub print_enums_list_as_docbook_xml($$$$@) { my($fh, $title, $format_name, $show_sig, @list)=@_; return if !@list; print $fh <<"EOT"; Enums EOT print $fh " $title\n" if defined $title; # Sort by format name @list = sort { $a->[0] cmp $b->[0] } @list; for my $item (@list) { my($enum_name, $notes) = @$item; my $formatted_fn = format_enum_sig($format_name, $enum_name); $notes = format_notes(1, $notes); print $fh " $formatted_fn $notes\n"; } print $fh <<"EOT"; EOT } sub print_renamed_functions_as_docbook_xml($$$$@) { my($fh, $title, $old_function_header, $new_function_header, @list)=@_; return if !@list; print $fh <<"EOT"; EOT print $fh " \n" if defined $title; # Sort by from name @list = sort { $a->[0] cmp $b->[0] } @list; print $fh <<"EOT"; EOT for my $item (@list) { my($from, $to, $notes) = @$item; my $formatted_name = format_function_name_as_docbook_xml($to); $notes = format_notes(0, $notes); print $fh " \n \n \n"; } print $fh <<"EOT";
$title
$old_function_header $new_function_header Notes
$from $formatted_name $notes
EOT } sub print_changed_functions_as_docbook_xml($$$$@) { my($fh, $title, $old_function_header, $new_function_header, @list)=@_; return if !@list; print $fh <<"EOT"; EOT print $fh " \n" if defined $title; print $fh <<"EOT"; EOT for my $item (@list) { my($old_fn_return, $old_fn_name, $old_fn_args, $new_fn_return, $new_fn_name, $new_fn_args, $notes) = @$item; my $old_formatted_fn = format_fn_sig(0, 1, $old_fn_return, $old_fn_name, $old_fn_args); my $new_formatted_fn = format_fn_sig(1, 1, $new_fn_return, $new_fn_name, $new_fn_args); $notes = format_notes(0, $notes); print $fh " \n \n \n"; } print $fh <<"EOT";
$title
$old_function_header $new_function_header Notes
$old_formatted_fn $new_formatted_fn $notes
EOT } sub print_end_section_as_docbook_xml($) { my($fh)=@_; print $fh <<"EOT";
EOT } sub print_changed_types_as_docbook_xml($$$$@) { my($fh, $title, $old_type_header, $new_type_header, @list)=@_; return if !@list; print $fh <<"EOT"; EOT print $fh " \n" if defined $title; # Sort by old type name @list = sort { $a->[0] cmp $b->[0] } @list; print $fh <<"EOT"; EOT for my $item (@list) { my($old_type_name, $new_type_name, $notes) = @$item; my $old_formatted_type = format_type_sig(0, $old_type_name); my $new_formatted_type = format_type_sig(1, $new_type_name); $notes = format_notes(0, $notes); print $fh " \n \n \n"; } print $fh <<"EOT";
$title
$old_type_header $new_type_header Notes
$old_formatted_type $new_formatted_type $notes
EOT } sub print_renamed_enums_as_docbook_xml($$$$@) { my($fh, $title, $old_enum_header, $new_enum_header, @list)=@_; return if !@list; print $fh <<"EOT"; EOT print $fh " \n" if defined $title; # Sort by from name @list = sort { $a->[0] cmp $b->[0] } @list; print $fh <<"EOT"; EOT for my $item (@list) { my($from, $to, $notes) = @$item; my $formatted_name = format_enum_name_as_docbook_xml($to); $notes = format_notes(0, $notes); print $fh " \n \n \n"; } print $fh <<"EOT";
$title
$old_enum_header $new_enum_header Notes
$from $formatted_name $notes
EOT } sub print_deletes_as_perl_script($$@) { my($out_fh, $title, @names) = @_; print $out_fh "\n# $title\n"; for my $entry (@names) { my($name,$note)=@$entry; $note ||= ''; print $out_fh qq{s|^(.*$name.*)\$|/\\* WARNING: $name - deleted. $note \\*/ \$1|g;\n}; } } sub print_renames_as_perl_script($$$@) { my($out_fh, $title, $is_function, @names) = @_; print $out_fh "\n# $title\n"; for my $entry (@names) { my($from, $to, $note)=@$entry; $note ||= ''; my $suffix = ($is_function ? '\\(' : ''); print $out_fh qq{s|$from$suffix|$to$suffix|g;\n}; } } sub print_changes_as_perl_script($$@) { my($out_fh, $title, @names) = @_; print $out_fh "\n# $title\n"; for my $entry (@names) { my($from, $to, $note)=@$entry; $note ||= ''; print $out_fh qq{s|^(.*)($from)(.*)\$|/\\* WARNING: $from. $note \\*/ \$\{1\}$to\$\{3\}|g;\n}; } } sub print_statement_field_renames_as_perl_script($) { my($out_fh)=@_; # These are tricky / tedious to deal with entirely by hand but # the replacement for subject and object can only be determined by a person my(%statement_field_maps) = ( 'subject' => 'subject.value.uri or subject.value.blank.string /* WARNING: must choose one */', 'subject_type' => 'subject.type', 'predicate' => 'predicate.value.uri', 'predicate_type' => 'predicate.type', 'object' => 'object.value.uri or object.value.literal.string or object.value.blank.string /* WARNING: must choose one */', 'object_type' => 'object.type', 'object_literal_datatype' => 'object.value.literal.datatype', 'object_literal_language' => 'object.value.literal.language' ); print $out_fh "\n# Replace statement fields with term fields.\n"; while(my($old,$new) = each %statement_field_maps) { print $out_fh qq{s|->$old|->$new|g;\n}; } print $out_fh "\n"; } sub to_id($) { my $id=shift; $id =~ s/\W/-/g; $id =~ s/\-+/-/g; $id =~ s/^\-//; $id =~ s/\-$//; return $id; } # main my $docbook_xml_file = undef; my $upgrade_script_file = undef; my $usage = undef; GetOptions( 'docbook-xml=s' => \$docbook_xml_file, 'upgrade-script=s' => \$upgrade_script_file, 'package=s' => \$id_prefix, 'help|h|?' => \$usage ) || pod2usage(2); pod2usage(-verbose => 2) if $usage; # Arguments our($package, $file) = @ARGV; $id_prefix ||= $package; # Read in data our $expected_n_fields = 9; # "$old-$new" versions in order our(@version_pairs); # and seen our(%version_pairs_seen); # Hashes keyed by $version_pair. Value is array of descriptive # arrays specific to each type my(%new_functions); my(%deleted_functions); my(%renamed_functions); my(%changed_functions); my(%new_types); my(%deleted_types); my(%changed_types); my(%new_enums); my(%deleted_enums); my(%renamed_enums); open(IN, "<$file") or die "$program: Cannot read $file - $!\n"; while() { chomp; next if /^#/; my(@fields)=split(/\t/); my $actual_n_fields=scalar(@fields); die "$program: Bad line has $actual_n_fields fields expected $expected_n_fields $.: $_\n" unless $actual_n_fields == $expected_n_fields; if($fields[1] eq 'type') { my($old_ver, $dummy1, $old_name, $old_args, $new_ver, $dummy2, $new_name, $new_args,$notes)=@fields; my $version_pair = $old_ver."-".$new_ver; if(!$version_pairs_seen{$version_pair}) { push(@version_pairs, [$old_ver, $new_ver]); $version_pairs_seen{$version_pair} = 1; } $notes = '' if $notes eq '-'; if($old_name eq '-') { push(@{$new_types{$version_pair}}, [$new_name, $notes]); } elsif($new_name eq '-') { push(@{$deleted_types{$version_pair}}, [$old_name, $notes]); } elsif(($old_name eq $new_name) && $notes eq '') { # same } else { # renamed and maybe something else changed - in the notes push(@{$changed_types{$version_pair}}, [$old_name, $new_name, $notes]); } } elsif($fields[1] eq 'enum') { my($old_ver, $dummy1, $old_name, $old_args, $new_ver, $dummy2, $new_name, $new_args,$notes)=@fields; my $version_pair = $old_ver."-".$new_ver; if(!$version_pairs_seen{$version_pair}) { push(@version_pairs, [$old_ver, $new_ver]); $version_pairs_seen{$version_pair} = 1; } $notes = '' if $notes eq '-'; if($old_name eq '-') { push(@{$new_enums{$version_pair}}, [$new_name, $notes]); } elsif($new_name eq '-') { push(@{$deleted_enums{$version_pair}}, [$old_name, $notes]); } elsif(($old_name eq $new_name) && $notes eq '') { # same } else { push(@{$renamed_enums{$version_pair}}, [$old_name, $new_name, $notes]); } } else { my($old_ver, $old_return, $old_name, $old_args, $new_ver, $new_return, $new_name, $new_args,$notes)=@fields; my $version_pair = $old_ver."-".$new_ver; if(!$version_pairs_seen{$version_pair}) { push(@version_pairs, [$old_ver, $new_ver]); $version_pairs_seen{$version_pair} = 1; } $notes = '' if $notes eq '-'; if($old_name eq '-') { push(@{$new_functions{$version_pair}}, [$new_return, $new_name, $new_args, $notes]); } elsif($new_name eq '-') { push(@{$deleted_functions{$version_pair}}, [$old_return, $old_name, $old_args, $notes]); } elsif($old_return eq $new_return && $old_name eq $new_name && $old_args eq $new_args) { # same } elsif($old_return eq $new_return && $old_name ne $new_name && $old_args eq $new_args) { # renamed but nothing else changed push(@{$renamed_functions{$version_pair}}, [$old_name, $new_name, $notes]); } else { # something changed - args and/or return push(@{$changed_functions{$version_pair}}, [$old_return, $old_name, $old_args, $new_return, $new_name, $new_args, $notes]); } } } close(IN); sub version_for_sort($) { map { sprintf("%02d", $_) } split(/\./, $_[0]); } # Write Docbook XML output if(defined $docbook_xml_file) { my $out_fh = new IO::File; $out_fh->open(">$docbook_xml_file"); our $intro_title = "API Changes"; our $intro_para = <<"EOT"; This chapter describes the API changes for $package. EOT print_start_chapter_as_docbook_xml($out_fh, $id_prefix.'-changes', $intro_title, $intro_para); print_start_section_as_docbook_xml($out_fh, $id_prefix.'-changes-intro', "Introduction"); print $out_fh <<"EOT"; The following sections describe the changes in the API between versions including additions, deletions, renames (retaining the same number of parameters, types and return value type) and more complex changes to functions, types and enums. EOT print_end_section_as_docbook_xml($out_fh); # Sort by new version, newest first for my $vp (sort { version_for_sort($b->[1]) cmp version_for_sort($a->[1]) } @version_pairs) { my($old_version, $new_version)= @$vp; my $id = to_id($old_version) . "-to-" . to_id($new_version); my $version_pair = $old_version."-".$new_version; print_start_section_as_docbook_xml($out_fh, $id_prefix.'-changes-'.$id, "Changes between $package $old_version and $new_version"); my(@f, @t, @e); @f = @{$new_functions{$version_pair} || []}; @t = @{$new_types{$version_pair} || []}; @e = @{$new_enums{$version_pair} || []}; if(@f || @t || @e) { print_start_section_as_docbook_xml($out_fh, $id_prefix.'-changes-new-'.$id, "New functions, types and enums"); print_functions_list_as_docbook_xml($out_fh, undef, 1, 1, @f); print_types_list_as_docbook_xml($out_fh, undef, 1, 1, @t); print_enums_list_as_docbook_xml($out_fh, undef, 1, 1, @e); print_end_section_as_docbook_xml($out_fh); } @f = @{$deleted_functions{$version_pair} || []}; @t = @{$deleted_types{$version_pair} || []}; @e = @{$deleted_enums{$version_pair} || []}; if(@f || @t || @e) { print_start_section_as_docbook_xml($out_fh, $id_prefix.'-changes-deleted-'.$id, "Deleted functions, types and enums"); print_functions_list_as_docbook_xml($out_fh, undef, 0, 0, @f); print_types_list_as_docbook_xml($out_fh, undef, 0, 1, @t); print_enums_list_as_docbook_xml($out_fh, undef, 0, 1, @e); print_end_section_as_docbook_xml($out_fh); } @f = @{$renamed_functions{$version_pair} || []}; @e = @{$renamed_enums{$version_pair} || []}; if(@f || @e) { print_start_section_as_docbook_xml($out_fh, $id_prefix.'-changes-renamed-'.$id, "Renamed function and enums"); print_renamed_functions_as_docbook_xml($out_fh, undef, "$old_version function", "$new_version function", @f); print_renamed_enums_as_docbook_xml($out_fh, undef, "$old_version enum", "$new_version enum", @e); print_end_section_as_docbook_xml($out_fh); } @f = @{$changed_functions{$version_pair} || []}; @t = @{$changed_types{$version_pair} || []}; if(@f || @t) { print_start_section_as_docbook_xml($out_fh, $id_prefix.'-changes-changed-'.$id, "Changed functions and types"); print_changed_functions_as_docbook_xml($out_fh, undef, "$old_version function", "$new_version function", @f); print_changed_types_as_docbook_xml($out_fh, undef, "$old_version type", "$new_version type", @t); print_end_section_as_docbook_xml($out_fh); } print_end_section_as_docbook_xml($out_fh); } # end pair of old/new versions print_end_chapter_as_docbook_xml($out_fh); $out_fh->close; } # Write Upgrade script output if(defined $upgrade_script_file) { my $out_fh = new IO::File; $out_fh->open(">$upgrade_script_file"); print $out_fh "#!/usr/bin/perl -pi~\n"; for my $vp (@version_pairs) { my($old_version, $new_version)= @$vp; my $version_pair = $old_version."-".$new_version; print $out_fh "# Perl script to upgrade $package $old_version to $new_version\n\n"; print_statement_field_renames_as_perl_script($out_fh); my(@f, @t, @e); @f = @{$deleted_functions{$version_pair} || []}; @t = @{$deleted_types{$version_pair} || []}; @e = @{$deleted_enums{$version_pair} || []}; print_deletes_as_perl_script($out_fh, 'Deleted functions', (map { [ $_->[1], $_->[3] ] } @f)); print_deletes_as_perl_script($out_fh, 'Deleted types', @t); print_deletes_as_perl_script($out_fh, 'Deleted enums', @e); @f = @{$renamed_functions{$version_pair} || []}; @e = @{$renamed_enums{$version_pair} || []}; print_renames_as_perl_script($out_fh, 'Renamed functions', 1, @f); print_renames_as_perl_script($out_fh, 'Renamed enums', 0, @e); @f = @{$changed_functions{$version_pair} || []}; @t = @{$changed_types{$version_pair} || []}; print_changes_as_perl_script($out_fh, 'Changed functions', (map { [ $_->[1], $_->[4], $_->[6] ] } @f)); print_changes_as_perl_script($out_fh, 'Changed types', @t); } # end of version pair loop $out_fh->close; } exit 0; __END__ =head1 NAME process-changes - turn changes TSV into files =head1 SYNOPSIS process-changes [options] PACKAGE-NAME TSV-FILE =head1 OPTIONS =over 8 =item B<--help> Give command help summary. =item B<--docbook-xml> DOCBOOK-XML Set the output docbook XML file =item B<--upgrade-script> UPGRADE-SCRIPT-PL Set the output perl script to upgrade the function and type names where possible. =back =head1 DESCRIPTION Turn a package's changes TSV file into docbook XML. =cut raptor2-2.0.15/scripts/fix-groff-xhtml0000755000175000017500000000401311472513121014542 00000000000000#!/usr/bin/perl # # Format XHTML generated by groff -Thtml (via tidy) for websites # # Usage: groff -Thtml -P-l something.man | tidy -asxml ... | fix-groff-xhtml OUTPUT-FILE # # (C) Copyright 2003-2006 Dave Beckett # use strict; use File::Basename; my $progname=basename $0; my $raptor_title="Raptor RDF Parser Toolkit"; my $redland_title="Redland RDF Application Framework"; my $rasqal_title="Rasqal RDF Query Library"; die "USAGE: $progname OUTPUT-FILE\n" if @ARGV < 1; my $doc_title; my($file)=@ARGV; open(OUT, ">$file") or die "$progname: Cannot create $file - $!\n"; open(IN, "-"); while() { s%libraptor%$raptor_title - Raptor API%; s%

libraptor

%

$raptor_title - Raptor API

%; s%rapper%$raptor_title - Raptor RDF parser utility%; s%

rapper

%

$raptor_title - Raptor RDF parser utility

%; s%rdfproc%$redland_title - Redland RDF processor utility%; s%

rdfproc

%

$redland_title - Redland RDF processor utility

%; s%librasqal%$rasqal_title - Rasqal API%; s%

librasqal

%

$rasqal_title - Rasqal API

%; s%roqet%$rasqal_title - Rasqal RDF parser utility%; s%

roqet

%

$rasqal_title - Rasqal RDF parser utility

%; next if /^%%; # This is not xhtml s% cols="\d+" % %; s%(name|id)="([^"]+)"%my($at,$val)=($1,$2); $val =~ s/ /_/g; qq{$at="$val"};%eg; s%(Dave Beckett|Institute for Learning and Research Technology .ILRT.|University of Bristol) (?:- |)(http://[^<]+)%$1%; my $year=1900+(localtime)[5]; print OUT <<"EOT" if m%^%;

Copyright 2002-$year Dave Beckett
2002-$year University of Bristol

EOT print OUT; } close(IN); close(OUT); raptor2-2.0.15/scripts/fix-flex.pl0000755000175000017500000001060412414070650013662 00000000000000#!/usr/bin/perl # # Format output generated by flex 2.5.31 # # Usage: # flex -o$output $input # perl fix-flex $output > $tmp # mv $tmp $output # # (C) Copyright 2004-2014 Dave Beckett http://www.dajobe.org/ # (C) Copyright 2004 University of Bristol # my $line_offset = 1; # #line directives always refer to the NEXT line print <<'EOT'; #ifdef HAVE_CONFIG_H #include #endif EOT $line_offset += 4; # added 4 lines above to output my $debug = 0; # Lexer symbol prefix such as 'turtle_lexer_' my $prefix = undef; # Current function or undef if out of function my $cur_function = undef; # State for current function for rules to use. my(%fn_state); while(<>) { # find lexer prefix if(!defined($prefix) && /^void\s*(.+?)restart\s*\(.*;$/) { $prefix = $1; warn "$.: Lexer prefix $prefix\n" if $debug > 0; } # Remove generated yy_fatal_error declaration and definition to avoid warnings about unused/non-defined static function # declaration if(/^static void yy_fatal_error\s*\(.*\)\s*\;\s*$/) { $line_offset--; # skipped 1 line next; } # definition if(/^static void yy_fatal_error\s*\(.*\)\s*[^\;]\s*$/) { do { $_=<>; $line_offset--; # skipped 1 line } while(!/^}/); $line_offset--; # skipped 1 line next; } # Replace calls to yy_fatal_error("msg", yyscanner) to YY_FATAL_ERROR("msg") macro s/(^\s*)yy_fatal_error\s*\(\s*(\".*\")\s*,\s*yyscanner\s*\)/$1YY_FATAL_ERROR($2)/; # flex has %option nounistd however it does not work in 2.5.31 # It is safe to add yet another wrapper. if(m%^(\#include \)$%) { $_=<<"EOT"; #ifndef YY_NO_UNISTD_H $1 #endif EOT $line_offset += 2; # added 2 lines to output } # Fix .[ch] line references because we have added lines to it my $line = $. + $line_offset; s/^#line \d+ (\".*\.[ch]\")/#line $line $1/; # Fix signed / unsigned comparison gcc 4.x warning: # int n : in the macro YY_INPUT definition # (size_t)num_to_read : which is silly since num_to_read is an int! s/yyg->yy_n_chars, \(size_t\) num_to_read \)/yyg->yy_n_chars, num_to_read \)/; # Match prefixed functions and a couple of static ones starting yy_ if(!defined($cur_function) && /^.*?((?:${prefix}|yy_)\w+)\s+\((.*)$/) { my($f,$rest)=($1,$2); if($rest !~ /;$/) { $cur_function=$1; warn "$.: Now in $cur_function: $_\n" if $debug > 1; %fn_state=(); } } elsif(defined($cur_function) && /^\}/) { warn "$.: End of $cur_function\n" if $debug > 1; $cur_function = undef; %fn_state=(); } # Fix declaration of signed 'i' operating over range of yy_size_t if($cur_function eq $prefix."_scan_bytes") { s/int i;/yy_size_t i;/; } # Add $prefix_cleanup() call at the end of $prefix_lex_destroy() # find the start of lex_destroy function definition and capture prefix # look for lexer_free(yyscanner, yyscanner) statement within the function and place the cleanup call before it if($cur_function eq $prefix."lex_destroy") { if(/(^\s*)(${prefix}free\s*\(\s*yyscanner\s*,\s*yyscanner\s*\)\s*\;)\s*$/) { $_=<<"EOT"; $1/* clean up leaks if any before freeing yyscanner */ $1${prefix}cleanup(yyscanner); $1$2 EOT $line_offset += 2; # added 2 lines to output } } if($cur_function eq $prefix."_switch_to_buffer" || $cur_function eq $prefix."restart" || $cur_function eq $prefix."push_buffer_state") { if(!exists($fn_state{'seen_ensure'})) { s%(^\s*if\s*\(\s*!\s*)YY_CURRENT_BUFFER(\s*\)\s*\{.*$)%${1}yyg->yy_buffer_stack${2}%; if(m%^\s*${prefix}ensure_buffer_stack\s*\(%) { $fn_state{'seen_ensure'} = 1; } } else { # In condition with whitespace s%(\s+)YY_CURRENT_BUFFER(\s+)%${1}YY_CURRENT_BUFFER_LVALUE${2}%; # In parameter or condition s%([,\(])YY_CURRENT_BUFFER([,\)])%${1}YY_CURRENT_BUFFER_LVALUE${2}%; } } if($cur_function eq 'yy_get_next_buffer') { if(!exists($fn_state{'seen_yyinput'}) && m%^\s*YY_INPUT\(%) { $fn_state{'seen_yyinput'} = 1; } elsif(exists($fn_state{'seen_yyinput'})) { # Remove dead code after YY_INPUT - which is a return NULL s%^\s*YY_CURRENT_BUFFER_LVALUE->yy_n_chars\s*=\s*yyg->yy_n_chars;%%; } } if($cur_function eq $prefix.'pop_buffer_state') { # Change last if use of YY_CURRENT_BUFFER macro to unconditional value s%^(\s*if \(\s*)YY_CURRENT_BUFFER(\s*\)\s*\{.*)$%${1}YY_CURRENT_BUFFER_LVALUE${2}%; } print; } raptor2-2.0.15/scripts/build-formats.c0000644000175000017500000003455511772435245014542 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * build-formats.c - Helper to print raptor syntaxes into docbook xml * * Copyright (C) 2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #include #include #include #include static const char * const program = "build-formats"; static raptor_world* world = NULL; static void emit_literal(const char* literal, raptor_iostream* iostr) { raptor_iostream_string_write("", iostr); raptor_iostream_string_write(literal, iostr); raptor_iostream_string_write("", iostr); } #if 0 static void emit_function(const char* name, raptor_iostream* iostr) { int i; char c; raptor_iostream_string_write("", iostr); for(i = 0; (c = name[i]); i++) { if(c == '_') c = '-'; raptor_iostream_write_byte(c, iostr); } raptor_iostream_string_write("\">", iostr); raptor_iostream_string_write(name, iostr); raptor_iostream_string_write("()", iostr); } #endif static void emit_header(const char* id, raptor_iostream* iostr) { raptor_iostream_string_write( "\n" "\n" "Syntax Formats supported in Raptor\n" "\n" "This chapter describes the syntax formats supported\n" "by parsers and serializers in Raptor.\n" "\n" "\n", iostr); } static void emit_footer(raptor_iostream *iostr) { raptor_iostream_string_write( "\n" "\n" "\n" "\n", iostr); } static void emit_start_section(const char* id, const char* title, raptor_iostream* iostr) { raptor_iostream_string_write("
\n" "", iostr); raptor_xml_escape_string_write((const unsigned char*)title, strlen(title), '\0', iostr); raptor_iostream_string_write("\n", iostr); } static void emit_end_section(raptor_iostream *iostr) { raptor_iostream_string_write( "
\n" "\n", iostr); } static void emit_start_list(raptor_iostream *iostr) { raptor_iostream_string_write(" \n", iostr); } static void emit_start_list_item(raptor_iostream *iostr) { raptor_iostream_string_write(" ", iostr); } static void emit_end_list_item(raptor_iostream *iostr) { raptor_iostream_string_write("\n", iostr); } static void emit_end_list(raptor_iostream *iostr) { raptor_iostream_string_write(" \n", iostr); } static void emit_start_desc_list(const char* title, raptor_iostream *iostr) { raptor_iostream_string_write( " \n", iostr); if(title) { raptor_iostream_string_write( " ", iostr); raptor_iostream_string_write(title, iostr); raptor_iostream_string_write("\n", iostr); } raptor_iostream_write_byte('\n', iostr); } static void emit_start_desc_list_term(raptor_iostream *iostr) { raptor_iostream_string_write( " ", iostr); } static void emit_start_desc_list_defn(raptor_iostream *iostr) { raptor_iostream_string_write( "\n" " ", iostr); } static void emit_end_desc_list_item(raptor_iostream *iostr) { raptor_iostream_string_write( " \n" " \n" "\n", iostr); } static void emit_end_desc_list(raptor_iostream *iostr) { raptor_iostream_string_write(" \n", iostr); } static void emit_mime_type_name(const char *name, raptor_iostream* iostr) { emit_literal(name, iostr); } static void emit_mime_type_q(unsigned char q, raptor_iostream* iostr) { if(q < 10) { raptor_iostream_string_write("q 0.", iostr); raptor_iostream_decimal_write((int)q, iostr); } else raptor_iostream_string_write("q 1.0", iostr); } static void emit_mime_type(const raptor_type_q* mt, raptor_iostream* iostr) { emit_mime_type_name(mt->mime_type, iostr); raptor_iostream_string_write(" with ", iostr); emit_mime_type_q(mt->q, iostr); } static void emit_format_description_name(const char* type_name, const raptor_syntax_description* sd, raptor_iostream* iostr) { raptor_xml_escape_string_write((const unsigned char*)sd->label, strlen(sd->label), '\0', iostr); if(type_name) { raptor_iostream_write_byte(' ', iostr); raptor_iostream_string_write(type_name, iostr); } raptor_iostream_string_write(" (", iostr); emit_literal(sd->names[0], iostr); raptor_iostream_write_byte(')', iostr); } static void emit_format_description(const char* type_name, const raptor_syntax_description* sd, raptor_iostream* iostr) { unsigned int i; if(!sd->mime_types_count) return; /* term */ emit_start_desc_list_term(iostr); emit_format_description_name(type_name, sd, iostr); /* definition */ emit_start_desc_list_defn(iostr); raptor_iostream_string_write("\n ", iostr); emit_start_list(iostr); for(i = 0; i < sd->mime_types_count; i++) { const raptor_type_q* mime_type = &sd->mime_types[i]; if(!sd) break; raptor_iostream_string_write(" ", iostr); emit_start_list_item(iostr); emit_mime_type(mime_type, iostr); emit_end_list_item(iostr); } raptor_iostream_string_write(" ", iostr); emit_end_list(iostr); emit_end_desc_list_item(iostr); } static int sort_sd_by_name(const void *a, const void *b) { raptor_syntax_description* sd_a = *(raptor_syntax_description**)a; raptor_syntax_description* sd_b = *(raptor_syntax_description**)b; return strcmp(sd_a->label, sd_b->label); } typedef struct { const char *mime_type; unsigned char q; raptor_syntax_description* parser_sd; raptor_syntax_description* serializer_sd; } type_syntax; static int sort_type_syntax_by_mime_type(const void *a, const void *b) { int rc; const char* mime_type_a = ((type_syntax*)a)->mime_type; const char* mime_type_b = ((type_syntax*)b)->mime_type; if(!mime_type_a || !mime_type_b) { if(!mime_type_a && !mime_type_b) return (int)(mime_type_b - mime_type_a); return (mime_type_a) ? 1 : -1; } rc = strcmp(mime_type_a, mime_type_b); if(rc) return rc; return ((type_syntax*)b)->q - ((type_syntax*)a)->q; } static void emit_format_to_syntax_list(raptor_iostream* iostr, type_syntax* type_syntaxes, const char* mime_type, int start, int end) { int i; int parser_seen = 0; int serializer_seen = 0; /* term */ emit_start_desc_list_term(iostr); emit_mime_type_name(mime_type, iostr); /* definition */ emit_start_desc_list_defn(iostr); raptor_iostream_string_write("\n ", iostr); emit_start_list(iostr); for(i = start; i <= end; i++) { raptor_iostream_string_write(" ", iostr); emit_start_list_item(iostr); if(type_syntaxes[i].parser_sd) { emit_format_description_name("Parser", type_syntaxes[i].parser_sd, iostr); parser_seen++; } else { emit_format_description_name("Serializer", type_syntaxes[i].serializer_sd, iostr); serializer_seen++; } raptor_iostream_string_write(" with ", iostr); emit_mime_type_q(type_syntaxes[i].q, iostr); emit_end_list_item(iostr); } if(!parser_seen || !serializer_seen) { emit_start_list_item(iostr); if(!parser_seen) raptor_iostream_string_write("No parser.", iostr); else raptor_iostream_string_write("No serializer.", iostr); emit_end_list_item(iostr); } raptor_iostream_string_write(" ", iostr); emit_end_list(iostr); emit_end_desc_list_item(iostr); } int main(int argc, char *argv[]) { int rc = 1; int i; int parsers_count = 0; int serializers_count = 0; int mime_types_count = 0; raptor_syntax_description** parsers = NULL; raptor_syntax_description** serializers = NULL; raptor_iostream* iostr = NULL; type_syntax* type_syntaxes = NULL; int type_syntaxes_count = 0; if(argc != 1) { fprintf(stderr, "%s: USAGE: %s\n", program, program); return 1; } world = raptor_new_world(); if(!world) goto tidy; for(i = 0; 1; i++) { raptor_syntax_description* sd; sd = (raptor_syntax_description*)raptor_world_get_parser_description(world, i); if(!sd) break; parsers_count++; mime_types_count += sd->mime_types_count; } for(i = 0; 1; i++) { raptor_syntax_description* sd; sd = (raptor_syntax_description*)raptor_world_get_serializer_description(world, i); if(!sd) break; serializers_count++; mime_types_count += sd->mime_types_count; } parsers = (raptor_syntax_description**)calloc(parsers_count, sizeof(raptor_syntax_description*)); if(!parsers) goto tidy; serializers = (raptor_syntax_description**)calloc(serializers_count, sizeof(raptor_syntax_description*)); if(!serializers) goto tidy; type_syntaxes = (type_syntax*)calloc(mime_types_count, sizeof(type_syntax)); if(!type_syntaxes) goto tidy; type_syntaxes_count = 0; for(i = 0; 1; i++) { raptor_syntax_description* sd; unsigned int m; sd = (raptor_syntax_description*)raptor_world_get_parser_description(world, i); if(!sd) break; parsers[i] = sd; for(m = 0; m < sd->mime_types_count; m++) { type_syntaxes[type_syntaxes_count].mime_type = sd->mime_types[m].mime_type; type_syntaxes[type_syntaxes_count].q = sd->mime_types[m].q; type_syntaxes[type_syntaxes_count].parser_sd = sd; type_syntaxes_count++; } } qsort(parsers, parsers_count, sizeof(raptor_syntax_description*), sort_sd_by_name); for(i = 0; 1; i++) { raptor_syntax_description* sd; unsigned int m; sd = (raptor_syntax_description*)raptor_world_get_serializer_description(world, i); if(!sd) break; serializers[i] = sd; for(m = 0; m < sd->mime_types_count; m++) { type_syntaxes[type_syntaxes_count].mime_type = sd->mime_types[m].mime_type; type_syntaxes[type_syntaxes_count].q = sd->mime_types[m].q; type_syntaxes[type_syntaxes_count].serializer_sd = sd; type_syntaxes_count++; } } qsort(serializers, serializers_count, sizeof(raptor_syntax_description*), sort_sd_by_name); iostr = raptor_new_iostream_to_file_handle(world, stdout); if(!iostr) goto tidy; /* MIME Types by parser */ emit_header("raptor-formats", iostr); emit_start_section("raptor-formats-intro", "Introduction", iostr); raptor_iostream_string_write( "\n" "The parsers and serializers in raptor can handle different MIME Types with different levels of quality (Q). A Q of 1.0 indicates that the parser or serializer will be able to read or write the full format with high quality, and it should be the prefered parser or serializer for that mime type. Lower Q values indicate either additional mime type support (for parsing) or less-preferred mime types (for serializing). A serializer typically has just 1 mime type of Q 1.0; the preferred type." "\n" , iostr); emit_end_section(iostr); emit_start_section("raptor-formats-types-by-parser", "MIME Types by Parser", iostr); emit_start_desc_list(NULL, iostr); for(i = 0; i < parsers_count; i++) { emit_format_description(NULL, parsers[i], iostr); } emit_end_desc_list(iostr); emit_end_section(iostr); /* MIME Types by serializer */ emit_start_section("raptor-formats-types-by-serializer", "MIME Types by Serializer", iostr); emit_start_desc_list(NULL, iostr); for(i = 0; i < serializers_count; i++) { emit_format_description(NULL, serializers[i], iostr); } emit_end_desc_list(iostr); emit_end_section(iostr); /* MIME Types index */ qsort(type_syntaxes, type_syntaxes_count, sizeof(type_syntax), sort_type_syntax_by_mime_type); emit_start_section("raptor-formats-types-index", "MIME Types Index", iostr); emit_start_desc_list(NULL, iostr); if(1) { const char* last_mime_type = NULL; int last_start_index = -1; for(i = 0; i < type_syntaxes_count; i++) { const char *this_mime_type = type_syntaxes[i].mime_type; if(last_start_index < 0) { last_mime_type = this_mime_type; last_start_index = i; continue; } /* continue if same mime type */ if(!strcmp(last_mime_type, this_mime_type)) continue; emit_format_to_syntax_list(iostr, type_syntaxes, last_mime_type, last_start_index, i-1); last_mime_type = type_syntaxes[i].mime_type; last_start_index = i; } emit_format_to_syntax_list(iostr, type_syntaxes, last_mime_type, last_start_index, i-1); } emit_end_desc_list(iostr); emit_end_section(iostr); emit_footer(iostr); raptor_free_iostream(iostr); iostr = NULL; /* success */ rc = 0; tidy: if(iostr) raptor_free_iostream(iostr); if(parsers) free(parsers); if(serializers) free(serializers); if(type_syntaxes) free(type_syntaxes); if(world) raptor_free_world(world); return rc; } raptor2-2.0.15/ChangeLog.80000644000175000017500000023742111000544040012026 000000000000002007-12-31 Dave Beckett * src/raptor_iostream.c: (raptor_iostream_init_common): Added to init iostream fields * src/raptor_iostream.c: Replaced raptor_iostream_handler structure with raptor_iostream_handler2 (raptor_new_iostream_from_handler2): Added. (raptor_new_iostream_from_handler): Rewritten to use raptor_new_iostream_from_handler2 and create an internal raptor_iostream_handler2. (raptor_new_iostream_from_sink, raptor_new_iostream_from_filename raptor_new_iostream_from_file_handle, raptor_new_iostream_from_string): Added for constructing read iostreams. (method raptor_iostream_read_bytes): Added for reading from read iostreams. * src/raptor.h: Added raptor_iostream_read_bytes_func Added raptor_iostream_handler2 with version, private field and read_bytes field. Deprecated raptor_iostream_handler structure for raptor_iostream_handler2 structure. Added raptor_new_iostream_from_handler2 and deprecated raptor_new_iostream_from_handler Added raptor_new_iostream_from_sink, raptor_new_iostream_from_filename raptor_new_iostream_from_file_handle and raptor_new_iostream_from_string for constructing read iostreams. Added method raptor_iostream_read_bytes for read iostreams. 2007-12-28 Dave Beckett * src/raptor.h, src/raptor_internal.h: Move SAX2 to public API. Added new raptor_sax2 typedef. Added XML type handlers raptor_sax2_start_element_handler, raptor_sax2_end_element_handler, raptor_sax2_characters_handler, raptor_sax2_cdata_handler, raptor_sax2_comment_handler, raptor_sax2_unparsed_entity_decl_handler, raptor_sax2_external_entity_ref_handler. Added functions raptor_new_sax2, raptor_free_sax2, raptor_sax2_set_start_element_handler, raptor_sax2_set_end_element_handler, raptor_sax2_set_characters_handler, raptor_sax2_set_cdata_handler, raptor_sax2_set_comment_handler, raptor_sax2_set_unparsed_entity_decl_handler, raptor_sax2_set_external_entity_ref_handler, raptor_sax2_set_namespace_handler, raptor_sax2_parse_start, raptor_sax2_parse_chunk, raptor_sax2_parse_handle_errors, raptor_sax2_inscope_xml_language, raptor_sax2_inscope_base_uri Moved log API to public API. Added raptor_log_level and raptor_error_handlers typedefs. Added raptor_error_handlers_init. * src/raptor.h, src/raptor_xml.c: Added raptor_xml_element_get_language * src/raptor.h, src/raptor_qname.c: Added raptor_qname_get_local_name and raptor_qname_get_value * src/raptor_turtle_writer.c: cast * src/raptor_xml_writer.c: cast * src/raptor_turtle_writer.c: (raptor_turtle_writer_newline): Cast for signed/unsigned int compare. * src/raptor_xml_writer.c: (raptor_xml_writer_indent): Cast for signed/unsigned int compare. * tests/turtle/Makefile.am: Add bad-19.ttl * tests/turtle/bad-19.ttl: bad-19 () in predicate position 2007-12-24 Dave Beckett * docs/raptor.types: Add gtkdoc file raptor.types 2007-12-19 Lauri Aalto * src/raptor_stringbuffer.c: (raptor_new_stringbuffer) Fixed docs. Removed unnecessary local var and conditional. 2007-12-18 Lauri Aalto * src/turtle_parser.y: (raptor_trig_parse_recognise_syntax): Wrap function in #ifdef RAPTOR_PARSER_TRIG. Used only if RAPTOR_PARSER_TRIG is defined, avoids gcc warning on unused static function. 2007-12-13 Lauri Aalto * src/raptor_uri.c: Portability: Use Windows-like path handling on Symbian. 2007-12-09 Dave Beckett * docs/raptor-tutorial-parsing.xml: fix raptor_set_feature() call to have 3 args 2007-11-28 Dave Beckett * tests/turtle/Makefile.am, tests/turtle/bad-17.ttl, tests/turtle/bad-18.ttl, tests/turtle/manifest-bad.ttl: bad tests 17 and 18 to Forbid ' and '''-quoted strings * src/turtle_lexer.l: Remove '-quoted strings 2007-11-26 Dave Beckett * autogen.sh: Update to handle OSX glibtoolize and optional ltdl 2007-11-15 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk) Fix compiler warnings: unused variable, unused label. 2007-11-15 Dave Robillard * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject_properties): Write ; statement terminators with a leading space for consistency with . terminator 2007-11-12 Lauri Aalto * src/raptor_www.c: (raptor_www_init) Pull static initialized flag from function scope to unit scope. * src/raptor_nfc.h, src/raptor_nfc_data.c: Make raptor nfc data const - eliminate ~53768 bytes of writable static. * src/raptor_serialize_rss.c: Make raptor_rss10_spaces pointer const. * src/n3_parser.y, src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_dot.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_xml_writer.c, src/turtle_parser.y: Make raptor_uri_handlers const. SOURCE COMPATIBILITY BREAK: Five raptor API function signatures changed: raptor_uri_set_handler() raptor_uri_get_handler() raptor_new_namespaces() raptor_namespaces_init() raptor_new_xml_writer() * src/raptor_uri.c: (raptor_uri_set_handler) Assert inputs 2007-11-06 Lauri Aalto * src/raptor_serialize_turtle.c: fix eol style * src/raptor_uri.c: (raptor_uri_set_handler) Treat uri handler as const although the API does not say it is const. * src/raptor.h: Allow RAPTOR_API to be externally defined e.g. in a static config.h. Remove __SYMBIAN32__ case. * src/turtle_lexer.l, src/turtle_parser.y: Rename turtle {TRUE,FALSE} tokens to {TRUE,FALSE}_TOKEN to prevent potential clashes with system headers. * src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Remove writable static data. Refactor turtle/xml writers to use a const spaces_buffer. * src/raptor_uri.c: Remove writable static data. Make raptor_uri_handler const * src/ntriples_parse.c, src/raptor_feature.c, src/raptor_general.c: Remove writable static data. Make const arrays const. 2007-11-05 Lauri Aalto * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_init) Fix lowmem issues: Do not use a NULL namespaces sequence or nstack. NULL rdf_type is allowed. Check for uri creation failures. Check for sequence push failures. (raptor_turtle_serialize_terminate) Do not leave dangling pointers behind. 2007-11-04 Dave Beckett * src/raptor_turtle_writer.c: (main): Write a proper double * tests/turtle/test-28-out.ttl: Remove canonicalisation * src/raptor_serialize_turtle.c: (raptor_turtle_emit_blank, raptor_turtle_emit_subject, raptor_turtle_emit): Add more failure pass ons. * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Fail when out of memory. * src/raptor_serialize_turtle.c: (raptor_turtle_emit_subject): Remove un-necessary use of snprintf to concat 2 strings. * src/raptor_turtle_writer.c: (raptor_turtle_writer_double): Removed, no longer used. * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Do not canonicalise integer, double or decimal literals. 2007-10-31 Dave Beckett * tests/turtle/test-10.out, tests/turtle/test-21.out, tests/turtle/test-22.out: Remove canonicalisation of integer and double (Turtle spec change coming soon) 2007-10-30 Lauri Aalto * src/turtle_parser.y: Add {INTEGER,FLOATING}_LITERAL %destructors. 2007-10-30 Dave Beckett * src/turtle_lexer.l, src/turtle_parser.y: Turtle INTEGER_LITERAL and FLOATING_LITERAL now are stored as strings, with no canonicalisation. This is required for SPARQL compatibility. 2007-10-25 Lauri Aalto * src/n3_parser.y: (blank) Fix [ propertylist ] lowmem leaks. * src/turtle_parser.y: (blank) Fix [ propertylist ] lowmem leaks. 2007-10-25 Dave Beckett * src/snprintf.c: Define round() and trunc() as macros if they were not found by configure as functions/macros. They were standardised with C99. * configure.ac: Check for trunc and round in libm * utils/rapper.c: Quote args to HELP_ARG_BOTH() 2007-10-24 Lauri Aalto * src/turtle_parser.y: Add destructors for turtle_parser identifiers and sequences. (triples) Free subject and propertylist on alloc failure. * src/turtle_lexer.l: turtle_lexer: Check for alloc failures - fail faster and do not pass NULLs to parser. 2007-10-23 Lauri Aalto * src/turtle_lexer.l: (QUOTEDURI) Always free stringbuffer * src/turtle_lexer.l: turtle_lexer: Check for alloc failures * src/n3_lexer.l: (n3_copy_string_token) Always free stringbuffer if it is allocated. * src/raptor_stringbuffer.c: (raptor_stringbuffer_append_string_common) Free passed in string on alloc error if ownership was transferred. * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string) Check for alloc failure. * src/fix-flex, src/n3_lexer.l, src/raptor_internal.h, src/turtle_lexer.l: Lowmem leak fixes. Ported experimental lexer leak prevention code from sparql_lexer r12922 to raptor {n3,turtle}_lexer. Flagged with LEXER_ALLOC_TRACKING, disabled by default. (raptor_parser_s) Added lexer_user_data. * src/raptor_internal.h, src/raptor_parse.c: (raptor_parse_uri_with_connection) Lowmem leak fixes. Store raptor_www pointer to raptor parser object to allow resource cleanup from client code in case raptor_parse_chunk() fails in a lexer. * src/n3_parser.y, src/raptor_parse.c: (raptor_parse_uri_with_connection) Set parser to failed state if raptor_parse_chunk() returned an error. (raptor_n3_parse_chunk) Return error code from n3_parse(). 2007-10-19 Lauri Aalto * src/n3_lexer.l, src/turtle_lexer.l: (n3_lexer, turtle_lexer) Replace out-of-memory yyterminate()s with more informative error reporting. * src/fix-flex, src/n3_lexer.l, src/turtle_lexer.l: (fix-flex) Import patches from rasqal fix-flex: remove generated yy_fatal_error(), OOM checks to ensure_buffer_stack(). (n3_lexer_fatal_error,turtle_lexer_fatal_error) Added replacement for generated fatal error handler. * src/n3_lexer.l: (QNAME) OOM: Terminate instead of returning NULL QNAME literal. * src/n3_parser.y: (n3_parser) PREFIX should not be in %destructor list 2007-10-18 Lauri Aalto * src/fix-bison, src/fix-flex: (fix-bison, fix-flex) Fix #line numbers in generated raptor lexers and parsers. 2007-10-15 Lauri Aalto * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_serialize_statement) indent tabs -> spaces * src/raptor_serialize_rdfxmla.c: Fix low memory crashes. (raptor_rdfxmla_serialize_init) Check for nstack alloc failure before using it. Alloc independent objects in a batch and check them with one if. Check the return value of raptor_sequence_push() - moved to end since it depends on successful sequence allocation. (raptor_rdfxmla_serialize_terminate) Set pointers to NULL to prevent dangling pointers. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_init) Check sequence push ret val. 2007-10-12 Lauri Aalto * src/raptor_sequence.c: (raptor_sequence_set_at) Free passed in data item also when returning due to invalid index. 2007-10-08 Dave Beckett * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: (raptor_turtle_writer_literal, raptor_turtle_writer_quoted): These may fail when out of memory, change to return an int non-0 on failure 2007-10-06 Dave Beckett * src/raptor_sequence.c: comments on sequence design 2007-10-05 Lauri Aalto * src/raptor.h, src/raptor_sequence.c: (raptor_sequence_disown_at) Removed. Was a hack that should not be in a public API. Functions that needed this have been refactored to use raptor_sequence_unshift() to get the item and its ownership. * src/n3_parser.y: (propertyList) Refactored to not use raptor_sequence_disown_at() * src/turtle_parser.y: (propertyList) Refactored to not use raptor_sequence_disown_at() * src/raptor_sequence.c: Refactor raptor_sequence internals to make shift/unshift as efficient as push/pop. (raptor_free_sequence) Use RAPTOR_FREE macro instead of free() for sequence. (raptor_sequence_ensure) Added grow_at_front flag to describe growth direction. Do not grow sequence if seq->capacity == capacity. Use RAPTOR_CALLOC instead of calloc() for sequence. (raptor_sequence_grow) Removed. (raptor_sequence_set_at) Do not allow setting items over +1 current size. (main) Added test code. 2007-10-04 Lauri Aalto * src/turtle_parser.y: Memory leak fixes: Free allocated resources and YYERROR on alloc failure. (raptor_turtle_new_triple) Free identifiers on error. * src/turtle_parser.y: (turtle_parse) Check lexer init return value. (raptor_turtle_parse_init) Return error code on failure. * src/raptor_identifier.c: (raptor_copy_identifier) Return non-zero on allocation failure. No need to check for non-null uris: raptor_uri_copy returns NULL if passed in a null uri. Removed duplicate copying of literal_language. * src/turtle_parser.y: (triples, propertyList, literal, blank) YYERROR on alloc failure. (raptor_turtle_parse_terminate) Free uris only if not null. * src/n3_parser.y: Memory leak fixes: free resources on error. (verb, literal, resource, blank, collection) Additional checks for alloc failures. * src/n3_lexer.l: lexer: yyterminate() on alloc failure. (n3_copy_token, n3_copy_string_token) Check for alloc failure. * src/raptor.h, src/raptor_sequence.c: Add raptor_sequence_disown_at() 2007-10-02 Lauri Aalto * src/n3_parser.y: %destructors for %tokens and not just %types. (directive) YYERROR if namespace alloc failed. 2007-10-02 Dave Beckett * NEWS.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.17 2007-10-01 Lauri Aalto * src/raptor_identifier.c: (raptor_new_identifier) Free owned items on alloc failure. * src/n3_parser.y: (raptor_n3_new_triple) Free owned identifiers on alloc error. (n3_parse) Check lexer init return value. * src/n3_parser.y: n3 parser YYERROR on alloc failure. Still leaks memory on errors. * src/n3_parser.y: n3 parser YYERROR on alloc failure. * src/raptor_serialize_rdfxml.c: Fix indent + trim whitespace 2007-09-30 Dave Beckett * Snapshotted raptor_1_4_16 for 1.4.16 release (SVN 12743) * docs/libraptor.3: Fix functions using raptor_unichar GRDDL 2007-09-11 2007-09-29 Dave Beckett * docs/libraptor.3: Added raptor_new_xml_element_from_namespace_local_name * src/raptor.h, src/raptor_serialize_rdfxml.c, src/raptor_xml.c: Alter raptor_new_xml_element_from_namespace_local_name signature to take an xml_language parameter * src/raptor_grddl.c: (raptor_grddl_run_recursive): Only set content type handler when recursive parser is grddl. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_end): Make sure an empty legal RDF/XML document is written when 0 triples were serialized. * src/raptor_grddl.c: Replaced all calls to get parser's current base ID with raptor_parser_get_current_base_id * src/raptor_guess.c: (raptor_guess_get_current_base_id): Pass on the call to get the base ID to the internal parser using raptor_parser_get_current_base_id * src/raptor_internal.h, src/raptor_parse.c: (raptor_parser_get_current_base_id): Added. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Remove #ifdef-out old processing * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Re-init the guess parser each time so it does a fresh guess. (raptor_grddl_run_grddl_transform_doc): Save and restore the genid around recursive parsers, so blank nodes are numbered across graphs. (raptor_grddl_run_recursive): Switch to parser_name, flags args. Pass on the filter to the internal parser call. Do not add parent if the parser is not grddl. Pass on the ignore error flag to raptor_grddl_fetch_uri. Save and restore the genid around recursive parsers, so blank nodes are numbered across graphs. Do not call rdfxml parser if selected parser is already rdfxml. Update raptor_grddl_run_recursive calls to use parser name and flags. Alter the processing to use the guess parser to figure out the mime type during the recursion. Do not filter the triples. Fixes Issue#0000238 http://bugs.librdf.org/mantis/view.php?id=238 * src/raptor_www.c: (raptor_www_file_handle_fetch): Ensure the buffer has a NUL after the last byte read, it helps elsewhere when using str*() functions on the results - such as guessing the parser from content. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use RAPTOR_LIBXML_HTML_PARSE_NONET to decide whether to enable libxml HTML_PARSE_NONET with the html parser. * configure.ac: Add test for libxml HTML_PARSE_NONET since it not a define, it cannot be done at run-time with #ifdef Define RAPTOR_LIBXML_HTML_PARSE_NONET if available * src/raptor_grddl.c: Add declaration for libxml_options * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use RAPTOR_LIBXML_XML_PARSE_NONET to set XML nonet option if it was set with raptor feature nonet. * tests/grddl/test-01.html: lie about the mime type in order to get the test to work * src/raptor_grddl.c: (raptor_grddl_uri_xml_parse_bytes): Use RAPTOR_LIBXML_XML_PARSE_NONET to check for enum value XML_PARSE_NONET * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Use RAPTOR_LIBXML_XML_PARSE_NONET to check for XML_PARSE_NONET enum value. * tests/grddl/Makefile.am: Call rapper with -f noNet to prevent unnecessary fetches of HTML DTDs * configure.ac: Add test for libxml XML_PARSE_NO_NET since it not a define, it cannot be done at run-time with #ifdef Define RAPTOR_LIBXML_XML_PARSE_NONET if available * src/raptor_grddl.c: (raptor_grddl_fetch_uri): Reject a URI with feature noNet only if it is not a file URI * configure.ac, tests/Makefile.am, tests/grddl, tests/grddl/Makefile.am, tests/grddl/data-01.nt, tests/grddl/data-01.rdf, tests/grddl/data-02.rdf, tests/grddl/test-01.html, tests/grddl/test-01.out: Added tests/grddl dir and test-01 * AUTHORS: Added Lauri Aalto 2007-09-27 Lauri Aalto * src/n3_parser.y: (raptor_n3_parse_terminate) Do not assume the parser is fully initialized. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header, raptor_rdfxml_serialize_statement) Memory leak fixes: make sure base_uri is freed. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header) Memory leak fix. Set context->written_header flag early to prevent running the function again when a previous call to this function failed. * src/raptor_uri.c: (raptor_uri_to_relative_counted_uri_string) Fix memory leak - free uri details if suffix allocation fails. 2007-09-26 Dave Beckett * autogen.sh: Added an inline perl script to grep out the version from programs. 2007-09-26 Lauri Aalto * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement) Skip statements with bad predicate uris, do not return an error. * src/raptor_uri.c: (raptor_default_new_uri, raptor_uri_path_make_relative_path, raptor_uri_to_relative_counted_uri_string, raptor_uri_uri_string_to_filename_fragment) Check for alloc failures. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement) Make sure xml_writer->current_element does not become a dangling pointer on error. (raptor_rdfxml_serialize_end) No-op if context->rdf_RDF_element is NULL. * src/raptor_uri.c: (raptor_uri_to_counted_string) Copy uri string, not uri struct - worked previously with raptor_uris but breaks with librdf_uris. No need to allocate +sizeof(char*). * src, tests, utils: Props: ignore .exes * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header) Forgot to return 0 on success - oops 2007-09-25 Dave Beckett * autogen.sh: Use 3-part versions with perl to decode them. Still broken for autoconf 2007-09-25 Lauri Aalto * src/raptor_xml_writer.c: (raptor_iostream_write_xml_element_start) Check for alloc failures and clean up nspace_declarations on failure. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_ensure_writen_header) Check for alloc failures. Return an error code on failure. (raptor_rdfxml_serialize_statement) Check for raptor_rdfxml_ensure_writen_header() return code. (raptor_rdfxml_ensure_writen_header) Ignore raptor_rdfxml_ensure_writen_header() return code in a cleanup function. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_statement) Get a copy of predicate uri string for modification. Check for alloc failures and clean up on error. Refactored to use raptor_new_xml_element_from_namespace_local_name(). * src/raptor.h, src/raptor_xml.c: Refactoring: Added raptor_new_xml_element_from_namespace_local_name(). Pulled from rasqal_query_results_new_xml_element() - the same xml element creation pattern recurs in other serializers as well. 2007-09-24 Lauri Aalto * autogen.sh: Do not compare versions as decimal, e.g. automake 1.10 should be treated newer than 1.7. (update_prog_version) Convert [z.]x.y version strings to 100x+y. 2007-09-23 Dave Beckett * src/raptor_grddl.c: Revert GRDDL to the main algorithm of around 12377 which passes the tests again and Fixes Issue#0000239 http://bugs.librdf.org/mantis/view.php?id=239 (raptor_grddl_parser_add_parent): Restored. (raptor_grddl_copy_state): Removed (raptor_grddl_new_child_parser): Removed. (raptor_grddl_run_recursive): Remove reference to the above - replacing raptor_grddl_new_child_parser with raptor_grddl_ensure_internal_parser and replacing 'nparser' references with grddl_parser->internal_parser. * src/raptor_grddl.c: (raptor_grddl_discard_message): debug message tweak. * examples, tests, docs, docs/tmpl: props * docs/tmpl/section-uri-factory.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-xml-namespace.sgml: Updated gtkdoc templates for raptor_uri_compare 2007-09-21 Lauri Aalto * src/raptor.h, src/raptor_namespace.c: (raptor_new_namespace): Check for alloc failures and clean up on error. (raptor_namespaces_init): Changed to return an error code. * src/raptor_parse.c: (raptor_parse): Check for alloc failures. Clean up on failure. * src/raptor_rdfxml.c: (raptor_rdfxml_start_element_handler) return on fatal error, do not use NULL pointers. (raptor_rdfxml_end_element_grammar) abort() after reporting a fatal error. * src/raptor_serialize.c: (raptor_new_serializer): Check for alloc failures. Clean up on failure. * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_init): Check for alloc failures. Clean up on failure. * src/raptor_namespace.c: raptor_namespace.c: Fix comment typo * src/raptor_abbrev.c: (raptor_abbrev_subject_add_property) Free passed in nodes on error. * src/raptor_abbrev.c, src/raptor_sequence.c: raptor_sequence: Delete items to be inserted on error. Fixes Issue#0000237 http://bugs.librdf.org/mantis/view.php?id=237 * src/fix-bison: bison parsers / fix-bison: Fix compiler warning about empty declarations (remove semicolon). * src/raptor_parse.c: (raptor_guess_parser_name) Fix compiler warnings about unnecessary const cast * src/raptor_rfc2396.c: (raptor_new_uri_detail) Check for alloc failure. * src/raptor_serialize_rdfxml.c: raptor_serialize_rdfxml: Fix compiler warnings about uninitialized variables. * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_ensure_writen_header) Fix compiler warning about uninitialized variable. * src/raptor_xml_writer.c: (raptor_iostream_write_xml_element_start) Check for alloc failure * src/raptor_internal.h: raptor_internal.h: Allow RAPTOR_WWW_BUFFER_SIZE to be externally defined. Can save stack space in some resource-constrained environments with smaller buffers. * src/raptor_internal.h: raptor_internal.h: Allow RAPTOR_ASSERT_DIE to be externally defined e.g. in a makefile. * src/raptor_internal.h: raptor_internal.h: Rearrange include file guards to include stdlib.h without dmalloc. * src/raptor_general.c: (raptor_init) Set initialized flag early to allow cleanup with raptor_finish() on init errors. * src/raptor_general.c: (raptor_log_error) Do not abort() on fatal messages - leave it up to caller to enable resource cleanup. * src/raptor_general.c: (raptor_statement_part_as_counted_string) Fix compiler warnings about uninitialized variables. * src/raptor_rss_common.c, src/raptor_sax2.c: Fix compiler warnings about possible unwanted semicolons * src/raptor_serialize.c: Fix typos in comments * src/raptor_sax2.c: Fix indent * Makefile.am, autogen.sh, configure.ac, data/Makefile.am, docs/Makefile.am, examples/Makefile.am, src/Makefile.am, tests/22-rdf-syntax-ns.rdf, tests/Makefile.am, tests/all-escape.rdf, tests/bad-00.rdf, tests/bad-01.rdf, tests/bad-02.rdf, tests/bad-03.rdf, tests/bad-04.rdf, tests/bad-05.rdf, tests/bad-06.rdf, tests/bad-07.rdf, tests/bad-08.rdf, tests/bad-09.rdf, tests/bad-10.rdf, tests/bad-11.rdf, tests/bad-12.rdf, tests/bad-13.rdf, tests/bad-14.rdf, tests/bad-15.rdf, tests/bad-16.rdf, tests/bad-17.rdf, tests/bad-18.rdf, tests/bad-19.rdf, tests/bad-20.rdf, tests/bad-21.rdf, tests/bad-22.rdf, tests/bad-23.rdf, tests/daml-oil.rdf, tests/ex-00.rdf, tests/ex-01.rdf, tests/ex-02.rdf, tests/ex-03.rdf, tests/ex-04.rdf, tests/ex-05.rdf, tests/ex-06.rdf, tests/ex-07.rdf, tests/ex-08.rdf, tests/ex-09.rdf, tests/ex-10.rdf, tests/ex-11.rdf, tests/ex-12.rdf, tests/ex-13.rdf, tests/ex-14.rdf, tests/ex-15.rdf, tests/ex-16.rdf, tests/ex-17.rdf, tests/ex-18.rdf, tests/ex-19.rdf, tests/ex-20.rdf, tests/ex-21.rdf, tests/ex-22.rdf, tests/ex-23.rdf, tests/ex-24.rdf, tests/ex-25.rdf, tests/ex-26.rdf, tests/ex-27.rdf, tests/ex-28.rdf, tests/ex-29.rdf, tests/ex-30.rdf, tests/ex-31.rdf, tests/ex-32.rdf, tests/ex-33.rdf, tests/ex-34.rdf, tests/ex-35.rdf, tests/ex-36.rdf, tests/ex-37.rdf, tests/ex-38.rdf, tests/ex-39.rdf, tests/ex-40.rdf, tests/ex-41.rdf, tests/ex-42.rdf, tests/ex-43.rdf, tests/ex-44.rdf, tests/ex-45.rdf, tests/ex-46.rdf, tests/ex-47.rdf, tests/ex-48.rdf, tests/ex-49.rdf, tests/ex-51.rdf, tests/ex-53.rdf, tests/ex-54.rdf, tests/ex-55.rdf, tests/ex-56.rdf, tests/ex-57.rdf, tests/ex-58.rdf, tests/ex-59.rdf, tests/ex-60.rdf, tests/ex-61.rdf, tests/ex-62.rdf, tests/turtle/Makefile.am, tests/turtle/bad-00.ttl, tests/turtle/bad-01.ttl, tests/turtle/bad-02.ttl, tests/turtle/bad-03.ttl, tests/turtle/bad-04.ttl, tests/turtle/bad-05.ttl, tests/turtle/bad-06.ttl, tests/turtle/bad-07.ttl, tests/turtle/bad-08.ttl, tests/turtle/bad-09.ttl, tests/turtle/bad-10.ttl, tests/turtle/bad-11.ttl, tests/turtle/bad-12.ttl, tests/turtle/bad-13.ttl, tests/turtle/bad-14.ttl, tests/turtle/manifest-bad.ttl, tests/turtle/manifest.ttl, tests/turtle/rdf-schema.out, tests/turtle/rdf-schema.ttl, tests/turtle/rdfq-results.out, tests/turtle/rdfq-results.ttl, tests/turtle/rdfs-namespace.out, tests/turtle/rdfs-namespace.ttl, tests/turtle/test-00.out, tests/turtle/test-00.ttl, tests/turtle/test-01.out, tests/turtle/test-01.ttl, tests/turtle/test-02.out, tests/turtle/test-02.ttl, tests/turtle/test-03.out, tests/turtle/test-03.ttl, tests/turtle/test-04.out, tests/turtle/test-04.ttl, tests/turtle/test-05.out, tests/turtle/test-05.ttl, tests/turtle/test-06.out, tests/turtle/test-06.ttl, tests/turtle/test-07.out, tests/turtle/test-07.ttl, tests/turtle/test-08.out, tests/turtle/test-08.ttl, tests/turtle/test-09.out, tests/turtle/test-09.ttl, tests/turtle/test-10.out, tests/turtle/test-10.ttl, tests/turtle/test-11.out, tests/turtle/test-11.ttl, tests/turtle/test-12.out, tests/turtle/test-12.ttl, tests/turtle/test-13.out, tests/turtle/test-13.ttl, tests/turtle/test-14.out, tests/turtle/test-14.ttl, tests/turtle/test-15.out, tests/turtle/test-15.ttl, tests/turtle/test-16.out, tests/turtle/test-16.ttl, tests/turtle/test-17.out, tests/turtle/test-17.ttl, tests/turtle/test-18.out, tests/turtle/test-18.ttl, tests/turtle/test-19.out, tests/turtle/test-19.ttl, tests/turtle/test-20.out, tests/turtle/test-20.ttl, tests/turtle/test-21.out, tests/turtle/test-21.ttl, tests/turtle/test-22.out, tests/turtle/test-22.ttl, tests/turtle/test-23.out, tests/turtle/test-23.ttl, tests/turtle/test-24.out, tests/turtle/test-24.ttl, tests/turtle/test-25.out, tests/turtle/test-25.ttl, tests/turtle/test-26.out, tests/turtle/test-26.ttl, tests/turtle/test-27.out, tests/turtle/test-27.ttl, tests/turtle/test-28-out.ttl, tests/turtle/test-28.out, tests/turtle/test-28.ttl, tests/turtle/test-29.out, tests/turtle/test-29.ttl, tests/turtle/test-30.out, tests/turtle/test-30.ttl, utils/Makefile.am, win32/Makefile.am: Fix EOL issues when building svn version on cygwin. Partial fix to http://bugs.librdf.org/mantis/view.php?id=236 * tests/Makefile.am, tests/turtle/Makefile.am: Added $(EXEEXT)s to Makefiles to fix "make clean" on cygwin. Partial fix to Issue#0000235 http://bugs.librdf.org/mantis/view.php?id=235 * autogen.sh: raptor autogen.sh $dir quoting. Partial fix to Issue#0000234 http://bugs.librdf.org/mantis/view.php?id=234 2007-09-20 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Check for presence of html in the mime type correctly. 2007-09-19 Dave Beckett * src/raptor_parse.c: (raptor_parse_uri_with_connection): Ensure a parser is started if it wasn't started during WWW retrieval - typically this is only if the file was empty (o bytes). Some RDF syntaxes are legal as an empty file so can produce a valid empty graph, such as N-Triples and Turtle. 2007-09-17 Dave Beckett * src/raptor_turtle_writer.c: Add xsd boolean, decimal, double, integer URIs to structure (raptor_turtle_writer_literal): Use raptor_uri_equal instead of strcmps. In Redland, this means no strcmps. * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_start): Remove call to raptor_turtle_writer_base since raptor_new_turtle_writer will do it if necessary. * src/raptor_turtle_writer.c: (raptor_new_turtle_writer): Call raptor_turtle_writer_base with initial base URI if there is one. (raptor_turtle_writer_base): Adedd. Back to possibly generating a relative base, allowing this to be called multiple times and setting the actual writer base URI, potentially to NULL. (main): Adjust expected result to expect an @base * tests/turtle/test-28-out.ttl: @base and relative prefix * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: (raptor_turtle_writer_base): Added to generate @base as an absolute URI. (raptor_turtle_serialize_start): Call it if there is an output base URI. 2007-09-16 Dave Beckett * docs/raptor-sections.txt: Add raptor_uri compare_func funcs * tests/turtle/manifest.ttl: Added test-26 to test-30 to manifest. * src/raptor_uri.c: (main): Ensure called is inited * src/raptor_uri.c: (main): Add tests for raptor_uri_compare and interface versioning. * src/raptor_uri.c: (raptor_uri_set_handler): Adjust handler to not have to point to const data and to have V1 or V2 declared by setting the initialised field. Truncate it to 1 or 2. (raptor_uri_compare): Use interface version to decide whether to invoke the uri_compare method. (struct raptor_uri_default_handler): Set URI Interface version to 2. * src/raptor.h: (struct raptor_uri_handler): Add URI Interface versions 1 and 2 - adding raptor_uri_compare_func. Overload the 'initialised' field to store the API version. Existing Redland sets that to 1. (raptor_uri_set_handler): Adjust handler to not have to point to const data. * configure.ac, docs/libraptor.3, docs/raptor-parsers.xml, raptor.rdf.in, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Remove RDFa support for now 2007-09-15 Dave Beckett * docs/libraptor.3: 1.4.16 2007-09-15 Dave Robillard * src/raptor.h, src/raptor_uri.c: (raptor_uri_handler): Move new raptor_uri_compare method to end of struct to limit ABI breakage. 2007-09-15 Dave Beckett * src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_set.c: Make raptor_set_test less chatty * tests/turtle/Makefile.am: Re-added test-30 now it's in SVN * tests/turtle/test-30.out, tests/turtle/test-30.ttl: test-30 for @base 2007-09-15 Dave Robillard * docs/tmpl/section-uri.sgml, src/raptor.h, src/raptor_abbrev.c, src/raptor_uri.c: (raptor_uri_compare): Added for librdf overloading (rather than using strcmp directly). * tests/turtle/Makefile.am: Remove references to nonexistant test-30 * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Use AVL tree rather than sequence for abbreviated serialisers (turtle & rdfxmla), significant performance improvement for large serialisations. (raptor_abbrev_node_lookup): Use AVL tree search against abbrev_node instead of linear sequence search. (raptor_abbrev_node_cmp): Adapt old raptor_abbrev_node_equals to provide strcmp-like ordering. (raptor_abbrev_node_equals): Change to trivial wrapper around new raptor_abbrev_node_cmp. 2007-09-14 Dave Robillard * src/raptor_serialize_turtle.c: Fix unwanted blank line at end of Turtle list abbreviation. e.g. before: :foo :bar ( 1 2 3 ) . after: :foo :bar ( 1 2 3 ) . 2007-09-11 Dave Beckett * src/turtle_lexer.l, src/turtle_parser.y: Added turtle @base * tests/turtle/Makefile.am: Adde test-30 for @base 2007-09-08 Dave Beckett * src/raptor_sax2.c: (raptor_sax2_finish): Reset libxml error handlers to defaults. Fixes Issue#0000232 http://bugs.librdf.org/mantis/view.php?id=232 2007-09-06 Dave Beckett * src/turtle_common.c: docs fix 2007-09-03 Dave Beckett * src/turtle_lexer.l: {QUOTEDURI}: Apply turtle escapes to URIs * tests/turtle/test-29.out, tests/turtle/test-29.ttl: Fix line endings of test-29 * tests/turtle/Makefile.am, tests/turtle/test-29.out, tests/turtle/test-29.ttl: test-29: Test all ntriples/turtle escapes U+0001 to U+007F * src/snprintf.c: Define __USE_ISOC99 to 1 * src/raptor_rss.c: (raptor_rss_end_element_handler): Fixed a bug that silently discarded non-empty fields -- oops. * src/raptor_rss.c: raptor_rss_uplift_map: copy atom:updated to dc:date * configure.ac: Make sure to define HAVE_CURL_CURL_H when curl/curl.h is found 2007-09-01 Dave Beckett * docs/libraptor.3: Added RDFa 2007-08-28 Dave Beckett * docs/libraptor.3: Added description of new 1.4.16 functions 2007-08-27 Dave Beckett * src/raptor_grddl.c: GRDDL and RDFa * src/snprintf.c: just leave raptor_format_float for now. * docs/rdfcat.c, docs/rdfprint.c, docs/rdfserialize.c: Added C examples 2007-08-26 Dave Beckett * docs/raptor-tutorial-parsing.xml: parsing filtering tutorial docs * docs/raptor-parsers.xml: GRDDL docs * src/raptor_grddl.c: (raptor_grddl_fetch_uri): Set WWW timeout from value of new parser feature RAPTOR_FEATURE_WWW_TIMEOUT * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added parser feature RAPTOR_FEATURE_WWW_TIMEOUT 2007-08-25 Dave Beckett * src/raptor_general.c, src/raptor_nfc.c, src/raptor_serialize_ntriples.c, src/raptor_xml.c: Use raptor_unichar instead of unsigned long for a Unicode codepoint * src/raptor_utf8.c: (raptor_unicode_char_to_utf8, raptor_utf8_to_unicode_char, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namechar, raptor_unicode_is_xml10_namechar raptor_unicode_is_namestartchar, raptor_unicode_is_namechar): Updated to take a raptor_unichar argument. * src/raptor_internal.h: Update the raptor_unicode_* functions that take a unicode char to use raptor_unichar: raptor_unicode_is_namestartchar and raptor_unicode_is_namechar * src/raptor.h: Define raptor_unichar for a Unicode codepoint instead of unsigned long. Update the raptor_unicode_* functions that take a unicode char to use it: raptor_unicode_char_to_utf8, raptor_utf8_to_unicode_char, raptor_unicode_is_xml11_namestartchar, raptor_unicode_is_xml10_namestartchar, raptor_unicode_is_xml11_namechar and raptor_unicode_is_xml10_namechar. * src/raptor_nfc.h: Remove unused u32 * src/raptor.h: Document RAPTOR_FEATURE_HTML_LINK * src/snprintf.c: raptor_format_float not public * docs/libraptor.3: 1.4.16 2007-08-24 Dave Beckett * utils/rapper.c: word 2007-08-24 Dave Robillard * AUTHORS: Test commit (added undeserving self to AUTHORS). 2007-08-24 Dave Beckett * tests/turtle/Makefile.am: (check-turtle-serialize-syntaxs): srcdir added for diff and cmp 2007-08-19 Dave Robillard * AUTHORS: Added Dave Robillard 2007-08-19 Dave Beckett * utils/rapper.c: words * utils/rapper.1: Added -I/--input-uri and -O/--output-uri * utils/rapper.c: Added -I/--input-uri and -O/--output-uri to set the input/parser base URI and output/serializer base URI directly Defaults remain the same - the serializer base URI defaults to the input base URI, however it was set. Tidied the verbose messages to mention parser name. Added a message for the serializer name too. 2007-08-18 Dave Beckett * src/turtle_parser.y: (raptor_turtle_parser_register_factory): Make default application/x-turtle for now * src/raptor_parse.c: (raptor_parser_factory_add_mime_type): docs were wrong. * src/raptor_serialize_dot.c: (raptor_dot_serializer_end): Handle a missing base URI. Fixes Issue#0000216 http://bugs.librdf.org/mantis/view.php?id=216 2007-08-17 Dave Beckett * src/raptor.h: Applied raptor part of symbian portability fix for Issue#0000203 http://bugs.librdf.org/mantis/view.php?id=203 2007-08-14 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Apply a negative score if html is in the mime type. Do not recognize as rdf if * src/raptor_xml_writer.c: (main) Quieter unit test * src/snprintf.c: #ifdef out unused dopr_outch prototype * src/turtle_common.c: (raptor_stringbuffer_append_turtle_string): Take const string arg. * src/raptor_internal.h: Update prototypes for raptor_turtle_writer_quoted and raptor_turtle_writer_literal to take const string args. * src/raptor_turtle_writer.c: (raptor_turtle_writer_quoted, raptor_turtle_writer_literal): const string args. (main): Unit tests * src/raptor_turtle_writer.c: (raptor_turtle_writer_double): Renamed from snprint_turtle_double and now goes direct to the writer's iostream. Serialize NaN, -INF and INF numbers * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Use raptor_format_float to format decimals. * src/Makefile.am: Added snprintf.c * src/snprintf.c: (raptor_format_float): Renamed from fmtfp and edited to be XSD rules. * src/raptor_internal.h: Added raptor_format_float * src/raptor_parse.c: (raptor_parse_file_stream): C99 * tests/turtle/test-28-out.ttl, tests/turtle/test-28.out, tests/turtle/test-28.ttl: Update test-28 results for truncating to precision * tests/turtle/Makefile.am: Remove test-28 from roundtrip exact test * tests/turtle/Makefile.am: minor fix * tests/turtle/Makefile.am: (check-turtle-serialize-syntax): diff always in text * tests/turtle/test-28-out.ttl: fix expected output * tests/turtle/Makefile.am: comment * tests/turtle/Makefile.am, tests/turtle/test-28-out.ttl, tests/turtle/test-28.out: Check test-28 for exact syntax returned as well as triples 2007-08-02 Dave Beckett * src/raptor_parse.c: (raptor_parse_file_stream): Always NULL terminate the read buffer. * tests/turtle/Makefile.am, tests/turtle/test-28.out, tests/turtle/test-28.ttl: Added test-28.ttl test-28.out for serializing xsd:double 2007-07-29 Dave Beckett * src/raptor_set.c: (main): Make test silent when successful. * src/raptor_avltree.c: remove debug * src/raptor_set.c: comment * src/raptor_avltree.c: print_string is not needed unless debugging * src/raptor_set.c: Switch to use raptor_avltree for ID sets * src/raptor_avltree.c, src/raptor_internal.h: Rename constructor and destructor * src/raptor_avltree.c: (main): Make test silent when successful. * src/raptor_avltree.c: Conditionalise detailed AVL-tree debugging * src/Makefile.am: Add raptor_avltree_test to TESTS * src/Makefile.am, src/raptor_avltree.c, src/raptor_internal.h: Added AVL-Tree code 2007-07-19 Dave Beckett * src/raptor_serialize.c: docs 2007-07-13 Dave Beckett * src/raptor_turtle_writer.c: (snprint_turtle_double): Tidy to remove several strlen()s * src/raptor_serialize_rss.c: cast * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Do not debug die when rdf:Seq node is a blank node. 2007-07-08 Dave Beckett * src/raptor_serialize_rdfxml.c: (raptor_rdfxml_serialize_start): Pass on the xml declaration feature to the xml writer. Fixes Issue #0000210 http://bugs.librdf.org/mantis/view.php?id=210 * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains html_link_processing to enable looking for with RDF/XML value. (raptor_grddl_parse_init_common): Enable html by default. (raptor_rdfa_parse_init): Disable html for RDFA parser. (raptor_grddl_parse_chunk): Check for html available as well as allowed by feature. 2007-07-05 Dave Beckett * docs/tmpl/section-feature.sgml, src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_HTML_LINK to control GRDDL looking for html 2007-07-04 Dave Beckett * src/raptor_grddl.c: (grddl_free_xml_context): Free the context itself. (raptor_grddl_parser_add_parent): Deleted, merged into raptor_grddl_new_child_parser. Delete html:link entry from table for now - handle rdf/xml links specially later. (raptor_grddl_copy_state): Added, pulled out of raptor_grddl_ensure_internal_parser (raptor_grddl_ensure_internal_parser): Call raptor_grddl_copy_state (raptor_grddl_new_child_parser): Added, from raptor_grddl_ensure_internal_parser and raptor_grddl_parser_add_parent to allocate a new parser rather than overwrite the 'internal_parser'. (raptor_grddl_fetch_uri): Set/reset the content type handler eachtime. (raptor_grddl_run_xpath_match): Free URI after calculating relative to base. (raptor_grddl_run_recursive): Gains filter arg, again. Use raptor_grddl_new_child_parser to make a new (GRDDL) raptor_parser* and free it here when done. (raptor_grddl_parse_chunk): Add new filter arg to raptor_grddl_run_recursive Look for with RDF expected, not an XSLT transform URI. * src/raptor_www_curl.c: (raptor_www_curl_header_callback): Handle multiple type headers appearing, overwriting - such as during an HTTP redirect. 2007-07-03 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_discard_message): Report discarded errors when debugging. (raptor_grddl_parse_chunk): Run XML then HTML parsing in sequence, discarding all errors here. Restore the error handlers afterwards. Move tidying up of buffers to function exit tidying. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Tidy output to say "HTML Parser" not "XML HTML Parser" 2007-07-02 Dave Beckett * src/raptor_grddl.c: style * src/raptor_grddl.c: match-table gains: looking for * utils/rapper.c: Remove const for print_graph * src/raptor_serialize_turtle.c: raptor_turtle_context gains rdf_nil_uri. Tidy some error messages to remove ()s (raptor_turtle_emit_subject_collection_items): At the object of an rdf:rest, if it's blank, check it exists and make it the new subject, otherwise check it's a URI called rdf:nil. (raptor_turtle_serialize_init, raptor_turtle_serialize_terminate): Init/free rdf:rest URI. Fixes Issue#0000207 http://bugs.librdf.org/mantis/view.php?id=207 * tests/Makefile.am, tests/ex-62.rdf: Added ex-62 for Issue#0000207 2007-06-23 Dave Beckett * src/snprintf.c: style, ANSI C and std headers * src/snprintf.c: Import Public Domain snprintf from mutt: http://dev.mutt.org/hg/mutt/file/55cd4cb611d9/snprintf.c Last Modified: Tue Aug 08 22:49:12 2006 +0000. 2007-06-20 Dave Beckett * raptor.rdf.in: Set Project URI Update syntaxes * src/raptor_grddl.c: Add XSLT security (raptor_init_parser_grddl_common): Deny reading, writing to files, creating directories or writing to network. (raptor_terminate_parser_grddl_common): Tidy up xslt security prefs. 2007-06-19 Dave Beckett * src/raptor.h: raptor_graph_handler without const uri * tests/Makefile.am: Add trig dir * docs/raptor-parsers.xml: Update GRDDL Add RDFa and TRiG * utils/rapper.1: Added --show-graphs * utils/rapper.c: Added --show-graphs option to print named graph URIs as seen * tests/trig, tests/trig/Makefile.am, tests/trig/example1.out, tests/trig/example1.trig, tests/trig/example2.out, tests/trig/example2.trig, tests/trig/example3.out, tests/trig/example3.trig: Added TRiG tests * configure.ac: Add trig parser support, enabled by default. * src/Makefile.am: Added RAPTOR_PARSER_TRIG sharing turtle parser code * src/raptor.h: Added raptor_graph_handler Added raptor_set_graph_handler * src/raptor_parse.c: (raptor_parsers_init): Call raptor_init_parser_trig. (raptor_set_graph_handler): Added to get graph name callbacks. (raptor_parser_set_graph_name): Added internal function. * src/turtle_common.h: struct raptor_turtle_parser_s gains trig flag. * src/raptor_internal.h: struct raptor_parser_s gains field graph_handler Added raptor_init_parser_trig and raptor_parser_set_graph_name prototypes. * src/turtle_parser.y: Add TRiG support. New tokens LEFT_CURLY, RIGHT_CURL, COLONMINUS ({, } and :-) New token graphName (colonMinusOpt): Added for TRiG's optional :- (graph): Added for TRiG graph name before { ... graph ... } (graphName): Added for TRiG (graphBody): Added for TRiG (triplesList): Added for TRiG (terminatedTriples): Added. (statement): uses graph, terminatedTriples (triples): Added, pulled out of statement (raptor_trig_parse_recognise_syntax): Recognise trig in url. (raptor_trig_parser_register_factory): Added for TRiG (raptor_init_parser_trig): Added for TRiG * src/turtle_lexer.l: Add { } and :- for TRiG 2007-06-12 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Hack locator URI so errors with XSLT are reported against that URI not the documents. * src/raptor_grddl.c: (raptor_grddl_fetch_uri): Fix accept header * src/raptor_grddl.c: Use /* for root element * src/raptor_grddl.c: XML @dataview:transformation are only on the root element. * src/raptor_grddl.c: (raptor_grddl_check_recursive_content_type_handler): Renamed from raptor_grddl_check_rdf_content_type_handler since it stores all content types now. Check for HTML content type and set html_base processing flag (raptor_grddl_run_recursive): Remove allow_rdf flag, always true. * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains xinclude_processing and html_base_processing flags. (raptor_grddl_parse_init_common): Initialise grddl, xinclude but not html base. (raptor_rdfa_parse_init): Disable grddl, xinclude and init html base. (raptor_grddl_run_xpath_match): If html_base_processing is enabled, switch XML doc type to XML_HTML for the xmlNodeGetBase() call and restore afterwards. (raptor_grddl_parse_chunk): Look for HTML or XHTML mime types to enable html_base_processing. Conditionalise XML Include processing with xinclude_processing flag. 2007-06-10 Dave Beckett * src/raptor_grddl.c: Debug message madness! (raptor_grddl_parse_chunk): After xinclude processing, reserialize the document DOM so it can be parsed later as RDF/XML if needed. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Recognise root rdf:RDF element and process as RDF/XML. Fix RDF/XML parsing of doc to not filter triples. * utils/rapper.c: If no base URI is given, do not set it * src/raptor_grddl.c: (raptor_grddl_run_recursive): Send to right parser. * tests/ex-61.nt, tests/ex-61.out (from /raptor/trunk/tests/ex-61.nt:12321): Rename ex-61.nt to ex-61.out * src/raptor_grddl.c: (raptor_grddl_parse_uri_write_bytes): Removed. (raptor_grddl_run_recursive): Use typedef raptor_parse_bytes_context with raptor_parse_uri_write_bytes as a handler for starting parse lazily * src/raptor_parse.c: Moved raptor_parse_bytes_context to raptor_internal.h (raptor_parse_uri_write_bytes): No longer static. * src/raptor_internal.h: Added raptor_parse_bytes_context Export raptor_parse_uri_write_bytes handler for use with GRDDL fetch. * src/raptor_parse.c: Added raptor_parse_bytes_context typedef (raptor_parse_uri_write_bytes): Use the above to look if this is the first time called, and if so, determine the base URI from the user's set base URI, the final URI from protocol, or otherwise, the resolved URI. This prevents calling raptor_start_parse() until the first byte is seen (and thus the base URI, protocol context is known) (raptor_parse_uri_with_connection): Explains the base URI rules in detail. Remove call to raptor_start_parse() and initialse the rpbc block. * src/raptor_www_curl.c: (raptor_www_curl_update_status): set final_uri and call final_uri_handler if set * src/raptor_www.c: (raptor_www_set_final_uri_handler): Added. * src/raptor.h: Added raptor_www_final_uri_handler typedef. Added raptor_www_set_final_uri_handler prototype. * src/raptor_internal.h: raptor_www gains final_uri_userdata and final_uri_handler; * src/raptor_internal.h: struct raptor_www_s gains a checked_status flag * src/raptor_www_curl.c: (raptor_www_curl_update_status): Added. (raptor_www_curl_write_callback): Call raptor_www_curl_update_status from here when first byte arrives, before any parsing. (raptor_www_curl_fetch): Move getting final URI earlier - above. * src/raptor_www_curl.c: typo * tests/Makefile.am, tests/ex-61.nt, tests/ex-61.rdf: Added ex-61 * src/raptor_www_curl.c: (raptor_www_curl_fetch): Save final URI * src/raptor_www.c: (raptor_www_get_final_uri): Added. * src/raptor.h: Added raptor_www_get_final_uri prototype * src/raptor_internal.h: struct raptor_www_s gains a final_uri field * src/raptor_sax2.c: (raptor_sax2_inscope_xml_language): Turn xml:lang="" into a NULL result. * src/raptor_grddl.c: (raptor_grddl_run_recursive): Zaps error handlers on recursive parse when ignore_errors set. * src/raptor_grddl.c: (raptor_grddl_fetch_uri): flags argument (was ignore_errors) can now send a different accept header. (raptor_grddl_run_grddl_transform_uri): Call raptor_grddl_fetch_uri and expect XSLT. (raptor_grddl_run_recursive): Call raptor_grddl_fetch_uri and ignore errors. * src/raptor_grddl.c: (raptor_grddl_discard_message): Added. (raptor_grddl_fetch_uri): Added ignore_errors argument to set the raptor_www error handler to raptor_grddl_discard_message (raptor_grddl_run_grddl_transform_uri): Do not discard errors from raptor_grddl_fetch_uri call. (raptor_grddl_run_recursive): Added ignore_errors argument and use it to return 0 with no warnings, when errors happen. (raptor_grddl_parse_chunk): Run namespace URI recursive grddl while discarding errors. Run head profile URIs recursive grddl while discarding errors. * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Pass in an xml context and use the base URI there rather than the parser's. (raptor_grddl_run_grddl_transform_uri): Pass on the xml context to the above. 2007-06-09 Dave Beckett * docs/tmpl/section-www.sgml: Added raptor_www_set_connection_timeout * docs/tmpl/section-feature.sgml: new feature @RAPTOR_FEATURE_MICROFORMATS * docs/raptor-sections.txt: Added raptor_www_set_connection_timeout * src/raptor_www_curl.c: (raptor_www_curl_init): Use www->connection_timeout. * src/raptor_www.c: (raptor_www_new_with_connection): Init connection timeout to 10s (raptor_www_set_connection_timeout): Added. * src/raptor.h: Add raptor_www_set_connection_timeout * src/raptor_internal.h: raptor_www gains connection_timeout * src/raptor_www_curl.c: (raptor_www_curl_init): Set a 10 second connection timeout. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): For HTTP error only, append str1 to the error. * src/raptor_grddl.c: Use XML base URI passed around with the grddl_xml_context. (raptor_new_xml_context): Renamed from raptor_sequence_push_xml_context, moving sequence push to main code. (raptor_rdfa_parse_init): Push URI for RDFa in raptor_grddl_parse_start. (raptor_grddl_parse_start): Add XML context for RDFa here. (raptor_grddl_add_transform_xml_context): Renamed from raptor_grddl_add_transform_uri (raptor_grddl_run_grddl_transform_doc): If there is no parser name guessable, return. (raptor_grddl_run_grddl_transform_uri): Take a grddl_xml_context* arg instead of raptor_uri. 2007-06-06 Dave Beckett * src/raptor_grddl.c: Added grddl_xml_context structure. Transform and profile URI raptor_sequences are now sequences of grddl_xml_context structures. (raptor_sequence_push_xml_context, grddl_free_xml_context): Added. (raptor_grddl_parse_init_common): No need for raptor_libxml_init_generic_error_handlers, raptor_new_sax2 does it. Initialise raptor_sequence with grddl_free_xml_context. (raptor_grddl_add_transform_uri): Use raptor_sequence_push_xml_context. (raptor_grddl_filter_triples): Use grddl_xml_context for profile_uri sequence. (raptor_grddl_run_xpath_match): Use grddl_xml_context for URI results. (raptor_grddl_parse_chunk): Use raptor_sequence_push_xml_context for former URI sequences. * src/raptor_libxml.c: (raptor_libxml_generic_error): Now external, not static. Call raptor_log_error_varargs direct, no mention of sax2, locator is from error_handlers. (raptor_libxml_init_generic_error_handlers): Removed. (raptor_libxml_xmlStructuredErrorFunc): Add err->str1 to message if it's given. * src/raptor_www_libxml.c: (raptor_www_libxml_http_error): Deleted, no longer needed. (raptor_www_libxml_init): Set xml generic error context, but save old one. (raptor_www_libxml_free): Restore old xml generic error context. * src/raptor_www.c: (raptor_www_new_with_connection): Init RAPTOR_ERROR_HANDLER_MAGIC (raptor_www_set_error_handler): Use error_handlers (raptor_www_error_varargs): Removed, merged into raptor_www_error (raptor_www_error): Call raptor_log_error_varargs here. * src/raptor_sax2.c: (raptor_new_sax2): Set xmlSetGenericErrorFunc here with the same context pointer as for structured errors. * src/raptor_parse.c: (raptor_new_parser): Init RAPTOR_ERROR_HANDLER_MAGIC * src/raptor_internal.h: removed raptor_libxml_init_generic_error_handlers prototype added raptor_libxml_generic_error prototype raptor_www gains old_xmlGenericErrorContext for libxml and error_handlers replacing older error_data, error_handle. removed raptor_www_error_varargs prototype * src/raptor_sax2.c: SAX2 error_handler fix for expat * tests/turtle/Makefile.am, tests/turtle/test-27.out, tests/turtle/test-27.ttl: Added turtle test test-27 for scope of @prefix 2007-06-04 Dave Beckett * src/raptor_grddl.c: Do an additional RDF/XML parse of content that is found to be RDF/XML by mime type during recursive GRDDL, and an additional parse of the top level content too, if also found. * src/raptor_parse.c: (raptor_parser_copy_user_state): Copy last feature too! * src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added RAPTOR_FEATURE_MICROFORMATS * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use feature RAPTOR_FEATURE_MICROFORMATS to dis/enable checking for hardcoded microformats * src/raptor_feature.c: C * src/raptor_feature.c: raptor_features_list gains RAPTOR_FEATURE_MICROFORMATS with name 'microformats' * src/raptor.h: Added RAPTOR_FEATURE_MICROFORMATS * src/raptor_grddl.c: Remove C++ comment * src/raptor_grddl.c: Added MATCH_LAST to stop searching for hardcoded sheets. Add hReview sheet that if matches, stops looking for later microformats such as hCard. (raptor_grddl_parse_chunk): Use MATCH_LAST to stop looking for later hardcoded matches. (raptor_init_parser_grddl_common, raptor_terminate_parser_grddl_common): Added, called once for grddl or rdfa available. * src/raptor_parse.c: (raptor_parsers_init): Call raptor_init_parser_grddl_common for GRDDL or RDFA parsers. (raptor_parsers_finish): Call raptor_terminate_parser_grddl_common for GRDDL or RDFA parsers. * src/raptor_internal.h: Add prototypes for raptor_init_parser_grddl_common and raptor_terminate_parser_grddl_common * src/raptor_grddl.c: (raptor_grddl_add_transform_uri): Added, to add a transformation URI (XSLT) for a document, removing duplicate URIs. (raptor_grddl_filter_triples, raptor_grddl_parse_chunk): Use raptor_grddl_add_transform_uri. 2007-06-03 Dave Beckett * configure.ac, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Add RDFa parser 2007-05-27 Dave Beckett * src/raptor_serialize.c: (raptor_serializer_register_factory): Fix debug call with RAPTOR_DEBUG>1 Fixes Issue#0000195 http://bugs.librdf.org/mantis/view.php?id=195 2007-05-26 Dave Beckett * src/raptor_uri.c: (raptor_uri_filename_to_uri_string): Make path_max bigger *2, not smaller /4. Fixes Issue#0000192 http://bugs.librdf.org/mantis/view.php?id=192 * src/n3_parser.y: (n3_parser_error): Invoke raptor_parser_simple_error with a format string and arg. * src/turtle_parser.y: (turtle_parser_error): Invoke raptor_parser_simple_error with a format string and arg. * src/raptor.h: Allow _declspec and __declspec Fixes Issue#0000188 http://bugs.librdf.org/mantis/view.php?id=188 2007-05-23 Dave Beckett * docs/tmpl/section-feature.sgml: Add RAPTOR_FEATURE_HTML_TAG_SOUP 2007-05-21 Dave Beckett * configure.ac: Check for libxml/nanohttp.h only once the xml-config include paths have been setup. * configure.ac: Add -Wformat-security 2007-05-14 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Use HTML_PARSE_RECOVER if available * src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added parser feature RAPTOR_FEATURE_HTML_TAG_SOUP aka htmlTagSoup for use by GRDDL parser * src/raptor_libxml.c: debug bogus pointers not fail temporarily * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Move buffer editing to raptor_guess_parser_name. * src/raptor_parse.c: (raptor_guess_parser_name): Only run recognise_syntax with first N bytes of content * src/raptor_grddl.c: debugmsg * src/raptor_grddl.c: Use HTML parser when XML parser fails, to create a DOM for GRDDLing from invalid/not-WF HTML content. raptor_grddl_parser_context_s gains htmlParserCtxt as well as xmlParserCtxt and process_this_as_rdfxml GRDDL flag to know when to parse the content twice. (raptor_grddl_parse_terminate): Tidy htmlParserCtxt. Add MATCH_IS_HARDCODED to match_table just to make it clear. (match_table): Re-enable hcalendar and hcard as hardcoded XSLTs (raptor_grddl_run_xpath_match): Handle non-namespace elements. Handle MATCH_IS_HARDCODED and return on first match. (raptor_grddl_parse_chunk): Major change in structure - all content passed in is saved until is_end=1, then parsed with XML parser and if that fails, HTML parser. HTML parser is run with no errors or warnings. 2007-05-11 Dave Beckett * src/turtle_parser.y: (raptor_turtle_parse_recognise_syntax): Look for turtle @prefix and rdf namespace use in buffer. * src/n3_lexer.l: Add rule to allow a comment on the last line, without a final newline * src/turtle_lexer.l: Add rule to allow a comment on the last line, without a final newline * tests/turtle/Makefile.am, tests/turtle/test-26.out, tests/turtle/test-26.ttl: Add test-26 2007-05-10 Dave Beckett * src/raptor_rdfxml.c: 's 2007-05-09 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Recognize rdf entities as namespaces. Add bonus points for using the words rdf and rdf 2007-05-08 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_parse_recognise_syntax): Only use first 512 bytes of content for hunting for namespaces. 2007-04-26 Dave Beckett * src/raptor_internal.h: struct raptor_www_s loses useless old_handler field for www_libxml * src/raptor_www_libxml.c: (raptor_www_libxml_init, raptor_www_libxml_free): Set, reset generic error func. * src/raptor_internal.h: Fix raptor_parse_date prototype * src/raptor_libxml.c: (raptor_libxml_init_generic_error_handlers): Use xmlSetGenericErrorFunc * src/parsedate.y: ANSI C function prototypes. * src/parsedate.y: Prototype for raptor_parse_date 2007-04-24 Dave Beckett * src/raptor_general.c: raptor_log_level_labels make it the right size * src/raptor_grddl.c, src/raptor_parse.c, src/raptor_sax2.c: Update for error_handlers arrays. * src/raptor_libxml.c: (raptor_libxml_warning): Update for error_handlers arrays. Also do not send an error to the warning handlers. (raptor_libxml_error_common, raptor_libxml_validation_warning): Update for error_handlers arrays. (raptor_libxml_xmlStructuredErrorFunc): Add xpath to the error message when the domain is XML_FROM_XPATH. Ignore error_handlers if the pointer is bogus. Use the arrays. If error_handler is NULL, ignore it. * src/raptor_general.c: (raptor_error_handlers_init): Init error handler array fields and magic field. * src/raptor_internal.h: raptor_error_handlers now contains arrays of user_data and handlers and a magic field to check that an error_handler pointer is valid. 2007-04-22 Dave Beckett * autogen.sh: Update autogen.sh 2007-04-14 Dave Beckett * src/raptor_serialize_turtle.c: (raptor_turtle_emit_literal, raptor_turtle_emit_xml_literal): Send namespace stack to raptor_turtle_writer_literal * src/raptor_turtle_writer.c: (raptor_turtle_writer_literal): Add nspace field and use it to look up if a qname can be used for a datatype URI. * src/raptor_internal.h: raptor_turtle_writer_literal gains nspace field * src/raptor_parse.c: (raptor_guess_parser_name): Make suffix decoding work again 2007-04-10 Dave Beckett * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): One more addition in the neverending guesswork that is rss tag soup. This time for sites that have feed in the DNS name, or just somewhere in the URL. * src/raptor_parse.c: (raptor_guess_parser_name): Discard suffixes that are not '\.[a-zA-Z0-9]+$' 2007-03-27 Dave Beckett * configure.ac: Check for curl header after inserting any cflags from curl-config. This lets the curl test work when curl the includes are not in the usual places 2007-03-26 Dave Beckett * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.16 * Snapshotted raptor_1_4_15 for 1.4.15 release (SVN r12027) * src/raptor_grddl.c: (raptor_grddl_parser_register_factory): Register XHTML mime type higher, very unlikely another parser is dealing with this. * src/raptor_rss.c: (raptor_rss_parse_recognise_syntax): Make mime type heuristics ignore anything with html in it so XHTML mime type is ignored. 2007-03-25 Dave Beckett * src/raptor_internal.h: raptor_uri_detail_s gains is_hierarchical flag. * src/raptor_rfc2396.c: (raptor_new_uri_detail): Set is_hierarchical flag. (raptor_uri_resolve_uri_reference): Handle a non-hierarchical base URI. Fixes Issue#0000177 http://bugs.librdf.org/mantis/view.php?id=177 (main): Fix above changes an earlier test: From: resolve("foo:", "not_scheme:blah") => "foo:/not_scheme:blah" To: resolve("foo:", "not_scheme:blah") => "foo:not_scheme:blah" * src/raptor_rfc2396.c: (main): Add test to confirm report from Issue#000177 http://bugs.librdf.org/mantis/view.php?id=177 * utils/rapper.c: Print all informational and help messages to stderr. Only results of parsing and the help (-h/--help) message goes to stdout now. 2007-03-22 Dave Beckett * src/raptor_xml_writer.c, src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_parse.c: Casts for C++ * examples/grapper.c: Use library variables for license, home page * examples/grapper.c: Casts and C99 fixes * src/raptor_rss.h: Fix CONTENT_NAMESPACE_URI to correct URI 2007-03-19 Dave Beckett * utils/rapper.c: NULL base URI * tests/Makefile.am: Set rapper output baseuri to NULL via '-' * utils/rapper.1, utils/rapper.c: Allow base uri '-' for no output base URI * src/raptor_www.c: (raptor_www_fetch): If a request returns a status code that is not success, generate an error message. * src/raptor_www_curl.c: (raptor_www_curl_fetch): Enhance failure error message 2007-03-15 Dave Beckett * src/raptor_serialize_rss.c: Adjust the xml:base attribute adding to put it next to the raptor_xml_writer_start_element of the root element. * src/raptor_serialize_rdfxmla.c: raptor_rdfxmla_serializer_context gains xml_nspace field. (raptor_rdfxmla_serialize_init, raptor_rdfxmla_serialize_terminate): Init/free xml namespace. (raptor_rdfxmla_ensure_writen_header): Write xml:base when a base URI is given. Addresses Issue #0000174 http://bugs.librdf.org/mantis/view.php?id=174 * src/raptor_serialize_rdfxml.c: raptor_rdfxml_serializer_context gains xml_nspace field. (raptor_rdfxml_serialize_init, raptor_rdfxml_serialize_terminate): Init/free xml namespace. (raptor_rdfxml_ensure_writen_header): Write xml:base when a base URI is given. Addresses Issue #0000174 http://bugs.librdf.org/mantis/view.php?id=174 2007-03-12 Dave Beckett * src/raptor_rss.c, src/raptor_serialize_rss.c: Replace shared nspaces list with one per rss-parser/serializer. * src/raptor_rss.h: raptor_rss_namespace_info looses nspace field. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): In removing ./ do not go past end of buffer. 2007-03-11 Dave Beckett * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains content_type, content_type_check and stringbuffer for saved rdf/xml content. (raptor_grddl_parse_terminate): Free any saved content type or stringbuffer. (raptor_grddl_parse_start): Init type check. (raptor_grddl_libxml_discard_error): Restore, for discarding validation errors again. (raptor_grddl_parse_chunk): If content type was seen and type was application/rdf+xml, save content for later parsing as RDF/XML. Discard validation errors again. (raptor_grddl_parse_content_type_handler): Save content type header when passed in. (raptor_grddl_parser_register_factory): Register raptor_grddl_parse_content_type_handler. * src/raptor_parse.c: (raptor_guess_parser_name): Add any mime type q <10 to the score, don't lose it entirely. 2007-03-02 Dave Beckett * src/raptor_grddl.c: Alter match_table to look for substrings inside html:link@rel and html:a@rel Delete old hard-coded transforms for dc: never worked and embedded RDF: grddl profile support handles this now. * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_doc): Invoke xsltSetGenericErrorFunc here to get the right rdf_parser configured. * src/raptor_grddl.c: Handles GRDDL W3C Working Draft 2 March 2007 * src/raptor_grddl.c: (raptor_grddl_libxml_discard_error): Deleted. (raptor_grddl_parse_chunk): No longer ignore validation errors http://lists.w3.org/Archives/Public/public-grddl-comments/2007JanMar/0062.html 2007-02-15 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Return a warning and do not fail if XSLT sheet is not found (raptor_grddl_run_recursive): Return a warning and do not fail if the recursive GRDDL doc is not found. (raptor_grddl_parse_chunk): Tidy other errors. Add aborting on XInclude failure. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Do not get/set content when there was no internal parser. * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Unset user_data/statement_handler if filter is not used so that re-using the same parser with different filter now works. (raptor_grddl_fetch_uri): Add content_type_handler and content_type_user_data args and use them to call raptor_www_set_content_type_handler if not NULL. (raptor_grddl_run_grddl_transform_uri): Update raptor_grddl_fetch_uri call (raptor_grddl_check_rdf_content_type_handler): Handler to look for RDF MIME Type and trigger content saving if so. (raptor_grddl_run_recursive): Add allow_rdf argument to allow RDF/XML content to be processed if the type is right. (raptor_grddl_parse_chunk): For a namespace URI, run recursive and allow RDF/XML. If it was seen on return, create a new "rdfxml" parser and run it. Reorder setting the root_ns_uri profile earlier so that it can be recognised as a transform in RDF/XML namespace documents. * src/raptor_parse.c: (raptor_parse_chunk): If the stringbuffer is declared, save a copy of the bytes that pass by. (raptor_parser_save_content, raptor_parser_get_content): Added to trigger/reset saving content and to get the content back as a new string. * src/raptor_internal.h: raptor_parser gains a stringbuffer Added prototypes for raptor_parser_save_content and raptor_parser_get_content 2007-02-12 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_parse_init): Update raptor_new_sax2 call. Delete raptor_sax2_set_locator. * src/raptor_rss.c: (raptor_rss_parse_init): Update raptor_new_sax2 call. Delete raptor_sax2_set_locator. * src/raptor_rdfxml.c: (raptor_rdfxml_parse_init): Update raptor_new_sax2 call. Delete raptor_sax2_set_locator. * src/raptor_www.c: (raptor_www_error_varargs): Call raptor_log_error_varargs. * src/raptor_parse.c: (raptor_new_parser): Set locator and handlers/data in the error_handlers. (raptor_parser_fatal_error): Call raptor_log_error_varargs (raptor_parser_fatal_error_varargs): Removed. (raptor_parser_fatal_error_message_handler): call raptor_log_error. (raptor_parser_simple_error, raptor_parser_error_varargs, raptor_parser_warning): Call raptor_log_error_varargs. (raptor_parser_error_message_handler, raptor_parser_warning_message_handler): Call raptor_log_error. (raptor_set_fatal_error_handler, raptor_set_error_handler, raptor_set_warning_handler): Update for error_handlers (raptor_parser_copy_user_state): Copy raptor_error_handlers block. * src/raptor_sax2.c: (raptor_new_sax2): Just have error_handlers arg. Use xmlSetStructuredErrorFunc for better libxml errors (raptor_sax2_set_locator): Removed, not needed. (raptor_sax2_simple_error): Call raptor_log_error_varargs. (raptor_sax2_parse_start): Call xmlSetStructuredErrorFunc (raptor_sax2_parse_chunk): Call raptor_log_error_simple instead of directly calling the error handler. * src/raptor_libxml.c: (raptor_libxml_call_handler): Removed. (raptor_libxml_warning, raptor_libxml_error_common, raptor_libxml_validation_warning): Use raptor_log_error_varargs. (raptor_libxml_xmlStructuredErrorFunc): Use locator from the error_handlers. Call raptor_log_error. * src/raptor_general.c: (raptor_invoke_simple_message_varargs, raptor_invoke_message_varargs): Removed internal function. Added raptor_log_level_labels list. (raptor_log_error_simple, raptor_log_error_varargs, raptor_log_error): Added for new logging. (raptor_error_handlers_init): Added to init new structure * src/raptor_internal.h: Added raptor_error_handlers structure and remove the pointers from raptor_parser, raptor_sax2. Added raptor_log_level enum Removed raptor_invoke_message_varargs, raptor_invoke_simple_message_varargs Added raptor_error_handlers_init, void raptor_log_error_simple, void raptor_log_error_varargs, void raptor_log_error raptor_new_sax2 now just takes a raptor_error_handler* param Removed raptor_sax2_set_locator * utils/rapper.c: help text for -t/--trace 2007-02-11 Dave Beckett * src/raptor_libxml.c: #if LIBXML_VERSION >= not > * utils/rapper.1: Added -t/--trace option to show URIs traversed. * utils/rapper.c: Added -t/--trace option to show URIs traversed. (rapper_uri_trace): Added. (main): If tracing, register rapper_uri_trace as a URI filter function with raptor_parser_set_uri to see URis retrieved. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Call xmlSetStructuredErrorFunc to make most errors be printed much nicer. * src/raptor_internal.h: Added raptor_libxml_xmlStructuredErrorFunc prototype. * src/raptor_libxml.c: (raptor_libxml_xmlStructuredErrorFunc): Added for sending libxml structured error messages back to a parser. 2007-02-10 Dave Beckett * src/raptor_grddl.c: Add XInclude headers (raptor_grddl_filter_triples): Renamed from raptor_grddl_relay_triples (raptor_grddl_filter_triples): Do not pass on triples, just look for transformation triples. (raptor_grddl_ensure_internal_parser): Add filter arg and if set for profile and namespace parsings, send triples via raptor_grddl_filter_triples. (raptor_grddl_run_grddl_transform_doc): Call raptor_grddl_ensure_internal_parser with no filtering when have got the resulting string and want to do a specific parse, not a recursive GRDDL. (raptor_grddl_run_recursive): Call raptor_grddl_ensure_internal_parser filtering when doing a recursive GRDDL - this is namespace or profile recursion. (raptor_grddl_parse_chunk): Run XML include processing. Do not try to call NULL profile URIs. Fix transformation loop to call all transformations, not just first. * src/raptor_grddl.c: (raptor_grddl_libxml_discard_error): Added to throw away libxml errors. (raptor_grddl_parse_chunk): Use raptor_grddl_libxml_discard_error to dicard XML validation errors since it seems the GRDDL spec doesn't care. * src/turtle_parser.y: (raptor_turtle_parse_recognise_syntax): Recognise n3 in mime type when N3 parser is not around. (raptor_turtle_parser_register_factory): Register low interest in text/rdf+n3 when N3 parser is not around. 2007-02-06 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Tidy up doc and xpath context on errors or success so that it is initialised next time for new documents. * src/raptor_grddl.c: (raptor_grddl_parser_add_parent): Do not set parent twice 2007-01-31 Dave Beckett * configure.ac, src/win32_raptor_config.h: Bumped version to 1.4.15 * Snapshotted raptor_1_4_14 for 1.4.14 release (SVN r11863) 2007-01-28 Dave Beckett * src/raptor_grddl.c: (raptor_libxslt_error_common): Added. (raptor_grddl_xsltGenericError_handler): Added. (raptor_grddl_parse_init): Register raptor_grddl_xsltGenericError_handler to handle XSLT generic errors. (raptor_grddl_run_grddl_transform_doc): Set 'base' and 'Base' XSLT parameters to allow some XSLT sheets to work - pragmatism. * src/raptor_grddl.c: struct raptor_grddl_parser_context_s gains rdf_parser field. Add lots more debugging messages (raptor_grddl_parse_init): Init rdf_parser field. (raptor_grddl_parser_add_parent): Relay all triples to the parent grddl parser. (raptor_grddl_ensure_internal_parser): Lose relay flag - always relay. (raptor_grddl_parse_chunk): Copy root_ns_uri if not NULL. When processing head profile URIs, strip out the GRDDL profile URI before adding them to the grddl_parser->profile_uris sequence. 2007-01-27 Dave Beckett * configure.ac: Add AC_CHECK_FUNC(xsltInit) * src/raptor_grddl.c: (raptor_init_parser_grddl): Check for xsltInit * src/raptor_parse.c: (raptor_parsers_finish): Call raptor_terminate_parser_grddl when enabled. * src/raptor_internal.h: Added raptor_terminate_parser_grddl prototype * src/raptor_grddl.c: Add XML schema namespace to ignored namespace list. (raptor_grddl_parse_chunk): Copy root namespace URI when adding to a list. (raptor_terminate_parser_grddl): Added, to free up shared resources. * docs/libraptor.3: 1.4.14 * src/raptor_parse.c: autodocs * src/raptor_internal.h: Move raptor_turtle_writer to raptor_internal.h for now. * src/raptor.h: Move raptor_turtle_writer to raptor_internal.h for now. 2007-01-26 Dave Beckett * src/n3_parser.y, src/ntriples_parse.c, src/raptor_general.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Rename raptor_generate_id to raptor_parser_internal_generate_id with altered calling convention - pass in ID type * src/raptor.h: Adedd prototype for raptor_parser_generate_id * src/raptor_internal.h: raptor_parser_internal_generate_id renamed from raptor_generate_id. * src/raptor_parse.c: (raptor_parser_generate_id): Added as a public function, modified from previously internal raptor_generate_id(). (raptor_parser_internal_generate_id): Renamed from raptor_generate_id. 2007-01-16 Dave Beckett * utils/rapper.c: Add a another raptor_finish() before exit 2007-01-14 Dave Beckett * src/raptor_grddl.c: struct raptor_grddl_parser_context_s loses xpathObj (raptor_grddl_parse_terminate): Remove xpathObj tidy. Remove profile URIs from 'match_table' list of xpaths - now invoked on it's own. (raptor_grddl_relay_triples): Add relay triples debugging. Fix loop to properly walk through profile URIs (raptor_grddl_run_xpath_match): Added to invoke a match to an xpath returning a list of URIs as raptor_sequence. Code removed from raptor_grddl_parse_chunk. (raptor_grddl_run_recursive): Added to invoke a recursive GRDDL on a URI, sending triples back to the current parser. Code removed from raptor_grddl_parse_chunk. (raptor_grddl_parse_chunk): Use raptor_grddl_run_recursive to do most of the work. Invoke the early on before running general XPath matches. Use raptor_grddl_run_xpath_match to run general XPath matches. * utils/rapper.c: Use raptor_home_url_string and raptor_license_string in short and long usage messages. * src/raptor.h: Added raptor_home_url_string (replacing raptor_url) * src/raptor_general.c: raptor_home_url_string * src/raptor.h: Added raptor_url * src/raptor.h: Added raptor_license_string * src/raptor_general.c: 2007 and add raptor_license_string 2007-01-07 Dave Beckett * src/raptor_abbrev.c: (raptor_new_abbrev_node): Initialise with ref_count 1 (raptor_abbrev_node_lookup): Do not add ref_count here * tests/turtle/Makefile.am: (check-turtle-serialize): rdfdiff with a local file, not one in $(srcdir) * utils/rdfdiff.c: Apply the base URI to the to-file, if given. Otherwise use the from_file's URI. * tests/turtle/Makefile.am: (check-turtle-serialize): Add base URIs for the rdf-schema.ttl and rdfs-namespace.ttl * tests/turtle/Makefile.am: (check-turtle-serialize): Ensure it dies when a failure happens * tests/turtle/Makefile.am: (check-turtle-serialize): Call rdfdiff with -u to set base URI for input turtle. This allows test-00.ttl to produce the same absolute URIs each time and for round-trip serializing to work. * utils/rdfdiff.c: Added -u/--base-uri option to specify the from file base URI so that if the from file is a local file or relative URI, it can be given an absolute base. * tests/turtle/Makefile.am: (check-turtle-serialize): output serialization results to .ttl files * tests/turtle/Makefile.am: Add check-turtle-serialize to check-local 2007-01-05 Dave Beckett * src/raptor-config.1: Document --private-libs and explain what it is under --libs too. * src/raptor-config.in: Add --private-libs and move private @LIBS to that from --libs * raptor.pc.in: Use Libs.private for internal dynamically linked libraries raptor2-2.0.15/librdfa/0000755000175000017500000000000012425347071011601 500000000000000raptor2-2.0.15/librdfa/strtok_r.h0000644000175000017500000000060111772435245013543 00000000000000/* This file is in the public domain */ #ifndef HAVE_STRTOK_R # define NEED_RDFA_STRTOK_R #endif #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400 # define strtok_r(s,d,p) strtok_s(s,d,p) # undef NEED_RDFA_STRTOK_R #endif #ifdef NEED_RDFA_STRTOK_R char *rdfa_strtok_r(char *str, const char *delim, char **saveptr); # define strtok_r(s,d,p) rdfa_strtok_r(s,d,p) #endif raptor2-2.0.15/librdfa/rdfa.c0000644000175000017500000014330612415536211012603 00000000000000/** * Copyright 2008-2011 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The librdfa library is the Fastest RDFa Parser in the Universe. It is * a stream parser, meaning that it takes an XML data as input and spits * out RDF triples as it comes across them in the stream. Due to this * processing approach, librdfa has a very, very small memory footprint. * It is also very fast and can operate on hundreds of gigabytes of XML * data without breaking a sweat. * * Usage: * * rdfacontext* context = rdfa_create_context(BASE_URI); * context->callback_data = your_user_data; * rdfa_set_default_graph_triple_handler(context, &default_graph_triple); * rdfa_set_processor_graph_triple_handler(context, &processor_graph_triple); * rdfa_set_buffer_filler(context, &fill_buffer); * rdfa_parse(context); * rdfa_free_context(context); * * @author Manu Sporny */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #ifdef HAVE_STRINGS_H # include #endif #include #include #include "rdfa_utils.h" #include "rdfa.h" #include "strtok_r.h" #define READ_BUFFER_SIZE 4096 #define RDFA_DOCTYPE_STRING_LENGTH 103 /** * Read the head of the XHTML document and determines the base IRI for * the document. * * @param context the current working context. * @param working_buffer the current working buffer. * @param wb_allocated the number of bytes that have been allocated to * the working buffer. * * @return the size of the data available in the working buffer. */ static size_t rdfa_init_base( rdfacontext* context, char** working_buffer, size_t* working_buffer_size, char* temp_buffer, size_t bytes_read) { char* head_end = NULL; size_t offset = context->wb_position; size_t needed_size = 0; if((offset + bytes_read) > *working_buffer_size) { needed_size = (offset + bytes_read) - *working_buffer_size; } /* search for the end of , stop if was found */ /* extend the working buffer size */ if(needed_size > 0) { size_t temp_buffer_size = sizeof(char) * READ_BUFFER_SIZE; if((size_t)needed_size > temp_buffer_size) temp_buffer_size += needed_size; *working_buffer_size += temp_buffer_size; /* +1 for NUL at end, to allow strstr() etc. to work */ *working_buffer = (char*)realloc(*working_buffer, *working_buffer_size + 1); } /* append to the working buffer */ memmove(*working_buffer + offset, temp_buffer, bytes_read); /* ensure the buffer is a NUL-terminated string */ *(*working_buffer + offset + bytes_read) = '\0'; /* Sniff the beginning of the document for any document information */ if(strstr(*working_buffer, "-//W3C//DTD XHTML+RDFa 1.0//EN") != NULL) { context->host_language = HOST_LANGUAGE_XHTML1; context->rdfa_version = RDFA_VERSION_1_0; } else if(strstr(*working_buffer, "-//W3C//DTD XHTML+RDFa 1.1//EN") != NULL) { context->host_language = HOST_LANGUAGE_XHTML1; context->rdfa_version = RDFA_VERSION_1_1; } else if(strstr(*working_buffer, "host_language = HOST_LANGUAGE_HTML; context->rdfa_version = RDFA_VERSION_1_1; } else { context->host_language = HOST_LANGUAGE_XML1; context->rdfa_version = RDFA_VERSION_1_1; } #ifdef LIBRDFA_IN_RAPTOR if(context->raptor_rdfa_version == 10) { context->host_language = HOST_LANGUAGE_XHTML1; context->rdfa_version = RDFA_VERSION_1_0; } else if(context->raptor_rdfa_version == 11) context->rdfa_version = RDFA_VERSION_1_1; #endif /* search for the end of in */ head_end = strstr(*working_buffer, ""); if(head_end == NULL) head_end = strstr(*working_buffer, ""); context->wb_position += bytes_read; if(head_end == NULL) return bytes_read; /* if was found, search for xml_literal == NULL) { context->xml_literal = rdfa_replace_string(context->xml_literal, "<"); context->xml_literal_size = 1; } else { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "<", 1); } context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, name, strlen(name)); if(!context->xml_literal_namespaces_defined) { /* append namespaces to XML Literal */ #ifdef LIBRDFA_IN_RAPTOR raptor_namespace_stack* nstack = &context->sax2->namespaces; raptor_namespace* ns; raptor_namespace** ns_list = NULL; size_t ns_size; #else void** umap = context->uri_mappings; #endif const char* umap_key = NULL; void* umap_value = NULL; /* if the namespaces are not defined, then neither is the xml:lang */ context->xml_literal_xml_lang_defined = 0; #ifdef LIBRDFA_IN_RAPTOR ns_size = 0; ns_list = raptor_namespace_stack_to_array(nstack, &ns_size); qsort((void*)ns_list, ns_size, sizeof(raptor_namespace*), raptor_nspace_compare); while(ns_size > 0) #else while(*umap != NULL) #endif { unsigned char insert_xmlns_definition = 1; const char* attr = NULL; /* get the next mapping to process */ #ifdef LIBRDFA_IN_RAPTOR ns=ns_list[--ns_size]; umap_key = (const char*)raptor_namespace_get_prefix(ns); if(!umap_key) umap_key=(const char*)XMLNS_DEFAULT_MAPPING; umap_value = (char*)raptor_uri_as_string(raptor_namespace_get_uri(ns)); #else rdfa_next_mapping(umap++, &umap_key, &umap_value); umap++; #endif /* check to make sure that the namespace isn't already * defined in the current element. */ if(attributes != NULL) { const char** attrs = attributes; while((*attrs != NULL) && insert_xmlns_definition) { attr = *attrs++; /* if the attribute is a umap_key, skip the definition * of the attribute. */ if(strcmp(attr, umap_key) == 0) { insert_xmlns_definition = 0; } } } /* if the namespace isn't already defined on the element, * copy it to the XML Literal string. */ if(insert_xmlns_definition) { /* append the namespace attribute to the XML Literal */ context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, " xmlns", strlen(" xmlns")); /* check to see if we're dumping the standard XHTML namespace or * a user-defined XML namespace */ if(strcmp(umap_key, XMLNS_DEFAULT_MAPPING) != 0) { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, ":", 1); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, umap_key, strlen(umap_key)); } /* append the namespace value */ context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "=\"", 2); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, (const char*)umap_value, strlen((char*)umap_value)); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "\"", 1); } } /* end while umap not NULL */ context->xml_literal_namespaces_defined = 1; #ifdef LIBRDFA_IN_RAPTOR if(ns_list) raptor_free_memory(ns_list); #endif } /* end if namespaces inserted */ #ifdef LIBRDFA_IN_RAPTOR /* Raptor namespace code does this already */ #else /* 3. For backward compatibility, RDFa Processors should also permit the * definition of mappings via @xmlns. In this case, the value to be mapped * is set by the XML namespace prefix, and the value to map is the value of * the attribute - an IRI. (Note that prefix mapping via @xmlns is * deprecated, and may be removed in a future version of this * specification.) When xmlns is supported, such mappings must be processed * before processing any mappings from @prefix on the same element. */ if(namespaces != NULL) { int ni; for(ni = 0; ni < nb_namespaces * 2; ni += 2) { const char* ns = namespaces[ni]; const char* value = namespaces[ni + 1]; /* Regardless of how the mapping is declared, the value to be mapped * must be converted to lower case, and the IRI is not processed in * any way; in particular if it is a relative path it must not be * resolved against the current base. */ char* lcns = NULL; if(ns != NULL) { /* convert the namespace string to lowercase */ unsigned int i; size_t ns_length = strlen(ns); lcns = (char*)malloc(ns_length + 1); for(i = 0; i <= ns_length; i++) { lcns[i] = tolower(ns[i]); } } /* update the URI mappings */ rdfa_update_uri_mappings(context, lcns, value); if(lcns != NULL) { free(lcns); } } } #endif /* detect the RDFa version of the document, if specified */ if(attributes != NULL) { int ci; /* search for a version attribute */ for(ci = 0; ci < nb_attributes * 5; ci += 5) { const char* attr; char* value; size_t value_length = 0; attr = attributes[ci]; value_length = attributes[ci + 4] - attributes[ci + 3] + 1; if(strcmp(attr, "version") == 0) { /* append the attribute-value pair to the XML literal */ value = (char*)malloc(value_length + 1); snprintf(value, value_length, "%s", attributes[ci + 3]); if(strstr(value, "RDFa 1.0") != NULL) { context->rdfa_version = RDFA_VERSION_1_0; } else if(strstr(value, "RDFa 1.1") != NULL) { context->rdfa_version = RDFA_VERSION_1_1; } free(value); } } } #ifdef LIBRDFA_IN_RAPTOR if(context->sax2) { /* Raptor handles xml:lang itself but not 'lang' */ xml_lang = (char*)raptor_sax2_inscope_xml_language(context->sax2); xml_lang = rdfa_replace_string(NULL, xml_lang); } #endif /* prepare all of the RDFa-specific attributes we are looking for. * scan all of the attributes for the RDFa-specific attributes */ if(attributes != NULL) { int ci; if(context->rdfa_version == RDFA_VERSION_1_1) { /* process all vocab and prefix attributes */ for(ci = 0; ci < nb_attributes * 5; ci += 5) { const char* attr; char* value; size_t value_length = 0; attr = attributes[ci]; value_length = attributes[ci + 4] - attributes[ci + 3] + 1; /* append the attribute-value pair to the XML literal */ value = (char*)malloc(value_length + 1); snprintf(value, value_length, "%s", attributes[ci + 3]); /* 2. Next the current element is examined for any change to the * default vocabulary via @vocab. */ if(strcmp(attr, "vocab") == 0) { if(strlen(value) < 1) { /* If the value is empty, then the local default vocabulary * must be reset to the Host Language defined default * (if any). */ free(context->default_vocabulary); context->default_vocabulary = NULL; } else { char* resolved_uri; rdftriple* triple; /* If @vocab is present and contains a value, the local * default vocabulary is updated according to the * section on CURIE and IRI Processing. */ resolved_uri = rdfa_resolve_uri(context, value); context->default_vocabulary = rdfa_replace_string( context->default_vocabulary, resolved_uri); /* The value of @vocab is used to generate a triple */ triple = rdfa_create_triple( context->base, "http://www.w3.org/ns/rdfa#usesVocabulary", resolved_uri, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback( triple, context->callback_data); free(resolved_uri); } } else if(strcmp(attr, "prefix") == 0) { /* Mappings are defined via @prefix. */ char* working_string = NULL; char* atprefix = NULL; char* iri = NULL; char* saveptr = NULL; working_string = rdfa_replace_string(working_string, value); /* Values in this attribute are evaluated from beginning to * end (e.g., left to right in typical documents). */ atprefix = strtok_r(working_string, ":", &saveptr); while(atprefix != NULL) { /* find the prefix and IRI mappings while skipping whitespace */ while((*saveptr == ' ' || *saveptr == '\n' || *saveptr == '\r' || *saveptr == '\t' || *saveptr == '\f' || *saveptr == '\v') && *saveptr != '\0') { saveptr++; } iri = strtok_r(NULL, RDFA_WHITESPACE, &saveptr); /* update the prefix mappings */ rdfa_update_uri_mappings(context, atprefix, iri); if(!saveptr) break; while((*saveptr == ' ' || *saveptr == '\n' || *saveptr == '\r' || *saveptr == '\t' || *saveptr == '\f' || *saveptr == '\v') && *saveptr != '\0') { saveptr++; } /* get the next prefix to process */ atprefix = strtok_r(NULL, ":", &saveptr); } free(working_string); } else if(strcmp(attr, "inlist") == 0) { context->inlist_present = 1; } free(value); } } /* resolve all of the other RDFa values */ for(ci = 0; ci < nb_attributes * 5; ci += 5) { const char* attr; char* value; char* attrns; char* literal_text; size_t value_length = 0; attr = attributes[ci]; attrns = (char*)attributes[ci + 1]; value_length = attributes[ci + 4] - attributes[ci + 3] + 1; /* append the attribute-value pair to the XML literal */ value = (char*)malloc(value_length + 1); literal_text = (char*)malloc(strlen(attr) + value_length + 5); snprintf(value, value_length, "%s", attributes[ci + 3]); sprintf(literal_text, " %s=\"%s\"", attr, value); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, literal_text, strlen(literal_text)); free(literal_text); /* if xml:lang is defined, ensure that it is not overwritten */ if(attrns != NULL && strcmp(attrns, "xml") == 0 && strcmp(attr, "lang") == 0) { context->xml_literal_xml_lang_defined = 1; } /* process all of the RDFa attributes */ if(strcmp(attr, "about") == 0) { about_curie = value; about = rdfa_resolve_curie( context, about_curie, CURIE_PARSE_ABOUT_RESOURCE); } else if(strcmp(attr, "src") == 0) { src_curie = value; src = rdfa_resolve_curie(context, src_curie, CURIE_PARSE_HREF_SRC); } else if(strcmp(attr, "typeof") == 0) { type_of_curie = value; type_of = rdfa_resolve_curie_list( context, type_of_curie, CURIE_PARSE_INSTANCEOF_DATATYPE); } else if(strcmp(attr, "rel") == 0) { context->rel_present = 1; rel_curie = value; rel = rdfa_resolve_curie_list( context, rel_curie, CURIE_PARSE_RELREV); } else if(strcmp(attr, "rev") == 0) { context->rev_present = 1; rev_curie = value; rev = rdfa_resolve_curie_list( context, rev_curie, CURIE_PARSE_RELREV); } else if(strcmp(attr, "property") == 0) { property_curie = value; property = rdfa_resolve_curie_list( context, property_curie, CURIE_PARSE_PROPERTY); } else if(strcmp(attr, "resource") == 0) { resource_curie = value; resource = rdfa_resolve_curie( context, resource_curie, CURIE_PARSE_ABOUT_RESOURCE); } else if(strcmp(attr, "href") == 0) { href_curie = value; href = rdfa_resolve_curie(context, href_curie, CURIE_PARSE_HREF_SRC); } else if(strcmp(attr, "content") == 0) { content = rdfa_replace_string(content, value); } else if(strcmp(attr, "datatype") == 0) { datatype_curie = value; if(strlen(datatype_curie) == 0) { datatype = rdfa_replace_string(datatype, ""); } else { datatype = rdfa_resolve_curie(context, datatype_curie, CURIE_PARSE_INSTANCEOF_DATATYPE); } } else if((attrns == NULL && strcmp(attr, "lang") == 0) || (attrns != NULL && strcmp(attrns, "xml") == 0 && strcmp(attr, "lang") == 0)) { xml_lang = rdfa_replace_string(xml_lang, value); } free(value); } } /* The root element has an implicit @about declaration */ if(context->depth == 1 && about == NULL && resource == NULL && href == NULL && src == NULL) { about_curie = ""; about = rdfa_resolve_curie( context, about_curie, CURIE_PARSE_ABOUT_RESOURCE); } /* The HEAD and BODY element in XHTML and HTML has an implicit * about="" on it. */ if(about == NULL && resource == NULL && href == NULL && src == NULL && (context->parent_subject == NULL || type_of != NULL) && ((context->host_language == HOST_LANGUAGE_XHTML1 || context->host_language == HOST_LANGUAGE_HTML) && (strcasecmp(name, "head") == 0 || strcasecmp(name, "body") == 0))) { about_curie = ""; about = rdfa_resolve_curie( context, about_curie, CURIE_PARSE_ABOUT_RESOURCE); } /* check to see if we should append an xml:lang to the XML Literal * if one is defined in the context and does not exist on the * element. */ if((xml_lang == NULL) && (context->language != NULL) && !context->xml_literal_xml_lang_defined) { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, " xml:lang=\"", strlen(" xml:lang=\"")); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, context->language, strlen(context->language)); context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, "\"", 1); /* ensure that the lang isn't set in a subtree (unless it's overwritten) */ context->xml_literal_xml_lang_defined = 1; } /* close the XML Literal value */ context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, ">", 1); /* 3. The [current element] is also parsed for any language * information, and [language] is set in the [current * evaluation context]; */ rdfa_update_language(context, xml_lang); /***************** FOR DEBUGGING PURPOSES ONLY ******************/ #if defined(DEBUG) && DEBUG > 0 printf("DEBUG: depth = %u\n", context->depth); if(about != NULL) { printf("DEBUG: @about = %s\n", about); } if(src != NULL) { printf("DEBUG: @src = %s\n", src); } if(type_of != NULL) { printf("DEBUG: @type_of = "); rdfa_print_list(type_of); } if(context->inlist_present) { printf("DEBUG: @inlist = true\n"); } if(rel != NULL) { printf("DEBUG: @rel = "); rdfa_print_list(rel); } if(rev != NULL) { printf("DEBUG: @rev = "); rdfa_print_list(rev); } if(property != NULL) { printf("DEBUG: @property = "); rdfa_print_list(property); } if(resource != NULL) { printf("DEBUG: @resource = %s\n", resource); } if(href != NULL) { printf("DEBUG: @href = %s\n", href); } if(content != NULL) { printf("DEBUG: @content = %s\n", content); } if(datatype != NULL) { printf("DEBUG: @datatype = %s\n", datatype); } if(xml_lang != NULL) { printf("DEBUG: @xml:lang = %s\n", xml_lang); } #endif /* TODO: This isn't part of the processing model, it needs to be * included and is a correction for the last item in step #4. */ if((about == NULL) && (src == NULL) && (type_of == NULL) && (rel == NULL) && (rev == NULL) && (property == NULL) && (resource == NULL) && (href == NULL) && (context->default_vocabulary == NULL) && (prefix == NULL)) { context->skip_element = 1; } if((rel == NULL) && (rev == NULL)) { if(context->rdfa_version == RDFA_VERSION_1_0) { /* 4. If the [current element] contains no valid @rel or @rev * URI, obtained according to the section on CURIE and URI * Processing, then the next step is to establish a value for * [new subject]. Any of the attributes that can carry a * resource can set [new subject]; */ rdfa_establish_new_1_0_subject( context, name, about, src, resource, href, type_of); } else { rdfa_establish_new_1_1_subject( context, name, about, src, resource, href, type_of, property, content, datatype); } } else { if(context->rdfa_version == RDFA_VERSION_1_0) { /* 5. If the [current element] does contain a valid @rel or @rev * URI, obtained according to the section on CURIE and URI * Processing, then the next step is to establish both a value * for [new subject] and a value for [current object resource]: */ rdfa_establish_new_1_0_subject_with_relrev( context, name, about, src, resource, href, type_of); } else { rdfa_establish_new_1_1_subject_with_relrev( context, name, about, src, resource, href, type_of); } } if(context->new_subject != NULL) { #if defined(DEBUG) && DEBUG > 0 printf("DEBUG: new_subject = %s\n", context->new_subject); #endif /* RDFa 1.0: 6. If in any of the previous steps a [new subject] was set * to a non-null value, it is now used to provide a subject for * type values; */ /* RDFa 1.1: 7. If in any of the previous steps a typed resource was set * to a non-null value, it is now used to provide a subject for type * values; */ if(type_of != NULL) { rdfa_complete_type_triples(context, type_of); } /* Note that none of this block is executed if there is no * [new subject] value, i.e., [new subject] remains null. */ } if(context->current_object_resource != NULL) { /* If the element contains both the @inlist and the @rel attributes: * the @rel may contain one or more resources, obtained according to * the section on CURIE and IRI Processing each of which is used to * add an entry to the list mapping as follows: * if the local list mapping does not contain a list associated with * the IRI, instantiate a new list and add to local list mappings * add the current object resource to the list associated with the * resource in the local list mapping */ if(context->rdfa_version == RDFA_VERSION_1_1 && (rel != NULL) && context->inlist_present) { rdfresource_t object_type = RDF_TYPE_IRI; if((property != NULL) || (content != NULL)) { object_type = RDF_TYPE_PLAIN_LITERAL; if(datatype != NULL) { object_type = RDF_TYPE_TYPED_LITERAL; } } rdfa_establish_new_inlist_triples( context, rel, context->current_object_resource, object_type); } /* 7. If in any of the previous steps a [current object resource] * was set to a non-null value, it is now used to generate triples */ rdfa_complete_relrev_triples(context, rel, rev); } if((context->current_object_resource == NULL) && context->rdfa_version == RDFA_VERSION_1_1 && (rel != NULL) && context->inlist_present) { rdfa_save_incomplete_list_triples(context, rel); } else if((context->current_object_resource == NULL) && ((rel != NULL) || (rev != NULL))) { /* 8. If however [current object resource] was set to null, but * there are predicates present, then they must be stored as * [incomplete triple]s, pending the discovery of a subject that * can be used as the object. Also, [current object resource] * should be set to a newly created [bnode] */ rdfa_save_incomplete_triples(context, rel, rev); } /* Ensure to re-insert XML Literal namespace information from this * point on... */ if(property != NULL) { context->xml_literal_namespaces_defined = 0; } /* save these for processing steps #9 and #10 */ context->about = rdfa_replace_string(context->about, about); context->resource = rdfa_replace_string(context->resource, resource); context->href = rdfa_replace_string(context->href, href); context->src = rdfa_replace_string(context->src, src); context->content = rdfa_replace_string(context->content, content); context->datatype = rdfa_replace_string(context->datatype, datatype); context->property = property; /* free the resolved CURIEs */ free(about); free(src); rdfa_free_list(type_of); rdfa_free_list(rel); rdfa_free_list(rev); free(xml_lang); free(content); free(resource); free(href); free(datatype); } static void character_data( void *parser_context, const xmlChar *s, int len) { /*xmlParserCtxtPtr parser = (xmlParserCtxtPtr)parser_context;*/ rdfalist* context_stack = (rdfalist*)((rdfacontext*)parser_context)->context_stack; rdfacontext* context = (rdfacontext*) context_stack->items[context_stack->num_items - 1]->data; char *buffer = (char*)malloc(len + 1); memset(buffer, 0, len + 1); memcpy(buffer, s, len); /* append the text to the current context's plain literal */ if(context->plain_literal == NULL) { context->plain_literal = rdfa_replace_string(context->plain_literal, buffer); context->plain_literal_size = len; } else { context->plain_literal = rdfa_n_append_string( context->plain_literal, &context->plain_literal_size, buffer, len); } /* append the text to the current context's XML literal */ if(context->xml_literal == NULL) { context->xml_literal = rdfa_replace_string(context->xml_literal, buffer); context->xml_literal_size = len; } else { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, buffer, len); } /*printf("plain_literal: %s\n", context->plain_literal);*/ /*printf("xml_literal: %s\n", context->xml_literal);*/ free(buffer); } static void end_element(void* parser_context, const char* name, const char* prefix,const xmlChar* URI) { /*xmlParserCtxtPtr parser = (xmlParserCtxtPtr)parser_context;*/ rdfalist* context_stack = (rdfalist*)((rdfacontext*)parser_context)->context_stack; rdfacontext* context = (rdfacontext*)rdfa_pop_item(context_stack); rdfacontext* parent_context = (rdfacontext*) context_stack->items[context_stack->num_items - 1]->data; /* append the text to the current context's XML literal */ char* buffer = (char*)malloc(strlen(name) + 4); #if defined(DEBUG) && DEBUG > 0 printf("DEBUG: \n", name); printf("context->local_list_mappings (start of end_element): "); rdfa_print_mapping(context->local_list_mappings, (print_mapping_value_fp)rdfa_print_triple_list); #endif sprintf(buffer, "", name); if(context->xml_literal == NULL) { context->xml_literal = rdfa_replace_string(context->xml_literal, buffer); context->xml_literal_size = strlen(buffer); } else { context->xml_literal = rdfa_n_append_string( context->xml_literal, &context->xml_literal_size, buffer, strlen(buffer)); } free(buffer); /* 9. The next step of the iteration is to establish any * [current object literal]; */ /* generate the complete object literal triples */ if(context->property != NULL) { /* save the current xml literal */ char* saved_xml_literal = context->xml_literal; char* content_start = NULL; char* content_end = NULL; /* ensure to mark only the inner-content of the XML node for * processing the object literal. */ buffer = NULL; if(context->xml_literal != NULL) { /* get the data between the first tag and the last tag */ content_start = strchr(context->xml_literal, '>'); content_end = strrchr(context->xml_literal, '<'); if((content_start != NULL) && (content_end != NULL)) { /* set content end to null terminator */ context->xml_literal = ++content_start; *content_end = '\0'; } } /* update the plain literal if the XML Literal is an empty string */ if(context->xml_literal != NULL && strlen(context->xml_literal) == 0) { context->plain_literal = rdfa_replace_string(context->plain_literal, ""); } /* process data between first tag and last tag * this needs the xml literal to be null terminated */ if(context->rdfa_version == RDFA_VERSION_1_0) { rdfa_complete_object_literal_triples(context); } else { rdfa_complete_current_property_value_triples(context); } if(content_end != NULL) { /* set content end back */ *content_end = '<'; } if(saved_xml_literal != NULL) { /* restore xml literal */ context->xml_literal = saved_xml_literal; } } /*printf(context->plain_literal);*/ if(parent_context != NULL) { /* append the XML literal and plain text literals to the parent * literals */ if(context->xml_literal != NULL) { if(parent_context->xml_literal == NULL) { parent_context->xml_literal = rdfa_replace_string( parent_context->xml_literal, context->xml_literal); parent_context->xml_literal_size = context->xml_literal_size; } else { parent_context->xml_literal = rdfa_n_append_string( parent_context->xml_literal, &parent_context->xml_literal_size, context->xml_literal, context->xml_literal_size); } /* if there is an XML literal, there is probably a plain literal */ if(context->plain_literal != NULL) { if(parent_context->plain_literal == NULL) { parent_context->plain_literal = rdfa_replace_string( parent_context->plain_literal, context->plain_literal); parent_context->plain_literal_size = context->plain_literal_size; } else { parent_context->plain_literal = rdfa_n_append_string( parent_context->plain_literal, &parent_context->plain_literal_size, context->plain_literal, context->plain_literal_size); } } } /* preserve the bnode count by copying it to the parent_context */ parent_context->bnode_count = context->bnode_count; parent_context->underscore_colon_bnode_name = \ rdfa_replace_string(parent_context->underscore_colon_bnode_name, context->underscore_colon_bnode_name); } /* 10. If the [ skip element ] flag is 'false', and [ new subject ] * was set to a non-null value, then any [ incomplete triple ]s * within the current context should be completed: */ if((context->skip_element == 0) && (context->new_subject != NULL)) { rdfa_complete_incomplete_triples(context); } /* 14. Once all the child elements have been traversed, list triples are * generated, if necessary. */ if(context->rdfa_version == RDFA_VERSION_1_1 && (context->new_subject != NULL)) { rdfa_complete_list_triples(context); if(parent_context != NULL) { /* copy the current mapping to the parent mapping */ rdfa_free_mapping(parent_context->local_list_mappings, (free_mapping_value_fp)rdfa_free_list); parent_context->local_list_mappings = rdfa_copy_mapping( (void**)context->local_list_mappings, (copy_mapping_value_fp)rdfa_replace_list); #if defined(DEBUG) && DEBUG > 0 printf("parent_context->local_list_mappings (after copy): "); rdfa_print_mapping(context->local_list_mappings, (print_mapping_value_fp)rdfa_print_triple_list); #endif rdfa_free_mapping(context->local_list_mappings, (free_mapping_value_fp)rdfa_free_list); context->local_list_mappings = NULL; } } /* free the context */ rdfa_free_context(context); #if defined(DEBUG) && DEBUG > 0 printf("-------------------------------------------------------------\n"); #endif } void rdfa_set_default_graph_triple_handler( rdfacontext* context, triple_handler_fp th) { context->default_graph_triple_callback = th; } void rdfa_set_processor_graph_triple_handler( rdfacontext* context, triple_handler_fp th) { context->processor_graph_triple_callback = th; } void rdfa_set_buffer_filler(rdfacontext* context, buffer_filler_fp bf) { context->buffer_filler_callback = bf; } #ifdef LIBRDFA_IN_RAPTOR /* Raptor reports its errors a different way */ #else static void rdfa_report_error(void* parser_context, char* msg, ...) { char error[1024]; char* eptr; va_list args; rdfacontext* context = (rdfacontext*)parser_context; /* format the error message */ va_start(args, msg); vsprintf(error, msg, args); va_end(args); /* Remove any newlines from the libxml2 error */ eptr = error; while(*eptr != '\0') { if(*eptr == '\n') { *eptr = '.'; } eptr++; } /* Generate the processor error */ rdfa_processor_triples(context, RDFA_PROCESSOR_ERROR, error); } #endif #ifdef LIBRDFA_IN_RAPTOR static void raptor_rdfa_start_element(void *user_data, raptor_xml_element *xml_element) { raptor_qname* qname = raptor_xml_element_get_name(xml_element); int nb_attributes = raptor_xml_element_get_attributes_count(xml_element); raptor_qname** attrs = raptor_xml_element_get_attributes(xml_element); unsigned char* localname = raptor_qname_to_counted_name(qname, NULL); const raptor_namespace* qname_ns = raptor_qname_get_namespace(qname); int nb_namespaces = 0; const char** namespaces = NULL; int nb_defaulted = 0; char** attr = NULL; int i; const char* ns_name = NULL; const char* ns_uri = NULL; if(nb_attributes > 0) { /* Everything written into 'attr' is a shared pointer into * xml_element or contained objects - qnames, namespaces, uris * and values */ attr = (char**)malloc(sizeof(char*) * (1 + (nb_attributes * 5))); for(i = 0; i < nb_attributes; i++) { const raptor_namespace* attr_ns = attrs[i]->nspace; char** attri = &attr[5 * i]; /* 5 tuple: (localname, prefix, URI, value, end) */ attri[0] = (char*)attrs[i]->local_name; attri[1] = attr_ns ? (char*)attr_ns->prefix : NULL; attri[2] = attr_ns ? (char*)raptor_uri_as_string(attr_ns->uri) : NULL; attri[3] = (char*)attrs[i]->value; attri[4] = attri[3] + attrs[i]->value_length; } attr[5 * i] = NULL; } /* * @ctx: the user data (XML parser context) * @localname: the local name of the element * @prefix: the element namespace prefix if available * @URI: the element namespace name if available * @nb_namespaces: number of namespace definitions on that node * @namespaces: pointer to the array of prefix/URI pairs namespace definitions * @nb_attributes: the number of attributes on that node * @nb_defaulted: the number of defaulted attributes. The defaulted * ones are at the end of the array * @attributes: pointer to the array of (localname/prefix/URI/value/end) * attribute values. */ if(qname_ns) { ns_name = (const char*)raptor_namespace_get_prefix(qname_ns); ns_uri = (const char*)raptor_uri_as_string(qname_ns->uri); } start_element(user_data, (const char*)localname, ns_name, ns_uri, nb_namespaces, (const char**)namespaces, nb_attributes, nb_defaulted, (const char**)attr); if(attr) free(attr); raptor_free_memory(localname); } static void raptor_rdfa_end_element(void *user_data, raptor_xml_element* xml_element) { raptor_qname* qname = raptor_xml_element_get_name(xml_element); unsigned char* localname = raptor_qname_to_counted_name(qname, NULL); const raptor_namespace* qname_ns = raptor_qname_get_namespace(qname); if(qname_ns) end_element(user_data, (const char*)localname, (const char*)qname_ns->prefix, (const xmlChar*)raptor_uri_as_string(qname_ns->uri)); else end_element(user_data, (const char*)localname, NULL, NULL); raptor_free_memory(localname); } static void raptor_rdfa_character_data(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { character_data(user_data, (const xmlChar *)s, len); } static void raptor_rdfa_namespace_handler(void *user_data, raptor_namespace* nspace) { rdfacontext* context = (rdfacontext*)user_data; if(context->namespace_handler) (*context->namespace_handler)(context->namespace_handler_user_data, nspace); } #endif int rdfa_parse_start(rdfacontext* context) { /* create the buffers and expat parser */ int rval = RDFA_PARSE_SUCCESS; context->wb_allocated = sizeof(char) * READ_BUFFER_SIZE; /* +1 for NUL at end, to allow strstr() etc. to work * malloc - only the first char needs to be NUL */ context->working_buffer = (char*)malloc(context->wb_allocated + 1); *context->working_buffer = '\0'; context->done = 0; context->context_stack = rdfa_create_list(32); /* initialize the context stack */ rdfa_push_item(context->context_stack, context, RDFALIST_FLAG_CONTEXT); #ifdef LIBRDFA_IN_RAPTOR context->sax2 = raptor_new_sax2(context->world, context->locator, context); #else /* init libxml2 */ xmlInitParser(); #endif /* set up the context stack */ #ifdef LIBRDFA_IN_RAPTOR raptor_sax2_set_start_element_handler(context->sax2, raptor_rdfa_start_element); raptor_sax2_set_end_element_handler(context->sax2, raptor_rdfa_end_element); raptor_sax2_set_characters_handler(context->sax2, raptor_rdfa_character_data); raptor_sax2_set_namespace_handler(context->sax2, raptor_rdfa_namespace_handler); #endif rdfa_init_context(context); #ifdef LIBRDFA_IN_RAPTOR context->base_uri = raptor_new_uri(context->sax2->world, (const unsigned char*)context->base); raptor_sax2_parse_start(context->sax2, context->base_uri); #endif return rval; } int rdfa_parse_chunk(rdfacontext* context, char* data, size_t wblen, int done) { #ifdef LIBRDFA_IN_RAPTOR #else xmlSAXHandler handler; xmlParserCtxtPtr parser; #endif /* it is an error to call this before rdfa_parse_start() */ if(context->done) { return RDFA_PARSE_FAILED; } if(!context->preread) { /* search for the tag and use the href contained therein to * set the parsing context. */ context->wb_preread = rdfa_init_base(context, &context->working_buffer, &context->wb_allocated, data, wblen); /* continue looking if in first 131072 bytes of data */ if(!context->base && context->wb_preread < (1<<17)) return RDFA_PARSE_SUCCESS; #ifdef LIBRDFA_IN_RAPTOR /* term mappings are needed before SAX2 parsing */ rdfa_setup_initial_context(context); if(raptor_sax2_parse_chunk(context->sax2, (const unsigned char*)context->working_buffer, context->wb_position, done)) { return RDFA_PARSE_FAILED; } #else /* create the SAX2 handler structure */ memset(&handler, 0, sizeof(xmlSAXHandler)); handler.initialized = XML_SAX2_MAGIC; handler.startElementNs = (startElementNsSAX2Func)start_element; handler.endElementNs = (endElementNsSAX2Func)end_element; handler.characters = (charactersSAXFunc)character_data; handler.error = (errorSAXFunc)rdfa_report_error; /* create a push-based parser */ parser = xmlCreatePushParserCtxt( &handler, context, (const char*)context->working_buffer, context->wb_position, NULL); /* ensure that entity substitution is turned on by default */ xmlSubstituteEntitiesDefault(1); context->parser = parser; rdfa_setup_initial_context(context); #endif context->preread = 1; return RDFA_PARSE_SUCCESS; } /* otherwise just parse the block passed in */ #ifdef LIBRDFA_IN_RAPTOR if(raptor_sax2_parse_chunk(context->sax2, (const unsigned char*)data, wblen, done)) { return RDFA_PARSE_FAILED; } #else if(xmlParseChunk(context->parser, data, wblen, done)) { return RDFA_PARSE_FAILED; } #endif return RDFA_PARSE_SUCCESS; } void rdfa_parse_end(rdfacontext* context) { /* free context stack */ rdfa_free_context_stack(context); /* Free the expat parser and the like */ #ifdef LIBRDFA_IN_RAPTOR if(context->base_uri) raptor_free_uri(context->base_uri); raptor_free_sax2(context->sax2); context->sax2=NULL; #else /* free parser */ xmlFreeParserCtxt(context->parser); xmlCleanupParser(); #endif } char* rdfa_get_buffer(rdfacontext* context, size_t* blen) { *blen = context->wb_allocated; return context->working_buffer; } int rdfa_parse_buffer(rdfacontext* context, size_t bytes) { int rval; int done; done = (bytes == 0); rval = rdfa_parse_chunk(context, context->working_buffer, bytes, done); context->done = done; return rval; } int rdfa_parse(rdfacontext* context) { int rval; rval = rdfa_parse_start(context); if(rval != RDFA_PARSE_SUCCESS) { context->done = 1; return rval; } do { size_t wblen; int done; wblen = context->buffer_filler_callback( context->working_buffer, context->wb_allocated, context->callback_data); done = (wblen == 0); rval = rdfa_parse_chunk(context, context->working_buffer, wblen, done); context->done=done; } while(!context->done && rval == RDFA_PARSE_SUCCESS); rdfa_parse_end(context); return rval; } raptor2-2.0.15/librdfa/rdfa_utils.c0000644000175000017500000002757211767542245014046 00000000000000/* * Copyright 2008-2011 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * You should have received a copy of the GNU Lesser General Public * License along with librdfa. If not, see . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa_utils.h" #include "rdfa.h" #include "strtok_r.h" #define RDFA_WHITESPACE_CHARACTERS " \a\b\t\n\v\f\r" char* rdfa_join_string(const char* prefix, const char* suffix) { char* rval = NULL; size_t prefix_size = strlen(prefix); size_t suffix_size = strlen(suffix); rval = (char*)malloc(prefix_size + suffix_size + 1); memcpy(rval, prefix, prefix_size); memcpy(rval+prefix_size, suffix, suffix_size + 1); return rval; } char* rdfa_n_append_string( char* old_string, size_t* string_size, const char* suffix, size_t suffix_size) { char* rval = NULL; rval = (char*)realloc(old_string, *string_size + suffix_size + 1); memcpy(rval + *string_size, suffix, suffix_size + 1); *string_size = *string_size + suffix_size; return rval; } char* rdfa_replace_string(char* old_string, const char* new_string) { char* rval = NULL; if(new_string != NULL) { /* free the memory associated with the old string */ free(old_string); /* copy the new string */ rval = strdup(new_string); } return rval; } char* rdfa_canonicalize_string(const char* str) { char* rval = (char*)malloc(sizeof(char) * (strlen(str) + 2)); char* working_string = NULL; char* token = NULL; char* wptr = NULL; char* offset = rval; working_string = rdfa_replace_string(working_string, str); /* split on any whitespace character that we may find */ token = strtok_r(working_string, RDFA_WHITESPACE_CHARACTERS, &wptr); while(token != NULL) { size_t token_length = strlen(token); memcpy(offset, token, token_length); offset += token_length; *offset++ = ' '; *offset = '\0'; token = strtok_r(NULL, RDFA_WHITESPACE_CHARACTERS, &wptr); } if(offset != rval) { offset--; *offset = '\0'; } free(working_string); return rval; } rdfalist* rdfa_create_list(size_t size) { rdfalist* rval = (rdfalist*)malloc(sizeof(rdfalist)); rval->max_items = size; rval->num_items = 0; rval->items = (rdfalistitem**)malloc( sizeof(rdfalistitem*) * rval->max_items); return rval; } rdfalist* rdfa_replace_list(rdfalist* old_list, rdfalist* new_list) { rdfalist* rval = NULL; if(new_list != NULL) { /* free the memory associated with the old list */ rdfa_free_list(old_list); /* copy the new list */ rval = rdfa_copy_list(new_list); } return rval; } rdfalist* rdfa_copy_list(rdfalist* list) { rdfalist* rval = NULL; if(list != NULL) { unsigned int i; rval = rdfa_create_list(list->max_items); /* copy the base list variables over */ rval->num_items = list->num_items; rval->user_data = list->user_data; /* copy the data of every list member along with all of the flags * for each list member. */ for(i = 0; i < list->max_items; i++) { if(i < list->num_items) { rval->items[i] = (rdfalistitem*)malloc(sizeof(rdfalistitem)); rval->items[i]->data = NULL; rval->items[i]->flags = list->items[i]->flags; /* copy specific data type */ if(list->items[i]->flags & RDFALIST_FLAG_TEXT) { rval->items[i]->data = strdup((char*)list->items[i]->data); } else if(list->items[i]->flags & RDFALIST_FLAG_TRIPLE) { rdftriple* t = (rdftriple*)list->items[i]->data; rval->items[i]->data = rdfa_create_triple(t->subject, t->predicate, t->object, t->object_type, t->datatype, t->language); } else if(list->items[i]->flags & RDFALIST_FLAG_CONTEXT) { /* TODO: Implement the copy for context, if it is needed. */ } } else { rval->items[i] = NULL; } } } return rval; } void rdfa_print_list(rdfalist* list) { unsigned int i; printf("[ "); for(i = 0; i < list->num_items; i++) { if(i != 0) { printf(", "); } puts((const char*)list->items[i]->data); } printf(" ]\n"); } void rdfa_print_triple_list(rdfalist* list) { unsigned int i; if(list != NULL) { printf("[ "); for(i = 0; i < list->num_items; i++) { if(i != 0) { printf(", "); } rdfa_print_triple((rdftriple*)list->items[i]->data); } printf(" ]\n"); } else { printf("NULL\n"); } } void rdfa_free_list(rdfalist* list) { if(list != NULL) { unsigned int i; for(i = 0; i < list->num_items; i++) { if(list->items[i]->flags & RDFALIST_FLAG_TEXT) { free(list->items[i]->data); } else if(list->items[i]->flags & RDFALIST_FLAG_TRIPLE) { rdftriple* t = (rdftriple*)list->items[i]->data; rdfa_free_triple(t); } free(list->items[i]); } free(list->items); free(list); } } void rdfa_push_item(rdfalist* stack, void* data, liflag_t flags) { rdfa_add_item(stack, data, flags); } void* rdfa_pop_item(rdfalist* stack) { void* rval = NULL; if(stack->num_items > 0) { --stack->num_items; rval = stack->items[stack->num_items]->data; free(stack->items[stack->num_items]); stack->items[stack->num_items] = NULL; } return rval; } void rdfa_add_item(rdfalist* list, void* data, liflag_t flags) { rdfalistitem* item; if(!list) return; item = (rdfalistitem*)malloc(sizeof(rdfalistitem)); item->data = NULL; if((flags & RDFALIST_FLAG_CONTEXT) || (flags & RDFALIST_FLAG_TRIPLE)) { item->data = data; } else { item->data = (char*)rdfa_replace_string( (char*)item->data, (const char*)data); } item->flags = flags; if(list->num_items == list->max_items) { list->max_items = 1 + (list->max_items * 2); list->items = (rdfalistitem**)realloc( list->items, sizeof(rdfalistitem*) * list->max_items); } list->items[list->num_items] = item; ++list->num_items; } void** rdfa_create_mapping(size_t elements) { size_t mapping_size = sizeof(void*) * MAX_URI_MAPPINGS * 2; void** mapping = (void**)malloc(mapping_size); /* only initialize the mapping if it is not null. */ if(mapping != NULL) { memset(mapping, 0, mapping_size); } return mapping; } void rdfa_create_list_mapping( rdfacontext* context, void** mapping, const char* subject, const char* key) { char* realkey = NULL; size_t str_size; rdfalist* value = NULL; char* list_bnode; rdftriple* triple; /* Attempt to find the list mapping */ value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key); if(value == NULL) { /* create the mapping */ value = rdfa_create_list(MAX_LIST_ITEMS); value->user_data = context->depth; /* build the real key to use when updating the mapping */ str_size = strlen(subject); realkey = strdup(subject); realkey = rdfa_n_append_string(realkey, &str_size, " ", 1); realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key)); rdfa_update_mapping(mapping, realkey, value, (update_mapping_value_fp)rdfa_replace_list); free(realkey); rdfa_free_list(value); /* add the first item in the list as the bnode for the list */ list_bnode = rdfa_create_bnode(context); triple = rdfa_create_triple( list_bnode, list_bnode, list_bnode, RDF_TYPE_IRI, NULL, NULL); rdfa_append_to_list_mapping(mapping, subject, key, (void*)triple); free(list_bnode); } } void rdfa_append_to_list_mapping( void** mapping, const char* subject, const char* key, void* value) { rdfalist* list = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key); rdfa_add_item(list, value, RDFALIST_FLAG_TRIPLE); } void** rdfa_copy_mapping( void** mapping, copy_mapping_value_fp copy_mapping_value) { void** rval = (void**)calloc(MAX_URI_MAPPINGS * 2, sizeof(void*)); void** mptr = mapping; void** rptr = rval; /* copy each element of the old mapping to the new mapping. */ while(*mptr != NULL) { /* copy the key */ *rptr = rdfa_replace_string((char*)*rptr, (const char*)*mptr); rptr++; mptr++; /* copy the value */ *rptr = copy_mapping_value(*rptr, *mptr); rptr++; mptr++; } return rval; } void rdfa_update_mapping(void** mapping, const char* key, const void* value, update_mapping_value_fp update_mapping_value) { int found = 0; void** mptr = mapping; /* search the current mapping to see if the key exists in the mapping */ while(!found && (*mptr != NULL)) { if(strcmp((char*)*mptr, key) == 0) { mptr++; *mptr = update_mapping_value(*mptr, value); found = 1; } else { mptr++; } mptr++; } /* if we made it through the entire URI mapping and the key was not * found, create a new key-value pair. */ if(!found) { *mptr = rdfa_replace_string((char*)*mptr, key); mptr++; *mptr = update_mapping_value(*mptr, value); } } const void* rdfa_get_mapping(void** mapping, const char* key) { const void* rval = NULL; char** mptr = (char**)mapping; /* search the current mapping to see if the key exists in the mapping. */ while(*mptr != NULL) { if(strcmp(*mptr, key) == 0) { mptr++; rval = *mptr; } else { mptr++; } mptr++; } return rval; } const void* rdfa_get_list_mapping( void** mapping, const char* subject, const char* key) { void* rval; char* realkey = NULL; size_t str_size = strlen(subject); /* generate the real list mapping key and retrieve it from the mapping */ realkey = strdup(subject); realkey = rdfa_n_append_string(realkey, &str_size, " ", 1); realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key)); rval = (void*)rdfa_get_mapping(mapping, realkey); free(realkey); return (const void*)rval; } void rdfa_next_mapping(void** mapping, char** key, void** value) { *key = NULL; *value = NULL; if(*mapping != NULL) { *key = *(char**)mapping++; *value = *mapping++; } } void rdfa_print_mapping(void** mapping, print_mapping_value_fp print_value) { void** mptr = mapping; printf("{\n"); while(*mptr != NULL) { char* key; void* value; key = (char*)*mptr++; value = *mptr++; printf(" %s : ", key); print_value(value); if(*mptr != NULL) { printf(",\n"); } else { printf("\n"); } } printf("}\n"); } void rdfa_print_string(const char* str) { printf("%s", str); } void rdfa_free_mapping(void** mapping, free_mapping_value_fp free_value) { void** mptr = mapping; if(mapping != NULL) { /* free all of the memory in the mapping */ while(*mptr != NULL) { free(*mptr); mptr++; free_value(*mptr); mptr++; } free(mapping); } } raptor2-2.0.15/librdfa/Makefile.am0000644000175000017500000000246512240743474013566 00000000000000# -*- Mode: Makefile -*- # # Makefile for librdfa convienience library # ANALYZE = clang ANALYZE_FLAGS = "--analyze" # Based on COMPILE target ANALYZE_COMMAND = $(ANALYZE) \ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) if LIBRDFA noinst_LTLIBRARIES = librdfa.la AM_CPPFLAGS = -DLIBRDFA_IN_RAPTOR -I$(srcdir) -I$(top_srcdir)/src librdfa_la_SOURCES = \ context.c \ curie.c \ iri.c \ language.c \ lists.c \ namespace.c \ rdfa.c \ rdfa_utils.c \ subject.c \ triple.c \ rdfa.h \ rdfa_utils.h \ config.h if NEED_STRTOK_R librdfa_la_SOURCES += \ strtok_r.c \ strtok_r.h endif # Do not need: # mingw32_utils.c # mingw32_utils.h else EXTRA_DIST = \ context.c \ curie.c \ iri.c \ language.c \ lists.c \ namespace.c \ rdfa.c \ rdfa_utils.c \ strtok_r.c \ subject.c \ triple.c \ rdfa.h \ rdfa_utils.h \ strtok_r.h \ config.h endif CLEANFILES=*.plist if MAINTAINER_MODE # Run Clang static analyzer over sources. analyze: $(SOURCES) @list='$(SOURCES)'; \ result=0; \ for file in $$list; do \ if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \ $(RECHO) "Analyzing $$file"; \ $(ANALYZE_COMMAND) $(srcdir)/$$file; \ status=$$?; \ if test $$status != 0; then \ result=1; \ fi; \ fi; \ done; \ set -e; exit $$result endif raptor2-2.0.15/librdfa/lists.c0000644000175000017500000002007612325013605013020 00000000000000/** * Copyright 2012 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * Handles all triple functionality including all incomplete triple * functionality. * * @author Manu Sporny */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa_utils.h" #include "rdfa.h" void rdfa_establish_new_inlist_triples(rdfacontext* context, rdfalist* predicates, const char* object, rdfresource_t object_type) { int i = 0; for(i = 0; i < (int)predicates->num_items; i++) { const char* predicate = (const char*)predicates->items[i]->data; char* resolved_predicate = rdfa_resolve_relrev_curie(context, predicate); rdftriple* triple; /* ensure the list mapping exists */ rdfa_create_list_mapping( context, context->local_list_mappings, context->new_subject, resolved_predicate); /* add an incomplete triple for each list mapping */ triple = rdfa_create_triple(context->new_subject, resolved_predicate, object, object_type, context->datatype, context->language); rdfa_append_to_list_mapping(context->local_list_mappings, context->new_subject, resolved_predicate, triple); free(resolved_predicate); } #if defined(DEBUG) && DEBUG > 0 printf("LOCAL LIST MAPPINGS: "); rdfa_print_mapping(context->local_list_mappings, (print_mapping_value_fp)rdfa_print_triple_list); #endif } void rdfa_save_incomplete_list_triples( rdfacontext* context, const rdfalist* rel) { unsigned int i; for(i = 0; i < rel->num_items; i++) { const char* curie = (const char*)rel->items[i]->data; char* resolved_curie = rdfa_resolve_relrev_curie(context, curie); /* ensure the list mapping exists */ rdfa_create_list_mapping( context, context->local_list_mappings, context->new_subject, resolved_curie); /* get the list name */ rdfa_add_item( context->local_incomplete_triples, resolved_curie, (liflag_t)(RDFALIST_FLAG_DIR_NONE | RDFALIST_FLAG_TEXT)); free(resolved_curie); } #if defined(DEBUG) && DEBUG > 0 printf("LOCAL INCOMPLETE TRIPLES: "); rdfa_print_list(context->local_incomplete_triples); #endif } void rdfa_complete_list_triples(rdfacontext* context) { /* For each IRI in the local list mapping, if the equivalent list does * not exist in the evaluation context, indicating that the list was * originally instantiated on the current element, use the list as follows: */ int i; rdfalist* list; rdftriple* triple; void** mptr = context->local_list_mappings; char* key = NULL; void** kptr = NULL; void* value = NULL; unsigned int list_depth = 0; #if defined(DEBUG) && DEBUG > 0 printf("local_list_mappings: "); rdfa_print_mapping(context->local_list_mappings, (print_mapping_value_fp)rdfa_print_triple_list); #endif while(*mptr != NULL) { kptr = mptr; rdfa_next_mapping(mptr++, &key, &value); list = (rdfalist*)value; list_depth = list->user_data; mptr++; #if defined(DEBUG) && DEBUG > 0 printf("LIST TRIPLES for key (%u/%u): KEY(%s)\n", context->depth, list_depth, key); #endif if((context->depth < (int)list_depth) && (rdfa_get_list_mapping( context->list_mappings, context->new_subject, key) == NULL) && (strcmp(key, RDFA_MAPPING_DELETED_KEY) != 0)) { char* predicate = strstr(key, " ") + 1; triple = (rdftriple*)list->items[0]->data; if(list->num_items == 1) { /* Free unused list triple */ rdfa_free_triple(triple); /* the list is empty, generate an empty list triple */ triple = rdfa_create_triple(context->new_subject, predicate, "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil", RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback( triple, context->callback_data); } else { char* bnode = NULL; char* subject; char* tmp = NULL; bnode = rdfa_replace_string(bnode, triple->subject); for(i = 1; i < (int)list->num_items; i++) { char* next = NULL; triple = (rdftriple*)list->items[i]->data; /* Create a new 'bnode' array containing newly created bnodes, * one for each item in the list * For each bnode-(IRI or literal) pair from the list the * following triple is generated: * * subject * bnode * predicate * http://www.w3.org/1999/02/22-rdf-syntax-ns#first * object * full IRI or literal */ triple->subject = rdfa_replace_string(triple->subject, bnode); triple->predicate = rdfa_replace_string(triple->predicate, "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"); context->default_graph_triple_callback( triple, context->callback_data); /* Free the list item */ free(list->items[i]); list->items[i] = NULL; /* For each item in the 'bnode' array the following triple is * generated: * * subject * bnode * predicate * http://www.w3.org/1999/02/22-rdf-syntax-ns#rest * object * next item in the 'bnode' array or, if that does not exist, * http://www.w3.org/1999/02/22-rdf-syntax-ns#nil */ if(i < (int)list->num_items - 1) { next = rdfa_create_bnode(context); } else { next = strdup((char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); } triple = rdfa_create_triple(bnode, "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest", next, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback( triple, context->callback_data); /* Free the bnode, setting 'next' appropriately */ free(bnode); bnode = next; } /* A single additional triple is generated: * subject * current subject * predicate * full IRI of the local list mapping associated with this list * object * first item of the 'bnode' array */ subject = strdup(key); if(subject) tmp = strstr(subject, " "); if(tmp) { tmp[0] = '\0'; triple = (rdftriple*)list->items[0]->data; triple->subject = rdfa_replace_string(triple->subject, subject); triple->predicate = rdfa_replace_string(triple->predicate, predicate); context->default_graph_triple_callback( triple, context->callback_data); } if(subject) free(subject); if(bnode) free(bnode); } /* Free the first list item and empty the list */ free(list->items[0]); list->items[0] = NULL; list->num_items = 0; /* clear the entry from the mapping */ *kptr = rdfa_replace_string((char*)*kptr, RDFA_MAPPING_DELETED_KEY); } } } raptor2-2.0.15/librdfa/Makefile.in0000644000175000017500000004742712425344565013611 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile for librdfa convienience library # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @LIBRDFA_TRUE@@NEED_STRTOK_R_TRUE@am__append_1 = \ @LIBRDFA_TRUE@@NEED_STRTOK_R_TRUE@strtok_r.c \ @LIBRDFA_TRUE@@NEED_STRTOK_R_TRUE@strtok_r.h subdir = librdfa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) librdfa_la_LIBADD = am__librdfa_la_SOURCES_DIST = context.c curie.c iri.c language.c \ lists.c namespace.c rdfa.c rdfa_utils.c subject.c triple.c \ rdfa.h rdfa_utils.h config.h strtok_r.c strtok_r.h @LIBRDFA_TRUE@@NEED_STRTOK_R_TRUE@am__objects_1 = strtok_r.lo @LIBRDFA_TRUE@am_librdfa_la_OBJECTS = context.lo curie.lo iri.lo \ @LIBRDFA_TRUE@ language.lo lists.lo namespace.lo rdfa.lo \ @LIBRDFA_TRUE@ rdfa_utils.lo subject.lo triple.lo \ @LIBRDFA_TRUE@ $(am__objects_1) librdfa_la_OBJECTS = $(am_librdfa_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @LIBRDFA_TRUE@am_librdfa_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(librdfa_la_SOURCES) DIST_SOURCES = $(am__librdfa_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ANALYZE = clang ANALYZE_FLAGS = "--analyze" # Based on COMPILE target ANALYZE_COMMAND = $(ANALYZE) \ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) @LIBRDFA_TRUE@noinst_LTLIBRARIES = librdfa.la @LIBRDFA_TRUE@AM_CPPFLAGS = -DLIBRDFA_IN_RAPTOR -I$(srcdir) -I$(top_srcdir)/src @LIBRDFA_TRUE@librdfa_la_SOURCES = context.c curie.c iri.c language.c \ @LIBRDFA_TRUE@ lists.c namespace.c rdfa.c rdfa_utils.c \ @LIBRDFA_TRUE@ subject.c triple.c rdfa.h rdfa_utils.h config.h \ @LIBRDFA_TRUE@ $(am__append_1) # Do not need: # mingw32_utils.c # mingw32_utils.h @LIBRDFA_FALSE@EXTRA_DIST = \ @LIBRDFA_FALSE@context.c \ @LIBRDFA_FALSE@curie.c \ @LIBRDFA_FALSE@iri.c \ @LIBRDFA_FALSE@language.c \ @LIBRDFA_FALSE@lists.c \ @LIBRDFA_FALSE@namespace.c \ @LIBRDFA_FALSE@rdfa.c \ @LIBRDFA_FALSE@rdfa_utils.c \ @LIBRDFA_FALSE@strtok_r.c \ @LIBRDFA_FALSE@subject.c \ @LIBRDFA_FALSE@triple.c \ @LIBRDFA_FALSE@rdfa.h \ @LIBRDFA_FALSE@rdfa_utils.h \ @LIBRDFA_FALSE@strtok_r.h \ @LIBRDFA_FALSE@config.h CLEANFILES = *.plist all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu librdfa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu librdfa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done librdfa.la: $(librdfa_la_OBJECTS) $(librdfa_la_DEPENDENCIES) $(EXTRA_librdfa_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_librdfa_la_rpath) $(librdfa_la_OBJECTS) $(librdfa_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iri.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/language.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lists.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/namespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfa_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/triple.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Run Clang static analyzer over sources. @MAINTAINER_MODE_TRUE@analyze: $(SOURCES) @MAINTAINER_MODE_TRUE@ @list='$(SOURCES)'; \ @MAINTAINER_MODE_TRUE@ result=0; \ @MAINTAINER_MODE_TRUE@ for file in $$list; do \ @MAINTAINER_MODE_TRUE@ if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \ @MAINTAINER_MODE_TRUE@ $(RECHO) "Analyzing $$file"; \ @MAINTAINER_MODE_TRUE@ $(ANALYZE_COMMAND) $(srcdir)/$$file; \ @MAINTAINER_MODE_TRUE@ status=$$?; \ @MAINTAINER_MODE_TRUE@ if test $$status != 0; then \ @MAINTAINER_MODE_TRUE@ result=1; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ done; \ @MAINTAINER_MODE_TRUE@ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/librdfa/strtok_r.c0000644000175000017500000000140611757416510013537 00000000000000/* This file is in the public domain */ #ifdef HAVE_CONFIG_H # include #endif #include #include "strtok_r.h" #ifdef NEED_RDFA_STRTOK_R char * rdfa_strtok_r(char *str, const char *delim, char **saveptr) { char *p; if (str == NULL) str = *saveptr; if (str == NULL) return NULL; while (*str && strchr(delim, *str)) str++; if (*str == '\0') { *saveptr = NULL; return NULL; } p = str; while (*p && !strchr(delim, *p)) p++; if (*p == '\0') *saveptr = NULL; else { *p = '\0'; p++; *saveptr = p; } return str; } #else /* ! NEED_RDFA_STRTOK_R */ typedef int blah; /* "ISO C forbids an empty translation unit" */ #endif /* NEED_RDFA_STRTOK_R */ raptor2-2.0.15/librdfa/config.h0000644000175000017500000000015112011242611013115 00000000000000/* Fake librdfa config.h - reads configuration from Raptor's config header */ #include raptor2-2.0.15/librdfa/namespace.c0000644000175000017500000001150711770424657013635 00000000000000/** * Copyright 2008-2011 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * This file implements mapping data structure memory management as * well as updating URI mappings. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa_utils.h" #include "rdfa.h" /** * Attempts to update the uri mappings in the given context using the * given attribute/value pair. * * @param attribute the attribute, which must start with xmlns. * @param value the value of the attribute */ void rdfa_update_uri_mappings( rdfacontext* context, const char* attr, const char* value) { #ifdef LIBRDFA_IN_RAPTOR raptor_namespace_stack* nstack; nstack = &context->sax2->namespaces; #endif /* * the [current element] is parsed for [URI mappings] and these * are added to the [list of URI mappings]. Note that a [URI * mapping] will simply overwrite any current mapping in the list * that has the same name; */ /* Mappings are provided by @xmlns. The value to be mapped is set * by the XML namespace prefix, and the value to map is the value * of the attribute -- a URI. Note that the URI is not processed * in any way; in particular if it is a relative path it is not * resolved against the [current base]. Authors are advised to * follow best practice for using namespaces, which includes not * using relative paths. */ if(attr == NULL) { #ifdef LIBRDFA_IN_RAPTOR raptor_namespaces_start_namespace_full(nstack, NULL, (const unsigned char*)value, 0); #else rdfa_update_mapping( context->uri_mappings, XMLNS_DEFAULT_MAPPING, value, (update_mapping_value_fp)rdfa_replace_string); #endif } else if(strcmp(attr, "_") == 0) { #define FORMAT_1 "The underscore character must not be declared as a prefix " \ "because it conflicts with the prefix for blank node identifiers. " \ "The occurrence of this prefix declaration is being ignored." #ifdef LIBRDFA_IN_RAPTOR raptor_parser_warning((raptor_parser*)context->callback_data, FORMAT_1); #else rdfa_processor_triples(context, RDFA_PROCESSOR_WARNING, FORMAT_1); #endif } else if(attr[0] == ':' || attr[0] == '_' || (attr[0] >= 'A' && attr[0] <= 'Z') || (attr[0] >= 'a' && attr[0] <= 'z') || ((unsigned char)attr[0] >= 0xc0 && (unsigned char)attr[0] <= 0xd6) || ((unsigned char)attr[0] >= 0xd8 && (unsigned char)attr[0] <= 0xf6) || (unsigned char)attr[0] >= 0xf8) { #ifdef LIBRDFA_IN_RAPTOR raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)attr, (const unsigned char*)value, 0); #else rdfa_generate_namespace_triple(context, attr, value); rdfa_update_mapping(context->uri_mappings, attr, value, (update_mapping_value_fp)rdfa_replace_string); #endif } else { /* allowable characters for CURIEs: * ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | * [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | * [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] * | [#x10000-#xEFFFF] */ /* Generate the processor warning if this is an invalid prefix */ #define FORMAT_2 "The declaration of the '%s' prefix is invalid " \ "because it starts with an invalid character. Please see " \ "http://www.w3.org/TR/REC-xml/#NT-NameStartChar for a " \ "full explanation of valid first characters for declaring " \ "prefixes." #ifdef LIBRDFA_IN_RAPTOR raptor_parser_warning((raptor_parser*)context->callback_data, FORMAT_2, attr); #else char msg[1024]; snprintf(msg, 1024, FORMAT_1); rdfa_processor_triples(context, RDFA_PROCESSOR_WARNING, msg); #endif } #ifdef LIBRDFA_IN_RAPTOR #else /* print the current mapping */ if(DEBUG) { printf("DEBUG: PREFIX MAPPINGS:"); rdfa_print_mapping(context->uri_mappings, (print_mapping_value_fp)rdfa_print_string); } #endif } raptor2-2.0.15/librdfa/rdfa_utils.h0000644000175000017500000003646011757416510014041 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * You should have received a copy of the GNU Lesser General Public * License along with librdfa. If not, see . * * This file contains functions used for common rdfa utility functions. */ #ifndef _RDFA_UTILS_H_ #define _RDFA_UTILS_H_ #include "rdfa.h" #ifdef __cplusplus extern "C" { #endif /** * A CURIE type can be safe, unsafe, and Internationalized Resource * Identifier, reference-only or invalid. */ typedef enum { CURIE_TYPE_SAFE, CURIE_TYPE_IRI_OR_UNSAFE, CURIE_TYPE_LINK_TYPE, CURIE_TYPE_INVALID } curie_t; /** * A CURIE parse type lets the CURIE processor know what type of CURIE * is being parsed so that the proper namespace resolution may occur. */ typedef enum { CURIE_PARSE_ABOUT_RESOURCE, CURIE_PARSE_PROPERTY, CURIE_PARSE_INSTANCEOF_DATATYPE, CURIE_PARSE_HREF_SRC, CURIE_PARSE_RELREV } curieparse_t; /** * The list member flag type is used to attach attribute information * to list member data. */ typedef enum { RDFALIST_FLAG_NONE = 0, RDFALIST_FLAG_DIR_NONE = (1 << 1), RDFALIST_FLAG_DIR_FORWARD = (1 << 2), RDFALIST_FLAG_DIR_REVERSE = (1 << 3), RDFALIST_FLAG_TEXT = (1 << 4), RDFALIST_FLAG_CONTEXT = (1 << 5), RDFALIST_FLAG_TRIPLE = (1 << 6), RDFALIST_FLAG_LAST = (1 << 7) } liflag_t; /* * RDFa processor graph reporting types */ #define RDFA_PROCESSOR_INFO "http://www.w3.org/ns/rdfa#Info" #define RDFA_PROCESSOR_WARNING "http://www.w3.org/ns/rdfa#Warning" #define RDFA_PROCESSOR_ERROR "http://www.w3.org/ns/rdfa#Error" /* key establishing a deleted mapping entry */ #define RDFA_MAPPING_DELETED_KEY "" /** * A function pointer that will be used to copy mapping values. */ typedef void* (*copy_mapping_value_fp)(void*, void*); /** * A function pointer that will be used to update mapping values. */ typedef void* (*update_mapping_value_fp)(const void*, const void*); /** * A function pointer that will be used to print mapping values. */ typedef void (*print_mapping_value_fp)(void*); /** * A function pointer that will be used to free memory associated with values. */ typedef void (*free_mapping_value_fp)(void*); /** * Initializes a mapping given the number of elements the mapping is * expected to hold. * * @param elements the maximum number of elements the mapping is * supposed to hold. * * @return an initialized void**, with all of the elements set to NULL. */ void** rdfa_create_mapping(size_t elements); /** * Adds a list to a mapping given a key to create. The result will be a * zero-item list associated with the given key in the mapping. * * @param context the current active context. * @param mapping the mapping to modify. * @param subject the current active subject. * @param key the key to add to the mapping. * @param user_data the user-defined data to store with the list information. */ void rdfa_create_list_mapping( rdfacontext* context, void** mapping, const char* subject, const char* key); /** * Adds an item to the end of the list that is associated with the given * key in the mapping. * * @param mapping the mapping to modify. * @param subject the current active subject. * @param key the key to use when looking up the list value. * @param value the value to append to the end of the list. */ void rdfa_append_to_list_mapping( void** mapping, const char* subject, const char* key, void* value); /** * Gets the value for a given list mapping when presented with a subject * and a key. If the subject-key combo doesn't exist in the mapping, * NULL is returned. * * @param mapping the mapping to search. * @param subject the current active subject. * @param key the key. * * @return value the value in the mapping for the given key. */ const void* rdfa_get_list_mapping( void** mapping, const char* subject, const char* key); /** * Copies the entire contents of a mapping verbatim and returns a * pointer to the copied mapping. * * @param mapping the mapping to copy * * @return the copied mapping, with all of the memory newly * allocated. You MUST free the returned mapping when you are * done with it. */ void** rdfa_copy_mapping( void** mapping, copy_mapping_value_fp copy_mapping_value); /** * Updates the given mapping when presented with a key and a value. If * the key doesn't exist in the mapping, it is created. * * @param mapping the mapping to update. * @param key the key. * @param value the value. * @param replace_mapping_value a pointer to a function that will replace the * old */ void rdfa_update_mapping(void** mapping, const char* key, const void* value, update_mapping_value_fp update_mapping_value); /** * Gets the value for a given mapping when presented with a key. If * the key doesn't exist in the mapping, NULL is returned. * * @param mapping the mapping to search. * @param key the key. * * @return value the value in the mapping for the given key. */ const void* rdfa_get_mapping(void** mapping, const char* key); /** * Gets the current mapping for the given mapping and increments the * mapping to the next value in the chain. * * @param mapping the mapping to use and increment. * @param key the key that will be retrieved, NULL if the mapping is * blank or you are at the end of the mapping. * @param value the value that is associated with the key. NULL if the * mapping is blank or you are at the end of the mapping. */ void rdfa_next_mapping(void** mapping, char** key, void** value); /** * Prints the mapping to the screen in a human-readable way. * * @param mapping the mapping to print to the screen. * @param print_value the function pointer to use to print the mapping values. */ void rdfa_print_mapping(void** mapping, print_mapping_value_fp print_value); /** * Frees all memory associated with a mapping. * * @param mapping the mapping to free. * @param free_value the function to free mapping values. */ void rdfa_free_mapping(void** mapping, free_mapping_value_fp free_value); /** * Creates a list and initializes it to the given size. * * @param size the starting size of the list. */ rdfalist* rdfa_create_list(size_t size); /** * Copies the given list. * * @param list the list to copy. * * @return the copied list. You MUST free the memory associated with * the returned list once you are done with it. */ rdfalist* rdfa_copy_list(rdfalist* list); /** * Replaced the old_list by free'ing the memory associated with it. A * copy is made of the new list and then returned. * * @param old_list the list to replace. The memory associated with this list * is freed. * @param new_list the new list to copy in replacement of the old list. A * deep copy is performed on the new list. * * @return the copied list. You MUST free the memory associated with * the returned list once you are done with it. */ rdfalist* rdfa_replace_list(rdfalist* old_list, rdfalist* new_list); /** * Adds an item to the end of the list. * * @param list the list to add the item to. * @param data the data to add to the list. * @param flags the flags to attach to the item. */ void rdfa_add_item(rdfalist* list, void* data, liflag_t flags); /** * Pushes an item onto the top of a stack. This function uses a list * for the underlying implementation. * * @param stack the stack to add the item to. * @param data the data to add to the stack. * @param flags the flags to attach to the item. */ void rdfa_push_item(rdfalist* stack, void* data, liflag_t flags); /** * Pops an item off of the top of a stack. This function uses a list * for the underlying implementation * * @param stack the stack to pop the item off of. * * @return the item that was just popped off of the top of the * stack. You MUST free the memory associated with the return * value. */ void* rdfa_pop_item(rdfalist* stack); /** * Prints the list to the screen in a human-readable way. * * @param list the list to print to the screen. */ void rdfa_print_list(rdfalist* list); /** * Frees all memory associated with the given list. * * @param list the list to free. */ void rdfa_free_list(rdfalist* list); /** * Replaces an old string with a new string, freeing the old memory * and allocating new memory for the new string. * * @param old_string the old string to free and replace. * @param new_string the new string to copy to the old_string's * location. * * @return a pointer to the newly allocated string. */ char* rdfa_replace_string(char* old_string, const char* new_string); /** * Appends a new string to the old string, expanding the old string's * memory area if needed. The old string's size must be provided and * will be updated to the new length. * * @param old_string the old string to reallocate if needed. * @param string_size the old string's length, to be updated. * @param suffix the string to append to the old_string. * @param suffix_size the size of the suffix string. * * @return a pointer to the newly re-allocated string. */ char* rdfa_n_append_string( char* old_string, size_t* string_size, const char* suffix, size_t suffix_size); /** * Joins two strings together and returns a newly allocated string * with both strings joined. * * @param prefix the beginning part of the string. * @param suffix the ending part of the string. * * @return a pointer to the newly allocated string that has both * prefix and suffix in it. */ char* rdfa_join_string(const char* prefix, const char* suffix); /** * Prints a string to stdout. This function is used by the rdfa_print_mapping * function. * * @param str the string to print to stdout. */ void rdfa_print_string(const char* str); /** * Canonicalizes a given string by condensing all whitespace to single * spaces and stripping leading and trailing whitespace. * * @param str the string to canonicalize. * * @return a pointer to a newly allocated string that contains the * canonicalized text. */ char* rdfa_canonicalize_string(const char* str); /** * Creates a triple given the subject, predicate, object, datatype and * language for the triple. * * @param subject the subject for the triple. * @param predicate the predicate for the triple. * @param object the object for the triple. * @param object_type the type of the object, which must be an rdfresource_t. * @param datatype the datatype of the triple. * @param language the language for the triple. * * @return a newly allocated triple with all of the given * information. This triple MUST be free()'d when you are done * with it. */ rdftriple* rdfa_create_triple(const char* subject, const char* predicate, const char* object, rdfresource_t object_type, const char* datatype, const char* language); /** * Prints a triple in a human-readable fashion. * * @triple the triple to display. */ void rdfa_print_triple(rdftriple* triple); /** * Prints a list of triples in a human readable form. * * @triple the triple to display. */ void rdfa_print_triple_list(rdfalist* list); /** * Frees the memory associated with a triple. */ void rdfa_free_triple(rdftriple* triple); /** * Resolves a given uri by appending it to the context's base parameter. * * @param context the current processing context. * @param uri the URI part to process. * * @return the fully qualified IRI. The memory returned from this * function MUST be freed. */ char* rdfa_resolve_uri(rdfacontext* context, const char* uri); /** * Resolves a given uri depending on whether or not it is a fully * qualified IRI or a CURIE. * * @param context the current processing context. * @param uri the URI part to process. * @param mode the CURIE processing mode to use when parsing the CURIE. * * @return the fully qualified IRI. The memory returned from this * function MUST be freed. */ char* rdfa_resolve_curie( rdfacontext* context, const char* uri, curieparse_t mode); /** * Resolves one or more CURIEs into fully qualified IRIs. * * @param rdfa_context the current processing context. * @param uris a list of URIs. * @param mode the CURIE parsing mode to use, one of * CURIE_PARSE_INSTANCEOF, CURIE_PARSE_RELREV, or * CURIE_PARSE_PROPERTY. * * @return an RDFa list if one or more IRIs were generated, NULL if not. */ rdfalist* rdfa_resolve_curie_list( rdfacontext* rdfa_context, const char* uris, curieparse_t mode); char* rdfa_resolve_relrev_curie(rdfacontext* context, const char* uri); char* rdfa_resolve_property_curie(rdfacontext* context, const char* uri); void rdfa_update_language(rdfacontext* context, const char* lang); char* rdfa_create_bnode(rdfacontext* context); /* All functions that rdfa.c needs. */ void rdfa_update_uri_mappings(rdfacontext* context, const char* attr, const char* value); void rdfa_establish_new_1_0_subject( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of); void rdfa_establish_new_1_1_subject( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of, const rdfalist* property, const char* content, const char* datatype); void rdfa_establish_new_1_0_subject_with_relrev( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of); void rdfa_establish_new_1_1_subject_with_relrev( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of); void rdfa_complete_incomplete_triples(rdfacontext* context); void rdfa_save_incomplete_list_triples( rdfacontext* context, const rdfalist* rel); void rdfa_complete_type_triples(rdfacontext* context, const rdfalist* type_of); void rdfa_complete_relrev_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev); void rdfa_save_incomplete_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev); void rdfa_complete_object_literal_triples(rdfacontext* context); void rdfa_complete_current_property_value_triples(rdfacontext* context); /* Declarations needed by namespace.c */ void rdfa_generate_namespace_triple( rdfacontext* context, const char* prefix, const char* iri); void rdfa_processor_triples( rdfacontext* context, const char* type, const char* msg); /* Declarations needed by rdfa.c */ void rdfa_setup_initial_context(rdfacontext* context); void rdfa_establish_new_inlist_triples( rdfacontext* context, rdfalist* predicates, const char* object, rdfresource_t object_type); void rdfa_complete_list_triples(rdfacontext* context); rdfacontext* rdfa_create_new_element_context(rdfalist* context_stack); void rdfa_free_context_stack(rdfacontext* context); #ifdef __cplusplus } #endif #endif raptor2-2.0.15/librdfa/curie.c0000644000175000017500000005056612416654151013010 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The CURIE module is used to resolve all forms of CURIEs that * XHTML+RDFa accepts. * * @author Manu Sporny */ #ifdef HAVE_CONFIG_H # include #endif #include #include #ifdef HAVE_STRINGS_H # include #endif #include #include #include "rdfa_utils.h" #include "rdfa.h" #include "strtok_r.h" /* The base XHTML vocab URL is used to resolve URIs that are reserved * words. Any reserved listed above is appended to the URL below to * form a complete IRI. */ #define XHTML_VOCAB_URI "http://www.w3.org/1999/xhtml/vocab#" #define XHTML_VOCAB_URI_SIZE 35 /** * Gets the type of CURIE that is passed to it. * * @param uri the uri to check. * * @return either CURIE_TYPE_SAFE, CURIE_TYPE_URI or CURIE_TYPE_INVALID. */ static curie_t rdfa_get_curie_type(const char* uri) { curie_t rval = CURIE_TYPE_INVALID; if(uri != NULL) { size_t uri_length = strlen(uri); if((uri[0] == '[') && (uri[uri_length - 1] == ']')) { /* a safe curie starts with [ and ends with ] */ rval = CURIE_TYPE_SAFE; } else if(strstr(uri, ":") != NULL) { /* at this point, it is unknown whether or not the CURIE is * an IRI or an unsafe CURIE */ rval = CURIE_TYPE_IRI_OR_UNSAFE; } else { /* if none of the above match, then the CURIE is probably a * relative IRI */ rval = CURIE_TYPE_IRI_OR_UNSAFE; } } return rval; } char* rdfa_resolve_uri(rdfacontext* context, const char* uri) { char* rval = NULL; char* path_start = NULL; size_t base_length = strlen(context->base); if(strlen(uri) < 1) { /* if a blank URI is given, use the base context */ rval = rdfa_replace_string(rval, context->base); } else if(strstr(uri, ":") != NULL) { /* if a IRI is given, don't concatenate */ rval = rdfa_replace_string(rval, uri); } else if(uri[0] == '#' || uri[0] == '?') { /* if a fragment ID or start of a query parameter is given, * concatenate it with the base URI */ rval = rdfa_join_string(context->base, uri); } else if(uri[0] == '/') { /* if a relative URI is given, but it starts with a '/', use the * host part concatenated to the given URI */ char* tmp = NULL; char* end_index = NULL; /* initialize the working-set data */ tmp = rdfa_replace_string(tmp, context->base); end_index = strchr(tmp, '/'); /* find the final '/' character after the host part of the context base. */ if(end_index != NULL) { end_index = strchr(end_index + 1, '/'); if(end_index != NULL) { end_index = strchr(end_index + 1, '/'); } } /* if the '/' character after the host part was found, copy the host * part and append the given URI to the URI, otherwise, append the * host part and the URI part as-is, ensuring that a '/' exists at the * end of the host part. */ if(end_index != NULL) { char* rval_copy; *end_index = '\0'; /* if the '/' character after the host part was found, copy the host * part and append the given URI to the URI. */ rval_copy = rdfa_replace_string(rval, tmp); rval = rdfa_join_string(rval_copy, uri); free(rval_copy); } else { /* append the host part and the URI part as-is, ensuring that a * '/' exists at the end of the host part. */ size_t tlen = strlen(tmp) - 1; char* rval_copy; rval_copy = rdfa_replace_string(rval, tmp); if(rval_copy[tlen] == '/') { rval_copy[tlen] = '\0'; } rval = rdfa_join_string(rval_copy, uri); free(rval_copy); } free(tmp); } else { if((char)context->base[base_length - 1] == '/') { /* if the base URI already ends in /, concatenate */ rval = rdfa_join_string(context->base, uri); } else { /* if we have a relative URI, chop off the name of the file * and replace it with the relative pathname */ char* end_index = strrchr(context->base, '/'); if(end_index != NULL) { char* tmpstr = NULL; char* end_index2; tmpstr = rdfa_replace_string(tmpstr, context->base); end_index2 = strrchr(tmpstr, '/'); if(end_index2 != NULL) { end_index2++; *end_index2 = '\0'; } rval = rdfa_join_string(tmpstr, uri); free(tmpstr); } } } /* It is possible that rval may be NULL here in OOM scenarios */ if(!rval) return NULL; /* Find the start of a scheme-based URL path */ path_start = (char*)strstr(rval, "://"); if(path_start != NULL) { if(strstr(path_start, "/.") != NULL) { path_start += 3; path_start = strstr(path_start, "/"); } else { path_start = NULL; } } /* remove any dot-segments that remain in the URL for URLs w/ schemes */ if(path_start != NULL) { size_t rlen = strlen(rval) + 1; size_t hlen = path_start - rval; char* src = (char*)malloc(rlen + 4); char* sptr = src + hlen; char* dest = (char*)malloc(rlen + 1); char* dptr = dest + hlen; char* dfence = dptr; memset(src, 0, rlen + 4); strcpy(src, rval); strncpy(dest, rval, hlen); /* Process the path portion of the IRI */ while(sptr[0] != '?' && sptr[0] != '\0') { if(sptr[0] == '.' && sptr[1] == '.' && sptr[2] == '/') { /* A. If the input buffer begins with a prefix of "../", * then remove that prefix from the input buffer; otherwise, */ sptr += 3; } else if(sptr[0] == '.' && sptr[1] == '/') { /* A. If the input buffer begins with a prefix of "./", * then remove that prefix from the input buffer; otherwise, */ sptr += 2; } else if(sptr[0] == '/' && sptr[1] == '.' && sptr[2] == '/') { /* B. if the input buffer begins with a prefix of "/./", * then replace that prefix with "/" in the input buffer; * otherwise, */ sptr += 2; } else if(sptr[0] == '/' && sptr[1] == '.' && sptr[2] == '\0') { /* B. if the input buffer begins with a prefix of "/.", * where "." is a complete path segment, then replace that * prefix with "/" in the input buffer; otherwise, */ sptr += 1; *sptr = '/'; } else if(sptr[0] == '/' && sptr[1] == '.' && sptr[2] == '.' && ((sptr[3] == '/') || (sptr[3] == '\0'))) { /* C. if the input buffer begins with a prefix of "/../", * then replace that prefix with "/" in the input buffer and * remove the last segment and its preceding "/" (if any) from * the output buffer; otherwise, */ if(sptr[3] == '/') { sptr += 3; } else if(sptr[3] == '\0') { sptr += 2; *sptr = '/'; } /* remove the last segment and the preceding '/' */ if(dptr > dfence) { dptr--; if(dptr[0] == '/') { dptr--; } } while(dptr >= dfence && dptr[0] != '/') { dptr--; } if(dptr >= dfence) { dptr[0] = '\0'; } else { dptr = dfence; dptr[0] = '\0'; } } else if(sptr[0] == '.' && sptr[1] == '\0') { /* D. if the input buffer consists only of ".", then remove * that from the input buffer; otherwise, */ sptr++; } else if(sptr[0] == '.' && sptr[1] == '.' && sptr[1] == '\0') { /* D. if the input buffer consists only of "..", then remove * that from the input buffer; otherwise, */ sptr += 2; } else { /* Copy the path segment */ do { *dptr++ = *sptr++; *dptr = '\0'; } while(sptr[0] != '/' && sptr[0] != '?' && sptr[0] != '\0'); } } /* Copy the remaining query parameters */ if(sptr[0] == '?') { strcpy(dptr, sptr); } else { dptr[0] = '\0'; } free(rval); free(src); rval = dest; } return rval; } char* rdfa_resolve_curie( rdfacontext* context, const char* uri, curieparse_t mode) { char* rval = NULL; curie_t ctype = rdfa_get_curie_type(uri); if(!uri) return NULL; if(ctype == CURIE_TYPE_INVALID) { rval = NULL; } else if((ctype == CURIE_TYPE_IRI_OR_UNSAFE) && ((mode == CURIE_PARSE_HREF_SRC) || (context->rdfa_version == RDFA_VERSION_1_0 && mode == CURIE_PARSE_ABOUT_RESOURCE))) { /* If we are parsing something that can take either a CURIE or a * URI, and the type is either IRI or UNSAFE, assume that it is * an IRI */ rval = rdfa_resolve_uri(context, uri); } /* * Check to see if the value is a term. */ if(ctype == CURIE_TYPE_IRI_OR_UNSAFE && mode == CURIE_PARSE_PROPERTY) { const char* term_iri; term_iri = (const char*)rdfa_get_mapping(context->term_mappings, uri); if(term_iri != NULL) { rval = strdup(term_iri); } else if(context->default_vocabulary == NULL && strstr(uri, ":") == NULL) { /* Generate the processor warning if this is a missing term */ #define FORMAT_1 "The use of the '%s' term was unrecognized by the RDFa processor because it is not a valid term for the current Host Language." #ifdef LIBRDFA_IN_RAPTOR raptor_parser_warning((raptor_parser*)context->callback_data, FORMAT_1, uri); #else char msg[1024]; snprintf(msg, 1024, FORMAT_1, uri); rdfa_processor_triples(context, RDFA_PROCESSOR_WARNING, msg); #endif } } /* if we are processing a safe CURIE OR * if we are parsing an unsafe CURIE that is an @type_of, * @datatype, @property, @rel, or @rev attribute, treat the curie * as not an IRI, but an unsafe CURIE */ if(rval == NULL && ((ctype == CURIE_TYPE_SAFE) || ((ctype == CURIE_TYPE_IRI_OR_UNSAFE) && ((mode == CURIE_PARSE_INSTANCEOF_DATATYPE) || (mode == CURIE_PARSE_PROPERTY) || (mode == CURIE_PARSE_RELREV) || (context->rdfa_version == RDFA_VERSION_1_1 && mode == CURIE_PARSE_ABOUT_RESOURCE))))) { char* working_copy = NULL; char* wcptr = NULL; char* prefix = NULL; char* curie_reference = NULL; const char* expanded_prefix = NULL; working_copy = (char*)malloc(strlen(uri) + 1); strcpy(working_copy, uri);/*rdfa_replace_string(working_copy, uri);*/ /* if this is a safe CURIE, chop off the beginning and the end */ if(ctype == CURIE_TYPE_SAFE) { prefix = strtok_r(working_copy, "[:]", &wcptr); if(wcptr) curie_reference = strtok_r(NULL, "[]", &wcptr); } else if(ctype == CURIE_TYPE_IRI_OR_UNSAFE) { prefix = strtok_r(working_copy, ":", &wcptr); if(wcptr) curie_reference = strtok_r(NULL, "", &wcptr); } /* fully resolve the prefix and get its length */ /* if a colon was found, but no prefix, use the XHTML vocabulary URI * as the expanded prefix */ if((uri[0] == ':') || (strcmp(uri, "[:]") == 0)) { expanded_prefix = XHTML_VOCAB_URI; curie_reference = prefix; prefix = NULL; } else if(uri[0] == ':') { /* FIXME: This looks like a bug - don't know why this code is * in here. I think it's for the case where ":next" is * specified, but the code's not checking that -- manu */ expanded_prefix = context->base; curie_reference = prefix; prefix = NULL; } else if(prefix != NULL) { if((mode != CURIE_PARSE_PROPERTY) && (mode != CURIE_PARSE_RELREV) && strcmp(prefix, "_") == 0) { /* if the prefix specifies this as a blank node, then we * use the blank node prefix */ expanded_prefix = "_"; } else { /* if the prefix was defined, get it from the set of URI mappings. */ #ifdef LIBRDFA_IN_RAPTOR if(!strcmp(prefix, "xml")) { expanded_prefix = RAPTOR_GOOD_CAST(const char*, raptor_xml_namespace_uri); } else { raptor_namespace *nspace; raptor_uri* ns_uri; nspace = raptor_namespaces_find_namespace(&context->sax2->namespaces, (const unsigned char*)prefix, (int)strlen(prefix)); if(nspace) { ns_uri = raptor_namespace_get_uri(nspace); if(ns_uri) expanded_prefix = (const char*)raptor_uri_as_string(ns_uri); } } #else expanded_prefix = rdfa_get_mapping(context->uri_mappings, prefix); /* Generate the processor warning if the prefix was not found */ if(expanded_prefix == NULL && strstr(uri, ":") != NULL && strstr(uri, "://") == NULL) { #define FORMAT_2 "The '%s' prefix was not found. You may want to check that it is declared before it is used, or that it is a valid prefix string." #ifdef LIBRDFA_IN_RAPTOR raptor_parser_warning((raptor_parser*)context->callback_data, FORMAT_2, prefix); #else char msg[1024]; snprintf(msg, 1024, FORMAT_2, prefix); rdfa_processor_triples(context, RDFA_PROCESSOR_WARNING, msg); #endif } #endif } } if((expanded_prefix != NULL) && (curie_reference != NULL)) { /* if the expanded prefix and the reference exist, generate the * full IRI. */ if(strcmp(expanded_prefix, "_") == 0) { rval = rdfa_join_string("_:", curie_reference); } else { rval = rdfa_join_string(expanded_prefix, curie_reference); } } else if((expanded_prefix != NULL) && (expanded_prefix[0] != '_') && (curie_reference == NULL)) { /* if the expanded prefix exists, but the reference is null, * generate the CURIE because a reference-less CURIE is still * valid */ rval = rdfa_join_string(expanded_prefix, ""); } free(working_copy); } if(rval == NULL) { /* if we're NULL at this point, the CURIE might be the special * unnamed bnode specified by _: */ if((strcmp(uri, "[_:]") == 0) || (strcmp(uri, "_:") == 0)) { if(context->underscore_colon_bnode_name == NULL) { context->underscore_colon_bnode_name = rdfa_create_bnode(context); } rval = rdfa_replace_string(rval, context->underscore_colon_bnode_name); } /* if we're NULL at this point and the IRI isn't [], then this might be * an IRI */ else if(context->rdfa_version == RDFA_VERSION_1_1 && (strcmp(uri, "[]") != 0)) { if((context->default_vocabulary != NULL) && ((mode == CURIE_PARSE_PROPERTY) || (mode == CURIE_PARSE_RELREV) || (mode == CURIE_PARSE_INSTANCEOF_DATATYPE)) && (strstr(uri, ":") == NULL)) { rval = rdfa_join_string(context->default_vocabulary, uri); } else if(((mode == CURIE_PARSE_PROPERTY) || (mode == CURIE_PARSE_ABOUT_RESOURCE) || (mode == CURIE_PARSE_INSTANCEOF_DATATYPE)) && (strstr(uri, "_:") == NULL) && (strstr(uri, "[_:") == NULL)) { rval = rdfa_resolve_uri(context, uri); } } } /* even though a reference-only CURIE is valid, it does not * generate a triple in XHTML+RDFa. If we're NULL at this point, * the given value wasn't valid in XHTML+RDFa. */ return rval; } /** * Resolves a given uri depending on whether or not it is a fully * qualified IRI, a CURIE, or a short-form XHTML reserved word for * @rel or @rev as defined in the XHTML+RDFa Syntax Document. * * @param context the current processing context. * @param uri the URI part to process. * * @return the fully qualified IRI, or NULL if the conversion failed * due to the given URI not being a short-form XHTML reserved * word. The memory returned from this function MUST be freed. */ char* rdfa_resolve_relrev_curie(rdfacontext* context, const char* uri) { char* rval = NULL; const char* resource = uri; /* check to make sure the URI doesn't have an empty prefix */ if(uri[0] == ':') { resource++; } /* override reserved words if there is a default vocab defined * NOTE: Don't have to check for RDFa 1.1 mode because vocab is only defined * in RDFa 1.1 */ if(context->default_vocabulary != NULL) { rval = rdfa_resolve_curie(context, uri, CURIE_PARSE_RELREV); } else if(context->host_language == HOST_LANGUAGE_XHTML1) { /* search all of the XHTML @rel/@rev reserved words for a * case-insensitive match against the given URI */ char* term = strdup(resource); char* ptr = NULL; for(ptr = term; *ptr; ptr++) { *ptr = tolower(*ptr); } rval = (char*)rdfa_get_mapping(context->term_mappings, term); if(rval != NULL) { rval = strdup(rval); } free(term); } else { /* Search the term mappings for a match */ rval = (char*)rdfa_get_mapping(context->term_mappings, resource); if(rval != NULL) { rval = strdup(rval); } } /* if a search against the registered terms failed, * attempt to resolve the value as a standard CURIE */ if(rval == NULL) { rval = rdfa_resolve_curie(context, uri, CURIE_PARSE_RELREV); } /* if a CURIE wasn't found, attempt to resolve the value as an IRI */ if(rval == NULL && (context->rdfa_version == RDFA_VERSION_1_1)) { rval = rdfa_resolve_uri(context, uri); } return rval; } rdfalist* rdfa_resolve_curie_list( rdfacontext* rdfa_context, const char* uris, curieparse_t mode) { rdfalist* rval = rdfa_create_list(3); char* working_uris = NULL; char* uptr = NULL; char* ctoken = NULL; working_uris = rdfa_replace_string(working_uris, uris); /* go through each item in the list of CURIEs and resolve each */ ctoken = strtok_r(working_uris, RDFA_WHITESPACE, &uptr); while(ctoken != NULL) { char* resolved_curie = NULL; if((mode == CURIE_PARSE_INSTANCEOF_DATATYPE) || (mode == CURIE_PARSE_ABOUT_RESOURCE) || (mode == CURIE_PARSE_PROPERTY)) { resolved_curie = rdfa_resolve_curie(rdfa_context, ctoken, mode); } else if(mode == CURIE_PARSE_RELREV) { resolved_curie = rdfa_resolve_relrev_curie(rdfa_context, ctoken); } /* add the CURIE if it was a valid one */ if(resolved_curie != NULL) { rdfa_add_item(rval, resolved_curie, RDFALIST_FLAG_TEXT); free(resolved_curie); } ctoken = strtok_r(NULL, RDFA_WHITESPACE, &uptr); } free(working_uris); return rval; } raptor2-2.0.15/librdfa/triple.c0000644000175000017500000007153112415536211013166 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * Handles all triple functionality including all incomplete triple * functionality. * * @author Manu Sporny */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa_utils.h" #include "rdfa.h" rdftriple* rdfa_create_triple(const char* subject, const char* predicate, const char* object, rdfresource_t object_type, const char* datatype, const char* language) { rdftriple* rval = (rdftriple*)malloc(sizeof(rdftriple)); /* clear the memory */ rval->subject = NULL; rval->predicate = NULL; rval->object = NULL; rval->object_type = object_type; rval->datatype = NULL; rval->language = NULL; #if 0 printf("SUBJECT : %s\n", subject); printf("PREDICATE: %s\n", predicate); printf("OBJECT : %s\n", object); printf("DATATYPE : %s\n", datatype); printf("LANG : %s\n", language); #endif /* a triple needs a subject, predicate and object at minimum to be * considered a triple. */ if((subject != NULL) && (predicate != NULL) && (object != NULL)) { rval->subject = rdfa_replace_string(rval->subject, subject); rval->predicate = rdfa_replace_string(rval->predicate, predicate); rval->object = rdfa_replace_string(rval->object, object); /* if the datatype is present, set it */ if(datatype != NULL) { rval->datatype = rdfa_replace_string(rval->datatype, datatype); } /* if the language was specified, set it */ if(language != NULL) { rval->language = rdfa_replace_string(rval->language, language); } } return rval; } void rdfa_print_triple(rdftriple* triple) { if(triple->object_type == RDF_TYPE_NAMESPACE_PREFIX) { printf("%s %s: <%s> .\n", triple->subject, triple->predicate, triple->object); } else { if(triple->subject != NULL) { if((triple->subject[0] == '_') && (triple->subject[1] == ':')) { printf("%s\n", triple->subject); } else { printf("<%s>\n", triple->subject); } } else { printf("INCOMPLETE\n"); } if(triple->predicate != NULL) { printf(" <%s>\n", triple->predicate); } else { printf(" INCOMPLETE\n"); } if(triple->object != NULL) { if(triple->object_type == RDF_TYPE_IRI) { if((triple->object[0] == '_') && (triple->object[1] == ':')) { printf(" %s", triple->object); } else { printf(" <%s>", triple->object); } } else if(triple->object_type == RDF_TYPE_PLAIN_LITERAL) { printf(" \"%s\"", triple->object); if(triple->language != NULL) { printf("@%s", triple->language); } } else if(triple->object_type == RDF_TYPE_XML_LITERAL) { printf(" \"%s\"^^rdf:XMLLiteral", triple->object); } else if(triple->object_type == RDF_TYPE_TYPED_LITERAL) { if((triple->datatype != NULL) && (triple->language != NULL)) { printf(" \"%s\"@%s^^<%s>", triple->object, triple->language, triple->datatype); } else if(triple->datatype != NULL) { printf(" \"%s\"^^<%s>", triple->object, triple->datatype); } } else { printf(" <%s> <---- UNKNOWN OBJECT TYPE", triple->object); } printf(" .\n"); } else { printf(" INCOMPLETE ."); } } } void rdfa_free_triple(rdftriple* triple) { free(triple->subject); free(triple->predicate); free(triple->object); free(triple->datatype); free(triple->language); free(triple); } #ifndef LIBRDFA_IN_RAPTOR /** * Generates a namespace prefix triple for any application that is * interested in processing namespace changes. * * @param context the RDFa context. * @param prefix the name of the prefix * @param IRI the fully qualified IRI that the prefix maps to. */ void rdfa_generate_namespace_triple( rdfacontext* context, const char* prefix, const char* iri) { if(context->processor_graph_triple_callback != NULL) { rdftriple* triple = rdfa_create_triple( "@prefix", prefix, iri, RDF_TYPE_NAMESPACE_PREFIX, NULL, NULL); context->processor_graph_triple_callback(triple, context->callback_data); } } /** * Generates a set of triples that describe the location of a warning or * error in a document. * * @param context the currently active context. * @param subject the name of the subject that is associated with the triples. */ #if 1 /* remove when the prototype is in the header */ void rdfa_processor_location_triples(rdfacontext* context, const char* subject); #endif void rdfa_processor_location_triples(rdfacontext* context, const char* subject) { } /** * Generates a set of triples in the processor graph including the processor's * position in the byte stream. * * @param context the current active context. * @param type the type of the message, which may be any of the RDF Classes * defined in the RDFa Core specification: * http://www.w3.org/TR/rdfa-core/#processor-graph-reporting * @param msg the message associated with the processor warning. */ void rdfa_processor_triples( rdfacontext* context, const char* type, const char* msg) { if(context->processor_graph_triple_callback != NULL) { char buffer[32]; char* subject = rdfa_create_bnode(context); char* context_subject = rdfa_create_bnode(context); /* generate the RDFa Processing Graph warning type triple */ rdftriple* triple = rdfa_create_triple( subject, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", type, RDF_TYPE_IRI, NULL, NULL); context->processor_graph_triple_callback(triple, context->callback_data); /* generate the description */ triple = rdfa_create_triple( subject, "http://purl.org/dc/terms/description", msg, RDF_TYPE_PLAIN_LITERAL, NULL, "en"); context->processor_graph_triple_callback(triple, context->callback_data); /* generate the context triple for the error */ triple = rdfa_create_triple( subject, "http://www.w3.org/ns/rdfa#context", context_subject, RDF_TYPE_IRI, NULL, NULL); context->processor_graph_triple_callback(triple, context->callback_data); /* generate the type for the context triple */ triple = rdfa_create_triple( context_subject, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "http://www.w3.org/2009/pointers#LineCharPointer", RDF_TYPE_IRI, NULL, NULL); context->processor_graph_triple_callback(triple, context->callback_data); /* generate the line number */ snprintf(buffer, sizeof(buffer) - 1, "%d", (int)xmlSAX2GetLineNumber(context->parser)); triple = rdfa_create_triple( context_subject, "http://www.w3.org/2009/pointers#lineNumber", buffer, RDF_TYPE_TYPED_LITERAL, "http://www.w3.org/2001/XMLSchema#positiveInteger", NULL); context->processor_graph_triple_callback(triple, context->callback_data); free(context_subject); free(subject); } } #endif /** * Completes all incomplete triples that are part of the current * context by matching the new_subject with the list of incomplete * triple predicates. * * @param context the RDFa context. */ void rdfa_complete_incomplete_triples(rdfacontext* context) { /* 10. If the [ skip element ] flag is 'false', and [ new subject ] * was set to a non-null value, then any [ incomplete triple ]s * within the current context should be completed: * * The [ list of incomplete triples ] from the current [ evaluation * context ] ( not the [ local list of incomplete triples ]) will * contain zero or more predicate URIs. This list is iterated, and * each of the predicates is used with [ parent subject ] and * [ new subject ] to generate a triple. Note that at each level * there are two , lists of [ incomplete triple ]s; one for the * current processing level (which is passed to each child element * in the previous step), and one that was received as part of the * [ evaluation context ]. It is the latter that is used in * processing during this step. */ unsigned int i; for(i = 0; i < context->incomplete_triples->num_items; i++) { rdfalist* incomplete_triples = context->incomplete_triples; rdfalistitem* incomplete_triple = incomplete_triples->items[i]; if(incomplete_triple->flags & RDFALIST_FLAG_DIR_NONE) { /* If direction is 'none', the new subject is added to the list * from the iterated incomplete triple. */ const char* predicate = (const char*)incomplete_triple->data; rdftriple* triple = rdfa_create_triple(context->parent_subject, predicate, context->new_subject, RDF_TYPE_IRI, NULL, NULL); /* ensure the list mapping exists */ rdfa_create_list_mapping( context, context->local_list_mappings, context->parent_subject, predicate); /* add the predicate to the list mapping */ rdfa_append_to_list_mapping(context->local_list_mappings, context->parent_subject, predicate, (void*)triple); } else if(incomplete_triple->flags & RDFALIST_FLAG_DIR_FORWARD) { /* If [direction] is 'forward' then the following triple is generated: * * subject * [parent subject] * predicate * the predicate from the iterated incomplete triple * object * [new subject] */ rdftriple* triple = rdfa_create_triple(context->parent_subject, (const char*)incomplete_triple->data, context->new_subject, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback(triple, context->callback_data); } else { /* If [direction] is not 'forward' then this is the triple generated: * * subject * [new subject] * predicate * the predicate from the iterated incomplete triple * object * [parent subject] */ rdftriple* triple = rdfa_create_triple(context->new_subject, (const char*)incomplete_triple->data, context->parent_subject, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback(triple, context->callback_data); } free(incomplete_triple->data); free(incomplete_triple); } context->incomplete_triples->num_items = 0; } void rdfa_complete_type_triples( rdfacontext* context, const rdfalist* type_of) { unsigned int i; rdfalistitem** iptr = type_of->items; const char* subject; const char* type; if(context->rdfa_version == RDFA_VERSION_1_0) { /* RDFa 1.0: 6.1 One or more 'types' for the [new subject] can be set by * using @type_of. If present, the attribute must contain one or * more URIs, obtained according to the section on URI and CURIE * Processing, each of which is used to generate a triple as follows: * * subject * [new subject] * predicate * http://www.w3.org/1999/02/22-rdf-syntax-ns#type * object * full URI of 'type' */ subject = context->new_subject; } else { /* RDFa 1.1: 7. One or more 'types' for the typed resource can be set by * using @typeof. If present, the attribute may contain one or more IRIs, * obtained according to the section on CURIE and IRI Processing, each of * which is used to generate a triple as follows: * * subject * typed resource * predicate * http://www.w3.org/1999/02/22-rdf-syntax-ns#type * object * current full IRI of 'type' from typed resource */ subject = context->typed_resource; } for(i = 0; i < type_of->num_items; i++) { rdfalistitem* iri = *iptr; rdftriple* triple; type = (const char*)iri->data; triple = rdfa_create_triple(subject, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", type, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback(triple, context->callback_data); iptr++; } } void rdfa_complete_relrev_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev) { /* 7. If in any of the previous steps a [current object resource] * was set to a non-null value, it is now used to generate triples */ unsigned int i; /* Predicates for the [current object resource] can be set by using * one or both of the @rel and @rev attributes. */ /* If present, @rel will contain one or more URIs, obtained * according to the section on CURIE and URI Processing each of * which is used to generate a triple as follows: * * subject * [new subject] * predicate * full URI * object * [current object resource] */ if(rel != NULL) { rdfalistitem** relptr = rel->items; for(i = 0; i < rel->num_items; i++) { rdfalistitem* curie = *relptr; rdftriple* triple = rdfa_create_triple(context->new_subject, (const char*)curie->data, context->current_object_resource, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback(triple, context->callback_data); relptr++; } } /* If present, @rev will contain one or more URIs, obtained * according to the section on CURIE and URI Processing each of which * is used to generate a triple as follows: * * subject * [current object resource] * predicate * full URI * object * [new subject] */ if(rev != NULL) { rdfalistitem** revptr = rev->items; for(i = 0; i < rev->num_items; i++) { rdfalistitem* curie = *revptr; rdftriple* triple = rdfa_create_triple( context->current_object_resource, (const char*)curie->data, context->new_subject, RDF_TYPE_IRI, NULL, NULL); context->default_graph_triple_callback(triple, context->callback_data); revptr++; } } } void rdfa_save_incomplete_triples( rdfacontext* context, const rdfalist* rel, const rdfalist* rev) { unsigned int i; /* 8. If however [current object resource] was set to null, but * there are predicates present, then they must be stored as * [incomplete triple]s, pending the discovery of a subject that * can be used as the object. Also, [current object resource] * should be set to a newly created [bnode] */ if(context->current_object_resource == NULL) { context->current_object_resource = rdfa_create_bnode(context); } /* If present, @rel must contain one or more URIs, obtained * according to the section on CURIE and URI Processing each of * which is added to the [local local list of incomplete triples] * as follows: * * predicate * full URI * direction * forward */ if(rel != NULL) { rdfalistitem** relptr = rel->items; for(i = 0; i < rel->num_items; i++) { rdfalistitem* curie = *relptr; rdfa_add_item( context->local_incomplete_triples, curie->data, (liflag_t)(RDFALIST_FLAG_DIR_FORWARD | RDFALIST_FLAG_TEXT)); relptr++; } } /* If present, @rev must contain one or more URIs, obtained * according to the section on CURIE and URI Processing, each of * which is added to the [local list of incomplete triples] as follows: * * predicate * full URI * direction * reverse */ if(rev != NULL) { rdfalistitem** revptr = rev->items; for(i = 0; i < rev->num_items; i++) { rdfalistitem* curie = *revptr; rdfa_add_item( context->local_incomplete_triples, curie->data, (liflag_t)(RDFALIST_FLAG_DIR_REVERSE | RDFALIST_FLAG_TEXT)); revptr++; } } } void rdfa_complete_object_literal_triples(rdfacontext* context) { /* 9. The next step of the iteration is to establish any * [current object literal]; * * Predicates for the [current object literal] can be set by using * @property. If present, a URI is obtained according to the * section on CURIE and URI Processing, and then the actual literal * value is obtained as follows: */ const char* current_object_literal = NULL; rdfresource_t type = RDF_TYPE_UNKNOWN; unsigned int i; rdfalistitem** pptr; /* * as a [plain literal] if: * o @content is present; * o or all children of the [current element] are text nodes; * o or there are no child nodes; TODO: Is this needed? * o or the body of the [current element] does have non-text * child nodes but @datatype is present, with an empty value. * * Additionally, if there is a value for [current language] then * the value of the [plain literal] should include this language * information, as described in [RDF-CONCEPTS]. The actual literal * is either the value of @content (if present) or a string created * by concatenating the text content of each of the descendant * elements of the [current element] in document order. */ if((context->content != NULL)) { current_object_literal = context->content; type = RDF_TYPE_PLAIN_LITERAL; } else if(context->xml_literal && strchr(context->xml_literal, '<') == NULL) { current_object_literal = context->plain_literal; type = RDF_TYPE_PLAIN_LITERAL; } else if(strlen(context->plain_literal) == 0) { current_object_literal = (const char*)""; type = RDF_TYPE_PLAIN_LITERAL; } else if((context->xml_literal != NULL) && (context->datatype != NULL) && (strlen(context->xml_literal) > 0) && (strcmp(context->datatype, "") == 0)) { current_object_literal = context->plain_literal; type = RDF_TYPE_PLAIN_LITERAL; } /* * as an [XML literal] if: * o the [current element] has any child nodes that are not * simply text nodes, and @datatype is not present, or is * present, but is set to rdf:XMLLiteral. * * The value of the [XML literal] is a string created by * serializing to text, all nodes that are descendants of the * [current element], i.e., not including the element itself, and * giving it a datatype of rdf:XMLLiteral. */ if((context->xml_literal != NULL) && (current_object_literal == NULL) && (strchr(context->xml_literal, '<') != NULL) && ((context->datatype == NULL) || (strcmp(context->datatype, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") == 0))) { current_object_literal = context->xml_literal; type = RDF_TYPE_XML_LITERAL; } /* * as a [typed literal] if: * o @datatype is present, and does not have an empty * value. * * The actual literal is either the value of @content (if present) * or a string created by concatenating the value of all descendant * text nodes, of the [current element] in turn. The final string * includes the datatype URI, as described in [RDF-CONCEPTS], which * will have been obtained according to the section on CURIE and * URI Processing. */ if((context->datatype != NULL) && (strlen(context->datatype) > 0)) { if(context->content != NULL) { /* Static code analyzer clang says next line is not needed; * "Assigned value is always the same as the existing value" */ /* current_object_literal = context->content; */ type = RDF_TYPE_TYPED_LITERAL; } else if(strcmp(context->datatype, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") != 0) { current_object_literal = context->plain_literal; type = RDF_TYPE_TYPED_LITERAL; } } /* TODO: Setting the current object literal to the plain literal in * the case of xsd:string isn't mentioned in the syntax * processing document. */ if((current_object_literal == NULL) && (context->datatype != NULL) && (strcmp( context->datatype, "http://www.w3.org/2001/XMLSchema#string") == 0)) { current_object_literal = context->plain_literal; type = RDF_TYPE_TYPED_LITERAL; } /* The [current object literal] is then used with each predicate to * generate a triple as follows: * * subject * [new subject] * predicate * full URI * object * [current object literal] */ pptr = context->property->items; for(i = 0; i < context->property->num_items; i++) { rdfalistitem* curie = *pptr; rdftriple* triple = NULL; triple = rdfa_create_triple(context->new_subject, (const char*)curie->data, current_object_literal, type, context->datatype, context->language); context->default_graph_triple_callback(triple, context->callback_data); pptr++; } /* TODO: Implement recurse flag being set to false * * Once the triple has been created, if the [datatype] of the * [current object literal] is rdf:XMLLiteral, then the [recurse] * flag is set to false */ context->recurse = 0; } void rdfa_complete_current_property_value_triples(rdfacontext* context) { /* 11. The next step of the iteration is to establish any current property * value; * Predicates for the current property value can be set by using @property. * If present, one or more resources are obtained according to the section * on CURIE and IRI Processing, and then the actual literal value is * obtained as follows: */ char* current_property_value = NULL; rdfresource_t type = RDF_TYPE_UNKNOWN; unsigned int i; rdfalistitem** pptr; /* as a typed literal if @datatype is present, does not have an empty * value according to the section on CURIE and IRI Processing, and is not * set to XMLLiteral in the vocabulary * http://www.w3.org/1999/02/22-rdf-syntax-ns#. */ if((context->datatype != NULL) && (strcmp(context->datatype, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") != 0)) { /* The actual literal is either the value of @content (if present) or a * string created by concatenating the value of all descendant text nodes, * of the current element in turn. */ if(context->content != NULL) { current_property_value = context->content; } else { current_property_value = context->plain_literal; } /* The final string includes the datatype * IRI, as described in [RDF-CONCEPTS], which will have been obtained * according to the section on CURIE and IRI Processing. * otherwise, as a plain literal if @datatype is present but has an * empty value according to the section on CURIE and IRI Processing. */ if(strlen(context->datatype) > 0) { type = RDF_TYPE_TYPED_LITERAL; } else { type = RDF_TYPE_PLAIN_LITERAL; } } else if((context->datatype != NULL) && (strcmp(context->datatype, "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") == 0)) { /* otherwise, as an XML literal if @datatype is present and is set to * XMLLiteral in the vocabulary * http://www.w3.org/1999/02/22-rdf-syntax-ns#. * The value of the XML literal is a string created by serializing to * text, all nodes that are descendants of the current element, i.e., not * including the element itself, and giving it a datatype of XMLLiteral * in the vocabulary http://www.w3.org/1999/02/22-rdf-syntax-ns#. The * format of the resulting serialized content is as defined in Exclusive * XML Canonicalization Version [XML-EXC-C14N]. * In order to maintain maximum portability of this literal, any children * of the current node that are elements must have the current XML * namespace declarations (if any) declared on the serialized element. * Since the child element node could also declare new XML namespaces, * the RDFa Processor must be careful to merge these together when * generating the serialized element definition. For avoidance of doubt, * any re-declarations on the child node must take precedence over * declarations that were active on the current node. */ current_property_value = context->xml_literal; type = RDF_TYPE_XML_LITERAL; } else if(context->content != NULL) { /* otherwise, as an plain literal using the value of @content if * @content is present. */ current_property_value = context->content; type = RDF_TYPE_PLAIN_LITERAL; } else if((context->rel_present == 0) && (context->rev_present == 0) && (context->content == NULL)) { /* otherwise, if the @rel, @rev, and @content attributes are not present, * as a resource obtained from one of the following: */ if(context->resource != NULL) { /* by using the resource from @resource, if present, obtained * according to the section on CURIE and IRI Processing; */ current_property_value = context->resource; type = RDF_TYPE_IRI; } else if(context->href != NULL) { /* otherwise, by using the IRI from @href, if present, obtained * according to the section on CURIE and IRI Processing; */ current_property_value = context->href; type = RDF_TYPE_IRI; } else if(context->src != NULL) { /* otherwise, by using the IRI from @src, if present, obtained * according to the section on CURIE and IRI Processing. */ current_property_value = context->src; type = RDF_TYPE_IRI; } else if((context->about == NULL) && (context->typed_resource != NULL)) { /* otherwise, if @typeof is present and @about is not, the value of * typed resource. */ current_property_value = context->typed_resource; type = RDF_TYPE_IRI; } else { /* otherwise as a plain literal. */ current_property_value = context->plain_literal; type = RDF_TYPE_PLAIN_LITERAL; } } else { /* otherwise as a plain literal. */ current_property_value = context->plain_literal; type = RDF_TYPE_PLAIN_LITERAL; } /* Additionally, if there is a value for current language then the value * of the plain literal should include this language information, as * described in [RDF-CONCEPTS]. The actual literal is either the value * of @content (if present) or a string created by concatenating the text * content of each of the descendant elements of the current element in * document order. * * NOTE: This happens automatically due to the way the code is setup. */ if(context->inlist_present) { /* The current property value is then used with each predicate as * follows: * If the element also includes the @inlist attribute, the current * property value is added to the local list mapping as follows: * if the local list mapping does not contain a list associated with * the predicate IRI, instantiate a new list and add to local list * mappings add the current property value to the list associated * with the predicate IRI in the local list mapping */ rdfa_establish_new_inlist_triples( context, context->property, current_property_value, type); } else { pptr = context->property->items; for(i = 0; i < context->property->num_items; i++) { /* Otherwise the current property value is used to generate a triple * as follows: * subject * new subject * predicate * full IRI * object * current property value */ rdfalistitem* curie = *pptr; rdftriple* triple = rdfa_create_triple(context->new_subject, (const char*)curie->data, current_property_value, type, context->datatype, context->language); context->default_graph_triple_callback(triple, context->callback_data); pptr++; } } } raptor2-2.0.15/librdfa/rdfa.h0000644000175000017500000002511011771651571012613 00000000000000/** * Copyright 2008-2010 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * You should have received a copy of the GNU Lesser General Public * License along with librdfa. If not, see . * * The librdfa library is the Fastest RDFa Parser in the Universe. It is * a stream parser, meaning that it takes an XML data as input and spits * out RDF triples as it comes across them in the stream. Due to this * processing approach, librdfa has a very, very small memory footprint. * It is also very fast and can operate on hundreds of gigabytes of XML * data without breaking a sweat. * * Usage: * * rdfacontext* context = rdfa_create_context(base_uri); * context->callback_data = your_user_data; * rdfa_set_triple_handler(context, triple_function); * rdfa_set_buffer_filler(context, buffer_filler_function); * rdfa_parse(context); * rdfa_free_context(context); * * If you would like to get warnings/error triples from the processor graph: * * rdfa_set_issue_handler(context, triple_function); * * Usage if you need more control over when to fill rdfa's buffer: * * rdfacontext* context = rdfa_create_context(base_uri); * context->callback_data = your_user_data; * rdfa_set_triple_handler(context, triple_function); * int rval = rdfa_parse_start(context); * if(rval == RDFA_PARSE_SUCCESS) * { * FILE* myfile = fopen("myfilename"); * size_t buf_len = 0; * size_t read = 0; * do * { * char* buf = rdfa_get_buffer(context, &buf_len); * if(buf_len > 0) * { * // fill buffer here up to buf_len bytes from your input stream * read = fread(buf, sizeof(char), buf_len, myfile); * } * * // parse the read data * rdfa_parse_buffer(context, read); * } * while(read > 0); * fclose(myfile); * * rdfa_parse_end(context); * } * rdfa_free_context(context); * */ #ifndef _LIBRDFA_RDFA_H_ #define _LIBRDFA_RDFA_H_ #include #include /* Activate the stupid Windows DLL exporting mechanism if we're building for Windows */ #ifdef WIN32 #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT #endif #ifdef LIBRDFA_IN_RAPTOR #include "raptor2.h" #include "raptor_internal.h" #endif /* LIBRDFA_IN_RAPTOR */ #ifdef __cplusplus extern "C" { #endif #define DEBUG 0 /* RDFa version numbers */ #define RDFA_VERSION_1_0 1 #define RDFA_VERSION_1_1 2 /* parse process return types */ #define RDFA_PARSE_WARNING -2 #define RDFA_PARSE_FAILED -1 #define RDFA_PARSE_UNKNOWN 0 #define RDFA_PARSE_SUCCESS 1 /* maximum list lengths */ #define MAX_LOCAL_LIST_MAPPINGS 32 #define MAX_LIST_MAPPINGS 48 #define MAX_LIST_ITEMS 16 #define MAX_TERM_MAPPINGS 64 #define MAX_URI_MAPPINGS 128 #define MAX_INCOMPLETE_TRIPLES 128 /* host language definitions */ #define HOST_LANGUAGE_NONE 0 #define HOST_LANGUAGE_XML1 1 #define HOST_LANGUAGE_XHTML1 2 #define HOST_LANGUAGE_HTML 3 /* default mapping key for xmlns */ #define XMLNS_DEFAULT_MAPPING "XMLNS_DEFAULT" /* whitespace characters for RDFa Core 1.1 */ #define RDFA_WHITESPACE " \t\n\v\f\r" /** * An RDF resource type is used to denote the content of a triple's * object value. */ typedef enum { RDF_TYPE_NAMESPACE_PREFIX, RDF_TYPE_IRI, RDF_TYPE_PLAIN_LITERAL, RDF_TYPE_XML_LITERAL, RDF_TYPE_TYPED_LITERAL, RDF_TYPE_UNKNOWN } rdfresource_t; /** * An RDF triple is the result of an RDFa statement that contains, at * the very least, a subject, a predicate and an object. It is the * smallest, complete statement one can make in RDF. */ typedef struct rdftriple { char* subject; char* predicate; char* object; rdfresource_t object_type; char* datatype; char* language; } rdftriple; /** * The specification for a callback that is capable of handling * triples. Produces a triple that must be freed once the application * is done with the object. */ typedef void (*triple_handler_fp)(rdftriple*, void*); /** * The specification for a callback that is used to fill the input buffer * with data to parse. */ typedef size_t (*buffer_filler_fp)(char*, size_t, void*); /** * An RDFA list item is used to hold each datum in an rdfa list. It * contains a list of flags as well as the data for the list member. */ typedef struct rdfalistitem { unsigned char flags; void* data; } rdfalistitem; /** * An RDFa list is used to store multiple text strings that have a set * of attributes associated with them. These can be lists of CURIEs, * or lists of incomplete triples. The structure grows with use, but * cannot be shrunk. */ typedef struct rdfalist { rdfalistitem** items; size_t num_items; size_t max_items; unsigned int user_data; } rdfalist; /** * The RDFa Parser structure is responsible for keeping track of the state of * the current RDFa parser. Things such as the default namespace, * CURIE mappings, and other context-specific */ typedef struct rdfacontext { unsigned char rdfa_version; char* base; char* parent_subject; char* parent_object; char* default_vocabulary; #ifndef LIBRDFA_IN_RAPTOR void** uri_mappings; #endif void** term_mappings; void** list_mappings; void** local_list_mappings; rdfalist* incomplete_triples; rdfalist* local_incomplete_triples; char* language; unsigned char host_language; triple_handler_fp default_graph_triple_callback; buffer_filler_fp buffer_filler_callback; triple_handler_fp processor_graph_triple_callback; unsigned char recurse; unsigned char skip_element; char* new_subject; char* current_object_resource; char* about; char* typed_resource; char* resource; char* href; char* src; char* content; char* datatype; rdfalist* property; unsigned char inlist_present; unsigned char rel_present; unsigned char rev_present; char* plain_literal; size_t plain_literal_size; char* xml_literal; size_t xml_literal_size; void* callback_data; /* parse state */ size_t bnode_count; char* underscore_colon_bnode_name; unsigned char xml_literal_namespaces_defined; unsigned char xml_literal_xml_lang_defined; size_t wb_allocated; char* working_buffer; size_t wb_position; #ifdef LIBRDFA_IN_RAPTOR raptor_world *world; raptor_locator *locator; /* a pointer (in every context) to the error_handlers structure * held in the raptor_parser object */ raptor_uri* base_uri; raptor_sax2* sax2; raptor_namespace_handler namespace_handler; void* namespace_handler_user_data; int raptor_rdfa_version; /* 10 or 11 or otherwise default */ #else xmlParserCtxtPtr parser; #endif int done; rdfalist* context_stack; size_t wb_preread; int preread; int depth; } rdfacontext; /** * Creates an initial context for RDFa. * * @param base The base URI that should be used for the parser. * * @return a pointer to the base RDFa context, or NULL if memory * allocation failed. */ DLLEXPORT rdfacontext* rdfa_create_context(const char* base); /** * Sets the default graph triple handler for the application. * * @param context the base rdfa context for the application. * @param th the triple handler function. */ DLLEXPORT void rdfa_set_default_graph_triple_handler( rdfacontext* context, triple_handler_fp th); /** * Sets the processor graph triple handler for the application. * * @param context the base rdfa context for the application. * @param th the triple handler function. */ DLLEXPORT void rdfa_set_processor_graph_triple_handler( rdfacontext* context, triple_handler_fp th); /** * Sets the buffer filler for the application. * * @param context the base rdfa context for the application. * @param bf the buffer filler function. */ DLLEXPORT void rdfa_set_buffer_filler( rdfacontext* context, buffer_filler_fp bf); /** * Starts processing given the base rdfa context. * * @param context the base rdfa context. * * @return RDFA_PARSE_SUCCESS if everything went well. RDFA_PARSE_FAILED * if there was a fatal error and RDFA_PARSE_WARNING if there * was a non-fatal error. */ DLLEXPORT int rdfa_parse(rdfacontext* context); DLLEXPORT int rdfa_parse_start(rdfacontext* context); DLLEXPORT int rdfa_parse_chunk( rdfacontext* context, char* data, size_t wblen, int done); /** * Gets the input buffer for the given context so it can be filled with data. * A pointer to the buffer will be returned and the maximum number of bytes * that can be written to that buffer will be set to the blen parameter. Once * data has been written to the buffer, rdfa_parse_buffer() should be called. * * @param context the base rdfa context. * @param blen the variable to set to the buffer length. * * @return a pointer to the context's input buffer. */ DLLEXPORT char* rdfa_get_buffer(rdfacontext* context, size_t* blen); /** * Informs the parser to attempt to parse more of the given context's input * buffer. To fill the input buffer with data, call rdfa_get_buffer(). * * If any of the input buffer can be parsed, it will be. It is possible * that none of the data will be parsed, in which case this function will * still return RDFA_PARSE_SUCCESS. More data should be written to the input * buffer using rdfa_get_buffer() as it is made available to the application. * Once there is no more data to write, rdfa_parse_end() should be called. * * @param context the base rdfa context. * @param bytes the number of bytes written to the input buffer via the last * call to rdfa_get_buffer(), a value of 0 will indicate that there * is no more data to parse. * * @return RDFA_PARSE_SUCCESS if everything went well. RDFA_PARSE_FAILED * if there was a fatal error and RDFA_PARSE_WARNING if there * was a non-fatal error. */ DLLEXPORT int rdfa_parse_buffer(rdfacontext* context, size_t bytes); DLLEXPORT void rdfa_parse_end(rdfacontext* context); DLLEXPORT void rdfa_init_context(rdfacontext* context); DLLEXPORT char* rdfa_iri_get_base(const char* iri); /** * Destroys the given rdfa context by freeing all memory associated * with the context. * * @param context the rdfa context. */ DLLEXPORT void rdfa_free_context(rdfacontext* context); #ifdef __cplusplus } #endif #endif raptor2-2.0.15/librdfa/subject.c0000644000175000017500000004704411757416510013337 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * This file is used to process RDFa subjects. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa_utils.h" #include "rdfa.h" /** * Creates a new bnode given an RDFa context. * * @param context the RDFa context. * * @return a newly allocated string containing the bnode name. This * string MUST be memory collected. */ char* rdfa_create_bnode(rdfacontext* context) { char* rval = NULL; char buffer[64]; /* print and increment the bnode count */ sprintf(buffer, "_:bnode%i", (int)context->bnode_count++); rval = rdfa_replace_string(rval, buffer); return rval; } /** * Establishes a new subject for the given context given the * attributes on the current element. The given context's new_subject * value is updated if a new subject is found. * * @param context the RDFa context. * @param name the name of the current element that is being processed. * @param about the full IRI for about, or NULL if there isn't one. * @param src the full IRI for src, or NULL if there isn't one. * @param resource the full IRI for resource, or NULL if there isn't one. * @param href the full IRI for href, or NULL if there isn't one. * @param type_of The list of IRIs for type_of, or NULL if there was * no type_of specified. */ void rdfa_establish_new_1_0_subject( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of) { /* 4. If the [current element] contains no valid @rel or @rev * URI, obtained according to the section on CURIE and URI * Processing, then the next step is to establish a value for * [new subject]. Any of the attributes that can carry a * resource can set [new subject]; */ if(about != NULL) { /* * by using the URI from @about, if present, obtained according * to the section on CURIE and URI Processing; */ context->new_subject = rdfa_replace_string(context->new_subject, about); } else if(src != NULL) { /* * otherwise, by using the URI from @src, if present, obtained * according to the section on CURIE and URI Processing. */ context->new_subject = rdfa_replace_string(context->new_subject, src); } else if(resource != NULL) { /* * otherwise, by using the URI from @resource, if present, * obtained according to the section on CURIE and URI * Processing; */ context->new_subject = rdfa_replace_string(context->new_subject, resource); } else if(href != NULL) { /* * otherwise, by using the URI from @href, if present, obtained * according to the section on CURIE and URI Processing. */ context->new_subject = rdfa_replace_string(context->new_subject, href); } else if((type_of != NULL) && (type_of->num_items > 0)) { /* * if @type_of is present, obtained according to the * section on CURIE and URI Processing, then [new subject] is * set to be a newly created [bnode]; */ char* bnode = rdfa_create_bnode(context); context->new_subject = rdfa_replace_string(context->new_subject, bnode); free(bnode); } else if(context->parent_object != NULL) { /* * otherwise, if [parent object] is present, [new subject] is * set to that and the [skip element] flag is set to 'true'; */ context->new_subject = rdfa_replace_string(context->new_subject, context->parent_object); /* TODO: The skip element flag will be set even if there is a * @property value, which is a bug, isn't it? */ /*context->skip_element = 1;*/ } } /** * Establishes a new subject for the given context given the * attributes on the current element. The given context's new_subject * value is updated if a new subject is found. * * @param context the RDFa context. * @param name the name of the current element that is being processed. * @param about the full IRI for about, or NULL if there isn't one. * @param src the full IRI for src, or NULL if there isn't one. * @param resource the full IRI for resource, or NULL if there isn't one. * @param href the full IRI for href, or NULL if there isn't one. * @param type_of The list of IRIs for type_of, or NULL if there was * no type_of specified. * @param property a list of properties that were detected during processing. */ void rdfa_establish_new_1_1_subject( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of, const rdfalist* property, const char* content, const char* datatype) { /* * If the current element contains the @property attribute, but does not * contain either the @content or @datatype attributes, then new subject * is set to the resource obtained from the first match from the * following rule: */ if(property != NULL && content == NULL && datatype == NULL) { /* by using the resource from @about, if present, obtained according to * the section on CURIE and IRI Processing; */ if(about != NULL) { /* NOTE: this statement achieves this part of the processing rule * as well because @about is set if depth == 1 in RDFa 1.1 in * the calling function: otherwise, if the element is the root * element of the document, then act as if there is an empty * @about present, and process it according to the rule for * @about, above; */ context->new_subject = rdfa_replace_string(context->new_subject, about); } else if(context->parent_object != NULL) { /* otherwise, if parent object is present, new subject is set * to the value of parent object. */ context->new_subject = rdfa_replace_string(context->new_subject, context->parent_object); } /* If @typeof is present then typed resource is set to the resource * obtained from the first match from the following rules: */ if(type_of != NULL) { if(about != NULL) { /* by using the resource from @about, if present, obtained * according to the section on CURIE and IRI Processing; * * NOTE: about is set to the document if this is the root * element of the document, so the following rule is also applied * in this case: * * otherwise, if the element is the root element of the * document, then act as if there is an empty @about present * and process it according to the previous rule; */ context->typed_resource = rdfa_replace_string(context->typed_resource, about); } else { if(resource != NULL) { /* by using the resource from @resource, if present, obtained * according to the section on CURIE and IRI Processing; */ context->typed_resource = rdfa_replace_string(context->typed_resource, resource); } else if(href != NULL) { /* otherwise, by using the IRI from @href, if present, obtained * according to the section on CURIE and IRI Processing; */ context->typed_resource = rdfa_replace_string(context->typed_resource, href); } else if(src != NULL) { /* otherwise, by using the IRI from @src, if present, obtained * according to the section on CURIE and IRI Processing; */ context->typed_resource = rdfa_replace_string(context->typed_resource, src); } else { /* otherwise, the value of typed resource is set to a newly * created bnode. */ char* bnode = rdfa_create_bnode(context); context->typed_resource = rdfa_replace_string( context->typed_resource, bnode); free(bnode); } /* The value of the current object resource is then set to the value * of typed resource. */ context->current_object_resource = rdfa_replace_string( context->current_object_resource, context->typed_resource); } } } else { /* otherwise: * If the element contains an @about, @href, @src, or @resource attribute, * new subject is set to the resource obtained as follows: */ if(about != NULL || href != NULL || src != NULL || resource != NULL) { if(about != NULL) { /* by using the resource from @about, if present, obtained * according to the section on CURIE and IRI Processing; */ context->new_subject = rdfa_replace_string(context->new_subject, about); } else if(resource != NULL) { /* otherwise, by using the resource from @resource, if present, * obtained according to the section on CURIE and IRI Processing; */ context->new_subject = rdfa_replace_string(context->new_subject, resource); } else if(href != NULL) { /* otherwise, by using the IRI from @href, if present, obtained * according to the section on CURIE and IRI Processing; */ context->new_subject = rdfa_replace_string(context->new_subject, href); } else if(src != NULL) { /* otherwise, by using the IRI from @src, if present, obtained * according to the section on CURIE and IRI Processing. */ context->new_subject = rdfa_replace_string(context->new_subject, src); } } else { /* otherwise, if no resource is provided by a resource attribute, * then the first match from the following rules will apply: */ /* NOTE: this step is achieved via the parent function call as @about * is set if the current element is the root element. * * if the element is the root element of the document, then act * as if there is an empty @about present, and process it according * to the rule for @about, above; */ if(type_of != NULL) { /* otherwise, if @typeof is present, then new subject is set * to be a newly created bnode; */ char* bnode = rdfa_create_bnode(context); context->new_subject = rdfa_replace_string(context->new_subject, bnode); free(bnode); } else if(context->parent_object != NULL) { /* otherwise, if parent object is present, new subject is set to * the value of parent object. */ context->new_subject = rdfa_replace_string(context->new_subject, context->parent_object); /* Additionally, if @property is not present then the skip * element flag is set to 'true'. */ if(property == NULL) { context->skip_element = 1; } } } if(type_of != NULL) { /* Finally, if @typeof is present, set the typed resource to the value * of new subject. */ context->typed_resource = rdfa_replace_string(context->typed_resource, context->new_subject); } } } /** * Establishes a new subject for the given context when @rel or @rev * is present. The given context's new_subject and * current_object_resource values are updated if a new subject is found. * * @param context the RDFa context. * @param about the full IRI for about, or NULL if there isn't one. * @param src the full IRI for src, or NULL if there isn't one. * @param resource the full IRI for resource, or NULL if there isn't one. * @param href the full IRI for href, or NULL if there isn't one. * @param type_of the list of IRIs for type_of, or NULL if type_of * wasn't specified on the current element. */ void rdfa_establish_new_1_0_subject_with_relrev( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of) { /* 5. If the [current element] does contain a valid @rel or @rev * URI, obtained according to the section on CURIE and URI * Processing, then the next step is to establish both a value * for [new subject] and a value for [current object resource]: * * [new subject] is set to the URI obtained from the first match * from the following rules: */ if(about != NULL) { /* * by using the URI from @about, if present, obtained * according to the section on CURIE and URI Processing; */ context->new_subject = rdfa_replace_string(context->new_subject, about); } else if(context->rdfa_version == RDFA_VERSION_1_0 && src != NULL) { /* * otherwise, by using the URI from @src, if present, obtained * according to the section on CURIE and URI Processing. */ context->new_subject = rdfa_replace_string(context->new_subject, src); } else if((type_of != NULL) && (type_of->num_items > 0)) { /* * if @type_of is present, obtained according to the * section on CURIE and URI Processing, then [new subject] is * set to be a newly created [bnode]; */ char* bnode = rdfa_create_bnode(context); context->new_subject = rdfa_replace_string(context->new_subject, bnode); free(bnode); } else if(context->parent_object != NULL) { /* * otherwise, if [parent object] is present, [new subject] is * set to that; */ context->new_subject = rdfa_replace_string(context->new_subject, context->parent_object); } /* Then the [current object resource] is set to the URI obtained * from the first match from the following rules: */ if(resource != NULL) { /* * by using the URI from @resource, if present, obtained * according to the section on CURIE and URI Processing; */ context->current_object_resource = rdfa_replace_string(context->current_object_resource, resource); } else if(href != NULL) { /* * otherwise, by using the URI from @href, if present, * obtained according to the section on CURIE and URI Processing. */ context->current_object_resource = rdfa_replace_string(context->current_object_resource, href); } else { /* * otherwise, null. */ context->current_object_resource = NULL; } /* Note that final value of the [current object resource] will * either be null, or a full URI. */ } /** * Establishes a new subject for the given context when @rel or @rev * is present. The given context's new_subject and * current_object_resource values are updated if a new subject is found. * * @param context the RDFa context. * @param about the full IRI for about, or NULL if there isn't one. * @param src the full IRI for src, or NULL if there isn't one. * @param resource the full IRI for resource, or NULL if there isn't one. * @param href the full IRI for href, or NULL if there isn't one. * @param type_of the list of IRIs for type_of, or NULL if type_of * wasn't specified on the current element. */ void rdfa_establish_new_1_1_subject_with_relrev( rdfacontext* context, const char* name, const char* about, const char* src, const char* resource, const char* href, const rdfalist* type_of) { /* If the current element does contain a @rel or @rev attribute, then * the next step is to establish both a value for new subject and a * value for current object resource: */ /* new subject is set to the resource obtained from the first match from * the following rules: */ if(about != NULL) { /* by using the resource from @about, if present, obtained according * to the section on CURIE and IRI Processing; * * NOTE: This will also catch the following rule due to @about being * set in the calling function: * * if the element is the root element of the document then act as if * there is an empty @about present, and process it according to the * rule for @about, above; */ context->new_subject = rdfa_replace_string(context->new_subject, about); } if(type_of != NULL) { /* if the @typeof attribute is present, set typed resource to * new subject. */ context->typed_resource = rdfa_replace_string(context->typed_resource, context->new_subject); } /* If no resource is provided then the first match from the following rules * will apply: * */ if(context->new_subject == NULL && context->parent_object != NULL) { /* otherwise, if parent object is present, new subject is set to that. */ context->new_subject = rdfa_replace_string( context->new_subject, context->parent_object); } /* Then the current object resource is set to the resource obtained from * the first match from the following rules: */ if(resource != NULL) { /* by using the resource from @resource, if present, obtained according * to the section on CURIE and IRI Processing; */ context->current_object_resource = rdfa_replace_string( context->current_object_resource, resource); } else if(href != NULL) { /* otherwise, by using the IRI from @href, if present, obtained * according to the section on CURIE and IRI Processing; */ context->current_object_resource = rdfa_replace_string( context->current_object_resource, href); } else if(src != NULL) { /* otherwise, by using the IRI from @src, if present, obtained * according to the section on CURIE and IRI Processing; */ context->current_object_resource = rdfa_replace_string( context->current_object_resource, src); } else if(type_of != NULL && about == NULL) { /* otherwise, if @typeof is present and @about is not, use a * newly created bnode. */ char* bnode = rdfa_create_bnode(context); context->current_object_resource = rdfa_replace_string( context->current_object_resource, bnode); free(bnode); } if(type_of != NULL && about == NULL) { /* If @typeof is present and @about is not, set typed resource to current * object resource. */ context->typed_resource = rdfa_replace_string( context->typed_resource, context->current_object_resource); } /* Note that final value of the current object resource will either be * null (from initialization) or a full IRI or bnode. */ } raptor2-2.0.15/librdfa/context.c0000644000175000017500000005352311771651571013367 00000000000000/** * Copyright 2008-2012 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The librdfa library is the Fastest RDFa Parser in the Universe. It is * a stream parser, meaning that it takes an XML data as input and spits * out RDF triples as it comes across them in the stream. Due to this * processing approach, librdfa has a very, very small memory footprint. * It is also very fast and can operate on hundreds of gigabytes of XML * data without breaking a sweat. */ #ifdef HAVE_CONFIG_H # include #endif #include #include "rdfa_utils.h" #include "rdfa.h" rdfacontext* rdfa_create_context(const char* base) { rdfacontext* rval = NULL; size_t base_length = strlen(base); /* if the base isn't specified, don't create a context */ if(base_length > 0) { char* cleaned_base; /* malloc and init whole context to NULL */ rval = (rdfacontext*)malloc(sizeof(rdfacontext)); if(!rval) return NULL; memset(rval, 0, sizeof(rdfacontext)); /* clean and initialize base */ cleaned_base = rdfa_iri_get_base(base); rval->base = rdfa_replace_string(rval->base, cleaned_base); free(cleaned_base); } else { #ifdef LIBRDFA_IN_RAPTOR #else printf("librdfa error: Failed to create a parsing context, " "base IRI was not specified!\n"); #endif } return rval; } void rdfa_init_context(rdfacontext* context) { /* assume the RDFa processing rules are RDFa 1.1 unless otherwise specified */ context->rdfa_version = RDFA_VERSION_1_1; /* assume the default host language is XML1 */ context->host_language = HOST_LANGUAGE_XML1; /* the [parent subject] is set to the [base] value; */ context->parent_subject = NULL; if(context->base != NULL) { char* cleaned_base = rdfa_iri_get_base(context->base); context->parent_subject = rdfa_replace_string(context->parent_subject, cleaned_base); free(cleaned_base); } /* the [parent object] is set to null; */ context->parent_object = NULL; #ifdef LIBRDFA_IN_RAPTOR #else /* the [list of URI mappings] is cleared; */ context->uri_mappings = rdfa_create_mapping(MAX_URI_MAPPINGS); #endif /* the [list of incomplete triples] is cleared; */ context->incomplete_triples = rdfa_create_list(3); /* the [language] is set to null. */ context->language = NULL; /* set the [current object resource] to null; */ context->current_object_resource = NULL; /* the list of term mappings is set to null * (or a list defined in the initial context of the Host Language). */ context->term_mappings = rdfa_create_mapping(MAX_TERM_MAPPINGS); /* the maximum number of list mappings */ context->list_mappings = rdfa_create_mapping(MAX_LIST_MAPPINGS); /* the maximum number of local list mappings */ context->local_list_mappings = rdfa_create_mapping(MAX_LOCAL_LIST_MAPPINGS); /* the default vocabulary is set to null * (or a IRI defined in the initial context of the Host Language). */ context->default_vocabulary = NULL; /* whether or not the @inlist attribute is present on the current element */ context->inlist_present = 0; /* whether or not the @rel attribute is present on the current element */ context->rel_present = 0; /* whether or not the @rev attribute is present on the current element */ context->rev_present = 0; /* 1. First, the local values are initialized, as follows: * * * the [recurse] flag is set to 'true'; */ context->recurse = 1; /* * the [skip element] flag is set to 'false'; */ context->skip_element = 0; /* * [new subject] is set to null; */ context->new_subject = NULL; /* * [current object resource] is set to null; */ context->current_object_resource = NULL; /* * the [local list of URI mappings] is set to the list of URI * mappings from the [evaluation context]; * NOTE: This step is done in rdfa_create_new_element_context() */ /* FIXME: Initialize the term mappings and URI mappings based on Host Language */ /* * the [local list of incomplete triples] is set to null; */ context->local_incomplete_triples = rdfa_create_list(3); /* * the [current language] value is set to the [language] value * from the [evaluation context]. * NOTE: This step is done in rdfa_create_new_element_context() */ } #ifdef LIBRDFA_IN_RAPTOR #define DECLARE_URI_MAPPING(context, prefix, value) \ do { \ raptor_namespace_stack* nstack = &context->sax2->namespaces; \ raptor_namespace* ns = raptor_new_namespace(nstack, \ (const unsigned char *)prefix, (const unsigned char*)value, 0); \ raptor_namespaces_start_namespace(nstack, ns); \ } while(0) #else #define DECLARE_URI_MAPPING(context, prefix, value) \ rdfa_update_mapping(context->uri_mappings, prefix, value, \ (update_mapping_value_fp)rdfa_replace_string) #endif void rdfa_setup_initial_context(rdfacontext* context) { #ifdef LIBRDFA_IN_RAPTOR #else char* key = NULL; void* value = NULL; void** mptr = context->uri_mappings; #endif /* Setup the base RDFa 1.1 prefix and term mappings */ if(context->rdfa_version == RDFA_VERSION_1_1) { /* Setup the base RDFa 1.1 prefix mappings */ DECLARE_URI_MAPPING(context, "grddl", "http://www.w3.org/2003/g/data-view#"); DECLARE_URI_MAPPING(context, "ma", "http://www.w3.org/ns/ma-ont#"); DECLARE_URI_MAPPING(context, "owl", "http://www.w3.org/2002/07/owl#"); DECLARE_URI_MAPPING(context, "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); DECLARE_URI_MAPPING(context, "rdfa", "http://www.w3.org/ns/rdfa#"); DECLARE_URI_MAPPING(context, "rdfs", "http://www.w3.org/2000/01/rdf-schema#"); DECLARE_URI_MAPPING(context, "rif", "http://www.w3.org/2007/rif#"); DECLARE_URI_MAPPING(context, "skos", "http://www.w3.org/2004/02/skos/core#"); DECLARE_URI_MAPPING(context, "skosxl", "http://www.w3.org/2008/05/skos-xl#"); DECLARE_URI_MAPPING(context, "wdr", "http://www.w3.org/2007/05/powder#"); DECLARE_URI_MAPPING(context, "void", "http://rdfs.org/ns/void#"); DECLARE_URI_MAPPING(context, "wdrs", "http://www.w3.org/2007/05/powder-s#"); DECLARE_URI_MAPPING(context, "xhv", "http://www.w3.org/1999/xhtml/vocab#"); DECLARE_URI_MAPPING(context, "xml", "http://www.w3.org/XML/1998/namespace"); DECLARE_URI_MAPPING(context, "xsd", "http://www.w3.org/2001/XMLSchema#"); DECLARE_URI_MAPPING(context, "cc", "http://creativecommons.org/ns#"); DECLARE_URI_MAPPING(context, "ctag", "http://commontag.org/ns#"); DECLARE_URI_MAPPING(context, "dc", "http://purl.org/dc/terms/"); DECLARE_URI_MAPPING(context, "dcterms", "http://purl.org/dc/terms/"); DECLARE_URI_MAPPING(context, "foaf", "http://xmlns.com/foaf/0.1/"); DECLARE_URI_MAPPING(context, "gr", "http://purl.org/goodrelations/v1#"); DECLARE_URI_MAPPING(context, "ical", "http://www.w3.org/2002/12/cal/icaltzd#"); DECLARE_URI_MAPPING(context, "og", "http://ogp.me/ns#"); DECLARE_URI_MAPPING(context, "rev", "http://purl.org/stuff/rev#"); DECLARE_URI_MAPPING(context, "sioc", "http://rdfs.org/sioc/ns#"); DECLARE_URI_MAPPING(context, "v", "http://rdf.data-vocabulary.org/#"); DECLARE_URI_MAPPING(context, "vcard", "http://www.w3.org/2006/vcard/ns#"); DECLARE_URI_MAPPING(context, "schema", "http://schema.org/"); /* Setup the base RDFa 1.1 term mappings */ rdfa_update_mapping(context->term_mappings, "describedby", "http://www.w3.org/2007/05/powder-s#describedby", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "license", "http://www.w3.org/1999/xhtml/vocab#license", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "role", "http://www.w3.org/1999/xhtml/vocab#role", (update_mapping_value_fp)rdfa_replace_string); } /* Setup the term mappings for XHTML1 */ if(context->host_language == HOST_LANGUAGE_XHTML1) { rdfa_update_mapping(context->term_mappings, "alternate", "http://www.w3.org/1999/xhtml/vocab#alternate", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "appendix", "http://www.w3.org/1999/xhtml/vocab#appendix", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "cite", "http://www.w3.org/1999/xhtml/vocab#cite", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "bookmark", "http://www.w3.org/1999/xhtml/vocab#bookmark", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "contents", "http://www.w3.org/1999/xhtml/vocab#contents", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "chapter", "http://www.w3.org/1999/xhtml/vocab#chapter", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "copyright", "http://www.w3.org/1999/xhtml/vocab#copyright", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "first", "http://www.w3.org/1999/xhtml/vocab#first", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "glossary", "http://www.w3.org/1999/xhtml/vocab#glossary", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "help", "http://www.w3.org/1999/xhtml/vocab#help", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "icon", "http://www.w3.org/1999/xhtml/vocab#icon", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "index", "http://www.w3.org/1999/xhtml/vocab#index", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "last", "http://www.w3.org/1999/xhtml/vocab#last", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "license", "http://www.w3.org/1999/xhtml/vocab#license", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "meta", "http://www.w3.org/1999/xhtml/vocab#meta", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "next", "http://www.w3.org/1999/xhtml/vocab#next", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "prev", "http://www.w3.org/1999/xhtml/vocab#prev", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "previous", "http://www.w3.org/1999/xhtml/vocab#previous", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "section", "http://www.w3.org/1999/xhtml/vocab#section", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "start", "http://www.w3.org/1999/xhtml/vocab#start", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "stylesheet", "http://www.w3.org/1999/xhtml/vocab#stylesheet", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "subsection", "http://www.w3.org/1999/xhtml/vocab#subsection", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "top", "http://www.w3.org/1999/xhtml/vocab#top", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "up", "http://www.w3.org/1999/xhtml/vocab#up", (update_mapping_value_fp)rdfa_replace_string); rdfa_update_mapping(context->term_mappings, "p3pv1", "http://www.w3.org/1999/xhtml/vocab#p3pv1", (update_mapping_value_fp)rdfa_replace_string); /* From the role attribute module */ rdfa_update_mapping(context->term_mappings, "role", "http://www.w3.org/1999/xhtml/vocab#role", (update_mapping_value_fp)rdfa_replace_string); } /* Setup the prefix and term mappings for HTML4 and HTML5 */ if(context->host_language == HOST_LANGUAGE_HTML) { /* No term or prefix mappings as of 2012-04-04 */ } #ifdef LIBRDFA_IN_RAPTOR /* Raptor does this elsewhere */ #else /* Generate namespace triples for all values in the uri_mapping */ while(*mptr != NULL) { rdfa_next_mapping(mptr++, &key, &value); mptr++; rdfa_generate_namespace_triple(context, key, value); } #endif } /** * Creates a new context for the current element by cloning certain * parts of the old context on the top of the given stack. * * @param context_stack the context stack that is associated with this * processing run. */ rdfacontext* rdfa_create_new_element_context(rdfalist* context_stack) { rdfacontext* parent_context = (rdfacontext*) context_stack->items[context_stack->num_items - 1]->data; rdfacontext* rval = rdfa_create_context(parent_context->base); if(!rval) return NULL; /* * Otherwise, the values are: */ /* * the [ base ] is set to the [ base ] value of the current * [ evaluation context ]; */ rval->base = rdfa_replace_string(rval->base, parent_context->base); rdfa_init_context(rval); /* Set the processing depth as parent + 1 */ rval->depth = parent_context->depth + 1; /* copy the URI mappings */ #ifdef LIBRDFA_IN_RAPTOR /* Raptor does this automatically for URIs */ #else rdfa_free_mapping(rval->uri_mappings, (free_mapping_value_fp)free); #endif rdfa_free_mapping(rval->term_mappings, (free_mapping_value_fp)free); rdfa_free_mapping(rval->list_mappings, (free_mapping_value_fp)rdfa_free_list); rdfa_free_mapping(rval->local_list_mappings, (free_mapping_value_fp)rdfa_free_list); #ifdef LIBRDFA_IN_RAPTOR /* Raptor does this automatically for URIs */ #else rval->uri_mappings = rdfa_copy_mapping((void**)parent_context->uri_mappings, (copy_mapping_value_fp)rdfa_replace_string); #endif rval->term_mappings = rdfa_copy_mapping((void**)parent_context->term_mappings, (copy_mapping_value_fp)rdfa_replace_string); rval->list_mappings = rdfa_copy_mapping((void**)parent_context->local_list_mappings, (copy_mapping_value_fp)rdfa_replace_list); rval->local_list_mappings = rdfa_copy_mapping((void**)parent_context->local_list_mappings, (copy_mapping_value_fp)rdfa_replace_list); /* inherit the parent context's host language and RDFa processor mode */ rval->host_language = parent_context->host_language; rval->rdfa_version = parent_context->rdfa_version; /* inherit the parent context's language */ if(parent_context->language != NULL) { rval->language = rdfa_replace_string(rval->language, parent_context->language); } /* inherit the parent context's default vocabulary */ if(parent_context->default_vocabulary != NULL) { rval->default_vocabulary = rdfa_replace_string( rval->default_vocabulary, parent_context->default_vocabulary); } /* set the callbacks callback */ rval->default_graph_triple_callback = parent_context->default_graph_triple_callback; rval->processor_graph_triple_callback = parent_context->processor_graph_triple_callback; rval->buffer_filler_callback = parent_context->buffer_filler_callback; /* inherit the bnode count, _: bnode name, recurse flag, and state * of the xml_literal_namespace_insertion */ rval->bnode_count = parent_context->bnode_count; rval->underscore_colon_bnode_name = rdfa_replace_string(rval->underscore_colon_bnode_name, parent_context->underscore_colon_bnode_name); rval->recurse = parent_context->recurse; rval->skip_element = 0; rval->callback_data = parent_context->callback_data; rval->xml_literal_namespaces_defined = parent_context->xml_literal_namespaces_defined; rval->xml_literal_xml_lang_defined = parent_context->xml_literal_xml_lang_defined; #if 0 /* inherit the parent context's new_subject * TODO: This is not anywhere in the syntax processing document */ if(parent_context->new_subject != NULL) { rval->new_subject = rdfa_replace_string( rval->new_subject, parent_context->new_subject); } #endif if(parent_context->skip_element == 0) { /* o the [ parent subject ] is set to the value of [ new subject ], * if non-null, or the value of the [ parent subject ] of the * current [ evaluation context ]; */ if(parent_context->new_subject != NULL) { rval->parent_subject = rdfa_replace_string( rval->parent_subject, parent_context->new_subject); } else { rval->parent_subject = rdfa_replace_string( rval->parent_subject, parent_context->parent_subject); } /* o the [ parent object ] is set to value of [ current object * resource ], if non-null, or the value of [ new subject ], if * non-null, or the value of the [ parent subject ] of the * current [ evaluation context ]; */ if(parent_context->current_object_resource != NULL) { rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->current_object_resource); } else if(parent_context->new_subject != NULL) { rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->new_subject); } else { rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->parent_subject); } /* o the [ list of incomplete triples ] is set to the [ local list * of incomplete triples ]; */ rval->incomplete_triples = rdfa_replace_list( rval->incomplete_triples, parent_context->local_incomplete_triples); } else { rval->parent_subject = rdfa_replace_string( rval->parent_subject, parent_context->parent_subject); rval->parent_object = rdfa_replace_string( rval->parent_object, parent_context->parent_object); /* copy the incomplete triples */ rval->incomplete_triples = rdfa_replace_list( rval->incomplete_triples, parent_context->incomplete_triples); /* copy the local list of incomplete triples */ rval->local_incomplete_triples = rdfa_replace_list( rval->local_incomplete_triples, parent_context->local_incomplete_triples); } #ifdef LIBRDFA_IN_RAPTOR rval->base_uri = parent_context->base_uri; rval->sax2 = parent_context->sax2; rval->namespace_handler = parent_context->namespace_handler; rval->namespace_handler_user_data = parent_context->namespace_handler_user_data; #endif return rval; } void rdfa_free_context_stack(rdfacontext* context) { /* this field is not NULL only on the rdfacontext* at the top of the stack */ if(context->context_stack != NULL) { void* rval; /* free the stack ensuring that we do not delete this context if * it is in the list (which it may be, if parsing ended on error) */ do { rval = rdfa_pop_item(context->context_stack); if(rval && rval != context) { rdfa_free_context((rdfacontext*)rval); } } while(rval); free(context->context_stack->items); free(context->context_stack); context->context_stack = NULL; } } void rdfa_free_context(rdfacontext* context) { free(context->base); free(context->default_vocabulary); free(context->parent_subject); free(context->parent_object); #ifdef LIBRDFA_IN_RAPTOR #else rdfa_free_mapping(context->uri_mappings, (free_mapping_value_fp)free); #endif rdfa_free_mapping(context->term_mappings, (free_mapping_value_fp)free); rdfa_free_list(context->incomplete_triples); rdfa_free_mapping(context->list_mappings, (free_mapping_value_fp)rdfa_free_list); rdfa_free_mapping(context->local_list_mappings, (free_mapping_value_fp)rdfa_free_list); free(context->language); free(context->underscore_colon_bnode_name); free(context->new_subject); free(context->current_object_resource); free(context->about); free(context->typed_resource); free(context->resource); free(context->href); free(context->src); free(context->content); free(context->datatype); rdfa_free_list(context->property); free(context->plain_literal); free(context->xml_literal); /* TODO: These should be moved into their own data structure */ rdfa_free_list(context->local_incomplete_triples); rdfa_free_context_stack(context); free(context->working_buffer); free(context); } raptor2-2.0.15/librdfa/language.c0000644000175000017500000000302311757416510013450 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The language module is used to determine and set the current language. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa_utils.h" #include "rdfa.h" /** * Updates the language given the value of the xml:lang attribute. * * @param lang the new value of the lang attribute. */ void rdfa_update_language(rdfacontext* context, const char* lang) { /* the [current element] is parsed for any language information, * and [language] is set in the [current evaluation context]; */ if(lang != NULL) { if(strlen(lang) > 0) { /* if a language was specified, set it */ context->language = rdfa_replace_string(context->language, lang); } else { /* if a blank language was specified, clear the language context */ free(context->language); context->language = NULL; } } } raptor2-2.0.15/librdfa/iri.c0000644000175000017500000000372711757416510012463 00000000000000/** * Copyright 2008 Digital Bazaar, Inc. * * This file is part of librdfa. * * librdfa is Free Software, and can be licensed under any of the * following three licenses: * * 1. GNU Lesser General Public License (LGPL) V2.1 or any * newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE-* at the top of this software distribution for more * information regarding the details of each license. * * The iri module is used to process IRIs. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "rdfa.h" /** * Strips the iquery and ifragment part from an IRI. This leaves just the * scheme and the ihier-part, as defined in RFC 3987. This function will * copy the input string and return a new string that must be free()'d. * * @param iri the IRI that should be stripped of anything after the iquery * and fragment, if they exist. */ char* rdfa_iri_get_base(const char* iri) { char* rval = NULL; const char* eindex = 0; /* search to see if there is iquery separator */ eindex = strchr(iri, '?'); if(eindex == NULL) { /* if there is no iquery separator, check to see if there is an * ifragment separator */ eindex = strchr(iri, '#'); } /* check to see if the output string needs to be different from the * input string */ if(eindex == NULL) { /* there was no iquery or ifragment in the input string, so there is * no need to reformat the string */ rval = strdup(iri); } else { /* the output string should be concatenated */ unsigned int length = (unsigned int)(eindex - iri); rval = (char*)malloc(length + 1); rval = strncpy(rval, iri, length); rval[length] = '\0'; } return rval; } raptor2-2.0.15/AUTHORS0000644000175000017500000000020211472513121011150 00000000000000Dave Beckett Dave Robillard Lauri Aalto Nicholas J Humfrey raptor2-2.0.15/LICENSE-2.0.txt0000644000175000017500000002613610360131567012243 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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. raptor2-2.0.15/COPYING0000644000175000017500000004310310444336174011153 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. raptor2-2.0.15/ChangeLog.10000644000175000017500000000321510172250660012022 000000000000002000-12-15 Dave Beckett * rdfdump.c, rapier_parse.c, rapier.h, Makefile.am: Snapshot 2000-12-15 2000-12-10 Dave Beckett * Makefile.am: Added test files 2000-12-08 Dave Beckett * rapier_parse.c (rapier_print_ns_name): Only compile when debugging. Put LIBRDF_DEBUG2 around some debugging statements. 2000-11-29 Dave Beckett * rapier.h: Changed some interfaces slightly. Added defines when not linked with Redland. * rdfdump.c: Made work when compiled with Redland. Added options via getopt/getopt_long and usage. * rapier_parse.c: Added general container support and callback. Made work with Redland librdf_uri and concepts when used inside Redland. Tidied some function declarations. Split some super-long functions into two - 1) xml parsing 2) rdf grammar 2000-11-29 Dave Beckett * rapier.h: Changed some interfaces slightly. Added defines when not linked with Redland. * rdfdump.c: Made work when compiled with Redland. Added options via getopt/getopt_long and usage. * rapier_parse.c: Added general container support and callback. Made work with Redland librdf_uri and concepts when used inside it. Tidied some function declarations. Split some super-long functions into two - 1) xml parsing 2) rdf grammar 2000-11-22 Dave Beckett * acconfig.h, AUTHORS, autogen.sh, config.h.in, configure.in, .cvsignore, INSTALL.html, LICENSE.html, Makefile.am, MPL.html, NEWS.html, rapier.h, rapier_parse.c, rdfdump.c, README.html: Initial import. raptor2-2.0.15/src/0000755000175000017500000000000012425347071010765 500000000000000raptor2-2.0.15/src/raptor_www_libfetch.c0000644000175000017500000000426412020170223015112 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_libfetch.c - Raptor WWW retrieval via libfetch * * Copyright (C) 2003-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef RAPTOR_WWW_LIBFETCH #include #include #include #include #ifdef HAVE_SYS_PARAM_H #include #endif #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" void raptor_www_libfetch_init(raptor_www *www) { } void raptor_www_libfetch_free(raptor_www *www) { } int raptor_www_libfetch_fetch(raptor_www *www) { FILE *stream; if(www->proxy) { setenv("HTTP_PROXY", www->proxy, 0); setenv("FTP_PROXY", www->proxy, 0); } if(www->user_agent) setenv("HTTP_USER_AGENT", www->user_agent, 0); stream = fetchXGetURL((const char*)raptor_uri_as_string(www->uri), NULL, NULL); if(!stream) { www->failed = 1; raptor_www_error(www, "%s", fetchLastErrString); return 1; } /* fetch does not give us access to this */ www->status_code = 200; while(!feof(stream)) { size_t len = fread(www->buffer, 1, RAPTOR_WWW_BUFFER_SIZE, stream); www->total_bytes += len; if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, www->buffer, len, 1); if(len < RAPTOR_WWW_BUFFER_SIZE) break; } fclose(stream); return www->failed; } #endif /* RAPTOR_WWW_LIBFETCH */ raptor2-2.0.15/src/raptor_general.c0000644000175000017500000004520612425333224014057 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_general.c - Raptor general routines * * Copyright (C) 2000-2014, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifdef MAINTAINER_MODE #include #endif /* statics */ const char * const raptor_short_copyright_string = "Copyright 2000-2014 David Beckett. Copyright 2000-2005 University of Bristol"; const char * const raptor_copyright_string = "Copyright (C) 2000-2014 David Beckett - http://www.dajobe.org/\nCopyright (C) 2000-2005 University of Bristol - http://www.bristol.ac.uk/"; const char * const raptor_license_string = "LGPL 2.1 or newer, GPL 2 or newer, Apache 2.0 or newer.\nSee http://librdf.org/raptor/LICENSE.html for full terms."; const char * const raptor_home_url_string = "http://librdf.org/raptor/"; /** * raptor_version_string: * * Library full version as a string. * * See also #raptor_version_decimal. */ const char * const raptor_version_string = RAPTOR_VERSION_STRING #ifdef GIT_VERSION " GIT " GIT_VERSION #endif ; /** * raptor_version_major: * * Library major version number as a decimal integer. */ const unsigned int raptor_version_major = RAPTOR_VERSION_MAJOR; /** * raptor_version_minor: * * Library minor version number as a decimal integer. */ const unsigned int raptor_version_minor = RAPTOR_VERSION_MINOR; /** * raptor_version_release: * * Library release version number as a decimal integer. */ const unsigned int raptor_version_release = RAPTOR_VERSION_RELEASE; /** * raptor_version_decimal: * * Library full version as a decimal integer. * * See also #raptor_version_string. */ const unsigned int raptor_version_decimal = RAPTOR_VERSION_DECIMAL; /** * raptor_new_world: * @version_decimal: raptor version as a decimal integer as defined by the macro #RAPTOR_VERSION and static int #raptor_version_decimal * * Allocate a new raptor_world object. * * Allocation of the world and initialization are decoupled to allow * changing settings on the world object before init. * * Settings and configuration of the world may be made after creating * the object and before the world is initialized using methods such * as raptor_world_set_flag(), raptor_world_set_log_handler(), * raptor_world_set_generate_bnodeid_handler(). Some configuration * may not be changed after initialization. * * The raptor_world is initialized with raptor_world_open(). * * Return value: uninitialized raptor_world object or NULL on failure */ raptor_world * raptor_new_world_internal(unsigned int version_decimal) { raptor_world *world; if(version_decimal < RAPTOR_MIN_VERSION_DECIMAL) { fprintf(stderr, "raptor_new_world() called via header from version %u but minimum supported version is %u\n", version_decimal, RAPTOR_MIN_VERSION_DECIMAL); return NULL; } world = RAPTOR_CALLOC(raptor_world*, 1, sizeof(*world)); if(world) { world->magic = RAPTOR2_WORLD_MAGIC; /* set default flags - can be updated by raptor_world_set_flag() */ /* set: RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE * set: RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE */ world->libxml_flags = RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE | RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE ; /* set: URI Interning */ world->uri_interning = 1; world->internal_ignore_errors = 0; } return world; } /** * raptor_world_open: * @world: raptor_world object * * Initialise the raptor library. * * Initializes a #raptor_world object created by raptor_new_world(). * Allocation and initialization are decoupled to allow * changing settings on the world object before init. * * The initialized world object is used with subsequent raptor API calls. * * Return value: non-0 on failure */ int raptor_world_open(raptor_world* world) { int rc; if(!world) return -1; if(world->opened) return 0; /* not an error */ world->opened = 1; rc = raptor_uri_init(world); if(rc) return rc; rc = raptor_concepts_init(world); if(rc) return rc; rc = raptor_parsers_init(world); if(rc) return rc; rc = raptor_serializers_init(world); if(rc) return rc; rc = raptor_sax2_init(world); if(rc) return rc; rc = raptor_www_init(world); if(rc) return rc; #ifdef RAPTOR_XML_LIBXML rc = raptor_libxml_init(world); if(rc) return rc; #endif return 0; } /** * raptor_free_world: * @world: raptor_world object * * Terminate the raptor library. * * Destroys the raptor_world object and all related information. */ void raptor_free_world(raptor_world* world) { if(!world) return; if(world->default_generate_bnodeid_handler_prefix) RAPTOR_FREE(char*, world->default_generate_bnodeid_handler_prefix); #ifdef RAPTOR_XML_LIBXML raptor_libxml_finish(world); #endif raptor_www_finish(world); raptor_sax2_finish(world); raptor_serializers_finish(world); raptor_parsers_finish(world); raptor_concepts_finish(world); raptor_uri_finish(world); RAPTOR_FREE(raptor_world, world); } /** * raptor_world_set_generate_bnodeid_handler: * @world: #raptor_world world object * @user_data: user data pointer for callback * @handler: generate ID callback function * * Set the generate ID handler function. * * Sets the function to generate IDs for the library. The handler is * called with the @user_data parameter. * * The final argument of the callback method is user_bnodeid, the value of * the rdf:nodeID attribute that the user provided if any (or NULL). * It can either be returned directly as the generated value when present or * modified. The passed in value must be free()d if it is not used. * * If handler is NULL, the default method is used * **/ void raptor_world_set_generate_bnodeid_handler(raptor_world* world, void *user_data, raptor_generate_bnodeid_handler handler) { world->generate_bnodeid_handler_user_data = user_data; world->generate_bnodeid_handler = handler; } static unsigned char* raptor_world_default_generate_bnodeid_handler(void *user_data, unsigned char *user_bnodeid) { raptor_world *world = (raptor_world*)user_data; int id; unsigned char *buffer; const char* prefix; unsigned int prefix_length; size_t id_length; if(user_bnodeid) return user_bnodeid; id = ++world->default_generate_bnodeid_handler_base; id_length = raptor_format_integer(NULL, 0, id, /* base */ 10, -1, '\0'); if(world->default_generate_bnodeid_handler_prefix) { prefix = world->default_generate_bnodeid_handler_prefix; prefix_length = world->default_generate_bnodeid_handler_prefix_length; } else { prefix = "genid"; prefix_length = 5; /* strlen("genid") */ } buffer = RAPTOR_MALLOC(unsigned char*, id_length + prefix_length + 1); if(!buffer) return NULL; memcpy(buffer, prefix, prefix_length); (void)raptor_format_integer(RAPTOR_GOOD_CAST(char*, &buffer[prefix_length]), id_length + 1, id, /* base */ 10,-1, '\0'); return buffer; } /** * raptor_world_generate_bnodeid: * @world: raptor_world object * * Generate an new blank node ID * * Return value: newly allocated generated ID or NULL on failure **/ unsigned char* raptor_world_generate_bnodeid(raptor_world *world) { return raptor_world_internal_generate_id(world, NULL); } unsigned char* raptor_world_internal_generate_id(raptor_world *world, unsigned char *user_bnodeid) { if(world->generate_bnodeid_handler) return world->generate_bnodeid_handler(world->generate_bnodeid_handler_user_data, user_bnodeid); else return raptor_world_default_generate_bnodeid_handler(world, user_bnodeid); } /** * raptor_world_set_generate_bnodeid_parameters: * @world: #raptor_world object * @prefix: prefix string * @base: integer base identifier * * Set default ID generation parameters. * * Sets the parameters for the default algorithm used to generate IDs. * The default algorithm uses both @prefix and @base to generate a new * identifier. The exact identifier generated is not guaranteed to * be a strict concatenation of @prefix and @base but will use both * parts. The @prefix parameter is copied to generate an ID. * * For finer control of the generated identifiers, use * raptor_world_set_generate_bnodeid_handler(). * * If @prefix is NULL, the default prefix is used (currently "genid") * If @base is less than 1, it is initialised to 1. * **/ void raptor_world_set_generate_bnodeid_parameters(raptor_world* world, char *prefix, int base) { char *prefix_copy = NULL; unsigned int length = 0; if(--base < 0) base = 0; if(prefix) { length = RAPTOR_BAD_CAST(unsigned int, strlen(prefix)); prefix_copy = RAPTOR_MALLOC(char*, length + 1); if(!prefix_copy) return; memcpy(prefix_copy, prefix, length+1); } if(world->default_generate_bnodeid_handler_prefix) RAPTOR_FREE(char*, world->default_generate_bnodeid_handler_prefix); world->default_generate_bnodeid_handler_prefix = prefix_copy; world->default_generate_bnodeid_handler_prefix_length = length; world->default_generate_bnodeid_handler_base = base; } /** * raptor_world_set_libxslt_security_preferences: * @world: world * @security_preferences: security preferences (an #xsltSecurityPrefsPtr) or NULL * * Set libxslt security preferences policy object * * The @security_preferences object will NOT become owned by * #raptor_world. * * If libxslt is compiled into the library, @security_preferences * should be an #xsltSecurityPrefsPtr and will be used to call * xsltSetCtxtSecurityPrefs() when an XSLT engine is initialised. * If @security_preferences is NULL, this will disable all raptor's * calls to xsltSetCtxtSecurityPrefs(). * * If libxslt is not compiled in, the object set here is not used. * * Return value: 0 on success, non-0 on failure: <0 on errors and >0 if world is already opened */ int raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); if(world->opened) return 1; world->xslt_security_preferences = security_preferences; world->xslt_security_preferences_policy = 1; return 0; } /** * raptor_world_set_flag: * @world: world * @flag: flag * @value: value * * Set library-wide configuration * * This function is used to control raptor-wide options across * classes. These options must be set before raptor_world_open() is * called explicitly or implicitly (by creating a raptor object). * There is no enumeration function for these flags because they are * not user options and must be set before the library is * initialised. For similar reasons, there is no get function. * * See the #raptor_world_flags documentation for full details of * what the flags mean. * * Return value: 0 on success, non-0 on failure: <0 on errors (-1 if flag is unknown, -2 if value is illegal) and >0 if world is already opened */ int raptor_world_set_flag(raptor_world *world, raptor_world_flag flag, int value) { int rc = 0; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); if(world->opened) return 1; switch(flag) { case RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE: case RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE: if(value) world->libxml_flags |= (int)flag; else world->libxml_flags &= ~(int)flag; break; case RAPTOR_WORLD_FLAG_URI_INTERNING: world->uri_interning = value; break; case RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH: world->www_skip_www_init_finish = value; break; } return rc; } /** * raptor_world_set_log_handler: * @world: world object * @user_data: user data to pass to function * @handler: pointer to the function * * Set the message (error, warning, info) handling function. * * The function will receive callbacks when messages are generated * * Return value: non-0 on failure **/ int raptor_world_set_log_handler(raptor_world *world, void *user_data, raptor_log_handler handler) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); world->message_handler_user_data = user_data; world->message_handler = handler; return 0; } /** * raptor_basename: * @name: path * * Get the basename of a path * * Return value: filename part of a pathname **/ const char* raptor_basename(const char *name) { const char *p; if((p = strrchr(name, '/'))) name = p+1; else if((p = strrchr(name, '\\'))) name = p+1; return name; } const unsigned char * const raptor_xml_literal_datatype_uri_string = (const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"; const unsigned int raptor_xml_literal_datatype_uri_string_len = 53; /** * raptor_check_ordinal: * @name: ordinal string * * Check an RDF property ordinal, the n in rdf:_n * * Return value: ordinal integer or <0 if string is not a valid ordinal */ int raptor_check_ordinal(const unsigned char *name) { int ordinal= -1; unsigned char c; while((c=*name++)) { if(c < '0' || c > '9') return -1; if(ordinal <0) ordinal = 0; ordinal *= 10; ordinal += (c - '0'); } return ordinal; } static const char* const raptor_domain_labels[RAPTOR_DOMAIN_LAST + 1] = { "none", "I/O Stream", "XML Namespace", "RDF Parser", "XML QName", "XML SAX2", "RDF Serializer", "RDF Term", "Turtle Writer", "URI", "World", "WWW", "XML Writer" }; /** * raptor_domain_get_label: * @domain: domain * * Get label for a domain * * Return value: label string or NULL if domain is not valid */ const char* raptor_domain_get_label(raptor_domain domain) { return (domain <= RAPTOR_DOMAIN_LAST) ? raptor_domain_labels[domain] : NULL; } /* internal */ void raptor_world_internal_set_ignore_errors(raptor_world* world, int flag) { world->internal_ignore_errors = flag; } /** * raptor_free_memory: * @ptr: memory pointer * * Free memory allocated inside raptor. * * Some systems require memory allocated in a library to * be deallocated in that library. This function allows * memory allocated by raptor to be freed. * * Examples include the result of the '_to_' methods that returns * allocated memory such as raptor_uri_filename_to_uri_string, * raptor_uri_filename_to_uri_string * and raptor_uri_uri_string_to_filename_fragment * **/ void raptor_free_memory(void *ptr) { if(!ptr) return; RAPTOR_FREE(void, ptr); } /** * raptor_alloc_memory: * @size: size of memory to allocate * * Allocate memory inside raptor. * * Some systems require memory allocated in a library to * be deallocated in that library. This function allows * memory to be allocated inside the raptor shared library * that can be freed inside raptor either internally or via * raptor_free_memory. * * Examples include using this in the raptor_world_generate_bnodeid() handler * code to create new strings that will be used internally * as short identifiers and freed later on by the parsers. * * Return value: the address of the allocated memory or NULL on failure * **/ void* raptor_alloc_memory(size_t size) { return RAPTOR_MALLOC(void*, size); } /** * raptor_calloc_memory: * @nmemb: number of members * @size: size of item * * Allocate zeroed array of items inside raptor. * * Some systems require memory allocated in a library to * be deallocated in that library. This function allows * memory to be allocated inside the raptor shared library * that can be freed inside raptor either internally or via * raptor_free_memory. * * Examples include using this in the raptor_world_generate_bnodeid() handler * code to create new strings that will be used internally * as short identifiers and freed later on by the parsers. * * Return value: the address of the allocated memory or NULL on failure * **/ void* raptor_calloc_memory(size_t nmemb, size_t size) { return RAPTOR_CALLOC(void*, nmemb, size); } #if defined (RAPTOR_DEBUG) && defined(RAPTOR_MEMORY_SIGN) void* raptor_sign_malloc(size_t size) { int *p; size += sizeof(int); p = (int*)malloc(size); *p++ = RAPTOR_SIGN_KEY; return p; } void* raptor_sign_calloc(size_t nmemb, size_t size) { int *p; /* turn into bytes */ size = nmemb*size + sizeof(int); p = (int*)calloc(1, size); *p++ = RAPTOR_SIGN_KEY; return p; } void* raptor_sign_realloc(void *ptr, size_t size) { int *p; if(!ptr) return raptor_sign_malloc(size); p = (int*)ptr; p--; if(*p != RAPTOR_SIGN_KEY) RAPTOR_FATAL3("memory signature %08X != %08X", *p, RAPTOR_SIGN_KEY); size += sizeof(int); p = (int*)realloc(p, size); *p++= RAPTOR_SIGN_KEY; return p; } void raptor_sign_free(void *ptr) { int *p; if(!ptr) return; p = (int*)ptr; p--; if(*p != RAPTOR_SIGN_KEY) RAPTOR_FATAL3("memory signature %08X != %08X", *p, RAPTOR_SIGN_KEY); free(p); } #endif int raptor_check_world_internal(raptor_world* world, const char* name) { static int __warned = 0; if(!world) { fprintf(stderr, "%s called with NULL world object\n", name); RAPTOR_ASSERT_DIE } /* In Raptor V1 ABI the first int of raptor_world is the 'opened' field */ if(world->magic == RAPTOR1_WORLD_MAGIC_1 || world->magic == RAPTOR1_WORLD_MAGIC_2) { if(!__warned++) fprintf(stderr, "%s called with Raptor V1 world object\n", name); return 1; } if(world->magic != RAPTOR2_WORLD_MAGIC) { if(!__warned++) fprintf(stderr, "%s called with invalid Raptor V2 world object\n", name); return 1; } return 0; } raptor2-2.0.15/src/raptor_json_writer.c0000644000175000017500000002170012260330735015001 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_json_writer.c - Raptor JSON Writer * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_LIMITS_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE struct raptor_json_writer_s { raptor_world* world; raptor_uri* base_uri; /* outputting to this iostream */ raptor_iostream *iostr; /* current indent */ int indent; /* indent step */ int indent_step; }; /** * raptor_new_json_writer: * @world: raptor_world object * @base_uri: Base URI for the writer * @iostr: I/O stream to write to * * INTERNAL - Constructor - Create a new JSON writer writing to a raptor_iostream * * Return value: a new #raptor_json_writer object or NULL on failure **/ raptor_json_writer* raptor_new_json_writer(raptor_world* world, raptor_uri* base_uri, raptor_iostream* iostr) { raptor_json_writer* json_writer; json_writer = RAPTOR_CALLOC(raptor_json_writer*, 1, sizeof(*json_writer)); if(!json_writer) return NULL; json_writer->world = world; json_writer->iostr = iostr; json_writer->base_uri = base_uri; json_writer->indent_step = 2; return json_writer; } /** * raptor_free_json_writer: * @json_writer: JSON writer object * * INTERNAL - Destructor - Free JSON Writer * **/ void raptor_free_json_writer(raptor_json_writer* json_writer) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(json_writer, raptor_json_writer); RAPTOR_FREE(raptor_json_writer, json_writer); } static int raptor_json_writer_quoted(raptor_json_writer* json_writer, const char *value, size_t value_len) { int rc = 0; if(!value) { raptor_iostream_counted_string_write("\"\"", 2, json_writer->iostr); return 0; } raptor_iostream_write_byte('\"', json_writer->iostr); rc = raptor_string_escaped_write((const unsigned char*)value, value_len, '"', RAPTOR_ESCAPED_WRITE_JSON_LITERAL, json_writer->iostr); raptor_iostream_write_byte('\"', json_writer->iostr); return rc; } static int raptor_json_writer_spaces(raptor_json_writer* json_writer, int depth) { int i; for(i = 0; i < depth; i++) raptor_iostream_write_byte(' ', json_writer->iostr); return 0; } int raptor_json_writer_newline(raptor_json_writer* json_writer) { raptor_iostream_write_byte('\n', json_writer->iostr); if(json_writer->indent) raptor_json_writer_spaces(json_writer, json_writer->indent); return 0; } int raptor_json_writer_key_value(raptor_json_writer* json_writer, const char* key, size_t key_len, const char* value, size_t value_len) { if(!key_len && key) key_len = strlen(key); if(!value_len && value) value_len = strlen(value); raptor_json_writer_quoted(json_writer, key, key_len); raptor_iostream_counted_string_write(" : ", 3, json_writer->iostr); raptor_json_writer_quoted(json_writer, value, value_len); return 0; } int raptor_json_writer_key_uri_value(raptor_json_writer* json_writer, const char* key, size_t key_len, raptor_uri* uri) { const char* value; size_t value_len; int rc = 0; value = (const char*)raptor_uri_to_relative_counted_uri_string(json_writer->base_uri, uri, &value_len); if(!value) return 1; if(key) rc = raptor_json_writer_key_value(json_writer, key, key_len, value, value_len); else rc = raptor_json_writer_quoted(json_writer, value, value_len); RAPTOR_FREE(char*, value); return rc; } int raptor_json_writer_start_block(raptor_json_writer* json_writer, char c) { json_writer->indent += json_writer->indent_step; raptor_iostream_write_byte(c, json_writer->iostr); return 0; } int raptor_json_writer_end_block(raptor_json_writer* json_writer, char c) { raptor_iostream_write_byte(c, json_writer->iostr); json_writer->indent -= json_writer->indent_step; return 0; } int raptor_json_writer_literal_object(raptor_json_writer* json_writer, unsigned char* s, size_t s_len, unsigned char* lang, raptor_uri* datatype) { raptor_json_writer_start_block(json_writer, '{'); raptor_json_writer_newline(json_writer); raptor_iostream_counted_string_write("\"value\" : ", 10, json_writer->iostr); raptor_json_writer_quoted(json_writer, (const char*)s, s_len); if(datatype || lang) { raptor_iostream_write_byte(',', json_writer->iostr); raptor_json_writer_newline(json_writer); if(datatype) raptor_json_writer_key_uri_value(json_writer, "datatype", 8, datatype); if(lang) { if(datatype) { raptor_iostream_write_byte(',', json_writer->iostr); raptor_json_writer_newline(json_writer); } raptor_json_writer_key_value(json_writer, "lang", 4, (const char*)lang, 0); } } raptor_iostream_write_byte(',', json_writer->iostr); raptor_json_writer_newline(json_writer); raptor_json_writer_key_value(json_writer, "type", 4, "literal", 7); raptor_json_writer_newline(json_writer); raptor_json_writer_end_block(json_writer, '}'); raptor_json_writer_newline(json_writer); return 0; } int raptor_json_writer_blank_object(raptor_json_writer* json_writer, const unsigned char* blank, size_t blank_len) { raptor_json_writer_start_block(json_writer, '{'); raptor_json_writer_newline(json_writer); raptor_iostream_counted_string_write("\"value\" : \"_:", 13, json_writer->iostr); raptor_iostream_counted_string_write((const char*)blank, blank_len, json_writer->iostr); raptor_iostream_counted_string_write("\",", 2, json_writer->iostr); raptor_json_writer_newline(json_writer); raptor_iostream_counted_string_write("\"type\" : \"bnode\"", 16, json_writer->iostr); raptor_json_writer_newline(json_writer); raptor_json_writer_end_block(json_writer, '}'); return 0; } int raptor_json_writer_uri_object(raptor_json_writer* json_writer, raptor_uri* uri) { raptor_json_writer_start_block(json_writer, '{'); raptor_json_writer_newline(json_writer); raptor_json_writer_key_uri_value(json_writer, "value", 5, uri); raptor_iostream_write_byte(',', json_writer->iostr); raptor_json_writer_newline(json_writer); raptor_iostream_counted_string_write("\"type\" : \"uri\"", 14, json_writer->iostr); raptor_json_writer_newline(json_writer); raptor_json_writer_end_block(json_writer, '}'); return 0; } int raptor_json_writer_term(raptor_json_writer* json_writer, raptor_term *term) { int rc = 0; switch(term->type) { case RAPTOR_TERM_TYPE_URI: rc = raptor_json_writer_uri_object(json_writer, term->value.uri); break; case RAPTOR_TERM_TYPE_LITERAL: rc = raptor_json_writer_literal_object(json_writer, term->value.literal.string, term->value.literal.string_len, term->value.literal.language, term->value.literal.datatype); break; case RAPTOR_TERM_TYPE_BLANK: rc = raptor_json_writer_blank_object(json_writer, term->value.blank.string, term->value.blank.string_len); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(json_writer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", term->type); rc = 1; break; } return rc; } #endif raptor2-2.0.15/src/raptor_option.c0000644000175000017500000004777512020170223013754 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_option.c - Class options * * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" static const struct { raptor_option option; raptor_option_area area; raptor_option_value_type value_type; const char *name; const char *label; } raptor_options_list[RAPTOR_OPTION_LAST + 1] = { { RAPTOR_OPTION_SCANNING, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "scanForRDF", "RDF/XML parser scans for rdf:RDF in XML content" }, { RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "allowNonNsAttributes", "RDF/XML parser allows bare 'name' rather than namespaced 'rdf:name'" }, { RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "allowOtherParsetypes", "RDF/XML parser allows user-defined rdf:parseType values" }, { RAPTOR_OPTION_ALLOW_BAGID, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "allowBagID", "RDF/XML parser allows rdf:bagID" }, { RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "allowRDFtypeRDFlist", "RDF/XML parser generates the collection rdf:type rdf:List triple" }, { RAPTOR_OPTION_NORMALIZE_LANGUAGE, (raptor_option_area)(RAPTOR_OPTION_AREA_PARSER | RAPTOR_OPTION_AREA_SAX2), RAPTOR_OPTION_VALUE_TYPE_BOOL, "normalizeLanguage", "RDF/XML parser normalizes xml:lang values to lowercase" }, { RAPTOR_OPTION_NON_NFC_FATAL, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "nonNFCfatal", "RDF/XML parser makes non-NFC literals a fatal error" }, { RAPTOR_OPTION_WARN_OTHER_PARSETYPES, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "warnOtherParseTypes", "RDF/XML parser warns about unknown rdf:parseType values" }, { RAPTOR_OPTION_CHECK_RDF_ID, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "checkRdfID", "RDF/XML parser checks rdf:ID values for duplicates" }, { RAPTOR_OPTION_RELATIVE_URIS, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "relativeURIs", "Serializers write relative URIs wherever possible." }, { RAPTOR_OPTION_WRITER_AUTO_INDENT, (raptor_option_area)(RAPTOR_OPTION_AREA_XML_WRITER | RAPTOR_OPTION_AREA_TURTLE_WRITER), RAPTOR_OPTION_VALUE_TYPE_BOOL, "autoIndent", "Turtle and XML Writer automatically indent elements." }, { RAPTOR_OPTION_WRITER_AUTO_EMPTY, (raptor_option_area)(RAPTOR_OPTION_AREA_XML_WRITER | RAPTOR_OPTION_AREA_TURTLE_WRITER), RAPTOR_OPTION_VALUE_TYPE_BOOL, "autoEmpty", "Turtle and XML Writer automatically detect and abbreviate empty elements." }, { RAPTOR_OPTION_WRITER_INDENT_WIDTH, (raptor_option_area)(RAPTOR_OPTION_AREA_XML_WRITER | RAPTOR_OPTION_AREA_TURTLE_WRITER), RAPTOR_OPTION_VALUE_TYPE_BOOL, "indentWidth", "Turtle and XML Writer use as number of spaces to indent." }, { RAPTOR_OPTION_WRITER_XML_VERSION, (raptor_option_area)(RAPTOR_OPTION_AREA_SERIALIZER | RAPTOR_OPTION_AREA_XML_WRITER), RAPTOR_OPTION_VALUE_TYPE_INT, "xmlVersion", "Serializers and XML Writer use as XML version to write." }, { RAPTOR_OPTION_WRITER_XML_DECLARATION, (raptor_option_area)(RAPTOR_OPTION_AREA_SERIALIZER | RAPTOR_OPTION_AREA_XML_WRITER), RAPTOR_OPTION_VALUE_TYPE_BOOL, "xmlDeclaration", "Serializers and XML Writer write XML declaration." }, { RAPTOR_OPTION_NO_NET, (raptor_option_area)(RAPTOR_OPTION_AREA_PARSER | RAPTOR_OPTION_AREA_SAX2), RAPTOR_OPTION_VALUE_TYPE_BOOL, "noNet", "Parsers and SAX2 XML Parser deny internal network requests." }, { RAPTOR_OPTION_RESOURCE_BORDER, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "resourceBorder", "DOT serializer resource border color" }, { RAPTOR_OPTION_LITERAL_BORDER, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "literalBorder", "DOT serializer literal border color" }, { RAPTOR_OPTION_BNODE_BORDER, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "bnodeBorder", "DOT serializer blank node border color" }, { RAPTOR_OPTION_RESOURCE_FILL, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "resourceFill", "DOT serializer resource fill color" }, { RAPTOR_OPTION_LITERAL_FILL, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "literalFill", "DOT serializer literal fill color" }, { RAPTOR_OPTION_BNODE_FILL, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "bnodeFill", "DOT serializer blank node fill color" }, { RAPTOR_OPTION_HTML_TAG_SOUP, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "htmlTagSoup", "GRDDL parser uses a lax HTML parser" }, { RAPTOR_OPTION_MICROFORMATS, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "microformats", "GRDDL parser looks for microformats" }, { RAPTOR_OPTION_HTML_LINK, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "htmlLink", "GRDDL parser looks for " }, { RAPTOR_OPTION_WWW_TIMEOUT, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_INT, "wwwTimeout", "Parser WWW request retrieval timeout" }, { RAPTOR_OPTION_WRITE_BASE_URI, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "writeBaseURI", "Serializers write a base URI directive @base / xml:base" }, { RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_STRING, "wwwHttpCacheControl", "Parser WWW request HTTP Cache-Control: header value" }, { RAPTOR_OPTION_WWW_HTTP_USER_AGENT, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_STRING, "wwwHttpUserAgent", "Parser WWW request HTTP User-Agent: header value" }, { RAPTOR_OPTION_JSON_CALLBACK, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "jsonCallback", "JSON serializer callback function name" }, { RAPTOR_OPTION_JSON_EXTRA_DATA, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "jsonExtraData", "JSON serializer callback data parameter" }, { RAPTOR_OPTION_RSS_TRIPLES, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_STRING, "rssTriples", "Atom and RSS serializers write extra RDF triples" }, { RAPTOR_OPTION_ATOM_ENTRY_URI, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_URI, "atomEntryUri", "Atom serializer writes an atom:entry with this URI (otherwise atom:feed)" }, { RAPTOR_OPTION_PREFIX_ELEMENTS, RAPTOR_OPTION_AREA_SERIALIZER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "prefixElements", "Atom and RSS serializers write namespace-prefixed elements" }, { RAPTOR_OPTION_STRICT, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_BOOL, "strict", "Operate in strict conformance mode (otherwise lax)" }, { RAPTOR_OPTION_WWW_CERT_FILENAME, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_STRING, "wwwCertFilename", "SSL client certificate filename" }, { RAPTOR_OPTION_WWW_CERT_TYPE, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_STRING, "wwwCertType", "SSL client certificate type" }, { RAPTOR_OPTION_WWW_CERT_PASSPHRASE, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_STRING, "wwwCertPassphrase", "SSL client certificate passphrase" }, { RAPTOR_OPTION_NO_FILE, (raptor_option_area)(RAPTOR_OPTION_AREA_PARSER | RAPTOR_OPTION_AREA_SAX2), RAPTOR_OPTION_VALUE_TYPE_BOOL, "noFile", "Parsers and SAX2 deny internal file requests." }, { RAPTOR_OPTION_WWW_SSL_VERIFY_PEER, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_INT, "wwwSslVerifyPeer", "SSL verify peer certficate" }, { RAPTOR_OPTION_WWW_SSL_VERIFY_HOST, RAPTOR_OPTION_AREA_PARSER, RAPTOR_OPTION_VALUE_TYPE_INT, "wwwSslVerifyHost", "SSL verify host matching" }, { RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES, (raptor_option_area)(RAPTOR_OPTION_AREA_PARSER | RAPTOR_OPTION_AREA_SAX2), RAPTOR_OPTION_VALUE_TYPE_BOOL, "loadExternalEntities", "Parsers and SAX2 should load external entities." } }; static const char * const raptor_option_uri_prefix = "http://feature.librdf.org/raptor-"; /* NOTE: this is strlen(raptor_option_uri_prefix) */ static const int raptor_option_uri_prefix_len = 33; static raptor_option_area raptor_option_get_option_area_for_domain(raptor_domain domain) { raptor_option_area area = RAPTOR_OPTION_AREA_NONE; if(domain == RAPTOR_DOMAIN_PARSER) area = RAPTOR_OPTION_AREA_PARSER; else if(domain == RAPTOR_DOMAIN_SERIALIZER) area = RAPTOR_OPTION_AREA_SERIALIZER; else if(domain == RAPTOR_DOMAIN_SAX2) area = RAPTOR_OPTION_AREA_SAX2; else if(domain == RAPTOR_DOMAIN_XML_WRITER) area = RAPTOR_OPTION_AREA_XML_WRITER; else if(domain == RAPTOR_DOMAIN_TURTLE_WRITER) area = RAPTOR_OPTION_AREA_TURTLE_WRITER; return area; } /** * raptor_free_option_description: * @option_description: option description * * Destructor - free an option description object. */ void raptor_free_option_description(raptor_option_description* option_description) { if(!option_description) return; /* these are shared strings pointing to static data in raptor_options_list[] */ /* RAPTOR_FREE(char*, option_description->name); */ /* RAPTOR_FREE(char*, option_description->label); */ if(option_description->uri) raptor_free_uri(option_description->uri); RAPTOR_FREE(raptor_option_description, option_description); } /** * raptor_world_get_option_description: * @world: raptor world object * @domain: domain * @option: option enumeration (0+) * * Get a description of an option for a domain. * * The returned description must be freed with * raptor_free_option_description(). * * Return value: option description or NULL on failure or if option is unknown **/ raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option) { raptor_option_area area; raptor_option_description *option_description = NULL; raptor_uri *base_uri = NULL; int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); area = raptor_option_get_option_area_for_domain(domain); if(area == RAPTOR_OPTION_AREA_NONE) return NULL; for(i = 0; i <= RAPTOR_OPTION_LAST; i++) { if(raptor_options_list[i].option == option && (raptor_options_list[i].area & area)) break; } if(i > RAPTOR_OPTION_LAST) return NULL; option_description = RAPTOR_CALLOC(raptor_option_description*, 1, sizeof(*option_description)); if(!option_description) return NULL; option_description->domain = domain; option_description->option = option; option_description->value_type = raptor_options_list[i].value_type; option_description->name = raptor_options_list[i].name; option_description->name_len = strlen(option_description->name); option_description->label = raptor_options_list[i].label; base_uri = raptor_new_uri_from_counted_string(world, (const unsigned char*)raptor_option_uri_prefix, raptor_option_uri_prefix_len); if(!base_uri) { raptor_free_option_description(option_description); return NULL; } option_description->uri = raptor_new_uri_from_uri_local_name(world, base_uri, (const unsigned char*)raptor_options_list[i].name); raptor_free_uri(base_uri); if(!option_description->uri) { raptor_free_option_description(option_description); return NULL; } return option_description; } int raptor_option_is_valid_for_area(const raptor_option option, raptor_option_area area) { if(option > RAPTOR_OPTION_LAST) return 0; return (raptor_options_list[option].area & area) != 0; } int raptor_option_value_is_numeric(const raptor_option option) { raptor_option_value_type t = raptor_options_list[option].value_type; return t == RAPTOR_OPTION_VALUE_TYPE_BOOL || t == RAPTOR_OPTION_VALUE_TYPE_INT; } /** * raptor_world_get_option_from_uri: * @world: raptor_world instance * @uri: option URI * * Get an option ID from a URI * * Option URIs are the concatenation of the string * "http://feature.librdf.org/raptor-" plus the short name. * * They are automatically returned for any option described with * raptor_world_get_option_description(). * * Return value: < 0 if the option is unknown or on error **/ raptor_option raptor_world_get_option_from_uri(raptor_world* world, raptor_uri *uri) { unsigned char *uri_string; int i; raptor_option option = (raptor_option)-1; if(!uri) return option; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, (raptor_option)-1); raptor_world_open(world); uri_string = raptor_uri_as_string(uri); if(strncmp((const char*)uri_string, raptor_option_uri_prefix, raptor_option_uri_prefix_len)) return option; uri_string += raptor_option_uri_prefix_len; for(i = 0; i <= RAPTOR_OPTION_LAST; i++) if(!strcmp(raptor_options_list[i].name, (const char*)uri_string)) { option = (raptor_option)i; break; } return option; } /** * raptor_option_get_count: * * Get the count of options defined. * * This is prefered to the compile time-only symbol #RAPTOR_OPTION_LAST * and returns a count of the number of options which is * #RAPTOR_OPTION_LAST + 1. * * Return value: count of options in the #raptor_option enumeration **/ unsigned int raptor_option_get_count(void) { return RAPTOR_OPTION_LAST + 1; } const char* const raptor_option_value_type_labels[RAPTOR_OPTION_VALUE_TYPE_URI + 1] = { "boolean", "integer", "string", "uri" }; /** * raptor_option_get_value_type_label: * @type: value type * * Get a label for a value type * * Return value: label for type or NULL for invalid type */ const char* raptor_option_get_value_type_label(const raptor_option_value_type type) { if(type > RAPTOR_OPTION_VALUE_TYPE_LAST) return NULL; return raptor_option_value_type_labels[type]; } int raptor_object_options_copy_state(raptor_object_options* to, raptor_object_options* from) { int rc = 0; int i; to->area = from->area; for(i = 0; !rc && i <= RAPTOR_OPTION_LAST; i++) { if(raptor_option_value_is_numeric((raptor_option)i)) to->options[i].integer = from->options[i].integer; else { /* non-numeric values may need allocations */ char* string = from->options[i].string; if(string) { size_t len = strlen(string); to->options[i].string = RAPTOR_MALLOC(char*, len + 1); if(to->options[i].string) memcpy(to->options[i].string, string, len + 1); else rc = 1; } } } return rc; } void raptor_object_options_init(raptor_object_options* options, raptor_option_area area) { int i; options->area = area; for(i = 0; i <= RAPTOR_OPTION_LAST; i++) { if(raptor_option_value_is_numeric((raptor_option)i)) options->options[i].integer = 0; else options->options[i].string = NULL; } /* Initialise default options that are not 0 or NULL */ /* Emit @base directive or equivalent */ options->options[RAPTOR_OPTION_WRITE_BASE_URI].integer = 1; /* Emit relative URIs where possible */ options->options[RAPTOR_OPTION_RELATIVE_URIS].integer = 1; /* XML 1.0 output */ options->options[RAPTOR_OPTION_WRITER_XML_VERSION].integer = 10; /* Write XML declaration */ options->options[RAPTOR_OPTION_WRITER_XML_DECLARATION].integer = 1; /* Indent 2 spaces */ options->options[RAPTOR_OPTION_WRITER_INDENT_WIDTH].integer = 2; /* lax (no strict) parsing */ options->options[RAPTOR_OPTION_STRICT].integer = 0; /* SSL verify peers */ options->options[RAPTOR_OPTION_WWW_SSL_VERIFY_PEER].integer = 1; /* SSL fully verify hosts */ options->options[RAPTOR_OPTION_WWW_SSL_VERIFY_HOST].integer = 2; } void raptor_object_options_clear(raptor_object_options* options) { int i; for(i = 0; i <= RAPTOR_OPTION_LAST; i++) { if(raptor_option_value_is_numeric((raptor_option)i)) continue; if(options->options[i].string) RAPTOR_FREE(char*, options->options[i].string); } } /* * raptor_object_options_get_option: * @options: options object * @option: option to get value * @string_p: pointer to where to store string value * @integer_p: pointer to where to store integer value * * INTERNAL - get option value * * Any string value returned in *@string_p is shared and must be * copied by the caller. * * The allowed options vary by the area field of @options. * * Return value: option value or < 0 for an illegal option **/ int raptor_object_options_get_option(raptor_object_options* options, raptor_option option, char** string_p, int* integer_p) { if(!raptor_option_is_valid_for_area(option, options->area)) return 1; if(raptor_option_value_is_numeric(option)) { /* numeric options */ int value = options->options[(int)option].integer; if(integer_p) *integer_p = value; } else { /* non-numeric options */ char* string = options->options[(int)option].string; if(string_p) *string_p = string; } return 0; } /* * raptor_object_options_set_option: * @options: options object * @option: option to set * @string: string option value (or NULL) * @integer: integer option value * * INTERNAL - set option * * If @string is not NULL and the option type is numeric, the string * value is converted to an integer and used in preference to @integer. * * If @string is NULL and the option type is not numeric, an error is * returned. * * The @string values used are copied. * * The allowed options vary by the area field of @options. * * Return value: non 0 on failure or if the option is unknown **/ int raptor_object_options_set_option(raptor_object_options *options, raptor_option option, const char* string, int integer) { if(!raptor_option_is_valid_for_area(option, options->area)) return 1; if(raptor_option_value_is_numeric(option)) { /* numeric options */ if(string) integer = atoi((const char*)string); options->options[(int)option].integer = integer; return 0; } else { /* non-numeric options */ char *string_copy; size_t len = 0; if(string) len = strlen((const char*)string); string_copy = RAPTOR_MALLOC(char*, len + 1); if(!string_copy) return 1; if(len) memcpy(string_copy, string, len); string_copy[len] = '\0'; options->options[(int)option].string = string_copy; } return 0; } raptor2-2.0.15/src/raptor_serialize_rdfxml.c0000644000175000017500000005657012325013605016010 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_rdfxml.c - RDF/XML serializer * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Raptor RDF/XML serializer object */ typedef struct { /* Namespace stack */ raptor_namespace_stack *nstack; /* the xml: namespace - this is destroyed when nstack above is deleted */ raptor_namespace *xml_nspace; /* the rdf: namespace - this is destroyed when nstack above is deleted */ raptor_namespace *rdf_nspace; /* the rdf:RDF element */ raptor_xml_element* rdf_RDF_element; /* where the xml is being written */ raptor_xml_writer *xml_writer; /* User declared namespaces */ raptor_sequence *namespaces; /* non zero if rdf:RDF has been written (and thus no new namespaces * can be declared). */ int written_header; } raptor_rdfxml_serializer_context; /* local prototypes */ static void raptor_rdfxml_serialize_terminate(raptor_serializer* serializer); /* create a new serializer */ static int raptor_rdfxml_serialize_init(raptor_serializer* serializer, const char *name) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; context->nstack = raptor_new_namespaces(serializer->world, 1); if(!context->nstack) return 1; context->xml_nspace = raptor_new_namespace(context->nstack, (const unsigned char*)"xml", (const unsigned char*)raptor_xml_namespace_uri, 0); context->rdf_nspace = raptor_new_namespace(context->nstack, (const unsigned char*)"rdf", (const unsigned char*)raptor_rdf_namespace_uri, 0); context->namespaces = raptor_new_sequence(NULL, NULL); if(!context->xml_nspace || !context->rdf_nspace || !context->namespaces) { raptor_rdfxml_serialize_terminate(serializer); return 1; } /* Note: item 0 in the list is rdf:RDF's namespace */ if(raptor_sequence_push(context->namespaces, context->rdf_nspace)) { raptor_rdfxml_serialize_terminate(serializer); return 1; } return 0; } /* destroy a serializer */ static void raptor_rdfxml_serialize_terminate(raptor_serializer* serializer) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; if(context->xml_writer) { raptor_free_xml_writer(context->xml_writer); context->xml_writer = NULL; } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element = NULL; } if(context->rdf_nspace) { raptor_free_namespace(context->rdf_nspace); context->rdf_nspace = NULL; } if(context->xml_nspace) { raptor_free_namespace(context->xml_nspace); context->xml_nspace = NULL; } if(context->namespaces) { int i; /* Note: item 0 in the list is rdf:RDF's namespace and freed above */ for(i = 1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(ns) raptor_free_namespace(ns); } raptor_free_sequence(context->namespaces); context->namespaces = NULL; } if(context->nstack) { raptor_free_namespaces(context->nstack); context->nstack = NULL; } } #define RDFXML_NAMESPACE_DEPTH 0 /* add a namespace */ static int raptor_rdfxml_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; int i; if(context->written_header) return 1; for(i = 0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals(ns->uri, nspace->uri)) return 1; } nspace = raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, RDFXML_NAMESPACE_DEPTH); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_rdfxml_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; raptor_namespace *ns; int rc; ns = raptor_new_namespace_from_uri(context->nstack, prefix, uri, RDFXML_NAMESPACE_DEPTH); rc = raptor_rdfxml_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* start a serialize */ static int raptor_rdfxml_serialize_start(raptor_serializer* serializer) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; raptor_xml_writer* xml_writer; raptor_option option; if(context->xml_writer) { raptor_free_xml_writer(context->xml_writer); context->xml_writer = NULL; } xml_writer = raptor_new_xml_writer(serializer->world, context->nstack, serializer->iostream); if(!xml_writer) return 1; option = RAPTOR_OPTION_WRITER_XML_VERSION; raptor_xml_writer_set_option(xml_writer, option, NULL, RAPTOR_OPTIONS_GET_NUMERIC(serializer, option)); option = RAPTOR_OPTION_WRITER_XML_DECLARATION; raptor_xml_writer_set_option(xml_writer, option, NULL, RAPTOR_OPTIONS_GET_NUMERIC(serializer, option)); context->xml_writer = xml_writer; context->written_header = 0; return 0; } static int raptor_rdfxml_ensure_writen_header(raptor_serializer* serializer, raptor_rdfxml_serializer_context* context) { raptor_xml_writer* xml_writer; raptor_uri *base_uri; int i; raptor_qname **attrs = NULL; int attrs_count = 0; int rc = 1; if(context->written_header) return 0; context->written_header = 1; xml_writer = context->xml_writer; base_uri = serializer->base_uri; if(base_uri) base_uri = raptor_uri_copy(base_uri); context->rdf_RDF_element = raptor_new_xml_element_from_namespace_local_name(context->rdf_nspace, (const unsigned char*)"RDF", NULL, base_uri); if(!context->rdf_RDF_element) goto tidy; /* NOTE: Starts it item 1 as item 0 is the element's namespace (rdf) * and does not need to be declared */ for(i = 1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(raptor_xml_element_declare_namespace(context->rdf_RDF_element, ns)) goto tidy; } if(base_uri && RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_WRITE_BASE_URI)) { const unsigned char* base_uri_string; attrs = RAPTOR_CALLOC(raptor_qname **, 1, sizeof(raptor_qname*)); if(!attrs) goto tidy; base_uri_string = raptor_uri_as_string(base_uri); attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->xml_nspace, (const unsigned char*)"base", base_uri_string); if(!attrs[attrs_count]) { RAPTOR_FREE(qnamearray, attrs); goto tidy; } attrs_count++; } if(attrs_count) raptor_xml_element_set_attributes(context->rdf_RDF_element, attrs, attrs_count); else raptor_xml_element_set_attributes(context->rdf_RDF_element, NULL, 0); raptor_xml_writer_start_element(xml_writer, context->rdf_RDF_element); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); rc = 0; tidy: if(base_uri) raptor_free_uri(base_uri); return rc; } /* serialize a statement */ static int raptor_rdfxml_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; raptor_xml_writer* xml_writer = context->xml_writer; unsigned char* uri_string = NULL; /* predicate URI */ unsigned char* name = NULL; /* where to split predicate name */ unsigned char* subject_uri_string = NULL; unsigned char* object_uri_string = NULL; const unsigned char* nsprefix = (const unsigned char*)"ns0"; int rc = 1; size_t len; raptor_xml_element* rdf_Description_element = NULL; raptor_uri* predicate_ns_uri = NULL; raptor_namespace* predicate_ns = NULL; int free_predicate_ns = 0; raptor_xml_element* predicate_element = NULL; raptor_qname **attrs = NULL; int attrs_count = 0; raptor_uri* base_uri = NULL; raptor_term_type object_type; int allocated = 1; int object_is_parseTypeLiteral = 0; if(raptor_rdfxml_ensure_writen_header(serializer, context)) return 1; if(statement->predicate->type == RAPTOR_TERM_TYPE_URI) { unsigned char *p; size_t uri_len; size_t name_len = 1; unsigned char c; /* Do not use raptor_uri_as_counted_string() - we want a modifiable copy */ uri_string = raptor_uri_to_counted_string(statement->predicate->value.uri, &uri_len); if(!uri_string) goto oom; p= uri_string; name_len = uri_len; /* FIXME: this loop could be made smarter */ while(name_len >0) { if(raptor_xml_name_check(p, name_len, 10)) { name = p; break; } p++; name_len--; } if(!name || (name == uri_string)) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot split predicate URI %s into an XML qname - skipping statement", uri_string); rc = 0; /* skip but do not return an error */ goto tidy; } c = *name; *name = '\0'; predicate_ns_uri = raptor_new_uri(serializer->world, uri_string); *name = c; if(!predicate_ns_uri) goto oom; predicate_ns = raptor_namespaces_find_namespace_by_uri(context->nstack, predicate_ns_uri); if(!predicate_ns) { predicate_ns = raptor_new_namespace_from_uri(context->nstack, nsprefix, predicate_ns_uri, 0); if(!predicate_ns) { raptor_free_uri(predicate_ns_uri); goto oom; } free_predicate_ns = 1; } raptor_free_uri(predicate_ns_uri); } else { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with subject node type %d\n", statement->predicate->type); goto tidy; } /* base uri */ if(serializer->base_uri) base_uri = raptor_uri_copy(serializer->base_uri); rdf_Description_element = raptor_new_xml_element_from_namespace_local_name(context->rdf_nspace, (unsigned const char*)"Description", NULL, base_uri); if(!rdf_Description_element) goto oom; attrs = RAPTOR_CALLOC(raptor_qname**, 3, sizeof(raptor_qname*)); if(!attrs) goto oom; attrs_count = 0; /* subject */ switch(statement->subject->type) { case RAPTOR_TERM_TYPE_BLANK: attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"nodeID", statement->subject->value.blank.string); if(!attrs[attrs_count]) goto oom; attrs_count++; break; case RAPTOR_TERM_TYPE_URI: allocated = 1; if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS)) { subject_uri_string = raptor_uri_to_relative_uri_string(serializer->base_uri, statement->subject->value.uri); if(!subject_uri_string) goto oom; } else { subject_uri_string = raptor_uri_as_string(statement->subject->value.uri); allocated = 0; } attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"about", subject_uri_string); if(!attrs[attrs_count]) { if(allocated) RAPTOR_FREE(char*, subject_uri_string); goto oom; } attrs_count++; if(allocated) RAPTOR_FREE(char*, subject_uri_string); break; case RAPTOR_TERM_TYPE_LITERAL: raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with a literal subject\n"); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with subject node type %d", statement->subject->type); } if(attrs_count) { raptor_xml_element_set_attributes(rdf_Description_element, attrs, attrs_count); attrs = NULL; /* attrs ownership transferred to element */ } raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 2); raptor_xml_writer_start_element(xml_writer, rdf_Description_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); /* predicate */ predicate_element = raptor_new_xml_element_from_namespace_local_name(predicate_ns, name, NULL, base_uri); if(!predicate_element) goto oom; /* object */ attrs = RAPTOR_CALLOC(raptor_qname**, 3, sizeof(raptor_qname*)); if(!attrs) goto oom; attrs_count = 0; object_type = statement->object->type; switch(object_type) { case RAPTOR_TERM_TYPE_LITERAL: object_is_parseTypeLiteral = 0; if(statement->object->value.literal.datatype && raptor_uri_equals(statement->object->value.literal.datatype, RAPTOR_RDF_XMLLiteral_URI(serializer->world))) object_is_parseTypeLiteral = 1; if(statement->object->value.literal.language) { attrs[attrs_count] = raptor_new_qname(context->nstack, (unsigned char*)"xml:lang", statement->object->value.literal.language); if(!attrs[attrs_count]) goto oom; attrs_count++; } len = statement->object->value.literal.string_len; if(object_is_parseTypeLiteral) { attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"parseType", (const unsigned char*)"Literal"); if(!attrs[attrs_count]) goto oom; attrs_count++; raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs = NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_start_element(xml_writer, predicate_element); /* Print without escaping XML */ if(len) raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)statement->object->value.literal.string, RAPTOR_BAD_CAST(unsigned int, len)); } else { if(statement->object->value.literal.datatype) { attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"datatype", raptor_uri_as_string(statement->object->value.literal.datatype)); if(!attrs[attrs_count]) goto oom; attrs_count++; } raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs = NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_start_element(xml_writer, predicate_element); if(len) raptor_xml_writer_cdata_counted(xml_writer, statement->object->value.literal.string, RAPTOR_BAD_CAST(unsigned int, len)); } raptor_xml_writer_end_element(xml_writer, predicate_element); raptor_free_xml_element(predicate_element); predicate_element = NULL; raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); break; case RAPTOR_TERM_TYPE_BLANK: attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"nodeID", statement->object->value.blank.string); if(!attrs[attrs_count]) goto oom; attrs_count++; raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs = NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_empty_element(xml_writer, predicate_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); break; case RAPTOR_TERM_TYPE_URI: /* must be URI */ if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS)) { object_uri_string = raptor_uri_to_relative_uri_string(serializer->base_uri, statement->object->value.uri); } else { object_uri_string = raptor_uri_to_string(statement->object->value.uri); } if(!object_uri_string) goto oom; attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"resource", object_uri_string); RAPTOR_FREE(char*, object_uri_string); if(!attrs[attrs_count]) goto oom; attrs_count++; raptor_xml_element_set_attributes(predicate_element, attrs, attrs_count); attrs = NULL; /* attrs ownership transferred to element */ raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 4); raptor_xml_writer_empty_element(xml_writer, predicate_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with object node type %d", object_type); } raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)" ", 2); rc = 0; /* success */ goto tidy; oom: raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_FATAL, NULL, "Out of memory"); tidy: if(attrs) RAPTOR_FREE(qnamearray, attrs); if(predicate_element) raptor_free_xml_element(predicate_element); if(rdf_Description_element) { raptor_xml_writer_end_element(xml_writer, rdf_Description_element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"\n", 1); raptor_free_xml_element(rdf_Description_element); } if(base_uri) raptor_free_uri(base_uri); if(free_predicate_ns) raptor_free_namespace(predicate_ns); if(uri_string) RAPTOR_FREE(char*, uri_string); return rc; } /* end a serialize */ static int raptor_rdfxml_serialize_end(raptor_serializer* serializer) { raptor_rdfxml_serializer_context* context = (raptor_rdfxml_serializer_context*)serializer->context; raptor_xml_writer* xml_writer = context->xml_writer; if(xml_writer) { /* Make sure an empty RDF/XML document is written when 0 triples * were seen */ /* ignore ret value */ raptor_rdfxml_ensure_writen_header(serializer, context); if(context->rdf_RDF_element) { raptor_xml_writer_end_element(xml_writer, context->rdf_RDF_element); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } raptor_xml_writer_flush(xml_writer); } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element = NULL; } return 0; } /* finish the serializer factory */ static void raptor_rdfxml_serialize_finish_factory(raptor_serializer_factory* factory) { } static const char* const rdfxml_names[2] = { "rdfxml", NULL}; static const char* const rdfxml_uri_strings[3] = { "http://www.w3.org/ns/formats/RDF_XML", "http://www.w3.org/TR/rdf-syntax-grammar", NULL }; #define RDFXML_TYPES_COUNT 2 static const raptor_type_q rdfxml_types[RDFXML_TYPES_COUNT + 1] = { { "application/rdf+xml", 19, 10}, { "text/rdf", 8, 6}, { NULL, 0, 0} }; static int raptor_rdfxml_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = rdfxml_names; factory->desc.mime_types = rdfxml_types; factory->desc.label = "RDF/XML"; factory->desc.uri_strings = rdfxml_uri_strings, factory->context_length = sizeof(raptor_rdfxml_serializer_context); factory->init = raptor_rdfxml_serialize_init; factory->terminate = raptor_rdfxml_serialize_terminate; factory->declare_namespace = raptor_rdfxml_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rdfxml_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rdfxml_serialize_start; factory->serialize_statement = raptor_rdfxml_serialize_statement; factory->serialize_end = raptor_rdfxml_serialize_end; factory->finish_factory = raptor_rdfxml_serialize_finish_factory; return 0; } int raptor_init_serializer_rdfxml(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_rdfxml_serializer_register_factory); } raptor2-2.0.15/src/raptor_turtle_writer.c0000644000175000017500000006670512415611634015367 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_turtle_writer.c - Raptor Turtle Writer * * Copyright (C) 2006, Dave Robillard * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_LIMITS_H #include #endif #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE typedef enum { TURTLE_WRITER_AUTO_INDENT = 1 } raptor_turtle_writer_flags; #define TURTLE_WRITER_AUTO_INDENT(turtle_writer) ((turtle_writer->flags & TURTLE_WRITER_AUTO_INDENT) != 0) struct raptor_turtle_writer_s { raptor_world* world; int depth; raptor_uri* base_uri; int my_nstack; raptor_namespace_stack *nstack; int nstack_depth; /* outputting to this iostream */ raptor_iostream *iostr; /* Turtle Writer flags - bits defined in enum raptor_turtle_writer_flags */ int flags; /* indentation per level if formatting */ int indent; }; /* 16 spaces */ #define SPACES_BUFFER_SIZE sizeof(spaces_buffer) static const unsigned char spaces_buffer[] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; void raptor_turtle_writer_increase_indent(raptor_turtle_writer *turtle_writer) { turtle_writer->depth += turtle_writer->indent; } void raptor_turtle_writer_decrease_indent(raptor_turtle_writer *turtle_writer) { turtle_writer->depth -= turtle_writer->indent; } void raptor_turtle_writer_newline(raptor_turtle_writer *turtle_writer) { int num_spaces; raptor_iostream_write_byte('\n', turtle_writer->iostr); if(!TURTLE_WRITER_AUTO_INDENT(turtle_writer)) return; num_spaces = turtle_writer->depth * turtle_writer->indent; while(num_spaces > 0) { int count; count = (num_spaces > RAPTOR_GOOD_CAST(int, SPACES_BUFFER_SIZE)) ? RAPTOR_GOOD_CAST(int, SPACES_BUFFER_SIZE) : num_spaces; raptor_iostream_counted_string_write(spaces_buffer, count, turtle_writer->iostr); num_spaces -= count; } return; } /** * raptor_new_turtle_writer: * @world: raptor_world object * @base_uri: Base URI for the writer (or NULL) * @write_base_uri: non-0 to write '@base' directive to output * @nstack: Namespace stack for the writer to start with (or NULL) * @iostr: I/O stream to write to * * Constructor - Create a new Turtle Writer writing Turtle to a raptor_iostream * * Return value: a new #raptor_turtle_writer object or NULL on failure **/ raptor_turtle_writer* raptor_new_turtle_writer(raptor_world* world, raptor_uri* base_uri, int write_base_uri, raptor_namespace_stack *nstack, raptor_iostream* iostr) { raptor_turtle_writer* turtle_writer; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!nstack || !iostr) return NULL; raptor_world_open(world); turtle_writer = RAPTOR_CALLOC(raptor_turtle_writer*, 1, sizeof(*turtle_writer)); if(!turtle_writer) return NULL; turtle_writer->world = world; turtle_writer->nstack_depth = 0; turtle_writer->nstack = nstack; if(!turtle_writer->nstack) { turtle_writer->nstack = raptor_new_namespaces(world, 1); turtle_writer->my_nstack = 1; } turtle_writer->iostr = iostr; turtle_writer->flags = 0; turtle_writer->indent = 2; turtle_writer->base_uri = NULL; /* Ensure any initial base URI is not written relative */ if(base_uri && write_base_uri) raptor_turtle_writer_base(turtle_writer, base_uri); turtle_writer->base_uri = base_uri; return turtle_writer; } /** * raptor_free_turtle_writer: * @turtle_writer: Turtle writer object * * Destructor - Free Turtle Writer * **/ void raptor_free_turtle_writer(raptor_turtle_writer* turtle_writer) { if(!turtle_writer) return; if(turtle_writer->nstack && turtle_writer->my_nstack) raptor_free_namespaces(turtle_writer->nstack); RAPTOR_FREE(raptor_turtle_writer, turtle_writer); } static int raptor_turtle_writer_contains_newline(const unsigned char *s, size_t len) { size_t i = 0; for( ; i < len; i++) if(s[i] == '\n') return 1; return 0; } /** * raptor_turtle_writer_raw: * @turtle_writer: Turtle writer object * @s: raw string to write * * Write a raw string to the Turtle writer verbatim. * **/ void raptor_turtle_writer_raw(raptor_turtle_writer* turtle_writer, const unsigned char *s) { raptor_iostream_string_write(s, turtle_writer->iostr); } /** * raptor_turtle_writer_raw_counted: * @turtle_writer: Turtle writer object * @s: raw string to write * @len: length of string * * Write a counted string to the Turtle writer verbatim. * **/ void raptor_turtle_writer_raw_counted(raptor_turtle_writer* turtle_writer, const unsigned char *s, unsigned int len) { raptor_iostream_counted_string_write(s, len, turtle_writer->iostr); } /** * raptor_turtle_writer_namespace_prefix: * @turtle_writer: Turtle writer object * @ns: Namespace to write prefix declaration for * * Write a namespace prefix declaration (@prefix) * * Must only be used at the beginning of a document. */ void raptor_turtle_writer_namespace_prefix(raptor_turtle_writer* turtle_writer, raptor_namespace* ns) { raptor_iostream_string_write("@prefix ", turtle_writer->iostr); if(ns->prefix) raptor_iostream_string_write(raptor_namespace_get_prefix(ns), turtle_writer->iostr); raptor_iostream_counted_string_write(": ", 2, turtle_writer->iostr); raptor_turtle_writer_reference(turtle_writer, raptor_namespace_get_uri(ns)); raptor_iostream_counted_string_write(" .\n", 3, turtle_writer->iostr); } /** * raptor_turtle_writer_base: * @turtle_writer: Turtle writer object * @base_uri: New base URI or NULL * * Write a base URI directive (@base) to set the in-scope base URI */ void raptor_turtle_writer_base(raptor_turtle_writer* turtle_writer, raptor_uri* base_uri) { if(base_uri) { raptor_iostream_counted_string_write("@base ", 6, turtle_writer->iostr); raptor_turtle_writer_reference(turtle_writer, base_uri); raptor_iostream_counted_string_write(" .\n", 3, turtle_writer->iostr); } } /** * raptor_turtle_writer_reference: * @turtle_writer: Turtle writer object * @uri: URI to write * * Write a Turtle-encoded URI to the Turtle writer. * * Return value: non-0 on failure **/ int raptor_turtle_writer_reference(raptor_turtle_writer* turtle_writer, raptor_uri* uri) { return raptor_uri_escaped_write(uri, turtle_writer->base_uri, RAPTOR_ESCAPED_WRITE_TURTLE_URI, turtle_writer->iostr); } /** * raptor_turtle_writer_qname: * @turtle_writer: Turtle writer object * @qname: qname to write * * Write a QName to the Turtle writer. * **/ void raptor_turtle_writer_qname(raptor_turtle_writer* turtle_writer, raptor_qname* qname) { raptor_iostream* iostr = turtle_writer->iostr; if(qname->nspace && qname->nspace->prefix_length > 0) raptor_iostream_counted_string_write(qname->nspace->prefix, qname->nspace->prefix_length, iostr); raptor_iostream_write_byte(':', iostr); raptor_iostream_counted_string_write(qname->local_name, qname->local_name_length, iostr); return; } /** * raptor_turtle_writer_quoted_counted_string: * @turtle_writer: Turtle writer object * @s: string to write * @len: string length * * Write a Turtle escaped-string inside double quotes to the writer. * * Return value: non-0 on failure **/ int raptor_turtle_writer_quoted_counted_string(raptor_turtle_writer* turtle_writer, const unsigned char *s, size_t len) { const unsigned char *quotes = (const unsigned char *)"\"\"\"\""; const unsigned char *q = quotes + 2; size_t q_len = 1; int flags = RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL; int rc = 0; if(!s) return 1; /* Turtle """longstring""" (2) or "string" (1) */ if(raptor_turtle_writer_contains_newline(s, len)) { /* long string */ flags = RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL; q = quotes; q_len = 3; } raptor_iostream_counted_string_write(q, q_len, turtle_writer->iostr); rc = raptor_string_escaped_write(s, len, '"', flags, turtle_writer->iostr); raptor_iostream_counted_string_write(q, q_len, turtle_writer->iostr); return rc; } /* * raptor_turtle_writer_literal: * @turtle_writer: Turtle writer object * @nstack: Namespace stack for making a QName for datatype URI * @s: literal string to write (SHARED) * @lang: language tag (may be NULL) * @datatype: datatype URI (may be NULL) * * INTERNAL - Write a literal (possibly with lang and datatype) to the Turtle writer. * * Return value: non-0 on failure **/ int raptor_turtle_writer_literal(raptor_turtle_writer* turtle_writer, raptor_namespace_stack *nstack, const unsigned char* s, const unsigned char* lang, raptor_uri* datatype) { /* DBL_MAX = 309 decimal digits */ #define INT_MAX_LEN 309 /* DBL_EPSILON = 52 digits */ #define FRAC_MAX_LEN 52 char* endptr = (char *)s; int written = 0; /* typed literal special cases */ if(datatype) { /* integer */ if(raptor_uri_equals(datatype, turtle_writer->world->xsd_integer_uri)) { /* FIXME. Work around that gcc < 4.5 cannot disable warn_unused_result */ long gcc_is_stupid = strtol((const char*)s, &endptr, 10); if(endptr != (char*)s && !*endptr) { raptor_iostream_string_write(s, turtle_writer->iostr); /* More gcc madness to 'use' the variable I didn't want */ written = 1 + 0 * (int)gcc_is_stupid; } else { raptor_log_error(turtle_writer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Illegal value for xsd:integer literal."); } /* double, decimal */ } else if(raptor_uri_equals(datatype, turtle_writer->world->xsd_double_uri) || raptor_uri_equals(datatype, turtle_writer->world->xsd_decimal_uri)) { /* FIXME. Work around that gcc < 4.5 cannot disable warn_unused_result */ double gcc_is_doubly_stupid = strtod((const char*)s, &endptr); if(endptr != (char*)s && !*endptr) { raptor_iostream_string_write(s, turtle_writer->iostr); /* More gcc madness to 'use' the variable I didn't want */ written = 1 + 0 * (int)gcc_is_doubly_stupid; } else { raptor_log_error(turtle_writer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Illegal value for xsd:double or xsd:decimal literal."); } /* boolean */ } else if(raptor_uri_equals(datatype, turtle_writer->world->xsd_boolean_uri)) { if(!strcmp((const char*)s, "0") || !strcmp((const char*)s, "false")) { raptor_iostream_string_write("false", turtle_writer->iostr); written = 1; } else if(!strcmp((const char*)s, "1") || !strcmp((const char*)s, "true")) { raptor_iostream_string_write("true", turtle_writer->iostr); written = 1; } else { raptor_log_error(turtle_writer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Illegal value for xsd:boolean literal."); } } } if(written) return 0; if(raptor_turtle_writer_quoted_counted_string(turtle_writer, s, strlen((const char*)s))) return 1; /* typed literal, not a special case */ if(datatype) { raptor_qname* qname; raptor_iostream_string_write("^^", turtle_writer->iostr); qname = raptor_new_qname_from_namespace_uri(nstack, datatype, 10); if(qname) { raptor_turtle_writer_qname(turtle_writer, qname); raptor_free_qname(qname); } else raptor_turtle_writer_reference(turtle_writer, datatype); } else if(lang) { /* literal with language tag */ raptor_iostream_write_byte('@', turtle_writer->iostr); raptor_iostream_string_write(lang, turtle_writer->iostr); } return 0; } /** * raptor_turtle_writer_comment: * @turtle_writer: Turtle writer object * @s: comment string to write * * Write a Turtle comment to the Turtle writer. * **/ void raptor_turtle_writer_comment(raptor_turtle_writer* turtle_writer, const unsigned char *string) { unsigned char c; size_t len = strlen((const char*)string); raptor_iostream_counted_string_write((const unsigned char*)"# ", 2, turtle_writer->iostr); for(; (c=*string); string++, len--) { if(c == '\n') { raptor_turtle_writer_newline(turtle_writer); raptor_iostream_counted_string_write((const unsigned char*)"# ", 2, turtle_writer->iostr); } else if(c != '\r') { /* skip carriage returns (windows... *sigh*) */ raptor_iostream_write_byte(c, turtle_writer->iostr); } } raptor_turtle_writer_newline(turtle_writer); } /** * raptor_turtle_writer_set_option: * @turtle_writer: #raptor_turtle_writer turtle_writer object * @option: option to set from enumerated #raptor_option values * @value: integer option value (0 or larger) * * Set turtle_writer options with integer values. * * The allowed options are available via * raptor_world_get_option_description() * * Return value: non 0 on failure or if the option is unknown **/ int raptor_turtle_writer_set_option(raptor_turtle_writer *turtle_writer, raptor_option option, int value) { if(value < 0 || !raptor_option_is_valid_for_area(option, RAPTOR_OPTION_AREA_TURTLE_WRITER)) return 1; switch(option) { case RAPTOR_OPTION_WRITER_AUTO_INDENT: if(value) turtle_writer->flags |= TURTLE_WRITER_AUTO_INDENT; else turtle_writer->flags &= ~TURTLE_WRITER_AUTO_INDENT; break; case RAPTOR_OPTION_WRITER_INDENT_WIDTH: turtle_writer->indent = value; break; case RAPTOR_OPTION_WRITER_AUTO_EMPTY: case RAPTOR_OPTION_WRITER_XML_VERSION: case RAPTOR_OPTION_WRITER_XML_DECLARATION: break; /* parser options */ case RAPTOR_OPTION_SCANNING: case RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES: case RAPTOR_OPTION_ALLOW_BAGID: case RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_OPTION_NORMALIZE_LANGUAGE: case RAPTOR_OPTION_NON_NFC_FATAL: case RAPTOR_OPTION_WARN_OTHER_PARSETYPES: case RAPTOR_OPTION_CHECK_RDF_ID: case RAPTOR_OPTION_HTML_TAG_SOUP: case RAPTOR_OPTION_MICROFORMATS: case RAPTOR_OPTION_HTML_LINK: case RAPTOR_OPTION_WWW_TIMEOUT: case RAPTOR_OPTION_STRICT: /* Shared */ case RAPTOR_OPTION_NO_NET: case RAPTOR_OPTION_NO_FILE: case RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES: /* XML writer options */ case RAPTOR_OPTION_RELATIVE_URIS: /* DOT serializer options */ case RAPTOR_OPTION_RESOURCE_BORDER: case RAPTOR_OPTION_LITERAL_BORDER: case RAPTOR_OPTION_BNODE_BORDER: case RAPTOR_OPTION_RESOURCE_FILL: case RAPTOR_OPTION_LITERAL_FILL: case RAPTOR_OPTION_BNODE_FILL: /* JSON serializer options */ case RAPTOR_OPTION_JSON_CALLBACK: case RAPTOR_OPTION_JSON_EXTRA_DATA: case RAPTOR_OPTION_RSS_TRIPLES: case RAPTOR_OPTION_ATOM_ENTRY_URI: case RAPTOR_OPTION_PREFIX_ELEMENTS: /* Turtle serializer option */ case RAPTOR_OPTION_WRITE_BASE_URI: /* WWW option */ case RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL: case RAPTOR_OPTION_WWW_HTTP_USER_AGENT: case RAPTOR_OPTION_WWW_CERT_FILENAME: case RAPTOR_OPTION_WWW_CERT_TYPE: case RAPTOR_OPTION_WWW_CERT_PASSPHRASE: case RAPTOR_OPTION_WWW_SSL_VERIFY_PEER: case RAPTOR_OPTION_WWW_SSL_VERIFY_HOST: default: return -1; } return 0; } /** * raptor_turtle_writer_set_option_string: * @turtle_writer: #raptor_turtle_writer turtle_writer object * @option: option to set from enumerated #raptor_option values * @value: option value * * Set turtle_writer options with string values. * * The allowed options are available via * raptor_world_get_option_description(). * If the option type is integer, the value is interpreted as an * integer. * * Return value: non 0 on failure or if the option is unknown **/ int raptor_turtle_writer_set_option_string(raptor_turtle_writer *turtle_writer, raptor_option option, const unsigned char *value) { if(!value || !raptor_option_is_valid_for_area(option, RAPTOR_OPTION_AREA_TURTLE_WRITER)) return 1; if(raptor_option_value_is_numeric(option)) return raptor_turtle_writer_set_option(turtle_writer, option, atoi((const char*)value)); return 1; } /** * raptor_turtle_writer_get_option: * @turtle_writer: #raptor_turtle_writer serializer object * @option: option to get value * * Get various turtle_writer options. * * The allowed options are available via raptor_options_enumerate(). * * Note: no option value is negative * * Return value: option value or < 0 for an illegal option **/ int raptor_turtle_writer_get_option(raptor_turtle_writer *turtle_writer, raptor_option option) { int result = -1; switch(option) { case RAPTOR_OPTION_WRITER_AUTO_INDENT: result = TURTLE_WRITER_AUTO_INDENT(turtle_writer); break; case RAPTOR_OPTION_WRITER_INDENT_WIDTH: result = turtle_writer->indent; break; /* writer options */ case RAPTOR_OPTION_WRITER_AUTO_EMPTY: case RAPTOR_OPTION_WRITER_XML_VERSION: case RAPTOR_OPTION_WRITER_XML_DECLARATION: /* parser options */ case RAPTOR_OPTION_SCANNING: case RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES: case RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES: case RAPTOR_OPTION_ALLOW_BAGID: case RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST: case RAPTOR_OPTION_NORMALIZE_LANGUAGE: case RAPTOR_OPTION_NON_NFC_FATAL: case RAPTOR_OPTION_WARN_OTHER_PARSETYPES: case RAPTOR_OPTION_CHECK_RDF_ID: case RAPTOR_OPTION_HTML_TAG_SOUP: case RAPTOR_OPTION_MICROFORMATS: case RAPTOR_OPTION_HTML_LINK: case RAPTOR_OPTION_WWW_TIMEOUT: case RAPTOR_OPTION_STRICT: /* Shared */ case RAPTOR_OPTION_NO_NET: case RAPTOR_OPTION_NO_FILE: case RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES: /* XML writer options */ case RAPTOR_OPTION_RELATIVE_URIS: /* DOT serializer options */ case RAPTOR_OPTION_RESOURCE_BORDER: case RAPTOR_OPTION_LITERAL_BORDER: case RAPTOR_OPTION_BNODE_BORDER: case RAPTOR_OPTION_RESOURCE_FILL: case RAPTOR_OPTION_LITERAL_FILL: case RAPTOR_OPTION_BNODE_FILL: /* JSON serializer options */ case RAPTOR_OPTION_JSON_CALLBACK: case RAPTOR_OPTION_JSON_EXTRA_DATA: case RAPTOR_OPTION_RSS_TRIPLES: case RAPTOR_OPTION_ATOM_ENTRY_URI: case RAPTOR_OPTION_PREFIX_ELEMENTS: /* Turtle serializer option */ case RAPTOR_OPTION_WRITE_BASE_URI: /* WWW option */ case RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL: case RAPTOR_OPTION_WWW_HTTP_USER_AGENT: case RAPTOR_OPTION_WWW_CERT_FILENAME: case RAPTOR_OPTION_WWW_CERT_TYPE: case RAPTOR_OPTION_WWW_CERT_PASSPHRASE: case RAPTOR_OPTION_WWW_SSL_VERIFY_PEER: case RAPTOR_OPTION_WWW_SSL_VERIFY_HOST: default: break; } return result; } /** * raptor_turtle_writer_get_option_string: * @turtle_writer: #raptor_turtle_writer serializer object * @option: option to get value * * Get turtle_writer options with string values. * * The allowed options are available via raptor_options_enumerate(). * * Return value: option value or NULL for an illegal option or no value **/ const unsigned char * raptor_turtle_writer_get_option_string(raptor_turtle_writer *turtle_writer, raptor_option option) { return NULL; } /** * raptor_turtle_writer_bnodeid: * @turtle_writer: Turtle writer object * @bnodeid: blank node ID to write * @len: length of @bnodeid * * Write a blank node ID with leading _: to the Turtle writer. * **/ void raptor_turtle_writer_bnodeid(raptor_turtle_writer* turtle_writer, const unsigned char *bnodeid, size_t len) { raptor_bnodeid_ntriples_write(bnodeid, len, turtle_writer->iostr); } /** * raptor_turtle_writer_uri: * @turtle_writer: Turtle writer object * @uri: uri * * Write a #raptor_uri to a turtle writer in qname or URI form * * Return value: non-0 on failure */ int raptor_turtle_writer_uri(raptor_turtle_writer* turtle_writer, raptor_uri* uri) { raptor_qname* qname; int rc = 0; if(!uri) return 1; qname = raptor_new_qname_from_namespace_uri(turtle_writer->nstack, uri, 10); /* XML Names allow leading '_' and '.' anywhere but Turtle does not */ if(qname && !raptor_turtle_is_legal_turtle_qname(qname)) { raptor_free_qname(qname); qname = NULL; } if(qname) { raptor_turtle_writer_qname(turtle_writer, qname); raptor_free_qname(qname); } else { rc = raptor_turtle_writer_reference(turtle_writer, uri); } return rc; } /** * raptor_turtle_writer_term: * @turtle_writer: Turtle writer object * @term: term * * Write a #raptor_term to a turtle write * * Return value: non-0 on failure */ int raptor_turtle_writer_term(raptor_turtle_writer* turtle_writer, raptor_term* term) { int rc = 0; if(!term) return 1; if(term->type == RAPTOR_TERM_TYPE_URI) { rc = raptor_turtle_writer_uri(turtle_writer, term->value.uri); } else if(term->type == RAPTOR_TERM_TYPE_LITERAL) { rc = raptor_turtle_writer_literal(turtle_writer, turtle_writer->nstack, term->value.literal.string, term->value.literal.language, term->value.literal.datatype); } else if(term->type == RAPTOR_TERM_TYPE_BLANK) { rc = raptor_bnodeid_ntriples_write(term->value.blank.string, term->value.blank.string_len, turtle_writer->iostr); } else { rc = 2; } return rc; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); const unsigned char *base_uri_string = (const unsigned char*)"http://example.org/base#"; const unsigned char* longstr = (const unsigned char*)"it's quoted\nand has newlines, \"s <> and\n\ttabbing"; #define OUT_BYTES_COUNT 149 int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); raptor_iostream *iostr; raptor_namespace_stack *nstack; raptor_namespace* ex_ns; raptor_turtle_writer* turtle_writer; raptor_uri* base_uri; raptor_qname* el_name; unsigned long count; /* for raptor_new_iostream_to_string */ void *string = NULL; size_t string_len = 0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); iostr = raptor_new_iostream_to_string(world, &string, &string_len, NULL); if(!iostr) { fprintf(stderr, "%s: Failed to create iostream to string\n", program); exit(1); } nstack = raptor_new_namespaces(world, 1); base_uri = raptor_new_uri(world, base_uri_string); turtle_writer = raptor_new_turtle_writer(world, base_uri, 1, nstack, iostr); if(!turtle_writer) { fprintf(stderr, "%s: Failed to create turtle_writer to iostream\n", program); exit(1); } raptor_turtle_writer_set_option(turtle_writer, RAPTOR_OPTION_WRITER_AUTO_INDENT, 1); ex_ns = raptor_new_namespace(nstack, (const unsigned char*)"ex", (const unsigned char*)"http://example.org/ns#", 0); raptor_turtle_writer_namespace_prefix(turtle_writer, ex_ns); raptor_turtle_writer_reference(turtle_writer, base_uri); raptor_turtle_writer_increase_indent(turtle_writer); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_raw(turtle_writer, (const unsigned char*)"ex:foo "); raptor_turtle_writer_quoted_counted_string(turtle_writer, longstr, strlen((const char*)longstr)); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" ;", 2); raptor_turtle_writer_newline(turtle_writer); el_name = raptor_new_qname_from_namespace_local_name(world, ex_ns, (const unsigned char*)"bar", NULL); raptor_turtle_writer_qname(turtle_writer, el_name); raptor_free_qname(el_name); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" ", 1); raptor_turtle_writer_literal(turtle_writer, nstack, (const unsigned char*)"10.0", NULL, world->xsd_decimal_uri); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_decrease_indent(turtle_writer); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)".", 1); raptor_turtle_writer_newline(turtle_writer); raptor_free_turtle_writer(turtle_writer); raptor_free_namespace(ex_ns); raptor_free_namespaces(nstack); raptor_free_uri(base_uri); count = raptor_iostream_tell(iostr); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing iostream\n", program); #endif raptor_free_iostream(iostr); if(count != OUT_BYTES_COUNT) { fprintf(stderr, "%s: I/O stream wrote %d bytes, expected %d\n", program, (int)count, (int)OUT_BYTES_COUNT); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); return 1; } if(!string) { fprintf(stderr, "%s: I/O stream failed to create a string\n", program); return 1; } string_len = strlen((const char*)string); if(string_len != count) { fprintf(stderr, "%s: I/O stream created a string length %d, expected %d\n", program, (int)string_len, (int)count); return 1; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Made Turtle string of %d bytes\n", program, (int)string_len); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); #endif raptor_free_memory(string); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif raptor2-2.0.15/src/raptor_serialize_rdfxmla.c0000644000175000017500000014003312325013605016135 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_rdfxmla.c - RDF/XML with abbreviations serializer * * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005, Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Raptor rdfxml-abbrev serializer object */ typedef struct { raptor_namespace_stack *nstack; /* Namespace stack */ raptor_namespace *xml_nspace; /* the xml: namespace */ raptor_namespace *rdf_nspace; /* the rdf: namespace */ raptor_xml_element* rdf_RDF_element; /* the rdf:RDF element */ raptor_xml_writer *xml_writer; /* where the xml is being written */ raptor_sequence *namespaces; /* User declared namespaces */ raptor_avltree *subjects; /* subject items */ raptor_avltree *blanks; /* blank subject items */ raptor_avltree *nodes; /* nodes */ raptor_abbrev_node *rdf_type; /* rdf:type uri */ /* non-zero if is Adobe XMP abbreviated form */ int is_xmp; /* non zero if rdf:RDF has been written (and thus no new namespaces * can be declared). */ int written_header; /* for labeling namespaces */ int namespace_count; /* xml_writer was passed in and not owned by us */ int external_xml_writer; /* true if should write rdf:RDF */ int write_rdf_RDF; /* starting namespace stack depth */ int starting_depth; /* namespaces stack was passed in andn not owned by us */ int external_nstack; /* If not NULL, the URI of the single node to serialize - starting * from property elements */ raptor_uri* single_node; /* If non-0, emit typed nodes */ int write_typed_nodes; } raptor_rdfxmla_context; /* prototypes for functions */ static int raptor_rdfxmla_emit_resource(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node *node, int depth); static int raptor_rdfxmla_emit_literal(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node *node, int depth); static int raptor_rdfxmla_emit_blank(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth); static int raptor_rdfxmla_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth); static int raptor_rdfxmla_emit_subject_properties(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_rdfxmla_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_rdfxmla_emit(raptor_serializer *serializer); static int raptor_rdfxmla_serialize_init(raptor_serializer* serializer, const char *name); static void raptor_rdfxmla_serialize_terminate(raptor_serializer* serializer); static int raptor_rdfxmla_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix); static int raptor_rdfxmla_serialize_start(raptor_serializer* serializer); static int raptor_rdfxmla_serialize_statement(raptor_serializer* serializer, raptor_statement *statement); static int raptor_rdfxmla_serialize_end(raptor_serializer* serializer); static void raptor_rdfxmla_serialize_finish_factory(raptor_serializer_factory* factory); /* helper functions */ /* * raptor_rdfxmla_emit_resource_uri: * @serializer: #raptor_serializer object * @element: XML Element * @uri: URI object * @depth: depth into tree * * Emit a description of a resource using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_resource_uri(raptor_serializer *serializer, raptor_xml_element *element, raptor_uri* uri, int depth) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_xml_writer *xml_writer = context->xml_writer; raptor_qname **attrs; unsigned char *attr_name; unsigned char *attr_value; RAPTOR_DEBUG2("Emitting resource predicate URI %s\n", raptor_uri_as_string(uri)); attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); if(!attrs) return 1; attr_name = (unsigned char *)"resource"; if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS)) /* newly allocated string */ attr_value = raptor_uri_to_relative_uri_string(serializer->base_uri, uri); else attr_value = raptor_uri_as_string(uri); attrs[0] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, attr_name, attr_value); if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS)) RAPTOR_FREE(char*, attr_value); if(!attrs[0]) { RAPTOR_FREE(qnamearray, attrs); return 1; } raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_end_element(context->xml_writer, element); RAPTOR_DEBUG2("Emitted resource predicate URI %s\n", raptor_uri_as_string(uri)); return 0; } /* * raptor_rdfxmla_emit_resource: * @serializer: #raptor_serializer object * @element: XML Element * @node: resource node * @depth: depth into tree * * Emit a description of a resource using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_resource(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { int rc; RAPTOR_DEBUG_ABBREV_NODE("Emitting resource node", node); if(node->term->type != RAPTOR_TERM_TYPE_URI) return 1; rc = raptor_rdfxmla_emit_resource_uri(serializer, element, node->term->value.uri, depth); RAPTOR_DEBUG_ABBREV_NODE("Emitted resource node", node); return rc; } /* * raptor_rdfxmla_emit_literal: * @serializer: #raptor_serializer object * @element: XML Element * @node: literal node * @depth: depth into tree * * Emit a description of a literal using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_literal(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_xml_writer *xml_writer = context->xml_writer; raptor_qname **attrs; int attrs_count; RAPTOR_DEBUG_ABBREV_NODE("Emitting literal node", node); if(node->term->type != RAPTOR_TERM_TYPE_LITERAL) return 1; if(node->term->value.literal.language || node->term->value.literal.datatype) { attrs_count = 0; attrs = RAPTOR_CALLOC(raptor_qname**, 2, sizeof(raptor_qname*)); if(!attrs) return 1; if(node->term->value.literal.language) { attrs[attrs_count] = raptor_new_qname(context->nstack, (unsigned char*)"xml:lang", node->term->value.literal.language); if(!attrs[attrs_count]) goto attrs_oom; attrs_count++; } if(node->term->value.literal.datatype) { unsigned char *datatype_value; datatype_value = raptor_uri_as_string(node->term->value.literal.datatype); attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"datatype", datatype_value); if(!attrs[attrs_count]) goto attrs_oom; attrs_count++; /* SJS Note: raptor_default_uri_as_string simply returns a * pointer to the string. Hope this is also true of alternate * uri implementations. */ /* RAPTOR_FREE(char*, datatype_value); */ } raptor_xml_element_set_attributes(element, attrs, attrs_count); } raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_cdata(xml_writer, node->term->value.literal.string); raptor_xml_writer_end_element(xml_writer, element); RAPTOR_DEBUG_ABBREV_NODE("Emitted literal node", node); return 0; attrs_oom: raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_FATAL, NULL, "Out of memory"); /* attrs_count has not been incremented yet * and it points to the qname the allocation of which failed */ attrs_count--; while(attrs_count>=0) raptor_free_qname(attrs[attrs_count--]); RAPTOR_FREE(qnamearray, attrs); return 1; } /* * raptor_rdfxmla_emit_blank: * @serializer: #raptor_serializer object * @element: XML Element * @node: blank node * @depth: depth into tree * * Emit a description of a blank node using an XML Element * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_blank(raptor_serializer *serializer, raptor_xml_element *element, raptor_abbrev_node* node, int depth) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; RAPTOR_DEBUG_ABBREV_NODE("Emitting blank node", node); if(node->term->type != RAPTOR_TERM_TYPE_BLANK) return 1; if((node->count_as_subject == 1 && node->count_as_object == 1)) { /* If this is only used as a 1 subject and object or never * used as a subject or never used as an object, it never need * be referenced with an explicit name */ raptor_abbrev_subject* blank; raptor_xml_writer_start_element(context->xml_writer, element); blank = raptor_abbrev_subject_find(context->blanks, node->term); if(blank) { raptor_rdfxmla_emit_subject(serializer, blank, depth + 1); raptor_abbrev_subject_invalidate(blank); } } else { unsigned char *attr_name = (unsigned char*)"nodeID"; unsigned char *attr_value = node->term->value.blank.string; raptor_qname **attrs; attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); if(!attrs) return 1; attrs[0] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, attr_name, attr_value); raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_start_element(context->xml_writer, element); } raptor_xml_writer_end_element(context->xml_writer, element); RAPTOR_DEBUG_ABBREV_NODE("Emitted blank node", node); return 0; } /* * raptor_rdfxmla_emit_subject_list_items: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit an rdf list of items (rdf:li) about a subject node. * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; int rv = 0; int i = 0; raptor_uri* base_uri = NULL; RAPTOR_DEBUG_ABBREV_NODE("Emitting subject list items", subject->node); while(!rv && i < raptor_sequence_size(subject->list_items)) { raptor_abbrev_node* object; raptor_qname *qname; raptor_xml_element *element; object = (raptor_abbrev_node*)raptor_sequence_get_at(subject->list_items, i++); if(!object) continue; qname = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (unsigned char *)"li", NULL); if(serializer->base_uri) base_uri = raptor_uri_copy(serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_FATAL, NULL, "Out of memory"); raptor_free_qname(qname); rv = 1; /* error */ break; } switch (object->term->type) { case RAPTOR_TERM_TYPE_URI: rv = raptor_rdfxmla_emit_resource(serializer, element, object, depth + 1); break; case RAPTOR_TERM_TYPE_LITERAL: rv = raptor_rdfxmla_emit_literal(serializer, element, object, depth + 1); break; case RAPTOR_TERM_TYPE_BLANK: rv = raptor_rdfxmla_emit_blank(serializer, element, object, depth + 1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", object->term->type); break; } raptor_free_xml_element(element); } return rv; } /* * raptor_rdfxmla_emit_subject_properties: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit the properties about a subject node. * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_subject_properties(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; int rv = 0; int i; raptor_avltree_iterator* iter = NULL; raptor_term* subject_term = subject->node->term; RAPTOR_DEBUG_ABBREV_NODE("Emitting subject properties", subject->node); /* Emit any rdf:_n properties collected */ if(raptor_sequence_size(subject->list_items) > 0) { rv = raptor_rdfxmla_emit_subject_list_items(serializer, subject, depth + 1); if(rv) return rv; } if(subject->node_type && !context->write_typed_nodes) { raptor_uri *base_uri = NULL; raptor_qname *qname = NULL; raptor_xml_element *element = NULL; /* if rdf:type was associated with this subject and do not want * a typed node, emit it as a property element */ qname = raptor_new_qname_from_resource(context->namespaces, context->nstack, &context->namespace_count, context->rdf_type); if(!qname) goto oom; if(serializer->base_uri) base_uri = raptor_uri_copy(serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { if(base_uri) raptor_free_uri(base_uri); raptor_free_qname(qname); goto oom; } rv = raptor_rdfxmla_emit_resource_uri(serializer, element, subject_term->value.uri, depth + 1); raptor_free_xml_element(element); } for(i = 0, iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); iter && !rv; i++, (rv = raptor_avltree_iterator_next(iter))) { raptor_uri *base_uri = NULL; raptor_qname *qname; raptor_xml_element *element; raptor_abbrev_node** nodes; raptor_abbrev_node* predicate; raptor_abbrev_node* object; nodes = (raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; predicate= nodes[0]; object= nodes[1]; qname = raptor_new_qname_from_resource(context->namespaces, context->nstack, &context->namespace_count, predicate); if(!qname) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot split URI '%s' into an XML qname", raptor_uri_as_string(predicate->term->value.uri)); continue; } if(serializer->base_uri) base_uri = raptor_uri_copy(serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { if(base_uri) raptor_free_uri(base_uri); raptor_free_qname(qname); goto oom; } switch (object->term->type) { case RAPTOR_TERM_TYPE_URI: rv = raptor_rdfxmla_emit_resource(serializer, element, object, depth + 1); break; case RAPTOR_TERM_TYPE_LITERAL: rv = raptor_rdfxmla_emit_literal(serializer, element, object, depth + 1); break; case RAPTOR_TERM_TYPE_BLANK: rv = raptor_rdfxmla_emit_blank(serializer, element, object, depth + 1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", object->term->type); break; } /* Return error if emitting something failed above */ if(rv) return rv; raptor_free_xml_element(element); } if(iter) raptor_free_avltree_iterator(iter); return rv; oom: if(iter) raptor_free_avltree_iterator(iter); raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_FATAL, NULL, "Out of memory"); return 1; } /* * raptor_rdfxmla_emit_subject: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit a subject node * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_qname *qname = NULL; raptor_xml_element *element = NULL; raptor_qname **attrs; unsigned char *attr_name; unsigned char *attr_value; raptor_uri *base_uri = NULL; int subject_is_single_node; raptor_term *subject_term = subject->node->term; if(!raptor_abbrev_subject_valid(subject)) return 0; subject_is_single_node = (context->single_node && subject_term->type == RAPTOR_TERM_TYPE_URI && raptor_uri_equals(subject_term->value.uri, context->single_node)); RAPTOR_DEBUG_ABBREV_NODE("Emitting subject node", subject->node); if(!depth && subject_term->type == RAPTOR_TERM_TYPE_BLANK && subject->node->count_as_subject == 1 && subject->node->count_as_object == 1) { RAPTOR_DEBUG_ABBREV_NODE("Skipping subject node", subject->node); return 0; } if(subject->node_type && context->write_typed_nodes) { /* if rdf:type was associated with this subject */ qname = raptor_new_qname_from_resource(context->namespaces, context->nstack, &context->namespace_count, subject->node_type); if(!qname) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot split URI '%s' into an XML qname", raptor_uri_as_string(subject->node_type->term->value.uri)); return 1; } } else { qname = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (unsigned const char*)"Description", NULL); if(!qname) goto oom; } if(serializer->base_uri) base_uri = raptor_uri_copy(serializer->base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); if(!element) { if(base_uri) raptor_free_uri(base_uri); raptor_free_qname(qname); goto oom; } attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); if(!attrs) goto oom; attr_name = NULL; attr_value = NULL; /* emit the subject node */ if(subject_term->type == RAPTOR_TERM_TYPE_URI) { attr_name = (unsigned char*)"about"; if(context->is_xmp) { /* XML rdf:about value is always "" */ attr_value = RAPTOR_CALLOC(unsigned char*, 1, sizeof(unsigned char)); } else if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS)) attr_value = raptor_uri_to_relative_uri_string(serializer->base_uri, subject_term->value.uri); else attr_value = raptor_uri_to_string(subject_term->value.uri); } else if(subject_term->type == RAPTOR_TERM_TYPE_BLANK) { if(subject->node->count_as_subject && subject->node->count_as_object && !(subject->node->count_as_subject == 1 && subject->node->count_as_object == 1)) { /* No need for nodeID if this node is never used as a subject * or object OR if it is used exactly once as subject and object. */ attr_name = (unsigned char*)"nodeID"; attr_value = subject_term->value.blank.string; } } if(attr_name) { attrs[0] = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, attr_name, attr_value); if(subject_term->type != RAPTOR_TERM_TYPE_BLANK) RAPTOR_FREE(char*, attr_value); if(!attrs[0]) { RAPTOR_FREE(qnamearray, attrs); goto oom; } /* Note: if we were willing to track the in-scope rdf:lang, we * could do the "2.5 Property Attributes" abbreviation here */ raptor_xml_element_set_attributes(element, attrs, 1); } else { RAPTOR_FREE(qnamearray, attrs); } if(!subject_is_single_node) { raptor_xml_writer_start_element(context->xml_writer, element); raptor_rdfxmla_emit_subject_properties(serializer, subject, depth + 1); raptor_xml_writer_end_element(context->xml_writer, element); } else raptor_rdfxmla_emit_subject_properties(serializer, subject, depth); raptor_free_xml_element(element); return 0; oom: if(element) raptor_free_xml_element(element); raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Out of memory"); return 1; } /* * raptor_rdfxmla_emit - * @serializer: #raptor_serializer object * * Emit RDF/XML for all stored triples. * * Return value: non-0 on failure **/ static int raptor_rdfxmla_emit(raptor_serializer *serializer) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_abbrev_subject* subject; raptor_abbrev_subject* blank; raptor_avltree_iterator* iter = NULL; iter = raptor_new_avltree_iterator(context->subjects, NULL, NULL, 1); while(iter) { subject = (raptor_abbrev_subject*)raptor_avltree_iterator_get(iter); if(subject) { raptor_rdfxmla_emit_subject(serializer, subject, context->starting_depth); } if(raptor_avltree_iterator_next(iter)) break; } if(iter) raptor_free_avltree_iterator(iter); if(!context->single_node) { /* Emit any remaining blank nodes */ iter = raptor_new_avltree_iterator(context->blanks, NULL, NULL, 1); while(iter) { blank = (raptor_abbrev_subject*)raptor_avltree_iterator_get(iter); if(blank) { raptor_rdfxmla_emit_subject(serializer, blank, context->starting_depth); } if(raptor_avltree_iterator_next(iter)) break; } if(iter) raptor_free_avltree_iterator(iter); } return 0; } /* * raptor serializer rdfxml-abbrev implementation */ static void raptor_rdfxmla_serialize_init_nstack(raptor_serializer* serializer, raptor_namespace_stack *nstack) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; context->xml_nspace = raptor_new_namespace(context->nstack, (const unsigned char*)"xml", raptor_xml_namespace_uri, context->starting_depth); context->rdf_nspace = raptor_new_namespace(context->nstack, (const unsigned char*)"rdf", raptor_rdf_namespace_uri, context->starting_depth); } /* create a new serializer */ static int raptor_rdfxmla_serialize_init(raptor_serializer* serializer, const char *name) { raptor_rdfxmla_context* context; raptor_term* type_term; context = (raptor_rdfxmla_context*)serializer->context; context->nstack = raptor_new_namespaces(serializer->world, 1); if(!context->nstack) return 1; raptor_rdfxmla_serialize_init_nstack(serializer, context->nstack); context->namespaces = raptor_new_sequence(NULL, NULL); context->subjects = raptor_new_avltree((raptor_data_compare_handler)raptor_abbrev_subject_compare, (raptor_data_free_handler)raptor_free_abbrev_subject, 0); context->blanks = raptor_new_avltree((raptor_data_compare_handler)raptor_abbrev_subject_compare, (raptor_data_free_handler)raptor_free_abbrev_subject, 0); context->nodes = raptor_new_avltree((raptor_data_compare_handler)raptor_abbrev_node_compare, (raptor_data_free_handler)raptor_free_abbrev_node, 0); type_term = RAPTOR_RDF_type_term(serializer->world); context->rdf_type = raptor_new_abbrev_node(serializer->world, type_term); if(!context->xml_nspace || !context->rdf_nspace || !context->namespaces || !context->subjects || !context->blanks || !context->nodes || !context->rdf_type) { raptor_rdfxmla_serialize_terminate(serializer); return 1; } context->is_xmp=!strncmp(name, "rdfxml-xmp", 10); if(context->is_xmp) RAPTOR_OPTIONS_SET_NUMERIC(serializer, RAPTOR_OPTION_WRITER_XML_DECLARATION, 0); /* Note: item 0 in the list is rdf:RDF's namespace */ if(raptor_sequence_push(context->namespaces, context->rdf_nspace)) { raptor_rdfxmla_serialize_terminate(serializer); return 1; } context->write_rdf_RDF = 1; context->starting_depth = 0; context->single_node = NULL; context->write_typed_nodes = 1; return 0; } /* destroy a serializer */ static void raptor_rdfxmla_serialize_terminate(raptor_serializer* serializer) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; if(context->xml_writer) { if(!context->external_xml_writer) raptor_free_xml_writer(context->xml_writer); context->xml_writer = NULL; context->external_xml_writer = 0; } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element = NULL; } if(context->rdf_nspace) { raptor_free_namespace(context->rdf_nspace); context->rdf_nspace = NULL; } if(context->xml_nspace) { raptor_free_namespace(context->xml_nspace); context->xml_nspace = NULL; } if(context->namespaces) { int i; /* Note: item 0 in the list is rdf:RDF's namespace and freed above */ for(i = 1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(ns) raptor_free_namespace(ns); } raptor_free_sequence(context->namespaces); context->namespaces = NULL; } if(context->subjects) { raptor_free_avltree(context->subjects); context->subjects = NULL; } if(context->blanks) { raptor_free_avltree(context->blanks); context->blanks = NULL; } if(context->nodes) { raptor_free_avltree(context->nodes); context->nodes = NULL; } /* always free raptor_namespace* before stack */ if(context->nstack) { if(!context->external_nstack) raptor_free_namespaces(context->nstack); context->nstack = NULL; } if(context->rdf_type) { raptor_free_abbrev_node(context->rdf_type); context->rdf_type = NULL; } } #define RDFXMLA_NAMESPACE_DEPTH 0 /* add a namespace */ static int raptor_rdfxmla_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; int i; if(context->written_header) return 1; for(i = 0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals(ns->uri, nspace->uri)) return 1; } nspace = raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, context->starting_depth + RDFXMLA_NAMESPACE_DEPTH); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_rdfxmla_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_namespace *ns; int rc; ns = raptor_new_namespace_from_uri(context->nstack, prefix, uri, context->starting_depth + RDFXMLA_NAMESPACE_DEPTH); rc = raptor_rdfxmla_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* * raptor_rdfxmla_serialize_set_write_rdf_RDF: * @serializer: serializer object * @value: value * * INTERNAL - Set flag to write rdf:RDF root element * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_write_rdf_RDF(raptor_serializer* serializer, int value) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->desc.names[0], "rdfxml-abbrev")) return 1; context = (raptor_rdfxmla_context*)serializer->context; context->write_rdf_RDF = value; return 0; } /* * raptor_rdfxmla_serialize_set_xml_writer: * @serializer: serializer object * @xml_writer: XML writer * @nstack: namespace stack * * INTERNAL - Set an existing created XML writer to write the serializing to * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_xml_writer(raptor_serializer* serializer, raptor_xml_writer* xml_writer, raptor_namespace_stack *nstack) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->desc.names[0], "rdfxml-abbrev")) return 1; context = (raptor_rdfxmla_context*)serializer->context; context->xml_writer = xml_writer; context->starting_depth = xml_writer ? (raptor_xml_writer_get_depth(xml_writer) + 1) : -1; context->external_xml_writer = (xml_writer != NULL); if(context->xml_nspace) raptor_free_namespace(context->xml_nspace); if(context->rdf_nspace) raptor_free_namespace(context->rdf_nspace); /* always free raptor_namespace* before stack */ if(context->nstack) raptor_free_namespaces(context->nstack); context->nstack = nstack; context->external_nstack = 1; raptor_rdfxmla_serialize_init_nstack(serializer, context->nstack); return 0; } /* * raptor_rdfxmla_serialize_set_single_node: * @serializer: * @uri: * * INTERNAL - Set a single node to serialize the contents * * The outer node element with this URI is not serialized, the inner * property elements are written. @uri is copied * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_single_node(raptor_serializer* serializer, raptor_uri* uri) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->desc.names[0], "rdfxml-abbrev")) return 1; context = (raptor_rdfxmla_context*)serializer->context; if(context->single_node) raptor_free_uri(context->single_node); context->single_node = raptor_uri_copy(uri); return 0; } /* * raptor_rdfxmla_serialize_set_write_typed_nodes: * @serializer: * @value: * * INTERNAL - Set flag to write typed node elements * * Return value: non-0 on failure */ int raptor_rdfxmla_serialize_set_write_typed_nodes(raptor_serializer* serializer, int value) { raptor_rdfxmla_context* context; if(strcmp(serializer->factory->desc.names[0], "rdfxml-abbrev")) return 1; context = (raptor_rdfxmla_context*)serializer->context; context->write_typed_nodes = value; return 0; } /* start a serialize */ static int raptor_rdfxmla_serialize_start(raptor_serializer* serializer) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; if(!context->external_xml_writer) { raptor_xml_writer* xml_writer; raptor_option option; if(context->xml_writer) raptor_free_xml_writer(context->xml_writer); xml_writer = raptor_new_xml_writer(serializer->world, context->nstack, serializer->iostream); if(!xml_writer) return 1; raptor_xml_writer_set_option(xml_writer, RAPTOR_OPTION_WRITER_AUTO_INDENT, NULL,1); raptor_xml_writer_set_option(xml_writer, RAPTOR_OPTION_WRITER_AUTO_EMPTY, NULL, 1); raptor_xml_writer_set_option(xml_writer, RAPTOR_OPTION_WRITER_INDENT_WIDTH, NULL, 2); option = RAPTOR_OPTION_WRITER_XML_VERSION; raptor_xml_writer_set_option(xml_writer, option, NULL, RAPTOR_OPTIONS_GET_NUMERIC(serializer, option)); option = RAPTOR_OPTION_WRITER_XML_DECLARATION; raptor_xml_writer_set_option(xml_writer, option, NULL, RAPTOR_OPTIONS_GET_NUMERIC(serializer, option)); context->xml_writer = xml_writer; } return 0; } static int raptor_rdfxmla_ensure_writen_header(raptor_serializer* serializer, raptor_rdfxmla_context* context) { raptor_xml_writer* xml_writer; raptor_qname *qname; raptor_uri *base_uri; int i; raptor_qname **attrs = NULL; int attrs_count = 0; if(context->written_header) return 0; /* already succeeded */ if(!context->write_rdf_RDF) { context->written_header = 1; return 0; } xml_writer = context->xml_writer; if(context->is_xmp) raptor_xml_writer_raw(xml_writer, (const unsigned char*)"\n\n"); qname = raptor_new_qname_from_namespace_local_name(serializer->world, context->rdf_nspace, (const unsigned char*)"RDF", NULL); if(!qname) goto oom; base_uri = serializer->base_uri; if(base_uri) base_uri = raptor_uri_copy(base_uri); context->rdf_RDF_element = raptor_new_xml_element(qname, NULL, base_uri); if(!context->rdf_RDF_element) { if(base_uri) raptor_free_uri(base_uri); raptor_free_qname(qname); goto oom; } /* NOTE: Starts at item 1 as item 0 is the element's namespace (rdf) * and does not need to be declared */ for(i = 1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); raptor_xml_element_declare_namespace(context->rdf_RDF_element, ns); } if(base_uri && RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_WRITE_BASE_URI)) { const unsigned char* base_uri_string; attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); if(!attrs) goto oom; base_uri_string = raptor_uri_as_string(base_uri); attrs[attrs_count] = raptor_new_qname_from_namespace_local_name(serializer->world, context->xml_nspace, (const unsigned char*)"base", base_uri_string); if(!attrs[attrs_count]) { RAPTOR_FREE(qnamearray, attrs); goto oom; } attrs_count++; } if(attrs_count) raptor_xml_element_set_attributes(context->rdf_RDF_element, attrs, attrs_count); else raptor_xml_element_set_attributes(context->rdf_RDF_element, NULL, 0); raptor_xml_writer_start_element(xml_writer, context->rdf_RDF_element); context->written_header = 1; return 0; oom: raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Out of memory"); return 1; } /* serialize a statement */ static int raptor_rdfxmla_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_abbrev_subject* subject = NULL; raptor_abbrev_node* predicate = NULL; raptor_abbrev_node* object = NULL; int rv = 0; raptor_term_type object_type; if(!(statement->subject->type == RAPTOR_TERM_TYPE_URI || statement->subject->type == RAPTOR_TERM_TYPE_BLANK)) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with subject node type %d", statement->subject->type); return 1; } subject = raptor_abbrev_subject_lookup(context->nodes, context->subjects, context->blanks, statement->subject); if(!subject) return 1; object_type = statement->object->type; if(!(object_type == RAPTOR_TERM_TYPE_URI || object_type == RAPTOR_TERM_TYPE_BLANK || object_type == RAPTOR_TERM_TYPE_LITERAL)) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with object node type %d", object_type); return 1; } object = raptor_abbrev_node_lookup(context->nodes, statement->object); if(!object) return 1; if(statement->predicate->type == RAPTOR_TERM_TYPE_URI) { predicate = raptor_abbrev_node_lookup(context->nodes, statement->predicate); if(!predicate) return 1; if(!subject->node_type && raptor_abbrev_node_equals(predicate, context->rdf_type) && statement->object->type == RAPTOR_TERM_TYPE_URI) { /* Store the first one as the type for abbreviation 2.14 * purposes. Note that it is perfectly legal to have * multiple type definitions. All definitions after the * first go in the property list */ subject->node_type = raptor_abbrev_node_lookup(context->nodes, statement->object); if(!subject->node_type) return 1; subject->node_type->ref_count++; return 0; } else { int add_property = 1; if(context->is_xmp && predicate->ref_count > 1) { raptor_avltree_iterator* iter = NULL; int i; for(i = 0, (iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1)); iter && !rv; i++, (rv = raptor_avltree_iterator_next(iter))) { raptor_abbrev_node** nodes; raptor_abbrev_node* node; nodes = (raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; node= nodes[0]; if(node == predicate) { add_property = 0; if(object->term->type == RAPTOR_TERM_TYPE_BLANK) { /* look for any generated blank node associated with this * statement and free it */ raptor_abbrev_subject *blank = raptor_abbrev_subject_find(context->blanks, statement->object); if(subject) raptor_avltree_delete(context->blanks, blank); } break; } } if(iter) raptor_free_avltree_iterator(iter); } if(add_property) { rv = raptor_abbrev_subject_add_property(subject, predicate, object); if(rv < 0) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Unable to add properties to subject %p", subject); return rv; } } } } else { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with predicate node type %d", statement->predicate->type); return 1; } if(object_type == RAPTOR_TERM_TYPE_URI || object_type == RAPTOR_TERM_TYPE_BLANK) object->count_as_object++; return 0; } /* end a serialize */ static int raptor_rdfxmla_serialize_end(raptor_serializer* serializer) { raptor_rdfxmla_context* context = (raptor_rdfxmla_context*)serializer->context; raptor_xml_writer* xml_writer = context->xml_writer; if(xml_writer) { if(!raptor_rdfxmla_ensure_writen_header(serializer, context)) { raptor_rdfxmla_emit(serializer); if(context->write_rdf_RDF) { /* ensure_writen_header() returned success, can assume context->rdf_RDF_element is non-NULL */ raptor_xml_writer_end_element(xml_writer, context->rdf_RDF_element); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } } } if(context->rdf_RDF_element) { raptor_free_xml_element(context->rdf_RDF_element); context->rdf_RDF_element = NULL; } if(context->is_xmp && xml_writer) raptor_xml_writer_raw(xml_writer, (const unsigned char*)"\n\n"); if(xml_writer) raptor_xml_writer_flush(xml_writer); if(context->single_node) raptor_free_uri(context->single_node); context->written_header = 0; return 0; } /* finish the serializer factory */ static void raptor_rdfxmla_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static const char* const rdfxml_xmp_names[2] = { "rdfxml-xmp", NULL}; static const char* const rdfxml_xmp_uri_strings[2] = { "http://www.w3.org/TR/rdf-syntax-grammar", NULL }; #define RDFXML_XMP_TYPES_COUNT 1 static const raptor_type_q rdfxml_xmp_types[RDFXML_XMP_TYPES_COUNT + 1] = { { "application/rdf+xml", 19, 0}, { NULL, 0, 0} }; static int raptor_rdfxml_xmp_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = rdfxml_xmp_names; factory->desc.mime_types = rdfxml_xmp_types; factory->desc.label = "RDF/XML (XMP Profile)"; factory->desc.uri_strings = rdfxml_xmp_uri_strings; factory->context_length = sizeof(raptor_rdfxmla_context); factory->init = raptor_rdfxmla_serialize_init; factory->terminate = raptor_rdfxmla_serialize_terminate; factory->declare_namespace = raptor_rdfxmla_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rdfxmla_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rdfxmla_serialize_start; factory->serialize_statement = raptor_rdfxmla_serialize_statement; factory->serialize_end = raptor_rdfxmla_serialize_end; factory->finish_factory = raptor_rdfxmla_serialize_finish_factory; return 0; } static const char* const rdfxmla_names[2] = { "rdfxml-abbrev", NULL}; static const char* const rdfxml_uri_strings[3] = { "http://www.w3.org/ns/formats/RDF_XML", "http://www.w3.org/TR/rdf-syntax-grammar", NULL }; #define RDFXMLA_TYPES_COUNT 1 static const raptor_type_q rdfxmla_types[RDFXMLA_TYPES_COUNT + 1] = { { "application/rdf+xml", 19, 0}, { NULL, 0, 0} }; static int raptor_rdfxmla_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = rdfxmla_names; factory->desc.mime_types = rdfxmla_types; factory->desc.label = "RDF/XML (Abbreviated)"; factory->desc.uri_strings = rdfxml_uri_strings; factory->context_length = sizeof(raptor_rdfxmla_context); factory->init = raptor_rdfxmla_serialize_init; factory->terminate = raptor_rdfxmla_serialize_terminate; factory->declare_namespace = raptor_rdfxmla_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rdfxmla_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rdfxmla_serialize_start; factory->serialize_statement = raptor_rdfxmla_serialize_statement; factory->serialize_end = raptor_rdfxmla_serialize_end; factory->finish_factory = raptor_rdfxmla_serialize_finish_factory; return 0; } int raptor_init_serializer_rdfxmla(raptor_world* world) { int rc; rc = !raptor_serializer_register_factory(world, &raptor_rdfxml_xmp_serializer_register_factory); if(rc) return rc; rc = !raptor_serializer_register_factory(world, &raptor_rdfxmla_serializer_register_factory); return rc; } raptor2-2.0.15/src/raptor_namespace.c0000644000175000017500000007612212325013605014374 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_namespace.c - Raptor XML namespace classes * * Copyright (C) 2002-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* Define these for far too much output */ #undef RAPTOR_DEBUG_VERBOSE /* * Namespaces in XML * http://www.w3.org/TR/1999/REC-xml-names-19990114/#nsc-NSDeclared * (section 4) says: * * -------------------------------------------------------------------- * The prefix xml is by definition bound to the namespace name * http://www.w3.org/XML/1998/namespace * -------------------------------------------------------------------- * * Errata NE05 * http://www.w3.org/XML/xml-names-19990114-errata#NE05 * changes that to read: * * -------------------------------------------------------------------- * The prefix xml is by definition bound to the namespace name * http://www.w3.org/XML/1998/namespace. It may, but need not, be * declared, and must not be bound to any other namespace name. No * other prefix may be bound to this namespace name. * * The prefix xmlns is used only to declare namespace bindings and is * by definition bound to the namespace name * http://www.w3.org/2000/xmlns/. It must not be declared. No other * prefix may be bound to this namespace name. * * All other prefixes beginning with the three-letter sequence x, m, l, * in any case combination, are reserved. This means that * * users should not use them except as defined by later specifications * * processors must not treat them as fatal errors. * -------------------------------------------------------------------- * * Thus should define it in the table of namespaces before we start. * * We *can* also define others, but let's not. * */ const unsigned char * const raptor_xml_namespace_uri = (const unsigned char *)"http://www.w3.org/XML/1998/namespace"; const unsigned char * const raptor_rdf_namespace_uri = (const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const unsigned int raptor_rdf_namespace_uri_len = 43; const unsigned char * const raptor_rdf_schema_namespace_uri = (const unsigned char *)"http://www.w3.org/2000/01/rdf-schema#"; const unsigned int raptor_rdf_schema_namespace_uri_len = 37; const unsigned char * const raptor_xmlschema_datatypes_namespace_uri = (const unsigned char *)"http://www.w3.org/2001/XMLSchema#"; const unsigned char * const raptor_owl_namespace_uri = (const unsigned char *)"http://www.w3.org/2002/07/owl#"; /* hash function to hash namespace prefix strings (usually short strings) * * Uses DJ Bernstein original hash function - good on short text keys. */ static unsigned int raptor_hash_ns_string(const unsigned char *str, int length) { unsigned int hash = 5381; int c; for(; length && (c = *str++); length--) { hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ } return hash; } #define RAPTOR_NAMESPACES_HASHTABLE_SIZE 1024 /** * raptor_namespaces_init: * @world: raptor_world object * @nstack: #raptor_namespace_stack to initialise * @defaults: namespaces to initialise. * * Initialise an existing namespaces stack object * * This sets up the stack optionally with some common RDF namespaces. * * @defaults can be 0 for none, 1 for just XML, 2 for RDF, RDFS, OWL * and XSD (RDQL uses this) or 3+ undefined. * * Return value: non-0 on error */ int raptor_namespaces_init(raptor_world* world, raptor_namespace_stack *nstack, int defaults) { int failures = 0; nstack->world = world; nstack->size = 0; nstack->table_size = RAPTOR_NAMESPACES_HASHTABLE_SIZE; nstack->table = RAPTOR_CALLOC(raptor_namespace**, RAPTOR_NAMESPACES_HASHTABLE_SIZE, sizeof(raptor_namespace*)); if(!nstack->table) return -1; nstack->def_namespace = NULL; nstack->rdf_ms_uri = raptor_new_uri_from_counted_string(nstack->world, (const unsigned char*)raptor_rdf_namespace_uri, raptor_rdf_namespace_uri_len); failures += !nstack->rdf_ms_uri; nstack->rdf_schema_uri = raptor_new_uri_from_counted_string(nstack->world, (const unsigned char*)raptor_rdf_schema_namespace_uri, raptor_rdf_schema_namespace_uri_len); failures += !nstack->rdf_schema_uri; /* raptor_new_namespace_from_uri() that eventually gets called by * raptor_new_namespace() in raptor_namespaces_start_namespace_full() * needs rdf_ms_uri and rdf_schema_uri * - do not call if we had failures initializing those uris */ if(defaults && !failures) { /* defined at level -1 since always 'present' when inside the XML world */ failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"xml", raptor_xml_namespace_uri, -1); if(defaults >= 2) { failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"rdf", raptor_rdf_namespace_uri, 0); failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"rdfs", raptor_rdf_schema_namespace_uri, 0); failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"xsd", raptor_xmlschema_datatypes_namespace_uri, 0); failures += raptor_namespaces_start_namespace_full(nstack, (const unsigned char*)"owl", raptor_owl_namespace_uri, 0); } } return failures; } /** * raptor_new_namespaces: * @world: raptor_world object * @defaults: namespaces to initialise * * Constructor - create a new #raptor_namespace_stack. * * See raptor_namespaces_init() for the values of @defaults. * * Return value: a new namespace stack or NULL on failure **/ raptor_namespace_stack * raptor_new_namespaces(raptor_world* world, int defaults) { raptor_namespace_stack *nstack; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); nstack = RAPTOR_CALLOC(raptor_namespace_stack*, 1, sizeof(*nstack)); if(!nstack) return NULL; if(raptor_namespaces_init(world, nstack, defaults)) { raptor_free_namespaces(nstack); nstack = NULL; } return nstack; } /** * raptor_namespaces_start_namespace: * @nstack: namespace stack * @nspace: namespace to start * * Start a namespace on a stack of namespaces. **/ void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *nspace) { unsigned int hash = raptor_hash_ns_string(nspace->prefix, nspace->prefix_length); const int bucket = hash % nstack->table_size; nstack->size++; if(nstack->table[bucket]) nspace->next = nstack->table[bucket]; nstack->table[bucket] = nspace; if(!nstack->def_namespace) nstack->def_namespace = nspace; #ifndef STANDALONE #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("start namespace prefix %s depth %d\n", nspace->prefix ? (char*)nspace->prefix : "(default)", nspace->depth); #endif #endif } /** * raptor_namespaces_start_namespace_full: * @nstack: namespace stack * @prefix: new namespace prefix (or NULL) * @ns_uri_string: new namespace URI (or NULL) * @depth: new namespace depth * * Create a new namespace and start it on a stack of namespaces. * * See raptor_new_namespace() for the meanings of @prefix, * @ns_uri_string and @depth for namespaces. * * Return value: non-0 on failure **/ int raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth) { raptor_namespace *ns; ns = raptor_new_namespace(nstack, prefix, ns_uri_string, depth); if(!ns) return 1; raptor_namespaces_start_namespace(nstack, ns); return 0; } /** * raptor_namespaces_clear: * @nstack: namespace stack * * Empty a namespace stack of namespaces and any other resources. **/ void raptor_namespaces_clear(raptor_namespace_stack *nstack) { if(nstack->table) { int bucket; for(bucket = 0; bucket < nstack->table_size; bucket++) { raptor_namespace *ns = nstack->table[bucket]; while(ns) { raptor_namespace* next_ns = ns->next; raptor_free_namespace(ns); nstack->size--; ns = next_ns; } nstack->table[bucket] = NULL; } RAPTOR_FREE(raptor_namespaces, nstack->table); nstack->table = NULL; nstack->table_size = 0; } if(nstack->world) { if(nstack->rdf_ms_uri) { raptor_free_uri(nstack->rdf_ms_uri); nstack->rdf_ms_uri = NULL; } if(nstack->rdf_schema_uri) { raptor_free_uri(nstack->rdf_schema_uri); nstack->rdf_schema_uri = NULL; } } nstack->size = 0; nstack->world = NULL; } /** * raptor_free_namespaces: * @nstack: namespace stack * * Destructor - destroy a namespace stack **/ void raptor_free_namespaces(raptor_namespace_stack *nstack) { if(!nstack) return; raptor_namespaces_clear(nstack); RAPTOR_FREE(raptor_namespace_stack, nstack); } /** * raptor_namespaces_end_for_depth: * @nstack: namespace stack * @depth: depth * * End all namespaces at the given depth in the namespace stack. **/ void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int depth) { int bucket; for(bucket = 0; bucket < nstack->table_size; bucket++) { while(nstack->table[bucket] && nstack->table[bucket]->depth == depth) { raptor_namespace* ns = nstack->table[bucket]; raptor_namespace* next_ns = ns->next; #ifndef STANDALONE #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("namespace prefix %s depth %d\n", ns->prefix ? (char*)ns->prefix : "(default)", depth); #endif #endif raptor_free_namespace(ns); nstack->size--; nstack->table[bucket] = next_ns; } } } /** * raptor_namespaces_get_default_namespace: * @nstack: namespace stack * * Get the current default namespace in-scope in a stack. * * Return value: #raptor_namespace or NULL if no default namespace is in scope **/ raptor_namespace* raptor_namespaces_get_default_namespace(raptor_namespace_stack *nstack) { unsigned int hash = raptor_hash_ns_string((const unsigned char *)"", 0); const int bucket = hash % nstack->table_size; raptor_namespace* ns; for(ns = nstack->table[bucket]; ns && ns->prefix; ns = ns->next) ; return ns; } /** * raptor_namespaces_find_namespace: * @nstack: namespace stack * @prefix: namespace prefix to find * @prefix_length: length of prefix. * * Find a namespace in a namespace stack by prefix. * * Note that this uses the @length so that the prefix may be a prefix (sic) * of a longer string. If @prefix is NULL, the default namespace will * be returned if present, @prefix_length length is ignored in this case. * * Return value: #raptor_namespace for the prefix or NULL on failure **/ raptor_namespace* raptor_namespaces_find_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, int prefix_length) { raptor_namespace* ns; unsigned int hash = raptor_hash_ns_string(prefix, prefix_length); int bucket; if(!nstack || !nstack->table_size) return NULL; bucket = hash % (nstack->table_size); for(ns = nstack->table[bucket]; ns ; ns = ns->next) { if(!prefix) { if(!ns->prefix) break; } else { if((unsigned int)prefix_length == ns->prefix_length && !strncmp((char*)prefix, (char*)ns->prefix, prefix_length)) break; } } return ns; } /** * raptor_namespaces_find_namespace_by_uri: * @nstack: namespace stack * @ns_uri: namespace URI to find * * Find a namespace in a namespace stack by namespace URI. * * Return value: #raptor_namespace for the URI or NULL on failure **/ raptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *nstack, raptor_uri *ns_uri) { int bucket; if(!ns_uri) return NULL; for(bucket = 0; bucket < nstack->table_size; bucket++) { raptor_namespace* ns; for(ns = nstack->table[bucket]; ns ; ns = ns->next) if(raptor_uri_equals(ns->uri, ns_uri)) return ns; } return NULL; } /** * raptor_namespaces_namespace_in_scope: * @nstack: namespace stack * @nspace: namespace * * Test if a given namespace is in-scope in the namespace stack. * * Return value: non-0 if the namespace is in scope. **/ int raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, const raptor_namespace *nspace) { raptor_namespace* ns; int bucket; for(bucket = 0; bucket < nstack->table_size; bucket++) { for(ns = nstack->table[bucket]; ns ; ns = ns->next) if(raptor_uri_equals(ns->uri, nspace->uri)) return 1; } return 0; } /** * raptor_new_namespace_from_uri: * @nstack: namespace stack * @prefix: namespace prefix string * @ns_uri: namespace URI * @depth: depth of namespace in the stack * * Constructor - create a new namespace from a prefix and URI object. * * This declares but does not enable the namespace declaration (or 'start' it) * Use raptor_namespaces_start_namespace() to make the namespace * enabled and in scope for binding prefixes. * * Alternatively use raptor_namespaces_start_namespace_full() can construct * and enable a namespace in one call. * * Return value: a new #raptor_namespace or NULL on failure **/ raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nstack, const unsigned char *prefix, raptor_uri* ns_uri, int depth) { unsigned int prefix_length = 0; unsigned int len; raptor_namespace *ns; unsigned char *p; #ifndef STANDALONE #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG4("namespace prefix %s uri %s depth %d\n", prefix ? (char*)prefix : "(default)", ns_uri ? (char*)raptor_uri_as_string(ns_uri) : "(none)", depth); #endif #endif if(prefix && !ns_uri) { /* failed to find namespace - now what? */ raptor_log_error_formatted(nstack->world, RAPTOR_LOG_LEVEL_ERROR, /* locator */ NULL, "The namespace URI for prefix \"%s\" is empty.", prefix); return NULL; } len = sizeof(raptor_namespace); if(prefix) { prefix_length = (unsigned int)strlen((char*)prefix); len += prefix_length + 1; } /* Just one malloc for structure + namespace (maybe) + prefix (maybe)*/ ns = RAPTOR_CALLOC(raptor_namespace*, 1, len); if(!ns) return NULL; p = (unsigned char*)ns + sizeof(raptor_namespace); if(ns_uri) { ns->uri = raptor_uri_copy(ns_uri); if(!ns->uri) { RAPTOR_FREE(raptor_namespace, ns); return NULL; } } if(prefix) { ns->prefix = (const unsigned char*)memcpy(p, prefix, prefix_length + 1); ns->prefix_length = prefix_length; if(!strcmp((char*)ns->prefix, "xml")) ns->is_xml = 1; } ns->depth = depth; /* set convienience flags when there is a defined namespace URI */ if(ns->uri) { if(raptor_uri_equals(ns->uri, nstack->rdf_ms_uri)) ns->is_rdf_ms = 1; else if(raptor_uri_equals(ns->uri, nstack->rdf_schema_uri)) ns->is_rdf_schema = 1; } ns->nstack = nstack; return ns; } /** * raptor_new_namespace: * @nstack: namespace stack * @prefix: namespace prefix string * @ns_uri_string: namespace URI string * @depth: depth of namespace in the stack * * Constructor - create a new namespace from a prefix and URI string with a depth scope. * * This declares but does not enable the namespace declaration (or 'start' it) * Use raptor_namespaces_start_namespace() to make the namespace * enabled and in scope for binding prefixes. * * Alternatively use raptor_namespaces_start_namespace_full() can construct * and enable a namespace in one call. * * The @depth is a way to use the stack of namespaces for providing scoped * namespaces where inner scope namespaces override outer scope namespaces. * This is primarily for RDF/XML and XML syntaxes that have hierarchical * elements. The main use of this is raptor_namespaces_end_for_depth() * to disable ('end') all namespaces at a given depth. Otherwise set this * to 0. * * Return value: a new #raptor_namespace or NULL on failure **/ raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth) { raptor_uri* ns_uri = NULL; raptor_namespace* ns; /* Convert an empty namespace string "" to a NULL pointer */ if(ns_uri_string && !*ns_uri_string) ns_uri_string = NULL; if(ns_uri_string) { ns_uri = raptor_new_uri(nstack->world, ns_uri_string); if(!ns_uri) return NULL; } ns = raptor_new_namespace_from_uri(nstack, prefix, ns_uri, depth); if(ns_uri) raptor_free_uri(ns_uri); return ns; } /** * raptor_namespace_stack_start_namespace: * @nstack: namespace stack * @ns: namespace * @new_depth: new depth * * Copy an existing namespace to a namespace stack with a new depth * and start it. * * The @depth is a way to use the stack of namespaces for providing scoped * namespaces where inner scope namespaces override outer scope namespaces. * This is primarily for RDF/XML and XML syntaxes that have hierarchical * elements. The main use of this is raptor_namespaces_end_for_depth() * to disable ('end') all namespaces at a given depth. If depths are * not being needed it is unlikely this call is ever needed to copy an * existing namespace at a new depth. * * Return value: non-0 on failure **/ int raptor_namespace_stack_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth) { raptor_namespace *new_ns; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(nstack, raptor_namespace_stack, 1); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(ns, raptor_namespace, 1); new_ns = raptor_new_namespace_from_uri(nstack, ns->prefix, ns->uri, new_depth); if(!new_ns) return 1; raptor_namespaces_start_namespace(nstack, new_ns); return 0; } /** * raptor_free_namespace: * @ns: namespace object * * Destructor - destroy a namespace. **/ void raptor_free_namespace(raptor_namespace *ns) { if(!ns) return; if(ns->uri) raptor_free_uri(ns->uri); RAPTOR_FREE(raptor_namespace, ns); } /** * raptor_namespace_get_uri: * @ns: namespace object * * Get the namespace URI. * * Return value: namespace URI or NULL **/ raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns) { return ns->uri; } /** * raptor_namespace_get_prefix: * @ns: namespace object * * Get the namespace prefix. * * Return value: prefix string or NULL **/ const unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns) { return (const unsigned char*)ns->prefix; } /** * raptor_namespace_get_counted_prefix: * @ns: namespace object * @length_p: pointer to store length or NULL * * Get the namespace prefix and length. * * Return value: prefix string or NULL **/ const unsigned char* raptor_namespace_get_counted_prefix(const raptor_namespace *ns, size_t *length_p) { if(length_p) *length_p=ns->prefix_length; return (const unsigned char*)ns->prefix; } /** * raptor_namespace_format_as_xml: * @ns: namespace object * @length_p: pointer to length (or NULL) * * Format a namespace in an XML style into a newly allocated string. * * Generates a string of the form xmlns:prefix="uri", * xmlns="uri", xmlns:prefix="" or xmlns="" depending on the * namespace's prefix or URI. Double quotes are always used. * * If @length_p is not NULL, the length of the string is * stored in the address it points to. * * See also raptor_xml_namespace_string_parse() * * Return value: namespace formatted as newly allocated string or NULL on failure **/ unsigned char * raptor_namespace_format_as_xml(const raptor_namespace *ns, size_t *length_p) { size_t uri_length = 0L; const unsigned char *uri_string = NULL; size_t xml_uri_length = 0L; size_t length; unsigned char *buffer; const char quote='"'; unsigned char *p; if(ns->uri) { int xlength; uri_string = raptor_uri_as_counted_string(ns->uri, &uri_length); xlength = raptor_xml_escape_string(ns->nstack->world, uri_string, uri_length, NULL, 0, quote); if(xlength < 0) return NULL; xml_uri_length = RAPTOR_GOOD_CAST(size_t, xlength); } /* 8 = length of [[xmlns=""] */ length = 8 + xml_uri_length + ns->prefix_length; if(ns->prefix) length++; /* for : */ if(length_p) *length_p = length; buffer = RAPTOR_MALLOC(unsigned char*, length + 1); if(!buffer) return NULL; p = buffer; memcpy(p, "xmlns", 5); p += 5; if(ns->prefix) { *p++ = ':'; memcpy(p, ns->prefix, ns->prefix_length); p += ns->prefix_length; } *p++ = '='; *p++ = quote; if(uri_length) { int xlength; xlength = raptor_xml_escape_string(ns->nstack->world, uri_string, uri_length, p, xml_uri_length, quote); if(xlength < 0) return NULL; p += RAPTOR_GOOD_CAST(size_t, xlength); } *p++ = quote; /* *p used here since we never need to use value of p again [CLANG] */ *p = '\0'; return buffer; } /** * raptor_namespace_write: * @ns: namespace to write * @iostr: raptor iosteram * * Write a formatted namespace to an iostream * * Return value: non-0 on failure **/ int raptor_namespace_write(raptor_namespace *ns, raptor_iostream* iostr) { size_t uri_length = 0L; const unsigned char *uri_string = NULL; if(!ns || !iostr) return 1; if(ns->uri) uri_string = raptor_uri_as_counted_string(ns->uri, &uri_length); raptor_iostream_counted_string_write("xmlns", 5, iostr); if(ns->prefix) { raptor_iostream_write_byte(':', iostr); raptor_iostream_string_write(ns->prefix, iostr); } raptor_iostream_counted_string_write("=\"", 2, iostr); if(uri_length) raptor_iostream_counted_string_write(uri_string, uri_length, iostr); raptor_iostream_write_byte('"', iostr); return 0; } /** * raptor_xml_namespace_string_parse: * @string: string to parse * @prefix: pointer to location to store namespace prefix * @uri_string: pointer to location to store namespace URI * * Parse a string containing an XML style namespace declaration * into a namespace prefix and URI pair. * * The string is of the form xmlns:prefix="uri", * xmlns="uri", xmlns:prefix="" or xmlns="". * The quotes can be single or double quotes. * * Two values are returned from this function into *@prefix and * *@uri_string. Either but not both may be NULL. * * See also raptor_namespace_format_as_xml() * * Return value: non-0 on failure. **/ int raptor_xml_namespace_string_parse(const unsigned char *string, unsigned char **prefix, unsigned char **uri_string) { const unsigned char *t; unsigned char quote; if((!prefix || !uri_string)) return 1; if(!string || (string && !*string)) return 1; if(strncmp((const char*)string, "xmlns", 5)) return 1; *prefix = NULL; *uri_string = NULL; /* * Four cases are expected and handled: * xmlns="" * xmlns="uri" * xmlns:foo="" * xmlns:foo="uri" * * (with " or ' quotes) */ /* skip "xmlns" */ string += 5; if(*string == ':') { /* non-empty prefix */ t = ++string; while(*string && *string != '=') string++; if(!*string || string == t) return 1; *prefix = RAPTOR_MALLOC(unsigned char*, string - t + 1); if(!*prefix) return 1; memcpy(*prefix, t, string - t); (*prefix)[string-t] = '\0'; } if(*string++ != '=') return 1; if(*string != '"' && *string != '\'') return 1; quote = *string++; t = string; while(*string && *string != quote) string++; if(*string != quote) return 1; if(!(string - t)) /* xmlns...="" */ *uri_string = NULL; else { *uri_string = RAPTOR_MALLOC(unsigned char*, string - t + 1); if(!*uri_string) return 1; memcpy(*uri_string, t, string - t); (*uri_string)[string - t] = '\0'; } return 0; } /** * raptor_new_qname_from_namespace_uri: * @nstack: namespace stack * @uri: URI to use to make qname * @xml_version: XML Version * * Make an appropriate XML Qname from the namespaces on a namespace stack * * Makes a qname from the in-scope namespaces in a stack if the URI matches * the prefix and the rest is a legal XML name. * * Return value: #raptor_qname for the URI or NULL on failure **/ raptor_qname* raptor_new_qname_from_namespace_uri(raptor_namespace_stack *nstack, raptor_uri *uri, int xml_version) { unsigned char *uri_string; size_t uri_len; raptor_namespace* ns = NULL; unsigned char *ns_uri_string; size_t ns_uri_len; unsigned char *name = NULL; int bucket; if(!uri) return NULL; uri_string = raptor_uri_as_counted_string(uri, &uri_len); for(bucket = 0; bucket < nstack->table_size; bucket++) { for(ns = nstack->table[bucket]; ns ; ns = ns->next) { if(!ns->uri) continue; ns_uri_string = raptor_uri_as_counted_string(ns->uri, &ns_uri_len); if(ns_uri_len >= uri_len) continue; if(strncmp((const char*)uri_string, (const char*)ns_uri_string, ns_uri_len)) continue; /* uri_string is a prefix of ns_uri_string */ name = uri_string + ns_uri_len; if(!raptor_xml_name_check(name, uri_len-ns_uri_len, xml_version)) name = NULL; /* If name is set, we've found a prefix with a legal XML name value */ if(name) break; } if(name) break; } if(!ns) return NULL; return raptor_new_qname_from_namespace_local_name(nstack->world, ns, name, NULL); } #ifdef RAPTOR_DEBUG void raptor_namespace_print(FILE *stream, raptor_namespace* ns) { const unsigned char *uri_string; uri_string = raptor_uri_as_string(ns->uri); if(ns->prefix) fprintf(stream, "%s:%s", ns->prefix, uri_string); else fprintf(stream, "(default):%s", uri_string); } #endif raptor_namespace** raptor_namespace_stack_to_array(raptor_namespace_stack *nstack, size_t *size_p) { raptor_namespace** ns_list; size_t size = 0; int bucket; ns_list = RAPTOR_CALLOC(raptor_namespace**, nstack->size, sizeof(raptor_namespace*)); if(!ns_list) return NULL; for(bucket = 0; bucket < nstack->table_size; bucket++) { raptor_namespace* ns; for(ns = nstack->table[bucket]; ns; ns = ns->next) { int skip = 0; unsigned int i; if(ns->depth < 1) continue; for(i = 0; i < size; i++) { raptor_namespace* ns2 = ns_list[i]; if((!ns->prefix && !ns2->prefix) || (ns->prefix && ns2->prefix && !strcmp((const char*)ns->prefix, (const char*)ns2->prefix))) { /* this prefix was seen (overridden) earlier so skip */ skip = 1; break; } } if(!skip) ns_list[size++] = ns; } } if(size_p) *size_p = size; return ns_list; } #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); raptor_namespace_stack namespaces; /* static */ raptor_namespace* ns; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); raptor_namespaces_init(world, &namespaces, 1); raptor_namespaces_start_namespace_full(&namespaces, (const unsigned char*)"ex1", (const unsigned char*)"http://example.org/ns1", 0); raptor_namespaces_start_namespace_full(&namespaces, (const unsigned char*)"ex2", (const unsigned char*)"http://example.org/ns2", 1); if(raptor_namespaces_find_namespace(&namespaces, NULL, 0)) { fprintf(stderr, "%s: Default namespace found when should not be found, returning error\n", program); return(1); } raptor_namespaces_start_namespace_full(&namespaces, NULL, (const unsigned char*)"http://example.org/ns3", 2); ns = raptor_namespaces_find_namespace(&namespaces, NULL, 0); if(!ns) { fprintf(stderr, "%s: Default namespace not found when should not be found, returning error\n", program); return(1); } ns = raptor_namespaces_find_namespace(&namespaces, (const unsigned char*)"ex2", 3); if(!ns) { fprintf(stderr, "%s: namespace ex2 not found when should not be found, returning error\n", program); return(1); } raptor_namespaces_end_for_depth(&namespaces, 2); raptor_namespaces_end_for_depth(&namespaces, 1); raptor_namespaces_end_for_depth(&namespaces, 0); raptor_namespaces_clear(&namespaces); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif /* * Local Variables: * mode:c * c-basic-offset: 2 * End: */ raptor2-2.0.15/src/Makefile.am0000644000175000017500000002621712415660065012751 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor libraptor # # Copyright (C) 2000-2011, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # lib_LTLIBRARIES = libraptor2.la pkginclude_HEADERS = raptor.h nodist_pkginclude_HEADERS = raptor2.h noinst_HEADERS = raptor_internal.h TESTS=raptor_parse_test raptor_rfc2396_test raptor_uri_test \ raptor_namespace_test strcasecmp_test raptor_www_test \ raptor_sequence_test raptor_stringbuffer_test \ raptor_uri_win32_test raptor_iostream_test raptor_xml_writer_test \ raptor_turtle_writer_test raptor_avltree_test raptor_term_test \ raptor_permute_test raptor_snprintf_test raptor_sort_r_test if RAPTOR_PARSER_RDFXML TESTS += raptor_set_test raptor_xml_test endif CLEANFILES=$(TESTS) \ turtle_lexer_test turtle_parser_test \ *.plist \ git-version.h MAINTAINERCLEANFILES=turtle_lexer.c turtle_lexer.h \ turtle_parser.c turtle_parser.h turtle_parser.output # Memory debugging MEM=@MEM@ MEM_LIBS=@MEM_LIBS@ AM_CPPFLAGS = $(MEM) ANALYZE = clang ANALYZE_FLAGS = "--analyze" # Based on COMPILE target ANALYZE_COMMAND = $(ANALYZE) \ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) BUILT_SOURCES = turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h libraptor2_la_SOURCES = raptor_parse.c raptor_serialize.c \ raptor_rfc2396.c raptor_uri.c raptor_log.c raptor_locator.c \ raptor_namespace.c raptor_qname.c \ raptor_option.c raptor_general.c raptor_unicode.c \ raptor_www.c \ raptor_statement.c \ raptor_term.c \ raptor_sequence.c raptor_stringbuffer.c raptor_iostream.c \ raptor_xml.c raptor_xml_writer.c raptor_set.c turtle_common.c \ raptor_turtle_writer.c raptor_avltree.c snprintf.c \ raptor_json_writer.c raptor_memstr.c raptor_concepts.c \ raptor_syntax_description.c \ raptor_sax2.c raptor_escaped.c \ raptor_ntriples.c \ sort_r.c sort_r.h ssort.h if RAPTOR_XML_LIBXML libraptor2_la_SOURCES += raptor_libxml.c endif if RAPTOR_PARSER_RDFXML libraptor2_la_SOURCES += raptor_rdfxml.c endif if RAPTOR_PARSER_TURTLE libraptor2_la_SOURCES += turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h else if RAPTOR_PARSER_TRIG libraptor2_la_SOURCES += turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h endif endif if RAPTOR_PARSER_NTRIPLES libraptor2_la_SOURCES += ntriples_parse.c else if RAPTOR_PARSER_NQUADS libraptor2_la_SOURCES += ntriples_parse.c endif endif if RAPTOR_RSS_COMMON libraptor2_la_SOURCES += raptor_rss_common.c raptor_rss.h endif if RAPTOR_PARSER_RSS libraptor2_la_SOURCES += raptor_rss.c endif if RAPTOR_PARSER_GRDDL libraptor2_la_SOURCES += raptor_grddl.c endif if RAPTOR_PARSER_GUESS libraptor2_la_SOURCES += raptor_guess.c endif if RAPTOR_PARSER_RDFA libraptor2_la_SOURCES += raptor_librdfa.c endif if RAPTOR_PARSER_JSON libraptor2_la_SOURCES += raptor_json.c endif if RAPTOR_SERIALIZER_RDFXML libraptor2_la_SOURCES += raptor_serialize_rdfxml.c endif if RAPTOR_SERIALIZER_NTRIPLES libraptor2_la_SOURCES += raptor_serialize_ntriples.c else if RAPTOR_SERIALIZER_NQUADS libraptor2_la_SOURCES += raptor_serialize_ntriples.c endif endif #raptor_abbrev.c required by both turtle and xml-abbrev if RAPTOR_SERIALIZER_RDFXML_ABBREV libraptor2_la_SOURCES += raptor_abbrev.c else if RAPTOR_SERIALIZER_TURTLE libraptor2_la_SOURCES += raptor_abbrev.c endif endif if RAPTOR_SERIALIZER_RDFXML_ABBREV libraptor2_la_SOURCES += raptor_serialize_rdfxmla.c endif if RAPTOR_SERIALIZER_TURTLE libraptor2_la_SOURCES += raptor_serialize_turtle.c endif if RAPTOR_SERIALIZER_RSS_1_0 libraptor2_la_SOURCES += raptor_serialize_rss.c endif if RAPTOR_SERIALIZER_DOT libraptor2_la_SOURCES += raptor_serialize_dot.c endif if RAPTOR_SERIALIZER_HTML libraptor2_la_SOURCES += raptor_serialize_html.c endif if RAPTOR_SERIALIZER_JSON libraptor2_la_SOURCES += raptor_serialize_json.c endif if STRCASECMP libraptor2_la_SOURCES += strcasecmp.c endif if PARSEDATE libraptor2_la_SOURCES += parsedate.c BUILT_SOURCES += parsedate.c endif libraptor2_la_LIBADD = if LIBRDFA AM_CPPFLAGS += -DLIBRDFA_IN_RAPTOR -I$(top_srcdir)/librdfa libraptor2_la_LIBADD += $(top_builddir)/librdfa/librdfa.la endif libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \ @RAPTOR_LDFLAGS@ $(MEM_LIBS) libraptor2_la_LIBADD += @LTLIBOBJS@ EXTRA_DIST=\ CMakeLists.txt \ raptor_config_cmake.h.in \ raptor_permute_test.c \ raptor_www_test.c \ raptor_nfc_test.c \ raptor_win32.c \ $(man_MANS) \ turtle_lexer.l turtle_parser.y \ parsedate.y nodist_libraptor2_la_SOURCES = if MAINTAINER_MODE nodist_libraptor2_la_SOURCES += git-version.h # raptor_parse.c is the first source file so this ensures # git-version.h is created before it and before the actual file # dependencies are calculated as a side-effect of compilation raptor_parse.c: git-version.h # Actually it needs turtle_parser.h but nevermind turtle_lexer.c: $(srcdir)/turtle_lexer.l turtle_parser.c $(top_srcdir)/scripts/fix-flex.pl $(AM_V_GEN) \ $(LEX) -o$@ $(srcdir)/turtle_lexer.l; \ $(PERL) $(top_srcdir)/scripts/fix-flex.pl $@ > turtle_lexer.t || rm -f $@; \ mv -f turtle_lexer.t $@ turtle_lexer.h: turtle_lexer.c ; @exit 0 turtle_parser.c: $(srcdir)/turtle_parser.y $(top_srcdir)/scripts/fix-bison.pl $(AM_V_GEN) \ $(BISON) $(srcdir)/turtle_parser.y; \ $(PERL) $(top_srcdir)/scripts/fix-bison.pl turtle_parser.tab.c > $@; \ mv -f turtle_parser.tab.h turtle_parser.h; \ rm -f turtle_parser.tab.c turtle_parser.h: turtle_parser.c ; @exit 0 parsedate.c: $(srcdir)/parsedate.y $(top_srcdir)/scripts/fix-bison.pl $(AM_V_GEN) \ $(BISON) $(srcdir)/parsedate.y; \ $(PERL) $(top_srcdir)/scripts/fix-bison.pl parsedate.tab.c > $@; \ mv -f parsedate.tab.h parsedate.h; \ rm -f parsedate.tab.c parsedate.h: parsedate.c ; @exit 0 endif # Actually it needs turtle_parser.h but nevermind turtle_lexer_test: $(srcdir)/turtle_lexer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_lexer.c libraptor2.la $(LIBS) turtle_parser_test: $(srcdir)/turtle_parser.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_parser.c libraptor2.la $(LIBS) raptor_parse_test: $(srcdir)/raptor_parse.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_parse.c libraptor2.la $(LIBS) raptor_rfc2396_test: $(srcdir)/raptor_rfc2396.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_rfc2396.c libraptor2.la $(LIBS) raptor_uri_test: $(srcdir)/raptor_uri.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_uri.c libraptor2.la $(LIBS) raptor_uri_win32_test: $(srcdir)/raptor_uri.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE -DWIN32_URI_TEST $(srcdir)/raptor_uri.c libraptor2.la $(LIBS) raptor_namespace_test: $(srcdir)/raptor_namespace.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_namespace.c libraptor2.la $(LIBS) strcasecmp_test: $(srcdir)/strcasecmp.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/strcasecmp.c libraptor2.la $(LIBS) raptor_www_test: $(srcdir)/raptor_www_test.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_www_test.c libraptor2.la $(LIBS) raptor_set_test: $(srcdir)/raptor_set.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_set.c libraptor2.la $(LIBS) raptor_xml_test: $(srcdir)/raptor_xml.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml.c libraptor2.la $(LIBS) raptor_sequence_test: $(srcdir)/raptor_sequence.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_sequence.c libraptor2.la $(LIBS) raptor_stringbuffer_test: $(srcdir)/raptor_stringbuffer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_stringbuffer.c libraptor2.la $(LIBS) raptor_nfc_test: $(srcdir)/raptor_nfc_test.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_nfc_test.c libraptor2.la $(LIBS) raptor_iostream_test: $(srcdir)/raptor_iostream.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_iostream.c libraptor2.la $(LIBS) raptor_xml_writer_test: $(srcdir)/raptor_xml_writer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml_writer.c libraptor2.la $(LIBS) raptor_turtle_writer_test: $(srcdir)/raptor_turtle_writer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_turtle_writer.c libraptor2.la $(LIBS) raptor_avltree_test: $(srcdir)/raptor_avltree.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_avltree.c libraptor2.la $(LIBS) raptor_term_test: $(srcdir)/raptor_term.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_term.c libraptor2.la $(LIBS) raptor_permute_test: $(srcdir)/raptor_permute_test.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_permute_test.c libraptor2.la $(LIBS) raptor_snprintf_test: $(srcdir)/snprintf.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/snprintf.c libraptor2.la $(LIBS) raptor_sort_r_test: $(srcdir)/sort_r.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/sort_r.c libraptor2.la $(LIBS) $(top_builddir)/librdfa/librdfa.la: cd $(top_builddir)/librdfa && $(MAKE) librdfa.la # Some people need a little help ;-) test: check if MAINTAINER_MODE git-version.h: check-version # Always run this in maintainer mode but do not always change git-version.h .PHONY: check-version check-version: @file="git-version.h" ; \ if test -d ../.git; then \ git_version=`cd .. && git rev-parse HEAD`; \ else \ git_version="unknown"; \ fi; \ $(RECHO) "GIT version $$git_version"; \ tmp="$$file.tmp"; \ $(RECHO) "#define GIT_VERSION \"$$git_version\"" > $$tmp; \ if test -f $$file; then \ if cmp $$file $$tmp >/dev/null 2>&1; then \ rm $$tmp; \ else \ mv $$tmp $$file; \ fi; \ else \ mv $$tmp $$file; \ fi # Run Clang static analyzer over sources. analyze: $(SOURCES) @list='$(SOURCES)'; \ result=0; \ for file in $$list; do \ if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \ $(RECHO) "Analyzing $$file"; \ $(ANALYZE_COMMAND) $(srcdir)/$$file; \ status=$$?; \ if test $$status != 0; then \ result=1; \ fi; \ fi; \ done; \ set -e; exit $$result endif raptor2-2.0.15/src/Makefile.in0000644000175000017500000013543112425344566012767 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor libraptor # # Copyright (C) 2000-2011, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @RAPTOR_PARSER_RDFXML_TRUE@am__append_1 = raptor_set_test raptor_xml_test @RAPTOR_XML_LIBXML_TRUE@am__append_2 = raptor_libxml.c @RAPTOR_PARSER_RDFXML_TRUE@am__append_3 = raptor_rdfxml.c @RAPTOR_PARSER_TURTLE_TRUE@am__append_4 = turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h @RAPTOR_PARSER_TRIG_TRUE@@RAPTOR_PARSER_TURTLE_FALSE@am__append_5 = turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h turtle_common.h @RAPTOR_PARSER_NTRIPLES_TRUE@am__append_6 = ntriples_parse.c @RAPTOR_PARSER_NQUADS_TRUE@@RAPTOR_PARSER_NTRIPLES_FALSE@am__append_7 = ntriples_parse.c @RAPTOR_RSS_COMMON_TRUE@am__append_8 = raptor_rss_common.c raptor_rss.h @RAPTOR_PARSER_RSS_TRUE@am__append_9 = raptor_rss.c @RAPTOR_PARSER_GRDDL_TRUE@am__append_10 = raptor_grddl.c @RAPTOR_PARSER_GUESS_TRUE@am__append_11 = raptor_guess.c @RAPTOR_PARSER_RDFA_TRUE@am__append_12 = raptor_librdfa.c @RAPTOR_PARSER_JSON_TRUE@am__append_13 = raptor_json.c @RAPTOR_SERIALIZER_RDFXML_TRUE@am__append_14 = raptor_serialize_rdfxml.c @RAPTOR_SERIALIZER_NTRIPLES_TRUE@am__append_15 = raptor_serialize_ntriples.c @RAPTOR_SERIALIZER_NQUADS_TRUE@@RAPTOR_SERIALIZER_NTRIPLES_FALSE@am__append_16 = raptor_serialize_ntriples.c #raptor_abbrev.c required by both turtle and xml-abbrev @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__append_17 = raptor_abbrev.c @RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE@@RAPTOR_SERIALIZER_TURTLE_TRUE@am__append_18 = raptor_abbrev.c @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__append_19 = raptor_serialize_rdfxmla.c @RAPTOR_SERIALIZER_TURTLE_TRUE@am__append_20 = raptor_serialize_turtle.c @RAPTOR_SERIALIZER_RSS_1_0_TRUE@am__append_21 = raptor_serialize_rss.c @RAPTOR_SERIALIZER_DOT_TRUE@am__append_22 = raptor_serialize_dot.c @RAPTOR_SERIALIZER_HTML_TRUE@am__append_23 = raptor_serialize_html.c @RAPTOR_SERIALIZER_JSON_TRUE@am__append_24 = raptor_serialize_json.c @STRCASECMP_TRUE@am__append_25 = strcasecmp.c @PARSEDATE_TRUE@am__append_26 = parsedate.c @PARSEDATE_TRUE@am__append_27 = parsedate.c @LIBRDFA_TRUE@am__append_28 = -DLIBRDFA_IN_RAPTOR -I$(top_srcdir)/librdfa @LIBRDFA_TRUE@am__append_29 = $(top_builddir)/librdfa/librdfa.la @MAINTAINER_MODE_TRUE@am__append_30 = git-version.h subdir = src DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/raptor2.h.in $(srcdir)/raptor_config.h.in \ raptor_nfc_icu.c raptor_www_curl.c raptor_www_libfetch.c \ raptor_www_libxml.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = raptor_config.h CONFIG_CLEAN_FILES = raptor2.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" \ "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libraptor2_la_DEPENDENCIES = $(am__append_29) @LTLIBOBJS@ am__libraptor2_la_SOURCES_DIST = raptor_parse.c raptor_serialize.c \ raptor_rfc2396.c raptor_uri.c raptor_log.c raptor_locator.c \ raptor_namespace.c raptor_qname.c raptor_option.c \ raptor_general.c raptor_unicode.c raptor_www.c \ raptor_statement.c raptor_term.c raptor_sequence.c \ raptor_stringbuffer.c raptor_iostream.c raptor_xml.c \ raptor_xml_writer.c raptor_set.c turtle_common.c \ raptor_turtle_writer.c raptor_avltree.c snprintf.c \ raptor_json_writer.c raptor_memstr.c raptor_concepts.c \ raptor_syntax_description.c raptor_sax2.c raptor_escaped.c \ raptor_ntriples.c sort_r.c sort_r.h ssort.h raptor_libxml.c \ raptor_rdfxml.c turtle_lexer.c turtle_lexer.h turtle_parser.c \ turtle_parser.h turtle_common.h ntriples_parse.c \ raptor_rss_common.c raptor_rss.h raptor_rss.c raptor_grddl.c \ raptor_guess.c raptor_librdfa.c raptor_json.c \ raptor_serialize_rdfxml.c raptor_serialize_ntriples.c \ raptor_abbrev.c raptor_serialize_rdfxmla.c \ raptor_serialize_turtle.c raptor_serialize_rss.c \ raptor_serialize_dot.c raptor_serialize_html.c \ raptor_serialize_json.c strcasecmp.c parsedate.c @RAPTOR_XML_LIBXML_TRUE@am__objects_1 = raptor_libxml.lo @RAPTOR_PARSER_RDFXML_TRUE@am__objects_2 = raptor_rdfxml.lo @RAPTOR_PARSER_TURTLE_TRUE@am__objects_3 = turtle_lexer.lo \ @RAPTOR_PARSER_TURTLE_TRUE@ turtle_parser.lo @RAPTOR_PARSER_TRIG_TRUE@@RAPTOR_PARSER_TURTLE_FALSE@am__objects_4 = turtle_lexer.lo \ @RAPTOR_PARSER_TRIG_TRUE@@RAPTOR_PARSER_TURTLE_FALSE@ turtle_parser.lo @RAPTOR_PARSER_NTRIPLES_TRUE@am__objects_5 = ntriples_parse.lo @RAPTOR_PARSER_NQUADS_TRUE@@RAPTOR_PARSER_NTRIPLES_FALSE@am__objects_6 = ntriples_parse.lo @RAPTOR_RSS_COMMON_TRUE@am__objects_7 = raptor_rss_common.lo @RAPTOR_PARSER_RSS_TRUE@am__objects_8 = raptor_rss.lo @RAPTOR_PARSER_GRDDL_TRUE@am__objects_9 = raptor_grddl.lo @RAPTOR_PARSER_GUESS_TRUE@am__objects_10 = raptor_guess.lo @RAPTOR_PARSER_RDFA_TRUE@am__objects_11 = raptor_librdfa.lo @RAPTOR_PARSER_JSON_TRUE@am__objects_12 = raptor_json.lo @RAPTOR_SERIALIZER_RDFXML_TRUE@am__objects_13 = \ @RAPTOR_SERIALIZER_RDFXML_TRUE@ raptor_serialize_rdfxml.lo @RAPTOR_SERIALIZER_NTRIPLES_TRUE@am__objects_14 = \ @RAPTOR_SERIALIZER_NTRIPLES_TRUE@ raptor_serialize_ntriples.lo @RAPTOR_SERIALIZER_NQUADS_TRUE@@RAPTOR_SERIALIZER_NTRIPLES_FALSE@am__objects_15 = raptor_serialize_ntriples.lo @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__objects_16 = \ @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@ raptor_abbrev.lo @RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE@@RAPTOR_SERIALIZER_TURTLE_TRUE@am__objects_17 = raptor_abbrev.lo @RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE@am__objects_18 = raptor_serialize_rdfxmla.lo @RAPTOR_SERIALIZER_TURTLE_TRUE@am__objects_19 = \ @RAPTOR_SERIALIZER_TURTLE_TRUE@ raptor_serialize_turtle.lo @RAPTOR_SERIALIZER_RSS_1_0_TRUE@am__objects_20 = \ @RAPTOR_SERIALIZER_RSS_1_0_TRUE@ raptor_serialize_rss.lo @RAPTOR_SERIALIZER_DOT_TRUE@am__objects_21 = raptor_serialize_dot.lo @RAPTOR_SERIALIZER_HTML_TRUE@am__objects_22 = \ @RAPTOR_SERIALIZER_HTML_TRUE@ raptor_serialize_html.lo @RAPTOR_SERIALIZER_JSON_TRUE@am__objects_23 = \ @RAPTOR_SERIALIZER_JSON_TRUE@ raptor_serialize_json.lo @STRCASECMP_TRUE@am__objects_24 = strcasecmp.lo @PARSEDATE_TRUE@am__objects_25 = parsedate.lo am_libraptor2_la_OBJECTS = raptor_parse.lo raptor_serialize.lo \ raptor_rfc2396.lo raptor_uri.lo raptor_log.lo \ raptor_locator.lo raptor_namespace.lo raptor_qname.lo \ raptor_option.lo raptor_general.lo raptor_unicode.lo \ raptor_www.lo raptor_statement.lo raptor_term.lo \ raptor_sequence.lo raptor_stringbuffer.lo raptor_iostream.lo \ raptor_xml.lo raptor_xml_writer.lo raptor_set.lo \ turtle_common.lo raptor_turtle_writer.lo raptor_avltree.lo \ snprintf.lo raptor_json_writer.lo raptor_memstr.lo \ raptor_concepts.lo raptor_syntax_description.lo raptor_sax2.lo \ raptor_escaped.lo raptor_ntriples.lo sort_r.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \ $(am__objects_13) $(am__objects_14) $(am__objects_15) \ $(am__objects_16) $(am__objects_17) $(am__objects_18) \ $(am__objects_19) $(am__objects_20) $(am__objects_21) \ $(am__objects_22) $(am__objects_23) $(am__objects_24) \ $(am__objects_25) am__objects_26 = nodist_libraptor2_la_OBJECTS = $(am__objects_26) libraptor2_la_OBJECTS = $(am_libraptor2_la_OBJECTS) \ $(nodist_libraptor2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libraptor2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libraptor2_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libraptor2_la_SOURCES) $(nodist_libraptor2_la_SOURCES) DIST_SOURCES = $(am__libraptor2_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(nodist_pkginclude_HEADERS) $(noinst_HEADERS) \ $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # Memory debugging MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libraptor2.la pkginclude_HEADERS = raptor.h nodist_pkginclude_HEADERS = raptor2.h noinst_HEADERS = raptor_internal.h TESTS = raptor_parse_test raptor_rfc2396_test raptor_uri_test \ raptor_namespace_test strcasecmp_test raptor_www_test \ raptor_sequence_test raptor_stringbuffer_test \ raptor_uri_win32_test raptor_iostream_test \ raptor_xml_writer_test raptor_turtle_writer_test \ raptor_avltree_test raptor_term_test raptor_permute_test \ raptor_snprintf_test raptor_sort_r_test $(am__append_1) CLEANFILES = $(TESTS) \ turtle_lexer_test turtle_parser_test \ *.plist \ git-version.h MAINTAINERCLEANFILES = turtle_lexer.c turtle_lexer.h \ turtle_parser.c turtle_parser.h turtle_parser.output AM_CPPFLAGS = $(MEM) $(am__append_28) ANALYZE = clang ANALYZE_FLAGS = "--analyze" # Based on COMPILE target ANALYZE_COMMAND = $(ANALYZE) \ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) BUILT_SOURCES = turtle_lexer.c turtle_lexer.h turtle_parser.c \ turtle_parser.h $(am__append_27) libraptor2_la_SOURCES = raptor_parse.c raptor_serialize.c \ raptor_rfc2396.c raptor_uri.c raptor_log.c raptor_locator.c \ raptor_namespace.c raptor_qname.c raptor_option.c \ raptor_general.c raptor_unicode.c raptor_www.c \ raptor_statement.c raptor_term.c raptor_sequence.c \ raptor_stringbuffer.c raptor_iostream.c raptor_xml.c \ raptor_xml_writer.c raptor_set.c turtle_common.c \ raptor_turtle_writer.c raptor_avltree.c snprintf.c \ raptor_json_writer.c raptor_memstr.c raptor_concepts.c \ raptor_syntax_description.c raptor_sax2.c raptor_escaped.c \ raptor_ntriples.c sort_r.c sort_r.h ssort.h $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) \ $(am__append_9) $(am__append_10) $(am__append_11) \ $(am__append_12) $(am__append_13) $(am__append_14) \ $(am__append_15) $(am__append_16) $(am__append_17) \ $(am__append_18) $(am__append_19) $(am__append_20) \ $(am__append_21) $(am__append_22) $(am__append_23) \ $(am__append_24) $(am__append_25) $(am__append_26) libraptor2_la_LIBADD = $(am__append_29) @LTLIBOBJS@ libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \ @RAPTOR_LDFLAGS@ $(MEM_LIBS) EXTRA_DIST = \ CMakeLists.txt \ raptor_config_cmake.h.in \ raptor_permute_test.c \ raptor_www_test.c \ raptor_nfc_test.c \ raptor_win32.c \ $(man_MANS) \ turtle_lexer.l turtle_parser.y \ parsedate.y nodist_libraptor2_la_SOURCES = $(am__append_30) all: $(BUILT_SOURCES) raptor_config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): raptor_config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/raptor_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/raptor_config.h $(srcdir)/raptor_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f raptor_config.h stamp-h1 raptor2.h: $(top_builddir)/config.status $(srcdir)/raptor2.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libraptor2.la: $(libraptor2_la_OBJECTS) $(libraptor2_la_DEPENDENCIES) $(EXTRA_libraptor2_la_DEPENDENCIES) $(AM_V_CCLD)$(libraptor2_la_LINK) -rpath $(libdir) $(libraptor2_la_OBJECTS) $(libraptor2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_nfc_icu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_www_curl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_www_libfetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raptor_www_libxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntriples_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsedate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_abbrev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_avltree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_concepts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_escaped.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_general.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_grddl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_guess.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_iostream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_json.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_json_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_librdfa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_libxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_locator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_memstr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_namespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_ntriples.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_qname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rdfxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rfc2396.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_rss_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_sax2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_sequence.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_dot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_html.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_json.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_ntriples.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_rdfxml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_rdfxmla.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_rss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_serialize_turtle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_stringbuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_syntax_description.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_term.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_turtle_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_unicode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_uri.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_www.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_xml_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turtle_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turtle_lexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/turtle_parser.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-nodist_pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) raptor_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) raptor_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) raptor_config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) raptor_config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) raptor_config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_pkgincludeHEADERS \ install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS .MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool ctags \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man \ install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS \ uninstall-pkgincludeHEADERS # raptor_parse.c is the first source file so this ensures # git-version.h is created before it and before the actual file # dependencies are calculated as a side-effect of compilation @MAINTAINER_MODE_TRUE@raptor_parse.c: git-version.h # Actually it needs turtle_parser.h but nevermind @MAINTAINER_MODE_TRUE@turtle_lexer.c: $(srcdir)/turtle_lexer.l turtle_parser.c $(top_srcdir)/scripts/fix-flex.pl @MAINTAINER_MODE_TRUE@ $(AM_V_GEN) \ @MAINTAINER_MODE_TRUE@ $(LEX) -o$@ $(srcdir)/turtle_lexer.l; \ @MAINTAINER_MODE_TRUE@ $(PERL) $(top_srcdir)/scripts/fix-flex.pl $@ > turtle_lexer.t || rm -f $@; \ @MAINTAINER_MODE_TRUE@ mv -f turtle_lexer.t $@ @MAINTAINER_MODE_TRUE@turtle_lexer.h: turtle_lexer.c ; @exit 0 @MAINTAINER_MODE_TRUE@turtle_parser.c: $(srcdir)/turtle_parser.y $(top_srcdir)/scripts/fix-bison.pl @MAINTAINER_MODE_TRUE@ $(AM_V_GEN) \ @MAINTAINER_MODE_TRUE@ $(BISON) $(srcdir)/turtle_parser.y; \ @MAINTAINER_MODE_TRUE@ $(PERL) $(top_srcdir)/scripts/fix-bison.pl turtle_parser.tab.c > $@; \ @MAINTAINER_MODE_TRUE@ mv -f turtle_parser.tab.h turtle_parser.h; \ @MAINTAINER_MODE_TRUE@ rm -f turtle_parser.tab.c @MAINTAINER_MODE_TRUE@turtle_parser.h: turtle_parser.c ; @exit 0 @MAINTAINER_MODE_TRUE@parsedate.c: $(srcdir)/parsedate.y $(top_srcdir)/scripts/fix-bison.pl @MAINTAINER_MODE_TRUE@ $(AM_V_GEN) \ @MAINTAINER_MODE_TRUE@ $(BISON) $(srcdir)/parsedate.y; \ @MAINTAINER_MODE_TRUE@ $(PERL) $(top_srcdir)/scripts/fix-bison.pl parsedate.tab.c > $@; \ @MAINTAINER_MODE_TRUE@ mv -f parsedate.tab.h parsedate.h; \ @MAINTAINER_MODE_TRUE@ rm -f parsedate.tab.c @MAINTAINER_MODE_TRUE@parsedate.h: parsedate.c ; @exit 0 # Actually it needs turtle_parser.h but nevermind turtle_lexer_test: $(srcdir)/turtle_lexer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_lexer.c libraptor2.la $(LIBS) turtle_parser_test: $(srcdir)/turtle_parser.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/turtle_parser.c libraptor2.la $(LIBS) raptor_parse_test: $(srcdir)/raptor_parse.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_parse.c libraptor2.la $(LIBS) raptor_rfc2396_test: $(srcdir)/raptor_rfc2396.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_rfc2396.c libraptor2.la $(LIBS) raptor_uri_test: $(srcdir)/raptor_uri.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_uri.c libraptor2.la $(LIBS) raptor_uri_win32_test: $(srcdir)/raptor_uri.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE -DWIN32_URI_TEST $(srcdir)/raptor_uri.c libraptor2.la $(LIBS) raptor_namespace_test: $(srcdir)/raptor_namespace.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_namespace.c libraptor2.la $(LIBS) strcasecmp_test: $(srcdir)/strcasecmp.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/strcasecmp.c libraptor2.la $(LIBS) raptor_www_test: $(srcdir)/raptor_www_test.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_www_test.c libraptor2.la $(LIBS) raptor_set_test: $(srcdir)/raptor_set.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_set.c libraptor2.la $(LIBS) raptor_xml_test: $(srcdir)/raptor_xml.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml.c libraptor2.la $(LIBS) raptor_sequence_test: $(srcdir)/raptor_sequence.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_sequence.c libraptor2.la $(LIBS) raptor_stringbuffer_test: $(srcdir)/raptor_stringbuffer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_stringbuffer.c libraptor2.la $(LIBS) raptor_nfc_test: $(srcdir)/raptor_nfc_test.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_nfc_test.c libraptor2.la $(LIBS) raptor_iostream_test: $(srcdir)/raptor_iostream.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_iostream.c libraptor2.la $(LIBS) raptor_xml_writer_test: $(srcdir)/raptor_xml_writer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_xml_writer.c libraptor2.la $(LIBS) raptor_turtle_writer_test: $(srcdir)/raptor_turtle_writer.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_turtle_writer.c libraptor2.la $(LIBS) raptor_avltree_test: $(srcdir)/raptor_avltree.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_avltree.c libraptor2.la $(LIBS) raptor_term_test: $(srcdir)/raptor_term.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_term.c libraptor2.la $(LIBS) raptor_permute_test: $(srcdir)/raptor_permute_test.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/raptor_permute_test.c libraptor2.la $(LIBS) raptor_snprintf_test: $(srcdir)/snprintf.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/snprintf.c libraptor2.la $(LIBS) raptor_sort_r_test: $(srcdir)/sort_r.c libraptor2.la $(LINK) $(DEFS) $(CPPFLAGS) -I$(srcdir) -I. -DSTANDALONE $(srcdir)/sort_r.c libraptor2.la $(LIBS) $(top_builddir)/librdfa/librdfa.la: cd $(top_builddir)/librdfa && $(MAKE) librdfa.la # Some people need a little help ;-) test: check @MAINTAINER_MODE_TRUE@git-version.h: check-version # Always run this in maintainer mode but do not always change git-version.h @MAINTAINER_MODE_TRUE@.PHONY: check-version @MAINTAINER_MODE_TRUE@check-version: @MAINTAINER_MODE_TRUE@ @file="git-version.h" ; \ @MAINTAINER_MODE_TRUE@ if test -d ../.git; then \ @MAINTAINER_MODE_TRUE@ git_version=`cd .. && git rev-parse HEAD`; \ @MAINTAINER_MODE_TRUE@ else \ @MAINTAINER_MODE_TRUE@ git_version="unknown"; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ $(RECHO) "GIT version $$git_version"; \ @MAINTAINER_MODE_TRUE@ tmp="$$file.tmp"; \ @MAINTAINER_MODE_TRUE@ $(RECHO) "#define GIT_VERSION \"$$git_version\"" > $$tmp; \ @MAINTAINER_MODE_TRUE@ if test -f $$file; then \ @MAINTAINER_MODE_TRUE@ if cmp $$file $$tmp >/dev/null 2>&1; then \ @MAINTAINER_MODE_TRUE@ rm $$tmp; \ @MAINTAINER_MODE_TRUE@ else \ @MAINTAINER_MODE_TRUE@ mv $$tmp $$file; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ else \ @MAINTAINER_MODE_TRUE@ mv $$tmp $$file; \ @MAINTAINER_MODE_TRUE@ fi # Run Clang static analyzer over sources. @MAINTAINER_MODE_TRUE@analyze: $(SOURCES) @MAINTAINER_MODE_TRUE@ @list='$(SOURCES)'; \ @MAINTAINER_MODE_TRUE@ result=0; \ @MAINTAINER_MODE_TRUE@ for file in $$list; do \ @MAINTAINER_MODE_TRUE@ if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \ @MAINTAINER_MODE_TRUE@ $(RECHO) "Analyzing $$file"; \ @MAINTAINER_MODE_TRUE@ $(ANALYZE_COMMAND) $(srcdir)/$$file; \ @MAINTAINER_MODE_TRUE@ status=$$?; \ @MAINTAINER_MODE_TRUE@ if test $$status != 0; then \ @MAINTAINER_MODE_TRUE@ result=1; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ done; \ @MAINTAINER_MODE_TRUE@ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/src/raptor_xml_writer.c0000644000175000017500000007430012325013605014630 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_xml_writer.c - Raptor XML Writer for SAX2 events API * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE #define XML_WRITER_AUTO_INDENT(xml_writer) RAPTOR_OPTIONS_GET_NUMERIC(xml_writer, RAPTOR_OPTION_WRITER_AUTO_INDENT) #define XML_WRITER_AUTO_EMPTY(xml_writer) RAPTOR_OPTIONS_GET_NUMERIC(xml_writer, RAPTOR_OPTION_WRITER_AUTO_EMPTY) #define XML_WRITER_INDENT(xml_writer) RAPTOR_OPTIONS_GET_NUMERIC(xml_writer, RAPTOR_OPTION_WRITER_INDENT_WIDTH) #define XML_WRITER_XML_VERSION(xml_writer) RAPTOR_OPTIONS_GET_NUMERIC(xml_writer, RAPTOR_OPTION_WRITER_XML_VERSION) #define XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer) \ if((XML_WRITER_AUTO_EMPTY(xml_writer)) && \ xml_writer->current_element && \ !(xml_writer->current_element->content_cdata_seen || \ xml_writer->current_element->content_element_seen)) { \ raptor_iostream_write_byte('>', xml_writer->iostr); \ } /* Define this for far too much output */ #undef RAPTOR_DEBUG_CDATA struct raptor_xml_writer_s { raptor_world *world; int canonicalize; int depth; int my_nstack; raptor_namespace_stack *nstack; int nstack_depth; raptor_xml_element* current_element; /* outputting to this iostream */ raptor_iostream *iostr; /* Has writing the XML declaration writing been checked? */ int xml_declaration_checked; /* An extra newline is wanted */ int pending_newline; /* Options (per-object) */ raptor_object_options options; }; /* 16 spaces */ #define SPACES_BUFFER_SIZE sizeof(spaces_buffer) static const unsigned char spaces_buffer[] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; /* helper functions */ /* Handle printing a pending newline OR newline with indenting */ static int raptor_xml_writer_indent(raptor_xml_writer *xml_writer) { int num_spaces; if(!XML_WRITER_AUTO_INDENT(xml_writer)) { if(xml_writer->pending_newline) { raptor_iostream_write_byte('\n', xml_writer->iostr); xml_writer->pending_newline = 0; if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen = 1; } return 0; } num_spaces = xml_writer->depth * XML_WRITER_INDENT(xml_writer); /* Do not write an extra newline at the start of the document * (after the XML declaration or XMP processing instruction has * been writtten) */ if(xml_writer->xml_declaration_checked == 1) xml_writer->xml_declaration_checked++; else { raptor_iostream_write_byte('\n', xml_writer->iostr); xml_writer->pending_newline = 0; } while(num_spaces > 0) { int count = (num_spaces > RAPTOR_GOOD_CAST(int, SPACES_BUFFER_SIZE)) ? RAPTOR_GOOD_CAST(int, SPACES_BUFFER_SIZE) : num_spaces; raptor_iostream_counted_string_write(spaces_buffer, count, xml_writer->iostr); num_spaces -= count; } if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen = 1; return 0; } struct nsd { const raptor_namespace *nspace; unsigned char *declaration; size_t length; }; static int raptor_xml_writer_nsd_compare(const void *a, const void *b) { struct nsd* nsd_a = (struct nsd*)a; struct nsd* nsd_b = (struct nsd*)b; return strcmp((const char*)nsd_a->declaration, (const char*)nsd_b->declaration); } static int raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, raptor_xml_element* element, int auto_empty) { raptor_iostream* iostr = xml_writer->iostr; raptor_namespace_stack *nstack = xml_writer->nstack; int depth = xml_writer->depth; int auto_indent = XML_WRITER_AUTO_INDENT(xml_writer); struct nsd *nspace_declarations = NULL; size_t nspace_declarations_count = 0; unsigned int i; /* max is 1 per element and 1 for each attribute + size of declared */ if(nstack) { int nspace_max_count = element->attribute_count+1; if(element->declared_nspaces) nspace_max_count += raptor_sequence_size(element->declared_nspaces); if(element->xml_language) nspace_max_count++; nspace_declarations = RAPTOR_CALLOC(struct nsd*, nspace_max_count, sizeof(struct nsd)); if(!nspace_declarations) return 1; } if(element->name->nspace) { if(nstack && !raptor_namespaces_namespace_in_scope(nstack, element->name->nspace)) { nspace_declarations[0].declaration= raptor_namespace_format_as_xml(element->name->nspace, &nspace_declarations[0].length); if(!nspace_declarations[0].declaration) goto error; nspace_declarations[0].nspace = element->name->nspace; nspace_declarations_count++; } } if(nstack && element->attributes) { for(i = 0; i < element->attribute_count; i++) { /* qname */ if(element->attributes[i]->nspace) { /* Check if we need a namespace declaration attribute */ if(nstack && !raptor_namespaces_namespace_in_scope(nstack, element->attributes[i]->nspace) && element->attributes[i]->nspace != element->name->nspace) { /* not in scope and not same as element (so already going to be declared)*/ unsigned int j; int declare_me = 1; /* check it wasn't an earlier declaration too */ for(j = 0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == element->attributes[j]->nspace) { declare_me = 0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespace_format_as_xml(element->attributes[i]->nspace, &nspace_declarations[nspace_declarations_count].length); if(!nspace_declarations[nspace_declarations_count].declaration) goto error; nspace_declarations[nspace_declarations_count].nspace = element->attributes[i]->nspace; nspace_declarations_count++; } } } /* Add the attribute + value */ nspace_declarations[nspace_declarations_count].declaration= raptor_qname_format_as_xml(element->attributes[i], &nspace_declarations[nspace_declarations_count].length); if(!nspace_declarations[nspace_declarations_count].declaration) goto error; nspace_declarations[nspace_declarations_count].nspace = NULL; nspace_declarations_count++; } } if(nstack && element->declared_nspaces && raptor_sequence_size(element->declared_nspaces) > 0) { for(i = 0; i< (unsigned int)raptor_sequence_size(element->declared_nspaces); i++) { raptor_namespace* nspace = (raptor_namespace*)raptor_sequence_get_at(element->declared_nspaces, i); unsigned int j; int declare_me = 1; /* check it wasn't an earlier declaration too */ for(j = 0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == nspace) { declare_me = 0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespace_format_as_xml(nspace, &nspace_declarations[nspace_declarations_count].length); if(!nspace_declarations[nspace_declarations_count].declaration) goto error; nspace_declarations[nspace_declarations_count].nspace = nspace; nspace_declarations_count++; } } } if(nstack && element->xml_language) { size_t lang_len = strlen(RAPTOR_GOOD_CAST(char*, element->xml_language)); #define XML_LANG_PREFIX_LEN 10 size_t buf_length = XML_LANG_PREFIX_LEN + lang_len + 1; unsigned char* buffer = RAPTOR_MALLOC(unsigned char*, buf_length + 1); const char quote = '\"'; unsigned char* p; memcpy(buffer, "xml:lang=\"", XML_LANG_PREFIX_LEN); p = buffer + XML_LANG_PREFIX_LEN; p += raptor_xml_escape_string(xml_writer->world, element->xml_language, lang_len, p, buf_length, quote); *p++ = quote; *p = '\0'; nspace_declarations[nspace_declarations_count].declaration = buffer; nspace_declarations[nspace_declarations_count].length = buf_length; nspace_declarations[nspace_declarations_count].nspace = NULL; nspace_declarations_count++; } raptor_iostream_write_byte('<', iostr); if(element->name->nspace && element->name->nspace->prefix_length > 0) { raptor_iostream_counted_string_write((const char*)element->name->nspace->prefix, element->name->nspace->prefix_length, iostr); raptor_iostream_write_byte(':', iostr); } raptor_iostream_counted_string_write((const char*)element->name->local_name, element->name->local_name_length, iostr); /* declare namespaces and attributes */ if(nspace_declarations_count) { int need_indent = 0; /* sort them into the canonical order */ qsort((void*)nspace_declarations, nspace_declarations_count, sizeof(struct nsd), raptor_xml_writer_nsd_compare); /* declare namespaces first */ for(i = 0; i < nspace_declarations_count; i++) { if(!nspace_declarations[i].nspace) continue; if(auto_indent && need_indent) { /* indent attributes */ raptor_xml_writer_newline(xml_writer); xml_writer->depth++; raptor_xml_writer_indent(xml_writer); xml_writer->depth--; } raptor_iostream_write_byte(' ', iostr); raptor_iostream_counted_string_write((const char*)nspace_declarations[i].declaration, nspace_declarations[i].length, iostr); RAPTOR_FREE(char*, nspace_declarations[i].declaration); nspace_declarations[i].declaration = NULL; need_indent = 1; if(raptor_namespace_stack_start_namespace(nstack, (raptor_namespace*)nspace_declarations[i].nspace, depth)) goto error; } /* declare attributes */ for(i = 0; i < nspace_declarations_count; i++) { if(nspace_declarations[i].nspace) continue; if(auto_indent && need_indent) { /* indent attributes */ raptor_xml_writer_newline(xml_writer); xml_writer->depth++; raptor_xml_writer_indent(xml_writer); xml_writer->depth--; } raptor_iostream_write_byte(' ', iostr); raptor_iostream_counted_string_write((const char*)nspace_declarations[i].declaration, nspace_declarations[i].length, iostr); need_indent = 1; RAPTOR_FREE(char*, nspace_declarations[i].declaration); nspace_declarations[i].declaration = NULL; } } if(!auto_empty) raptor_iostream_write_byte('>', iostr); if(nstack) RAPTOR_FREE(stringarray, nspace_declarations); return 0; /* Clean up nspace_declarations on error */ error: for(i = 0; i < nspace_declarations_count; i++) { if(nspace_declarations[i].declaration) RAPTOR_FREE(char*, nspace_declarations[i].declaration); } RAPTOR_FREE(stringarray, nspace_declarations); return 1; } static int raptor_xml_writer_end_element_common(raptor_xml_writer* xml_writer, raptor_xml_element *element, int is_empty) { raptor_iostream* iostr = xml_writer->iostr; if(is_empty) raptor_iostream_write_byte('/', iostr); else { raptor_iostream_write_byte('<', iostr); raptor_iostream_write_byte('/', iostr); if(element->name->nspace && element->name->nspace->prefix_length > 0) { raptor_iostream_counted_string_write((const char*)element->name->nspace->prefix, element->name->nspace->prefix_length, iostr); raptor_iostream_write_byte(':', iostr); } raptor_iostream_counted_string_write((const char*)element->name->local_name, element->name->local_name_length, iostr); } raptor_iostream_write_byte('>', iostr); return 0; } /** * raptor_new_xml_writer: * @world: raptor_world object * @nstack: Namespace stack for the writer to start with (or NULL) * @iostr: I/O stream to write to * * Constructor - Create a new XML Writer writing XML to a raptor_iostream * * Return value: a new #raptor_xml_writer object or NULL on failure **/ raptor_xml_writer* raptor_new_xml_writer(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr) { raptor_xml_writer* xml_writer; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!iostr) return NULL; raptor_world_open(world); xml_writer = RAPTOR_CALLOC(raptor_xml_writer*, 1, sizeof(*xml_writer)); if(!xml_writer) return NULL; xml_writer->world = world; xml_writer->nstack_depth = 0; xml_writer->nstack = nstack; if(!xml_writer->nstack) { xml_writer->nstack = raptor_new_namespaces(world, 1); xml_writer->my_nstack = 1; } xml_writer->iostr = iostr; raptor_object_options_init(&xml_writer->options, RAPTOR_OPTION_AREA_XML_WRITER); return xml_writer; } /** * raptor_free_xml_writer: * @xml_writer: XML writer object * * Destructor - Free XML Writer * **/ void raptor_free_xml_writer(raptor_xml_writer* xml_writer) { if(!xml_writer) return; if(xml_writer->nstack && xml_writer->my_nstack) raptor_free_namespaces(xml_writer->nstack); raptor_object_options_clear(&xml_writer->options); RAPTOR_FREE(raptor_xml_writer, xml_writer); } static void raptor_xml_writer_write_xml_declaration(raptor_xml_writer* xml_writer) { if(!xml_writer->xml_declaration_checked) { /* check that it should be written once only */ xml_writer->xml_declaration_checked = 1; if(RAPTOR_OPTIONS_GET_NUMERIC(xml_writer, RAPTOR_OPTION_WRITER_XML_DECLARATION)) { raptor_iostream_string_write((const unsigned char*)"iostr); raptor_iostream_counted_string_write((XML_WRITER_XML_VERSION(xml_writer) == 10) ? (const unsigned char*)"1.0" : (const unsigned char*)"1.1", 3, xml_writer->iostr); raptor_iostream_string_write((const unsigned char*)"\" encoding=\"utf-8\"?>\n", xml_writer->iostr); } } } /** * raptor_xml_writer_empty_element: * @xml_writer: XML writer object * @element: XML element object * * Write an empty XML element to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. **/ void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_xml_element *element) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); if(xml_writer->pending_newline || XML_WRITER_AUTO_INDENT(xml_writer)) raptor_xml_writer_indent(xml_writer); raptor_xml_writer_start_element_common(xml_writer, element, 1); raptor_xml_writer_end_element_common(xml_writer, element, 1); raptor_namespaces_end_for_depth(xml_writer->nstack, xml_writer->depth); } /** * raptor_xml_writer_start_element: * @xml_writer: XML writer object * @element: XML element object * * Write a start XML element to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * * Indents the start element if XML writer option AUTO_INDENT is enabled. **/ void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_xml_element *element) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); if(xml_writer->pending_newline || XML_WRITER_AUTO_INDENT(xml_writer)) raptor_xml_writer_indent(xml_writer); raptor_xml_writer_start_element_common(xml_writer, element, XML_WRITER_AUTO_EMPTY(xml_writer)); xml_writer->depth++; /* SJS Note: This "if" clause is necessary because raptor_rdfxml.c * uses xml_writer for parseType="literal" and passes in elements * whose parent field is already set. The first time this function * is called, it sets element->parent to 0, causing the warn-07.rdf * test to fail. Subsequent calls to this function set * element->parent to its existing value. */ if(xml_writer->current_element) element->parent = xml_writer->current_element; xml_writer->current_element = element; if(element->parent) element->parent->content_element_seen = 1; } /** * raptor_xml_writer_end_element: * @xml_writer: XML writer object * @element: XML element object * * Write an end XML element to the XML writer. * * Indents the end element if XML writer option AUTO_INDENT is enabled. **/ void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer, raptor_xml_element* element) { int is_empty; xml_writer->depth--; if(xml_writer->pending_newline || (XML_WRITER_AUTO_INDENT(xml_writer) && element->content_element_seen)) raptor_xml_writer_indent(xml_writer); is_empty = XML_WRITER_AUTO_EMPTY(xml_writer) ? !(element->content_cdata_seen || element->content_element_seen) : 0; raptor_xml_writer_end_element_common(xml_writer, element, is_empty); raptor_namespaces_end_for_depth(xml_writer->nstack, xml_writer->depth); if(xml_writer->current_element) xml_writer->current_element = xml_writer->current_element->parent; } /** * raptor_xml_writer_newline: * @xml_writer: XML writer object * * Write a newline to the XML writer. * * Indents the next line if XML writer option AUTO_INDENT is enabled. **/ void raptor_xml_writer_newline(raptor_xml_writer* xml_writer) { xml_writer->pending_newline = 1; } /** * raptor_xml_writer_cdata: * @xml_writer: XML writer object * @s: string to XML escape and write * * Write CDATA XML-escaped to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const unsigned char *s) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_xml_escape_string_any_write(s, strlen((const char*)s), '\0', XML_WRITER_XML_VERSION(xml_writer), xml_writer->iostr); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen = 1; } /** * raptor_xml_writer_cdata_counted: * @xml_writer: XML writer object * @s: string to XML escape and write * @len: length of string * * Write counted CDATA XML-escaped to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_xml_escape_string_any_write(s, len, '\0', XML_WRITER_XML_VERSION(xml_writer), xml_writer->iostr); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen = 1; } /** * raptor_xml_writer_raw: * @xml_writer: XML writer object * @s: string to write * * Write a string raw to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const unsigned char *s) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_iostream_string_write(s, xml_writer->iostr); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen = 1; } /** * raptor_xml_writer_raw_counted: * @xml_writer: XML writer object * @s: string to write * @len: length of string * * Write a counted string raw to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len) { raptor_xml_writer_write_xml_declaration(xml_writer); XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_iostream_counted_string_write(s, len, xml_writer->iostr); if(xml_writer->current_element) xml_writer->current_element->content_cdata_seen = 1; } /** * raptor_xml_writer_comment: * @xml_writer: XML writer object * @s: comment string to write * * Write an XML comment to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const unsigned char *s) { XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"", 4); } /** * raptor_xml_writer_comment_counted: * @xml_writer: XML writer object * @s: comment string to write * @len: length of string * * Write a counted XML comment to the XML writer. * * Closes any previous empty element if XML writer option AUTO_EMPTY * is enabled. * **/ void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len) { XML_WRITER_FLUSH_CLOSE_BRACKET(xml_writer); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"", 4); } /** * raptor_xml_writer_flush: * @xml_writer: XML writer object * * Finish the XML writer. * **/ void raptor_xml_writer_flush(raptor_xml_writer* xml_writer) { if(xml_writer->pending_newline) { raptor_iostream_write_byte('\n', xml_writer->iostr); xml_writer->pending_newline = 0; } } /** * raptor_xml_writer_set_option: * @xml_writer: #raptor_xml_writer xml_writer object * @option: option to set from enumerated #raptor_option values * @string: string option value (or NULL) * @integer: integer option value * * Set xml_writer option. * * If @string is not NULL and the option type is numeric, the string * value is converted to an integer and used in preference to @integer. * * If @string is NULL and the option type is not numeric, an error is * returned. * * The @string values used are copied. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: non 0 on failure or if the option is unknown **/ int raptor_xml_writer_set_option(raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer) { return raptor_object_options_set_option(&xml_writer->options, option, string, integer); } /** * raptor_xml_writer_get_option: * @xml_writer: #raptor_xml_writer xml_writer object * @option: option to get value * @string_p: pointer to where to store string value * @integer_p: pointer to where to store integer value * * Get xml_writer option. * * Any string value returned in *@string_p is shared and must * be copied by the caller. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: option value or < 0 for an illegal option **/ int raptor_xml_writer_get_option(raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p) { return raptor_object_options_get_option(&xml_writer->options, option, string_p, integer_p); } /** * raptor_xml_writer_get_depth: * @xml_writer: #raptor_xml_writer xml writer object * * Get the current XML Writer element depth * * Return value: element stack depth */ int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer) { return xml_writer->depth; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); const unsigned char *base_uri_string = (const unsigned char*)"http://example.org/base#"; #define OUT_BYTES_COUNT 135 int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); raptor_iostream *iostr; raptor_namespace_stack *nstack; raptor_namespace* foo_ns; raptor_xml_writer* xml_writer; raptor_uri* base_uri; raptor_qname* el_name; raptor_xml_element *element; unsigned long offset; raptor_qname **attrs; raptor_uri* base_uri_copy = NULL; /* for raptor_new_iostream_to_string */ void *string = NULL; size_t string_len = 0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); iostr = raptor_new_iostream_to_string(world, &string, &string_len, NULL); if(!iostr) { fprintf(stderr, "%s: Failed to create iostream to string\n", program); exit(1); } nstack = raptor_new_namespaces(world, 1); xml_writer = raptor_new_xml_writer(world, nstack, iostr); if(!xml_writer) { fprintf(stderr, "%s: Failed to create xml_writer to iostream\n", program); exit(1); } base_uri = raptor_new_uri(world, base_uri_string); foo_ns = raptor_new_namespace(nstack, (const unsigned char*)"foo", (const unsigned char*)"http://example.org/foo-ns#", 0); el_name = raptor_new_qname_from_namespace_local_name(world, foo_ns, (const unsigned char*)"bar", NULL); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; element = raptor_new_xml_element(el_name, NULL, /* language */ base_uri_copy); raptor_xml_writer_start_element(xml_writer, element); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)"hello\n", 6); raptor_xml_writer_comment_counted(xml_writer, (const unsigned char*)"comment", 7); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)"\n"); raptor_xml_writer_end_element(xml_writer, element); raptor_free_xml_element(element); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)"\n"); el_name = raptor_new_qname(nstack, (const unsigned char*)"blah", NULL /* no attribute value - element */); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; element = raptor_new_xml_element(el_name, NULL, /* language */ base_uri_copy); attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); attrs[0] = raptor_new_qname(nstack, (const unsigned char*)"a", (const unsigned char*)"b" /* attribute value */); raptor_xml_element_set_attributes(element, attrs, 1); raptor_xml_writer_empty_element(xml_writer, element); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)"\n"); raptor_free_xml_writer(xml_writer); raptor_free_xml_element(element); raptor_free_namespace(foo_ns); raptor_free_namespaces(nstack); raptor_free_uri(base_uri); offset = raptor_iostream_tell(iostr); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing iostream\n", program); #endif raptor_free_iostream(iostr); if(offset != OUT_BYTES_COUNT) { fprintf(stderr, "%s: I/O stream wrote %d bytes, expected %d\n", program, (int)offset, (int)OUT_BYTES_COUNT); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); return 1; } if(!string) { fprintf(stderr, "%s: I/O stream failed to create a string\n", program); return 1; } string_len = strlen((const char*)string); if(string_len != offset) { fprintf(stderr, "%s: I/O stream created a string length %d, expected %d\n", program, (int)string_len, (int)offset); return 1; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Made XML string of %d bytes\n", program, (int)string_len); fputs("[[", stderr); (void)fwrite(string, 1, string_len, stderr); fputs("]]\n", stderr); #endif raptor_free_memory(string); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif raptor2-2.0.15/src/raptor_log.c0000644000175000017500000000757412325013605013226 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_log.c - Raptor log handling * * Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" static const char* const raptor_log_level_labels[RAPTOR_LOG_LEVEL_LAST + 1] = { "none", "trace", "debug", "info", "warning", "error", "fatal error" }; /** * raptor_log_level_get_label: * @level: log message level * * Get label for a log message level * * Return value: label string or NULL if level is not valid */ const char* raptor_log_level_get_label(raptor_log_level level) { return (level <= RAPTOR_LOG_LEVEL_LAST) ? raptor_log_level_labels[level] : NULL; } void raptor_log_error_varargs(raptor_world* world, raptor_log_level level, raptor_locator* locator, const char* message, va_list arguments) { char *buffer = NULL; size_t length; if(level == RAPTOR_LOG_LEVEL_NONE) return; if(world && world->internal_ignore_errors) return; length = raptor_vasprintf(&buffer, message, arguments); if(!buffer) { if(locator) { raptor_locator_print(locator, stderr); fputc(' ', stderr); } fputs("raptor ", stderr); fputs(raptor_log_level_labels[level], stderr); fputs(" - ", stderr); vfprintf(stderr, message, arguments); fputc('\n', stderr); return; } if(length >= 1 && buffer[length-1] == '\n') buffer[length-1]='\0'; raptor_log_error(world, level, locator, buffer); RAPTOR_FREE(char*, buffer); } void raptor_log_error_formatted(raptor_world* world, raptor_log_level level, raptor_locator* locator, const char* message, ...) { va_list arguments; va_start(arguments, message); raptor_log_error_varargs(world, level, locator, message, arguments); va_end(arguments); } /* internal */ void raptor_log_error(raptor_world* world, raptor_log_level level, raptor_locator* locator, const char* text) { raptor_log_handler handler; if(level == RAPTOR_LOG_LEVEL_NONE) return; if(world) { if(world->internal_ignore_errors) return; memset(&world->message, '\0', sizeof(world->message)); world->message.code = -1; world->message.domain = RAPTOR_DOMAIN_NONE; world->message.level = level; world->message.locator = locator; world->message.text = text; handler = world->message_handler; if(handler) { /* This is the place in raptor that ALL of the user error handler * functions are called. */ handler(world->message_handler_user_data, &world->message); return; } } /* default - print it to stderr */ if(locator) { raptor_locator_print(locator, stderr); fputc(' ', stderr); } fputs("raptor ", stderr); fputs(raptor_log_level_labels[level], stderr); fputs(" - ", stderr); fputs(text, stderr); fputc('\n', stderr); } raptor2-2.0.15/src/raptor_permute_test.c0000644000175000017500000001603312020170223015143 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_permute.c - Test of permutations of ints in a sequence * * Copyright (C) 2011, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #define PERMUTE_DEBUG 0 typedef struct { raptor_sequence* seq; int* contents; } intseq; static int print_handler(void *object, FILE *fh) { int* pi = (int*)object; fprintf(fh, "%d", *pi); return 0; } static intseq* new_intseq(int size) { intseq* iseq; int i; iseq = RAPTOR_CALLOC(intseq*, 1, sizeof(*iseq)); iseq->contents = RAPTOR_CALLOC(int*, size, sizeof(int)); /* will be a sequence of int* pointing into iseq->contents */ iseq->seq = raptor_new_sequence(NULL, print_handler); for(i = 0; i < (int)size; i++) { iseq->contents[i] = i + 1; raptor_sequence_set_at(iseq->seq, i, &iseq->contents[i]); } return iseq; } static void free_intseq(intseq* iseq) { if(iseq->contents) RAPTOR_FREE(int*, iseq->contents); if(iseq->seq) raptor_free_sequence(iseq->seq); RAPTOR_FREE(intseq*, iseq); } static void intseq_print(intseq *iseq, FILE* stream) { raptor_sequence_print(iseq->seq, stream); } static int intseq_reverse(intseq *iseq, int start_index, int length) { return raptor_sequence_reverse(iseq->seq, start_index, length); } static int intseq_compare_at(const void* a, const void* b) { int* ia = (int*)a; int* ib = (int*)b; return *ia - *ib; } static int intseq_next_permutation(intseq *iseq) { return raptor_sequence_next_permutation(iseq->seq, intseq_compare_at); } static int intseq_get_at(intseq *iseq, int idx) { return *(int*)(raptor_sequence_get_at(iseq->seq, idx)); } #define MAX_SIZE 5 int expected_results_size5[120][5] = { {1, 2, 3, 4, 5}, {1, 2, 3, 5, 4}, {1, 2, 4, 3, 5}, {1, 2, 4, 5, 3}, {1, 2, 5, 3, 4}, {1, 2, 5, 4, 3}, {1, 3, 2, 4, 5}, {1, 3, 2, 5, 4}, {1, 3, 4, 2, 5}, {1, 3, 4, 5, 2}, {1, 3, 5, 2, 4}, {1, 3, 5, 4, 2}, {1, 4, 2, 3, 5}, {1, 4, 2, 5, 3}, {1, 4, 3, 2, 5}, {1, 4, 3, 5, 2}, {1, 4, 5, 2, 3}, {1, 4, 5, 3, 2}, {1, 5, 2, 3, 4}, {1, 5, 2, 4, 3}, {1, 5, 3, 2, 4}, {1, 5, 3, 4, 2}, {1, 5, 4, 2, 3}, {1, 5, 4, 3, 2}, {2, 1, 3, 4, 5}, {2, 1, 3, 5, 4}, {2, 1, 4, 3, 5}, {2, 1, 4, 5, 3}, {2, 1, 5, 3, 4}, {2, 1, 5, 4, 3}, {2, 3, 1, 4, 5}, {2, 3, 1, 5, 4}, {2, 3, 4, 1, 5}, {2, 3, 4, 5, 1}, {2, 3, 5, 1, 4}, {2, 3, 5, 4, 1}, {2, 4, 1, 3, 5}, {2, 4, 1, 5, 3}, {2, 4, 3, 1, 5}, {2, 4, 3, 5, 1}, {2, 4, 5, 1, 3}, {2, 4, 5, 3, 1}, {2, 5, 1, 3, 4}, {2, 5, 1, 4, 3}, {2, 5, 3, 1, 4}, {2, 5, 3, 4, 1}, {2, 5, 4, 1, 3}, {2, 5, 4, 3, 1}, {3, 1, 2, 4, 5}, {3, 1, 2, 5, 4}, {3, 1, 4, 2, 5}, {3, 1, 4, 5, 2}, {3, 1, 5, 2, 4}, {3, 1, 5, 4, 2}, {3, 2, 1, 4, 5}, {3, 2, 1, 5, 4}, {3, 2, 4, 1, 5}, {3, 2, 4, 5, 1}, {3, 2, 5, 1, 4}, {3, 2, 5, 4, 1}, {3, 4, 1, 2, 5}, {3, 4, 1, 5, 2}, {3, 4, 2, 1, 5}, {3, 4, 2, 5, 1}, {3, 4, 5, 1, 2}, {3, 4, 5, 2, 1}, {3, 5, 1, 2, 4}, {3, 5, 1, 4, 2}, {3, 5, 2, 1, 4}, {3, 5, 2, 4, 1}, {3, 5, 4, 1, 2}, {3, 5, 4, 2, 1}, {4, 1, 2, 3, 5}, {4, 1, 2, 5, 3}, {4, 1, 3, 2, 5}, {4, 1, 3, 5, 2}, {4, 1, 5, 2, 3}, {4, 1, 5, 3, 2}, {4, 2, 1, 3, 5}, {4, 2, 1, 5, 3}, {4, 2, 3, 1, 5}, {4, 2, 3, 5, 1}, {4, 2, 5, 1, 3}, {4, 2, 5, 3, 1}, {4, 3, 1, 2, 5}, {4, 3, 1, 5, 2}, {4, 3, 2, 1, 5}, {4, 3, 2, 5, 1}, {4, 3, 5, 1, 2}, {4, 3, 5, 2, 1}, {4, 5, 1, 2, 3}, {4, 5, 1, 3, 2}, {4, 5, 2, 1, 3}, {4, 5, 2, 3, 1}, {4, 5, 3, 1, 2}, {4, 5, 3, 2, 1}, {5, 1, 2, 3, 4}, {5, 1, 2, 4, 3}, {5, 1, 3, 2, 4}, {5, 1, 3, 4, 2}, {5, 1, 4, 2, 3}, {5, 1, 4, 3, 2}, {5, 2, 1, 3, 4}, {5, 2, 1, 4, 3}, {5, 2, 3, 1, 4}, {5, 2, 3, 4, 1}, {5, 2, 4, 1, 3}, {5, 2, 4, 3, 1}, {5, 3, 1, 2, 4}, {5, 3, 1, 4, 2}, {5, 3, 2, 1, 4}, {5, 3, 2, 4, 1}, {5, 3, 4, 1, 2}, {5, 3, 4, 2, 1}, {5, 4, 1, 2, 3}, {5, 4, 1, 3, 2}, {5, 4, 2, 1, 3}, {5, 4, 2, 3, 1}, {5, 4, 3, 1, 2}, {5, 4, 3, 2, 1} }; int main (int argc, char *argv[]) { const char *program = raptor_basename(argv[0]); int failures = 0; raptor_world *world; int size; int expected_counts[MAX_SIZE + 1] = { 1, 1, 2, 6, 24, 120 }; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); for(size = 0; size <= MAX_SIZE; size++) { intseq* iseq; int count; iseq = new_intseq(size); #if PERMUTE_DEBUG > 0 fprintf(stderr, "%s: Permutation test %d. Initial state: ", program, size); intseq_print(iseq, stderr); fputc('\n', stderr); #endif for(count = 1; 1; count++) { #if PERMUTE_DEBUG > 1 fprintf(stderr, "Permutation %3d: ", count); intseq_print(iseq, stderr); fputc('\n', stderr); #endif if(size == 5) { int* expected_result = expected_results_size5[count - 1]; int j; int ok = 1; for(j = 0; j < size; j++) { int actual = intseq_get_at(iseq, j); int expected = expected_result[j]; if(actual != expected) { ok = 0; break; } } if(!ok) { fprintf(stderr, "%s: FAILED test %d result %d - returned ", program, size, count); intseq_print(iseq, stderr); fputs(" expected [", stderr); for(j = 0; j < size; j++) { fprintf(stderr, "%d, ", expected_result[j]); } fputs("]\n", stderr); failures++; } } if(intseq_next_permutation(iseq)) break; } #if PERMUTE_DEBUG > 0 fprintf(stderr, "%s: Returned %d results. Final state: ", program, count); intseq_print(iseq, stderr); fputc('\n', stderr); #endif free_intseq(iseq); if(count != expected_counts[size]) { fprintf(stderr, "%s: FAILED test %d - returned %d items expected %d\n", program, size, count, expected_counts[size]); failures++; break; } } /* This is mainly a test for crashes */ for(size = 0; size <= MAX_SIZE; size++) { intseq* iseq; int st; iseq = new_intseq(size); for(st = 0; st < size + 1; st++) { intseq_reverse(iseq, 0, st) ; intseq_reverse(iseq, st, st) ; intseq_reverse(iseq, st, 0) ; } free_intseq(iseq); } raptor_free_world(world); return failures; } raptor2-2.0.15/src/raptor_www_libxml.c0000644000175000017500000000715612020170223014624 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_libxml.c - Raptor WWW retrieval via libxml2 * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifdef RAPTOR_WWW_LIBXML void raptor_www_libxml_init(raptor_www *www) { xmlNanoHTTPInit(); www->ctxt = NULL; } void raptor_www_libxml_free(raptor_www *www) { xmlNanoHTTPCleanup(); } int raptor_www_libxml_fetch(raptor_www *www) { char* headers = NULL; if(www->proxy) xmlNanoHTTPScanProxy(www->proxy); if(www->http_accept || www->user_agent) { size_t accept_len = 0; size_t ua_len = 0; size_t cc_len = 0; size_t len = 0; char *p; if(www->http_accept) { accept_len = strlen(www->http_accept); len += accept_len+2; /* \r\n */ } if(www->user_agent) { ua_len = strlen(www->user_agent); len += 12+ua_len+2; /* strlen("User-Agent: ") + \r\n */ } if(www->cache_control) { cc_len = strlen(www->cache_control); len += cc_len+2; /* \r\n */ } headers = RAPTOR_MALLOC(char*, len + 1); if(!headers) return 1; p = headers; if(www->http_accept) { memcpy(p, www->http_accept, accept_len); p+= accept_len; *p++='\r'; *p++='\n'; } if(www->user_agent) { memcpy(p, "User-Agent: ", 12); p += 12; memcpy(p, www->user_agent, ua_len); p+= ua_len; *p++='\r'; *p++='\n'; } if(www->cache_control) { memcpy(p, www->cache_control, cc_len); p+= cc_len; *p++='\r'; *p++='\n'; } *p='\0'; } www->ctxt = xmlNanoHTTPMethod((const char*)raptor_uri_as_string(www->uri), NULL, /* HTTP method (default GET) */ NULL, /* input string */ &www->type, headers, 0); /* input length - ilen */ if(headers) RAPTOR_FREE(char*, headers); if(!www->ctxt) return 1; if(www->type) { if(www->content_type) { www->content_type(www, www->content_type_userdata, www->type); if(www->failed) { xmlNanoHTTPClose(www->ctxt); return 1; } } xmlFree(www->type); www->type = NULL; } www->status_code = xmlNanoHTTPReturnCode(www->ctxt); while(1) { int len = xmlNanoHTTPRead(www->ctxt, www->buffer, RAPTOR_WWW_BUFFER_SIZE); if(len < 0) break; www->total_bytes += len; if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, www->buffer, len, 1); if(len < RAPTOR_WWW_BUFFER_SIZE || www->failed) break; } xmlNanoHTTPClose(www->ctxt); return www->failed; } #endif /* #ifdef RAPTOR_WWW_LIBXML*/ raptor2-2.0.15/src/parsedate.y0000644000175000017500000007523412415611634013060 00000000000000%{ /* * Imported from the public domain source in PHP 4.4 * Fri May 20 07:14:01 2005 * https://github.com/php/php-src/blob/379c4af44aa6456fbdbc69dba3ead166ba7ff67d/ext/standard/parsedate.y * * and patched from there * * Later versions removed this from PHP and replaced it with entirely * new code written under the PHP license. That code is not used here * and cannot be used. * */ /* ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by ** a couple of people on Usenet. Completely overhauled by Rich $alz ** and Jim Berets in August, 1990. ** ** This code is in the public domain and has no copyright. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_SYS_TIME_H # include #endif #ifdef HAVE_STDLIB_H #include #endif #if defined(_HPUX_SOURCE) #include #endif #include "raptor2.h" #include "raptor_internal.h" #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) /* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) #ifdef HAVE_STRING_H # include #endif #if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) #endif #ifndef ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* Some old versions of bison generate parsers that use bcopy. That loses on systems that don't provide the function, so we have to redefine it here. */ #if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy) # define bcopy(from, to, len) memcpy ((to), (from), (len)) #endif /* Prototypes */ static int raptor_parsedate_error(void* parm, const char *msg); #define EPOCH 1970 #define HOUR(x) ((x) * 60) #define MAX_BUFF_LEN 128 /* size of buffer to read the date into */ /* ** An entry in the lexical lookup table. */ typedef struct _TABLE { const char *name; int type; int value; } TABLE; /* ** Meridian: am, pm, or 24-hour style. */ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; struct date_yy { const char *yyInput; int yyDayOrdinal; int yyDayNumber; int yyHaveDate; int yyHaveDay; int yyHaveRel; int yyHaveTime; int yyHaveZone; int yyTimezone; int yyDay; int yyHour; int yyMinutes; int yyMonth; int yySeconds; int yyYear; MERIDIAN yyMeridian; int yyRelDay; int yyRelHour; int yyRelMinutes; int yyRelMonth; int yyRelSeconds; int yyRelYear; }; typedef union _date_ll { int Number; enum _MERIDIAN Meridian; } date_ll; #define YYPARSE_PARAM parm #define YYLEX_PARAM parm #define YYSTYPE date_ll #define YYLTYPE void static int yylex (YYSTYPE *lvalp, void *parm); static int ToHour (int Hours, MERIDIAN Meridian); static int ToYear (int Year); static int LookupWord (YYSTYPE *lvalp, char *buff); %} /* directives */ %require "3.0.0" /* File prefix (bison -b) */ %file-prefix "parsedate" /* Symbol prefix (bison -d : deprecated) */ %name-prefix "raptor_parsedate_" /* Write parser header file with macros (bison -d) */ %defines /* Write output file with verbose descriptions of parser states */ %verbose %define api.pure true /* This grammar has 56 shift/reduce conflicts. */ %expect 56 %param { struct date_yy *parm } %token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID tTZONE tWZONE tZZONE %token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT %token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE %type tDAY tDAY_UNIT tDAYZONE tHOUR_UNIT tMINUTE_UNIT %type tMONTH tMONTH_UNIT %type tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE tTZONE tWZONE tZZONE %type tMERIDIAN %% spec : /* NULL */ | spec item ; item : time { ((struct date_yy *)parm)->yyHaveTime++; } | zone { ((struct date_yy *)parm)->yyHaveZone++; } | date { ((struct date_yy *)parm)->yyHaveDate++; } | day { ((struct date_yy *)parm)->yyHaveDay++; } | rel { ((struct date_yy *)parm)->yyHaveRel++; } | number | o_merid ; time : tUNUMBER tMERIDIAN { ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = $2; } | iso8601time_colon /* | pgsqltime ... shares a common spec with ISO8601 */ ; iso8601time_colon: HMStime_with_colon sec_fraction_part rel { ((struct date_yy *)parm)->yyMeridian = MER24; } | HMtime_with_colon sec_fraction_part rel { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } | HMStime_with_colon sec_fraction_part iso8601zonepart { ((struct date_yy *)parm)->yyMeridian = MER24; } | HMtime_with_colon sec_fraction_part iso8601zonepart { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } ; iso8601zonepart: zonepart_numeric_without_colon { ((struct date_yy *)parm)->yyHaveZone++; } | zonepart_numeric_with_colon { ((struct date_yy *)parm)->yyHaveZone++; } | zone { ((struct date_yy *)parm)->yyHaveZone++; } | /* empty */ ; sec_fraction_part: '.' tUNUMBER { } | /* empty */ ; zonepart_numeric_without_colon: tSNUMBER { /* format: [+-]hhmm */ if($1 <= -100 || $1 >= 100) { ((struct date_yy *)parm)->yyTimezone = (-$1 / 100) * 60 + (-$1 % 100); } else if($1 >= -99 && $1 <= 99) { ((struct date_yy *)parm)->yyTimezone = -$1 * 60; } } ; zonepart_numeric_with_colon: tSNUMBER ':' tUNUMBER { /* format: [+-]hh:mm */ ((struct date_yy *)parm)->yyTimezone = -$1 * 60 + ($1 > 0 ? -$3: $3); } ; HMStime_with_colon: HMtime_with_colon ':' tUNUMBER { /* format: hh:mm:ss */ ((struct date_yy *)parm)->yySeconds = $3; } ; HMtime_with_colon: tUNUMBER ':' tUNUMBER { /* format: hh:mm */ ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = $3; } ; /* we have to deal with a special case for the datetime format of XML Schema here: '2003-11-18T22:40:00Z' the combination of a 'T' timezone specifier later followed by a 'Z' is now recognized and allowed TODO: change the grammer so that the exact positions are checked right now '2003-11-18 22:40:00 TZ' is also accepted (hartmut) */ zone : tTZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tWZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tZZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tZONE { ((struct date_yy *)parm)->yyTimezone = $1; } | tDAYZONE { ((struct date_yy *)parm)->yyTimezone = $1 - 60; } | tZONE tDST { ((struct date_yy *)parm)->yyTimezone = $1 - 60; } ; day : tDAY { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = $1; } | tDAY ',' { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = $1; } | tUNUMBER tDAY { ((struct date_yy *)parm)->yyDayOrdinal = $1; ((struct date_yy *)parm)->yyDayNumber = $2; } ; date : tUNUMBER '/' tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $3; } | tMONTH tUNUMBER tUNUMBER ':' tUNUMBER ':' tUNUMBER tUNUMBER { ((struct date_yy *)parm)->yyYear = $8; ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $2; ((struct date_yy *)parm)->yyHour = $3; ((struct date_yy *)parm)->yyMinutes = $5; ((struct date_yy *)parm)->yySeconds = $7; ((struct date_yy *)parm)->yyHaveTime = 1; } | tUNUMBER '/' tUNUMBER '/' tUNUMBER { /* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY. The goal in recognizing YYYY/MM/DD is solely to support legacy machine-generated dates like those in an RCS log listing. If you want portability, use the ISO 8601 format. */ if($1 >= 1000) { ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = $3; ((struct date_yy *)parm)->yyDay = $5; } else { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $3; ((struct date_yy *)parm)->yyYear = $5; } } | iso8601date | iso8601datetime { ((struct date_yy *)parm)->yyHaveTime++; } | tUNUMBER tMONTH tSNUMBER { /* e.g. 17-JUN-1992. */ ((struct date_yy *)parm)->yyDay = $1; ((struct date_yy *)parm)->yyMonth = $2; ((struct date_yy *)parm)->yyYear = -$3; } | tMONTH tUNUMBER tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $2; ((struct date_yy *)parm)->yyYear = $3; } | tMONTH tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; if($2 > 1000) { ((struct date_yy *)parm)->yyYear = $2; } else { ((struct date_yy *)parm)->yyDay = $2; } } | tMONTH tUNUMBER ',' tUNUMBER { ((struct date_yy *)parm)->yyMonth = $1; ((struct date_yy *)parm)->yyDay = $2; ((struct date_yy *)parm)->yyYear = $4; } | tUNUMBER tMONTH { ((struct date_yy *)parm)->yyMonth = $2; if($1 > 1000) { ((struct date_yy *)parm)->yyYear = $1; } else { ((struct date_yy *)parm)->yyDay = $1; } } | tUNUMBER tMONTH tUNUMBER { ((struct date_yy *)parm)->yyMonth = $2; ((struct date_yy *)parm)->yyDay = $1; ((struct date_yy *)parm)->yyYear = $3; } ; iso8601datetime: iso8601date tTZONE iso8601time | tUNUMBER tTZONE iso8601time { int i = $1; if(i >= 10000) { /* format: yyyymmdd */ ((struct date_yy *)parm)->yyYear = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMonth = i / 100; i %= 100; ((struct date_yy *)parm)->yyDay = i; } else if(i >= 1000 && i <= 9999) { /* format: yyyy */ ((struct date_yy *)parm)->yyYear = i; ((struct date_yy *)parm)->yyDay= 1; ((struct date_yy *)parm)->yyMonth = 1; } } ; iso8601date: tUNUMBER tSNUMBER tSNUMBER { /* ISO 8601 format. yyyy-mm-dd. */ ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = -$2; ((struct date_yy *)parm)->yyDay = -$3; } | tUNUMBER tSNUMBER { /* ISO 8601 format yyyy-mm */ ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = -$2; ((struct date_yy *)parm)->yyDay = 1; } | tUNUMBER iso8601weekspec { const int om = (1 + 9) % 12; /* offset month */ const int oy = $1 - 1; /* offset year */ ((struct date_yy *)parm)->yyYear = $1; ((struct date_yy *)parm)->yyMonth = 1; /* Zeller's formula */ ((struct date_yy *)parm)->yyDay -= ((13 * om + 12) / 5 + oy + oy / 4 + oy / 400 - oy / 100) % 7 - 1; } ; iso8601weekspec: tWZONE tUNUMBER { ((struct date_yy *)parm)->yyDay = ($2 / 10) * 7 + ($2 % 10) - 8; } | tWZONE tUNUMBER tSNUMBER { ((struct date_yy *)parm)->yyDay = $2 * 7 - $3 - 8; } ; iso8601time: iso8601time_colon | tUNUMBER sec_fraction_part iso8601zonepart { int i = $1; if(i <= -100000 || i >= 100000) { ((struct date_yy *)parm)->yyHour = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMinutes = i / 100; i %= 100; ((struct date_yy *)parm)->yySeconds = i; } else if(i <= -1000 || i >= 1000) { ((struct date_yy *)parm)->yyHour = i / 100; i %= 100; ((struct date_yy *)parm)->yyMinutes = i; ((struct date_yy *)parm)->yySeconds = 0; } else if(i >= -99 && i <= 99) { ((struct date_yy *)parm)->yyHour = i; ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; } else { ((struct date_yy *)parm)->yyHaveTime = 0; } ((struct date_yy *)parm)->yyMeridian = MER24; } ; rel : relunit tAGO { ((struct date_yy *)parm)->yyRelSeconds = -((struct date_yy *)parm)->yyRelSeconds; ((struct date_yy *)parm)->yyRelMinutes = -((struct date_yy *)parm)->yyRelMinutes; ((struct date_yy *)parm)->yyRelHour = -((struct date_yy *)parm)->yyRelHour; ((struct date_yy *)parm)->yyRelDay = -((struct date_yy *)parm)->yyRelDay; ((struct date_yy *)parm)->yyRelMonth = -((struct date_yy *)parm)->yyRelMonth; ((struct date_yy *)parm)->yyRelYear = -((struct date_yy *)parm)->yyRelYear; } | relunit ; relunit : tUNUMBER tYEAR_UNIT { ((struct date_yy *)parm)->yyRelYear += $1 * $2; } | tSNUMBER tYEAR_UNIT { ((struct date_yy *)parm)->yyRelYear += $1 * $2; } | tYEAR_UNIT { ((struct date_yy *)parm)->yyRelYear += $1; } | tUNUMBER tMONTH_UNIT { ((struct date_yy *)parm)->yyRelMonth += $1 * $2; } | tSNUMBER tMONTH_UNIT { ((struct date_yy *)parm)->yyRelMonth += $1 * $2; } | tMONTH_UNIT { ((struct date_yy *)parm)->yyRelMonth += $1; } | tUNUMBER tDAY_UNIT { ((struct date_yy *)parm)->yyRelDay += $1 * $2; } | tSNUMBER tDAY_UNIT { ((struct date_yy *)parm)->yyRelDay += $1 * $2; } | tDAY_UNIT { ((struct date_yy *)parm)->yyRelDay += $1; } | tUNUMBER tHOUR_UNIT { ((struct date_yy *)parm)->yyRelHour += $1 * $2; } | tSNUMBER tHOUR_UNIT { ((struct date_yy *)parm)->yyRelHour += $1 * $2; } | tHOUR_UNIT { ((struct date_yy *)parm)->yyRelHour += $1; } | tUNUMBER tMINUTE_UNIT { ((struct date_yy *)parm)->yyRelMinutes += $1 * $2; } | tSNUMBER tMINUTE_UNIT { ((struct date_yy *)parm)->yyRelMinutes += $1 * $2; } | tMINUTE_UNIT { ((struct date_yy *)parm)->yyRelMinutes += $1; } | tUNUMBER tSEC_UNIT { ((struct date_yy *)parm)->yyRelSeconds += $1 * $2; } | tSNUMBER tSEC_UNIT { ((struct date_yy *)parm)->yyRelSeconds += $1 * $2; } | tSEC_UNIT { ((struct date_yy *)parm)->yyRelSeconds += $1; } ; number : tUNUMBER { if(((struct date_yy *)parm)->yyHaveTime && ((struct date_yy *)parm)->yyHaveDate && !((struct date_yy *)parm)->yyHaveRel) ((struct date_yy *)parm)->yyYear = $1; else { if($1 > 10000) { ((struct date_yy *)parm)->yyHaveDate++; ((struct date_yy *)parm)->yyDay= ($1)%100; ((struct date_yy *)parm)->yyMonth= ($1/100)%100; ((struct date_yy *)parm)->yyYear = $1/10000; } else { ((struct date_yy *)parm)->yyHaveTime++; if($1 < 100) { ((struct date_yy *)parm)->yyHour = $1; ((struct date_yy *)parm)->yyMinutes = 0; } else { ((struct date_yy *)parm)->yyHour = $1 / 100; ((struct date_yy *)parm)->yyMinutes = $1 % 100; } ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = MER24; } } } ; o_merid : tMERIDIAN { ((struct date_yy *)parm)->yyMeridian = $1; } ; %% time_t get_date (char *p, time_t *now); /* Month and day table. */ static TABLE const MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, { "april", tMONTH, 4 }, { "may", tMONTH, 5 }, { "june", tMONTH, 6 }, { "july", tMONTH, 7 }, { "august", tMONTH, 8 }, { "september", tMONTH, 9 }, { "sept", tMONTH, 9 }, { "october", tMONTH, 10 }, { "november", tMONTH, 11 }, { "december", tMONTH, 12 }, { "sunday", tDAY, 0 }, { "monday", tDAY, 1 }, { "tuesday", tDAY, 2 }, { "tues", tDAY, 2 }, { "wednesday", tDAY, 3 }, { "wednes", tDAY, 3 }, { "thursday", tDAY, 4 }, { "thur", tDAY, 4 }, { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, { NULL, 0, 0 } }; /* Time units table. */ static TABLE const UnitsTable[] = { { "year", tYEAR_UNIT, 1 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, { "week", tDAY_UNIT, 7 }, { "day", tDAY_UNIT, 1 }, { "hour", tHOUR_UNIT, 1 }, { "minute", tMINUTE_UNIT, 1 }, { "min", tMINUTE_UNIT, 1 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, { NULL, 0, 0 } }; /* Assorted relative-time words. */ static TABLE const OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, { "now", tDAY_UNIT, 0 }, { "last", tUNUMBER, -1 }, { "this", tUNUMBER, 0 }, { "next", tUNUMBER, 1 }, { "first", tUNUMBER, 1 }, /* { "second", tUNUMBER, 2 }, */ { "third", tUNUMBER, 3 }, { "fourth", tUNUMBER, 4 }, { "fifth", tUNUMBER, 5 }, { "sixth", tUNUMBER, 6 }, { "seventh", tUNUMBER, 7 }, { "eighth", tUNUMBER, 8 }, { "ninth", tUNUMBER, 9 }, { "tenth", tUNUMBER, 10 }, { "eleventh", tUNUMBER, 11 }, { "twelfth", tUNUMBER, 12 }, { "ago", tAGO, 1 }, { NULL, 0, 0 } }; /* The timezone table. */ static TABLE const TimezoneTable[] = { { "gmt", tZONE, HOUR ( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR ( 0) }, { "wet", tZONE, HOUR ( 0) }, /* Western European */ { "bst", tDAYZONE, HOUR ( 0) }, /* British Summer */ { "wat", tZONE, HOUR ( 1) }, /* West Africa */ { "at", tZONE, HOUR ( 2) }, /* Azores */ #if 0 /* For completeness. BST is also British Summer, and GST is * also Guam Standard. */ { "bst", tZONE, HOUR ( 3) }, /* Brazil Standard */ { "gst", tZONE, HOUR ( 3) }, /* Greenland Standard */ #endif #if 0 { "nft", tZONE, HOUR (3.5) }, /* Newfoundland */ { "nst", tZONE, HOUR (3.5) }, /* Newfoundland Standard */ { "ndt", tDAYZONE, HOUR (3.5) }, /* Newfoundland Daylight */ #endif { "ast", tZONE, HOUR ( 4) }, /* Atlantic Standard */ { "adt", tDAYZONE, HOUR ( 4) }, /* Atlantic Daylight */ { "est", tZONE, HOUR ( 5) }, /* Eastern Standard */ { "edt", tDAYZONE, HOUR ( 5) }, /* Eastern Daylight */ { "cst", tZONE, HOUR ( 6) }, /* Central Standard */ { "cdt", tDAYZONE, HOUR ( 6) }, /* Central Daylight */ { "mst", tZONE, HOUR ( 7) }, /* Mountain Standard */ { "mdt", tDAYZONE, HOUR ( 7) }, /* Mountain Daylight */ { "pst", tZONE, HOUR ( 8) }, /* Pacific Standard */ { "pdt", tDAYZONE, HOUR ( 8) }, /* Pacific Daylight */ { "yst", tZONE, HOUR ( 9) }, /* Yukon Standard */ { "ydt", tDAYZONE, HOUR ( 9) }, /* Yukon Daylight */ { "hst", tZONE, HOUR (10) }, /* Hawaii Standard */ { "hdt", tDAYZONE, HOUR (10) }, /* Hawaii Daylight */ { "cat", tZONE, HOUR (10) }, /* Central Alaska */ { "akst", tZONE, HOUR (10) }, /* Alaska Standard */ { "akdt", tZONE, HOUR (10) }, /* Alaska Daylight */ { "ahst", tZONE, HOUR (10) }, /* Alaska-Hawaii Standard */ { "nt", tZONE, HOUR (11) }, /* Nome */ { "idlw", tZONE, HOUR (12) }, /* International Date Line West */ { "cet", tZONE, -HOUR (1) }, /* Central European */ { "cest", tDAYZONE, -HOUR (1) }, /* Central European Summer */ { "met", tZONE, -HOUR (1) }, /* Middle European */ { "mewt", tZONE, -HOUR (1) }, /* Middle European Winter */ { "mest", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "mesz", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "swt", tZONE, -HOUR (1) }, /* Swedish Winter */ { "sst", tDAYZONE, -HOUR (1) }, /* Swedish Summer */ { "fwt", tZONE, -HOUR (1) }, /* French Winter */ { "fst", tDAYZONE, -HOUR (1) }, /* French Summer */ { "eet", tZONE, -HOUR (2) }, /* Eastern Europe, USSR Zone 1 */ { "bt", tZONE, -HOUR (3) }, /* Baghdad, USSR Zone 2 */ #if 0 { "it", tZONE, -HOUR (3.5) },/* Iran */ #endif { "zp4", tZONE, -HOUR (4) }, /* USSR Zone 3 */ { "zp5", tZONE, -HOUR (5) }, /* USSR Zone 4 */ #if 0 { "ist", tZONE, -HOUR (5.5) },/* Indian Standard */ #endif { "zp6", tZONE, -HOUR (6) }, /* USSR Zone 5 */ #if 0 /* For completeness. NST is also Newfoundland Standard, and SST is * also Swedish Summer. */ { "nst", tZONE, -HOUR (6.5) },/* North Sumatra */ { "sst", tZONE, -HOUR (7) }, /* South Sumatra, USSR Zone 6 */ #endif /* 0 */ { "wast", tZONE, -HOUR (7) }, /* West Australian Standard */ { "wadt", tDAYZONE, -HOUR (7) }, /* West Australian Daylight */ #if 0 { "jt", tZONE, -HOUR (7.5) },/* Java (3pm in Cronusland!) */ #endif { "cct", tZONE, -HOUR (8) }, /* China Coast, USSR Zone 7 */ { "jst", tZONE, -HOUR (9) }, /* Japan Standard, USSR Zone 8 */ #if 0 { "cast", tZONE, -HOUR (9.5) },/* Central Australian Standard */ { "cadt", tDAYZONE, -HOUR (9.5) },/* Central Australian Daylight */ #endif { "east", tZONE, -HOUR (10) }, /* Eastern Australian Standard */ { "eadt", tDAYZONE, -HOUR (10) }, /* Eastern Australian Daylight */ { "gst", tZONE, -HOUR (10) }, /* Guam Standard, USSR Zone 9 */ { "nzt", tZONE, -HOUR (12) }, /* New Zealand */ { "nzst", tZONE, -HOUR (12) }, /* New Zealand Standard */ { "nzdt", tDAYZONE, -HOUR (12) }, /* New Zealand Daylight */ { "idle", tZONE, -HOUR (12) }, /* International Date Line East */ { NULL, 0, 0 } }; /* Military timezone table. */ static TABLE const MilitaryTable[] = { { "a", tZONE, HOUR (- 1) }, { "b", tZONE, HOUR (- 2) }, { "c", tZONE, HOUR (- 3) }, { "d", tZONE, HOUR (- 4) }, { "e", tZONE, HOUR (- 5) }, { "f", tZONE, HOUR (- 6) }, { "g", tZONE, HOUR (- 7) }, { "h", tZONE, HOUR (- 8) }, { "i", tZONE, HOUR (- 9) }, { "k", tZONE, HOUR (-10) }, { "l", tZONE, HOUR (-11) }, { "m", tZONE, HOUR (-12) }, { "n", tZONE, HOUR ( 1) }, { "o", tZONE, HOUR ( 2) }, { "p", tZONE, HOUR ( 3) }, { "q", tZONE, HOUR ( 4) }, { "r", tZONE, HOUR ( 5) }, { "s", tZONE, HOUR ( 6) }, { "t", tTZONE, HOUR ( 7) }, { "u", tZONE, HOUR ( 8) }, { "v", tZONE, HOUR ( 9) }, { "w", tWZONE, HOUR ( 10) }, { "x", tZONE, HOUR ( 11) }, { "y", tZONE, HOUR ( 12) }, { "z", tZZONE, HOUR ( 0) }, { NULL, 0, 0 } }; /* ARGSUSED */ static int yyerror(void* parm, const char *s) { return 0; } static int ToHour(int Hours, MERIDIAN Meridian) { switch (Meridian) { case MER24: if(Hours < 0 || Hours > 23) return -1; return Hours; case MERam: if(Hours < 1 || Hours > 12) return -1; if(Hours == 12) Hours = 0; return Hours; case MERpm: if(Hours < 1 || Hours > 12) return -1; if(Hours == 12) Hours = 0; return Hours + 12; default: #ifdef RAPTOR_DEBUG fprintf(stderr, "%s:%d:%s: UNKNOWN Meridian %d - add a new case", __FILE__, __LINE__, __FUNCTION__, (int)Meridian); #endif return -1; } /* NOTREACHED */ } static int ToYear(int Year) { if(Year < 0) Year = -Year; /* XPG4 suggests that years 00-68 map to 2000-2068, and years 69-99 map to 1969-1999. */ if(Year < 69) Year += 2000; else if(Year < 100) Year += 1900; return Year; } static int LookupWord (YYSTYPE *lvalp, char *buff) { char *p; char *q; const TABLE *tp; int i; int abbrev; /* Make it lowercase. */ for(p = buff; *p; p++) if(ISUPPER ((unsigned char) *p)) *p = tolower (*p); if(strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0) { lvalp->Meridian = MERam; return tMERIDIAN; } if(strcmp (buff, "pm") == 0 || strcmp (buff, "p.m.") == 0) { lvalp->Meridian = MERpm; return tMERIDIAN; } /* See if we have an abbreviation for a month. */ if(strlen (buff) == 3) abbrev = 1; else if(strlen (buff) == 4 && buff[3] == '.') { abbrev = 1; buff[3] = '\0'; } else abbrev = 0; for(tp = MonthDayTable; tp->name; tp++) { if(abbrev) { if(strncmp (buff, tp->name, 3) == 0) { lvalp->Number = tp->value; return tp->type; } } else if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } for(tp = TimezoneTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } if(strcmp (buff, "dst") == 0) return tDST; for(tp = UnitsTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Strip off any plural and try the units table again. */ i = RAPTOR_BAD_CAST(int, strlen(buff)) - 1; if(buff[i] == 's') { buff[i] = '\0'; for(tp = UnitsTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } buff[i] = 's'; /* Put back for "this" in OtherTable. */ } for(tp = OtherTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Military timezones. */ if(buff[1] == '\0' && ISALPHA ((unsigned char) *buff)) { for(tp = MilitaryTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } /* Drop out any periods and try the timezone table again. */ for(i = 0, p = q = buff; *q; q++) if(*q != '.') *p++ = *q; else i++; *p = '\0'; if(i) for(tp = TimezoneTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } return tID; } int yylex(YYSTYPE *lvalp, void *parm) { unsigned char c; char *p; char buff[20]; int Count; int sign; struct date_yy * date = (struct date_yy *)parm; for(;;) { while(ISSPACE ((unsigned char) *date->yyInput)) date->yyInput++; if(ISDIGIT (c = *date->yyInput) || c == '-' || c == '+') { if(c == '-' || c == '+') { sign = c == '-' ? -1 : 1; if(!ISDIGIT (*++date->yyInput)) /* skip the '-' sign */ continue; } else sign = 0; for(lvalp->Number = 0; ISDIGIT (c = *date->yyInput++);) lvalp->Number = 10 * lvalp->Number + c - '0'; date->yyInput--; if(sign < 0) lvalp->Number = -lvalp->Number; /* Ignore ordinal suffixes on numbers */ c = *date->yyInput; if(c == 's' || c == 'n' || c == 'r' || c == 't') { c = *++date->yyInput; if(c == 't' || c == 'd' || c == 'h') { date->yyInput++; } else { date->yyInput--; } } return sign ? tSNUMBER : tUNUMBER; } if(ISALPHA (c)) { for(p = buff; (c = *date->yyInput++, ISALPHA (c)) || c == '.';) if(p < &buff[sizeof buff - 1]) *p++ = c; *p = '\0'; date->yyInput--; return LookupWord (lvalp, buff); } if(c != '(') return *date->yyInput++; Count = 0; do { c = *date->yyInput++; if(c == '\0') return c; if(c == '(') Count++; else if(c == ')') Count--; } while(Count > 0); } } #define TM_YEAR_ORIGIN 1900 /* Yield A - B, measured in seconds. */ static long difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); long days = ( /* difference in day of year */ a->tm_yday - b->tm_yday /* + intervening leap days */ + ((ay >> 2) - (by >> 2)) - (ay / 100 - by / 100) + ((ay / 100 >> 2) - (by / 100 >> 2)) /* + difference in years * 365 */ + (long) (ay - by) * 365 ); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } time_t raptor_parse_date(const char *p, time_t *now) { struct tm tm, tm0, *tmp; time_t Start; struct date_yy date; date.yyInput = p; Start = now ? *now : time ((time_t *) NULL); tmp = localtime (&Start); if(!tmp) return -1; date.yyYear = tmp->tm_year + TM_YEAR_ORIGIN; date.yyMonth = tmp->tm_mon + 1; date.yyDay = tmp->tm_mday; date.yyHour = tmp->tm_hour; date.yyMinutes = tmp->tm_min; date.yySeconds = tmp->tm_sec; tm.tm_isdst = tmp->tm_isdst; date.yyMeridian = MER24; date.yyRelSeconds = 0; date.yyRelMinutes = 0; date.yyRelHour = 0; date.yyRelDay = 0; date.yyRelMonth = 0; date.yyRelYear = 0; date.yyHaveDate = 0; date.yyHaveDay = 0; date.yyHaveRel = 0; date.yyHaveTime = 0; date.yyHaveZone = 0; if(yyparse (&date) || date.yyHaveTime > 1 || date.yyHaveZone > 1 || date.yyHaveDate > 1 || date.yyHaveDay > 1) { return -1; } tm.tm_year = ToYear (date.yyYear) - TM_YEAR_ORIGIN + date.yyRelYear; tm.tm_mon = date.yyMonth - 1 + date.yyRelMonth; tm.tm_mday = date.yyDay + date.yyRelDay; if(date.yyHaveTime || (date.yyHaveRel && !date.yyHaveDate && !date.yyHaveDay)) { tm.tm_hour = ToHour (date.yyHour, date.yyMeridian); if(tm.tm_hour < 0) return -1; tm.tm_min = date.yyMinutes; tm.tm_sec = date.yySeconds; } else { tm.tm_hour = tm.tm_min = tm.tm_sec = 0; } tm.tm_hour += date.yyRelHour; tm.tm_min += date.yyRelMinutes; tm.tm_sec += date.yyRelSeconds; /* Let mktime deduce tm_isdst if we have an absolute timestamp, or if the relative timestamp mentions days, months, or years. */ if(date.yyHaveDate | date.yyHaveDay | date.yyHaveTime | date.yyRelDay | date.yyRelMonth | date.yyRelYear) tm.tm_isdst = -1; tm0 = tm; Start = mktime (&tm); if(Start == (time_t) -1) { /* Guard against falsely reporting errors near the time_t boundaries when parsing times in other time zones. For example, if the min time_t value is 1970-01-01 00:00:00 UTC and we are 8 hours ahead of UTC, then the min localtime value is 1970-01-01 08:00:00; if we apply mktime to 1970-01-01 00:00:00 we will get an error, so we apply mktime to 1970-01-02 08:00:00 instead and adjust the time zone by 24 hours to compensate. This algorithm assumes that there is no DST transition within a day of the time_t boundaries. */ if(date.yyHaveZone) { tm = tm0; if(tm.tm_year <= EPOCH - TM_YEAR_ORIGIN) { tm.tm_mday++; date.yyTimezone -= 24 * 60; } else { tm.tm_mday--; date.yyTimezone += 24 * 60; } Start = mktime (&tm); } if(Start == (time_t) -1) return Start; } if(date.yyHaveDay && !date.yyHaveDate) { tm.tm_mday += ((date.yyDayNumber - tm.tm_wday + 7) % 7 + 7 * (date.yyDayOrdinal - (0 < date.yyDayOrdinal))); Start = mktime (&tm); if(Start == (time_t) -1) return Start; } if(date.yyHaveZone) { long delta; struct tm *gmt = gmtime (&Start); if(!gmt) return -1; delta = date.yyTimezone * 60L + difftm (&tm, gmt); if((Start + delta < Start) != (delta < 0)) return -1; /* time_t overflow */ Start += delta; } return Start; } raptor2-2.0.15/src/raptor_xml.c0000644000175000017500000007633212325013605013243 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_xml.c - Raptor XML routines * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE /** * raptor_new_xml_element: * @name: The XML element name * @xml_language: the in-scope XML language (or NULL) * @xml_base: the in-scope XML base URI (or NULL) * * Constructor - create a new XML element from a QName * * Return value: a new #raptor_xml_element or NULL on failure **/ raptor_xml_element* raptor_new_xml_element(raptor_qname *name, const unsigned char *xml_language, raptor_uri *xml_base) { raptor_xml_element* xml_element; xml_element = RAPTOR_CALLOC(raptor_xml_element*, 1, sizeof(*xml_element)); if(!xml_element) return NULL; /* Element name */ xml_element->name = name; xml_element->xml_language = xml_language; xml_element->base_uri = xml_base; xml_element->declared_nspaces = NULL; xml_element->content_cdata_sb = raptor_new_stringbuffer(); if(!xml_element->content_cdata_sb) { RAPTOR_FREE(raptor_xml_element, xml_element); xml_element = NULL; } return xml_element; } /** * raptor_new_xml_element_from_namespace_local_name: * @ns: namespace * @name: the XML element local name * @xml_language: the in-scope XML language (or NULL) * @xml_base: base uri (or NULL) * * Constructor - create a new XML element from an XML namespace and a local name * * Added in 1.4.16. * * Return value: a new #raptor_xml_element or NULL on failure */ raptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor_namespace *ns, const unsigned char *name, const unsigned char *xml_language, raptor_uri *xml_base) { raptor_uri *base_uri_copy; raptor_qname *qname; raptor_xml_element *element = NULL; qname = raptor_new_qname_from_namespace_local_name(ns->nstack->world, ns, name, NULL); if(qname) { base_uri_copy = xml_base ? raptor_uri_copy(xml_base) : NULL; element = raptor_new_xml_element(qname, xml_language, base_uri_copy); if(!element) { raptor_free_qname(qname); if(base_uri_copy) raptor_free_uri(base_uri_copy); } } return element; } /** * raptor_free_xml_element: * @element: XML Element * * Destructor - destroy a raptor_xml_element object. **/ void raptor_free_xml_element(raptor_xml_element *element) { unsigned int i; if(!element) return; for(i = 0; i < element->attribute_count; i++) if(element->attributes[i]) raptor_free_qname(element->attributes[i]); if(element->attributes) RAPTOR_FREE(raptor_qname_array, element->attributes); if(element->content_cdata_sb) raptor_free_stringbuffer(element->content_cdata_sb); if(element->base_uri) raptor_free_uri(element->base_uri); if(element->xml_language) RAPTOR_FREE(char*, element->xml_language); raptor_free_qname(element->name); if(element->declared_nspaces) raptor_free_sequence(element->declared_nspaces); RAPTOR_FREE(raptor_element, element); } /** * raptor_xml_element_get_name: * @xml_element: XML Element * * Get the XML Name of an XML element * * Return value: The Name. **/ raptor_qname* raptor_xml_element_get_name(raptor_xml_element *xml_element) { return xml_element->name; } /** * raptor_xml_element_set_attributes: * @xml_element: XML Element * @attributes: Array of XML Qname attributes with values * @count: Length of array * * Set the attributes on an XML element. * * The @attributes array becomes owned by the element after this function. **/ void raptor_xml_element_set_attributes(raptor_xml_element* xml_element, raptor_qname **attributes, int count) { xml_element->attributes = attributes; xml_element->attribute_count = count; } /** * raptor_xml_element_get_attributes: * @xml_element: XML Element * * Get the array of attributes on the XML element. * * Use raptor_xml_element_get_attributes_count() to get the count * of the array size. * * Return value: the array of qnames or NULL if none are present. **/ raptor_qname** raptor_xml_element_get_attributes(raptor_xml_element* xml_element) { return xml_element->attributes; } /** * raptor_xml_element_get_attributes_count: * @xml_element: XML Element * * Get the number of attributes on the XML element. * * Return value: Integer number of attributes - 0 or more. **/ int raptor_xml_element_get_attributes_count(raptor_xml_element* xml_element) { return xml_element->attribute_count; } /** * raptor_xml_element_declare_namespace: * @xml_element: XML Element * @nspace: raptor_namespace to declare * * Declare a namespace on the XML Element. * * Return value: non-0 if namespace cannot be declared **/ int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, raptor_namespace *nspace) { int i; const raptor_namespace *ns; if(!xml_element->declared_nspaces) xml_element->declared_nspaces = raptor_new_sequence(NULL, NULL); if((ns = xml_element->name->nspace)) { /* Cannot have same namespace already seen */ if(ns == nspace || /* ... or two default nspaces */ (!ns->prefix && !nspace->prefix) || /* ... or two same prefixes */ (ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) ) return 1; } for(i = 0; (ns = (const raptor_namespace*)raptor_sequence_get_at(xml_element->declared_nspaces, i)); i++) { /* Cannot have same namespace already seen */ if(ns == nspace || /* ... or two default nspaces */ (!ns->prefix && !nspace->prefix) || /* ... or two same prefixes */ (ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) ) return 1; } raptor_sequence_push(xml_element->declared_nspaces, nspace); return 0; } #ifdef RAPTOR_DEBUG void raptor_print_xml_element(raptor_xml_element *element, FILE* stream) { raptor_qname_print(stream, element->name); fputc('\n', stream); if(element->attribute_count) { unsigned int i; int printed = 0; fputs(" attributes: ", stream); for(i = 0; i < element->attribute_count; i++) { if(element->attributes[i]) { if(printed) fputc(' ', stream); raptor_qname_print(stream, element->attributes[i]); fprintf(stream, "='%s'", element->attributes[i]->value); printed = 1; } } fputc('\n', stream); } } #endif struct nsd { const raptor_namespace *nspace; unsigned char *declaration; size_t length; }; static int raptor_nsd_compare(const void *a, const void *b) { struct nsd* nsd_a = (struct nsd*)a; struct nsd* nsd_b = (struct nsd*)b; return strcmp((const char*)nsd_a->declaration, (const char*)nsd_b->declaration); } /** * raptor_xml_element_write: * @element: XML element to format * @nstack: Namespace stack context to use in formatting * @is_empty: non-0 if element is empty * @is_end: non-0 if this is an end element (else is a start element) * @depth: XML element depth * @iostr: iostream object * * Write a formatted XML element to a #raptor_iostream * * Return value: non-0 on failure */ int raptor_xml_element_write(raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, int depth, raptor_iostream* iostr) { struct nsd *nspace_declarations = NULL; size_t nspace_declarations_count = 0; unsigned int i; /* max is 1 per element and 1 for each attribute + size of declared */ if(nstack) { int nspace_max_count = element->attribute_count+1; if(element->declared_nspaces) nspace_max_count += raptor_sequence_size(element->declared_nspaces); nspace_declarations = RAPTOR_CALLOC(struct nsd*, nspace_max_count, sizeof(struct nsd)); } if(element->name->nspace) { if(!is_end && nstack && !raptor_namespaces_namespace_in_scope(nstack, element->name->nspace)) { nspace_declarations[0].declaration= raptor_namespace_format_as_xml(element->name->nspace, &nspace_declarations[0].length); nspace_declarations[0].nspace = element->name->nspace; nspace_declarations_count++; } } if(!is_end && element->attributes) { for(i = 0; i < element->attribute_count; i++) { /* qname */ if(element->attributes[i]->nspace) { if(nstack && !raptor_namespaces_namespace_in_scope(nstack, element->attributes[i]->nspace) && element->attributes[i]->nspace != element->name->nspace) { /* not in scope and not same as element (so already going to be declared)*/ unsigned int j; int declare_me = 1; /* check it wasn't an earlier declaration too */ for(j = 0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == element->attributes[j]->nspace) { declare_me = 0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespace_format_as_xml(element->attributes[i]->nspace, &nspace_declarations[nspace_declarations_count].length); nspace_declarations[nspace_declarations_count].nspace = element->attributes[i]->nspace; nspace_declarations_count++; } } } } } if(!is_end && nstack && element->declared_nspaces && raptor_sequence_size(element->declared_nspaces) > 0) { for(i = 0; i< (unsigned int)raptor_sequence_size(element->declared_nspaces); i++) { raptor_namespace* nspace = (raptor_namespace*)raptor_sequence_get_at(element->declared_nspaces, i); unsigned int j; int declare_me = 1; /* check it wasn't an earlier declaration too */ for(j = 0; j < nspace_declarations_count; j++) if(nspace_declarations[j].nspace == nspace) { declare_me = 0; break; } if(declare_me) { nspace_declarations[nspace_declarations_count].declaration= raptor_namespace_format_as_xml(nspace, &nspace_declarations[nspace_declarations_count].length); nspace_declarations[nspace_declarations_count].nspace = nspace; nspace_declarations_count++; } } } raptor_iostream_write_byte('<', iostr); if(is_end) raptor_iostream_write_byte('/', iostr); if(element->name->nspace && element->name->nspace->prefix_length > 0) { raptor_iostream_counted_string_write((const char*)element->name->nspace->prefix, element->name->nspace->prefix_length, iostr); raptor_iostream_write_byte(':', iostr); } raptor_iostream_counted_string_write((const char*)element->name->local_name, element->name->local_name_length, iostr); /* declare namespaces */ if(nspace_declarations_count) { /* sort them into the canonical order */ qsort((void*)nspace_declarations, nspace_declarations_count, sizeof(struct nsd), raptor_nsd_compare); /* add them */ for(i = 0; i < nspace_declarations_count; i++) { raptor_iostream_write_byte(' ', iostr); raptor_iostream_counted_string_write((const char*)nspace_declarations[i].declaration, nspace_declarations[i].length, iostr); RAPTOR_FREE(char*, nspace_declarations[i].declaration); nspace_declarations[i].declaration = NULL; raptor_namespace_stack_start_namespace(nstack, (raptor_namespace*)nspace_declarations[i].nspace, depth); } } if(!is_end && element->attributes) { for(i = 0; i < element->attribute_count; i++) { raptor_iostream_write_byte(' ', iostr); if(element->attributes[i]->nspace && element->attributes[i]->nspace->prefix_length > 0) { raptor_iostream_counted_string_write((char*)element->attributes[i]->nspace->prefix, element->attributes[i]->nspace->prefix_length, iostr); raptor_iostream_write_byte(':', iostr); } raptor_iostream_counted_string_write((const char*)element->attributes[i]->local_name, element->attributes[i]->local_name_length, iostr); raptor_iostream_counted_string_write("=\"", 2, iostr); raptor_xml_escape_string_write(element->attributes[i]->value, element->attributes[i]->value_length, '"', iostr); raptor_iostream_write_byte('"', iostr); } } if(is_empty) raptor_iostream_write_byte('/', iostr); raptor_iostream_write_byte('>', iostr); if(nstack) RAPTOR_FREE(stringarray, nspace_declarations); return 0; } /** * raptor_xml_element_get_language: * @xml_element: XML Element * * Get the XML language of the element. * * Return value: XML language or NULL if none in scope **/ const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xml_element) { return xml_element->xml_language; } /** * raptor_valid_xml_ID: * @rdf_parser: RDF parser * @string: The string to check. * * Check the string matches the xml:ID value constraints. * * This checks the syntax part of the xml:ID validity constraint, * that it matches [ VC: Name Token ] as amended by XML Namespaces: * * See Namespaces in XML NCName * * Return value: non-zero if the ID string is valid **/ int raptor_valid_xml_ID(raptor_parser *rdf_parser, const unsigned char *string) { size_t len = strlen((const char*)string); #ifdef RAPTOR_XML_1_1 #define XML_ID_XML_VERSION 11 #else #define XML_ID_XML_VERSION 10 #endif return raptor_xml_name_check(string, len, XML_ID_XML_VERSION); } /** * raptor_xml_escape_string_any: * @world: raptor world * @string: string to XML escape (UTF-8) * @len: length of string * @buffer: the buffer to use for new string (UTF-8) or NULL to just calculate expected length * @length: buffer size * @quote: optional quote character to escape for attribute content, or 0 * @xml_version: XML 1.0 (10) or XML 1.1 (11) * * Return an XML-escaped version a string. * * Follows * Canonical XML rules on Text Nodes and Attribute Nodes * * Both: * Replaces & and < * with &amp; and &lt; * respectively, preserving other characters. * * Text Nodes: * > is turned into &gt; * ##xD is turned into &##xD; * * Attribute Nodes: * > is generated not &gt. * ##x9, ##xA and ##xD are turned into * &##x9;, * &##xA; and * &##xD; * entities. * * If @quote is given it can be either of '\'' or '\"' * which will be turned into &apos; or * &quot; respectively. * ASCII NUL ('\0') or any other character will not be escaped. * * If @buffer is NULL, no work is done but the size of buffer * required is returned. The output in buffer remains in UTF-8. * * If the input @string is empty, a single NUL will be written to the * buffer. * * Return value: the number of bytes required / used or <0 on failure. **/ int raptor_xml_escape_string_any(raptor_world *world, const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, int xml_version) { size_t l; size_t new_len = 0; const unsigned char *p; unsigned char *q; int unichar_len; raptor_unichar unichar; if(!string) return -1; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); raptor_world_open(world); if(quote != '\"' && quote != '\'') quote='\0'; for(l = len, p = string; l; p++, l--) { if(*p > 0x7f) { unichar_len = raptor_unicode_utf8_string_get_char(p, l, &unichar); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > l) { raptor_log_error(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Bad UTF-8 encoding."); return -1; } } else { unichar=*p; unichar_len = 1; } if(unichar == '&') /* & */ new_len+= 5; else if(unichar == '<' || (!quote && unichar == '>')) /* < or > */ new_len+= 4; else if(quote && unichar == (unsigned long)quote) /* ' or " */ new_len+= 6; else if(unichar == 0x0d || (quote && (unichar == 0x09 || unichar == 0x0a))) /* or or &xA; */ new_len+= 5; else if(unichar == 0x7f || (unichar < 0x20 && unichar != 0x09 && unichar != 0x0a)) { if(!unichar || xml_version < 11) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot write illegal XML 1.0 character U+%6lX.", unichar); } else { /* &#xX; */ new_len+= 5; if(unichar > 0x0f) new_len++; } } else new_len+= unichar_len; unichar_len--; /* since loop does len-- */ p += unichar_len; l -= unichar_len; } if(length && new_len > length) return 0; if(!buffer) return RAPTOR_BAD_CAST(int, new_len); for(l = len, p = string, q = buffer; l; p++, l--) { if(*p > 0x7f) { unichar_len = raptor_unicode_utf8_string_get_char(p, l, &unichar); /* if the UTF-8 encoding is bad, we already did return -1 above */ } else { unichar=*p; unichar_len = 1; } if(unichar == '&') { memcpy(q, "&", 5); q+= 5; } else if(unichar == '<') { memcpy(q, "<", 4); q+= 4; } else if(!quote && unichar == '>') { memcpy(q, ">", 4); q+= 4; } else if(quote && unichar == (unsigned long)quote) { if(quote == '\'') memcpy(q, "'", 6); else memcpy(q, """, 6); q+= 6; } else if(unichar == 0x0d || (quote && (unichar == 0x09 || unichar == 0x0a))) { /* &#xX; */ *q++='&'; *q++='#'; *q++='x'; if(unichar == 0x09) *q++ = '9'; else *q++ = 'A'+ ((char)unichar-0x0a); *q++= ';'; } else if(unichar == 0x7f || (unichar < 0x20 && unichar != 0x09 && unichar != 0x0a)) { if(!unichar || xml_version < 11) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot write illegal XML 1.0 character U+%6lX.", unichar); } else { /* &#xX; */ *q++ = '&'; *q++ = '#'; *q++ = 'x'; q += raptor_format_integer((char*)q, 3, RAPTOR_GOOD_CAST(unsigned int, unichar), /* base */ 16, -1, '\0'); *q++ = ';'; } } else { /* coverity[negative_returns] * negative unichar_len values are checked and cause return -1 above */ memcpy(q, p, unichar_len); q+= unichar_len; } unichar_len--; /* since loop does len-- */ p += unichar_len; l -= unichar_len; } /* Terminate new string */ *q = '\0'; return RAPTOR_BAD_CAST(int, new_len); } /** * raptor_xml_escape_string: * @world: raptor world * @string: string to XML 1.0 escape (UTF-8) * @len: length of string * @buffer: the buffer to use for new string (UTF-8) or NULL to just calculate expected length. * @length: buffer size * @quote: optional quote character to escape for attribute content, or 0 * * Return an XML 1.0-escaped version a string. * * See raptor_xml_escape_string_any() for the conditions on parameters. * * Return value: the number of bytes required / used or <0 on failure. **/ int raptor_xml_escape_string(raptor_world *world, const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote) { if(!string) return -1; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, -1); raptor_world_open(world); return raptor_xml_escape_string_any(world, string, len, buffer, length, quote, 10); } /** * raptor_xml_escape_string_any_write: * @string: string to XML escape (UTF-8) * @len: length of string * @quote: optional quote character to escape for attribute content, or 0 * @xml_version: XML version - 10 (XML 1.0) or 11 (XML 1.1) * @iostr: the #raptor_iostream to write to * * Write an XML-escaped version of a string to an iostream. * * See raptor_xml_escape_string() for the escapes performed and * the conditions on @quote and @string. XML 1.1 allows additional * characters in XML such as U+0001 to U+001F inclusive. * * Return value: non 0 on failure **/ int raptor_xml_escape_string_any_write(const unsigned char *string, size_t len, char quote, int xml_version, raptor_iostream* iostr) { size_t l; const unsigned char *p; if(xml_version != 10) xml_version = 11; if(quote != '\"' && quote != '\'') quote='\0'; for(l = len, p = string; l; p++, l--) { int unichar_len = 1; raptor_unichar unichar=*p; if(*p > 0x7f) { unichar_len = raptor_unicode_utf8_string_get_char(p, l, &unichar); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > l) { raptor_log_error(raptor_iostream_get_world(iostr), RAPTOR_LOG_LEVEL_ERROR, NULL, "Bad UTF-8 encoding."); return 1; } } if(unichar == '&') raptor_iostream_counted_string_write("&", 5, iostr); else if(unichar == '<') raptor_iostream_counted_string_write("<", 4, iostr); else if(!quote && unichar == '>') raptor_iostream_counted_string_write(">", 4, iostr); else if(quote && unichar == (unsigned long)quote) { if(quote == '\'') raptor_iostream_counted_string_write("'", 6, iostr); else raptor_iostream_counted_string_write(""", 6, iostr); } else if(unichar == 0x0d || (quote && (unichar == 0x09 || unichar == 0x0a))) { /* &#xX; */ raptor_iostream_counted_string_write("&#x", 3, iostr); if(unichar == 0x09) raptor_iostream_write_byte('9', iostr); else raptor_iostream_write_byte('A'+ ((char)unichar-0x0a), iostr); raptor_iostream_write_byte(';', iostr); } else if(unichar == 0x7f || (unichar < 0x20 && unichar != 0x09 && unichar != 0x0a)) { if(!unichar || xml_version < 11) { raptor_log_error_formatted(raptor_iostream_get_world(iostr), RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot write illegal XML 1.0 character U+%6lX.", unichar); } else { int width = (unichar < 0x10) ? 1 : 2; /* &#xX; */ raptor_iostream_counted_string_write("&#x", 3, iostr); raptor_iostream_hexadecimal_write(RAPTOR_GOOD_CAST(unsigned int, unichar), width, iostr); raptor_iostream_write_byte(';', iostr); } } else raptor_iostream_counted_string_write((const char*)p, unichar_len, iostr); unichar_len--; /* since loop does len-- */ p += unichar_len; l -= unichar_len; } return 0; } /** * raptor_xml_escape_string_write: * @string: string to XML 1.0 escape (UTF-8) * @len: length of string * @quote: optional quote character to escape for attribute content, or 0 * @iostr: the #raptor_iostream to write to * * Write an XML 1.0-escaped version of a string to an iostream. * * See raptor_xml_escape_string_any_write() for the escapes * performed and the conditions on @quote and @string. * * Return value: non 0 on failure **/ int raptor_xml_escape_string_write(const unsigned char *string, size_t len, char quote, raptor_iostream* iostr) { return raptor_xml_escape_string_any_write(string, len, quote, 10, iostr); } /** * raptor_xml_name_check: * @string: UTF-8 name string * @length: length of string * @xml_version: XML version * * Check a string is a legal XML name (and legal UTF8). * * xml_version is either 10 (for XML 1.0) or 11 for (XML 1.1). Any * other version fails. * * Return value: Non 0 if the string is a legal XML name **/ int raptor_xml_name_check(const unsigned char *string, size_t length, int xml_version) { int pos; if(xml_version != 10 && xml_version != 11) return 0; for(pos = 0; length > 0; pos++) { raptor_unichar unichar = 0; int unichar_len; unichar_len = raptor_unicode_utf8_string_get_char(string, length, &unichar); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > length) return 0; if(unichar > raptor_unicode_max_codepoint) return 0; if(!pos) { /* start of name */ if(xml_version == 10) { if(!raptor_unicode_is_xml10_namestartchar(unichar)) return 0; } else { if(!raptor_unicode_is_xml11_namestartchar(unichar)) return 0; } } else { /* rest of name */ if(xml_version == 10) { if(!raptor_unicode_is_xml10_namechar(unichar)) return 0; } else { if(!raptor_unicode_is_xml11_namechar(unichar)) return 0; } } string += unichar_len; length -= unichar_len; } return 1; } #endif #ifdef STANDALONE /* static prototypes */ void raptor_bad_string_print(const unsigned char *input, FILE *stream); int main(int argc, char *argv[]); void raptor_bad_string_print(const unsigned char *input, FILE *stream) { while(*input) { char c=(char)*input; if(isprint(c)) fputc(c, stream); else fprintf(stream, "\\x%02X", (c & 0xff)); input++; } } int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); struct tv { const char *string; const char quote; const char *result; }; struct tv *t; struct tv test_values[]={ {"", 0, ""}, {"&", 0, "&"}, {"<", 0, "<"}, {">", 0, ">"}, {"\x09", 0, "\x09"}, {"\x0a", 0, "\x0a"}, {"\x0d", 0, " "}, {"'&'", '\'', "'&'"}, {"'<'", '\'', "'<'"}, {"'>'", '\'', "'>'"}, {"\x09", '\'', " "}, {"\x0a", '\'', " "}, {"\x0d", '\'', " "}, {"\"&\"", '\"', ""&""}, {"\"<\"", '\"', ""<""}, {"\">\"", '\"', "">""}, {"\x09", '\"', " "}, {"\x0a", '\"', " "}, {"\x0d", '\"', " "}, {"&", 0, "&amp;"}, {"", 0, "<foo>"}, #if 0 {"\x1f", 0, ""}, {"\xc2\x80", 0, "€"}, {"\xe0\xa0\x80", 0, "ࠀ"}, {"\xf0\x90\x80\x80", 0, "𐀀"}, {"\x7f", 0, ""}, {"\xdf\xbf", 0, "߿"}, {"\xef\xbf\xbd", 0, "�"}, {"\xf4\x8f\xbf\xbf", 0, "􏿿"}, {"\xc3\xbf", 0, "ÿ"}, {"\xf0\x8f\xbf\xbf", 0, "￿"}, #endif {NULL, 0, 0} }; int i; int failures = 0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); for(i = 0; (t=&test_values[i]) && t->string; i++) { const unsigned char *utf8_string = (const unsigned char*)t->string; char quote = t->quote; size_t utf8_string_len = strlen((const char*)utf8_string); unsigned char *xml_string; int xml_string_len = 0; xml_string_len = raptor_xml_escape_string(world, utf8_string, utf8_string_len, NULL, 0, quote); if(xml_string_len < 0) { fprintf(stderr, "%s: raptor_xml_escape_string FAILED to escape string '", program); raptor_bad_string_print(utf8_string, stderr); fputs("'\n", stderr); failures++; continue; } xml_string = RAPTOR_MALLOC(unsigned char*, xml_string_len + 1); xml_string_len = raptor_xml_escape_string(world, utf8_string, utf8_string_len, xml_string, xml_string_len, quote); if(xml_string_len < 0) { fprintf(stderr, "%s: raptor_xml_escape_string FAILED to escape string '", program); raptor_bad_string_print(utf8_string, stderr); fputs("'\n", stderr); failures++; continue; } if(strcmp((const char*)xml_string, t->result)) { fprintf(stderr, "%s: raptor_xml_escape_string FAILED to escape string '", program); raptor_bad_string_print(utf8_string, stderr); fprintf(stderr, "', expected '%s', result was '%s'\n", t->result, xml_string); failures++; continue; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: raptor_xml_escape_string escaped string to '%s' ok\n", program, xml_string); #endif RAPTOR_FREE(char*, xml_string); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 if(!failures) fprintf(stderr, "%s: raptor_xml_escape_string all tests OK\n", program); #endif raptor_free_world(world); return failures; } #endif raptor2-2.0.15/src/raptor_win32.c0000644000175000017500000000222012020170223013356 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_win32.c - Raptor WIN32 support functions * * Copyright (C) 2002-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef WIN32 /* Only on WIN32 systems */ /* DLL entry point */ BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { return TRUE; } /* end if WIN32 */ #endif raptor2-2.0.15/src/raptor.h0000644000175000017500000000002511555606115012362 00000000000000#include raptor2-2.0.15/src/raptor_statement.c0000644000175000017500000002311612115153746014447 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_statement.c - Raptor statements * * Copyright (C) 2008-2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* for ptrdiff_t */ #ifdef HAVE_STDDEF_H #include #endif #include #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* prototypes for helper functions */ /** * raptor_new_statement: * @world: raptor world * * Constructor - create a new #raptor_statement. * * Return value: new raptor statement or NULL on failure */ raptor_statement* raptor_new_statement(raptor_world *world) { raptor_statement* statement; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); statement = RAPTOR_CALLOC(raptor_statement*, 1, sizeof(*statement)); if(!statement) return NULL; statement->world = world; /* dynamic - usage counted */ statement->usage = 1; return statement; } /** * raptor_new_statement_from_nodes: * @world: raptor world * @subject: subject term (or NULL) * @predicate: predicate term (or NULL) * @object: object term (or NULL) * @graph: graph name term (or NULL) * * Constructor - create a new #raptor_statement from a set of terms * * The @subject, @predicate, @object and @graph become owned by the statement. * * Return value: new raptor statement or NULL on failure */ raptor_statement* raptor_new_statement_from_nodes(raptor_world* world, raptor_term *subject, raptor_term *predicate, raptor_term *object, raptor_term *graph) { raptor_statement* t; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); t = raptor_new_statement(world); if(!t) { if(subject) raptor_free_term(subject); if(predicate) raptor_free_term(predicate); if(object) raptor_free_term(object); if(graph) raptor_free_term(graph); return NULL; } t->subject = subject; t->predicate = predicate; t->object = object; t->graph = graph; return t; } /** * raptor_statement_init: * @statement: statement to initialize * @world: raptor world * * Initialize a static #raptor_statement. * */ void raptor_statement_init(raptor_statement *statement, raptor_world *world) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(world, raptor_world); RAPTOR_ASSERT_OBJECT_POINTER_RETURN(statement, raptor_statement); /* ensure all fields are set to NULL to start with */ memset(statement, 0, sizeof(*statement)); statement->world = world; /* static - not usage counted */ statement->usage = -1; } /** * raptor_statement_copy: * @statement: statement to copy * * Copy a #raptor_statement. * * Return value: a new #raptor_statement or NULL on error */ raptor_statement* raptor_statement_copy(raptor_statement *statement) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(statement, raptor_statement, NULL); /* static - not usage counted */ if(statement->usage < 0) { raptor_statement* s2; /* s2 will be a dynamic, usage->counted statement */ s2 = raptor_new_statement(statement->world); if(!s2) return NULL; s2->world = statement->world; if(statement->subject) s2->subject = raptor_term_copy(statement->subject); if(statement->predicate) s2->predicate = raptor_term_copy(statement->predicate); if(statement->object) s2->object = raptor_term_copy(statement->object); if(statement->graph) s2->graph = raptor_term_copy(statement->graph); return s2; } statement->usage++; return statement; } /** * raptor_statement_clear: * @statement: #raptor_statement object * * Empty a raptor_statement of terms. * **/ void raptor_statement_clear(raptor_statement *statement) { if(!statement) return; /* raptor_free_term() does a NULL check */ raptor_free_term(statement->subject); statement->subject = NULL; raptor_free_term(statement->predicate); statement->predicate = NULL; raptor_free_term(statement->object); statement->object = NULL; raptor_free_term(statement->graph); statement->graph = NULL; } /** * raptor_free_statement: * @statement: statement * * Destructor * */ void raptor_free_statement(raptor_statement *statement) { /* dynamically or statically allocated? */ int is_dynamic; if(!statement) return; is_dynamic = (statement->usage >= 0); /* dynamically allocated and still in use? */ if(is_dynamic && --statement->usage) return; raptor_statement_clear(statement); if(is_dynamic) RAPTOR_FREE(raptor_statement, statement); } /** * raptor_statement_print: * @statement: #raptor_statement object to print * @stream: FILE* stream * * Print a raptor_statement to a stream. * * Return value: non-0 on failure **/ int raptor_statement_print(const raptor_statement * statement, FILE *stream) { int rc = 0; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(statement, raptor_statement, 1); fputc('[', stream); if(!statement->subject) { fputs("NULL", stream); } else { if(statement->subject->type == RAPTOR_TERM_TYPE_BLANK) fputs((const char*)statement->subject->value.blank.string, stream); else raptor_uri_print(statement->subject->value.uri, stream); } fputs(", ", stream); if(statement->predicate) raptor_uri_print(statement->predicate->value.uri, stream); else fputs("NULL", stream); fputs(", ", stream); if(!statement->object) { fputs("NULL", stream); } else { if(statement->object->type == RAPTOR_TERM_TYPE_LITERAL) { if(statement->object->value.literal.datatype) { raptor_uri* dt_uri = statement->object->value.literal.datatype; fputc('<', stream); fputs((const char*)raptor_uri_as_string(dt_uri), stream); fputc('>', stream); } fputc('"', stream); fputs((const char*)statement->object->value.literal.string, stream); fputc('"', stream); } else if(statement->object->type == RAPTOR_TERM_TYPE_BLANK) fputs((const char*)statement->object->value.blank.string, stream); else { raptor_uri_print(statement->object->value.uri, stream); } } if(statement->graph) { if(statement->graph->type == RAPTOR_TERM_TYPE_BLANK && statement->graph->value.blank.string) { fputs(", ", stream); fputs((const char*)statement->graph->value.blank.string, stream); } else if(statement->graph->type == RAPTOR_TERM_TYPE_URI && statement->graph->value.uri) { fputs(", ", stream); raptor_uri_print(statement->graph->value.uri, stream); } } fputc(']', stream); return rc; } /** * raptor_statement_print_as_ntriples: * @statement: #raptor_statement to print * @stream: FILE* stream * * Print a raptor_statement in N-Triples form. * * Return value: non-0 on failure **/ int raptor_statement_print_as_ntriples(const raptor_statement * statement, FILE *stream) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(statement, raptor_statement, 1); if(raptor_term_print_as_ntriples(statement->subject, stream)) return 1; fputc(' ', stream); if(raptor_term_print_as_ntriples(statement->predicate, stream)) return 1; fputc(' ', stream); if(raptor_term_print_as_ntriples(statement->object, stream)) return 1; fputs(" .", stream); return 0; } /** * raptor_statement_compare: * @s1: first statement * @s2: second statement * * Compare a pair of #raptor_statement * * Uses raptor_term_compare() to check ordering between subjects, * predicates and objects of statements. * * Return value: <0 if s1 is before s2, 0 if equal, >0 if s1 is after s2 */ int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2) { int d = 0; if(!s1 || !s2) { /* If one or both are NULL, return a stable comparison order */ ptrdiff_t pd = (s2 - s1); /* copy the sign of the (unknown size) signed integer 'd' into an * int result */ return (pd > 0) - (pd < 0); } d = raptor_term_compare(s1->subject, s2->subject); if(d) return d; /* predicates are URIs */ d = raptor_term_compare(s1->predicate, s2->predicate); if(d) return d; /* objects are URIs or blank nodes or literals */ d = raptor_term_compare(s1->object, s2->object); if(d) return d; /* graphs are URIs or blank nodes */ d = raptor_term_compare(s1->graph, s2->graph); return d; } /** * raptor_statement_equals: * @s1: first statement * @s2: second statement * * Compare a pair of #raptor_statement for equality * * Return value: non-0 if statements are equal */ int raptor_statement_equals(const raptor_statement* s1, const raptor_statement* s2) { if(!s1 || !s2) return 0; if(!raptor_term_equals(s1->subject, s2->subject)) return 0; if(!raptor_term_equals(s1->predicate, s2->predicate)) return 0; if(!raptor_term_equals(s1->object, s2->object)) return 0; return 1; } raptor2-2.0.15/src/raptor_www_test.c0000644000175000017500000000530612020170223014307 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_test.c - Raptor WWW retrieval test code * * Copyright (C) 2003-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" static void write_content_type(raptor_www* www, void *userdata, const char *content_type) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf((FILE*)userdata, "Content Type: %s\n", content_type); #endif } int main (int argc, char *argv[]) { const char *program = raptor_basename(argv[0]); raptor_world *world; const char *uri_string; raptor_www *www; const char *user_agent = "raptor_www_test/0.1"; raptor_uri *uri; void *string = NULL; size_t string_length = 0; if(argc > 1) uri_string = argv[1]; else uri_string = "http://librdf.org/"; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); uri = raptor_new_uri(world, (const unsigned char*)uri_string); if(!uri) { fprintf(stderr, "%s: Failed to create Raptor URI for %s\n", program, uri_string); exit(1); } www = raptor_new_www(world); raptor_www_set_content_type_handler(www, write_content_type, (void*)stderr); raptor_www_set_user_agent(www, user_agent); /* start retrieval (always a GET) */ if(raptor_www_fetch_to_string(www, uri, &string, &string_length, malloc)) { fprintf(stderr, "%s: WWW fetch failed\n", program); } else { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: HTTP response status %d\n", program, www->status_code); fprintf(stderr, "%s: Returned %d bytes of content\n", program, (int)string_length); #endif } if(string) free(string); raptor_free_www(www); raptor_free_uri(uri); raptor_free_world(world); return 0; } raptor2-2.0.15/src/raptor_rss.h0000644000175000017500000003623311472513121013253 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rss.h - Redland Parser Toolkit Internal RSS Model and API * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef RAPTOR_RSS_H #define RAPTOR_RSS_H #ifdef __cplusplus extern "C" { #endif typedef enum { /* CONTAINERs */ /* common */ RAPTOR_RSS_CHANNEL, RAPTOR_RSS_IMAGE, RAPTOR_RSS_TEXTINPUT, /* list items */ RAPTOR_RSS_ITEM, /* atom author */ RAPTOR_ATOM_AUTHOR, /* atom link */ RAPTOR_ATOM_LINK, /* itunes owner */ RAPTOR_ITUNES_OWNER, /* containers but IGNORED */ RAPTOR_RSS_SKIPHOURS, RAPTOR_RSS_SKIPDAYS, /* metadata BLOCKs */ RAPTOR_RSS_ENCLOSURE, RAPTOR_ATOM_CATEGORY, RAPTOR_RSS_SOURCE, /* serializing containers */ RAPTOR_ATOM_FEED, RAPTOR_ATOM_ENTRY, /* nothing found yet */ RAPTOR_RSS_NONE, /* deliberately not counting NONE */ RAPTOR_RSS_COMMON_SIZE = RAPTOR_RSS_NONE - RAPTOR_RSS_CHANNEL, RAPTOR_RSS_COMMON_IGNORED = RAPTOR_RSS_SKIPHOURS } raptor_rss_type; /* Namespaces used in RSS */ #define RSS1_0_NAMESPACE_URI "http://purl.org/rss/1.0/" #define RSS0_91_NAMESPACE_URI "http://purl.org/rss/1.0/modules/rss091#" #define RSS2_0_ENC_NAMESPACE_URI "http://purl.oclc.org/net/rss_2.0/enc#" #define ATOM0_3_NAMESPACE_URI "http://purl.org/atom/ns#" #define DC_NAMESPACE_URI "http://purl.org/dc/elements/1.1/" #define RSS1_1_NAMESPACE_URI "http://purl.org/net/rss1.1#" #define CONTENT_NAMESPACE_URI "http://purl.org/rss/1.0/modules/content/" #define ATOM1_0_NAMESPACE_URI "http://www.w3.org/2005/Atom" #define RDF_NAMESPACE_URI "http://www.w3.org/1999/02/22-rdf-syntax-ns#" #define ATOMTRIPLES_NAMESPACE_URI "http://purl.org/syndication/atomtriples/1" #define ITUNES_NAMESPACE_URI "http://www.itunes.com/dtds/podcast-1.0.dtd" /* Old netscape namespace, turn into RSS 1.0 */ #define RSS0_9_NAMESPACE_URI "http://my.netscape.com/rdf/simple/0.9/" typedef enum { RSS_UNKNOWN_NS = 0, RSS_NO_NS = 1, RSS0_91_NS = 2, RSS0_9_NS = 3, RSS0_92_NS = RSS_NO_NS, RSS2_0_NS = RSS_NO_NS, RSS1_0_NS = 4, ATOM0_3_NS = 5, DC_NS = 6, RSS2_0_ENC_NS = 7, RSS1_1_NS = 8, CONTENT_NS = 9, ATOM1_0_NS = 10, RDF_NS = 11, ATOMTRIPLES_NS = 12, ITUNES_NS = 13, RAPTOR_RSS_NAMESPACES_SIZE = ITUNES_NS + 1 } rss_info_namespace; typedef struct { const char *uri_string; const char *prefix; } raptor_rss_namespace_info; extern const raptor_rss_namespace_info raptor_rss_namespaces_info[RAPTOR_RSS_NAMESPACES_SIZE]; #define RAPTOR_RSS_INFO_FLAG_URI_VALUE 1 #define RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE 2 /* Namespaced elements used in feeds */ typedef struct { const char* name; rss_info_namespace nspace; int flags; raptor_rss_type block_type; } raptor_rss_field_info; /* Fields of typed nodes used in RSS */ typedef enum { RAPTOR_RSS_FIELD_TITLE, RAPTOR_RSS_FIELD_LINK, RAPTOR_RSS_FIELD_DESCRIPTION, RAPTOR_RSS_FIELD_URL, /* image */ RAPTOR_RSS_FIELD_NAME, /* textinput */ RAPTOR_RSS_FIELD_LANGUAGE, /* channel 0.91 */ RAPTOR_RSS_FIELD_RATING, /* channel 0.91 */ RAPTOR_RSS_FIELD_COPYRIGHT, /* channel 0.91 */ RAPTOR_RSS_FIELD_PUBDATE, /* channel 0.91, item 2.0 */ RAPTOR_RSS_FIELD_LASTBUILDDATE, /* channel 0.91 */ RAPTOR_RSS_FIELD_DOCS, /* channel 0.91 */ RAPTOR_RSS_FIELD_MANAGINGEDITOR,/* channel 0.91 */ RAPTOR_RSS_FIELD_WEBMASTER, /* channel 0.91 */ RAPTOR_RSS_FIELD_CLOUD, /* channel 0.92, 2.0 */ RAPTOR_RSS_FIELD_TTL, /* channel 2.0 */ RAPTOR_RSS_FIELD_WIDTH, /* image 0.91 */ RAPTOR_RSS_FIELD_HEIGHT, /* image 0.91 */ RAPTOR_RSS_FIELD_HOUR, /* skipHours 0.91 */ RAPTOR_RSS_FIELD_DAY, /* skipDays 0.91 */ RAPTOR_RSS_FIELD_GENERATOR, /* channel 0.92, 2.0 */ RAPTOR_RSS_FIELD_SOURCE, /* item 0.92, 2.0 */ RAPTOR_RSS_FIELD_AUTHOR, /* item 2.0 */ RAPTOR_RSS_FIELD_GUID, /* item 2.0 */ RAPTOR_RSS_FIELD_ENCLOSURE, /* item 0.92, 2.0 */ RAPTOR_RSS_RDF_ENCLOSURE, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_CLASS, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_URL, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_LENGTH, /* In RDF output, not an RSS field */ RAPTOR_RSS_RDF_ENCLOSURE_TYPE, /* In RDF output, not an RSS field */ RAPTOR_RSS_FIELD_LENGTH, /* item 0.92, 2.0 */ RAPTOR_RSS_FIELD_TYPE, /* item 0.92, 2.0 */ RAPTOR_RSS_FIELD_CATEGORY, /* item 0.92, 2.0, channel 2.0 */ RAPTOR_RSS_FIELD_COMMENTS, /* comments v? */ RAPTOR_RSS_FIELD_ITEMS, /* rss 1.0 items */ RAPTOR_RSS_FIELD_IMAGE, /* rss 1.0 property from channel->image) */ RAPTOR_RSS_FIELD_TEXTINPUT, /* rss 1.0 property from channel->textinput */ RAPTOR_RSS_FIELD_ATOM_COPYRIGHT, /* atom 0.3 copyright */ RAPTOR_RSS_FIELD_ATOM_CREATED, /* atom 0.3 created */ RAPTOR_RSS_FIELD_ATOM_ISSUED, /* atom 0.3 issued */ RAPTOR_RSS_FIELD_ATOM_MODIFIED, /* atom 0.3 modified */ RAPTOR_RSS_FIELD_ATOM_TAGLINE, /* atom 0.3 tagline */ /* atom 1.0 required fields */ RAPTOR_RSS_FIELD_ATOM_ID, /* atom 1.0 id */ RAPTOR_RSS_FIELD_ATOM_TITLE, /* atom 1.0 title */ RAPTOR_RSS_FIELD_ATOM_UPDATED, /* atom 1.0 updated */ /* atom 1.0 optional fields */ RAPTOR_RSS_FIELD_ATOM_AUTHOR, /* atom 1.0 author */ RAPTOR_RSS_FIELD_ATOM_CATEGORY, /* atom 1.0 category */ RAPTOR_RSS_FIELD_ATOM_CONTENT, /* atom 1.0 content */ RAPTOR_RSS_FIELD_ATOM_CONTRIBUTOR, /* atom 1.0 contributor */ RAPTOR_RSS_FIELD_ATOM_EMAIL, /* atom 1.0 email */ RAPTOR_RSS_FIELD_ATOM_ENTRY, /* atom 1.0 entry */ RAPTOR_RSS_FIELD_ATOM_FEED, /* atom 1.0 feed */ RAPTOR_RSS_FIELD_ATOM_GENERATOR, /* atom 1.0 generator */ RAPTOR_RSS_FIELD_ATOM_ICON, /* atom 1.0 icon */ RAPTOR_RSS_FIELD_ATOM_LINK, /* atom 1.0 link */ RAPTOR_RSS_FIELD_ATOM_LOGO, /* atom 1.0 logo */ RAPTOR_RSS_FIELD_ATOM_NAME, /* atom 1.0 name */ RAPTOR_RSS_FIELD_ATOM_PUBLISHED, /* atom 1.0 published */ RAPTOR_RSS_FIELD_ATOM_RIGHTS, /* atom 1.0 rights */ RAPTOR_RSS_FIELD_ATOM_SOURCE, /* atom 1.0 source */ RAPTOR_RSS_FIELD_ATOM_SUBTITLE, /* atom 1.0 subtitle */ RAPTOR_RSS_FIELD_ATOM_SUMMARY, /* atom 1.0 summary */ RAPTOR_RSS_FIELD_ATOM_URI, /* atom 1.0 uri */ RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS, /* In RDF output, not atom field */ RAPTOR_RSS_RDF_ATOM_CATEGORY_CLASS, /* In RDF output, not atom field */ RAPTOR_RSS_RDF_ATOM_LINK_CLASS, /* In RDF output, not atom field */ RAPTOR_RSS_FIELD_ATOM_LABEL, /* atom 1.0 attribute label */ RAPTOR_RSS_FIELD_ATOM_SCHEME, /* atom 1.0 attribute scheme */ RAPTOR_RSS_FIELD_ATOM_TERM, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_HREF, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_REL, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_TYPE, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_HREFLANG, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_ATOM_LENGTH, /* atom 1.0 attribute term */ RAPTOR_RSS_FIELD_DC_TITLE, /* DC title */ RAPTOR_RSS_FIELD_DC_CONTRIBUTOR, /* DC contributor */ RAPTOR_RSS_FIELD_DC_CREATOR, /* DC creator */ RAPTOR_RSS_FIELD_DC_PUBLISHER, /* DC publisher */ RAPTOR_RSS_FIELD_DC_SUBJECT, /* DC subject */ RAPTOR_RSS_FIELD_DC_DESCRIPTION, /* DC description */ RAPTOR_RSS_FIELD_DC_DATE, /* DC date */ RAPTOR_RSS_FIELD_DC_TYPE, /* DC type */ RAPTOR_RSS_FIELD_DC_FORMAT, /* DC format */ RAPTOR_RSS_FIELD_DC_IDENTIFIER, /* DC identifier */ RAPTOR_RSS_FIELD_DC_LANGUAGE, /* DC language */ RAPTOR_RSS_FIELD_DC_RELATION, /* DC relation */ RAPTOR_RSS_FIELD_DC_SOURCE, /* DC source */ RAPTOR_RSS_FIELD_DC_COVERAGE, /* DC coverage */ RAPTOR_RSS_FIELD_DC_RIGHTS, /* DC rights */ RAPTOR_RSS_FIELD_CONTENT_ENCODED, /* rss 1.0 module content:encoded */ RAPTOR_RSS_FIELD_AT_CONTENT_TYPE, /* at:contentType */ RAPTOR_RSS_FIELD_ITUNES_AUTHOR, RAPTOR_RSS_FIELD_ITUNES_SUBTITLE, RAPTOR_RSS_FIELD_ITUNES_SUMARY, RAPTOR_RSS_FIELD_ITUNES_KEYWORDS, RAPTOR_RSS_FIELD_ITUNES_EXPLICIT, RAPTOR_RSS_FIELD_ITUNES_IMAGE, RAPTOR_RSS_FIELD_ITUNES_NAME, RAPTOR_RSS_FIELD_ITUNES_OWNER, RAPTOR_RSS_FIELD_ITUNES_BLOCK, RAPTOR_RSS_FIELD_ITUNES_CATEGORY, RAPTOR_RSS_FIELD_ITUNES_EMAIL, RAPTOR_RSS_FIELD_UNKNOWN, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELDS_SIZE = RAPTOR_RSS_FIELD_UNKNOWN } raptor_rss_fields_type; extern const raptor_rss_field_info raptor_rss_fields_info[RAPTOR_RSS_FIELDS_SIZE+2]; typedef struct raptor_rss_field_s raptor_rss_field; typedef int (*raptor_rss_field_conversion)(raptor_rss_field* from_field, raptor_rss_field* to_field); typedef struct { raptor_rss_fields_type from; raptor_rss_fields_type to; raptor_rss_field_conversion conversion; } raptor_field_pair; extern const raptor_field_pair raptor_atom_to_rss[]; #define RAPTOR_RSS_LINK_HREF_URL_OFFSET 0 #define RAPTOR_RSS_LINK_REL_STRING_OFFSET 0 #define RSS_BLOCK_FIELD_TYPE_URL 0 #define RSS_BLOCK_FIELD_TYPE_STRING 1 #define RSS_BLOCK_MAX_URLS 1 #define RSS_BLOCK_MAX_STRINGS 5 /* Feed metadata blocks support (was raptor_rss_enclosure) */ struct raptor_rss_block_s { raptor_rss_type rss_type; /* enclosure: subject node URI/blank node */ raptor_term *identifier; /* enclosure: node RAPTOR_RSS_ENCLOSURE category: node RAPTOR_ATOM_CATEGORY person: node RAPTOR_ATOM_AUTHOR or RAPTOR_ATOM_CONTRIBUTOR link: node RAPTOR_ATOM_LINK */ raptor_uri *node_type; /* enclosure: 0: where enclosure is located - @url attr (required) atom category: 0: @scheme attr (optional) rss category: 0: @domain attr (optional) rss source: 0: @url attr (required) person: 0: @atom:uri attr (optional) link: 0: @href attr (required) */ raptor_uri *urls[RSS_BLOCK_MAX_URLS]; /* enclosure: 0: content length @length attr (required) 1: content type @type attr (required) atom category: 0: @term attr (required) 1: @label attr (optional) person: 0: @atom:name attr (required) 1: @atom:email attr (optional) link: 0: @length attr (optional) 1: @type attr (optional) 2: @rel attr (optional) 3: @hreflang attr (optional) 4: @title attr (optional) */ char *strings[RSS_BLOCK_MAX_STRINGS]; /* next in list */ struct raptor_rss_block_s* next; }; typedef struct raptor_rss_block_s raptor_rss_block; #define RAPTOR_RSS_ITEM_CONTAINER 1 #define RAPTOR_RSS_ITEM_BLOCK 2 typedef struct { const char* name; rss_info_namespace nspace; int flags; /* RDF class URI */ raptor_rss_fields_type cls; /* RDF predicate URI to connect to the instance of this item */ raptor_rss_fields_type predicate; } raptor_rss_item_info; extern const raptor_rss_item_info raptor_rss_items_info[RAPTOR_RSS_COMMON_SIZE+1]; #define RAPTOR_RSS_BLOCKS_SIZE 17 /* Metadata blocks info */ typedef struct { /* metadata block type it applies to */ raptor_rss_type type; /* XML attribute (or NULL for field to use to store CDATA) */ const char *attribute; /* How that attribute should be interpreted: url or string */ int attribute_type; /* Index into urls/strings array to store it */ int offset; /* RDF predicate this maps to */ raptor_rss_fields_type field; } raptor_rss_block_field_info; extern const raptor_rss_block_field_info raptor_rss_block_fields_info[RAPTOR_RSS_BLOCKS_SIZE+1]; struct raptor_rss_field_s { raptor_world* world; unsigned char* value; raptor_uri* uri; struct raptor_rss_field_s* next; /* this field was mapped from another vocab */ unsigned int is_mapped:1; /* value is XML */ unsigned int is_xml:1; }; #define RAPTOR_RSS_FIELD_MAPPED /* RSS items (instances of typed nodes) containing fields */ struct raptor_rss_item_s { raptor_world* world; raptor_uri *uri; raptor_term* term; const raptor_rss_item_info *node_type; int node_typei; raptor_rss_field* fields[RAPTOR_RSS_FIELDS_SIZE]; raptor_rss_block* blocks; int fields_count; struct raptor_rss_item_s* next; /* Triples with this item as subject and do not fit in @fields */ raptor_sequence* triples; }; typedef struct raptor_rss_item_s raptor_rss_item; /* raptor_rss_common.c */ #define RAPTOR_RSS_N_CONCEPTS 1 #define RAPTOR_RSS_RSS_items_URI(rss_model) ((rss_model)->concepts[0]) typedef struct { raptor_world* world; /* RAPTOR_RSS_CHANNEL, RAPTOR_RSS_IMAGE, RAPTOR_RSS_TEXTINPUT */ raptor_rss_item* common[RAPTOR_RSS_COMMON_SIZE]; /* list of items RAPTOR_RSS_ITEM */ raptor_rss_item* items; /* this points to the last one added, so we can append easy */ raptor_rss_item* last; /* item count */ int items_count; raptor_uri* concepts[RAPTOR_RSS_N_CONCEPTS]; raptor_namespace_stack *nstack; } raptor_rss_model; /* raptor_rss_common.c */ int raptor_rss_common_init(raptor_world* world); void raptor_rss_common_terminate(raptor_world* world); void raptor_rss_model_init(raptor_world* world, raptor_rss_model* rss_model); void raptor_rss_model_clear(raptor_rss_model* rss_model); raptor_rss_item* raptor_new_rss_item(raptor_world* world); int raptor_rss_model_add_item(raptor_rss_model* rss_model); raptor_rss_item* raptor_rss_model_add_common(raptor_rss_model* rss_model, raptor_rss_type type); raptor_rss_item* raptor_rss_model_get_common(raptor_rss_model* rss_model, raptor_rss_type type); void raptor_clear_rss_item(raptor_rss_item* item); void raptor_free_rss_item(raptor_rss_item* item); void raptor_rss_item_add_block(raptor_rss_item* item, raptor_rss_block *block); void raptor_rss_item_add_field(raptor_rss_item* item, int type, raptor_rss_field* field); int raptor_rss_item_equals_statement_subject(const raptor_rss_item *item, const raptor_statement *statement); int raptor_rss_item_set_uri(raptor_rss_item *item, raptor_uri* uri); raptor_rss_block *raptor_new_rss_block(raptor_world *world, raptor_rss_type rss_type, raptor_term* block_term); void raptor_free_rss_block(raptor_rss_block *block); raptor_rss_field* raptor_rss_new_field(raptor_world* world); void raptor_rss_field_free(raptor_rss_field* field); #define RAPTOR_ISO_DATE_LEN 20 int raptor_rss_format_iso_date(char* buffer, size_t len, time_t unix_time); int raptor_rss_set_date_field(raptor_rss_field* field, time_t unix_time); int raptor_rss_date_uplift(raptor_rss_field* to_field, const unsigned char *date_string); #ifdef __cplusplus } #endif #endif raptor2-2.0.15/src/raptor_guess.c0000644000175000017500000001643612020170223013560 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_guess.c - Raptor guessing real parser implementation * * Copyright (C) 2005-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * guess parser object */ struct raptor_guess_parser_context_s { /* content type got from URI request */ char* content_type; /* URI from start_parse */ raptor_uri* uri; /* Non-0 when we need to guess */ int do_guess; /* Actual parser to use */ raptor_parser* parser; }; typedef struct raptor_guess_parser_context_s raptor_guess_parser_context; static int raptor_guess_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_guess_parser_context *guess_parser = (raptor_guess_parser_context*)rdf_parser->context; guess_parser->content_type = NULL; guess_parser->do_guess = 1; return 0; } static void raptor_guess_parse_terminate(raptor_parser *rdf_parser) { raptor_guess_parser_context *guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(guess_parser->content_type) RAPTOR_FREE(char*, guess_parser->content_type); if(guess_parser->parser) raptor_free_parser(guess_parser->parser); } static void raptor_guess_parse_content_type_handler(raptor_parser* rdf_parser, const char* content_type) { raptor_guess_parser_context* guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(content_type) { const char *p; size_t len; if((p = strchr(content_type,';'))) len = p-content_type; else len = strlen(content_type); guess_parser->content_type = RAPTOR_MALLOC(char*, len + 1); memcpy(guess_parser->content_type, content_type, len); guess_parser->content_type[len]='\0'; RAPTOR_DEBUG2("Got content type '%s'\n", guess_parser->content_type); } } static int raptor_guess_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end) { raptor_guess_parser_context* guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(guess_parser->do_guess) { const unsigned char *identifier = NULL; const char *name; guess_parser->do_guess = 0; if(rdf_parser->base_uri) identifier = raptor_uri_as_string(rdf_parser->base_uri); name = raptor_world_guess_parser_name(rdf_parser->world, NULL, guess_parser->content_type, buffer, len, identifier); if(!name) { raptor_parser_error(rdf_parser, "Failed to guess parser from content type '%s'", guess_parser->content_type ? guess_parser->content_type : "(none)"); raptor_parser_parse_abort(rdf_parser); if(guess_parser->parser) { raptor_free_parser(guess_parser->parser); guess_parser->parser = NULL; } return 1; } else { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Guessed parser name '%s'\n", name); #endif /* If there is an existing guessed parser factory present and * it's different from the wanted parser, free it */ if(guess_parser->parser) { raptor_parser_factory* factory = raptor_world_get_parser_factory(rdf_parser->world, name); if(guess_parser->parser->factory != factory) { raptor_free_parser(guess_parser->parser); guess_parser->parser = NULL; } } if(!guess_parser->parser) { guess_parser->parser = raptor_new_parser(rdf_parser->world, name); if(!guess_parser->parser) return 1; } /* copy any user data to the grddl parser */ if(raptor_parser_copy_user_state(guess_parser->parser, rdf_parser)) return 1; if(raptor_parser_parse_start(guess_parser->parser, rdf_parser->base_uri)) return 1; } } /* now we can pass on calls to internal guess_parser */ return raptor_parser_parse_chunk(guess_parser->parser, buffer, len, is_end); } static const char* raptor_guess_accept_header(raptor_parser* rdf_parser) { return raptor_parser_get_accept_header_all(rdf_parser->world); } static const char* raptor_guess_guess_get_name(raptor_parser* rdf_parser) { raptor_guess_parser_context *guess_parser; guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(guess_parser) return raptor_parser_get_name(guess_parser->parser); else return rdf_parser->factory->desc.names[0]; } static const raptor_syntax_description* raptor_guess_guess_get_description(raptor_parser* rdf_parser) { raptor_guess_parser_context *guess_parser; guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(guess_parser && guess_parser->parser) return raptor_parser_get_description(guess_parser->parser); else return &rdf_parser->factory->desc; } static raptor_locator * raptor_guess_guess_get_locator(raptor_parser *rdf_parser) { raptor_guess_parser_context *guess_parser; guess_parser = (raptor_guess_parser_context*)rdf_parser->context; if(guess_parser && guess_parser->parser) return raptor_parser_get_locator(guess_parser->parser); else return &rdf_parser->locator; } static const char* const guess_names[2] = { "guess", NULL }; static int raptor_guess_parser_register_factory(raptor_parser_factory *factory) { factory->desc.names = guess_names; factory->desc.mime_types = NULL; factory->desc.label = "Pick the parser to use using content type and URI"; factory->desc.uri_strings = NULL; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_guess_parser_context); factory->init = raptor_guess_parse_init; factory->terminate = raptor_guess_parse_terminate; factory->chunk = raptor_guess_parse_chunk; factory->content_type_handler = raptor_guess_parse_content_type_handler; factory->accept_header = raptor_guess_accept_header; factory->get_name = raptor_guess_guess_get_name; factory->get_description = raptor_guess_guess_get_description; factory->get_locator = raptor_guess_guess_get_locator; return 0; } int raptor_init_parser_guess(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_guess_parser_register_factory); } raptor2-2.0.15/src/turtle_parser.c0000644000175000017500000032546112425333257013760 00000000000000/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 2 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Substitute the variable and function names. */ #define yyparse turtle_parser_parse #define yylex turtle_parser_lex #define yyerror turtle_parser_error #define yydebug turtle_parser_debug #define yynerrs turtle_parser_nerrs /* Copy the first part of user declarations. */ #line 31 "./turtle_parser.y" /* yacc.c:339 */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "raptor2.h" #include "raptor_internal.h" #include #define YY_NO_UNISTD_H 1 #include #include /* Set RAPTOR_DEBUG to 3 for super verbose parsing - watching the shift/reduces */ #if 0 #undef RAPTOR_DEBUG #define RAPTOR_DEBUG 3 #endif /* Make verbose error messages for syntax errors */ #define YYERROR_VERBOSE 1 /* Fail with an debug error message if RAPTOR_DEBUG > 1 */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 #define YYERROR_MSG(msg) do { fputs("** YYERROR ", RAPTOR_DEBUG_FH); fputs(msg, RAPTOR_DEBUG_FH); fputc('\n', RAPTOR_DEBUG_FH); YYERROR; } while(0) #else #define YYERROR_MSG(ignore) YYERROR #endif #define YYERR_MSG_GOTO(label,msg) do { errmsg = msg; goto label; } while(0) /* Slow down the grammar operation and watch it work */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 #undef YYDEBUG #define YYDEBUG 1 #endif #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif /* the lexer does not seem to track this */ #undef RAPTOR_TURTLE_USE_ERROR_COLUMNS /* set api.push-pull to "push" if this is defined */ #undef TURTLE_PUSH_PARSE /* Prototypes */ int turtle_parser_error(raptor_parser* rdf_parser, void* scanner, const char *msg); /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex turtle_lexer_lex /* Prototypes for local functions */ static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_statement *triple); #line 146 "turtle_parser.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "turtle_parser.tab.h". */ #ifndef YY_TURTLE_PARSER_TURTLE_PARSER_TAB_H_INCLUDED # define YY_TURTLE_PARSER_TURTLE_PARSER_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int turtle_parser_debug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { A = 258, HAT = 259, DOT = 260, COMMA = 261, SEMICOLON = 262, LEFT_SQUARE = 263, RIGHT_SQUARE = 264, LEFT_ROUND = 265, RIGHT_ROUND = 266, LEFT_CURLY = 267, RIGHT_CURLY = 268, TRUE_TOKEN = 269, FALSE_TOKEN = 270, PREFIX = 271, BASE = 272, SPARQL_PREFIX = 273, SPARQL_BASE = 274, STRING_LITERAL = 275, URI_LITERAL = 276, GRAPH_NAME_LEFT_CURLY = 277, BLANK_LITERAL = 278, QNAME_LITERAL = 279, IDENTIFIER = 280, LANGTAG = 281, INTEGER_LITERAL = 282, FLOATING_LITERAL = 283, DECIMAL_LITERAL = 284, ERROR_TOKEN = 285 }; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE YYSTYPE; union YYSTYPE { #line 136 "./turtle_parser.y" /* yacc.c:355 */ unsigned char *string; raptor_term *identifier; raptor_sequence *sequence; raptor_uri *uri; #line 224 "turtle_parser.c" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif int turtle_parser_parse (raptor_parser* rdf_parser, void* yyscanner); #endif /* !YY_TURTLE_PARSER_TURTLE_PARSER_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ #line 238 "turtle_parser.c" /* yacc.c:358 */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE # if (defined __GNUC__ \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C # define YY_ATTRIBUTE(Spec) __attribute__(Spec) # else # define YY_ATTRIBUTE(Spec) /* empty */ # endif #endif #ifndef YY_ATTRIBUTE_PURE # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) #endif #ifndef YY_ATTRIBUTE_UNUSED # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 165 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 31 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 27 /* YYNRULES -- Number of rules. */ #define YYNRULES 63 /* YYNSTATES -- Number of states. */ #define YYNSTATES 87 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 285 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 206, 206, 211, 210, 243, 242, 268, 269, 272, 273, 276, 277, 280, 281, 284, 285, 286, 289, 330, 371, 375, 415, 459, 499, 543, 553, 566, 627, 659, 670, 670, 673, 707, 744, 752, 762, 766, 770, 777, 784, 788, 792, 796, 800, 813, 825, 848, 871, 887, 902, 913, 926, 939, 956, 969, 985, 999, 1016, 1020, 1027, 1045, 1099, 1201 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "\"a\"", "\"^\"", "\".\"", "\",\"", "\";\"", "\"[\"", "\"]\"", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"true\"", "\"false\"", "\"@prefix\"", "\"@base\"", "\"PREFIX\"", "\"BASE\"", "\"string literal\"", "\"URI literal\"", "\"Graph URI literal {\"", "\"blank node\"", "\"QName\"", "\"identifier\"", "\"langtag\"", "\"integer literal\"", "\"floating point literal\"", "\"decimal literal\"", "ERROR_TOKEN", "$accept", "Document", "graph", "$@1", "$@2", "graphBody", "triplesList", "dotTriplesList", "statementList", "statement", "triples", "objectList", "itemList", "verb", "predicateObjectList", "directive", "prefix", "base", "subject", "predicate", "object", "literal", "resource", "predicateObjectListOpt", "blankNode", "blankNodePropertyList", "collection", YY_NULLPTR }; #endif # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285 }; # endif #define YYPACT_NINF -14 #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-14))) #define YYTABLE_NINF -11 #define yytable_value_is_error(Yytable_value) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { -14, 6, 9, -14, 10, 15, 92, -14, -11, 14, -3, 16, -14, -14, -14, -14, -14, -14, 19, -14, -14, -14, 15, -14, -14, 15, -14, -14, -14, 136, 22, -14, -14, 29, -14, -14, -14, 8, -14, -14, -14, 114, -14, -14, -14, -14, -14, -14, 48, 20, 35, 23, -14, 48, -14, 22, -14, 37, -14, 15, -14, -13, 41, -14, -14, 46, -14, 49, -14, 55, -14, -14, 50, 136, 136, -14, -14, -8, -14, 75, -14, -14, -14, 37, -14, -14, -14 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 14, 0, 0, 1, 0, 59, 0, 5, 0, 0, 0, 0, 56, 3, 60, 57, 16, 13, 0, 15, 30, 31, 0, 36, 37, 59, 38, 20, 26, 0, 58, 25, 39, 0, 63, 54, 55, 50, 51, 52, 53, 0, 24, 44, 40, 41, 43, 42, 0, 0, 0, 0, 35, 0, 17, 18, 19, 28, 22, 29, 61, 0, 45, 62, 23, 0, 7, 9, 11, 0, 34, 33, 0, 0, 0, 48, 49, 0, 6, 0, 32, 4, 21, 27, 46, 47, 12 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -14, -14, -14, -14, -14, 11, -14, -14, -14, -14, 3, -12, -14, 7, 43, -14, -14, -14, -14, -14, 1, -14, -2, 42, -1, 0, 2 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 16, 53, 48, 65, 66, 67, 2, 17, 68, 57, 41, 29, 30, 19, 20, 21, 22, 31, 58, 43, 44, 33, 45, 46, 47 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int8 yytable[] = { 23, 24, 25, 32, 26, 18, 3, 42, 75, -2, 4, 76, 61, 84, 49, 27, 85, 5, 28, 6, 32, 7, 51, 32, 54, 8, 9, 10, 11, 59, 12, 13, 14, 15, 62, 50, 12, 52, 60, 15, 70, 69, 64, 73, 71, 77, 23, 24, 25, 4, 26, 23, 24, 25, 79, 26, 5, 32, 6, 78, 80, -8, 83, 81, 72, 55, 74, 56, 0, 12, 0, 14, 15, 0, 82, 0, 4, 23, 24, 25, 0, 26, 86, 5, 0, 6, 0, 0, -10, 0, 0, 0, 0, 0, 0, 0, 12, 0, 14, 15, 5, 0, 6, 34, 0, 0, 35, 36, 0, 0, 0, 0, 37, 12, 0, 14, 15, 0, 0, 38, 39, 40, 5, 0, 6, 63, 0, 0, 35, 36, 0, 0, 0, 0, 37, 12, 0, 14, 15, 0, 0, 38, 39, 40, 5, 0, 6, 0, 0, 0, 35, 36, 0, 0, 0, 0, 37, 12, 0, 14, 15, 0, 0, 38, 39, 40 }; static const yytype_int8 yycheck[] = { 2, 2, 2, 5, 2, 2, 0, 6, 21, 0, 1, 24, 4, 21, 25, 5, 24, 8, 3, 10, 22, 12, 25, 25, 5, 16, 17, 18, 19, 7, 21, 22, 23, 24, 26, 21, 21, 21, 9, 24, 5, 21, 41, 6, 21, 4, 48, 48, 48, 1, 48, 53, 53, 53, 5, 53, 8, 59, 10, 13, 5, 13, 74, 13, 53, 22, 59, 25, -1, 21, -1, 23, 24, -1, 73, -1, 1, 79, 79, 79, -1, 79, 79, 8, -1, 10, -1, -1, 13, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, 8, -1, 10, 11, -1, -1, 14, 15, -1, -1, -1, -1, 20, 21, -1, 23, 24, -1, -1, 27, 28, 29, 8, -1, 10, 11, -1, -1, 14, 15, -1, -1, -1, -1, 20, 21, -1, 23, 24, -1, -1, 27, 28, 29, 8, -1, 10, -1, -1, -1, 14, 15, -1, -1, -1, -1, 20, 21, -1, 23, 24, -1, -1, 27, 28, 29 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 32, 39, 0, 1, 8, 10, 12, 16, 17, 18, 19, 21, 22, 23, 24, 33, 40, 41, 46, 47, 48, 49, 53, 55, 56, 57, 5, 3, 44, 45, 50, 53, 54, 11, 14, 15, 20, 27, 28, 29, 43, 51, 52, 53, 55, 56, 57, 35, 25, 21, 25, 21, 34, 5, 45, 54, 42, 51, 7, 9, 4, 26, 11, 51, 36, 37, 38, 41, 21, 5, 21, 36, 6, 44, 21, 24, 4, 13, 5, 5, 13, 51, 42, 21, 24, 41 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 31, 32, 34, 33, 35, 33, 36, 36, 37, 37, 38, 38, 39, 39, 40, 40, 40, 41, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, 49, 50, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 54, 54, 55, 56, 57, 57 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 0, 4, 0, 4, 1, 0, 1, 2, 1, 3, 2, 0, 1, 1, 2, 2, 2, 2, 3, 1, 2, 1, 1, 1, 4, 2, 2, 1, 1, 4, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 3, 3, 2 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (rdf_parser, yyscanner, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, rdf_parser, yyscanner); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*----------------------------------------. | Print this symbol's value on YYOUTPUT. | `----------------------------------------*/ static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, raptor_parser* rdf_parser, void* yyscanner) { FILE *yyo = yyoutput; YYUSE (yyo); YYUSE (rdf_parser); YYUSE (yyscanner); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, raptor_parser* rdf_parser, void* yyscanner) { YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, rdf_parser, yyscanner); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, raptor_parser* rdf_parser, void* yyscanner) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)]) , rdf_parser, yyscanner); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule, rdf_parser, yyscanner); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T yystrlen (const char *yystr) { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); default: yyformat = YY_("syntax error"); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, raptor_parser* rdf_parser, void* yyscanner) { YYUSE (yyvaluep); YYUSE (rdf_parser); YYUSE (yyscanner); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { case 20: /* "string literal" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1151 "turtle_parser.c" /* yacc.c:1257 */ break; case 21: /* "URI literal" */ #line 189 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).uri)) raptor_free_uri(((*yyvaluep).uri)); } #line 1160 "turtle_parser.c" /* yacc.c:1257 */ break; case 23: /* "blank node" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1169 "turtle_parser.c" /* yacc.c:1257 */ break; case 24: /* "QName" */ #line 189 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).uri)) raptor_free_uri(((*yyvaluep).uri)); } #line 1178 "turtle_parser.c" /* yacc.c:1257 */ break; case 25: /* "identifier" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1187 "turtle_parser.c" /* yacc.c:1257 */ break; case 26: /* "langtag" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1196 "turtle_parser.c" /* yacc.c:1257 */ break; case 27: /* "integer literal" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1205 "turtle_parser.c" /* yacc.c:1257 */ break; case 28: /* "floating point literal" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1214 "turtle_parser.c" /* yacc.c:1257 */ break; case 29: /* "decimal literal" */ #line 184 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).string)) RAPTOR_FREE(char*, ((*yyvaluep).string)); } #line 1223 "turtle_parser.c" /* yacc.c:1257 */ break; case 42: /* objectList */ #line 199 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).sequence)) raptor_free_sequence(((*yyvaluep).sequence)); } #line 1232 "turtle_parser.c" /* yacc.c:1257 */ break; case 43: /* itemList */ #line 199 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).sequence)) raptor_free_sequence(((*yyvaluep).sequence)); } #line 1241 "turtle_parser.c" /* yacc.c:1257 */ break; case 44: /* verb */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1250 "turtle_parser.c" /* yacc.c:1257 */ break; case 45: /* predicateObjectList */ #line 199 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).sequence)) raptor_free_sequence(((*yyvaluep).sequence)); } #line 1259 "turtle_parser.c" /* yacc.c:1257 */ break; case 49: /* subject */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1268 "turtle_parser.c" /* yacc.c:1257 */ break; case 50: /* predicate */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1277 "turtle_parser.c" /* yacc.c:1257 */ break; case 51: /* object */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1286 "turtle_parser.c" /* yacc.c:1257 */ break; case 52: /* literal */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1295 "turtle_parser.c" /* yacc.c:1257 */ break; case 53: /* resource */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1304 "turtle_parser.c" /* yacc.c:1257 */ break; case 54: /* predicateObjectListOpt */ #line 199 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).sequence)) raptor_free_sequence(((*yyvaluep).sequence)); } #line 1313 "turtle_parser.c" /* yacc.c:1257 */ break; case 55: /* blankNode */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1322 "turtle_parser.c" /* yacc.c:1257 */ break; case 57: /* collection */ #line 194 "./turtle_parser.y" /* yacc.c:1257 */ { if(((*yyvaluep).identifier)) raptor_free_term(((*yyvaluep).identifier)); } #line 1331 "turtle_parser.c" /* yacc.c:1257 */ break; default: break; } YY_IGNORE_MAYBE_UNINITIALIZED_END } /*----------. | yyparse. | `----------*/ int yyparse (raptor_parser* rdf_parser, void* yyscanner) { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ YY_INITIAL_VALUE (static YYSTYPE yyval_default;) YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: 'yyss': related to states. 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (&yylval, yyscanner); } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 3: #line 211 "./turtle_parser.y" /* yacc.c:1646 */ { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, yyscanner, "{ ... } is not allowed in Turtle"); else { if(turtle_parser->graph_name) raptor_free_term(turtle_parser->graph_name); turtle_parser->graph_name = raptor_new_term_from_uri(rdf_parser->world, (yyvsp[0].uri)); raptor_free_uri((yyvsp[0].uri)); raptor_parser_start_graph(rdf_parser, turtle_parser->graph_name->value.uri, 1); } } #line 1612 "turtle_parser.c" /* yacc.c:1646 */ break; case 4: #line 228 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->trig) { raptor_parser_end_graph(rdf_parser, turtle_parser->graph_name->value.uri, 1); raptor_free_term(turtle_parser->graph_name); turtle_parser->graph_name = NULL; rdf_parser->emitted_default_graph = 0; } } #line 1630 "turtle_parser.c" /* yacc.c:1646 */ break; case 5: #line 243 "./turtle_parser.y" /* yacc.c:1646 */ { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, yyscanner, "{ ... } is not allowed in Turtle"); else { raptor_parser_start_graph(rdf_parser, NULL, 1); rdf_parser->emitted_default_graph++; } } #line 1647 "turtle_parser.c" /* yacc.c:1646 */ break; case 6: #line 256 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->trig) { raptor_parser_end_graph(rdf_parser, NULL, 1); rdf_parser->emitted_default_graph = 0; } } #line 1661 "turtle_parser.c" /* yacc.c:1646 */ break; case 18: #line 290 "./turtle_parser.y" /* yacc.c:1646 */ { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("triples 1\n subject="); if((yyvsp[-1].identifier)) raptor_term_print_as_ntriples((yyvsp[-1].identifier), stdout); else fputs("NULL", stdout); if((yyvsp[0].sequence)) { printf("\n predicateObjectList (reverse order to syntax)="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n"); } else printf("\n and empty predicateObjectList\n"); #endif if((yyvsp[-1].identifier) && (yyvsp[0].sequence)) { /* have subject and non-empty property list, handle it */ for(i = 0; i < raptor_sequence_size((yyvsp[0].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[0].sequence), i); t2->subject = raptor_term_copy((yyvsp[-1].identifier)); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution predicateObjectList="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n\n"); #endif for(i = 0; i < raptor_sequence_size((yyvsp[0].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[0].sequence), i); raptor_turtle_generate_statement(rdf_parser, t2); } } if((yyvsp[0].sequence)) raptor_free_sequence((yyvsp[0].sequence)); if((yyvsp[-1].identifier)) raptor_free_term((yyvsp[-1].identifier)); } #line 1706 "turtle_parser.c" /* yacc.c:1646 */ break; case 19: #line 331 "./turtle_parser.y" /* yacc.c:1646 */ { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("triples 2\n blankNodePropertyList="); if((yyvsp[-1].identifier)) raptor_term_print_as_ntriples((yyvsp[-1].identifier), stdout); else fputs("NULL", stdout); if((yyvsp[0].sequence)) { printf("\n predicateObjectListOpt (reverse order to syntax)="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n"); } else printf("\n and empty predicateObjectListOpt\n"); #endif if((yyvsp[-1].identifier) && (yyvsp[0].sequence)) { /* have subject and non-empty predicate object list, handle it */ for(i = 0; i < raptor_sequence_size((yyvsp[0].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[0].sequence), i); t2->subject = raptor_term_copy((yyvsp[-1].identifier)); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution predicateObjectListOpt="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n\n"); #endif for(i = 0; i < raptor_sequence_size((yyvsp[0].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[0].sequence), i); raptor_turtle_generate_statement(rdf_parser, t2); } } if((yyvsp[0].sequence)) raptor_free_sequence((yyvsp[0].sequence)); if((yyvsp[-1].identifier)) raptor_free_term((yyvsp[-1].identifier)); } #line 1751 "turtle_parser.c" /* yacc.c:1646 */ break; case 21: #line 376 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 1\n"); if((yyvsp[0].identifier)) { printf(" object=\n"); raptor_term_print_as_ntriples((yyvsp[0].identifier), stdout); printf("\n"); } else printf(" and empty object\n"); if((yyvsp[-2].sequence)) { printf(" objectList="); raptor_sequence_print((yyvsp[-2].sequence), stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!(yyvsp[0].identifier)) (yyval.sequence) = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, (yyvsp[0].identifier), NULL); if(!triple) { raptor_free_sequence((yyvsp[-2].sequence)); YYERROR; } if(raptor_sequence_push((yyvsp[-2].sequence), triple)) { raptor_free_sequence((yyvsp[-2].sequence)); YYERROR; } (yyval.sequence) = (yyvsp[-2].sequence); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } #line 1795 "turtle_parser.c" /* yacc.c:1646 */ break; case 22: #line 416 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 2\n"); if((yyvsp[0].identifier)) { printf(" object=\n"); raptor_term_print_as_ntriples((yyvsp[0].identifier), stdout); printf("\n"); } else printf(" and empty object\n"); #endif if(!(yyvsp[0].identifier)) (yyval.sequence) = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, (yyvsp[0].identifier), NULL); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG (yyval.sequence) = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, (raptor_data_print_handler)raptor_statement_print); #else (yyval.sequence) = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, NULL); #endif if(!(yyval.sequence)) { raptor_free_statement(triple); YYERROR; } if(raptor_sequence_push((yyval.sequence), triple)) { raptor_free_sequence((yyval.sequence)); (yyval.sequence) = NULL; YYERROR; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } #line 1841 "turtle_parser.c" /* yacc.c:1646 */ break; case 23: #line 460 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 1\n"); if((yyvsp[0].identifier)) { printf(" object=\n"); raptor_term_print_as_ntriples((yyvsp[0].identifier), stdout); printf("\n"); } else printf(" and empty object\n"); if((yyvsp[-1].sequence)) { printf(" objectList="); raptor_sequence_print((yyvsp[-1].sequence), stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!(yyvsp[0].identifier)) (yyval.sequence) = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, (yyvsp[0].identifier), NULL); if(!triple) { raptor_free_sequence((yyvsp[-1].sequence)); YYERROR; } if(raptor_sequence_push((yyvsp[-1].sequence), triple)) { raptor_free_sequence((yyvsp[-1].sequence)); YYERROR; } (yyval.sequence) = (yyvsp[-1].sequence); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } #line 1885 "turtle_parser.c" /* yacc.c:1646 */ break; case 24: #line 500 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 2\n"); if((yyvsp[0].identifier)) { printf(" object=\n"); raptor_term_print_as_ntriples((yyvsp[0].identifier), stdout); printf("\n"); } else printf(" and empty object\n"); #endif if(!(yyvsp[0].identifier)) (yyval.sequence) = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, (yyvsp[0].identifier), NULL); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG (yyval.sequence) = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, (raptor_data_print_handler)raptor_statement_print); #else (yyval.sequence) = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, NULL); #endif if(!(yyval.sequence)) { raptor_free_statement(triple); YYERROR; } if(raptor_sequence_push((yyval.sequence), triple)) { raptor_free_sequence((yyval.sequence)); (yyval.sequence) = NULL; YYERROR; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } } #line 1931 "turtle_parser.c" /* yacc.c:1646 */ break; case 25: #line 544 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("verb predicate="); raptor_term_print_as_ntriples((yyvsp[0].identifier), stdout); printf("\n"); #endif (yyval.identifier) = (yyvsp[0].identifier); } #line 1945 "turtle_parser.c" /* yacc.c:1646 */ break; case 26: #line 554 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("verb predicate = rdf:type (a)\n"); #endif (yyval.identifier) = raptor_term_copy(RAPTOR_RDF_type_term(rdf_parser->world)); if(!(yyval.identifier)) YYERROR; } #line 1959 "turtle_parser.c" /* yacc.c:1646 */ break; case 27: #line 567 "./turtle_parser.y" /* yacc.c:1646 */ { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("predicateObjectList 1\n verb="); raptor_term_print_as_ntriples((yyvsp[-1].identifier), stdout); printf("\n objectList="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n predicateObjectList="); raptor_sequence_print((yyvsp[-3].sequence), stdout); printf("\n\n"); #endif if((yyvsp[0].sequence) == NULL) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" empty objectList not processed\n"); #endif } else if((yyvsp[-1].identifier) && (yyvsp[0].sequence)) { /* non-empty property list, handle it */ for(i = 0; i < raptor_sequence_size((yyvsp[0].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[0].sequence), i); t2->predicate = raptor_term_copy((yyvsp[-1].identifier)); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n"); #endif } if((yyvsp[-3].sequence) == NULL) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" empty predicateObjectList not copied\n\n"); #endif } else if((yyvsp[-1].identifier) && (yyvsp[0].sequence) && (yyvsp[-3].sequence)) { while(raptor_sequence_size((yyvsp[0].sequence))) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_unshift((yyvsp[0].sequence)); if(raptor_sequence_push((yyvsp[-3].sequence), t2)) { raptor_free_sequence((yyvsp[-3].sequence)); raptor_free_term((yyvsp[-1].identifier)); raptor_free_sequence((yyvsp[0].sequence)); YYERROR; } } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after appending objectList (reverse order)="); raptor_sequence_print((yyvsp[-3].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[0].sequence)); } if((yyvsp[-1].identifier)) raptor_free_term((yyvsp[-1].identifier)); (yyval.sequence) = (yyvsp[-3].sequence); } #line 2024 "turtle_parser.c" /* yacc.c:1646 */ break; case 28: #line 628 "./turtle_parser.y" /* yacc.c:1646 */ { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("predicateObjectList 2\n verb="); raptor_term_print_as_ntriples((yyvsp[-1].identifier), stdout); if((yyvsp[0].sequence)) { printf("\n objectList="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n"); } else printf("\n and empty objectList\n"); #endif if((yyvsp[-1].identifier) && (yyvsp[0].sequence)) { for(i = 0; i < raptor_sequence_size((yyvsp[0].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[0].sequence), i); t2->predicate = raptor_term_copy((yyvsp[-1].identifier)); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[0].sequence), stdout); printf("\n\n"); #endif } if((yyvsp[-1].identifier)) raptor_free_term((yyvsp[-1].identifier)); (yyval.sequence) = (yyvsp[0].sequence); } #line 2060 "turtle_parser.c" /* yacc.c:1646 */ break; case 29: #line 660 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.sequence) = (yyvsp[-1].sequence); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("predicateObjectList 5\n trailing semicolon returning existing list "); raptor_sequence_print((yyval.sequence), stdout); printf("\n\n"); #endif } #line 2073 "turtle_parser.c" /* yacc.c:1646 */ break; case 32: #line 674 "./turtle_parser.y" /* yacc.c:1646 */ { unsigned char *prefix = (yyvsp[-2].string); raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)(rdf_parser->context); raptor_namespace *ns; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("directive PREFIX %s %s\n",((yyvsp[-2].string) ? (char*)(yyvsp[-2].string) : "(default)"), raptor_uri_as_string((yyvsp[-1].uri))); #endif if(prefix) { size_t len = strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix PREFIX : ... */ prefix = NULL; else prefix[len-1]='\0'; } } ns = raptor_new_namespace_from_uri(&turtle_parser->namespaces, prefix, (yyvsp[-1].uri), 0); if(ns) { raptor_namespaces_start_namespace(&turtle_parser->namespaces, ns); raptor_parser_start_namespace(rdf_parser, ns); } if((yyvsp[-2].string)) RAPTOR_FREE(char*, (yyvsp[-2].string)); raptor_free_uri((yyvsp[-1].uri)); if(!ns) YYERROR; } #line 2111 "turtle_parser.c" /* yacc.c:1646 */ break; case 33: #line 708 "./turtle_parser.y" /* yacc.c:1646 */ { unsigned char *prefix = (yyvsp[-1].string); raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)(rdf_parser->context); raptor_namespace *ns; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("directive @prefix %s %s.\n",((yyvsp[-1].string) ? (char*)(yyvsp[-1].string) : "(default)"), raptor_uri_as_string((yyvsp[0].uri))); #endif if(prefix) { size_t len = strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix @prefix : ... */ prefix = NULL; else prefix[len-1]='\0'; } } ns = raptor_new_namespace_from_uri(&turtle_parser->namespaces, prefix, (yyvsp[0].uri), 0); if(ns) { raptor_namespaces_start_namespace(&turtle_parser->namespaces, ns); raptor_parser_start_namespace(rdf_parser, ns); } if((yyvsp[-1].string)) RAPTOR_FREE(char*, (yyvsp[-1].string)); raptor_free_uri((yyvsp[0].uri)); if(!ns) YYERROR; } #line 2149 "turtle_parser.c" /* yacc.c:1646 */ break; case 34: #line 745 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri=(yyvsp[-1].uri); if(rdf_parser->base_uri) raptor_free_uri(rdf_parser->base_uri); rdf_parser->base_uri = uri; } #line 2161 "turtle_parser.c" /* yacc.c:1646 */ break; case 35: #line 753 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri=(yyvsp[0].uri); if(rdf_parser->base_uri) raptor_free_uri(rdf_parser->base_uri); rdf_parser->base_uri = uri; } #line 2173 "turtle_parser.c" /* yacc.c:1646 */ break; case 36: #line 763 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2181 "turtle_parser.c" /* yacc.c:1646 */ break; case 37: #line 767 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2189 "turtle_parser.c" /* yacc.c:1646 */ break; case 38: #line 771 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2197 "turtle_parser.c" /* yacc.c:1646 */ break; case 39: #line 778 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2205 "turtle_parser.c" /* yacc.c:1646 */ break; case 40: #line 785 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2213 "turtle_parser.c" /* yacc.c:1646 */ break; case 41: #line 789 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2221 "turtle_parser.c" /* yacc.c:1646 */ break; case 42: #line 793 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2229 "turtle_parser.c" /* yacc.c:1646 */ break; case 43: #line 797 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.identifier) = (yyvsp[0].identifier); } #line 2237 "turtle_parser.c" /* yacc.c:1646 */ break; case 44: #line 801 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("object literal="); raptor_term_print_as_ntriples((yyvsp[0].identifier), stdout); printf("\n"); #endif (yyval.identifier) = (yyvsp[0].identifier); } #line 2251 "turtle_parser.c" /* yacc.c:1646 */ break; case 45: #line 814 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + language string=\"%s\"\n", (yyvsp[-1].string)); #endif (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[-1].string), NULL, (yyvsp[0].string)); RAPTOR_FREE(char*, (yyvsp[-1].string)); RAPTOR_FREE(char*, (yyvsp[0].string)); if(!(yyval.identifier)) YYERROR; } #line 2267 "turtle_parser.c" /* yacc.c:1646 */ break; case 46: #line 826 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" uri=\"%s\"\n", (yyvsp[-3].string), (yyvsp[-2].string), raptor_uri_as_string((yyvsp[0].uri))); #endif if((yyvsp[0].uri)) { if((yyvsp[-2].string)) { raptor_parser_error(rdf_parser, "Language not allowed with datatyped literal"); RAPTOR_FREE(char*, (yyvsp[-2].string)); (yyvsp[-2].string) = NULL; } (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[-3].string), (yyvsp[0].uri), NULL); RAPTOR_FREE(char*, (yyvsp[-3].string)); raptor_free_uri((yyvsp[0].uri)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier) = NULL; } #line 2294 "turtle_parser.c" /* yacc.c:1646 */ break; case 47: #line 849 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" qname URI=<%s>\n", (yyvsp[-3].string), (yyvsp[-2].string), raptor_uri_as_string((yyvsp[0].uri))); #endif if((yyvsp[0].uri)) { if((yyvsp[-2].string)) { raptor_parser_error(rdf_parser, "Language not allowed with datatyped literal"); RAPTOR_FREE(char*, (yyvsp[-2].string)); (yyvsp[-2].string) = NULL; } (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[-3].string), (yyvsp[0].uri), NULL); RAPTOR_FREE(char*, (yyvsp[-3].string)); raptor_free_uri((yyvsp[0].uri)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier) = NULL; } #line 2321 "turtle_parser.c" /* yacc.c:1646 */ break; case 48: #line 872 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" uri=\"%s\"\n", (yyvsp[-2].string), raptor_uri_as_string((yyvsp[0].uri))); #endif if((yyvsp[0].uri)) { (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[-2].string), (yyvsp[0].uri), NULL); RAPTOR_FREE(char*, (yyvsp[-2].string)); raptor_free_uri((yyvsp[0].uri)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier) = NULL; } #line 2341 "turtle_parser.c" /* yacc.c:1646 */ break; case 49: #line 888 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" qname URI=<%s>\n", (yyvsp[-2].string), raptor_uri_as_string((yyvsp[0].uri))); #endif if((yyvsp[0].uri)) { (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[-2].string), (yyvsp[0].uri), NULL); RAPTOR_FREE(char*, (yyvsp[-2].string)); raptor_free_uri((yyvsp[0].uri)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier) = NULL; } #line 2360 "turtle_parser.c" /* yacc.c:1646 */ break; case 50: #line 903 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal string=\"%s\"\n", (yyvsp[0].string)); #endif (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[0].string), NULL, NULL); RAPTOR_FREE(char*, (yyvsp[0].string)); if(!(yyval.identifier)) YYERROR; } #line 2375 "turtle_parser.c" /* yacc.c:1646 */ break; case 51: #line 914 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource integer=%s\n", (yyvsp[0].string)); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_integer_uri); (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[0].string), uri, NULL); RAPTOR_FREE(char*, (yyvsp[0].string)); raptor_free_uri(uri); if(!(yyval.identifier)) YYERROR; } #line 2392 "turtle_parser.c" /* yacc.c:1646 */ break; case 52: #line 927 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource double=%s\n", (yyvsp[0].string)); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_double_uri); (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[0].string), uri, NULL); RAPTOR_FREE(char*, (yyvsp[0].string)); raptor_free_uri(uri); if(!(yyval.identifier)) YYERROR; } #line 2409 "turtle_parser.c" /* yacc.c:1646 */ break; case 53: #line 940 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource decimal=%s\n", (yyvsp[0].string)); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_decimal_uri); if(!uri) { RAPTOR_FREE(char*, (yyvsp[0].string)); YYERROR; } (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (yyvsp[0].string), uri, NULL); RAPTOR_FREE(char*, (yyvsp[0].string)); raptor_free_uri(uri); if(!(yyval.identifier)) YYERROR; } #line 2430 "turtle_parser.c" /* yacc.c:1646 */ break; case 54: #line 957 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fputs("resource boolean true\n", stderr); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_boolean_uri); (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (const unsigned char*)"true", uri, NULL); raptor_free_uri(uri); if(!(yyval.identifier)) YYERROR; } #line 2447 "turtle_parser.c" /* yacc.c:1646 */ break; case 55: #line 970 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fputs("resource boolean false\n", stderr); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_boolean_uri); (yyval.identifier) = raptor_new_term_from_literal(rdf_parser->world, (const unsigned char*)"false", uri, NULL); raptor_free_uri(uri); if(!(yyval.identifier)) YYERROR; } #line 2464 "turtle_parser.c" /* yacc.c:1646 */ break; case 56: #line 986 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource URI=<%s>\n", raptor_uri_as_string((yyvsp[0].uri))); #endif if((yyvsp[0].uri)) { (yyval.identifier) = raptor_new_term_from_uri(rdf_parser->world, (yyvsp[0].uri)); raptor_free_uri((yyvsp[0].uri)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier) = NULL; } #line 2482 "turtle_parser.c" /* yacc.c:1646 */ break; case 57: #line 1000 "./turtle_parser.y" /* yacc.c:1646 */ { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource qname URI=<%s>\n", raptor_uri_as_string((yyvsp[0].uri))); #endif if((yyvsp[0].uri)) { (yyval.identifier) = raptor_new_term_from_uri(rdf_parser->world, (yyvsp[0].uri)); raptor_free_uri((yyvsp[0].uri)); if(!(yyval.identifier)) YYERROR; } else (yyval.identifier) = NULL; } #line 2500 "turtle_parser.c" /* yacc.c:1646 */ break; case 58: #line 1017 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.sequence) = (yyvsp[0].sequence); } #line 2508 "turtle_parser.c" /* yacc.c:1646 */ break; case 59: #line 1021 "./turtle_parser.y" /* yacc.c:1646 */ { (yyval.sequence) = NULL; } #line 2516 "turtle_parser.c" /* yacc.c:1646 */ break; case 60: #line 1028 "./turtle_parser.y" /* yacc.c:1646 */ { const unsigned char *id; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("subject blank=\"%s\"\n", (yyvsp[0].string)); #endif id = raptor_world_internal_generate_id(rdf_parser->world, (yyvsp[0].string)); if(!id) YYERROR; (yyval.identifier) = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); if(!(yyval.identifier)) YYERROR; } #line 2536 "turtle_parser.c" /* yacc.c:1646 */ break; case 61: #line 1046 "./turtle_parser.y" /* yacc.c:1646 */ { int i; const unsigned char *id; id = raptor_world_generate_bnodeid(rdf_parser->world); if(!id) { if((yyvsp[-1].sequence)) raptor_free_sequence((yyvsp[-1].sequence)); YYERROR; } (yyval.identifier) = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); if(!(yyval.identifier)) { if((yyvsp[-1].sequence)) raptor_free_sequence((yyvsp[-1].sequence)); YYERROR; } if((yyvsp[-1].sequence) == NULL) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource\n predicateObjectList="); raptor_term_print_as_ntriples((yyval.identifier), stdout); printf("\n"); #endif } else { /* non-empty property list, handle it */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource\n predicateObjectList="); raptor_sequence_print((yyvsp[-1].sequence), stdout); printf("\n"); #endif for(i = 0; i < raptor_sequence_size((yyvsp[-1].sequence)); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[-1].sequence), i); t2->subject = raptor_term_copy((yyval.identifier)); raptor_turtle_generate_statement(rdf_parser, t2); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[-1].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[-1].sequence)); } } #line 2591 "turtle_parser.c" /* yacc.c:1646 */ break; case 62: #line 1100 "./turtle_parser.y" /* yacc.c:1646 */ { int i; raptor_world* world = rdf_parser->world; raptor_term* first_identifier = NULL; raptor_term* rest_identifier = NULL; raptor_term* object = NULL; raptor_term* blank = NULL; char const *errmsg = NULL; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("collection\n objectList="); raptor_sequence_print((yyvsp[-1].sequence), stdout); printf("\n"); #endif first_identifier = raptor_new_term_from_uri(world, RAPTOR_RDF_first_URI(world)); if(!first_identifier) YYERR_MSG_GOTO(err_collection, "Cannot create rdf:first term"); rest_identifier = raptor_new_term_from_uri(world, RAPTOR_RDF_rest_URI(world)); if(!rest_identifier) YYERR_MSG_GOTO(err_collection, "Cannot create rdf:rest term"); /* non-empty property list, handle it */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource\n predicateObjectList="); raptor_sequence_print((yyvsp[-1].sequence), stdout); printf("\n"); #endif object = raptor_new_term_from_uri(world, RAPTOR_RDF_nil_URI(world)); if(!object) YYERR_MSG_GOTO(err_collection, "Cannot create rdf:nil term"); for(i = raptor_sequence_size((yyvsp[-1].sequence))-1; i>=0; i--) { raptor_term* temp; raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at((yyvsp[-1].sequence), i); const unsigned char *blank_id; blank_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!blank_id) YYERR_MSG_GOTO(err_collection, "Cannot create bnodeid"); blank = raptor_new_term_from_blank(rdf_parser->world, blank_id); RAPTOR_FREE(char*, blank_id); if(!blank) YYERR_MSG_GOTO(err_collection, "Cannot create bnode"); t2->subject = blank; t2->predicate = first_identifier; /* t2->object already set to the value we want */ raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); temp = t2->object; t2->subject = blank; t2->predicate = rest_identifier; t2->object = object; raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); t2->subject = NULL; t2->predicate = NULL; t2->object = temp; raptor_free_term(object); object = blank; blank = NULL; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print((yyvsp[-1].sequence), stdout); printf("\n\n"); #endif raptor_free_sequence((yyvsp[-1].sequence)); raptor_free_term(first_identifier); raptor_free_term(rest_identifier); (yyval.identifier)=object; err_collection: if(errmsg) { if(blank) raptor_free_term(blank); if(object) raptor_free_term(object); if(rest_identifier) raptor_free_term(rest_identifier); if(first_identifier) raptor_free_term(first_identifier); raptor_free_sequence((yyvsp[-1].sequence)); YYERROR_MSG(errmsg); } } #line 2697 "turtle_parser.c" /* yacc.c:1646 */ break; case 63: #line 1202 "./turtle_parser.y" /* yacc.c:1646 */ { raptor_world* world = rdf_parser->world; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("collection\n empty\n"); #endif (yyval.identifier) = raptor_new_term_from_uri(world, RAPTOR_RDF_nil_URI(world)); if(!(yyval.identifier)) YYERROR; } #line 2713 "turtle_parser.c" /* yacc.c:1646 */ break; #line 2717 "turtle_parser.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (rdf_parser, yyscanner, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; if(yytoken < 0) yytoken = YYUNDEFTOK; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { if(yytoken < 0) yytoken = YYUNDEFTOK; yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (rdf_parser, yyscanner, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, rdf_parser, yyscanner); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp, rdf_parser, yyscanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (rdf_parser, yyscanner, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, rdf_parser, yyscanner); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, rdf_parser, yyscanner); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif return yyresult; } #line 1216 "./turtle_parser.y" /* yacc.c:1906 */ /* Support functions */ int turtle_parser_error(raptor_parser* rdf_parser, void* scanner, const char *msg) { raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif raptor_log_error(rdf_parser->world, RAPTOR_LOG_LEVEL_ERROR, &rdf_parser->locator, msg); return 0; } int turtle_syntax_error(raptor_parser *rdf_parser, const char *message, ...) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; va_list arguments; if(!turtle_parser) return 1; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_log_error_varargs(((raptor_parser*)rdf_parser), RAPTOR_LOG_LEVEL_ERROR, message, arguments); va_end(arguments); return 0; } raptor_uri* turtle_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!turtle_parser) return NULL; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif name_len = raptor_turtle_expand_qname_escapes(name, name_len, (raptor_simple_message_handler)turtle_parser_error, rdf_parser); if(!name_len) return NULL; return raptor_qname_string_to_uri(&turtle_parser->namespaces, name, name_len); } #ifndef TURTLE_PUSH_PARSE static int turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; int rc; if(!string || !*string) return 0; if(turtle_lexer_lex_init(&turtle_parser->scanner)) return 1; turtle_parser->scanner_set = 1; #if defined(YYDEBUG) && YYDEBUG > 0 turtle_lexer_set_debug(1 ,&turtle_parser->scanner); turtle_parser_debug = 1; #endif turtle_lexer_set_extra(rdf_parser, turtle_parser->scanner); (void)turtle_lexer__scan_bytes((char *)string, (int)length, turtle_parser->scanner); rc = turtle_parser_parse(rdf_parser, turtle_parser->scanner); turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set = 0; return rc; } #endif #ifdef TURTLE_PUSH_PARSE static int turtle_push_parse(raptor_parser *rdf_parser, const char *string, size_t length) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 raptor_world* world = rdf_parser->world; #endif raptor_turtle_parser* turtle_parser; void *buffer; int status; yypstate *ps; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!string || !*string) return 0; if(turtle_lexer_lex_init(&turtle_parser->scanner)) return 1; turtle_parser->scanner_set = 1; #if defined(YYDEBUG) && YYDEBUG > 0 turtle_lexer_set_debug(1 ,&turtle_parser->scanner); turtle_parser_debug = 1; #endif turtle_lexer_set_extra(rdf_parser, turtle_parser->scanner); buffer = turtle_lexer__scan_bytes(string, length, turtle_parser->scanner); /* returns a parser instance or 0 on out of memory */ ps = yypstate_new(); if(!ps) return 1; do { YYSTYPE lval; int token; memset(&lval, 0, sizeof(YYSTYPE)); token = turtle_lexer_lex(&lval, turtle_parser->scanner); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("token %s\n", turtle_token_print(world, token, &lval)); #endif status = yypush_parse(ps, token, &lval, rdf_parser, turtle_parser->scanner); /* turtle_token_free(world, token, &lval); */ if(!token || token == EOF || token == ERROR_TOKEN) break; } while (status == YYPUSH_MORE); yypstate_delete(ps); turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set = 0; return 0; } #endif /** * raptor_turtle_parse_init - Initialise the Raptor Turtle parser * * Return value: non 0 on failure **/ static int raptor_turtle_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(raptor_namespaces_init(rdf_parser->world, &turtle_parser->namespaces, 0)) return 1; turtle_parser->trig = !strcmp(name, "trig"); return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_turtle_parse_terminate - Free the Raptor Turtle parser * @rdf_parser: parser object * **/ static void raptor_turtle_parse_terminate(raptor_parser *rdf_parser) { raptor_turtle_parser *turtle_parser = (raptor_turtle_parser*)rdf_parser->context; raptor_namespaces_clear(&turtle_parser->namespaces); if(turtle_parser->scanner_set) { turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set = 0; } if(turtle_parser->buffer) RAPTOR_FREE(cdata, turtle_parser->buffer); if(turtle_parser->graph_name) { raptor_free_term(turtle_parser->graph_name); turtle_parser->graph_name = NULL; } } static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_statement *t) { raptor_turtle_parser *turtle_parser = (raptor_turtle_parser*)parser->context; raptor_statement *statement = &parser->statement; if(!t->subject || !t->predicate || !t->object) return; if(!parser->statement_handler) return; if(turtle_parser->trig && turtle_parser->graph_name) statement->graph = raptor_term_copy(turtle_parser->graph_name); if(!parser->emitted_default_graph && !turtle_parser->graph_name) { /* for non-TRIG - start default graph at first triple */ raptor_parser_start_graph(parser, NULL, 0); parser->emitted_default_graph++; } /* Two choices for subject for Turtle */ if(t->subject->type == RAPTOR_TERM_TYPE_BLANK) { statement->subject = raptor_new_term_from_blank(parser->world, t->subject->value.blank.string); } else { /* RAPTOR_TERM_TYPE_URI */ RAPTOR_ASSERT(t->subject->type != RAPTOR_TERM_TYPE_URI, "subject type is not resource"); statement->subject = raptor_new_term_from_uri(parser->world, t->subject->value.uri); } /* Predicates are URIs but check for bad ordinals */ if(!strncmp((const char*)raptor_uri_as_string(t->predicate->value.uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { unsigned char* predicate_uri_string = raptor_uri_as_string(t->predicate->value.uri); int predicate_ordinal = raptor_check_ordinal(predicate_uri_string+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate_uri_string); } statement->predicate = raptor_new_term_from_uri(parser->world, t->predicate->value.uri); /* Three choices for object for Turtle */ if(t->object->type == RAPTOR_TERM_TYPE_URI) { statement->object = raptor_new_term_from_uri(parser->world, t->object->value.uri); } else if(t->object->type == RAPTOR_TERM_TYPE_BLANK) { statement->object = raptor_new_term_from_blank(parser->world, t->object->value.blank.string); } else { /* RAPTOR_TERM_TYPE_LITERAL */ RAPTOR_ASSERT(t->object->type != RAPTOR_TERM_TYPE_LITERAL, "object type is not literal"); statement->object = raptor_new_term_from_literal(parser->world, t->object->value.literal.string, t->object->value.literal.datatype, t->object->value.literal.language); } /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); raptor_free_term(statement->subject); statement->subject = NULL; raptor_free_term(statement->predicate); statement->predicate = NULL; raptor_free_term(statement->object); statement->object = NULL; if(statement->graph) { raptor_free_term(statement->graph); statement->graph = NULL; } } static int raptor_turtle_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { char *ptr; raptor_turtle_parser *turtle_parser; int rc; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to line buffer\n", (int)len); #endif if(len) { turtle_parser->buffer = RAPTOR_REALLOC(char*, turtle_parser->buffer, turtle_parser->buffer_length + len + 1); if(!turtle_parser->buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } /* move pointer to end of cdata buffer */ ptr = turtle_parser->buffer+turtle_parser->buffer_length; /* adjust stored length */ turtle_parser->buffer_length += len; /* now write new stuff at end of cdata buffer */ memcpy(ptr, s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer buffer now '%s' (%ld bytes)\n", turtle_parser->buffer, turtle_parser->buffer_length); #endif } /* if not end, wait for rest of input */ if(!is_end) return 0; /* Nothing to do */ if(!turtle_parser->buffer_length) return 0; #ifdef TURTLE_PUSH_PARSE rc = turtle_push_parse(rdf_parser, turtle_parser->buffer, turtle_parser->buffer_length); #else rc = turtle_parse(rdf_parser, turtle_parser->buffer, turtle_parser->buffer_length); #endif if(rdf_parser->emitted_default_graph) { /* for non-TRIG - end default graph after last triple */ raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } return rc; } static int raptor_turtle_parse_start(raptor_parser *rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_turtle_parser *turtle_parser = (raptor_turtle_parser*)rdf_parser->context; /* base URI required for Turtle */ if(!rdf_parser->base_uri) return 1; locator->line = 1; locator->column= -1; /* No column info */ locator->byte= -1; /* No bytes info */ if(turtle_parser->buffer_length) { RAPTOR_FREE(cdata, turtle_parser->buffer); turtle_parser->buffer = NULL; turtle_parser->buffer_length = 0; } turtle_parser->lineno = 1; return 0; } static int raptor_turtle_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "ttl")) score = 8; if(!strcmp((const char*)suffix, "n3")) score = 3; } if(mime_type) { if(strstr((const char*)mime_type, "turtle")) score += 6; if(strstr((const char*)mime_type, "n3")) score += 3; } /* Do this as long as N3 is not supported since it shares the same syntax */ if(buffer && len) { #define HAS_TURTLE_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TURTLE_RDF_URI (raptor_memstr((const char*)buffer, len, ": ") != NULL) if(HAS_TURTLE_PREFIX) { score = 6; if(HAS_TURTLE_RDF_URI) score += 2; } } return score; } static raptor_uri* raptor_turtle_get_graph(raptor_parser* rdf_parser) { raptor_turtle_parser *turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->graph_name) return raptor_uri_copy(turtle_parser->graph_name->value.uri); return NULL; } #ifdef RAPTOR_PARSER_TRIG static int raptor_trig_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "trig")) score = 9; #ifndef RAPTOR_PARSER_TURTLE if(!strcmp((const char*)suffix, "ttl")) score = 8; if(!strcmp((const char*)suffix, "n3")) score = 3; #endif } if(mime_type) { if(strstr((const char*)mime_type, "trig")) score = 6; #ifndef RAPTOR_PARSER_TURTLE if(strstr((const char*)mime_type, "turtle")) score += 6; if(strstr((const char*)mime_type, "n3")) score += 3; #endif } #ifndef RAPTOR_PARSER_TURTLE /* Do this as long as N3 is not supported since it shares the same syntax */ if(buffer && len) { #define HAS_TRIG_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TRIG_RDF_URI (raptor_memstr((const char*)buffer, len, ": ") != NULL) if(HAS_TRIG_PREFIX) { score = 6; if(HAS_TRIG_RDF_URI) score += 2; } } #endif return score; } #endif #ifdef RAPTOR_PARSER_TURTLE static const char* const turtle_names[4] = { "turtle", "ntriples-plus", "n3", NULL }; static const char* const turtle_uri_strings[3] = { "http://www.w3.org/ns/formats/Turtle", "http://www.dajobe.org/2004/01/turtle/", NULL }; #define TURTLE_TYPES_COUNT 6 static const raptor_type_q turtle_types[TURTLE_TYPES_COUNT + 1] = { /* first one is the default */ { "text/turtle", 11, 10}, { "application/x-turtle", 20, 10}, { "application/turtle", 18, 10}, { "text/n3", 7, 3}, { "text/rdf+n3", 11, 3}, { "application/rdf+n3", 18, 3}, { NULL, 0} }; static int raptor_turtle_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = turtle_names; factory->desc.mime_types = turtle_types; factory->desc.label = "Turtle Terse RDF Triple Language"; factory->desc.uri_strings = turtle_uri_strings; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_turtle_parser); factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_turtle_parse_recognise_syntax; factory->get_graph = raptor_turtle_get_graph; return rc; } #endif #ifdef RAPTOR_PARSER_TRIG static const char* const trig_names[2] = { "trig", NULL }; static const char* const trig_uri_strings[2] = { "http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/", NULL }; #define TRIG_TYPES_COUNT 1 static const raptor_type_q trig_types[TRIG_TYPES_COUNT + 1] = { /* first one is the default */ { "application/x-trig", 18, 10}, { NULL, 0, 0} }; static int raptor_trig_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = trig_names; factory->desc.mime_types = trig_types; factory->desc.label = "TriG - Turtle with Named Graphs"; factory->desc.uri_strings = trig_uri_strings; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_turtle_parser); factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_trig_parse_recognise_syntax; factory->get_graph = raptor_turtle_get_graph; return rc; } #endif #ifdef RAPTOR_PARSER_TURTLE int raptor_init_parser_turtle(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_turtle_parser_register_factory); } #endif #ifdef RAPTOR_PARSER_TRIG int raptor_init_parser_trig(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_trig_parser_register_factory); } #endif #ifdef STANDALONE #include #include #define TURTLE_FILE_BUF_SIZE 2048 static void turtle_parser_print_statement(void *user, raptor_statement *statement) { FILE* stream = (FILE*)user; raptor_statement_print(statement, stream); putc('\n', stream); } int main(int argc, char *argv[]) { char string[TURTLE_FILE_BUF_SIZE]; raptor_parser rdf_parser; /* static */ raptor_turtle_parser turtle_parser; /* static */ raptor_locator *locator = &rdf_parser.locator; FILE *fh; const char *filename; size_t nobj; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 turtle_parser_debug = 1; #endif if(argc > 1) { filename = argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename=""; fh = stdin; } memset(string, 0, TURTLE_FILE_BUF_SIZE); nobj = fread(string, TURTLE_FILE_BUF_SIZE, 1, fh); if(nobj < TURTLE_FILE_BUF_SIZE) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", argv[0], filename, strerror(errno)); fclose(fh); return(1); } } if(argc > 1) fclose(fh); memset(&rdf_parser, 0, sizeof(rdf_parser)); memset(&turtle_parser, 0, sizeof(turtle_parser)); locator->line= locator->column = -1; locator->file= filename; turtle_parser.lineno= 1; rdf_parser.world = raptor_new_world(); rdf_parser.context = &turtle_parser; rdf_parser.base_uri = raptor_new_uri(rdf_parser.world, (const unsigned char*)"http://example.org/fake-base-uri/"); raptor_parser_set_statement_handler(&rdf_parser, stdout, turtle_parser_print_statement); raptor_turtle_parse_init(&rdf_parser, "turtle"); turtle_parser.error_count = 0; #ifdef TURTLE_PUSH_PARSE turtle_push_parse(&rdf_parser, string, strlen(string)); #else turtle_parse(&rdf_parser, string, strlen(string)); #endif raptor_turtle_parse_terminate(&rdf_parser); raptor_free_uri(rdf_parser.base_uri); raptor_free_world(rdf_parser.world); return (0); } #endif raptor2-2.0.15/src/CMakeLists.txt0000644000175000017500000002375512112776461013463 00000000000000# raptor/src/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # IF(RAPTOR_PARSER_RDFA) INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/librdfa) ENDIF(RAPTOR_PARSER_RDFA) IF(RAPTOR_PARSER_RDFXML) SET(raptor_parser_rdfxml_sources raptor_rdfxml.c) SET(raptor_libxml_libs ${LIBXML2_LIBRARIES}) ENDIF(RAPTOR_PARSER_RDFXML) IF(RAPTOR_PARSER_NTRIPLES OR RAPTOR_PARSER_NQUADS) SET(raptor_parser_ntriples_nquads_sources ntriples_parse.c) ENDIF(RAPTOR_PARSER_NTRIPLES OR RAPTOR_PARSER_NQUADS) IF(RAPTOR_PARSER_TURTLE OR RAPTOR_PARSER_TRIG) SET(raptor_parser_turtle_trig_sources turtle_common.h turtle_lexer.c turtle_lexer.h turtle_parser.c turtle_parser.h ) ENDIF(RAPTOR_PARSER_TURTLE OR RAPTOR_PARSER_TRIG) IF(RAPTOR_PARSER_RSS OR RAPTOR_SERIALIZER_RSS_1_0) SET(raptor_rss_common_sources raptor_rss_common.c raptor_rss.h) ENDIF(RAPTOR_PARSER_RSS OR RAPTOR_SERIALIZER_RSS_1_0) IF(RAPTOR_PARSER_RSS) SET(raptor_parser_rss_sources raptor_rss.c) SET(raptor_libxml_libs ${LIBXML2_LIBRARIES}) ENDIF(RAPTOR_PARSER_RSS) IF(RAPTOR_PARSER_GRDDL) SET(raptor_parser_grddl_sources raptor_grddl.c) SET(raptor_libxml_libs ${LIBXML2_LIBRARIES}) SET(raptor_libxslt_libs ${LIBXSLT_LIBRARIES}) ENDIF(RAPTOR_PARSER_GRDDL) IF(RAPTOR_PARSER_GUESS) SET(raptor_parser_guess_sources raptor_guess.c) ENDIF(RAPTOR_PARSER_GUESS) IF(RAPTOR_PARSER_RDFA) SET(raptor_parser_rdfa_sources raptor_librdfa.c) ENDIF(RAPTOR_PARSER_RDFA) IF(RAPTOR_PARSER_JSON) SET(raptor_parser_json_sources raptor_json.c) ENDIF(RAPTOR_PARSER_JSON) IF(RAPTOR_SERIALIZER_RDFXML) SET(raptor_serializer_rdfxml_sources raptor_serialize_rdfxml.c) ENDIF(RAPTOR_SERIALIZER_RDFXML) IF(RAPTOR_SERIALIZER_NTRIPLES OR RAPTOR_SERIALIZER_NQUADS) SET(raptor_serializer_ntriples_nquads_sources raptor_serialize_ntriples.c) ENDIF(RAPTOR_SERIALIZER_NTRIPLES OR RAPTOR_SERIALIZER_NQUADS) IF(RAPTOR_SERIALIZER_RDFXML_ABBREV OR RAPTOR_SERIALIZER_TURTLE) SET(raptor_serializer_abbrev_sources raptor_abbrev.c) ENDIF(RAPTOR_SERIALIZER_RDFXML_ABBREV OR RAPTOR_SERIALIZER_TURTLE) IF(RAPTOR_SERIALIZER_RDFXML_ABBREV) SET(raptor_serializer_rdfxml_abbrev_sources raptor_serialize_rdfxmla.c) ENDIF(RAPTOR_SERIALIZER_RDFXML_ABBREV) IF(RAPTOR_SERIALIZER_TURTLE) SET(raptor_serializer_turtle_sources raptor_serialize_turtle.c) ENDIF(RAPTOR_SERIALIZER_TURTLE) IF(RAPTOR_SERIALIZER_RSS_1_0) SET(raptor_serializer_rss_1_0_sources raptor_serialize_rss.c) ENDIF(RAPTOR_SERIALIZER_RSS_1_0) IF(RAPTOR_SERIALIZER_DOT) SET(raptor_serializer_dot_sources raptor_serialize_dot.c) ENDIF(RAPTOR_SERIALIZER_DOT) IF(RAPTOR_SERIALIZER_HTML) SET(raptor_serializer_html_sources raptor_serialize_html.c) ENDIF(RAPTOR_SERIALIZER_HTML) IF(RAPTOR_SERIALIZER_JSON) SET(raptor_serializer_json_sources raptor_serialize_json.c) SET(raptor_yajl_libs ${YAJL_LIBRARIES}) ENDIF(RAPTOR_SERIALIZER_JSON) IF(RAPTOR_WWW STREQUAL "curl") SET(raptor_www_sources raptor_www_curl.c) SET(raptor_www_libs ${CURL_LIBRARIES}) ELSEIF(RAPTOR_WWW STREQUAL "fetch") SET(raptor_www_sources raptor_www_libfetch.c) #SET(raptor_www_libs ${FETCH_LIBRARIES}) ELSEIF(RAPTOR_WWW STREQUAL "xml") SET(raptor_www_sources raptor_www_libxml.c) SET(raptor_www_libs ${LIBXML2_LIBRARIES}) ENDIF(RAPTOR_WWW STREQUAL "curl") IF(RAPTOR_XML STREQUAL "libxml") SET(raptor_libxml_sources raptor_libxml.c) SET(raptor_libxml_libs ${LIBXML2_LIBRARIES}) ENDIF(RAPTOR_XML STREQUAL "libxml") IF(RAPTOR_PARSER_RDFA) SET(raptor_librdfa_sources ${CMAKE_SOURCE_DIR}/librdfa/context.c ${CMAKE_SOURCE_DIR}/librdfa/curie.c ${CMAKE_SOURCE_DIR}/librdfa/iri.c ${CMAKE_SOURCE_DIR}/librdfa/language.c ${CMAKE_SOURCE_DIR}/librdfa/lists.c ${CMAKE_SOURCE_DIR}/librdfa/namespace.c ${CMAKE_SOURCE_DIR}/librdfa/rdfa.c ${CMAKE_SOURCE_DIR}/librdfa/rdfa_utils.c ${CMAKE_SOURCE_DIR}/librdfa/strtok_r.c ${CMAKE_SOURCE_DIR}/librdfa/subject.c ${CMAKE_SOURCE_DIR}/librdfa/triple.c ${CMAKE_SOURCE_DIR}/librdfa/rdfa.h ${CMAKE_SOURCE_DIR}/librdfa/rdfa_utils.h ${CMAKE_SOURCE_DIR}/librdfa/strtok_r.h ) ENDIF(RAPTOR_PARSER_RDFA) IF(NOT HAVE_STRCASECMP AND NOT HAVE_STRICMP) SET(raptor_strcasecmp_sources strcasecmp.c) ENDIF(NOT HAVE_STRCASECMP AND NOT HAVE_STRICMP) IF(RAPTOR_PARSEDATE) SET(raptor_parsedate_sources parsedate.c) ENDIF(RAPTOR_PARSEDATE) ADD_LIBRARY(raptor2 raptor_avltree.c raptor_concepts.c raptor_general.c raptor_iostream.c raptor_json_writer.c raptor_locator.c raptor_log.c raptor_memstr.c raptor_namespace.c raptor_option.c raptor_parse.c raptor_qname.c raptor_rfc2396.c raptor_sax2.c raptor_sequence.c raptor_serialize.c raptor_set.c raptor_statement.c raptor_stringbuffer.c raptor_syntax_description.c raptor_term.c raptor_turtle_writer.c raptor_unicode.c raptor_uri.c raptor_www.c raptor_xml.c raptor_xml_writer.c snprintf.c turtle_common.c ${raptor_parser_rdfxml_sources} ${raptor_parser_ntriples_nquads_sources} ${raptor_parser_turtle_trig_sources} ${raptor_rss_common_sources} ${raptor_parser_rss_sources} ${raptor_parser_grddl_sources} ${raptor_parser_guess_sources} ${raptor_parser_rdfa_sources} ${raptor_parser_json_sources} ${raptor_serializer_rdfxml_sources} ${raptor_serializer_ntriples_nquads_sources} ${raptor_serializer_abbrev_sources} ${raptor_serializer_rdfxml_abbrev_sources} ${raptor_serializer_turtle_sources} ${raptor_serializer_rss_1_0_sources} ${raptor_serializer_dot_sources} ${raptor_serializer_html_sources} ${raptor_serializer_json_sources} ${raptor_www_sources} ${raptor_libxml_sources} ${raptor_librdfa_sources} ${raptor_strcasecmp_sources} ${raptor_parsedate_sources} ) TARGET_LINK_LIBRARIES(raptor2 ${raptor_libxslt_libs} ${raptor_libxml_libs} ${raptor_yajl_libs} ${raptor_www_libs} ) SET_TARGET_PROPERTIES( raptor2 PROPERTIES COMPILE_DEFINITIONS "LIBRDFA_IN_RAPTOR;RAPTOR_INTERNAL;${LIBXML2_DEFINITIONS};${LIBXSLT_DEFINITIONS}" ) ADD_EXECUTABLE(turtle_lexer_test turtle_lexer.c) TARGET_LINK_LIBRARIES(turtle_lexer_test raptor2) IF(NOT WIN32 OR NOT BUILD_SHARED_LIBS) # This currently cannot be built on Windows with DLL linkage ADD_EXECUTABLE(turtle_parser_test turtle_parser.c) TARGET_LINK_LIBRARIES(turtle_parser_test raptor2) SET_TARGET_PROPERTIES( turtle_parser_test PROPERTIES COMPILE_DEFINITIONS "RAPTOR_INTERNAL;STANDALONE" ) ENDIF(NOT WIN32 OR NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE(raptor_parse_test raptor_parse.c) TARGET_LINK_LIBRARIES(raptor_parse_test raptor2) ADD_TEST(raptor_parse_test raptor_parse_test) ADD_EXECUTABLE(raptor_rfc2396_test raptor_rfc2396.c) TARGET_LINK_LIBRARIES(raptor_rfc2396_test raptor2) ADD_TEST(raptor_rfc2396_test raptor_rfc2396_test) ADD_EXECUTABLE(raptor_uri_test raptor_uri.c) TARGET_LINK_LIBRARIES(raptor_uri_test raptor2) ADD_TEST(raptor_uri_test raptor_uri_test) ADD_EXECUTABLE(raptor_namespace_test raptor_namespace.c) TARGET_LINK_LIBRARIES(raptor_namespace_test raptor2) ADD_TEST(raptor_namespace_test raptor_namespace_test) ADD_EXECUTABLE(strcasecmp_test strcasecmp.c) TARGET_LINK_LIBRARIES(strcasecmp_test raptor2) ADD_TEST(strcasecmp_test strcasecmp_test) ADD_EXECUTABLE(raptor_www_test raptor_www_test.c) TARGET_LINK_LIBRARIES(raptor_www_test raptor2) ADD_TEST(raptor_www_test raptor_www_test) ADD_EXECUTABLE(raptor_sequence_test raptor_sequence.c) TARGET_LINK_LIBRARIES(raptor_sequence_test raptor2) ADD_TEST(raptor_sequence_test raptor_sequence_test) ADD_EXECUTABLE(raptor_stringbuffer_test raptor_stringbuffer.c) TARGET_LINK_LIBRARIES(raptor_stringbuffer_test raptor2) ADD_TEST(raptor_stringbuffer_test raptor_stringbuffer_test) ADD_EXECUTABLE(raptor_iostream_test raptor_iostream.c) TARGET_LINK_LIBRARIES(raptor_iostream_test raptor2) ADD_TEST(raptor_iostream_test raptor_iostream_test) ADD_EXECUTABLE(raptor_xml_writer_test raptor_xml_writer.c) TARGET_LINK_LIBRARIES(raptor_xml_writer_test raptor2) ADD_TEST(raptor_xml_writer_test raptor_xml_writer_test) ADD_EXECUTABLE(raptor_turtle_writer_test raptor_turtle_writer.c) TARGET_LINK_LIBRARIES(raptor_turtle_writer_test raptor2) ADD_TEST(raptor_turtle_writer_test raptor_turtle_writer_test) ADD_EXECUTABLE(raptor_avltree_test raptor_avltree.c) TARGET_LINK_LIBRARIES(raptor_avltree_test raptor2) ADD_TEST(raptor_avltree_test raptor_avltree_test) ADD_EXECUTABLE(raptor_term_test raptor_term.c) TARGET_LINK_LIBRARIES(raptor_term_test raptor2) ADD_TEST(raptor_term_test raptor_term_test) ADD_EXECUTABLE(raptor_permute_test raptor_permute_test.c) TARGET_LINK_LIBRARIES(raptor_permute_test raptor2) ADD_TEST(raptor_permute_test raptor_permute_test) SET_TARGET_PROPERTIES( turtle_lexer_test #turtle_parser_test raptor_parse_test raptor_rfc2396_test raptor_uri_test raptor_namespace_test strcasecmp_test raptor_www_test raptor_sequence_test raptor_stringbuffer_test raptor_iostream_test raptor_xml_writer_test raptor_turtle_writer_test raptor_avltree_test raptor_term_test raptor_permute_test PROPERTIES COMPILE_DEFINITIONS "RAPTOR_INTERNAL;STANDALONE" ) IF(RAPTOR_PARSER_RDFXML) ADD_EXECUTABLE(raptor_set_test raptor_set.c) TARGET_LINK_LIBRARIES(raptor_set_test raptor2) ADD_TEST(raptor_set_test raptor_set_test) ADD_EXECUTABLE(raptor_xml_test raptor_xml.c) TARGET_LINK_LIBRARIES(raptor_xml_test raptor2) ADD_TEST(raptor_xml_test raptor_xml_test) SET_TARGET_PROPERTIES( raptor_set_test raptor_xml_test PROPERTIES COMPILE_DEFINITIONS "RAPTOR_INTERNAL;STANDALONE" ) ENDIF(RAPTOR_PARSER_RDFXML) # Generate pkg-config metadata file # FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/raptor2.pc "prefix=${CMAKE_INSTALL_PREFIX} exec_prefix=\${prefix} libdir=\${exec_prefix}/lib includedir=\${prefix}/include/raptor2 Name: Raptor RDF Parsing Library Description: RDF Parser Toolkit Library Version: ${VERSION} Libs: -L\${libdir} -lraptor2 Libs.private: ${raptor_libxslt_libs} ${raptor_libxml_libs} Cflags: -I\${includedir} ") INSTALL(FILES raptor.h ${CMAKE_CURRENT_BINARY_DIR}/raptor2.h DESTINATION include/raptor2 ) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/raptor2.pc DESTINATION lib/pkgconfig ) INSTALL( TARGETS raptor2 EXPORT Raptor2Config ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) INSTALL(EXPORT Raptor2Config DESTINATION lib/cmake) # end raptor/src/CMakeLists.txt raptor2-2.0.15/src/raptor_set.c0000644000175000017500000001602412020170223013216 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_set.c - Sets for checking IDs * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_STDLIB_H #include /* for abort() as used in errors */ #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE /* * The only methods needed here are: * Create Set * Destroy Set * Check a (base, ID) pair present add it if not, return if added/not * */ struct raptor_base_id_set_s { raptor_world* world; /* The base URI of this set of IDs */ raptor_uri *uri; /* neighbour ID sets */ struct raptor_base_id_set_s* prev; struct raptor_base_id_set_s* next; /* binary tree */ raptor_avltree* tree; }; typedef struct raptor_base_id_set_s raptor_base_id_set; struct raptor_id_set_s { raptor_world* world; /* start of trees, 1 per base URI */ struct raptor_base_id_set_s* first; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 int hits; int misses; #endif }; /* functions implementing the ID set api */ /** * raptor_new_id_set: * @world: raptor_world object * * INTERNAL - Constructor - create a new ID set. * * Return value: non 0 on failure **/ raptor_id_set* raptor_new_id_set(raptor_world* world) { raptor_id_set* set = RAPTOR_CALLOC(raptor_id_set*, 1, sizeof(*set)); if(!set) return NULL; set->world = world; return set; } /** * raptor_free_base_id_set: * @set: #raptor_base_id_set * * INTERNAL - Destructor - Free a Base ID Set. * **/ static void raptor_free_base_id_set(raptor_base_id_set *base) { if(base->tree) raptor_free_avltree(base->tree); if(base->uri) raptor_free_uri(base->uri); RAPTOR_FREE(raptor_base_id_set, base); } /** * raptor_free_id_set: * @set: #raptor_id_set * * INTERNAL - Destructor - Free ID Set. * **/ void raptor_free_id_set(raptor_id_set *set) { raptor_base_id_set *base; RAPTOR_ASSERT_OBJECT_POINTER_RETURN(set, raptor_id_set); base = set->first; while(base) { raptor_base_id_set *next = base->next; raptor_free_base_id_set(base); base = next; } RAPTOR_FREE(raptor_id_set, set); } /** * raptor_id_set_add: * @set: #raptor_id_set * @base_uri: base #raptor_uri of identifier * @id: identifier name * @id_len: length of identifier * * INTERNAL - Add an item to the set. * * Return value: <0 on failure, 0 on success, 1 if already present **/ int raptor_id_set_add(raptor_id_set* set, raptor_uri *base_uri, const unsigned char *id, size_t id_len) { raptor_base_id_set *base; char* item; if(!base_uri || !id || !id_len) return -1; base = set->first; while(base) { if(raptor_uri_equals(base->uri, base_uri)) break; base = base->next; } if(!base) { /* a set for this base_uri not found */ base = RAPTOR_CALLOC(raptor_base_id_set*, 1, sizeof(*base)); if(!base) return -1; base->world = set->world; base->uri = raptor_uri_copy(base_uri); base->tree = raptor_new_avltree((raptor_data_compare_handler)strcmp, free, 0); /* Add to the start of the list */ if(set->first) set->first->prev = base; /* base->prev = NULL; */ base->next = set->first; set->first = base; } else { /* If not at the start of the list, move there */ if(base != set->first) { /* remove from the list */ base->prev->next = base->next; if(base->next) base->next->prev = base->prev; /* add at the start of the list */ set->first->prev = base; base->prev = NULL; base->next = set->first; } } item = (char*)raptor_avltree_search(base->tree, id); /* if already there, error */ if(item) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 set->misses++; #endif return 1; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 set->hits++; #endif item = RAPTOR_MALLOC(char*, id_len + 1); if(!item) return 1; memcpy(item, id, id_len + 1); return raptor_avltree_add(base->tree, item); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 void raptor_id_set_stats_print(raptor_id_set* set, FILE *stream) { fprintf(stream, "set hits: %d misses: %d\n", set->hits, set->misses); } #endif #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); const char *items[8] = { "ron", "amy", "jen", "bij", "jib", "daj", "jim", NULL }; raptor_id_set *set; raptor_uri *base_uri; int i = 0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); base_uri = raptor_new_uri(world, (const unsigned char*)"http://example.org/base#"); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Creating set\n", program); #endif set = raptor_new_id_set(world); if(!set) { fprintf(stderr, "%s: Failed to create set\n", program); exit(1); } for(i = 0; items[i]; i++) { size_t len = strlen(items[i]); int rc; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding set item '%s'\n", program, items[i]); #endif rc = raptor_id_set_add(set, base_uri, (const unsigned char*)items[i], len); if(rc) { fprintf(stderr, "%s: Adding set item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } for(i = 0; items[i]; i++) { size_t len = strlen(items[i]); int rc; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding duplicate set item '%s'\n", program, items[i]); #endif rc = raptor_id_set_add(set, base_uri, (const unsigned char*)items[i], len); if(rc <= 0) { fprintf(stderr, "%s: Adding duplicate set item %d '%s' succeeded, should have failed, returning error %d\n", program, i, items[i], rc); exit(1); } } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 raptor_id_set_stats_print(set, stderr); #endif #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing set\n", program); #endif raptor_free_id_set(set); raptor_free_uri(base_uri); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif raptor2-2.0.15/src/parsedate.c0000644000175000017500000025216312421010770013017 00000000000000/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Substitute the variable and function names. */ #define yyparse raptor_parsedate_parse #define yylex raptor_parsedate_lex #define yyerror raptor_parsedate_error #define yydebug raptor_parsedate_debug #define yynerrs raptor_parsedate_nerrs /* Copy the first part of user declarations. */ #line 1 "./parsedate.y" /* yacc.c:339 */ /* * Imported from the public domain source in PHP 4.4 * Fri May 20 07:14:01 2005 * https://github.com/php/php-src/blob/379c4af44aa6456fbdbc69dba3ead166ba7ff67d/ext/standard/parsedate.y * * and patched from there * * Later versions removed this from PHP and replaced it with entirely * new code written under the PHP license. That code is not used here * and cannot be used. * */ /* ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by ** a couple of people on Usenet. Completely overhauled by Rich $alz ** and Jim Berets in August, 1990. ** ** This code is in the public domain and has no copyright. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_SYS_TIME_H # include #endif #ifdef HAVE_STDLIB_H #include #endif #if defined(_HPUX_SOURCE) #include #endif #include "raptor2.h" #include "raptor_internal.h" #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) /* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) #ifdef HAVE_STRING_H # include #endif #if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) #endif #ifndef ATTRIBUTE_UNUSED # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* Some old versions of bison generate parsers that use bcopy. That loses on systems that don't provide the function, so we have to redefine it here. */ #if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy) # define bcopy(from, to, len) memcpy ((to), (from), (len)) #endif /* Prototypes */ static int raptor_parsedate_error(void* parm, const char *msg); #define EPOCH 1970 #define HOUR(x) ((x) * 60) #define MAX_BUFF_LEN 128 /* size of buffer to read the date into */ /* ** An entry in the lexical lookup table. */ typedef struct _TABLE { const char *name; int type; int value; } TABLE; /* ** Meridian: am, pm, or 24-hour style. */ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; struct date_yy { const char *yyInput; int yyDayOrdinal; int yyDayNumber; int yyHaveDate; int yyHaveDay; int yyHaveRel; int yyHaveTime; int yyHaveZone; int yyTimezone; int yyDay; int yyHour; int yyMinutes; int yyMonth; int yySeconds; int yyYear; MERIDIAN yyMeridian; int yyRelDay; int yyRelHour; int yyRelMinutes; int yyRelMonth; int yyRelSeconds; int yyRelYear; }; typedef union _date_ll { int Number; enum _MERIDIAN Meridian; } date_ll; #define YYPARSE_PARAM parm #define YYLEX_PARAM parm #define YYSTYPE date_ll #define YYLTYPE void static int yylex (YYSTYPE *lvalp, void *parm); static int ToHour (int Hours, MERIDIAN Meridian); static int ToYear (int Year); static int LookupWord (YYSTYPE *lvalp, char *buff); #line 230 "parsedate.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "parsedate.tab.h". */ #ifndef YY_RAPTOR_PARSEDATE_PARSEDATE_TAB_H_INCLUDED # define YY_RAPTOR_PARSEDATE_PARSEDATE_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int raptor_parsedate_debug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { tAGO = 258, tDAY = 259, tDAY_UNIT = 260, tDAYZONE = 261, tDST = 262, tHOUR_UNIT = 263, tID = 264, tTZONE = 265, tWZONE = 266, tZZONE = 267, tMERIDIAN = 268, tMINUTE_UNIT = 269, tMONTH = 270, tMONTH_UNIT = 271, tSEC_UNIT = 272, tSNUMBER = 273, tUNUMBER = 274, tYEAR_UNIT = 275, tZONE = 276 }; #endif /* Value type. */ int raptor_parsedate_parse (struct date_yy *parm); #endif /* !YY_RAPTOR_PARSEDATE_PARSEDATE_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ #line 297 "parsedate.c" /* yacc.c:358 */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE # if (defined __GNUC__ \ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C # define YY_ATTRIBUTE(Spec) __attribute__(Spec) # else # define YY_ATTRIBUTE(Spec) /* empty */ # endif #endif #ifndef YY_ATTRIBUTE_PURE # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) #endif #ifndef YY_ATTRIBUTE_UNUSED # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 110 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 26 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 22 /* YYNRULES -- Number of rules. */ #define YYNRULES 77 /* YYNSTATES -- Number of states. */ #define YYNSTATES 100 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 276 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 2, 22, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 193, 193, 194, 197, 200, 203, 206, 209, 212, 213, 216, 222, 226, 229, 233, 236, 242, 245, 248, 251, 254, 256, 259, 269, 275, 281, 297, 300, 303, 306, 309, 312, 317, 321, 325, 331, 335, 346, 364, 365, 368, 374, 379, 387, 392, 400, 407, 408, 427, 433, 439, 451, 454, 460, 461, 486, 500, 503, 506, 509, 512, 515, 518, 521, 524, 527, 530, 533, 536, 539, 542, 545, 548, 551, 554, 559, 594 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "tAGO", "tDAY", "tDAY_UNIT", "tDAYZONE", "tDST", "tHOUR_UNIT", "tID", "tTZONE", "tWZONE", "tZZONE", "tMERIDIAN", "tMINUTE_UNIT", "tMONTH", "tMONTH_UNIT", "tSEC_UNIT", "tSNUMBER", "tUNUMBER", "tYEAR_UNIT", "tZONE", "'.'", "':'", "','", "'/'", "$accept", "spec", "item", "time", "iso8601time_colon", "iso8601zonepart", "sec_fraction_part", "zonepart_numeric_without_colon", "zonepart_numeric_with_colon", "HMStime_with_colon", "HMtime_with_colon", "zone", "day", "date", "iso8601datetime", "iso8601date", "iso8601weekspec", "iso8601time", "rel", "relunit", "number", "o_merid", YY_NULLPTR }; #endif # ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 46, 58, 44, 47 }; # endif #define YYPACT_NINF -60 #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-60))) #define YYTABLE_NINF -1 #define yytable_value_is_error(Yytable_value) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int8 yypact[] = { -60, 2, -60, -13, -60, -60, -60, -60, -60, -60, -60, -60, 13, -60, -60, 69, 20, -60, 32, -60, -60, -60, 29, 4, -60, -60, -60, -60, 44, -60, 58, -60, -60, -60, -15, -60, -60, -60, -60, -60, -60, -60, -60, -60, 46, 48, -60, -60, 28, -60, -60, 37, -60, 56, 57, -60, -60, 59, 52, 61, 52, 46, -60, 64, 62, 26, -60, -60, 66, -60, -60, -60, -60, 68, -60, 36, 74, -60, -60, -60, -60, -60, -60, -60, -60, -60, 76, -60, 86, -60, 80, 81, 78, 79, -60, -60, -60, 84, 87, -60 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 0, 1, 33, 66, 31, 69, 27, 28, 29, 77, 72, 0, 63, 75, 0, 76, 60, 30, 3, 4, 12, 22, 22, 5, 7, 6, 40, 39, 8, 57, 9, 10, 34, 43, 65, 68, 71, 62, 74, 59, 35, 64, 67, 0, 0, 11, 70, 45, 61, 73, 50, 58, 0, 0, 51, 32, 0, 20, 0, 20, 0, 56, 42, 0, 22, 54, 48, 52, 41, 46, 49, 26, 36, 21, 23, 0, 15, 17, 18, 19, 13, 25, 16, 14, 47, 0, 44, 20, 53, 0, 0, 0, 23, 55, 38, 24, 0, 0, 37 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -60, -60, -60, -60, 104, -59, -23, -60, -60, -60, -60, 107, -60, -60, -60, -60, -60, 49, -55, -60, -60, -60 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 1, 19, 20, 66, 77, 58, 78, 79, 22, 23, 80, 25, 26, 27, 28, 55, 67, 29, 30, 31, 32 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 60, 83, 2, 81, 63, 84, 3, 4, 5, 64, 6, 33, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 41, 42, 57, 59, 43, 94, 44, 45, 34, 46, 47, 48, 49, 50, 51, 56, 52, 35, 88, 53, 36, 54, 69, 70, 57, 53, 37, 57, 38, 39, 61, 71, 40, 4, 5, 91, 6, 62, 7, 8, 9, 65, 11, 68, 13, 14, 75, 76, 17, 18, 35, 72, 73, 36, 74, 42, 82, 87, 43, 37, 89, 38, 39, 86, 47, 40, 49, 50, 5, 90, 52, 92, 7, 8, 9, 95, 96, 97, 91, 98, 93, 21, 99, 18, 24, 0, 85 }; static const yytype_int8 yycheck[] = { 23, 60, 0, 58, 19, 60, 4, 5, 6, 24, 8, 24, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 4, 5, 22, 23, 8, 88, 10, 11, 19, 13, 14, 15, 16, 17, 18, 7, 20, 5, 65, 23, 8, 25, 18, 19, 22, 23, 14, 22, 16, 17, 10, 18, 20, 5, 6, 23, 8, 3, 10, 11, 12, 19, 14, 19, 16, 17, 18, 19, 20, 21, 5, 19, 19, 8, 19, 5, 19, 19, 8, 14, 18, 16, 17, 23, 14, 20, 16, 17, 6, 25, 20, 19, 10, 11, 12, 19, 19, 23, 23, 19, 18, 1, 19, 21, 1, -1, 61 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 27, 0, 4, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 28, 29, 30, 35, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 24, 19, 5, 8, 14, 16, 17, 20, 4, 5, 8, 10, 11, 13, 14, 15, 16, 17, 18, 20, 23, 25, 42, 7, 22, 32, 23, 32, 10, 3, 19, 24, 19, 30, 43, 19, 18, 19, 18, 19, 19, 19, 18, 19, 31, 33, 34, 37, 44, 19, 31, 44, 43, 23, 19, 32, 18, 25, 23, 19, 18, 31, 19, 19, 23, 19, 19 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 33, 34, 35, 36, 37, 37, 37, 37, 37, 37, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 41, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 47 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 3, 3, 1, 1, 1, 0, 2, 0, 1, 3, 3, 3, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 8, 5, 1, 1, 3, 3, 2, 4, 2, 3, 3, 3, 3, 2, 2, 2, 3, 1, 3, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 1 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (parm, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, parm); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*----------------------------------------. | Print this symbol's value on YYOUTPUT. | `----------------------------------------*/ static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct date_yy *parm) { FILE *yyo = yyoutput; YYUSE (yyo); YYUSE (parm); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct date_yy *parm) { YYFPRINTF (yyoutput, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, struct date_yy *parm) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], &(yyvsp[(yyi + 1) - (yynrhs)]) , parm); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule, parm); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T yystrlen (const char *yystr) { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); default: yyformat = YY_("syntax error"); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct date_yy *parm) { YYUSE (yyvaluep); YYUSE (parm); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*----------. | yyparse. | `----------*/ int yyparse (struct date_yy *parm) { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ YY_INITIAL_VALUE (static YYSTYPE yyval_default;) YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: 'yyss': related to states. 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (&yylval, parm); } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 4: #line 197 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveTime++; } #line 1452 "parsedate.c" /* yacc.c:1646 */ break; case 5: #line 200 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveZone++; } #line 1460 "parsedate.c" /* yacc.c:1646 */ break; case 6: #line 203 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveDate++; } #line 1468 "parsedate.c" /* yacc.c:1646 */ break; case 7: #line 206 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveDay++; } #line 1476 "parsedate.c" /* yacc.c:1646 */ break; case 8: #line 209 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveRel++; } #line 1484 "parsedate.c" /* yacc.c:1646 */ break; case 11: #line 216 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHour = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = (yyvsp[0].Meridian); } #line 1495 "parsedate.c" /* yacc.c:1646 */ break; case 13: #line 226 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMeridian = MER24; } #line 1503 "parsedate.c" /* yacc.c:1646 */ break; case 14: #line 229 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } #line 1512 "parsedate.c" /* yacc.c:1646 */ break; case 15: #line 233 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMeridian = MER24; } #line 1520 "parsedate.c" /* yacc.c:1646 */ break; case 16: #line 236 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMeridian = MER24; ((struct date_yy *)parm)->yySeconds = 0; } #line 1529 "parsedate.c" /* yacc.c:1646 */ break; case 17: #line 242 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveZone++; } #line 1537 "parsedate.c" /* yacc.c:1646 */ break; case 18: #line 245 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveZone++; } #line 1545 "parsedate.c" /* yacc.c:1646 */ break; case 19: #line 248 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveZone++; } #line 1553 "parsedate.c" /* yacc.c:1646 */ break; case 21: #line 254 "./parsedate.y" /* yacc.c:1646 */ { } #line 1560 "parsedate.c" /* yacc.c:1646 */ break; case 23: #line 259 "./parsedate.y" /* yacc.c:1646 */ { /* format: [+-]hhmm */ if((yyvsp[0].Number) <= -100 || (yyvsp[0].Number) >= 100) { ((struct date_yy *)parm)->yyTimezone = (-(yyvsp[0].Number) / 100) * 60 + (-(yyvsp[0].Number) % 100); } else if((yyvsp[0].Number) >= -99 && (yyvsp[0].Number) <= 99) { ((struct date_yy *)parm)->yyTimezone = -(yyvsp[0].Number) * 60; } } #line 1573 "parsedate.c" /* yacc.c:1646 */ break; case 24: #line 269 "./parsedate.y" /* yacc.c:1646 */ { /* format: [+-]hh:mm */ ((struct date_yy *)parm)->yyTimezone = -(yyvsp[-2].Number) * 60 + ((yyvsp[-2].Number) > 0 ? -(yyvsp[0].Number): (yyvsp[0].Number)); } #line 1582 "parsedate.c" /* yacc.c:1646 */ break; case 25: #line 275 "./parsedate.y" /* yacc.c:1646 */ { /* format: hh:mm:ss */ ((struct date_yy *)parm)->yySeconds = (yyvsp[0].Number); } #line 1591 "parsedate.c" /* yacc.c:1646 */ break; case 26: #line 281 "./parsedate.y" /* yacc.c:1646 */ { /* format: hh:mm */ ((struct date_yy *)parm)->yyHour = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyMinutes = (yyvsp[0].Number); } #line 1601 "parsedate.c" /* yacc.c:1646 */ break; case 27: #line 297 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyTimezone = (yyvsp[0].Number); } #line 1609 "parsedate.c" /* yacc.c:1646 */ break; case 28: #line 300 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyTimezone = (yyvsp[0].Number); } #line 1617 "parsedate.c" /* yacc.c:1646 */ break; case 29: #line 303 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyTimezone = (yyvsp[0].Number); } #line 1625 "parsedate.c" /* yacc.c:1646 */ break; case 30: #line 306 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyTimezone = (yyvsp[0].Number); } #line 1633 "parsedate.c" /* yacc.c:1646 */ break; case 31: #line 309 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyTimezone = (yyvsp[0].Number) - 60; } #line 1641 "parsedate.c" /* yacc.c:1646 */ break; case 32: #line 312 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyTimezone = (yyvsp[-1].Number) - 60; } #line 1649 "parsedate.c" /* yacc.c:1646 */ break; case 33: #line 317 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = (yyvsp[0].Number); } #line 1658 "parsedate.c" /* yacc.c:1646 */ break; case 34: #line 321 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyDayOrdinal = 1; ((struct date_yy *)parm)->yyDayNumber = (yyvsp[-1].Number); } #line 1667 "parsedate.c" /* yacc.c:1646 */ break; case 35: #line 325 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyDayOrdinal = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyDayNumber = (yyvsp[0].Number); } #line 1676 "parsedate.c" /* yacc.c:1646 */ break; case 36: #line 331 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMonth = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[0].Number); } #line 1685 "parsedate.c" /* yacc.c:1646 */ break; case 37: #line 335 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); ((struct date_yy *)parm)->yyMonth = (yyvsp[-7].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[-6].Number); ((struct date_yy *)parm)->yyHour = (yyvsp[-5].Number); ((struct date_yy *)parm)->yyMinutes = (yyvsp[-3].Number); ((struct date_yy *)parm)->yySeconds = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyHaveTime = 1; } #line 1701 "parsedate.c" /* yacc.c:1646 */ break; case 38: #line 346 "./parsedate.y" /* yacc.c:1646 */ { /* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY. The goal in recognizing YYYY/MM/DD is solely to support legacy machine-generated dates like those in an RCS log listing. If you want portability, use the ISO 8601 format. */ if((yyvsp[-4].Number) >= 1000) { ((struct date_yy *)parm)->yyYear = (yyvsp[-4].Number); ((struct date_yy *)parm)->yyMonth = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[0].Number); } else { ((struct date_yy *)parm)->yyMonth = (yyvsp[-4].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); } } #line 1724 "parsedate.c" /* yacc.c:1646 */ break; case 40: #line 365 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyHaveTime++; } #line 1732 "parsedate.c" /* yacc.c:1646 */ break; case 41: #line 368 "./parsedate.y" /* yacc.c:1646 */ { /* e.g. 17-JUN-1992. */ ((struct date_yy *)parm)->yyDay = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyMonth = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyYear = -(yyvsp[0].Number); } #line 1743 "parsedate.c" /* yacc.c:1646 */ break; case 42: #line 374 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMonth = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); } #line 1753 "parsedate.c" /* yacc.c:1646 */ break; case 43: #line 379 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMonth = (yyvsp[-1].Number); if((yyvsp[0].Number) > 1000) { ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); } else { ((struct date_yy *)parm)->yyDay = (yyvsp[0].Number); } } #line 1766 "parsedate.c" /* yacc.c:1646 */ break; case 44: #line 387 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMonth = (yyvsp[-3].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); } #line 1776 "parsedate.c" /* yacc.c:1646 */ break; case 45: #line 392 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMonth = (yyvsp[0].Number); if((yyvsp[-1].Number) > 1000) { ((struct date_yy *)parm)->yyYear = (yyvsp[-1].Number); } else { ((struct date_yy *)parm)->yyDay = (yyvsp[-1].Number); } } #line 1789 "parsedate.c" /* yacc.c:1646 */ break; case 46: #line 400 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMonth = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyDay = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); } #line 1799 "parsedate.c" /* yacc.c:1646 */ break; case 48: #line 408 "./parsedate.y" /* yacc.c:1646 */ { int i = (yyvsp[-2].Number); if(i >= 10000) { /* format: yyyymmdd */ ((struct date_yy *)parm)->yyYear = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMonth = i / 100; i %= 100; ((struct date_yy *)parm)->yyDay = i; } else if(i >= 1000 && i <= 9999) { /* format: yyyy */ ((struct date_yy *)parm)->yyYear = i; ((struct date_yy *)parm)->yyDay= 1; ((struct date_yy *)parm)->yyMonth = 1; } } #line 1821 "parsedate.c" /* yacc.c:1646 */ break; case 49: #line 427 "./parsedate.y" /* yacc.c:1646 */ { /* ISO 8601 format. yyyy-mm-dd. */ ((struct date_yy *)parm)->yyYear = (yyvsp[-2].Number); ((struct date_yy *)parm)->yyMonth = -(yyvsp[-1].Number); ((struct date_yy *)parm)->yyDay = -(yyvsp[0].Number); } #line 1832 "parsedate.c" /* yacc.c:1646 */ break; case 50: #line 433 "./parsedate.y" /* yacc.c:1646 */ { /* ISO 8601 format yyyy-mm */ ((struct date_yy *)parm)->yyYear = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyMonth = -(yyvsp[0].Number); ((struct date_yy *)parm)->yyDay = 1; } #line 1843 "parsedate.c" /* yacc.c:1646 */ break; case 51: #line 439 "./parsedate.y" /* yacc.c:1646 */ { const int om = (1 + 9) % 12; /* offset month */ const int oy = (yyvsp[-1].Number) - 1; /* offset year */ ((struct date_yy *)parm)->yyYear = (yyvsp[-1].Number); ((struct date_yy *)parm)->yyMonth = 1; /* Zeller's formula */ ((struct date_yy *)parm)->yyDay -= ((13 * om + 12) / 5 + oy + oy / 4 + oy / 400 - oy / 100) % 7 - 1; } #line 1858 "parsedate.c" /* yacc.c:1646 */ break; case 52: #line 451 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyDay = ((yyvsp[0].Number) / 10) * 7 + ((yyvsp[0].Number) % 10) - 8; } #line 1866 "parsedate.c" /* yacc.c:1646 */ break; case 53: #line 454 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyDay = (yyvsp[-1].Number) * 7 - (yyvsp[0].Number) - 8; } #line 1874 "parsedate.c" /* yacc.c:1646 */ break; case 55: #line 461 "./parsedate.y" /* yacc.c:1646 */ { int i = (yyvsp[-2].Number); if(i <= -100000 || i >= 100000) { ((struct date_yy *)parm)->yyHour = i / 10000; i %= 10000; ((struct date_yy *)parm)->yyMinutes = i / 100; i %= 100; ((struct date_yy *)parm)->yySeconds = i; } else if(i <= -1000 || i >= 1000) { ((struct date_yy *)parm)->yyHour = i / 100; i %= 100; ((struct date_yy *)parm)->yyMinutes = i; ((struct date_yy *)parm)->yySeconds = 0; } else if(i >= -99 && i <= 99) { ((struct date_yy *)parm)->yyHour = i; ((struct date_yy *)parm)->yyMinutes = 0; ((struct date_yy *)parm)->yySeconds = 0; } else { ((struct date_yy *)parm)->yyHaveTime = 0; } ((struct date_yy *)parm)->yyMeridian = MER24; } #line 1902 "parsedate.c" /* yacc.c:1646 */ break; case 56: #line 486 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelSeconds = -((struct date_yy *)parm)->yyRelSeconds; ((struct date_yy *)parm)->yyRelMinutes = -((struct date_yy *)parm)->yyRelMinutes; ((struct date_yy *)parm)->yyRelHour = -((struct date_yy *)parm)->yyRelHour; ((struct date_yy *)parm)->yyRelDay = -((struct date_yy *)parm)->yyRelDay; ((struct date_yy *)parm)->yyRelMonth = -((struct date_yy *)parm)->yyRelMonth; ((struct date_yy *)parm)->yyRelYear = -((struct date_yy *)parm)->yyRelYear; } #line 1921 "parsedate.c" /* yacc.c:1646 */ break; case 58: #line 503 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelYear += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 1929 "parsedate.c" /* yacc.c:1646 */ break; case 59: #line 506 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelYear += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 1937 "parsedate.c" /* yacc.c:1646 */ break; case 60: #line 509 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelYear += (yyvsp[0].Number); } #line 1945 "parsedate.c" /* yacc.c:1646 */ break; case 61: #line 512 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 1953 "parsedate.c" /* yacc.c:1646 */ break; case 62: #line 515 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 1961 "parsedate.c" /* yacc.c:1646 */ break; case 63: #line 518 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelMonth += (yyvsp[0].Number); } #line 1969 "parsedate.c" /* yacc.c:1646 */ break; case 64: #line 521 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelDay += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 1977 "parsedate.c" /* yacc.c:1646 */ break; case 65: #line 524 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelDay += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 1985 "parsedate.c" /* yacc.c:1646 */ break; case 66: #line 527 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelDay += (yyvsp[0].Number); } #line 1993 "parsedate.c" /* yacc.c:1646 */ break; case 67: #line 530 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelHour += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 2001 "parsedate.c" /* yacc.c:1646 */ break; case 68: #line 533 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelHour += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 2009 "parsedate.c" /* yacc.c:1646 */ break; case 69: #line 536 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelHour += (yyvsp[0].Number); } #line 2017 "parsedate.c" /* yacc.c:1646 */ break; case 70: #line 539 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelMinutes += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 2025 "parsedate.c" /* yacc.c:1646 */ break; case 71: #line 542 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelMinutes += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 2033 "parsedate.c" /* yacc.c:1646 */ break; case 72: #line 545 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelMinutes += (yyvsp[0].Number); } #line 2041 "parsedate.c" /* yacc.c:1646 */ break; case 73: #line 548 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 2049 "parsedate.c" /* yacc.c:1646 */ break; case 74: #line 551 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number); } #line 2057 "parsedate.c" /* yacc.c:1646 */ break; case 75: #line 554 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyRelSeconds += (yyvsp[0].Number); } #line 2065 "parsedate.c" /* yacc.c:1646 */ break; case 76: #line 560 "./parsedate.y" /* yacc.c:1646 */ { if(((struct date_yy *)parm)->yyHaveTime && ((struct date_yy *)parm)->yyHaveDate && !((struct date_yy *)parm)->yyHaveRel) ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number); else { if((yyvsp[0].Number) > 10000) { ((struct date_yy *)parm)->yyHaveDate++; ((struct date_yy *)parm)->yyDay= ((yyvsp[0].Number))%100; ((struct date_yy *)parm)->yyMonth= ((yyvsp[0].Number)/100)%100; ((struct date_yy *)parm)->yyYear = (yyvsp[0].Number)/10000; } else { ((struct date_yy *)parm)->yyHaveTime++; if((yyvsp[0].Number) < 100) { ((struct date_yy *)parm)->yyHour = (yyvsp[0].Number); ((struct date_yy *)parm)->yyMinutes = 0; } else { ((struct date_yy *)parm)->yyHour = (yyvsp[0].Number) / 100; ((struct date_yy *)parm)->yyMinutes = (yyvsp[0].Number) % 100; } ((struct date_yy *)parm)->yySeconds = 0; ((struct date_yy *)parm)->yyMeridian = MER24; } } } #line 2102 "parsedate.c" /* yacc.c:1646 */ break; case 77: #line 595 "./parsedate.y" /* yacc.c:1646 */ { ((struct date_yy *)parm)->yyMeridian = (yyvsp[0].Meridian); } #line 2110 "parsedate.c" /* yacc.c:1646 */ break; #line 2114 "parsedate.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (parm, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; if(yytoken < 0) yytoken = YYUNDEFTOK; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { if(yytoken < 0) yytoken = YYUNDEFTOK; yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (parm, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, parm); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp, parm); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (parm, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, parm); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, parm); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif return yyresult; } #line 600 "./parsedate.y" /* yacc.c:1906 */ time_t get_date (char *p, time_t *now); /* Month and day table. */ static TABLE const MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, { "april", tMONTH, 4 }, { "may", tMONTH, 5 }, { "june", tMONTH, 6 }, { "july", tMONTH, 7 }, { "august", tMONTH, 8 }, { "september", tMONTH, 9 }, { "sept", tMONTH, 9 }, { "october", tMONTH, 10 }, { "november", tMONTH, 11 }, { "december", tMONTH, 12 }, { "sunday", tDAY, 0 }, { "monday", tDAY, 1 }, { "tuesday", tDAY, 2 }, { "tues", tDAY, 2 }, { "wednesday", tDAY, 3 }, { "wednes", tDAY, 3 }, { "thursday", tDAY, 4 }, { "thur", tDAY, 4 }, { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, { NULL, 0, 0 } }; /* Time units table. */ static TABLE const UnitsTable[] = { { "year", tYEAR_UNIT, 1 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, { "week", tDAY_UNIT, 7 }, { "day", tDAY_UNIT, 1 }, { "hour", tHOUR_UNIT, 1 }, { "minute", tMINUTE_UNIT, 1 }, { "min", tMINUTE_UNIT, 1 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, { NULL, 0, 0 } }; /* Assorted relative-time words. */ static TABLE const OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, { "now", tDAY_UNIT, 0 }, { "last", tUNUMBER, -1 }, { "this", tUNUMBER, 0 }, { "next", tUNUMBER, 1 }, { "first", tUNUMBER, 1 }, /* { "second", tUNUMBER, 2 }, */ { "third", tUNUMBER, 3 }, { "fourth", tUNUMBER, 4 }, { "fifth", tUNUMBER, 5 }, { "sixth", tUNUMBER, 6 }, { "seventh", tUNUMBER, 7 }, { "eighth", tUNUMBER, 8 }, { "ninth", tUNUMBER, 9 }, { "tenth", tUNUMBER, 10 }, { "eleventh", tUNUMBER, 11 }, { "twelfth", tUNUMBER, 12 }, { "ago", tAGO, 1 }, { NULL, 0, 0 } }; /* The timezone table. */ static TABLE const TimezoneTable[] = { { "gmt", tZONE, HOUR ( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR ( 0) }, { "wet", tZONE, HOUR ( 0) }, /* Western European */ { "bst", tDAYZONE, HOUR ( 0) }, /* British Summer */ { "wat", tZONE, HOUR ( 1) }, /* West Africa */ { "at", tZONE, HOUR ( 2) }, /* Azores */ #if 0 /* For completeness. BST is also British Summer, and GST is * also Guam Standard. */ { "bst", tZONE, HOUR ( 3) }, /* Brazil Standard */ { "gst", tZONE, HOUR ( 3) }, /* Greenland Standard */ #endif #if 0 { "nft", tZONE, HOUR (3.5) }, /* Newfoundland */ { "nst", tZONE, HOUR (3.5) }, /* Newfoundland Standard */ { "ndt", tDAYZONE, HOUR (3.5) }, /* Newfoundland Daylight */ #endif { "ast", tZONE, HOUR ( 4) }, /* Atlantic Standard */ { "adt", tDAYZONE, HOUR ( 4) }, /* Atlantic Daylight */ { "est", tZONE, HOUR ( 5) }, /* Eastern Standard */ { "edt", tDAYZONE, HOUR ( 5) }, /* Eastern Daylight */ { "cst", tZONE, HOUR ( 6) }, /* Central Standard */ { "cdt", tDAYZONE, HOUR ( 6) }, /* Central Daylight */ { "mst", tZONE, HOUR ( 7) }, /* Mountain Standard */ { "mdt", tDAYZONE, HOUR ( 7) }, /* Mountain Daylight */ { "pst", tZONE, HOUR ( 8) }, /* Pacific Standard */ { "pdt", tDAYZONE, HOUR ( 8) }, /* Pacific Daylight */ { "yst", tZONE, HOUR ( 9) }, /* Yukon Standard */ { "ydt", tDAYZONE, HOUR ( 9) }, /* Yukon Daylight */ { "hst", tZONE, HOUR (10) }, /* Hawaii Standard */ { "hdt", tDAYZONE, HOUR (10) }, /* Hawaii Daylight */ { "cat", tZONE, HOUR (10) }, /* Central Alaska */ { "akst", tZONE, HOUR (10) }, /* Alaska Standard */ { "akdt", tZONE, HOUR (10) }, /* Alaska Daylight */ { "ahst", tZONE, HOUR (10) }, /* Alaska-Hawaii Standard */ { "nt", tZONE, HOUR (11) }, /* Nome */ { "idlw", tZONE, HOUR (12) }, /* International Date Line West */ { "cet", tZONE, -HOUR (1) }, /* Central European */ { "cest", tDAYZONE, -HOUR (1) }, /* Central European Summer */ { "met", tZONE, -HOUR (1) }, /* Middle European */ { "mewt", tZONE, -HOUR (1) }, /* Middle European Winter */ { "mest", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "mesz", tDAYZONE, -HOUR (1) }, /* Middle European Summer */ { "swt", tZONE, -HOUR (1) }, /* Swedish Winter */ { "sst", tDAYZONE, -HOUR (1) }, /* Swedish Summer */ { "fwt", tZONE, -HOUR (1) }, /* French Winter */ { "fst", tDAYZONE, -HOUR (1) }, /* French Summer */ { "eet", tZONE, -HOUR (2) }, /* Eastern Europe, USSR Zone 1 */ { "bt", tZONE, -HOUR (3) }, /* Baghdad, USSR Zone 2 */ #if 0 { "it", tZONE, -HOUR (3.5) },/* Iran */ #endif { "zp4", tZONE, -HOUR (4) }, /* USSR Zone 3 */ { "zp5", tZONE, -HOUR (5) }, /* USSR Zone 4 */ #if 0 { "ist", tZONE, -HOUR (5.5) },/* Indian Standard */ #endif { "zp6", tZONE, -HOUR (6) }, /* USSR Zone 5 */ #if 0 /* For completeness. NST is also Newfoundland Standard, and SST is * also Swedish Summer. */ { "nst", tZONE, -HOUR (6.5) },/* North Sumatra */ { "sst", tZONE, -HOUR (7) }, /* South Sumatra, USSR Zone 6 */ #endif /* 0 */ { "wast", tZONE, -HOUR (7) }, /* West Australian Standard */ { "wadt", tDAYZONE, -HOUR (7) }, /* West Australian Daylight */ #if 0 { "jt", tZONE, -HOUR (7.5) },/* Java (3pm in Cronusland!) */ #endif { "cct", tZONE, -HOUR (8) }, /* China Coast, USSR Zone 7 */ { "jst", tZONE, -HOUR (9) }, /* Japan Standard, USSR Zone 8 */ #if 0 { "cast", tZONE, -HOUR (9.5) },/* Central Australian Standard */ { "cadt", tDAYZONE, -HOUR (9.5) },/* Central Australian Daylight */ #endif { "east", tZONE, -HOUR (10) }, /* Eastern Australian Standard */ { "eadt", tDAYZONE, -HOUR (10) }, /* Eastern Australian Daylight */ { "gst", tZONE, -HOUR (10) }, /* Guam Standard, USSR Zone 9 */ { "nzt", tZONE, -HOUR (12) }, /* New Zealand */ { "nzst", tZONE, -HOUR (12) }, /* New Zealand Standard */ { "nzdt", tDAYZONE, -HOUR (12) }, /* New Zealand Daylight */ { "idle", tZONE, -HOUR (12) }, /* International Date Line East */ { NULL, 0, 0 } }; /* Military timezone table. */ static TABLE const MilitaryTable[] = { { "a", tZONE, HOUR (- 1) }, { "b", tZONE, HOUR (- 2) }, { "c", tZONE, HOUR (- 3) }, { "d", tZONE, HOUR (- 4) }, { "e", tZONE, HOUR (- 5) }, { "f", tZONE, HOUR (- 6) }, { "g", tZONE, HOUR (- 7) }, { "h", tZONE, HOUR (- 8) }, { "i", tZONE, HOUR (- 9) }, { "k", tZONE, HOUR (-10) }, { "l", tZONE, HOUR (-11) }, { "m", tZONE, HOUR (-12) }, { "n", tZONE, HOUR ( 1) }, { "o", tZONE, HOUR ( 2) }, { "p", tZONE, HOUR ( 3) }, { "q", tZONE, HOUR ( 4) }, { "r", tZONE, HOUR ( 5) }, { "s", tZONE, HOUR ( 6) }, { "t", tTZONE, HOUR ( 7) }, { "u", tZONE, HOUR ( 8) }, { "v", tZONE, HOUR ( 9) }, { "w", tWZONE, HOUR ( 10) }, { "x", tZONE, HOUR ( 11) }, { "y", tZONE, HOUR ( 12) }, { "z", tZZONE, HOUR ( 0) }, { NULL, 0, 0 } }; /* ARGSUSED */ static int yyerror(void* parm, const char *s) { return 0; } static int ToHour(int Hours, MERIDIAN Meridian) { switch (Meridian) { case MER24: if(Hours < 0 || Hours > 23) return -1; return Hours; case MERam: if(Hours < 1 || Hours > 12) return -1; if(Hours == 12) Hours = 0; return Hours; case MERpm: if(Hours < 1 || Hours > 12) return -1; if(Hours == 12) Hours = 0; return Hours + 12; default: #ifdef RAPTOR_DEBUG fprintf(stderr, "%s:%d:%s: UNKNOWN Meridian %d - add a new case", __FILE__, __LINE__, __FUNCTION__, (int)Meridian); #endif return -1; } /* NOTREACHED */ } static int ToYear(int Year) { if(Year < 0) Year = -Year; /* XPG4 suggests that years 00-68 map to 2000-2068, and years 69-99 map to 1969-1999. */ if(Year < 69) Year += 2000; else if(Year < 100) Year += 1900; return Year; } static int LookupWord (YYSTYPE *lvalp, char *buff) { char *p; char *q; const TABLE *tp; int i; int abbrev; /* Make it lowercase. */ for(p = buff; *p; p++) if(ISUPPER ((unsigned char) *p)) *p = tolower (*p); if(strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0) { lvalp->Meridian = MERam; return tMERIDIAN; } if(strcmp (buff, "pm") == 0 || strcmp (buff, "p.m.") == 0) { lvalp->Meridian = MERpm; return tMERIDIAN; } /* See if we have an abbreviation for a month. */ if(strlen (buff) == 3) abbrev = 1; else if(strlen (buff) == 4 && buff[3] == '.') { abbrev = 1; buff[3] = '\0'; } else abbrev = 0; for(tp = MonthDayTable; tp->name; tp++) { if(abbrev) { if(strncmp (buff, tp->name, 3) == 0) { lvalp->Number = tp->value; return tp->type; } } else if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } for(tp = TimezoneTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } if(strcmp (buff, "dst") == 0) return tDST; for(tp = UnitsTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Strip off any plural and try the units table again. */ i = RAPTOR_BAD_CAST(int, strlen(buff)) - 1; if(buff[i] == 's') { buff[i] = '\0'; for(tp = UnitsTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } buff[i] = 's'; /* Put back for "this" in OtherTable. */ } for(tp = OtherTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } /* Military timezones. */ if(buff[1] == '\0' && ISALPHA ((unsigned char) *buff)) { for(tp = MilitaryTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } } /* Drop out any periods and try the timezone table again. */ for(i = 0, p = q = buff; *q; q++) if(*q != '.') *p++ = *q; else i++; *p = '\0'; if(i) for(tp = TimezoneTable; tp->name; tp++) if(strcmp (buff, tp->name) == 0) { lvalp->Number = tp->value; return tp->type; } return tID; } int yylex(YYSTYPE *lvalp, void *parm) { unsigned char c; char *p; char buff[20]; int Count; int sign; struct date_yy * date = (struct date_yy *)parm; for(;;) { while(ISSPACE ((unsigned char) *date->yyInput)) date->yyInput++; if(ISDIGIT (c = *date->yyInput) || c == '-' || c == '+') { if(c == '-' || c == '+') { sign = c == '-' ? -1 : 1; if(!ISDIGIT (*++date->yyInput)) /* skip the '-' sign */ continue; } else sign = 0; for(lvalp->Number = 0; ISDIGIT (c = *date->yyInput++);) lvalp->Number = 10 * lvalp->Number + c - '0'; date->yyInput--; if(sign < 0) lvalp->Number = -lvalp->Number; /* Ignore ordinal suffixes on numbers */ c = *date->yyInput; if(c == 's' || c == 'n' || c == 'r' || c == 't') { c = *++date->yyInput; if(c == 't' || c == 'd' || c == 'h') { date->yyInput++; } else { date->yyInput--; } } return sign ? tSNUMBER : tUNUMBER; } if(ISALPHA (c)) { for(p = buff; (c = *date->yyInput++, ISALPHA (c)) || c == '.';) if(p < &buff[sizeof buff - 1]) *p++ = c; *p = '\0'; date->yyInput--; return LookupWord (lvalp, buff); } if(c != '(') return *date->yyInput++; Count = 0; do { c = *date->yyInput++; if(c == '\0') return c; if(c == '(') Count++; else if(c == ')') Count--; } while(Count > 0); } } #define TM_YEAR_ORIGIN 1900 /* Yield A - B, measured in seconds. */ static long difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); long days = ( /* difference in day of year */ a->tm_yday - b->tm_yday /* + intervening leap days */ + ((ay >> 2) - (by >> 2)) - (ay / 100 - by / 100) + ((ay / 100 >> 2) - (by / 100 >> 2)) /* + difference in years * 365 */ + (long) (ay - by) * 365 ); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } time_t raptor_parse_date(const char *p, time_t *now) { struct tm tm, tm0, *tmp; time_t Start; struct date_yy date; date.yyInput = p; Start = now ? *now : time ((time_t *) NULL); tmp = localtime (&Start); if(!tmp) return -1; date.yyYear = tmp->tm_year + TM_YEAR_ORIGIN; date.yyMonth = tmp->tm_mon + 1; date.yyDay = tmp->tm_mday; date.yyHour = tmp->tm_hour; date.yyMinutes = tmp->tm_min; date.yySeconds = tmp->tm_sec; tm.tm_isdst = tmp->tm_isdst; date.yyMeridian = MER24; date.yyRelSeconds = 0; date.yyRelMinutes = 0; date.yyRelHour = 0; date.yyRelDay = 0; date.yyRelMonth = 0; date.yyRelYear = 0; date.yyHaveDate = 0; date.yyHaveDay = 0; date.yyHaveRel = 0; date.yyHaveTime = 0; date.yyHaveZone = 0; if(yyparse (&date) || date.yyHaveTime > 1 || date.yyHaveZone > 1 || date.yyHaveDate > 1 || date.yyHaveDay > 1) { return -1; } tm.tm_year = ToYear (date.yyYear) - TM_YEAR_ORIGIN + date.yyRelYear; tm.tm_mon = date.yyMonth - 1 + date.yyRelMonth; tm.tm_mday = date.yyDay + date.yyRelDay; if(date.yyHaveTime || (date.yyHaveRel && !date.yyHaveDate && !date.yyHaveDay)) { tm.tm_hour = ToHour (date.yyHour, date.yyMeridian); if(tm.tm_hour < 0) return -1; tm.tm_min = date.yyMinutes; tm.tm_sec = date.yySeconds; } else { tm.tm_hour = tm.tm_min = tm.tm_sec = 0; } tm.tm_hour += date.yyRelHour; tm.tm_min += date.yyRelMinutes; tm.tm_sec += date.yyRelSeconds; /* Let mktime deduce tm_isdst if we have an absolute timestamp, or if the relative timestamp mentions days, months, or years. */ if(date.yyHaveDate | date.yyHaveDay | date.yyHaveTime | date.yyRelDay | date.yyRelMonth | date.yyRelYear) tm.tm_isdst = -1; tm0 = tm; Start = mktime (&tm); if(Start == (time_t) -1) { /* Guard against falsely reporting errors near the time_t boundaries when parsing times in other time zones. For example, if the min time_t value is 1970-01-01 00:00:00 UTC and we are 8 hours ahead of UTC, then the min localtime value is 1970-01-01 08:00:00; if we apply mktime to 1970-01-01 00:00:00 we will get an error, so we apply mktime to 1970-01-02 08:00:00 instead and adjust the time zone by 24 hours to compensate. This algorithm assumes that there is no DST transition within a day of the time_t boundaries. */ if(date.yyHaveZone) { tm = tm0; if(tm.tm_year <= EPOCH - TM_YEAR_ORIGIN) { tm.tm_mday++; date.yyTimezone -= 24 * 60; } else { tm.tm_mday--; date.yyTimezone += 24 * 60; } Start = mktime (&tm); } if(Start == (time_t) -1) return Start; } if(date.yyHaveDay && !date.yyHaveDate) { tm.tm_mday += ((date.yyDayNumber - tm.tm_wday + 7) % 7 + 7 * (date.yyDayOrdinal - (0 < date.yyDayOrdinal))); Start = mktime (&tm); if(Start == (time_t) -1) return Start; } if(date.yyHaveZone) { long delta; struct tm *gmt = gmtime (&Start); if(!gmt) return -1; delta = date.yyTimezone * 60L + difftm (&tm, gmt); if((Start + delta < Start) != (delta < 0)) return -1; /* time_t overflow */ Start += delta; } return Start; } raptor2-2.0.15/src/turtle_parser.h0000644000175000017500000000565012425333257013760 00000000000000/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_TURTLE_PARSER_TURTLE_PARSER_TAB_H_INCLUDED # define YY_TURTLE_PARSER_TURTLE_PARSER_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int turtle_parser_debug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { A = 258, HAT = 259, DOT = 260, COMMA = 261, SEMICOLON = 262, LEFT_SQUARE = 263, RIGHT_SQUARE = 264, LEFT_ROUND = 265, RIGHT_ROUND = 266, LEFT_CURLY = 267, RIGHT_CURLY = 268, TRUE_TOKEN = 269, FALSE_TOKEN = 270, PREFIX = 271, BASE = 272, SPARQL_PREFIX = 273, SPARQL_BASE = 274, STRING_LITERAL = 275, URI_LITERAL = 276, GRAPH_NAME_LEFT_CURLY = 277, BLANK_LITERAL = 278, QNAME_LITERAL = 279, IDENTIFIER = 280, LANGTAG = 281, INTEGER_LITERAL = 282, FLOATING_LITERAL = 283, DECIMAL_LITERAL = 284, ERROR_TOKEN = 285 }; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE YYSTYPE; union YYSTYPE { #line 136 "./turtle_parser.y" /* yacc.c:1909 */ unsigned char *string; raptor_term *identifier; raptor_sequence *sequence; raptor_uri *uri; #line 92 "turtle_parser.tab.h" /* yacc.c:1909 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif int turtle_parser_parse (raptor_parser* rdf_parser, void* yyscanner); #endif /* !YY_TURTLE_PARSER_TURTLE_PARSER_TAB_H_INCLUDED */ raptor2-2.0.15/src/raptor_locator.c0000644000175000017500000001350112333764117014105 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_locator.c - Raptor parsing locator functions * * Copyright (C) 2002-2006, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2006, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /** * raptor_locator_print: * @locator: #raptor_locator to print * @stream: stream to print to * * Print a raptor locator to a stream. * * Return value: non-0 on failure **/ int raptor_locator_print(raptor_locator* locator, FILE *stream) { if(!locator) return 1; if(locator->uri) fprintf(stream, "URI %s", raptor_uri_as_string(locator->uri)); else if(locator->file) fprintf(stream, "file %s", locator->file); else return 0; if(locator->line >= 0) { fprintf(stream, ":%d", locator->line); if(locator->column >= 0) fprintf(stream, " column %d", locator->column); } return 0; } /** * raptor_locator_format: * @buffer: buffer to store format * @length: size of buffer (excluding NUL) * @locator: #raptor_locator to format * * Format a raptor locator as a string. * * If buffer is NULL or @length is insufficient for the size of * the locator, returns the number of additional bytes required * in the buffer to write the locator. Writes a terminating '\0'. * * Return value: 0 on success, >0 if additional bytes required in buffer, <0 on failure **/ int raptor_locator_format(char *buffer, size_t length, raptor_locator* locator) { size_t bufsize = 0; const char* label_str; size_t label_len = 0; const char* value_str = NULL; size_t value_len; if(!locator) return -1; #define URI_STR "URI " #define URI_STR_LEN 4 /* strlen(URI_STR) */ #define FILE_STR "file " #define FILE_STR_LEN 5 /* strlen(FILE_STR) */ #define COLUMN_STR " column " #define COLUMN_STR_LEN 8 /* strlen(COLUMN_STR) */ if(locator->uri) { label_str = URI_STR; label_len = URI_STR_LEN; value_str = (const char*)raptor_uri_as_counted_string(locator->uri, &value_len); } else if(locator->file) { label_str = FILE_STR; label_len = FILE_STR_LEN; value_str = locator->file; value_len = strlen(value_str); } else return -1; bufsize = label_len + value_len; if(locator->line > 0) { bufsize += 1 + raptor_format_integer(NULL, 0, locator->line, /* base */ 10, -1, '\0'); if(locator->column >= 0) bufsize += COLUMN_STR_LEN + raptor_format_integer(NULL, 0, locator->column, /* base */ 10, -1, '\0'); } if(!buffer || !length || length < (bufsize + 1)) /* +1 for NUL */ return RAPTOR_BAD_CAST(int, bufsize); memcpy(buffer, label_str, label_len); buffer += label_len; memcpy(buffer, value_str, value_len); buffer += value_len; if(locator->line > 0) { *buffer ++= ':'; buffer += raptor_format_integer(buffer, length, locator->line, /* base */ 10, -1, '\0'); if(locator->column >= 0) { memcpy(buffer, COLUMN_STR, COLUMN_STR_LEN); buffer += COLUMN_STR_LEN; buffer += raptor_format_integer(buffer, length, locator->column, /* base */ 10, -1, '\0'); } } *buffer = '\0'; return 0; } /** * raptor_locator_line: * @locator: locator * * Get line number from locator. * * Return value: integer line number, or -1 if there is no line number available **/ int raptor_locator_line(raptor_locator *locator) { if(!locator) return -1; return locator->line; } /** * raptor_locator_column: * @locator: locator * * Get column number from locator. * * Return value: integer column number, or -1 if there is no column number available **/ int raptor_locator_column(raptor_locator *locator) { if(!locator) return -1; return locator->column; } /** * raptor_locator_byte: * @locator: locator * * Get the locator byte offset from locator. * * Return value: integer byte number, or -1 if there is no byte offset available **/ int raptor_locator_byte(raptor_locator *locator) { if(!locator) return -1; return locator->byte; } /** * raptor_locator_file: * @locator: locator * * Get file name from locator. * * Return value: string file name, or NULL if there is no filename available **/ const char * raptor_locator_file(raptor_locator *locator) { if(!locator) return NULL; return locator->file; } /** * raptor_locator_uri: * @locator: locator * * Get URI from locator. * * Returns a pointer to a shared string version of the URI in * the locator. This must be copied if it is needed. * * Return value: string URI, or NULL if there is no URI available **/ const char * raptor_locator_uri(raptor_locator *locator) { if(!locator) return NULL; return (const char*)raptor_uri_as_string(locator->uri); } raptor2-2.0.15/src/turtle_parser.y0000644000175000017500000013516612425333224014001 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_parser.y - Raptor Turtle / TRIG / N3 parsers - over tokens from turtle grammar lexer * * Copyright (C) 2003-2013, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Turtle is defined in http://www.dajobe.org/2004/01/turtle/ * * Made from a subset of the terms in * http://www.w3.org/DesignIssues/Notation3.html * * TRIG is defined in http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/ */ %{ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "raptor2.h" #include "raptor_internal.h" #include #define YY_NO_UNISTD_H 1 #include #include /* Set RAPTOR_DEBUG to 3 for super verbose parsing - watching the shift/reduces */ #if 0 #undef RAPTOR_DEBUG #define RAPTOR_DEBUG 3 #endif /* Make verbose error messages for syntax errors */ #define YYERROR_VERBOSE 1 /* Fail with an debug error message if RAPTOR_DEBUG > 1 */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 #define YYERROR_MSG(msg) do { fputs("** YYERROR ", RAPTOR_DEBUG_FH); fputs(msg, RAPTOR_DEBUG_FH); fputc('\n', RAPTOR_DEBUG_FH); YYERROR; } while(0) #else #define YYERROR_MSG(ignore) YYERROR #endif #define YYERR_MSG_GOTO(label,msg) do { errmsg = msg; goto label; } while(0) /* Slow down the grammar operation and watch it work */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 #undef YYDEBUG #define YYDEBUG 1 #endif #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif /* the lexer does not seem to track this */ #undef RAPTOR_TURTLE_USE_ERROR_COLUMNS /* set api.push-pull to "push" if this is defined */ #undef TURTLE_PUSH_PARSE /* Prototypes */ int turtle_parser_error(raptor_parser* rdf_parser, void* scanner, const char *msg); /* Make lex/yacc interface as small as possible */ #undef yylex #define yylex turtle_lexer_lex /* Prototypes for local functions */ static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_statement *triple); %} /* directives */ %require "3.0.0" /* File prefix (bison -b) */ %file-prefix "turtle_parser" /* Symbol prefix (bison -d : deprecated) */ %name-prefix "turtle_parser_" /* Write parser header file with macros (bison -d) */ %defines /* Write output file with verbose descriptions of parser states */ %verbose /* Generate code processing locations */ /* %locations */ /* Pure parser - want a reentrant parser */ %define api.pure full /* Push or pull parser? */ %define api.push-pull pull /* Pure parser argument: lexer - yylex() and parser - yyparse() */ %lex-param { yyscan_t yyscanner } %parse-param { raptor_parser* rdf_parser } { void* yyscanner } /* Interface between lexer and parser */ %union { unsigned char *string; raptor_term *identifier; raptor_sequence *sequence; raptor_uri *uri; } /* others */ %token A "a" %token HAT "^" %token DOT "." %token COMMA "," %token SEMICOLON ";" %token LEFT_SQUARE "[" %token RIGHT_SQUARE "]" %token LEFT_ROUND "(" %token RIGHT_ROUND ")" %token LEFT_CURLY "{" %token RIGHT_CURLY "}" %token TRUE_TOKEN "true" %token FALSE_TOKEN "false" %token PREFIX "@prefix" %token BASE "@base" %token SPARQL_PREFIX "PREFIX" %token SPARQL_BASE "BASE" /* literals */ %token STRING_LITERAL "string literal" %token URI_LITERAL "URI literal" %token GRAPH_NAME_LEFT_CURLY "Graph URI literal {" %token BLANK_LITERAL "blank node" %token QNAME_LITERAL "QName" %token IDENTIFIER "identifier" %token LANGTAG "langtag" %token INTEGER_LITERAL "integer literal" %token FLOATING_LITERAL "floating point literal" %token DECIMAL_LITERAL "decimal literal" /* syntax error */ %token ERROR_TOKEN %type subject predicate object verb literal resource blankNode collection blankNodePropertyList %type objectList itemList predicateObjectList predicateObjectListOpt /* tidy up tokens after errors */ %destructor { if($$) RAPTOR_FREE(char*, $$); } STRING_LITERAL BLANK_LITERAL INTEGER_LITERAL FLOATING_LITERAL DECIMAL_LITERAL IDENTIFIER LANGTAG %destructor { if($$) raptor_free_uri($$); } URI_LITERAL QNAME_LITERAL %destructor { if($$) raptor_free_term($$); } subject predicate object verb literal resource blankNode collection %destructor { if($$) raptor_free_sequence($$); } objectList itemList predicateObjectList predicateObjectListOpt %% Document : statementList ;; graph: GRAPH_NAME_LEFT_CURLY { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, yyscanner, "{ ... } is not allowed in Turtle"); else { if(turtle_parser->graph_name) raptor_free_term(turtle_parser->graph_name); turtle_parser->graph_name = raptor_new_term_from_uri(rdf_parser->world, $1); raptor_free_uri($1); raptor_parser_start_graph(rdf_parser, turtle_parser->graph_name->value.uri, 1); } } graphBody RIGHT_CURLY { raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->trig) { raptor_parser_end_graph(rdf_parser, turtle_parser->graph_name->value.uri, 1); raptor_free_term(turtle_parser->graph_name); turtle_parser->graph_name = NULL; rdf_parser->emitted_default_graph = 0; } } | LEFT_CURLY { /* action in mid-rule so this is run BEFORE the triples in graphBody */ raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!turtle_parser->trig) turtle_parser_error(rdf_parser, yyscanner, "{ ... } is not allowed in Turtle"); else { raptor_parser_start_graph(rdf_parser, NULL, 1); rdf_parser->emitted_default_graph++; } } graphBody RIGHT_CURLY { raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->trig) { raptor_parser_end_graph(rdf_parser, NULL, 1); rdf_parser->emitted_default_graph = 0; } } ; graphBody: triplesList | %empty ; triplesList: dotTriplesList | dotTriplesList DOT ; dotTriplesList: triples | dotTriplesList DOT triples ; statementList: statementList statement | %empty ; statement: directive | graph | triples DOT ; triples: subject predicateObjectList { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("triples 1\n subject="); if($1) raptor_term_print_as_ntriples($1, stdout); else fputs("NULL", stdout); if($2) { printf("\n predicateObjectList (reverse order to syntax)="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty predicateObjectList\n"); #endif if($1 && $2) { /* have subject and non-empty property list, handle it */ for(i = 0; i < raptor_sequence_size($2); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); t2->subject = raptor_term_copy($1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution predicateObjectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif for(i = 0; i < raptor_sequence_size($2); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); raptor_turtle_generate_statement(rdf_parser, t2); } } if($2) raptor_free_sequence($2); if($1) raptor_free_term($1); } | blankNodePropertyList predicateObjectListOpt { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("triples 2\n blankNodePropertyList="); if($1) raptor_term_print_as_ntriples($1, stdout); else fputs("NULL", stdout); if($2) { printf("\n predicateObjectListOpt (reverse order to syntax)="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty predicateObjectListOpt\n"); #endif if($1 && $2) { /* have subject and non-empty predicate object list, handle it */ for(i = 0; i < raptor_sequence_size($2); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); t2->subject = raptor_term_copy($1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution predicateObjectListOpt="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif for(i = 0; i < raptor_sequence_size($2); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); raptor_turtle_generate_statement(rdf_parser, t2); } } if($2) raptor_free_sequence($2); if($1) raptor_free_term($1); } | error DOT ; objectList: objectList COMMA object { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 1\n"); if($3) { printf(" object=\n"); raptor_term_print_as_ntriples($3, stdout); printf("\n"); } else printf(" and empty object\n"); if($1) { printf(" objectList="); raptor_sequence_print($1, stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!$3) $$ = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, $3, NULL); if(!triple) { raptor_free_sequence($1); YYERROR; } if(raptor_sequence_push($1, triple)) { raptor_free_sequence($1); YYERROR; } $$ = $1; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } | object { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 2\n"); if($1) { printf(" object=\n"); raptor_term_print_as_ntriples($1, stdout); printf("\n"); } else printf(" and empty object\n"); #endif if(!$1) $$ = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, $1, NULL); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG $$ = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, (raptor_data_print_handler)raptor_statement_print); #else $$ = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, NULL); #endif if(!$$) { raptor_free_statement(triple); YYERROR; } if(raptor_sequence_push($$, triple)) { raptor_free_sequence($$); $$ = NULL; YYERROR; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } ; itemList: itemList object { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 1\n"); if($2) { printf(" object=\n"); raptor_term_print_as_ntriples($2, stdout); printf("\n"); } else printf(" and empty object\n"); if($1) { printf(" objectList="); raptor_sequence_print($1, stdout); printf("\n"); } else printf(" and empty objectList\n"); #endif if(!$2) $$ = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, $2, NULL); if(!triple) { raptor_free_sequence($1); YYERROR; } if(raptor_sequence_push($1, triple)) { raptor_free_sequence($1); YYERROR; } $$ = $1; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } | object { raptor_statement *triple; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("objectList 2\n"); if($1) { printf(" object=\n"); raptor_term_print_as_ntriples($1, stdout); printf("\n"); } else printf(" and empty object\n"); #endif if(!$1) $$ = NULL; else { triple = raptor_new_statement_from_nodes(rdf_parser->world, NULL, NULL, $1, NULL); if(!triple) YYERROR; #ifdef RAPTOR_DEBUG $$ = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, (raptor_data_print_handler)raptor_statement_print); #else $$ = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, NULL); #endif if(!$$) { raptor_free_statement(triple); YYERROR; } if(raptor_sequence_push($$, triple)) { raptor_free_sequence($$); $$ = NULL; YYERROR; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" objectList is now "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } } ; verb: predicate { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("verb predicate="); raptor_term_print_as_ntriples($1, stdout); printf("\n"); #endif $$ = $1; } | A { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("verb predicate = rdf:type (a)\n"); #endif $$ = raptor_term_copy(RAPTOR_RDF_type_term(rdf_parser->world)); if(!$$) YYERROR; } ; predicateObjectList: predicateObjectList SEMICOLON verb objectList { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("predicateObjectList 1\n verb="); raptor_term_print_as_ntriples($3, stdout); printf("\n objectList="); raptor_sequence_print($4, stdout); printf("\n predicateObjectList="); raptor_sequence_print($1, stdout); printf("\n\n"); #endif if($4 == NULL) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" empty objectList not processed\n"); #endif } else if($3 && $4) { /* non-empty property list, handle it */ for(i = 0; i < raptor_sequence_size($4); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($4, i); t2->predicate = raptor_term_copy($3); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($4, stdout); printf("\n"); #endif } if($1 == NULL) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" empty predicateObjectList not copied\n\n"); #endif } else if($3 && $4 && $1) { while(raptor_sequence_size($4)) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_unshift($4); if(raptor_sequence_push($1, t2)) { raptor_free_sequence($1); raptor_free_term($3); raptor_free_sequence($4); YYERROR; } } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after appending objectList (reverse order)="); raptor_sequence_print($1, stdout); printf("\n\n"); #endif raptor_free_sequence($4); } if($3) raptor_free_term($3); $$ = $1; } | verb objectList { int i; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("predicateObjectList 2\n verb="); raptor_term_print_as_ntriples($1, stdout); if($2) { printf("\n objectList="); raptor_sequence_print($2, stdout); printf("\n"); } else printf("\n and empty objectList\n"); #endif if($1 && $2) { for(i = 0; i < raptor_sequence_size($2); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); t2->predicate = raptor_term_copy($1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif } if($1) raptor_free_term($1); $$ = $2; } | predicateObjectList SEMICOLON { $$ = $1; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("predicateObjectList 5\n trailing semicolon returning existing list "); raptor_sequence_print($$, stdout); printf("\n\n"); #endif } ; directive : prefix | base ; prefix: PREFIX IDENTIFIER URI_LITERAL DOT { unsigned char *prefix = $2; raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)(rdf_parser->context); raptor_namespace *ns; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("directive PREFIX %s %s\n",($2 ? (char*)$2 : "(default)"), raptor_uri_as_string($3)); #endif if(prefix) { size_t len = strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix PREFIX : ... */ prefix = NULL; else prefix[len-1]='\0'; } } ns = raptor_new_namespace_from_uri(&turtle_parser->namespaces, prefix, $3, 0); if(ns) { raptor_namespaces_start_namespace(&turtle_parser->namespaces, ns); raptor_parser_start_namespace(rdf_parser, ns); } if($2) RAPTOR_FREE(char*, $2); raptor_free_uri($3); if(!ns) YYERROR; } | SPARQL_PREFIX IDENTIFIER URI_LITERAL { unsigned char *prefix = $2; raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)(rdf_parser->context); raptor_namespace *ns; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("directive @prefix %s %s.\n",($2 ? (char*)$2 : "(default)"), raptor_uri_as_string($3)); #endif if(prefix) { size_t len = strlen((const char*)prefix); if(prefix[len-1] == ':') { if(len == 1) /* declaring default namespace prefix @prefix : ... */ prefix = NULL; else prefix[len-1]='\0'; } } ns = raptor_new_namespace_from_uri(&turtle_parser->namespaces, prefix, $3, 0); if(ns) { raptor_namespaces_start_namespace(&turtle_parser->namespaces, ns); raptor_parser_start_namespace(rdf_parser, ns); } if($2) RAPTOR_FREE(char*, $2); raptor_free_uri($3); if(!ns) YYERROR; } ; base: BASE URI_LITERAL DOT { raptor_uri *uri=$2; if(rdf_parser->base_uri) raptor_free_uri(rdf_parser->base_uri); rdf_parser->base_uri = uri; } | SPARQL_BASE URI_LITERAL { raptor_uri *uri=$2; if(rdf_parser->base_uri) raptor_free_uri(rdf_parser->base_uri); rdf_parser->base_uri = uri; } ; subject: resource { $$ = $1; } | blankNode { $$ = $1; } | collection { $$ = $1; } ; predicate: resource { $$ = $1; } ; object: resource { $$ = $1; } | blankNode { $$ = $1; } | collection { $$ = $1; } | blankNodePropertyList { $$ = $1; } | literal { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("object literal="); raptor_term_print_as_ntriples($1, stdout); printf("\n"); #endif $$ = $1; } ; literal: STRING_LITERAL LANGTAG { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + language string=\"%s\"\n", $1); #endif $$ = raptor_new_term_from_literal(rdf_parser->world, $1, NULL, $2); RAPTOR_FREE(char*, $1); RAPTOR_FREE(char*, $2); if(!$$) YYERROR; } | STRING_LITERAL LANGTAG HAT URI_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" uri=\"%s\"\n", $1, $2, raptor_uri_as_string($4)); #endif if($4) { if($2) { raptor_parser_error(rdf_parser, "Language not allowed with datatyped literal"); RAPTOR_FREE(char*, $2); $2 = NULL; } $$ = raptor_new_term_from_literal(rdf_parser->world, $1, $4, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri($4); if(!$$) YYERROR; } else $$ = NULL; } | STRING_LITERAL LANGTAG HAT QNAME_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + language=\"%s\" datatype string=\"%s\" qname URI=<%s>\n", $1, $2, raptor_uri_as_string($4)); #endif if($4) { if($2) { raptor_parser_error(rdf_parser, "Language not allowed with datatyped literal"); RAPTOR_FREE(char*, $2); $2 = NULL; } $$ = raptor_new_term_from_literal(rdf_parser->world, $1, $4, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri($4); if(!$$) YYERROR; } else $$ = NULL; } | STRING_LITERAL HAT URI_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" uri=\"%s\"\n", $1, raptor_uri_as_string($3)); #endif if($3) { $$ = raptor_new_term_from_literal(rdf_parser->world, $1, $3, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri($3); if(!$$) YYERROR; } else $$ = NULL; } | STRING_LITERAL HAT QNAME_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal + datatype string=\"%s\" qname URI=<%s>\n", $1, raptor_uri_as_string($3)); #endif if($3) { $$ = raptor_new_term_from_literal(rdf_parser->world, $1, $3, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri($3); if(!$$) YYERROR; } else $$ = NULL; } | STRING_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("literal string=\"%s\"\n", $1); #endif $$ = raptor_new_term_from_literal(rdf_parser->world, $1, NULL, NULL); RAPTOR_FREE(char*, $1); if(!$$) YYERROR; } | INTEGER_LITERAL { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource integer=%s\n", $1); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_integer_uri); $$ = raptor_new_term_from_literal(rdf_parser->world, $1, uri, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri(uri); if(!$$) YYERROR; } | FLOATING_LITERAL { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource double=%s\n", $1); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_double_uri); $$ = raptor_new_term_from_literal(rdf_parser->world, $1, uri, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri(uri); if(!$$) YYERROR; } | DECIMAL_LITERAL { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource decimal=%s\n", $1); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_decimal_uri); if(!uri) { RAPTOR_FREE(char*, $1); YYERROR; } $$ = raptor_new_term_from_literal(rdf_parser->world, $1, uri, NULL); RAPTOR_FREE(char*, $1); raptor_free_uri(uri); if(!$$) YYERROR; } | TRUE_TOKEN { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fputs("resource boolean true\n", stderr); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_boolean_uri); $$ = raptor_new_term_from_literal(rdf_parser->world, (const unsigned char*)"true", uri, NULL); raptor_free_uri(uri); if(!$$) YYERROR; } | FALSE_TOKEN { raptor_uri *uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fputs("resource boolean false\n", stderr); #endif uri = raptor_uri_copy(rdf_parser->world->xsd_boolean_uri); $$ = raptor_new_term_from_literal(rdf_parser->world, (const unsigned char*)"false", uri, NULL); raptor_free_uri(uri); if(!$$) YYERROR; } ; resource: URI_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource URI=<%s>\n", raptor_uri_as_string($1)); #endif if($1) { $$ = raptor_new_term_from_uri(rdf_parser->world, $1); raptor_free_uri($1); if(!$$) YYERROR; } else $$ = NULL; } | QNAME_LITERAL { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource qname URI=<%s>\n", raptor_uri_as_string($1)); #endif if($1) { $$ = raptor_new_term_from_uri(rdf_parser->world, $1); raptor_free_uri($1); if(!$$) YYERROR; } else $$ = NULL; } ; predicateObjectListOpt: predicateObjectList { $$ = $1; } | %empty { $$ = NULL; } ; blankNode: BLANK_LITERAL { const unsigned char *id; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("subject blank=\"%s\"\n", $1); #endif id = raptor_world_internal_generate_id(rdf_parser->world, $1); if(!id) YYERROR; $$ = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); if(!$$) YYERROR; } ; blankNodePropertyList: LEFT_SQUARE predicateObjectListOpt RIGHT_SQUARE { int i; const unsigned char *id; id = raptor_world_generate_bnodeid(rdf_parser->world); if(!id) { if($2) raptor_free_sequence($2); YYERROR; } $$ = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); if(!$$) { if($2) raptor_free_sequence($2); YYERROR; } if($2 == NULL) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource\n predicateObjectList="); raptor_term_print_as_ntriples($$, stdout); printf("\n"); #endif } else { /* non-empty property list, handle it */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource\n predicateObjectList="); raptor_sequence_print($2, stdout); printf("\n"); #endif for(i = 0; i < raptor_sequence_size($2); i++) { raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); t2->subject = raptor_term_copy($$); raptor_turtle_generate_statement(rdf_parser, t2); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif raptor_free_sequence($2); } } ; collection: LEFT_ROUND itemList RIGHT_ROUND { int i; raptor_world* world = rdf_parser->world; raptor_term* first_identifier = NULL; raptor_term* rest_identifier = NULL; raptor_term* object = NULL; raptor_term* blank = NULL; char const *errmsg = NULL; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("collection\n objectList="); raptor_sequence_print($2, stdout); printf("\n"); #endif first_identifier = raptor_new_term_from_uri(world, RAPTOR_RDF_first_URI(world)); if(!first_identifier) YYERR_MSG_GOTO(err_collection, "Cannot create rdf:first term"); rest_identifier = raptor_new_term_from_uri(world, RAPTOR_RDF_rest_URI(world)); if(!rest_identifier) YYERR_MSG_GOTO(err_collection, "Cannot create rdf:rest term"); /* non-empty property list, handle it */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("resource\n predicateObjectList="); raptor_sequence_print($2, stdout); printf("\n"); #endif object = raptor_new_term_from_uri(world, RAPTOR_RDF_nil_URI(world)); if(!object) YYERR_MSG_GOTO(err_collection, "Cannot create rdf:nil term"); for(i = raptor_sequence_size($2)-1; i>=0; i--) { raptor_term* temp; raptor_statement* t2 = (raptor_statement*)raptor_sequence_get_at($2, i); const unsigned char *blank_id; blank_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!blank_id) YYERR_MSG_GOTO(err_collection, "Cannot create bnodeid"); blank = raptor_new_term_from_blank(rdf_parser->world, blank_id); RAPTOR_FREE(char*, blank_id); if(!blank) YYERR_MSG_GOTO(err_collection, "Cannot create bnode"); t2->subject = blank; t2->predicate = first_identifier; /* t2->object already set to the value we want */ raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); temp = t2->object; t2->subject = blank; t2->predicate = rest_identifier; t2->object = object; raptor_turtle_generate_statement((raptor_parser*)rdf_parser, t2); t2->subject = NULL; t2->predicate = NULL; t2->object = temp; raptor_free_term(object); object = blank; blank = NULL; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf(" after substitution objectList="); raptor_sequence_print($2, stdout); printf("\n\n"); #endif raptor_free_sequence($2); raptor_free_term(first_identifier); raptor_free_term(rest_identifier); $$=object; err_collection: if(errmsg) { if(blank) raptor_free_term(blank); if(object) raptor_free_term(object); if(rest_identifier) raptor_free_term(rest_identifier); if(first_identifier) raptor_free_term(first_identifier); raptor_free_sequence($2); YYERROR_MSG(errmsg); } } | LEFT_ROUND RIGHT_ROUND { raptor_world* world = rdf_parser->world; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("collection\n empty\n"); #endif $$ = raptor_new_term_from_uri(world, RAPTOR_RDF_nil_URI(world)); if(!$$) YYERROR; } ; %% /* Support functions */ int turtle_parser_error(raptor_parser* rdf_parser, void* scanner, const char *msg) { raptor_turtle_parser* turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif raptor_log_error(rdf_parser->world, RAPTOR_LOG_LEVEL_ERROR, &rdf_parser->locator, msg); return 0; } int turtle_syntax_error(raptor_parser *rdf_parser, const char *message, ...) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; va_list arguments; if(!turtle_parser) return 1; if(turtle_parser->error_count++) return 0; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_log_error_varargs(((raptor_parser*)rdf_parser), RAPTOR_LOG_LEVEL_ERROR, message, arguments); va_end(arguments); return 0; } raptor_uri* turtle_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!turtle_parser) return NULL; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif name_len = raptor_turtle_expand_qname_escapes(name, name_len, (raptor_simple_message_handler)turtle_parser_error, rdf_parser); if(!name_len) return NULL; return raptor_qname_string_to_uri(&turtle_parser->namespaces, name, name_len); } #ifndef TURTLE_PUSH_PARSE static int turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; int rc; if(!string || !*string) return 0; if(turtle_lexer_lex_init(&turtle_parser->scanner)) return 1; turtle_parser->scanner_set = 1; #if defined(YYDEBUG) && YYDEBUG > 0 turtle_lexer_set_debug(1 ,&turtle_parser->scanner); turtle_parser_debug = 1; #endif turtle_lexer_set_extra(rdf_parser, turtle_parser->scanner); (void)turtle_lexer__scan_bytes((char *)string, (int)length, turtle_parser->scanner); rc = turtle_parser_parse(rdf_parser, turtle_parser->scanner); turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set = 0; return rc; } #endif #ifdef TURTLE_PUSH_PARSE static int turtle_push_parse(raptor_parser *rdf_parser, const char *string, size_t length) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 raptor_world* world = rdf_parser->world; #endif raptor_turtle_parser* turtle_parser; void *buffer; int status; yypstate *ps; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(!string || !*string) return 0; if(turtle_lexer_lex_init(&turtle_parser->scanner)) return 1; turtle_parser->scanner_set = 1; #if defined(YYDEBUG) && YYDEBUG > 0 turtle_lexer_set_debug(1 ,&turtle_parser->scanner); turtle_parser_debug = 1; #endif turtle_lexer_set_extra(rdf_parser, turtle_parser->scanner); buffer = turtle_lexer__scan_bytes(string, length, turtle_parser->scanner); /* returns a parser instance or 0 on out of memory */ ps = yypstate_new(); if(!ps) return 1; do { YYSTYPE lval; int token; memset(&lval, 0, sizeof(YYSTYPE)); token = turtle_lexer_lex(&lval, turtle_parser->scanner); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 printf("token %s\n", turtle_token_print(world, token, &lval)); #endif status = yypush_parse(ps, token, &lval, rdf_parser, turtle_parser->scanner); /* turtle_token_free(world, token, &lval); */ if(!token || token == EOF || token == ERROR_TOKEN) break; } while (status == YYPUSH_MORE); yypstate_delete(ps); turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set = 0; return 0; } #endif /** * raptor_turtle_parse_init - Initialise the Raptor Turtle parser * * Return value: non 0 on failure **/ static int raptor_turtle_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(raptor_namespaces_init(rdf_parser->world, &turtle_parser->namespaces, 0)) return 1; turtle_parser->trig = !strcmp(name, "trig"); return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_turtle_parse_terminate - Free the Raptor Turtle parser * @rdf_parser: parser object * **/ static void raptor_turtle_parse_terminate(raptor_parser *rdf_parser) { raptor_turtle_parser *turtle_parser = (raptor_turtle_parser*)rdf_parser->context; raptor_namespaces_clear(&turtle_parser->namespaces); if(turtle_parser->scanner_set) { turtle_lexer_lex_destroy(turtle_parser->scanner); turtle_parser->scanner_set = 0; } if(turtle_parser->buffer) RAPTOR_FREE(cdata, turtle_parser->buffer); if(turtle_parser->graph_name) { raptor_free_term(turtle_parser->graph_name); turtle_parser->graph_name = NULL; } } static void raptor_turtle_generate_statement(raptor_parser *parser, raptor_statement *t) { raptor_turtle_parser *turtle_parser = (raptor_turtle_parser*)parser->context; raptor_statement *statement = &parser->statement; if(!t->subject || !t->predicate || !t->object) return; if(!parser->statement_handler) return; if(turtle_parser->trig && turtle_parser->graph_name) statement->graph = raptor_term_copy(turtle_parser->graph_name); if(!parser->emitted_default_graph && !turtle_parser->graph_name) { /* for non-TRIG - start default graph at first triple */ raptor_parser_start_graph(parser, NULL, 0); parser->emitted_default_graph++; } /* Two choices for subject for Turtle */ if(t->subject->type == RAPTOR_TERM_TYPE_BLANK) { statement->subject = raptor_new_term_from_blank(parser->world, t->subject->value.blank.string); } else { /* RAPTOR_TERM_TYPE_URI */ RAPTOR_ASSERT(t->subject->type != RAPTOR_TERM_TYPE_URI, "subject type is not resource"); statement->subject = raptor_new_term_from_uri(parser->world, t->subject->value.uri); } /* Predicates are URIs but check for bad ordinals */ if(!strncmp((const char*)raptor_uri_as_string(t->predicate->value.uri), "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { unsigned char* predicate_uri_string = raptor_uri_as_string(t->predicate->value.uri); int predicate_ordinal = raptor_check_ordinal(predicate_uri_string+44); if(predicate_ordinal <= 0) raptor_parser_error(parser, "Illegal ordinal value %d in property '%s'.", predicate_ordinal, predicate_uri_string); } statement->predicate = raptor_new_term_from_uri(parser->world, t->predicate->value.uri); /* Three choices for object for Turtle */ if(t->object->type == RAPTOR_TERM_TYPE_URI) { statement->object = raptor_new_term_from_uri(parser->world, t->object->value.uri); } else if(t->object->type == RAPTOR_TERM_TYPE_BLANK) { statement->object = raptor_new_term_from_blank(parser->world, t->object->value.blank.string); } else { /* RAPTOR_TERM_TYPE_LITERAL */ RAPTOR_ASSERT(t->object->type != RAPTOR_TERM_TYPE_LITERAL, "object type is not literal"); statement->object = raptor_new_term_from_literal(parser->world, t->object->value.literal.string, t->object->value.literal.datatype, t->object->value.literal.language); } /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); raptor_free_term(statement->subject); statement->subject = NULL; raptor_free_term(statement->predicate); statement->predicate = NULL; raptor_free_term(statement->object); statement->object = NULL; if(statement->graph) { raptor_free_term(statement->graph); statement->graph = NULL; } } static int raptor_turtle_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { char *ptr; raptor_turtle_parser *turtle_parser; int rc; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to line buffer\n", (int)len); #endif if(len) { turtle_parser->buffer = RAPTOR_REALLOC(char*, turtle_parser->buffer, turtle_parser->buffer_length + len + 1); if(!turtle_parser->buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } /* move pointer to end of cdata buffer */ ptr = turtle_parser->buffer+turtle_parser->buffer_length; /* adjust stored length */ turtle_parser->buffer_length += len; /* now write new stuff at end of cdata buffer */ memcpy(ptr, s, len); ptr += len; *ptr = '\0'; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer buffer now '%s' (%ld bytes)\n", turtle_parser->buffer, turtle_parser->buffer_length); #endif } /* if not end, wait for rest of input */ if(!is_end) return 0; /* Nothing to do */ if(!turtle_parser->buffer_length) return 0; #ifdef TURTLE_PUSH_PARSE rc = turtle_push_parse(rdf_parser, turtle_parser->buffer, turtle_parser->buffer_length); #else rc = turtle_parse(rdf_parser, turtle_parser->buffer, turtle_parser->buffer_length); #endif if(rdf_parser->emitted_default_graph) { /* for non-TRIG - end default graph after last triple */ raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } return rc; } static int raptor_turtle_parse_start(raptor_parser *rdf_parser) { raptor_locator *locator=&rdf_parser->locator; raptor_turtle_parser *turtle_parser = (raptor_turtle_parser*)rdf_parser->context; /* base URI required for Turtle */ if(!rdf_parser->base_uri) return 1; locator->line = 1; locator->column= -1; /* No column info */ locator->byte= -1; /* No bytes info */ if(turtle_parser->buffer_length) { RAPTOR_FREE(cdata, turtle_parser->buffer); turtle_parser->buffer = NULL; turtle_parser->buffer_length = 0; } turtle_parser->lineno = 1; return 0; } static int raptor_turtle_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "ttl")) score = 8; if(!strcmp((const char*)suffix, "n3")) score = 3; } if(mime_type) { if(strstr((const char*)mime_type, "turtle")) score += 6; if(strstr((const char*)mime_type, "n3")) score += 3; } /* Do this as long as N3 is not supported since it shares the same syntax */ if(buffer && len) { #define HAS_TURTLE_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TURTLE_RDF_URI (raptor_memstr((const char*)buffer, len, ": ") != NULL) if(HAS_TURTLE_PREFIX) { score = 6; if(HAS_TURTLE_RDF_URI) score += 2; } } return score; } static raptor_uri* raptor_turtle_get_graph(raptor_parser* rdf_parser) { raptor_turtle_parser *turtle_parser; turtle_parser = (raptor_turtle_parser*)rdf_parser->context; if(turtle_parser->graph_name) return raptor_uri_copy(turtle_parser->graph_name->value.uri); return NULL; } #ifdef RAPTOR_PARSER_TRIG static int raptor_trig_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score= 0; if(suffix) { if(!strcmp((const char*)suffix, "trig")) score = 9; #ifndef RAPTOR_PARSER_TURTLE if(!strcmp((const char*)suffix, "ttl")) score = 8; if(!strcmp((const char*)suffix, "n3")) score = 3; #endif } if(mime_type) { if(strstr((const char*)mime_type, "trig")) score = 6; #ifndef RAPTOR_PARSER_TURTLE if(strstr((const char*)mime_type, "turtle")) score += 6; if(strstr((const char*)mime_type, "n3")) score += 3; #endif } #ifndef RAPTOR_PARSER_TURTLE /* Do this as long as N3 is not supported since it shares the same syntax */ if(buffer && len) { #define HAS_TRIG_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) /* The following could also be found with N-Triples but not with @prefix */ #define HAS_TRIG_RDF_URI (raptor_memstr((const char*)buffer, len, ": ") != NULL) if(HAS_TRIG_PREFIX) { score = 6; if(HAS_TRIG_RDF_URI) score += 2; } } #endif return score; } #endif #ifdef RAPTOR_PARSER_TURTLE static const char* const turtle_names[4] = { "turtle", "ntriples-plus", "n3", NULL }; static const char* const turtle_uri_strings[3] = { "http://www.w3.org/ns/formats/Turtle", "http://www.dajobe.org/2004/01/turtle/", NULL }; #define TURTLE_TYPES_COUNT 6 static const raptor_type_q turtle_types[TURTLE_TYPES_COUNT + 1] = { /* first one is the default */ { "text/turtle", 11, 10}, { "application/x-turtle", 20, 10}, { "application/turtle", 18, 10}, { "text/n3", 7, 3}, { "text/rdf+n3", 11, 3}, { "application/rdf+n3", 18, 3}, { NULL, 0} }; static int raptor_turtle_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = turtle_names; factory->desc.mime_types = turtle_types; factory->desc.label = "Turtle Terse RDF Triple Language"; factory->desc.uri_strings = turtle_uri_strings; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_turtle_parser); factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_turtle_parse_recognise_syntax; factory->get_graph = raptor_turtle_get_graph; return rc; } #endif #ifdef RAPTOR_PARSER_TRIG static const char* const trig_names[2] = { "trig", NULL }; static const char* const trig_uri_strings[2] = { "http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/", NULL }; #define TRIG_TYPES_COUNT 1 static const raptor_type_q trig_types[TRIG_TYPES_COUNT + 1] = { /* first one is the default */ { "application/x-trig", 18, 10}, { NULL, 0, 0} }; static int raptor_trig_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = trig_names; factory->desc.mime_types = trig_types; factory->desc.label = "TriG - Turtle with Named Graphs"; factory->desc.uri_strings = trig_uri_strings; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_turtle_parser); factory->init = raptor_turtle_parse_init; factory->terminate = raptor_turtle_parse_terminate; factory->start = raptor_turtle_parse_start; factory->chunk = raptor_turtle_parse_chunk; factory->recognise_syntax = raptor_trig_parse_recognise_syntax; factory->get_graph = raptor_turtle_get_graph; return rc; } #endif #ifdef RAPTOR_PARSER_TURTLE int raptor_init_parser_turtle(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_turtle_parser_register_factory); } #endif #ifdef RAPTOR_PARSER_TRIG int raptor_init_parser_trig(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_trig_parser_register_factory); } #endif #ifdef STANDALONE #include #include #define TURTLE_FILE_BUF_SIZE 2048 static void turtle_parser_print_statement(void *user, raptor_statement *statement) { FILE* stream = (FILE*)user; raptor_statement_print(statement, stream); putc('\n', stream); } int main(int argc, char *argv[]) { char string[TURTLE_FILE_BUF_SIZE]; raptor_parser rdf_parser; /* static */ raptor_turtle_parser turtle_parser; /* static */ raptor_locator *locator = &rdf_parser.locator; FILE *fh; const char *filename; size_t nobj; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 turtle_parser_debug = 1; #endif if(argc > 1) { filename = argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename=""; fh = stdin; } memset(string, 0, TURTLE_FILE_BUF_SIZE); nobj = fread(string, TURTLE_FILE_BUF_SIZE, 1, fh); if(nobj < TURTLE_FILE_BUF_SIZE) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", argv[0], filename, strerror(errno)); fclose(fh); return(1); } } if(argc > 1) fclose(fh); memset(&rdf_parser, 0, sizeof(rdf_parser)); memset(&turtle_parser, 0, sizeof(turtle_parser)); locator->line= locator->column = -1; locator->file= filename; turtle_parser.lineno= 1; rdf_parser.world = raptor_new_world(); rdf_parser.context = &turtle_parser; rdf_parser.base_uri = raptor_new_uri(rdf_parser.world, (const unsigned char*)"http://example.org/fake-base-uri/"); raptor_parser_set_statement_handler(&rdf_parser, stdout, turtle_parser_print_statement); raptor_turtle_parse_init(&rdf_parser, "turtle"); turtle_parser.error_count = 0; #ifdef TURTLE_PUSH_PARSE turtle_push_parse(&rdf_parser, string, strlen(string)); #else turtle_parse(&rdf_parser, string, strlen(string)); #endif raptor_turtle_parse_terminate(&rdf_parser); raptor_free_uri(rdf_parser.base_uri); raptor_free_world(rdf_parser.world); return (0); } #endif raptor2-2.0.15/src/raptor_grddl.c0000644000175000017500000020300712414070650013530 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_grddl.c - Raptor GRDDL (+microformats) Parser implementation * * Copyright (C) 2005-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ /* * Specifications: * Gleaning Resource Descriptions from Dialects of Languages (GRDDL) * W3C Recommendation 11 September 2007 * http://www.w3.org/TR/2007/REC-grddl-20070911/ * http://www.w3.org/TR/grddl/ * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include /* for xmlXPathRegisterNs() */ #include #include #include #include #include #include #include /* * libxslt API notes * * Inputs to an XSLT transformation process with libxslt are: * 1. A set of (key:value) parameters. * 2. An xsltStylesheetPtr for the XSLT sheet * Which could be made from a file or an xmlDoc; and the xmlDoc. * made from a file or memory buffer. * 3. An xmlDoc for the XML source * Which could be made from a file or a memory buffer. * */ static void raptor_grddl_filter_triples(void *user_data, raptor_statement *statement); static void raptor_grddl_xsltGenericError_handler(void *user_data, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 0); static void raptor_libxslt_set_global_state(raptor_parser *rdf_parser); static void raptor_libxslt_reset_global_state(raptor_parser *rdf_parser); typedef struct { /* transformation (XSLT) or profile URI */ raptor_uri* uri; /* base URI in effect when the above was found */ raptor_uri* base_uri; } grddl_xml_context; /* * XSLT parser object */ struct raptor_grddl_parser_context_s { raptor_world* world; raptor_parser* rdf_parser; /* HTML document ctxt */ htmlParserCtxtPtr html_ctxt; /* XML document ctxt */ xmlParserCtxtPtr xml_ctxt; /* Create xpath evaluation context */ xmlXPathContextPtr xpathCtx; /* parser for dealing with the result */ raptor_parser* internal_parser; /* ... constructed with this name */ const char* internal_parser_name; /* URI of root namespace of document */ raptor_uri* root_ns_uri; /* List of transformation URIs for document */ raptor_sequence* doc_transform_uris; /* Copy of the user data statement_handler overwritten to point to * raptor_grddl_filter_triples() */ void* saved_user_data; raptor_statement_handler saved_statement_handler; /* URI data-view:namespaceTransformation */ raptor_uri* namespace_transformation_uri; /* URI data-view:profileTransformation */ raptor_uri* profile_transformation_uri; /* List of namespace / URIs */ raptor_sequence* profile_uris; /* List of visited URIs */ raptor_sequence* visited_uris; /* Depth of GRDDL parsers - 0 means that the lists above * are owned by this parser: visited_uris * */ int grddl_depth; /* Content-Type of top-level document */ char* content_type; /* Check content type once */ int content_type_check; /* stringbuffer to use to store retrieved document */ raptor_stringbuffer* sb; /* non-0 to perform an additional RDF/XML parse on a retrieved document * because it has been identified as RDF/XML. */ int process_this_as_rdfxml; /* non-0 to perform GRDL processing on document */ int grddl_processing; /* non-0 to perform XML Include processing on document */ int xinclude_processing; /* non-0 to perform HTML Base processing on document */ int html_base_processing; /* non-0 to perform HTML processing on document */ int html_link_processing; xmlGenericErrorFunc saved_xsltGenericError; void *saved_xsltGenericErrorContext; xsltSecurityPrefsPtr saved_xsltSecurityPrefs; }; typedef struct raptor_grddl_parser_context_s raptor_grddl_parser_context; static void raptor_grddl_xsltGenericError_handler(void *user_data, const char *msg, ...) { raptor_parser* rdf_parser = (raptor_parser*)user_data; va_list arguments; size_t msg_len; size_t length; char *nmsg; if(!msg || *msg == '\n') return; va_start(arguments, msg); msg_len = strlen(msg); #define PREFIX "libxslt error: " #define PREFIX_LENGTH 15 length = PREFIX_LENGTH + msg_len + 1; nmsg = RAPTOR_MALLOC(char*, length); if(nmsg) { memcpy(nmsg, PREFIX, PREFIX_LENGTH); memcpy(nmsg + PREFIX_LENGTH, msg, msg_len + 1); if(nmsg[length-1] == '\n') nmsg[length-1] = '\0'; } raptor_parser_log_error_varargs(rdf_parser, RAPTOR_LOG_LEVEL_ERROR, nmsg ? nmsg : msg, arguments); if(nmsg) RAPTOR_FREE(char*, nmsg); va_end(arguments); } static grddl_xml_context* raptor_new_xml_context(raptor_world* world, raptor_uri* uri, raptor_uri* base_uri) { grddl_xml_context* xml_context; xml_context = RAPTOR_MALLOC(grddl_xml_context*, sizeof(*xml_context)); if(uri) uri = raptor_uri_copy(uri); if(base_uri) base_uri = raptor_uri_copy(base_uri); xml_context->uri = uri; xml_context->base_uri = base_uri; return xml_context; } static void grddl_free_xml_context(void *context, void* userdata) { grddl_xml_context* xml_context = (grddl_xml_context*)userdata; if(xml_context->uri) raptor_free_uri(xml_context->uri); if(xml_context->base_uri) raptor_free_uri(xml_context->base_uri); RAPTOR_FREE(grddl_xml_context, xml_context); } static int raptor_grddl_parse_init_common(raptor_parser* rdf_parser, const char *name) { raptor_grddl_parser_context* grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; grddl_parser->world = rdf_parser->world; grddl_parser->rdf_parser = rdf_parser; /* Sequence of URIs of XSLT sheets to transform the document */ grddl_parser->doc_transform_uris = raptor_new_sequence_with_context((raptor_data_context_free_handler)grddl_free_xml_context, NULL, rdf_parser->world); grddl_parser->grddl_processing = 1; grddl_parser->xinclude_processing = 1; grddl_parser->html_base_processing = 0; grddl_parser->html_link_processing = 1; return 0; } /* 58 == strlen(grddl_namespaceTransformation_uri_string) */ #define GRDDL_NAMESPACETRANSFORMATION_URI_STRING_LEN 58 static const unsigned char * const grddl_namespaceTransformation_uri_string = (const unsigned char*)"http://www.w3.org/2003/g/data-view#namespaceTransformation"; /* 56 == strlen(grddl_profileTransformation_uri_string) */ #define GRDDL_PROFILETRANSFORMATION_URI_STRING_LEN 56 static const unsigned char * const grddl_profileTransformation_uri_string = (const unsigned char*)"http://www.w3.org/2003/g/data-view#profileTransformation"; static int raptor_grddl_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_grddl_parser_context* grddl_parser; raptor_world* world = rdf_parser->world; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; raptor_grddl_parse_init_common(rdf_parser, name); /* Sequence of URIs from */ grddl_parser->profile_uris = raptor_new_sequence_with_context((raptor_data_context_free_handler)grddl_free_xml_context, NULL, (void*)world); grddl_parser->namespace_transformation_uri = raptor_new_uri_from_counted_string(world, grddl_namespaceTransformation_uri_string, GRDDL_NAMESPACETRANSFORMATION_URI_STRING_LEN); grddl_parser->profile_transformation_uri = raptor_new_uri_from_counted_string(world, grddl_profileTransformation_uri_string, GRDDL_PROFILETRANSFORMATION_URI_STRING_LEN); /* Sequence of URIs visited - may be overwritten if this is not * the depth 0 grddl parser */ grddl_parser->visited_uris = raptor_new_sequence((raptor_data_free_handler)raptor_free_uri, (raptor_data_print_handler)raptor_uri_print); return 0; } static void raptor_grddl_parse_terminate(raptor_parser *rdf_parser) { raptor_grddl_parser_context *grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; if(grddl_parser->xml_ctxt) { if(grddl_parser->xml_ctxt->myDoc) { xmlFreeDoc(grddl_parser->xml_ctxt->myDoc); grddl_parser->xml_ctxt->myDoc = NULL; } xmlFreeParserCtxt(grddl_parser->xml_ctxt); } if(grddl_parser->html_ctxt) { if(grddl_parser->html_ctxt->myDoc) { xmlFreeDoc(grddl_parser->html_ctxt->myDoc); grddl_parser->html_ctxt->myDoc = NULL; } htmlFreeParserCtxt(grddl_parser->html_ctxt); } if(grddl_parser->xpathCtx) xmlXPathFreeContext(grddl_parser->xpathCtx); if(grddl_parser->internal_parser) raptor_free_parser(grddl_parser->internal_parser); if(grddl_parser->root_ns_uri) raptor_free_uri(grddl_parser->root_ns_uri); if(grddl_parser->doc_transform_uris) raptor_free_sequence(grddl_parser->doc_transform_uris); if(grddl_parser->profile_uris) raptor_free_sequence(grddl_parser->profile_uris); if(grddl_parser->namespace_transformation_uri) raptor_free_uri(grddl_parser->namespace_transformation_uri); if(grddl_parser->profile_transformation_uri) raptor_free_uri(grddl_parser->profile_transformation_uri); if(!grddl_parser->grddl_depth) { if(grddl_parser->visited_uris) raptor_free_sequence(grddl_parser->visited_uris); } if(grddl_parser->content_type) RAPTOR_FREE(char*, grddl_parser->content_type); if(grddl_parser->sb) raptor_free_stringbuffer(grddl_parser->sb); } static void raptor_grddl_parser_add_parent(raptor_parser *rdf_parser, raptor_grddl_parser_context* parent_grddl_parser) { raptor_grddl_parser_context* grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; /* Do not set parent twice */ if(grddl_parser->visited_uris == parent_grddl_parser->visited_uris) return; /* free any sequence here */ if(grddl_parser->visited_uris) raptor_free_sequence(grddl_parser->visited_uris); /* share parent's list and do not free it here */ grddl_parser->visited_uris = parent_grddl_parser->visited_uris; grddl_parser->grddl_depth = parent_grddl_parser->grddl_depth + 1; grddl_parser->saved_user_data = parent_grddl_parser->rdf_parser; grddl_parser->saved_statement_handler = raptor_grddl_filter_triples; } static int raptor_grddl_parse_start(raptor_parser *rdf_parser) { raptor_grddl_parser_context* grddl_parser; raptor_locator *locator = &rdf_parser->locator; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; locator->line = 1; grddl_parser->content_type_check = 0; grddl_parser->process_this_as_rdfxml = 0; return 0; } #define MATCH_IS_VALUE_LIST 1 #define MATCH_IS_PROFILE 2 #define MATCH_IS_HARDCODED 4 /* stop looking for other hardcoded matches */ #define MATCH_LAST 8 static struct { const xmlChar* xpath; int flags; const xmlChar* xslt_sheet_uri; } match_table[]={ /* XHTML document where the GRDDL profile is in * inside the html * Value of @rel is a space-separated list of link types. */ { (const xmlChar*)"/html:html/html:head[contains(@profile,\"http://www.w3.org/2003/g/data-view\")]/html:link[contains(@rel,\"transformation\")]/@href", 0, NULL } , /* XHTML document where the GRDDL profile is in * inside the html * Value of @rel is a space-separated list of link types. */ { (const xmlChar*)"/html:html/html:head[contains(@profile,\"http://www.w3.org/2003/g/data-view\")]/../..//html:a[contains(@rel,\"transformation\")]/@href", 0, NULL } , /* XML document linking to transform via attribute dataview:transformation * on the root element. * Example: http://www.w3.org/2004/01/rdxh/grddl-p3p-example **/ { (const xmlChar*)"/*/@dataview:transformation", MATCH_IS_VALUE_LIST, NULL } , /* hCalendar microformat http://microformats.org/wiki/hcalendar */ { (const xmlChar*)"//*[contains(concat(' ', concat(normalize-space(@class),' ')),' vevent ')]", MATCH_IS_HARDCODED, (const xmlChar*)"http://www.w3.org/2002/12/cal/glean-hcal.xsl" } , /* hReview microformat http://microformats.org/wiki/review */ { (const xmlChar*)"//*[contains(concat(' ', concat(normalize-space(@class),' ')),' hreview ')]", MATCH_IS_HARDCODED | MATCH_LAST, /* stop here since hCard is inside hReview */ (const xmlChar*)"http://www.w3.org/2001/sw/grddl-wg/doc29/hreview2rdfxml.xsl" } , /* hCard microformat http://microformats.org/wiki/hcard */ { (const xmlChar*)"//*[contains(concat(' ', concat(normalize-space(@class),' ')),' vcard ')]", MATCH_IS_HARDCODED, (const xmlChar*)"http://www.w3.org/2006/vcard/hcard2rdf.xsl" } , { NULL, 0, NULL } }; static const char* const grddl_namespace_uris_ignore_list[] = { "http://www.w3.org/1999/xhtml", "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "http://www.w3.org/2001/XMLSchema", NULL }; /* add URI to XSLT transformation URI list */ static void raptor_grddl_add_transform_xml_context(raptor_grddl_parser_context* grddl_parser, grddl_xml_context* xml_context) { int i; raptor_uri* uri = xml_context->uri; int size; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Found document transformation URI '%s'\n", raptor_uri_as_string(uri)); #endif size = raptor_sequence_size(grddl_parser->doc_transform_uris); for(i = 0; i < size; i++) { grddl_xml_context* xc; xc = (grddl_xml_context*)raptor_sequence_get_at(grddl_parser->doc_transform_uris, i); if(raptor_uri_equals(uri, xc->uri)) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Already seen XSLT URI '%s'\n", raptor_uri_as_string(uri)); #endif grddl_free_xml_context(grddl_parser->world, xml_context); return; } } RAPTOR_DEBUG3("Adding new document transformation XSLT URI %s with base URI %s\n", (uri ? (const char*)raptor_uri_as_string(uri): "(NONE)"), (xml_context->base_uri ? (const char*)raptor_uri_as_string(xml_context->base_uri) : "(NONE)")); raptor_sequence_push(grddl_parser->doc_transform_uris, xml_context); } static void raptor_grddl_filter_triples(void *user_data, raptor_statement *statement) { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_grddl_parser_context* grddl_parser; int i; raptor_uri* predicate_uri; int size; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; /* Look for a triple */ if(statement->subject->type != RAPTOR_TERM_TYPE_URI || statement->predicate->type != RAPTOR_TERM_TYPE_URI || statement->object->type != RAPTOR_TERM_TYPE_URI) return; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 RAPTOR_DEBUG2("Parser %p: Relaying statement: ", rdf_parser); raptor_statement_print(statement, stderr); fputc('\n', stderr); #endif #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Parser %p: Checking against %d profile URIs\n", rdf_parser, raptor_sequence_size(grddl_parser->profile_uris)); #endif /* Look for(i = 0, root namespace URI) * data-view:namespaceTransformation ?tr * or (i>0, profile URIs) * data-view:profileTransformation ?tr * and then ?tr becomes a new document transformation URI */ predicate_uri = grddl_parser->namespace_transformation_uri; size = raptor_sequence_size(grddl_parser->profile_uris); for(i = 0; i < size; i++) { grddl_xml_context* xml_context; raptor_uri* profile_uri; grddl_xml_context* new_xml_context; xml_context = (grddl_xml_context*)raptor_sequence_get_at(grddl_parser->profile_uris, i); profile_uri = xml_context->uri; if(i == 1) predicate_uri = grddl_parser->profile_transformation_uri; if(!profile_uri) continue; if(raptor_uri_equals(statement->subject->value.uri, profile_uri) && raptor_uri_equals(statement->predicate->value.uri, predicate_uri)) { raptor_uri* uri = statement->object->value.uri; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG4("Parser %p: Matches profile URI #%d '%s'\n", rdf_parser, i, raptor_uri_as_string(profile_uri)); #endif new_xml_context = raptor_new_xml_context(rdf_parser->world, uri, rdf_parser->base_uri); raptor_grddl_add_transform_xml_context(grddl_parser, new_xml_context); } else { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG4("Parser %p: Failed to match profile URI #%d '%s'\n", rdf_parser, i, raptor_uri_as_string(profile_uri)); #endif } } } static int raptor_grddl_ensure_internal_parser(raptor_parser* rdf_parser, const char* parser_name, int filter) { raptor_grddl_parser_context* grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; if(!grddl_parser->internal_parser_name || !strcmp(parser_name, "guess") || strcmp(grddl_parser->internal_parser_name, parser_name)) { /* construct a new parser if none in use or not what is required */ if(grddl_parser->internal_parser) { int our_emit_flags = rdf_parser->emit_graph_marks; /* copy back bit flags from parser about to be destroyed */ raptor_parser_copy_flags_state(rdf_parser, grddl_parser->internal_parser); /* restore whatever graph makrs state we had here */ rdf_parser->emit_graph_marks = our_emit_flags; RAPTOR_DEBUG3("Parser %p: Freeing internal %s parser.\n", rdf_parser, grddl_parser->internal_parser_name); raptor_free_parser(grddl_parser->internal_parser); grddl_parser->internal_parser = NULL; grddl_parser->internal_parser_name = NULL; } RAPTOR_DEBUG3("Parser %p: Allocating new internal %s parser.\n", rdf_parser, parser_name); grddl_parser->internal_parser = raptor_new_parser(rdf_parser->world, parser_name); if(!grddl_parser->internal_parser) { raptor_parser_error(rdf_parser, "Failed to create %s parser", parser_name); return 1; } /* initialise the new parser with the outer state */ grddl_parser->internal_parser_name = parser_name; if(raptor_parser_copy_user_state(grddl_parser->internal_parser, rdf_parser)) return 1; /* Disable graph marks in newly constructed internal parser */ grddl_parser->internal_parser->emit_graph_marks = 0; grddl_parser->saved_user_data = rdf_parser->user_data; grddl_parser->saved_statement_handler = rdf_parser->statement_handler; } /* Filter the triples for profile/namespace URIs */ if(filter) { grddl_parser->internal_parser->user_data = rdf_parser; grddl_parser->internal_parser->statement_handler = raptor_grddl_filter_triples; } else { grddl_parser->internal_parser->user_data = grddl_parser->saved_user_data; grddl_parser->internal_parser->statement_handler = grddl_parser->saved_statement_handler; } return 0; } /* Run a GRDDL transform using a pre-parsed XSLT stylesheet already * formed into a libxml document (with URI) */ static int raptor_grddl_run_grddl_transform_doc(raptor_parser* rdf_parser, grddl_xml_context* xml_context, xmlDocPtr xslt_doc, xmlDocPtr doc) { raptor_world* world = rdf_parser->world; raptor_grddl_parser_context* grddl_parser; int ret = 0; xsltStylesheetPtr sheet = NULL; xmlDocPtr res = NULL; xmlChar *doc_txt = NULL; int doc_txt_len = 0; const char* parser_name; const char* params[7]; const unsigned char* base_uri_string; size_t base_uri_len; raptor_uri* xslt_uri; raptor_uri* base_uri; char *quoted_base_uri = NULL; xsltTransformContextPtr userCtxt = NULL; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; xslt_uri = xml_context->uri; base_uri = xml_context->base_uri ? xml_context->base_uri : xml_context->uri; base_uri_string = raptor_uri_as_counted_string(base_uri, &base_uri_len); RAPTOR_DEBUG3("Running GRDDL transform with XSLT URI '%s' with doc base URI '%s'\n", raptor_uri_as_string(xslt_uri), base_uri_string); raptor_libxslt_set_global_state(rdf_parser); /* This calls xsltGetDefaultSecurityPrefs() */ sheet = xsltParseStylesheetDoc(xslt_doc); if(!sheet) { raptor_parser_error(rdf_parser, "Failed to parse stylesheet in '%s'", raptor_uri_as_string(xslt_uri)); ret = 1; goto cleanup_xslt; } /* This calls xsltGetDefaultSecurityPrefs() */ userCtxt = xsltNewTransformContext(sheet, doc); /* set per-transform security preferences */ if(world->xslt_security_preferences) xsltSetCtxtSecurityPrefs((xsltSecurityPrefs*)world->xslt_security_preferences, userCtxt); /* set per-transform generic error handler */ xsltSetTransformErrorFunc(userCtxt, rdf_parser, raptor_grddl_xsltGenericError_handler); /* * Define 'base', 'Base' and 'url' params to allow some XSLT sheets to work: * base: * http://www.w3.org/2000/07/uri43/uri.xsl * Base: * http://www.w3.org/2000/08/w3c-synd/home2rss.xsl * url: (optional) * http://www.w3.org/2001/sw/grddl-wg/td/RDFa2RDFXML.xsl */ quoted_base_uri = RAPTOR_MALLOC(char*, base_uri_len + 3); quoted_base_uri[0] = '\''; memcpy(quoted_base_uri + 1, (const char*)base_uri_string, base_uri_len); quoted_base_uri[base_uri_len + 1] = '\''; quoted_base_uri[base_uri_len + 2] = '\0'; params[0] = "base"; params[1] = (const char*)quoted_base_uri; params[2] = "Base"; params[3] = (const char*)quoted_base_uri; params[4] = "url"; params[5] = (const char*)quoted_base_uri; params[6] = NULL; res = xsltApplyStylesheetUser(sheet, doc, params, NULL, NULL, userCtxt); if(!res) { raptor_parser_error(rdf_parser, "Failed to apply stylesheet in '%s'", raptor_uri_as_string(xslt_uri)); ret = 1; goto cleanup_xslt; } if(res->type == XML_HTML_DOCUMENT_NODE) { if(sheet->method != NULL) xmlFree(sheet->method); sheet->method = (xmlChar*)xmlMalloc(5); memcpy(sheet->method, "html", 5); } /* write the resulting XML to a string */ xsltSaveResultToString(&doc_txt, &doc_txt_len, res, sheet); if(!doc_txt || !doc_txt_len) { raptor_parser_warning(rdf_parser, "XSLT returned an empty document"); goto cleanup_xslt; } RAPTOR_DEBUG4("XSLT returned %d bytes document method %s media type %s\n", doc_txt_len, (sheet->method ? (const char*)sheet->method : "NULL"), (sheet->mediaType ? (const char*)sheet->mediaType : "NULL")); /* Set mime types for XSLT content */ if(sheet->mediaType == NULL && sheet->method) { if(!(strcmp((const char*)sheet->method, "text"))) { sheet->mediaType = (xmlChar*)xmlMalloc(11); memcpy(sheet->mediaType, "text/plain",11); } else if(!(strcmp((const char*)sheet->method, "xml"))) { sheet->mediaType = (xmlChar*)xmlMalloc(16); memcpy(sheet->mediaType, "application/xml",16); } else if(!(strcmp((const char*)sheet->method, "html"))) { sheet->mediaType = (xmlChar*)xmlMalloc(10); memcpy(sheet->mediaType, "text/html",10); } } /* Assume all that all media XML is RDF/XML and also that * with no information at all we have RDF/XML */ if(!sheet->mediaType || (sheet->mediaType && !strcmp((const char*)sheet->mediaType, "application/xml"))) { if(sheet->mediaType) xmlFree(sheet->mediaType); sheet->mediaType = (xmlChar*)xmlMalloc(20); memcpy(sheet->mediaType, "application/rdf+xml",20); } parser_name = raptor_world_guess_parser_name(rdf_parser->world, NULL, (const char*)sheet->mediaType, doc_txt, doc_txt_len, NULL); if(!parser_name) { RAPTOR_DEBUG3("Parser %p: Guessed no parser from mime type '%s' and content - ending", rdf_parser, sheet->mediaType); goto cleanup_xslt; } RAPTOR_DEBUG4("Parser %p: Guessed parser %s from mime type '%s' and content\n", rdf_parser, parser_name, sheet->mediaType); if(!strcmp((const char*)parser_name, "grddl")) { RAPTOR_DEBUG2("Parser %p: Ignoring guess to run grddl parser - ending", rdf_parser); goto cleanup_xslt; } ret = raptor_grddl_ensure_internal_parser(rdf_parser, parser_name, 0); if(ret) goto cleanup_xslt; if(grddl_parser->internal_parser) { /* generate the triples */ ret = raptor_parser_parse_start(grddl_parser->internal_parser, base_uri); if(!ret) ret = raptor_parser_parse_chunk(grddl_parser->internal_parser, doc_txt, doc_txt_len, 1); } cleanup_xslt: if(userCtxt) xsltFreeTransformContext(userCtxt); if(quoted_base_uri) RAPTOR_FREE(char*, quoted_base_uri); if(doc_txt) xmlFree(doc_txt); if(res) xmlFreeDoc(res); if(sheet) xsltFreeStylesheet(sheet); raptor_libxslt_reset_global_state(rdf_parser); return ret; } typedef struct { raptor_parser* rdf_parser; xmlParserCtxtPtr xc; raptor_uri* base_uri; } raptor_grddl_xml_parse_bytes_context; static void raptor_grddl_uri_xml_parse_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb) { raptor_grddl_xml_parse_bytes_context* xpbc; size_t len = size * nmemb; int rc = 0; xpbc = (raptor_grddl_xml_parse_bytes_context*)userdata; if(!xpbc->xc) { xmlParserCtxtPtr xc; xc = xmlCreatePushParserCtxt(NULL, NULL, (const char*)ptr, RAPTOR_BAD_CAST(int, len), (const char*)raptor_uri_as_string(xpbc->base_uri)); if(!xc) rc = 1; else { int libxml_options = 0; #ifdef RAPTOR_LIBXML_XML_PARSE_NONET if(RAPTOR_OPTIONS_GET_NUMERIC(xpbc->rdf_parser, RAPTOR_OPTION_NO_NET)) libxml_options |= XML_PARSE_NONET; #endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(xc, libxml_options); #endif xc->replaceEntities = 1; xc->loadsubset = 1; } xpbc->xc = xc; } else rc = xmlParseChunk(xpbc->xc, (const char*)ptr, RAPTOR_BAD_CAST(int, len), 0); if(rc) raptor_parser_error(xpbc->rdf_parser, "XML Parsing failed"); } #define FETCH_IGNORE_ERRORS 1 #define FETCH_ACCEPT_XSLT 2 static int raptor_grddl_fetch_uri(raptor_parser* rdf_parser, raptor_uri* uri, raptor_www_write_bytes_handler write_bytes_handler, void* write_bytes_user_data, raptor_www_content_type_handler content_type_handler, void* content_type_user_data, int flags) { raptor_www *www; const char *accept_h; int ret = 0; int ignore_errors = (flags & FETCH_IGNORE_ERRORS); if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)) { if(!raptor_uri_uri_string_is_file_uri(raptor_uri_as_string(uri))) return 1; } www = raptor_new_www(rdf_parser->world); if(!www) return 1; raptor_www_set_user_agent(www, "grddl/0.1"); if(flags & FETCH_ACCEPT_XSLT) { raptor_www_set_http_accept(www, "application/xml"); } else { accept_h = raptor_parser_get_accept_header(rdf_parser); if(accept_h) { raptor_www_set_http_accept(www, accept_h); RAPTOR_FREE(char*, accept_h); } } if(rdf_parser->uri_filter) raptor_www_set_uri_filter(www, rdf_parser->uri_filter, rdf_parser->uri_filter_user_data); if(ignore_errors) raptor_world_internal_set_ignore_errors(rdf_parser->world, 1); raptor_www_set_write_bytes_handler(www, write_bytes_handler, write_bytes_user_data); raptor_www_set_content_type_handler(www, content_type_handler, content_type_user_data); if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_WWW_TIMEOUT) > 0) raptor_www_set_connection_timeout(www, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_WWW_TIMEOUT)); ret = raptor_www_fetch(www, uri); raptor_free_www(www); if(ignore_errors) raptor_world_internal_set_ignore_errors(rdf_parser->world, 0); return ret; } /* Run a GRDDL transform using a XSLT stylesheet at a given URI */ static int raptor_grddl_run_grddl_transform_uri(raptor_parser* rdf_parser, grddl_xml_context* xml_context, xmlDocPtr doc) { xmlParserCtxtPtr xslt_ctxt = NULL; raptor_grddl_xml_parse_bytes_context xpbc; int ret = 0; raptor_uri* xslt_uri; raptor_uri* base_uri; raptor_uri* old_locator_uri; raptor_locator *locator = &rdf_parser->locator; xslt_uri = xml_context->uri; base_uri = xml_context->base_uri ? xml_context->base_uri : xml_context->uri; RAPTOR_DEBUG3("Running GRDDL transform with XSLT URI %s and base URI %s\n", raptor_uri_as_string(xslt_uri), raptor_uri_as_string(base_uri)); /* make an xsltStylesheetPtr via the raptor_grddl_uri_xml_parse_bytes * callback as bytes are returned */ xpbc.xc = NULL; xpbc.rdf_parser = rdf_parser; xpbc.base_uri = base_uri; old_locator_uri = locator->uri; locator->uri = xslt_uri; ret = raptor_grddl_fetch_uri(rdf_parser, xslt_uri, raptor_grddl_uri_xml_parse_bytes, &xpbc, NULL, NULL, FETCH_ACCEPT_XSLT); xslt_ctxt = xpbc.xc; if(ret) { locator->uri = old_locator_uri; raptor_parser_warning(rdf_parser, "Fetching XSLT document URI '%s' failed", raptor_uri_as_string(xslt_uri)); ret = 0; } else { xmlParseChunk(xpbc.xc, NULL, 0, 1); ret = raptor_grddl_run_grddl_transform_doc(rdf_parser, xml_context, xslt_ctxt->myDoc, doc); locator->uri = old_locator_uri; } if(xslt_ctxt) xmlFreeParserCtxt(xslt_ctxt); return ret; } static int raptor_grddl_seen_uri(raptor_grddl_parser_context* grddl_parser, raptor_uri* uri) { int i; int seen = 0; raptor_sequence* seq = grddl_parser->visited_uris; int size; size = raptor_sequence_size(seq); for(i = 0; i < size; i++) { raptor_uri* vuri = (raptor_uri*)raptor_sequence_get_at(seq, i); if(raptor_uri_equals(uri, vuri)) { seen = 1; break; } } #ifdef RAPTOR_DEBUG if(seen) RAPTOR_DEBUG2("Already seen URI '%s'\n", raptor_uri_as_string(uri)); #endif return seen; } static void raptor_grddl_done_uri(raptor_grddl_parser_context* grddl_parser, raptor_uri* uri) { if(!grddl_parser->visited_uris) return; if(!raptor_grddl_seen_uri(grddl_parser, uri)) { raptor_sequence* seq = grddl_parser->visited_uris; raptor_sequence_push(seq, raptor_uri_copy(uri)); } } static raptor_sequence* raptor_grddl_run_xpath_match(raptor_parser* rdf_parser, xmlDocPtr doc, const xmlChar* xpathExpr, int flags) { raptor_grddl_parser_context* grddl_parser; /* Evaluate xpath expression */ xmlXPathObjectPtr xpathObj = NULL; raptor_sequence* seq = NULL; xmlNodeSetPtr nodes; int i; int size; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; seq = raptor_new_sequence((raptor_data_free_handler)grddl_free_xml_context, NULL); /* Evaluate xpath expression */ xpathObj = xmlXPathEvalExpression(xpathExpr, grddl_parser->xpathCtx); if(!xpathObj) { raptor_parser_error(rdf_parser, "Unable to evaluate XPath expression \"%s\"", xpathExpr); raptor_free_sequence(seq); seq = NULL; goto cleanup_xpath_match; } nodes = xpathObj->nodesetval; if(!nodes || xmlXPathNodeSetIsEmpty(nodes)) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("No match found with XPath expression \"%s\" over '%s'\n", xpathExpr, raptor_uri_as_string(rdf_parser->base_uri)); #endif raptor_free_sequence(seq); seq = NULL; goto cleanup_xpath_match; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Found match with XPath expression \"%s\" over '%s'\n", xpathExpr, raptor_uri_as_string(rdf_parser->base_uri)); #endif size = xmlXPathNodeSetGetLength(nodes); for(i = 0; i < size; i++) { xmlNodePtr node = nodes->nodeTab[i]; const unsigned char* uri_string = NULL; xmlChar *base_uri_string; raptor_uri* base_uri = NULL; raptor_uri* uri = NULL; if(node->type != XML_ATTRIBUTE_NODE && node->type != XML_ELEMENT_NODE) { raptor_parser_error(rdf_parser, "Got unexpected node type %d", node->type); continue; } /* xmlNodeGetBase() returns base URI or NULL and must be freed * with xmlFree() */ if(grddl_parser->html_base_processing) { xmlElementType savedType = doc->type; doc->type = XML_HTML_DOCUMENT_NODE; base_uri_string = xmlNodeGetBase(doc, node); doc->type = savedType; } else base_uri_string = xmlNodeGetBase(doc, node); if(node->type == XML_ATTRIBUTE_NODE) uri_string = (const unsigned char*)node->children->content; else { /* XML_ELEMENT_NODE */ if(node->ns) uri_string = (const unsigned char*)node->ns->href; } if(base_uri_string) { base_uri = raptor_new_uri(rdf_parser->world, base_uri_string); xmlFree(base_uri_string); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("XML base URI of match is '%s'\n", raptor_uri_as_string(base_uri)); #endif } else if(rdf_parser->base_uri) base_uri = raptor_uri_copy(rdf_parser->base_uri); else base_uri = NULL; if(uri_string && (flags & MATCH_IS_VALUE_LIST)) { char *start; char *end; char* buffer; size_t list_len = strlen((const char*)uri_string); buffer = RAPTOR_MALLOC(char*, list_len + 1); memcpy(buffer, uri_string, list_len + 1); for(start = end = buffer; end; start = end+1) { grddl_xml_context* xml_context; end = strchr(start, ' '); if(end) *end = '\0'; if(start == end) continue; RAPTOR_DEBUG2("Got list match URI '%s'\n", start); uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, (const unsigned char*)start); if(flags & MATCH_IS_PROFILE && !strcmp((const char*)raptor_uri_as_string(uri), "http://www.w3.org/2003/g/data-view'")) { raptor_free_uri(uri); continue; } xml_context = raptor_new_xml_context(rdf_parser->world, uri, base_uri); raptor_sequence_push(seq, xml_context); } RAPTOR_FREE(char*, buffer); } else if(flags & MATCH_IS_HARDCODED) { RAPTOR_DEBUG2("Got hardcoded XSLT match for %s\n", xpathExpr); /* return at first match, that's enough */ if(base_uri) raptor_free_uri(base_uri); break; } else if(uri_string) { grddl_xml_context* xml_context; RAPTOR_DEBUG2("Got single match URI '%s'\n", uri_string); uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, uri_string); xml_context = raptor_new_xml_context(rdf_parser->world, uri, base_uri); raptor_sequence_push(seq, xml_context); raptor_free_uri(uri); } if(base_uri) raptor_free_uri(base_uri); } cleanup_xpath_match: if(xpathObj) xmlXPathFreeObject(xpathObj); return seq; } static void raptor_grddl_check_recursive_content_type_handler(raptor_www* www, void* userdata, const char* content_type) { raptor_parser* rdf_parser = (raptor_parser*)userdata; raptor_grddl_parser_context* grddl_parser; size_t len; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; if(!content_type) return; len = strlen(content_type)+1; if(grddl_parser->content_type) RAPTOR_FREE(char*, grddl_parser->content_type); grddl_parser->content_type = RAPTOR_MALLOC(char*, len + 1); memcpy(grddl_parser->content_type, content_type, len + 1); if(!strncmp(content_type, "application/rdf+xml", 19)) { grddl_parser->process_this_as_rdfxml = 1; RAPTOR_DEBUG2("Parser %p: Found RDF/XML content type\n", rdf_parser); raptor_parser_save_content(rdf_parser, 1); } if(!strncmp(content_type, "text/html", 9) || !strncmp(content_type, "application/html+xml", 20)) { RAPTOR_DEBUG3("Parser %p: Found HTML content type '%s'\n", rdf_parser, content_type); grddl_parser->html_base_processing = 1; } } #define RECURSIVE_FLAGS_IGNORE_ERRORS 1 #define RECURSIVE_FLAGS_FILTER 2 static int raptor_grddl_run_recursive(raptor_parser* rdf_parser, raptor_uri* uri, const char *parser_name, int flags) { raptor_grddl_parser_context* grddl_parser; raptor_www_content_type_handler content_type_handler = NULL; int ret = 0; const unsigned char* ibuffer = NULL; size_t ibuffer_len = 0; raptor_parse_bytes_context rpbc; int ignore_errors = (flags & RECURSIVE_FLAGS_IGNORE_ERRORS) > 0; int filter = (flags & RECURSIVE_FLAGS_FILTER) > 0; int fetch_uri_flags = 0; int is_grddl=!strcmp(parser_name, "grddl"); grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; if(raptor_grddl_seen_uri(grddl_parser, uri)) return 0; if(is_grddl) content_type_handler = raptor_grddl_check_recursive_content_type_handler; if(raptor_grddl_ensure_internal_parser(rdf_parser, parser_name, filter)) return !ignore_errors; RAPTOR_DEBUG3("Running recursive %s operation on URI '%s'\n", parser_name, raptor_uri_as_string(uri)); if(is_grddl) raptor_grddl_parser_add_parent(grddl_parser->internal_parser, grddl_parser); rpbc.rdf_parser = grddl_parser->internal_parser; rpbc.base_uri = NULL; rpbc.final_uri = NULL; rpbc.started = 0; if(ignore_errors) fetch_uri_flags |=FETCH_IGNORE_ERRORS; if(raptor_grddl_fetch_uri(grddl_parser->internal_parser, uri, raptor_parser_parse_uri_write_bytes, &rpbc, content_type_handler, grddl_parser->internal_parser, fetch_uri_flags)) { if(!ignore_errors) raptor_parser_warning(rdf_parser, "Fetching GRDDL document URI '%s' failed\n", raptor_uri_as_string(uri)); ret = 0; goto tidy; } if(ignore_errors) raptor_world_internal_set_ignore_errors(rdf_parser->world, 1); raptor_parser_parse_chunk(grddl_parser->internal_parser, NULL, 0, 1); /* If content was saved, process it as RDF/XML */ ibuffer = raptor_parser_get_content(grddl_parser->internal_parser, &ibuffer_len); if(ibuffer && strcmp(parser_name, "rdfxml")) { RAPTOR_DEBUG2("Running additional RDF/XML parse on URI '%s' content\n", raptor_uri_as_string(uri)); if(raptor_grddl_ensure_internal_parser(rdf_parser, "rdfxml", 1)) ret = 1; else { if(raptor_parser_parse_start(grddl_parser->internal_parser, uri)) ret = 1; else { ret = raptor_parser_parse_chunk(grddl_parser->internal_parser, ibuffer, ibuffer_len, 1); } } raptor_parser_save_content(grddl_parser->internal_parser, 0); } if(ibuffer) RAPTOR_FREE(char*, ibuffer); if(rpbc.final_uri) raptor_free_uri(rpbc.final_uri); if(ignore_errors) { raptor_world_internal_set_ignore_errors(rdf_parser->world, 0); ret = 0; } tidy: return ret; } static void raptor_grddl_libxml_discard_error(void* user_data, const char *msg, ...) { return; } static int raptor_grddl_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_grddl_parser_context* grddl_parser; int i; int ret = 0; const unsigned char* uri_string; raptor_uri* uri; /* XML document DOM */ xmlDocPtr doc; int expri; unsigned char* buffer = NULL; size_t buffer_len = 0; int buffer_is_libxml = 0; int loop; if(!is_end && !rdf_parser->emitted_default_graph) { /* Cannot tell if we have a statement yet but must ensure that * the start default graph mark is done once and done before any * statements. */ raptor_parser_start_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph++; } grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; if(grddl_parser->content_type && !grddl_parser->content_type_check) { grddl_parser->content_type_check++; if(!strncmp(grddl_parser->content_type, "application/rdf+xml", 19)) { RAPTOR_DEBUG3("Parser %p: Found document with type '%s' is RDF/XML\n", rdf_parser, grddl_parser->content_type); grddl_parser->process_this_as_rdfxml = 1; } if(!strncmp(grddl_parser->content_type, "text/html", 9) || !strncmp(grddl_parser->content_type, "application/html+xml", 20)) { RAPTOR_DEBUG3("Parser %p: Found document with type '%s' is HTML\n", rdf_parser, grddl_parser->content_type); grddl_parser->html_base_processing = 1; } } if(!grddl_parser->sb) grddl_parser->sb = raptor_new_stringbuffer(); raptor_stringbuffer_append_counted_string(grddl_parser->sb, s, len, 1); if(!is_end) return 0; buffer_len = raptor_stringbuffer_length(grddl_parser->sb); buffer = RAPTOR_MALLOC(unsigned char*, buffer_len + 1); if(buffer) raptor_stringbuffer_copy_to_string(grddl_parser->sb, buffer, buffer_len); uri_string = raptor_uri_as_string(rdf_parser->base_uri); /* Discard parsing errors */ raptor_world_internal_set_ignore_errors(rdf_parser->world, 1); RAPTOR_DEBUG4("Parser %p: URI %s: processing %d bytes of content\n", rdf_parser, uri_string, (int)buffer_len); for(loop = 0; loop < 2; loop++) { int rc; if(loop == 0) { int libxml_options = 0; RAPTOR_DEBUG2("Parser %p: Creating an XML parser\n", rdf_parser); /* try to create an XML parser context */ grddl_parser->xml_ctxt = xmlCreatePushParserCtxt(NULL, NULL, (const char*)buffer, RAPTOR_BAD_CAST(int, buffer_len), (const char*)uri_string); if(!grddl_parser->xml_ctxt) { RAPTOR_DEBUG2("Parser %p: Creating an XML parser failed\n", rdf_parser); continue; } #ifdef RAPTOR_LIBXML_XML_PARSE_NONET if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)) libxml_options |= XML_PARSE_NONET; #endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(grddl_parser->xml_ctxt, libxml_options); #endif grddl_parser->xml_ctxt->vctxt.warning = raptor_grddl_libxml_discard_error; grddl_parser->xml_ctxt->vctxt.error = raptor_grddl_libxml_discard_error; grddl_parser->xml_ctxt->replaceEntities = 1; grddl_parser->xml_ctxt->loadsubset = 1; } else { /* loop is 1 */ /* try to create an HTML parser context */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_HTML_TAG_SOUP)) { xmlCharEncoding enc; int options; RAPTOR_DEBUG2("Parser %p: Creating an HTML parser\n", rdf_parser); enc = xmlDetectCharEncoding((const unsigned char*)buffer, RAPTOR_BAD_CAST(int, buffer_len)); grddl_parser->html_ctxt = htmlCreatePushParserCtxt(/*sax*/ NULL, /*user_data*/ NULL, (const char *)buffer, RAPTOR_BAD_CAST(int, buffer_len), (const char *)uri_string, enc); if(!grddl_parser->html_ctxt) { RAPTOR_DEBUG2("Parser %p: Creating an HTML parser failed\n", rdf_parser); continue; } /* HTML parser */ grddl_parser->html_ctxt->replaceEntities = 1; grddl_parser->html_ctxt->loadsubset = 1; grddl_parser->html_ctxt->vctxt.error = raptor_grddl_libxml_discard_error; /* HTML_PARSE_NOWARNING disables sax->warning, vxtxt.warning */ /* HTML_PARSE_NOERROR disables sax->error, vctxt.error */ options = HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING; #ifdef HTML_PARSE_RECOVER options |= HTML_PARSE_RECOVER; #endif #ifdef RAPTOR_LIBXML_HTML_PARSE_NONET if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)) options |= HTML_PARSE_NONET; #endif htmlCtxtUseOptions(grddl_parser->html_ctxt, options); } else /* No HTML tag soup allowed so continue loop */ continue; } if(grddl_parser->html_ctxt) { RAPTOR_DEBUG2("Parser %p: Parsing as HTML\n", rdf_parser); rc = htmlParseChunk(grddl_parser->html_ctxt, (const char*)s, 0, 1); RAPTOR_DEBUG3("Parser %p: Parsing as HTML %s\n", rdf_parser, (rc ? "failed" : "succeeded")); if(rc) { if(grddl_parser->html_ctxt->myDoc) { xmlFreeDoc(grddl_parser->html_ctxt->myDoc); grddl_parser->html_ctxt->myDoc = NULL; } htmlFreeParserCtxt(grddl_parser->html_ctxt); grddl_parser->html_ctxt = NULL; } } else { RAPTOR_DEBUG2("Parser %p: Parsing as XML\n", rdf_parser); rc = xmlParseChunk(grddl_parser->xml_ctxt, (const char*)s, 0, 1); RAPTOR_DEBUG3("Parser %p: Parsing as XML %s\n", rdf_parser, (rc ? "failed" : "succeeded")); if(rc) { if(grddl_parser->xml_ctxt->myDoc) { xmlFreeDoc(grddl_parser->xml_ctxt->myDoc); grddl_parser->xml_ctxt->myDoc = NULL; } xmlFreeParserCtxt(grddl_parser->xml_ctxt); grddl_parser->xml_ctxt = NULL; } } if(!rc) break; } /* Restore error handling */ raptor_world_internal_set_ignore_errors(rdf_parser->world, 0); if(!grddl_parser->html_ctxt && !grddl_parser->xml_ctxt) { raptor_parser_error(rdf_parser, "Failed to create HTML or XML parsers"); ret = 1; goto tidy; } raptor_grddl_done_uri(grddl_parser, rdf_parser->base_uri); if(grddl_parser->html_ctxt) doc = grddl_parser->html_ctxt->myDoc; else doc = grddl_parser->xml_ctxt->myDoc; if(!doc) { raptor_parser_error(rdf_parser, "Failed to create XML DOM for GRDDL document"); ret = 1; goto tidy; } if(!grddl_parser->grddl_processing) goto transform; if(grddl_parser->xinclude_processing) { RAPTOR_DEBUG3("Parser %p: Running XInclude processing on URI '%s'\n", rdf_parser, raptor_uri_as_string(rdf_parser->base_uri)); if(xmlXIncludeProcess(doc) < 0) { raptor_parser_error(rdf_parser, "XInclude processing failed for GRDDL document"); ret = 1; goto tidy; } else { int blen; /* write the result of XML Include to buffer */ RAPTOR_FREE(char*, buffer); xmlDocDumpFormatMemory(doc, (xmlChar**)&buffer, &blen, 1 /* indent the result */); buffer_len = blen; buffer_is_libxml = 1; RAPTOR_DEBUG3("Parser %p: XML Include processing returned %d bytes document\n", rdf_parser, (int)buffer_len); } } RAPTOR_DEBUG3("Parser %p: Running top-level GRDDL on URI '%s'\n", rdf_parser, raptor_uri_as_string(rdf_parser->base_uri)); /* Work out if there is a root namespace URI */ if(1) { xmlNodePtr xnp; xmlNsPtr rootNs = NULL; const unsigned char* ns_uri_string = NULL; xnp = xmlDocGetRootElement(doc); if(xnp) { rootNs = xnp->ns; if(rootNs) ns_uri_string = (const unsigned char*)(rootNs->href); } if(ns_uri_string) { int n; RAPTOR_DEBUG3("Parser %p: Root namespace URI is %s\n", rdf_parser, ns_uri_string); if(!strcmp((const char*)ns_uri_string, (const char*)raptor_rdf_namespace_uri) && !strcmp((const char*)xnp->name, "RDF")) { RAPTOR_DEBUG3("Parser %p: Root element of %s is rdf:RDF - process this as RDF/XML later\n", rdf_parser, raptor_uri_as_string(rdf_parser->base_uri)); grddl_parser->process_this_as_rdfxml = 1; } for(n = 0; grddl_namespace_uris_ignore_list[n]; n++) { if(!strcmp(grddl_namespace_uris_ignore_list[n], (const char*)ns_uri_string)) { /* ignore this namespace */ RAPTOR_DEBUG3("Parser %p: Ignoring GRDDL for namespace URI '%s'\n", rdf_parser, ns_uri_string); ns_uri_string = NULL; break; } } if(ns_uri_string) { grddl_xml_context* xml_context; grddl_parser->root_ns_uri = raptor_new_uri_relative_to_base(rdf_parser->world, rdf_parser->base_uri, ns_uri_string); xml_context = raptor_new_xml_context(rdf_parser->world, grddl_parser->root_ns_uri, rdf_parser->base_uri); raptor_sequence_push(grddl_parser->profile_uris, xml_context); RAPTOR_DEBUG3("Parser %p: Processing GRDDL namespace URI '%s'\n", rdf_parser, raptor_uri_as_string(grddl_parser->root_ns_uri)); raptor_grddl_run_recursive(rdf_parser, grddl_parser->root_ns_uri, "grddl", RECURSIVE_FLAGS_IGNORE_ERRORS | RECURSIVE_FLAGS_FILTER); } } } /* Always put something at the start of the list even if NULL * so later it can be searched for in output triples */ if(!grddl_parser->root_ns_uri) { grddl_xml_context* xml_context; xml_context = raptor_new_xml_context(rdf_parser->world, NULL, NULL); raptor_sequence_push(grddl_parser->profile_uris, xml_context); } /* Create the XPath evaluation context */ if(!grddl_parser->xpathCtx) { grddl_parser->xpathCtx = xmlXPathNewContext(doc); if(!grddl_parser->xpathCtx) { raptor_parser_error(rdf_parser, "Failed to create XPath context for GRDDL document"); ret = 1; goto tidy; } xmlXPathRegisterNs(grddl_parser->xpathCtx, (const xmlChar*)"html", (const xmlChar*)"http://www.w3.org/1999/xhtml"); xmlXPathRegisterNs(grddl_parser->xpathCtx, (const xmlChar*)"dataview", (const xmlChar*)"http://www.w3.org/2003/g/data-view#"); } /* Try URIs */ if(1) { raptor_sequence* result; result = raptor_grddl_run_xpath_match(rdf_parser, doc, (const xmlChar*)"/html:html/html:head/@profile", MATCH_IS_VALUE_LIST | MATCH_IS_PROFILE); if(result) { int size; RAPTOR_DEBUG4("Parser %p: Found %d URIs in URI '%s'\n", rdf_parser, raptor_sequence_size(result), raptor_uri_as_string(rdf_parser->base_uri)); /* Store profile URIs, skipping NULLs or the GRDDL profile itself */ while(raptor_sequence_size(result)) { grddl_xml_context* xml_context; xml_context = (grddl_xml_context*)raptor_sequence_unshift(result); if(!xml_context) continue; uri = xml_context->uri; if(!strcmp("http://www.w3.org/2003/g/data-view", (const char*)raptor_uri_as_string(uri))) { RAPTOR_DEBUG3("Ignoring of URI %s: URI %s\n", raptor_uri_as_string(rdf_parser->base_uri), raptor_uri_as_string(uri)); grddl_free_xml_context(rdf_parser->world, xml_context); continue; } raptor_sequence_push(grddl_parser->profile_uris, xml_context); } raptor_free_sequence(result); /* Recursive GRDDL through all the URIs */ size = raptor_sequence_size(grddl_parser->profile_uris); for(i = 1; i < size; i++) { grddl_xml_context* xml_context; xml_context = (grddl_xml_context*)raptor_sequence_get_at(grddl_parser->profile_uris, i); uri = xml_context->uri; if(!uri) continue; RAPTOR_DEBUG4("Processing #%d of URI %s: URI %s\n", i, raptor_uri_as_string(rdf_parser->base_uri), raptor_uri_as_string(uri)); ret = raptor_grddl_run_recursive(rdf_parser, uri, "grddl", RECURSIVE_FLAGS_IGNORE_ERRORS| RECURSIVE_FLAGS_FILTER); } } } /* end head profile URIs */ /* Try XHTML document with alternate forms * * Value of @href is a URI */ if(grddl_parser->html_link_processing && RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_HTML_LINK)) { raptor_sequence* result; result = raptor_grddl_run_xpath_match(rdf_parser, doc, (const xmlChar*)"/html:html/html:head/html:link[@type=\"application/rdf+xml\"]/@href", 0); if(result) { RAPTOR_DEBUG4("Parser %p: Found %d URIs in URI '%s'\n", rdf_parser, raptor_sequence_size(result), raptor_uri_as_string(rdf_parser->base_uri)); /* Recursively parse all the URIs, skipping NULLs */ i = 0; while(raptor_sequence_size(result)) { grddl_xml_context* xml_context; xml_context = (grddl_xml_context*)raptor_sequence_unshift(result); if(!xml_context) continue; uri = xml_context->uri; if(uri) { RAPTOR_DEBUG4("Processing #%d of URI %s: URI %s\n", i, raptor_uri_as_string(rdf_parser->base_uri), raptor_uri_as_string(uri)); i++; ret = raptor_grddl_run_recursive(rdf_parser, uri, "guess", RECURSIVE_FLAGS_IGNORE_ERRORS); } grddl_free_xml_context(rdf_parser->world, xml_context); } raptor_free_sequence(result); } } /* Try all XPaths */ for(expri = 0; match_table[expri].xpath; expri++) { raptor_sequence* result; int flags = match_table[expri].flags; if((flags & MATCH_IS_HARDCODED) && !RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_MICROFORMATS)) continue; result = raptor_grddl_run_xpath_match(rdf_parser, doc, match_table[expri].xpath, flags); if(result) { if(match_table[expri].xslt_sheet_uri) { grddl_xml_context* xml_context; /* Ignore what matched, use a hardcoded XSLT URI */ uri_string = match_table[expri].xslt_sheet_uri; RAPTOR_DEBUG3("Parser %p: Using hard-coded XSLT URI '%s'\n", rdf_parser, uri_string); raptor_free_sequence(result); result = raptor_new_sequence((raptor_data_free_handler)grddl_free_xml_context, NULL); uri = raptor_new_uri_relative_to_base(rdf_parser->world, rdf_parser->base_uri, uri_string); xml_context = raptor_new_xml_context(rdf_parser->world, uri, rdf_parser->base_uri); raptor_sequence_push(result, xml_context); raptor_free_uri(uri); } while(raptor_sequence_size(result)) { grddl_xml_context* xml_context; xml_context = (grddl_xml_context*)raptor_sequence_unshift(result); if(!xml_context) break; raptor_grddl_add_transform_xml_context(grddl_parser, xml_context); } raptor_free_sequence(result); if(flags & MATCH_LAST) break; } if(rdf_parser->failed) break; } /* end XPath expression loop */ if(rdf_parser->failed) { ret = 1; goto tidy; } /* Process this document's content buffer as RDF/XML */ if(grddl_parser->process_this_as_rdfxml && buffer) { RAPTOR_DEBUG3("Parser %p: Running additional RDF/XML parse on root document URI '%s' content\n", rdf_parser, raptor_uri_as_string(rdf_parser->base_uri)); if(raptor_grddl_ensure_internal_parser(rdf_parser, "rdfxml", 0)) ret = 1; else { if(raptor_parser_parse_start(grddl_parser->internal_parser, rdf_parser->base_uri)) ret = 1; else { ret = raptor_parser_parse_chunk(grddl_parser->internal_parser, buffer, buffer_len, 1); } } } /* Apply all transformation URIs seen */ transform: while(raptor_sequence_size(grddl_parser->doc_transform_uris)) { grddl_xml_context* xml_context; xml_context = (grddl_xml_context*)raptor_sequence_unshift(grddl_parser->doc_transform_uris); ret = raptor_grddl_run_grddl_transform_uri(rdf_parser, xml_context, doc); grddl_free_xml_context(rdf_parser->world, xml_context); if(ret) break; } if(rdf_parser->emitted_default_graph) { /* May or may not have generated statements but we must close the * start default graph mark above */ raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } tidy: if(buffer) { if(buffer_is_libxml) xmlFree((xmlChar*)buffer); else RAPTOR_FREE(char*, buffer); } if(grddl_parser->sb) { raptor_free_stringbuffer(grddl_parser->sb); grddl_parser->sb = NULL; } if(grddl_parser->xml_ctxt) { if(grddl_parser->xml_ctxt->myDoc) { xmlFreeDoc(grddl_parser->xml_ctxt->myDoc); grddl_parser->xml_ctxt->myDoc = NULL; } xmlFreeParserCtxt(grddl_parser->xml_ctxt); grddl_parser->xml_ctxt = NULL; } if(grddl_parser->html_ctxt) { if(grddl_parser->html_ctxt->myDoc) { xmlFreeDoc(grddl_parser->html_ctxt->myDoc); grddl_parser->html_ctxt->myDoc = NULL; } xmlFreeParserCtxt(grddl_parser->html_ctxt); grddl_parser->html_ctxt = NULL; } if(grddl_parser->xpathCtx) { xmlXPathFreeContext(grddl_parser->xpathCtx); grddl_parser->xpathCtx = NULL; } return (ret != 0); } static int raptor_grddl_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; if(suffix) { if(!strcmp((const char*)suffix, "xhtml")) score = 4; if(!strcmp((const char*)suffix, "html")) score = 2; } else if(identifier) { if(strstr((const char*)identifier, "xhtml")) score = 4; } return score; } static void raptor_grddl_parse_content_type_handler(raptor_parser* rdf_parser, const char* content_type) { raptor_grddl_parser_context* grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; if(content_type) { size_t len = strlen(content_type) + 1; if(grddl_parser->content_type) RAPTOR_FREE(char*, grddl_parser->content_type); grddl_parser->content_type = RAPTOR_MALLOC(char*, len + 1); memcpy(grddl_parser->content_type, content_type, len + 1); } } static const char* const grddl_names[2] = { "grddl", NULL }; #define GRDDL_TYPES_COUNT 2 static const raptor_type_q grddl_types[GRDDL_TYPES_COUNT + 1] = { { "text/html", 9, 2}, { "application/xhtml+xml", 21, 4}, { NULL, 0, 0} }; static int raptor_grddl_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = grddl_names; factory->desc.mime_types = grddl_types; factory->desc.label = "Gleaning Resource Descriptions from Dialects of Languages"; factory->desc.uri_strings = NULL; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_grddl_parser_context); factory->init = raptor_grddl_parse_init; factory->terminate = raptor_grddl_parse_terminate; factory->start = raptor_grddl_parse_start; factory->chunk = raptor_grddl_parse_chunk; factory->recognise_syntax = raptor_grddl_parse_recognise_syntax; factory->content_type_handler= raptor_grddl_parse_content_type_handler; return rc; } int raptor_init_parser_grddl_common(raptor_world* world) { #ifdef HAVE_XSLTINIT xsltInit(); #endif if(!world->xslt_security_preferences && !world->xslt_security_preferences_policy) { xsltSecurityPrefsPtr raptor_xslt_sec = NULL; raptor_xslt_sec = xsltNewSecurityPrefs(); /* no read from file (read from URI with scheme = file) */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_READ_FILE, xsltSecurityForbid); /* no create/write to file */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_WRITE_FILE, xsltSecurityForbid); /* no create directory */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_CREATE_DIRECTORY, xsltSecurityForbid); /* yes read from URI with scheme != file (XSLT_SECPREF_READ_NETWORK) */ /* no write to network (you can 'write' with GET params anyway) */ xsltSetSecurityPrefs(raptor_xslt_sec, XSLT_SECPREF_WRITE_NETWORK, xsltSecurityForbid); world->xslt_security_preferences = (void*)raptor_xslt_sec; } return 0; } int raptor_init_parser_grddl(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_grddl_parser_register_factory); } void raptor_terminate_parser_grddl_common(raptor_world *world) { if(world->xslt_security_preferences && !world->xslt_security_preferences_policy) { /* Free the security preferences object owned by raptor world */ xsltFreeSecurityPrefs((xsltSecurityPrefsPtr)world->xslt_security_preferences); world->xslt_security_preferences = NULL; } xsltCleanupGlobals(); } /* * Save libxslt global state that needs overwriting. * * Initialise the global state with raptor GRDDL parser values. * * Restored by raptor_libxslt_reset_global_state() */ static void raptor_libxslt_set_global_state(raptor_parser *rdf_parser) { raptor_grddl_parser_context* grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; /* save global (libxslt-wide) generic error handler */ grddl_parser->saved_xsltGenericError = xsltGenericError; grddl_parser->saved_xsltGenericErrorContext = xsltGenericErrorContext; /* set global (libxslt-wide) generic error handler to raptor GRDDL parser */ xsltSetGenericErrorFunc(rdf_parser, raptor_grddl_xsltGenericError_handler); /* save global (libxslt-wide) default security prefs */ grddl_parser->saved_xsltSecurityPrefs = xsltGetDefaultSecurityPrefs(); if(grddl_parser->world->xslt_security_preferences && !grddl_parser->world->xslt_security_preferences_policy) { /* set global (libxslt-wide) security preferences to raptor */ xsltSetDefaultSecurityPrefs((xsltSecurityPrefs*)grddl_parser->world->xslt_security_preferences); } } /* * Restore libxslt global state that raptor_libxslt_set_global_state() * overwrote back to the original values. * */ static void raptor_libxslt_reset_global_state(raptor_parser* rdf_parser) { raptor_grddl_parser_context* grddl_parser; grddl_parser = (raptor_grddl_parser_context*)rdf_parser->context; /* restore global (libxslt-wide) default security prefs */ xsltSetDefaultSecurityPrefs(grddl_parser->saved_xsltSecurityPrefs); /* restore global (libxslt-wide) generic error handler */ xsltSetGenericErrorFunc(grddl_parser->saved_xsltGenericErrorContext, grddl_parser->saved_xsltGenericError); } raptor2-2.0.15/src/ntriples_parse.c0000644000175000017500000005172612260330735014112 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * ntriples_parse.c - Raptor N-Triples Parser implementation * * N-Triples * http://www.w3.org/TR/rdf-testcases/#ntriples * * Copyright (C) 2001-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2001-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* Set RAPTOR_DEBUG to > 1 to get lots of buffer related debugging */ /* #undef RAPTOR_DEBUG #define RAPTOR_DEBUG 2 */ /* Prototypes for local functions */ static void raptor_ntriples_generate_statement(raptor_parser* parser, raptor_term* subject_term, raptor_term* predicate_term, raptor_term* object_term, raptor_term* graph_term); /* * NTriples parser object */ struct raptor_ntriples_parser_context_s { /* current line */ unsigned char *line; /* current line length */ size_t line_length; /* current char in line buffer */ size_t offset; char last_char; /* static statement for use in passing to user code */ raptor_statement statement; /* Non-0 if N-Quads */ int is_nquads; int literal_graph_warning; }; typedef struct raptor_ntriples_parser_context_s raptor_ntriples_parser_context; /** * raptor_ntriples_parse_init: * * Initialise the Raptor NTriples parser. * * Return value: non 0 on failure **/ static int raptor_ntriples_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_ntriples_parser_context *ntriples_parser; ntriples_parser = (raptor_ntriples_parser_context*)rdf_parser->context; raptor_statement_init(&ntriples_parser->statement, rdf_parser->world); if(!strcmp(name, "nquads")) ntriples_parser->is_nquads = 1; return 0; } /* PUBLIC FUNCTIONS */ /* * raptor_ntriples_parse_terminate - Free the Raptor NTriples parser * @rdf_parser: parser object * **/ static void raptor_ntriples_parse_terminate(raptor_parser* rdf_parser) { raptor_ntriples_parser_context *ntriples_parser; ntriples_parser = (raptor_ntriples_parser_context*)rdf_parser->context; if(ntriples_parser->line_length) RAPTOR_FREE(cdata, ntriples_parser->line); } static void raptor_ntriples_generate_statement(raptor_parser* parser, raptor_term *subject, raptor_term *predicate, raptor_term *object, raptor_term *graph) { /* raptor_ntriples_parser_context *ntriples_parser = (raptor_ntriples_parser_context*)parser->context; */ raptor_statement *statement = &parser->statement; if(!parser->emitted_default_graph) { raptor_parser_start_graph(parser, NULL, 0); parser->emitted_default_graph++; } statement->subject = subject; statement->predicate = predicate; statement->object = object; statement->graph = graph; /* Do not generate a partial triple - but do clean up */ if(!subject || !predicate || !object) goto cleanup; /* If there is no statement handler - there is nothing else to do */ if(!parser->statement_handler) goto cleanup; /* Generate the statement */ (*parser->statement_handler)(parser->user_data, statement); cleanup: raptor_free_statement(statement); } #define MAX_NTRIPLES_TERMS 4 static int raptor_ntriples_parse_line(raptor_parser* rdf_parser, unsigned char *buffer, size_t len, int max_terms) { raptor_ntriples_parser_context *ntriples_parser = (raptor_ntriples_parser_context*)rdf_parser->context; int i; unsigned char *p; raptor_term* terms[MAX_NTRIPLES_TERMS+1] = {NULL, NULL, NULL, NULL, NULL}; int rc = 0; /* ASSERTION: * p always points to first char we are considering * p[len-1] always points to last char */ /* Handle empty lines */ if(!len) return 0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("handling line '%s' (%d bytes)\n", buffer, (unsigned int)len); #endif p = buffer; while(len > 0 && isspace((int)*p)) { p++; rdf_parser->locator.column++; rdf_parser->locator.byte++; len--; } /* Handle empty - all whitespace lines */ if(!len) return 0; /* Handle comment lines */ if(*p == '#') return 0; /* Remove trailing spaces */ while(len > 0 && isspace((int)p[len-1])) { p[len-1] = '\0'; len--; } /* can't be empty now - that would have been caught above */ /* Must be triple/quad */ for(i = 0; i < MAX_NTRIPLES_TERMS + 1; i++) { if(!len) { if(ntriples_parser->is_nquads) { /* context is optional in nquads */ if(i == 3 || i ==4) break; } else { if(i == 3) break; } raptor_parser_error(rdf_parser, "Unexpected end of line"); goto cleanup; } if(i == 3) { /* graph term (3): blank node or */ if(*p != '<' && *p != '_') { raptor_parser_error(rdf_parser, "Saw '%c', expected Graph term , _:bnodeID", *p); goto cleanup; } } else if(i == 2) { /* object term (2): expect either or _:name or literal */ if(*p != '<' && *p != '_' && *p != '"') { raptor_parser_error(rdf_parser, "Saw '%c', expected object term , _:bnodeID or \"literal\"", *p); goto cleanup; } } else if(i == 1) { /* predicate term (1): expect URI only */ if(*p != '<') { raptor_parser_error(rdf_parser, "Saw '%c', expected predict term ", *p); goto cleanup; } } else { /* subject (0) or graph (3) terms: expect or _:name */ if(*p != '<' && *p != '_') { raptor_parser_error(rdf_parser, "Saw '%c', expected subject term or _:bnodeID", *p); goto cleanup; } } rc = raptor_ntriples_parse_term(rdf_parser->world, &rdf_parser->locator, p, &len, &terms[i], 0); if(!rc) { rc = 1; goto cleanup; } p += rc; rc = 0; if(terms[i] && terms[i]->type == RAPTOR_TERM_TYPE_URI) { unsigned const char* uri_string; /* Check for absolute URI */ uri_string = raptor_uri_as_string(terms[i]->value.uri); if(!raptor_uri_uri_string_is_absolute(uri_string)) { raptor_parser_error(rdf_parser, "URI %s is not absolute", uri_string); goto cleanup; } } /* Skip whitespace after terms */ while(len > 0 && isspace((int)*p)) { p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 if(terms[i]) { unsigned char* c = raptor_term_to_string(terms[i]); fprintf(stderr, "item %d: term '%s' type %d\n", i, c, terms[i]->type); raptor_free_memory(c); } else fprintf(stderr, "item %d: NULL term\n", i); #endif /* Look for terminating '.' after 3rd (ntriples) or 3rd/4th (nquads) term */ if(i == (ntriples_parser->is_nquads ? 4 : 3) && *p != '.') { raptor_parser_error(rdf_parser, "Missing terminating \".\""); return 0; } /* Still may be optional so check again */ if(*p == '.') { p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; /* Skip whitespace after '.' */ while(len > 0 && isspace((int)*p)) { p++; len--; rdf_parser->locator.column++; rdf_parser->locator.byte++; } /* Only a comment is allowed here */ if(*p && *p != '#') { raptor_parser_error(rdf_parser, "Junk after terminating \".\""); return 0; } p += len; len = 0; } } if(ntriples_parser->is_nquads) { /* Check N-Quads has 3 or 4 terms */ if(terms[4]) { raptor_free_term(terms[4]); terms[4] = NULL; raptor_parser_error(rdf_parser, "N-Quads only allows 3 or 4 terms"); goto cleanup; } } else { /* Check N-Triples has only 3 terms */ if(terms[3] || terms[4]) { if(terms[4]) { raptor_free_term(terms[4]); terms[4] = NULL; } if(terms[3]) { raptor_free_term(terms[3]); terms[3] = NULL; } raptor_parser_error(rdf_parser, "N-Triples only allows 3 terms"); goto cleanup; } } if(terms[3] && terms[3]->type == RAPTOR_TERM_TYPE_LITERAL) { if(!ntriples_parser->literal_graph_warning++) raptor_parser_warning(rdf_parser, "Ignoring N-Quad literal contexts"); raptor_free_term(terms[3]); terms[3] = NULL; } raptor_ntriples_generate_statement(rdf_parser, terms[0], terms[1], terms[2], terms[3]); rdf_parser->locator.byte += RAPTOR_BAD_CAST(int, len); cleanup: return rc; } static int raptor_ntriples_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { unsigned char *buffer; unsigned char *ptr; unsigned char *start; raptor_ntriples_parser_context *ntriples_parser = (raptor_ntriples_parser_context*)rdf_parser->context; int max_terms = ntriples_parser->is_nquads ? 4 : 3; unsigned char* end_ptr; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("adding %d bytes to buffer\n", (unsigned int)len); #endif if(len) { buffer = RAPTOR_MALLOC(unsigned char*, ntriples_parser->line_length + len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } if(ntriples_parser->line_length) { memcpy(buffer, ntriples_parser->line, ntriples_parser->line_length); RAPTOR_FREE(char*, ntriples_parser->line); } ntriples_parser->line = buffer; /* move pointer to end of cdata buffer */ ptr = buffer + ntriples_parser->line_length; /* adjust stored length */ ntriples_parser->line_length += len; /* now write new stuff at end of cdata buffer */ memcpy(ptr, s, len); ptr += len; *ptr = '\0'; } else buffer = ntriples_parser->line; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("buffer now %ld bytes\n", ntriples_parser->line_length); #endif if(!ntriples_parser->line_length) return 0; ptr = buffer + ntriples_parser->offset; end_ptr = buffer + ntriples_parser->line_length; while((start = ptr) < end_ptr) { unsigned char *line_start = ptr; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("line buffer now '%s' (offset %ld)\n", ptr, ptr-(buffer+ntriples_parser->offset)); #endif /* skip \n when just seen \r - i.e. \r\n or CR LF */ if(ntriples_parser->last_char == '\r' && *ptr == '\n') { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("skipping a \\n\n"); #endif ptr++; rdf_parser->locator.byte++; rdf_parser->locator.column = 0; start = line_start = ptr; } if(1) { int quote = '\0'; int in_uri = '\0'; int bq = 0; while(ptr < end_ptr) { if(!bq) { if(*ptr == '\\') { bq = 1; ptr++; continue; } if(*ptr == '<') in_uri = 1; else if (in_uri && *ptr == '>') in_uri = 0; if(!quote) { if((!in_uri && *ptr == '\'') || *ptr == '"') quote = *ptr; if(*ptr == '\n' || *ptr == '\r') break; } else { if(*ptr == quote) quote = 0; } } ptr++; bq = 0; } } if(ptr == end_ptr) { if(!is_end) /* middle of line */ break; } else { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("found newline \\x%02x at offset %ld\n", *ptr, ptr-line_start); #endif ntriples_parser->last_char = *ptr; } len = ptr - line_start; rdf_parser->locator.column = 0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("line (%ld) : >>>", len); fwrite(line_start, sizeof(char), len, stderr); fputs("<<<\n", stderr); #endif *ptr = '\0'; if(raptor_ntriples_parse_line(rdf_parser, line_start, len, max_terms)) return 1; rdf_parser->locator.line++; /* go past newline */ if(ptr < end_ptr) { ptr++; rdf_parser->locator.byte++; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 /* Do not peek if too far */ if(RAPTOR_BAD_CAST(size_t, ptr - buffer) < ntriples_parser->line_length) RAPTOR_DEBUG2("next char is \\x%02x\n", *ptr); else RAPTOR_DEBUG1("next char unknown - end of buffer\n"); #endif } ntriples_parser->offset = start - buffer; len = ntriples_parser->line_length - ntriples_parser->offset; if(len && ntriples_parser->line_length != len) { /* collapse buffer */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("collapsing buffer from %ld to %ld bytes\n", ntriples_parser->line_length, len); #endif buffer = RAPTOR_MALLOC(unsigned char*, len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return 1; } memcpy(buffer, ntriples_parser->line + ntriples_parser->line_length - len, len); buffer[len] = '\0'; RAPTOR_FREE(char*, ntriples_parser->line); ntriples_parser->line = buffer; ntriples_parser->line_length -= ntriples_parser->offset; ntriples_parser->offset = 0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("buffer now '%s' (%ld bytes)\n", ntriples_parser->line, ntriples_parser->line_length); #endif } /* exit now, no more input */ if(is_end) { if(ntriples_parser->offset != ntriples_parser->line_length) { raptor_parser_error(rdf_parser, "Junk at end of input."); return 1; } if(rdf_parser->emitted_default_graph) { raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } return 0; } return 0; } static int raptor_ntriples_parse_start(raptor_parser* rdf_parser) { raptor_locator *locator = &rdf_parser->locator; raptor_ntriples_parser_context *ntriples_parser = (raptor_ntriples_parser_context*)rdf_parser->context; locator->line = 1; locator->column = 0; locator->byte = 0; ntriples_parser->last_char = '\0'; return 0; } #if defined RAPTOR_PARSER_NTRIPLES || defined RAPTOR_PARSER_NQUADS static int raptor_ntriples_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; if(suffix) { if(!strcmp((const char*)suffix, "nt")) score = 8; /* Explicitly refuse to do anything with Turtle or N3 named content */ if(!strcmp((const char*)suffix, "ttl") || !strcmp((const char*)suffix, "n3")) { return 0; } } if(mime_type) { if(strstr((const char*)mime_type, "ntriples")) score += 6; } if(buffer && len) { int has_ntriples_3; /* recognizing N-Triples is tricky but rely that it is line based * and that all URLs are absolute, and there are a lot of http: * URLs */ #define HAS_AT_PREFIX (raptor_memstr((const char*)buffer, len, "@prefix ") != NULL) #define HAS_NTRIPLES_START_1_LEN 8 #define HAS_NTRIPLES_START_1 (!memcmp((const char*)buffer, " <") != NULL) #define HAS_NTRIPLES_5 (raptor_memstr((const char*)buffer, len, "> \"") != NULL) if(HAS_AT_PREFIX) /* Turtle */ return 0; has_ntriples_3 = HAS_NTRIPLES_3; /* Bonus if the first bytes look N-Triples-like */ if(len >= HAS_NTRIPLES_START_1_LEN && HAS_NTRIPLES_START_1) score++; if(len >= HAS_NTRIPLES_START_2_LEN && HAS_NTRIPLES_START_2) score++; if(HAS_NTRIPLES_1 || HAS_NTRIPLES_2) { /* N-Triples file with newlines and HTTP subjects */ score += 6; if(has_ntriples_3) score++; } else if(has_ntriples_3) { /* an HTTP URL predicate or object but no HTTP subject */ score += 3; } else if(HAS_NTRIPLES_4) { /* non HTTP urls - weak check */ score += 2; if(HAS_NTRIPLES_5) /* bonus for a literal object */ score++; } } return score; } static const char* const ntriples_names[2] = { "ntriples", NULL }; static const char* const ntriples_uri_strings[3] = { "http://www.w3.org/ns/formats/N-Triples", "http://www.w3.org/TR/rdf-testcases/#ntriples", NULL }; #define NTRIPLES_TYPES_COUNT 2 static const raptor_type_q ntriples_types[NTRIPLES_TYPES_COUNT + 1] = { { "application/n-triples", 21, 10}, { "text/plain", 10, 1}, { NULL, 0, 0} }; static int raptor_ntriples_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = ntriples_names; factory->desc.mime_types = ntriples_types; factory->desc.label = "N-Triples"; factory->desc.uri_strings = ntriples_uri_strings; factory->desc.flags = 0; factory->context_length = sizeof(raptor_ntriples_parser_context); factory->init = raptor_ntriples_parse_init; factory->terminate = raptor_ntriples_parse_terminate; factory->start = raptor_ntriples_parse_start; factory->chunk = raptor_ntriples_parse_chunk; factory->recognise_syntax = raptor_ntriples_parse_recognise_syntax; return rc; } int raptor_init_parser_ntriples(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_ntriples_parser_register_factory); } #endif #ifdef RAPTOR_PARSER_NQUADS static int raptor_nquads_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; int ntriples_score; if(suffix) { if(!strcmp((const char*)suffix, "nq")) score = 2; /* Explicitly refuse to do anything with N-Triples, Turtle or N3 * named content */ if(!strcmp((const char*)suffix, "nt") || !strcmp((const char*)suffix, "ttl") || !strcmp((const char*)suffix, "n3")) { return 0; } } if(mime_type) { if(strstr((const char*)mime_type, "nquads")) score += 2; } /* ntriples is a subset of nquads, score higher than ntriples */ ntriples_score = raptor_ntriples_parse_recognise_syntax(factory, buffer, len, identifier, suffix, mime_type); if(ntriples_score > 0) { score += ntriples_score + 1; } return score; } static const char* const nquads_names[2] = { "nquads", NULL }; static const char* const nquads_uri_strings[2] = { "http://sw.deri.org/2008/07/n-quads/", NULL }; #define NQUADS_TYPES_COUNT 1 static const raptor_type_q nquads_types[NQUADS_TYPES_COUNT + 1] = { { "text/x-nquads", 13, 10}, { NULL, 0, 0} }; static int raptor_nquads_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = nquads_names; factory->desc.mime_types = nquads_types; factory->desc.label = "N-Quads"; factory->desc.uri_strings = nquads_uri_strings; factory->desc.flags = 0; factory->context_length = sizeof(raptor_ntriples_parser_context); factory->init = raptor_ntriples_parse_init; factory->terminate = raptor_ntriples_parse_terminate; factory->start = raptor_ntriples_parse_start; factory->chunk = raptor_ntriples_parse_chunk; factory->recognise_syntax = raptor_nquads_parse_recognise_syntax; return rc; } int raptor_init_parser_nquads(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_nquads_parser_register_factory); } #endif raptor2-2.0.15/src/sort_r.c0000644000175000017500000000663312354314724012371 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * sort_r.c - Portable sort_r * * Copyright (C) 2014, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE #if defined(HAVE_QSORT_R) || defined(HAVE_QSORT_S) /* Include inline code */ #include "sort_r.h" #else #include "ssort.h" #endif /** * raptor_sort_r: * @base: the array to be sorted * @nel: the number of elements in the array * @width: the size in bytes of each element of the array * @compar: comparison function * @user_data: a pointer to be passed to the comparison function * * Sort an array with an extra user data arg for the comparison funciton. * * Sorts data at @base of @nel elememnts of width @width using * comparison function @comp that takes args (void* data1, void* * data2, @user_data) and returns <0, 0, or >0 for object comparison. * */ void raptor_sort_r(void *base, size_t nel, size_t width, raptor_data_compare_arg_handler compar, void *user_data) { #if defined(HAVE_QSORT_R) || defined(HAVE_QSORT_S) sort_r(base, nel, width, compar, user_data); #else ssort_r(base, nel, width, compar, user_data); #endif } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); /* Public Domain licensed example code by Isaac Turner from * https://github.com/noporpoise/sort_r */ /* Isaac Turner 18 Nov 2013 Public Domain */ /* Comparison function to sort an array of int, inverting a given region. `arg` should be of type int[2], with the elements representing the start and end of the region to invert (inclusive). */ static int sort_r_cmp(const void *aa, const void *bb, void *arg) { const int *a = (const int*)aa; const int *b = (const int*)bb; const int *interval = (const int*)arg; int cmp = *a - *b; int inv_start = interval[0], inv_end = interval[1]; char norm = (*a < inv_start || *a > inv_end || *b < inv_start || *b > inv_end); return norm ? cmp : -cmp; } int main(int argc, char *argv[]) { const char *program = raptor_basename(argv[0]); int i; /* sort 1..19, 30..20, 30..100 */ int arr[18] = {1, 5, 28, 4, 3, 2, 10, 20, 18, 25, 21, 29, 34, 35, 14, 100, 27, 19}; int tru[18] = {1, 2, 3, 4, 5, 10, 14, 18, 19, 29, 28, 27, 25, 21, 20, 34, 35, 100}; /* Region to invert: 20-30 (inclusive) */ int interval[2] = {20, 30}; int failures = 0; raptor_sort_r(arr, 18, sizeof(int), sort_r_cmp, interval); /* Check PASS/FAIL */ for(i = 0; i < 18; i++) { if(arr[i] != tru[i]) { printf("%s: sort_r() result %i: got %d expected %d", program, i, arr[i], tru[i]); failures++; } } return failures; } #endif raptor2-2.0.15/src/raptor_www.c0000644000175000017500000004507212111340651013261 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www.c - Raptor WWW retrieval core * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" static int raptor_www_file_fetch(raptor_www* www); /* * raptor_www_init: * @world: raptor_world object * * INTERNAL - Initialise the WWW class. * * Must be called before creating any #raptor_www object. * * Return value: non-0 on failure **/ int raptor_www_init(raptor_world* world) { int rc = 0; if(world->www_initialized) return 0; if(!world->www_skip_www_init_finish) { #ifdef RAPTOR_WWW_LIBCURL rc = curl_global_init(CURL_GLOBAL_ALL); #endif } world->www_initialized = 1; return rc; } /* * raptor_www_finish: * @world: raptor_world object * * INTERNAL - Terminate the WWW class. * * Must be called to clean any resources used by the WWW implementation. * **/ void raptor_www_finish(raptor_world* world) { if(!world->www_skip_www_init_finish) { #ifdef RAPTOR_WWW_LIBCURL curl_global_cleanup(); #endif } } /** * raptor_new_www_with_connection: * @world: raptor_world object * @connection: external WWW connection object. * * Constructor - create a new #raptor_www object over an existing WWW connection. * * At present this only works with a libcurl CURL handle object * when raptor is compiled with libcurl suppport. Otherwise the * @connection is ignored. This allows such things as setting * up special flags on the curl handle before passing into the constructor. * * Return value: a new #raptor_www object or NULL on failure. **/ raptor_www* raptor_new_www_with_connection(raptor_world* world, void *connection) { raptor_www* www; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); www = RAPTOR_CALLOC(raptor_www*, 1, sizeof(*www)); if(!www) return NULL; www->world = world; www->type = NULL; www->free_type = 1; /* default is to free content type */ www->total_bytes = 0; www->failed = 0; www->status_code = 0; www->write_bytes = NULL; www->content_type = NULL; www->uri_filter = NULL; www->connection_timeout = 10; www->cache_control = NULL; #ifdef RAPTOR_WWW_LIBCURL www->curl_handle = (CURL*)connection; raptor_www_curl_init(www); #endif #ifdef RAPTOR_WWW_LIBXML raptor_www_libxml_init(www); #endif #ifdef RAPTOR_WWW_LIBFETCH raptor_www_libfetch_init(www); #endif return www; } /** * raptor_new_www: * @world: raptor_world object * * Constructor - create a new #raptor_www object. * * Return value: a new #raptor_www or NULL on failure. **/ raptor_www* raptor_new_www(raptor_world* world) { RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); return raptor_new_www_with_connection(world, NULL); } /** * raptor_free_www: * @www: WWW object. * * Destructor - destroy a #raptor_www object. **/ void raptor_free_www(raptor_www* www) { /* free context */ if(www->type) { if(www->free_type) RAPTOR_FREE(char*, www->type); www->type = NULL; } if(www->user_agent) { RAPTOR_FREE(char*, www->user_agent); www->user_agent = NULL; } if(www->cache_control) { RAPTOR_FREE(char*, www->cache_control); www->cache_control = NULL; } if(www->proxy) { RAPTOR_FREE(char*, www->proxy); www->proxy = NULL; } if(www->http_accept) { RAPTOR_FREE(char*, www->http_accept); www->http_accept = NULL; } #ifdef RAPTOR_WWW_LIBCURL raptor_www_curl_free(www); #endif #ifdef RAPTOR_WWW_LIBXML raptor_www_libxml_free(www); #endif #ifdef RAPTOR_WWW_LIBFETCH raptor_www_libfetch_free(www); #endif if(www->uri) raptor_free_uri(www->uri); if(www->final_uri) raptor_free_uri(www->final_uri); RAPTOR_FREE(www, www); } /** * raptor_www_set_write_bytes_handler: * @www: WWW object * @handler: bytes handler function * @user_data: bytes handler data * * Set the handler to receive bytes written by the #raptor_www implementation. * **/ void raptor_www_set_write_bytes_handler(raptor_www* www, raptor_www_write_bytes_handler handler, void *user_data) { www->write_bytes = handler; www->write_bytes_userdata = user_data; } /** * raptor_www_set_content_type_handler: * @www: WWW object * @handler: content type handler function * @user_data: content type handler data * * Set the handler to receive the HTTP Content-Type header value. * * This is called if or when the value is discovered during retrieval * by the raptor_www implementation. Not all implementations provide * access to this. **/ void raptor_www_set_content_type_handler(raptor_www* www, raptor_www_content_type_handler handler, void *user_data) { www->content_type = handler; www->content_type_userdata = user_data; } /** * raptor_www_set_user_agent: * @www: WWW object * @user_agent: User-Agent string * * Set the user agent value, for HTTP requests typically. **/ void raptor_www_set_user_agent(raptor_www* www, const char *user_agent) { char *ua_copy = NULL; size_t ua_len; if(!user_agent || !*user_agent) { www->user_agent = NULL; return; } ua_len = strlen(user_agent); ua_copy = RAPTOR_MALLOC(char*, ua_len + 1); if(!ua_copy) return; memcpy(ua_copy, user_agent, ua_len + 1); /* copy NUL */ www->user_agent = ua_copy; } /** * raptor_www_set_proxy: * @www: WWW object * @proxy: proxy string. * * Set the proxy for the WWW object. * * The @proxy usually a string of the form http://server.domain:port. **/ void raptor_www_set_proxy(raptor_www* www, const char *proxy) { char *proxy_copy; size_t proxy_len; if(!proxy) return; proxy_len = strlen(proxy); proxy_copy = RAPTOR_MALLOC(char*, proxy_len + 1); if(!proxy_copy) return; memcpy(proxy_copy, proxy, proxy_len + 1); /* copy NUL */ www->proxy = proxy_copy; } /** * raptor_www_set_http_accept: * @www: #raptor_www class * @value: Accept: header value or NULL to have an empty one. * * Set HTTP Accept header. * **/ void raptor_www_set_http_accept(raptor_www* www, const char *value) { char *value_copy; size_t len = 8; /* strlen("Accept:")+1 */ size_t value_len = 0; if(value) { value_len = strlen(value); len += 1 + value_len; /* " "+value */ } value_copy = RAPTOR_MALLOC(char*, len); if(!value_copy) return; www->http_accept = value_copy; /* copy header name */ memcpy(value_copy, "Accept:", 7); /* Do not copy NUL */ value_copy += 7; /* copy header value */ if(value) { *value_copy ++= ' '; memcpy(value_copy, value, value_len + 1); /* Copy NUL */ } else { /* Ensure value is NUL terminated */ *value_copy = '\0'; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Using Accept header: '%s'\n", www->http_accept); #endif } /** * raptor_www_set_connection_timeout: * @www: WWW object * @timeout: Timeout in seconds * * Set WWW connection timeout **/ void raptor_www_set_connection_timeout(raptor_www* www, int timeout) { www->connection_timeout = timeout; } /** * raptor_www_set_http_cache_control: * @www: WWW object * @cache_control: Cache-Control header value (or NULL to disable) * * Set HTTP Cache-Control:header (default none) * * The @cache_control value can be a string to set it, "" to send * a blank header or NULL to not set the header at all. * * Return value: non-0 on failure **/ int raptor_www_set_http_cache_control(raptor_www* www, const char* cache_control) { char *cache_control_copy; const char* const header="Cache-Control:"; const size_t header_len = 14; /* strlen("Cache-Control:") */ size_t len; size_t cc_len; RAPTOR_ASSERT((strlen(header) != header_len), "Cache-Control header length is wrong"); if(www->cache_control) { RAPTOR_FREE(char*, www->cache_control); www->cache_control = NULL; } if(!cache_control) { www->cache_control = NULL; return 0; } cc_len = strlen(cache_control); len = header_len + 1 + cc_len + 1; /* header+" "+cache_control+"\0" */ cache_control_copy = RAPTOR_MALLOC(char*, len); if(!cache_control_copy) return 1; www->cache_control = cache_control_copy; /* copy header name */ memcpy(cache_control_copy, header, header_len); /* Do not copy NUL */ cache_control_copy += header_len; /* copy header value */ if(*cache_control) { *cache_control_copy ++= ' '; memcpy(cache_control_copy, cache_control, cc_len + 1); /* Copy NUL */ } else { /* Ensure value is NUL terminated */ *cache_control_copy = '\0'; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Using Cache-Control header: '%s'\n", www->cache_control); #endif return 0; } /** * raptor_www_set_uri_filter: * @www: WWW object * @filter: URI filter function * @user_data: User data to pass to filter function * * Set URI filter function for WWW retrieval. **/ void raptor_www_set_uri_filter(raptor_www* www, raptor_uri_filter_func filter, void *user_data) { www->uri_filter = filter; www->uri_filter_user_data = user_data; } /** * raptor_www_set_ssl_cert_options: * @www: WWW object * @cert_filename: SSL client certificate file * @cert_type: SSL client certificate type (default is "PEM") * @cert_passphrase: SSL client certificate password * * Set SSL client certificate options (where supported) * * Return value: non-0 when setting options is not supported **/ int raptor_www_set_ssl_cert_options(raptor_www* www, const char* cert_filename, const char* cert_type, const char* cert_passphrase) { #ifdef RAPTOR_WWW_LIBCURL return raptor_www_curl_set_ssl_cert_options(www, cert_filename, cert_type, cert_passphrase); #else return 1; #endif } /** * raptor_www_set_ssl_verify_options: * @www: WWW object * @verify_peer: SSL verify peer - non-0 to verify peer SSL certificate (default) * @verify_host: SSL verify host - 0 none, non-0 to require a CN match (default). * * Set whether SSL verifies the authenticity of the peer's certificate * * These options correspond to setting the curl * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options. * * Return value: non-0 on failure **/ int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host) { #ifdef RAPTOR_WWW_LIBCURL return raptor_www_curl_set_ssl_verify_options(www, verify_peer, verify_host); #else return 1; #endif } /** * raptor_www_get_connection: * @www: #raptor_www object * * Get WWW library connection object. * * Return the internal WWW connection handle. For libcurl, this * returns the CURL handle and for libxml the context. Otherwise * it returns NULL. * * Return value: connection pointer **/ void* raptor_www_get_connection(raptor_www* www) { #ifdef RAPTOR_WWW_NONE return NULL; #endif #ifdef RAPTOR_WWW_LIBCURL return www->curl_handle; #endif #ifdef RAPTOR_WWW_LIBXML return www->ctxt; #endif #ifdef RAPTOR_WWW_LIBFETCH return NULL; #endif return NULL; } /** * raptor_www_abort: * @www: WWW object * @reason: abort reason message * * Abort an ongoing raptor WWW operation and pass back a reason. * * This is typically used within one of the raptor WWW handlers * when retrieval need no longer continue due to another * processing issue or error. **/ void raptor_www_abort(raptor_www* www, const char *reason) { www->failed = 1; } void raptor_www_error(raptor_www* www, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_log_error_varargs(www->world, RAPTOR_LOG_LEVEL_ERROR, &www->locator, message, arguments); va_end(arguments); } static int raptor_www_file_handle_fetch(raptor_www* www, FILE* fh) { while(!feof(fh)) { size_t len = fread(www->buffer, 1, RAPTOR_WWW_BUFFER_SIZE, fh); if(len > 0) { www->total_bytes += len; www->buffer[len]='\0'; if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, www->buffer, len, 1); } if(feof(fh) || www->failed) break; } if(!www->failed) www->status_code = 200; return www->failed; } static int raptor_www_file_fetch(raptor_www* www) { char *filename; FILE *fh; unsigned char *uri_string = raptor_uri_as_string(www->uri); #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) struct stat buf; #endif www->status_code = 200; filename = raptor_uri_uri_string_to_filename(uri_string); if(!filename) { raptor_www_error(www, "Not a file: URI"); return 1; } #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) if(!stat(filename, &buf) && S_ISDIR(buf.st_mode)) { raptor_www_error(www, "Cannot read from a directory '%s'", filename); RAPTOR_FREE(char*, filename); www->status_code = 404; return 1; } #endif fh = fopen(filename, "rb"); if(!fh) { raptor_www_error(www, "file '%s' open failed - %s", filename, strerror(errno)); RAPTOR_FREE(char*, filename); www->status_code = (errno == EACCES) ? 403: 404; www->failed = 1; return www->failed; } raptor_www_file_handle_fetch(www, fh); fclose(fh); RAPTOR_FREE(char*, filename); return www->failed; } /** * raptor_www_fetch: * @www: WWW object * @uri: URI to read from * * Start a WWW content retrieval for the given URI, returning data via the write_bytes handler. * * Return value: non-0 on failure. **/ int raptor_www_fetch(raptor_www *www, raptor_uri *uri) { int status = 1; www->uri = raptor_new_uri_for_retrieval(uri); www->locator.uri = uri; www->locator.line= -1; www->locator.column= -1; if(www->uri_filter) { int rc = www->uri_filter(www->uri_filter_user_data, uri); if(rc) return rc; } #ifdef RAPTOR_WWW_NONE status = raptor_www_file_fetch(www); #else if(raptor_uri_uri_string_is_file_uri(raptor_uri_as_string(www->uri))) status = raptor_www_file_fetch(www); else { #ifdef RAPTOR_WWW_LIBCURL status = raptor_www_curl_fetch(www); #endif #ifdef RAPTOR_WWW_LIBXML status = raptor_www_libxml_fetch(www); #endif #ifdef RAPTOR_WWW_LIBFETCH status = raptor_www_libfetch_fetch(www); #endif } #endif if(!status && www->status_code && www->status_code != 200){ raptor_www_error(www, "Resolving URI failed with HTTP status %d", www->status_code); status = 1; } www->failed = status; return www->failed; } static void raptor_www_fetch_to_string_write_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb) { raptor_stringbuffer* sb = (raptor_stringbuffer*)userdata; size_t len = size * nmemb; raptor_stringbuffer_append_counted_string(sb, (unsigned char*)ptr, len, 1); } /** * raptor_www_fetch_to_string: * @www: raptor_www object * @uri: raptor_uri to retrieve * @string_p: pointer to location to hold string * @length_p: pointer to location to hold length of string (or NULL) * @malloc_handler: pointer to malloc() to use to make string (or NULL) * * Start a WWW content retrieval for the given URI, returning the data in a new string. * * If @malloc_handler is null, raptor will allocate it using it's * own memory allocator. *string_p is set to NULL on failure (and * *length_p to 0 if length_p is not NULL). * * Return value: non-0 on failure **/ RAPTOR_EXTERN_C int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler) { raptor_stringbuffer *sb = NULL; void *str = NULL; raptor_www_write_bytes_handler saved_write_bytes; void *saved_write_bytes_userdata; sb = raptor_new_stringbuffer(); if(!sb) return 1; if(length_p) *length_p=0; saved_write_bytes = www->write_bytes; saved_write_bytes_userdata = www->write_bytes_userdata; raptor_www_set_write_bytes_handler(www, raptor_www_fetch_to_string_write_bytes, sb); if(raptor_www_fetch(www, uri)) str = NULL; else { size_t len = raptor_stringbuffer_length(sb); if(len) { str = (void*)malloc_handler(len+1); if(str) { raptor_stringbuffer_copy_to_string(sb, (unsigned char*)str, len+1); *string_p=str; if(length_p) *length_p=len; } } } if(sb) raptor_free_stringbuffer(sb); raptor_www_set_write_bytes_handler(www, saved_write_bytes, saved_write_bytes_userdata); return (str == NULL); } /** * raptor_www_get_final_uri: * @www: #raptor_www object * * Get the WWW final resolved URI. * * This returns the URI used after any protocol redirection. * * Return value: a new URI or NULL if not known. **/ raptor_uri* raptor_www_get_final_uri(raptor_www* www) { return www->final_uri ? raptor_uri_copy(www->final_uri) : NULL; } /** * raptor_www_set_final_uri_handler: * @www: WWW object * @handler: content type handler function * @user_data: content type handler data * * Set the handler to receive the HTTP Content-Type header value. * * This is called if or when the value is discovered during retrieval * by the raptor_www implementation. Not all implementations provide * access to this. **/ void raptor_www_set_final_uri_handler(raptor_www* www, raptor_www_final_uri_handler handler, void *user_data) { www->final_uri_handler = handler; www->final_uri_userdata = user_data; } raptor2-2.0.15/src/raptor_syntax_description.c0000644000175000017500000000474612020170223016364 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_syntax_description.c - Raptor syntax description API * * Copyright (C) 2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" static unsigned int count_strings_array(const char* const * array) { unsigned int i; if(!array) return 0; for(i = 0; (array[i]); i++) ; return i; } static unsigned int count_mime_types_array(const raptor_type_q* array) { unsigned int i; if(!array) return 0; for(i = 0; (array[i].mime_type); i++) ; return i; } /** * raptor_syntax_description_validate: * @desc: description * * Validate a syntax description has the required fields (name, labels) and update counts * * Returns: non-0 on failure **/ int raptor_syntax_description_validate(raptor_syntax_description* desc) { if(!desc || !desc->names || !desc->names[0] || !desc->label) return 1; #ifdef RAPTOR_DEBUG /* Maintainer only check of static data */ if(desc->mime_types) { unsigned int i; const raptor_type_q* type_q = NULL; for(i = 0; (type_q = &desc->mime_types[i]) && type_q->mime_type; i++) { size_t len = strlen(type_q->mime_type); if(len != type_q->mime_type_len) { fprintf(stderr, "Format %s mime type %s actual len %d static len %d\n", desc->names[0], type_q->mime_type, (int)len, (int)type_q->mime_type_len); } } } #endif desc->names_count = count_strings_array(desc->names); if(!desc->names_count) return 1; desc->mime_types_count = count_mime_types_array(desc->mime_types); desc->uri_strings_count = count_strings_array(desc->uri_strings); return 0; } raptor2-2.0.15/src/raptor_config_cmake.h.in0000644000175000017500000000732412011242611015446 00000000000000/* raptor_config.h */ #define RAPTOR_VERSION_DECIMAL @RAPTOR_VERSION_DECIMAL@ #define RAPTOR_MIN_VERSION_DECIMAL @RAPTOR_MIN_VERSION_DECIMAL@ #cmakedefine HAVE_ERRNO_H #cmakedefine HAVE_FCNTL_H #cmakedefine HAVE_GETOPT_H #cmakedefine HAVE_LIMITS_H #cmakedefine HAVE_MATH_H #cmakedefine HAVE_SETJMP_H #cmakedefine HAVE_STDDEF_H #cmakedefine HAVE_STDLIB_H #cmakedefine HAVE_STRING_H #cmakedefine HAVE_UNISTD_H #cmakedefine HAVE_SYS_PARAM_H #cmakedefine HAVE_SYS_STAT_H #cmakedefine HAVE_SYS_STAT_H #cmakedefine HAVE_SYS_TIME_H #cmakedefine TIME_WITH_SYS_TIME #cmakedefine HAVE_ACCESS #cmakedefine HAVE__ACCESS #cmakedefine HAVE_GETOPT #cmakedefine HAVE_GETOPT_LONG #cmakedefine HAVE_GETTIMEOFDAY #cmakedefine HAVE_ISASCII #cmakedefine HAVE_SETJMP #cmakedefine HAVE_SNPRINTF #cmakedefine HAVE__SNPRINTF #cmakedefine HAVE_STAT #cmakedefine HAVE_STRCASECMP #cmakedefine HAVE_STRICMP #cmakedefine HAVE__STRICMP #cmakedefine HAVE_STRTOK_R #cmakedefine HAVE_VASPRINTF #cmakedefine HAVE_VSNPRINTF #cmakedefine HAVE__VSNPRINTF #define SIZEOF_UNSIGNED_CHAR @SIZEOF_UNSIGNED_CHAR@ #define SIZEOF_UNSIGNED_SHORT @SIZEOF_UNSIGNED_SHORT@ #define SIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@ #define SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@ #define SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@ #cmakedefine HAVE_XMLCTXTUSEOPTIONS #cmakedefine HAVE_XMLSAX2INTERNALSUBSET #cmakedefine RAPTOR_LIBXML_ENTITY_ETYPE #cmakedefine RAPTOR_LIBXML_ENTITY_NAME_LENGTH #cmakedefine RAPTOR_LIBXML_HTML_PARSE_NONET #cmakedefine RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET #cmakedefine RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED #cmakedefine RAPTOR_LIBXML_XML_PARSE_NONET #cmakedefine RAPTOR_STATIC #cmakedefine HAVE_RAPTOR_PARSE_DATE #define @RAPTOR_WWW_DEFINE@ #define @RAPTOR_XML_DEFINE@ #cmakedefine RAPTOR_XML_1_1 #cmakedefine RAPTOR_PARSER_RDFXML #cmakedefine RAPTOR_PARSER_NTRIPLES #cmakedefine RAPTOR_PARSER_TURTLE #cmakedefine RAPTOR_PARSER_TRIG #cmakedefine RAPTOR_PARSER_RSS #cmakedefine RAPTOR_PARSER_GRDDL #cmakedefine RAPTOR_PARSER_GUESS #cmakedefine RAPTOR_PARSER_RDFA #cmakedefine RAPTOR_PARSER_JSON #cmakedefine RAPTOR_PARSER_NQUADS #cmakedefine RAPTOR_SERIALIZER_RDFXML #cmakedefine RAPTOR_SERIALIZER_NTRIPLES #cmakedefine RAPTOR_SERIALIZER_RDFXML_ABBREV #cmakedefine RAPTOR_SERIALIZER_TURTLE #cmakedefine RAPTOR_SERIALIZER_RSS_1_0 #cmakedefine RAPTOR_SERIALIZER_ATOM #cmakedefine RAPTOR_SERIALIZER_DOT #cmakedefine RAPTOR_SERIALIZER_HTML #cmakedefine RAPTOR_SERIALIZER_JSON #cmakedefine RAPTOR_SERIALIZER_NQUADS #ifdef WIN32 # define WIN32_LEAN_AND_MEAN # define _CRT_NONSTDC_NO_DEPRECATE # define _CRT_SECURE_NO_DEPRECATE # ifdef _MSC_VER # if _MSC_VER >= 1300 # define __func__ __FUNCTION__ # else /* better than nothing */ # define raptor_str(s) #s # define __func__ "func@" __FILE__ ":" raptor_str(__LINE__) # endif # endif # define RAPTOR_INLINE __inline # define S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask)) # define S_ISDIR(mode) S_ISTYPE((mode), _S_IFDIR) # define S_ISREG(mode) S_ISTYPE((mode), _S_IFREG) /* Mode bits for access() */ # define R_OK 04 # define W_OK 02 # if !defined(HAVE_ACCESS) && defined(HAVE__ACCESS) # define access(p,m) _access(p,m) # endif # ifndef HAVE_STRCASECMP # if defined(HAVE__STRICMP) # define strcasecmp(a,b) _stricmp(a,b) # elif defined(HAVE_STRICMP) # define strcasecmp(a,b) stricmp(a,b) # endif # endif # if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF) # define snprintf _snprintf # endif # if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF) # define vsnprintf _vsnprintf # endif /* These prevent parsedate.c from declaring malloc() and free() */ # define YYMALLOC malloc # define YYFREE free #endif /* end raptor_config.h */ raptor2-2.0.15/src/raptor_rdfxml.c0000644000175000017500000034274112415611634013745 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rdfxml.c - Raptor RDF/XML Parser * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* Define these for far too much output */ #undef RAPTOR_DEBUG_VERBOSE #undef RAPTOR_DEBUG_CDATA /* Raptor structures */ typedef enum { /* Catch uninitialised state */ RAPTOR_STATE_INVALID = 0, /* Skipping current tree of elements - used to recover finding * illegal content, when parsling permissively. */ RAPTOR_STATE_SKIPPING, /* Not in RDF grammar yet - searching for a start element. * * This can be (goto NODE_ELEMENT_LIST) but since it is optional, * the start element can also be one of * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElementURIs * * If RDF content is assumed, go straight to OBJ */ RAPTOR_STATE_UNKNOWN, /* A list of node elements * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElementList */ RAPTOR_STATE_NODE_ELEMENT_LIST, /* Found an */ RAPTOR_STATE_DESCRIPTION, /* Found a property element * http://www.w3.org/TR/rdf-syntax-grammar/#propertyElt */ RAPTOR_STATE_PROPERTYELT, /* A property element that is an ordinal - rdf:li, rdf:_n */ RAPTOR_STATE_MEMBER_PROPERTYELT, /* Found a node element * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElement */ RAPTOR_STATE_NODE_ELEMENT, /* A property element with rdf:parseType="Literal" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeLiteralPropertyElt */ RAPTOR_STATE_PARSETYPE_LITERAL, /* A property element with rdf:parseType="Resource" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeResourcePropertyElt */ RAPTOR_STATE_PARSETYPE_RESOURCE, /* A property element with rdf:parseType="Collection" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeCollectionPropertyElt * * (This also handles daml:Collection) */ RAPTOR_STATE_PARSETYPE_COLLECTION, /* A property element with a rdf:parseType attribute and a value * not "Literal" or "Resource" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeOtherPropertyElt */ RAPTOR_STATE_PARSETYPE_OTHER, RAPTOR_STATE_PARSETYPE_LAST = RAPTOR_STATE_PARSETYPE_OTHER } raptor_state; static const char* const raptor_state_names[RAPTOR_STATE_PARSETYPE_LAST+2] = { "INVALID", "SKIPPING", "UNKNOWN", "nodeElementList", "propertyElt", "Description", "propertyElt", "memberPropertyElt", "nodeElement", "parseTypeLiteral", "parseTypeResource", "parseTypeCollection", "parseTypeOther" }; static const char * raptor_rdfxml_state_as_string(raptor_state state) { if(state < 1 || state > RAPTOR_STATE_PARSETYPE_LAST) state = (raptor_state)0; return raptor_state_names[(int)state]; } /* * raptor_rdfxml_check_propertyElement_name: * @name: rdf namespace term * * Check if an rdf namespace name is allowed to be used as a Node Element. * * Return value: < 0 if unknown rdf namespace term, 0 if known and not allowed, > 0 if known and allowed */ static int raptor_rdfxml_check_nodeElement_name(const char *name) { int i; if(*name == '_') return 1; for(i = 0; raptor_rdf_ns_terms_info[i].name; i++) if(!strcmp(raptor_rdf_ns_terms_info[i].name, name)) return raptor_rdf_ns_terms_info[i].allowed_as_nodeElement; return -1; } /* * raptor_rdfxml_check_propertyElement_name: * @name: rdf namespace term * * Check if an rdf namespace name is allowed to be used as a Property Element. * * Return value: < 0 if unknown rdf namespace term, 0 if known and not allowed, > 0 if known and allowed */ static int raptor_rdfxml_check_propertyElement_name(const char *name) { int i; if(*name == '_') return 1; for(i = 0; raptor_rdf_ns_terms_info[i].name; i++) if(!strcmp(raptor_rdf_ns_terms_info[i].name, (const char*)name)) return raptor_rdf_ns_terms_info[i].allowed_as_propertyElement; return -1; } static int raptor_rdfxml_check_propertyAttribute_name(const char *name) { int i; if(*name == '_') return 1; for(i = 0; raptor_rdf_ns_terms_info[i].name; i++) if(!strcmp(raptor_rdf_ns_terms_info[i].name, (const char*)name)) return raptor_rdf_ns_terms_info[i].allowed_as_propertyAttribute; return -1; } typedef enum { /* undetermined yet - whitespace is stored */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN, /* literal content - no elements, cdata allowed, whitespace significant * blah */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL, /* parseType literal content (WF XML) - all content preserved * blah */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL, /* top-level nodes - 0+ elements expected, no cdata, whitespace ignored, * any non-whitespace cdata is error * only used for or implict */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES, /* properties - 0+ elements expected, no cdata, whitespace ignored, * any non-whitespace cdata is error * blah blah */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES, /* property content - all content preserved * any content type changes when first non-whitespace found * ... */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT, /* resource URI given - no element, no cdata, whitespace ignored, * any non-whitespace cdata is error * * */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE, /* skipping content - all content is preserved * Used when skipping content for unknown parseType-s, * error recovery, some other reason */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED, /* parseType Collection - all content preserved * Parsing of this determined by RDF/XML (Revised) closed collection rules * ... */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION, /* Like above but handles "daml:collection" */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION, /* dummy for use in strings below */ RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST } raptor_rdfxml_element_content_type; static const struct { const char * name; int whitespace_significant; /* non-blank cdata */ int cdata_allowed; /* XML element content */ int element_allowed; /* Do RDF-specific processing? (property attributes, rdf: attributes, ...) */ int rdf_processing; } rdf_content_type_info[RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST]={ {"Unknown", 1, 1, 1, 0 }, {"Literal", 1, 1, 0, 0 }, {"XML Literal", 1, 1, 1, 0 }, {"Nodes", 0, 0, 1, 1 }, {"Properties", 0, 1, 1, 1 }, {"Property Content",1, 1, 1, 1 }, {"Resource", 0, 0, 0, 0 }, {"Preserved", 1, 1, 1, 0 }, {"Collection", 1, 1, 1, 1 }, {"DAML Collection", 1, 1, 1, 1 }, }; static const char * raptor_rdfxml_element_content_type_as_string(raptor_rdfxml_element_content_type type) { if(type >= RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST) return "INVALID"; return rdf_content_type_info[type].name; } /* * Raptor Element/attributes on stack */ struct raptor_rdfxml_element_s { raptor_world* world; raptor_xml_element *xml_element; /* NULL at bottom of stack */ struct raptor_rdfxml_element_s *parent; /* attributes declared in M&S */ const unsigned char * rdf_attr[RDF_NS_LAST + 1]; /* how many of above seen */ int rdf_attr_count; /* state that this production matches */ raptor_state state; /* how to handle the content inside this XML element */ raptor_rdfxml_element_content_type content_type; /* starting state for children of this element */ raptor_state child_state; /* starting content type for children of this element */ raptor_rdfxml_element_content_type child_content_type; /* Reified statement identifier */ raptor_term* reified; unsigned const char* reified_id; /* Bag identifier */ raptor_term* bag; int last_bag_ordinal; /* starts at 0, so first predicate is rdf:_1 */ /* Subject identifier (URI/anon ID), type, source * * When the XML element represents a node, this is the identifier */ raptor_term* subject; /* Predicate URI * * When the XML element represents a node or predicate, * this is the identifier of the predicate */ raptor_term* predicate; /* Object identifier (URI/anon ID), type, source * * When this XML element generates a statement that needs an object, * possibly from a child element, this is the identifier of the object */ raptor_term* object; /* URI of datatype of literal */ raptor_uri *object_literal_datatype; /* last ordinal used, so initialising to 0 works, emitting rdf:_1 first */ int last_ordinal; /* If this element's parseType is a Collection * this identifies the anon node of current tail of the collection(list). */ const unsigned char *tail_id; /* RDF/XML specific checks */ /* all cdata so far is whitespace */ unsigned int content_cdata_all_whitespace; }; typedef struct raptor_rdfxml_element_s raptor_rdfxml_element; #define RAPTOR_RDFXML_N_CONCEPTS 5 /* * Raptor parser object */ struct raptor_rdfxml_parser_s { raptor_sax2 *sax2; /* stack of elements - elements add after current_element */ raptor_rdfxml_element *root_element; raptor_rdfxml_element *current_element; raptor_uri* concepts[RAPTOR_RDFXML_N_CONCEPTS]; /* set of seen rdf:ID / rdf:bagID values (with in-scope base URI) */ raptor_id_set* id_set; void *xml_content; size_t xml_content_length; raptor_iostream* iostream; /* writer for building parseType="Literal" content */ raptor_xml_writer* xml_writer; }; /* static variables */ #define RAPTOR_DAML_NS_URI(rdf_xml_parser) rdf_xml_parser->concepts[0] #define RAPTOR_DAML_List_URI(rdf_xml_parser) rdf_xml_parser->concepts[1] #define RAPTOR_DAML_first_URI(rdf_xml_parser) rdf_xml_parser->concepts[2] #define RAPTOR_DAML_rest_URI(rdf_xml_parser) rdf_xml_parser->concepts[3] #define RAPTOR_DAML_nil_URI(rdf_xml_parser) rdf_xml_parser->concepts[4] /* RAPTOR_RDFXML_N_CONCEPTS defines size of array */ /* prototypes for element functions */ static raptor_rdfxml_element* raptor_rdfxml_element_pop(raptor_rdfxml_parser *rdf_parser); static void raptor_rdfxml_element_push(raptor_rdfxml_parser *rdf_parser, raptor_rdfxml_element* element); static int raptor_rdfxml_record_ID(raptor_parser *rdf_parser, raptor_rdfxml_element *element, const unsigned char *id); /* prototypes for grammar functions */ static void raptor_rdfxml_start_element_grammar(raptor_parser *parser, raptor_rdfxml_element *element); static void raptor_rdfxml_end_element_grammar(raptor_parser *parser, raptor_rdfxml_element *element); static void raptor_rdfxml_cdata_grammar(raptor_parser *parser, const unsigned char *s, int len, int is_cdata); /* prototype for statement related functions */ static void raptor_rdfxml_generate_statement(raptor_parser *rdf_parser, raptor_term *subject, raptor_uri *predicate_uri, raptor_term *object, raptor_term *reified, raptor_rdfxml_element *bag_element); /* Prototypes for parsing data functions */ static int raptor_rdfxml_parse_init(raptor_parser* rdf_parser, const char *name); static void raptor_rdfxml_parse_terminate(raptor_parser *rdf_parser); static int raptor_rdfxml_parse_start(raptor_parser* rdf_parser); static int raptor_rdfxml_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end); static void raptor_rdfxml_update_document_locator(raptor_parser *rdf_parser); static raptor_uri* raptor_rdfxml_inscope_base_uri(raptor_parser *rdf_parser); static raptor_rdfxml_element* raptor_rdfxml_element_pop(raptor_rdfxml_parser *rdf_xml_parser) { raptor_rdfxml_element *element = rdf_xml_parser->current_element; if(!element) return NULL; rdf_xml_parser->current_element = element->parent; if(rdf_xml_parser->root_element == element) /* just deleted root */ rdf_xml_parser->root_element = NULL; return element; } static void raptor_rdfxml_element_push(raptor_rdfxml_parser *rdf_xml_parser, raptor_rdfxml_element* element) { element->parent = rdf_xml_parser->current_element; rdf_xml_parser->current_element = element; if(!rdf_xml_parser->root_element) rdf_xml_parser->root_element = element; } static void raptor_free_rdfxml_element(raptor_rdfxml_element *element) { int i; /* Free special RDF M&S attributes */ for(i = 0; i <= RDF_NS_LAST; i++) if(element->rdf_attr[i]) RAPTOR_FREE(char*, element->rdf_attr[i]); if(element->subject) raptor_free_term(element->subject); if(element->predicate) raptor_free_term(element->predicate); if(element->object) raptor_free_term(element->object); if(element->bag) raptor_free_term(element->bag); if(element->reified) raptor_free_term(element->reified); if(element->tail_id) RAPTOR_FREE(char*, (char*)element->tail_id); if(element->object_literal_datatype) raptor_free_uri(element->object_literal_datatype); if(element->reified_id) RAPTOR_FREE(char*, (char*)element->reified_id); RAPTOR_FREE(raptor_rdfxml_element, element); } static void raptor_rdfxml_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace) { raptor_parser* rdf_parser; const unsigned char* namespace_name; size_t namespace_name_len; raptor_uri* uri = raptor_namespace_get_uri(nspace); rdf_parser = (raptor_parser*)user_data; raptor_parser_start_namespace(rdf_parser, nspace); if(!uri) return; namespace_name = raptor_uri_as_counted_string(uri, &namespace_name_len); if(namespace_name_len == raptor_rdf_namespace_uri_len-1 && !strncmp((const char*)namespace_name, (const char*)raptor_rdf_namespace_uri, namespace_name_len)) { const unsigned char *prefix = raptor_namespace_get_prefix(nspace); raptor_parser_warning(rdf_parser, "Declaring a namespace with prefix %s to URI %s - one letter short of the RDF namespace URI and probably a mistake.", prefix, namespace_name); } if(namespace_name_len > raptor_rdf_namespace_uri_len && !strncmp((const char*)namespace_name, (const char*)raptor_rdf_namespace_uri, raptor_rdf_namespace_uri_len)) { raptor_parser_error(rdf_parser, "Declaring a namespace URI %s to which the RDF namespace URI is a prefix is forbidden.", namespace_name); } } static void raptor_rdfxml_start_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser* rdf_parser; raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; int ns_attributes_count = 0; raptor_qname** named_attrs = NULL; int i; int count_bumped = 0; rdf_parser = (raptor_parser*)user_data; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; if(rdf_parser->failed) return; raptor_rdfxml_update_document_locator(rdf_parser); /* Create new element structure */ element = RAPTOR_CALLOC(raptor_rdfxml_element*, 1, sizeof(*element)); if(!element) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); rdf_parser->failed = 1; return; } element->world = rdf_parser->world; element->xml_element = xml_element; raptor_rdfxml_element_push(rdf_xml_parser, element); named_attrs = raptor_xml_element_get_attributes(xml_element); ns_attributes_count = raptor_xml_element_get_attributes_count(xml_element); /* RDF-specific processing of attributes */ if(ns_attributes_count) { raptor_qname** new_named_attrs; int offset = 0; raptor_rdfxml_element* parent_element; parent_element = element->parent; /* Allocate new array to move namespaced-attributes to if * rdf processing is performed */ new_named_attrs = RAPTOR_CALLOC(raptor_qname**, ns_attributes_count, sizeof(raptor_qname*)); if(!new_named_attrs) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); rdf_parser->failed = 1; return; } for(i = 0; i < ns_attributes_count; i++) { raptor_qname* attr = named_attrs[i]; /* If: * 1 We are handling RDF content and RDF processing is allowed on * this element * OR * 2 We are not handling RDF content and * this element is at the top level (top level Desc. / typedNode) * i.e. we have no parent * then handle the RDF attributes */ if((parent_element && rdf_content_type_info[parent_element->child_content_type].rdf_processing) || !parent_element) { /* Save pointers to some RDF M&S attributes */ /* If RDF namespace-prefixed attributes */ if(attr->nspace && attr->nspace->is_rdf_ms) { const unsigned char *attr_name = attr->local_name; int j; for(j = 0; j <= RDF_NS_LAST; j++) if(!strcmp((const char*)attr_name, raptor_rdf_ns_terms_info[j].name)) { element->rdf_attr[j] = attr->value; element->rdf_attr_count++; /* Delete it if it was stored elsewhere */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Found RDF namespace attribute '%s' URI %s\n", (char*)attr_name, attr->value); #endif /* make sure value isn't deleted from qname structure */ attr->value = NULL; raptor_free_qname(attr); attr = NULL; break; } } /* end if RDF namespaced-prefixed attributes */ if(!attr) continue; /* If non namespace-prefixed RDF attributes found on an element */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES) && !attr->nspace) { const unsigned char *attr_name = attr->local_name; int j; for(j = 0; j <= RDF_NS_LAST; j++) if(!strcmp((const char*)attr_name, raptor_rdf_ns_terms_info[j].name)) { element->rdf_attr[j] = attr->value; element->rdf_attr_count++; if(!raptor_rdf_ns_terms_info[j].allowed_unprefixed_on_attribute) raptor_parser_warning(rdf_parser, "Using rdf attribute '%s' without the RDF namespace has been deprecated.", attr_name); /* Delete it if it was stored elsewhere */ /* make sure value isn't deleted from qname structure */ attr->value = NULL; raptor_free_qname(attr); attr = NULL; break; } } /* end if non-namespace prefixed RDF attributes */ if(!attr) continue; } /* end if leave literal XML alone */ if(attr) new_named_attrs[offset++] = attr; } /* new attribute count is set from attributes that haven't been skipped */ ns_attributes_count = offset; if(!ns_attributes_count) { /* all attributes were deleted so delete the new array */ RAPTOR_FREE(raptor_qname_array, new_named_attrs); new_named_attrs = NULL; } RAPTOR_FREE(raptor_qname_array, named_attrs); named_attrs = new_named_attrs; raptor_xml_element_set_attributes(xml_element, named_attrs, ns_attributes_count); } /* end if ns_attributes_count */ /* start from unknown; if we have a parent, it may set this */ element->state = RAPTOR_STATE_UNKNOWN; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN; if(element->parent && element->parent->child_content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN) { element->content_type = element->parent->child_content_type; if(element->parent->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE && element->content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION && element->content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { raptor_qname* parent_el_name; parent_el_name = raptor_xml_element_get_name(element->parent->xml_element); /* If parent has an rdf:resource, this element should not be here */ raptor_parser_error(rdf_parser, "property element '%s' has multiple object node elements, skipping.", parent_el_name->local_name); element->state = RAPTOR_STATE_SKIPPING; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; } else { if(!element->parent->child_state) { raptor_parser_fatal_error(rdf_parser, "%s: Internal error: no parent element child_state set", __FUNCTION__); return; } element->state = element->parent->child_state; element->parent->xml_element->content_element_seen++; count_bumped++; /* leave literal XML alone */ if(!rdf_content_type_info[element->content_type].cdata_allowed) { if(element->parent->xml_element->content_element_seen && element->parent->xml_element->content_cdata_seen) { raptor_qname* parent_el_name; parent_el_name = raptor_xml_element_get_name(element->parent->xml_element); /* Uh oh - mixed content, the parent element has cdata too */ raptor_parser_warning(rdf_parser, "element '%s' has mixed content.", parent_el_name->local_name); } /* If there is some existing all-whitespace content cdata * before this node element, delete it */ if(element->parent->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES && element->parent->xml_element->content_element_seen && element->parent->content_cdata_all_whitespace && element->parent->xml_element->content_cdata_length) { element->parent->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; raptor_free_stringbuffer(element->parent->xml_element->content_cdata_sb); element->parent->xml_element->content_cdata_sb = NULL; element->parent->xml_element->content_cdata_length = 0; } } /* end if leave literal XML alone */ } /* end if parent has no rdf:resource */ } /* end if element->parent */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Using content type %s\n", rdf_content_type_info[element->content_type].name); fprintf(stderr, "raptor_rdfxml_start_element_handler: Start ns-element: "); raptor_print_xml_element(xml_element, stderr); #endif /* Check for non namespaced stuff when not in a parseType literal, other */ if(rdf_content_type_info[element->content_type].rdf_processing) { const raptor_namespace* ns; ns = raptor_xml_element_get_name(xml_element)->nspace; /* The element */ /* If has no namespace or the namespace has no name (xmlns="") */ if((!ns || (ns && !raptor_namespace_get_uri(ns))) && element->parent) { raptor_qname* parent_el_name; parent_el_name = raptor_xml_element_get_name(element->parent->xml_element); raptor_parser_error(rdf_parser, "Using an element '%s' without a namespace is forbidden.", parent_el_name->local_name); element->state = RAPTOR_STATE_SKIPPING; /* Remove count above so that parent thinks this is empty */ if(count_bumped) element->parent->xml_element->content_element_seen--; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; } /* Check for any remaining non-namespaced attributes */ if(named_attrs) { for(i = 0; i < ns_attributes_count; i++) { raptor_qname *attr = named_attrs[i]; /* Check if any attributes are non-namespaced */ if(!attr->nspace || (attr->nspace && !raptor_namespace_get_uri(attr->nspace))) { raptor_parser_error(rdf_parser, "Using an attribute '%s' without a namespace is forbidden.", attr->local_name); raptor_free_qname(attr); named_attrs[i] = NULL; } } } } if(element->rdf_attr[RDF_NS_aboutEach] || element->rdf_attr[RDF_NS_aboutEachPrefix]) { raptor_parser_warning(rdf_parser, "element '%s' has aboutEach / aboutEachPrefix, skipping.", raptor_xml_element_get_name(xml_element)->local_name); element->state = RAPTOR_STATE_SKIPPING; /* Remove count above so that parent thinks this is empty */ if(count_bumped) element->parent->xml_element->content_element_seen--; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; } /* Right, now ready to enter the grammar */ raptor_rdfxml_start_element_grammar(rdf_parser, element); return; } static void raptor_rdfxml_end_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser* rdf_parser; raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; rdf_parser = (raptor_parser*)user_data; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; if(!rdf_parser->failed) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_rdfxml_end_element_grammar(rdf_parser, rdf_xml_parser->current_element); } element = raptor_rdfxml_element_pop(rdf_xml_parser); if(element) { if(element->parent) { /* Do not change this; PROPERTYELT will turn into MEMBER if necessary * See the switch case for MEMBER / PROPERTYELT where the test is done. * * PARSETYPE_RESOURCE should never be propogated up since it * will turn the next child (node) element into a property */ if(element->state != RAPTOR_STATE_MEMBER_PROPERTYELT && element->state != RAPTOR_STATE_PARSETYPE_RESOURCE) element->parent->child_state = element->state; } raptor_free_rdfxml_element(element); } } /* cdata (and ignorable whitespace for libxml). * s 0 terminated is for libxml */ static void raptor_rdfxml_characters_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_rdfxml_cdata_grammar(rdf_parser, s, len, 0); } /* cdata (and ignorable whitespace for libxml). * s is 0 terminated for libxml2 */ static void raptor_rdfxml_cdata_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_rdfxml_cdata_grammar(rdf_parser, s, len, 1); } /* comment handler * s is 0 terminated */ static void raptor_rdfxml_comment_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s) { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; if(rdf_parser->failed || !xml_element) return; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; element = rdf_xml_parser->current_element; if(element) { if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL) raptor_xml_writer_comment(rdf_xml_parser->xml_writer, s); } #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("XML Comment '%s'\n", s); #endif } static const unsigned char* const daml_namespace_uri_string = (const unsigned char*)"http://www.daml.org/2001/03/daml+oil#"; static const int daml_namespace_uri_string_len = 37; static int raptor_rdfxml_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_rdfxml_parser* rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; raptor_sax2* sax2; raptor_world* world = rdf_parser->world; /* Allocate sax2 object */ sax2 = raptor_new_sax2(rdf_parser->world, &rdf_parser->locator, rdf_parser); rdf_xml_parser->sax2 = sax2; if(!sax2) return 1; /* Initialize sax2 element handlers */ raptor_sax2_set_start_element_handler(sax2, raptor_rdfxml_start_element_handler); raptor_sax2_set_end_element_handler(sax2, raptor_rdfxml_end_element_handler); raptor_sax2_set_characters_handler(sax2, raptor_rdfxml_characters_handler); raptor_sax2_set_cdata_handler(sax2, raptor_rdfxml_cdata_handler); raptor_sax2_set_comment_handler(sax2, raptor_rdfxml_comment_handler); raptor_sax2_set_namespace_handler(sax2, raptor_rdfxml_sax2_new_namespace_handler); /* Allocate uris */ RAPTOR_DAML_NS_URI(rdf_xml_parser) = raptor_new_uri_from_counted_string(world, daml_namespace_uri_string, daml_namespace_uri_string_len); RAPTOR_DAML_List_URI(rdf_xml_parser) = raptor_new_uri_from_uri_local_name(world, RAPTOR_DAML_NS_URI(rdf_xml_parser), (const unsigned char *)"List"); RAPTOR_DAML_first_URI(rdf_xml_parser) = raptor_new_uri_from_uri_local_name(world, RAPTOR_DAML_NS_URI(rdf_xml_parser) ,(const unsigned char *)"first"); RAPTOR_DAML_rest_URI(rdf_xml_parser) = raptor_new_uri_from_uri_local_name(world, RAPTOR_DAML_NS_URI(rdf_xml_parser), (const unsigned char *)"rest"); RAPTOR_DAML_nil_URI(rdf_xml_parser) = raptor_new_uri_from_uri_local_name(world, RAPTOR_DAML_NS_URI(rdf_xml_parser), (const unsigned char *)"nil"); /* Check for uri allocation failures */ if(!RAPTOR_DAML_NS_URI(rdf_xml_parser) || !RAPTOR_DAML_List_URI(rdf_xml_parser) || !RAPTOR_DAML_first_URI(rdf_xml_parser) || !RAPTOR_DAML_rest_URI(rdf_xml_parser) || !RAPTOR_DAML_nil_URI(rdf_xml_parser)) return 1; /* Everything succeeded */ return 0; } static int raptor_rdfxml_parse_start(raptor_parser* rdf_parser) { raptor_uri *uri = rdf_parser->base_uri; raptor_rdfxml_parser* rdf_xml_parser; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; /* base URI required for RDF/XML */ if(!uri) return 1; /* Optionally normalize language to lowercase * http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier */ raptor_sax2_set_option(rdf_xml_parser->sax2, RAPTOR_OPTION_NORMALIZE_LANGUAGE, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NORMALIZE_LANGUAGE)); /* Optionally forbid internal network and file requests in the XML parser */ raptor_sax2_set_option(rdf_xml_parser->sax2, RAPTOR_OPTION_NO_NET, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)); raptor_sax2_set_option(rdf_xml_parser->sax2, RAPTOR_OPTION_NO_FILE, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_FILE)); raptor_sax2_set_option(rdf_xml_parser->sax2, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES)); if(rdf_parser->uri_filter) raptor_sax2_set_uri_filter(rdf_xml_parser->sax2, rdf_parser->uri_filter, rdf_parser->uri_filter_user_data); raptor_sax2_parse_start(rdf_xml_parser->sax2, uri); /* Delete any existing id_set */ if(rdf_xml_parser->id_set) { raptor_free_id_set(rdf_xml_parser->id_set); rdf_xml_parser->id_set = NULL; } /* Create a new id_set if needed */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_CHECK_RDF_ID)) { rdf_xml_parser->id_set = raptor_new_id_set(rdf_parser->world); if(!rdf_xml_parser->id_set) return 1; } return 0; } static void raptor_rdfxml_parse_terminate(raptor_parser *rdf_parser) { raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; int i; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; if(rdf_xml_parser->sax2) { raptor_free_sax2(rdf_xml_parser->sax2); rdf_xml_parser->sax2 = NULL; } while( (element = raptor_rdfxml_element_pop(rdf_xml_parser)) ) raptor_free_rdfxml_element(element); for(i = 0; i < RAPTOR_RDFXML_N_CONCEPTS; i++) { raptor_uri* concept_uri = rdf_xml_parser->concepts[i]; if(concept_uri) { raptor_free_uri(concept_uri); rdf_xml_parser->concepts[i] = NULL; } } if(rdf_xml_parser->id_set) { raptor_free_id_set(rdf_xml_parser->id_set); rdf_xml_parser->id_set = NULL; } if (rdf_xml_parser->xml_writer) { raptor_free_xml_writer(rdf_xml_parser->xml_writer); rdf_xml_parser->xml_writer = NULL; } if (rdf_xml_parser->iostream) { raptor_free_iostream(rdf_xml_parser->iostream); rdf_xml_parser->iostream = NULL; } if (rdf_xml_parser->xml_content) { RAPTOR_FREE(char*, rdf_xml_parser->xml_content); rdf_xml_parser->xml_content = NULL; rdf_xml_parser->xml_content_length = 0; } } static int raptor_rdfxml_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; if(suffix) { if(!strcmp((const char*)suffix, "rdf") || !strcmp((const char*)suffix, "rdfs") || !strcmp((const char*)suffix, "foaf") || !strcmp((const char*)suffix, "doap") || !strcmp((const char*)suffix, "owl") || !strcmp((const char*)suffix, "daml")) score = 9; if(!strcmp((const char*)suffix, "rss")) score = 3; } if(identifier) { if(strstr((const char*)identifier, "rss1")) score += 5; else if(!suffix && strstr((const char*)identifier, "rss")) score += 3; else if(!suffix && strstr((const char*)identifier, "rdf")) score += 2; else if(!suffix && strstr((const char*)identifier, "RDF")) score += 2; } if(mime_type) { if(strstr((const char*)mime_type, "html")) score -= 4; else if(!strcmp((const char*)mime_type, "text/rdf")) score += 7; else if(!strcmp((const char*)mime_type, "application/xml")) score += 5; } if(buffer && len) { /* Check it's an XML namespace declared and not N3 or Turtle which * mention the namespace URI but not in this form. */ #define HAS_RDF_XMLNS1 (raptor_memstr((const char*)buffer, len, "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_XMLNS2 (raptor_memstr((const char*)buffer, len, "xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_XMLNS3 (raptor_memstr((const char*)buffer, len, "xmlns=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_XMLNS4 (raptor_memstr((const char*)buffer, len, "xmlns='http://www.w3.org/1999/02/22-rdf-syntax-ns#") != NULL) #define HAS_RDF_ENTITY1 (raptor_memstr((const char*)buffer, len, "!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'") != NULL) #define HAS_RDF_ENTITY2 (raptor_memstr((const char*)buffer, len, "!ENTITY rdf \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"") != NULL) #define HAS_RDF_ENTITY3 (raptor_memstr((const char*)buffer, len, "xmlns:rdf=\"&rdf;\"") != NULL) #define HAS_RDF_ENTITY4 (raptor_memstr((const char*)buffer, len, "xmlns:rdf='&rdf;'") != NULL) #define HAS_HTML_NS (raptor_memstr((const char*)buffer, len, "http://www.w3.org/1999/xhtml") != NULL) #define HAS_HTML_ROOT (raptor_memstr((const char*)buffer, len, "context; if(rdf_parser->failed) return 1; rc = raptor_sax2_parse_chunk(rdf_xml_parser->sax2, buffer, len, is_end); if(is_end) { if(rdf_parser->emitted_default_graph) { raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } } return rc; } static void raptor_rdfxml_generate_statement(raptor_parser *rdf_parser, raptor_term *subject_term, raptor_uri *predicate_uri, raptor_term *object_term, raptor_term *reified_term, raptor_rdfxml_element* bag_element) { raptor_statement *statement = &rdf_parser->statement; raptor_term* predicate_term = NULL; int free_reified_term = 0; if(rdf_parser->failed) return; #ifdef RAPTOR_DEBUG_VERBOSE if(!subject_term) RAPTOR_FATAL1("Statement has no subject\n"); if(!predicate_uri) RAPTOR_FATAL1("Statement has no predicate\n"); if(!object_term) RAPTOR_FATAL1("Statement has no object\n"); #endif predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri); if(!predicate_term) return; statement->subject = subject_term; statement->predicate = predicate_term; statement->object = object_term; #ifdef RAPTOR_DEBUG_VERBOSE fprintf(stderr, "raptor_rdfxml_generate_statement: Generating statement: "); raptor_statement_print(statement, stderr); fputc('\n', stderr); #endif if(!rdf_parser->emitted_default_graph) { raptor_parser_start_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph++; } if(!rdf_parser->statement_handler) goto generate_tidy; /* Generate the statement; or is it a fact? */ (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); /* the bagID mess */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID) && bag_element && bag_element->bag) { raptor_term* bag = bag_element->bag; raptor_uri* bag_predicate_uri = NULL; raptor_term* bag_predicate_term = NULL; statement->subject = bag; bag_element->last_bag_ordinal++; /* new URI object */ bag_predicate_uri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world, bag_element->last_bag_ordinal); if(!bag_predicate_uri) goto generate_tidy; bag_predicate_term = raptor_new_term_from_uri(rdf_parser->world, bag_predicate_uri); raptor_free_uri(bag_predicate_uri); if(!bag_predicate_term) goto generate_tidy; statement->predicate = bag_predicate_term; if(!reified_term || !reified_term->value.blank.string) { unsigned char *reified_id = NULL; /* reified_term is NULL so generate a bag ID */ reified_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!reified_id) goto generate_tidy; reified_term = raptor_new_term_from_blank(rdf_parser->world, reified_id); RAPTOR_FREE(char*, reified_id); if(!reified_term) goto generate_tidy; free_reified_term = 1; } statement->object = reified_term; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); if(bag_predicate_term) raptor_free_term(bag_predicate_term); } /* return if is there no reified ID (that is valid) */ if(!reified_term || !reified_term->value.blank.string) goto generate_tidy; /* otherwise generate reified statements */ statement->subject = reified_term; statement->predicate = RAPTOR_RDF_type_term(rdf_parser->world); statement->object = RAPTOR_RDF_Statement_term(rdf_parser->world); (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); /* statement->subject = reified_term; */ statement->predicate = RAPTOR_RDF_subject_term(rdf_parser->world); statement->object = subject_term; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); /* statement->subject = reified_term; */ statement->predicate = RAPTOR_RDF_predicate_term(rdf_parser->world); statement->object = predicate_term; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); /* statement->subject = reified_term; */ statement->predicate = RAPTOR_RDF_object_term(rdf_parser->world); statement->object = object_term; (*rdf_parser->statement_handler)(rdf_parser->user_data, statement); generate_tidy: /* Tidy up things allocated here */ if(predicate_term) raptor_free_term(predicate_term); if(free_reified_term && reified_term) raptor_free_term(reified_term); } /** * raptor_rdfxml_element_has_property_attributes: * @element: element with the property attributes * * Return true if the element has at least one property attribute. * **/ static int raptor_rdfxml_element_has_property_attributes(raptor_rdfxml_element *element) { int i; if(element->xml_element->attribute_count > 0) return 1; /* look for rdf: properties */ for(i = 0; i <= RDF_NS_LAST; i++) { if(element->rdf_attr[i] && raptor_rdf_ns_terms_info[i].type != RAPTOR_TERM_TYPE_UNKNOWN) return 1; } return 0; } /** * raptor_rdfxml_process_property_attributes: * @rdf_parser: Raptor parser object * @attributes_element: element with the property attributes * @resource_element: element that defines the resource URI * subject->value etc. * @property_node_identifier: Use this identifier for the resource URI * and count any ordinals for it locally * * Process the property attributes for an element for a given resource. * **/ static int raptor_rdfxml_process_property_attributes(raptor_parser *rdf_parser, raptor_rdfxml_element *attributes_element, raptor_rdfxml_element *resource_element, raptor_term *property_node_identifier) { unsigned int i; raptor_term *resource_identifier; resource_identifier = property_node_identifier ? property_node_identifier : resource_element->subject; /* Process attributes as propAttr* = * (propName="string")* */ for(i = 0; i < attributes_element->xml_element->attribute_count; i++) { raptor_qname* attr = attributes_element->xml_element->attributes[i]; const unsigned char *name; const unsigned char *value; int handled = 0; if(!attr) continue; name = attr->local_name; value = attr->value; if(!attr->nspace) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Using property attribute '%s' without a namespace is forbidden.", name); continue; } if(!raptor_unicode_check_utf8_nfc_string(value, strlen((const char*)value), NULL)) { const char *message; message = "Property attribute '%s' has a string not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NON_NFC_FATAL)) raptor_parser_error(rdf_parser, message, name, value); else raptor_parser_warning(rdf_parser, message, name, value); continue; } /* Generate the property statement using one of these properties: * 1) rdf:_n * 2) the URI from the rdf:* attribute where allowed * 3) otherwise forbidden (including rdf:li) */ if(attr->nspace->is_rdf_ms) { /* is rdf: namespace */ if(*name == '_') { int ordinal; /* recognise rdf:_ */ name++; ordinal = raptor_check_ordinal(name); if(ordinal < 1) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Illegal ordinal value %d in property attribute '%s' seen on containing element '%s'.", ordinal, attr->local_name, name); } } else { int rc; raptor_rdfxml_update_document_locator(rdf_parser); rc = raptor_rdfxml_check_propertyAttribute_name((const char*)name); if(!rc) raptor_parser_error(rdf_parser, "RDF term %s is forbidden as a property attribute.", name); else if(rc < 0) raptor_parser_warning(rdf_parser, "Unknown RDF namespace property attribute '%s'.", name); } } /* end is RDF namespace property */ if(!handled) { raptor_term* object_term; object_term = raptor_new_term_from_literal(rdf_parser->world, (unsigned char*)value, NULL, NULL); /* else not rdf: namespace or unknown in rdf: namespace so * generate a statement with a literal object */ raptor_rdfxml_generate_statement(rdf_parser, resource_identifier, attr->uri, object_term, NULL, /* Property attributes are never reified*/ resource_element); raptor_free_term(object_term); } } /* end for ... attributes */ /* Handle rdf property attributes * (only rdf:type and rdf:value at present) */ for(i = 0; i <= RDF_NS_LAST; i++) { const unsigned char *value = attributes_element->rdf_attr[i]; size_t value_len; int object_is_literal; raptor_uri *property_uri; raptor_term* object_term; if(!value) continue; value_len = strlen((const char*)value); object_is_literal = (raptor_rdf_ns_terms_info[i].type == RAPTOR_TERM_TYPE_LITERAL); if(raptor_rdf_ns_terms_info[i].type == RAPTOR_TERM_TYPE_UNKNOWN) { const char *name = raptor_rdf_ns_terms_info[i].name; int rc = raptor_rdfxml_check_propertyAttribute_name(name); if(!rc) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "RDF term %s is forbidden as a property attribute.", name); continue; } else if(rc < 0) raptor_parser_warning(rdf_parser, "Unknown RDF namespace property attribute '%s'.", name); } if(object_is_literal && !raptor_unicode_check_utf8_nfc_string(value, value_len, NULL)) { const char *message; message = "Property attribute '%s' has a string not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NON_NFC_FATAL)) raptor_parser_error(rdf_parser, message, raptor_rdf_ns_terms_info[i].name, value); else raptor_parser_warning(rdf_parser, message, raptor_rdf_ns_terms_info[i].name, value); continue; } property_uri = raptor_new_uri_for_rdf_concept(rdf_parser->world, (const unsigned char*)raptor_rdf_ns_terms_info[i].name); if(object_is_literal) { object_term = raptor_new_term_from_literal(rdf_parser->world, (unsigned char*)value, NULL, NULL); } else { raptor_uri *base_uri; raptor_uri *object_uri; base_uri = raptor_rdfxml_inscope_base_uri(rdf_parser); object_uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, value); object_term = raptor_new_term_from_uri(rdf_parser->world, object_uri); raptor_free_uri(object_uri); } raptor_rdfxml_generate_statement(rdf_parser, resource_identifier, property_uri, object_term, NULL, /* Property attributes are never reified*/ resource_element); raptor_free_term(object_term); raptor_free_uri(property_uri); } /* end for rdf:property values */ return 0; } static void raptor_rdfxml_start_element_grammar(raptor_parser *rdf_parser, raptor_rdfxml_element *element) { raptor_rdfxml_parser *rdf_xml_parser; int finished; raptor_state state; raptor_xml_element* xml_element; raptor_qname* el_qname; const unsigned char *el_name; int element_in_rdf_ns; int rc = 0; raptor_uri* base_uri; raptor_uri* element_name_uri; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; xml_element = element->xml_element; el_qname = raptor_xml_element_get_name(xml_element); el_name = el_qname->local_name; element_in_rdf_ns = (el_qname->nspace && el_qname->nspace->is_rdf_ms); base_uri = raptor_rdfxml_inscope_base_uri(rdf_parser); element_name_uri = el_qname->uri; state = element->state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Starting in state %s\n", raptor_rdfxml_state_as_string(state)); #endif finished = 0; while(!finished) { switch(state) { case RAPTOR_STATE_SKIPPING: element->child_state = state; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED; finished = 1; break; case RAPTOR_STATE_UNKNOWN: /* found ? */ if(element_in_rdf_ns) { if(raptor_uri_equals(element_name_uri, RAPTOR_RDF_RDF_URI(rdf_parser->world))) { element->child_state = RAPTOR_STATE_NODE_ELEMENT_LIST; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES; /* Yes - need more content before can continue, * so wait for another element */ finished = 1; break; } if(raptor_uri_equals(element_name_uri, RAPTOR_RDF_Description_URI(rdf_parser->world))) { state = RAPTOR_STATE_DESCRIPTION; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; /* Yes - found something so move immediately to description */ break; } if(element_in_rdf_ns) { rc = raptor_rdfxml_check_nodeElement_name((const char*)el_name); if(!rc) { raptor_parser_error(rdf_parser, "rdf:%s is forbidden as a node element.", el_name); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } else if(rc < 0) { raptor_parser_warning(rdf_parser, "rdf:%s is an unknown RDF namespaced element.", el_name); } } } /* If scanning for element, can continue */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_SCANNING)) { finished = 1; break; } /* Otherwise the choice of the next state can be made * from the current element by the OBJ state */ state = RAPTOR_STATE_NODE_ELEMENT_LIST; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES; break; case RAPTOR_STATE_NODE_ELEMENT_LIST: /* Handling * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElementList * * Everything goes to nodeElement */ state = RAPTOR_STATE_NODE_ELEMENT; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; break; case RAPTOR_STATE_DESCRIPTION: case RAPTOR_STATE_NODE_ELEMENT: case RAPTOR_STATE_PARSETYPE_RESOURCE: case RAPTOR_STATE_PARSETYPE_COLLECTION: /* Handling or other node element * http://www.w3.org/TR/rdf-syntax-grammar/#nodeElement * * or a property element acting as a node element for * rdf:parseType="Resource" * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeResourcePropertyElt * or rdf:parseType="Collection" (and daml:Collection) * http://www.w3.org/TR/rdf-syntax-grammar/#parseTypeCollectionPropertyElt * * Only create a bag if bagID given */ if(!element_name_uri) { /* We cannot handle this */ raptor_parser_warning(rdf_parser, "Using node element '%s' without a namespace is forbidden.", el_qname->local_name); raptor_rdfxml_update_document_locator(rdf_parser); element->state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } if(element_in_rdf_ns) { rc = raptor_rdfxml_check_nodeElement_name((const char*)el_name); if(!rc) { raptor_parser_error(rdf_parser, "rdf:%s is forbidden as a node element.", el_name); state = RAPTOR_STATE_SKIPPING; element->state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } else if(rc < 0) { raptor_parser_warning(rdf_parser, "rdf:%s is an unknown RDF namespaced element.", el_name); } } if(element->content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION && element->content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION && element->parent && (element->parent->state == RAPTOR_STATE_PROPERTYELT || element->parent->state == RAPTOR_STATE_MEMBER_PROPERTYELT) && element->parent->xml_element->content_element_seen > 1) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "The enclosing property already has an object"); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } if(state == RAPTOR_STATE_NODE_ELEMENT || state == RAPTOR_STATE_DESCRIPTION || state == RAPTOR_STATE_PARSETYPE_COLLECTION) { if(element_in_rdf_ns && raptor_uri_equals(element_name_uri, RAPTOR_RDF_Description_URI(rdf_parser->world))) state = RAPTOR_STATE_DESCRIPTION; else state = RAPTOR_STATE_NODE_ELEMENT; } if((element->rdf_attr[RDF_NS_ID]!=NULL) + (element->rdf_attr[RDF_NS_about]!=NULL) + (element->rdf_attr[RDF_NS_nodeID]!=NULL) > 1) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Multiple attributes of rdf:ID, rdf:about and rdf:nodeID on element '%s' - only one allowed.", el_name); } if(element->rdf_attr[RDF_NS_ID]) { unsigned char* subject_id; raptor_uri* subject_uri; subject_id = (unsigned char*)element->rdf_attr[RDF_NS_ID]; if(!raptor_valid_xml_ID(rdf_parser, subject_id)) { raptor_parser_error(rdf_parser, "Illegal rdf:ID value '%s'", subject_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } if(raptor_rdfxml_record_ID(rdf_parser, element, subject_id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:ID value '%s'", subject_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } /* after this, subject_id is the owner of the ID string */ element->rdf_attr[RDF_NS_ID] = NULL; subject_uri = raptor_new_uri_from_id(rdf_parser->world, base_uri, subject_id); RAPTOR_FREE(char*, subject_id); if(!subject_uri) goto oom; element->subject = raptor_new_term_from_uri(rdf_parser->world, subject_uri); raptor_free_uri(subject_uri); if(!element->subject) goto oom; } else if(element->rdf_attr[RDF_NS_about]) { raptor_uri* subject_uri; subject_uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, (const unsigned char*)element->rdf_attr[RDF_NS_about]); if(!subject_uri) goto oom; element->subject = raptor_new_term_from_uri(rdf_parser->world, subject_uri); raptor_free_uri(subject_uri); RAPTOR_FREE(char*, element->rdf_attr[RDF_NS_about]); element->rdf_attr[RDF_NS_about] = NULL; if(!element->subject) goto oom; } else if(element->rdf_attr[RDF_NS_nodeID]) { unsigned char* subject_id; subject_id = raptor_world_internal_generate_id(rdf_parser->world, (unsigned char*)element->rdf_attr[RDF_NS_nodeID]); if(!subject_id) goto oom; element->subject = raptor_new_term_from_blank(rdf_parser->world, subject_id); RAPTOR_FREE(char*, subject_id); element->rdf_attr[RDF_NS_nodeID] = NULL; if(!element->subject) goto oom; if(!raptor_valid_xml_ID(rdf_parser, element->subject->value.blank.string)) { raptor_parser_error(rdf_parser, "Illegal rdf:nodeID value '%s'", (const char*)element->subject->value.blank.string); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } } else if(element->parent && element->parent->child_content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION && element->parent->child_content_type != RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION && element->parent->object) { /* copy from parent (property element), it has a URI for us */ element->subject = raptor_term_copy(element->parent->object); } else { unsigned char* subject_id; subject_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!subject_id) goto oom; element->subject = raptor_new_term_from_blank(rdf_parser->world, subject_id); RAPTOR_FREE(char*, subject_id); if(!element->subject) goto oom; } if(element->rdf_attr[RDF_NS_bagID]) { if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID)) { unsigned char* bag_id; raptor_uri* bag_uri = NULL; bag_id = (unsigned char*)element->rdf_attr[RDF_NS_bagID]; element->rdf_attr[RDF_NS_bagID] = NULL; bag_uri = raptor_new_uri_from_id(rdf_parser->world, base_uri, bag_id); if(!bag_uri) { RAPTOR_FREE(char*, bag_id); goto oom; } element->bag = raptor_new_term_from_uri(rdf_parser->world, bag_uri); raptor_free_uri(bag_uri); if(!raptor_valid_xml_ID(rdf_parser, bag_id)) { raptor_parser_error(rdf_parser, "Illegal rdf:bagID value '%s'", bag_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; RAPTOR_FREE(char*, bag_id); break; } if(raptor_rdfxml_record_ID(rdf_parser, element, bag_id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:bagID value '%s'", bag_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; RAPTOR_FREE(char*, bag_id); break; } RAPTOR_FREE(char*, bag_id); raptor_parser_warning(rdf_parser, "rdf:bagID is deprecated."); raptor_rdfxml_generate_statement(rdf_parser, element->bag, RAPTOR_RDF_type_URI(rdf_parser->world), RAPTOR_RDF_Bag_term(rdf_parser->world), NULL, NULL); } else { /* bagID forbidden */ raptor_parser_error(rdf_parser, "rdf:bagID is forbidden."); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } } if(element->parent) { /* In a rdf:parseType="Collection" the resources are appended * to the list at the genid element->parent->tail_id */ if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION || element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { /* rdf:type rdf:List */ const unsigned char * idList; raptor_uri *predicate_uri; raptor_term* idList_term; raptor_term* object_term; idList = raptor_world_generate_bnodeid(rdf_parser->world); if(!idList) goto oom; /* idList string is saved below in element->parent->tail_id */ idList_term = raptor_new_term_from_blank(rdf_parser->world, idList); if(!idList_term) { RAPTOR_FREE(char*, idList); goto oom; } if((element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) || RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST)) { raptor_uri* class_uri = NULL; if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { class_uri = RAPTOR_DAML_List_URI(rdf_xml_parser); object_term = raptor_new_term_from_uri(rdf_parser->world, class_uri); } else object_term = raptor_term_copy(RAPTOR_RDF_List_term(rdf_parser->world)); raptor_rdfxml_generate_statement(rdf_parser, idList_term, RAPTOR_RDF_type_URI(rdf_parser->world), object_term, NULL, element); raptor_free_term(object_term); } predicate_uri = (element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_first_URI(rdf_xml_parser) : RAPTOR_RDF_first_URI(rdf_parser->world); /* rdf:first uri> */ raptor_rdfxml_generate_statement(rdf_parser, idList_term, predicate_uri, element->subject, NULL, NULL); /* If there is no rdf:parseType="Collection" */ if(!element->parent->tail_id) { /* Free any existing object still around. * I suspect this can never happen. */ if(element->parent->object) raptor_free_term(element->parent->object); element->parent->object = raptor_new_term_from_blank(rdf_parser->world, idList); } else { raptor_term* tail_id_term; tail_id_term = raptor_new_term_from_blank(rdf_parser->world, element->parent->tail_id); predicate_uri = (element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) ? RAPTOR_DAML_rest_URI(rdf_xml_parser) : RAPTOR_RDF_rest_URI(rdf_parser->world); /* _:tail_id rdf:rest _:listRest */ raptor_rdfxml_generate_statement(rdf_parser, tail_id_term, predicate_uri, idList_term, NULL, NULL); raptor_free_term(tail_id_term); } /* update new tail */ if(element->parent->tail_id) RAPTOR_FREE(char*, (char*)element->parent->tail_id); element->parent->tail_id = idList; raptor_free_term(idList_term); } else if(element->parent->state != RAPTOR_STATE_UNKNOWN && element->state != RAPTOR_STATE_PARSETYPE_RESOURCE) { /* If there is a parent element (property) containing this * element (node) and it has no object, set it from this subject */ if(element->parent->object) { raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_error(rdf_parser, "Tried to set multiple objects of a statement"); } else { /* Store URI of this node in our parent as the property object */ element->parent->object = raptor_term_copy(element->subject); element->parent->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } } } /* If this is a node element, generate the rdf:type statement * from this node */ if(state == RAPTOR_STATE_NODE_ELEMENT) { raptor_term* el_name_term; el_name_term = raptor_new_term_from_uri(rdf_parser->world, element_name_uri); raptor_rdfxml_generate_statement(rdf_parser, element->subject, RAPTOR_RDF_type_URI(rdf_parser->world), el_name_term, element->reified, element); raptor_free_term(el_name_term); } if(raptor_rdfxml_process_property_attributes(rdf_parser, element, element, NULL)) goto oom; /* for both productions now need some more content or * property elements before can do any more work. */ element->child_state = RAPTOR_STATE_PROPERTYELT; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; finished = 1; break; case RAPTOR_STATE_PARSETYPE_OTHER: /* FALLTHROUGH */ case RAPTOR_STATE_PARSETYPE_LITERAL: raptor_xml_writer_start_element(rdf_xml_parser->xml_writer, xml_element); element->child_state = RAPTOR_STATE_PARSETYPE_LITERAL; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; finished = 1; break; /* Handle all the detail of the various options of property element * http://www.w3.org/TR/rdf-syntax-grammar/#propertyElt * * All the attributes must be scanned here to see what additional * property element work is needed. No triples are generated * until the end of this element, until it is clear if the * element was empty. */ case RAPTOR_STATE_MEMBER_PROPERTYELT: case RAPTOR_STATE_PROPERTYELT: if(!element_name_uri) { raptor_parser_error(rdf_parser, "Using property element '%s' without a namespace is forbidden.", raptor_xml_element_get_name(element->parent->xml_element)->local_name); raptor_rdfxml_update_document_locator(rdf_parser); element->state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } /* Handling rdf:li as a property, noting special processing */ if(element_in_rdf_ns && raptor_uri_equals(element_name_uri, RAPTOR_RDF_li_URI(rdf_parser->world))) { state = RAPTOR_STATE_MEMBER_PROPERTYELT; } if(element_in_rdf_ns) { rc = raptor_rdfxml_check_propertyElement_name((const char*)el_name); if(!rc) { raptor_parser_error(rdf_parser, "rdf:%s is forbidden as a property element.", el_name); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } else if(rc < 0) { raptor_parser_warning(rdf_parser, "rdf:%s is an unknown RDF namespaced element.", el_name); } } /* rdf:ID on a property element - reify a statement. * Allowed on all property element forms */ if(element->rdf_attr[RDF_NS_ID]) { raptor_uri *reified_uri; element->reified_id = element->rdf_attr[RDF_NS_ID]; element->rdf_attr[RDF_NS_ID] = NULL; reified_uri = raptor_new_uri_from_id(rdf_parser->world, base_uri, element->reified_id); if(!reified_uri) goto oom; element->reified = raptor_new_term_from_uri(rdf_parser->world, reified_uri); raptor_free_uri(reified_uri); if(!element->reified) goto oom; if(!raptor_valid_xml_ID(rdf_parser, element->reified_id)) { raptor_parser_error(rdf_parser, "Illegal rdf:ID value '%s'", element->reified_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } if(raptor_rdfxml_record_ID(rdf_parser, element, element->reified_id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:ID value '%s'", element->reified_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } } /* rdf:datatype on a property element. * Only allowed for * http://www.w3.org/TR/rdf-syntax-grammar/#literalPropertyElt */ if(element->rdf_attr[RDF_NS_datatype]) { raptor_uri *datatype_uri; datatype_uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, (const unsigned char*)element->rdf_attr[RDF_NS_datatype]); element->object_literal_datatype = datatype_uri; RAPTOR_FREE(char*, element->rdf_attr[RDF_NS_datatype]); element->rdf_attr[RDF_NS_datatype] = NULL; if(!element->object_literal_datatype) goto oom; } if(element->rdf_attr[RDF_NS_bagID]) { if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID)) { if(element->rdf_attr[RDF_NS_resource] || element->rdf_attr[RDF_NS_parseType]) { raptor_parser_error(rdf_parser, "rdf:bagID is forbidden on property element '%s' with an rdf:resource or rdf:parseType attribute.", el_name); /* prevent this being used later either */ RAPTOR_FREE(char*, element->rdf_attr[RDF_NS_bagID]); element->rdf_attr[RDF_NS_bagID] = NULL; } else { unsigned char* bag_id; raptor_uri* bag_uri; bag_id = (unsigned char*)element->rdf_attr[RDF_NS_bagID]; element->rdf_attr[RDF_NS_bagID] = NULL; bag_uri = raptor_new_uri_from_id(rdf_parser->world, base_uri, bag_id); if(!bag_uri) { RAPTOR_FREE(char*, bag_id); goto oom; } element->bag = raptor_new_term_from_uri(rdf_parser->world, bag_uri); raptor_free_uri(bag_uri); if(!element->bag) { RAPTOR_FREE(char*, bag_id); goto oom; } if(!raptor_valid_xml_ID(rdf_parser, bag_id)) { raptor_parser_error(rdf_parser, "Illegal rdf:bagID value '%s'", bag_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; RAPTOR_FREE(char*, bag_id); break; } if(raptor_rdfxml_record_ID(rdf_parser, element, bag_id)) { raptor_parser_error(rdf_parser, "Duplicated rdf:bagID value '%s'", bag_id); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; RAPTOR_FREE(char*, bag_id); finished = 1; break; } RAPTOR_FREE(char*, bag_id); raptor_parser_warning(rdf_parser, "rdf:bagID is deprecated."); } } else { /* bagID forbidden */ raptor_parser_error(rdf_parser, "rdf:bagID is forbidden."); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } } /* if rdf:bagID on property element */ element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT; if(element->rdf_attr[RDF_NS_parseType]) { const unsigned char *parse_type; int i; int is_parseType_Literal = 0; parse_type = element->rdf_attr[RDF_NS_parseType]; if(raptor_rdfxml_element_has_property_attributes(element)) { raptor_parser_error(rdf_parser, "Property attributes cannot be used with rdf:parseType='%s'", parse_type); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; finished = 1; break; } /* Check for bad combinations of things with parseType */ for(i = 0; i <= RDF_NS_LAST; i++) if(element->rdf_attr[i] && i != RDF_NS_parseType) { raptor_parser_error(rdf_parser, "Attribute '%s' cannot be used with rdf:parseType='%s'", raptor_rdf_ns_terms_info[i].name, parse_type); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; break; } if(!strcmp((char*)parse_type, "Literal")) is_parseType_Literal = 1; else if(!strcmp((char*)parse_type, "Resource")) { unsigned char* subject_id; state = RAPTOR_STATE_PARSETYPE_RESOURCE; element->child_state = RAPTOR_STATE_PROPERTYELT; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; /* create a node for the subject of the contained properties */ subject_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!subject_id) goto oom; element->subject = raptor_new_term_from_blank(rdf_parser->world, subject_id); RAPTOR_FREE(char*, subject_id); if(!element->subject) goto oom; } else if(!strcmp((char*)parse_type, "Collection")) { /* An rdf:parseType="Collection" appears as a single node */ element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; element->child_state = RAPTOR_STATE_PARSETYPE_COLLECTION; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION; } else { if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES) && !raptor_strcasecmp((char*)parse_type, "daml:collection")) { /* A DAML collection appears as a single node */ element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; element->child_state = RAPTOR_STATE_PARSETYPE_COLLECTION; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION; } else { if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_WARN_OTHER_PARSETYPES)) { raptor_parser_warning(rdf_parser, "Unknown rdf:parseType value '%s' taken as 'Literal'", parse_type); } is_parseType_Literal = 1; } } if(is_parseType_Literal) { raptor_xml_writer* xml_writer; /* rdf:parseType="Literal" - explicitly or default * if the parseType value is not recognised */ rdf_xml_parser->xml_content = NULL; rdf_xml_parser->xml_content_length = 0; rdf_xml_parser->iostream = raptor_new_iostream_to_string(rdf_parser->world, &rdf_xml_parser->xml_content, &rdf_xml_parser->xml_content_length, raptor_alloc_memory); if(!rdf_xml_parser->iostream) goto oom; xml_writer = raptor_new_xml_writer(rdf_parser->world, NULL, rdf_xml_parser->iostream); rdf_xml_parser->xml_writer = xml_writer; if(!rdf_xml_parser->xml_writer) goto oom; raptor_xml_writer_set_option(rdf_xml_parser->xml_writer, RAPTOR_OPTION_WRITER_XML_DECLARATION, NULL, 0); element->child_state = RAPTOR_STATE_PARSETYPE_LITERAL; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; } } else { /* Can only be the empty property element case * http://www.w3.org/TR/rdf-syntax-grammar/#emptyPropertyElt */ /* The presence of the rdf:resource or rdf:nodeID * attributes is checked at element close time */ /* * Assign reified URI here so we don't reify property attributes * using this id */ if(element->reified_id && !element->reified) { raptor_uri* reified_uri; reified_uri = raptor_new_uri_from_id(rdf_parser->world, base_uri, element->reified_id); if(!reified_uri) goto oom; element->reified = raptor_new_term_from_uri(rdf_parser->world, reified_uri); raptor_free_uri(reified_uri); if(!element->reified) goto oom; } if(element->rdf_attr[RDF_NS_resource] || element->rdf_attr[RDF_NS_nodeID]) { /* Done - wait for end of this element to end in order to * check the element was empty as expected */ element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } else { /* Otherwise process content in obj (value) state */ element->child_state = RAPTOR_STATE_NODE_ELEMENT_LIST; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT; } } finished = 1; break; case RAPTOR_STATE_INVALID: default: raptor_parser_fatal_error(rdf_parser, "%s Internal error - unexpected parser state %d - %s", __FUNCTION__, state, raptor_rdfxml_state_as_string(state)); finished = 1; } /* end switch */ if(state != element->state) { element->state = state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Moved to state %d - %s\n", state, raptor_rdfxml_state_as_string(state)); #endif } } /* end while */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Ending in state %s\n", raptor_rdfxml_state_as_string(state)); #endif return; oom: raptor_parser_fatal_error(rdf_parser, "Out of memory, skipping"); element->state = RAPTOR_STATE_SKIPPING; } static void raptor_rdfxml_end_element_grammar(raptor_parser *rdf_parser, raptor_rdfxml_element *element) { raptor_rdfxml_parser *rdf_xml_parser; raptor_state state; int finished; raptor_xml_element* xml_element = element->xml_element; raptor_qname* el_qname; const unsigned char *el_name; int element_in_rdf_ns; raptor_uri* element_name_uri; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; el_qname = raptor_xml_element_get_name(xml_element); el_name = el_qname->local_name; element_in_rdf_ns= (el_qname->nspace && el_qname->nspace->is_rdf_ms); element_name_uri = el_qname->uri; state = element->state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Starting in state %s\n", raptor_rdfxml_state_as_string(state)); #endif finished= 0; while(!finished) { switch(state) { case RAPTOR_STATE_SKIPPING: finished = 1; break; case RAPTOR_STATE_UNKNOWN: finished = 1; break; case RAPTOR_STATE_NODE_ELEMENT_LIST: if(element_in_rdf_ns && raptor_uri_equals(element_name_uri, RAPTOR_RDF_RDF_URI(rdf_parser->world))) { /* end of RDF - boo hoo */ state = RAPTOR_STATE_UNKNOWN; finished = 1; break; } /* When scanning, another element ending is outside the RDF * world so this can happen without further work */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_SCANNING)) { state = RAPTOR_STATE_UNKNOWN; finished = 1; break; } /* otherwise found some junk after RDF content in an RDF-only * document (probably never get here since this would be * a mismatched XML tag and cause an error earlier) */ raptor_rdfxml_update_document_locator(rdf_parser); raptor_parser_warning(rdf_parser, "Element '%s' ended, expected end of RDF element", el_name); state = RAPTOR_STATE_UNKNOWN; finished = 1; break; case RAPTOR_STATE_DESCRIPTION: case RAPTOR_STATE_NODE_ELEMENT: case RAPTOR_STATE_PARSETYPE_RESOURCE: /* If there is a parent element containing this element and * the parent isn't a description, has an identifier, * create the statement between this node using parent property * (Need to check for identifier so that top-level typed nodes * don't get connect to parent element) */ if(state == RAPTOR_STATE_NODE_ELEMENT && element->parent && element->parent->subject) { raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject, element_name_uri, element->subject, NULL, element); } else if(state == RAPTOR_STATE_PARSETYPE_RESOURCE && element->parent && element->parent->subject) { /* Handle rdf:li as the rdf:parseType="resource" property */ if(element_in_rdf_ns && raptor_uri_equals(element_name_uri, RAPTOR_RDF_li_URI(rdf_parser->world))) { raptor_uri* ordinal_predicate_uri; element->parent->last_ordinal++; ordinal_predicate_uri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world, element->parent->last_ordinal); raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject, ordinal_predicate_uri, element->subject, element->reified, element->parent); raptor_free_uri(ordinal_predicate_uri); } else { raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject, element_name_uri, element->subject, element->reified, element->parent); } } finished = 1; break; case RAPTOR_STATE_PARSETYPE_COLLECTION: finished = 1; break; case RAPTOR_STATE_PARSETYPE_OTHER: /* FALLTHROUGH */ case RAPTOR_STATE_PARSETYPE_LITERAL: element->parent->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL; raptor_xml_writer_end_element(rdf_xml_parser->xml_writer, xml_element); finished = 1; break; case RAPTOR_STATE_PROPERTYELT: case RAPTOR_STATE_MEMBER_PROPERTYELT: /* A property element * http://www.w3.org/TR/rdf-syntax-grammar/#propertyElt * * Literal content part is handled here. * The element content is handled in the internal states * Empty content is checked here. */ if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT) { if(xml_element->content_cdata_seen) element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; else if(xml_element->content_element_seen) element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES; else { /* Empty Literal */ element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; } } /* Handle terminating a rdf:parseType="Collection" list */ if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION || element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { raptor_term* nil_term; if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) { raptor_uri* nil_uri = RAPTOR_DAML_nil_URI(rdf_xml_parser); nil_term = raptor_new_term_from_uri(rdf_parser->world, nil_uri); } else { nil_term = raptor_term_copy(RAPTOR_RDF_nil_term(rdf_parser->world)); } if(!element->tail_id) { /* If No List: set object of statement to rdf:nil */ element->object = raptor_term_copy(nil_term); } else { raptor_uri* rest_uri = NULL; raptor_term* tail_id_term; if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION) rest_uri = RAPTOR_DAML_rest_URI(rdf_xml_parser); else rest_uri = RAPTOR_RDF_rest_URI(rdf_parser->world); tail_id_term = raptor_new_term_from_blank(rdf_parser->world, element->tail_id); /* terminate the list */ raptor_rdfxml_generate_statement(rdf_parser, tail_id_term, rest_uri, nil_term, NULL, NULL); raptor_free_term(tail_id_term); } raptor_free_term(nil_term); } /* end rdf:parseType="Collection" termination */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Content type %s (%d)\n", raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); #endif switch(element->content_type) { case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE: if(raptor_rdfxml_element_has_property_attributes(element) && element->child_state == RAPTOR_STATE_DESCRIPTION) { raptor_parser_error(rdf_parser, "Property element '%s' has both property attributes and a node element content", el_name); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; break; } if(!element->object) { if(element->rdf_attr[RDF_NS_resource]) { raptor_uri* resource_uri; resource_uri = raptor_new_uri_relative_to_base(rdf_parser->world, raptor_rdfxml_inscope_base_uri(rdf_parser), (const unsigned char*)element->rdf_attr[RDF_NS_resource]); if(!resource_uri) goto oom; element->object = raptor_new_term_from_uri(rdf_parser->world, resource_uri); raptor_free_uri(resource_uri); RAPTOR_FREE(char*, element->rdf_attr[RDF_NS_resource]); element->rdf_attr[RDF_NS_resource] = NULL; if(!element->object) goto oom; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } else if(element->rdf_attr[RDF_NS_nodeID]) { unsigned char* resource_id; resource_id = raptor_world_internal_generate_id(rdf_parser->world, (unsigned char*)element->rdf_attr[RDF_NS_nodeID]); if(!resource_id) goto oom; element->object = raptor_new_term_from_blank(rdf_parser->world, resource_id); RAPTOR_FREE(char*, resource_id); element->rdf_attr[RDF_NS_nodeID] = NULL; if(!element->object) goto oom; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; if(!raptor_valid_xml_ID(rdf_parser, element->object->value.blank.string)) { raptor_parser_error(rdf_parser, "Illegal rdf:nodeID value '%s'", (const char*)element->object->value.blank.string); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; break; } } else { unsigned char* resource_id; resource_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!resource_id) goto oom; element->object = raptor_new_term_from_blank(rdf_parser->world, resource_id); RAPTOR_FREE(char*, resource_id); if(!element->object) goto oom; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } if(raptor_rdfxml_process_property_attributes(rdf_parser, element, element->parent, element->object)) goto oom; } /* We know object is a resource, so delete any unsignficant * whitespace so that FALLTHROUGH code below finds the object. */ if(xml_element->content_cdata_length) { raptor_free_stringbuffer(xml_element->content_cdata_sb); xml_element->content_cdata_sb = NULL; xml_element->content_cdata_length = 0; } /* FALLTHROUGH */ case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL: if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL) { if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID)) { /* Only an empty literal can have a rdf:bagID */ if(element->bag) { if(xml_element->content_cdata_length > 0) { raptor_parser_error(rdf_parser, "rdf:bagID is forbidden on a literal property element '%s'.", el_name); /* prevent this being used later either */ element->rdf_attr[RDF_NS_bagID] = NULL; } else { raptor_rdfxml_generate_statement(rdf_parser, element->bag, RAPTOR_RDF_type_URI(rdf_parser->world), RAPTOR_RDF_Bag_term(rdf_parser->world), NULL, NULL); } } } /* if rdf:bagID */ /* If there is empty literal content with properties * generate a node to hang properties off */ if(raptor_rdfxml_element_has_property_attributes(element) && xml_element->content_cdata_length > 0) { raptor_parser_error(rdf_parser, "Literal property element '%s' has property attributes", el_name); state = RAPTOR_STATE_SKIPPING; element->child_state = RAPTOR_STATE_SKIPPING; break; } if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL && raptor_rdfxml_element_has_property_attributes(element) && !element->object) { unsigned char* object_id; object_id = raptor_world_generate_bnodeid(rdf_parser->world); if(!object_id) goto oom; element->object = raptor_new_term_from_blank(rdf_parser->world, object_id); RAPTOR_FREE(char*, object_id); if(!element->object) goto oom; element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_RESOURCE; } if(raptor_rdfxml_process_property_attributes(rdf_parser, element, element, element->object)) goto oom; } /* just be friendly to older compilers and don't declare * variables in the middle of a block */ if(1) { raptor_uri *predicate_uri = NULL; int predicate_ordinal = -1; raptor_term* object_term = NULL; if(state == RAPTOR_STATE_MEMBER_PROPERTYELT) { predicate_ordinal = ++element->parent->last_ordinal; predicate_uri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world, predicate_ordinal); } else { predicate_uri = element_name_uri; } if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL) { unsigned char* literal = NULL; raptor_uri* literal_datatype; unsigned char* literal_language = NULL; /* an empty stringbuffer - empty CDATA - is OK */ if(raptor_stringbuffer_length(xml_element->content_cdata_sb)) { literal = raptor_stringbuffer_as_string(xml_element->content_cdata_sb); if(!literal) goto oom; } literal_datatype = element->object_literal_datatype; if(!literal_datatype) literal_language = (unsigned char*)raptor_sax2_inscope_xml_language(rdf_xml_parser->sax2); if(!literal_datatype && literal && !raptor_unicode_check_utf8_nfc_string(literal, xml_element->content_cdata_length, NULL)) { const char *message; message = "Property element '%s' has a string not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NON_NFC_FATAL)) raptor_parser_error(rdf_parser, message, el_name, literal); else raptor_parser_warning(rdf_parser, message, el_name, literal); } object_term = raptor_new_term_from_literal(rdf_parser->world, literal, literal_datatype, literal_language); } else { object_term = raptor_term_copy(element->object); } raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject, predicate_uri, object_term, element->reified, element->parent); if(predicate_ordinal >= 0) raptor_free_uri(predicate_uri); raptor_free_term(object_term); } break; case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PRESERVED: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL: { unsigned char *buffer; size_t length; raptor_term* xmlliteral_term = NULL; if(rdf_xml_parser->xml_writer) { raptor_xml_writer_flush(rdf_xml_parser->xml_writer); raptor_free_iostream(rdf_xml_parser->iostream); rdf_xml_parser->iostream = NULL; buffer = (unsigned char*)rdf_xml_parser->xml_content; length = rdf_xml_parser->xml_content_length; } else { buffer = raptor_stringbuffer_as_string(xml_element->content_cdata_sb); length = xml_element->content_cdata_length; } if(!raptor_unicode_check_utf8_nfc_string(buffer, length, NULL)) { const char *message; message = "Property element '%s' has XML literal content not in Unicode Normal Form C: %s"; raptor_rdfxml_update_document_locator(rdf_parser); if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NON_NFC_FATAL)) raptor_parser_error(rdf_parser, message, el_name, buffer); else raptor_parser_warning(rdf_parser, message, el_name, buffer); } xmlliteral_term = raptor_new_term_from_literal(rdf_parser->world, buffer, RAPTOR_RDF_XMLLiteral_URI(rdf_parser->world), NULL); if(state == RAPTOR_STATE_MEMBER_PROPERTYELT) { raptor_uri* predicate_uri; element->parent->last_ordinal++; predicate_uri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world, element->parent->last_ordinal); raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject, predicate_uri, xmlliteral_term, element->reified, element->parent); raptor_free_uri(predicate_uri); } else { raptor_rdfxml_generate_statement(rdf_parser, element->parent->subject, element_name_uri, xmlliteral_term, element->reified, element->parent); } raptor_free_term(xmlliteral_term); /* Finish the xml writer iostream for parseType="Literal" */ if(rdf_xml_parser->xml_writer) { raptor_free_xml_writer(rdf_xml_parser->xml_writer); rdf_xml_parser->xml_writer = NULL; RAPTOR_FREE(char*, rdf_xml_parser->xml_content); rdf_xml_parser->xml_content = NULL; rdf_xml_parser->xml_content_length = 0; } } break; case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_COLLECTION: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_DAML_COLLECTION: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_NODES: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_UNKNOWN: case RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST: default: raptor_parser_fatal_error(rdf_parser, "%s: Internal error in state RAPTOR_STATE_PROPERTYELT - got unexpected content type %s (%d)", __FUNCTION__, raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); } /* end switch */ finished = 1; break; case RAPTOR_STATE_INVALID: default: raptor_parser_fatal_error(rdf_parser, "%s: Internal error - unexpected parser state %d - %s", __FUNCTION__, state, raptor_rdfxml_state_as_string(state)); finished = 1; } /* end switch */ if(state != element->state) { element->state = state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Moved to state %d - %s\n", state, raptor_rdfxml_state_as_string(state)); #endif } } /* end while */ #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Ending in state %s\n", raptor_rdfxml_state_as_string(state)); #endif return; oom: raptor_parser_fatal_error(rdf_parser, "Out of memory, skipping"); element->state = RAPTOR_STATE_SKIPPING; } static void raptor_rdfxml_cdata_grammar(raptor_parser *rdf_parser, const unsigned char *s, int len, int is_cdata) { raptor_rdfxml_parser* rdf_xml_parser; raptor_rdfxml_element* element; raptor_xml_element* xml_element; raptor_state state; int all_whitespace = 1; int i; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; if(rdf_parser->failed) return; #ifdef RAPTOR_DEBUG_CDATA RAPTOR_DEBUG2("Adding characters (is_cdata=%d): '", is_cdata); (void)fwrite(s, 1, len, stderr); fprintf(stderr, "' (%d bytes)\n", len); #endif for(i = 0; i < len; i++) if(!isspace(s[i])) { all_whitespace = 0; break; } element = rdf_xml_parser->current_element; /* this file is very broke - probably not XML, whatever */ if(!element) return; xml_element = element->xml_element; raptor_rdfxml_update_document_locator(rdf_parser); /* cdata never changes the parser state * and the containing element state always determines what to do. * Use the child_state first if there is one, since that applies */ state = element->child_state; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Working in state %s\n", raptor_rdfxml_state_as_string(state)); #endif #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Content type %s (%d)\n", raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); #endif if(state == RAPTOR_STATE_SKIPPING) return; if(state == RAPTOR_STATE_UNKNOWN) { /* Ignore all cdata if still looking for RDF */ if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_SCANNING)) return; /* Ignore all whitespace cdata before first element */ if(all_whitespace) return; /* This probably will never happen since that would make the * XML not be well-formed */ raptor_parser_warning(rdf_parser, "Character data before RDF element."); } if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTIES) { /* If found non-whitespace content, move to literal content */ if(!all_whitespace) element->child_content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; } if(!rdf_content_type_info[element->child_content_type].whitespace_significant) { /* Whitespace is ignored except for literal or preserved content types */ if(all_whitespace) { #ifdef RAPTOR_DEBUG_CDATA RAPTOR_DEBUG2("Ignoring whitespace cdata inside element '%s'\n", raptor_xml_element_get_name(element->parent->xml_element)->local_name); #endif return; } if(xml_element->content_cdata_seen && xml_element->content_element_seen) { raptor_qname* parent_el_name; parent_el_name = raptor_xml_element_get_name(element->parent->xml_element); /* Uh oh - mixed content, this element has elements too */ raptor_parser_warning(rdf_parser, "element '%s' has mixed content.", parent_el_name->local_name); } } if(element->content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_PROPERTY_CONTENT) { element->content_type = RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LITERAL; #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG3("Content type changed to %s (%d)\n", raptor_rdfxml_element_content_type_as_string(element->content_type), element->content_type); #endif } if(element->child_content_type == RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_XML_LITERAL) raptor_xml_writer_cdata_counted(rdf_xml_parser->xml_writer, s, len); else { raptor_stringbuffer_append_counted_string(xml_element->content_cdata_sb, s, len, 1); element->content_cdata_all_whitespace &= all_whitespace; /* adjust stored length */ xml_element->content_cdata_length += len; } #ifdef RAPTOR_DEBUG_CDATA RAPTOR_DEBUG3("Content cdata now: %d bytes\n", xml_element->content_cdata_length); #endif #ifdef RAPTOR_DEBUG_VERBOSE RAPTOR_DEBUG2("Ending in state %s\n", raptor_rdfxml_state_as_string(state)); #endif } /** * raptor_rdfxml_inscope_base_uri: * @rdf_parser: Raptor parser object * * Return the in-scope base URI. * * Looks for the innermost xml:base on an element or document URI * * Return value: The URI string value or NULL on failure. **/ static raptor_uri* raptor_rdfxml_inscope_base_uri(raptor_parser *rdf_parser) { raptor_rdfxml_parser* rdf_xml_parser; raptor_uri* base_uri; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; base_uri = raptor_sax2_inscope_base_uri(rdf_xml_parser->sax2); if(!base_uri) base_uri = rdf_parser->base_uri; return base_uri; } /** * raptor_rdfxml_record_ID: * @rdf_parser: Raptor parser object * @element: Current element * @id: ID string * * Record an rdf:ID / rdf:bagID value (with xml base) and check it hasn't been seen already. * * Record and check the ID values, if they have been seen already. * per in-scope-base URI. * * Return value: non-zero if already seen, or failure **/ static int raptor_rdfxml_record_ID(raptor_parser *rdf_parser, raptor_rdfxml_element *element, const unsigned char *id) { raptor_rdfxml_parser *rdf_xml_parser; raptor_uri* base_uri; size_t id_len; int rc; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; if(!RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_CHECK_RDF_ID)) return 0; base_uri = raptor_rdfxml_inscope_base_uri(rdf_parser); id_len = strlen((const char*)id); rc = raptor_id_set_add(rdf_xml_parser->id_set, base_uri, id, id_len); return (rc != 0); } static void raptor_rdfxml_update_document_locator(raptor_parser *rdf_parser) { raptor_rdfxml_parser *rdf_xml_parser; rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; raptor_sax2_update_document_locator(rdf_xml_parser->sax2, &rdf_parser->locator); } static void raptor_rdfxml_parse_finish_factory(raptor_parser_factory* factory) { } static const char* const rdfxml_names[3] = { "rdfxml", "raptor", NULL}; static const char* const rdfxml_uri_strings[3] = { "http://www.w3.org/ns/formats/RDF_XML", "http://www.w3.org/TR/rdf-syntax-grammar", NULL }; #define RDFXML_TYPES_COUNT 2 static const raptor_type_q rdfxml_types[RDFXML_TYPES_COUNT + 1] = { { "application/rdf+xml", 19, 10}, { "text/rdf", 8, 6}, { NULL, 0, 0} }; static int raptor_rdfxml_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = rdfxml_names; factory->desc.mime_types = rdfxml_types; factory->desc.label = "RDF/XML"; factory->desc.uri_strings = rdfxml_uri_strings; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_rdfxml_parser); factory->init = raptor_rdfxml_parse_init; factory->terminate = raptor_rdfxml_parse_terminate; factory->start = raptor_rdfxml_parse_start; factory->chunk = raptor_rdfxml_parse_chunk; factory->finish_factory = raptor_rdfxml_parse_finish_factory; factory->recognise_syntax = raptor_rdfxml_parse_recognise_syntax; return rc; } int raptor_init_parser_rdfxml(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_rdfxml_parser_register_factory); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 void raptor_rdfxml_parser_stats_print(raptor_rdfxml_parser* rdf_xml_parser, FILE *stream) { fputs("rdf:ID set ", stream); raptor_id_set_stats_print(rdf_xml_parser->id_set, stream); } #endif raptor2-2.0.15/src/raptor_iostream.c0000644000175000017500000012116712425333224014266 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_iostream.c - Raptor I/O-stream class for abstracting I/O * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE #define RAPTOR_IOSTREAM_MODE_READ 1 #define RAPTOR_IOSTREAM_MODE_WRITE 2 #define RAPTOR_IOSTREAM_FLAGS_EOF 1 #define RAPTOR_IOSTREAM_FLAGS_FREE_HANDLER 2 struct raptor_iostream_s { raptor_world *world; void *user_data; const raptor_iostream_handler* handler; size_t offset; unsigned int mode; int flags; }; /* prototypes for local functions */ static int raptor_iostream_calculate_modes(const raptor_iostream_handler * const handler) { int mode = 0; /* API V1 checks */ if((handler->version >= 1) && handler->read_bytes) mode |= RAPTOR_IOSTREAM_MODE_READ; /* API V2 checks */ if((handler->version >= 2) && (handler->write_byte || handler->write_bytes)) mode |= RAPTOR_IOSTREAM_MODE_WRITE; return mode; } /* Return non-0 if handler is legal and OK for given mode (if not 0 = ANY) */ static int raptor_iostream_check_handler(const raptor_iostream_handler * const handler, unsigned int user_mode) { int mode; if(handler->version < 1 || handler->version > 2) return 0; mode = raptor_iostream_calculate_modes(handler); if(user_mode && !(user_mode & mode)) return 0; return (mode != 0); } /** * raptor_new_iostream_from_handler: * @world: raptor_world object * @user_data: pointer to context information to pass in to calls * @handler: pointer to handler methods * * Create a new iostream over a user-defined handler * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_handler(raptor_world *world, void *user_data, const raptor_iostream_handler* const handler) { raptor_iostream* iostr; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(handler, raptor_iostream_handler, NULL); raptor_world_open(world); if(!raptor_iostream_check_handler(handler, 0)) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) return NULL; iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)user_data; iostr->mode = raptor_iostream_calculate_modes(handler); if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } return iostr; } /* Local handlers for reading/writing to/from a sink */ static int raptor_sink_iostream_write_byte(void *user_data, const int byte) { return 0; } static int raptor_sink_iostream_write_bytes(void *user_data, const void *ptr, size_t size, size_t nmemb) { return RAPTOR_BAD_CAST(int, size * nmemb); /* success */ } static int raptor_sink_iostream_read_bytes(void *user_data, void *ptr, size_t size, size_t nmemb) { return 0; } static int raptor_sink_iostream_read_eof(void *user_data) { return 1; /* EOF always */ } static const raptor_iostream_handler raptor_iostream_sink_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ NULL, /* .write_byte = */ raptor_sink_iostream_write_byte, /* .write_bytes = */ raptor_sink_iostream_write_bytes, /* .write_end = */ NULL, /* .read_bytes = */ raptor_sink_iostream_read_bytes, /* .read_eof = */ raptor_sink_iostream_read_eof }; /** * raptor_new_iostream_to_sink: * @world: raptor_world object * * Create a new write iostream to a sink, throwing away all data. * * Provides an that throw away all writes and returns end of input * immediately on reads. Same as raptor_new_iostream_from_sink() * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_to_sink(raptor_world *world) { RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); return raptor_new_iostream_from_handler(world, NULL, &raptor_iostream_sink_handler); } /* Local handlers for reading/writing from a filename */ static void raptor_filename_iostream_finish(void *user_data) { FILE* handle = (FILE*)user_data; fclose(handle); } static int raptor_filename_iostream_write_byte(void *user_data, const int byte) { FILE* handle = (FILE*)user_data; return (fputc(byte, handle) == byte); } static int raptor_filename_iostream_write_bytes(void *user_data, const void *ptr, size_t size, size_t nmemb) { FILE* handle = (FILE*)user_data; return RAPTOR_BAD_CAST(int, fwrite(ptr, size, nmemb, handle)); } static int raptor_filename_iostream_write_end(void *user_data) { FILE* handle = (FILE*)user_data; return fclose(handle); } static int raptor_filename_iostream_read_bytes(void *user_data, void *ptr, size_t size, size_t nmemb) { FILE* handle = (FILE*)user_data; return RAPTOR_BAD_CAST(int, fread(ptr, size, nmemb, handle)); } static int raptor_filename_iostream_read_eof(void *user_data) { FILE* handle = (FILE*)user_data; return feof(handle); } static const raptor_iostream_handler raptor_iostream_write_filename_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_filename_iostream_finish, /* .write_byte = */ raptor_filename_iostream_write_byte, /* .write_bytes = */ raptor_filename_iostream_write_bytes, /* .write_end = */ raptor_filename_iostream_write_end, /* .read_bytes = */ NULL, /* .read_eof = */ NULL }; /** * raptor_new_iostream_to_filename: * @world: raptor world * @filename: Output filename to open and write to * * Constructor - create a new iostream writing to a filename. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_to_filename(raptor_world *world, const char *filename) { FILE *handle; raptor_iostream* iostr; const raptor_iostream_handler* handler; const unsigned int mode = RAPTOR_IOSTREAM_MODE_WRITE; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); if(!filename) return NULL; handler = &raptor_iostream_write_filename_handler; if(!raptor_iostream_check_handler(handler, mode)) return NULL; handle = fopen(filename, "wb"); if(!handle) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) { fclose(handle); return NULL; } iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)handle; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } static const raptor_iostream_handler raptor_iostream_write_file_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ NULL, /* .write_byte = */ raptor_filename_iostream_write_byte, /* .write_bytes = */ raptor_filename_iostream_write_bytes, /* .write_end = */ NULL, /* .read_bytes = */ NULL, /* .read_eof = */ NULL }; /** * raptor_new_iostream_to_file_handle: * @world: raptor world * @handle: FILE* handle to write to * * Constructor - create a new iostream writing to a FILE*. * * The @handle must already be open for writing. * NOTE: This does not fclose the @handle when it is finished. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_to_file_handle(raptor_world *world, FILE *handle) { raptor_iostream* iostr; const raptor_iostream_handler* handler; const unsigned int mode = RAPTOR_IOSTREAM_MODE_WRITE; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); if(!handle) return NULL; handler = &raptor_iostream_write_file_handler; if(!raptor_iostream_check_handler(handler, mode)) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) return NULL; iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)handle; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } return iostr; } struct raptor_write_string_iostream_context { raptor_stringbuffer *sb; void *(*malloc_handler)(size_t size); void **string_p; size_t *length_p; }; /* Local handlers for writing to a string */ static void raptor_write_string_iostream_finish(void *user_data) { struct raptor_write_string_iostream_context* con; size_t len; void *str = NULL; con = (struct raptor_write_string_iostream_context*)user_data; len = raptor_stringbuffer_length(con->sb); *con->string_p = NULL; if(con->length_p) *con->length_p = len; str = (void*)con->malloc_handler(len+1); if(str) { if(len) raptor_stringbuffer_copy_to_string(con->sb, (unsigned char*)str, len+1); else *(char*)str='\0'; *con->string_p = str; } if(!str && con->length_p) *con->length_p = 0; raptor_free_stringbuffer(con->sb); RAPTOR_FREE(raptor_write_string_iostream_context, con); return; } static int raptor_write_string_iostream_write_byte(void *user_data, const int byte) { struct raptor_write_string_iostream_context* con; unsigned char buf = (unsigned char)byte; con = (struct raptor_write_string_iostream_context*)user_data; return raptor_stringbuffer_append_counted_string(con->sb, &buf, 1, 1); } static int raptor_write_string_iostream_write_bytes(void *user_data, const void *ptr, size_t size, size_t nmemb) { struct raptor_write_string_iostream_context* con; con = (struct raptor_write_string_iostream_context*)user_data; if(raptor_stringbuffer_append_counted_string(con->sb, (const unsigned char*)ptr, size * nmemb, 1)) return 0; /* failure */ return RAPTOR_BAD_CAST(int, size * nmemb); /* success */ } static const raptor_iostream_handler raptor_iostream_write_string_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_write_string_iostream_finish, /* .write_byte = */ raptor_write_string_iostream_write_byte, /* .write_bytes = */ raptor_write_string_iostream_write_bytes, /* .write_end = */ NULL, /* .read_bytes = */ NULL, /* .read_eof = */ NULL }; /** * raptor_new_iostream_to_string: * @world: raptor world * @string_p: pointer to location to hold string * @length_p: pointer to location to hold length of string (or NULL) * @malloc_handler: pointer to malloc() to use to make string (or NULL) * * Constructor - create a new iostream writing to a string. * * If @malloc_handler is null, raptor will allocate it using it's * own memory allocator. *@string_p is set to NULL on failure (and * *@length_p to 0 if @length_p is not NULL). * * Return value: new #raptor_iostream object or NULL on failure **/ RAPTOR_EXTERN_C raptor_iostream* raptor_new_iostream_to_string(raptor_world *world, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler) { raptor_iostream* iostr; struct raptor_write_string_iostream_context* con; const raptor_iostream_handler* handler; const unsigned int mode = RAPTOR_IOSTREAM_MODE_WRITE; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!string_p) return NULL; raptor_world_open(world); handler = &raptor_iostream_write_string_handler; if(!raptor_iostream_check_handler(handler, mode)) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) return NULL; con = RAPTOR_CALLOC(struct raptor_write_string_iostream_context*, 1, sizeof(*con)); if(!con) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } con->sb = raptor_new_stringbuffer(); if(!con->sb) { RAPTOR_FREE(raptor_iostream, iostr); RAPTOR_FREE(raptor_write_string_iostream_context, con); return NULL; } con->string_p = string_p; *string_p = NULL; con->length_p = length_p; if(length_p) *length_p = 0; if(malloc_handler) con->malloc_handler = malloc_handler; else con->malloc_handler = raptor_alloc_memory; iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)con; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } /** * raptor_new_iostream_from_sink: * @world: raptor world * * Create a new read iostream from a sink, returning no data. * * Provides an I/O source that returns end of input immediately on * reads, and throw away all writes. Same as * raptor_new_iostream_to_sink() * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_sink(raptor_world *world) { RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); return raptor_new_iostream_from_handler(world, NULL, &raptor_iostream_sink_handler); } static const raptor_iostream_handler raptor_iostream_read_filename_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_filename_iostream_finish, /* .write_byte = */ NULL, /* .write_bytes = */ NULL, /* .write_end = */ NULL, /* .read_bytes = */ raptor_filename_iostream_read_bytes, /* .read_eof = */ raptor_filename_iostream_read_eof }; /** * raptor_new_iostream_from_filename: * @world: raptor world * @filename: Input filename to open and read from * * Constructor - create a new iostream reading from a filename. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_filename(raptor_world *world, const char *filename) { FILE *handle; raptor_iostream* iostr; const raptor_iostream_handler* handler; const unsigned int mode = RAPTOR_IOSTREAM_MODE_READ; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!filename) return NULL; raptor_world_open(world); handler = &raptor_iostream_read_filename_handler; if(!raptor_iostream_check_handler(handler, mode)) return NULL; handle = fopen(filename, "rb"); if(!handle) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) { fclose(handle); return NULL; } iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)handle; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } static const raptor_iostream_handler raptor_iostream_read_file_handle_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ NULL, /* .write_byte = */ NULL, /* .write_bytes = */ NULL, /* .write_end = */ NULL, /* .read_bytes = */ raptor_filename_iostream_read_bytes, /* .read_eof = */ raptor_filename_iostream_read_eof }; /** * raptor_new_iostream_from_file_handle: * @world: raptor world * @handle: Input file_handle to open and read from * * Constructor - create a new iostream reading from a file_handle. * * The @handle must already be open for reading. * NOTE: This does not fclose the @handle when it is finished. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_file_handle(raptor_world *world, FILE *handle) { raptor_iostream* iostr; const raptor_iostream_handler* handler; const unsigned int mode = RAPTOR_IOSTREAM_MODE_READ; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!handle) return NULL; raptor_world_open(world); handler = &raptor_iostream_read_file_handle_handler; if(!raptor_iostream_check_handler(handler, mode)) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) return NULL; iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)handle; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } return iostr; } /** * raptor_free_iostream: * @iostr: iostream object * * Destructor - destroy an iostream. **/ void raptor_free_iostream(raptor_iostream *iostr) { if(!iostr) return; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) raptor_iostream_write_end(iostr); if(iostr->handler->finish) iostr->handler->finish(iostr->user_data); if((iostr->flags & RAPTOR_IOSTREAM_FLAGS_FREE_HANDLER)) RAPTOR_FREE(raptor_iostream_handler, iostr->handler); RAPTOR_FREE(raptor_iostream, iostr); } /** * raptor_iostream_write_byte: * @byte: byte to write * @iostr: raptor iostream * * Write a byte to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_byte(const int byte, raptor_iostream *iostr) { iostr->offset++; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return 1; if(!iostr->handler->write_byte) return 1; if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_WRITE)) return 1; return iostr->handler->write_byte(iostr->user_data, byte); } /** * raptor_iostream_write_bytes: * @ptr: start of objects to write * @size: size of object * @nmemb: number of objects * @iostr: raptor iostream * * Write bytes to the iostream. * * Return value: number of objects actually written, which may be less than nmemb. <0 on failure **/ int raptor_iostream_write_bytes(const void *ptr, size_t size, size_t nmemb, raptor_iostream *iostr) { int nobj; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return -1; if(!iostr->handler->write_bytes) return -1; if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_WRITE)) return -1; nobj = iostr->handler->write_bytes(iostr->user_data, ptr, size, nmemb); if(nobj > 0) iostr->offset += (size * nobj); return nobj; } /** * raptor_iostream_string_write: * @string: string * @iostr: raptor iostream * * Write a NULL-terminated string to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_string_write(const void *string, raptor_iostream *iostr) { size_t len = strlen((const char*)string); int nobj = raptor_iostream_write_bytes(string, 1, len, iostr); return (RAPTOR_BAD_CAST(size_t, nobj) != len); } /** * raptor_iostream_counted_string_write: * @string: string * @len: string length * @iostr: raptor iostream * * Write a counted string to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_counted_string_write(const void *string, size_t len, raptor_iostream *iostr) { int nobj = raptor_iostream_write_bytes(string, 1, len, iostr); return (RAPTOR_BAD_CAST(size_t, nobj) != len); } /** * raptor_uri_write: * @uri: URI * @iostr: raptor iostream * * Write a raptor URI to the iostream. * * Return value: non-0 on failure **/ int raptor_uri_write(raptor_uri* uri, raptor_iostream* iostr) { size_t len; const void *string = raptor_uri_as_counted_string(uri, &len); int nobj = raptor_iostream_write_bytes(string, 1, len, iostr); return (RAPTOR_BAD_CAST(size_t, nobj) != len); } /** * raptor_iostream_write_end: * @iostr: raptor iostream * * End writing to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_write_end(raptor_iostream *iostr) { int rc = 0; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return 1; if(iostr->handler->write_end) rc = iostr->handler->write_end(iostr->user_data); iostr->flags |= RAPTOR_IOSTREAM_FLAGS_EOF; return rc; } /** * raptor_stringbuffer_write: * @sb: #raptor_stringbuffer to write * @iostr: raptor iostream * * Write a stringbuffer to an iostream. * * Return value: non-0 on failure **/ int raptor_stringbuffer_write(raptor_stringbuffer *sb, raptor_iostream* iostr) { size_t length; if(!sb) return 1; length = raptor_stringbuffer_length(sb); if(length) { int nobj = raptor_iostream_write_bytes(raptor_stringbuffer_as_string(sb), 1, length, iostr); return (RAPTOR_BAD_CAST(size_t, nobj) != length); } else return 0; } /** * raptor_iostream_decimal_write: * @integer: integer to format as decimal * @iostr: raptor iostream * * Write an integer in decimal to the iostream. * * Return value: non-0 on failure **/ int raptor_iostream_decimal_write(int integer, raptor_iostream* iostr) { /* enough for 64 bit signed integer * INT64_MAX is 9223372036854775807 (19 digits) + 1 for sign */ unsigned char buf[20]; unsigned char *p; int i = integer; size_t length = 1; int nobj; if(integer < 0) { length++; i= -integer; } while(i /= 10) length++; p = buf+length-1; i = integer; if(i < 0) i= -i; do { *p-- ='0'+(i %10); i /= 10; } while(i); if(integer < 0) *p= '-'; nobj = raptor_iostream_write_bytes(buf, 1, length, iostr); return (RAPTOR_BAD_CAST(size_t, nobj) != length); } /** * raptor_iostream_hexadecimal_write: * @integer: unsigned integer to format as hexadecimal * @width: field width * @iostr: raptor iostream * * Write an integer in hexadecimal to the iostream. * * Always 0-fills the entire field and writes in uppercase A-F * * Return value: non-0 on failure **/ int raptor_iostream_hexadecimal_write(unsigned int integer, int width, raptor_iostream* iostr) { char *buf; int nobj; if(width < 1) return 1; buf = RAPTOR_MALLOC(char*, width + 1); if(!buf) return 1; (void)raptor_format_integer(buf, width + 1, integer, /* base */ 16, width, '0'); nobj = raptor_iostream_write_bytes(buf, 1, width, iostr); RAPTOR_FREE(char*, buf); return (nobj != width); } /** * raptor_iostream_read_bytes: * @ptr: start of buffer to read objects into * @size: size of object * @nmemb: number of objects to read * @iostr: raptor iostream * * Read bytes to the iostream. * * Return value: number of objects read, 0 or less than nmemb on EOF, <0 on failure **/ int raptor_iostream_read_bytes(void *ptr, size_t size, size_t nmemb, raptor_iostream *iostr) { int count; if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_READ)) return -1; if(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) return 0; if(!iostr->handler->read_bytes) count= -1; else count = iostr->handler->read_bytes(iostr->user_data, ptr, size, nmemb); if(count > 0) iostr->offset += (size*count); if(RAPTOR_BAD_CAST(size_t, count) < nmemb) iostr->flags |= RAPTOR_IOSTREAM_FLAGS_EOF; return count; } /** * raptor_iostream_read_eof: * @iostr: raptor read iostream * * Check if an read iostream has ended * * Return value: non-0 if EOF (or not a read iostream) **/ int raptor_iostream_read_eof(raptor_iostream *iostr) { /* Streams without read are always EOF */ if(!(iostr->mode & RAPTOR_IOSTREAM_MODE_READ)) return 1; if(!(iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) && iostr->handler->read_eof && iostr->handler->read_eof(iostr->user_data)) iostr->flags |= RAPTOR_IOSTREAM_FLAGS_EOF; return ((iostr->flags & RAPTOR_IOSTREAM_FLAGS_EOF) != 0); } struct raptor_read_string_iostream_context { /* input buffer */ void* string; size_t length; /* pointer into buffer */ size_t offset; }; /* Local handlers for reading from a string */ static void raptor_read_string_iostream_finish(void *user_data) { struct raptor_read_string_iostream_context* con; con = (struct raptor_read_string_iostream_context*)user_data; RAPTOR_FREE(raptor_read_string_iostream_context, con); return; } static int raptor_read_string_iostream_read_bytes(void *user_data, void *ptr, size_t size, size_t nmemb) { struct raptor_read_string_iostream_context* con; size_t avail; size_t blen; if(!ptr || size <= 0 || !nmemb) return -1; con = (struct raptor_read_string_iostream_context*)user_data; if(con->offset >= con->length) return 0; avail = (con->length - con->offset) / size; if(avail > nmemb) avail = nmemb; blen = (avail * size); memcpy(ptr, (char*)con->string + con->offset, blen); con->offset += blen; return RAPTOR_BAD_CAST(int, avail); } static int raptor_read_string_iostream_read_eof(void *user_data) { struct raptor_read_string_iostream_context* con; con = (struct raptor_read_string_iostream_context*)user_data; return (con->offset >= con->length); } static const raptor_iostream_handler raptor_iostream_read_string_handler = { /* .version = */ 2, /* .init = */ NULL, /* .finish = */ raptor_read_string_iostream_finish, /* .write_byte = */ NULL, /* .write_bytes = */ NULL, /* .write_end = */ NULL, /* .read_bytes = */ raptor_read_string_iostream_read_bytes, /* .read_eof = */ raptor_read_string_iostream_read_eof }; /** * raptor_new_iostream_from_string: * @world: raptor world * @string: pointer to string * @length: length of string * * Constructor - create a new iostream reading from a string. * * Return value: new #raptor_iostream object or NULL on failure **/ raptor_iostream* raptor_new_iostream_from_string(raptor_world *world, void *string, size_t length) { raptor_iostream* iostr; struct raptor_read_string_iostream_context* con; const raptor_iostream_handler* handler; const unsigned int mode = RAPTOR_IOSTREAM_MODE_READ; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!string) return NULL; raptor_world_open(world); handler = &raptor_iostream_read_string_handler; if(!raptor_iostream_check_handler(handler, mode)) return NULL; iostr = RAPTOR_CALLOC(raptor_iostream*, 1, sizeof(*iostr)); if(!iostr) return NULL; con = RAPTOR_CALLOC(struct raptor_read_string_iostream_context*, 1, sizeof(*con)); if(!con) { RAPTOR_FREE(raptor_iostream, iostr); return NULL; } con->string = string; con->length = length; iostr->world = world; iostr->handler = handler; iostr->user_data = (void*)con; iostr->mode = mode; if(iostr->handler->init && iostr->handler->init(iostr->user_data)) { raptor_free_iostream(iostr); return NULL; } return iostr; } /** * raptor_iostream_tell: * @iostr: raptor iostream * * Get the offset in the iostream. * * Return value: offset in iostream **/ unsigned long raptor_iostream_tell(raptor_iostream *iostr) { return RAPTOR_BAD_CAST(unsigned long, iostr->offset); } /* internal */ raptor_world* raptor_iostream_get_world(raptor_iostream *iostr) { return iostr->world; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); static const char *program; #define READ_BUFFER_SIZE 256 static int test_write_to_filename(raptor_world *world, const char* filename, const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr = NULL; unsigned long count; int rc = 0; const char* const label="write iostream to filename"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s '%s'\n", program, label, filename); #endif iostr = raptor_new_iostream_to_filename(world, filename); if(!iostr) { fprintf(stderr, "%s: Failed to create %s '%s'\n", program, label, filename); rc = 1; goto tidy; } raptor_iostream_write_bytes(test_string, 1, test_string_len, iostr); raptor_iostream_write_byte('\n', iostr); count = raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc = 1; goto tidy; } tidy: if(iostr) raptor_free_iostream(iostr); remove(filename); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_write_to_file_handle(raptor_world *world, FILE* handle, const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr = NULL; unsigned long count; int rc = 0; const char* const label="write iostream to file handle"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr = raptor_new_iostream_to_file_handle(world, handle); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc = 1; goto tidy; } raptor_iostream_write_bytes(test_string, 1, test_string_len, iostr); raptor_iostream_write_byte('\n', iostr); count = raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc = 1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_write_to_string(raptor_world *world, const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr = NULL; unsigned long count; int rc = 0; void *string = NULL; size_t string_len; const char* const label="write iostream to a string"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr = raptor_new_iostream_to_string(world, &string, &string_len, NULL); if(!iostr) { fprintf(stderr, "%s: Failed to create write iostream to string\n", program); rc = 1; goto tidy; } raptor_iostream_write_bytes(test_string, 1, test_string_len, iostr); raptor_iostream_write_byte('\n', iostr); count = raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc = 1; } raptor_free_iostream(iostr); iostr = NULL; if(!string) { fprintf(stderr, "%s: %s failed to create a string\n", program, label); return 1; } if(string_len != count) { fprintf(stderr, "%s: %s created a string length %d, expected %d\n", program, label, (int)string_len, (int)count); return 1; } tidy: if(string) raptor_free_memory(string); if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_write_to_sink(raptor_world *world, const char* test_string, size_t test_string_len, const unsigned int expected_bytes_count) { raptor_iostream *iostr = NULL; unsigned long count; int rc = 0; const char* const label="write iostream to sink"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr = raptor_new_iostream_to_sink(world); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc = 1; goto tidy; } raptor_iostream_write_bytes(test_string, 1, test_string_len, iostr); raptor_iostream_write_byte('\n', iostr); count = raptor_iostream_tell(iostr); if(count != expected_bytes_count) { fprintf(stderr, "%s: %s wrote %d bytes, expected %d\n", program, label, (int)count, expected_bytes_count); rc = 1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_filename(raptor_world *world, const char* filename, const char* test_string, size_t test_string_len, const int expected_len, const int expected_len2) { raptor_iostream *iostr = NULL; char buffer[READ_BUFFER_SIZE]; int count; int rc = 0; const char* const label="read iostream from filename"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s '%s'\n", program, label, filename); #endif iostr = raptor_new_iostream_from_filename(world, filename); if(!iostr) { fprintf(stderr, "%s: Failed to create %s '%s'\n", program, label, filename); rc = 1; goto tidy; } count = raptor_iostream_read_bytes(buffer, 1, test_string_len, iostr); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc = 1; goto tidy; } count = raptor_iostream_read_bytes(buffer, 1, test_string_len, iostr); if(count != expected_len2) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len2); rc = 1; goto tidy; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc = 1; goto tidy; } if(strncmp(buffer, test_string, test_string_len)) { fprintf(stderr, "%s: %s returned '%s' expected '%s'\n", program, label, buffer, test_string); rc = 1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_file_handle(raptor_world *world, FILE* handle, const char* test_string, size_t test_string_len, const unsigned int expected_len, const unsigned int expected_len2) { raptor_iostream *iostr = NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc = 0; const char* const label="read iostream from file handle"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr = raptor_new_iostream_from_file_handle(world, handle); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc = 1; goto tidy; } count = raptor_iostream_read_bytes(buffer, 1, test_string_len, iostr); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc = 1; } count = raptor_iostream_read_bytes(buffer, 1, test_string_len, iostr); if(count != expected_len2) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len2); rc = 1; goto tidy; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc = 1; } if(strncmp(buffer, test_string, test_string_len)) { fprintf(stderr, "%s: %s returned '%s' expected '%s'\n", program, label, buffer, test_string); rc = 1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_string(raptor_world *world, const char* test_string, size_t test_string_len, const unsigned int expected_len) { raptor_iostream *iostr = NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc = 0; const char* const label="read iostream from a string"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s\n", program, label); #endif iostr = raptor_new_iostream_from_string(world, (void*)test_string, test_string_len); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc = 1; goto tidy; } count = raptor_iostream_read_bytes(buffer, 1, test_string_len, iostr); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc = 1; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc = 1; } if(strncmp(buffer, test_string, test_string_len)) { fprintf(stderr, "%s: %s returned '%s' expected '%s'\n", program, label, buffer, test_string); rc = 1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } static int test_read_from_sink(raptor_world *world, size_t read_len, size_t expected_len) { raptor_iostream *iostr = NULL; char buffer[READ_BUFFER_SIZE]; unsigned long count; int rc = 0; const char* const label="read iostream from sink"; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Testing %s\n", program, label); #endif expected_len = 0; iostr = raptor_new_iostream_from_sink(world); if(!iostr) { fprintf(stderr, "%s: Failed to create %s\n", program, label); rc = 1; goto tidy; } count = raptor_iostream_read_bytes(buffer, 1, read_len, iostr); if(count != expected_len) { fprintf(stderr, "%s: %s read %d bytes, expected %d\n", program, label, (int)count, (int)expected_len); rc = 1; } if(!raptor_iostream_read_eof(iostr)) { fprintf(stderr, "%s: %s not EOF as expected\n", program, label); rc = 1; } tidy: if(iostr) raptor_free_iostream(iostr); if(rc) fprintf(stderr, "%s: FAILED Testing %s\n", program, label); return rc; } #define OUT_FILENAME "out.bin" #define OUT_BYTES_COUNT 14 #define TEST_STRING "Hello, world!" #define TEST_STRING_LEN 13 #define IN_FILENAME "in.bin" int main(int argc, char *argv[]) { raptor_world *world; FILE *handle = NULL; int failures = 0; program = raptor_basename(argv[0]); world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); /* Write tests */ failures+= test_write_to_filename(world, (const char*)OUT_FILENAME, TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); handle = fopen((const char*)OUT_FILENAME, "wb"); if(!handle) { fprintf(stderr, "%s: Failed to create write file handle to file %s\n", program, OUT_FILENAME); failures++; } else { failures+= test_write_to_file_handle(world, handle, TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); fclose(handle); remove(OUT_FILENAME); } failures+= test_write_to_string(world, TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); failures+= test_write_to_sink(world, TEST_STRING, TEST_STRING_LEN, (int)OUT_BYTES_COUNT); remove(OUT_FILENAME); /* Read tests */ handle = fopen((const char*)IN_FILENAME, "wb"); if(!handle) { fprintf(stderr, "%s: Failed to create write handle to file %s\n", program, IN_FILENAME); failures++; } else { fwrite(TEST_STRING, 1, TEST_STRING_LEN, handle); fclose(handle); failures+= test_read_from_filename(world, (const char*)IN_FILENAME, TEST_STRING, TEST_STRING_LEN, TEST_STRING_LEN, 0); handle = fopen((const char*)IN_FILENAME, "rb"); if(!handle) { fprintf(stderr, "%s: Failed to create read file handle to file %s\n", program, IN_FILENAME); failures++; } else { failures+= test_read_from_file_handle(world, handle, TEST_STRING, TEST_STRING_LEN, TEST_STRING_LEN, 0); fclose(handle); handle = NULL; } } failures+= test_read_from_string(world, TEST_STRING, TEST_STRING_LEN, TEST_STRING_LEN); failures+= test_read_from_sink(world, TEST_STRING_LEN, 0); remove(IN_FILENAME); raptor_free_world(world); return failures; } #endif raptor2-2.0.15/src/raptor_config.h.in0000644000175000017500000002122512425344603014317 00000000000000/* src/raptor_config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* have to check C99 vsnprintf at runtime because cross compiling */ #undef CHECK_VSNPRINTF_RUNTIME /* Flex version as a decimal */ #undef FLEX_VERSION_DECIMAL /* vsnprintf has C99 compatible return value */ #undef HAVE_C99_VSNPRINTF /* Have curl/curl.h */ #undef HAVE_CURL_CURL_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FETCH_H /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* INN parsedate function present */ #undef HAVE_INN_PARSEDATE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_HASH_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_HTMLPARSER_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_NANOHTTP_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_PARSER_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXML_SAX2_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBXSLT_XSLT_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `qsort_r' function. */ #undef HAVE_QSORT_R /* Define to 1 if you have the `qsort_s' function. */ #undef HAVE_QSORT_S /* Raptor raptor_parse_date available */ #undef HAVE_RAPTOR_PARSE_DATE /* Define to 1 if you have the `setjmp' function. */ #undef HAVE_SETJMP /* Define to 1 if you have the header file. */ #undef HAVE_SETJMP_H /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `stricmp' function. */ #undef HAVE_STRICMP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the `xmlCtxtUseOptions' function. */ #undef HAVE_XMLCTXTUSEOPTIONS /* Define to 1 if you have the `xmlSAX2InternalSubset' function. */ #undef HAVE_XMLSAX2INTERNALSUBSET /* YAJL has API version 2 */ #undef HAVE_YAJL2 /* Define to 1 if you have the header file. */ #undef HAVE_YAJL_YAJL_PARSE_H /* Is __FUNCTION__ available */ #undef HAVE___FUNCTION__ /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if maintainer mode is enabled. */ #undef MAINTAINER_MODE /* need 'extern int optind' declaration? */ #undef NEED_OPTIND_DECLARATION /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if debug messages are enabled. */ #undef RAPTOR_DEBUG /* Use ICU for Unicode NFC check */ #undef RAPTOR_ICU_NFC /* does libxml struct xmlEntity have a field etype */ #undef RAPTOR_LIBXML_ENTITY_ETYPE /* does libxml struct xmlEntity have a field name_length */ #undef RAPTOR_LIBXML_ENTITY_NAME_LENGTH /* does libxml have HTML_PARSE_NONET */ #undef RAPTOR_LIBXML_HTML_PARSE_NONET /* does libxml xmlSAXHandler have externalSubset field */ #undef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET /* does libxml xmlSAXHandler have initialized field */ #undef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED /* does libxml have XML_PARSE_NONET */ #undef RAPTOR_LIBXML_XML_PARSE_NONET /* Minimum supported package version */ #undef RAPTOR_MIN_VERSION_DECIMAL /* Building GRDDL parser */ #undef RAPTOR_PARSER_GRDDL /* Building guess parser */ #undef RAPTOR_PARSER_GUESS /* Building JSON parser */ #undef RAPTOR_PARSER_JSON /* Building N-Quads parser */ #undef RAPTOR_PARSER_NQUADS /* Building N-Triples parser */ #undef RAPTOR_PARSER_NTRIPLES /* Building RDFA parser */ #undef RAPTOR_PARSER_RDFA /* Building RDF/XML parser */ #undef RAPTOR_PARSER_RDFXML /* Building RSS Tag Soup parser */ #undef RAPTOR_PARSER_RSS /* Building TRiG parser */ #undef RAPTOR_PARSER_TRIG /* Building Turtle parser */ #undef RAPTOR_PARSER_TURTLE /* Building Atom 1.0 serializer */ #undef RAPTOR_SERIALIZER_ATOM /* Building GraphViz DOT serializer */ #undef RAPTOR_SERIALIZER_DOT /* Building HTML Table serializer */ #undef RAPTOR_SERIALIZER_HTML /* Building JSON serializer */ #undef RAPTOR_SERIALIZER_JSON /* Building N-Quads serializer */ #undef RAPTOR_SERIALIZER_NQUADS /* Building N-Triples serializer */ #undef RAPTOR_SERIALIZER_NTRIPLES /* Building RDF/XML serializer */ #undef RAPTOR_SERIALIZER_RDFXML /* Building RDF/XML-abbreviated serializer */ #undef RAPTOR_SERIALIZER_RDFXML_ABBREV /* Building RSS 1.0 serializer */ #undef RAPTOR_SERIALIZER_RSS_1_0 /* Building Turtle serializer */ #undef RAPTOR_SERIALIZER_TURTLE /* Release version as a decimal */ #undef RAPTOR_VERSION_DECIMAL /* Major version number */ #undef RAPTOR_VERSION_MAJOR /* Minor version number */ #undef RAPTOR_VERSION_MINOR /* Release version number */ #undef RAPTOR_VERSION_RELEASE /* Have libcurl WWW library */ #undef RAPTOR_WWW_LIBCURL /* Have libfetch WWW library */ #undef RAPTOR_WWW_LIBFETCH /* Have libxml available as a WWW library */ #undef RAPTOR_WWW_LIBXML /* No WWW library */ #undef RAPTOR_WWW_NONE /* Check XML 1.1 Names */ #undef RAPTOR_XML_1_1 /* Use libxml XML parser */ #undef RAPTOR_XML_LIBXML /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif raptor2-2.0.15/src/raptor_concepts.c0000644000175000017500000001635412246407047014270 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_concepts.c - Raptor RDF namespace concepts * * Copyright (C) 2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * http://www.w3.org/TR/rdf-syntax-grammar/#section-grammar-summary * * coreSyntaxTerms := rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType | rdf:resource | rdf:nodeID | rdf:datatype * syntaxTerms := coreSyntaxTerms | rdf:Description | rdf:li * oldTerms := rdf:aboutEach | rdf:aboutEachPrefix | rdf:bagID * * nodeElementURIs := anyURI - ( coreSyntaxTerms | rdf:li | oldTerms ) * propertyElementURIs := anyURI - ( coreSyntaxTerms | rdf:Description | oldTerms ) * propertyAttributeURIs := anyURI - ( coreSyntaxTerms | rdf:Description | rdf:li | oldTerms ) * * So, forbidden terms in the RDF namespace are: * nodeElements * RDF | ID | about | bagID | parseType | resource | nodeID | datatype | * li | aboutEach | aboutEachPrefix | bagID * * propertyElements * RDF | ID | about | bagID | parseType | resource | nodeID | datatype | * Description | aboutEach | aboutEachPrefix | bagID * * propertyAttributes * RDF | ID | about | bagID | parseType | resource | nodeID | datatype | * Description | li | aboutEach | aboutEachPrefix | bagID * * Information about rdf attributes: * raptor_term_type type * Set when the attribute is a property rather than just syntax * NOTE: raptor_rdfxml_process_property_attributes() expects only * RAPTOR_TERM_TYPE_NONE, * RAPTOR_TERM_TYPE_LITERAL or RAPTOR_TERM_TYPE_URI * allowed_unprefixed_on_attribute * If allowed for legacy reasons to be unprefixed as an attribute. * */ /* (number of terms in RDF NS) + 1: for final sentinel row */ const raptor_rdf_ns_term_info raptor_rdf_ns_terms_info[RDF_NS_LAST + 2] = { /* term allowed boolean flags: * node element; property element; property attr; unprefixed attr */ /* syntax only */ { "RDF", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 0 }, /* just root */ { "Description", RAPTOR_TERM_TYPE_UNKNOWN, 1, 0, 0, 0 }, { "li", RAPTOR_TERM_TYPE_UNKNOWN, 0, 1, 0, 0 }, { "about", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 1 }, { "aboutEach", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 0 }, /* deprecated */ { "aboutEachPrefix", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 0 }, /* deprecated */ { "ID", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 1 }, { "bagID", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 1 }, { "resource", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 1 }, { "parseType", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 1 }, { "nodeID", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 0 }, { "datatype", RAPTOR_TERM_TYPE_UNKNOWN, 0, 0, 0, 0 }, /* rdf:Property-s */ { "type", RAPTOR_TERM_TYPE_URI , 1, 1, 1, 1 }, { "value", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "subject", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "predicate", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "object", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "first", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "rest", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, /* rdfs:Class-s */ { "Seq", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "Bag", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "Alt", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "Statement", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "Property", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "List", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, /* rdfs:Resource-s */ { "nil", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, /* datatypes */ { "XMLLiteral", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, { "PlainLiteral", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, /* RDF 1.1 */ /* http://www.w3.org/TR/2013/WD-rdf11-concepts-20130723/#section-html */ { "HTML", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, /* http://www.w3.org/TR/2013/WD-rdf11-concepts-20130723/#section-Datatypes */ { "langString", RAPTOR_TERM_TYPE_LITERAL, 1, 1, 1, 0 }, /* internal */ { NULL , RAPTOR_TERM_TYPE_UNKNOWN, 1, 1, 1, 0 } }; int raptor_concepts_init(raptor_world* world) { int i; for(i = 0; i < RDF_NS_LAST + 1; i++) { unsigned char* name = (unsigned char*)raptor_rdf_ns_terms_info[i].name; world->concepts[i] = raptor_new_uri_for_rdf_concept(world, name); if(!world->concepts[i]) return 1; /* only make a term for things that are not syntax-only */ /* OR use: raptor_rdf_ns_terms_info[i].allowed_as_nodeElement || raptor_rdf_ns_terms_info[i].allowed_as_propertyElement || raptor_rdf_ns_terms_info[i].allowed_as_propertyAttribute) */ if(i > RDF_NS_LAST_SYNTAX_TERM) { world->terms[i] = raptor_new_term_from_uri(world, world->concepts[i]); if(!world->terms[i]) return 1; } } world->xsd_namespace_uri = raptor_new_uri(world, raptor_xmlschema_datatypes_namespace_uri); if(!world->xsd_namespace_uri) return 1; world->xsd_boolean_uri = raptor_new_uri_from_uri_local_name(world, world->xsd_namespace_uri, (const unsigned char*)"boolean"); if(!world->xsd_boolean_uri) return 1; world->xsd_decimal_uri = raptor_new_uri_from_uri_local_name(world, world->xsd_namespace_uri, (const unsigned char*)"decimal"); if(!world->xsd_decimal_uri) return 1; world->xsd_double_uri = raptor_new_uri_from_uri_local_name(world, world->xsd_namespace_uri, (const unsigned char*)"double"); if(!world->xsd_double_uri) return 1; world->xsd_integer_uri = raptor_new_uri_from_uri_local_name(world, world->xsd_namespace_uri, (const unsigned char*)"integer"); if(!world->xsd_integer_uri) return 1; return 0; } void raptor_concepts_finish(raptor_world* world) { int i; for(i = 0; i < RDF_NS_LAST + 1; i++) { raptor_uri* concept_uri = world->concepts[i]; if(concept_uri) { raptor_free_uri(concept_uri); world->concepts[i] = NULL; } if(world->terms[i]) raptor_free_term(world->terms[i]); } if(world->xsd_boolean_uri) raptor_free_uri(world->xsd_boolean_uri); if(world->xsd_decimal_uri) raptor_free_uri(world->xsd_decimal_uri); if(world->xsd_double_uri) raptor_free_uri(world->xsd_double_uri); if(world->xsd_integer_uri) raptor_free_uri(world->xsd_integer_uri); if(world->xsd_namespace_uri) raptor_free_uri(world->xsd_namespace_uri); } raptor2-2.0.15/src/raptor_serialize.c0000644000175000017500000005013612425333224014427 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize.c - Raptor Serializer API * * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* prototypes for helper functions */ static raptor_serializer_factory* raptor_get_serializer_factory(raptor_world* world, const char *name); /* helper methods */ static void raptor_free_serializer_factory(raptor_serializer_factory* factory) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(factory, raptor_serializer_factory); if(factory->finish_factory) factory->finish_factory(factory); RAPTOR_FREE(raptor_serializer_factory, factory); } /* class methods */ int raptor_serializers_init(raptor_world* world) { int rc = 0; world->serializers = raptor_new_sequence((raptor_data_free_handler)raptor_free_serializer_factory, NULL); if(!world->serializers) return 1; #ifdef RAPTOR_SERIALIZER_NTRIPLES rc += raptor_init_serializer_ntriples(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_TURTLE rc += raptor_init_serializer_turtle(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_RDFXML_ABBREV rc += raptor_init_serializer_rdfxmla(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_RDFXML rc += raptor_init_serializer_rdfxml(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_RSS_1_0 rc += raptor_init_serializer_rss10(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_ATOM rc += raptor_init_serializer_atom(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_DOT rc += raptor_init_serializer_dot(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_JSON rc += raptor_init_serializer_json(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_HTML rc += raptor_init_serializer_html(world) != 0; #endif #ifdef RAPTOR_SERIALIZER_NQUADS rc += raptor_init_serializer_nquads(world) != 0; #endif return rc; } /* * raptor_serializers_finish - delete all the registered serializers */ void raptor_serializers_finish(raptor_world* world) { if(world->serializers) { raptor_free_sequence(world->serializers); world->serializers = NULL; } } /* * raptor_serializer_register_factory: * @world: raptor_world object * @name: the short syntax name * @label: readable label for syntax * @mime_type: MIME type of the syntax generated by the serializer (or NULL) * @uri_string: URI string of the syntax (or NULL) * @factory: pointer to function to call to register the factory * * INTERNAL - Register a syntax that can be generated by a serializer factory * * Return value: non-0 on failure **/ RAPTOR_EXTERN_C raptor_serializer_factory* raptor_serializer_register_factory(raptor_world* world, int (*factory) (raptor_serializer_factory*)) { raptor_serializer_factory *serializer; serializer = RAPTOR_CALLOC(raptor_serializer_factory*, 1, sizeof(*serializer)); if(!serializer) return NULL; serializer->world = world; serializer->desc.mime_types = NULL; if(raptor_sequence_push(world->serializers, serializer)) return NULL; /* on error, serializer is already freed by the sequence */ /* Call the serializer registration function on the new object */ if(factory(serializer)) return NULL; /* serializer is owned and freed by the serializers sequence */ if(raptor_syntax_description_validate(&serializer->desc)) { raptor_log_error(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Serializer description failed to validate\n"); goto tidy; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Registered serializer %s\n", serializer->desc.names[0]); #endif return serializer; /* Clean up on failure */ tidy: raptor_free_serializer_factory(serializer); return NULL; } /** * raptor_get_serializer_factory: * @world: raptor_world object * @name: the factory name or NULL for the default factory * * Get a serializer factory by name. * * Return value: the factory object or NULL if there is no such factory **/ static raptor_serializer_factory* raptor_get_serializer_factory(raptor_world* world, const char *name) { raptor_serializer_factory *factory = NULL; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); /* return 1st serializer if no particular one wanted - why? */ if(!name) { factory = (raptor_serializer_factory *)raptor_sequence_get_at(world->serializers, 0); if(!factory) { RAPTOR_DEBUG1("No (default) serializers registered\n"); return NULL; } } else { int i; for(i = 0; (factory = (raptor_serializer_factory*)raptor_sequence_get_at(world->serializers, i)); i++) { int namei; const char* fname; for(namei = 0; (fname = factory->desc.names[namei]); namei++) { if(!strcmp(fname, name)) break; } if(fname) break; } } return factory; } /** * raptor_world_get_serializers_count: * @world: world object * * Get number of serializers * * Return value: number of serializers **/ int raptor_world_get_serializers_count(raptor_world* world) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); return raptor_sequence_size(world->serializers); } /** * raptor_world_get_serializer_description: * @world: world object * @counter: index into the list of serializers * * Get serializer descriptive syntax information * * Return value: description or NULL if counter is out of range **/ const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, unsigned int counter) { raptor_serializer_factory *factory; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); factory = (raptor_serializer_factory*)raptor_sequence_get_at(world->serializers, counter); if(!factory) return NULL; return &factory->desc; } /** * raptor_world_is_serializer_name: * @world: raptor_world object * @name: the syntax name * * Check name of a serializer. * * Return value: non 0 if name is a known syntax name */ int raptor_world_is_serializer_name(raptor_world* world, const char *name) { if(!name) return 0; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0); raptor_world_open(world); return (raptor_get_serializer_factory(world, name) != NULL); } /** * raptor_new_serializer: * @world: raptor_world object * @name: the serializer name or NULL for default syntax * * Constructor - create a new raptor_serializer object. * * Return value: a new #raptor_serializer object or NULL on failure */ raptor_serializer* raptor_new_serializer(raptor_world* world, const char *name) { raptor_serializer_factory* factory; raptor_serializer* rdf_serializer; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); factory = raptor_get_serializer_factory(world, name); if(!factory) return NULL; rdf_serializer = RAPTOR_CALLOC(raptor_serializer*, 1, sizeof(*rdf_serializer)); if(!rdf_serializer) return NULL; rdf_serializer->world = world; rdf_serializer->context = RAPTOR_CALLOC(void*, 1, factory->context_length); if(!rdf_serializer->context) { raptor_free_serializer(rdf_serializer); return NULL; } rdf_serializer->factory = factory; raptor_object_options_init(&rdf_serializer->options, RAPTOR_OPTION_AREA_SERIALIZER); if(factory->init(rdf_serializer, name)) { raptor_free_serializer(rdf_serializer); return NULL; } return rdf_serializer; } /** * raptor_serializer_start_to_iostream: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @iostream: #raptor_iostream to write serialization to * * Start serialization to an iostream with given base URI * * The passed in @iostream does not become owned by the serializer * and can be used by the caller after serializing is done. It * must be destroyed by the caller. * * Return value: non-0 on failure. **/ int raptor_serializer_start_to_iostream(raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream) { if(rdf_serializer->base_uri) raptor_free_uri(rdf_serializer->base_uri); if(!iostream) return 1; if(uri) uri = raptor_uri_copy(uri); rdf_serializer->base_uri = uri; rdf_serializer->locator.uri = uri; rdf_serializer->locator.line = rdf_serializer->locator.column = 0; rdf_serializer->iostream = iostream; rdf_serializer->free_iostream_on_end = 0; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serializer_start_to_filename: * @rdf_serializer: the #raptor_serializer * @filename: filename to serialize to * * Start serializing to a filename. * * Return value: non-0 on failure. **/ int raptor_serializer_start_to_filename(raptor_serializer *rdf_serializer, const char *filename) { unsigned char *uri_string = raptor_uri_filename_to_uri_string(filename); if(!uri_string) return 1; if(rdf_serializer->base_uri) raptor_free_uri(rdf_serializer->base_uri); rdf_serializer->base_uri = raptor_new_uri(rdf_serializer->world, uri_string); rdf_serializer->locator.uri = rdf_serializer->base_uri; rdf_serializer->locator.line = rdf_serializer->locator.column = 0; RAPTOR_FREE(char*, uri_string); rdf_serializer->iostream = raptor_new_iostream_to_filename(rdf_serializer->world, filename); if(!rdf_serializer->iostream) return 1; rdf_serializer->free_iostream_on_end = 1; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serializer_start_to_string: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @string_p: pointer to location to hold string * @length_p: pointer to location to hold length of string (or NULL) * * Start serializing to a string. * * Return value: non-0 on failure. **/ int raptor_serializer_start_to_string(raptor_serializer *rdf_serializer, raptor_uri *uri, void **string_p, size_t *length_p) { if(rdf_serializer->base_uri) raptor_free_uri(rdf_serializer->base_uri); if(uri) rdf_serializer->base_uri = raptor_uri_copy(uri); else rdf_serializer->base_uri = NULL; rdf_serializer->locator.uri = rdf_serializer->base_uri; rdf_serializer->locator.line = rdf_serializer->locator.column = 0; rdf_serializer->iostream = raptor_new_iostream_to_string(rdf_serializer->world, string_p, length_p, NULL); if(!rdf_serializer->iostream) return 1; rdf_serializer->free_iostream_on_end = 1; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serializer_start_to_file_handle: * @rdf_serializer: the #raptor_serializer * @uri: base URI or NULL if no base URI is required * @fh: FILE* to serialize to * * Start serializing to a FILE*. * * NOTE: This does not fclose the handle when it is finished. * * Return value: non-0 on failure. **/ int raptor_serializer_start_to_file_handle(raptor_serializer *rdf_serializer, raptor_uri *uri, FILE *fh) { if(rdf_serializer->base_uri) raptor_free_uri(rdf_serializer->base_uri); if(uri) rdf_serializer->base_uri = raptor_uri_copy(uri); else rdf_serializer->base_uri = NULL; rdf_serializer->locator.uri = rdf_serializer->base_uri; rdf_serializer->locator.line = rdf_serializer->locator.column = 0; rdf_serializer->iostream = raptor_new_iostream_to_file_handle(rdf_serializer->world, fh); if(!rdf_serializer->iostream) return 1; rdf_serializer->free_iostream_on_end = 1; if(rdf_serializer->factory->serialize_start) return rdf_serializer->factory->serialize_start(rdf_serializer); return 0; } /** * raptor_serializer_set_namespace: * @rdf_serializer: the #raptor_serializer * @uri: #raptor_uri of namespace or NULL * @prefix: prefix to use or NULL * * set a namespace uri/prefix mapping for serializing. * * return value: non-0 on failure. **/ int raptor_serializer_set_namespace(raptor_serializer* rdf_serializer, raptor_uri *uri, const unsigned char *prefix) { if(prefix && !*prefix) prefix = NULL; if(rdf_serializer->factory->declare_namespace) return rdf_serializer->factory->declare_namespace(rdf_serializer, uri, prefix); return 1; } /** * raptor_serializer_set_namespace_from_namespace: * @rdf_serializer: the #raptor_serializer * @nspace: #raptor_namespace to set * * Set a namespace uri/prefix mapping for serializing from an existing namespace. * * Return value: non-0 on failure. **/ int raptor_serializer_set_namespace_from_namespace(raptor_serializer* rdf_serializer, raptor_namespace *nspace) { if(rdf_serializer->factory->declare_namespace_from_namespace) return rdf_serializer->factory->declare_namespace_from_namespace(rdf_serializer, nspace); else if(rdf_serializer->factory->declare_namespace) return rdf_serializer->factory->declare_namespace(rdf_serializer, raptor_namespace_get_uri(nspace), raptor_namespace_get_prefix(nspace)); return 1; } /** * raptor_serializer_serialize_statement: * @rdf_serializer: the #raptor_serializer * @statement: #raptor_statement to serialize to a syntax * * Serialize a statement. * * Return value: non-0 on failure. **/ int raptor_serializer_serialize_statement(raptor_serializer* rdf_serializer, raptor_statement *statement) { if(!rdf_serializer->iostream) return 1; return rdf_serializer->factory->serialize_statement(rdf_serializer, statement); } /** * raptor_serializer_serialize_end: * @rdf_serializer: the #raptor_serializer * * End a serialization. * * Return value: non-0 on failure. **/ int raptor_serializer_serialize_end(raptor_serializer *rdf_serializer) { int rc; if(!rdf_serializer->iostream) return 1; if(rdf_serializer->factory->serialize_end) rc = rdf_serializer->factory->serialize_end(rdf_serializer); else rc = 0; if(rdf_serializer->iostream) { if(rdf_serializer->free_iostream_on_end) raptor_free_iostream(rdf_serializer->iostream); rdf_serializer->iostream = NULL; } return rc; } /** * raptor_free_serializer: * @rdf_serializer: #raptor_serializer object * * Destructor - destroy a raptor_serializer object. * **/ void raptor_free_serializer(raptor_serializer* rdf_serializer) { if(!rdf_serializer) return; if(rdf_serializer->factory) rdf_serializer->factory->terminate(rdf_serializer); if(rdf_serializer->context) RAPTOR_FREE(raptor_serializer_context, rdf_serializer->context); if(rdf_serializer->base_uri) raptor_free_uri(rdf_serializer->base_uri); raptor_object_options_clear(&rdf_serializer->options); RAPTOR_FREE(raptor_serializer, rdf_serializer); } /** * raptor_serializer_get_iostream: * @serializer: #raptor_serializer object * * Get the current serializer iostream. * * Return value: the serializer's current iostream or NULL if **/ raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializer) { return serializer->iostream; } /** * raptor_serializer_set_option: * @serializer: #raptor_serializer serializer object * @option: option to set from enumerated #raptor_option values * @string: string option value (or NULL) * @integer: integer option value * * Set serializer option. * * If @string is not NULL and the option type is numeric, the string * value is converted to an integer and used in preference to @integer. * * If @string is NULL and the option type is not numeric, an error is * returned. * * The @string values used are copied. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: non 0 on failure or if the option is unknown **/ int raptor_serializer_set_option(raptor_serializer *serializer, raptor_option option, const char* string, int integer) { return raptor_object_options_set_option(&serializer->options, option, string, integer); } /** * raptor_serializer_get_option: * @serializer: #raptor_serializer serializer object * @option: option to get value * @string_p: pointer to where to store string value * @integer_p: pointer to where to store integer value * * Get serializer option. * * Any string value returned in *@string_p is shared and must * be copied by the caller. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: option value or < 0 for an illegal option **/ int raptor_serializer_get_option(raptor_serializer *serializer, raptor_option option, char** string_p, int* integer_p) { return raptor_object_options_get_option(&serializer->options, option, string_p, integer_p); } /** * raptor_serializer_get_locator: * @rdf_serializer: raptor serializer * * Get the serializer raptor locator object. * * Return value: raptor locator **/ raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serializer) { return &rdf_serializer->locator; } /** * raptor_serializer_get_world: * @rdf_serializer: raptor serializer * * Get the #raptor_world object associated with a serializer. * * Return value: raptor_world* pointer **/ raptor_world * raptor_serializer_get_world(raptor_serializer* rdf_serializer) { return rdf_serializer->world; } /** * raptor_serializer_get_description: * @rdf_serializer: #raptor_serializer serializer object * * Get description of the syntaxes of the serializer. * * The returned description is static and lives as long as the raptor * library (raptor world). * * Return value: description of syntax **/ const raptor_syntax_description* raptor_serializer_get_description(raptor_serializer *rdf_serializer) { return &rdf_serializer->factory->desc; } /** * raptor_serializer_flush: * @rdf_serializer: raptor serializer * * Flush the current serializer output and free any pending state * * In serializers that can generate blocks of content, this causes * the writing of any current pending block. For example in Turtle * this may write all pending triples. * * Return value: non-0 on failure **/ int raptor_serializer_flush(raptor_serializer *rdf_serializer) { int rc; if(rdf_serializer->factory->serialize_flush) rc = rdf_serializer->factory->serialize_flush(rdf_serializer); else rc = 0; return rc; } raptor2-2.0.15/src/raptor_librdfa.c0000644000175000017500000002725112325013605014042 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_librdfa.c - Raptor RDFA Parser via librdfa implementation * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include "rdfa.h" #include "rdfa_utils.h" #define RAPTOR_DEFAULT_RDFA_VERSION 0 /* * RDFA parser object */ struct raptor_librdfa_parser_context_s { /* librdfa object */ rdfacontext* context; /* static statement for use in passing to user code */ raptor_statement statement; /* 10 for 1.0 11 for 1.1 or otherwise is default (== 1.1) */ int rdfa_version; }; typedef struct raptor_librdfa_parser_context_s raptor_librdfa_parser_context; static int raptor_librdfa_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_librdfa_parser_context *librdfa_parser; int rdfa_version = RAPTOR_DEFAULT_RDFA_VERSION; librdfa_parser = (raptor_librdfa_parser_context*)rdf_parser->context; raptor_statement_init(&rdf_parser->statement, rdf_parser->world); if(!strcmp(name, "rdfa11")) rdfa_version = 11; else if(!strcmp(name, "rdfa10")) rdfa_version = 10; librdfa_parser->rdfa_version = rdfa_version; return 0; } static void raptor_librdfa_parse_terminate(raptor_parser* rdf_parser) { raptor_librdfa_parser_context *librdfa_parser; librdfa_parser = (raptor_librdfa_parser_context*)rdf_parser->context; if(librdfa_parser->context) { rdfa_parse_end(librdfa_parser->context); rdfa_free_context(librdfa_parser->context); librdfa_parser->context = NULL; } } static void raptor_librdfa_generate_statement(rdftriple* triple, void* callback_data) { raptor_parser* parser = (raptor_parser*)callback_data; raptor_statement *s = &parser->statement; raptor_term *subject_term = NULL; raptor_term *predicate_term = NULL; raptor_uri *predicate_uri = NULL; raptor_term *object_term = NULL; if(!parser->emitted_default_graph) { raptor_parser_start_graph(parser, NULL, 0); parser->emitted_default_graph++; } if(!parser->statement_handler) goto cleanup; if(!triple->subject || !triple->predicate || !triple->object) { #ifdef RAPTOR_DEBUG RAPTOR_FATAL1("Triple has NULL parts\n"); #endif rdfa_free_triple(triple); return; } if(triple->predicate[0] == '_') { raptor_parser_warning(parser, "Ignoring RDFa triple with blank node predicate %s.", triple->predicate); rdfa_free_triple(triple); return; } if(triple->object_type == RDF_TYPE_NAMESPACE_PREFIX) { #ifdef RAPTOR_DEBUG RAPTOR_FATAL1("Triple has namespace object type\n"); #endif rdfa_free_triple(triple); return; } if((triple->subject[0] == '_') && (triple->subject[1] == ':')) { subject_term = raptor_new_term_from_blank(parser->world, (const unsigned char*)triple->subject + 2); } else { raptor_uri* subject_uri; subject_uri = raptor_new_uri(parser->world, (const unsigned char*)triple->subject); subject_term = raptor_new_term_from_uri(parser->world, subject_uri); raptor_free_uri(subject_uri); subject_uri = NULL; } s->subject = subject_term; predicate_uri = raptor_new_uri(parser->world, (const unsigned char*)triple->predicate); if(!predicate_uri) goto cleanup; predicate_term = raptor_new_term_from_uri(parser->world, predicate_uri); raptor_free_uri(predicate_uri); predicate_uri = NULL; s->predicate = predicate_term; if(triple->object_type == RDF_TYPE_IRI) { if((triple->object[0] == '_') && (triple->object[1] == ':')) { object_term = raptor_new_term_from_blank(parser->world, (const unsigned char*)triple->object + 2); } else { raptor_uri* object_uri; object_uri = raptor_new_uri(parser->world, (const unsigned char*)triple->object); if(!object_uri) goto cleanup; object_term = raptor_new_term_from_uri(parser->world, object_uri); raptor_free_uri(object_uri); } } else if(triple->object_type == RDF_TYPE_PLAIN_LITERAL) { object_term = raptor_new_term_from_literal(parser->world, (const unsigned char*)triple->object, NULL, (const unsigned char*)triple->language); } else if(triple->object_type == RDF_TYPE_XML_LITERAL) { raptor_uri* datatype_uri; datatype_uri = raptor_new_uri_from_counted_string(parser->world, (const unsigned char*)raptor_xml_literal_datatype_uri_string, raptor_xml_literal_datatype_uri_string_len); object_term = raptor_new_term_from_literal(parser->world, (const unsigned char*)triple->object, datatype_uri, NULL); raptor_free_uri(datatype_uri); } else if(triple->object_type == RDF_TYPE_TYPED_LITERAL) { raptor_uri *datatype_uri = NULL; const unsigned char* language = (const unsigned char*)triple->language; if(triple->datatype) { /* If datatype, no language allowed */ language = NULL; datatype_uri = raptor_new_uri(parser->world, (const unsigned char*)triple->datatype); if(!datatype_uri) goto cleanup; } object_term = raptor_new_term_from_literal(parser->world, (const unsigned char*)triple->object, datatype_uri, language); raptor_free_uri(datatype_uri); } else { raptor_log_error_formatted(parser->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unknown object term type %d", s->object->type); goto cleanup; } s->object = object_term; /* Generate statement */ (*parser->statement_handler)(parser->user_data, s); cleanup: rdfa_free_triple(triple); if(subject_term) raptor_free_term(subject_term); if(predicate_term) raptor_free_term(predicate_term); if(object_term) raptor_free_term(object_term); } static void raptor_librdfa_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace) { raptor_parser* rdf_parser; rdf_parser = (raptor_parser*)user_data; raptor_parser_start_namespace(rdf_parser, nspace); } static int raptor_librdfa_parse_start(raptor_parser* rdf_parser) { raptor_locator *locator = &rdf_parser->locator; raptor_librdfa_parser_context *librdfa_parser; int rc; char* base_uri_string = NULL; librdfa_parser = (raptor_librdfa_parser_context*)rdf_parser->context; locator->line = -1; locator->column = -1; locator->byte = 0; if(rdf_parser->base_uri) base_uri_string = (char*)raptor_uri_as_string(rdf_parser->base_uri); else /* base URI is required for rdfa - checked in rdfa_create_context() */ return 1; if(librdfa_parser->context) rdfa_free_context(librdfa_parser->context); librdfa_parser->context = rdfa_create_context(base_uri_string); if(!librdfa_parser->context) return 1; librdfa_parser->context->namespace_handler = raptor_librdfa_sax2_new_namespace_handler; librdfa_parser->context->namespace_handler_user_data = rdf_parser; librdfa_parser->context->world = rdf_parser->world; librdfa_parser->context->locator = &rdf_parser->locator; librdfa_parser->context->callback_data = rdf_parser; /* returns triples */ rdfa_set_default_graph_triple_handler(librdfa_parser->context, raptor_librdfa_generate_statement); /* returns RDFa Processing Graph error triples - not used by raptor */ rdfa_set_processor_graph_triple_handler(librdfa_parser->context, NULL); librdfa_parser->context->raptor_rdfa_version = librdfa_parser->rdfa_version; rc = rdfa_parse_start(librdfa_parser->context); if(rc != RDFA_PARSE_SUCCESS) return 1; return 0; } static int raptor_librdfa_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_librdfa_parser_context *librdfa_parser; int rval; librdfa_parser = (raptor_librdfa_parser_context*)rdf_parser->context; rval = rdfa_parse_chunk(librdfa_parser->context, (char*)s, len, is_end); if(is_end) { if(rdf_parser->emitted_default_graph) { raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } } return rval != RDFA_PARSE_SUCCESS; } static int raptor_librdfa_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; if(identifier) { if(strstr((const char*)identifier, "RDFa")) score = 10; } if(buffer && len) { #define HAS_RDFA_1 (raptor_memstr((const char*)buffer, len, "-//W3C//DTD XHTML+RDFa 1.0//EN") != NULL) #define HAS_RDFA_2 (raptor_memstr((const char*)buffer, len, "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd") != NULL) if(HAS_RDFA_1 || HAS_RDFA_2) score = 10; } return score; } static const char* const rdfa_names[4] = { "rdfa", "rdfa11", "rdfa10", NULL }; static const char* const rdfa_uri_strings[3] = { "http://www.w3.org/ns/formats/RDFa", "http://www.w3.org/TR/rdfa/", NULL }; #define RDFA_TYPES_COUNT 2 static const raptor_type_q html_types[RDFA_TYPES_COUNT + 1] = { { "text/html", 9, 6}, { "application/xhtml+xml", 21, 8}, { NULL, 0, 0} }; static int raptor_librdfa_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = rdfa_names; factory->desc.mime_types = html_types; factory->desc.label = "RDF/A via librdfa"; factory->desc.uri_strings = rdfa_uri_strings; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_librdfa_parser_context); factory->init = raptor_librdfa_parse_init; factory->terminate = raptor_librdfa_parse_terminate; factory->start = raptor_librdfa_parse_start; factory->chunk = raptor_librdfa_parse_chunk; factory->recognise_syntax = raptor_librdfa_parse_recognise_syntax; return rc; } int raptor_init_parser_rdfa(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_librdfa_parser_register_factory); } raptor2-2.0.15/src/raptor_rss_common.c0000644000175000017500000005523112020170223014605 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rss_common.c - Raptor Feeds (RSS and Atom) common code * * Copyright (C) 2003-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include "raptor_rss.h" static int raptor_rss_field_conversion_date_uplift(raptor_rss_field* from_field, raptor_rss_field* to_field); const raptor_rss_namespace_info raptor_rss_namespaces_info[RAPTOR_RSS_NAMESPACES_SIZE]={ { NULL, NULL, }, { NULL, NULL, }, { RSS0_91_NAMESPACE_URI, "rss091", }, { RSS0_9_NAMESPACE_URI, NULL, }, { RSS1_0_NAMESPACE_URI, "rss", }, { ATOM0_3_NAMESPACE_URI, NULL, }, { DC_NAMESPACE_URI, "dc", }, { RSS2_0_ENC_NAMESPACE_URI, "enc", }, { RSS1_1_NAMESPACE_URI, NULL, }, { CONTENT_NAMESPACE_URI, "content", }, { ATOM1_0_NAMESPACE_URI, "atom", }, { RDF_NAMESPACE_URI, "rdf", }, { ATOMTRIPLES_NAMESPACE_URI, "at", }, { ITUNES_NAMESPACE_URI, "itunes", }, }; const raptor_rss_item_info raptor_rss_items_info[RAPTOR_RSS_COMMON_SIZE+1]={ { "channel", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "image", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "textinput", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "item", RSS1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "author", ATOM1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS, RAPTOR_RSS_FIELD_ATOM_AUTHOR }, { "Link", ATOM1_0_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_RDF_ATOM_LINK_CLASS, RAPTOR_RSS_FIELD_ATOM_LINK }, { "owner" , ITUNES_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_ITUNES_OWNER, RAPTOR_RSS_FIELD_ITUNES_OWNER }, { "skipHours", RSS0_91_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "skipDays", RSS0_91_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "Enclosure", RSS2_0_ENC_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_RDF_ENCLOSURE_CLASS, RAPTOR_RSS_RDF_ENCLOSURE }, { "category", ATOM1_0_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_RDF_ATOM_CATEGORY_CLASS, RAPTOR_RSS_FIELD_ATOM_CATEGORY }, { "source" , RSS2_0_NS, RAPTOR_RSS_ITEM_BLOCK, RAPTOR_RSS_FIELD_SOURCE, RAPTOR_RSS_FIELD_NONE }, { "feed", ATOM1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "entry", ATOM1_0_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE }, { "", RSS_UNKNOWN_NS, RAPTOR_RSS_ITEM_CONTAINER, RAPTOR_RSS_FIELD_NONE, RAPTOR_RSS_FIELD_NONE } }; const raptor_rss_field_info raptor_rss_fields_info[RAPTOR_RSS_FIELDS_SIZE+2]={ { "title", RSS1_0_NS, 0 }, { "link", RSS1_0_NS, 0 }, /* Actually a URI but RSS 1.0 spec wants this as an (XML & RDF) literal */ { "description", RSS1_0_NS, 0 }, { "url", RSS1_0_NS, 0 }, { "name", RSS1_0_NS, 0 }, { "language", RSS0_91_NS, 0 }, { "rating", RSS0_91_NS, 0 }, { "copyright", RSS0_91_NS, 0 }, { "pubDate", RSS0_91_NS, 0 }, { "lastBuildDate", RSS0_91_NS, 0 }, { "docs", RSS0_91_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "managingEditor", RSS0_91_NS, 0 }, { "webMaster", RSS0_91_NS, 0 }, { "cloud", RSS0_92_NS, 0 }, { "ttl", RSS2_0_NS, 0 }, { "width", RSS0_91_NS, 0 }, { "height", RSS0_91_NS, 0 }, { "hour", RSS0_91_NS, 0 }, { "day", RSS0_91_NS, 0 }, { "generator", RSS0_92_NS, 0 }, { "source", RSS0_92_NS, 0 }, { "author", RSS2_0_NS, 0 }, { "guid", RSS2_0_NS, 0 }, { "enclosure", RSS2_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_RSS_ENCLOSURE }, /* enclosure in RSS */ { "enclosure", RSS2_0_ENC_NS, 0 }, /* RDF output predicate, not an RSS field */ { "Enclosure", RSS2_0_ENC_NS, 0 }, /* RDF output class, not an RSS field */ { "url", RSS2_0_ENC_NS, 0 }, /* In RDF output, not an RSS field */ { "length", RSS2_0_ENC_NS, 0 }, /* In RDF output, not an RSS field */ { "type", RSS2_0_ENC_NS, 0 }, /* In RDF output, not an RSS field */ { "length", RSS2_0_NS, 0 }, { "type", RSS2_0_NS, 0 }, { "category", RSS0_92_NS, 0 }, { "comments", RSS0_92_NS, 0 }, { "items", RSS1_0_NS, 0 }, { "image", RSS1_0_NS, 0 }, { "textinput", RSS1_0_NS, 0 }, { "copyright", ATOM0_3_NS, 0 }, { "created", ATOM0_3_NS, 0 }, { "issued", ATOM0_3_NS, 0 }, { "modified", ATOM0_3_NS, 0 }, { "tagline", ATOM0_3_NS, 0 }, /* atom 1.0 required fields */ { "id", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "title", ATOM1_0_NS, 0 }, { "updated", ATOM1_0_NS, 0 }, /* atom 1.0 optional fields */ { "author", ATOM1_0_NS, 0, RAPTOR_ATOM_AUTHOR }, { "category", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_ATOM_CATEGORY }, { "content", ATOM1_0_NS, 0 }, { "contributor", ATOM1_0_NS, 0 }, { "email", ATOM1_0_NS, 0 }, { "entry", ATOM1_0_NS, 0 }, { "feed", ATOM1_0_NS, 0 }, { "generator", ATOM1_0_NS, 0 }, { "icon", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "link", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_ATOM_LINK }, { "logo", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "name", ATOM1_0_NS, 0 }, { "published", ATOM1_0_NS, 0 }, { "rights", ATOM1_0_NS, 0 }, { "source", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE, RAPTOR_RSS_SOURCE }, { "subtitle", ATOM1_0_NS, 0 }, { "summary", ATOM1_0_NS, 0 }, { "uri", ATOM1_0_NS, 0 }, { "Author", ATOM1_0_NS, 0 }, { "Category", ATOM1_0_NS, 0 }, { "Link", ATOM1_0_NS, 0 }, { "label", ATOM1_0_NS, 0 }, { "scheme", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "term", ATOM1_0_NS, 0 }, { "href", ATOM1_0_NS, RAPTOR_RSS_INFO_FLAG_URI_VALUE }, { "rel", ATOM1_0_NS, 0 }, { "type", ATOM1_0_NS, 0 }, { "hreflang", ATOM1_0_NS, 0 }, { "length", ATOM1_0_NS, 0 }, { "title", DC_NS, 0 }, { "contributor", DC_NS, 0 }, { "creator", DC_NS, 0 }, { "publisher", DC_NS, 0 }, { "subject", DC_NS, 0 }, { "description", DC_NS, 0 }, { "date", DC_NS, 0 }, { "type", DC_NS, 0 }, { "format", DC_NS, 0 }, { "identifier", DC_NS, 0 }, { "language", DC_NS, 0 }, { "relation", DC_NS, 0 }, { "source", DC_NS, 0 }, { "coverage", DC_NS, 0 }, { "rights", DC_NS, 0 }, { "encoded", CONTENT_NS, 0 }, { "contentType", ATOMTRIPLES_NS, 0 }, { "author", ITUNES_NS, 0 }, { "subtitle", ITUNES_NS, 0 }, { "summary", ITUNES_NS, 0 }, { "keywords", ITUNES_NS, 0 }, { "explicit", ITUNES_NS, 0 }, { "image", ITUNES_NS, 0 }, { "name", ITUNES_NS, 0 }, { "owner", ITUNES_NS, 0 }, { "block", ITUNES_NS, 0 }, { "category", ITUNES_NS, 0 }, { "email", ITUNES_NS, 0 }, { "", RSS_UNKNOWN_NS, 0 }, { "", RSS_UNKNOWN_NS, 0 } }; /* FIeld mappings from atom fields to RSS/DC */ const raptor_field_pair raptor_atom_to_rss[]={ /* rss clone of atom fields */ { RAPTOR_RSS_FIELD_ATOM_SUMMARY, RAPTOR_RSS_FIELD_DESCRIPTION }, { RAPTOR_RSS_FIELD_ATOM_ID, RAPTOR_RSS_FIELD_LINK }, { RAPTOR_RSS_FIELD_ATOM_UPDATED, RAPTOR_RSS_FIELD_DC_DATE }, { RAPTOR_RSS_FIELD_ATOM_RIGHTS, RAPTOR_RSS_FIELD_DC_RIGHTS }, { RAPTOR_RSS_FIELD_ATOM_TITLE, RAPTOR_RSS_FIELD_TITLE }, { RAPTOR_RSS_FIELD_ATOM_SUMMARY, RAPTOR_RSS_FIELD_CONTENT_ENCODED }, /* atom 0.3 to atom 1.0 */ { RAPTOR_RSS_FIELD_ATOM_COPYRIGHT, RAPTOR_RSS_FIELD_ATOM_RIGHTS }, { RAPTOR_RSS_FIELD_ATOM_TAGLINE, RAPTOR_RSS_FIELD_ATOM_SUBTITLE }, #if 0 /* other old atom 0.3 fields - IGNORED */ { RAPTOR_RSS_FIELD_ATOM_CREATED, RAPTOR_RSS_FIELD_UNKNOWN }, { RAPTOR_RSS_FIELD_ATOM_ISSUED, RAPTOR_RSS_FIELD_UNKNOWN }, { RAPTOR_RSS_FIELD_ATOM_MODIFIED, RAPTOR_RSS_FIELD_UNKNOWN }, #endif #ifdef RAPTOR_PARSEDATE_FUNCTION /* convert to ISO date */ { RAPTOR_RSS_FIELD_PUBDATE, RAPTOR_RSS_FIELD_DC_DATE, &raptor_rss_field_conversion_date_uplift }, #endif /* rss content encoded */ { RAPTOR_RSS_FIELD_DESCRIPTION, RAPTOR_RSS_FIELD_CONTENT_ENCODED }, { RAPTOR_RSS_FIELD_UNKNOWN, RAPTOR_RSS_FIELD_UNKNOWN } }; const raptor_rss_block_field_info raptor_rss_block_fields_info[RAPTOR_RSS_BLOCKS_SIZE+1] = { /* RSS 2 - optional element inside attributes: url (required): where the enclosure is located. url length (required): how big enclosure it is in bytes. integer type (required): what enclosure type is as a standard MIME type. string content: empty */ { RAPTOR_RSS_ENCLOSURE, "url", RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_RDF_ENCLOSURE_URL }, { RAPTOR_RSS_ENCLOSURE, "length", RSS_BLOCK_FIELD_TYPE_STRING, 0, RAPTOR_RSS_RDF_ENCLOSURE_LENGTH }, { RAPTOR_RSS_ENCLOSURE, "type", RSS_BLOCK_FIELD_TYPE_STRING, 1, RAPTOR_RSS_RDF_ENCLOSURE_TYPE }, /* RSS 2 - optional element inside attributes: url (required): location of source. url content: source name. string */ { RAPTOR_RSS_SOURCE, "url", RSS_BLOCK_FIELD_TYPE_URL, 0 }, /* Atom - optional element inside attributes: term (required): the category. string scheme (optional): categorization scheme. url label (optional): human-readable label. string content: empty */ { RAPTOR_ATOM_CATEGORY, "term", RSS_BLOCK_FIELD_TYPE_STRING, 0, RAPTOR_RSS_FIELD_ATOM_TERM }, { RAPTOR_ATOM_CATEGORY, "scheme", RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_FIELD_ATOM_SCHEME }, { RAPTOR_ATOM_CATEGORY, "label", RSS_BLOCK_FIELD_TYPE_STRING, 1, RAPTOR_RSS_FIELD_ATOM_LABEL }, /* Atom - optional element inside attributes: href (required): . url rel (optional): . string type (optional): . string hreflang (optional): . string title (optional): . string length (optional): . string content: empty */ { RAPTOR_ATOM_LINK, "href", RSS_BLOCK_FIELD_TYPE_URL, RAPTOR_RSS_LINK_HREF_URL_OFFSET, RAPTOR_RSS_FIELD_ATOM_HREF }, { RAPTOR_ATOM_LINK, "rel", RSS_BLOCK_FIELD_TYPE_STRING, RAPTOR_RSS_LINK_REL_STRING_OFFSET, RAPTOR_RSS_FIELD_ATOM_REL }, { RAPTOR_ATOM_LINK, "type", RSS_BLOCK_FIELD_TYPE_STRING, 1, RAPTOR_RSS_FIELD_ATOM_TYPE }, { RAPTOR_ATOM_LINK, "hreflang", RSS_BLOCK_FIELD_TYPE_STRING, 2, RAPTOR_RSS_FIELD_ATOM_HREFLANG }, { RAPTOR_ATOM_LINK, "title", RSS_BLOCK_FIELD_TYPE_STRING, 3, RAPTOR_RSS_FIELD_ATOM_TITLE }, { RAPTOR_ATOM_LINK, "length", RSS_BLOCK_FIELD_TYPE_STRING, 4, RAPTOR_RSS_FIELD_ATOM_LENGTH }, { RAPTOR_ATOM_LINK, NULL, RSS_BLOCK_FIELD_TYPE_URL, 0, RAPTOR_RSS_FIELD_ATOM_HREF }, /* sentinel */ { RAPTOR_RSS_NONE, NULL, 0, 0 } }; const unsigned char * const raptor_atom_namespace_uri = (const unsigned char *)"http://www.w3.org/2005/Atom"; int raptor_rss_common_init(raptor_world* world) { int i; raptor_uri *namespace_uri; if(world->rss_common_initialised++) return 0; world->rss_namespaces_info_uris = RAPTOR_CALLOC(raptor_uri**, RAPTOR_RSS_NAMESPACES_SIZE, sizeof(raptor_uri*)); if(!world->rss_namespaces_info_uris) return -1; for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE;i++) { const char *uri_string = raptor_rss_namespaces_info[i].uri_string; if(uri_string) { world->rss_namespaces_info_uris[i] = raptor_new_uri(world, (const unsigned char*)uri_string); if(!world->rss_namespaces_info_uris[i]) return -1; } } world->rss_types_info_uris = RAPTOR_CALLOC(raptor_uri**, RAPTOR_RSS_COMMON_SIZE, sizeof(raptor_uri*)); if(!world->rss_types_info_uris) return -1; for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { int n = raptor_rss_items_info[i].nspace; namespace_uri = world->rss_namespaces_info_uris[n]; if(namespace_uri) { world->rss_types_info_uris[i] = raptor_new_uri_from_uri_local_name(world, namespace_uri, (const unsigned char*)raptor_rss_items_info[i].name); if(!world->rss_types_info_uris[i]) return -1; } } world->rss_fields_info_uris = RAPTOR_CALLOC(raptor_uri**, RAPTOR_RSS_FIELDS_SIZE, sizeof(raptor_uri*)); if(!world->rss_fields_info_uris) return -1; for(i = 0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { namespace_uri = world->rss_namespaces_info_uris[raptor_rss_fields_info[i].nspace]; if(namespace_uri) { world->rss_fields_info_uris[i] = raptor_new_uri_from_uri_local_name(world, namespace_uri, (const unsigned char*)raptor_rss_fields_info[i].name); if(!world->rss_fields_info_uris[i]) return -1; } } return 0; } void raptor_rss_common_terminate(raptor_world* world) { int i; if(--world->rss_common_initialised) return; if(world->rss_types_info_uris) { for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { if(world->rss_types_info_uris[i]) raptor_free_uri(world->rss_types_info_uris[i]); } RAPTOR_FREE(raptor_uri* array, world->rss_types_info_uris); world->rss_types_info_uris = NULL; } if(world->rss_fields_info_uris) { for(i = 0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { if(world->rss_fields_info_uris[i]) raptor_free_uri(world->rss_fields_info_uris[i]); } RAPTOR_FREE(raptor_uri* array, world->rss_fields_info_uris); world->rss_fields_info_uris = NULL; } if(world->rss_namespaces_info_uris) { for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE;i++) { if(world->rss_namespaces_info_uris[i]) raptor_free_uri(world->rss_namespaces_info_uris[i]); } RAPTOR_FREE(raptor_uri* array, world->rss_namespaces_info_uris); world->rss_namespaces_info_uris = NULL; } } void raptor_rss_model_init(raptor_world* world, raptor_rss_model* rss_model) { memset(rss_model->common, 0, sizeof(raptor_rss_item*) * RAPTOR_RSS_COMMON_SIZE); rss_model->world = world; rss_model->last = rss_model->items = NULL; rss_model->items_count = 0; RAPTOR_RSS_RSS_items_URI(rss_model) = raptor_new_uri_relative_to_base(world, world->rss_namespaces_info_uris[RSS1_0_NS], (const unsigned char*)"items"); } void raptor_rss_model_clear(raptor_rss_model* rss_model) { int i; raptor_rss_item* item; for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { item = rss_model->common[i]; while(item) { raptor_rss_item *next = item->next; raptor_free_rss_item(item); item = next; } } item = rss_model->items; while(item) { raptor_rss_item *next = item->next; raptor_free_rss_item(item); item = next; } rss_model->last = rss_model->items = NULL; for(i = 0; i< RAPTOR_RSS_N_CONCEPTS; i++) { raptor_uri* concept_uri = rss_model->concepts[i]; if(concept_uri) { raptor_free_uri(concept_uri); rss_model->concepts[i] = NULL; } } } raptor_rss_item* raptor_new_rss_item(raptor_world* world) { raptor_rss_item* item; item = RAPTOR_CALLOC(raptor_rss_item*, 1, sizeof(*item)); if(!item) return NULL; item->world = world; item->triples = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, (raptor_data_print_handler)raptor_statement_print); if(!item->triples) { RAPTOR_FREE(raptor_rss_item, item); return NULL; } return item; } int raptor_rss_model_add_item(raptor_rss_model* rss_model) { raptor_rss_item* item; item = raptor_new_rss_item(rss_model->world); if(!item) return 1; /* new list */ if(!rss_model->items) rss_model->items = item; /* join last item to this one */ if(rss_model->last) rss_model->last->next = item; /* this is now the last item */ rss_model->last = item; rss_model->items_count++; RAPTOR_DEBUG2("Added item %d\n", rss_model->items_count); return 0; } raptor_rss_item* raptor_rss_model_add_common(raptor_rss_model* rss_model, raptor_rss_type type) { raptor_rss_item* item; item = raptor_new_rss_item(rss_model->world); if(!item) return NULL; if(rss_model->common[type] == NULL) { RAPTOR_DEBUG3("Adding common type %d - %s\n", type, raptor_rss_items_info[type].name); rss_model->common[type] = item; } else { raptor_rss_item* next; RAPTOR_DEBUG3("Appending common type %d - %s\n", type, raptor_rss_items_info[type].name); for(next = rss_model->common[type]; next->next; next = next->next) ; next->next = item; } return item; } raptor_rss_item* raptor_rss_model_get_common(raptor_rss_model* rss_model, raptor_rss_type type) { raptor_rss_item* item; for(item = rss_model->common[type]; item && item->next; item = item->next) ; return item; } void raptor_free_rss_item(raptor_rss_item* item) { int i; for(i = 0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { if(item->fields[i]) raptor_rss_field_free(item->fields[i]); } if(item->blocks) raptor_free_rss_block(item->blocks); if(item->uri) raptor_free_uri(item->uri); if(item->term) raptor_free_term(item->term); if(item->triples) raptor_free_sequence(item->triples); RAPTOR_FREE(raptor_rss_item, item); } void raptor_rss_item_add_block(raptor_rss_item* item, raptor_rss_block *block) { if(!item->blocks) { RAPTOR_DEBUG1("Adding first block\n"); item->blocks = block; } else { raptor_rss_block *cur; RAPTOR_DEBUG1("Adding subsequent block\n"); for(cur = item->blocks; cur->next; cur = cur->next) ; cur->next = block; } } void raptor_rss_item_add_field(raptor_rss_item* item, int type, raptor_rss_field* field) { if(!item->fields[type]) { RAPTOR_DEBUG3("Adding first type %d field %s\n", type, raptor_rss_fields_info[type].name); item->fields_count++; item->fields[type] = field; } else { raptor_rss_field* cur; RAPTOR_DEBUG1("Adding subsequent field\n"); for(cur = item->fields[type]; cur->next; cur = cur->next) ; cur->next = field; } } int raptor_rss_item_equals_statement_subject(const raptor_rss_item *item, const raptor_statement *statement) { return raptor_term_equals(statement->subject, item->term); } int raptor_rss_item_set_uri(raptor_rss_item *item, raptor_uri* uri) { RAPTOR_DEBUG3("Set node %p to URI <%s>\n", item, raptor_uri_as_string(uri)); item->uri = raptor_uri_copy(uri); if(!item->uri) return 1; item->term = raptor_new_term_from_uri(item->world, item->uri); return 0; } /* * raptor_new_rss_block: * @world: world * @type: RSS block type * @block_term: Block subject term (shared) * * INTERNAL - Create a new RSS Block such as etc * * Return value: new RSS block or NULL on failure */ raptor_rss_block* raptor_new_rss_block(raptor_world* world, raptor_rss_type type, raptor_term* block_term) { raptor_rss_block *block; block = RAPTOR_CALLOC(raptor_rss_block*, 1, sizeof(*block)); if(block) { block->rss_type = type; block->node_type = world->rss_types_info_uris[type]; block->identifier = raptor_term_copy(block_term); } return block; } void raptor_free_rss_block(raptor_rss_block *block) { int i; for(i = 0; i < RSS_BLOCK_MAX_URLS; i++) { if(block->urls[i]) raptor_free_uri(block->urls[i]); } for(i = 0; i < RSS_BLOCK_MAX_STRINGS; i++) { if(block->strings[i]) RAPTOR_FREE(char*, block->strings[i]); } if(block->next) raptor_free_rss_block(block->next); if(block->identifier) raptor_free_term(block->identifier); RAPTOR_FREE(raptor_rss_block, block); } raptor_rss_field* raptor_rss_new_field(raptor_world* world) { raptor_rss_field* field = RAPTOR_CALLOC(raptor_rss_field*, 1, sizeof(*field)); if(field) field->world = world; return field; } void raptor_rss_field_free(raptor_rss_field* field) { if(field->value) RAPTOR_FREE(char*, field->value); if(field->uri) raptor_free_uri(field->uri); if(field->next) raptor_rss_field_free(field->next); RAPTOR_FREE(raptor_rss_field, field); } #define RAPTOR_ISO_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ" int raptor_rss_format_iso_date(char* buffer, size_t len, time_t unix_time) { struct tm* structured_time; if(len < RAPTOR_ISO_DATE_LEN) return 1; structured_time = gmtime(&unix_time); strftime(buffer, len+1, RAPTOR_ISO_DATE_FORMAT, structured_time); return 0; } int raptor_rss_set_date_field(raptor_rss_field* field, time_t unix_time) { size_t len = RAPTOR_ISO_DATE_LEN; if(field->value) RAPTOR_FREE(char*, field->value); field->value = RAPTOR_MALLOC(unsigned char*, len + 1); if(!field->value) return 1; if(raptor_rss_format_iso_date((char*)field->value, len, unix_time)) { RAPTOR_FREE(char*, field->value); return 1; } return 0; } static int raptor_rss_field_conversion_date_uplift(raptor_rss_field* from_field, raptor_rss_field* to_field) { #ifdef RAPTOR_PARSEDATE_FUNCTION time_t unix_time; char *date_string = (char*)from_field->value; if(!date_string) return 1; unix_time = RAPTOR_PARSEDATE_FUNCTION(date_string, NULL); if(unix_time < 0) return 1; return raptor_rss_set_date_field(to_field, unix_time); #else return 1; #endif } raptor2-2.0.15/src/raptor_internal.h0000644000175000017500000015064312425333224014265 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_internal.h - Redland Parser Toolkit for RDF (Raptor) internals * * Copyright (C) 2002-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef RAPTOR_INTERNAL_H #define RAPTOR_INTERNAL_H #ifdef __cplusplus extern "C" { #define RAPTOR_EXTERN_C extern "C" #else #define RAPTOR_EXTERN_C #endif #ifdef RAPTOR_INTERNAL /* for the memory allocation functions */ #ifdef HAVE_STDLIB_H #include #undef HAVE_STDLIB_H #endif /* Some internal functions are needed by the test programs */ #ifndef RAPTOR_INTERNAL_API #define RAPTOR_INTERNAL_API RAPTOR_API #endif /* Can be over-ridden or undefined in a config.h file or -Ddefine */ #ifndef RAPTOR_INLINE #define RAPTOR_INLINE inline #endif #ifdef LIBRDF_DEBUG #define RAPTOR_DEBUG 1 #endif #if defined(RAPTOR_MEMORY_SIGN) #define RAPTOR_SIGN_KEY 0x08A61080 void* raptor_sign_malloc(size_t size); void* raptor_sign_calloc(size_t nmemb, size_t size); void* raptor_sign_realloc(void *ptr, size_t size); void raptor_sign_free(void *ptr); #define RAPTOR_MALLOC(type, size) (type)raptor_sign_malloc(size) #define RAPTOR_CALLOC(type, nmemb, size) (type)raptor_sign_calloc(nmemb, size) #define RAPTOR_REALLOC(type, ptr, size) (type)raptor_sign_realloc(ptr, size) #define RAPTOR_FREE(type, ptr) raptor_sign_free((void*)ptr) #else #define RAPTOR_MALLOC(type, size) (type)malloc(size) #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size) #define RAPTOR_REALLOC(type, ptr, size) (type)realloc(ptr, size) #define RAPTOR_FREE(type, ptr) free((void*)ptr) #endif #ifdef HAVE___FUNCTION__ #else #define __FUNCTION__ "???" #endif #ifndef RAPTOR_DEBUG_FH #define RAPTOR_DEBUG_FH stderr #endif #ifdef RAPTOR_DEBUG /* Debugging messages */ #define RAPTOR_DEBUG1(msg) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__); } while(0) #define RAPTOR_DEBUG2(msg, arg1) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1);} while(0) #define RAPTOR_DEBUG3(msg, arg1, arg2) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2);} while(0) #define RAPTOR_DEBUG4(msg, arg1, arg2, arg3) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2, arg3);} while(0) #define RAPTOR_DEBUG5(msg, arg1, arg2, arg3, arg4) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2, arg3, arg4);} while(0) #define RAPTOR_DEBUG6(msg, arg1, arg2, arg3, arg4, arg5) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: " msg, __FILE__, __LINE__, __FUNCTION__, arg1, arg2, arg3, arg4, arg5);} while(0) #ifndef RAPTOR_ASSERT_DIE #define RAPTOR_ASSERT_DIE abort(); #endif #else /* DEBUGGING TURNED OFF */ /* No debugging messages */ #define RAPTOR_DEBUG1(msg) #define RAPTOR_DEBUG2(msg, arg1) #define RAPTOR_DEBUG3(msg, arg1, arg2) #define RAPTOR_DEBUG4(msg, arg1, arg2, arg3) #define RAPTOR_DEBUG5(msg, arg1, arg2, arg3, arg4) #define RAPTOR_DEBUG6(msg, arg1, arg2, arg3, arg4, arg5) #define SYSTEM_MALLOC(size) malloc(size) #define SYSTEM_FREE(ptr) free(ptr) #ifndef RAPTOR_ASSERT_DIE #define RAPTOR_ASSERT_DIE #endif #endif #ifdef RAPTOR_DISABLE_ASSERT_MESSAGES #define RAPTOR_ASSERT_REPORT(line) #else #define RAPTOR_ASSERT_REPORT(msg) fprintf(RAPTOR_DEBUG_FH, "%s:%d: (%s) assertion failed: " msg "\n", __FILE__, __LINE__, __FUNCTION__); #endif #ifdef RAPTOR_DISABLE_ASSERT #define RAPTOR_ASSERT(condition, msg) #define RAPTOR_ASSERT_RETURN(condition, msg, ret) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN(pointer, type) do { \ if(!pointer) \ return; \ } while(0) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(pointer, type, ret) #else #define RAPTOR_ASSERT(condition, msg) do { \ if(condition) { \ RAPTOR_ASSERT_REPORT(msg) \ RAPTOR_ASSERT_DIE \ } \ } while(0) #define RAPTOR_ASSERT_RETURN(condition, msg, ret) do { \ if(condition) { \ RAPTOR_ASSERT_REPORT(msg) \ RAPTOR_ASSERT_DIE \ return ret; \ } \ } while(0) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN(pointer, type) do { \ if(!pointer) { \ RAPTOR_ASSERT_REPORT("object pointer of type " #type " is NULL.") \ RAPTOR_ASSERT_DIE \ return; \ } \ } while(0) #define RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(pointer, type, ret) do { \ if(!pointer) { \ RAPTOR_ASSERT_REPORT("object pointer of type " #type " is NULL.") \ RAPTOR_ASSERT_DIE \ return ret; \ } \ } while(0) #endif /* Fatal errors - always happen */ #define RAPTOR_FATAL1(msg) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__); abort();} while(0) #define RAPTOR_FATAL2(msg,arg) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__, arg); abort();} while(0) #define RAPTOR_FATAL3(msg,arg1,arg2) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__, arg1, arg2); abort();} while(0) #define RAPTOR_FATAL4(msg,arg1,arg2,arg3) do {fprintf(RAPTOR_DEBUG_FH, "%s:%d:%s: fatal error: " msg, __FILE__, __LINE__ , __FUNCTION__, arg1, arg2, arg3); abort();} while(0) #define MAX_ASCII_INT_SIZE 13 /* XML parser includes */ #ifdef RAPTOR_XML_LIBXML #include /* libxml-only prototypes */ /* raptor_libxml.c exports */ extern void raptor_libxml_sax_init(raptor_sax2* sax2); extern void raptor_libxml_generic_error(void* user_data, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); extern int raptor_libxml_init(raptor_world* world); extern void raptor_libxml_finish(raptor_world* world); extern void raptor_libxml_validation_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); extern void raptor_libxml_validation_warning(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_libxml_free(xmlParserCtxtPtr xc); /* raptor_parse.c - exported to libxml part */ extern void raptor_libxml_update_document_locator(raptor_sax2* sax2, raptor_locator* locator); /* end of libxml-only */ #endif typedef struct raptor_parser_factory_s raptor_parser_factory; typedef struct raptor_serializer_factory_s raptor_serializer_factory; typedef struct raptor_id_set_s raptor_id_set; typedef struct raptor_uri_detail_s raptor_uri_detail; /* raptor_option.c */ /* These are bits and may be bit-ORed */ /** * raptor_option_area: * @RAPTOR_OPTION_AREA_NONE: internal * @RAPTOR_OPTION_AREA_PARSER: #raptor_parser (public) * @RAPTOR_OPTION_AREA_SERIALIZER: #raptor_serializer (public) * @RAPTOR_OPTION_AREA_XML_WRITER: #raptor_xml_writer (public) * @RAPTOR_OPTION_AREA_TURTLE_WRITER: #raptor_turtle_writer (internal) * @RAPTOR_OPTION_AREA_SAX2: #raptor_sax2 (public) * * Internal - raptor option areas */ typedef enum { RAPTOR_OPTION_AREA_NONE = 0, RAPTOR_OPTION_AREA_PARSER = 1, RAPTOR_OPTION_AREA_SERIALIZER = 2, RAPTOR_OPTION_AREA_XML_WRITER = 4, RAPTOR_OPTION_AREA_TURTLE_WRITER = 8, RAPTOR_OPTION_AREA_SAX2 = 16 } raptor_option_area; typedef union { char* string; int integer; } raptor_str_int; typedef struct { raptor_option_area area; raptor_str_int options[RAPTOR_OPTION_LAST+1]; } raptor_object_options; #define RAPTOR_OPTIONS_GET_NUMERIC(object, option) \ ((object)->options.options[(int)option].integer) #define RAPTOR_OPTIONS_GET_STRING(object, option) \ ((object)->options.options[(int)option].string) #define RAPTOR_OPTIONS_SET_NUMERIC(object, option, value) do { \ (object)->options.options[(int)option].integer = value; \ } while(0) #define RAPTOR_OPTIONS_SET_STRING(object, option, value) do { \ (object)->options.options[(int)option].string = value; \ } while(0) int raptor_option_value_is_numeric(const raptor_option option); int raptor_option_is_valid_for_area(const raptor_option option, raptor_option_area area); void raptor_object_options_init(raptor_object_options* options, raptor_option_area area); void raptor_object_options_clear(raptor_object_options* options); int raptor_object_options_copy_state(raptor_object_options* to, raptor_object_options* from); int raptor_object_options_get_option(raptor_object_options *options, raptor_option option, char** string_p, int* integer_p); int raptor_object_options_set_option(raptor_object_options *options, raptor_option option, const char* string, int integer); /* raptor_concepts.c */ /* * raptor_rdf_ns_term_id: * * RDF namespace syntax terms, properties and classes. * * The order must match names in the raptor_rdf_ns_terms_info table * */ typedef enum { /* These terms are used only in the RDF/XML syntax; never in RDF graph */ RDF_NS_RDF = 0, RDF_NS_Description = 1, RDF_NS_li = 2, RDF_NS_about = 3, RDF_NS_aboutEach = 4, RDF_NS_aboutEachPrefix = 5, RDF_NS_ID = 6, RDF_NS_bagID = 7, RDF_NS_resource = 8, RDF_NS_parseType = 9, RDF_NS_nodeID = 10, RDF_NS_datatype = 11, /* These terms are all properties in RDF model (of type rdf:Property) */ RDF_NS_type = 12, RDF_NS_value = 13, RDF_NS_subject = 14, RDF_NS_predicate = 15, RDF_NS_object = 16, RDF_NS_first = 17, RDF_NS_rest = 18, /* These terms are all classes in the RDF model (of type rdfs:Class) */ RDF_NS_Seq = 19, RDF_NS_Bag = 20, RDF_NS_Alt = 21, RDF_NS_Statement = 22, RDF_NS_Property = 23, RDF_NS_List = 24, /* These terms are all resources in the RDF model (of type rdfs:Resource) */ RDF_NS_nil = 25, /* These terms are datatypes (used as a literal datatype URI) */ RDF_NS_XMLLiteral = 26, RDF_NS_PlainLiteral = 27, /* http://www.w3.org/TR/rdf-text/ */ /* RDF 1.1 datatypes */ RDF_NS_HTML = 28, RDF_NS_langString = 29, /* These terms are internal */ RDF_NS_LAST_SYNTAX_TERM = RDF_NS_datatype, RDF_NS_LAST = RDF_NS_langString } raptor_rdf_ns_term_id; typedef struct { /* term name */ const char *name; /* RDF/XML: the statement object type of this when used as an attribute */ raptor_term_type type; /* RDF/XML: name restrictions */ unsigned int allowed_as_nodeElement : 1; unsigned int allowed_as_propertyElement : 1; unsigned int allowed_as_propertyAttribute : 1; unsigned int allowed_unprefixed_on_attribute : 1; } raptor_rdf_ns_term_info; extern const raptor_rdf_ns_term_info raptor_rdf_ns_terms_info[(RDF_NS_LAST + 1) + 1]; #define RAPTOR_RDF_RDF_URI(world) world->concepts[RDF_NS_RDF] #define RAPTOR_RDF_Description_URI(world) world->concepts[RDF_NS_Description] #define RAPTOR_RDF_li_URI(world) world->concepts[RDF_NS_li] #define RAPTOR_RDF_about(world) world->concepts[RDF_NS_about] #define RAPTOR_RDF_aboutEach(world) world->concepts[RDF_NS_aboutEach] #define RAPTOR_RDF_aboutEachPrefix(world) world->concepts[RDF_NS_aboutEachPrefix] #define RAPTOR_RDF_ID_URI(world) world->concepts[RDF_NS_ID] #define RAPTOR_RDF_bagID_URI(world) world->concepts[RDF_NS_bagID] #define RAPTOR_RDF_resource_URI(world) world->concepts[RDF_NS_resource] #define RAPTOR_RDF_parseType_URI(world) world->concepts[RDF_NS_parseType] #define RAPTOR_RDF_nodeID_URI(world) world->concepts[RDF_NS_nodeID] #define RAPTOR_RDF_datatype_URI(world) world->concepts[RDF_NS_datatype] #define RAPTOR_RDF_type_URI(world) world->concepts[RDF_NS_type] #define RAPTOR_RDF_value_URI(world) world->concepts[RDF_NS_value] #define RAPTOR_RDF_subject_URI(world) world->concepts[RDF_NS_subject] #define RAPTOR_RDF_predicate_URI(world) world->concepts[RDF_NS_predicate] #define RAPTOR_RDF_object_URI(world) world->concepts[RDF_NS_object] #define RAPTOR_RDF_first_URI(world) world->concepts[RDF_NS_first] #define RAPTOR_RDF_rest_URI(world) world->concepts[RDF_NS_rest] #define RAPTOR_RDF_Seq_URI(world) world->concepts[RDF_NS_Seq] #define RAPTOR_RDF_Bag_URI(world) world->concepts[RDF_NS_Bag] #define RAPTOR_RDF_Alt_URI(world) world->concepts[RDF_NS_Alt] #define RAPTOR_RDF_Statement_URI(world) world->concepts[RDF_NS_Statement] #define RAPTOR_RDF_Property_URI(world) world->concepts[RDF_NS_Property] #define RAPTOR_RDF_List_URI(world) world->concepts[RDF_NS_List] #define RAPTOR_RDF_nil_URI(world) world->concepts[RDF_NS_nil] #define RAPTOR_RDF_XMLLiteral_URI(world) world->concepts[RDF_NS_XMLLiteral] #define RAPTOR_RDF_PlainLiteral_URI(world) world->concepts[RDF_NS_PlainLiteral] /* syntax only (RDF:RDF ... RDF:datatype) are not provided as terms */ #define RAPTOR_RDF_type_term(world) world->terms[RDF_NS_type] #define RAPTOR_RDF_value_term(world) world->terms[RDF_NS_value] #define RAPTOR_RDF_subject_term(world) world->terms[RDF_NS_subject] #define RAPTOR_RDF_predicate_term(world) world->terms[RDF_NS_predicate] #define RAPTOR_RDF_object_term(world) world->terms[RDF_NS_object] #define RAPTOR_RDF_first_term(world) world->terms[RDF_NS_first] #define RAPTOR_RDF_rest_term(world) world->terms[RDF_NS_rest] #define RAPTOR_RDF_Seq_term(world) world->terms[RDF_NS_Seq] #define RAPTOR_RDF_Bag_term(world) world->terms[RDF_NS_Bag] #define RAPTOR_RDF_Alt_term(world) world->terms[RDF_NS_Alt] #define RAPTOR_RDF_Statement_term(world) world->terms[RDF_NS_Statement] #define RAPTOR_RDF_Property_term(world) world->terms[RDF_NS_Property] #define RAPTOR_RDF_List_term(world) world->terms[RDF_NS_List] #define RAPTOR_RDF_nil_term(world) world->terms[RDF_NS_nil] #define RAPTOR_RDF_XMLLiteral_term(world) world->terms[RDF_NS_XMLLiteral] #define RAPTOR_RDF_PlainLiteral_term(world) world->terms[RDF_NS_PlainLiteral] int raptor_concepts_init(raptor_world* world); void raptor_concepts_finish(raptor_world* world); /* raptor_iostream.c */ raptor_world* raptor_iostream_get_world(raptor_iostream *iostr); /* Raptor Namespace Stack node */ struct raptor_namespace_stack_s { raptor_world* world; int size; int table_size; raptor_namespace** table; raptor_namespace* def_namespace; raptor_uri *rdf_ms_uri; raptor_uri *rdf_schema_uri; }; /* Forms: * 1) prefix=NULL uri= - default namespace defined * 2) prefix=NULL, uri=NULL - no default namespace * 3) prefix=, uri= - regular pair defined : */ struct raptor_namespace_s { /* next down the stack, NULL at bottom */ struct raptor_namespace_s* next; raptor_namespace_stack *nstack; /* NULL means is the default namespace */ const unsigned char *prefix; /* needed to safely compare prefixed-names */ unsigned int prefix_length; /* URI of namespace or NULL for default */ raptor_uri *uri; /* parsing depth that this ns was added. It will * be deleted when the parser leaves this depth */ int depth; /* Non 0 if is xml: prefixed name */ int is_xml; /* Non 0 if is RDF M&S Namespace */ int is_rdf_ms; /* Non 0 if is RDF Schema Namespace */ int is_rdf_schema; }; raptor_namespace** raptor_namespace_stack_to_array(raptor_namespace_stack *nstack, size_t *size_p); #ifdef RAPTOR_XML_LIBXML #define RAPTOR_LIBXML_MAGIC 0x8AF108 #endif /* Size of buffer to use when reading from a file */ #if defined(BUFSIZ) && BUFSIZ > 4096 #define RAPTOR_READ_BUFFER_SIZE BUFSIZ #else #define RAPTOR_READ_BUFFER_SIZE 4096 #endif /* * Raptor parser object */ struct raptor_parser_s { raptor_world* world; #ifdef RAPTOR_XML_LIBXML int magic; #endif /* can be filled with error location information */ raptor_locator locator; /* non-0 if parser had fatal error and cannot continue */ int failed : 1; /* non-0 to enable emitting graph marks (default set). Intended * for use by GRDDL the parser on it's child parsers to prevent * multiple start/end marks on the default graph. */ int emit_graph_marks : 1; /* non-0 if have emitted start default graph mark */ int emitted_default_graph : 1; /* generated ID counter */ int genid; /* base URI of RDF/XML */ raptor_uri *base_uri; /* static statement for use in passing to user code */ raptor_statement statement; /* Options (per-object) */ raptor_object_options options; /* stuff for our user */ void *user_data; /* parser callbacks */ raptor_statement_handler statement_handler; raptor_graph_mark_handler graph_mark_handler; void* uri_filter_user_data; raptor_uri_filter_func uri_filter; /* parser specific stuff */ void *context; struct raptor_parser_factory_s* factory; /* namespace callback */ raptor_namespace_handler namespace_handler; void* namespace_handler_user_data; raptor_stringbuffer* sb; /* raptor_www pointer stored here to allow cleanup on error */ raptor_www* www; /* internal data for lexers */ void* lexer_user_data; /* internal read buffer */ unsigned char buffer[RAPTOR_READ_BUFFER_SIZE + 1]; }; /** A Parser Factory */ struct raptor_parser_factory_s { raptor_world* world; struct raptor_parser_factory_s* next; /* the rest of this structure is populated by the parser-specific register function */ size_t context_length; /* static desc that the parser registration initialises */ raptor_syntax_description desc; /* create a new parser */ int (*init)(raptor_parser* parser, const char *name); /* destroy a parser */ void (*terminate)(raptor_parser* parser); /* start a parse */ int (*start)(raptor_parser* parser); /* parse a chunk of memory */ int (*chunk)(raptor_parser* parser, const unsigned char *buffer, size_t len, int is_end); /* finish the parser factory */ void (*finish_factory)(raptor_parser_factory* factory); /* score recognition of the syntax by a block of characters, the * content identifier or it's suffix or a mime type * (different from the factory-registered one) */ int (*recognise_syntax)(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type); /* get the Content-Type value of a URI request */ void (*content_type_handler)(raptor_parser* rdf_parser, const char* content_type); /* get the Accept header of a URI request (OPTIONAL) */ const char* (*accept_header)(raptor_parser* rdf_parser); /* get the name (OPTIONAL) */ const char* (*get_name)(raptor_parser* rdf_parser); /* get the description (OPTIONAL) */ const raptor_syntax_description* (*get_description)(raptor_parser* rdf_parser); /* get the current graph (OPTIONAL) - if not implemented, the current graph is always the default (NULL) and start/end graph marks are synthesised */ raptor_uri* (*get_graph)(raptor_parser* rdf_parser); /* get the locator (OPTIONAL) */ raptor_locator* (*get_locator)(raptor_parser* rdf_parser); }; /* * Raptor serializer object */ struct raptor_serializer_s { raptor_world* world; /* can be filled with error location information */ raptor_locator locator; /* non 0 if serializer had fatal error and cannot continue */ int failed; /* base URI of RDF/XML */ raptor_uri *base_uri; /* serializer specific stuff */ void *context; /* destination stream for the serialization */ raptor_iostream *iostream; /* if true, iostream was made here so free it */ int free_iostream_on_end; struct raptor_serializer_factory_s* factory; /* Options (per-object) */ raptor_object_options options; }; /** A Serializer Factory for a syntax */ struct raptor_serializer_factory_s { raptor_world* world; struct raptor_serializer_factory_s* next; /* the rest of this structure is populated by the serializer-specific register function */ size_t context_length; /* static desc that the parser registration initialises */ raptor_syntax_description desc; /* create a new serializer */ int (*init)(raptor_serializer* serializer, const char *name); /* destroy a serializer */ void (*terminate)(raptor_serializer* serializer); /* add a namespace */ int (*declare_namespace)(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix); /* start a serialization */ int (*serialize_start)(raptor_serializer* serializer); /* serialize a statement */ int (*serialize_statement)(raptor_serializer* serializer, raptor_statement *statment); /* end a serialization */ int (*serialize_end)(raptor_serializer* serializer); /* finish the serializer factory */ void (*finish_factory)(raptor_serializer_factory* factory); /* add a namespace using an existing namespace */ int (*declare_namespace_from_namespace)(raptor_serializer* serializer, raptor_namespace *nspace); /* flush current serialization state */ int (*serialize_flush)(raptor_serializer* serializer); }; /* for raptor_parser_parse_uri_write_bytes() when used as a handler for * raptor_www_set_write_bytes_handler() */ typedef struct { raptor_parser* rdf_parser; raptor_uri* base_uri; raptor_uri* final_uri; int started; } raptor_parse_bytes_context; /* raptor_serialize.c */ raptor_serializer_factory* raptor_serializer_register_factory(raptor_world* world, int (*factory) (raptor_serializer_factory*)); /* raptor_general.c */ raptor_parser_factory* raptor_world_register_parser_factory(raptor_world* world, int (*factory) (raptor_parser_factory*)); int raptor_parser_factory_add_mime_type(raptor_parser_factory* factory, const char* mime_type, int q); unsigned char* raptor_world_internal_generate_id(raptor_world *world, unsigned char *user_bnodeid); #ifdef RAPTOR_DEBUG void raptor_stats_print(raptor_parser *rdf_parser, FILE *stream); #endif RAPTOR_INTERNAL_API const char* raptor_basename(const char *name); int raptor_term_print_as_ntriples(const raptor_term *term, FILE* stream); /* raptor_ntriples.c */ size_t raptor_ntriples_parse_term(raptor_world* world, raptor_locator* locator, unsigned char *string, size_t *len_p, raptor_term** term_p, int allow_turtle); /* raptor_parse.c */ raptor_parser_factory* raptor_world_get_parser_factory(raptor_world* world, const char *name); void raptor_delete_parser_factories(void); RAPTOR_INTERNAL_API const char* raptor_parser_get_accept_header_all(raptor_world* world); int raptor_parser_set_uri_filter_no_net(void *user_data, raptor_uri* uri); void raptor_parser_parse_uri_write_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb); void raptor_parser_fatal_error(raptor_parser* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_parser_error(raptor_parser* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); RAPTOR_INTERNAL_API void raptor_parser_log_error_varargs(raptor_parser* parser, raptor_log_level level, const char *message, va_list arguments) RAPTOR_PRINTF_FORMAT(3, 0); void raptor_parser_warning(raptor_parser* parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); /* logging */ void raptor_world_internal_set_ignore_errors(raptor_world* world, int flag); void raptor_log_error_varargs(raptor_world* world, raptor_log_level level, raptor_locator* locator, const char* message, va_list arguments) RAPTOR_PRINTF_FORMAT(4, 0); RAPTOR_INTERNAL_API void raptor_log_error_formatted(raptor_world* world, raptor_log_level level, raptor_locator* locator, const char* message, ...) RAPTOR_PRINTF_FORMAT(4, 5); void raptor_log_error(raptor_world* world, raptor_log_level level, raptor_locator* locator, const char* message); /* raptor_parse.c */ typedef struct raptor_rdfxml_parser_s raptor_rdfxml_parser; /* Prototypes for common libxml parsing event-handling functions */ extern void raptor_xml_start_element_handler(void *user_data, const unsigned char *name, const unsigned char **atts); extern void raptor_xml_end_element_handler(void *user_data, const unsigned char *name); /* s is not 0 terminated. */ extern void raptor_xml_characters_handler(void *user_data, const unsigned char *s, int len); extern void raptor_xml_cdata_handler(void *user_data, const unsigned char *s, int len); void raptor_xml_comment_handler(void *user_data, const unsigned char *s); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 void raptor_rdfxml_parser_stats_print(raptor_rdfxml_parser* rdf_xml_parser, FILE *stream); #endif void raptor_parser_copy_flags_state(raptor_parser *to_parser, raptor_parser *from_parser); int raptor_parser_copy_user_state(raptor_parser *to_parser, raptor_parser *from_parser); /* raptor_general.c */ extern int raptor_valid_xml_ID(raptor_parser *rdf_parser, const unsigned char *string); int raptor_check_ordinal(const unsigned char *name); /* raptor_locator.c */ #ifdef HAVE_STRCASECMP #define raptor_strcasecmp strcasecmp #define raptor_strncasecmp strncasecmp #else #ifdef HAVE_STRICMP #define raptor_strcasecmp stricmp #define raptor_strncasecmp strnicmp #endif #endif /* raptor_nfc_icu.c */ int raptor_nfc_icu_check (const unsigned char* string, size_t len, int *error); /* raptor_namespace.c */ #ifdef RAPTOR_DEBUG void raptor_namespace_print(FILE *stream, raptor_namespace* ns); #endif void raptor_parser_start_namespace(raptor_parser* rdf_parser, raptor_namespace* nspace); /* * Raptor XML-namespace qualified name (qname), for elements or attributes * * namespace is only defined when the XML name has a namespace and * only then is uri also given. */ struct raptor_qname_s { raptor_world* world; /* Name - always present */ const unsigned char *local_name; int local_name_length; /* Namespace or NULL if not in a namespace */ const raptor_namespace *nspace; /* URI of namespace+local_name or NULL if not defined */ raptor_uri *uri; /* optional value - used when name is an attribute */ const unsigned char *value; size_t value_length; }; /* raptor_qname.c */ #ifdef RAPTOR_DEBUG void raptor_qname_print(FILE *stream, raptor_qname* name); #endif /* raptor_uri.c */ int raptor_uri_init(raptor_world* world); void raptor_uri_finish(raptor_world* world); raptor_uri* raptor_new_uri_from_rdf_ordinal(raptor_world* world, int ordinal); size_t raptor_uri_normalize_path(unsigned char* path_buffer, size_t path_len); /* parsers */ int raptor_init_parser_rdfxml(raptor_world* world); int raptor_init_parser_ntriples(raptor_world* world); int raptor_init_parser_turtle(raptor_world* world); int raptor_init_parser_trig(raptor_world* world); int raptor_init_parser_n3(raptor_world* world); int raptor_init_parser_grddl_common(raptor_world* world); int raptor_init_parser_grddl(raptor_world* world); int raptor_init_parser_guess(raptor_world* world); int raptor_init_parser_rss(raptor_world* world); int raptor_init_parser_rdfa(raptor_world* world); int raptor_init_parser_json(raptor_world* world); int raptor_init_parser_nquads(raptor_world* world); void raptor_terminate_parser_grddl_common(raptor_world *world); #ifdef RAPTOR_PARSER_RDFA #define rdfa_add_item raptor_librdfa_rdfa_add_item #define rdfa_append_to_list_mapping raptor_librdfa_rdfa_append_to_list_mapping #define rdfa_canonicalize_string raptor_librdfa_rdfa_canonicalize_string #define rdfa_complete_current_property_value_triples raptor_librdfa_rdfa_complete_current_property_value_triples #define rdfa_complete_incomplete_triples raptor_librdfa_rdfa_complete_incomplete_triples #define rdfa_complete_list_triples raptor_librdfa_rdfa_complete_list_triples #define rdfa_complete_object_literal_triples raptor_librdfa_rdfa_complete_object_literal_triples #define rdfa_complete_relrev_triples raptor_librdfa_rdfa_complete_relrev_triples #define rdfa_complete_type_triples raptor_librdfa_rdfa_complete_type_triples #define rdfa_copy_list raptor_librdfa_rdfa_copy_list #define rdfa_copy_mapping raptor_librdfa_rdfa_copy_mapping #define rdfa_create_bnode raptor_librdfa_rdfa_create_bnode #define rdfa_create_context raptor_librdfa_rdfa_create_context #define rdfa_create_list raptor_librdfa_rdfa_create_list #define rdfa_create_list_mapping raptor_librdfa_rdfa_create_list_mapping #define rdfa_create_mapping raptor_librdfa_rdfa_create_mapping #define rdfa_create_new_element_context raptor_librdfa_rdfa_create_new_element_context #define rdfa_create_triple raptor_librdfa_rdfa_create_triple #define rdfa_establish_new_1_0_subject raptor_librdfa_rdfa_establish_new_1_0_subject #define rdfa_establish_new_1_0_subject_with_relrev raptor_librdfa_ablish_new_1_0_subject_with_relrev #define rdfa_establish_new_1_1_subject raptor_librdfa_ablish_new_1_1_subject #define rdfa_establish_new_1_1_subject_with_relrev raptor_librdfa_ablish_new_1_1_subject_with_relrev #define rdfa_establish_new_inlist_triples raptor_librdfa_ablish_new_inlist_triples #define rdfa_free_context raptor_librdfa_free_context #define rdfa_free_context_stack raptor_librdfa_free_context_stack #define rdfa_free_list raptor_librdfa_rdfa_free_list #define rdfa_free_mapping raptor_librdfa_rdfa_free_mapping #define rdfa_free_triple raptor_librdfa_rdfa_free_triple #define rdfa_get_buffer raptor_librdfa_rdfa_get_buffer #define rdfa_get_curie_type raptor_librdfa_rdfa_get_curie_type #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping #define rdfa_init_base raptor_librdfa_rdfa_init_base #define rdfa_init_context raptor_librdfa_rdfa_init_context #define rdfa_iri_get_base raptor_librdfa_rdfa_iri_get_base #define rdfa_join_string raptor_librdfa_rdfa_join_string #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string #define rdfa_names raptor_librdfa_rdfa_names #define rdfa_next_mapping raptor_librdfa_rdfa_next_mapping #define rdfa_parse raptor_librdfa_rdfa_parse #define rdfa_parse_buffer raptor_librdfa_rdfa_parse_buffer #define rdfa_parse_chunk raptor_librdfa_rdfa_parse_chunk #define rdfa_parse_end raptor_librdfa_rdfa_parse_end #define rdfa_parse_start raptor_librdfa_rdfa_parse_start #define rdfa_pop_item raptor_librdfa_rdfa_pop_item #define rdfa_print_list raptor_librdfa_rdfa_print_list #define rdfa_print_mapping raptor_librdfa_rdfa_print_mapping #define rdfa_print_string raptor_librdfa_rdfa_print_string #define rdfa_print_triple raptor_librdfa_rdfa_print_triple #define rdfa_print_triple_list raptor_librdfa_rdfa_print_triple_list #define rdfa_push_item raptor_librdfa_rdfa_push_item #define rdfa_replace_list raptor_librdfa_rdfa_replace_list #define rdfa_replace_string raptor_librdfa_rdfa_replace_string #define rdfa_resolve_curie raptor_librdfa_rdfa_resolve_curie #define rdfa_resolve_curie_list raptor_librdfa_rdfa_resolve_curie_list #define rdfa_resolve_relrev_curie raptor_librdfa_rdfa_resolve_relrev_curie #define rdfa_resolve_uri raptor_librdfa_rdfa_resolve_uri #define rdfa_save_incomplete_list_triples raptor_librdfa_rdfa_save_incomplete_list_triples #define rdfa_save_incomplete_triples raptor_librdfa_rdfa_save_incomplete_triples #define rdfa_set_buffer_filler raptor_librdfa_rdfa_set_buffer_filler #define rdfa_set_default_graph_triple_handler raptor_librdfa_rdfa_set_default_graph_triple_handler #define rdfa_set_processor_graph_triple_handler raptor_librdfa_rdfa_set_processor_graph_triple_handler #define rdfa_setup_initial_context raptor_librdfa_rdfa_setup_initial_context #define rdfa_update_language raptor_librdfa_rdfa_update_language #define rdfa_update_mapping raptor_librdfa_rdfa_update_mapping #define rdfa_update_uri_mappings raptor_librdfa_rdfa_update_uri_mappings #define rdfa_uri_strings raptor_librdfa_rdfa_uri_strings #endif /* raptor_parse.c */ int raptor_parsers_init(raptor_world* world); void raptor_parsers_finish(raptor_world *world); void raptor_parser_save_content(raptor_parser* rdf_parser, int save); const unsigned char* raptor_parser_get_content(raptor_parser* rdf_parser, size_t* length_p); void raptor_parser_start_graph(raptor_parser* parser, raptor_uri* uri, int is_declared); void raptor_parser_end_graph(raptor_parser* parser, raptor_uri* uri, int is_declared); /* raptor_rss.c */ int raptor_init_serializer_rss10(raptor_world* world); int raptor_init_serializer_atom(raptor_world* world); extern const unsigned char * const raptor_atom_namespace_uri; /* raptor_rfc2396.c */ RAPTOR_INTERNAL_API raptor_uri_detail* raptor_new_uri_detail(const unsigned char *uri_string); RAPTOR_INTERNAL_API void raptor_free_uri_detail(raptor_uri_detail* uri_detail); unsigned char* raptor_uri_detail_to_string(raptor_uri_detail *ud, size_t* len_p); /* serializers */ /* raptor_serializer.c */ int raptor_serializers_init(raptor_world* world); void raptor_serializers_finish(raptor_world* world); /* raptor_serializer_dot.c */ int raptor_init_serializer_dot(raptor_world* world); /* raptor_serializer_ntriples.c */ int raptor_init_serializer_ntriples(raptor_world* world); int raptor_init_serializer_nquads(raptor_world* world); /* raptor_serialize_rdfxml.c */ int raptor_init_serializer_rdfxml(raptor_world* world); /* raptor_serialize_rdfxmla.c */ int raptor_init_serializer_rdfxmla(raptor_world* world); /* raptor_serialize_turtle.c */ int raptor_init_serializer_turtle(raptor_world* world); /* raptor_serialize_html.c */ int raptor_init_serializer_html(raptor_world* world); /* raptor_serialize_json.c */ int raptor_init_serializer_json(raptor_world* world); /* raptor_unicode.c */ extern const raptor_unichar raptor_unicode_max_codepoint; int raptor_unicode_is_namestartchar(raptor_unichar c); int raptor_unicode_is_namechar(raptor_unichar c); int raptor_unicode_check_utf8_nfc_string(const unsigned char *input, size_t length, int* error); /* raptor_www*.c */ #ifdef RAPTOR_WWW_LIBXML #include #include #include #endif #ifdef RAPTOR_WWW_LIBCURL #include #include #endif /* Size of buffer used in various raptor_www places for I/O */ #ifndef RAPTOR_WWW_BUFFER_SIZE #define RAPTOR_WWW_BUFFER_SIZE 4096 #endif /* WWW library state */ struct raptor_www_s { raptor_world* world; char *type; int free_type; size_t total_bytes; int failed; int status_code; raptor_uri *uri; #ifdef RAPTOR_WWW_LIBCURL CURL* curl_handle; char error_buffer[CURL_ERROR_SIZE]; int curl_init_here; int checked_status; #endif #ifdef RAPTOR_WWW_LIBXML void *ctxt; int is_end; void *old_xmlGenericErrorContext; #endif char buffer[RAPTOR_WWW_BUFFER_SIZE + 1]; char *user_agent; /* proxy URL string or NULL for none */ char *proxy; void *write_bytes_userdata; raptor_www_write_bytes_handler write_bytes; void *content_type_userdata; raptor_www_content_type_handler content_type; void* uri_filter_user_data; raptor_uri_filter_func uri_filter; /* can be filled with error location information */ raptor_locator locator; char *http_accept; FILE* handle; int connection_timeout; /* The URI returned after any redirections */ raptor_uri* final_uri; void *final_uri_userdata; raptor_www_final_uri_handler final_uri_handler; char* cache_control; }; /* internal */ void raptor_www_libxml_init(raptor_www *www); void raptor_www_libxml_free(raptor_www *www); int raptor_www_libxml_fetch(raptor_www *www); void raptor_www_error(raptor_www *www, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); void raptor_www_curl_init(raptor_www *www); void raptor_www_curl_free(raptor_www *www); int raptor_www_curl_fetch(raptor_www *www); int raptor_www_curl_set_ssl_cert_options(raptor_www* www, const char* cert_filename, const char* cert_type, const char* cert_passphrase); int raptor_www_curl_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host); void raptor_www_libfetch_init(raptor_www *www); void raptor_www_libfetch_free(raptor_www *www); int raptor_www_libfetch_fetch(raptor_www *www); /* raptor_set.c */ RAPTOR_INTERNAL_API raptor_id_set* raptor_new_id_set(raptor_world* world); RAPTOR_INTERNAL_API void raptor_free_id_set(raptor_id_set* set); RAPTOR_INTERNAL_API int raptor_id_set_add(raptor_id_set* set, raptor_uri* base_uri, const unsigned char *item, size_t item_len); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 void raptor_id_set_stats_print(raptor_id_set* set, FILE *stream); #endif /* raptor_sax2.c */ /* * SAX2 elements/attributes on stack */ struct raptor_xml_element_s { /* NULL at bottom of stack */ struct raptor_xml_element_s *parent; raptor_qname *name; raptor_qname **attributes; unsigned int attribute_count; /* value of xml:lang attribute on this element or NULL */ const unsigned char *xml_language; /* URI of xml:base attribute value on this element or NULL */ raptor_uri *base_uri; /* CDATA content of element and checks for mixed content */ raptor_stringbuffer* content_cdata_sb; unsigned int content_cdata_length; /* how many cdata blocks seen */ unsigned int content_cdata_seen; /* how many contained elements seen */ unsigned int content_element_seen; raptor_sequence *declared_nspaces; void* user_data; }; struct raptor_sax2_s { #ifdef RAPTOR_XML_LIBXML int magic; #endif raptor_world* world; void* user_data; #ifdef RAPTOR_XML_LIBXML /* structure holding sax event handlers */ xmlSAXHandler sax; /* parser context */ xmlParserCtxtPtr xc; /* pointer to SAX document locator */ xmlSAXLocatorPtr loc; #if LIBXML_VERSION < 20425 /* flag for some libxml eversions*/ int first_read; #endif #endif /* element depth */ int depth; /* stack of elements - elements add after current_element */ raptor_xml_element *root_element; raptor_xml_element *current_element; /* start of an element */ raptor_sax2_start_element_handler start_element_handler; /* end of an element */ raptor_sax2_end_element_handler end_element_handler; /* characters */ raptor_sax2_characters_handler characters_handler; /* like */ raptor_sax2_cdata_handler cdata_handler; /* comment */ raptor_sax2_comment_handler comment_handler; /* unparsed (NDATA) entity */ raptor_sax2_unparsed_entity_decl_handler unparsed_entity_decl_handler; /* external entity reference */ raptor_sax2_external_entity_ref_handler external_entity_ref_handler; raptor_locator *locator; /* New XML namespace callback */ raptor_namespace_handler namespace_handler; raptor_object_options options; /* stack of namespaces, most recently added at top */ raptor_namespace_stack namespaces; /* static */ /* base URI for resolving relative URIs or xml:base URIs */ raptor_uri* base_uri; /* sax2 init failed - do not try to do anything with it */ int failed; /* call SAX2 handlers if non-0 */ int enabled; void* uri_filter_user_data; raptor_uri_filter_func uri_filter; }; int raptor_sax2_init(raptor_world* world); void raptor_sax2_finish(raptor_world* world); raptor_xml_element* raptor_xml_element_pop(raptor_sax2* sax2); void raptor_xml_element_push(raptor_sax2* sax2, raptor_xml_element* element); int raptor_sax2_get_depth(raptor_sax2* sax2); void raptor_sax2_inc_depth(raptor_sax2* sax2); void raptor_sax2_dec_depth(raptor_sax2* sax2); void raptor_sax2_update_document_locator(raptor_sax2* sax2, raptor_locator* locator); int raptor_sax2_set_option(raptor_sax2 *sax2, raptor_option option, char* string, int integer); #ifdef RAPTOR_DEBUG void raptor_print_xml_element(raptor_xml_element *element, FILE* stream); #endif void raptor_sax2_start_element(void* user_data, const unsigned char *name, const unsigned char **atts); void raptor_sax2_end_element(void* user_data, const unsigned char *name); void raptor_sax2_characters(void* user_data, const unsigned char *s, int len); void raptor_sax2_cdata(void* user_data, const unsigned char *s, int len); void raptor_sax2_comment(void* user_data, const unsigned char *s); void raptor_sax2_unparsed_entity_decl(void* user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName); int raptor_sax2_external_entity_ref(void* user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId); int raptor_sax2_check_load_uri_string(raptor_sax2* sax2, const unsigned char* uri_string); /* turtle_parser.y and turtle_lexer.l */ typedef struct raptor_turtle_parser_s raptor_turtle_parser; /* n3_parser.y and n3_lexer.l */ typedef struct raptor_n3_parser_s raptor_n3_parser; /* raptor_rfc2396.c */ struct raptor_uri_detail_s { size_t uri_len; /* buffer is the same size as the original uri_len */ unsigned char *buffer; /* URI Components. These all point into buffer */ unsigned char *scheme; unsigned char *authority; unsigned char *path; unsigned char *query; unsigned char *fragment; /* Lengths of the URI Components */ size_t scheme_len; size_t authority_len; size_t path_len; size_t query_len; size_t fragment_len; /* Flags */ int is_hierarchical; }; /* for time_t */ #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif /* parsedate.c */ #ifdef HAVE_INN_PARSEDATE #include #define RAPTOR_PARSEDATE_FUNCTION parsedate #else #ifdef HAVE_RAPTOR_PARSE_DATE time_t raptor_parse_date(const char *p, time_t *now); #define RAPTOR_PARSEDATE_FUNCTION raptor_parse_date #else #ifdef HAVE_CURL_CURL_H #include #define RAPTOR_PARSEDATE_FUNCTION curl_getdate #endif #endif #endif /* only used internally now */ typedef void (*raptor_simple_message_handler)(void *user_data, const char *message, ...); /* turtle_common.c */ RAPTOR_INTERNAL_API int raptor_stringbuffer_append_turtle_string(raptor_stringbuffer* stringbuffer, const unsigned char *text, size_t len, int delim, raptor_simple_message_handler error_handler, void *error_data, int is_uri); /* raptor_abbrev.c */ typedef struct { raptor_world* world; int ref_count; /* count of references to this node */ int count_as_subject; /* count of this blank/resource node as subject */ int count_as_object; /* count of this blank/resource node as object */ raptor_term* term; } raptor_abbrev_node; #ifdef RAPTOR_DEBUG #define RAPTOR_DEBUG_ABBREV_NODE(label, node) \ do { \ RAPTOR_DEBUG1(label " "); \ raptor_term_print_as_ntriples(node->term, RAPTOR_DEBUG_FH); \ fprintf(RAPTOR_DEBUG_FH, " (refcount %d subject %d object %d)\n", \ node->ref_count, \ node->count_as_subject, \ node->count_as_object); \ } while(0) #else #define RAPTOR_DEBUG_ABBREV_NODE(label, node) #endif typedef struct { raptor_abbrev_node* node; /* node representing the subject of * this resource */ raptor_abbrev_node* node_type; /* the rdf:type of this resource */ raptor_avltree *properties; /* list of properties * (predicate/object pair) of this * subject */ raptor_sequence *list_items; /* list of container elements if * is rdf container */ int valid; /* set 0 for blank nodes that do not * need to be referred to again */ } raptor_abbrev_subject; raptor_abbrev_node* raptor_new_abbrev_node(raptor_world* world, raptor_term* term); void raptor_free_abbrev_node(raptor_abbrev_node* node); int raptor_abbrev_node_compare(raptor_abbrev_node* node1, raptor_abbrev_node* node2); int raptor_abbrev_node_equals(raptor_abbrev_node* node1, raptor_abbrev_node* node2); raptor_abbrev_node* raptor_abbrev_node_lookup(raptor_avltree* nodes, raptor_term* term); void raptor_free_abbrev_subject(raptor_abbrev_subject* subject); int raptor_abbrev_subject_add_property(raptor_abbrev_subject* subject, raptor_abbrev_node* predicate, raptor_abbrev_node* object); int raptor_abbrev_subject_compare(raptor_abbrev_subject* subject1, raptor_abbrev_subject* subject2); raptor_abbrev_subject* raptor_abbrev_subject_find(raptor_avltree *subjects, raptor_term* node); raptor_abbrev_subject* raptor_abbrev_subject_lookup(raptor_avltree* nodes, raptor_avltree* subjects, raptor_avltree* blanks, raptor_term* term); int raptor_abbrev_subject_valid(raptor_abbrev_subject *subject); int raptor_abbrev_subject_invalidate(raptor_abbrev_subject *subject); /* avltree */ #ifdef RAPTOR_DEBUG int raptor_avltree_dump(raptor_avltree* tree, FILE* stream); void raptor_avltree_check(raptor_avltree* tree); #endif raptor_qname* raptor_new_qname_from_resource(raptor_sequence* namespaces, raptor_namespace_stack* nstack, int* namespace_count, raptor_abbrev_node* node); /** * raptor_turtle_writer: * * Raptor Turtle Writer class */ typedef struct raptor_turtle_writer_s raptor_turtle_writer; /* Turtle Writer Class (raptor_turtle_writer) */ RAPTOR_INTERNAL_API raptor_turtle_writer* raptor_new_turtle_writer(raptor_world* world, raptor_uri* base_uri, int write_base_uri, raptor_namespace_stack *nstack, raptor_iostream* iostr); RAPTOR_INTERNAL_API void raptor_free_turtle_writer(raptor_turtle_writer* turtle_writer); RAPTOR_INTERNAL_API void raptor_turtle_writer_raw(raptor_turtle_writer* turtle_writer, const unsigned char *s); RAPTOR_INTERNAL_API void raptor_turtle_writer_raw_counted(raptor_turtle_writer* turtle_writer, const unsigned char *s, unsigned int len); RAPTOR_INTERNAL_API void raptor_turtle_writer_namespace_prefix(raptor_turtle_writer* turtle_writer, raptor_namespace* ns); void raptor_turtle_writer_base(raptor_turtle_writer* turtle_writer, raptor_uri* base_uri); RAPTOR_INTERNAL_API void raptor_turtle_writer_increase_indent(raptor_turtle_writer *turtle_writer); RAPTOR_INTERNAL_API void raptor_turtle_writer_decrease_indent(raptor_turtle_writer *turtle_writer); RAPTOR_INTERNAL_API void raptor_turtle_writer_newline(raptor_turtle_writer *turtle_writer); RAPTOR_INTERNAL_API int raptor_turtle_writer_reference(raptor_turtle_writer* turtle_writer, raptor_uri* uri); RAPTOR_INTERNAL_API int raptor_turtle_writer_literal(raptor_turtle_writer* turtle_writer, raptor_namespace_stack *nstack, const unsigned char *s, const unsigned char* lang, raptor_uri* datatype); RAPTOR_INTERNAL_API void raptor_turtle_writer_qname(raptor_turtle_writer* turtle_writer, raptor_qname* qname); RAPTOR_INTERNAL_API int raptor_turtle_writer_quoted_counted_string(raptor_turtle_writer* turtle_writer, const unsigned char *s, size_t length); void raptor_turtle_writer_comment(raptor_turtle_writer* turtle_writer, const unsigned char *s); RAPTOR_INTERNAL_API int raptor_turtle_writer_set_option(raptor_turtle_writer *turtle_writer, raptor_option option, int value); int raptor_turtle_writer_set_option_string(raptor_turtle_writer *turtle_writer, raptor_option option, const unsigned char *value); int raptor_turtle_writer_get_option(raptor_turtle_writer *turtle_writer, raptor_option option); const unsigned char *raptor_turtle_writer_get_option_string(raptor_turtle_writer *turtle_writer, raptor_option option); void raptor_turtle_writer_bnodeid(raptor_turtle_writer* turtle_writer, const unsigned char *bnodeid, size_t len); int raptor_turtle_writer_uri(raptor_turtle_writer* turtle_writer, raptor_uri* uri); int raptor_turtle_writer_term(raptor_turtle_writer* turtle_writer, raptor_term* term); int raptor_turtle_is_legal_turtle_qname(raptor_qname* qname); /** * raptor_json_writer: * * Raptor JSON Writer class */ typedef struct raptor_json_writer_s raptor_json_writer; /* raptor_json_writer.c */ raptor_json_writer* raptor_new_json_writer(raptor_world* world, raptor_uri* base_uri, raptor_iostream* iostr); void raptor_free_json_writer(raptor_json_writer* json_writer); int raptor_json_writer_newline(raptor_json_writer* json_writer); int raptor_json_writer_key_value(raptor_json_writer* json_writer, const char* key, size_t key_len, const char* value, size_t value_len); int raptor_json_writer_start_block(raptor_json_writer* json_writer, char c); int raptor_json_writer_end_block(raptor_json_writer* json_writer, char c); int raptor_json_writer_literal_object(raptor_json_writer* json_writer, unsigned char* s, size_t s_len, unsigned char* lang, raptor_uri* datatype); int raptor_json_writer_blank_object(raptor_json_writer* json_writer, const unsigned char* blank, size_t blank_len); int raptor_json_writer_uri_object(raptor_json_writer* json_writer, raptor_uri* uri); int raptor_json_writer_term(raptor_json_writer* json_writer, raptor_term *term); int raptor_json_writer_key_uri_value(raptor_json_writer* json_writer, const char* key, size_t key_len, raptor_uri* uri); /* raptor_memstr.c */ const char* raptor_memstr(const char *haystack, size_t haystack_len, const char *needle); /* raptor_serialize_rdfxmla.c special functions for embedding rdf/xml */ int raptor_rdfxmla_serialize_set_write_rdf_RDF(raptor_serializer* serializer, int value); int raptor_rdfxmla_serialize_set_xml_writer(raptor_serializer* serializer, raptor_xml_writer* xml_writer, raptor_namespace_stack *nstack); int raptor_rdfxmla_serialize_set_single_node(raptor_serializer* serializer, raptor_uri* uri); int raptor_rdfxmla_serialize_set_write_typed_nodes(raptor_serializer* serializer, int value); /* snprintf.c */ size_t raptor_format_integer(char* buffer, size_t bufsize, int integer, unsigned int base, int width, char padding); /* raptor_world structure */ #define RAPTOR1_WORLD_MAGIC_1 0 #define RAPTOR1_WORLD_MAGIC_2 1 #define RAPTOR2_WORLD_MAGIC 0xC4129CEF #define RAPTOR_CHECK_CONSTRUCTOR_WORLD(world) \ do { \ if(raptor_check_world_internal(world, __FUNCTION__)) \ return NULL; \ } while(0) RAPTOR_INTERNAL_API int raptor_check_world_internal(raptor_world* world, const char* name); struct raptor_world_s { /* signature to check this is a world object */ unsigned int magic; /* world has been initialized with raptor_world_open() */ int opened; /* internal flag used to ignore errors for e.g. child GRDDL parsers */ int internal_ignore_errors; void* message_handler_user_data; raptor_log_handler message_handler; /* sequence of parser factories */ raptor_sequence *parsers; /* sequence of serializer factories */ raptor_sequence *serializers; /* raptor_rss_common initialisation counter */ int rss_common_initialised; /* raptor_rss_{namespaces,types,fields}_info const data initialized to raptor_uri,raptor_qname objects */ raptor_uri **rss_namespaces_info_uris; raptor_uri **rss_types_info_uris; raptor_qname **rss_types_info_qnames; raptor_uri **rss_fields_info_uris; raptor_qname **rss_fields_info_qnames; /* raptor_www v2 flags */ int www_skip_www_init_finish; int www_initialized; /* This is used to store a #xsltSecurityPrefsPtr typed object * pointer when libxslt is compiled in. */ void* xslt_security_preferences; /* 0 raptor owns the above object and should free it with * xsltFreeSecurityPrefs() on exit * 1 user set the above object and raptor does not own it */ int xslt_security_preferences_policy; /* Flags for libxml set by raptor_world_set_libxml_flags(). * See #raptor_libxml_flags for meanings */ int libxml_flags; #ifdef RAPTOR_XML_LIBXML void *libxml_saved_structured_error_context; xmlStructuredErrorFunc libxml_saved_structured_error_handler; void *libxml_saved_generic_error_context; xmlGenericErrorFunc libxml_saved_generic_error_handler; #endif raptor_avltree *uris_tree; raptor_uri* concepts[RDF_NS_LAST + 1]; raptor_term* terms[RDF_NS_LAST + 1]; /* last log message - points to data it does not own */ raptor_log_message message; /* should */ int uri_interning; /* generate blank node ID policy */ void *generate_bnodeid_handler_user_data; raptor_generate_bnodeid_handler generate_bnodeid_handler; int default_generate_bnodeid_handler_base; char *default_generate_bnodeid_handler_prefix; unsigned int default_generate_bnodeid_handler_prefix_length; raptor_uri* xsd_namespace_uri; raptor_uri* xsd_boolean_uri; raptor_uri* xsd_decimal_uri; raptor_uri* xsd_double_uri; raptor_uri* xsd_integer_uri; }; /* raptor_www.c */ int raptor_www_init(raptor_world* world); void raptor_www_finish(raptor_world* world); #define RAPTOR_LANG_LEN_FROM_INT(len) (int)(len) #define RAPTOR_LANG_LEN_TO_SIZE_T(len) (size_t)(len) /* Safe casts: widening a value */ #define RAPTOR_GOOD_CAST(t, v) (t)(v) /* Unsafe casts: narrowing a value */ #define RAPTOR_BAD_CAST(t, v) (t)(v) /* end of RAPTOR_INTERNAL */ #endif #ifdef __cplusplus } #endif #endif raptor2-2.0.15/src/raptor_stringbuffer.c0000644000175000017500000005640212020170223015127 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_stringbuffer.c - Stringbuffer class for growing strings * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_STDLIB_H #include /* for abort() as used in errors */ #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE struct raptor_stringbuffer_node_s { struct raptor_stringbuffer_node_s* next; unsigned char *string; size_t length; }; typedef struct raptor_stringbuffer_node_s raptor_stringbuffer_node; struct raptor_stringbuffer_s { /* Pointing to the first item in the list of nodes */ raptor_stringbuffer_node* head; /* and the last */ raptor_stringbuffer_node* tail; /* total length of the string */ size_t length; /* frozen string if already calculated, or NULL if not present */ unsigned char *string; }; /* prototypes for local functions */ static int raptor_stringbuffer_append_string_common(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy); /* functions implementing the stringbuffer api */ /** * raptor_new_stringbuffer: * * Create a new stringbuffer. * * Return value: pointer to a raptor_stringbuffer object or NULL on failure **/ raptor_stringbuffer* raptor_new_stringbuffer(void) { raptor_stringbuffer* sb; sb = RAPTOR_CALLOC(raptor_stringbuffer*, 1, sizeof(*sb)); return sb; } /** * raptor_free_stringbuffer: * @stringbuffer: stringbuffer object to destroy. * * Destroy a stringbuffer. * **/ void raptor_free_stringbuffer(raptor_stringbuffer *stringbuffer) { if(!stringbuffer) return; if(stringbuffer->head) { raptor_stringbuffer_node *node = stringbuffer->head; while(node) { raptor_stringbuffer_node *next = node->next; if(node->string) RAPTOR_FREE(char*, node->string); RAPTOR_FREE(raptor_stringbuffer_node, node); node = next; } } if(stringbuffer->string) RAPTOR_FREE(char*, stringbuffer->string); RAPTOR_FREE(raptor_stringbuffer, stringbuffer); } /** * raptor_stringbuffer_append_string_common: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * * Add a string to the stringbuffer. * * INTERNAL * * If @string is NULL or @length is 0, no work is performed. * * If @do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ static int raptor_stringbuffer_append_string_common(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { raptor_stringbuffer_node *node; if(!string || !length) return 0; node = RAPTOR_MALLOC(raptor_stringbuffer_node*, sizeof(*node)); if(!node) { if(!do_copy) RAPTOR_FREE(char*, string); return 1; } if(do_copy) { /* Note this copy does not include the \0 character - not needed */ node->string = RAPTOR_MALLOC(unsigned char*, length); if(!node->string) { RAPTOR_FREE(raptor_stringbuffer_node, node); return 1; } memcpy(node->string, string, length); } else node->string = (unsigned char*)string; node->length = length; if(stringbuffer->tail) { stringbuffer->tail->next = node; stringbuffer->tail = node; } else stringbuffer->head = stringbuffer->tail = node; node->next = NULL; if(stringbuffer->string) { RAPTOR_FREE(char*, stringbuffer->string); stringbuffer->string = NULL; } stringbuffer->length += length; return 0; } /** * raptor_stringbuffer_append_counted_string: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * * Add a counted string to the stringbuffer. * * If @string is NULL or @length is 0, no work is performed. * * If @do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { if(!string || !length) return 0; return raptor_stringbuffer_append_string_common(stringbuffer, string, length, do_copy); } /** * raptor_stringbuffer_append_string: * @stringbuffer: raptor stringbuffer * @string: string * @do_copy: non-0 to copy the string * * Add a string to the stringbuffer. * * If @string is NULL, no work is performed. * * If @do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy) { if(!string) return 0; return raptor_stringbuffer_append_string_common(stringbuffer, string, strlen((const char*)string), do_copy); } /** * raptor_stringbuffer_append_decimal: * @stringbuffer: raptor stringbuffer * @integer: integer to format as decimal and add * * Add an integer in decimal to the stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_decimal(raptor_stringbuffer* stringbuffer, int integer) { /* enough for 64 bit signed integer * INT64_MAX is 9223372036854775807 (19 digits) + 1 for sign */ unsigned char buf[20]; unsigned char *p; int i = integer; size_t length = 1; if(integer < 0) { length++; i= -integer; } while(i /= 10) length++; p = buf+length-1; i = integer; if(i < 0) i= -i; do { *p-- ='0'+(i %10); i /= 10; } while(i); if(integer < 0) *p= '-'; return raptor_stringbuffer_append_counted_string(stringbuffer, buf, length, 1); } /** * raptor_stringbuffer_append_stringbuffer: * @stringbuffer: #raptor_stringbuffer * @append: #raptor_stringbuffer to append * * Add a stringbuffer to the stringbuffer. * * This function removes the content from the appending stringbuffer, * making it empty and appends it to the supplied stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer* stringbuffer, raptor_stringbuffer* append) { raptor_stringbuffer_node *node = append->head; if(!node) return 0; /* move all append nodes to stringbuffer */ if(stringbuffer->tail) { stringbuffer->tail->next = node; } else stringbuffer->head = node; stringbuffer->tail = append->tail; /* adjust our length */ stringbuffer->length += append->length; if(stringbuffer->string) { RAPTOR_FREE(char*, stringbuffer->string); stringbuffer->string = NULL; } /* zap append content */ append->head = append->tail = NULL; append->length = 0; if(append->string) { RAPTOR_FREE(char*, append->string); append->string = NULL; } return 0; } /** * raptor_stringbuffer_prepend_string_common: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * * Add a string to the start of a stringbuffer. * * INTERNAL * * If do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ static int raptor_stringbuffer_prepend_string_common(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { raptor_stringbuffer_node *node; node = RAPTOR_MALLOC(raptor_stringbuffer_node*, sizeof(*node)); if(!node) return 1; if(do_copy) { /* Note this copy does not include the \0 character - not needed */ node->string = RAPTOR_MALLOC(unsigned char*, length); if(!node->string) { RAPTOR_FREE(raptor_stringbuffer_node, node); return 1; } memcpy(node->string, string, length); } else node->string = (unsigned char*)string; node->length = length; node->next = stringbuffer->head; if(stringbuffer->head) stringbuffer->head = node; else stringbuffer->head = stringbuffer->tail = node; if(stringbuffer->string) { RAPTOR_FREE(char*, stringbuffer->string); stringbuffer->string = NULL; } stringbuffer->length += length; return 0; } /** * raptor_stringbuffer_prepend_counted_string: * @stringbuffer: raptor stringbuffer * @string: string * @length: length of string * @do_copy: non-0 to copy the string * If do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Add a string to the start of the stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy) { return raptor_stringbuffer_prepend_string_common(stringbuffer, string, length, do_copy); } /** * raptor_stringbuffer_prepend_string: * @stringbuffer: raptor stringbuffer * @string: string * @do_copy: non-0 to copy the string * * Add a string to the start of the stringbuffer. * * If do_copy is non-0, the passed-in string is copied into new memory * otherwise the stringbuffer becomes the owner of the string pointer * and will free it when the stringbuffer is destroyed. * * Return value: non-0 on failure **/ int raptor_stringbuffer_prepend_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy) { return raptor_stringbuffer_prepend_string_common(stringbuffer, string, strlen((const char*)string), do_copy); } /** * raptor_stringbuffer_length: * @stringbuffer: raptor stringbuffer * * Return the stringbuffer length. * * Return value: size of stringbuffer **/ size_t raptor_stringbuffer_length(raptor_stringbuffer* stringbuffer) { return stringbuffer->length; } /** * raptor_stringbuffer_as_string: * @stringbuffer: raptor stringbuffer * * Return the stringbuffer as a C string. * * Note: the return value is a to a shared string that the stringbuffer * allocates and manages. * * Return value: NULL on failure or stringbuffer is empty, otherwise * a pointer to a shared copy of the string. **/ unsigned char * raptor_stringbuffer_as_string(raptor_stringbuffer* stringbuffer) { raptor_stringbuffer_node *node; unsigned char *p; if(!stringbuffer->length) return NULL; if(stringbuffer->string) return stringbuffer->string; stringbuffer->string = RAPTOR_MALLOC(unsigned char*, stringbuffer->length + 1); if(!stringbuffer->string) return NULL; node = stringbuffer->head; p = stringbuffer->string; while(node) { memcpy(p, node->string, node->length); p+= node->length; node = node->next; } *p='\0'; return stringbuffer->string; } /** * raptor_stringbuffer_copy_to_string: * @stringbuffer: raptor stringbuffer * @string: output string * @length: size of output string * * Copy the stringbuffer into a string. * * Copies the underlying string to a pre-allocated buffer. The * output string is always '\0' terminated. * * Return value: non-0 on failure such as stringbuffer is empty, buffer is too small **/ int raptor_stringbuffer_copy_to_string(raptor_stringbuffer* stringbuffer, unsigned char *string, size_t length) { raptor_stringbuffer_node *node; unsigned char *p; if(!string || length < 1) return 1; if(!stringbuffer->length) return 0; p = string; for(node = stringbuffer->head; node; node = node->next) { if(node->length > length) { p[-1]='\0'; return 1; } memcpy(p, node->string, node->length); p+= node->length; length-= node->length; } *p='\0'; return 0; } /** * raptor_stringbuffer_append_hexadecimal: * @stringbuffer: raptor stringbuffer * @hex: integer to format * * Add an integer formatted in hexdecimal (base 16) to the stringbuffer. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_hexadecimal(raptor_stringbuffer* stringbuffer, int hex) { unsigned char buf[2]; if(hex < 0 || hex > 0xF) return 1; *buf = (hex < 10) ? ('0' + hex) : ('A' + hex - 10); buf[1] = '\0'; return raptor_stringbuffer_append_counted_string(stringbuffer, buf, 1, 1); } /* RFC3986 Unreserved */ #define IS_URI_UNRESERVED(c) ( (c >= 'A' && c <= 'F') || \ (c >= 'a' && c <= 'f') || \ (c >= '0' && c <= '9') || \ (c == '-' || c == '.' || c == '_' || c == '~') ) #define IS_URI_SAFE(c) (IS_URI_UNRESERVED(c)) /** * raptor_stringbuffer_append_uri_escaped_counted_string: * @sb: raptor stringbuffer * @string: string * @length: length of string * @space_is_plus: if non-0, escape spaces as '+' otherwise percent-encode them * * Add a URI-escaped version of @string to the stringbuffer. * * If @string is NULL or @length is 0, no work is performed. * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_uri_escaped_counted_string(raptor_stringbuffer* sb, const char* string, size_t length, int space_is_plus) { unsigned int i; unsigned char buf[2]; buf[1] = '\0'; if(!string || !length) return 0; for(i = 0; i < length; i++) { int c = string[i]; if(!c) break; if(IS_URI_SAFE(c)) { *buf = c; if(raptor_stringbuffer_append_counted_string(sb, buf, 1, 1)) return 1; } else if (c == ' ' && space_is_plus) { *buf = '+'; if(raptor_stringbuffer_append_counted_string(sb, buf, 1, 1)) return 1; } else { *buf = '%'; if(raptor_stringbuffer_append_counted_string(sb, buf, 1, 1)) return 1; if(raptor_stringbuffer_append_hexadecimal(sb, (c & 0xf0) >> 4)) return 1; if(raptor_stringbuffer_append_hexadecimal(sb, (c & 0x0f))) return 1; } } return 0; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { const char *program = raptor_basename(argv[0]); #define TEST_ITEMS_COUNT 9 const char *items[TEST_ITEMS_COUNT] = { "the", "quick" ,"brown", "fox", "jumps", "over", "the", "lazy", "dog" }; const char *items_string = "thequickbrownfoxjumpsoverthelazydog"; const size_t items_len = 35; const char *test_integer_string = "abcd"; #define TEST_INTEGERS_COUNT 7 const int test_integers[TEST_INTEGERS_COUNT]={ 0, 1, -1, 11, 1234, 12345, -12345 }; const char *test_integer_results[TEST_INTEGERS_COUNT]={ "abcd0", "abcd1", "abcd-1", "abcd11", "abcd1234", "abcd12345", "abcd-12345" }; raptor_stringbuffer *sb; unsigned char *str; size_t len; int i = 0; raptor_stringbuffer *sb1, *sb2; #define TEST_APPEND_COUNT 2 const char *test_append_results[TEST_APPEND_COUNT]={ "thebrownjumpsthedog", "quickfoxoverlazy" }; const char *test_append_results_total="thebrownjumpsthedogquickfoxoverlazy"; #define COPY_STRING_BUFFER_SIZE 100 unsigned char *copy_string; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Creating string buffer\n", program); #endif /* test appending */ sb = raptor_new_stringbuffer(); if(!sb) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } for(i = 0; i < TEST_ITEMS_COUNT; i++) { int rc; len = strlen(items[i]); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding string buffer item '%s'\n", program, items[i]); #endif rc = raptor_stringbuffer_append_counted_string(sb, (unsigned char*)items[i], len, 1); if(rc) { fprintf(stderr, "%s: Adding string buffer item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } len = raptor_stringbuffer_length(sb); if(len != items_len) { fprintf(stderr, "%s: string buffer len is %d, expected %d\n", program, (int)len, (int)items_len); exit(1); } str = raptor_stringbuffer_as_string(sb); if(strcmp((const char*)str, items_string)) { fprintf(stderr, "%s: string buffer contains '%s', expected '%s'\n", program, str, items_string); exit(1); } raptor_free_stringbuffer(sb); /* test prepending */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Creating string buffer\n", program); #endif sb = raptor_new_stringbuffer(); if(!sb) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } for(i = TEST_ITEMS_COUNT-1; i>=0 ; i--) { int rc; len = strlen(items[i]); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Prepending string buffer item '%s'\n", program, items[i]); #endif rc = raptor_stringbuffer_prepend_counted_string(sb, (unsigned char*)items[i], len, 1); if(rc) { fprintf(stderr, "%s: Prepending string buffer item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } len = raptor_stringbuffer_length(sb); if(len != items_len) { fprintf(stderr, "%s: string buffer len is %d, expected %d\n", program, (int)len, (int)items_len); exit(1); } str = raptor_stringbuffer_as_string(sb); if(strcmp((const char*)str, items_string)) { fprintf(stderr, "%s: string buffer contains '%s', expected '%s'\n", program, str, items_string); exit(1); } /* test adding integers */ for(i = 0; i < TEST_INTEGERS_COUNT; i++) { raptor_stringbuffer *isb = raptor_new_stringbuffer(); if(!isb) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } raptor_stringbuffer_append_string(isb, (const unsigned char*)test_integer_string, 1); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding decimal integer %d to buffer\n", program, test_integers[i]); #endif raptor_stringbuffer_append_decimal(isb, test_integers[i]); str = raptor_stringbuffer_as_string(isb); if(strcmp((const char*)str, test_integer_results[i])) { fprintf(stderr, "%s: string buffer contains '%s', expected '%s'\n", program, str, test_integer_results[i]); exit(1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing string buffer\n", program); #endif raptor_free_stringbuffer(isb); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Creating two stringbuffers to join\n", program); #endif sb1 = raptor_new_stringbuffer(); if(!sb1) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } sb2 = raptor_new_stringbuffer(); if(!sb2) { fprintf(stderr, "%s: Failed to create string buffer\n", program); exit(1); } for(i = 0; i < TEST_ITEMS_COUNT; i++) { raptor_stringbuffer *sbx; int rc; len = strlen(items[i]); sbx = (i % 2) ? sb2 : sb1; rc = raptor_stringbuffer_append_counted_string(sbx, (unsigned char*)items[i], len, 1); if(rc) { fprintf(stderr, "%s: Adding string buffer item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } } if(1) { int rc; rc = raptor_stringbuffer_append_counted_string(sb1, (unsigned char*)"X", 0, 1); if(rc) { fprintf(stderr, "%s: Adding 0-length counted string failed, returning error %d\n", program, rc); exit(1); } rc = raptor_stringbuffer_append_string(sb1, NULL, 1); if(rc) { fprintf(stderr, "%s: Adding NULL string failed, returning error %d\n", program, rc); exit(1); } } str = raptor_stringbuffer_as_string(sb1); if(strcmp((const char*)str, test_append_results[0])) { fprintf(stderr, "%s: string buffer sb1 contains '%s', expected '%s'\n", program, str, test_append_results[0]); exit(1); } str = raptor_stringbuffer_as_string(sb2); if(strcmp((const char*)str, test_append_results[1])) { fprintf(stderr, "%s: string buffer sb2 contains '%s', expected '%s'\n", program, str, test_append_results[1]); exit(1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Appended two stringbuffers\n", program); #endif if(raptor_stringbuffer_append_stringbuffer(sb1, sb2)) { fprintf(stderr, "%s: Failed to append string buffer\n", program); exit(1); } str = raptor_stringbuffer_as_string(sb1); if(strcmp((const char*)str, test_append_results_total)) { fprintf(stderr, "%s: appended string buffer contains '%s', expected '%s'\n", program, str, test_append_results_total); exit(1); } len = raptor_stringbuffer_length(sb2); if(len) { fprintf(stderr, "%s: appended string buffer is length %d, not empty'\n", program, (int)len); exit(1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Copying string buffer to string\n", program); #endif copy_string = (unsigned char*)malloc(COPY_STRING_BUFFER_SIZE); if(raptor_stringbuffer_copy_to_string(sb1, copy_string, COPY_STRING_BUFFER_SIZE)) { fprintf(stderr, "%s: copying string buffer to string failed\n", program); exit(1); } if(strcmp((const char*)copy_string, test_append_results_total)) { fprintf(stderr, "%s: copied string buffer contains '%s', expected '%s'\n", program, copy_string, test_append_results_total); exit(1); } free(copy_string); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing string buffers\n", program); #endif raptor_free_stringbuffer(sb1); raptor_free_stringbuffer(sb2); raptor_free_stringbuffer(sb); /* keep gcc -Wall happy */ return(0); } #endif raptor2-2.0.15/src/raptor2.h.in0000644000175000017500000022216412425333224013056 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor.h - Redland Parser Toolkit for RDF (Raptor) - public API * * Copyright (C) 2000-2013, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef RAPTOR_H #define RAPTOR_H #ifdef __cplusplus extern "C" { #endif #include /* Required for va_list in raptor_vsnprintf */ #include /** * RAPTOR_V2_AVAILABLE * * Flag for marking raptor2 API availability. */ #define RAPTOR_V2_AVAILABLE 1 /** * RAPTOR_VERSION: * * Raptor library version number * * Format: major * 10000 + minor * 100 + release */ #define RAPTOR_VERSION @RAPTOR_VERSION_DECIMAL@ /** * RAPTOR_VERSION_STRING: * * Raptor library version string */ #define RAPTOR_VERSION_STRING "@VERSION@" /** * RAPTOR_VERSION_MAJOR: * * Raptor library major version */ #define RAPTOR_VERSION_MAJOR @RAPTOR_VERSION_MAJOR@ /** * RAPTOR_VERSION_MINOR: * * Raptor library minor version */ #define RAPTOR_VERSION_MINOR @RAPTOR_VERSION_MINOR@ /** * RAPTOR_VERSION_RELEASE: * * Raptor library release */ #define RAPTOR_VERSION_RELEASE @RAPTOR_VERSION_RELEASE@ /** * RAPTOR_API: * * Macro for wrapping API function call declarations. * */ #ifndef RAPTOR_API # ifdef WIN32 # ifdef __GNUC__ # undef _declspec # define _declspec(x) __declspec(x) # endif # ifdef RAPTOR_STATIC # define RAPTOR_API # else # ifdef RAPTOR_INTERNAL # define RAPTOR_API _declspec(dllexport) # else # define RAPTOR_API _declspec(dllimport) # endif # endif # else # define RAPTOR_API # endif #endif /* Use gcc 3.1+ feature to allow marking of deprecated API calls. * This gives a warning during compiling. */ #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) #define RAPTOR_DEPRECATED __attribute__((deprecated)) #define RAPTOR_NORETURN __attribute__((__noreturn__)) #else #define RAPTOR_DEPRECATED #define RAPTOR_NORETURN #endif /** * RAPTOR_PRINTF_FORMAT: * @string_index: ignore me * @first_to_check_index: ignore me * * Internal macro */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) #define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) \ __attribute__((__format__(__printf__, string_index, first_to_check_index))) #else #define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) #endif /** * raptor_uri: * * Raptor URI Class. */ typedef struct raptor_uri_s raptor_uri; /* Public statics */ /** * raptor_short_copyright_string: * * Short copyright string (one line). */ RAPTOR_API extern const char * const raptor_short_copyright_string; /** * raptor_copyright_string: * * Copyright string (multiple lines). */ RAPTOR_API extern const char * const raptor_copyright_string; /** * raptor_version_string: * * Raptor version as a string. */ RAPTOR_API extern const char * const raptor_version_string; /** * raptor_version_major: * * Raptor major version number. */ RAPTOR_API extern const unsigned int raptor_version_major; /** * raptor_version_minor: * * Raptor minor version number. */ RAPTOR_API extern const unsigned int raptor_version_minor; /** * raptor_version_release: * * Raptor release version number. */ RAPTOR_API extern const unsigned int raptor_version_release; /** * raptor_version_decimal: * * Raptor version as a decimal number. * * Format: major * 10000 + minor * 100 + release */ RAPTOR_API extern const unsigned int raptor_version_decimal; /** * raptor_license_string: * * Raptor license string. */ RAPTOR_API extern const char * const raptor_license_string; /** * raptor_home_url_string: * * Raptor home page URL. */ RAPTOR_API extern const char * const raptor_home_url_string; /** * raptor_xml_namespace_uri: * * XML Namespace (xml:) URI string. */ RAPTOR_API extern const unsigned char * const raptor_xml_namespace_uri; /** * raptor_rdf_namespace_uri: * * RDF Namespace (rdf:) URI string. */ RAPTOR_API extern const unsigned char * const raptor_rdf_namespace_uri; /** * raptor_rdf_namespace_uri_len: * * Length of #raptor_rdf_namespace_uri string */ RAPTOR_API extern const unsigned int raptor_rdf_namespace_uri_len; /** * raptor_rdf_schema_namespace_uri: * * RDF Schema (rdfs:) Namespace URI string. */ RAPTOR_API extern const unsigned char * const raptor_rdf_schema_namespace_uri; /** * raptor_xmlschema_datatypes_namespace_uri: * * XML Schema datatypes (xsd:) namespace URI string. */ RAPTOR_API extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri; /** * raptor_owl_namespace_uri: * * OWL (owl:) Namespace URI string. */ RAPTOR_API extern const unsigned char * const raptor_owl_namespace_uri; /** * raptor_xml_literal_datatype_uri_string: * * XML Literal datatype (rdf:XMLLiteral) URI string. */ RAPTOR_API extern const unsigned char * const raptor_xml_literal_datatype_uri_string; /** * raptor_xml_literal_datatype_uri_string_len: * * Length of #raptor_xml_literal_datatype_uri_string */ RAPTOR_API extern const unsigned int raptor_xml_literal_datatype_uri_string_len; /* Public structure */ /** * raptor_world: * * Raptor world class. */ typedef struct raptor_world_s raptor_world; /** * raptor_parser: * * Raptor Parser class */ typedef struct raptor_parser_s raptor_parser; /** * raptor_serializer: * * Raptor Serializer class */ typedef struct raptor_serializer_s raptor_serializer; /** * raptor_www: * * Raptor WWW class */ typedef struct raptor_www_s raptor_www; /** * raptor_iostream: * * Raptor I/O Stream class */ typedef struct raptor_iostream_s raptor_iostream; /** * raptor_xml_element: * * Raptor XML Element class */ typedef struct raptor_xml_element_s raptor_xml_element; /** * raptor_xml_writer: * * Raptor XML Writer class */ typedef struct raptor_xml_writer_s raptor_xml_writer; /** * raptor_qname: * * Raptor XML qname class */ typedef struct raptor_qname_s raptor_qname; /** * raptor_namespace: * * Raptor XML Namespace class */ typedef struct raptor_namespace_s raptor_namespace; /** * raptor_namespace_stack: * * Raptor XML Namespace Stack class */ typedef struct raptor_namespace_stack_s raptor_namespace_stack; /** * raptor_sax2: * * Raptor SAX2 class */ typedef struct raptor_sax2_s raptor_sax2; /** * raptor_type_q: * @mime_type: MIME type string * @mime_type_len: length of @mime_type * @q: Q value 0-10 standing for decimal 0.0-1.0 * * (MIME Type, Q) pair */ typedef struct { const char* mime_type; size_t mime_type_len; unsigned char q; } raptor_type_q; /** * raptor_syntax_bitflags: * @RAPTOR_SYNTAX_NEED_BASE_URI: the syntax requires a base URI * * Bit flags for #raptor_syntax_description flags field */ typedef enum { RAPTOR_SYNTAX_NEED_BASE_URI = 1 } raptor_syntax_bitflags; /** * raptor_syntax_description: * @names: array of syntax names - the first one (required) is the public name, the rest are aliases. The array is NULL terminated. * @names_count: size of @names array * @label: long descriptive label for syntax * @mime_types: Array of (MIME type, Q) values associated with the syntax (or NULL). If present the array is NULL terminated. * @mime_types_count: size of @mime_types array * @uri_strings: array of URIs identifying the syntax (or NULL). The first one if present is the main URI, the rest are aliases. The array is NULL terminated. * @uri_strings_count: size of @uri_strings array * @flags: See #raptor_syntax_bitflags for the bits * * Description of a syntax or file format. * */ typedef struct { const char* const* names; unsigned int names_count; const char* label; const raptor_type_q* mime_types; unsigned int mime_types_count; const char* const* uri_strings; unsigned int uri_strings_count; unsigned int flags; } raptor_syntax_description; /** * raptor_term_type: * @RAPTOR_TERM_TYPE_URI: RDF URI * @RAPTOR_TERM_TYPE_LITERAL: RDF literal * @RAPTOR_TERM_TYPE_BLANK: RDF blank node * @RAPTOR_TERM_TYPE_UNKNOWN: Internal * * Type of term in a #raptor_statement * * Node type 3 is unused but exists to preserve numeric compatibility * with librdf_node_type values. */ typedef enum { RAPTOR_TERM_TYPE_UNKNOWN = 0, RAPTOR_TERM_TYPE_URI = 1, RAPTOR_TERM_TYPE_LITERAL = 2, /* unused type 3 */ RAPTOR_TERM_TYPE_BLANK = 4 } raptor_term_type; /** * raptor_locator: * @uri: URI of location (or NULL) * @file: Filename of location (or NULL) * @line: Line number of location (or <0 for no line) * @column: Column number of location (or <0 for no column) * @byte: Byte number of location (or <0 for no byte) * * Location information for an error, warning or information message. */ typedef struct { raptor_uri *uri; const char *file; int line; int column; int byte; } raptor_locator; /** * raptor_option: * @RAPTOR_OPTION_SCANNING: If true (default false), the RDF/XML * parser will look for embedded rdf:RDF elements inside the XML * content, and not require that the XML start with an rdf:RDF root * element. * @RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES: If true (default true) * then the RDF/XML parser will allow non-XML namespaced attributes * to be accepted as well as rdf: namespaced ones. For example, * 'about' and 'ID' will be interpreted as if they were rdf:about * and rdf:ID respectively. * @RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES: If true (default true) * then the RDF/XML parser will allow unknown parsetypes to be * present and will pass them on to the user. Unimplemented at * present. * @RAPTOR_OPTION_ALLOW_BAGID: If true (default true) then the * RDF/XML parser will support the rdf:bagID attribute that was * removed from the RDF/XML language when it was revised. This * support may be removed in future. * @RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST: If true (default false) * then the RDF/XML parser will generate the idList rdf:type * rdf:List triple in the handling of rdf:parseType="Collection". * This triple was removed during the revising of RDF/XML after * collections were initially added. * @RAPTOR_OPTION_NORMALIZE_LANGUAGE: If true (default true) then * XML language values such as from xml:lang will be normalized to * lowercase. * @RAPTOR_OPTION_NON_NFC_FATAL: If true (default false) then * illegal Unicode Normal Form C in literals will give a fatal * error, otherwise just a warning. * @RAPTOR_OPTION_WARN_OTHER_PARSETYPES: If true (default true) then * the RDF/XML parser will warn about unknown rdf:parseType values. * @RAPTOR_OPTION_CHECK_RDF_ID: If true (default true) then the * RDF/XML will check rdf:ID attribute values for duplicates and * cause an error if any are found. * @RAPTOR_OPTION_RELATIVE_URIS: If true (default true) then * relative URIs will be used wherever possible when serializing. * @RAPTOR_OPTION_WRITER_AUTO_INDENT: Automatically indent elements when * seriailizing. * @RAPTOR_OPTION_WRITER_AUTO_EMPTY: Automatically detect and * abbreviate empty elements when serializing. * @RAPTOR_OPTION_WRITER_INDENT_WIDTH: Integer number of spaces to use * for each indent level when serializing with auto indent. * @RAPTOR_OPTION_WRITER_XML_VERSION: Integer XML version XML 1.0 (10) or XML 1.1 (11) * @RAPTOR_OPTION_WRITER_XML_DECLARATION: Write XML 1.0 or 1.1 declaration. * @RAPTOR_OPTION_NO_NET: Deny network requests inside other requests. * @RAPTOR_OPTION_RESOURCE_BORDER: Border color of resource * nodes for GraphViz DOT serializer. * @RAPTOR_OPTION_LITERAL_BORDER: Border color of literal nodes * for GraphViz DOT serializer. * @RAPTOR_OPTION_BNODE_BORDER: Border color of blank nodes for * GraphViz DOT serializer. * @RAPTOR_OPTION_RESOURCE_FILL: Fill color of resource nodes * for GraphViz DOT serializer. * @RAPTOR_OPTION_LITERAL_FILL: Fill color of literal nodes for * GraphViz DOT serializer. * @RAPTOR_OPTION_BNODE_FILL: Fill color of blank nodes for * GraphViz DOT serializer. * @RAPTOR_OPTION_HTML_TAG_SOUP: Use a lax HTML parser if an XML parser * fails when read HTML for GRDDL parser. * @RAPTOR_OPTION_MICROFORMATS: Look for microformats for GRDDL parser. * @RAPTOR_OPTION_HTML_LINK: Look for head <link> to type rdf/xml * for GRDDL parser. * @RAPTOR_OPTION_WWW_TIMEOUT: Set timeout for internal WWW URI requests * for GRDDL parser. * @RAPTOR_OPTION_WRITE_BASE_URI: Write @base directive for Turtle/N3. * @RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL: HTTP Cache-Control: header * @RAPTOR_OPTION_WWW_HTTP_USER_AGENT: HTTP User-Agent: header * @RAPTOR_OPTION_JSON_CALLBACK: JSON serializer callback function. * @RAPTOR_OPTION_JSON_EXTRA_DATA: JSON serializer extra top-level data * @RAPTOR_OPTION_RSS_TRIPLES: Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples) * @RAPTOR_OPTION_ATOM_ENTRY_URI: Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found. * @RAPTOR_OPTION_PREFIX_ELEMENTS: Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed. * @RAPTOR_OPTION_STRICT: Boolean. If set, operate in strict conformance mode. * @RAPTOR_OPTION_WWW_CERT_FILENAME: String. SSL client certificate filename * @RAPTOR_OPTION_WWW_CERT_TYPE: String. SSL client certificate type * @RAPTOR_OPTION_WWW_CERT_PASSPHRASE: String. SSL client certificate passphrase * @RAPTOR_OPTION_WWW_SSL_VERIFY_PEER: Integer. SSL verify peer - non-0 to verify peer SSL certificate (default) * @RAPTOR_OPTION_WWW_SSL_VERIFY_HOST: Integer. SSL verify host - 0 none, 1 CN match, 2 host match (default). Other values are ignored. * @RAPTOR_OPTION_NO_FILE: Deny file reading requests inside other requests. * @RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES: When reading XML, load external entities. * @RAPTOR_OPTION_LAST: Internal * * Raptor parser, serializer or XML writer options. */ typedef enum { RAPTOR_OPTION_SCANNING, RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES, RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES, RAPTOR_OPTION_ALLOW_BAGID, RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST, RAPTOR_OPTION_NORMALIZE_LANGUAGE, RAPTOR_OPTION_NON_NFC_FATAL, RAPTOR_OPTION_WARN_OTHER_PARSETYPES, RAPTOR_OPTION_CHECK_RDF_ID, RAPTOR_OPTION_RELATIVE_URIS, RAPTOR_OPTION_WRITER_AUTO_INDENT, RAPTOR_OPTION_WRITER_AUTO_EMPTY, RAPTOR_OPTION_WRITER_INDENT_WIDTH, RAPTOR_OPTION_WRITER_XML_VERSION, RAPTOR_OPTION_WRITER_XML_DECLARATION, RAPTOR_OPTION_NO_NET, RAPTOR_OPTION_RESOURCE_BORDER, RAPTOR_OPTION_LITERAL_BORDER, RAPTOR_OPTION_BNODE_BORDER, RAPTOR_OPTION_RESOURCE_FILL, RAPTOR_OPTION_LITERAL_FILL, RAPTOR_OPTION_BNODE_FILL, RAPTOR_OPTION_HTML_TAG_SOUP, RAPTOR_OPTION_MICROFORMATS, RAPTOR_OPTION_HTML_LINK, RAPTOR_OPTION_WWW_TIMEOUT, RAPTOR_OPTION_WRITE_BASE_URI, RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL, RAPTOR_OPTION_WWW_HTTP_USER_AGENT, RAPTOR_OPTION_JSON_CALLBACK, RAPTOR_OPTION_JSON_EXTRA_DATA, RAPTOR_OPTION_RSS_TRIPLES, RAPTOR_OPTION_ATOM_ENTRY_URI, RAPTOR_OPTION_PREFIX_ELEMENTS, RAPTOR_OPTION_STRICT, RAPTOR_OPTION_WWW_CERT_FILENAME, RAPTOR_OPTION_WWW_CERT_TYPE, RAPTOR_OPTION_WWW_CERT_PASSPHRASE, RAPTOR_OPTION_NO_FILE, RAPTOR_OPTION_WWW_SSL_VERIFY_PEER, RAPTOR_OPTION_WWW_SSL_VERIFY_HOST, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES, RAPTOR_OPTION_LAST = RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES } raptor_option; /** * raptor_term_literal_value: * @string: literal string * @string_len: length of string * @datatype: datatype URI (or NULL) * @language: literal language (or NULL) * @language_len: length of language * * Literal term value - this typedef exists solely for use in #raptor_term * * Either @datatype or @language may be non-NULL but not both. */ typedef struct { unsigned char *string; unsigned int string_len; raptor_uri *datatype; unsigned char *language; unsigned char language_len; } raptor_term_literal_value; /** * raptor_term_blank_value: * @string: literal string * @string_len: length of string * * Blank term value - this typedef exists solely for use in #raptor_term * */ typedef struct { unsigned char *string; unsigned int string_len; } raptor_term_blank_value; /** * raptor_term_value: * @uri: uri value when term type is #RAPTOR_TERM_TYPE_URI * @literal: literal value when term type is #RAPTOR_TERM_TYPE_LITERAL * @blank: blank value when term type is #RAPTOR_TERM_TYPE_BLANK * * Term value - this typedef exists solely for use in #raptor_term * **/ typedef union { raptor_uri *uri; raptor_term_literal_value literal; raptor_term_blank_value blank; } raptor_term_value; /** * raptor_term: * @world: world * @usage: usage reference count (if >0) * @type: term type * @value: term values per type * * An RDF statement term * */ typedef struct { raptor_world* world; int usage; raptor_term_type type; raptor_term_value value; } raptor_term; /** * raptor_statement: * @world: world pointer * @usage: usage count * @subject: statement subject * @predicate: statement predicate * @object: statement object * @graph: statement graph name (or NULL if not present) * * An RDF triple with optional graph name (quad) * * See #raptor_term for a description of how the fields may be used. * As returned by a parser statement_handler. */ typedef struct { raptor_world* world; int usage; raptor_term* subject; raptor_term* predicate; raptor_term* object; raptor_term* graph; } raptor_statement; /** * raptor_log_level: * @RAPTOR_LOG_LEVEL_NONE: Internal * @RAPTOR_LOG_LEVEL_TRACE: very fine-grained tracing messages information * @RAPTOR_LOG_LEVEL_DEBUG: fine-grained tracing messages suitable for debugging * @RAPTOR_LOG_LEVEL_INFO: coarse-grained information messages * @RAPTOR_LOG_LEVEL_WARN: warning messages of potentially harmful problems * @RAPTOR_LOG_LEVEL_ERROR: error messages where the application can continue * @RAPTOR_LOG_LEVEL_FATAL: fatal error message where the application will likely abort * @RAPTOR_LOG_LEVEL_LAST: Internal * * Log levels */ typedef enum { RAPTOR_LOG_LEVEL_NONE, RAPTOR_LOG_LEVEL_TRACE, RAPTOR_LOG_LEVEL_DEBUG, RAPTOR_LOG_LEVEL_INFO, RAPTOR_LOG_LEVEL_WARN, RAPTOR_LOG_LEVEL_ERROR, RAPTOR_LOG_LEVEL_FATAL, RAPTOR_LOG_LEVEL_LAST = RAPTOR_LOG_LEVEL_FATAL } raptor_log_level; /** * raptor_domain: * @RAPTOR_DOMAIN_IOSTREAM: I/O stream * @RAPTOR_DOMAIN_NAMESPACE: XML Namespace / namespace stack * @RAPTOR_DOMAIN_PARSER: RDF Parser * @RAPTOR_DOMAIN_QNAME: XML QName * @RAPTOR_DOMAIN_SAX2: XML SAX2 * @RAPTOR_DOMAIN_SERIALIZER: RDF Serializer * @RAPTOR_DOMAIN_TERM: RDF Term * @RAPTOR_DOMAIN_TURTLE_WRITER: Turtle Writer * @RAPTOR_DOMAIN_URI: RDF Uri * @RAPTOR_DOMAIN_WORLD: RDF world * @RAPTOR_DOMAIN_WWW: WWW * @RAPTOR_DOMAIN_XML_WRITER: XML Writer * @RAPTOR_DOMAIN_NONE: Internal * @RAPTOR_DOMAIN_LAST: Internal * * Log domain */ typedef enum { RAPTOR_DOMAIN_NONE, RAPTOR_DOMAIN_IOSTREAM, RAPTOR_DOMAIN_NAMESPACE, RAPTOR_DOMAIN_PARSER, RAPTOR_DOMAIN_QNAME, RAPTOR_DOMAIN_SAX2, RAPTOR_DOMAIN_SERIALIZER, RAPTOR_DOMAIN_TERM, RAPTOR_DOMAIN_TURTLE_WRITER, RAPTOR_DOMAIN_URI, RAPTOR_DOMAIN_WORLD, RAPTOR_DOMAIN_WWW, RAPTOR_DOMAIN_XML_WRITER, RAPTOR_DOMAIN_LAST = RAPTOR_DOMAIN_XML_WRITER } raptor_domain; /** * raptor_log_message: * @code: error code or < 0 if not used or known * @domain: message domain or #RAPTOR_DOMAIN_NONE if not used or known * @level: log message level * @locator: location associated with message or NULL if not known * @text: message string * * Log message. */ typedef struct { int code; raptor_domain domain; raptor_log_level level; raptor_locator *locator; const char *text; } raptor_log_message; /** * raptor_log_handler: * @user_data: user data * @message: log message * * Handler function for log messages with location * * Used during parsing and serializing for errors and warnings that * may include location information. Handlers may be set * by raptor_world_set_log_handler(). * */ typedef void (*raptor_log_handler)(void *user_data, raptor_log_message *message); /** * raptor_statement_handler: * @user_data: user data * @statement: statement to report * * Statement (triple) reporting handler function. * * This handler function set with * raptor_parser_set_statement_handler() on a parser receives * statements as the parsing proceeds. The @statement argument to the * handler is shared and must be copied by the caller with * raptor_statement_copy(). */ typedef void (*raptor_statement_handler)(void *user_data, raptor_statement *statement); /** * raptor_graph_mark_flags: * @RAPTOR_GRAPH_MARK_START: mark is start of graph (otherwise is end) * @RAPTOR_GRAPH_MARK_DECLARED: mark was declared in syntax rather than implict * * Graph mark handler bitmask flags */ typedef enum { RAPTOR_GRAPH_MARK_START = 1, RAPTOR_GRAPH_MARK_DECLARED = 2 } raptor_graph_mark_flags; /** * raptor_graph_mark_handler: * @user_data: user data * @graph: graph to report, NULL for the default graph * @flags: bitmask of #raptor_graph_mark_flags flags * * Graph start/end mark handler function. * * Records start and end of graphs happening in a stream of generated * #raptor_statement via the statement handler. The callback starts a * graph when @flags has #RAPTOR_GRAPH_MARK_START bit set. * * The start and ends may be either declared in the syntax via some * keyword or mechanism such as TRiG {} syntax when @flags has bit * #RAPTOR_GRAPH_MARK_DECLARED set, or be implied by the start/end of * the data in other syntaxes, and the bit will be unset. */ typedef void (*raptor_graph_mark_handler)(void *user_data, raptor_uri *graph, int flags); /** * raptor_generate_bnodeid_handler: * @user_data: user data * @user_bnodeid: a user-specified ID or NULL if none available. * * Generate a blank node identifier handler function. * * Return value: new blank node ID to use */ typedef unsigned char* (*raptor_generate_bnodeid_handler)(void *user_data, unsigned char* user_bnodeid); /** * raptor_namespace_handler: * @user_data: user data * @nspace: #raptor_namespace declared * * XML Namespace declaration reporting handler set by * raptor_parser_set_namespace_handler(). */ typedef void (*raptor_namespace_handler)(void* user_data, raptor_namespace *nspace); /** * raptor_www_write_bytes_handler: * @www: WWW object * @userdata: user data * @ptr: data pointer * @size: size of individual item * @nmemb: number of items * * Receiving bytes of data from WWW retrieval handler. * * Set by raptor_www_set_write_bytes_handler(). */ typedef void (*raptor_www_write_bytes_handler)(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb); /** * raptor_www_content_type_handler: * @www: WWW object * @userdata: user data * @content_type: content type seen * * Receiving Content-Type: header from WWW retrieval handler. * * Set by raptor_www_set_content_type_handler(). */ typedef void (*raptor_www_content_type_handler)(raptor_www* www, void *userdata, const char *content_type); /** * raptor_www_final_uri_handler: * @www: WWW object * @userdata: user data * @final_uri: final URI seen * * Receiving the final resolved URI from a WWW retrieval * * Set by raptor_www_set_final_uri_handler(). */ typedef void (*raptor_www_final_uri_handler)(raptor_www* www, void *userdata, raptor_uri *final_uri); /** * raptor_uri_filter_func: * @user_data: user data * @uri: #raptor_uri URI to check * * Callback function for #raptor_www_set_uri_filter * * Return value: non-0 to filter the URI */ typedef int (*raptor_uri_filter_func)(void *user_data, raptor_uri* uri); /** * raptor_world_flag: * @RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE: if set (non-0 value) - save/restore the libxml generic error handler when raptor library initializes (default set) * @RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE: if set (non-0 value) - save/restore the libxml structured error handler when raptor library terminates (default set) * @RAPTOR_WORLD_FLAG_URI_INTERNING: if set (non-0 value) - each URI is saved interned in-memory and reused (default set) * @RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH: if set (non-0 value) the raptor will neither initialise or terminate the lower level WWW library. Usually in raptor initialising either curl_global_init (for libcurl) are called and in raptor cleanup, curl_global_cleanup is called. This flag allows the application finer control over these libraries such as setting other global options or potentially calling and terminating raptor several times. It does mean that applications which use this call must do their own extra work in order to allocate and free all resources to the system. * * Raptor world flags * * These are used by raptor_world_set_flags() to control raptor-wide * options across classes. These must be set before * raptor_world_open() is called explicitly or implicitly (by * creating a raptor object). There is no enumeration function for * these flags because they are not user options and must be set * before the library is initialised. For similar reasons, there is * no get function. * * If any libxml handler saving/restoring is enabled, any existing * handler and context is saved before parsing and restored * afterwards. Otherwise, no saving/restoring is performed. * */ typedef enum { RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE = 1, RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE = 2, RAPTOR_WORLD_FLAG_URI_INTERNING = 3, RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH = 4 } raptor_world_flag; /** * raptor_data_compare_arg_handler: * @data1: first object * @data2: second object * @user_data: user data argument * * Function to compare two data objects with a user data argument * * Designed to be used with raptor_sort_r() and compatible functions * such as raptor_sequence_sort_r() which uses it. * * Return value: compare value <0 if @data1 is before @data2, =0 if equal, >0 if @data1 is after @data2 */ typedef int (*raptor_data_compare_arg_handler)(const void *data1, const void *data2, void *user_data); /** * raptor_data_compare_handler: * @data1: first data object * @data2: second data object * * Function to compare two data objects - signature like strcmp() and function pssed to qsort() * * Designed to be passed into generic data structure constructors * like raptor_new_avltree(). * * Return value: compare value <0 if @data1 is before @data2, =0 if equal, >0 if @data1 is after @data2 */ typedef int (*raptor_data_compare_handler)(const void* data1, const void* data2); /** * raptor_data_malloc_handler: * @size: data size * * Typedef for a function to allocate memory - signature like malloc() * * Designed to be passed into constructors * like raptor_www_fetch_to_string * * Return value: pointer to newly allocated memory or NULL on failure */ typedef void* (*raptor_data_malloc_handler)(size_t size); /** * raptor_data_free_handler: * @data: data object or NULL * * Typedef for function to free a data object - signature like free() * * Designed to be passed into generic data structure constructors * like raptor_new_avltree(). If @data is NULL, nothing should be done. */ typedef void (*raptor_data_free_handler)(void* data); /** * raptor_data_context_free_handler: * @context: context data for the free function * @object: object to free * * Handler function for freeing a sequence item with a contextual pointer. * * Set by raptor_new_sequence_with_context(). */ typedef void (*raptor_data_context_free_handler)(void* context, void* object); /** * raptor_data_print_handler: * @object: object to print * @fh: FILE* to print to * * Handler function for printing an object to a stream. * * Set by raptor_new_sequence() * * Return value: non-0 on failure */ typedef int (*raptor_data_print_handler)(void *object, FILE *fh); /** * raptor_data_context_print_handler: * @context: context data for the print function * @object: object to print * @fh: FILE* to print to * * Function function for printing an object with data context to a stream. * * Set by raptor_new_sequence_with_context() * * Return value: non-0 on failure */ typedef int (*raptor_data_context_print_handler)(void *context, void *object, FILE *fh); /** * raptor_stringbuffer: * * Raptor string buffer class */ typedef struct raptor_stringbuffer_s raptor_stringbuffer; /* Public functions */ #define raptor_new_world() raptor_new_world_internal(RAPTOR_VERSION) /* The real target of the raptor_new_world() macro */ RAPTOR_API raptor_world *raptor_new_world_internal(unsigned int version_decimal); RAPTOR_API int raptor_world_open(raptor_world* world); RAPTOR_API void raptor_free_world(raptor_world* world); RAPTOR_API int raptor_world_set_libxslt_security_preferences(raptor_world *world, void *security_preferences); RAPTOR_API int raptor_world_set_flag(raptor_world *world, raptor_world_flag flag, int value); RAPTOR_API int raptor_world_set_log_handler(raptor_world *world, void *user_data, raptor_log_handler handler); RAPTOR_API void raptor_world_set_generate_bnodeid_handler(raptor_world* world, void *user_data, raptor_generate_bnodeid_handler handler); RAPTOR_API unsigned char* raptor_world_generate_bnodeid(raptor_world *world); RAPTOR_API void raptor_world_set_generate_bnodeid_parameters(raptor_world* world, char *prefix, int base); RAPTOR_API const char* raptor_log_level_get_label(raptor_log_level level); RAPTOR_API const char* raptor_domain_get_label(raptor_domain domain); /* Names */ RAPTOR_API int raptor_world_is_parser_name(raptor_world* world, const char *name); RAPTOR_API const char* raptor_world_guess_parser_name(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); RAPTOR_API int raptor_world_is_serializer_name(raptor_world* world, const char *name); /* Syntax descriptions */ RAPTOR_API int raptor_world_get_parsers_count(raptor_world* world); RAPTOR_API int raptor_world_get_serializers_count(raptor_world* world); RAPTOR_API const raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, unsigned int counter); RAPTOR_API const raptor_syntax_description* raptor_world_get_serializer_description(raptor_world* world, unsigned int counter); RAPTOR_API int raptor_syntax_description_validate(raptor_syntax_description* desc); RAPTOR_API raptor_option raptor_world_get_option_from_uri(raptor_world* world, raptor_uri *uri); /* Term Class */ RAPTOR_API raptor_term* raptor_new_term_from_uri(raptor_world* world, raptor_uri* uri); RAPTOR_API raptor_term* raptor_new_term_from_counted_uri_string(raptor_world* world, const unsigned char *uri_string, size_t length); RAPTOR_API raptor_term* raptor_new_term_from_uri_string(raptor_world* world, const unsigned char *uri_string); RAPTOR_API raptor_term* raptor_new_term_from_literal(raptor_world* world, const unsigned char* literal, raptor_uri* datatype, const unsigned char* language); RAPTOR_API raptor_term* raptor_new_term_from_counted_literal(raptor_world* world, const unsigned char* literal, size_t literal_len, raptor_uri* datatype, const unsigned char* language, unsigned char language_len); RAPTOR_API raptor_term* raptor_new_term_from_blank(raptor_world* world, const unsigned char* blank); RAPTOR_API raptor_term* raptor_new_term_from_counted_blank(raptor_world* world, const unsigned char* blank, size_t length); RAPTOR_API raptor_term* raptor_new_term_from_counted_string(raptor_world* world, unsigned char* string, size_t length); RAPTOR_API raptor_term* raptor_term_copy(raptor_term* term); RAPTOR_API int raptor_term_compare(const raptor_term *t1, const raptor_term *t2); RAPTOR_API int raptor_term_equals(raptor_term* t1, raptor_term* t2); RAPTOR_API void raptor_free_term(raptor_term *term); RAPTOR_API unsigned char* raptor_term_to_counted_string(raptor_term *term, size_t* len_p); RAPTOR_API unsigned char* raptor_term_to_string(raptor_term *term); RAPTOR_API int raptor_term_escaped_write(const raptor_term *term, unsigned int flags, raptor_iostream* iostr); RAPTOR_API RAPTOR_DEPRECATED int raptor_term_ntriples_write(const raptor_term *term, raptor_iostream* iostr); RAPTOR_API int raptor_uri_turtle_write(raptor_world *world, raptor_iostream* iostr, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri); RAPTOR_API int raptor_term_turtle_write(raptor_iostream* iostr, raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri); RAPTOR_API unsigned char* raptor_uri_to_turtle_counted_string(raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p); RAPTOR_API unsigned char* raptor_uri_to_turtle_string(raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri); RAPTOR_API unsigned char* raptor_term_to_turtle_counted_string(raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p); RAPTOR_API unsigned char* raptor_term_to_turtle_string(raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri); /* Statement Class */ RAPTOR_API void raptor_statement_init(raptor_statement *statement, raptor_world *world); RAPTOR_API void raptor_statement_clear(raptor_statement *statement); RAPTOR_API raptor_statement* raptor_new_statement(raptor_world *world); RAPTOR_API raptor_statement* raptor_new_statement_from_nodes(raptor_world* world, raptor_term *subject, raptor_term *predicate, raptor_term *object, raptor_term *graph); RAPTOR_API raptor_statement* raptor_statement_copy(raptor_statement *statement); RAPTOR_API void raptor_free_statement(raptor_statement *statement); RAPTOR_API int raptor_statement_print(const raptor_statement * statement, FILE *stream); RAPTOR_API int raptor_statement_print_as_ntriples(const raptor_statement * statement, FILE *stream); RAPTOR_API int raptor_statement_compare(const raptor_statement *s1, const raptor_statement *s2); RAPTOR_API int raptor_statement_equals(const raptor_statement* s1, const raptor_statement* s2); /* Parser Class */ RAPTOR_API raptor_parser* raptor_new_parser(raptor_world* world, const char *name); RAPTOR_API raptor_parser* raptor_new_parser_for_content(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier); RAPTOR_API void raptor_free_parser(raptor_parser* parser); /* methods */ /* Handlers */ RAPTOR_API void raptor_parser_set_statement_handler(raptor_parser* parser, void *user_data, raptor_statement_handler handler); RAPTOR_API void raptor_parser_set_graph_mark_handler(raptor_parser* parser, void *user_data, raptor_graph_mark_handler handler); RAPTOR_API void raptor_parser_set_namespace_handler(raptor_parser* parser, void *user_data, raptor_namespace_handler handler); RAPTOR_API void raptor_parser_set_uri_filter(raptor_parser* parser, raptor_uri_filter_func filter, void* user_data); RAPTOR_API raptor_locator* raptor_parser_get_locator(raptor_parser* rdf_parser); /* Parsing functions */ RAPTOR_API int raptor_parser_parse_start(raptor_parser *rdf_parser, raptor_uri *uri); RAPTOR_API int raptor_parser_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end); RAPTOR_API int raptor_parser_parse_file_stream(raptor_parser* rdf_parser, FILE *stream, const char *filename, raptor_uri *base_uri); RAPTOR_API int raptor_parser_parse_file(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); RAPTOR_API int raptor_parser_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri); RAPTOR_API int raptor_parser_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection); RAPTOR_API int raptor_parser_parse_iostream(raptor_parser* rdf_parser, raptor_iostream *iostr, raptor_uri *base_uri); RAPTOR_API void raptor_parser_parse_abort(raptor_parser* rdf_parser); RAPTOR_API const char* raptor_parser_get_name(raptor_parser *rdf_parser); RAPTOR_API const raptor_syntax_description* raptor_parser_get_description(raptor_parser *rdf_parser); /* parser option methods */ RAPTOR_API int raptor_parser_set_option(raptor_parser *parser, raptor_option option, const char* string, int integer); RAPTOR_API int raptor_parser_get_option(raptor_parser *parser, raptor_option option, char** string_p, int* integer_p); /* parser utility methods */ RAPTOR_API const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser); RAPTOR_API raptor_world* raptor_parser_get_world(raptor_parser* rdf_parser); RAPTOR_API raptor_uri* raptor_parser_get_graph(raptor_parser* rdf_parser); /* Locator Class */ /* methods */ RAPTOR_API int raptor_locator_print(raptor_locator* locator, FILE *stream); RAPTOR_API int raptor_locator_format(char *buffer, size_t length, raptor_locator* locator); RAPTOR_API int raptor_locator_line(raptor_locator *locator); RAPTOR_API int raptor_locator_column(raptor_locator *locator); RAPTOR_API int raptor_locator_byte(raptor_locator *locator); RAPTOR_API const char* raptor_locator_file(raptor_locator *locator); RAPTOR_API const char* raptor_locator_uri(raptor_locator *locator); /* Serializer Class */ RAPTOR_API raptor_serializer* raptor_new_serializer(raptor_world* world, const char *name); RAPTOR_API void raptor_free_serializer(raptor_serializer* rdf_serializer); /* methods */ RAPTOR_API int raptor_serializer_start_to_iostream(raptor_serializer *rdf_serializer, raptor_uri *uri, raptor_iostream *iostream); RAPTOR_API int raptor_serializer_start_to_filename(raptor_serializer *rdf_serializer, const char *filename); RAPTOR_API int raptor_serializer_start_to_string(raptor_serializer *rdf_serializer, raptor_uri *uri, void **string_p, size_t *length_p); RAPTOR_API int raptor_serializer_start_to_file_handle(raptor_serializer *rdf_serializer, raptor_uri *uri, FILE *fh); RAPTOR_API int raptor_serializer_set_namespace(raptor_serializer* rdf_serializer, raptor_uri *uri, const unsigned char *prefix); RAPTOR_API int raptor_serializer_set_namespace_from_namespace(raptor_serializer* rdf_serializer, raptor_namespace *nspace); RAPTOR_API int raptor_serializer_serialize_statement(raptor_serializer* rdf_serializer, raptor_statement *statement); RAPTOR_API int raptor_serializer_serialize_end(raptor_serializer *rdf_serializer); RAPTOR_API raptor_iostream* raptor_serializer_get_iostream(raptor_serializer *serializer); RAPTOR_API raptor_locator* raptor_serializer_get_locator(raptor_serializer *rdf_serializer); RAPTOR_API int raptor_serializer_flush(raptor_serializer *rdf_serializer); RAPTOR_API const raptor_syntax_description* raptor_serializer_get_description(raptor_serializer *rdf_serializer); /* serializer option methods */ RAPTOR_API int raptor_serializer_set_option(raptor_serializer *serializer, raptor_option option, const char* string, int integer); RAPTOR_API int raptor_serializer_get_option(raptor_serializer *serializer, raptor_option option, char** string_p, int* integer_p); /* utility methods */ RAPTOR_API raptor_world* raptor_serializer_get_world(raptor_serializer* rdf_serializer); /* memory functions */ RAPTOR_API void raptor_free_memory(void *ptr); RAPTOR_API void* raptor_alloc_memory(size_t size); RAPTOR_API void* raptor_calloc_memory(size_t nmemb, size_t size); /* URI Class */ RAPTOR_API raptor_uri* raptor_new_uri_from_counted_string(raptor_world* world, const unsigned char *uri_string, size_t length); RAPTOR_API raptor_uri* raptor_new_uri(raptor_world* world, const unsigned char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri_from_uri_local_name(raptor_world* world, raptor_uri *uri, const unsigned char *local_name); RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string); RAPTOR_API raptor_uri* raptor_new_uri_relative_to_base_counted(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string, size_t uri_len); RAPTOR_API raptor_uri* raptor_new_uri_from_id(raptor_world* world, raptor_uri *base_uri, const unsigned char *id); RAPTOR_API raptor_uri* raptor_new_uri_from_uri_or_file_string(raptor_world* world, raptor_uri* base_uri, const unsigned char* uri_or_file_string); RAPTOR_API raptor_uri* raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char *name); RAPTOR_API raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri); RAPTOR_API raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri); RAPTOR_API void raptor_free_uri(raptor_uri *uri); /* methods */ RAPTOR_API int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2); RAPTOR_API raptor_uri* raptor_uri_copy(raptor_uri *uri); RAPTOR_API unsigned char* raptor_uri_as_string(raptor_uri *uri); RAPTOR_API unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p); RAPTOR_API unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p); RAPTOR_API unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri); RAPTOR_API int raptor_uri_print(const raptor_uri* uri, FILE *stream); RAPTOR_API unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p); RAPTOR_API unsigned char* raptor_uri_to_string(raptor_uri *uri); RAPTOR_API raptor_world* raptor_uri_get_world(raptor_uri *uri); RAPTOR_API int raptor_uri_file_exists(raptor_uri* uri); RAPTOR_API int raptor_uri_escaped_write(raptor_uri* uri, raptor_uri* base_uri, unsigned int flags, raptor_iostream *iostr); /* XML utility functions */ RAPTOR_API int raptor_xml_escape_string_any(raptor_world* world, const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote, int xml_version); RAPTOR_API int raptor_xml_escape_string_any_write(const unsigned char *string, size_t len, char quote, int xml_version, raptor_iostream* iostr); RAPTOR_API int raptor_xml_escape_string(raptor_world *world, const unsigned char *string, size_t len, unsigned char *buffer, size_t length, char quote); RAPTOR_API int raptor_xml_escape_string_write(const unsigned char *string, size_t len, char quote, raptor_iostream* iostr); RAPTOR_API int raptor_xml_name_check(const unsigned char *string, size_t length, int xml_version); /* portable vsnprintf utility function */ RAPTOR_API RAPTOR_DEPRECATED char* raptor_vsnprintf(const char *format, va_list arguments) RAPTOR_PRINTF_FORMAT(1, 0); RAPTOR_API int raptor_vsnprintf2(char *buffer, size_t size, const char *format, va_list arguments) RAPTOR_PRINTF_FORMAT(3, 0); RAPTOR_API int raptor_snprintf(char *buffer, size_t size, const char *format, ...) RAPTOR_PRINTF_FORMAT(3, 4); RAPTOR_API int raptor_vasprintf(char **ret, const char *format, va_list arguments) RAPTOR_PRINTF_FORMAT(2, 0); /* RFC2396 URI resolving functions */ RAPTOR_API size_t raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char* buffer, size_t length); /* URI String utility functions */ RAPTOR_API unsigned char* raptor_uri_counted_filename_to_uri_string(const char *filename, size_t filename_len); RAPTOR_API unsigned char* raptor_uri_filename_to_uri_string(const char *filename); RAPTOR_API int raptor_uri_filename_exists(const unsigned char* path); RAPTOR_API char* raptor_uri_uri_string_to_filename(const unsigned char *uri_string); RAPTOR_API char* raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_string, unsigned char **fragment_p); RAPTOR_API int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string); RAPTOR_API int raptor_stringbuffer_append_uri_escaped_counted_string(raptor_stringbuffer* sb, const char* string, size_t length, int space_is_plus); RAPTOR_API char* raptor_uri_uri_string_to_counted_filename_fragment(const unsigned char *uri_string, size_t* len_p, unsigned char **fragment_p, size_t* fragment_len_p); RAPTOR_API int raptor_uri_uri_string_is_absolute(const unsigned char* uri_string); /** * RAPTOR_RDF_MS_URI: * * RDF Namespace URI (rdf:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_RDF_MS_URI raptor_rdf_namespace_uri /** * RAPTOR_RDF_SCHEMA_URI: * * RDF Schema Namespace URI (rdfs:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_RDF_SCHEMA_URI raptor_rdf_schema_namespace_uri /** * RAPTOR_XMLSCHEMA_DATATYPES_URI: * * XML Schema Datatypes URI (xsd:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_XMLSCHEMA_DATATYPES_URI raptor_xmlschema_datatypes_namespace_uri /** * RAPTOR_OWL_URI: * * OWL Namespace URI (owl:). * * Copy with raptor_uri_copy() to use. */ #define RAPTOR_OWL_URI raptor_owl_namespace_uri /* raptor_www */ RAPTOR_API raptor_www* raptor_new_www(raptor_world* world); RAPTOR_API raptor_www* raptor_new_www_with_connection(raptor_world* world, void* connection); RAPTOR_API void raptor_free_www(raptor_www *www); RAPTOR_API int raptor_www_set_ssl_cert_options(raptor_www* www, const char* cert_filename, const char* cert_type, const char* cert_passphrase); RAPTOR_API int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host); RAPTOR_API void raptor_www_set_user_agent(raptor_www *www, const char *user_agent); RAPTOR_API void raptor_www_set_proxy(raptor_www *www, const char *proxy); RAPTOR_API void raptor_www_set_http_accept(raptor_www *www, const char *value); RAPTOR_API void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_write_bytes_handler handler, void *user_data); RAPTOR_API void raptor_www_set_content_type_handler(raptor_www *www, raptor_www_content_type_handler handler, void *user_data); RAPTOR_API void raptor_www_set_final_uri_handler(raptor_www* www, raptor_www_final_uri_handler handler, void *user_data); RAPTOR_API void raptor_www_set_uri_filter(raptor_www* www, raptor_uri_filter_func filter, void* user_data); RAPTOR_API void raptor_www_set_connection_timeout(raptor_www* www, int timeout); RAPTOR_API int raptor_www_set_http_cache_control(raptor_www* www, const char* cache_control); RAPTOR_API int raptor_www_fetch(raptor_www *www, raptor_uri *uri); RAPTOR_API int raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler); RAPTOR_API void* raptor_www_get_connection(raptor_www *www); RAPTOR_API void raptor_www_abort(raptor_www *www, const char *reason); RAPTOR_API raptor_uri* raptor_www_get_final_uri(raptor_www* www); /* XML QNames Class */ RAPTOR_API raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char *name, const unsigned char *value); RAPTOR_API raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_world* world, raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value); /* methods */ RAPTOR_API raptor_qname* raptor_qname_copy(raptor_qname *qname); RAPTOR_API void raptor_free_qname(raptor_qname* name); RAPTOR_API int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2); RAPTOR_API unsigned char* raptor_qname_to_counted_name(raptor_qname *qname, size_t* length_p); RAPTOR_API const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name); RAPTOR_API const unsigned char* raptor_qname_get_local_name(raptor_qname* name); RAPTOR_API const unsigned char* raptor_qname_get_value(raptor_qname* name); RAPTOR_API const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, size_t* length_p); RAPTOR_API int raptor_qname_write(raptor_qname *qname, raptor_iostream* iostr); /* QName String utility functions */ RAPTOR_API raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char *name, size_t name_len); RAPTOR_API unsigned char* raptor_qname_format_as_xml(const raptor_qname *qname, size_t *length_p); /* XML Namespaces Stack class */ RAPTOR_API raptor_namespace* raptor_new_namespace_from_uri(raptor_namespace_stack *nstack, const unsigned char *prefix, raptor_uri* ns_uri, int depth); RAPTOR_API raptor_namespace_stack* raptor_new_namespaces(raptor_world* world, int defaults); RAPTOR_API int raptor_namespaces_init(raptor_world* world, raptor_namespace_stack *nstack, int defaults); RAPTOR_API void raptor_namespaces_clear(raptor_namespace_stack *nstack); RAPTOR_API void raptor_free_namespaces(raptor_namespace_stack *nstack); /* methods */ RAPTOR_API void raptor_namespaces_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *nspace); RAPTOR_API int raptor_namespaces_start_namespace_full(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth); RAPTOR_API void raptor_namespaces_end_for_depth(raptor_namespace_stack *nstack, int depth); RAPTOR_API raptor_namespace* raptor_namespaces_get_default_namespace(raptor_namespace_stack *nstack); RAPTOR_API raptor_namespace* raptor_namespaces_find_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, int prefix_length); RAPTOR_API raptor_namespace* raptor_namespaces_find_namespace_by_uri(raptor_namespace_stack *nstack, raptor_uri *ns_uri); RAPTOR_API int raptor_namespaces_namespace_in_scope(raptor_namespace_stack *nstack, const raptor_namespace *nspace); RAPTOR_API raptor_qname* raptor_new_qname_from_namespace_uri(raptor_namespace_stack *nstack, raptor_uri *uri, int xml_version); /* XML Namespace Class */ RAPTOR_API raptor_namespace* raptor_new_namespace(raptor_namespace_stack *nstack, const unsigned char *prefix, const unsigned char *ns_uri_string, int depth); RAPTOR_API void raptor_free_namespace(raptor_namespace *ns); RAPTOR_API int raptor_namespace_stack_start_namespace(raptor_namespace_stack *nstack, raptor_namespace *ns, int new_depth); RAPTOR_API raptor_uri* raptor_namespace_get_uri(const raptor_namespace *ns); RAPTOR_API const unsigned char* raptor_namespace_get_prefix(const raptor_namespace *ns); RAPTOR_API const unsigned char* raptor_namespace_get_counted_prefix(const raptor_namespace *ns, size_t *length_p); RAPTOR_API unsigned char* raptor_namespace_format_as_xml(const raptor_namespace *ns, size_t *length_p); RAPTOR_API int raptor_namespace_write(raptor_namespace *ns, raptor_iostream* iostr); /* namespace string utility function */ RAPTOR_API int raptor_xml_namespace_string_parse(const unsigned char *string, unsigned char **prefix, unsigned char **uri_string); /* Sequence class */ /** * raptor_sequence: * * Raptor sequence class */ typedef struct raptor_sequence_s raptor_sequence; /* Sequence Class */ RAPTOR_API raptor_sequence* raptor_new_sequence(raptor_data_free_handler free_handler, raptor_data_print_handler print_handler); RAPTOR_API raptor_sequence* raptor_new_sequence_with_context(raptor_data_context_free_handler free_handler, raptor_data_context_print_handler print_handler, void* handler_context); RAPTOR_API void raptor_free_sequence(raptor_sequence* seq); /* methods */ RAPTOR_API int raptor_sequence_size(raptor_sequence* seq); RAPTOR_API int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data); RAPTOR_API int raptor_sequence_push(raptor_sequence* seq, void *data); RAPTOR_API int raptor_sequence_shift(raptor_sequence* seq, void *data); RAPTOR_API void* raptor_sequence_get_at(raptor_sequence* seq, int idx); RAPTOR_API void* raptor_sequence_pop(raptor_sequence* seq); RAPTOR_API void* raptor_sequence_unshift(raptor_sequence* seq); RAPTOR_API void* raptor_sequence_delete_at(raptor_sequence* seq, int idx); RAPTOR_API void raptor_sequence_sort(raptor_sequence* seq, raptor_data_compare_handler compare); RAPTOR_API void raptor_sequence_sort_r(raptor_sequence* seq, raptor_data_compare_arg_handler compare, void* user_data); RAPTOR_API int raptor_sequence_swap(raptor_sequence* seq, int i, int j); RAPTOR_API int raptor_sequence_reverse(raptor_sequence* seq, int start_index, int length); RAPTOR_API int raptor_sequence_next_permutation(raptor_sequence *seq, raptor_data_compare_handler compare); /* helper for printing sequences of strings */ RAPTOR_API int raptor_sequence_print(raptor_sequence* seq, FILE* fh); RAPTOR_API int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src); /* Unicode and UTF8 */ /** * raptor_unichar: * * raptor Unicode codepoint */ typedef unsigned long raptor_unichar; RAPTOR_API int raptor_unicode_utf8_string_put_char(raptor_unichar c, unsigned char *output, size_t length); RAPTOR_API int raptor_unicode_utf8_string_get_char(const unsigned char *input, size_t length, raptor_unichar *output); RAPTOR_API int raptor_unicode_is_xml11_namestartchar(raptor_unichar c); RAPTOR_API int raptor_unicode_is_xml10_namestartchar(raptor_unichar c); RAPTOR_API int raptor_unicode_is_xml11_namechar(raptor_unichar c); RAPTOR_API int raptor_unicode_is_xml10_namechar(raptor_unichar c); RAPTOR_API int raptor_unicode_check_utf8_string(const unsigned char *string, size_t length); RAPTOR_API int raptor_unicode_utf8_strlen(const unsigned char *string, size_t length); RAPTOR_API size_t raptor_unicode_utf8_substr(unsigned char* dest, size_t* dest_length_p, const unsigned char* src, size_t src_length, int startingLoc, int length); /* Stringbuffer Class */ RAPTOR_API raptor_stringbuffer* raptor_new_stringbuffer(void); RAPTOR_API void raptor_free_stringbuffer(raptor_stringbuffer *stringbuffer); /* methods */ RAPTOR_API int raptor_stringbuffer_append_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy); RAPTOR_API int raptor_stringbuffer_append_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy); RAPTOR_API int raptor_stringbuffer_append_decimal(raptor_stringbuffer* stringbuffer, int integer); RAPTOR_API int raptor_stringbuffer_append_hexadecimal(raptor_stringbuffer* stringbuffer, int hex); RAPTOR_API int raptor_stringbuffer_append_stringbuffer(raptor_stringbuffer* stringbuffer, raptor_stringbuffer* append); RAPTOR_API int raptor_stringbuffer_prepend_counted_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, size_t length, int do_copy); RAPTOR_API int raptor_stringbuffer_prepend_string(raptor_stringbuffer* stringbuffer, const unsigned char *string, int do_copy); RAPTOR_API unsigned char* raptor_stringbuffer_as_string(raptor_stringbuffer* stringbuffer); RAPTOR_API size_t raptor_stringbuffer_length(raptor_stringbuffer* stringbuffer); RAPTOR_API int raptor_stringbuffer_copy_to_string(raptor_stringbuffer* stringbuffer, unsigned char *string, size_t length); /** * raptor_iostream_init_func: * @context: stream context data * * Handler function for #raptor_iostream initialising. * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_init_func) (void *context); /** * raptor_iostream_finish_func: * @context: stream context data * * Handler function for #raptor_iostream terminating. * */ typedef void (*raptor_iostream_finish_func) (void *context); /** * raptor_iostream_write_byte_func * @context: stream context data * @byte: byte to write * * Handler function for implementing raptor_iostream_write_byte(). * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_write_byte_func) (void *context, const int byte); /** * raptor_iostream_write_bytes_func: * @context: stream context data * @ptr: pointer to bytes to write * @size: size of item * @nmemb: number of items * * Handler function for implementing raptor_iostream_write_bytes(). * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_write_bytes_func) (void *context, const void *ptr, size_t size, size_t nmemb); /** * raptor_iostream_write_end_func: * @context: stream context data * * Handler function for implementing raptor_iostream_write_end(). * * Return value: non-0 on failure. */ typedef int (*raptor_iostream_write_end_func) (void *context); /** * raptor_iostream_read_bytes_func: * @context: stream context data * @ptr: pointer to buffer to read into * @size: size of buffer * @nmemb: number of items * * Handler function for implementing raptor_iostream_read_bytes(). * * Return value: number of items read, 0 or < @size on EOF, <0 on failure */ typedef int (*raptor_iostream_read_bytes_func) (void *context, void *ptr, size_t size, size_t nmemb); /** * raptor_iostream_read_eof_func: * @context: stream context data * * Handler function for implementing raptor_iostream_read_eof(). * * Return value: non-0 if EOF */ typedef int (*raptor_iostream_read_eof_func) (void *context); /** * raptor_iostream_handler: * @version: interface version. Presently 1 or 2. * @init: initialisation handler - optional, called at most once (V1) * @finish: finishing handler - optional, called at most once (V1) * @write_byte: write byte handler - required (for writing) (V1) * @write_bytes: write bytes handler - required (for writing) (V1) * @write_end: write end handler - optional (for writing), called at most once (V1) * @read_bytes: read bytes handler - required (for reading) (V2) * @read_eof: read EOF handler - required (for reading) (V2) * * I/O stream implementation handler structure. * */ typedef struct { int version; /* V1 functions */ raptor_iostream_init_func init; raptor_iostream_finish_func finish; raptor_iostream_write_byte_func write_byte; raptor_iostream_write_bytes_func write_bytes; raptor_iostream_write_end_func write_end; /* V2 functions */ raptor_iostream_read_bytes_func read_bytes; raptor_iostream_read_eof_func read_eof; } raptor_iostream_handler; /* I/O Stream Class */ RAPTOR_API raptor_iostream* raptor_new_iostream_from_handler(raptor_world* world, void *user_data, const raptor_iostream_handler* const handler); RAPTOR_API raptor_iostream* raptor_new_iostream_to_sink(raptor_world* world); RAPTOR_API raptor_iostream* raptor_new_iostream_to_filename(raptor_world* world, const char *filename); RAPTOR_API raptor_iostream* raptor_new_iostream_to_file_handle(raptor_world* world, FILE *handle); RAPTOR_API raptor_iostream* raptor_new_iostream_to_string(raptor_world* world, void **string_p, size_t *length_p, raptor_data_malloc_handler const malloc_handler); RAPTOR_API raptor_iostream* raptor_new_iostream_from_sink(raptor_world* world); RAPTOR_API raptor_iostream* raptor_new_iostream_from_filename(raptor_world* world, const char *filename); RAPTOR_API raptor_iostream* raptor_new_iostream_from_file_handle(raptor_world* world, FILE *handle); RAPTOR_API raptor_iostream* raptor_new_iostream_from_string(raptor_world* world, void *string, size_t length); RAPTOR_API void raptor_free_iostream(raptor_iostream *iostr); RAPTOR_API int raptor_iostream_write_bytes(const void *ptr, size_t size, size_t nmemb, raptor_iostream *iostr); RAPTOR_API int raptor_iostream_write_byte(const int byte, raptor_iostream *iostr); RAPTOR_API int raptor_iostream_write_end(raptor_iostream *iostr); RAPTOR_API int raptor_iostream_string_write(const void *string, raptor_iostream *iostr); RAPTOR_API int raptor_iostream_counted_string_write(const void *string, size_t len, raptor_iostream *iostr); RAPTOR_API unsigned long raptor_iostream_tell(raptor_iostream *iostr); RAPTOR_API int raptor_iostream_decimal_write(int integer, raptor_iostream* iostr); RAPTOR_API int raptor_iostream_hexadecimal_write(unsigned int integer, int width, raptor_iostream* iostr); RAPTOR_API int raptor_stringbuffer_write(raptor_stringbuffer *sb, raptor_iostream* iostr); RAPTOR_API int raptor_uri_write(raptor_uri *uri, raptor_iostream *iostr); RAPTOR_API int raptor_iostream_read_bytes(void *ptr, size_t size, size_t nmemb, raptor_iostream* iostr); RAPTOR_API int raptor_iostream_read_eof(raptor_iostream *iostr); /* I/O Stream utility functions */ /** * raptor_escaped_write_bitflags: * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF : Allow \b \f, * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : ALlow \t \n \r \u * @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 : Allow UTF-8 for printable U * * @RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES: Must escape #x00-#x20<>\"{}|^` in URIs * @RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL: N-Triples literal * @RAPTOR_ESCAPED_WRITE_NTRIPLES_URI: N-Triples URI * @RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL: SPARQL literal: allows raw UTF8 for printable literals * @RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL: SPARQL long literal: no BS-escapes allowed * @RAPTOR_ESCAPED_WRITE_SPARQL_URI: SPARQL uri: have to escape certain characters * @RAPTOR_ESCAPED_WRITE_TURTLE_URI: Turtle 2013 URIs (like SPARQL) * @RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL: Turtle 2013 literals (like SPARQL) * @RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL: Turtle 2013 long literals (like SPARQL) * @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals: \b \f \t \r \n and \u \U * * Bit flags for raptor_string_escaped_write() and friends. */ typedef enum { RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF = 1, RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU = 2, RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 = 4, RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES = 8, /* N-Triples - favour writing \u, \U over UTF8 */ RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF, RAPTOR_ESCAPED_WRITE_NTRIPLES_URI = RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES, /* SPARQL literal: allows raw UTF8 for printable literals */ RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8, /* SPARQL long literal: no BS-escapes allowed */ RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8, /* SPARQL uri: have to escape certain characters */ RAPTOR_ESCAPED_WRITE_SPARQL_URI = RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 | RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES, /* Turtle (2013) escapes are like SPARQL */ RAPTOR_ESCAPED_WRITE_TURTLE_URI = RAPTOR_ESCAPED_WRITE_SPARQL_URI, RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL, RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL, /* JSON literals: \b \f \t \r \n and \u \U */ RAPTOR_ESCAPED_WRITE_JSON_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF } raptor_escaped_write_bitflags; RAPTOR_API int raptor_string_ntriples_write(const unsigned char *string, size_t len, const char delim, raptor_iostream *iostr); RAPTOR_API int raptor_bnodeid_ntriples_write(const unsigned char *bnodeid, size_t len, raptor_iostream *iostr); RAPTOR_API RAPTOR_DEPRECATED int raptor_string_python_write(const unsigned char *string, size_t len, const char delim, unsigned int mode, raptor_iostream *iostr); RAPTOR_API int raptor_statement_ntriples_write(const raptor_statement *statement, raptor_iostream* iostr, int write_graph_term); RAPTOR_API int raptor_string_escaped_write(const unsigned char *string, size_t len, const char delim, unsigned int flags, raptor_iostream *iostr); /* Parser and Serializer options */ /** * raptor_option_value_type: * @RAPTOR_OPTION_VALUE_TYPE_BOOL: Boolean integer value. Non-0 is true * @RAPTOR_OPTION_VALUE_TYPE_INT: Decimal integer value * @RAPTOR_OPTION_VALUE_TYPE_STRING: String value * @RAPTOR_OPTION_VALUE_TYPE_URI: URI String value. * @RAPTOR_OPTION_VALUE_TYPE_LAST: internal * * Option value types. */ typedef enum { RAPTOR_OPTION_VALUE_TYPE_BOOL, RAPTOR_OPTION_VALUE_TYPE_INT, RAPTOR_OPTION_VALUE_TYPE_STRING, RAPTOR_OPTION_VALUE_TYPE_URI, RAPTOR_OPTION_VALUE_TYPE_LAST = RAPTOR_OPTION_VALUE_TYPE_URI } raptor_option_value_type; /** * raptor_option_description: * @domain: domain ID * @option: option ID * @value_type: data type of option value * @name: short name for option * @name_len: length of @name * @label: description of option * @uri: URI identifying option * * Description of an option for a domain. */ typedef struct { raptor_domain domain; raptor_option option; raptor_option_value_type value_type; const char* name; size_t name_len; const char* label; raptor_uri* uri; } raptor_option_description; RAPTOR_API unsigned int raptor_option_get_count(void); RAPTOR_API const char* raptor_option_get_value_type_label(const raptor_option_value_type type); RAPTOR_API void raptor_free_option_description(raptor_option_description* option_description); RAPTOR_API raptor_option_description* raptor_world_get_option_description(raptor_world* world, const raptor_domain domain, const raptor_option option); /* SAX2 element Class (raptor_xml_element) */ RAPTOR_API raptor_xml_element* raptor_new_xml_element(raptor_qname* name, const unsigned char* xml_language, raptor_uri* xml_base); RAPTOR_API raptor_xml_element* raptor_new_xml_element_from_namespace_local_name(raptor_namespace *ns, const unsigned char *name, const unsigned char *xml_language, raptor_uri *xml_base); RAPTOR_API void raptor_free_xml_element(raptor_xml_element *element); /* methods */ RAPTOR_API raptor_qname* raptor_xml_element_get_name(raptor_xml_element *xml_element); RAPTOR_API void raptor_xml_element_set_attributes(raptor_xml_element* xml_element, raptor_qname **attributes, int count); RAPTOR_API raptor_qname** raptor_xml_element_get_attributes(raptor_xml_element* xml_element); RAPTOR_API int raptor_xml_element_get_attributes_count(raptor_xml_element* xml_element); RAPTOR_API int raptor_xml_element_declare_namespace(raptor_xml_element* xml_element, raptor_namespace *nspace); RAPTOR_API int raptor_xml_element_write(raptor_xml_element *element, raptor_namespace_stack *nstack, int is_empty, int is_end, int depth, raptor_iostream *iostr); RAPTOR_API int raptor_xml_element_is_empty(raptor_xml_element* xml_element); RAPTOR_API const unsigned char* raptor_xml_element_get_language(raptor_xml_element* xml_element); /* XML Writer Class (raptor_xml_writer) */ RAPTOR_API raptor_xml_writer* raptor_new_xml_writer(raptor_world* world, raptor_namespace_stack *nstack, raptor_iostream* iostr); RAPTOR_API void raptor_free_xml_writer(raptor_xml_writer* xml_writer); /* methods */ RAPTOR_API void raptor_xml_writer_empty_element(raptor_xml_writer* xml_writer, raptor_xml_element *element); RAPTOR_API void raptor_xml_writer_start_element(raptor_xml_writer* xml_writer, raptor_xml_element *element); RAPTOR_API void raptor_xml_writer_end_element(raptor_xml_writer* xml_writer, raptor_xml_element *element); RAPTOR_API void raptor_xml_writer_newline(raptor_xml_writer* xml_writer); RAPTOR_API void raptor_xml_writer_cdata(raptor_xml_writer* xml_writer, const unsigned char *s); RAPTOR_API void raptor_xml_writer_cdata_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API void raptor_xml_writer_raw(raptor_xml_writer* xml_writer, const unsigned char *s); RAPTOR_API void raptor_xml_writer_raw_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API void raptor_xml_writer_comment(raptor_xml_writer* xml_writer, const unsigned char *s); RAPTOR_API void raptor_xml_writer_comment_counted(raptor_xml_writer* xml_writer, const unsigned char *s, unsigned int len); RAPTOR_API void raptor_xml_writer_flush(raptor_xml_writer* xml_writer); RAPTOR_API int raptor_xml_writer_set_option(raptor_xml_writer *xml_writer, raptor_option option, char* string, int integer); RAPTOR_API int raptor_xml_writer_get_option(raptor_xml_writer *xml_writer, raptor_option option, char** string_p, int* integer_p); RAPTOR_API int raptor_xml_writer_get_depth(raptor_xml_writer *xml_writer); /** * raptor_sax2_start_element_handler: * @user_data: user data * @xml_element: XML element * * SAX2 start element handler */ typedef void (*raptor_sax2_start_element_handler)(void *user_data, raptor_xml_element *xml_element); /** * raptor_sax2_end_element_handler: * @user_data: user data * @xml_element: XML element * * SAX2 end element handler */ typedef void (*raptor_sax2_end_element_handler)(void *user_data, raptor_xml_element* xml_element); /** * raptor_sax2_characters_handler: * @user_data: user data * @xml_element: XML element * @s: string * @len: string len * * SAX2 characters handler */ typedef void (*raptor_sax2_characters_handler)(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len); /** * raptor_sax2_cdata_handler: * @user_data: user data * @xml_element: XML element * @s: string * @len: string len * SAX2 CDATA section handler */ typedef void (*raptor_sax2_cdata_handler)(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len); /** * raptor_sax2_comment_handler: * @user_data: user data * @xml_element: XML element * @s: string * * SAX2 XML comment handler */ typedef void (*raptor_sax2_comment_handler)(void *user_data, raptor_xml_element* xml_element, const unsigned char *s); /** * raptor_sax2_unparsed_entity_decl_handler: * @user_data: user data * @entityName: entity name * @base: base URI * @systemId: system ID * @publicId: public ID * @notationName: notation name * * SAX2 unparsed entity (NDATA) handler */ typedef void (*raptor_sax2_unparsed_entity_decl_handler)(void *user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName); /** * raptor_sax2_external_entity_ref_handler: * @user_data: user data * @context: context * @base: base URI * @systemId: system ID * @publicId: public ID * * SAX2 external entity reference handler * * Return value: 0 if processing should not continue because of a * fatal error in the handling of the external entity. */ typedef int (*raptor_sax2_external_entity_ref_handler)(void *user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId); /* SAX2 API */ RAPTOR_API raptor_sax2* raptor_new_sax2(raptor_world *world, raptor_locator *locator, void* user_data); RAPTOR_API void raptor_free_sax2(raptor_sax2 *sax2); /* methods */ RAPTOR_API void raptor_sax2_set_start_element_handler(raptor_sax2* sax2, raptor_sax2_start_element_handler handler); RAPTOR_API void raptor_sax2_set_end_element_handler(raptor_sax2* sax2, raptor_sax2_end_element_handler handler); RAPTOR_API void raptor_sax2_set_characters_handler(raptor_sax2* sax2, raptor_sax2_characters_handler handler); RAPTOR_API void raptor_sax2_set_cdata_handler(raptor_sax2* sax2, raptor_sax2_cdata_handler handler); RAPTOR_API void raptor_sax2_set_comment_handler(raptor_sax2* sax2, raptor_sax2_comment_handler handler); RAPTOR_API void raptor_sax2_set_unparsed_entity_decl_handler(raptor_sax2* sax2, raptor_sax2_unparsed_entity_decl_handler handler); RAPTOR_API void raptor_sax2_set_external_entity_ref_handler(raptor_sax2* sax2, raptor_sax2_external_entity_ref_handler handler); RAPTOR_API void raptor_sax2_set_namespace_handler(raptor_sax2* sax2, raptor_namespace_handler handler); RAPTOR_API void raptor_sax2_set_uri_filter(raptor_sax2* sax2, raptor_uri_filter_func filter, void *user_data); RAPTOR_API void raptor_sax2_parse_start(raptor_sax2 *sax2, raptor_uri *base_uri); RAPTOR_API int raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer, size_t len, int is_end); RAPTOR_API const unsigned char* raptor_sax2_inscope_xml_language(raptor_sax2* sax2); RAPTOR_API raptor_uri* raptor_sax2_inscope_base_uri(raptor_sax2* sax2); /* AVL Trees */ /** * raptor_avltree: * * AVL Tree */ typedef struct raptor_avltree_s raptor_avltree; /** * raptor_avltree_iterator: * * AVL Tree Iterator as created by raptor_new_avltree_iterator() */ typedef struct raptor_avltree_iterator_s raptor_avltree_iterator; /** * raptor_avltree_visit_handler: * @depth: depth of object in tree * @data: data object being visited * @user_data: user data arg to raptor_avltree_visit() * * AVL Tree visitor function as given to raptor_avltree_visit() * * Return value: non-0 to terminate visit early. */ typedef int (*raptor_avltree_visit_handler)(int depth, void* data, void *user_data); /** * raptor_avltree_bitflags: * @RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES: If set raptor_avltree_add() will replace any duplicate items. If not set, raptor_avltree_add() will not replace them and will return status >0 when adding a duplicate. (Default is not set) * * Bit flags for AVL Tree class constructor raptor_new_avltree() **/ typedef enum { RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES = 1 } raptor_avltree_bitflags; RAPTOR_API raptor_avltree* raptor_new_avltree(raptor_data_compare_handler compare_handler, raptor_data_free_handler free_handler, unsigned int flags); RAPTOR_API void raptor_free_avltree(raptor_avltree* tree); /* methods */ RAPTOR_API int raptor_avltree_add(raptor_avltree* tree, void* p_data); RAPTOR_API void* raptor_avltree_remove(raptor_avltree* tree, void* p_data); RAPTOR_API int raptor_avltree_delete(raptor_avltree* tree, void* p_data); RAPTOR_API void* raptor_avltree_search(raptor_avltree* tree, const void* p_data); RAPTOR_API int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data); RAPTOR_API int raptor_avltree_size(raptor_avltree* tree); RAPTOR_API void raptor_avltree_set_print_handler(raptor_avltree* tree, raptor_data_print_handler print_handler); RAPTOR_API int raptor_avltree_print(raptor_avltree* tree, FILE* stream); RAPTOR_API raptor_avltree_iterator* raptor_new_avltree_iterator(raptor_avltree* tree, void* range, raptor_data_free_handler range_free_handler, int direction); RAPTOR_API void raptor_free_avltree_iterator(raptor_avltree_iterator* iterator); RAPTOR_API int raptor_avltree_iterator_is_end(raptor_avltree_iterator* iterator); RAPTOR_API int raptor_avltree_iterator_next(raptor_avltree_iterator* iterator); RAPTOR_API void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator); /* utility methods */ void raptor_sort_r(void *base, size_t nel, size_t width, raptor_data_compare_arg_handler compar, void *user_data); #ifdef __cplusplus } #endif #endif raptor2-2.0.15/src/raptor_parse.c0000644000175000017500000013411312425333224013550 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_parse.c - Raptor Parser API * * Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_FCNTL_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE /* prototypes for helper functions */ static void raptor_parser_set_strict(raptor_parser* rdf_parser, int is_strict); /* helper methods */ static void raptor_free_parser_factory(raptor_parser_factory* factory) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(factory, raptor_parser_factory); if(factory->finish_factory) factory->finish_factory(factory); RAPTOR_FREE(raptor_parser_factory, factory); } /* class methods */ int raptor_parsers_init(raptor_world *world) { int rc = 0; world->parsers = raptor_new_sequence((raptor_data_free_handler)raptor_free_parser_factory, NULL); if(!world->parsers) return 1; #ifdef RAPTOR_PARSER_RDFXML rc+= raptor_init_parser_rdfxml(world) != 0; #endif #ifdef RAPTOR_PARSER_NTRIPLES rc+= raptor_init_parser_ntriples(world) != 0; #endif #ifdef RAPTOR_PARSER_N3 rc+= raptor_init_parser_n3(world) != 0; #endif #ifdef RAPTOR_PARSER_TURTLE rc+= raptor_init_parser_turtle(world) != 0; #endif #ifdef RAPTOR_PARSER_TRIG rc+= raptor_init_parser_trig(world) != 0; #endif #ifdef RAPTOR_PARSER_RSS rc+= raptor_init_parser_rss(world) != 0; #endif #if defined(RAPTOR_PARSER_GRDDL) rc+= raptor_init_parser_grddl_common(world) != 0; #ifdef RAPTOR_PARSER_GRDDL rc+= raptor_init_parser_grddl(world) != 0; #endif #endif #ifdef RAPTOR_PARSER_GUESS rc+= raptor_init_parser_guess(world) != 0; #endif #ifdef RAPTOR_PARSER_RDFA rc+= raptor_init_parser_rdfa(world) != 0; #endif #ifdef RAPTOR_PARSER_JSON rc+= raptor_init_parser_json(world) != 0; #endif #ifdef RAPTOR_PARSER_NQUADS rc+= raptor_init_parser_nquads(world) != 0; #endif return rc; } /* * raptor_finish_parsers - delete all the registered parsers */ void raptor_parsers_finish(raptor_world *world) { if(world->parsers) { raptor_free_sequence(world->parsers); world->parsers = NULL; } #if defined(RAPTOR_PARSER_GRDDL) raptor_terminate_parser_grddl_common(world); #endif } /* * raptor_world_register_parser_factory: * @world: raptor world * @factory: pointer to function to call to register the factory * * Internal - Register a parser via parser factory. * * All strings set in the @factory method are shared with the * #raptor_parser_factory * * Return value: new factory object or NULL on failure **/ RAPTOR_EXTERN_C raptor_parser_factory* raptor_world_register_parser_factory(raptor_world* world, int (*factory) (raptor_parser_factory*)) { raptor_parser_factory *parser = NULL; parser = RAPTOR_CALLOC(raptor_parser_factory*, 1, sizeof(*parser)); if(!parser) return NULL; parser->world = world; parser->desc.mime_types = NULL; if(raptor_sequence_push(world->parsers, parser)) return NULL; /* on error, parser is already freed by the sequence */ /* Call the parser registration function on the new object */ if(factory(parser)) return NULL; /* parser is owned and freed by the parsers sequence */ if(raptor_syntax_description_validate(&parser->desc)) { raptor_log_error(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Parser description failed to validate\n"); goto tidy; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Registered parser %s\n", parser->desc.names[0]); #endif return parser; /* Clean up on failure */ tidy: raptor_free_parser_factory(parser); return NULL; } /* * raptor_world_get_parser_factory: * @world: world object * @name: the factory name or NULL for the default factory * * INTERNAL - Get a parser factory by name. * * Return value: the factory object or NULL if there is no such factory **/ raptor_parser_factory* raptor_world_get_parser_factory(raptor_world *world, const char *name) { raptor_parser_factory *factory = NULL; /* return 1st parser if no particular one wanted - why? */ if(!name) { factory = (raptor_parser_factory *)raptor_sequence_get_at(world->parsers, 0); if(!factory) { RAPTOR_DEBUG1("No (default) parsers registered\n"); return NULL; } } else { int i; for(i = 0; (factory = (raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { int namei; const char* fname; for(namei = 0; (fname = factory->desc.names[namei]); namei++) { if(!strcmp(fname, name)) break; } if(fname) break; } } return factory; } /** * raptor_world_get_parsers_count: * @world: world object * * Get number of parsers * * Return value: number of parsers **/ int raptor_world_get_parsers_count(raptor_world* world) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); return raptor_sequence_size(world->parsers); } /** * raptor_world_get_parser_description: * @world: world object * @counter: index into the list of parsers * * Get parser descriptive syntax information * * Return value: description or NULL if counter is out of range **/ const raptor_syntax_description* raptor_world_get_parser_description(raptor_world* world, unsigned int counter) { raptor_parser_factory *factory; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); factory = (raptor_parser_factory*)raptor_sequence_get_at(world->parsers, counter); if(!factory) return NULL; return &factory->desc; } /** * raptor_world_is_parser_name: * @world: world object * @name: the syntax name * * Check the name of a parser is known. * * Return value: non 0 if name is a known syntax name */ int raptor_world_is_parser_name(raptor_world* world, const char *name) { if(!name) return 0; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0); raptor_world_open(world); return (raptor_world_get_parser_factory(world, name) != NULL); } /** * raptor_new_parser: * @world: world object * @name: the parser name or NULL for default parser * * Constructor - create a new raptor_parser object. * * Return value: a new #raptor_parser object or NULL on failure */ raptor_parser* raptor_new_parser(raptor_world* world, const char *name) { raptor_parser_factory* factory; raptor_parser* rdf_parser; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); factory = raptor_world_get_parser_factory(world, name); if(!factory) return NULL; rdf_parser = RAPTOR_CALLOC(raptor_parser*, 1, sizeof(*rdf_parser)); if(!rdf_parser) return NULL; rdf_parser->world = world; raptor_statement_init(&rdf_parser->statement, world); rdf_parser->context = RAPTOR_CALLOC(void*, 1, factory->context_length); if(!rdf_parser->context) { raptor_free_parser(rdf_parser); return NULL; } #ifdef RAPTOR_XML_LIBXML rdf_parser->magic = RAPTOR_LIBXML_MAGIC; #endif rdf_parser->factory = factory; /* Bit flags */ rdf_parser->failed = 0; rdf_parser->emit_graph_marks = 1; rdf_parser->emitted_default_graph = 0; raptor_object_options_init(&rdf_parser->options, RAPTOR_OPTION_AREA_PARSER); /* set parsing strictness from default value */ raptor_parser_set_strict(rdf_parser, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_STRICT)); if(factory->init(rdf_parser, name)) { raptor_free_parser(rdf_parser); return NULL; } return rdf_parser; } /** * raptor_new_parser_for_content: * @world: world object * @uri: URI identifying the syntax (or NULL) * @mime_type: mime type identifying the content (or NULL) * @buffer: buffer of content to guess (or NULL) * @len: length of buffer * @identifier: identifier of content (or NULL) * * Constructor - create a new raptor_parser. * * Uses raptor_world_guess_parser_name() to find a parser by scoring * recognition of the syntax by a block of characters, the content * identifier or a mime type. The content identifier is typically a * filename or URI or some other identifier. * * Return value: a new #raptor_parser object or NULL on failure **/ raptor_parser* raptor_new_parser_for_content(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier) { const char* name; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); name = raptor_world_guess_parser_name(world, uri, mime_type, buffer, len, identifier); return name ? raptor_new_parser(world, name) : NULL; } /** * raptor_parser_parse_start: * @rdf_parser: RDF parser * @uri: base URI or may be NULL if no base URI is required * * Start a parse of content with base URI. * * Parsers that need a base URI can be identified using a syntax * description returned by raptor_world_get_parser_description() * statically or raptor_parser_get_description() on a constructed * parser. * * Return value: non-0 on failure, <0 if a required base URI was missing **/ int raptor_parser_parse_start(raptor_parser *rdf_parser, raptor_uri *uri) { if((rdf_parser->factory->desc.flags & RAPTOR_SYNTAX_NEED_BASE_URI) && !uri) { raptor_parser_error(rdf_parser, "Missing base URI for %s parser.", rdf_parser->factory->desc.names[0]); return -1; } if(uri) uri = raptor_uri_copy(uri); if(rdf_parser->base_uri) raptor_free_uri(rdf_parser->base_uri); rdf_parser->base_uri = uri; rdf_parser->locator.uri = uri; rdf_parser->locator.line = -1; rdf_parser->locator.column = -1; rdf_parser->locator.byte = -1; if(rdf_parser->factory->start) return rdf_parser->factory->start(rdf_parser); else return 0; } /** * raptor_parser_parse_chunk: * @rdf_parser: RDF parser * @buffer: content to parse * @len: length of buffer * @is_end: non-0 if this is the end of the content (such as EOF) * * Parse a block of content into triples. * * This method can only be called after raptor_parser_parse_start() has * initialised the parser. * * Return value: non-0 on failure. **/ int raptor_parser_parse_chunk(raptor_parser* rdf_parser, const unsigned char *buffer, size_t len, int is_end) { if(rdf_parser->sb) raptor_stringbuffer_append_counted_string(rdf_parser->sb, buffer, len, 1); return rdf_parser->factory->chunk(rdf_parser, buffer, len, is_end); } /** * raptor_free_parser: * @parser: #raptor_parser object * * Destructor - destroy a raptor_parser object. * **/ void raptor_free_parser(raptor_parser* rdf_parser) { if(!rdf_parser) return; if(rdf_parser->factory) rdf_parser->factory->terminate(rdf_parser); if(rdf_parser->www) raptor_free_www(rdf_parser->www); if(rdf_parser->context) RAPTOR_FREE(raptor_parser_context, rdf_parser->context); if(rdf_parser->base_uri) raptor_free_uri(rdf_parser->base_uri); if(rdf_parser->sb) raptor_free_stringbuffer(rdf_parser->sb); raptor_object_options_clear(&rdf_parser->options); RAPTOR_FREE(raptor_parser, rdf_parser); } /** * raptor_parser_parse_file_stream: * @rdf_parser: parser * @stream: FILE* of RDF content * @filename: filename of content or NULL if it has no name * @base_uri: the base URI to use * * Parse RDF content from a FILE*. * * After draining the FILE* stream (EOF), fclose is not called on it. * * Return value: non 0 on failure **/ int raptor_parser_parse_file_stream(raptor_parser* rdf_parser, FILE *stream, const char* filename, raptor_uri *base_uri) { int rc = 0; raptor_locator *locator = &rdf_parser->locator; if(!stream || !base_uri) return 1; locator->line= locator->column = -1; locator->file= filename; if(raptor_parser_parse_start(rdf_parser, base_uri)) return 1; while(!feof(stream)) { size_t len = fread(rdf_parser->buffer, 1, RAPTOR_READ_BUFFER_SIZE, stream); int is_end = (len < RAPTOR_READ_BUFFER_SIZE); rdf_parser->buffer[len] = '\0'; rc = raptor_parser_parse_chunk(rdf_parser, rdf_parser->buffer, len, is_end); if(rc || is_end) break; } return (rc != 0); } /** * raptor_parser_parse_file: * @rdf_parser: parser * @uri: URI of RDF content or NULL to read from standard input * @base_uri: the base URI to use (or NULL if the same) * * Parse RDF content at a file URI. * * If @uri is NULL (source is stdin), then the @base_uri is required. * * Return value: non 0 on failure **/ int raptor_parser_parse_file(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) { int rc = 0; int free_base_uri = 0; const char *filename = NULL; FILE *fh = NULL; #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) struct stat buf; #endif if(uri) { filename = raptor_uri_uri_string_to_filename(raptor_uri_as_string(uri)); if(!filename) return 1; #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) if(!stat(filename, &buf) && S_ISDIR(buf.st_mode)) { raptor_parser_error(rdf_parser, "Cannot read from a directory '%s'", filename); goto cleanup; } #endif fh = fopen(filename, "r"); if(!fh) { raptor_parser_error(rdf_parser, "file '%s' open failed - %s", filename, strerror(errno)); goto cleanup; } if(!base_uri) { base_uri = raptor_uri_copy(uri); free_base_uri = 1; } } else { if(!base_uri) return 1; fh = stdin; } rc = raptor_parser_parse_file_stream(rdf_parser, fh, filename, base_uri); cleanup: if(uri) { if(fh) fclose(fh); RAPTOR_FREE(char*, filename); } if(free_base_uri) raptor_free_uri(base_uri); return rc; } void raptor_parser_parse_uri_write_bytes(raptor_www* www, void *userdata, const void *ptr, size_t size, size_t nmemb) { raptor_parse_bytes_context* rpbc = (raptor_parse_bytes_context*)userdata; size_t len = size * nmemb; if(!rpbc->started) { raptor_uri* base_uri = rpbc->base_uri; if(!base_uri) { rpbc->final_uri = raptor_www_get_final_uri(www); /* base URI after URI resolution is finally chosen */ base_uri = rpbc->final_uri ? rpbc->final_uri : www->uri; } if(raptor_parser_parse_start(rpbc->rdf_parser, base_uri)) raptor_www_abort(www, "Parsing failed"); rpbc->started = 1; } if(raptor_parser_parse_chunk(rpbc->rdf_parser, (unsigned char*)ptr, len, 0)) raptor_www_abort(www, "Parsing failed"); } static void raptor_parser_parse_uri_content_type_handler(raptor_www* www, void* userdata, const char* content_type) { raptor_parser* rdf_parser = (raptor_parser*)userdata; if(rdf_parser->factory->content_type_handler) rdf_parser->factory->content_type_handler(rdf_parser, content_type); } int raptor_parser_set_uri_filter_no_net(void *user_data, raptor_uri* uri) { unsigned char* uri_string = raptor_uri_as_string(uri); if(raptor_uri_uri_string_is_file_uri(uri_string)) return 0; raptor_parser_error((raptor_parser*)user_data, "Network fetch of URI '%s' denied", uri_string); return 1; } /** * raptor_parser_parse_uri: * @rdf_parser: parser * @uri: URI of RDF content * @base_uri: the base URI to use (or NULL if the same) * * Parse the RDF content at URI. * * Sends an HTTP Accept: header whent the URI is of the HTTP protocol, * see raptor_parser_parse_uri_with_connection() for details including * how the @base_uri is used. * * Return value: non 0 on failure **/ int raptor_parser_parse_uri(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri) { return raptor_parser_parse_uri_with_connection(rdf_parser, uri, base_uri, NULL); } /** * raptor_parser_parse_uri_with_connection: * @rdf_parser: parser * @uri: URI of RDF content * @base_uri: the base URI to use (or NULL if the same) * @connection: connection object pointer or NULL to create a new one * * Parse RDF content at URI using existing WWW connection. * * If @base_uri is not given and during resolution of the URI, a * protocol redirection occurs, the final resolved URI will be * used as the base URI. If redirection does not occur, the * base URI will be @uri. * * If @base_uri is given, it overrides the process above. * * When @connection is NULL and a MIME Type exists for the parser * type, this type is sent in an HTTP Accept: header in the form * Accept: MIME-TYPE along with a wildcard of 0.1 quality, so MIME-TYPE is * prefered rather than the sole answer. The latter part may not be * necessary but should ensure an HTTP 200 response. * * Return value: non 0 on failure **/ int raptor_parser_parse_uri_with_connection(raptor_parser* rdf_parser, raptor_uri *uri, raptor_uri *base_uri, void *connection) { int ret = 0; raptor_parse_bytes_context rpbc; char* ua = NULL; char* cert_filename = NULL; char* cert_type = NULL; char* cert_passphrase = NULL; int ssl_verify_peer; int ssl_verify_host; if(connection) { if(rdf_parser->www) raptor_free_www(rdf_parser->www); rdf_parser->www = raptor_new_www_with_connection(rdf_parser->world, connection); if(!rdf_parser->www) return 1; } else { const char *accept_h; if(rdf_parser->www) raptor_free_www(rdf_parser->www); rdf_parser->www = raptor_new_www(rdf_parser->world); if(!rdf_parser->www) return 1; accept_h = raptor_parser_get_accept_header(rdf_parser); if(accept_h) { raptor_www_set_http_accept(rdf_parser->www, accept_h); RAPTOR_FREE(char*, accept_h); } } rpbc.rdf_parser = rdf_parser; rpbc.base_uri = base_uri; rpbc.final_uri = NULL; rpbc.started = 0; if(rdf_parser->uri_filter) raptor_www_set_uri_filter(rdf_parser->www, rdf_parser->uri_filter, rdf_parser->uri_filter_user_data); else if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)) raptor_www_set_uri_filter(rdf_parser->www, raptor_parser_set_uri_filter_no_net, rdf_parser); raptor_www_set_write_bytes_handler(rdf_parser->www, raptor_parser_parse_uri_write_bytes, &rpbc); raptor_www_set_content_type_handler(rdf_parser->www, raptor_parser_parse_uri_content_type_handler, rdf_parser); raptor_www_set_http_cache_control(rdf_parser->www, RAPTOR_OPTIONS_GET_STRING(rdf_parser, RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL)); ua = RAPTOR_OPTIONS_GET_STRING(rdf_parser, RAPTOR_OPTION_WWW_HTTP_USER_AGENT); if(ua) raptor_www_set_user_agent(rdf_parser->www, ua); cert_filename = RAPTOR_OPTIONS_GET_STRING(rdf_parser, RAPTOR_OPTION_WWW_CERT_FILENAME); cert_type = RAPTOR_OPTIONS_GET_STRING(rdf_parser, RAPTOR_OPTION_WWW_CERT_TYPE); cert_passphrase = RAPTOR_OPTIONS_GET_STRING(rdf_parser, RAPTOR_OPTION_WWW_CERT_PASSPHRASE); if(cert_filename || cert_type || cert_passphrase) raptor_www_set_ssl_cert_options(rdf_parser->www, cert_filename, cert_type, cert_passphrase); ssl_verify_peer = RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_WWW_SSL_VERIFY_PEER); ssl_verify_host = RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_WWW_SSL_VERIFY_HOST); raptor_www_set_ssl_verify_options(rdf_parser->www, ssl_verify_peer, ssl_verify_host); ret = raptor_www_fetch(rdf_parser->www, uri); if(!rpbc.started && !ret) ret = raptor_parser_parse_start(rdf_parser, base_uri); if(rpbc.final_uri) raptor_free_uri(rpbc.final_uri); if(ret) { raptor_free_www(rdf_parser->www); rdf_parser->www = NULL; return 1; } if(raptor_parser_parse_chunk(rdf_parser, NULL, 0, 1)) rdf_parser->failed = 1; raptor_free_www(rdf_parser->www); rdf_parser->www = NULL; return rdf_parser->failed; } /* * raptor_parser_fatal_error - Fatal Error from a parser - Internal */ void raptor_parser_fatal_error(raptor_parser* parser, const char *message, ...) { va_list arguments; va_start(arguments, message); if(parser) { parser->failed = 1; raptor_log_error_varargs(parser->world, RAPTOR_LOG_LEVEL_FATAL, &parser->locator, message, arguments); } else raptor_log_error_varargs(NULL, RAPTOR_LOG_LEVEL_FATAL, NULL, message, arguments); va_end(arguments); } /* * raptor_parser_error - Error from a parser - Internal */ void raptor_parser_error(raptor_parser* parser, const char *message, ...) { va_list arguments; va_start(arguments, message); raptor_parser_log_error_varargs(parser, RAPTOR_LOG_LEVEL_ERROR, message, arguments); va_end(arguments); } /** * raptor_parser_log_error_varargs: * @parser: parser (or NULL) * @level: log level * @message: error format message * @arguments: varargs for message * * Error from a parser - Internal. */ void raptor_parser_log_error_varargs(raptor_parser* parser, raptor_log_level level, const char *message, va_list arguments) { if(parser) raptor_log_error_varargs(parser->world, level, &parser->locator, message, arguments); else raptor_log_error_varargs(NULL, level, NULL, message, arguments); } /* * raptor_parser_warning - Warning from a parser - Internal */ void raptor_parser_warning(raptor_parser* parser, const char *message, ...) { va_list arguments; va_start(arguments, message); if(parser) raptor_log_error_varargs(parser->world, RAPTOR_LOG_LEVEL_WARN, &parser->locator, message, arguments); else raptor_log_error_varargs(NULL, RAPTOR_LOG_LEVEL_WARN, NULL, message, arguments); va_end(arguments); } /* PUBLIC FUNCTIONS */ /** * raptor_parser_set_statement_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: new statement callback function * * Set the statement handler function for the parser. * * Use this to set the function to receive statements as the parsing * proceeds. The statement argument to @handler is shared and must be * copied by the caller with raptor_statement_copy(). **/ void raptor_parser_set_statement_handler(raptor_parser* parser, void *user_data, raptor_statement_handler handler) { parser->user_data = user_data; parser->statement_handler = handler; } /** * raptor_parser_set_graph_mark_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: new graph callback function * * Set the graph mark handler function for the parser. * * See #raptor_graph_mark_handler and #raptor_graph_mark_flags for * the marks that may be returned by the handler. * **/ void raptor_parser_set_graph_mark_handler(raptor_parser* parser, void *user_data, raptor_graph_mark_handler handler) { parser->user_data = user_data; parser->graph_mark_handler = handler; } /** * raptor_parser_set_namespace_handler: * @parser: #raptor_parser parser object * @user_data: user data pointer for callback * @handler: new namespace callback function * * Set the namespace handler function for the parser. * * When a prefix/namespace is seen in a parser, call the given * @handler with the prefix string and the #raptor_uri namespace URI. * Either can be NULL for the default prefix or default namespace. * * The handler function does not deal with duplicates so any * namespace may be declared multiple times. * **/ void raptor_parser_set_namespace_handler(raptor_parser* parser, void *user_data, raptor_namespace_handler handler) { parser->namespace_handler = handler; parser->namespace_handler_user_data = user_data; } /** * raptor_parser_set_uri_filter: * @parser: parser object * @filter: URI filter function * @user_data: User data to pass to filter function * * Set URI filter function for WWW retrieval. **/ void raptor_parser_set_uri_filter(raptor_parser* parser, raptor_uri_filter_func filter, void *user_data) { parser->uri_filter = filter; parser->uri_filter_user_data = user_data; } /** * raptor_parser_set_option: * @parser: #raptor_parser parser object * @option: option to set from enumerated #raptor_option values * @string: string option value (or NULL) * @integer: integer option value * * Set parser option. * * If @string is not NULL and the option type is numeric, the string * value is converted to an integer and used in preference to @integer. * * If @string is NULL and the option type is not numeric, an error is * returned. * * The @string values used are copied. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: non 0 on failure or if the option is unknown **/ int raptor_parser_set_option(raptor_parser *parser, raptor_option option, const char* string, int integer) { int rc; rc = raptor_object_options_set_option(&parser->options, option, string, integer); if(option == RAPTOR_OPTION_STRICT && !rc) { int is_strict = RAPTOR_OPTIONS_GET_NUMERIC(parser, RAPTOR_OPTION_STRICT); raptor_parser_set_strict(parser, is_strict); } return rc; } /** * raptor_parser_get_option: * @parser: #raptor_parser parser object * @option: option to get value * @string_p: pointer to where to store string value * @integer_p: pointer to where to store integer value * * Get parser option. * * Any string value returned in *@string_p is shared and must * be copied by the caller. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: option value or < 0 for an illegal option **/ int raptor_parser_get_option(raptor_parser *parser, raptor_option option, char** string_p, int* integer_p) { return raptor_object_options_get_option(&parser->options, option, string_p, integer_p); } /** * raptor_parser_set_strict: * @rdf_parser: #raptor_parser object * @is_strict: Non 0 for strict parsing * * INTERNAL - Set parser to strict / lax mode. * **/ static void raptor_parser_set_strict(raptor_parser* rdf_parser, int is_strict) { is_strict = (is_strict) ? 1 : 0; /* Initialise default parser mode */ RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_SCANNING, 0); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES, !is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES, !is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID, !is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST, 0); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_NORMALIZE_LANGUAGE, 1); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_NON_NFC_FATAL, is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_WARN_OTHER_PARSETYPES, !is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_CHECK_RDF_ID, 1); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_HTML_TAG_SOUP, !is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_MICROFORMATS, !is_strict); RAPTOR_OPTIONS_SET_NUMERIC(rdf_parser, RAPTOR_OPTION_HTML_LINK, !is_strict); } /** * raptor_parser_get_name: * @rdf_parser: #raptor_parser parser object * * Get the name of a parser. * * Use raptor_parser_get_description() to get the alternate names and * aliases as well as other descriptive values. * * Return value: the short name for the parser. **/ const char* raptor_parser_get_name(raptor_parser *rdf_parser) { if(rdf_parser->factory->get_name) return rdf_parser->factory->get_name(rdf_parser); else return rdf_parser->factory->desc.names[0]; } /** * raptor_parser_get_description: * @rdf_parser: #raptor_parser parser object * * Get description of the syntaxes of the parser. * * The returned description is static and lives as long as the raptor * library (raptor world). * * Return value: description of syntax **/ const raptor_syntax_description* raptor_parser_get_description(raptor_parser *rdf_parser) { if(rdf_parser->factory->get_description) return rdf_parser->factory->get_description(rdf_parser); else return &rdf_parser->factory->desc; } /** * raptor_parser_parse_abort: * @rdf_parser: #raptor_parser parser object * * Abort an ongoing parsing. * * Causes any ongoing generation of statements by a parser to be * terminated and the parser to return controlto the application * as soon as draining any existing buffers. * * Most useful inside raptor_parser_parse_file() or * raptor_parser_parse_uri() when the Raptor library is directing the * parsing and when one of the callback handlers such as as set by * raptor_parser_set_statement_handler() requires to return to the main * application code. **/ void raptor_parser_parse_abort(raptor_parser *rdf_parser) { rdf_parser->failed = 1; } /** * raptor_parser_get_locator: * @rdf_parser: raptor parser * * Get the current raptor locator object. * * Return value: raptor locator **/ raptor_locator* raptor_parser_get_locator(raptor_parser *rdf_parser) { if(rdf_parser->factory->get_locator) return rdf_parser->factory->get_locator(rdf_parser); else return &rdf_parser->locator; } #ifdef RAPTOR_DEBUG void raptor_stats_print(raptor_parser *rdf_parser, FILE *stream) { #ifdef RAPTOR_PARSER_RDFXML #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 if(!strcmp(rdf_parser->factory->desc.names[0], "rdfxml")) { raptor_rdfxml_parser *rdf_xml_parser = (raptor_rdfxml_parser*)rdf_parser->context; fputs("raptor parser stats\n ", stream); raptor_rdfxml_parser_stats_print(rdf_xml_parser, stream); } #endif #endif } #endif struct syntax_score { int score; raptor_parser_factory* factory; }; static int compare_syntax_score(const void *a, const void *b) { return ((struct syntax_score*)b)->score - ((struct syntax_score*)a)->score; } #define RAPTOR_MIN_GUESS_SCORE 2 /** * raptor_world_guess_parser_name: * @world: world object * @uri: URI identifying the syntax (or NULL) * @mime_type: mime type identifying the content (or NULL) * @buffer: buffer of content to guess (or NULL) * @len: length of buffer * @identifier: identifier of content (or NULL) * * Guess a parser name for content. * * Find a parser by scoring recognition of the syntax by a block of * characters, the content identifier or a mime type. The content * identifier is typically a filename or URI or some other identifier. * * If the guessing finds only low scores, NULL will be returned. * * Return value: a parser name or NULL if no guess could be made **/ const char* raptor_world_guess_parser_name(raptor_world* world, raptor_uri *uri, const char *mime_type, const unsigned char *buffer, size_t len, const unsigned char *identifier) { unsigned int i; raptor_parser_factory *factory; unsigned char *suffix = NULL; struct syntax_score* scores; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); raptor_world_open(world); scores = RAPTOR_CALLOC(struct syntax_score*, raptor_sequence_size(world->parsers), sizeof(struct syntax_score)); if(!scores) return NULL; if(identifier) { unsigned char *p = (unsigned char*)strrchr((const char*)identifier, '.'); if(p) { unsigned char *from, *to; p++; suffix = RAPTOR_MALLOC(unsigned char*, strlen((const char*)p) + 1); if(!suffix) { RAPTOR_FREE(syntax_scores, scores); return NULL; } for(from = p, to = suffix; *from; ) { unsigned char c = *from++; /* discard the suffix if it wasn't '\.[a-zA-Z0-9]+$' */ if(!isalpha(c) && !isdigit(c)) { RAPTOR_FREE(char*, suffix); suffix = NULL; to = NULL; break; } *to++ = isupper(c) ? (unsigned char)tolower(c): c; } if(to) *to = '\0'; } } for(i = 0; (factory = (raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { int score = -1; const raptor_type_q* type_q = NULL; if(mime_type && factory->desc.mime_types) { int j; type_q = NULL; for(j = 0; (type_q = &factory->desc.mime_types[j]) && type_q->mime_type; j++) { if(!strcmp(mime_type, type_q->mime_type)) break; } /* got an exact match mime type - score it via the Q */ if(type_q) score = type_q->q; } /* mime type match has high Q - return factory as result */ if(score >= 10) break; if(uri && factory->desc.uri_strings) { int j; const char* uri_string = (const char*)raptor_uri_as_string(uri); const char* factory_uri_string = NULL; for(j = 0; (factory_uri_string = factory->desc.uri_strings[j]); j++) { if(!strcmp(uri_string, factory_uri_string)) break; } if(factory_uri_string) /* got an exact match syntax for URI - return factory as result */ break; } if(factory->recognise_syntax) { int c = -1; /* Only use first N bytes to avoid HTML documents that contain * RDF/XML examples */ #define FIRSTN 1024 #if FIRSTN > RAPTOR_READ_BUFFER_SIZE #error "RAPTOR_READ_BUFFER_SIZE is not large enough" #endif if(buffer && len && len > FIRSTN) { c = buffer[FIRSTN]; ((char*)buffer)[FIRSTN] = '\0'; } score += factory->recognise_syntax(factory, buffer, len, identifier, suffix, mime_type); if(c >= 0) ((char*)buffer)[FIRSTN] = c; } scores[i].score = score < 10 ? score : 10; scores[i].factory = factory; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 RAPTOR_DEBUG3("Score %15s : %d\n", factory->desc.names[0], score); #endif } if(!factory) { /* sort the scores and pick a factory if score is good enough */ qsort(scores, i, sizeof(struct syntax_score), compare_syntax_score); if(scores[0].score >= RAPTOR_MIN_GUESS_SCORE) factory = scores[0].factory; } if(suffix) RAPTOR_FREE(char*, suffix); RAPTOR_FREE(syntax_scores, scores); return factory ? factory->desc.names[0] : NULL; } /* * raptor_parser_copy_flags_state: * @to_parser: destination parser * @from_parser: source parser * * Copy status flags between parsers - INTERNAL. **/ void raptor_parser_copy_flags_state(raptor_parser *to_parser, raptor_parser *from_parser) { to_parser->failed = from_parser->failed; to_parser->emit_graph_marks = from_parser->emit_graph_marks; to_parser->emitted_default_graph = from_parser->emitted_default_graph; } /* * raptor_parser_copy_user_state: * @to_parser: destination parser * @from_parser: source parser * * Copy user state between parsers - INTERNAL. * * Return value: non-0 on failure **/ int raptor_parser_copy_user_state(raptor_parser *to_parser, raptor_parser *from_parser) { int rc = 0; to_parser->user_data = from_parser->user_data; to_parser->statement_handler = from_parser->statement_handler; to_parser->namespace_handler = from_parser->namespace_handler; to_parser->namespace_handler_user_data = from_parser->namespace_handler_user_data; to_parser->uri_filter = from_parser->uri_filter; to_parser->uri_filter_user_data = from_parser->uri_filter_user_data; /* copy bit flags */ raptor_parser_copy_flags_state(to_parser, from_parser); /* copy options */ if(!rc) rc = raptor_object_options_copy_state(&to_parser->options, &from_parser->options); return rc; } /* * raptor_parser_start_namespace: * @rdf_parser: parser * @nspace: namespace starting * * Internal - Invoke start namespace handler **/ void raptor_parser_start_namespace(raptor_parser* rdf_parser, raptor_namespace* nspace) { if(!rdf_parser->namespace_handler) return; (*rdf_parser->namespace_handler)(rdf_parser->namespace_handler_user_data, nspace); } /** * raptor_parser_get_accept_header: * @rdf_parser: parser * * Get an HTTP Accept value for the parser. * * The returned string must be freed by the caller such as with * raptor_free_memory(). * * Return value: a new Accept: header string or NULL on failure **/ const char* raptor_parser_get_accept_header(raptor_parser* rdf_parser) { raptor_parser_factory *factory = rdf_parser->factory; char *accept_header = NULL; size_t len; char *p; int i; const raptor_type_q* type_q; if(factory->accept_header) return factory->accept_header(rdf_parser); if(!factory->desc.mime_types) return NULL; len = 0; for(i = 0; (type_q = &factory->desc.mime_types[i]) && type_q->mime_type; i++) { len += type_q->mime_type_len + 2; /* ", " */ if(type_q->q < 10) len += 6; /* ";q=X.Y" */ } /* 9 = strlen("\*\/\*;q=0.1") */ #define ACCEPT_HEADER_LEN 9 accept_header = RAPTOR_MALLOC(char*, len + ACCEPT_HEADER_LEN + 1); if(!accept_header) return NULL; p = accept_header; for(i = 0; (type_q = &factory->desc.mime_types[i]) && type_q->mime_type; i++) { memcpy(p, type_q->mime_type, type_q->mime_type_len); p += type_q->mime_type_len; if(type_q->q < 10) { *p++ = ';'; *p++ = 'q'; *p++ = '='; *p++ = '0'; *p++ = '.'; *p++ = '0' + (type_q->q); } *p++ = ','; *p++ = ' '; } memcpy(p, "*/*;q=0.1", ACCEPT_HEADER_LEN + 1); return accept_header; } const char* raptor_parser_get_accept_header_all(raptor_world* world) { raptor_parser_factory *factory; char *accept_header = NULL; size_t len; char *p; int i; len = 0; for(i = 0; (factory = (raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { const raptor_type_q* type_q; int j; for(j = 0; (type_q = &factory->desc.mime_types[j]) && type_q->mime_type; j++) { len += type_q->mime_type_len + 2; /* ", " */ if(type_q->q < 10) len += 6; /* ";q=X.Y" */ } } /* 9 = strlen("\*\/\*;q=0.1") */ #define ACCEPT_HEADER_LEN 9 accept_header = RAPTOR_MALLOC(char*, len + ACCEPT_HEADER_LEN + 1); if(!accept_header) return NULL; p = accept_header; for(i = 0; (factory = (raptor_parser_factory*)raptor_sequence_get_at(world->parsers, i)); i++) { const raptor_type_q* type_q; int j; for(j = 0; (type_q = &factory->desc.mime_types[j]) && type_q->mime_type; j++) { memcpy(p, type_q->mime_type, type_q->mime_type_len); p+= type_q->mime_type_len; if(type_q->q < 10) { *p++ = ';'; *p++ = 'q'; *p++ = '='; *p++ = '0'; *p++ = '.'; *p++ = '0' + (type_q->q); } *p++ = ','; *p++ = ' '; } } memcpy(p, "*/*;q=0.1", ACCEPT_HEADER_LEN + 1); return accept_header; } void raptor_parser_save_content(raptor_parser* rdf_parser, int save) { if(rdf_parser->sb) raptor_free_stringbuffer(rdf_parser->sb); rdf_parser->sb= save ? raptor_new_stringbuffer() : NULL; } const unsigned char* raptor_parser_get_content(raptor_parser* rdf_parser, size_t* length_p) { unsigned char* buffer; size_t len; if(!rdf_parser->sb) return NULL; len = raptor_stringbuffer_length(rdf_parser->sb); buffer = RAPTOR_MALLOC(unsigned char*, len + 1); if(!buffer) return NULL; raptor_stringbuffer_copy_to_string(rdf_parser->sb, buffer, len); if(length_p) *length_p=len; return buffer; } void raptor_parser_start_graph(raptor_parser* parser, raptor_uri* uri, int is_declared) { int flags = RAPTOR_GRAPH_MARK_START; if(is_declared) flags |= RAPTOR_GRAPH_MARK_DECLARED; if(!parser->emit_graph_marks) return; if(parser->graph_mark_handler) (*parser->graph_mark_handler)(parser->user_data, uri, flags); } void raptor_parser_end_graph(raptor_parser* parser, raptor_uri* uri, int is_declared) { int flags = 0; if(is_declared) flags |= RAPTOR_GRAPH_MARK_DECLARED; if(!parser->emit_graph_marks) return; if(parser->graph_mark_handler) (*parser->graph_mark_handler)(parser->user_data, uri, flags); } /** * raptor_parser_get_world: * @rdf_parser: parser * * Get the #raptor_world object associated with a parser. * * Return value: raptor_world* pointer **/ raptor_world * raptor_parser_get_world(raptor_parser* rdf_parser) { return rdf_parser->world; } /** * raptor_parser_get_graph: * @rdf_parser: parser * * Get the current graph for the parser * * The returned URI is owned by the caller and must be freed with * raptor_free_uri() * * Return value: raptor_uri* graph name or NULL for the default graph **/ raptor_uri* raptor_parser_get_graph(raptor_parser* rdf_parser) { if(rdf_parser->factory->get_graph) return rdf_parser->factory->get_graph(rdf_parser); return NULL; } /** * raptor_parser_parse_iostream: * @rdf_parser: parser * @iostr: iostream to read from * @base_uri: the base URI to use (or NULL) * * Parse content from an iostream * * If the parser requires a base URI and @base_uri is NULL, an error * will be generated and the function will fail. * * Return value: non 0 on failure, <0 if a required base URI was missing **/ int raptor_parser_parse_iostream(raptor_parser* rdf_parser, raptor_iostream *iostr, raptor_uri *base_uri) { int rc = 0; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(rdf_parser, raptor_parser, 1); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(iostr, raptor_iostr, 1); rc = raptor_parser_parse_start(rdf_parser, base_uri); if(rc) return rc; while(!raptor_iostream_read_eof(iostr)) { int ilen; size_t len; int is_end; ilen = raptor_iostream_read_bytes(rdf_parser->buffer, 1, RAPTOR_READ_BUFFER_SIZE, iostr); if(ilen < 0) break; len = RAPTOR_GOOD_CAST(size_t, ilen); is_end = (len < RAPTOR_READ_BUFFER_SIZE); rc = raptor_parser_parse_chunk(rdf_parser, rdf_parser->buffer, len, is_end); if(rc || is_end) break; } return rc; } /* end not STANDALONE */ #endif #ifdef STANDALONE #include int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); int i; const char *s; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Known options:\n", program); #endif for(i = 0; i <= (int)raptor_option_get_count(); i++) { raptor_option_description *od; int fn; od = raptor_world_get_option_description(world, RAPTOR_DOMAIN_PARSER, (raptor_option)i); if(!od) continue; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, " %2d %-20s %s <%s>\n", i, od->name, od->label, (od->uri ? (const char*)raptor_uri_as_string(od->uri) : "")); #endif fn = raptor_world_get_option_from_uri(world, od->uri); if(fn != i) { fprintf(stderr, "%s: raptor_option_from_uri() returned %d expected %d\n", program, fn, i); return 1; } raptor_free_option_description(od); } s = raptor_parser_get_accept_header_all(world); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "Default HTTP accept header: '%s'\n", s); #endif if(!s) { fprintf(stderr, "%s: raptor_parser_get_accept_header_all() failed\n", program); return 1; } RAPTOR_FREE(char*, s); raptor_free_world(world); return 0; } #endif raptor2-2.0.15/src/raptor_serialize_html.c0000644000175000017500000002100012020170223015424 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_html.c - HTML Table serializer * * Copyright (C) 2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Raptor html serializer object */ typedef struct { int count; } raptor_html_context; /* create a new serializer */ static int raptor_html_serialize_init(raptor_serializer* serializer, const char *name) { return 0; } /* destroy a serializer */ static void raptor_html_serialize_terminate(raptor_serializer* serializer) { } /* start a serialize */ static int raptor_html_serialize_start(raptor_serializer* serializer) { raptor_html_context * context = (raptor_html_context *)serializer->context; raptor_iostream *iostr = serializer->iostream; context->count = 0; /* XML and HTML declarations */ raptor_iostream_counted_string_write( "\n", 39, iostr); raptor_iostream_counted_string_write( "\n", 106, iostr); raptor_iostream_counted_string_write( "\n", 44, iostr); raptor_iostream_counted_string_write("\n", 7, iostr); raptor_iostream_counted_string_write(" Raptor Graph Serialisation\n", 44, iostr); raptor_iostream_counted_string_write("\n", 8, iostr); raptor_iostream_counted_string_write("\n", 7, iostr); raptor_iostream_counted_string_write( " \n", 34, iostr); raptor_iostream_counted_string_write(" \n", 9, iostr); raptor_iostream_counted_string_write(" \n", 23, iostr); raptor_iostream_counted_string_write(" \n", 25, iostr); raptor_iostream_counted_string_write(" \n", 22, iostr); raptor_iostream_counted_string_write(" \n", 10, iostr); return 0; } /* serialize a term */ static int raptor_term_html_write(const raptor_term *term, raptor_iostream* iostr) { unsigned char *str; size_t len; switch(term->type) { case RAPTOR_TERM_TYPE_LITERAL: raptor_iostream_counted_string_write("", 22, iostr); raptor_iostream_counted_string_write("value.literal.language) { len = RAPTOR_LANG_LEN_TO_SIZE_T(term->value.literal.language_len); raptor_iostream_counted_string_write(" xml:lang=\"", 11, iostr); raptor_xml_escape_string_write(term->value.literal.language, len, '"', iostr); raptor_iostream_write_byte('"', iostr); } raptor_iostream_write_byte('>', iostr); len = term->value.literal.string_len; raptor_xml_escape_string_write(term->value.literal.string, len, 0, iostr); raptor_iostream_counted_string_write("", 7, iostr); if(term->value.literal.datatype) { str = raptor_uri_as_counted_string(term->value.literal.datatype, &len); raptor_iostream_counted_string_write("^^<", 29, iostr); raptor_xml_escape_string_write(str, len, 0, iostr); raptor_iostream_counted_string_write(">", 11, iostr); } break; case RAPTOR_TERM_TYPE_BLANK: len = term->value.blank.string_len; raptor_iostream_counted_string_write("", 20, iostr); raptor_iostream_counted_string_write("_:", 2, iostr); raptor_xml_escape_string_write(term->value.blank.string, len, 0, iostr); break; case RAPTOR_TERM_TYPE_URI: str = raptor_uri_as_counted_string(term->value.uri, &len); raptor_iostream_counted_string_write("", 18, iostr); raptor_iostream_counted_string_write("", 2, iostr); raptor_xml_escape_string_write(str, len, 0, iostr); raptor_iostream_counted_string_write("", 4, iostr); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(term->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", term->type); return 1; } raptor_iostream_counted_string_write("", 7, iostr); return 0; } /* serialize a statement */ static int raptor_html_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_html_context * context = (raptor_html_context *)serializer->context; raptor_iostream *iostr = serializer->iostream; raptor_iostream_counted_string_write(" \n", 24, iostr); /* Subject */ raptor_iostream_counted_string_write(" \n", 6, iostr); /* Predicate */ raptor_iostream_counted_string_write(" \n", 6, iostr); /* Object */ raptor_iostream_counted_string_write(" \n", 6, iostr); raptor_iostream_counted_string_write(" \n", 10, iostr); context->count++; return 0; } /* end a serialize */ static int raptor_html_serialize_end(raptor_serializer* serializer) { raptor_html_context * context = (raptor_html_context *)serializer->context; raptor_iostream *iostr = serializer->iostream; raptor_iostream_counted_string_write("
SubjectPredicateObject
", 10, iostr); raptor_term_html_write(statement->subject, iostr); raptor_iostream_counted_string_write("", 10, iostr); raptor_term_html_write(statement->predicate, iostr); raptor_iostream_counted_string_write("", 10, iostr); raptor_term_html_write(statement->object, iostr); raptor_iostream_counted_string_write("
\n", 11, iostr); raptor_iostream_counted_string_write( "

Total number of triples: ", 50, iostr); raptor_iostream_decimal_write(context->count, iostr); raptor_iostream_counted_string_write(".

\n", 13, iostr); raptor_iostream_counted_string_write("\n", 8, iostr); raptor_iostream_counted_string_write("\n", 8, iostr); return 0; } /* finish the serializer factory */ static void raptor_html_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static const char* const html_names[2] = { "html", NULL}; static const char* const html_uri_strings[2] = { "http://www.w3.org/1999/xhtml", NULL }; #define HTML_TYPES_COUNT 2 static const raptor_type_q html_types[HTML_TYPES_COUNT + 1] = { { "application/xhtml+xml", 21, 10}, { "text/html", 9, 10}, { NULL, 0, 0} }; static int raptor_html_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = html_names; factory->desc.mime_types = html_types; factory->desc.label = "HTML Table"; factory->desc.uri_strings = html_uri_strings; factory->context_length = sizeof(raptor_html_context); factory->init = raptor_html_serialize_init; factory->terminate = raptor_html_serialize_terminate; factory->declare_namespace = NULL; factory->declare_namespace_from_namespace = NULL; factory->serialize_start = raptor_html_serialize_start; factory->serialize_statement = raptor_html_serialize_statement; factory->serialize_end = raptor_html_serialize_end; factory->finish_factory = raptor_html_serialize_finish_factory; return 0; } int raptor_init_serializer_html(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_html_serializer_register_factory); } raptor2-2.0.15/src/raptor_nfc_test.c0000644000175000017500000001641612020170223014235 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_nfc_test.c - Raptor Unicode NFC validation check * * Copyright (C) 2004-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * It operates over the Unicode NormalizationTest.txt * which tests normalization the process, NOT normalization checking. * It says: * " CONFORMANCE: * 1. The following invariants must be true for all conformant implementations * NFC * c2 == NFC(c1) == NFC(c2) == NFC(c3) * c4 == NFC(c4) == NFC(c5) * " * * It does NOT require that c1, c3 and c5 are NFC. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* for isprint() */ #include #ifdef HAVE_ERRNO_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #undef RAPTOR_NFC_DECODE_DEBUG /* * decode_to_utf8: * @utf8_string: destination utf8 buffer (FIXME big enough!) * @unicode_string: first char of string * @end: last char of unicode_string */ static size_t decode_to_utf8(unsigned char *utf8_string, size_t utf8_string_length, const char *unicode_string, const char *end) { unsigned char *u = utf8_string; const char *p = unicode_string; #ifdef RAPTOR_NFC_DECODE_DEBUG fputs("decode_to_utf8: string '", stderr); (void)fwrite(unicode_string, sizeof(char), (end-unicode_string) + 1, stderr); fputs("' converts to:\n ", stderr); #endif while(p < end) { unsigned long c = 0; char *endptr; int unicode_width; if(*p == ' ') { p++; continue; } c = (unsigned long)strtol(p, &endptr, 16); #ifdef RAPTOR_NFC_DECODE_DEBUG fprintf(stderr, "U+%04lX ", c); #endif p = (const char*)endptr; unichar_width = raptor_unicode_utf8_string_put_char(c, u, (end-p)); if(unichar_width < 0) { fprintf(stderr, "decode_to_utf8 Illegal Unicode character with code point #x%lX.", unichar); break; } u += (size_t)unichar_width; if((u-utf8_string) > RAPTOR_GOOD_CAST(int, utf8_string_length)) { fprintf(stderr, "decode_to_utf8 overwrote utf8_string buffer at byte %ld\n", (u-utf8_string)); abort(); } } #ifdef RAPTOR_NFC_DECODE_DEBUG fputs("\n", stderr); #endif return u-utf8_string; } static void utf8_print(const unsigned char *input, size_t length, FILE *stream) { size_t i = 0; while(i < length && *input) { unsigned long c; int size = raptor_unicode_utf8_string_get_char(input, length - i, &c); if(size <= 0) return; if(i) fputc(' ', stream); fprintf(stream, "U+%04X", RAPTOR_GOOD_CAST(int, c)); input += size; i += size; } } int main (int argc, char *argv[]) { const char *program = raptor_basename(argv[0]); const char *filename; FILE *fh; int rc = 0; unsigned int line = 1; size_t max_c2_len = 0; size_t max_c4_len = 0; int passes = 0; int fails = 0; if(argc != 2) { fprintf(stderr, "USAGE %s [path to NormalizationTest.txt]\n" "Get it at http://unicode.org/Public/UNIDATA/NormalizationTest.txt\n", program); return 1; } filename = argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: file '%s' open failed - %s\n", program, filename, strerror(errno)); return 1; } #define LINE_BUFFER_SIZE 1024 /* FIXME big enough for Unicode 4 (c2 max 16; c4 max 33) */ #define UNISTR_SIZE 40 for(;!feof(fh); line++) { char buffer[LINE_BUFFER_SIZE]; char *p, *start; unsigned char column2[UNISTR_SIZE]; unsigned char column4[UNISTR_SIZE]; size_t column2_len, column4_len; int nfc_rc; int error; p = fgets(buffer, LINE_BUFFER_SIZE, fh); if(!p) { if(ferror(fh)) { fprintf(stderr, "%s: file '%s' read failed - %s\n", program, filename, strerror(errno)); rc = 1; break; } /* assume feof */ break; }; #if 0 fprintf(stderr, "%s:%d: line '%s'\n", program, line, buffer); #endif /* skip lines */ if(*p == '@' || *p == '#') continue; /* skip column 1 */ while(*p++ != ';') ; /* read column 2 into column2, column2_len */ start = p; /* find end column 2 */ while(*p++ != ';') ; column2_len = decode_to_utf8(column2, UNISTR_SIZE, start, p-2); if(column2_len > max_c2_len) max_c2_len = column2_len; #if 0 fprintf(stderr, "UTF8 column 2 (%ld bytes) is: '", column2_len); utf8_print(column2, column2_len, stderr); fputs("'\n", stderr); #endif /* skip column 3 */ while(*p++ != ';') ; /* read column 4 into column4, column4_len */ start = p; /* find end column 4 */ while(*p++ != ';') ; column4_len = decode_to_utf8(column4, UNISTR_SIZE, start, p-2); if(column4_len > max_c4_len) max_c4_len = column4_len; #if 0 fprintf(stderr, "UTF8 column 4 (%ld bytes) is: '", column4_len); utf8_print(column4, column4_len, stderr); fputs("'\n", stderr); #endif if(!raptor_unicode_check_utf8_string(column2, column2_len)) { fprintf(stderr, "%s:%d: UTF8 column 2 failed on: '", filename, line); utf8_print(column2, column2_len, stderr); fputs("'\n", stderr); fails++; } else passes++; /* Column 2 must be NFC */ nfc_rc = raptor_nfc_check(column2, column2_len, &error); if(!nfc_rc) { fprintf(stderr, "%s:%d: NFC column 2 failed on: '", filename, line); utf8_print(column2, column2_len, stderr); fprintf(stderr, "' at byte %d of %d\n", error, (int)column2_len); fails++; } else passes++; if(column2_len == column4_len && !memcmp(column2, column4, column2_len)) continue; if(!raptor_unicode_check_utf8_string(column4, column4_len)) { fprintf(stderr, "%s:%d: UTF8 column 4 failed on: '", filename, line); utf8_print(column4, column4_len, stderr); fputs("'\n", stderr); fails++; } else passes++; /* Column 4 must be in NFC */ nfc_rc = raptor_nfc_check(column4, column4_len, &error); if(!nfc_rc) { fprintf(stderr, "%s:%d: NFC column 4 failed on: '", filename, line); utf8_print(column4, column4_len, stderr); fprintf(stderr, "' at byte %d of %d\n", error, (int)column4_len); fails++; } else passes++; } fclose(fh); fprintf(stderr, "%s: max column 2 len: %d, max column 4 len: %d\n", program, (int)max_c2_len, (int)max_c4_len); fprintf(stderr, "%s: passes: %d fails: %d\n", program, passes, fails); return rc; } raptor2-2.0.15/src/raptor_serialize_json.c0000644000175000017500000003524012260330735015460 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_json.c - JSON serializers * * Copyright (C) 2008-2009, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Raptor JSON serializer object */ typedef struct { /* non-0 if json-r otherwise json-t */ int is_resource; int need_subject_comma; /* JSON writer object */ raptor_json_writer* json_writer; /* Ordered sequence of triples if is_resource */ raptor_avltree* avltree; /* Last statement generated if is_resource (shared pointer) */ raptor_statement* last_statement; int need_object_comma; } raptor_json_context; static int raptor_json_serialize_init(raptor_serializer* serializer, const char *name); static void raptor_json_serialize_terminate(raptor_serializer* serializer); static int raptor_json_serialize_start(raptor_serializer* serializer); static int raptor_json_serialize_statement(raptor_serializer* serializer, raptor_statement *statement); static int raptor_json_serialize_end(raptor_serializer* serializer); static void raptor_json_serialize_finish_factory(raptor_serializer_factory* factory); /* * raptor serializer JSON implementation */ /* create a new serializer */ static int raptor_json_serialize_init(raptor_serializer* serializer, const char *name) { raptor_json_context* context = (raptor_json_context*)serializer->context; context->is_resource=!strcmp(name,"json"); /* Default for JSON serializer is absolute URIs */ /* RAPTOR_OPTIONS_SET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS, 0); */ return 0; } /* destroy a serializer */ static void raptor_json_serialize_terminate(raptor_serializer* serializer) { raptor_json_context* context = (raptor_json_context*)serializer->context; if(context->json_writer) { raptor_free_json_writer(context->json_writer); context->json_writer = NULL; } if(context->avltree) { raptor_free_avltree(context->avltree); context->avltree = NULL; } } static int raptor_json_serialize_start(raptor_serializer* serializer) { raptor_json_context* context = (raptor_json_context*)serializer->context; raptor_uri* base_uri; char* value; base_uri = RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_RELATIVE_URIS) ? serializer->base_uri : NULL; context->json_writer = raptor_new_json_writer(serializer->world, base_uri, serializer->iostream); if(!context->json_writer) return 1; if(context->is_resource) { context->avltree = raptor_new_avltree((raptor_data_compare_handler)raptor_statement_compare, (raptor_data_free_handler)raptor_free_statement, 0); if(!context->avltree) { raptor_free_json_writer(context->json_writer); context->json_writer = NULL; return 1; } } /* start callback */ value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_JSON_CALLBACK); if(value) { raptor_iostream_string_write(value, serializer->iostream); raptor_iostream_write_byte('(', serializer->iostream); } if(!context->is_resource) { /* start outer object */ raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); /* start triples array */ raptor_iostream_counted_string_write((const unsigned char*)"\"triples\" : ", 12, serializer->iostream); raptor_json_writer_start_block(context->json_writer, '['); raptor_json_writer_newline(context->json_writer); } return 0; } static int raptor_json_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_json_context* context = (raptor_json_context*)serializer->context; if(context->is_resource) { raptor_statement* s = raptor_statement_copy(statement); if(!s) return 1; return raptor_avltree_add(context->avltree, s); } if(context->need_subject_comma) { raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); } /* start triple */ raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); /* subject */ raptor_iostream_string_write((const unsigned char*)"\"subject\" : ", serializer->iostream); raptor_json_writer_term(context->json_writer, statement->subject); raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); /* predicate */ raptor_iostream_string_write((const unsigned char*)"\"predicate\" : ", serializer->iostream); raptor_json_writer_term(context->json_writer, statement->predicate); raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); /* object */ raptor_iostream_string_write((const unsigned char*)"\"object\" : ", serializer->iostream); raptor_json_writer_term(context->json_writer, statement->object); raptor_json_writer_newline(context->json_writer); /* end triple */ raptor_json_writer_end_block(context->json_writer, '}'); context->need_subject_comma = 1; return 0; } /* return 0 to abort visit */ static int raptor_json_serialize_avltree_visit(int depth, void* data, void *user_data) { raptor_serializer* serializer = (raptor_serializer*)user_data; raptor_json_context* context = (raptor_json_context*)serializer->context; raptor_statement* statement = (raptor_statement*)data; raptor_statement* s1 = statement; raptor_statement* s2 = context->last_statement; int new_subject = 0; int new_predicate = 0; unsigned int flags = RAPTOR_ESCAPED_WRITE_JSON_LITERAL; if(s2) { new_subject = !raptor_term_equals(s1->subject, s2->subject); if(new_subject) { /* end last predicate */ raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, ']'); raptor_json_writer_newline(context->json_writer); /* end last statement */ raptor_json_writer_end_block(context->json_writer, '}'); raptor_json_writer_newline(context->json_writer); context->need_subject_comma = 1; context->need_object_comma = 0; } } else new_subject = 1; if(new_subject) { if(context->need_subject_comma) { raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); } /* start triple */ /* subject */ switch(s1->subject->type) { case RAPTOR_TERM_TYPE_URI: raptor_json_writer_key_uri_value(context->json_writer, NULL, 0, s1->subject->value.uri); break; case RAPTOR_TERM_TYPE_BLANK: raptor_iostream_counted_string_write("\"_:", 3, serializer->iostream); raptor_string_escaped_write(s1->subject->value.blank.string, 0, '"', flags, serializer->iostream); raptor_iostream_write_byte('"', serializer->iostream); break; case RAPTOR_TERM_TYPE_LITERAL: case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported subject term type %d", s1->subject->type); break; } raptor_iostream_counted_string_write(" : ", 3, serializer->iostream); raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); } /* predicate */ if(context->last_statement) { if(new_subject) new_predicate = 1; else { new_predicate = !raptor_uri_equals(s1->predicate->value.uri, s2->predicate->value.uri); if(new_predicate) { raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, ']'); raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); } } } else new_predicate = 1; if(new_predicate) { /* start predicate */ raptor_json_writer_key_uri_value(context->json_writer, NULL, 0, s1->predicate->value.uri); raptor_iostream_counted_string_write(" : ", 3, serializer->iostream); raptor_json_writer_start_block(context->json_writer, '['); raptor_iostream_write_byte(' ', serializer->iostream); context->need_object_comma = 0; } if(context->need_object_comma) { raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); } /* object */ raptor_json_writer_term(context->json_writer, s1->object); if(s1->object->type != RAPTOR_TERM_TYPE_LITERAL) raptor_json_writer_newline(context->json_writer); /* end triple */ context->need_object_comma = 1; context->last_statement = statement; return 1; } static int raptor_json_serialize_end(raptor_serializer* serializer) { raptor_json_context* context = (raptor_json_context*)serializer->context; char* value; raptor_json_writer_newline(context->json_writer); if(context->is_resource) { /* start outer object */ raptor_json_writer_start_block(context->json_writer, '{'); raptor_json_writer_newline(context->json_writer); raptor_avltree_visit(context->avltree, raptor_json_serialize_avltree_visit, serializer); /* end last triples block */ if(context->last_statement) { raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, ']'); raptor_json_writer_newline(context->json_writer); raptor_json_writer_end_block(context->json_writer, '}'); raptor_json_writer_newline(context->json_writer); } } else { /* end triples array */ raptor_json_writer_end_block(context->json_writer, ']'); raptor_json_writer_newline(context->json_writer); } value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_JSON_EXTRA_DATA); if(value) { raptor_iostream_write_byte(',', serializer->iostream); raptor_json_writer_newline(context->json_writer); raptor_iostream_string_write(value, serializer->iostream); raptor_json_writer_newline(context->json_writer); } /* end outer object */ raptor_json_writer_end_block(context->json_writer, '}'); raptor_json_writer_newline(context->json_writer); /* end callback */ if(RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_JSON_CALLBACK)) raptor_iostream_counted_string_write((const unsigned char*)");", 2, serializer->iostream); return 0; } static void raptor_json_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static const char* const json_triples_names[3] = { "json-triples", NULL}; #define JSON_TRIPLES_TYPES_COUNT 2 static const raptor_type_q json_triples_types[JSON_TRIPLES_TYPES_COUNT + 1] = { { "application/json", 16, 0}, { "text/json", 9, 1}, { NULL, 0, 0} }; static int raptor_json_triples_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = json_triples_names; factory->desc.mime_types = json_triples_types; factory->desc.label = "RDF/JSON Triples"; factory->desc.uri_strings = NULL; factory->context_length = sizeof(raptor_json_context); factory->init = raptor_json_serialize_init; factory->terminate = raptor_json_serialize_terminate; factory->declare_namespace = NULL; factory->declare_namespace_from_namespace = NULL; factory->serialize_start = raptor_json_serialize_start; factory->serialize_statement = raptor_json_serialize_statement; factory->serialize_end = raptor_json_serialize_end; factory->finish_factory = raptor_json_serialize_finish_factory; return 0; } static const char* const json_resource_names[2] = { "json", NULL}; static const char* const json_resource_uri_strings[2] = { "http://docs.api.talis.com/platform-api/output-types/rdf-json", NULL }; #define JSON_RESOURCE_TYPES_COUNT 2 static const raptor_type_q json_resource_types[JSON_RESOURCE_TYPES_COUNT + 1] = { { "application/json", 16, 10}, { "text/json", 9, 1}, { NULL, 0, 0} }; static int raptor_json_resource_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = json_resource_names; factory->desc.mime_types = json_resource_types; factory->desc.label = "RDF/JSON Resource-Centric"; factory->desc.uri_strings = json_resource_uri_strings; factory->context_length = sizeof(raptor_json_context); factory->init = raptor_json_serialize_init; factory->terminate = raptor_json_serialize_terminate; factory->declare_namespace = NULL; factory->declare_namespace_from_namespace = NULL; factory->serialize_start = raptor_json_serialize_start; factory->serialize_statement = raptor_json_serialize_statement; factory->serialize_end = raptor_json_serialize_end; factory->finish_factory = raptor_json_serialize_finish_factory; return 0; } int raptor_init_serializer_json(raptor_world* world) { int rc; rc = !raptor_serializer_register_factory(world, &raptor_json_triples_serializer_register_factory); if(rc) return rc; rc = !raptor_serializer_register_factory(world, &raptor_json_resource_serializer_register_factory); return rc; } raptor2-2.0.15/src/ssort.h0000644000175000017500000000262012354157602012230 00000000000000/* ** ssort() -- Fast, small, qsort()-compatible Shell sort ** ** by Ray Gardner, public domain 5/90 */ #include /** * ssort_r: * @base: base data * @nel: number of elements at @base * @width: width of an element * @comp: comparison function taking args (a, b, @arg) * @arg: user data (thunk) for the comparison function @comp * * Fast, small shell sort compatible to qsort_r() taking an extra thunk / user data arg. * * Sorts data at @base of @nel elements of width @width using * comparison function @comp that takes args (a, b, @arg). * * Return value: non-0 on failure * */ static int ssort_r(void* base, size_t nel, size_t width, raptor_data_compare_arg_handler comp, void* arg) { size_t wnel, gap, k; /* bad args */ if(!base || !width || !comp) return -1; /* nothing to do */ if(nel < 2) return 0; wnel = width * nel; for(gap = 0; ++gap < nel;) gap *= 3; while((gap /= 3) != 0) { size_t wgap = width * gap; size_t i; for(i = wgap; i < wnel; i += width) { size_t j = i; do { char* a; char* b; j -= wgap; a = j + (char *)base; b = a + wgap; if ((*comp)(a, b, arg) <= 0) break; k = width; do { char tmp = *a; *a++ = *b; *b++ = tmp; } while (--k); } while(j >= wgap); } } return 0; } raptor2-2.0.15/src/raptor_serialize_turtle.c0000644000175000017500000012473012425333224016030 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_turtle.c - Turtle serializer * * Copyright (C) 2006,2008 Dave Robillard * Copyright (C) 2004-2013 David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005 University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005 Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #define MAX_ASCII_INT_SIZE 13 /* * Raptor turtle serializer object */ typedef struct { raptor_namespace_stack *nstack; /* Namespace stack */ raptor_namespace *rdf_nspace; /* the rdf: namespace */ raptor_turtle_writer *turtle_writer; /* where the xml is being written */ raptor_sequence *namespaces; /* User declared namespaces */ raptor_avltree *subjects; /* subject items */ raptor_avltree *blanks; /* blank subject items */ raptor_avltree *nodes; /* nodes */ raptor_abbrev_node *rdf_type; /* rdf:type uri */ /* URI of rdf:XMLLiteral */ raptor_uri* rdf_xml_literal_uri; /* URI of rdf:first */ raptor_uri* rdf_first_uri; /* URI of rdf:rest */ raptor_uri* rdf_rest_uri; /* URI of rdf:nil */ raptor_uri* rdf_nil_uri; /* non zero if header is finished being written * (and thus no new namespaces can be declared). */ int written_header; /* for labeling namespaces */ int namespace_count; } raptor_turtle_context; /* prototypes for functions */ static int raptor_turtle_emit_resource(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_literal(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_blank(raptor_serializer *serializer, raptor_abbrev_node* node, int depth); static int raptor_turtle_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit_subject_collection_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit_subject_properties(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth); static int raptor_turtle_emit(raptor_serializer *serializer); static int raptor_turtle_serialize_init(raptor_serializer* serializer, const char *name); static void raptor_turtle_serialize_terminate(raptor_serializer* serializer); static int raptor_turtle_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix); static int raptor_turtle_serialize_start(raptor_serializer* serializer); static int raptor_turtle_serialize_statement(raptor_serializer* serializer, raptor_statement *statement); static int raptor_turtle_serialize_end(raptor_serializer* serializer); static void raptor_turtle_serialize_finish_factory(raptor_serializer_factory* factory); int raptor_turtle_is_legal_turtle_qname(raptor_qname* qname) { const char* prefix_name; const char* local_name; if(!qname) return 0; prefix_name = qname->nspace ? (const char*)qname->nspace->prefix : NULL; if(prefix_name) { /* prefixName: must have leading [A-Z][a-z][0-9] (nameStartChar - '_') */ /* prefixName: no . anywhere */ if(!(isalpha((int)*prefix_name) || isdigit((int)*prefix_name)) || strchr(prefix_name, '.')) return 0; } local_name = (const char*)qname->local_name; if(local_name) { /* nameStartChar: must have leading [A-Z][a-z][0-9]_ */ /* nameChar: no . anywhere */ if(!(isalpha((int)*local_name) || isdigit((int)*local_name) || *local_name == '_') || strchr(local_name, '.')) return 0; } return 1; } /* * raptor_turtle_emit_resource: * @serializer: #raptor_serializer object * @node: resource node * @depth: depth into tree * * Emit a description of a resource using an XML Element * * Return value: non-0 on failure **/ static int raptor_turtle_emit_resource(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; raptor_qname* qname = NULL; RAPTOR_DEBUG_ABBREV_NODE("Emitting resource node", node); if(node->term->type != RAPTOR_TERM_TYPE_URI) return 1; if(raptor_uri_equals(node->term->value.uri, context->rdf_nil_uri)) { raptor_turtle_writer_raw_counted(turtle_writer,(const unsigned char *)"( )", 3); return 0; } qname = raptor_new_qname_from_namespace_uri(context->nstack, node->term->value.uri, 10); /* XML Names allow leading '_' and '.' anywhere but Turtle does not */ if(qname && !raptor_turtle_is_legal_turtle_qname(qname)) { raptor_free_qname(qname); qname = NULL; } if(qname) { raptor_turtle_writer_qname(turtle_writer, qname); raptor_free_qname(qname); } else { raptor_turtle_writer_reference(turtle_writer, node->term->value.uri); } RAPTOR_DEBUG_ABBREV_NODE("Emitted", node); return 0; } /* * raptor_turtle_emit_literal: * @serializer: #raptor_serializer object * @node: literal node * @depth: depth into tree * * Emit a description of a literal (object). * * Return value: non-0 on failure **/ static int raptor_turtle_emit_literal(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; int rc = 0; RAPTOR_DEBUG_ABBREV_NODE("Emitting literal node", node); if(node->term->type != RAPTOR_TERM_TYPE_LITERAL) return 1; rc = raptor_turtle_writer_literal(turtle_writer, context->nstack, node->term->value.literal.string, node->term->value.literal.language, node->term->value.literal.datatype); RAPTOR_DEBUG_ABBREV_NODE("Emitted literal node", node); return rc; } /* * raptor_turtle_emit_blank: * @serializer: #raptor_serializer object * @node: blank node * @depth: depth into tree * * Emit a description of a blank node * * Return value: non-0 on failure **/ static int raptor_turtle_emit_blank(raptor_serializer *serializer, raptor_abbrev_node* node, int depth) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; int rc = 0; RAPTOR_DEBUG_ABBREV_NODE("Emitting blank node", node); if(node->term->type != RAPTOR_TERM_TYPE_BLANK) return 1; if((node->count_as_subject == 1 && node->count_as_object == 1)) { /* If this is only used as a 1 subject and object or never * used as a subject or never used as an object, it never need * be referenced with an explicit name */ raptor_abbrev_subject* blank; blank = raptor_abbrev_subject_find(context->blanks, node->term); if(blank) { rc = raptor_turtle_emit_subject(serializer, blank, depth+1); raptor_abbrev_subject_invalidate(blank); } } else { /* Blank node that needs an explicit name */ raptor_turtle_writer_bnodeid(context->turtle_writer, node->term->value.blank.string, node->term->value.blank.string_len); } RAPTOR_DEBUG_ABBREV_NODE("Emitted blank node", node); return rc; } /* * raptor_turtle_emit_subject_list_items: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit an rdf list of items (rdf:li) about a subject node. * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject_list_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { int rv = 0; int i = 0; RAPTOR_DEBUG_ABBREV_NODE("Emitting subject list items", subject->node); while(!rv && i < raptor_sequence_size(subject->list_items)) { raptor_abbrev_node* object; object = (raptor_abbrev_node*)raptor_sequence_get_at(subject->list_items, i++); if(!object) continue; switch(object->term->type) { case RAPTOR_TERM_TYPE_URI: rv = raptor_turtle_emit_resource(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_LITERAL: rv = raptor_turtle_emit_literal(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_BLANK: rv = raptor_turtle_emit_blank(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", object->term->type); break; } } return rv; } /* * raptor_turtle_emit_subject_collection_items: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit an abbreviated rdf collection of items (rdf:first, rdf:rest) about a subject node. * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject_collection_items(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; int rv = 0; raptor_avltree_iterator* iter = NULL; int i; int is_new_subject = 0; RAPTOR_DEBUG_ABBREV_NODE("Emitting subject collection items", subject->node); /* if just saw a new subject (is_new_subject is true) then there is no need * to advance the iterator - it was just reset */ for(i = 0, (iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1)); iter && !rv; i++, (rv = is_new_subject ? 0 : raptor_avltree_iterator_next(iter))) { raptor_abbrev_node** nodes; raptor_abbrev_node* predicate; raptor_abbrev_node* object; is_new_subject = 0; nodes = (raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; predicate= nodes[0]; object= nodes[1]; if(!raptor_uri_equals(predicate->term->value.uri, context->rdf_first_uri)) { raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Malformed collection - first predicate is not rdf:first"); raptor_free_avltree_iterator(iter); return 1; } if(!object) continue; if(i > 0) raptor_turtle_writer_newline(context->turtle_writer); switch(object->term->type) { case RAPTOR_TERM_TYPE_URI: rv = raptor_turtle_emit_resource(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_LITERAL: rv = raptor_turtle_emit_literal(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_BLANK: rv = raptor_turtle_emit_blank(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", object->term->type); break; } /* Return error if emitting something failed above */ if(rv) { raptor_free_avltree_iterator(iter); return rv; } /* last item */ rv = raptor_avltree_iterator_next(iter); if(rv) break; nodes = (raptor_abbrev_node**)raptor_avltree_iterator_get(iter); predicate = nodes[0]; object = nodes[1]; if(!raptor_uri_equals(predicate->term->value.uri, context->rdf_rest_uri)) { raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Malformed collection - second predicate is not rdf:rest"); raptor_free_avltree_iterator(iter); return 1; } if(object->term->type == RAPTOR_TERM_TYPE_BLANK) { subject = raptor_abbrev_subject_find(context->blanks, object->term); if(!subject) { raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Malformed collection - could not find subject for rdf:rest"); raptor_free_avltree_iterator(iter); return 1; } /* got a <(old)subject> rdf:rest <(new)subject> triple so know * subject has changed and should reset the properties iterator */ if(iter) raptor_free_avltree_iterator(iter); iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); is_new_subject = 1; } else { if(object->term->type != RAPTOR_TERM_TYPE_URI || !raptor_uri_equals(object->term->value.uri, context->rdf_nil_uri)) { raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Malformed collection - last rdf:rest resource is not rdf:nil"); raptor_free_avltree_iterator(iter); return 1; } break; } } if(iter) raptor_free_avltree_iterator(iter); return rv; } /* * raptor_turtle_emit_subject_properties: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit the properties about a subject node. * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject_properties(raptor_serializer* serializer, raptor_abbrev_subject* subject, int depth) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_turtle_writer *turtle_writer = context->turtle_writer; raptor_abbrev_node* last_predicate = NULL; int rv = 0; raptor_avltree_iterator* iter = NULL; int i; RAPTOR_DEBUG_ABBREV_NODE("Emitting subject properties", subject->node); /* Emit any rdf:_n properties collected */ if(raptor_sequence_size(subject->list_items) > 0) rv = raptor_turtle_emit_subject_list_items(serializer, subject, depth+1); for(i = 0, (iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1)); iter && !rv; i++, (rv = raptor_avltree_iterator_next(iter))) { raptor_abbrev_node** nodes; raptor_abbrev_node* predicate; raptor_abbrev_node* object; raptor_qname *qname; nodes = (raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; predicate= nodes[0]; object= nodes[1]; if(!(last_predicate && raptor_abbrev_node_equals(predicate, last_predicate))) { /* no object list abbreviation possible, terminate last object */ if(last_predicate) { raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" ;", 2); raptor_turtle_writer_newline(turtle_writer); } qname = raptor_new_qname_from_namespace_uri(context->nstack, predicate->term->value.uri, 10); if(raptor_abbrev_node_equals(predicate, context->rdf_type)) raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)"a", 1); else if(qname) raptor_turtle_writer_qname(turtle_writer, qname); else raptor_turtle_writer_reference(turtle_writer, predicate->term->value.uri); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" ", 1); if(qname) raptor_free_qname(qname); } else raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)", ", 2); switch(object->term->type) { case RAPTOR_TERM_TYPE_URI: rv = raptor_turtle_emit_resource(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_LITERAL: rv = raptor_turtle_emit_literal(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_BLANK: rv = raptor_turtle_emit_blank(serializer, object, depth+1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", object->term->type); break; } /* Return error if emitting something failed above */ if(rv) return rv; last_predicate = predicate; } if(iter) raptor_free_avltree_iterator(iter); return rv; } /* * raptor_turtle_emit_subject: * @serializer: #raptor_serializer object * @subject: subject node * @depth: depth into tree * * Emit a subject node * * Return value: non-0 on failure **/ static int raptor_turtle_emit_subject(raptor_serializer *serializer, raptor_abbrev_subject* subject, int depth) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_turtle_writer* turtle_writer = context->turtle_writer; int blank = 1; int collection = 0; int rc = 0; if(!raptor_abbrev_subject_valid(subject)) return 0; RAPTOR_DEBUG_ABBREV_NODE("Emitting subject node", subject->node); if(!depth && subject->node->term->type == RAPTOR_TERM_TYPE_BLANK && subject->node->count_as_subject == 1 && subject->node->count_as_object == 1) { RAPTOR_DEBUG_ABBREV_NODE("Skipping subject node - subj & obj count 1", subject->node); return 0; } if(raptor_avltree_size(subject->properties) == 0) { RAPTOR_DEBUG_ABBREV_NODE("Skipping subject node - no props", subject->node); return 0; } /* check if we can do collection abbreviation */ if(raptor_avltree_size(subject->properties) >= 2) { raptor_avltree_iterator* iter = NULL; raptor_abbrev_node* pred1; raptor_abbrev_node* pred2; iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); if(!iter) return 1; pred1 = ((raptor_abbrev_node**)raptor_avltree_iterator_get(iter))[0]; if(raptor_avltree_iterator_next(iter)) { raptor_free_avltree_iterator(iter); return 1; } pred2 = ((raptor_abbrev_node**)raptor_avltree_iterator_get(iter))[0]; raptor_free_avltree_iterator(iter); if(pred1->term->type == RAPTOR_TERM_TYPE_URI && pred2->term->type == RAPTOR_TERM_TYPE_URI && ( (raptor_uri_equals(pred1->term->value.uri, context->rdf_first_uri) && raptor_uri_equals(pred2->term->value.uri, context->rdf_rest_uri)) || (raptor_uri_equals(pred2->term->value.uri, context->rdf_first_uri) && raptor_uri_equals(pred1->term->value.uri, context->rdf_rest_uri)) ) ) { collection = 1; } } /* emit the subject node */ if(subject->node->term->type == RAPTOR_TERM_TYPE_URI) { rc= raptor_turtle_emit_resource(serializer, subject->node, depth+1); if(rc) return rc; blank = 0; collection = 0; } else if(subject->node->term->type == RAPTOR_TERM_TYPE_BLANK) { if((subject->node->count_as_subject == 1 && subject->node->count_as_object == 0) && depth > 1) { blank = 1; } else if(subject->node->count_as_object == 0) { raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)"[]", 2); blank = 0; } else if(!collection && subject->node->count_as_object > 1) { /* Referred to (used as an object), so needs a nodeID */ raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)"_:", 2); raptor_turtle_writer_raw_counted(turtle_writer, subject->node->term->value.blank.string, subject->node->term->value.blank.string_len); } } if(collection) { raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)"(", 1); raptor_turtle_writer_increase_indent(turtle_writer); rc = raptor_turtle_emit_subject_collection_items(serializer, subject, depth+1); raptor_turtle_writer_decrease_indent(turtle_writer); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)")", 1); } else { if(blank && depth > 1) raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)"[", 1); raptor_turtle_writer_increase_indent(turtle_writer); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_emit_subject_properties(serializer, subject, depth+1); raptor_turtle_writer_decrease_indent(turtle_writer); if(blank && depth > 1) { raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)"]", 1); } } if(depth == 0) { /* NOTE: the space before the . here MUST be there or statements * that end in a numeric literal will be interpreted incorrectly * (the "." will be parsed as part of the literal and statement * left unterminated) */ raptor_turtle_writer_raw_counted(turtle_writer, (const unsigned char*)" .", 2); raptor_turtle_writer_newline(turtle_writer); raptor_turtle_writer_newline(turtle_writer); } return rc; } /* * raptor_turtle_emit: * @serializer: #raptor_serializer object * * Emit Turtle for all stored triples. * * Return value: non-0 on failure **/ static int raptor_turtle_emit(raptor_serializer *serializer) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_abbrev_subject* subject; raptor_abbrev_subject* blank; int rc; raptor_avltree_iterator* iter = NULL; iter = raptor_new_avltree_iterator(context->subjects, NULL, NULL, 1); while(iter) { subject = (raptor_abbrev_subject *)raptor_avltree_iterator_get(iter); if(subject) { rc = raptor_turtle_emit_subject(serializer, subject, 0); if(rc) { raptor_free_avltree_iterator(iter); return rc; } } if(raptor_avltree_iterator_next(iter)) break; } if(iter) raptor_free_avltree_iterator(iter); /* Emit any remaining blank nodes. */ iter = raptor_new_avltree_iterator(context->blanks, NULL, NULL, 1); while(iter) { blank = (raptor_abbrev_subject *)raptor_avltree_iterator_get(iter); if(blank) { rc = raptor_turtle_emit_subject(serializer, blank, 0); if(rc) { raptor_free_avltree_iterator(iter); return rc; } } if(raptor_avltree_iterator_next(iter)) break; } if(iter) raptor_free_avltree_iterator(iter); return 0; } /* * raptor serializer Turtle implementation */ /* create a new serializer */ static int raptor_turtle_serialize_init(raptor_serializer* serializer, const char *name) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_uri *rdf_type_uri; context->nstack = raptor_new_namespaces(serializer->world, 1); if(!context->nstack) return 1; context->rdf_nspace = raptor_new_namespace(context->nstack, (const unsigned char*)"rdf", (const unsigned char*)raptor_rdf_namespace_uri, 0); context->namespaces = raptor_new_sequence(NULL, NULL); context->subjects = raptor_new_avltree((raptor_data_compare_handler)raptor_abbrev_subject_compare, (raptor_data_free_handler)raptor_free_abbrev_subject, 0); context->blanks = raptor_new_avltree((raptor_data_compare_handler)raptor_abbrev_subject_compare, (raptor_data_free_handler)raptor_free_abbrev_subject, 0); context->nodes = raptor_new_avltree((raptor_data_compare_handler)raptor_abbrev_node_compare, (raptor_data_free_handler)raptor_free_abbrev_node, 0); rdf_type_uri = raptor_new_uri_for_rdf_concept(serializer->world, (const unsigned char*)"type"); if(rdf_type_uri) { raptor_term* uri_term; uri_term = raptor_new_term_from_uri(serializer->world, rdf_type_uri); raptor_free_uri(rdf_type_uri); context->rdf_type = raptor_new_abbrev_node(serializer->world, uri_term); raptor_free_term(uri_term); } else context->rdf_type = NULL; context->rdf_xml_literal_uri = raptor_new_uri(serializer->world, raptor_xml_literal_datatype_uri_string); context->rdf_first_uri = raptor_new_uri(serializer->world, (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#first"); context->rdf_rest_uri = raptor_new_uri(serializer->world, (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"); context->rdf_nil_uri = raptor_new_uri(serializer->world, (const unsigned char*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); if(!context->rdf_nspace || !context->namespaces || !context->subjects || !context->blanks || !context->nodes || !context->rdf_xml_literal_uri || !context->rdf_first_uri || !context->rdf_rest_uri || !context->rdf_nil_uri || !context->rdf_type) { raptor_turtle_serialize_terminate(serializer); return 1; } /* Note: item 0 in the list is rdf:RDF's namespace */ if(raptor_sequence_push(context->namespaces, context->rdf_nspace)) { raptor_turtle_serialize_terminate(serializer); return 1; } return 0; } /* destroy a serializer */ static void raptor_turtle_serialize_terminate(raptor_serializer* serializer) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; if(context->turtle_writer) { raptor_free_turtle_writer(context->turtle_writer); context->turtle_writer = NULL; } if(context->rdf_nspace) { raptor_free_namespace(context->rdf_nspace); context->rdf_nspace = NULL; } if(context->namespaces) { int i; /* Note: item 0 in the list is rdf:RDF's namespace and freed above */ for(i = 1; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns =(raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); if(ns) raptor_free_namespace(ns); } raptor_free_sequence(context->namespaces); context->namespaces = NULL; } if(context->subjects) { raptor_free_avltree(context->subjects); context->subjects = NULL; } if(context->blanks) { raptor_free_avltree(context->blanks); context->blanks = NULL; } if(context->nodes) { raptor_free_avltree(context->nodes); context->nodes = NULL; } if(context->nstack) { raptor_free_namespaces(context->nstack); context->nstack = NULL; } if(context->rdf_type) { raptor_free_abbrev_node(context->rdf_type); context->rdf_type = NULL; } if(context->rdf_xml_literal_uri) { raptor_free_uri(context->rdf_xml_literal_uri); context->rdf_xml_literal_uri = NULL; } if(context->rdf_first_uri) { raptor_free_uri(context->rdf_first_uri); context->rdf_first_uri = NULL; } if(context->rdf_rest_uri) { raptor_free_uri(context->rdf_rest_uri); context->rdf_rest_uri = NULL; } if(context->rdf_nil_uri) { raptor_free_uri(context->rdf_nil_uri); context->rdf_nil_uri = NULL; } } #define TURTLE_NAMESPACE_DEPTH 0 /* add a namespace */ static int raptor_turtle_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; int i; if(context->written_header) return 1; for(i = 0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals(ns->uri, nspace->uri)) return 1; } nspace = raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, TURTLE_NAMESPACE_DEPTH); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_turtle_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_namespace *ns; int rc; ns = raptor_new_namespace_from_uri(context->nstack, prefix, uri, TURTLE_NAMESPACE_DEPTH); rc = raptor_turtle_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* start a serialize */ static int raptor_turtle_serialize_start(raptor_serializer* serializer) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_turtle_writer* turtle_writer; int flag; if(context->turtle_writer) raptor_free_turtle_writer(context->turtle_writer); flag = RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_WRITE_BASE_URI); turtle_writer = raptor_new_turtle_writer(serializer->world, serializer->base_uri, flag, context->nstack, serializer->iostream); if(!turtle_writer) return 1; raptor_turtle_writer_set_option(turtle_writer, RAPTOR_OPTION_WRITER_AUTO_INDENT, 1); raptor_turtle_writer_set_option(turtle_writer, RAPTOR_OPTION_WRITER_INDENT_WIDTH, 2); context->turtle_writer = turtle_writer; return 0; } static void raptor_turtle_ensure_writen_header(raptor_serializer* serializer, raptor_turtle_context* context) { int i; if(context->written_header) return; if(!context->turtle_writer) return; for(i = 0; i< raptor_sequence_size(context->namespaces); i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); raptor_turtle_writer_namespace_prefix(context->turtle_writer, ns); raptor_namespace_stack_start_namespace(context->nstack, ns, 0); } raptor_turtle_writer_newline(context->turtle_writer); context->written_header = 1; } /* serialize a statement */ static int raptor_turtle_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_abbrev_subject* subject = NULL; raptor_abbrev_node* predicate = NULL; raptor_abbrev_node* object = NULL; int rv; raptor_term_type object_type; if(!(statement->subject->type == RAPTOR_TERM_TYPE_URI || statement->subject->type == RAPTOR_TERM_TYPE_BLANK)) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Do not know how to serialize node type %d", statement->subject->type); return 1; } subject = raptor_abbrev_subject_lookup(context->nodes, context->subjects, context->blanks, statement->subject); if(!subject) { return 1; } object_type = statement->object->type; if(!(object_type == RAPTOR_TERM_TYPE_URI || object_type == RAPTOR_TERM_TYPE_BLANK || object_type == RAPTOR_TERM_TYPE_LITERAL)) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Cannot serialize a triple with object node type %d", object_type); return 1; } object = raptor_abbrev_node_lookup(context->nodes, statement->object); if(!object) return 1; if(statement->predicate->type == RAPTOR_TERM_TYPE_URI) { predicate = raptor_abbrev_node_lookup(context->nodes, statement->predicate); if(!predicate) return 1; rv = raptor_abbrev_subject_add_property(subject, predicate, object); if(rv < 0) { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Unable to add properties to subject %p", subject); return rv; } } else { raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Do not know how to serialize node type %d", statement->predicate->type); return 1; } if(object_type == RAPTOR_TERM_TYPE_URI || object_type == RAPTOR_TERM_TYPE_BLANK) object->count_as_object++; return 0; } /* end a serialize */ static int raptor_turtle_serialize_end(raptor_serializer* serializer) { raptor_turtle_context* context = (raptor_turtle_context*)serializer->context; raptor_turtle_ensure_writen_header(serializer, context); raptor_turtle_emit(serializer); /* reset serializer for reuse */ context->written_header = 0; return 0; } /* finish the serializer factory */ static void raptor_turtle_serialize_finish_factory(raptor_serializer_factory* factory) { /* NOP */ } static const char* const turtle_names[2] = { "turtle", NULL}; static const char* const turtle_uri_strings[3] = { "http://www.w3.org/ns/formats/Turtle", "http://www.dajobe.org/2004/01/turtle/", NULL }; #define TURTLE_TYPES_COUNT 6 static const raptor_type_q turtle_types[TURTLE_TYPES_COUNT + 1] = { { "text/turtle", 11, 10}, { "application/turtle", 18, 10}, { "application/x-turtle", 20, 8}, { "text/n3", 7, 3}, { "text/rdf+n3", 11, 3}, { "application/rdf+n3", 18, 3}, { NULL, 0, 0} }; static int raptor_turtle_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = turtle_names; factory->desc.mime_types = turtle_types; factory->desc.label = "Turtle Terse RDF Triple Language"; factory->desc.uri_strings = turtle_uri_strings; factory->context_length = sizeof(raptor_turtle_context); factory->init = raptor_turtle_serialize_init; factory->terminate = raptor_turtle_serialize_terminate; factory->declare_namespace = raptor_turtle_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_turtle_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_turtle_serialize_start; factory->serialize_statement = raptor_turtle_serialize_statement; factory->serialize_end = raptor_turtle_serialize_end; factory->finish_factory = raptor_turtle_serialize_finish_factory; return 0; } int raptor_init_serializer_turtle(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_turtle_serializer_register_factory); } /** * raptor_uri_turtle_write: * @world: world * @iostr: iostream for writing * @uri: uri * @nstack: namespace stack * @base_uri: base URI * * Write #raptor_uri to a stream in turtle syntax (using QNames). * * Note: This creates and destroys several internal objects for each * call so for more efficient writing, create a turtle serializer. * * Return value: non-0 on failure */ int raptor_uri_turtle_write(raptor_world *world, raptor_iostream* iostr, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri) { int rc; raptor_turtle_writer* turtle_writer; turtle_writer = raptor_new_turtle_writer(world, base_uri, 0, nstack, iostr); if(!turtle_writer) return 1; rc = raptor_turtle_writer_uri(turtle_writer, uri); raptor_free_turtle_writer(turtle_writer); return rc; } /** * raptor_term_turtle_write: * @iostr: iostream for writing * @term: term * @nstack: namespace stack * @base_uri: base URI * * Write #raptor_term to a stream in turtle syntax (using QNames). * * Note: This creates and destroys several internal objects for each * call so for more efficient writing, create a turtle serializer. * * Return value: non-0 on failure */ int raptor_term_turtle_write(raptor_iostream* iostr, raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri) { int rc; raptor_turtle_writer* turtle_writer; turtle_writer = raptor_new_turtle_writer(term->world, base_uri, 0, nstack, iostr); if(!turtle_writer) return 1; rc = raptor_turtle_writer_term(turtle_writer, term); raptor_free_turtle_writer(turtle_writer); return rc; } /** * raptor_uri_to_turtle_counted_string: * @world: world * @uri: uri * @nstack: namespace stack * @base_uri: base URI * @len_p: Pointer to location to store length of new string (if not NULL) * * Convert #raptor_uri to a string. * Caller has responsibility to free the string. * * Note: This creates and destroys several internal objects for each * call so for more efficient writing, create a turtle serializer. * * Return value: the new string or NULL on failure. The length of * the new string is returned in *@len_p if len_p is not NULL. */ unsigned char* raptor_uri_to_turtle_counted_string(raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p) { int rc = 1; raptor_iostream* iostr; unsigned char *s = NULL; raptor_turtle_writer* turtle_writer; iostr = raptor_new_iostream_to_string(world, (void**)&s, len_p, malloc); if(!iostr) return NULL; turtle_writer = raptor_new_turtle_writer(world, base_uri, 0, nstack, iostr); if(!turtle_writer) goto tidy; rc = raptor_turtle_writer_uri(turtle_writer, uri); raptor_free_turtle_writer(turtle_writer); tidy: raptor_free_iostream(iostr); if(rc) { free(s); s = NULL; } return s; } /** * raptor_uri_to_turtle_string: * @world: world * @uri: uri * @nstack: namespace stack * @base_uri: base URI * * Convert #raptor_uri to a string. * Caller has responsibility to free the string. * * Note: This creates and destroys several internal objects for each * call so for more efficient writing, create a turtle serializer. * * Return value: the new string or NULL on failure. */ unsigned char* raptor_uri_to_turtle_string(raptor_world *world, raptor_uri* uri, raptor_namespace_stack *nstack, raptor_uri *base_uri) { return raptor_uri_to_turtle_counted_string(world, uri, nstack, base_uri, NULL); } /** * raptor_term_to_turtle_counted_string: * @term: term * @nstack: namespace stack * @base_uri: base URI * @len_p: Pointer to location to store length of new string (if not NULL) * * Convert #raptor_term to a string. * Caller has responsibility to free the string. * * Note: This creates and destroys several internal objects for each * call so for more efficient writing, create a turtle serializer. * * See also raptor_term_to_counted_string() which writes in simpler * N-Triples with no Turtle abbreviated forms, and is quicker. * * Return value: the new string or NULL on failure. The length of * the new string is returned in *@len_p if len_p is not NULL. */ unsigned char* raptor_term_to_turtle_counted_string(raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri, size_t *len_p) { int rc; raptor_iostream* iostr; unsigned char *s; iostr = raptor_new_iostream_to_string(term->world, (void**)&s, len_p, malloc); if(!iostr) return NULL; rc = raptor_term_turtle_write(iostr, term, nstack, base_uri); raptor_free_iostream(iostr); if(rc) { free(s); s = NULL; } return s; } /** * raptor_term_to_turtle_string: * @term: term * @nstack: namespace stack * @base_uri: base URI * * Convert #raptor_term to a string. * Caller has responsibility to free the string. * * See also raptor_term_to_counted_string() which writes in simpler * N-Triples with no Turtle abbreviated forms, and is quicker. * * Return value: the new string or NULL on failure. */ unsigned char* raptor_term_to_turtle_string(raptor_term* term, raptor_namespace_stack *nstack, raptor_uri *base_uri) { return raptor_term_to_turtle_counted_string(term, nstack, base_uri, NULL); } raptor2-2.0.15/src/raptor_serialize_dot.c0000644000175000017500000004674712020170223015277 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_dot.c - Serialize RDF graph to GraphViz DOT format * * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Raptor dot serializer object */ typedef struct { raptor_namespace_stack *nstack; raptor_sequence *namespaces; raptor_sequence *resources; raptor_sequence *literals; raptor_sequence *bnodes; } raptor_dot_context; /* add a namespace */ static int raptor_dot_serializer_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_dot_context * context = (raptor_dot_context *)serializer->context; int i; for(i = 0 ; i < raptor_sequence_size(context->namespaces) ; i++ ) { raptor_namespace * ns; ns = (raptor_namespace *)raptor_sequence_get_at(context->namespaces, i); /* If prefix is already declared, ignore it */ if((!ns->prefix && !nspace->prefix) || (ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) || (ns->uri && nspace->uri && raptor_uri_equals(ns->uri, nspace->uri)) ) return 1; } nspace = raptor_new_namespace_from_uri(context->nstack, nspace->prefix, nspace->uri, 0); if(!nspace) return 1; raptor_sequence_push(context->namespaces, nspace); return 0; } /* add a namespace */ static int raptor_dot_serializer_declare_namespace(raptor_serializer* serializer, raptor_uri* uri, const unsigned char *prefix) { raptor_dot_context * context = (raptor_dot_context *)serializer->context; raptor_namespace *ns; int rc; ns = raptor_new_namespace_from_uri(context->nstack, prefix, uri, 0); rc = raptor_dot_serializer_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /* create a new serializer */ static int raptor_dot_serializer_init(raptor_serializer *serializer, const char *name) { raptor_dot_context * context = (raptor_dot_context *)serializer->context; /* Setup namespace handling */ context->nstack = raptor_new_namespaces(serializer->world, 1); context->namespaces = raptor_new_sequence((raptor_data_free_handler)raptor_free_namespace, NULL); /* We keep a list of nodes to avoid duplication (which isn't * critical in graphviz, but why bloat the file?) */ context->resources = raptor_new_sequence((raptor_data_free_handler)raptor_free_term, NULL); context->literals = raptor_new_sequence((raptor_data_free_handler)raptor_free_term, NULL); context->bnodes = raptor_new_sequence((raptor_data_free_handler)raptor_free_term, NULL); return 0; } /** * raptor_dot_iostream_write_string: * @iostr: #raptor_iostream to write to * @string: UTF-8 string to write * @len: length of UTF-8 string * or \0 for no escaping. * * Write an UTF-8 string, escaped for graphviz. * * Return value: non-0 on failure. **/ static int raptor_dot_iostream_write_string(raptor_iostream *iostr, const unsigned char *string) { unsigned char c; for( ; (c = *string) ; string++ ) { if( (c == '\\') || (c == '"') || (c == '|') || (c == '{') || (c == '}') ) { raptor_iostream_write_byte('\\', iostr); raptor_iostream_write_byte(c, iostr); } else if( c == '\n' ) { raptor_iostream_write_byte('\\', iostr); raptor_iostream_write_byte('n', iostr); } else raptor_iostream_write_byte(c, iostr); } return 0; } static void raptor_dot_serializer_write_term_type(raptor_serializer * serializer, raptor_term_type type) { switch(type) { case RAPTOR_TERM_TYPE_LITERAL: raptor_iostream_write_byte('L', serializer->iostream); break; case RAPTOR_TERM_TYPE_BLANK: raptor_iostream_write_byte('B', serializer->iostream); break; case RAPTOR_TERM_TYPE_URI: raptor_iostream_write_byte('R', serializer->iostream); break; case RAPTOR_TERM_TYPE_UNKNOWN: raptor_iostream_write_byte('?', serializer->iostream); break; } } static void raptor_dot_serializer_write_uri(raptor_serializer* serializer, raptor_uri* uri) { raptor_dot_context* context = (raptor_dot_context*)serializer->context; unsigned char* full = raptor_uri_as_string(uri); int i; for(i = 0 ; i < raptor_sequence_size(context->namespaces) ; i++ ) { raptor_namespace* ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); const unsigned char* ns_uri_string; size_t ns_uri_string_len; ns_uri_string = raptor_uri_as_counted_string(ns->uri, &ns_uri_string_len); if(!strncmp((char*)full, (char*)ns_uri_string, ns_uri_string_len) ) { const unsigned char* prefix = raptor_namespace_get_prefix(ns); if(prefix) { raptor_iostream_string_write(prefix, serializer->iostream); raptor_iostream_write_byte(':', serializer->iostream); } raptor_iostream_string_write(full + ns_uri_string_len, serializer->iostream); return; } } raptor_iostream_string_write(full, serializer->iostream); } static void raptor_dot_serializer_write_term(raptor_serializer * serializer, raptor_term* term) { switch(term->type) { case RAPTOR_TERM_TYPE_LITERAL: raptor_dot_iostream_write_string(serializer->iostream, term->value.literal.string); if(term->value.literal.language) { raptor_iostream_write_byte('|', serializer->iostream); raptor_iostream_string_write("Language: ", serializer->iostream); raptor_iostream_string_write(term->value.literal.language, serializer->iostream); } if(term->value.literal.datatype) { raptor_iostream_write_byte('|', serializer->iostream); raptor_iostream_string_write("Datatype: ", serializer->iostream); raptor_dot_serializer_write_uri(serializer, term->value.literal.datatype); } break; case RAPTOR_TERM_TYPE_BLANK: raptor_iostream_counted_string_write("_:", 2, serializer->iostream); raptor_iostream_string_write(term->value.blank.string, serializer->iostream); break; case RAPTOR_TERM_TYPE_URI: raptor_dot_serializer_write_uri(serializer, term->value.uri); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", term->type); } } /* Check the list to see if the node is a duplicate. If not, add it * to the list. */ static void raptor_dot_serializer_assert_node(raptor_serializer* serializer, raptor_term* assert_node) { raptor_dot_context* context = (raptor_dot_context*)serializer->context; raptor_sequence* seq = NULL; int i; /* Which list are we searching? */ switch(assert_node->type) { case RAPTOR_TERM_TYPE_URI: seq = context->resources; break; case RAPTOR_TERM_TYPE_BLANK: seq = context->bnodes; break; case RAPTOR_TERM_TYPE_LITERAL: seq = context->literals; break; case RAPTOR_TERM_TYPE_UNKNOWN: break; } for(i = 0 ; i < raptor_sequence_size(seq) ; i++ ) { raptor_term* node = (raptor_term*)raptor_sequence_get_at(seq, i); if(raptor_term_equals(node, assert_node)) return; } raptor_sequence_push(seq, raptor_term_copy(assert_node)); } /* start a serialize */ static int raptor_dot_serializer_start(raptor_serializer* serializer) { raptor_iostream_string_write((const unsigned char*)"digraph {\n\trankdir = LR;\n\tcharset=\"utf-8\";\n\n", serializer->iostream); return 0; } static int raptor_dot_serializer_write_colors(raptor_serializer* serializer, raptor_term_type type) { char* value; switch(type) { case RAPTOR_TERM_TYPE_URI: value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_RESOURCE_BORDER); if(value) { raptor_iostream_string_write((const unsigned char*)", color=", serializer->iostream); raptor_iostream_string_write((const unsigned char*)value, serializer->iostream); } else raptor_iostream_string_write((const unsigned char*)", color = blue", serializer->iostream); value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_RESOURCE_FILL); if(value) { raptor_iostream_string_write((const unsigned char*)", style = filled, fillcolor=", serializer->iostream); raptor_iostream_string_write((const unsigned char*)value, serializer->iostream); } break; case RAPTOR_TERM_TYPE_BLANK: value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_BNODE_BORDER); if(value) { raptor_iostream_string_write((const unsigned char*)", color=", serializer->iostream); raptor_iostream_string_write((const unsigned char*)value, serializer->iostream); } else raptor_iostream_string_write((const unsigned char*)", color = green", serializer->iostream); value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_BNODE_FILL); if(value) { raptor_iostream_string_write((const unsigned char*)", style = filled, fillcolor=", serializer->iostream); raptor_iostream_string_write((const unsigned char*)value, serializer->iostream); } break; case RAPTOR_TERM_TYPE_LITERAL: value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_LITERAL_BORDER); if(value) { raptor_iostream_string_write((const unsigned char*)", color=", serializer->iostream); raptor_iostream_string_write((const unsigned char*)value, serializer->iostream); } value = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_LITERAL_FILL); if(value) { raptor_iostream_string_write((const unsigned char*)", style = filled, fillcolor=", serializer->iostream); raptor_iostream_string_write((const unsigned char*)value, serializer->iostream); } break; case RAPTOR_TERM_TYPE_UNKNOWN: default: break; } return 0; } /* end a serialize */ static int raptor_dot_serializer_end(raptor_serializer* serializer) { raptor_dot_context* context = (raptor_dot_context*)serializer->context; raptor_term* node; int i; /* Print our nodes. */ raptor_iostream_string_write((const unsigned char*)"\n\t// Resources\n", serializer->iostream); for(i = 0 ; i < raptor_sequence_size(context->resources) ; i++ ) { node = (raptor_term*)raptor_sequence_get_at(context->resources, i); raptor_iostream_string_write((const unsigned char*)"\t\"R", serializer->iostream); raptor_dot_serializer_write_term(serializer, node); raptor_iostream_string_write((const unsigned char*)"\" [ label=\"", serializer->iostream); raptor_dot_serializer_write_term(serializer, node); raptor_iostream_string_write((const unsigned char*)"\", shape = ellipse", serializer->iostream); raptor_dot_serializer_write_colors(serializer, RAPTOR_TERM_TYPE_URI); raptor_iostream_string_write((const unsigned char*)" ];\n", serializer->iostream); } raptor_free_sequence(context->resources); raptor_iostream_string_write((const unsigned char*)"\n\t// Anonymous nodes\n", serializer->iostream); for(i = 0 ; i < raptor_sequence_size(context->bnodes) ; i++ ) { node = (raptor_term *)raptor_sequence_get_at(context->bnodes, i); raptor_iostream_string_write((const unsigned char*)"\t\"B", serializer->iostream); raptor_dot_serializer_write_term(serializer, node); raptor_iostream_string_write((const unsigned char*)"\" [ label=\"", serializer->iostream); raptor_iostream_string_write((const unsigned char*)"\", shape = circle", serializer->iostream); raptor_dot_serializer_write_colors(serializer, RAPTOR_TERM_TYPE_BLANK); raptor_iostream_string_write((const unsigned char*)" ];\n", serializer->iostream); } raptor_free_sequence(context->bnodes); raptor_iostream_string_write((const unsigned char*)"\n\t// Literals\n", serializer->iostream); for(i = 0 ; i < raptor_sequence_size(context->literals) ; i++ ) { node = (raptor_term*)raptor_sequence_get_at(context->literals, i); raptor_iostream_string_write((const unsigned char*)"\t\"L", serializer->iostream); raptor_dot_serializer_write_term(serializer, node); raptor_iostream_string_write((const unsigned char*)"\" [ label=\"", serializer->iostream); raptor_dot_serializer_write_term(serializer, node); raptor_iostream_string_write((const unsigned char*)"\", shape = record", serializer->iostream); raptor_dot_serializer_write_colors(serializer, RAPTOR_TERM_TYPE_LITERAL); raptor_iostream_string_write((const unsigned char*)" ];\n", serializer->iostream); } raptor_free_sequence(context->literals); raptor_iostream_string_write((const unsigned char*)"\n\tlabel=\"\\n\\nModel:\\n", serializer->iostream); if(serializer->base_uri) raptor_iostream_string_write(raptor_uri_as_string(serializer->base_uri), serializer->iostream); else raptor_iostream_string_write("(Unknown)", serializer->iostream); if(raptor_sequence_size(context->namespaces)) { raptor_iostream_string_write((const unsigned char*)"\\n\\nNamespaces:\\n", serializer->iostream); for(i = 0 ; i < raptor_sequence_size(context->namespaces) ; i++ ) { raptor_namespace* ns; const unsigned char* prefix; ns = (raptor_namespace*)raptor_sequence_get_at(context->namespaces, i); prefix = raptor_namespace_get_prefix(ns); if(prefix) { raptor_iostream_string_write((const unsigned char*)ns->prefix, serializer->iostream); raptor_iostream_string_write((const unsigned char*)": ", serializer->iostream); } raptor_iostream_string_write(raptor_uri_as_string(ns->uri), serializer->iostream); raptor_iostream_string_write((const unsigned char*)"\\n", serializer->iostream); } raptor_free_sequence(context->namespaces); } raptor_iostream_string_write((const unsigned char*)"\";\n", serializer->iostream); raptor_iostream_string_write((const unsigned char*) "}\n", serializer->iostream); return 0; } /* destroy a serializer */ static void raptor_dot_serializer_terminate(raptor_serializer* serializer) { /* raptor_dot_context* context = (raptor_dot_context*)serializer->context; */ /* Everything should have been freed in raptor_dot_serializer_end */ } /* serialize a statement */ static int raptor_dot_serializer_statement(raptor_serializer* serializer, raptor_statement *statement) { /* Cache the nodes for later. */ raptor_dot_serializer_assert_node(serializer, statement->subject); raptor_dot_serializer_assert_node(serializer, statement->object); raptor_iostream_string_write((const unsigned char*)"\t\"", serializer->iostream); raptor_dot_serializer_write_term_type(serializer, statement->subject->type); raptor_dot_serializer_write_term(serializer, statement->subject); raptor_iostream_string_write((const unsigned char*)"\" -> \"", serializer->iostream); raptor_dot_serializer_write_term_type(serializer, statement->object->type); raptor_dot_serializer_write_term(serializer, statement->object); raptor_iostream_string_write((const unsigned char*)"\" [ label=\"", serializer->iostream); raptor_dot_serializer_write_term(serializer, statement->predicate); raptor_iostream_string_write((const unsigned char*)"\" ];\n", serializer->iostream); return 0; } static const char* const dot_names[2] = { "dot", NULL}; static const char* const dot_uri_strings[2] = { "http://www.graphviz.org/doc/info/lang.html", NULL }; #define DOT_TYPES_COUNT 1 static const raptor_type_q dot_types[DOT_TYPES_COUNT + 1] = { { "text/x-graphviz", 15, 5}, { NULL, 0, 0} }; static int raptor_dot_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = dot_names; factory->desc.mime_types = dot_types; factory->desc.label = "GraphViz DOT format"; factory->desc.uri_strings = dot_uri_strings;; factory->context_length = sizeof(raptor_dot_context); factory->init = raptor_dot_serializer_init; factory->declare_namespace = raptor_dot_serializer_declare_namespace; factory->declare_namespace_from_namespace = raptor_dot_serializer_declare_namespace_from_namespace; factory->serialize_start = raptor_dot_serializer_start; factory->serialize_statement = raptor_dot_serializer_statement; factory->serialize_end = raptor_dot_serializer_end; factory->finish_factory = NULL; factory->terminate = raptor_dot_serializer_terminate; return 0; } int raptor_init_serializer_dot(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_dot_serializer_register_factory); } raptor2-2.0.15/src/raptor_serialize_rss.c0000644000175000017500000024007612325013605015317 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_rss.c - Raptor RSS 1.0 and Atom 1.0 serializers * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include "raptor_rss.h" typedef struct { raptor_world* world; raptor_term* term; /* shared pointer */ raptor_rss_item* item; } raptor_rss_group_map; /* * Raptor 'RSS 1.0' serializer object */ typedef struct { raptor_world* world; /* static rss model */ raptor_rss_model model; /* Triples with no assigned type node */ raptor_sequence *triples; /* Sequence of raptor_rss_item* : rdf:Seq items rdf:_ < n> at offset n */ raptor_sequence *items; /* Sequence of raptor_rss_item* (?x rdf:type rss:Enclosure) */ raptor_sequence *enclosures; /* Term of rdf:Seq node */ raptor_term *seq_term; /* Namespace stack for serializing */ raptor_namespace_stack *nstack; /* the default namespace (rdf: or atom:) - * this is destroyed when nstack above is deleted */ raptor_namespace* default_nspace; /* the xml: namespace */ raptor_namespace *xml_nspace; /* the root element (rdf:RDF or atom:feed) */ raptor_xml_element* root_element; /* where the xml is being written */ raptor_xml_writer *xml_writer; /* non-0 if this is an atom 1.0 serializer */ int is_atom; /* 0 = none * 1 = existing rss:item item containg rdf/xml encoding of any extra * triples about URI (rss-1.0 serializer only) * 2 = at:md element containing rdf/xml property elements encoding * of any extra triples about URI (atom serializer only) */ int rss_triples_mode; /* namespaces declared here */ raptor_namespace* nspaces[RAPTOR_RSS_NAMESPACES_SIZE]; /* Map of group URI (key, owned) : rss item object (value, shared) */ raptor_avltree *group_map; /* User declared namespaces */ raptor_sequence *user_namespaces; /* URI of XML Literal datatype */ raptor_uri* xml_literal_dt; int free_default_nspace; } raptor_rss10_serializer_context; static void raptor_free_group_map(raptor_rss_group_map* gm) { if(gm->term) raptor_free_term(gm->term); RAPTOR_FREE(raptor_rss_group_map, gm); } static int raptor_rss_group_map_compare(raptor_rss_group_map* gm1, raptor_rss_group_map* gm2) { return raptor_term_compare(gm1->term, gm2->term); } static raptor_rss_item* raptor_rss10_get_group_item(raptor_rss10_serializer_context *rss_serializer, raptor_term* term) { raptor_rss_group_map search_gm; raptor_rss_group_map* gm; search_gm.world = rss_serializer->world; search_gm.term = term; gm = (raptor_rss_group_map*)raptor_avltree_search(rss_serializer->group_map, (void*)&search_gm); return gm ? gm->item : NULL; } static int raptor_rss10_set_item_group(raptor_rss10_serializer_context *rss_serializer, raptor_term* term, raptor_rss_item *item) { raptor_rss_group_map* gm; if(raptor_rss10_get_group_item(rss_serializer, term)) return 0; gm = RAPTOR_CALLOC(raptor_rss_group_map*, 1, sizeof(*gm)); gm->world = rss_serializer->world; gm->term = raptor_term_copy(term); gm->item = item; raptor_avltree_add(rss_serializer->group_map, gm); return 0; } /** * raptor_rss10_serialize_init: * @serializer: serializer object * @name: serializer name * * INTERNAL (raptor_serializer_factory API) - create a new serializer * * Return value: non-0 on failure */ static int raptor_rss10_serialize_init(raptor_serializer* serializer, const char *name) { raptor_rss10_serializer_context *rss_serializer; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; rss_serializer->world = serializer->world; raptor_rss_common_init(serializer->world); raptor_rss_model_init(serializer->world, &rss_serializer->model); rss_serializer->triples = raptor_new_sequence((raptor_data_free_handler)raptor_free_statement, (raptor_data_print_handler)raptor_statement_print); rss_serializer->items = raptor_new_sequence((raptor_data_free_handler)raptor_free_rss_item, (raptor_data_print_handler)NULL); rss_serializer->enclosures = raptor_new_sequence((raptor_data_free_handler)raptor_free_rss_item, (raptor_data_print_handler)NULL); rss_serializer->group_map = raptor_new_avltree((raptor_data_compare_handler)raptor_rss_group_map_compare, (raptor_data_free_handler)raptor_free_group_map, 0); rss_serializer->user_namespaces = raptor_new_sequence((raptor_data_free_handler)raptor_free_namespace, NULL); rss_serializer->is_atom = !(strcmp(name,"atom")); rss_serializer->nstack = raptor_new_namespaces(serializer->world, 1); rss_serializer->xml_literal_dt = raptor_new_uri(serializer->world, raptor_xml_literal_datatype_uri_string); return 0; } /** * raptor_rss10_serialize_terminate: * @serializer: serializer object * * INTERNAL (raptor_serializer_factory API) - destroy a serializer */ static void raptor_rss10_serialize_terminate(raptor_serializer* serializer) { raptor_world* world = serializer->world; raptor_rss10_serializer_context *rss_serializer; int i; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; raptor_rss_model_clear(&rss_serializer->model); raptor_rss_common_terminate(world); if(rss_serializer->triples) raptor_free_sequence(rss_serializer->triples); if(rss_serializer->items) raptor_free_sequence(rss_serializer->items); if(rss_serializer->enclosures) raptor_free_sequence(rss_serializer->enclosures); if(rss_serializer->seq_term) raptor_free_term(rss_serializer->seq_term); if(rss_serializer->xml_writer) raptor_free_xml_writer(rss_serializer->xml_writer); for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE; i++) { if(rss_serializer->nspaces[i]) raptor_free_namespace(rss_serializer->nspaces[i]); } if(rss_serializer->free_default_nspace && rss_serializer->default_nspace) raptor_free_namespace(rss_serializer->default_nspace); if(rss_serializer->xml_nspace) raptor_free_namespace(rss_serializer->xml_nspace); if(rss_serializer->user_namespaces) raptor_free_sequence(rss_serializer->user_namespaces); /* all raptor_namespace* objects must be freed BEFORE the stack * they are attached to here: */ if(rss_serializer->nstack) raptor_free_namespaces(rss_serializer->nstack); if(rss_serializer->group_map) raptor_free_avltree(rss_serializer->group_map); if(world->rss_fields_info_qnames) { for(i = 0; i < RAPTOR_RSS_FIELDS_SIZE; i++) { if(world->rss_fields_info_qnames[i]) raptor_free_qname(world->rss_fields_info_qnames[i]); } RAPTOR_FREE(raptor_qname* array, world->rss_fields_info_qnames); world->rss_fields_info_qnames = NULL; } if(world->rss_types_info_qnames) { for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { if(world->rss_types_info_qnames[i]) raptor_free_qname(world->rss_types_info_qnames[i]); } RAPTOR_FREE(raptor_wname* array, world->rss_types_info_qnames); world->rss_types_info_qnames = NULL; } if(rss_serializer->xml_literal_dt) raptor_free_uri(rss_serializer->xml_literal_dt); } /** * raptor_rss10_move_statements: * @rss_serializer: serializer object * @type: item type * @item: item object * * INTERNAL - Move statements from the stored triples into item @item * that match @item's URI as subject. * * Return value: count of number of triples moved */ static int raptor_rss10_move_statements(raptor_rss10_serializer_context *rss_serializer, raptor_rss_type type, raptor_rss_item *item) { int t; int count = 0; int is_atom = rss_serializer->is_atom; int size = raptor_sequence_size(rss_serializer->triples); for(t = 0; t < size; t++) { raptor_statement* s; int f; s = (raptor_statement*)raptor_sequence_get_at(rss_serializer->triples, t); if(!s) continue; if(s->subject->type != RAPTOR_TERM_TYPE_URI || !raptor_uri_equals(s->subject->value.uri, item->uri)) continue; /* now we know this triple is associated with the item URI * and can count the relevant triples */ count++; /* add triples with anonymous object to the general triples sequence * for this item, and to the group map (blank node closure) */ if(s->object->type == RAPTOR_TERM_TYPE_BLANK) { raptor_rss10_set_item_group(rss_serializer, s->object, item); RAPTOR_DEBUG4("Moved anonymous value property URI <%s> for typed node %i - %s\n", raptor_uri_as_string(s->predicate->value.uri), type, raptor_rss_items_info[type].name); s = (raptor_statement*)raptor_sequence_delete_at(rss_serializer->triples, t); raptor_sequence_push(item->triples, s); continue; } /* otherwise process object value types resource or literal */ for(f = 0; f < RAPTOR_RSS_FIELDS_SIZE; f++) { if(!rss_serializer->world->rss_fields_info_uris[f]) continue; if(s->predicate->type == RAPTOR_TERM_TYPE_URI && s->object->type != RAPTOR_TERM_TYPE_BLANK && raptor_uri_equals(s->predicate->value.uri, rss_serializer->world->rss_fields_info_uris[f])) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); /* found field this triple to go in 'item' so move the * object value over */ if(s->object->type == RAPTOR_TERM_TYPE_URI) { field->uri = s->object->value.uri; s->object->value.uri = NULL; } else { field->value = s->object->value.literal.string; if(s->object->value.literal.datatype && raptor_uri_equals(s->object->value.literal.datatype, rss_serializer->xml_literal_dt)) field->is_xml = 1; if(f == RAPTOR_RSS_FIELD_CONTENT_ENCODED) field->is_xml = 1; if(f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml = 1; s->object->value.literal.string = NULL; } if(is_atom) { int i; /* Rewrite item fields rss->atom */ for(i = 0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { int from_f = raptor_atom_to_rss[i].to; int to_f = raptor_atom_to_rss[i].from; /* Do not rewrite to atom0.3 terms */ if(raptor_rss_fields_info[to_f].nspace == ATOM0_3_NS) continue; if(f == from_f && !(item->fields[to_f] && item->fields[to_f]->value)) { f = to_f; if(to_f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml = 1; field->is_mapped = 1; RAPTOR_DEBUG5("Moved field %d - %s to field %d - %s\n", from_f, raptor_rss_fields_info[from_f].name, to_f, raptor_rss_fields_info[to_f].name); break; } } } /* end is atom field to map */ RAPTOR_DEBUG1("Adding field\n"); raptor_rss_item_add_field(item, f, field); raptor_sequence_set_at(rss_serializer->triples, t, NULL); break; } } /* end for field loop */ /* loop ended early so triple was assocated with a field - continue */ if(f < RAPTOR_RSS_FIELDS_SIZE) continue; /* otherwise triple was not found as a field so store in triples * sequence */ RAPTOR_DEBUG4("UNKNOWN property URI <%s> for typed node %i - %s\n", raptor_uri_as_string(s->predicate->value.uri), type, raptor_rss_items_info[type].name); s = (raptor_statement*)raptor_sequence_delete_at(rss_serializer->triples, t); raptor_sequence_push(item->triples, s); } /* end for all triples */ #ifdef RAPTOR_DEBUG if(count > 0) RAPTOR_DEBUG5("Moved %d triples to typed node %i - %s with uri <%s>\n", count, type, raptor_rss_items_info[type].name, raptor_uri_as_string(item->uri)); #endif return count; } /** * raptor_rss10_move_anonymous_statements: * @rss_serializer: serializer object * * INTERNAL - Move statements with a blank node subject to the appropriate item * */ static int raptor_rss10_move_anonymous_statements(raptor_rss10_serializer_context *rss_serializer) { int t; int handled = 1; int round = 0; #ifdef RAPTOR_DEBUG int moved_count = 0; #endif for(round = 0; handled; round++) { int size = raptor_sequence_size(rss_serializer->triples); handled = 0; for(t = 0; t < size; t++) { raptor_statement* s; raptor_rss_item* item; s = (raptor_statement*)raptor_sequence_get_at(rss_serializer->triples, t); if(!s) continue; if(s->subject->type != RAPTOR_TERM_TYPE_BLANK) continue; item = raptor_rss10_get_group_item(rss_serializer, s->subject); if(item) { /* triple matched an existing item */ s = (raptor_statement*)raptor_sequence_delete_at(rss_serializer->triples, t); raptor_sequence_push(item->triples, s); #ifdef RAPTOR_DEBUG moved_count++; #endif if(s->object->type == RAPTOR_TERM_TYPE_BLANK) raptor_rss10_set_item_group(rss_serializer, s->object, item); handled = 1; } } /* end for all triples */ #ifdef RAPTOR_DEBUG if(moved_count > 0) RAPTOR_DEBUG3("Round %d: Moved %d triples\n", round, moved_count); #endif } return 0; } /** * raptor_rss10_move_leftover_statements: * @rss_serializer: serializer object * * INTERNAL - Move any statements in the serializer pool to items or channel * */ static int raptor_rss10_move_leftover_statements(raptor_rss10_serializer_context *rss_serializer) { raptor_rss_model* rss_model; int i; int type; raptor_rss_item* item; int size; rss_model = &rss_serializer->model; type = RAPTOR_RSS_ITEM; size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_rss10_move_statements(rss_serializer, (raptor_rss_type)type, item); } type = RAPTOR_RSS_CHANNEL; if(rss_model->common[type]) { item = rss_model->common[type]; raptor_rss10_move_statements(rss_serializer, (raptor_rss_type)type, item); } return 0; } /** * raptor_rss10_remove_mapped_item_fields: * @rss_serializer: serializer object * @item: rss item * @type: item type * * INTERNAL - Remove mapped fields for an item * */ static int raptor_rss10_remove_mapped_item_fields(raptor_rss10_serializer_context *rss_serializer, raptor_rss_item* item, int type) { int f; if(!item->fields_count) return 0; for(f = 0; f < RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; int saw_mapped = 0; int saw_non_mapped = 0; for(field = item->fields[f]; field; field = field->next) { if(field->is_mapped) saw_mapped++; else saw_non_mapped++; } if(saw_mapped && saw_non_mapped) { raptor_rss_field* last_field = NULL; RAPTOR_DEBUG6("Item %p Field %d - %s: %d mapped %d non-mapped\n", item, f, raptor_rss_fields_info[f].name, saw_mapped, saw_non_mapped); field = item->fields[f]; while(field) { raptor_rss_field* next = field->next; field->next = NULL; if(field->is_mapped) raptor_rss_field_free(field); else { if(!last_field) item->fields[f] = field; else last_field->next = field; last_field = field; } field = next; } } } return 0; } /** * raptor_rss10_remove_mapped_fields: * @rss_serializer: serializer object * * INTERNAL - Move statements with a blank node subject to the appropriate item * */ static int raptor_rss10_remove_mapped_fields(raptor_rss10_serializer_context *rss_serializer) { raptor_rss_model* rss_model; int is_atom; int i; rss_model = &rss_serializer->model; is_atom = rss_serializer->is_atom; if(!is_atom) return 0; if(rss_model->items_count) { int size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { raptor_rss_item* item; item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_rss10_remove_mapped_item_fields(rss_serializer, item, RAPTOR_RSS_ITEM); } } for(i = RAPTOR_RSS_CHANNEL; i < RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; for(item = rss_model->common[i]; item; item = item->next) { raptor_rss10_remove_mapped_item_fields(rss_serializer, item, i); } } return 0; } /** * raptor_rss10_store_statement: * @rss_serializer: serializer object * @s: statement (shared - do not become owner of this) * * INTERNAL - decide where to store a statement in an item or keep pending * * Return value: non-0 if handled (stored) */ static int raptor_rss10_store_statement(raptor_rss10_serializer_context *rss_serializer, raptor_statement *s) { raptor_rss_item *item = NULL; int handled = 0; int is_atom = rss_serializer->is_atom; item = raptor_rss10_get_group_item(rss_serializer, s->subject); if(item && s->predicate->type == RAPTOR_TERM_TYPE_URI && (s->object->type == RAPTOR_TERM_TYPE_URI || s->object->type == RAPTOR_TERM_TYPE_LITERAL)) { int f; raptor_uri* predicate_uri = s->predicate->value.uri; /* scan triples (? ) */ for(f = 0; f < RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; if(!rss_serializer->world->rss_fields_info_uris[f]) continue; if(raptor_uri_equals(predicate_uri, rss_serializer->world->rss_fields_info_uris[f])) { /* found field this triple to go in 'item' so move the * object value over */ field = raptor_rss_new_field(rss_serializer->world); if(s->object->type == RAPTOR_TERM_TYPE_URI) { field->uri = s->object->value.uri; s->object->value.uri = NULL; } else { /* must be literal - checked above */ field->value = s->object->value.literal.string; if(s->object->value.literal.datatype && raptor_uri_equals(s->object->value.literal.datatype, rss_serializer->xml_literal_dt)) field->is_xml = 1; if(f == RAPTOR_RSS_FIELD_CONTENT_ENCODED) field->is_xml = 1; if(f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml = 1; s->object->value.literal.string = NULL; } if(is_atom) { int i; /* Rewrite item fields rss->atom */ for(i = 0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { int from_f = raptor_atom_to_rss[i].to; int to_f = raptor_atom_to_rss[i].from; /* Do not rewrite to atom0.3 terms */ if(raptor_rss_fields_info[to_f].nspace == ATOM0_3_NS) continue; if(f == from_f && !(item->fields[to_f] && item->fields[to_f]->value)) { f = to_f; if(to_f == RAPTOR_RSS_FIELD_ATOM_SUMMARY && *field->value == '<') field->is_xml = 1; field->is_mapped = 1; RAPTOR_DEBUG5("Moved field %d - %s to field %d - %s\n", from_f, raptor_rss_fields_info[from_f].name, to_f, raptor_rss_fields_info[to_f].name); break; } } } RAPTOR_DEBUG1("Adding field\n"); raptor_rss_item_add_field(item, f, field); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Stored statement under typed node %p\n", item); #endif handled = 1; break; } } } if(!handled) { raptor_statement *t; /* Need to handle this later so copy it */ t = raptor_statement_copy(s); if(t) { raptor_sequence_push(rss_serializer->triples, t); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr,"Stored statement: "); raptor_statement_print_as_ntriples(s, stderr); fprintf(stderr,"\n"); #endif handled = 1; } } return handled; } static int raptor_rss10_serialize_start(raptor_serializer* serializer) { raptor_rss10_serializer_context *rss_serializer; const char* rss_triples; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; rss_triples = (const char*)RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_RSS_TRIPLES); if(rss_triples) { if(!strcmp(rss_triples, "none")) rss_serializer->rss_triples_mode = 0; else if(!strcmp(rss_triples, "rdf-xml")) rss_serializer->rss_triples_mode = 1; else if(!strcmp(rss_triples, "atom-triples")) rss_serializer->rss_triples_mode = 2; else rss_serializer->rss_triples_mode = 0; } return 0; } /** * raptor_rss10_serialize_statement: * @serializer: serializer object * @statement: statement (shared - am not owner of this) * * INTERNAL (raptor_serializer_factory API) - Serialize a statement * * Return value: non-0 on failure */ static int raptor_rss10_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_rss10_serializer_context *rss_serializer; raptor_rss_model *rss_model; int handled = 0; int i; raptor_rss_type type; raptor_rss_item *item = NULL; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; rss_model = &rss_serializer->model; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 if(1) { RAPTOR_DEBUG1("Processing statement\n "); raptor_statement_print_as_ntriples(statement, stderr); fputc('\n', stderr); } #endif if(raptor_uri_equals(statement->predicate->value.uri, RAPTOR_RSS_RSS_items_URI(rss_model))) { /* ignore any triple (? rss:items ?) - is infered */ return 0; } if(!raptor_uri_equals(statement->predicate->value.uri, RAPTOR_RDF_type_URI(serializer->world))) goto savetriple; type = RAPTOR_RSS_NONE; if(statement->object->type == RAPTOR_TERM_TYPE_URI) { raptor_uri* object_uri = statement->object->value.uri; /* look for triple: (? rdf:type ?class-uri) to find containers and blocks */ /* Look for triple (? rdf:type rdf:Seq) */ if(raptor_uri_equals(object_uri, RAPTOR_RDF_Seq_URI(serializer->world))) { rss_serializer->seq_term = raptor_term_copy(statement->subject); handled = 1; goto savetriple; } /* look for triple: (? rdf:type ?class-uri) to find containers and blocks */ for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { raptor_uri *item_uri = serializer->world->rss_types_info_uris[i]; if(item_uri && raptor_uri_equals(object_uri, item_uri)) { type = (raptor_rss_type)i; #ifdef RAPTOR_DEBUG if(1) { unsigned char* ts; ts = raptor_term_to_string(statement->subject); RAPTOR_DEBUG4("Found typed node %i - %s with term %s\n", type, raptor_rss_items_info[type].name, ts); RAPTOR_FREE(char*, ts); } #endif break; } } } if(type == RAPTOR_RSS_NONE) { #ifdef RAPTOR_DEBUG if(1) { unsigned char* ts; ts = raptor_term_to_string(statement->object); RAPTOR_DEBUG2("UNKNOWN typed node with type term %s\n", ts); RAPTOR_FREE(char*, ts); } #endif goto savetriple; } if(type == RAPTOR_RSS_ITEM) { int size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); if(raptor_rss_item_equals_statement_subject(item, statement)) break; } if(i < size) { RAPTOR_DEBUG2("Found RSS item at entry %d in sequence of items\n", i); } else { #ifdef RAPTOR_DEBUG if(1) { unsigned char* ts; ts = raptor_term_to_string(statement->subject); RAPTOR_DEBUG2("RSS item term %s is not in sequence of items\n", ts); RAPTOR_FREE(char*, ts); } #endif item = NULL; } } else if(type == RAPTOR_RSS_ENCLOSURE) { int size = raptor_sequence_size(rss_serializer->enclosures); for(i = 0; i < size; i++) { item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); if(raptor_rss_item_equals_statement_subject(item, statement)) break; } if(i < size) { RAPTOR_DEBUG2("Found enclosure at entry %d in sequence of enclosures\n", i); } else { #ifdef RAPTOR_DEBUG if(1) { unsigned char* ts; ts = raptor_term_to_string(statement->subject); RAPTOR_DEBUG2("Add new enclosure to sequence with term %s\n", ts); RAPTOR_FREE(char*, ts); } #endif item = raptor_new_rss_item(rss_serializer->world); raptor_sequence_push(rss_serializer->enclosures, item); } } else { item = raptor_rss_model_add_common(rss_model, type); } if(item && statement->subject->type == RAPTOR_TERM_TYPE_URI) { raptor_rss_item_set_uri(item, statement->subject->value.uri); /* Move any existing statements to the newly discovered item */ raptor_rss10_move_statements(rss_serializer, type, item); raptor_rss10_set_item_group(rss_serializer, item->term, item); handled = 1; } savetriple: if(!handled) { handled = raptor_rss10_store_statement(rss_serializer, statement); /* failed to store */ if(!handled) return 1; } return 0; } static void raptor_rss10_build_items(raptor_rss10_serializer_context *rss_serializer) { raptor_rss_model* rss_model = &rss_serializer->model; int i; int size; if(!rss_serializer->seq_term) return; size = raptor_sequence_size(rss_serializer->triples); for(i = 0; i < size; i++) { int ordinal = -1; raptor_statement* s; s = (raptor_statement*)raptor_sequence_get_at(rss_serializer->triples, i); if(!s) continue; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("Processing statement\n "); raptor_statement_print_as_ntriples(s, stderr); fputc('\n', stderr); #endif /* skip triples that are not ? ? */ if(s->object->type != RAPTOR_TERM_TYPE_URI) { RAPTOR_DEBUG1("Not ? ? - continuing\n"); continue; } if(raptor_term_equals(s->subject, rss_serializer->seq_term)) { const unsigned char* uri_str; /* found triple */ /* predicate is a resource */ uri_str = raptor_uri_as_string(s->predicate->value.uri); if(!strncmp((const char*)uri_str, "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) ordinal= raptor_check_ordinal(uri_str + 44); #ifdef RAPTOR_DEBUG if(1) { unsigned char* ts; ts = raptor_term_to_string(s->object); RAPTOR_DEBUG3("Found RSS 1.0 item %d with term %s\n", ordinal, ts); RAPTOR_FREE(char*, ts); } #endif if(ordinal >= 0) { raptor_rss_item *item; item = raptor_new_rss_item(rss_serializer->world); raptor_rss_item_set_uri(item, s->object->value.uri); raptor_sequence_set_at(rss_serializer->items, ordinal - 1, item); raptor_sequence_set_at(rss_serializer->triples, i, NULL); /* Move any existing statements to the newly discovered item */ raptor_rss10_move_statements(rss_serializer, RAPTOR_RSS_ITEM, item); raptor_rss10_set_item_group(rss_serializer, item->term, item); } } } rss_model->items_count = raptor_sequence_size(rss_serializer->items); } static void raptor_rss10_build_xml_names(raptor_serializer *serializer, int is_entry) { raptor_world* world = serializer->world; raptor_rss10_serializer_context *rss_serializer; raptor_rss_model* rss_model; raptor_uri *base_uri = serializer->base_uri; raptor_xml_element *element; raptor_qname *qname; const unsigned char *root_local_name; int i; int is_atom; const raptor_rss_item_info *item_node_type; int item_node_typei; const unsigned char* ns_uri; int default_ns_id; const unsigned char *default_prefix; int size; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; rss_model = &rss_serializer->model; is_atom = rss_serializer->is_atom; if(is_atom) { default_ns_id = ATOM1_0_NS; ns_uri = raptor_atom_namespace_uri; root_local_name = (is_entry ? (const unsigned char*)"entry" : (const unsigned char*)"feed"); item_node_typei = RAPTOR_ATOM_ENTRY; } else { default_ns_id = RSS1_0_NS; ns_uri = raptor_rdf_namespace_uri; root_local_name = (const unsigned char*)"RDF"; item_node_typei = RAPTOR_RSS_ITEM; } item_node_type = &raptor_rss_items_info[item_node_typei]; if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_PREFIX_ELEMENTS)) /* declare this NS with standard prefix */ default_prefix = (const unsigned char*)raptor_rss_namespaces_info[default_ns_id].prefix; else default_prefix = NULL; rss_serializer->default_nspace = raptor_new_namespace(rss_serializer->nstack, default_prefix, ns_uri, 0); rss_serializer->free_default_nspace = 1; if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_PREFIX_ELEMENTS)) { rss_serializer->nspaces[default_ns_id] = rss_serializer->default_nspace; rss_serializer->free_default_nspace = 0; } rss_serializer->xml_nspace = raptor_new_namespace(rss_serializer->nstack, (const unsigned char*)"xml", (const unsigned char*)raptor_xml_namespace_uri, 0); /* Now we have a namespace stack, declare the namespaces */ for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE; i++) { raptor_uri* uri = serializer->world->rss_namespaces_info_uris[i]; const unsigned char *prefix; prefix = (const unsigned char*)raptor_rss_namespaces_info[i].prefix; if(!prefix) continue; if(i == default_ns_id) { if(RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_PREFIX_ELEMENTS)) prefix = NULL; } if(uri) { raptor_namespace* nspace; nspace = raptor_new_namespace_from_uri(rss_serializer->nstack, prefix, uri, 0); rss_serializer->nspaces[i] = nspace; } } qname = raptor_new_qname_from_namespace_local_name(serializer->world, rss_serializer->nspaces[default_ns_id], root_local_name, NULL); if(base_uri) base_uri = raptor_uri_copy(base_uri); element = raptor_new_xml_element(qname, NULL, base_uri); rss_serializer->root_element = element; /* Declare the namespaces on the root element */ raptor_xml_element_declare_namespace(element, rss_serializer->default_nspace); for(i = 0; i < RAPTOR_RSS_NAMESPACES_SIZE; i++) { const unsigned char *prefix; prefix = (const unsigned char*)raptor_rss_namespaces_info[i].prefix; if(!prefix && i != default_ns_id) continue; if(rss_serializer->nspaces[i]) raptor_xml_element_declare_namespace(element, rss_serializer->nspaces[i]); } size = raptor_sequence_size(rss_serializer->user_namespaces); for(i = 0; i < size; i++) { raptor_namespace* nspace; nspace = (raptor_namespace*)raptor_sequence_get_at(rss_serializer->user_namespaces, i); /* Ignore user setting default namespace prefix */ if(!nspace->prefix) continue; raptor_xml_element_declare_namespace(element, nspace); } world->rss_fields_info_qnames = RAPTOR_CALLOC(raptor_qname**, RAPTOR_RSS_FIELDS_SIZE, sizeof(raptor_qname*)); if(!world->rss_fields_info_qnames) return; for(i = 0; i < RAPTOR_RSS_FIELDS_SIZE; i++) { int n = raptor_rss_fields_info[i].nspace; raptor_namespace* nspace = rss_serializer->nspaces[n]; const unsigned char* lname; lname = (const unsigned char*)raptor_rss_fields_info[i].name; world->rss_fields_info_qnames[i] = raptor_new_qname_from_namespace_local_name(serializer->world, nspace, lname, NULL); if(!world->rss_fields_info_qnames[i]) return; } world->rss_types_info_qnames = RAPTOR_CALLOC(raptor_qname**, RAPTOR_RSS_COMMON_SIZE, sizeof(raptor_qname*)); if(!world->rss_types_info_qnames) return; for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { int n = raptor_rss_items_info[i].nspace; raptor_namespace* nspace = rss_serializer->nspaces[n]; if(nspace) { const unsigned char* lname = (const unsigned char*)raptor_rss_items_info[i].name; world->rss_types_info_qnames[i] = raptor_new_qname_from_namespace_local_name(serializer->world, nspace, lname, NULL); if(!world->rss_types_info_qnames[i]) return; } } for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; for(item = rss_model->common[i]; item; item = item->next) { int typei = i; if(!item->fields_count) continue; if(is_atom) { if(typei == RAPTOR_RSS_CHANNEL) typei = RAPTOR_ATOM_FEED; else if(typei == RAPTOR_RSS_ITEM) typei = RAPTOR_ATOM_ENTRY; } item->node_type = &raptor_rss_items_info[typei]; item->node_typei = typei; } } size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { raptor_rss_item* item; item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); item->node_type = item_node_type; item->node_typei = item_node_typei; } size = raptor_sequence_size(rss_serializer->enclosures); for(i = 0; i < size; i++) { raptor_rss_item* item; item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); item->node_type = &raptor_rss_items_info[RAPTOR_RSS_ENCLOSURE]; item->node_typei = RAPTOR_RSS_ENCLOSURE; } } static void raptor_rss10_emit_atom_triples_map(raptor_serializer *serializer, int is_feed, const unsigned char* map_element_name) { raptor_rss10_serializer_context *rss_serializer; raptor_xml_writer* xml_writer; raptor_uri *base_uri = serializer->base_uri; raptor_uri* base_uri_copy = NULL; raptor_namespace* at_nspace; raptor_xml_element* at_map_root_element; raptor_qname *at_map_root_qname; int i; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; xml_writer = rss_serializer->xml_writer; at_nspace = rss_serializer->nspaces[ATOMTRIPLES_NS]; at_map_root_qname = raptor_new_qname_from_namespace_local_name(serializer->world, at_nspace, (const unsigned char*)map_element_name, NULL); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; at_map_root_element = raptor_new_xml_element(at_map_root_qname, NULL, base_uri_copy); raptor_xml_writer_start_element(xml_writer, at_map_root_element); /* Walk list of fields mapped atom to rss */ for(i = 0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { int from_f = raptor_atom_to_rss[i].from; int to_f = raptor_atom_to_rss[i].to; const raptor_rss_field_info* from_field_info = &raptor_rss_fields_info[from_f]; const raptor_rss_field_info* to_field_info = &raptor_rss_fields_info[to_f]; raptor_xml_element* at_map_element; raptor_qname *at_map_qname; raptor_qname** at_map_attrs; const char* predicate_prefix; unsigned char* ruri_string; /* Do not rewrite to atom0.3 terms */ if(to_field_info->nspace == ATOM0_3_NS) continue; /* atom:feed only contains some fields that are mapped */ if(is_feed && !(from_f == RAPTOR_RSS_FIELD_ATOM_ID || from_f == RAPTOR_RSS_FIELD_ATOM_UPDATED || from_f == RAPTOR_RSS_FIELD_ATOM_RIGHTS || from_f == RAPTOR_RSS_FIELD_ATOM_TITLE)) continue; predicate_prefix = raptor_rss_namespaces_info[from_field_info->nspace].prefix; if(!predicate_prefix) continue; /* {atom element} */ at_map_qname = raptor_new_qname_from_namespace_local_name(rss_serializer->world, at_nspace, map_element_name, NULL); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; at_map_element = raptor_new_xml_element(at_map_qname, NULL, base_uri_copy); at_map_attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string(base_uri, serializer->world->rss_fields_info_uris[to_f]); at_map_attrs[0] = raptor_new_qname(rss_serializer->nstack, (const unsigned char*)"property", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(at_map_element, at_map_attrs, 1); raptor_xml_writer_start_element(xml_writer, at_map_element); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)predicate_prefix); raptor_xml_writer_cdata_counted(xml_writer, (const unsigned char*)":", 1); raptor_xml_writer_cdata(xml_writer, (const unsigned char*)from_field_info->name); raptor_xml_writer_end_element(xml_writer, at_map_element); raptor_free_xml_element(at_map_element); } raptor_xml_writer_end_element(xml_writer, at_map_root_element); raptor_free_xml_element(at_map_root_element); } /* atom-specific feed XML elements */ static void raptor_rss10_emit_atom_feed(raptor_serializer *serializer, raptor_rss_item *item) { raptor_rss10_serializer_context *rss_serializer; raptor_xml_writer* xml_writer; raptor_uri *base_uri = serializer->base_uri; raptor_uri* base_uri_copy = NULL; raptor_xml_element* atom_link_element; raptor_qname *atom_link_qname; raptor_qname** atom_link_attrs; raptor_namespace* atom_nspace; unsigned char* ruri_string; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; atom_nspace = rss_serializer->nspaces[ATOM1_0_NS]; xml_writer = rss_serializer->xml_writer; atom_link_qname = raptor_new_qname_from_namespace_local_name(rss_serializer->world, atom_nspace, (const unsigned char*)"link", NULL); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; atom_link_element = raptor_new_xml_element(atom_link_qname, NULL, base_uri_copy); atom_link_attrs = RAPTOR_CALLOC(raptor_qname**, 2, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string(base_uri, item->uri); atom_link_attrs[0] = raptor_new_qname(rss_serializer->nstack, (const unsigned char*)"href", ruri_string); raptor_free_memory(ruri_string); atom_link_attrs[1] = raptor_new_qname(rss_serializer->nstack, (const unsigned char*)"rel", (const unsigned char*)"self"); raptor_xml_element_set_attributes(atom_link_element, atom_link_attrs, 2); raptor_xml_writer_empty_element(xml_writer, atom_link_element); raptor_free_xml_element(atom_link_element); if(rss_serializer->rss_triples_mode == 2) { raptor_rss10_emit_atom_triples_map(serializer, 1, (const unsigned char*)"feedmap"); raptor_rss10_emit_atom_triples_map(serializer, 0, (const unsigned char*)"entrymap"); } } /* emit the RSS 1.0-specific rdf:Seq and rss:item XML elements */ static void raptor_rss10_emit_rss_items(raptor_serializer *serializer) { raptor_rss10_serializer_context *rss_serializer; raptor_xml_writer* xml_writer; raptor_uri *base_uri = serializer->base_uri; raptor_uri* base_uri_copy = NULL; raptor_xml_element* rss_items_predicate; int i; raptor_qname *rdf_Seq_qname; raptor_xml_element *rdf_Seq_element; int size; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; if(!raptor_sequence_size(rss_serializer->items)) return; xml_writer = rss_serializer->xml_writer; rdf_Seq_qname = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"Seq", NULL); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; rdf_Seq_element = raptor_new_xml_element(rdf_Seq_qname, NULL, base_uri_copy); /* make the .... */ base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; rss_items_predicate = raptor_new_xml_element(raptor_qname_copy(serializer->world->rss_fields_info_qnames[RAPTOR_RSS_FIELD_ITEMS]), NULL, base_uri_copy); raptor_xml_writer_start_element(xml_writer, rss_items_predicate); raptor_xml_writer_start_element(xml_writer, rdf_Seq_element); size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { raptor_rss_item* item_item; raptor_qname *rdf_li_qname; raptor_xml_element *rdf_li_element; raptor_qname **attrs; unsigned char* ruri_string; item_item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); rdf_li_qname = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"li", NULL); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; rdf_li_element = raptor_new_xml_element(rdf_li_qname, NULL, base_uri_copy); attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string(base_uri, item_item->uri); attrs[0] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"resource", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(rdf_li_element, attrs, 1); raptor_xml_writer_empty_element(xml_writer, rdf_li_element); raptor_xml_writer_newline(xml_writer); raptor_free_xml_element(rdf_li_element); } raptor_xml_writer_end_element(xml_writer, rdf_Seq_element); raptor_free_xml_element(rdf_Seq_element); raptor_xml_writer_end_element(xml_writer, rss_items_predicate); raptor_free_xml_element(rss_items_predicate); } /* emit a block of RDF/XML depending on the rssTriples option mode */ static void raptor_rss10_emit_rdfxml_item_triples(raptor_serializer *serializer, raptor_rss_item *item) { raptor_rss10_serializer_context *rss_serializer; raptor_xml_writer* xml_writer; raptor_xml_element* root_element = NULL; raptor_serializer* ser = NULL; raptor_uri* base_uri = NULL; int t_max_count = raptor_sequence_size(item->triples); int t_count; int t; int is_atom; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; if(rss_serializer->rss_triples_mode == 0 || !item->triples) return; xml_writer = rss_serializer->xml_writer; is_atom = rss_serializer->is_atom; /* can only use atom-triples with atom serializer */ if(rss_serializer->rss_triples_mode == 2 && !is_atom) return; /* can only use rdf-xml with rss-1.0 serializer */ if(rss_serializer->rss_triples_mode == 1 && is_atom) return; t_count = 0; for(t = 0; t < t_max_count; t++) { if(raptor_sequence_get_at(item->triples, t)) t_count++; } if(!t_count) return; RAPTOR_DEBUG2("Serializing %d triples\n", t_count); if(is_atom) { raptor_namespace* at_nspace = rss_serializer->nspaces[ATOMTRIPLES_NS]; raptor_qname* root_qname; /* atom:md with no attribute */ root_qname = raptor_new_qname_from_namespace_local_name(rss_serializer->world, at_nspace, (const unsigned char*)"md", NULL); if(!root_qname) goto oom; base_uri = serializer->base_uri; if(base_uri) base_uri = raptor_uri_copy(base_uri); /* after this root_element owns root_qname and (this copy of) base_uri */ root_element = raptor_new_xml_element(root_qname, NULL, base_uri); if(!root_element) { if(base_uri) raptor_free_uri(base_uri); raptor_free_qname(root_qname); } else raptor_xml_writer_start_element(xml_writer, root_element); } ser = raptor_new_serializer(rss_serializer->world, "rdfxml-abbrev"); if(!ser) goto oom; raptor_rdfxmla_serialize_set_xml_writer(ser, xml_writer, rss_serializer->nstack); raptor_rdfxmla_serialize_set_write_rdf_RDF(ser, 0); raptor_rdfxmla_serialize_set_single_node(ser, item->uri); if(rss_serializer->rss_triples_mode == 2) { /* raptor_rdfxmla_serialize_set_write_typed_nodes(ser, 0); */ } /* after this call, ser does * NOT own serializer->iostream and will not destroy it * when raptor_free_serializer(ser) is called. */ raptor_serializer_start_to_iostream(ser, base_uri, serializer->iostream); for(t = 0; t < t_max_count; t++) { raptor_statement* s; s = (raptor_statement*)raptor_sequence_get_at(item->triples, t); if(s) raptor_serializer_serialize_statement(ser, s); } raptor_serializer_serialize_end(ser); if(is_atom) raptor_xml_writer_end_element(xml_writer, root_element); oom: if(ser) raptor_free_serializer(ser); if(root_element) raptor_free_xml_element(root_element); } /** * raptor_rss10_ensure_atom_field_zero_one: * @item: RSS item object * @f: ATOM field type * * INTERNAL - Check that the given item @field appears 0 or 1 times */ static void raptor_rss10_ensure_atom_field_zero_one(raptor_rss_item* item, raptor_rss_fields_type f) { raptor_rss_field* field = item->fields[f]; if(!field) return; if(field->next) { /* more than 1 value so delete rest of values */ raptor_rss_field* next = field->next; field->next = NULL; do { field = next; next = field->next; field->next = NULL; raptor_rss_field_free(field); } while(next); } } /** * raptor_rss10_ensure_atom_feed_valid: * @rss_serializer: serializer object * * INTERNAL - Ensure the atom items have all the fields they need: * & & <updated> * plus: * <link rel='alternate' ...> OR <content>.. * */ static int raptor_rss10_ensure_atom_feed_valid(raptor_rss10_serializer_context *rss_serializer) { int is_atom; int i; raptor_rss_item* item; raptor_rss_model* rss_model; time_t now = 0; int size; #ifdef HAVE_GETTIMEOFDAY struct timeval tv; if(!gettimeofday(&tv, NULL)) now = tv.tv_sec; #else now = time(NULL); #endif is_atom = rss_serializer->is_atom; rss_model = &rss_serializer->model; if(!is_atom) return 0; item = rss_model->common[RAPTOR_RSS_CHANNEL]; if(item) { int f; /* atom:id is required */ f = RAPTOR_RSS_FIELD_ATOM_ID; if(!item->fields[f]) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); field->uri = raptor_uri_copy(item->uri); raptor_rss_item_add_field(item, f, field); } /* atom:updated is required */ f = RAPTOR_RSS_FIELD_ATOM_UPDATED; if(!item->fields[f]) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); raptor_rss_set_date_field(field, now); raptor_rss_item_add_field(item, f, field); } /* atom:content is forbidden in feed */ f = RAPTOR_RSS_FIELD_ATOM_CONTENT; if(item->fields[f]) { raptor_rss_field_free(item->fields[f]); item->fields[f] = NULL; } /* atom:summary is forbidden in feed */ f = RAPTOR_RSS_FIELD_ATOM_SUMMARY; if(item->fields[f]) { raptor_rss_field_free(item->fields[f]); item->fields[f] = NULL; } /* These fields can appear 0 or 1 times on a feed */ raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_ICON); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_LOGO); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_RIGHTS); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_SUBTITLE); } size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); /* atom:id - defaults to item URI */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_ID]) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); field->uri = raptor_uri_copy(item->uri); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_ID, field); } /* atom:title - defaults to "untitled" */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_TITLE]) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); field->value = RAPTOR_MALLOC(unsigned char*, 9); memcpy(field->value, "untitled", 9); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_TITLE, field); } /* atom:updated - defaults to now time */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_UPDATED]) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); raptor_rss_set_date_field(field, now); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_UPDATED, field); } /* enforce there is either an atom:content OR atom:link (rel = alternate) * by adding a link to {item URI} if missing */ if(!item->fields[RAPTOR_RSS_FIELD_ATOM_CONTENT] && !item->fields[RAPTOR_RSS_FIELD_ATOM_LINK]) { raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world); field->uri = raptor_uri_copy(item->uri); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_ATOM_LINK, field); } /* These fields can appear 0 or 1 times on an entry */ raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_PUBLISHED); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_RIGHTS); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_SOURCE); raptor_rss10_ensure_atom_field_zero_one(item, RAPTOR_RSS_FIELD_ATOM_SUMMARY); } return 0; } static void raptor_rss10_emit_item(raptor_serializer* serializer, raptor_rss_item *item, int item_type, int emit_container) { raptor_rss10_serializer_context *rss_serializer; raptor_xml_writer* xml_writer; raptor_rss_model* rss_model; raptor_uri *base_uri = serializer->base_uri; raptor_xml_element *element = NULL; raptor_qname **attrs = NULL; raptor_uri* base_uri_copy = NULL; int fi; int is_atom; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; #ifdef RAPTOR_DEBUG if(!item) { RAPTOR_FATAL3("Tried to emit NULL item of type %d - %s\n", item_type, raptor_rss_items_info[item_type].name); } #endif xml_writer = rss_serializer->xml_writer; is_atom = rss_serializer->is_atom; rss_model = &rss_serializer->model; if(!item->fields_count) { int i; int size = raptor_sequence_size(rss_serializer->enclosures); for(i = 0; i < size; i++) { raptor_rss_item *enclosure_item; enclosure_item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); /* If the item and enclosure item have the same URI, move the * enclosure fields to the item. Assumed that they got conflated * previously such as when the enclosure url = the guid */ if(enclosure_item->uri && raptor_uri_equals(item->uri, enclosure_item->uri)) { int j; for(j = 0; j < RAPTOR_RSS_FIELDS_SIZE; j++) { if(j != RAPTOR_RSS_RDF_ENCLOSURE_TYPE && j != RAPTOR_RSS_RDF_ENCLOSURE_LENGTH && j != RAPTOR_RSS_RDF_ENCLOSURE_URL) { item->fields[j] = enclosure_item->fields[j]; enclosure_item->fields[j] = NULL; item->fields_count++; enclosure_item->fields_count--; } } break; } } } if(!item->fields_count) return; if(emit_container) { raptor_qname* qname_copy; qname_copy = raptor_qname_copy(serializer->world->rss_types_info_qnames[item->node_typei]); base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; element = raptor_new_xml_element(qname_copy, NULL, base_uri_copy); if(!is_atom && item->uri) { unsigned char* ruri_string; attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string(base_uri, item->uri); attrs[0] = raptor_new_qname_from_namespace_local_name(serializer->world, rss_serializer->default_nspace, (const unsigned char*)"about", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(element, attrs, 1); } raptor_xml_writer_start_element(xml_writer, element); } for(fi = 0; fi < RAPTOR_RSS_FIELDS_SIZE; fi++) { raptor_rss_fields_type f = (raptor_rss_fields_type)fi; raptor_rss_field* field; if(f == RAPTOR_RSS_FIELD_ITEMS) /* emitting the RSS items rdf:Seq block is done after this loop */ continue; if(!serializer->world->rss_fields_info_uris[f]) continue; if(f == RAPTOR_RSS_FIELD_ATOM_AUTHOR) { int typei; if(!is_atom) continue; if(item_type != RAPTOR_RSS_CHANNEL) continue; typei = RAPTOR_ATOM_AUTHOR; if(!rss_model->common[typei]) { raptor_rss_item* author_item; /* No atom author was present so make a new atom:author item * then either promote the string to an atom:name field OR * use "unknown" */ author_item = raptor_rss_model_add_common(rss_model, (raptor_rss_type)typei); author_item->node_type = &raptor_rss_items_info[typei]; author_item->node_typei = typei; /* FIXME - uses _:author as bnode name - should make a new * genid for each author node. This is OK because there * is a check above that there is only 1 author per FEED. */ author_item->term = raptor_new_term_from_blank(serializer->world, (unsigned char*)"author"); /* Move atom:name author field, or create a dummy one */ f = RAPTOR_RSS_FIELD_ATOM_NAME; if(item->fields[f]) { field = item->fields[f]; item->fields[f] = NULL; } else { field = raptor_rss_new_field(serializer->world); field->value = RAPTOR_MALLOC(unsigned char*, 8); memcpy(field->value, "unknown", 8); } raptor_rss_item_add_field(author_item, RAPTOR_RSS_FIELD_ATOM_NAME, field); /* Move atom author fields if found: atom:uri and atom:email * are only used inside Person constructs */ f = RAPTOR_RSS_FIELD_ATOM_URI; if(item->fields[f]) { field = item->fields[f]; raptor_rss_item_add_field(author_item, f, field); item->fields[f] = NULL; } f = RAPTOR_RSS_FIELD_ATOM_EMAIL; if(item->fields[f]) { field = item->fields[f]; raptor_rss_item_add_field(author_item, f, field); item->fields[f] = NULL; } } RAPTOR_DEBUG3("Emitting type %i - %s\n", typei, raptor_rss_items_info[typei].name); raptor_rss10_emit_item(serializer, rss_model->common[typei], typei, 1); continue; } for(field = item->fields[f]; field; field = field->next) { raptor_xml_element* predicate; /* Use atom:summary in preference */ if(is_atom && f == RAPTOR_RSS_FIELD_DESCRIPTION) continue; base_uri_copy = base_uri ? raptor_uri_copy(base_uri) : NULL; predicate = raptor_new_xml_element(raptor_qname_copy(serializer->world->rss_fields_info_qnames[f]), NULL, base_uri_copy); if(is_atom && field->uri) { unsigned char* ruri_string; size_t len; raptor_uri* my_base_uri = base_uri; if(f == RAPTOR_RSS_FIELD_ATOM_ID) my_base_uri = NULL; ruri_string = raptor_uri_to_relative_counted_uri_string(my_base_uri, field->uri, &len); if(f == RAPTOR_RSS_FIELD_ATOM_LINK && !item->fields[RAPTOR_RSS_FIELD_ATOM_CONTENT]) { /* atom:link to URI and there is no atom:content */ raptor_qname **predicate_attrs = NULL; predicate_attrs = RAPTOR_CALLOC(raptor_qname**, 2, sizeof(raptor_qname*)); predicate_attrs[0] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, NULL, (const unsigned char*)"href", ruri_string); predicate_attrs[1] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, NULL, (const unsigned char*)"rel", (const unsigned char*)"alternate"); field->value = NULL; raptor_xml_element_set_attributes(predicate, predicate_attrs, 2); raptor_xml_writer_empty_element(xml_writer, predicate); } else if(f == RAPTOR_RSS_FIELD_ATOM_CONTENT) { /* <atom:content src="{uri value}" type="{type}" /> */ raptor_qname **predicate_attrs = NULL; const unsigned char* content_type; raptor_rss_field* content_type_field; /* get the type */ content_type_field = item->fields[RAPTOR_RSS_FIELD_AT_CONTENT_TYPE]; if(content_type_field && content_type_field->value) content_type = content_type_field->value; else content_type = (const unsigned char*)"text/html"; predicate_attrs = RAPTOR_CALLOC(raptor_qname**, 2, sizeof(raptor_qname*)); predicate_attrs[0] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, NULL, (const unsigned char*)"src", ruri_string); predicate_attrs[1] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, NULL, (const unsigned char*)"type", (const unsigned char*)content_type); /* free at:contentType field - no need to emit it */ if(content_type_field) { raptor_rss_field_free(content_type_field); item->fields[RAPTOR_RSS_FIELD_AT_CONTENT_TYPE] = NULL; } field->value = NULL; raptor_xml_element_set_attributes(predicate, predicate_attrs, 2); raptor_xml_writer_empty_element(xml_writer, predicate); } else { raptor_xml_writer_start_element(xml_writer, predicate); raptor_xml_writer_cdata_counted(xml_writer, ruri_string, (unsigned int)len); raptor_xml_writer_end_element(xml_writer, predicate); } raptor_free_memory(ruri_string); } else if(field->uri) { raptor_uri* enclosure_uri = field->uri; raptor_rss_item *enclosure_item = NULL; int i; if(f == RAPTOR_RSS_FIELD_ENCLOSURE && item_type == RAPTOR_RSS_ITEM) { int size = raptor_sequence_size(rss_serializer->enclosures); for(i = 0; i < size; i++) { enclosure_item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->enclosures, i); if(enclosure_item->uri && raptor_uri_equals(enclosure_uri, enclosure_item->uri)) break; } if(enclosure_item) { int attr_count = 0; unsigned char* ruri_string; attrs = RAPTOR_CALLOC(raptor_qname**, 3, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string(base_uri, field->uri); attrs[attr_count] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"resource", ruri_string); raptor_free_memory(ruri_string); attr_count++; if(enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_TYPE] && enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_TYPE]->value) { attrs[attr_count] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->nspaces[RSS2_0_ENC_NS], (const unsigned char*)raptor_rss_fields_info[RAPTOR_RSS_RDF_ENCLOSURE_TYPE].name, (const unsigned char*)enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_TYPE]->value); attr_count++; } if(enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH] && enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH]->value) { attrs[attr_count] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->nspaces[RSS2_0_ENC_NS], (const unsigned char*)raptor_rss_fields_info[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH].name, (const unsigned char*)enclosure_item->fields[RAPTOR_RSS_RDF_ENCLOSURE_LENGTH]->value); attr_count++; } raptor_xml_element_set_attributes(predicate, attrs, attr_count); } else { RAPTOR_DEBUG2("Enclosure item with URI %s could not be found in list of enclosures\n", raptor_uri_as_string(enclosure_uri)); } } else { unsigned char* ruri_string; /* not an rss:item with an rss:enclosure field */ attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); ruri_string = raptor_uri_to_relative_uri_string(base_uri, field->uri); attrs[0] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"resource", ruri_string); raptor_free_memory(ruri_string); raptor_xml_element_set_attributes(predicate, attrs, 1); } raptor_xml_writer_empty_element(xml_writer, predicate); } else if(field->value) { /* not a URI, must be a literal */ int is_xhtml_content = field->is_xml; int prefer_cdata = (!is_atom && f == RAPTOR_RSS_FIELD_CONTENT_ENCODED); if(is_xhtml_content && !prefer_cdata) { raptor_qname **predicate_attrs = NULL; predicate_attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); if(is_atom) predicate_attrs[0] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, NULL, (const unsigned char*)"type", (const unsigned char*)"xhtml"); else predicate_attrs[0] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->default_nspace, (const unsigned char*)"parseType", (const unsigned char*)"Literal"); raptor_xml_element_set_attributes(predicate, predicate_attrs, 1); } raptor_xml_writer_start_element(xml_writer, predicate); if(is_xhtml_content) { if(prefer_cdata) raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"<![CDATA[", 9); raptor_xml_writer_raw(xml_writer, (const unsigned char*)field->value); if(prefer_cdata) raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"]]>", 3); } else raptor_xml_writer_cdata(xml_writer, (const unsigned char*)field->value); raptor_xml_writer_end_element(xml_writer, predicate); } else { RAPTOR_DEBUG3("Field %d - %s had no URI or literal value\n", f, raptor_rss_fields_info[f].name); } raptor_free_xml_element(predicate); } } if(item_type == RAPTOR_RSS_CHANNEL) { if(is_atom) raptor_rss10_emit_atom_feed(serializer, item); if(!is_atom) raptor_rss10_emit_rss_items(serializer); } /* Add an RDF/XML block with remaining triples if Atom */ if(item->triples && raptor_sequence_size(item->triples)) raptor_rss10_emit_rdfxml_item_triples(serializer, item); if(emit_container) { raptor_xml_writer_end_element(xml_writer, element); raptor_free_xml_element(element); } } /** * raptor_rss10_serialize_end: * @serializer: serializer object * * INTERNAL (raptor_serializer_factory API) - End a serializing * * Return value: non-0 on failure */ static int raptor_rss10_serialize_end(raptor_serializer* serializer) { raptor_rss10_serializer_context *rss_serializer; raptor_rss_model* rss_model; int i; raptor_xml_writer* xml_writer; #ifdef RAPTOR_DEBUG int triple_count = 0; #endif int is_atom; raptor_qname **attrs = NULL; int attrs_count = 0; raptor_uri* entry_uri = NULL; raptor_rss_item* entry_item = NULL; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; rss_model = &rss_serializer->model; is_atom = rss_serializer->is_atom; raptor_rss10_build_items(rss_serializer); raptor_rss10_move_leftover_statements(rss_serializer); raptor_rss10_move_anonymous_statements(rss_serializer); if(is_atom) { char* entry_uri_string; raptor_rss10_ensure_atom_feed_valid(rss_serializer); raptor_rss10_remove_mapped_fields(rss_serializer); entry_uri_string = RAPTOR_OPTIONS_GET_STRING(serializer, RAPTOR_OPTION_ATOM_ENTRY_URI); if(entry_uri_string) { int size = raptor_sequence_size(rss_serializer->items); entry_uri = raptor_new_uri(rss_serializer->world, (const unsigned char*)entry_uri_string); for(i = 0; i < size; i++) { raptor_rss_item* item; item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); if(raptor_uri_equals(item->uri, entry_uri)) { entry_item = item; break; } } if(!entry_item) { RAPTOR_DEBUG2("Entry URI %s was not found in list of items\n", raptor_uri_as_string(entry_uri)); raptor_free_uri(entry_uri); entry_uri = NULL; } } } #ifdef RAPTOR_DEBUG if(1) { int size = raptor_sequence_size(rss_serializer->triples); for(i = 0; i < size; i++) { raptor_statement* t; t = (raptor_statement*)raptor_sequence_get_at(rss_serializer->triples, i); if(t) { fprintf(stderr, " %d: ", i); raptor_statement_print(t, stderr); fputc('\n', stderr); triple_count++; } } RAPTOR_DEBUG2("Starting with %d stored triples\n", triple_count); } #endif if(!rss_model->common[RAPTOR_RSS_CHANNEL]) { raptor_log_error(serializer->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "No RSS channel found"); if(entry_uri) raptor_free_uri(entry_uri); return 1; } if(rss_serializer->xml_writer) raptor_free_xml_writer(rss_serializer->xml_writer); xml_writer = raptor_new_xml_writer(rss_serializer->world, rss_serializer->nstack, serializer->iostream); rss_serializer->xml_writer = xml_writer; raptor_xml_writer_set_option(xml_writer, RAPTOR_OPTION_WRITER_AUTO_INDENT, NULL, 1); raptor_xml_writer_set_option(xml_writer, RAPTOR_OPTION_WRITER_AUTO_EMPTY, NULL, 1); raptor_rss10_build_xml_names(serializer, (is_atom && entry_uri)); if(serializer->base_uri && RAPTOR_OPTIONS_GET_NUMERIC(serializer, RAPTOR_OPTION_WRITE_BASE_URI)) { const unsigned char* base_uri_string; attrs = RAPTOR_CALLOC(raptor_qname**, 1, sizeof(raptor_qname*)); base_uri_string = raptor_uri_as_string(serializer->base_uri); attrs[attrs_count++] = raptor_new_qname_from_namespace_local_name(rss_serializer->world, rss_serializer->xml_nspace, (const unsigned char*)"base", base_uri_string); } if(attrs_count) raptor_xml_element_set_attributes(rss_serializer->root_element, attrs, attrs_count); else raptor_xml_element_set_attributes(rss_serializer->root_element, NULL, 0); raptor_xml_writer_start_element(xml_writer, rss_serializer->root_element); if(entry_item) { RAPTOR_DEBUG1("Emitting entry\n"); raptor_rss10_emit_item(serializer, entry_item, RAPTOR_RSS_ITEM, 0); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } else { i = RAPTOR_RSS_CHANNEL; RAPTOR_DEBUG3("Emitting type %i - %s\n", i, raptor_rss_items_info[i].name); raptor_rss10_emit_item(serializer, rss_model->common[i], i, !is_atom); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); if(rss_model->items_count) { int size = raptor_sequence_size(rss_serializer->items); for(i = 0; i < size; i++) { raptor_rss_item* item; item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i); raptor_rss10_emit_item(serializer, item, RAPTOR_RSS_ITEM, 1); raptor_xml_writer_raw_counted(xml_writer, (const unsigned char*)"\n", 1); } } for(i = RAPTOR_RSS_CHANNEL + 1; i < RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; if(is_atom) { /* atom 1.0 only serializes rss:item (channel is done above) */ if(i != RAPTOR_RSS_ITEM) continue; } else { /* rss 1.0 ignores atom:author for now - FIXME */ if(i == RAPTOR_ATOM_AUTHOR) continue; } for(item = rss_model->common[i]; item; item = item->next) { RAPTOR_DEBUG3("Emitting type %i - %s\n", i, raptor_rss_items_info[i].name); raptor_rss10_emit_item(serializer, item, i, 1); } } } if(entry_uri) raptor_free_uri(entry_uri); raptor_xml_writer_end_element(xml_writer, rss_serializer->root_element); raptor_free_xml_element(rss_serializer->root_element); raptor_xml_writer_newline(xml_writer); raptor_xml_writer_flush(xml_writer); return 0; } /* add a namespace */ static int raptor_rss10_serialize_declare_namespace_from_namespace(raptor_serializer* serializer, raptor_namespace *nspace) { raptor_rss10_serializer_context* rss_serializer; int i; int size; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; size = raptor_sequence_size(rss_serializer->user_namespaces); for(i = 0; i < size; i++) { raptor_namespace* ns; ns = (raptor_namespace*)raptor_sequence_get_at(rss_serializer->user_namespaces, i); /* If prefix is already declared, ignore it */ if(!ns->prefix && !nspace->prefix) return 1; if(ns->prefix && nspace->prefix && !strcmp((const char*)ns->prefix, (const char*)nspace->prefix)) return 1; if(ns->uri && nspace->uri && raptor_uri_equals(ns->uri, nspace->uri)) return 1; } nspace = raptor_new_namespace_from_uri(rss_serializer->nstack, nspace->prefix, nspace->uri, 0); if(!nspace) return 1; raptor_sequence_push(rss_serializer->user_namespaces, nspace); return 0; } /* add a namespace */ static int raptor_rss10_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { raptor_rss10_serializer_context* rss_serializer; raptor_namespace *ns; int rc; rss_serializer = (raptor_rss10_serializer_context*)serializer->context; ns = raptor_new_namespace_from_uri(rss_serializer->nstack, prefix, uri, 0); rc = raptor_rss10_serialize_declare_namespace_from_namespace(serializer, ns); raptor_free_namespace(ns); return rc; } /** * raptor_rss10_serialize_finish_factory: * @factory: serializer factory * * INTERNAL (raptor_serializer_factory API) - finish the serializer factory */ static void raptor_rss10_serialize_finish_factory(raptor_serializer_factory* factory) { } static const char* rss10_names[3] = { "rss-1.0", NULL}; static const char* const rss10_uri_strings[2] = { "http://purl.org/rss/1.0/spec", NULL }; #define RSS10_TYPES_COUNT 5 static const raptor_type_q rss10_types[RSS10_TYPES_COUNT + 1] = { { "application/rss+xml", 19, 10}, { "application/rss", 15, 3}, { "text/rss", 8, 3}, { "application/xml", 15, 3}, { "text/xml", 8, 3}, { NULL, 0, 0} }; static int raptor_rss10_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = rss10_names; factory->desc.mime_types = rss10_types; factory->desc.label = "RSS 1.0"; factory->desc.uri_strings = rss10_uri_strings; factory->context_length = sizeof(raptor_rss10_serializer_context); factory->init = raptor_rss10_serialize_init; factory->terminate = raptor_rss10_serialize_terminate; factory->declare_namespace = raptor_rss10_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rss10_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rss10_serialize_start; factory->serialize_statement = raptor_rss10_serialize_statement; factory->serialize_end = raptor_rss10_serialize_end; factory->finish_factory = raptor_rss10_serialize_finish_factory; return 0; } static const char* atom_names[3] = { "atom", NULL}; static const char* const atom_uri_strings[2] = { "http://www.ietf.org/rfc/rfc4287.txt", NULL }; #define ATOM_TYPES_COUNT 1 static const raptor_type_q atom_types[ATOM_TYPES_COUNT + 1] = { { "application/atom+xml", 20, 10}, { NULL, 0, 0} }; static int raptor_atom_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = atom_names; factory->desc.mime_types = atom_types; factory->desc.label = "Atom 1.0"; factory->desc.uri_strings = atom_uri_strings; factory->context_length = sizeof(raptor_rss10_serializer_context); factory->init = raptor_rss10_serialize_init; factory->terminate = raptor_rss10_serialize_terminate; factory->declare_namespace = raptor_rss10_serialize_declare_namespace; factory->declare_namespace_from_namespace = raptor_rss10_serialize_declare_namespace_from_namespace; factory->serialize_start = raptor_rss10_serialize_start; factory->serialize_statement = raptor_rss10_serialize_statement; factory->serialize_end = raptor_rss10_serialize_end; factory->finish_factory = raptor_rss10_serialize_finish_factory; return 0; } int raptor_init_serializer_rss10(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_rss10_serializer_register_factory); } int raptor_init_serializer_atom(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_atom_serializer_register_factory); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/turtle_lexer.l�������������������������������������������������������������������0000644�0001750�0001750�00000076545�12425344315�013617� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_lexer.l - Raptor Turtle lexer - making tokens for turtle grammar generator * * Copyright (C) 2003-2013, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Turtle is defined in http://www.dajobe.org/2004/01/turtle/ * * To generate the C files from this source, rather than use the * shipped turtle_lexer.c/.h needs a patched version of flex 2.5.31 such * as the one available in Debian GNU/Linux. Details below * near the %option descriptions. * */ /* recognise 8-bits */ %option 8bit %option warn nodefault /* all symbols prefixed by this */ %option prefix="turtle_lexer_" /* This is not needed, flex is invoked -oturtle_lexer.c */ /* %option outfile="turtle_lexer.c" */ /* Emit a C header file for prototypes * Only available in flex 2.5.13 or newer. * It was renamed to header-file in flex 2.5.19 */ %option header-file="turtle_lexer.h" /* Do not emit #include <unistd.h> * Only available in flex 2.5.7 or newer. * Broken in flex 2.5.31 without patches. */ %option nounistd /* Never interactive */ /* No isatty() check */ %option never-interactive /* Batch scanner */ %option batch /* Never use yyunput */ %option nounput /* Supply our own alloc/realloc/free functions */ %option noyyalloc noyyrealloc noyyfree /* Re-entrant scanner */ %option reentrant %option extra-type="raptor_parser*" /* Makes yyget_lval() yyset_lval() and yylval appear */ %option bison-bridge /* Makes yyget_lloc() yyset_lloc() and yylloc appear */ /* %option bison-locations */ /* definitions */ %{ /* NOTE: These headers are NOT included here but are inserted by * fix-flex since otherwise it appears far too late in the generated C */ /* #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif #include "raptor2.h" #include "raptor_internal.h" #include <turtle_parser.h> #include <turtle_common.h> /* Prototypes */ static unsigned char *turtle_copy_token(unsigned char *text, size_t len); static unsigned char *turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim); void turtle_lexer_syntax_error(void* ctx, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif #if FLEX_VERSION_DECIMAL < 20536 /* debian flex 2.5.35-10.1 added these column header prototypes in * re-entrant mode. standard flex omits them */ void turtle_lexer_set_column(int column_no, yyscan_t yyscanner); int turtle_lexer_get_column(yyscan_t yyscanner); #endif static void turtle_lexer_cleanup(yyscan_t yyscanner); #ifdef HAVE_SETJMP static jmp_buf turtle_lexer_fatal_error_longjmp_env; /* fatal error handler declaration */ #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_FATAL, msg); \ longjmp(turtle_lexer_fatal_error_longjmp_env, 1); \ abort(); \ } while(0) #else #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_FATAL, msg); \ abort(); \ } while(0) #endif /* Remove the re-fill function since it should never be called */ #define YY_INPUT(buf,result,max_size) { return YY_NULL; } static void turtle_lexer_error(yyscan_t yyscanner, raptor_log_level level, yyconst char *message, ...) RAPTOR_PRINTF_FORMAT(3, 4); /* Fatal error handler that returns EOF instead of abort()/longjmp() * so that parser can clean up properly */ #define YY_FATAL_ERROR_EOF(msg) do { \ turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_FATAL, "%s", msg); \ yyterminate(); \ } while(0) /* Out-of-memory reporting macro */ #define TURTLE_LEXER_OOM() YY_FATAL_ERROR_EOF(turtle_lexer_oom_text) static char turtle_lexer_oom_text[]="turtle_lexer: Out of memory"; /* Do not need input() to to read from stdin */ #define YY_NO_INPUT 1 %} /* Tokens from Turtle 2013 spec - lex-ifyed to remove unicode ranges */ PN_CHARS_BASE [A-Za-z\x80-\xff] PN_CHARS {PN_CHARS_BASE}|"_"|"-"|[0-9] BS_ESCAPES [-_~\.!$&\'()*+,;=/?#@%] HEX [0-9A-Fa-f] PLX "%"{HEX}{HEX})|("\\"{BS_ESCAPES} LANGTAG "@"[A-Za-z][-A-Z_a-z0-9]* /* flex: only 1 level of definition expansion so have to expand PLX */ BN_LABEL ({PN_CHARS_BASE}|"_"|[0-9])(({PN_CHARS}|".")*({PN_CHARS}))* PN_PREFIX ({PN_CHARS_BASE})(({PN_CHARS}|".")*({PN_CHARS}))* PN_LOCAL ({PN_CHARS_BASE}|"_"|[0-9]|":"|{PLX})(({PN_CHARS}|"."|":"|{PLX})*({PN_CHARS}|":"|{PLX}))* QNAME {PN_PREFIX}?":"{PN_LOCAL}? UCHAR "\\u"{HEX}{HEX}{HEX}{HEX}|"\\U"{HEX}{HEX}{HEX}{HEX}{HEX}{HEX}{HEX}{HEX} IRI "<"([^\x00-\x20<>\"{}\|^`\\]|{UCHAR})*">" INTEGER [-+]?[0-9]+ DECIMAL [-+]?[0-9]*"."[0-9]+ DOUBLE [-+]?([0-9]+"."[0-9]*{EXPONENT}|"."[0-9]+{EXPONENT}|[0-9]+{EXPONENT}) EXPONENT [eE][+-]?[0-9]+ %x PREF LONG_DLITERAL LONG_SLITERAL %% /* rules */ %{ raptor_parser *rdf_parser = yyextra; raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; #ifdef HAVE_SETJMP if(setjmp(turtle_lexer_fatal_error_longjmp_env)) return 1; #endif %} \r\n|\r|\n { turtle_parser->lineno++; } [\ \t\v]+ { /* empty */ } "a" { return A; } "." { return DOT; } "," { return COMMA; } ";" { return SEMICOLON; } "[" { return LEFT_SQUARE; } "]" { return RIGHT_SQUARE; } "@prefix" { BEGIN(PREF); return PREFIX; } [Pp][Rr][Ee][Ff][Ii][Xx] { BEGIN(PREF); return SPARQL_PREFIX; } "@base" { return BASE; } [Bb][Aa][Ss][Ee] { return SPARQL_BASE; } "^^" { return HAT; } "(" { return LEFT_ROUND; } ")" { return RIGHT_ROUND; } "{" { return LEFT_CURLY; } "}" { return RIGHT_CURLY; } "true" { return TRUE_TOKEN; } "false" { return FALSE_TOKEN; } \"([^\"\\\n\r]|\\[^\n\r])*\" { yylval->string = turtle_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!yylval->string) yyterminate(); return STRING_LITERAL; } \'([^\'\\\n\r]|\\[^\n\r])*\' { yylval->string = turtle_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!yylval->string) yyterminate(); return STRING_LITERAL; } \"\"\" { BEGIN(LONG_DLITERAL); turtle_parser->sb = raptor_new_stringbuffer(); if(!turtle_parser->sb) TURTLE_LEXER_OOM(); } <LONG_DLITERAL>\"\"\" { size_t len; BEGIN(INITIAL); len = raptor_stringbuffer_length(turtle_parser->sb); yylval->string = RAPTOR_MALLOC(unsigned char*, len + 1); if(!yylval->string) TURTLE_LEXER_OOM(); raptor_stringbuffer_copy_to_string(turtle_parser->sb, (unsigned char*)yylval->string, len); yylval->string[len]='\0'; raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return STRING_LITERAL; } <LONG_DLITERAL>\"|(\\.|[^\"\\]|\n)* { char *p; if(*yytext == EOF) { BEGIN(INITIAL); turtle_syntax_error(rdf_parser, "End of file in middle of literal"); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return EOF; } for(p = yytext; *p; p++) { if(*p == '\n') turtle_parser->lineno++; } if(raptor_stringbuffer_append_turtle_string(turtle_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 0)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } <LONG_DLITERAL>\\ { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of \"\"\"literal\"\"\""); yyterminate(); } <LONG_DLITERAL><<EOF>> { BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of \"\"\"literal\"\"\""); yyterminate(); } \'\'\' { BEGIN(LONG_SLITERAL); turtle_parser->sb = raptor_new_stringbuffer(); if(!turtle_parser->sb) TURTLE_LEXER_OOM(); } <LONG_SLITERAL>\'\'\' { size_t len; BEGIN(INITIAL); len = raptor_stringbuffer_length(turtle_parser->sb); yylval->string = RAPTOR_MALLOC(unsigned char*, len + 1); if(!yylval->string) TURTLE_LEXER_OOM(); raptor_stringbuffer_copy_to_string(turtle_parser->sb, (unsigned char*)yylval->string, len); yylval->string[len]='\0'; raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return STRING_LITERAL; } <LONG_SLITERAL>\'|(\\.|[^\'\\]|\n)* { char *p; if(*yytext == EOF) { BEGIN(INITIAL); turtle_syntax_error(rdf_parser, "End of file in middle of \'\'\'literal\'\'\'"); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return EOF; } for(p = yytext; *p; p++) { if(*p == '\n') turtle_parser->lineno++; } if(raptor_stringbuffer_append_turtle_string(turtle_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 0)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } <LONG_SLITERAL>\\ { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of '''literal'''"); yyterminate(); } <LONG_SLITERAL><<EOF>> { BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of '''literal'''"); yyterminate(); } "_:"{BN_LABEL} { yylval->string = turtle_copy_token((unsigned char*)yytext+2, yyleng-2); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return BLANK_LITERAL; } {QNAME} { yylval->uri = turtle_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!yylval->uri) { turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_ERROR, "Failed to convert qname %s to URI", yytext); yyterminate(); } return QNAME_LITERAL; } {DECIMAL} { yylval->string = turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return DECIMAL_LITERAL; } {DOUBLE} { yylval->string = turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return FLOATING_LITERAL; } {INTEGER} { yylval->string = turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return INTEGER_LITERAL; } <PREF>[\ \t\v]+ { /* eat up leading whitespace */ } <PREF>{PN_PREFIX}":" { yylval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); BEGIN(INITIAL); return IDENTIFIER; } <PREF>":" { BEGIN(INITIAL); yylval->string = turtle_copy_token((unsigned char*)yytext, 0); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return IDENTIFIER; } <PREF>(.|\n) { BEGIN(INITIAL); if(*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } {IRI}[\ \t\v\r\n]*("=")?[\ \t\v\r\n]*"{" { raptor_stringbuffer* sb; unsigned char* uri_string; /* make length just the IRI */ while(yytext[yyleng - 1] != '>') yyleng--; sb = raptor_new_stringbuffer(); if(!sb) TURTLE_LEXER_OOM(); /* start at yytext + 1 to skip '<' and operate over * length-2 bytes to skip '<' and '>' */ if(raptor_stringbuffer_append_turtle_string(sb, (unsigned char*)yytext+1, yyleng-2, '>', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 1)) { raptor_free_stringbuffer(sb); YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } uri_string = raptor_stringbuffer_as_string(sb); if(!*uri_string) yylval->uri = raptor_uri_copy(rdf_parser->base_uri); else yylval->uri = raptor_new_uri_relative_to_base(rdf_parser->world, rdf_parser->base_uri, uri_string); raptor_free_stringbuffer(sb); if(!yylval->uri) TURTLE_LEXER_OOM(); return GRAPH_NAME_LEFT_CURLY; } {QNAME}[\ \t\v\r\n]*("=")?[\ \t\v\r\n]*"{" { while(1) { int c = yytext[yyleng - 1]; if(c == '{' || c == ' ' || c=='\t' || c == '\v' || c == '\n' || c == '=') { yyleng--; } else break; } yytext[yyleng] = '\0'; yylval->uri = turtle_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!yylval->uri) { turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_ERROR, "Failed to convert qname %s to URI", yytext); yyterminate(); } return GRAPH_NAME_LEFT_CURLY; } {IRI} { if(yyleng == 2) yylval->uri = raptor_uri_copy(rdf_parser->base_uri); else { raptor_stringbuffer* sb; unsigned char* uri_string; yytext[yyleng-1]='\0'; sb = raptor_new_stringbuffer(); if(!sb) TURTLE_LEXER_OOM(); if(raptor_stringbuffer_append_turtle_string(sb, (unsigned char*)yytext+1, yyleng-1, '>', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 1)) { raptor_free_stringbuffer(sb); YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } uri_string = raptor_stringbuffer_as_string(sb); yylval->uri = raptor_new_uri_relative_to_base(rdf_parser->world, rdf_parser->base_uri, uri_string); if(!yylval->uri) { raptor_free_stringbuffer(sb); TURTLE_LEXER_OOM(); } raptor_free_stringbuffer(sb); } return URI_LITERAL; } {LANGTAG} { yylval->string = turtle_copy_token((unsigned char*)yytext+1, yyleng-1); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return LANGTAG; } \#[^\r\n]*(\r\n|\r|\n) { /* # comment */ turtle_parser->lineno++; } \#[^\r\n]* { /* # comment on the last line with no terminating newline */ } . { if(*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } %% /* user code */ int yywrap (yyscan_t yyscanner) { return 1; } static unsigned char * turtle_copy_token(unsigned char *text, size_t len) { unsigned char *s; if(!len) len = strlen((const char*)text); s = RAPTOR_MALLOC(unsigned char*, len + 1); if(s) { memcpy(s, text, len); s[len] = '\0'; } return s; } static unsigned char * turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *string, size_t len, int delim) { raptor_stringbuffer* sb = NULL; int rc; if(len) { sb = raptor_new_stringbuffer(); if(!sb) return NULL; rc = raptor_stringbuffer_append_turtle_string(sb, string, len, delim, (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 0); if(rc) { raptor_free_stringbuffer(sb); return NULL; } len = raptor_stringbuffer_length(sb); } string = RAPTOR_MALLOC(unsigned char*, len + 1); if(string) { if(sb) raptor_stringbuffer_copy_to_string(sb, string, len+1); string[len]='\0'; } if(sb) raptor_free_stringbuffer(sb); return string; } void turtle_lexer_syntax_error(void* ctx, const char *message, ...) { raptor_parser* rdf_parser = (raptor_parser *)ctx; raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; va_list arguments; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_log_error_varargs(((raptor_parser*)rdf_parser), RAPTOR_LOG_LEVEL_ERROR, message, arguments); va_end(arguments); } /* * turtle_lexer_error: * @yyscanner: scanner object * @level: log level RAPTOR_LOG_LEVEL_FATAL otherwise error * @message: erro message * * INTERNAL - replacement for the generated error handler. */ static void turtle_lexer_error(yyscan_t yyscanner, raptor_log_level level, yyconst char *message, ...) { raptor_parser *rdf_parser = NULL; va_list arguments; va_start(arguments, message); if(yyscanner) rdf_parser = (raptor_parser*)turtle_lexer_get_extra(yyscanner); /* This handles NULL rdf_parser properly */ raptor_parser_log_error_varargs(rdf_parser, level, message, arguments); va_end(arguments); } /* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking * - fixes lexer memory leak when ensure_buffer_stack fails */ #ifdef LEXER_ALLOC_TRACKING typedef struct { /* Number of void* slots allocated */ int lexer_allocs_size; /* Allocted void* slots follow in memory after this header */ } lexer_alloc_tracker_header; /* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */ static const int initial_lexer_allocs_size = 2; #endif /* * turtle_lexer_cleanup: * @yyscanner: * * INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled. */ static void turtle_lexer_cleanup(yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; if(!yyscanner) return; rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs = (void**)&tracker[1]; for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]) free(lexer_allocs[i]); lexer_allocs[i] = NULL; } free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data = NULL; #endif } /* * turtle_lexer_alloc: * @size * @yyscanner * * INTERNAL - alloc replacement. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_alloc(yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *ptr; /* yyscanner not initialized -> probably initializing yyscanner itself * -> just malloc without tracking */ if(!yyscanner) return malloc(size); rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized"); /* try to allocate tracker if it does not exist */ tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) { /* allocate tracker header + array of void* slots */ tracker = (lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*)); if(!tracker) YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker"); tracker->lexer_allocs_size = initial_lexer_allocs_size; rdf_parser->lexer_user_data = (void *)tracker; } lexer_allocs = (void**)&tracker[1]; /* allocate memory */ ptr = malloc(size); /* find a free slot for ptr */ for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(!lexer_allocs[i]) { lexer_allocs[i] = ptr; break; } } /* no free slots -> grow tracker slot array */ if(i>=tracker->lexer_allocs_size) { int j; void **dest; tracker = (lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*)); if(!tracker) { if(ptr) free(ptr); YY_FATAL_ERROR("lexer_alloc: cannot grow tracker"); } tracker->lexer_allocs_size = i*2; /* copy data from old tracker */ dest = (void**)&tracker[1]; for(j = 0; j < i; ++j) { dest[j] = lexer_allocs[j]; } /* set new item to first free slot */ dest[j] = ptr; /* free old tracker and replace with new one */ free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data = tracker; } return ptr; #else return malloc(size); #endif } /* * turtle_lexer_realloc: * * INTERNAL - realloc replacement * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *newptr; if(!yyscanner) YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized"); rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized"); tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) YY_FATAL_ERROR("lexer_realloc: no alloc tracker"); lexer_allocs = (void**)&tracker[1]; /* find the old slot for ptr */ for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i] == ptr) break; } /* no old slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_realloc: cell not in tracker"); /* realloc */ newptr = realloc((char*)ptr, size); /* replace entry in tracker */ lexer_allocs[i] = newptr; return newptr; #else return realloc((char*)ptr, size); #endif } /* * turtle_lexer_free: * * INTERNAL - free replacement. * Checks for NULL pointer to be freed unlike the default lexer free function. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void turtle_lexer_free(void *ptr, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; /* do not free NULL */ if(!ptr) return; /* free ptr even if we would encounter an error */ free(ptr); /* yyscanner is allocated with turtle_lexer_alloc() but it's never stored in the tracker * - we need yyscanner to access the tracker */ if(!yyscanner || ptr == yyscanner) return; rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs = (void**)&tracker[1]; /* find the slot for ptr */ for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i] == ptr) break; } /* no slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_free: cell not in tracker"); /* remove entry from tracker */ lexer_allocs[i] = NULL; #else if(ptr) free(ptr); #endif } #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval) { static char buffer[2048]; if(!token) return "<<EOF>>"; switch(token) { case PREFIX: return "PREFIX"; case BASE: return "BASE"; case A: return "A"; case DOT: return "DOT"; case COMMA: return "COMMA"; case SEMICOLON: return "SEMICOLON"; case LEFT_SQUARE: return "LEFT_SQUARE"; case RIGHT_SQUARE: return "RIGHT_SQUARE"; case HAT: return "HAT"; case STRING_LITERAL: sprintf(buffer, "STRING_LITERAL(%s)", lval->string); return buffer; case URI_LITERAL: sprintf(buffer, "URI_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string(lval->uri) : "")); return buffer; case BLANK_LITERAL: sprintf(buffer, "BLANK_LITERAL(%s)", lval->string); return buffer; case QNAME_LITERAL: sprintf(buffer, "QNAME_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string(lval->uri) : "")); return buffer; case INTEGER_LITERAL: sprintf(buffer, "INTEGER_LITERAL(%s)", lval->string); return buffer; case FLOATING_LITERAL: sprintf(buffer, "FLOATING_LITERAL(%s)", lval->string); return buffer; case IDENTIFIER: sprintf(buffer, "IDENTIFIER(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case LANGTAG: sprintf(buffer, "LANGTAG(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case DECIMAL_LITERAL: sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string); return buffer; case ERROR_TOKEN: return "ERROR"; case LEFT_CURLY: return "{"; case RIGHT_CURLY: return "}"; case GRAPH_NAME_LEFT_CURLY: return "GRAPH_NAME {"; default: RAPTOR_DEBUG2("UNKNOWN token %d - add a new case\n", token); return "(UNKNOWN)"; } } #endif void turtle_token_free(raptor_world* world, int token, YYSTYPE *lval) { if(!token) return; switch(token) { case STRING_LITERAL: case BLANK_LITERAL: case IDENTIFIER: if(lval->string) RAPTOR_FREE(char*, lval->string); break; case URI_LITERAL: case QNAME_LITERAL: if(lval->uri) raptor_free_uri(lval->uri); break; default: break; } } #ifdef STANDALONE #define FILE_READ_BUF_SIZE 4096 int main(int argc, char *argv[]) { char *turtle_string = NULL; raptor_parser rdf_parser; raptor_turtle_parser turtle_parser; yyscan_t scanner; int token = EOF; YYSTYPE lval; const unsigned char *uri_string; const char *filename = NULL; char *buf = NULL; size_t len; raptor_world* world; FILE *fh; world = raptor_new_world(); if(argc > 1) { filename = argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh = (FILE*)stdin; } turtle_string = RAPTOR_CALLOC(char*, FILE_READ_BUF_SIZE, 1); fread(turtle_string, FILE_READ_BUF_SIZE, 1, fh); fclose(fh); memset(&rdf_parser, 0, sizeof(rdf_parser)); memset(&turtle_parser, 0, sizeof(turtle_parser)); rdf_parser.world = world; /* discard namespace errors - caused by not interpreting @prefix * and hence causing failed qname construction */ raptor_namespaces_init(rdf_parser.world, &turtle_parser.namespaces, 0); yylex_init(&turtle_parser.scanner); scanner = turtle_parser.scanner; len = strlen(RAPTOR_GOOD_CAST(const char*, turtle_string)); buf = RAPTOR_MALLOC(char*, len + 3); memcpy(buf, turtle_string, len); buf[len] = ' '; buf[len + 1] = buf[len + 2] = '\0'; /* YY_END_OF_BUFFER_CHAR; */ (void)turtle_lexer__scan_buffer(buf, len + 3, scanner); turtle_lexer_set_extra(&rdf_parser, scanner); /* Initialise enough of the parser and locator to get error messages */ rdf_parser.context = &turtle_parser; turtle_parser.lineno = 1; rdf_parser.locator.file = filename; rdf_parser.locator.column = -1; uri_string = raptor_uri_filename_to_uri_string(filename); rdf_parser.base_uri = raptor_new_uri(world, uri_string); RAPTOR_FREE(char*, uri_string); while(1) { memset(&lval, 0, sizeof(YYSTYPE)); if(turtle_lexer_get_text(scanner) != NULL) printf("yyinput '%s'\n", turtle_lexer_get_text(scanner)); token = yylex(&lval, scanner); #ifdef RAPTOR_DEBUG printf("token %s\n", turtle_token_print(world, token, &lval)); #else printf("token %d\n", token); #endif turtle_token_free(world, token, &lval); if(!token || token == EOF || token == ERROR_TOKEN) break; } if(buf) RAPTOR_FREE(char*, buf); yylex_destroy(scanner); raptor_namespaces_clear(&turtle_parser.namespaces); raptor_free_uri(rdf_parser.base_uri); RAPTOR_FREE(char*, turtle_string); raptor_free_world(world); if(token == ERROR_TOKEN) return 1; return 0; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_rfc2396.c�����������������������������������������������������������������0000644�0001750�0001750�00000060621�12365014231�013533� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rfc2396.c - Raptor URI resolving from RFC2396 and RFC3986 * * Copyright (C) 2004-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE /** * raptor_new_uri_detail: * @uri_string: The URI string to split * * Create a URI detailed structure from a URI string. * **/ raptor_uri_detail* raptor_new_uri_detail(const unsigned char *uri_string) { const unsigned char *s = NULL; unsigned char *b = NULL; raptor_uri_detail *ud; size_t uri_len; if(!uri_string) return NULL; uri_len = strlen((const char*)uri_string); /* The extra +5 is for the 5 \0s that may be added for each component * even if the entire URI is empty */ ud = RAPTOR_CALLOC(raptor_uri_detail*, 1, sizeof(*ud) + uri_len + 5 + 1); if(!ud) return NULL; ud->uri_len = uri_len; ud->buffer = (unsigned char*)((unsigned char*)ud + sizeof(raptor_uri_detail)); s = uri_string; b = ud->buffer; /* Split the URI into it's syntactic components */ /* * scheme is checked in more detail since it is important * to recognise absolute URIs for resolving, and it is easy to do. * * scheme = alpha *( alpha | digit | "+" | "-" | "." ) * RFC 2396 section 3.1 Scheme Component */ if(*s && isalpha((int)*s)) { s++; while(*s && (isalnum((int)*s) || (*s == '+') || (*s == '-') || (*s == '.'))) s++; if(*s == ':') { /* it matches the URI scheme grammar, so store this as a scheme */ ud->scheme = b; ud->scheme_len = s-uri_string; while(*uri_string != ':') *b++ = *uri_string++; *b++ = '\0'; /* and move past the : */ s++; } else s = uri_string; } /* authority */ if(*s && s[1] && *s == '/' && s[1] == '/') { ud->authority = b; s += 2; /* skip "//" */ while(*s && *s != '/' && *s != '?' && *s != '#') *b++ = *s++; ud->authority_len = b-ud->authority; *b++ = '\0'; } /* path */ if(*s && *s != '?' && *s != '#') { ud->path = b; while(*s && *s != '?' && *s != '#') *b++ = *s++; ud->path_len = b-ud->path; *b++ = '\0'; } /* query */ if(*s && *s == '?') { ud->query = b; s++; while(*s && *s != '#') *b++ = *s++; ud->query_len = b-ud->query; *b++ = '\0'; } /* fragment identifier - RFC2396 Section 4.1 */ if(*s && *s == '#') { ud->fragment = b; s++; while(*s) *b++ = *s++; ud->fragment_len = b-ud->fragment; *b='\0'; } ud->is_hierarchical = (ud->path && *ud->path == '/'); return ud; } void raptor_free_uri_detail(raptor_uri_detail* uri_detail) { /* Also frees the uri_detail->buffer allocated in raptor_uri_parse() */ RAPTOR_FREE(raptor_uri_detail, uri_detail); } unsigned char* raptor_uri_detail_to_string(raptor_uri_detail *ud, size_t* len_p) { size_t len = 0; unsigned char *buffer, *p; if(ud->scheme) len+= ud->scheme_len+1; /* : */ if(ud->authority) len+= 2 + ud->authority_len; /* // */ if(ud->path) len+= ud->path_len; if(ud->fragment) len+= 1 + ud->fragment_len; /* # */ if(ud->query) len+= 1 + ud->query_len; /* ? */ if(len_p) *len_p=len; buffer = RAPTOR_MALLOC(unsigned char*, len + 1); if(!buffer) return NULL; p = buffer; if(ud->scheme) { unsigned char *src = ud->scheme; while(*src) *p++ = *src++; *p++ = ':'; } if(ud->authority) { unsigned char *src = ud->authority; *p++ = '/'; *p++ = '/'; while(*src) *p++ = *src++; } if(ud->path) { unsigned char *src = ud->path; while(*src) *p++ = *src++; } if(ud->fragment) { unsigned char *src = ud->fragment; *p++ = '#'; while(*src) *p++ = *src++; } if(ud->query) { unsigned char *src = ud->query; *p++ = '?'; while(*src) *p++ = *src++; } *p='\0'; return buffer; } /* * raptor_uri_normalize_path: * @path_buffer: URI/file path * @path_len: length of above * * INTERNAL - normalize a URI path (POSIX path too) * * Return value: new path length or 0 on failure */ size_t raptor_uri_normalize_path(unsigned char* path_buffer, size_t path_len) { unsigned char *p, *cur, *prev, *s; unsigned char last_char; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 RAPTOR_DEBUG3("Input path \"%s\" (%zu)\n", (const char*)path_buffer, path_len); #endif /* remove all "./" path components */ for(p = (prev = path_buffer); *p; p++) { if(*p != '/') continue; if(p == (prev+1) && *prev == '.') { unsigned char *dest = prev; p++; while(*p) *dest++ = *p++; *dest= '\0'; p = prev; path_len -= 2; if(!*p) break; } else { prev = p+1; } } if(p == (prev+1) && *prev == '.') { /* Remove "." at the end of a path */ *prev = '\0'; path_len--; } #if defined(RAPTOR_DEBUG) if(path_len != strlen((const char*)path_buffer)) RAPTOR_FATAL4("Path '%s' length %ld does not match calculated %ld.", (const char*)path_buffer, (long)strlen((const char*)path_buffer), (long)path_len); #endif /* Remove all "<component>/../" path components */ /* * The pointers: * <component>/../<next> * prev-^ cur-^ * and p points to the previous prev (can be NULL) */ prev = NULL; cur = NULL; p = NULL; last_char='\0'; for(s = path_buffer; *s; last_char=*s++) { /* find the path components */ if(*s != '/') { /* If it is the start or following a /, record a new path component */ if(!last_char || last_char == '/') { /* Store 2 path components */ if(!prev) prev = s; else if(!cur) cur = s; } continue; } /* Wait till there are two path components */ if(!prev || !cur) continue; #if defined(RAPTOR_DEBUG) if(path_len != strlen((const char*)path_buffer)) RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", (long)strlen((const char*)path_buffer), (long)path_len); #endif /* If the current one is '..' */ if(s == (cur+2) && cur[0] == '.' && cur[1] == '.') { /* and if the previous one isn't '..' * (which means it is beyond the root such as a path "/foo/../..") */ if(cur != (prev+3) || prev[0] != '.' || prev[1] != '.') { unsigned char *dest = prev; /* remove the <component>/../<next> * prev-^ cur-^ ^-s */ size_t len = s-prev+1; /* length of path component we are removing */ s++; while(*s) *dest++ = *s++; *dest = '\0'; path_len -= len; if(p && p < prev) { /* We know the previous prev path component and we didn't do * two adjustments in a row, so can adjust the * pointers to continue the newly shortened path: * s to the / before <next> (autoincremented by the loop) * prev to the previous prev path component * cur to NULL. Will be set by the next loop iteration since s * points to a '/', last_char will be set to *s. */ s = prev-1; prev = p; cur = NULL; p = NULL; } else { /* Otherwise must start from the beginning again */ prev = NULL; cur = NULL; p = NULL; s = path_buffer; } } } else { /* otherwise this is not a special path component so * shift the path components stack */ p = prev; prev = cur; cur = NULL; } } if(prev && s == (cur+2) && cur[0] == '.' && cur[1] == '.') { /* Remove <component>/.. at the end of the path */ *prev = '\0'; path_len -= (s-prev); } #if defined(RAPTOR_DEBUG) if(path_len != strlen((const char*)path_buffer)) RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", (long)strlen((const char*)path_buffer), (long)path_len); #endif /* RFC3986 Appendix C.2 / 5.4.2 Abnormal Examples * Remove leading /../ and /./ */ for(p = path_buffer; p; ) { if(!strncmp((const char *)p, "/../", 4)) { path_len -= 3; memmove(p, p+3, path_len+1); } else if(!strncmp((const char *)p, "/./", 3)) { path_len -= 2; memmove(p, p+2, path_len+1); } else break; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 fprintf(stderr, " Normalized path \"%s\" (%zu)\n", path_buffer, path_len); #endif return path_len; } /** * raptor_uri_resolve_uri_reference: * @base_uri: Base URI string * @reference_uri: Reference URI string * @buffer: Destination URI output buffer * @length: Length of destination output buffer * * Resolve a URI against a base URI to create a new absolute URI. * * Return value: length of resolved string or 0 on failure (such as @buffer too small) **/ size_t raptor_uri_resolve_uri_reference(const unsigned char *base_uri, const unsigned char *reference_uri, unsigned char *buffer, size_t length) { raptor_uri_detail *ref = NULL; raptor_uri_detail *base = NULL; raptor_uri_detail result; /* static - pointers go to inside ref or base */ unsigned char *path_buffer = NULL; unsigned char *p; size_t result_len = 0; size_t l; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 RAPTOR_DEBUG4("base uri='%s', reference_uri='%s, buffer size %d\n", (base_uri ? (const char*)base_uri : "NULL"), (reference_uri ? (const char*)reference_uri : "NULL"), (int)length); #endif *buffer = '\0'; memset(&result, 0, sizeof(result)); ref = raptor_new_uri_detail(reference_uri); if(!ref) goto resolve_tidy; /* is reference URI "" or "#frag"? */ if(!ref->scheme && !ref->authority && !ref->path && !ref->query) { unsigned char c; /* Copy base URI to result up to '\0' or '#' */ for(p = buffer, l = length; (c = *base_uri) && c != '#' && l; p++, base_uri++, l--) *p = c; if(!l) { result_len = 0; goto resolve_tidy; } *p = '\0'; if(ref->fragment) { unsigned char *src = ref->fragment; /* Append any fragment */ *p++ = '#'; while(*src && l) { *p++ = *src++; l--; } if(!l) { result_len = 0; goto resolve_tidy; } *p = '\0'; } result_len = p - buffer; goto resolve_tidy; } /* reference has a scheme - is an absolute URI */ if(ref->scheme) { /* Copy over schema and authority */ result.scheme = ref->scheme; result.scheme_len = ref->scheme_len; result.authority = ref->authority; result.authority_len = ref->authority_len; /* Allocate path so it can be normalized below */ result.path_len = ref->path_len; path_buffer = RAPTOR_MALLOC(unsigned char*, result.path_len + 1); if(!path_buffer) { result_len = 0; goto resolve_tidy; } if(ref->path_len) memcpy(path_buffer, ref->path, ref->path_len); path_buffer[result.path_len] = '\0'; result.path = path_buffer; goto normalize; } /* now the reference URI must be schemeless, i.e. relative */ base = raptor_new_uri_detail(base_uri); if(!base) goto resolve_tidy; /* result URI must be of the base URI scheme */ result.scheme = base->scheme; result.scheme_len = base->scheme_len; /* an authority is given ( [user:pass@]hostname[:port] for http) * so the reference URI is like //authority */ if(ref->authority) { result.authority = ref->authority; result.authority_len = ref->authority_len; result.path = ref->path; result.path_len = ref->path_len; goto resolve_end; } /* no - so now we have path (maybe with query, fragment) relative to base */ result.authority = base->authority; result.authority_len = base->authority_len; if(ref->is_hierarchical || !base->is_hierarchical) { /* if the reference path is absolute OR the base URI * is a non-hierarchical URI then just copy the reference path * to the result and normalize. */ path_buffer = RAPTOR_MALLOC(unsigned char*, ref->path_len + 1); if(!path_buffer) { result_len = 0; goto resolve_tidy; } result.path = path_buffer; result.path_len = ref->path_len; if(ref->path) memcpy(path_buffer, ref->path, result.path_len); path_buffer[result.path_len] = '\0'; goto normalize; } /* need to resolve relative path */ /* Build the result path in path_buffer */ result.path_len = 0; if(base->path) result.path_len += base->path_len; else { /* Add a missing path - makes the base URI 1 character longer */ base->path = (unsigned char*)"/"; /* static, but copied and not free()d */ base->path_len = 1; base->uri_len++; result.path_len++; } if(ref->path) result.path_len += ref->path_len; /* the resulting path can be no longer than result.path_len */ path_buffer = RAPTOR_MALLOC(unsigned char*, result.path_len + 1); if(!path_buffer) { result_len = 0; goto resolve_tidy; } result.path = path_buffer; *path_buffer = '\0'; if(!ref->path) { /* If there is no reference path, copy the full base over */ result.path_len = base->path_len; memcpy(path_buffer, base->path, result.path_len); } else { /** Otherwise copy base path up to previous / and append ref path */ for(p = base->path + base->path_len - 1; p > base->path && *p != '/'; p--) ; if(p >= base->path) { result.path_len = p-base->path + 1; /* Found a /, copy everything before that to path_buffer */ memcpy(path_buffer, base->path, result.path_len); path_buffer[result.path_len] = '\0'; } memcpy(path_buffer + result.path_len, ref->path, ref->path_len + 1); result.path_len += ref->path_len; } path_buffer[result.path_len] = '\0'; normalize: result.path_len = raptor_uri_normalize_path(path_buffer, result.path_len); resolve_end: if(ref->query) { result.query = ref->query; result.query_len = ref->query_len; } if(ref->fragment) { result.fragment = ref->fragment; result.fragment_len = ref->fragment_len; } l = 0; if(result.scheme) l = result.scheme_len + 1; if(result.authority) l += 2 + result.authority_len; if(result.path) l += result.path_len; if(result.query) l += 1 + result.query_len; if(result.fragment) l += 1 + result.fragment_len; if(l > length) { /* Output buffer is too small */ result_len = 0; goto resolve_tidy; } p = buffer; if(result.scheme) { memcpy(p, result.scheme, result.scheme_len); p += result.scheme_len; *p++ = ':'; } if(result.authority) { *p++ = '/'; *p++ = '/'; memcpy(p, result.authority, result.authority_len); p+= result.authority_len; } if(result.path) { memcpy(p, result.path, result.path_len); p+= result.path_len; } if(result.query) { *p++ = '?'; memcpy(p, result.query, result.query_len); p+= result.query_len; } if(result.fragment) { *p++ = '#'; memcpy(p, result.fragment, result.fragment_len); p+= result.fragment_len; } *p = '\0'; result_len = p - buffer; resolve_tidy: if(path_buffer) RAPTOR_FREE(char*, path_buffer); if(base) raptor_free_uri_detail(base); if(ref) raptor_free_uri_detail(ref); #ifdef RAPTOR_DEBUG RAPTOR_ASSERT(result_len && strlen((const char*)buffer) != result_len, "URI string is not declared length"); #endif return result_len; } #endif #ifdef STANDALONE #include <stdio.h> /* one more prototype */ int main(int argc, char *argv[]); static const char *program; static int check_resolve(const char *base_uri, const char *reference_uri, const char *result_uri) { unsigned char buffer[1024]; raptor_uri_resolve_uri_reference((const unsigned char*)base_uri, (const unsigned char*)reference_uri, buffer, sizeof(buffer)); if(strcmp((const char*)buffer, result_uri)) { fprintf(stderr, "%s: raptor_uri_resolve_uri_reference(%s, %s) FAILED giving '%s' != '%s'\n", program, base_uri, reference_uri, buffer, result_uri); return 1; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 fprintf(stderr, "%s: raptor_uri_resolve_uri_reference(%s, %s) OK giving '%s'\n", program, base_uri, reference_uri, buffer); #endif return 0; } static int check_parses(const char *uri_string) { raptor_uri_detail* ud; ud = raptor_new_uri_detail((unsigned const char*)uri_string); if(!ud) { fprintf(stderr, "%s: raptor_new_uri_detail(%s) FAILED to parse\n", program, uri_string); return 1; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 fprintf(stderr, "%s: raptor_new_uri_detail(%s) OK\n", program, uri_string); #endif raptor_free_uri_detail(ud); return 0; } int main(int argc, char *argv[]) { const char *base_uri="http://example.org/bpath/cpath/d;p?querystr#frag"; int failures = 0; program = raptor_basename(argv[0]); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Using base URI '%s'\n", program, base_uri); #endif /* Tests from RFC2396 Appendix C * and RFC3986 Section 5 * * Modifications: * - add 'path' when items are path components to make easier to read * - use example.org instead of 'a' for the authority * - results are against the base_uri above */ /* Appendix C.1 / 5.4.1 Normal Examples */ failures += check_resolve(base_uri, "g:h", "g:h"); failures += check_resolve(base_uri, "gpath", "http://example.org/bpath/cpath/gpath"); failures += check_resolve(base_uri, "./gpath", "http://example.org/bpath/cpath/gpath"); failures += check_resolve(base_uri, "gpath/", "http://example.org/bpath/cpath/gpath/"); failures += check_resolve(base_uri, "/gpath", "http://example.org/gpath"); failures += check_resolve(base_uri, "//gpath", "http://gpath"); failures += check_resolve(base_uri, "?y", "http://example.org/bpath/cpath/d;p?y"); failures += check_resolve(base_uri, "gpath?y", "http://example.org/bpath/cpath/gpath?y"); failures += check_resolve(base_uri, "#s", "http://example.org/bpath/cpath/d;p?querystr#s"); failures += check_resolve(base_uri, "gpath#s", "http://example.org/bpath/cpath/gpath#s"); failures += check_resolve(base_uri, "gpath?y#s", "http://example.org/bpath/cpath/gpath?y#s"); failures += check_resolve(base_uri, ";x", "http://example.org/bpath/cpath/;x"); failures += check_resolve(base_uri, "gpath;x", "http://example.org/bpath/cpath/gpath;x"); failures += check_resolve(base_uri, "gpath;x?y#s", "http://example.org/bpath/cpath/gpath;x?y#s"); failures += check_resolve(base_uri, ".", "http://example.org/bpath/cpath/"); failures += check_resolve(base_uri, "./", "http://example.org/bpath/cpath/"); failures += check_resolve(base_uri, "..", "http://example.org/bpath/"); failures += check_resolve(base_uri, "../", "http://example.org/bpath/"); failures += check_resolve(base_uri, "../gpath", "http://example.org/bpath/gpath"); failures += check_resolve(base_uri, "../..", "http://example.org/"); failures += check_resolve(base_uri, "../../", "http://example.org/"); failures += check_resolve(base_uri, "../../gpath", "http://example.org/gpath"); /* Appendix C.2 / 5.4.2 Abnormal Examples */ failures += check_resolve(base_uri, "", "http://example.org/bpath/cpath/d;p?querystr"); /* This is a Normal Example in RFC 3986 */ failures += check_resolve(base_uri, "../../../gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "../../../../gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "/./gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "/../gpath", "http://example.org/gpath"); /* RFC 3986 changed the answer here */ failures += check_resolve(base_uri, "gpath.", "http://example.org/bpath/cpath/gpath."); failures += check_resolve(base_uri, ".gpath", "http://example.org/bpath/cpath/.gpath"); failures += check_resolve(base_uri, "gpath..", "http://example.org/bpath/cpath/gpath.."); failures += check_resolve(base_uri, "..gpath", "http://example.org/bpath/cpath/..gpath"); failures += check_resolve(base_uri, "./../gpath", "http://example.org/bpath/gpath"); failures += check_resolve(base_uri, "./gpath/.", "http://example.org/bpath/cpath/gpath/"); failures += check_resolve(base_uri, "gpath/./hpath", "http://example.org/bpath/cpath/gpath/hpath"); failures += check_resolve(base_uri, "gpath/../hpath", "http://example.org/bpath/cpath/hpath"); failures += check_resolve(base_uri, "gpath;x = 1/./y", "http://example.org/bpath/cpath/gpath;x = 1/y"); failures += check_resolve(base_uri, "gpath;x = 1/../y", "http://example.org/bpath/cpath/y"); failures += check_resolve(base_uri, "gpath?y/./x", "http://example.org/bpath/cpath/gpath?y/./x"); failures += check_resolve(base_uri, "gpath?y/../x", "http://example.org/bpath/cpath/gpath?y/../x"); failures += check_resolve(base_uri, "gpath#s/./x", "http://example.org/bpath/cpath/gpath#s/./x"); failures += check_resolve(base_uri, "gpath#s/../x", "http://example.org/bpath/cpath/gpath#s/../x"); /* RFC 3986 makes this the strict answer but also allows * http://example.org/bpath/cpath/gauthority * for backward compatibility */ failures += check_resolve(base_uri, "http:gauthority", "http:gauthority"); /* Examples from 1.3 */ failures += check_parses("ftp://ftp.is.co.za/rfc/rfc1808.txt"); failures += check_parses("gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles"); failures += check_parses("http://www.math.uio.no/faq/compression-faq/part1.html"); failures += check_parses("mailto:mduerst@ifi.unizh.ch"); failures += check_parses("news:comp.infosystems.www.servers.unix"); failures += check_parses("telnet://melvyl.ucop.edu/"); failures += check_parses(""); /* This is a not-crashing test */ raptor_new_uri_detail(NULL); /* Extra checks not in RFC2396 */ /* RDF xml:base check that fragments and query strings are removed */ failures += check_resolve(base_uri, "gpath/../../../hpath", "http://example.org/hpath"); /* RFC3986 changed the answer to this test * Was "RDF xml:base check that extra ../ are not lost" * with answer "http://example.org/../../../absfile" */ failures += check_resolve("http://example.org/dir/file", "../../../absfile", "http://example.org/absfile"); /* RDF xml:base check that an absolute URI replaces */ failures += check_resolve("http://example.org/dir/file", "http://another.example.org/dir2/file2", "http://another.example.org/dir2/file2"); /* base URI and relative URI with no absolute path works */ failures += check_resolve("foo:", "not_scheme:blah", "foo:not_scheme:blah"); /* Issue#000177 http://bugs.librdf.org/mantis/view.php?id=177 */ failures += check_resolve("foo:1234", "9999", "foo:9999"); /* RDFa 1.1 test 0114 */ failures += check_resolve("http://example.org/file", "?foo=bar../baz", "http://example.org/file?foo=bar../baz"); /* BUG 556 - http://bugs.librdf.org/mantis/view.php?id=556 */ failures += check_resolve("http://example.com/folder1/folder2/", "http://example.com/folder1/folder2/../folder1/../entity1", "http://example.com/folder1/entity1"); return failures; } #endif ���������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_term.c��������������������������������������������������������������������0000644�0001750�0001750�00000066450�12425333224�013415� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_term.c - Raptor terms * * Copyright (C) 2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifndef STANDALONE /** * raptor_new_term_from_uri: * @world: raptor world * @uri: uri * * Constructor - create a new URI statement term * * Takes a copy (reference) of the passed in @uri * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_uri(raptor_world* world, raptor_uri* uri) { raptor_term *t; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!uri) return NULL; raptor_world_open(world); t = RAPTOR_CALLOC(raptor_term*, 1, sizeof(*t)); if(!t) return NULL; t->usage = 1; t->world = world; t->type = RAPTOR_TERM_TYPE_URI; t->value.uri = raptor_uri_copy(uri); return t; } /** * raptor_new_term_from_counted_uri_string: * @world: raptor world * @uri_string: UTF-8 encoded URI string. * @length: length of URI string * * Constructor - create a new URI statement term from a UTF-8 encoded Unicode string * * Note: The @uri_string need not be NULL terminated - a NULL will be * added to the copied string used. * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_counted_uri_string(raptor_world* world, const unsigned char *uri_string, size_t length) { raptor_term *t; raptor_uri* uri; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); uri = raptor_new_uri_from_counted_string(world, uri_string, length); if(!uri) return NULL; t = raptor_new_term_from_uri(world, uri); raptor_free_uri(uri); return t; } /** * raptor_new_term_from_uri_string: * @world: raptor world * @uri_string: UTF-8 encoded URI string. * * Constructor - create a new URI statement term from a UTF-8 encoded Unicode string * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_uri_string(raptor_world* world, const unsigned char *uri_string) { raptor_term *t; raptor_uri* uri; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); uri = raptor_new_uri(world, uri_string); if(!uri) return NULL; t = raptor_new_term_from_uri(world, uri); raptor_free_uri(uri); return t; } /** * raptor_new_term_from_counted_literal: * @world: raptor world * @literal: UTF-8 encoded literal string (or NULL for empty literal) * @literal_len: length of literal * @datatype: literal datatype URI (or NULL) * @language: literal language (or NULL for no language) * @language_len: literal language length * * Constructor - create a new literal statement term from a counted UTF-8 encoded literal string * * Takes copies of the passed in @literal, @datatype, @language * * Only one of @language or @datatype may be given. If both are * given, NULL is returned. If @language is the empty string, it is * the equivalent to NULL. * * Note: The @literal need not be NULL terminated - a NULL will be * added to the copied string used. * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_counted_literal(raptor_world* world, const unsigned char* literal, size_t literal_len, raptor_uri* datatype, const unsigned char* language, unsigned char language_len) { raptor_term *t; unsigned char* new_literal = NULL; unsigned char* new_language = NULL; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); if(language && !*language) language = NULL; if(language && datatype) return NULL; new_literal = RAPTOR_MALLOC(unsigned char*, literal_len + 1); if(!new_literal) return NULL; if(!literal || !*literal) literal_len = 0; if(literal_len) { memcpy(new_literal, literal, literal_len); new_literal[literal_len] = '\0'; } else *new_literal = '\0'; if(language) { unsigned char c; unsigned char* l; new_language = RAPTOR_MALLOC(unsigned char*, language_len + 1); if(!new_language) { RAPTOR_FREE(char*, new_literal); return NULL; } l = new_language; while((c = *language++)) { if(c == '_') c = '-'; *l++ = c; } *l = '\0'; } else language_len = 0; if(datatype) datatype = raptor_uri_copy(datatype); t = RAPTOR_CALLOC(raptor_term*, 1, sizeof(*t)); if(!t) { if(new_literal) RAPTOR_FREE(char*, new_literal); if(new_language) RAPTOR_FREE(char*, new_language); if(datatype) raptor_free_uri(datatype); return NULL; } t->usage = 1; t->world = world; t->type = RAPTOR_TERM_TYPE_LITERAL; t->value.literal.string = new_literal; t->value.literal.string_len = RAPTOR_LANG_LEN_FROM_INT(literal_len); t->value.literal.language = new_language; t->value.literal.language_len = language_len; t->value.literal.datatype = datatype; return t; } /** * raptor_new_term_from_literal: * @world: raptor world * @literal: UTF-8 encoded literal string (or NULL for empty literal) * @datatype: literal datatype URI (or NULL) * @language: literal language (or NULL) * * Constructor - create a new literal statement term * * Takes copies of the passed in @literal, @datatype, @language * * Only one of @language or @datatype may be given. If both are * given, NULL is returned. If @language is the empty string, it is * the equivalent to NULL. * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_literal(raptor_world* world, const unsigned char* literal, raptor_uri* datatype, const unsigned char* language) { size_t literal_len = 0; size_t language_len = 0; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); if(literal) literal_len = strlen(RAPTOR_GOOD_CAST(const char*, literal)); if(language) language_len = strlen(RAPTOR_GOOD_CAST(const char*, language)); return raptor_new_term_from_counted_literal(world, literal, literal_len, datatype, language, RAPTOR_BAD_CAST(unsigned char, language_len)); } /** * raptor_new_term_from_counted_blank: * @world: raptor world * @blank: UTF-8 encoded blank node identifier (or NULL) * @length: length of identifier (or 0) * * Constructor - create a new blank node statement term from a counted UTF-8 encoded blank node ID * * Takes a copy of the passed in @blank * * If @blank is NULL, creates a new internal identifier and uses it. * This will use the handler set with * raptor_world_set_generate_bnodeid_parameters() * * Note: The @blank need not be NULL terminated - a NULL will be * added to the copied string used. * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_counted_blank(raptor_world* world, const unsigned char* blank, size_t length) { raptor_term *t; unsigned char* new_id; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); if (blank) { new_id = RAPTOR_MALLOC(unsigned char*, length + 1); if(!new_id) return NULL; memcpy(new_id, blank, length); new_id[length] = '\0'; } else { new_id = raptor_world_generate_bnodeid(world); length = strlen((const char*)new_id); } t = RAPTOR_CALLOC(raptor_term*, 1, sizeof(*t)); if(!t) { RAPTOR_FREE(char*, new_id); return NULL; } t->usage = 1; t->world = world; t->type = RAPTOR_TERM_TYPE_BLANK; t->value.blank.string = new_id; t->value.blank.string_len = RAPTOR_BAD_CAST(int, length); return t; } /** * raptor_new_term_from_blank: * @world: raptor world * @blank: UTF-8 encoded blank node identifier (or NULL) * * Constructor - create a new blank node statement term from a UTF-8 encoded blank node ID * * Takes a copy of the passed in @blank * * If @blank is NULL or an empty string, creates a new internal * identifier and uses it. This will use the handler set with * raptor_world_set_generate_bnodeid_parameters() * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_blank(raptor_world* world, const unsigned char* blank) { size_t length = 0; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); raptor_world_open(world); if(blank) { if(*blank) length = strlen((const char*)blank); else blank = NULL; } return raptor_new_term_from_counted_blank(world, blank, length); } /** * raptor_new_term_from_counted_string: * @world: raptor world * @string: N-Triples format string (UTF-8) * @length: length of @string (or 0) * * Constructor - create a new term from a Turtle / N-Triples format string in UTF-8 * * See also raptor_term_to_counted_string() and raptor_term_to_string() * * Return value: new term or NULL on failure */ raptor_term* raptor_new_term_from_counted_string(raptor_world* world, unsigned char* string, size_t length) { raptor_term* term = NULL; size_t bytes_read; raptor_locator locator; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!string) return NULL; if(!length) length = strlen(RAPTOR_GOOD_CAST(const char*, string)); raptor_world_open(world); memset(&locator, '\0', sizeof(locator)); locator.line = -1; bytes_read = raptor_ntriples_parse_term(world, &locator, string, &length, &term, 1); if(!bytes_read || length != 0) { if(term) raptor_free_term(term); term = NULL; } return term; } /** * raptor_term_copy: * @term: raptor term * * Copy constructor - get a copy of a statement term * * Return value: new term object or NULL on failure */ raptor_term* raptor_term_copy(raptor_term* term) { if(!term) return NULL; term->usage++; return term; } /** * raptor_free_term: * @term: #raptor_term object * * Destructor - destroy a raptor_term object. * **/ void raptor_free_term(raptor_term *term) { if(!term) return; if(--term->usage) return; switch(term->type) { case RAPTOR_TERM_TYPE_URI: if(term->value.uri) { raptor_free_uri(term->value.uri); term->value.uri = NULL; } break; case RAPTOR_TERM_TYPE_BLANK: if(term->value.blank.string) { RAPTOR_FREE(char*, term->value.blank.string); term->value.blank.string = NULL; } break; case RAPTOR_TERM_TYPE_LITERAL: if(term->value.literal.string) { RAPTOR_FREE(char*, term->value.literal.string); term->value.literal.string = NULL; } if(term->value.literal.datatype) { raptor_free_uri(term->value.literal.datatype); term->value.literal.datatype = NULL; } if(term->value.literal.language) { RAPTOR_FREE(char*, term->value.literal.language); term->value.literal.language = NULL; } break; case RAPTOR_TERM_TYPE_UNKNOWN: default: break; } RAPTOR_FREE(term, term); } /** * raptor_term_to_counted_string: * @term: #raptor_term * @len_p: Pointer to location to store length of new string (if not NULL) * * Turns a raptor term into a N-Triples format counted string. * * Turns the given @term into an N-Triples escaped string using all the * escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples * * This function uses raptor_term_ntriples_write() to write to an * #raptor_iostream which is the prefered way to write formatted * output. * * See also raptor_new_term_from_counted_string() to reverse this. * * See also raptor_term_to_turtle_string() to write as Turtle which * will include Turtle syntax such as 'true' for booleans and """quoting""" * * Return value: the new string or NULL on failure. The length of * the new string is returned in *@len_p if len_p is not NULL. **/ unsigned char* raptor_term_to_counted_string(raptor_term *term, size_t* len_p) { raptor_iostream *iostr; void *string = NULL; int rc; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(term, raptor_term, NULL); iostr = raptor_new_iostream_to_string(term->world, &string, len_p, NULL); if(!iostr) return NULL; rc = raptor_term_escaped_write(term, 0, iostr); raptor_free_iostream(iostr); if(rc) { if(string) { RAPTOR_FREE(char*, string); string = NULL; } } return (unsigned char *)string; } /** * raptor_term_to_string: * @term: #raptor_term * * Turns a raptor term into a N-Triples format string. * * Turns the given @term into an N-Triples escaped string using all the * escapes as defined in http://www.w3.org/TR/rdf-testcases/#ntriples * * See also raptor_new_term_from_counted_string() to reverse this. * * See also raptor_term_to_turtle_string() to write as Turtle which * will include Turtle syntax such as 'true' for booleans and """quoting""" * * Return value: the new string or NULL on failure. **/ unsigned char* raptor_term_to_string(raptor_term *term) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(term, raptor_term, NULL); return raptor_term_to_counted_string(term, NULL); } /* * raptor_term_print_as_ntriples: * @term: #raptor_term * @stream: FILE stream * * INTERNAL - Print a term as N-Triples */ int raptor_term_print_as_ntriples(const raptor_term *term, FILE* stream) { int rc = 0; raptor_iostream* iostr; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(term, raptor_term, 1); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(stream, FILE*, 1); iostr = raptor_new_iostream_to_file_handle(term->world, stream); if(!iostr) return 1; rc = raptor_term_escaped_write(term, 0, iostr); raptor_free_iostream(iostr); return rc; } /** * raptor_term_equals: * @t1: first term * @t2: second term * * Compare a pair of #raptor_term for equality * * Return value: non-0 if the terms are equal */ int raptor_term_equals(raptor_term* t1, raptor_term* t2) { int d = 0; if(!t1 || !t2) return 0; if(t1->type != t2->type) return 0; if(t1 == t2) return 1; switch(t1->type) { case RAPTOR_TERM_TYPE_URI: d = raptor_uri_equals(t1->value.uri, t2->value.uri); break; case RAPTOR_TERM_TYPE_BLANK: if(t1->value.blank.string_len != t2->value.blank.string_len) /* different lengths */ break; d = !strcmp((const char*)t1->value.blank.string, (const char*)t2->value.blank.string); break; case RAPTOR_TERM_TYPE_LITERAL: if(t1->value.literal.string_len != t2->value.literal.string_len) /* different lengths */ break; d = !strcmp((const char*)t1->value.literal.string, (const char*)t2->value.literal.string); if(!d) break; if(t1->value.literal.language && t2->value.literal.language) { /* both have a language */ d = !strcmp((const char*)t1->value.literal.language, (const char*)t2->value.literal.language); if(!d) break; } else if(t1->value.literal.language || t2->value.literal.language) { /* only one has a language - different */ d = 0; break; } if(t1->value.literal.datatype && t2->value.literal.datatype) { /* both have a datatype */ d = raptor_uri_equals(t1->value.literal.datatype, t2->value.literal.datatype); } else if(t1->value.literal.datatype || t2->value.literal.datatype) { /* only one has a datatype - different */ d = 0; } break; case RAPTOR_TERM_TYPE_UNKNOWN: default: break; } return d; } /** * raptor_term_compare: * @t1: first term * @t2: second term * * Compare a pair of #raptor_term * * If types are different, the #raptor_term_type order is used. * * Resource and datatype URIs are compared with raptor_uri_compare(), * blank nodes and literals with strcmp(). If one literal has no * language, it is earlier than one with a language. If one literal * has no datatype, it is earlier than one with a datatype. * * Return value: <0 if t1 is before t2, 0 if equal, >0 if t1 is after t2 */ int raptor_term_compare(const raptor_term *t1, const raptor_term *t2) { int d = 0; /* check for NULL terms */ if(!t1 || !t2) { if(!t1 && !t2) return 0; /* both NULL */ /* place NULLs before any other term */ return t1 ? 1 : -1; } if(t1->type != t2->type) return (t1->type - t2->type); switch(t1->type) { case RAPTOR_TERM_TYPE_URI: d = raptor_uri_compare(t1->value.uri, t2->value.uri); break; case RAPTOR_TERM_TYPE_BLANK: d = strcmp((const char*)t1->value.blank.string, (const char*)t2->value.blank.string); break; case RAPTOR_TERM_TYPE_LITERAL: d = strcmp((const char*)t1->value.literal.string, (const char*)t2->value.literal.string); if(d) break; if(t1->value.literal.language && t2->value.literal.language) { /* both have a language */ d = strcmp((const char*)t1->value.literal.language, (const char*)t2->value.literal.language); } else if(t1->value.literal.language || t2->value.literal.language) /* only one has a language; the language-less one is earlier */ d = (!t1->value.literal.language ? -1 : 1); if(d) break; if(t1->value.literal.datatype && t2->value.literal.datatype) { /* both have a datatype */ d = raptor_uri_compare(t1->value.literal.datatype, t2->value.literal.datatype); } else if(t1->value.literal.datatype || t2->value.literal.datatype) /* only one has a datatype; the datatype-less one is earlier */ d = (!t1->value.literal.datatype ? -1 : 1); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: break; } return d; } #endif #ifdef STANDALONE /* one more prototype */ int main(int argc, char *argv[]); static const unsigned char *uri_string1 = (const unsigned char *)"http://http://www.dajobe.org/"; static unsigned int uri_string1_len = 29; /* strlen(uri_string1) */ static raptor_term_type uri_string1_type = RAPTOR_TERM_TYPE_URI; static const unsigned char *uri_string2 = (const unsigned char *)"http://www.example.org/"; static unsigned int uri_string2_len = 23; /* strlen(uri_string2) */ static raptor_term_type uri_string2_type = RAPTOR_TERM_TYPE_URI; static const unsigned char *literal_string1 = (const unsigned char *)"Dave Beckett"; static unsigned int literal_string1_len = 12; /* strlen(literal_string1) */ static raptor_term_type literal_string1_type = RAPTOR_TERM_TYPE_LITERAL; static const unsigned char *bnodeid1 = (const unsigned char *)"abc123"; static unsigned int bnodeid1_len = 6; /* strlen(bnode_id1) */ static raptor_term_type bnodeid1_type = RAPTOR_TERM_TYPE_BLANK; static const unsigned char* language1 = (const unsigned char*)"en"; int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); int rc = 0; raptor_term* term1 = NULL; /* URI string 1 */ raptor_term* term2 = NULL; /* literal string1 */ raptor_term* term3 = NULL; /* blank node 1 */ raptor_term* term4 = NULL; /* URI string 2 */ raptor_term* term5 = NULL; /* URI string 1 again */ raptor_uri* uri1; unsigned char* uri_str; size_t uri_len; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); /* check a term for NULL URI fails */ term1 = raptor_new_term_from_uri(world, NULL); if(term1) { fprintf(stderr, "%s: raptor_new_uri(NULL) returned object rather than failing\n", program); rc = 1; goto tidy; } /* check a term for non-NULL URI succeeds */ uri1 = raptor_new_uri(world, uri_string1); if(!uri1) { fprintf(stderr, "%s: raptor_new_uri(%s) failed\n", program, uri_string1); rc = 1; goto tidy; } term1 = raptor_new_term_from_uri(world, uri1); if(!term1) { fprintf(stderr, "%s: raptor_new_term_from_uri_string(URI %s) failed\n", program, uri_string1); rc = 1; goto tidy; } raptor_free_uri(uri1); uri1 = NULL; if(term1->type != uri_string1_type) { fprintf(stderr, "%s: raptor term 1 is of type %d expected %d\n", program, term1->type, uri_string1_type); rc = 1; goto tidy; } /* returns a pointer to shared string */ uri_str = raptor_uri_as_counted_string(term1->value.uri, &uri_len); if(!uri_str) { fprintf(stderr, "%s: raptor_uri_as_counted_string term 1 failed\n", program); rc = 1; goto tidy; } if(uri_len != uri_string1_len) { fprintf(stderr, "%s: raptor term 1 URI is of length %d expected %d\n", program, (int)uri_len, (int)uri_string1_len); rc = 1; goto tidy; } /* check an empty literal is created from a NULL literal pointer succeeds */ term2 = raptor_new_term_from_counted_literal(world, NULL, 0, NULL, NULL, 0); if(!term2) { fprintf(stderr, "%s: raptor_new_term_from_counted_literal() with all NULLs failed\n", program); rc = 1; goto tidy; } raptor_free_term(term2); /* check an empty literal from an empty language literal pointer succeeds */ term2 = raptor_new_term_from_counted_literal(world, NULL, 0, NULL, (const unsigned char*)"", 0); if(!term2) { fprintf(stderr, "%s: raptor_new_term_from_counted_literal() with empty language failed\n", program); rc = 1; goto tidy; } raptor_free_term(term2); /* check a literal with language and datatype fails */ uri1 = raptor_new_uri(world, uri_string1); if(!uri1) { fprintf(stderr, "%s: raptor_new_uri(%s) failed\n", program, uri_string1); rc = 1; goto tidy; } term2 = raptor_new_term_from_counted_literal(world, literal_string1, literal_string1_len, uri1, language1, 0); raptor_free_uri(uri1); uri1 = NULL; if(term2) { fprintf(stderr, "%s: raptor_new_term_from_counted_literal() with language and datatype returned object rather than failing\n", program); rc = 1; goto tidy; } /* check a literal with no language and no datatype succeeds */ term2 = raptor_new_term_from_counted_literal(world, literal_string1, literal_string1_len, NULL, NULL, 0); if(!term2) { fprintf(stderr, "%s: raptor_new_term_from_counted_literal(%s) failed\n", program, literal_string1); rc = 1; goto tidy; } if(term2->type != literal_string1_type) { fprintf(stderr, "%s: raptor term 2 is of type %d expected %d\n", program, term2->type, literal_string1_type); rc = 1; goto tidy; } /* check a blank node term with NULL id generates a new identifier */ term3 = raptor_new_term_from_counted_blank(world, NULL, 0); if(!term3) { fprintf(stderr, "%s: raptor_new_term_from_counted_blank(NULL) failed\n", program); rc = 1; goto tidy; } if(term3->type != bnodeid1_type) { fprintf(stderr, "%s: raptor term 3 is of type %d expected %d\n", program, term3->type, bnodeid1_type); rc = 1; goto tidy; } raptor_free_term(term3); /* check a blank node term with an identifier succeeds */ term3 = raptor_new_term_from_counted_blank(world, bnodeid1, bnodeid1_len); if(!term3) { fprintf(stderr, "%s: raptor_new_term_from_counted_blank(%s) failed\n", program, bnodeid1); rc = 1; goto tidy; } if(term3->type != bnodeid1_type) { fprintf(stderr, "%s: raptor term 3 is of type %d expected %d\n", program, term3->type, bnodeid1_type); rc = 1; goto tidy; } /* check a different URI term succeeds */ term4 = raptor_new_term_from_counted_uri_string(world, uri_string2, uri_string2_len); if(!term4) { fprintf(stderr, "%s: raptor_new_term_from_counted_uri_string(URI %s) failed\n", program, uri_string2); rc = 1; goto tidy; } if(term4->type != uri_string2_type) { fprintf(stderr, "%s: raptor term 4 is of type %d expected %d\n", program, term4->type, uri_string2_type); rc = 1; goto tidy; } /* returns a pointer to shared string */ uri_str = raptor_uri_as_counted_string(term4->value.uri, &uri_len); if(!uri_str) { fprintf(stderr, "%s: raptor_uri_as_counted_string term 4 failed\n", program); rc = 1; goto tidy; } if(uri_len != uri_string2_len) { fprintf(stderr, "%s: raptor term 4 URI is of length %d expected %d\n", program, (int)uri_len, (int)uri_string2_len); rc = 1; goto tidy; } /* check the same URI term as term1 succeeds */ term5 = raptor_new_term_from_uri_string(world, uri_string1); if(!term5) { fprintf(stderr, "%s: raptor_new_term_from_uri_string(URI %s) failed\n", program, uri_string1); rc = 1; goto tidy; } if(raptor_term_equals(term1, term2)) { fprintf(stderr, "%s: raptor_term_equals (URI %s, literal %s) returned equal, expected not-equal\n", program, uri_string1, literal_string1); rc = 1; goto tidy; } if(raptor_term_equals(term1, term3)) { fprintf(stderr, "%s: raptor_term_equals (URI %s, bnode %s) returned equal, expected not-equal\n", program, uri_string1, bnodeid1); rc = 1; goto tidy; } if(raptor_term_equals(term1, term4)) { fprintf(stderr, "%s: raptor_term_equals (URI %s, URI %s) returned equal, expected not-equal\n", program, uri_string1, uri_string2); rc = 1; goto tidy; } if(!raptor_term_equals(term1, term5)) { fprintf(stderr, "%s: raptor_term_equals (URI %s, URI %s) returned not-equal, expected equal\n", program, uri_string1, uri_string1); rc = 1; goto tidy; } if(term1->value.uri != term5->value.uri) { fprintf(stderr, "%s: term1 and term5 URI objects returned not-equal pointers, expected equal\n", program); /* This is not necessarily a failure if the raptor_uri module has had * the URI interning disabled with * raptor_world_set_flag(world, RAPTOR_WORLD_FLAG_URI_INTERNING, 0) * however this test suite does not do that, so it is a failure here. */ rc = 1; goto tidy; } tidy: if(term1) raptor_free_term(term1); if(term2) raptor_free_term(term2); if(term3) raptor_free_term(term3); if(term4) raptor_free_term(term4); if(term5) raptor_free_term(term5); raptor_free_world(world); return rc; } #endif /* STANDALONE */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_libxml.c������������������������������������������������������������������0000644�0001750�0001750�00000063414�12020170223�013717� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_libxml.c - Raptor libxml functions * * Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #ifdef RAPTOR_XML_LIBXML /* prototypes */ static void raptor_libxml_warning(void* user_data, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); static void raptor_libxml_error_common(void* user_data, const char *msg, va_list args, const char *prefix, int is_fatal) RAPTOR_PRINTF_FORMAT(2, 0); static void raptor_libxml_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); static void raptor_libxml_fatal_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3); static void raptor_libxml_xmlStructuredError_handler_global(void *user_data, xmlErrorPtr err); static void raptor_libxml_xmlStructuredError_handler_parsing(void *user_data, xmlErrorPtr err); static const char* const xml_warning_prefix="XML parser warning - "; static const char* const xml_error_prefix="XML parser error - "; static const char* const xml_generic_error_prefix="XML error - "; static const char* const xml_fatal_error_prefix="XML parser fatal error - "; static const char* const xml_validation_error_prefix="XML parser validation error - "; static const char* const xml_validation_warning_prefix="XML parser validation warning - "; #ifdef HAVE_XMLSAX2INTERNALSUBSET /* SAX2 - 2.6.0 or later */ #define libxml2_internalSubset xmlSAX2InternalSubset #define libxml2_externalSubset xmlSAX2ExternalSubset #define libxml2_isStandalone xmlSAX2IsStandalone #define libxml2_hasInternalSubset xmlSAX2HasInternalSubset #define libxml2_hasExternalSubset xmlSAX2HasExternalSubset #define libxml2_resolveEntity xmlSAX2ResolveEntity #define libxml2_getEntity xmlSAX2GetEntity #define libxml2_getParameterEntity xmlSAX2GetParameterEntity #define libxml2_entityDecl xmlSAX2EntityDecl #define libxml2_unparsedEntityDecl xmlSAX2UnparsedEntityDecl #define libxml2_startDocument xmlSAX2StartDocument #define libxml2_endDocument xmlSAX2EndDocument #else /* SAX1 - before libxml2 2.6.0 */ #define libxml2_internalSubset internalSubset #define libxml2_externalSubset externalSubset #define libxml2_isStandalone isStandalone #define libxml2_hasInternalSubset hasInternalSubset #define libxml2_hasExternalSubset hasExternalSubset #define libxml2_resolveEntity resolveEntity #define libxml2_getEntity getEntity #define libxml2_getParameterEntity getParameterEntity #define libxml2_entityDecl entityDecl #define libxml2_unparsedEntityDecl unparsedEntityDecl #define libxml2_startDocument startDocument #define libxml2_endDocument endDocument #endif static void raptor_libxml_internalSubset(void* user_data, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { raptor_sax2* sax2 = (raptor_sax2*)user_data; libxml2_internalSubset(sax2->xc, name, ExternalID, SystemID); } #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET static void raptor_libxml_externalSubset(void* user_data, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { raptor_sax2* sax2 = (raptor_sax2*)user_data; libxml2_externalSubset(sax2->xc, name, ExternalID, SystemID); } #endif static int raptor_libxml_isStandalone (void* user_data) { raptor_sax2* sax2 = (raptor_sax2*)user_data; return libxml2_isStandalone(sax2->xc); } static int raptor_libxml_hasInternalSubset (void* user_data) { raptor_sax2* sax2 = (raptor_sax2*)user_data; return libxml2_hasInternalSubset(sax2->xc); } static int raptor_libxml_hasExternalSubset (void* user_data) { raptor_sax2* sax2 = (raptor_sax2*)user_data; return libxml2_hasExternalSubset(sax2->xc); } static xmlParserInputPtr raptor_libxml_resolveEntity(void* user_data, const xmlChar *publicId, const xmlChar *systemId) { raptor_sax2* sax2 = (raptor_sax2*)user_data; xmlParserCtxtPtr ctxt = sax2->xc; const unsigned char *uri_string = NULL; xmlParserInputPtr entity_input = NULL; int load_entity = 0; if(ctxt->input) uri_string = RAPTOR_GOOD_CAST(const unsigned char *, ctxt->input->filename); if(!uri_string) uri_string = RAPTOR_GOOD_CAST(const unsigned char *, ctxt->directory); load_entity = RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES); if(load_entity) load_entity = raptor_sax2_check_load_uri_string(sax2, uri_string); if(load_entity) { entity_input = xmlLoadExternalEntity(RAPTOR_GOOD_CAST(const char*, uri_string), RAPTOR_GOOD_CAST(const char*, publicId), ctxt); } else { RAPTOR_DEBUG4("Not loading entity URI %s by policy for publicId '%s' systemId '%s'\n", uri_string, publicId, systemId); } return entity_input; } static xmlEntityPtr raptor_libxml_getEntity(void* user_data, const xmlChar *name) { raptor_sax2* sax2 = (raptor_sax2*)user_data; xmlParserCtxtPtr xc = sax2->xc; xmlEntityPtr ret = NULL; if(!xc) return NULL; if(!xc->inSubset) { /* looks for hardcoded set of entity names - lt, gt etc. */ ret = xmlGetPredefinedEntity(name); if(ret) { RAPTOR_DEBUG2("Entity '%s' found in predefined set\n", name); return ret; } } /* This section uses xmlGetDocEntity which looks for entities in * memory only, never from a file or URI */ if(xc->myDoc && (xc->myDoc->standalone == 1)) { RAPTOR_DEBUG2("Entity '%s' document is standalone\n", name); /* Document is standalone: no entities are required to interpret doc */ if(xc->inSubset == 2) { xc->myDoc->standalone = 0; ret = xmlGetDocEntity(xc->myDoc, name); xc->myDoc->standalone = 1; } else { ret = xmlGetDocEntity(xc->myDoc, name); if(!ret) { xc->myDoc->standalone = 0; ret = xmlGetDocEntity(xc->myDoc, name); xc->myDoc->standalone = 1; } } } else { ret = xmlGetDocEntity(xc->myDoc, name); } if(ret && !ret->children && (ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { /* Entity is an external general parsed entity. It may be in a * catalog file, user file or user URI */ int val = 0; xmlNodePtr children; int load_entity = 0; load_entity = RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES); if(load_entity) load_entity = raptor_sax2_check_load_uri_string(sax2, ret->URI); if(!load_entity) { RAPTOR_DEBUG2("Not getting entity URI %s by policy\n", ret->URI); children = xmlNewText((const xmlChar*)""); } else { /* Disable SAX2 handlers so that the SAX2 events do not all get * sent to callbacks during dealing with the entity parsing. */ sax2->enabled = 0; val = xmlParseCtxtExternalEntity(xc, ret->URI, ret->ExternalID, &children); sax2->enabled = 1; } if(!val) { xmlAddChildList((xmlNodePtr)ret, children); } else { xc->validate = 0; return NULL; } ret->owner = 1; #if LIBXML_VERSION >= 20627 /* Checked field was released in 2.6.27 on 2006-10-25 * http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6 * */ /* Mark this entity as having been checked - never do this again */ if(!ret->checked) ret->checked = 1; #endif } return ret; } static xmlEntityPtr raptor_libxml_getParameterEntity(void* user_data, const xmlChar *name) { raptor_sax2* sax2 = (raptor_sax2*)user_data; return libxml2_getParameterEntity(sax2->xc, name); } static void raptor_libxml_entityDecl(void* user_data, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) { raptor_sax2* sax2 = (raptor_sax2*)user_data; libxml2_entityDecl(sax2->xc, name, type, publicId, systemId, content); } static void raptor_libxml_unparsedEntityDecl(void* user_data, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) { raptor_sax2* sax2 = (raptor_sax2*)user_data; libxml2_unparsedEntityDecl(sax2->xc, name, publicId, systemId, notationName); } static void raptor_libxml_startDocument(void* user_data) { raptor_sax2* sax2 = (raptor_sax2*)user_data; libxml2_startDocument(sax2->xc); } static void raptor_libxml_endDocument(void* user_data) { raptor_sax2* sax2 = (raptor_sax2*)user_data; xmlParserCtxtPtr xc = sax2->xc; libxml2_endDocument(sax2->xc); if(xc->myDoc) { xmlFreeDoc(xc->myDoc); xc->myDoc = NULL; } } static void raptor_libxml_set_document_locator(void* user_data, xmlSAXLocatorPtr loc) { raptor_sax2* sax2 = (raptor_sax2*)user_data; sax2->loc = loc; } void raptor_libxml_update_document_locator(raptor_sax2* sax2, raptor_locator* locator) { /* for storing error info */ xmlSAXLocatorPtr loc = sax2 ? sax2->loc : NULL; xmlParserCtxtPtr xc= sax2 ? sax2->xc : NULL; if(xc && xc->inSubset) return; if(!locator) return; locator->line= -1; locator->column= -1; if(!xc) return; if(loc) { locator->line = loc->getLineNumber(xc); /* Seems to be broken */ /* locator->column = loc->getColumnNumber(xc); */ } } static void raptor_libxml_warning(void* user_data, const char *msg, ...) { raptor_sax2* sax2 = NULL; va_list args; int prefix_length = RAPTOR_BAD_CAST(int, strlen(xml_warning_prefix)); int length; char *nmsg; int msg_len; /* Work around libxml2 bug - sometimes the sax2->error * returns a ctx, sometimes the userdata */ if(((raptor_sax2*)user_data)->magic == RAPTOR_LIBXML_MAGIC) sax2 = (raptor_sax2*)user_data; else /* user_data is not userData */ sax2 = (raptor_sax2*)((xmlParserCtxtPtr)user_data)->userData; va_start(args, msg); raptor_libxml_update_document_locator(sax2, sax2->locator); msg_len = RAPTOR_BAD_CAST(int, strlen(msg)); length = prefix_length + msg_len + 1; nmsg = RAPTOR_MALLOC(char*, length); if(nmsg) { memcpy(nmsg, xml_warning_prefix, prefix_length); /* Do not copy NUL */ memcpy(nmsg + prefix_length, msg, msg_len + 1); /* Copy NUL */ if(nmsg[length-2] == '\n') nmsg[length-2]='\0'; } raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_WARN, sax2->locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(char*, nmsg); va_end(args); } static void raptor_libxml_error_common(void* user_data, const char *msg, va_list args, const char *prefix, int is_fatal) { raptor_sax2* sax2 = NULL; int prefix_length = RAPTOR_BAD_CAST(int, strlen(prefix)); int length; char *nmsg; int msg_len; raptor_world* world = NULL; raptor_locator* locator = NULL; if(user_data) { /* Work around libxml2 bug - sometimes the sax2->error * returns a user_data, sometimes the userdata */ if(((raptor_sax2*)user_data)->magic == RAPTOR_LIBXML_MAGIC) sax2 = (raptor_sax2*)user_data; else /* user_data is not userData */ sax2 = (raptor_sax2*)((xmlParserCtxtPtr)user_data)->userData; } if(sax2) { world = sax2->world; locator = sax2->locator; if(locator) raptor_libxml_update_document_locator(sax2, sax2->locator); } msg_len = RAPTOR_BAD_CAST(int, strlen(msg)); length = prefix_length + msg_len + 1; nmsg = RAPTOR_MALLOC(char*, length); if(nmsg) { memcpy(nmsg, prefix, prefix_length); /* Do not copy NUL */ memcpy(nmsg + prefix_length, msg, msg_len + 1); /* Copy NUL */ if(nmsg[length-1] == '\n') nmsg[length-1]='\0'; } if(is_fatal) raptor_log_error_varargs(world, RAPTOR_LOG_LEVEL_FATAL, locator, nmsg ? nmsg : msg, args); else raptor_log_error_varargs(world, RAPTOR_LOG_LEVEL_ERROR, locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(char*, nmsg); } static void raptor_libxml_error(void* user_data, const char *msg, ...) { va_list args; va_start(args, msg); raptor_libxml_error_common(user_data, msg, args, xml_error_prefix, 0); va_end(args); } void raptor_libxml_generic_error(void* user_data, const char *msg, ...) { raptor_world* world = (raptor_world*)user_data; va_list args; const char* prefix = xml_generic_error_prefix; int prefix_length = RAPTOR_BAD_CAST(int, strlen(prefix)); int length; char *nmsg; int msg_len; va_start(args, msg); msg_len = RAPTOR_BAD_CAST(int, strlen(msg)); length = prefix_length + msg_len + 1; nmsg = RAPTOR_MALLOC(char*, length); if(nmsg) { memcpy(nmsg, prefix, prefix_length); /* Do not copy NUL */ memcpy(nmsg + prefix_length, msg, msg_len + 1); /* Copy NUL */ if(nmsg[length-1] == '\n') nmsg[length-1]='\0'; } raptor_log_error_varargs(world, RAPTOR_LOG_LEVEL_ERROR, /* locator */ NULL, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(char*, nmsg); va_end(args); } static void raptor_libxml_fatal_error(void* user_data, const char *msg, ...) { va_list args; va_start(args, msg); raptor_libxml_error_common(user_data, msg, args, xml_fatal_error_prefix, 1); va_end(args); } void raptor_libxml_validation_error(void* user_data, const char *msg, ...) { va_list args; va_start(args, msg); raptor_libxml_error_common(user_data, msg, args, xml_validation_error_prefix, 1); va_end(args); } void raptor_libxml_validation_warning(void* user_data, const char *msg, ...) { va_list args; raptor_sax2* sax2 = (raptor_sax2*)user_data; int prefix_length = RAPTOR_GOOD_CAST(int, strlen(xml_validation_warning_prefix)); int length; char *nmsg; int msg_len; va_start(args, msg); raptor_libxml_update_document_locator(sax2, sax2->locator); msg_len = RAPTOR_BAD_CAST(int, strlen(msg)); length = prefix_length + msg_len + 1; nmsg = RAPTOR_MALLOC(char*, length); if(nmsg) { memcpy(nmsg, xml_validation_warning_prefix, prefix_length); /* Do not copy NUL */ memcpy(nmsg + prefix_length, msg, msg_len + 1); /* Copy NUL */ if(nmsg[length-2] == '\n') nmsg[length-2]='\0'; } raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_WARN, sax2->locator, nmsg ? nmsg : msg, args); if(nmsg) RAPTOR_FREE(char*, nmsg); va_end(args); } /* * Initialise libxml for a particular SAX2 setup */ void raptor_libxml_sax_init(raptor_sax2* sax2) { xmlSAXHandler *sax = &sax2->sax; sax->internalSubset = raptor_libxml_internalSubset; sax->isStandalone = raptor_libxml_isStandalone; sax->hasInternalSubset = raptor_libxml_hasInternalSubset; sax->hasExternalSubset = raptor_libxml_hasExternalSubset; sax->resolveEntity = raptor_libxml_resolveEntity; sax->getEntity = raptor_libxml_getEntity; sax->getParameterEntity = raptor_libxml_getParameterEntity; sax->entityDecl = raptor_libxml_entityDecl; sax->attributeDecl = NULL; /* attributeDecl */ sax->elementDecl = NULL; /* elementDecl */ sax->notationDecl = NULL; /* notationDecl */ sax->unparsedEntityDecl = raptor_libxml_unparsedEntityDecl; sax->setDocumentLocator = raptor_libxml_set_document_locator; sax->startDocument = raptor_libxml_startDocument; sax->endDocument = raptor_libxml_endDocument; sax->startElement= raptor_sax2_start_element; sax->endElement= raptor_sax2_end_element; sax->reference = NULL; /* reference */ sax->characters= raptor_sax2_characters; sax->cdataBlock= raptor_sax2_cdata; /* like <![CDATA[...]> */ sax->ignorableWhitespace= raptor_sax2_cdata; sax->processingInstruction = NULL; /* processingInstruction */ sax->comment = raptor_sax2_comment; /* comment */ sax->warning = (warningSAXFunc)raptor_libxml_warning; sax->error = (errorSAXFunc)raptor_libxml_error; sax->fatalError = (fatalErrorSAXFunc)raptor_libxml_fatal_error; sax->serror = (xmlStructuredErrorFunc)raptor_libxml_xmlStructuredError_handler_parsing; #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET sax->externalSubset = raptor_libxml_externalSubset; #endif #ifdef RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED sax->initialized = 1; #endif } void raptor_libxml_free(xmlParserCtxtPtr xc) { libxml2_endDocument(xc); if(xc->myDoc) { xmlFreeDoc(xc->myDoc); xc->myDoc = NULL; } xmlFreeParserCtxt(xc); } int raptor_libxml_init(raptor_world* world) { xmlInitParser(); if(world->libxml_flags & RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE) { world->libxml_saved_structured_error_context = xmlGenericErrorContext; world->libxml_saved_structured_error_handler = xmlStructuredError; /* sets xmlGenericErrorContext and xmlStructuredError */ xmlSetStructuredErrorFunc(world, (xmlStructuredErrorFunc)raptor_libxml_xmlStructuredError_handler_global); } if(world->libxml_flags & RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE) { world->libxml_saved_generic_error_context = xmlGenericErrorContext; world->libxml_saved_generic_error_handler = xmlGenericError; /* sets xmlGenericErrorContext and xmlGenericError */ xmlSetGenericErrorFunc(world, (xmlGenericErrorFunc)raptor_libxml_generic_error); } return 0; } void raptor_libxml_finish(raptor_world* world) { if(world->libxml_flags & RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE) xmlSetStructuredErrorFunc(world->libxml_saved_structured_error_context, world->libxml_saved_structured_error_handler); if(world->libxml_flags & RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE) xmlSetGenericErrorFunc(world->libxml_saved_generic_error_context, world->libxml_saved_generic_error_handler); xmlCleanupParser(); } #if LIBXML_VERSION >= 20632 #define XML_LAST_DL XML_FROM_SCHEMATRONV #else #if LIBXML_VERSION >= 20621 #define XML_LAST_DL XML_FROM_I18N #else #if LIBXML_VERSION >= 20617 #define XML_LAST_DL XML_FROM_WRITER #else #if LIBXML_VERSION >= 20616 #define XML_LAST_DL XML_FROM_CHECK #else #if LIBXML_VERSION >= 20615 #define XML_LAST_DL XML_FROM_VALID #else #define XML_LAST_DL XML_FROM_XSLT #endif #endif #endif #endif #endif /* All other symbols not specifically below noted were added during * the period 2-10 October 2003 which is before the minimum libxml2 * version 2.6.8 release date of Mar 23 2004. * * When the minimum libxml2 version goes up, the #ifdefs for * older versions can be removed. */ static const char* const raptor_libxml_domain_labels[XML_LAST_DL+2]= { NULL, /* XML_FROM_NONE */ "parser", /* XML_FROM_PARSER */ "tree", /* XML_FROM_TREE */ "namespace", /* XML_FROM_NAMESPACE */ "validity", /* XML_FROM_DTD */ "HTML parser", /* XML_FROM_HTML */ "memory", /* XML_FROM_MEMORY */ "output", /* XML_FROM_OUTPUT */ "I/O" , /* XML_FROM_IO */ "FTP", /* XML_FROM_FTP */ #if LIBXML_VERSION >= 20618 /* 2005-02-13 - v2.6.18 */ "HTTP", /* XML_FROM_HTTP */ #endif "XInclude", /* XML_FROM_XINCLUDE */ "XPath", /* XML_FROM_XPATH */ "parser", /* XML_FROM_XPOINTER */ "regexp", /* XML_FROM_REGEXP */ "Schemas datatype", /* XML_FROM_DATATYPE */ "Schemas parser", /* XML_FROM_SCHEMASP */ "Schemas validity", /* XML_FROM_SCHEMASV */ "Relax-NG parser", /* XML_FROM_RELAXNGP */ "Relax-NG validity", /* XML_FROM_RELAXNGV */ "Catalog", /* XML_FROM_CATALOG */ "C14", /* XML_FROM_C14N */ "XSLT", /* XML_FROM_XSLT */ #if LIBXML_VERSION >= 20615 /* 2004-10-07 - v2.6.15 */ "validity", /* XML_FROM_VALID */ #endif #if LIBXML_VERSION >= 20616 /* 2004-11-04 - v2.6.16 */ "checking", /* XML_FROM_CHECK */ #endif #if LIBXML_VERSION >= 20617 /* 2005-01-04 - v2.6.17 */ "writer", /* XML_FROM_WRITER */ #endif #if LIBXML_VERSION >= 20621 /* 2005-08-24 - v2.6.21 */ "module", /* XML_FROM_MODULE */ "encoding", /* XML_FROM_I18N */ #endif #if LIBXML_VERSION >= 20632 /* 2008-04-08 - v2.6.32 */ "schematronv", /* XML_FROM_SCHEMATRONV */ #endif NULL }; static void raptor_libxml_xmlStructuredError_handler_common(raptor_world *world, raptor_locator *locator, xmlErrorPtr err) { raptor_stringbuffer* sb; char *nmsg; raptor_log_level level = RAPTOR_LOG_LEVEL_ERROR; if(err == NULL || err->code == XML_ERR_OK || err->level == XML_ERR_NONE) return; /* Do not warn about things with no location */ if(err->level == XML_ERR_WARNING && !err->file) return; /* XML fatal errors never cause an abort */ if(err->level == XML_ERR_FATAL) err->level = XML_ERR_ERROR; sb = raptor_new_stringbuffer(); if(err->domain != XML_FROM_HTML) raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"XML ", 4, 1); if(err->domain != XML_FROM_NONE && err->domain < XML_LAST_DL) { const unsigned char* label; label = (const unsigned char*)raptor_libxml_domain_labels[(int)err->domain]; raptor_stringbuffer_append_string(sb, label, 1); raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)" ", 1, 1); } if(err->level == XML_ERR_WARNING) raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"warning: ", 9, 1); else /* XML_ERR_ERROR or XML_ERR_FATAL */ raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"error: ", 7, 1); if(err->message) { unsigned char* msg; size_t len; msg = (unsigned char*)err->message; len= strlen((const char*)msg); if(len && msg[len-1] == '\n') msg[--len]='\0'; raptor_stringbuffer_append_counted_string(sb, msg, len, 1); } #if LIBXML_VERSION >= 20618 /* 2005-02-13 - v2.6.18 */ /* str1 has the detailed HTTP error */ if(err->domain == XML_FROM_HTTP && err->str1) { unsigned char* msg; size_t len; msg = (unsigned char*)err->str1; len= strlen((const char*)msg); if(len && msg[len-1] == '\n') msg[--len]='\0'; raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)" - ", 3, 1); raptor_stringbuffer_append_counted_string(sb, msg, len, 1); } #endif /* When err->domain == XML_FROM_XPATH then err->int1 is * the offset into err->str1, the line with the error */ if(err->domain == XML_FROM_XPATH && err->str1) { raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)" in ", 4, 1); raptor_stringbuffer_append_string(sb, (const unsigned char*)err->str1, 1); } nmsg = (char*)raptor_stringbuffer_as_string(sb); if(err->level == XML_ERR_FATAL) level = RAPTOR_LOG_LEVEL_FATAL; else if(err->level == XML_ERR_ERROR) level = RAPTOR_LOG_LEVEL_ERROR; else level = RAPTOR_LOG_LEVEL_WARN; raptor_log_error(world, level, locator, nmsg); raptor_free_stringbuffer(sb); } /* user_data is a raptor_world* */ static void raptor_libxml_xmlStructuredError_handler_global(void *user_data, xmlErrorPtr err) { raptor_world *world = NULL; /* user_data may point to a raptor_world* */ if(user_data) { world = (raptor_world*)user_data; if(world->magic != RAPTOR2_WORLD_MAGIC) world = NULL; } raptor_libxml_xmlStructuredError_handler_common(world, NULL, err); } /* user_data may be a raptor_sax2; err->ctxt->userData may point to a * raptor_sax2* */ static void raptor_libxml_xmlStructuredError_handler_parsing(void *user_data, xmlErrorPtr err) { raptor_sax2* sax2 = NULL; /* user_data may point to a raptor_sax2* */ if(user_data) { sax2 = (raptor_sax2*)user_data; if(sax2->magic != RAPTOR_LIBXML_MAGIC) sax2 = NULL; } /* err->ctxt->userData may point to a raptor_sax2* */ if(err && err->ctxt) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)err->ctxt; if(ctxt->userData) { sax2 = (raptor_sax2*)ctxt->userData; if(sax2->magic != RAPTOR_LIBXML_MAGIC) sax2 = NULL; } } if(sax2) raptor_libxml_xmlStructuredError_handler_common(sax2->world, sax2->locator, err); else raptor_libxml_xmlStructuredError_handler_common(NULL, NULL, err); } /* end if RAPTOR_XML_LIBXML */ #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_serialize_ntriples.c������������������������������������������������������0000644�0001750�0001750�00000021654�12222044704�016347� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_serialize_ntriples.c - N-Triples and Nquads serializer * * Copyright (C) 2004-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Raptor N-Triples serializer object */ typedef struct { int is_nquads; } raptor_ntriples_serializer_context; /* create a new serializer */ static int raptor_ntriples_serialize_init(raptor_serializer* serializer, const char *name) { raptor_ntriples_serializer_context* ntriples_serializer; ntriples_serializer = (raptor_ntriples_serializer_context*)serializer->context; ntriples_serializer->is_nquads = !strcmp(name, "nquads"); return 0; } /* destroy a serializer */ static void raptor_ntriples_serialize_terminate(raptor_serializer* serializer) { } /* add a namespace */ static int raptor_ntriples_serialize_declare_namespace(raptor_serializer* serializer, raptor_uri *uri, const unsigned char *prefix) { /* NOP */ return 0; } #if 0 /* start a serialize */ static int raptor_ntriples_serialize_start(raptor_serializer* serializer) { return 0; } #endif /** * raptor_string_ntriples_write: * @string: UTF-8 string to write * @len: length of UTF-8 string * @delim: Terminating delimiter character for string (such as " or >) * or \0 for no escaping. * @iostr: #raptor_iostream to write to * * Write an UTF-8 string using N-Triples escapes to an iostream. * * Return value: non-0 on failure such as bad UTF-8 encoding. **/ int raptor_string_ntriples_write(const unsigned char *string, size_t len, const char delim, raptor_iostream *iostr) { return raptor_string_escaped_write(string, len, delim, RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL, iostr); } /** * raptor_bnodeid_ntriples_write: * @bnodeid: bnode ID to write * @len: length of bnode ID * @iostr: #raptor_iostream to write to * * Write a blank node ID in a form legal for N-Triples with _: prefix * * Return value: non-0 on failure **/ int raptor_bnodeid_ntriples_write(const unsigned char *bnodeid, size_t len, raptor_iostream *iostr) { unsigned int i; raptor_iostream_counted_string_write("_:", 2, iostr); for(i = 0; i < len; i++) { unsigned char c = *bnodeid++; if(!isalpha(c) && !isdigit(c)) { /* Replace characters not in legal N-Triples bnode set */ c = 'z'; } raptor_iostream_write_byte(c, iostr); } return 0; } /** * raptor_term_ntriples_write: * @term: term to write * @iostr: raptor iostream * * Write a #raptor_term formatted in N-Triples format to a #raptor_iostream * * @Deprecated: Use raptor_term_escaped_write() that allows * configuring format detail flags. * * Return value: non-0 on failure **/ int raptor_term_ntriples_write(const raptor_term *term, raptor_iostream* iostr) { return raptor_term_escaped_write(term, RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL, iostr); } /** * raptor_statement_ntriples_write: * @statement: statement to write * @iostr: raptor iostream * @write_graph_term: flag to write graph term if present * * Write a #raptor_statement formatted in N-Triples or N-Quads format * to a #raptor_iostream * * Return value: non-0 on failure **/ int raptor_statement_ntriples_write(const raptor_statement *statement, raptor_iostream* iostr, int write_graph_term) { unsigned int flags = RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(statement, raptor_statement, 1); if(raptor_term_escaped_write(statement->subject, flags, iostr)) return 1; raptor_iostream_write_byte(' ', iostr); if(raptor_term_escaped_write(statement->predicate, flags, iostr)) return 1; raptor_iostream_write_byte(' ', iostr); if(raptor_term_escaped_write(statement->object, flags, iostr)) return 1; if(statement->graph && write_graph_term) { raptor_iostream_write_byte(' ', iostr); if(raptor_term_escaped_write(statement->graph, flags, iostr)) return 1; } raptor_iostream_counted_string_write(" .\n", 3, iostr); return 0; } /* serialize a statement */ static int raptor_ntriples_serialize_statement(raptor_serializer* serializer, raptor_statement *statement) { raptor_ntriples_serializer_context* ntriples_serializer; ntriples_serializer = (raptor_ntriples_serializer_context*)serializer->context; raptor_statement_ntriples_write(statement, serializer->iostream, ntriples_serializer->is_nquads); return 0; } #if 0 /* end a serialize */ static int raptor_ntriples_serialize_end(raptor_serializer* serializer) { return 0; } #endif /* finish the serializer factory */ static void raptor_ntriples_serialize_finish_factory(raptor_serializer_factory* factory) { } #ifdef RAPTOR_SERIALIZER_NTRIPLES static const char* const ntriples_names[2] = { "ntriples", NULL}; static const char* const ntriples_uri_strings[3] = { "http://www.w3.org/ns/formats/N-Triples", "http://www.w3.org/TR/rdf-testcases/#ntriples", NULL }; #define NTRIPLES_TYPES_COUNT 2 static const raptor_type_q ntriples_types[NTRIPLES_TYPES_COUNT + 1] = { { "application/n-triples", 21, 10}, { "text/plain", 10, 1}, { NULL, 0, 0} }; static int raptor_ntriples_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = ntriples_names; factory->desc.mime_types = ntriples_types; factory->desc.label = "N-Triples"; factory->desc.uri_strings = ntriples_uri_strings; factory->context_length = sizeof(raptor_ntriples_serializer_context); factory->init = raptor_ntriples_serialize_init; factory->terminate = raptor_ntriples_serialize_terminate; factory->declare_namespace = raptor_ntriples_serialize_declare_namespace; factory->serialize_start = NULL; factory->serialize_statement = raptor_ntriples_serialize_statement; factory->serialize_end = NULL; factory->finish_factory = raptor_ntriples_serialize_finish_factory; return 0; } #endif #ifdef RAPTOR_SERIALIZER_NQUADS static const char* const nquads_names[2] = { "nquads", NULL}; static const char* const nquads_uri_strings[2] = { "http://sw.deri.org/2008/07/n-quads/#n-quads", NULL }; #define NQUADS_TYPES_COUNT 1 static const raptor_type_q nquads_types[NQUADS_TYPES_COUNT + 1] = { { "text/x-nquads", 13, 10}, { NULL, 0, 0} }; static int raptor_nquads_serializer_register_factory(raptor_serializer_factory *factory) { factory->desc.names = nquads_names; factory->desc.mime_types = nquads_types; factory->desc.label = "N-Quads"; factory->desc.uri_strings = nquads_uri_strings; factory->context_length = sizeof(raptor_ntriples_serializer_context); factory->init = raptor_ntriples_serialize_init; factory->terminate = raptor_ntriples_serialize_terminate; factory->declare_namespace = raptor_ntriples_serialize_declare_namespace; factory->serialize_start = NULL; factory->serialize_statement = raptor_ntriples_serialize_statement; factory->serialize_end = NULL; factory->finish_factory = raptor_ntriples_serialize_finish_factory; return 0; } #endif #ifdef RAPTOR_SERIALIZER_NTRIPLES int raptor_init_serializer_ntriples(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_ntriples_serializer_register_factory); } #endif #ifdef RAPTOR_SERIALIZER_NQUADS int raptor_init_serializer_nquads(raptor_world* world) { return !raptor_serializer_register_factory(world, &raptor_nquads_serializer_register_factory); } #endif ������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_uri.c���������������������������������������������������������������������0000644�0001750�0001750�00000161372�12370052716�013247� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_uri.c - Raptor URI class * * Copyright (C) 2002-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* for ptrdiff_t */ #ifdef HAVE_STDDEF_H #include <stddef.h> #endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* Symbian OS uses similar path mappings as Windows but does not necessarily have the WIN32 flag defined */ #if defined(__SYMBIAN32__) && !defined(WIN32) #define WIN32 #endif /* raptor_uri structure */ struct raptor_uri_s { /* raptor_world object */ raptor_world *world; /* the URI string */ unsigned char *string; /* length of string */ unsigned int length; /* usage count */ int usage; }; #ifndef STANDALONE /** * raptor_new_uri_from_counted_string: * @world: raptor_world object * @uri_string: URI string. * @length: length of URI string * * Constructor - create a raptor URI from a UTF-8 encoded Unicode string. * * Note: The @uri_string need not be NULL terminated - a NULL will be * added to the copied string used. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_counted_string(raptor_world* world, const unsigned char *uri_string, size_t length) { raptor_uri* new_uri; unsigned char *new_string; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!uri_string || !*uri_string) return NULL; raptor_world_open(world); if(world->uris_tree) { raptor_uri key; /* on stack - not allocated */ /* just to be safe */ memset(&key, 0, sizeof(key)); key.string = (unsigned char*)uri_string; key.length = (unsigned int)length; /* if existing URI found in tree, return it */ new_uri = (raptor_uri*)raptor_avltree_search(world->uris_tree, &key); if(new_uri) { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Found existing URI %s with current usage %d\n", uri_string, new_uri->usage); #endif new_uri->usage++; goto unlock; } } /* otherwise create a new one */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("Creating new URI '"); fwrite(uri_string, sizeof(char), length, RAPTOR_DEBUG_FH); fputs(RAPTOR_DEBUG_FH, "' in hash\n") #endif new_uri = RAPTOR_CALLOC(raptor_uri*, 1, sizeof(*new_uri)); if(!new_uri) goto unlock; new_uri->world = world; new_uri->length = (unsigned int)length; new_string = RAPTOR_MALLOC(unsigned char*, length + 1); if(!new_string) { RAPTOR_FREE(raptor_uri, new_uri); new_uri=NULL; goto unlock; } memcpy((char*)new_string, (const char*)uri_string, length); new_string[length] = '\0'; new_uri->string = new_string; new_uri->usage = 1; /* for user */ /* store in tree */ if(world->uris_tree) { if(raptor_avltree_add(world->uris_tree, new_uri)) { RAPTOR_FREE(char*, new_string); RAPTOR_FREE(raptor_uri, new_uri); new_uri = NULL; } } unlock: return new_uri; } /** * raptor_new_uri: * @world: raptor_world object * @uri_string: URI string. * * Constructor - create a raptor URI from a UTF-8 encoded Unicode string. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri(raptor_world* world, const unsigned char *uri_string) { RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!uri_string) return NULL; raptor_world_open(world); return raptor_new_uri_from_counted_string(world, uri_string, strlen((const char*)uri_string)); } /** * raptor_new_uri_from_uri_local_name: * @world: raptor_world object * @uri: existing #raptor_uri * @local_name: local name * * Constructor - create a raptor URI from an existing URI and a local name. * * Creates a new URI from the concatenation of the @local_name to the * @uri. This is NOT relative URI resolution, which is done by the * raptor_new_uri_relative_to_base() constructor. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_uri_local_name(raptor_world* world, raptor_uri *uri, const unsigned char *local_name) { size_t len; unsigned char *new_string; raptor_uri* new_uri; size_t local_name_length; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!uri) return NULL; raptor_world_open(world); local_name_length = strlen((const char*)local_name); len = uri->length + local_name_length; new_string = RAPTOR_MALLOC(unsigned char*, len + 1); if(!new_string) return NULL; memcpy((char*)new_string, (const char*)uri->string, uri->length); memcpy((char*)(new_string + uri->length), (const char*)local_name, local_name_length + 1); new_uri = raptor_new_uri_from_counted_string(world, new_string, len); RAPTOR_FREE(char*, new_string); return new_uri; } /** * raptor_new_uri_relative_to_base_counted: * @world: raptor_world object * @base_uri: existing base URI * @uri_string: relative URI string * @uri_len: length of URI string (or 0) * * Constructor - create a raptor URI from a base URI and a relative counted URI string. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_relative_to_base_counted(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string, size_t uri_len) { unsigned char *buffer; size_t buffer_length; raptor_uri* new_uri; size_t actual_length; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!base_uri || !uri_string) return NULL; if(!uri_len) uri_len = strlen(RAPTOR_GOOD_CAST(const char*, uri_string)); raptor_world_open(world); /* If URI string is empty, just copy base URI */ if(!*uri_string) return raptor_uri_copy(base_uri); /* +1 for adding any missing URI path '/' */ buffer_length = base_uri->length + uri_len + 1; buffer = RAPTOR_MALLOC(unsigned char*, buffer_length + 1); if(!buffer) return NULL; actual_length = raptor_uri_resolve_uri_reference(base_uri->string, uri_string, buffer, buffer_length); new_uri = raptor_new_uri_from_counted_string(world, buffer, actual_length); RAPTOR_FREE(char*, buffer); return new_uri; } /** * raptor_new_uri_relative_to_base: * @world: raptor_world object * @base_uri: existing base URI * @uri_string: relative URI string * * Constructor - create a raptor URI from a base URI and a relative URI string. * * Use raptor_new_uri_relative_to_base_counted() if the URI string length is known * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_relative_to_base(raptor_world* world, raptor_uri *base_uri, const unsigned char *uri_string) { return raptor_new_uri_relative_to_base_counted(world, base_uri, uri_string, 0); } /** * raptor_new_uri_from_id: * @world: raptor_world object * @base_uri: existing base URI * @id: RDF ID * * Constructor - create a new URI from a base URI and RDF ID. * * This creates a URI equivalent to concatenating @base_uri with * ## and @id. * * Return value: a new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_from_id(raptor_world *world, raptor_uri *base_uri, const unsigned char *id) { raptor_uri *new_uri; unsigned char *local_name; size_t len; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!base_uri || !id) return NULL; raptor_world_open(world); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Using ID %s\n", id); #endif len = strlen((char*)id); /* "#id\0" */ local_name = RAPTOR_MALLOC(unsigned char*, len + 1 + 1); if(!local_name) return NULL; *local_name = '#'; memcpy(local_name + 1, id, len + 1); /* len+1 to copy NUL */ new_uri = raptor_new_uri_relative_to_base(world, base_uri, local_name); RAPTOR_FREE(char*, local_name); return new_uri; } /** * raptor_new_uri_for_rdf_concept: * @world: raptor_world object * @name: RDF namespace concept * * Constructor - create a raptor URI for the RDF namespace concept name. * * Example: u=raptor_new_uri_for_rdf_concept("value") creates a new * URI for the rdf:value term. * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_new_uri_for_rdf_concept(raptor_world* world, const unsigned char *name) { raptor_uri *new_uri; unsigned char *new_uri_string; const unsigned char *base_uri_string = raptor_rdf_namespace_uri; size_t base_uri_string_len = raptor_rdf_namespace_uri_len; size_t new_uri_string_len; size_t name_len; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!name) return NULL; raptor_world_open(world); name_len = strlen((const char*)name); new_uri_string_len = base_uri_string_len + name_len; new_uri_string = RAPTOR_MALLOC(unsigned char*, new_uri_string_len + 1); if(!new_uri_string) return NULL; memcpy(new_uri_string, base_uri_string, base_uri_string_len); memcpy(new_uri_string + base_uri_string_len, name, name_len + 1); /* copy NUL */ new_uri = raptor_new_uri_from_counted_string(world, new_uri_string, new_uri_string_len); RAPTOR_FREE(char*, new_uri_string); return new_uri; } /** * raptor_new_uri_from_uri_or_file_string: * @world: raptor_world object * @base_uri: existing base URI * @uri_or_file_string: URI string or filename * * Constructor - create a raptor URI from a string that is a relative or absolute URI or a filename * * If the @uri_or_file_string is a filename PATH that exists, the * result will be a URI file://PATH * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_new_uri_from_uri_or_file_string(raptor_world* world, raptor_uri* base_uri, const unsigned char* uri_or_file_string) { raptor_uri* new_uri = NULL; const unsigned char* new_uri_string; const char* path; if(raptor_uri_filename_exists(uri_or_file_string) > 0) { /* uri_or_file_string is a file name, not a file: URI */ path = RAPTOR_GOOD_CAST(const char*, uri_or_file_string); } else { new_uri = raptor_new_uri_relative_to_base(world, base_uri, uri_or_file_string); new_uri_string = raptor_uri_as_string(new_uri); path = raptor_uri_uri_string_to_counted_filename_fragment(new_uri_string, NULL, NULL, NULL); } if(path) { if(new_uri) { raptor_free_uri(new_uri); new_uri = NULL; } /* new_uri_string is a string like "file://" + path */ new_uri_string = raptor_uri_filename_to_uri_string(path); if(path != RAPTOR_GOOD_CAST(const char*, uri_or_file_string)) RAPTOR_FREE(const char*, path); new_uri = raptor_new_uri(world, new_uri_string); RAPTOR_FREE(char*, new_uri_string); } return new_uri; } /** * raptor_free_uri: * @uri: URI to destroy * * Destructor - destroy a #raptor_uri object **/ void raptor_free_uri(raptor_uri *uri) { if(!uri) return; uri->usage--; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("URI %s usage count now %d\n", uri->string, uri->usage); #endif /* decrement usage, don't free if not 0 yet*/ if(uri->usage > 0) { return; } /* this does not free the uri */ if(uri->world->uris_tree) raptor_avltree_delete(uri->world->uris_tree, uri); if(uri->string) RAPTOR_FREE(char*, uri->string); RAPTOR_FREE(raptor_uri, uri); } /** * raptor_uri_equals: * @uri1: URI 1 (may be NULL) * @uri2: URI 2 (may be NULL) * * Check if two URIs are equal. * * A NULL URI is not equal to a non-NULL URI. * * Return value: non-0 if the URIs are equal **/ int raptor_uri_equals(raptor_uri* uri1, raptor_uri* uri2) { if(uri1 && uri2) { /* Both not-NULL - compare for equality */ if(uri1 == uri2) return 1; else if (uri1->length != uri2->length) /* Different if lengths are different */ return 0; else /* Same length compare: do not need strncmp() NUL checking */ return memcmp((const char*)uri1->string, (const char*)uri2->string, uri1->length) == 0; } else if(uri1 || uri2) /* Only one is NULL - not equal */ return 0; else /* both NULL - equal */ return 1; } /** * raptor_uri_compare: * @uri1: URI 1 (may be NULL) * @uri2: URI 2 (may be NULL) * * Compare two URIs, ala strcmp. * * A NULL URI is always less than (never equal to) a non-NULL URI. * * Return value: -1 if uri1 < uri2, 0 if equal, 1 if uri1 > uri2 **/ int raptor_uri_compare(raptor_uri* uri1, raptor_uri* uri2) { if(uri1 == uri2) return 0; if(uri1 && uri2) { /* compare common (shortest) prefix */ unsigned int len = (uri1->length > uri2->length) ? uri2->length : uri1->length; /* Same length compare: Do not need the strncmp() NUL checking */ int result = memcmp((const char*)uri1->string, (const char*)uri2->string, len); if(!result) /* if prefix is the same, the shorter is earlier */ result = uri1->length - uri2->length; return result; } /* One arg is NULL - sort that first */ return (!uri1) ? -1 : 1; } /** * raptor_uri_copy: * @uri: URI object * * Constructor - get a copy of a URI. * * Return value: a new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_uri_copy(raptor_uri *uri) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(uri, raptor_uri, NULL); uri->usage++; return uri; } /** * raptor_uri_as_string: * @uri: #raptor_uri object * * Get a string representation of a URI. * * Returns a shared pointer to a string representation of @uri. This * string is shared and must not be freed, otherwise see use the * raptor_uri_to_string() or raptor_uri_to_counted_string() methods. * * Return value: shared string representation of URI **/ unsigned char* raptor_uri_as_string(raptor_uri *uri) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(uri, raptor_uri, NULL); return uri->string; } /** * raptor_uri_as_counted_string: * @uri: URI object * @len_p: address of length variable or NULL * * Get a string representation of a URI with count. * * Returns a shared pointer to a string representation of @uri along * with the length of the string in @len_p, if not NULL. This * string is shared and must not be freed, otherwise see use the * raptor_uri_to_string() or raptor_uri_to_counted_string() methods. * * Return value: shared string representation of URI **/ unsigned char* raptor_uri_as_counted_string(raptor_uri *uri, size_t* len_p) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(uri, raptor_uri, NULL); if(len_p) *len_p = uri->length; return uri->string; } /** * raptor_uri_counted_filename_to_uri_string: * @filename: The filename to convert * @filename_len: length of @filename or 0 to count it here * * Converts a counted filename to a file: URI. * * Handles the OS-specific escaping on turning filenames into URIs * and returns a new buffer that the caller must free(). Turns a * space in the filename into \%20 and '%' into \%25. * * Return value: A newly allocated string with the URI or NULL on failure **/ unsigned char* raptor_uri_counted_filename_to_uri_string(const char *filename, size_t filename_len) { unsigned char *buffer = NULL; const char *from; char *to; #ifndef WIN32 char *path = NULL; #endif /* "file://" */ #define RAPTOR_LEN_FILE_CSS 7 size_t len = RAPTOR_LEN_FILE_CSS; size_t fl; if(!filename) return NULL; if(!filename_len) filename_len = strlen(filename); #ifdef WIN32 /* * On WIN32, filenames turn into * "file://" + translated filename * where the translation is \\ turns into / and ' ' into %20, '%' into %25 * and if the filename does not start with '\', it is relative * in which case, a . is appended to the authority * * e.g * FILENAME URI * c:\windows\system file:///c:/windows/system * \\server\dir\file.doc file://server/dir/file.doc * a:foo file:///a:./foo * C:\Documents and Settings\myapp\foo.bat * file:///C:/Documents%20and%20Settings/myapp/foo.bat * * There are also UNC names \\server\share\blah * that turn into file:///server/share/blah * using the above algorithm. */ if(filename[1] == ':' && filename[2] != '\\') len += 3; /* relative filename - add / and ./ */ else if(*filename == '\\') len -= 2; /* two // from not needed in filename */ else len++; /* / at start of path */ #else /* others - unix: turn spaces into %20, '%' into %25 */ if(*filename != '/') { size_t path_max; size_t path_len; size_t new_filename_len; #ifdef PATH_MAX path_max = PATH_MAX; #else path_max = 1024; /* an initial guess at the length */ #endif path = (char*)malloc(path_max); while(1) { /* malloc() failed or getcwd() succeeded */ errno = 0; if(!path || getcwd(path, path_max)) break; /* failed */ if(errno != ERANGE) break; /* try again with a bigger buffer */ path_max *= 2; path = (char*)realloc(path, path_max); } if(!path) goto path_done; path_len = strlen(path); /* path + '/' + filename */ new_filename_len = path_len + 1 + filename_len; if(path_max < new_filename_len + 1) { path = (char*)realloc(path, new_filename_len + 1); if(!path) goto path_done; } path[path_len] = '/'; memcpy(path + path_len + 1, filename, filename_len); path[new_filename_len] = '\0'; filename_len = new_filename_len; filename = (const char*)path; } #endif /* add URI-escaped filename length */ for(from = filename, fl = filename_len; fl ; from++, fl--) { len++; #ifdef WIN32 if(*from == ':') { if(from[1] != '\\') len += 2; } #endif if(*from == ' ' || *from == '%') len += 2; /* strlen(%xx)-1 */ } buffer = RAPTOR_MALLOC(unsigned char*, len + 1); if(!buffer) goto path_done; memcpy(buffer, "file://", 7); from = filename; to = (char*)(buffer+7); fl = filename_len; #ifdef WIN32 if(*from == '\\' && from[1] == '\\') { from += 2; fl -= 2; } else *to++ ='/'; #endif for(; fl; fl--) { char c = *from++; #ifdef WIN32 if(c == '\\') *to++ ='/'; else if(c == ':') { *to++ = c; if(*from != '\\') { *to++ ='.'; *to++ ='/'; } } else #endif if(c == ' ' || c == '%') { *to++ = '%'; *to++ = '2'; *to++ = (c == ' ') ? '0' : '5'; } else *to++ = c; } *to = '\0'; path_done: #ifndef WIN32 /* Normalize the resulting URI path after the "file://" */ if(buffer) raptor_uri_normalize_path(buffer + RAPTOR_LEN_FILE_CSS, len - RAPTOR_LEN_FILE_CSS); if(path) free(path); #endif return buffer; } /** * raptor_uri_filename_to_uri_string: * @filename: The filename to convert * * Converts a filename to a file: URI. * * Handles the OS-specific escaping on turning filenames into URIs * and returns a new buffer that the caller must free(). Turns a * space in the filename into \%20 and '%' into \%25. * * Return value: A newly allocated string with the URI or NULL on failure **/ unsigned char * raptor_uri_filename_to_uri_string(const char *filename) { return raptor_uri_counted_filename_to_uri_string(filename, 0); } /** * raptor_uri_uri_string_to_counted_filename_fragment: * @uri_string: The file: URI to convert * @len_p: address of filename length variable or NULL * @fragment_p: Address of pointer to store any URI fragment or NULL * @fragment_len_p: address of length variable or NULL * * Convert a file: URI to a counted filename and counted fragment. * * Handles the OS-specific file: URIs to filename mappings. Returns * a new buffer containing the filename that the caller must free. * * If @len_p is present the length of the filename is returned * * If @fragment_p is given, a new string containing the URI fragment * is returned, or NULL if none is present. If @fragment_len_p is present * the length is returned in it. * * Return value: A newly allocated string with the filename or NULL on failure **/ char * raptor_uri_uri_string_to_counted_filename_fragment(const unsigned char *uri_string, size_t* len_p, unsigned char **fragment_p, size_t* fragment_len_p) { char *filename; size_t len = 0; raptor_uri_detail *ud = NULL; unsigned char *from; char *to; #ifdef WIN32 unsigned char *p; #endif if(!uri_string || !*uri_string) return NULL; ud = raptor_new_uri_detail(uri_string); if(!ud) return NULL; if(!ud->scheme || raptor_strcasecmp((const char*)ud->scheme, "file")) { raptor_free_uri_detail(ud); return NULL; } if(ud->authority) { if(!*ud->authority) ud->authority = NULL; else if(!raptor_strcasecmp((const char*)ud->authority, "localhost")) ud->authority = NULL; } /* Cannot do much if there is no path */ if(!ud->path || (ud->path && !*ud->path)) { raptor_free_uri_detail(ud); return NULL; } /* See raptor_uri_filename_to_uri_string for details of the mapping */ #ifdef WIN32 if(ud->authority) len += ud->authority_len+3; p = ud->path; /* remove leading slash from path if there is one */ if(*p && p[0] == '/') { p++; len--; } /* handle case where path starts with drive letter */ if(*p && (p[1] == '|' || p[1] == ':')) { /* Either * "a:" like in file://a|/... or file://a:/... * or * "a:." like in file://a:./foo * giving device-relative path a:foo */ if(p[2] == '.') { p[2] = *p; p[3] = ':'; p += 2; len -= 2; /* remove 2 for ./ */ } else p[1] = ':'; } #endif /* add URI-escaped filename length */ for(from = ud->path; *from ; from++) { len++; if(*from == '%') from += 2; } /* Something is wrong */ if(!len) { raptor_free_uri_detail(ud); return NULL; } filename = RAPTOR_MALLOC(char*, len + 1); if(!filename) { raptor_free_uri_detail(ud); return NULL; } to = filename; #ifdef WIN32 if(ud->authority) { *to++ = '\\'; *to++ = '\\'; from = ud->authority; while( (*to++ = *from++) ) ; to--; *to++ = '\\'; } /* copy path after all /s */ from = p; #else from = ud->path; #endif while(*from) { char c = *from++; #ifdef WIN32 if(c == '/') *to++ = '\\'; else #endif if(c == '%') { if(*from && from[1]) { char hexbuf[3]; char *endptr = NULL; hexbuf[0] = (char)*from; hexbuf[1] = (char)from[1]; hexbuf[2]='\0'; c = (char)strtol((const char*)hexbuf, &endptr, 16); if(endptr == &hexbuf[2]) *to++ = c; } from += 2; } else *to++ = c; } *to = '\0'; if(len_p) *len_p = len; if(fragment_p) { size_t fragment_len = 0; if(ud->fragment) { fragment_len = ud->fragment_len; *fragment_p = RAPTOR_MALLOC(unsigned char*, fragment_len + 1); if(*fragment_p) memcpy(*fragment_p, ud->fragment, fragment_len + 1); } else *fragment_p = NULL; if(fragment_len_p) *fragment_len_p = fragment_len; } raptor_free_uri_detail(ud); return filename; } /** * raptor_uri_uri_string_to_filename_fragment: * @uri_string: The file: URI to convert * @fragment_p: Address of pointer to store any URI fragment or NULL * * Convert a file: URI to a filename and fragment. * * Handles the OS-specific file: URIs to filename mappings. Returns * a new buffer containing the filename that the caller must free. * * If @fragment_p is given, a new string containing the URI fragment * is returned, or NULL if none is present * * See also raptor_uri_uri_string_to_counted_filename_fragment() * * Return value: A newly allocated string with the filename or NULL on failure **/ char * raptor_uri_uri_string_to_filename_fragment(const unsigned char *uri_string, unsigned char **fragment_p) { return raptor_uri_uri_string_to_counted_filename_fragment(uri_string, NULL, fragment_p, NULL); } /** * raptor_uri_uri_string_to_filename: * @uri_string: The file: URI to convert * * Convert a file: URI to a filename. * * Handles the OS-specific file: URIs to filename mappings. Returns * a new buffer containing the filename that the caller must free. * * See also raptor_uri_uri_string_to_counted_filename_fragment() * * Return value: A newly allocated string with the filename or NULL on failure **/ char * raptor_uri_uri_string_to_filename(const unsigned char *uri_string) { return raptor_uri_uri_string_to_counted_filename_fragment(uri_string, NULL, NULL, NULL); } /** * raptor_uri_uri_string_is_file_uri: * @uri_string: The URI string to check * * Check if a URI string is a file: URI. * * Return value: Non zero if URI string is a file: URI **/ int raptor_uri_uri_string_is_file_uri(const unsigned char* uri_string) { if(!uri_string || !*uri_string) return 1; return raptor_strncasecmp((const char*)uri_string, "file:", 5) == 0; } /** * raptor_new_uri_for_xmlbase: * @old_uri: URI to transform * * Constructor - create a URI suitable for use as an XML Base. * * Takes an existing URI and ensures it has a path (default /) and has * no fragment or query arguments - XML base does not use these. * * Return value: new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_for_xmlbase(raptor_uri* old_uri) { unsigned char *uri_string; unsigned char *new_uri_string; raptor_uri* new_uri; raptor_uri_detail *ud; if(!old_uri) return NULL; uri_string = raptor_uri_as_string(old_uri); ud = raptor_new_uri_detail(uri_string); if(!ud) return NULL; if(!ud->path) { ud->path = (unsigned char*)"/"; ud->path_len = 1; } ud->query = NULL; ud->query_len = 0; ud->fragment = NULL; ud->fragment_len = 0; new_uri_string = raptor_uri_detail_to_string(ud, NULL); raptor_free_uri_detail(ud); if(!new_uri_string) return NULL; new_uri = raptor_new_uri(old_uri->world, new_uri_string); RAPTOR_FREE(char*, new_uri_string); return new_uri; } /** * raptor_new_uri_for_retrieval: * @old_uri: URI to transform * * Constructor - create a URI suitable for retrieval. * * Takes an existing URI and ensures it has a path (default /) and has * no fragment - URI retrieval does not use the fragment part. * * Return value: new #raptor_uri object or NULL on failure. **/ raptor_uri* raptor_new_uri_for_retrieval(raptor_uri* old_uri) { unsigned char *uri_string; unsigned char *new_uri_string; raptor_uri* new_uri; raptor_uri_detail *ud; if(!old_uri) return NULL; uri_string = raptor_uri_as_string(old_uri); ud = raptor_new_uri_detail(uri_string); if(!ud) return NULL; if(!ud->path) { ud->path = (unsigned char*)"/"; ud->path_len = 1; } ud->fragment = NULL; ud->fragment_len = 0; new_uri_string = raptor_uri_detail_to_string(ud, NULL); raptor_free_uri_detail(ud); if(!new_uri_string) return NULL; new_uri = raptor_new_uri(old_uri->world, new_uri_string); RAPTOR_FREE(char*, new_uri_string); return new_uri; } int raptor_uri_init(raptor_world* world) { if(world->uri_interning && !world->uris_tree) { world->uris_tree = raptor_new_avltree((raptor_data_compare_handler)raptor_uri_compare, /* free */ NULL, 0); if(!world->uris_tree) { #ifdef RAPTOR_DEBUG RAPTOR_FATAL1("Failed to create raptor URI avltree"); #else raptor_log_error(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Failed to create raptor URI avltree"); #endif } } return 0; } void raptor_uri_finish(raptor_world* world) { if(world->uris_tree) { raptor_free_avltree(world->uris_tree); world->uris_tree = NULL; } } /* * raptor_uri_path_common_base_length: * @first_path: The first path (path only, not a full URI) * @first_path_len: Length of first_path * @second_path: The second path (path only, not a full URI) * @second_path_len: Length of second_path * * Find the common base length of two URI path components. * * Return value: Length of the common base path **/ static size_t raptor_uri_path_common_base_length(const unsigned char *first_path, size_t first_path_len, const unsigned char *second_path, size_t second_path_len) { ptrdiff_t common_len = 0; const unsigned char *cur_ptr = first_path; const unsigned char *prev_ptr = first_path; /* Compare each path component of first_path and second_path until * there is a mismatch. Then return the length from the start of * the path to the last successful match. */ while((cur_ptr = (const unsigned char*)memchr(cur_ptr, '/', first_path_len))) { cur_ptr++; if(strncmp((const char*)first_path + common_len, (const char*)second_path + common_len, cur_ptr - prev_ptr)) break; first_path_len -= cur_ptr - prev_ptr; prev_ptr = cur_ptr; common_len = prev_ptr - first_path; } return prev_ptr - first_path; } /* * raptor_uri_path_make_relative_path: * @from_path: The base path (path only, not a full URI) * @from_path_len: Length of the base path * @to_path: The reference path (path only, not a full URI) * @to_path_len: Length of the reference path * @suffix: String to be appended to the final relative path * @suffix_len: Length of the suffix * @result_length_p: Location to store the length of the string or NULL * * Make a relative URI path. * * Return value: A newly allocated relative path string or NULL on failure. **/ static unsigned char * raptor_uri_path_make_relative_path(const unsigned char *from_path, size_t from_path_len, const unsigned char *to_path, size_t to_path_len, const unsigned char *suffix, size_t suffix_len, size_t *result_length_p) { size_t common_len, cur_len, final_len, to_dir_len; int up_dirs = 0; const unsigned char *cur_ptr, *prev_ptr; unsigned char *final_path, *final_path_cur; common_len = raptor_uri_path_common_base_length(from_path, from_path_len, to_path, to_path_len); if(result_length_p) *result_length_p=0; /* Count how many directories we have to go up */ cur_ptr = from_path + common_len; prev_ptr = cur_ptr; cur_len = from_path_len - common_len; while((cur_ptr = (const unsigned char*)memchr(cur_ptr, '/', cur_len))) { cur_ptr++; up_dirs++; cur_len -= cur_ptr - prev_ptr; prev_ptr = cur_ptr; } /* Calculate how many characters of to_path subdirs (counted from the common base) we have to add. */ cur_ptr = to_path + common_len; prev_ptr = cur_ptr; cur_len = to_path_len - common_len; while((cur_ptr = (const unsigned char*)memchr(cur_ptr, '/', cur_len))) { cur_ptr++; cur_len -= cur_ptr - prev_ptr; prev_ptr = cur_ptr; } to_dir_len = prev_ptr - (to_path + common_len); /* Create the final relative path */ final_len = up_dirs*3 + to_dir_len + suffix_len; /* 3 for each "../" */ final_path = RAPTOR_MALLOC(unsigned char*, final_len + 1); if(!final_path) return NULL; *final_path=0; /* First, add the necessary "../" parts */ final_path_cur = final_path; while(up_dirs--) { *final_path_cur++='.'; *final_path_cur++='.'; *final_path_cur++='/'; } /* Then, add the path from the common base to the to_path */ memcpy(final_path_cur, to_path + common_len, to_dir_len); final_path_cur += to_dir_len; /* Finally, add the suffix */ if(suffix && suffix_len) { /* As a special case, if the suffix begins with a dot (".") and the final output string so far is non-empty, skip the dot. */ if(*suffix == '.' && final_path_cur != final_path) { /* Make sure that the dot really represents a directory and it's not just part of a file name like ".foo". In other words, the dot must either be the only character or the next character must be the fragment or the query character. */ if((suffix_len == 1) || (suffix_len > 1 && (suffix[1] == '#' || suffix[1] == '?'))) { suffix++; suffix_len--; final_len--; } } if(suffix_len) memcpy(final_path_cur, suffix, suffix_len); } final_path[final_len] = 0; if(result_length_p) *result_length_p=final_len; return final_path; } /** * raptor_uri_to_relative_counted_uri_string: * @base_uri: The base absolute URI to resolve against (or NULL) * @reference_uri: The reference absolute URI to use * @length_p: Location to store the length of the relative URI string or NULL * * Get the counted relative URI string of a URI against a base URI. * * Return value: A newly allocated relative URI string or NULL on failure **/ unsigned char* raptor_uri_to_relative_counted_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri, size_t *length_p) { raptor_uri_detail *base_detail = NULL, *reference_detail; const unsigned char *base, *reference_str, *base_file, *reference_file; unsigned char *suffix, *cur_ptr; size_t base_len, reference_len, reference_file_len, suffix_len; unsigned char *result = NULL; int suffix_is_result = 0; if(!reference_uri) return NULL; if(length_p) *length_p=0; reference_str = raptor_uri_as_counted_string(reference_uri, &reference_len); reference_detail = raptor_new_uri_detail(reference_str); if(!reference_detail) goto err; if(!base_uri) goto buildresult; base = raptor_uri_as_counted_string(base_uri, &base_len); base_detail = raptor_new_uri_detail(base); if(!base_detail) goto err; /* Check if the whole URIs are equal */ if(raptor_uri_equals(base_uri, reference_uri)) { reference_len = 0; goto buildresult; } /* Check if scheme and authority of the URIs are equal */ if(base_detail->scheme_len == reference_detail->scheme_len && base_detail->authority_len == reference_detail->authority_len && !strncmp((const char*)base_detail->scheme, (const char*)reference_detail->scheme, base_detail->scheme_len) && !strncmp((const char*)base_detail->authority, (const char*)reference_detail->authority, base_detail->authority_len)) { if(!base_detail->path) { if(reference_detail->path) { /* if base has no path then the relative URI is relative * to scheme+authority so assemble that in the suffix * buffer (adding any query part or fragment needed) */ reference_file = reference_detail->path; reference_file_len = reference_detail->path_len; suffix_is_result = 1; goto addqueryfragment; } goto buildresult; } /* Find the file name components */ base_file = (const unsigned char*)strrchr((const char*)base_detail->path, '/'); if(!base_file) goto buildresult; base_file++; if(!reference_detail->path) goto buildresult; reference_file = (const unsigned char*)strrchr((const char*)reference_detail->path, '/'); if(!reference_file) goto buildresult; reference_file++; reference_file_len = reference_detail->path_len - (reference_file - reference_detail->path); if(!strcmp((const char*)base_detail->path, (const char*)reference_detail->path)) { /* If the file names are equal, don't put them in the relative URI */ reference_file = NULL; reference_file_len = 0; } else if(*base_file && !*reference_file) { /* If the base file is non-empty, but the reference file is * empty, use "." as the file name. */ reference_file = (const unsigned char*)"."; reference_file_len = 1; } addqueryfragment: /* Calculate the length of the suffix (file name + query + fragment) */ suffix_len = reference_file_len + reference_detail->query_len + reference_detail->fragment_len; if(reference_detail->query) suffix_len++; /* add one char for the '?' */ if(reference_detail->fragment) suffix_len++; /* add one char for the '#' */ /* Assemble the suffix */ suffix = RAPTOR_MALLOC(unsigned char*, suffix_len + 1); if(!suffix) goto err; cur_ptr = suffix; if(reference_file) { memcpy(suffix, reference_file, reference_file_len); cur_ptr+= reference_file_len; } if(reference_detail->query) { *cur_ptr++='?'; memcpy(cur_ptr, reference_detail->query, reference_detail->query_len); cur_ptr+= reference_detail->query_len; } if(reference_detail->fragment) { *cur_ptr++='#'; memcpy(cur_ptr, reference_detail->fragment, reference_detail->fragment_len); cur_ptr+= reference_detail->fragment_len; } *cur_ptr=0; if(suffix_is_result) { /* If suffix is what we need, just use that as the result */ result = suffix; if(length_p) *length_p=suffix_len; } else { /* Otherwise create the full relative path */ result = raptor_uri_path_make_relative_path(base_detail->path, base_detail->path_len, reference_detail->path, reference_detail->path_len, suffix, suffix_len, length_p); RAPTOR_FREE(char*, suffix); } } buildresult: /* If result is NULL at this point, it means that we were unable to find a relative URI, so we'll return a full absolute URI instead. */ if(!result) { result = RAPTOR_MALLOC(unsigned char*, reference_len + 1); if(result) { if(reference_len) memcpy(result, reference_str, reference_len); result[reference_len] = 0; if(length_p) *length_p=reference_len; } } err: if(base_detail) raptor_free_uri_detail(base_detail); raptor_free_uri_detail(reference_detail); return result; } /** * raptor_uri_to_relative_uri_string: * @base_uri: The base absolute URI to resolve against * @reference_uri: The reference absolute URI to use * * Get the relative URI string of a URI against a base URI. * * Return value: A newly allocated relative URI string or NULL on failure **/ unsigned char* raptor_uri_to_relative_uri_string(raptor_uri *base_uri, raptor_uri *reference_uri) { return raptor_uri_to_relative_counted_uri_string(base_uri, reference_uri, NULL); } /** * raptor_uri_print: * @uri: URI to print * @stream: The file handle to print to * * Print a URI to a file handle. * * Return value: non-0 on failure **/ int raptor_uri_print(const raptor_uri* uri, FILE *stream) { size_t nwritten = 0; size_t len = 10; unsigned char *string = (unsigned char*)"(NULL URI)"; raptor_world* world = NULL; if(uri) { world = uri->world; string = raptor_uri_as_counted_string((raptor_uri*)uri, &len); } nwritten = fwrite(string, 1, len, stream); if(nwritten != len) raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, NULL, "fwrite failed - %s", strerror(errno)); return (nwritten == len); } /** * raptor_uri_to_counted_string: * @uri: #raptor_uri object * @len_p: Pointer to length (or NULL) * * Get a new counted string for a URI. * * If @len_p is not NULL, the length of the string is stored in it. * * The memory allocated must be freed by the caller and * raptor_free_memory() should be used for best portability. * * Return value: new string or NULL on failure **/ unsigned char* raptor_uri_to_counted_string(raptor_uri *uri, size_t *len_p) { size_t len; unsigned char *string; unsigned char *new_string; if(!uri) return NULL; string = raptor_uri_as_counted_string(uri, &len); if(!string) return NULL; new_string = RAPTOR_MALLOC(unsigned char*, len + 1); /* +1 for NULL termination */ if(!new_string) return NULL; memcpy(new_string, string, len+1); if(len_p) *len_p=len; return new_string; } /** * raptor_uri_to_string: * @uri: #raptor_uri object * * Get a new string for a URI. * * The memory allocated must be freed by the caller and * raptor_free_memory() should be used for best portability. * * Return value: new string or NULL on failure **/ unsigned char* raptor_uri_to_string(raptor_uri *uri) { return raptor_uri_to_counted_string(uri, NULL); } /** * raptor_new_uri_from_rdf_ordinal: * @world: raptor_world object * @ordinal: integer rdf:_n * * Internal - convert an integer rdf:_n ordinal to the resource URI * * Return value: new URI object or NULL on failure **/ raptor_uri* raptor_new_uri_from_rdf_ordinal(raptor_world* world, int ordinal) { /* strlen(rdf namespace URI) + _ + decimal int number + \0 */ unsigned char uri_string[43 + 1 + MAX_ASCII_INT_SIZE + 1]; unsigned char *p = uri_string; memcpy(p, raptor_rdf_namespace_uri, raptor_rdf_namespace_uri_len); p += raptor_rdf_namespace_uri_len; *p++ = '_'; (void)raptor_format_integer(RAPTOR_GOOD_CAST(char*, p), MAX_ASCII_INT_SIZE + 1, ordinal, /* base */ 10, -1, '\0'); return raptor_new_uri(world, uri_string); } /** * raptor_uri_get_world: * @uri: #raptor_uri object * * Get the raptor_world object associated with a raptor_uri. * * Return value: raptor_world object **/ raptor_world* raptor_uri_get_world(raptor_uri *uri) { return uri->world; } /** * raptor_uri_filename_exists: * @path: file path * * Check if @path points to a file that exists * * Return value: > 0 if file exists, 0 if does not exist, < 0 on error **/ int raptor_uri_filename_exists(const unsigned char* path) { int exists = -1; #ifdef HAVE_STAT struct stat stat_buffer; #endif if(!path) return -1; #ifdef HAVE_STAT if(!stat((const char*)path, &stat_buffer)) exists = S_ISREG(stat_buffer.st_mode); #else exists = (access(path, R_OK) < 0) ? -1 : 1; #endif return exists; } /** * raptor_uri_file_exists: * @uri: URI string * * Check if a file: URI is a file that exists * * Return value: > 0 if file exists, 0 if does not exist, < 0 if not a file URI or error **/ int raptor_uri_file_exists(raptor_uri* uri) { const unsigned char* uri_string; if(!uri) return -1; uri_string = raptor_uri_as_string(uri); if(!raptor_uri_uri_string_is_file_uri(uri_string)) return -1; return raptor_uri_filename_exists(uri_string + 6); } /** * raptor_uri_escaped_write: * @uri: uri to write * @base_uri: base uri to write relative to (or NULL) * @flags: bit flags - see #raptor_escaped_write_bitflags * @iostr: raptor iostream * * Write a #raptor_uri formatted with escapes to a #raptor_iostream * * Return value: non-0 on failure **/ int raptor_uri_escaped_write(raptor_uri* uri, raptor_uri* base_uri, unsigned int flags, raptor_iostream *iostr) { unsigned char *uri_str; int uri_str_owned = 0; size_t len; if(!uri) return 1; raptor_iostream_write_byte('<', iostr); if(base_uri) { uri_str = raptor_uri_to_relative_counted_uri_string(base_uri, uri, &len); if(!uri_str) return 1; uri_str_owned = 1; } else { uri_str = raptor_uri_as_counted_string(uri, &len); } if(uri_str) raptor_string_escaped_write(uri_str, len, '>', flags, iostr); raptor_iostream_write_byte('>', iostr); if(uri_str_owned && uri_str) RAPTOR_FREE(char*, uri_str); return 0; } /** * raptor_uri_uri_string_is_absolute: * @uri_string: uri to check write * * Check if a uri string is an absolute URI * * Return value: >0 if absolute, 0 if not, < 0 on failure **/ int raptor_uri_uri_string_is_absolute(const unsigned char* uri_string) { const unsigned char* s = uri_string; /* * scheme = alpha *( alpha | digit | "+" | "-" | "." ) * RFC 2396 section 3.1 Scheme Component */ if(*s && isalpha((int)*s)) { s++; while(*s && (isalnum((int)*s) || (*s == '+') || (*s == '-') || (*s == '.'))) s++; if(*s == ':') return 1; } return 0; } #endif /* !STANDALONE */ #ifdef STANDALONE #include <stdio.h> #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif /* one more prototype */ int main(int argc, char *argv[]); static const char *program; static int assert_uri_is_valid(raptor_uri* uri) { if(strlen((const char*)uri->string) != uri->length) { fprintf(stderr, "%s: URI with string '%s' is invalid. length is %d, recorded in object as %d\n", program, uri->string, (int)strlen((const char*)uri->string), (int)uri->length); return 0; } return 1; } static int assert_filename_to_uri (const char *filename, const char *reference_uri) { unsigned char *uri; uri = raptor_uri_filename_to_uri_string(filename); if(!uri || strcmp((const char*)uri, (const char*)reference_uri)) { fprintf(stderr, "%s: raptor_uri_filename_to_uri_string(%s) FAILED gaving URI %s != %s\n", program, filename, uri, reference_uri); if(uri) RAPTOR_FREE(char*, uri); return 1; } RAPTOR_FREE(char*, uri); return 0; } static int assert_uri_to_filename (const char *uri, const char *reference_filename) { char *filename; filename = raptor_uri_uri_string_to_filename((const unsigned char*)uri); if(filename && !reference_filename) { fprintf(stderr, "%s: raptor_uri_uri_string_to_filename(%s) FAILED giving filename %s != NULL\n", program, uri, filename); if(filename) RAPTOR_FREE(char*, filename); return 1; } else if(filename && strcmp(filename, reference_filename)) { fprintf(stderr, "%s: raptor_uri_uri_string_to_filename(%s) FAILED gaving filename %s != %s\n", program, uri, filename, reference_filename); if(filename) RAPTOR_FREE(char*, filename); return 1; } RAPTOR_FREE(char*, filename); return 0; } static int assert_uri_to_relative(raptor_world *world, const char *base, const char *uri, const char *relative) { unsigned char *output; int result; raptor_uri* base_uri = NULL; raptor_uri* reference_uri = raptor_new_uri(world, (const unsigned char*)uri); size_t length = 0; if(!assert_uri_is_valid(reference_uri)) return 1; if(base) { base_uri = raptor_new_uri(world, (const unsigned char*)base); if(base_uri && !assert_uri_is_valid(base_uri)) { raptor_free_uri(reference_uri); raptor_free_uri(base_uri); return 1; } } output = raptor_uri_to_relative_counted_uri_string(base_uri, reference_uri, &length); result = strcmp(relative, (const char*)output); if(result) { fprintf(stderr, "%s: raptor_uri_string_to_relative_uri_string FAILED: base='%s', uri='%s', expected='%s', got='%s'\n", program, base, uri, relative, output); RAPTOR_FREE(char*, output); return 1; } RAPTOR_FREE(char*, output); if(base_uri) raptor_free_uri(base_uri); raptor_free_uri(reference_uri); return 0; } int main(int argc, char *argv[]) { raptor_world *world; const char *base_uri = "http://example.org/bpath/cpath/d;p?querystr#frag"; const char *base_uri_xmlbase = "http://example.org/bpath/cpath/d;p"; const char *base_uri_retrievable = "http://example.org/bpath/cpath/d;p?querystr"; #ifndef WIN32 #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) const char* dirs[6] = { "/etc", "/bin", "/tmp", "/lib", "/var", NULL }; unsigned char uri_buffer[16]; /* strlen("file:///DIR/foo")+1 */ int i; const char *dir; #endif #endif unsigned char *str; raptor_uri *uri1, *uri2, *uri3; int failures = 0; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); if((program = strrchr(argv[0], '/'))) program++; else if((program = strrchr(argv[0], '\\'))) program++; else program = argv[0]; #ifdef WIN32 failures += assert_filename_to_uri ("c:\\windows\\system", "file:///c:/windows/system"); failures += assert_filename_to_uri ("\\\\server\\share\\file.doc", "file://server/share/file.doc"); failures += assert_filename_to_uri ("a:foo", "file:///a:./foo"); failures += assert_filename_to_uri ("C:\\Documents and Settings\\myapp\\foo.bat", "file:///C:/Documents%20and%20Settings/myapp/foo.bat"); failures += assert_filename_to_uri ("C:\\My Documents\\%age.txt", "file:///C:/My%20Documents/%25age.txt"); failures += assert_uri_to_filename ("file:///c|/windows/system", "c:\\windows\\system"); failures += assert_uri_to_filename ("file:///c:/windows/system", "c:\\windows\\system"); failures += assert_uri_to_filename ("file://server/share/file.doc", "\\\\server\\share\\file.doc"); failures += assert_uri_to_filename ("file:///a:./foo", "a:foo"); failures += assert_uri_to_filename ("file:///C:/Documents%20and%20Settings/myapp/foo.bat", "C:\\Documents and Settings\\myapp\\foo.bat"); failures += assert_uri_to_filename ("file:///C:/My%20Documents/%25age.txt", "C:\\My Documents\\%age.txt"); failures += assert_uri_to_filename ("file:c:\\thing", "c:\\thing"); failures += assert_uri_to_filename ("file:/c:\\thing", "c:\\thing"); failures += assert_uri_to_filename ("file://c:\\thing", NULL); failures += assert_uri_to_filename ("file:///c:\\thing", "c:\\thing"); failures += assert_uri_to_filename ("file://localhost/", NULL); failures += assert_uri_to_filename ("file://c:\\foo\\bar\\x.rdf", NULL); #else failures += assert_filename_to_uri ("/path/to/file", "file:///path/to/file"); failures += assert_filename_to_uri ("/path/to/file with spaces", "file:///path/to/file%20with%20spaces"); failures += assert_uri_to_filename ("file:///path/to/file", "/path/to/file"); failures += assert_uri_to_filename ("file:///path/to/file%20with%20spaces", "/path/to/file with spaces"); /* Tests for Issue#0000268 http://bugs.librdf.org/mantis/view.php?id = 268 */ failures += assert_uri_to_filename ("file:///path/to/http%253A%252F%252Fwww.example.org%252Fa%252Fb%252Fc", "/path/to/http%3A%2F%2Fwww.example.org%2Fa%2Fb%2Fc"); failures += assert_filename_to_uri ("/path/to/http%3A%2F%2Fwww.example.org%2Fa%2Fb%2Fc", "file:///path/to/http%253A%252F%252Fwww.example.org%252Fa%252Fb%252Fc"); #if defined(HAVE_UNISTD_H) && defined(HAVE_SYS_STAT_H) /* Need to test this with a real dir (preferably not /) * This is just a test so pretty likely to work on all development systems * that are not WIN32 */ for(i = 0; (dir = dirs[i]); i++) { struct stat buf; if(!lstat(dir, &buf) && S_ISDIR(buf.st_mode) && !S_ISLNK(buf.st_mode)) { if(!chdir(dir)) break; } } if(!dir) fprintf(stderr, "%s: WARNING: Found no convenient directory - not testing relative files\n", program); else { sprintf((char*)uri_buffer, "file://%s/foo", dir); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Checking relative file name 'foo' in dir %s expecting URI %s\n", program, dir, uri_buffer); #endif failures += assert_filename_to_uri ("foo", (const char*)uri_buffer); } #endif #endif uri1 = raptor_new_uri(world, (const unsigned char*)base_uri); str = raptor_uri_as_string(uri1); if(strcmp((const char*)str, base_uri)) { fprintf(stderr, "%s: raptor_uri_as_string(%s) FAILED gaving %s != %s\n", program, base_uri, str, base_uri); failures++; } uri2 = raptor_new_uri_for_xmlbase(uri1); str = raptor_uri_as_string(uri2); if(strcmp((const char*)str, base_uri_xmlbase)) { fprintf(stderr, "%s: raptor_new_uri_for_xmlbase(URI %s) FAILED giving %s != %s\n", program, base_uri, str, base_uri_xmlbase); failures++; } uri3 = raptor_new_uri_for_retrieval(uri1); str = raptor_uri_as_string(uri3); if(strcmp((const char*)str, base_uri_retrievable)) { fprintf(stderr, "%s: raptor_new_uri_for_retrievable(%s) FAILED gaving %s != %s\n", program, base_uri, str, base_uri_retrievable); failures++; } raptor_free_uri(uri3); raptor_free_uri(uri2); raptor_free_uri(uri1); failures += assert_uri_to_relative(world, NULL, "http://example.com/foo/bar", "http://example.com/foo/bar"); failures += assert_uri_to_relative(world, "", "http://example.com/foo/bar", "http://example.com/foo/bar"); failures += assert_uri_to_relative(world, "foo:", "http://example.com/foo/bar", "http://example.com/foo/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo?foo#foo", "http://example.com/base/bar?bar#bar", "bar?bar#bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/", "foo/"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/.foo", "foo/.foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/.foo#bar", "foo/.foo#bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo/bar", "foo/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/foo#bar", "#bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/bar#foo", "bar#foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/otherbase/foo", "../otherbase/foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/otherbase/bar", "../otherbase/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example.com/base/#foo", ".#foo"); failures += assert_uri_to_relative(world, "http://example.com/base/foo", "http://example2.com/base/bar", "http://example2.com/base/bar"); failures += assert_uri_to_relative(world, "http://example.com/base/one?path=/should/be/ignored", "http://example.com/base/two?path=/should/be/ignored", "two?path=/should/be/ignored"); failures += assert_uri_to_relative(world, "http://example.org/base#", "http://www.foo.org", "http://www.foo.org"); failures += assert_uri_to_relative(world, "http://example.org", "http://a.example.org/", "http://a.example.org/"); failures += assert_uri_to_relative(world, "http://example.org", "http://a.example.org", "http://a.example.org"); failures += assert_uri_to_relative(world, "http://abcdefgh.example.org/foo/bar/", "http://ijklmnop.example.org/", "http://ijklmnop.example.org/"); failures += assert_uri_to_relative(world, "http://example.org", "http://example.org/a/b/c/d/efgh", "/a/b/c/d/efgh"); if(1) { int ret; raptor_uri* u1; raptor_uri* u2; u1 = raptor_new_uri(world, (const unsigned char *)"http://example.org/abc"); u2 = raptor_new_uri(world, (const unsigned char *)"http://example.org/def"); ret = raptor_uri_compare(u1, u2); if(!(ret < 0)) { fprintf(stderr, "%s: raptor_uri_compare(%s, %s) FAILED gave %d expected <0\n", program, raptor_uri_as_string(u1), raptor_uri_as_string(u2), ret); failures++; } raptor_free_uri(u1); raptor_free_uri(u2); } raptor_free_world(world); return failures ; } #endif /* STANDALONE */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_qname.c�������������������������������������������������������������������0000644�0001750�0001750�00000044003�12325013605�013532� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_qname.c - Raptor XML qname class * * Copyright (C) 2002-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * Namespaces in XML * http://www.w3.org/TR/1999/REC-xml-names-19990114/#defaulting * says: * * -------------------------------------------------------------------- * 5.2 Namespace Defaulting * * A default namespace is considered to apply to the element where it * is declared (if that element has no namespace prefix), and to all * elements with no prefix within the content of that element. * * If the URI reference in a default namespace declaration is empty, * then unprefixed elements in the scope of the declaration are not * considered to be in any namespace. * * Note that default namespaces do not apply directly to attributes. * * [...] * * 5.3 Uniqueness of Attributes * * In XML documents conforming to this specification, no tag may * contain two attributes which: * * 1. have identical names, or * * 2. have qualified names with the same local part and with * prefixes which have been bound to namespace names that are * identical. * -------------------------------------------------------------------- */ /** * raptor_new_qname: * @nstack: namespace stack to look up for namespaces * @name: element or attribute name * @value: attribute value (else is an element) * * Constructor - create a new XML qname. * * Create a new qname from the local element/attribute name, * with optional (attribute) value. The namespace stack is used * to look up the name and find the namespace and generate the * URI of the qname. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_new_qname(raptor_namespace_stack *nstack, const unsigned char *name, const unsigned char *value) { raptor_qname* qname; const unsigned char *p; raptor_namespace* ns; unsigned char* new_name; unsigned int prefix_length; unsigned int local_name_length = 0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("name %s\n", name); #endif qname = RAPTOR_CALLOC(raptor_qname*, 1, sizeof(*qname)); if(!qname) return NULL; qname->world = nstack->world; if(value) { size_t value_length = strlen((char*)value); unsigned char* new_value; new_value = RAPTOR_MALLOC(unsigned char*, value_length + 1); if(!new_value) { RAPTOR_FREE(raptor_qname, qname); return NULL; } memcpy(new_value, value, value_length + 1); /* copy NUL */ qname->value = new_value; qname->value_length = value_length; } /* Find : */ for(p = name; *p && *p != ':'; p++) ; if(!*p) { local_name_length = (unsigned int)(p - name); /* No : in the name */ new_name = RAPTOR_MALLOC(unsigned char*, local_name_length + 1); if(!new_name) { raptor_free_qname(qname); return NULL; } memcpy(new_name, name, local_name_length); /* no NUL to copy */ new_name[local_name_length] = '\0'; qname->local_name = new_name; qname->local_name_length = local_name_length; /* For elements only, pick up the default namespace if there is one */ if(!value) { ns = raptor_namespaces_get_default_namespace(nstack); if(ns) { qname->nspace = ns; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Found default namespace %s\n", raptor_uri_as_string(ns->uri)); #endif } else { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG1("No default namespace defined\n"); #endif } } /* if is_element */ } else { /* There is a namespace prefix */ prefix_length = (unsigned int)(p - name); p++; /* p now is at start of local_name */ local_name_length = (unsigned int)strlen((char*)p); new_name = RAPTOR_MALLOC(unsigned char*, local_name_length + 1); if(!new_name) { raptor_free_qname(qname); return NULL; } memcpy(new_name, p, local_name_length); /* No NUL to copy */ new_name[local_name_length] = '\0'; qname->local_name = new_name; qname->local_name_length = local_name_length; /* Find the namespace */ ns = raptor_namespaces_find_namespace(nstack, name, prefix_length); if(!ns) { /* failed to find namespace - now what? */ raptor_log_error_formatted(qname->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "The namespace prefix in \"%s\" was not declared.", name); } else { #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG3("Found namespace prefix %s URI %s\n", ns->prefix, raptor_uri_as_string(ns->uri)); #endif qname->nspace = ns; } } /* If namespace has a URI and a local_name is defined, create the URI * for this element */ if(qname->nspace && local_name_length) { raptor_uri *uri = raptor_namespace_get_uri(qname->nspace); if(uri) uri = raptor_new_uri_from_uri_local_name(qname->world, uri, new_name); qname->uri = uri; } return qname; } /** * raptor_new_qname_from_namespace_local_name: * @world: raptor_world object * @ns: namespace of qname (or NULL) * @local_name: element or attribute name * @value: attribute value (else is an element) * * Constructor - create a new XML qname. * * Create a new qname from the namespace and local element/attribute name, * with optional (attribute) value. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_new_qname_from_namespace_local_name(raptor_world* world, raptor_namespace *ns, const unsigned char *local_name, const unsigned char *value) { raptor_qname* qname; unsigned char* new_name; unsigned int local_name_length; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!local_name) return NULL; local_name_length = (unsigned int)strlen((char*)local_name); raptor_world_open(world); qname = RAPTOR_CALLOC(raptor_qname*, 1, sizeof(*qname)); if(!qname) return NULL; qname->world = world; if(value) { unsigned int value_length = (unsigned int)strlen((char*)value); unsigned char* new_value; new_value = RAPTOR_MALLOC(unsigned char*, value_length + 1); if(!new_value) { RAPTOR_FREE(raptor_qname, qname); return NULL; } memcpy(new_value, value, value_length + 1); /* Copy NUL */ qname->value = new_value; qname->value_length = value_length; } new_name = RAPTOR_MALLOC(unsigned char*, local_name_length + 1); if(!new_name) { raptor_free_qname(qname); return NULL; } memcpy(new_name, local_name, local_name_length); /* No NUL to copy */ new_name[local_name_length] = '\0'; qname->local_name = new_name; qname->local_name_length = local_name_length; qname->nspace = ns; if(qname->nspace) { qname->uri = raptor_namespace_get_uri(qname->nspace); if(qname->uri) qname->uri = raptor_new_uri_from_uri_local_name(qname->world, qname->uri, new_name); } return qname; } /** * raptor_qname_copy: * @qname: existing qname * * Copy constructor - copy an existing XML qname. * * Return value: a new #raptor_qname object or NULL on failure **/ raptor_qname* raptor_qname_copy(raptor_qname *qname) { raptor_qname* new_qname; unsigned char* new_name; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(qname, raptor_qname, NULL); new_qname = RAPTOR_CALLOC(raptor_qname*, 1, sizeof(*qname)); if(!new_qname) return NULL; new_qname->world = qname->world; if(qname->value) { size_t value_length = qname->value_length; unsigned char* new_value; new_value = RAPTOR_MALLOC(unsigned char*, value_length + 1); if(!new_value) { RAPTOR_FREE(raptor_qname, new_qname); return NULL; } memcpy(new_value, qname->value, value_length + 1); /* Copy NUL */ new_qname->value = new_value; new_qname->value_length = value_length; } new_name = RAPTOR_MALLOC(unsigned char*, qname->local_name_length + 1); if(!new_name) { raptor_free_qname(new_qname); return NULL; } memcpy(new_name, qname->local_name, qname->local_name_length + 1); /* Copy NUL */ new_qname->local_name = new_name; new_qname->local_name_length = qname->local_name_length; new_qname->nspace = qname->nspace; new_qname->uri = raptor_namespace_get_uri(new_qname->nspace); if(new_qname->uri) new_qname->uri = raptor_new_uri_from_uri_local_name(qname->world, new_qname->uri, new_name); return new_qname; } #ifdef RAPTOR_DEBUG void raptor_qname_print(FILE *stream, raptor_qname* name) { if(name->nspace) { const unsigned char *prefix = raptor_namespace_get_prefix(name->nspace); if(prefix) fprintf(stream, "%s:%s", prefix, name->local_name); else fprintf(stream, "(default):%s", name->local_name); } else fputs((char*)name->local_name, stream); } #endif /** * raptor_free_qname: * @name: #raptor_qname object * * Destructor - destroy a raptor_qname object. **/ void raptor_free_qname(raptor_qname* name) { if(!name) return; if(name->local_name) RAPTOR_FREE(char*, name->local_name); if(name->uri && name->nspace) raptor_free_uri(name->uri); if(name->value) RAPTOR_FREE(char*, name->value); RAPTOR_FREE(raptor_qname, name); } /** * raptor_qname_equal: * @name1: first #raptor_qname * @name2: second #raptor_name * * Compare two XML Qnames for equality. * * Return value: non-0 if the qnames are equal. **/ int raptor_qname_equal(raptor_qname *name1, raptor_qname *name2) { if(name1->nspace != name2->nspace) return 0; if(name1->local_name_length != name2->local_name_length) return 0; if(strcmp((char*)name1->local_name, (char*)name2->local_name)) return 0; return 1; } /** * raptor_qname_string_to_uri: * @nstack: #raptor_namespace_stack to decode the namespace * @name: QName string or NULL * @name_len: QName string length * * Get the URI for a qname. * * Utility function to turn a string representing a QName in the * N3 style, into a new URI representing it. A NULL name or name ":" * returns the default namespace URI. A name "p:" returns * namespace name (URI) for the namespace with prefix "p". * * Partially equivalent to * qname = raptor_new_qname(nstack, name, NULL); * uri = raptor_uri_copy(qname->uri); * raptor_free_qname(qname) * but without making the qname, and it also handles the NULL and * ":" name cases as well as error checking. * * Return value: new #raptor_uri object or NULL on failure **/ raptor_uri* raptor_qname_string_to_uri(raptor_namespace_stack *nstack, const unsigned char *name, size_t name_len) { raptor_uri *uri = NULL; const unsigned char *p; const unsigned char *original_name = name; const unsigned char *local_name = NULL; unsigned int local_name_length = 0; raptor_namespace* ns; /* Empty string is default namespace URI */ if(!name) { ns = raptor_namespaces_get_default_namespace(nstack); } else { /* If starts with :, it is relative to default namespace, so skip it */ if(*name == ':') { name++; name_len--; p = name + name_len; } else { for(p = name; *p && *p != ':'; p++) ; } /* If ends with :, it is the URI of a namespace */ if(RAPTOR_GOOD_CAST(size_t, p-name) == (name_len - 1)) { ns = raptor_namespaces_find_namespace(nstack, name, RAPTOR_BAD_CAST(int, (name_len - 1))); } else { if(!*p) { local_name = name; local_name_length = (unsigned int)(p - name); /* pick up the default namespace if there is one */ ns = raptor_namespaces_get_default_namespace(nstack); } else { /* There is a namespace prefix */ unsigned int prefix_length = (unsigned int)(p - name); p++; local_name = p; local_name_length = (unsigned int)strlen((char*)p); /* Find the namespace */ ns = raptor_namespaces_find_namespace(nstack, name, prefix_length); } } } if(!ns) { raptor_log_error_formatted(nstack->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "The namespace prefix in \"%s\" was not declared.", original_name); } /* If namespace has a URI and a local_name is defined, return the URI * for this name */ if(ns && (uri = raptor_namespace_get_uri(ns))) { if(local_name_length) uri = raptor_new_uri_from_uri_local_name(nstack->world, uri, local_name); else uri = raptor_uri_copy(uri); } return uri; } /** * raptor_qname_write: * @qname: QName to write * @iostr: raptor iosteram * * Write a formatted qname to an iostream * * Return value: non-0 on failure **/ int raptor_qname_write(raptor_qname *qname, raptor_iostream* iostr) { if(qname->nspace && qname->nspace->prefix_length > 0) { raptor_iostream_counted_string_write(qname->nspace->prefix, qname->nspace->prefix_length, iostr); raptor_iostream_write_byte(':', iostr); } raptor_iostream_counted_string_write(qname->local_name, qname->local_name_length, iostr); return 0; } /** * raptor_qname_to_counted_name: * @qname: QName to write * @length_p: pointer to variable to store length of name (or NULL) * * Get the string form of a QName name * * Return value: new string name or NULL on failure **/ unsigned char* raptor_qname_to_counted_name(raptor_qname *qname, size_t* length_p) { size_t len = qname->local_name_length; unsigned char* s; unsigned char *p; if(qname->nspace && qname->nspace->prefix_length > 0) len+= 1 + qname->nspace->prefix_length; if(length_p) *length_p=len; s = RAPTOR_MALLOC(unsigned char*, len + 1); if(!s) return NULL; p = s; if(qname->nspace && qname->nspace->prefix_length > 0) { memcpy(p, qname->nspace->prefix, qname->nspace->prefix_length); /* Do not copy NUL */ p += qname->nspace->prefix_length; *p++ = ':'; } memcpy(p, qname->local_name, qname->local_name_length + 1); /* Copy final NUL */ return s; } /** * raptor_qname_get_namespace: * @name: #raptor_qname object * * Get the #raptor_namespace of an XML QName. * * Return value: the namespace **/ const raptor_namespace* raptor_qname_get_namespace(raptor_qname* name) { return name->nspace; } /** * raptor_qname_get_local_name: * @name: #raptor_qname object * * Get the #raptor_local_name of an XML QName. * * Return value: the local_name **/ const unsigned char* raptor_qname_get_local_name(raptor_qname* name) { return name->local_name; } /** * raptor_qname_get_value: * @name: #raptor_qname object * * Get the #raptor_value of an XML QName. * * Return value: the value **/ const unsigned char* raptor_qname_get_value(raptor_qname* name) { return name->value; } /** * raptor_qname_get_counted_value: * @name: #raptor_qname object * @length_p: pointer to variable to store length of name (or NULL) * * Get the #raptor_value of an XML QName. * * Return value: the value **/ const unsigned char* raptor_qname_get_counted_value(raptor_qname* name, size_t* length_p) { if(length_p) *length_p=name->value_length; return name->value; } /** * raptor_qname_format_as_xml: * @qname: qname object * @length_p: pointer to length (or NULL) * * Format a qname in an XML style into a newly allocated string. * * Generates a string of the form a:b="value" or a="value" * depending on the qname's prefix. Double quotes are always used. * * If @length_p is not NULL, the length of the string is * stored in the address it points to. * * Return value: qname formatted as newly allocated string or NULL on failure **/ unsigned char* raptor_qname_format_as_xml(const raptor_qname *qname, size_t *length_p) { size_t length; unsigned char *buffer; const char quote='"'; unsigned char *p; length = qname->local_name_length + 3 /* ="" */; if(qname->value_length) length += raptor_xml_escape_string(qname->world, qname->value, qname->value_length, NULL, 0, quote); if(qname->nspace && qname->nspace->prefix_length > 0) length += qname->nspace->prefix_length + 1; /* for : */ if(length_p) *length_p = length; buffer = RAPTOR_MALLOC(unsigned char*, length + 1); if(!buffer) return NULL; p = buffer; if(qname->nspace && qname->nspace->prefix_length > 0) { memcpy(p, qname->nspace->prefix, qname->nspace->prefix_length); p += qname->nspace->prefix_length; *p++ = ':'; } memcpy(p, qname->local_name, qname->local_name_length); p += qname->local_name_length; *p++ = '='; *p++ = quote; if(qname->value_length) { p += raptor_xml_escape_string(qname->world, qname->value, qname->value_length, p, length, quote); } *p++ = quote; /* *p used here since we never need to use value of p again [CLANG] */ *p = '\0'; return buffer; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_www_curl.c����������������������������������������������������������������0000644�0001750�0001750�00000021062�12107054750�014306� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_www_curl.c - Raptor WWW retrieval via libcurl * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef RAPTOR_WWW_LIBCURL #include <stdio.h> #include <string.h> #include <stdarg.h> /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" static void raptor_www_curl_update_status(raptor_www* www) { char* final_uri; if(www->failed) return; if(www->checked_status++) return; if(!www->final_uri) { /* If not already found in headers by * raptor_www_curl_header_callback() which overrides what libcurl * found in HTTP status line (3xx) */ if(curl_easy_getinfo(www->curl_handle, CURLINFO_EFFECTIVE_URL, &final_uri) == CURLE_OK) { www->final_uri = raptor_new_uri(www->world, (const unsigned char*)final_uri); if(www->final_uri_handler) www->final_uri_handler(www, www->final_uri_userdata, www->final_uri); } } } static size_t raptor_www_curl_write_callback(void *ptr, size_t size, size_t nmemb, void *userdata) { raptor_www* www = (raptor_www*)userdata; size_t bytes = size * nmemb; /* If WWW has been aborted, return nothing so that * libcurl will abort the transfer */ if(www->failed) return 0; raptor_www_curl_update_status(www); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 RAPTOR_DEBUG2("Got %d bytes\n", bytes); #endif if(www->write_bytes) www->write_bytes(www, www->write_bytes_userdata, ptr, size, nmemb); www->total_bytes += bytes; return bytes; } static size_t raptor_www_curl_header_callback(void* ptr, size_t size, size_t nmemb, void *userdata) { raptor_www* www = (raptor_www*)userdata; size_t bytes = size * nmemb; int c; /* If WWW has been aborted, return nothing so that * libcurl will abort the transfer */ if(www->failed) return 0; #define CONTENT_TYPE_LEN 14 if(!raptor_strncasecmp((char*)ptr, "Content-Type: ", CONTENT_TYPE_LEN)) { size_t len = bytes - CONTENT_TYPE_LEN - 2; /* for \r\n */ char *type_buffer = RAPTOR_MALLOC(char*, len + 1); memcpy(type_buffer, (char*)ptr + 14, len); type_buffer[len]='\0'; if(www->type) RAPTOR_FREE(char*, www->type); www->type = type_buffer; www->free_type = 1; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 RAPTOR_DEBUG3("Got content type header '%s' (%d bytes)\n", type_buffer, len); #endif if(www->content_type) www->content_type(www, www->content_type_userdata, www->type); } #define CONTENT_LOCATION_LEN 18 if(!raptor_strncasecmp((char*)ptr, "Content-Location: ", CONTENT_LOCATION_LEN)) { size_t uri_len = bytes - CONTENT_LOCATION_LEN - 2; /* for \r\n */ unsigned char* uri_str = (unsigned char*)ptr + CONTENT_LOCATION_LEN; if(www->final_uri) raptor_free_uri(www->final_uri); /* Ensure it is NUL terminated */ c = uri_str[uri_len]; uri_str[uri_len] = '\0'; www->final_uri = raptor_new_uri_relative_to_base_counted(www->world, www->uri, uri_str, uri_len); uri_str[uri_len] = c; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 if(www->final_uri) RAPTOR_DEBUG2("Got content location header '%s'\n", raptor_uri_as_string(www->final_uri)); #endif if(www->final_uri_handler) www->final_uri_handler(www, www->final_uri_userdata, www->final_uri); } return bytes; } void raptor_www_curl_init(raptor_www *www) { if(!www->curl_handle) { www->curl_handle = curl_easy_init(); www->curl_init_here = 1; } #ifndef CURLOPT_WRITEDATA #define CURLOPT_WRITEDATA CURLOPT_FILE #endif /* send all data to this function */ curl_easy_setopt(www->curl_handle, CURLOPT_WRITEFUNCTION, raptor_www_curl_write_callback); /* ... using this data pointer */ curl_easy_setopt(www->curl_handle, CURLOPT_WRITEDATA, www); /* send all headers to this function */ curl_easy_setopt(www->curl_handle, CURLOPT_HEADERFUNCTION, raptor_www_curl_header_callback); /* ... using this data pointer */ curl_easy_setopt(www->curl_handle, CURLOPT_WRITEHEADER, www); /* Make it follow Location: headers */ curl_easy_setopt(www->curl_handle, CURLOPT_FOLLOWLOCATION, 1); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 2 curl_easy_setopt(www->curl_handle, CURLOPT_VERBOSE, (void*)1); #endif curl_easy_setopt(www->curl_handle, CURLOPT_ERRORBUFFER, www->error_buffer); /* Connection timeout in seconds */ curl_easy_setopt(www->curl_handle, CURLOPT_CONNECTTIMEOUT, www->connection_timeout); curl_easy_setopt(www->curl_handle, CURLOPT_NOSIGNAL, 1); } void raptor_www_curl_free(raptor_www *www) { /* only tidy up if we did all the work */ if(www->curl_init_here && www->curl_handle) { curl_easy_cleanup(www->curl_handle); www->curl_handle = NULL; } } int raptor_www_curl_fetch(raptor_www *www) { struct curl_slist *slist = NULL; if(www->proxy) curl_easy_setopt(www->curl_handle, CURLOPT_PROXY, www->proxy); if(www->user_agent) curl_easy_setopt(www->curl_handle, CURLOPT_USERAGENT, www->user_agent); if(www->http_accept) slist = curl_slist_append(slist, (const char*)www->http_accept); /* ALWAYS disable curl default "Pragma: no-cache" */ slist = curl_slist_append(slist, "Pragma:"); if(www->cache_control) slist = curl_slist_append(slist, (const char*)www->cache_control); if(slist) curl_easy_setopt(www->curl_handle, CURLOPT_HTTPHEADER, slist); /* specify URL to get */ curl_easy_setopt(www->curl_handle, CURLOPT_URL, raptor_uri_as_string(www->uri)); if(curl_easy_perform(www->curl_handle)) { /* failed */ www->failed = 1; raptor_www_error(www, "Resolving URI failed: %s", www->error_buffer); } else { long lstatus; #ifndef CURLINFO_RESPONSE_CODE #define CURLINFO_RESPONSE_CODE CURLINFO_HTTP_CODE #endif /* Requires pointer to a long */ if(curl_easy_getinfo(www->curl_handle, CURLINFO_RESPONSE_CODE, &lstatus) == CURLE_OK) /* CURL status code will always fit in an int */ www->status_code = RAPTOR_GOOD_CAST(int, lstatus); } if(slist) curl_slist_free_all(slist); return www->failed; } int raptor_www_curl_set_ssl_cert_options(raptor_www* www, const char* cert_filename, const char* cert_type, const char* cert_passphrase) { /* client certificate file name */ if(cert_filename) curl_easy_setopt(www->curl_handle, CURLOPT_SSLCERT, cert_filename); /* curl default is "PEM" */ if(cert_type) curl_easy_setopt(www->curl_handle, CURLOPT_SSLCERTTYPE, cert_type); /* passphrase */ /* Removed in 7.16.4 */ #if LIBCURL_VERSION_NUM < 0x071004 #define CURLOPT_KEYPASSWD CURLOPT_SSLKEYPASSWD #endif if(cert_passphrase) curl_easy_setopt(www->curl_handle, CURLOPT_KEYPASSWD, cert_passphrase); return 0; } int raptor_www_curl_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host) { if(verify_peer) verify_peer = 1; curl_easy_setopt(www->curl_handle, CURLOPT_SSL_VERIFYPEER, verify_peer); /* curl 7.28.1 removed the value 1 from being legal: * http://daniel.haxx.se/blog/2012/10/25/libcurl-claimed-to-be-dangerous/ * * CURL GIT commit da82f59b697310229ccdf66104d5d65a44dfab98 * Sat Oct 27 12:31:39 2012 +0200 * * Legal values are: * 0 to disable host verifying * 2 (default) to enable host verifyinging */ if(verify_host) verify_host = 2; curl_easy_setopt(www->curl_handle, CURLOPT_SSL_VERIFYHOST, verify_host); return 0; } #endif /* RAPTOR_WWW_LIBCURL */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/turtle_common.h������������������������������������������������������������������0000644�0001750�0001750�00000004243�12425333224�013743� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_common.h - Turtle lexer/parser shared internals * * Copyright (C) 2003-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifndef TURTLE_COMMON_H #define TURTLE_COMMON_H #ifdef __cplusplus extern "C" { #endif /* turtle_parser.y */ RAPTOR_INTERNAL_API int turtle_syntax_error(raptor_parser *rdf_parser, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); RAPTOR_INTERNAL_API raptor_uri* turtle_qname_to_uri(raptor_parser *rdf_parser, unsigned char *name, size_t name_len); RAPTOR_INTERNAL_API size_t raptor_turtle_expand_qname_escapes(unsigned char *name, size_t len, raptor_simple_message_handler error_handler, void *error_data); /* turtle_lexer.l */ extern void turtle_token_free(raptor_world* world, int token, YYSTYPE *lval); /* * Turtle parser object */ struct raptor_turtle_parser_s { /* buffer */ char *buffer; /* buffer length */ size_t buffer_length; /* static statement for use in passing to user code */ raptor_statement statement; raptor_namespace_stack namespaces; /* static */ /* for lexer to store result in */ YYSTYPE lval; /* STATIC lexer */ yyscan_t scanner; int scanner_set; int lineno; /* for creating long literals */ raptor_stringbuffer* sb; /* count of errors in current parse */ int error_count; /* TRIG graph name */ raptor_term* graph_name; /* Allow TRIG extensions */ int trig; }; #ifdef __cplusplus } #endif #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_rss.c���������������������������������������������������������������������0000644�0001750�0001750�00000152226�12325013605�013247� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_rss.c - Raptor Feeds (RSS and Atom) tag soup parser * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include "raptor_rss.h" /* local prototypes */ static void raptor_rss_uplift_items(raptor_parser* rdf_parser); static int raptor_rss_emit(raptor_parser* rdf_parser); static void raptor_rss_start_element_handler(void *user_data, raptor_xml_element* xml_element); static void raptor_rss_end_element_handler(void *user_data, raptor_xml_element* xml_element); static void raptor_rss_cdata_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len); static void raptor_rss_comment_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s); static void raptor_rss_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace); /* * RSS parser object */ struct raptor_rss_parser_s { /* static model */ raptor_rss_model model; /* current line */ char *line; /* current line length */ int line_length; /* current char in line buffer */ int offset; /* static statement for use in passing to user code */ raptor_statement statement; raptor_sax2 *sax2; /* rss node type of current CONTAINER item */ raptor_rss_type current_type; /* one place stack */ raptor_rss_type prev_type; raptor_rss_fields_type current_field; /* emptyness of current element */ int element_is_empty; /* stack of namespaces */ raptor_namespace_stack *nstack; /* non-0 if this is an atom 1.0 parser */ int is_atom; /* namespaces declared here */ raptor_namespace* nspaces[RAPTOR_RSS_NAMESPACES_SIZE]; /* namespaces seen during parsing or creating output model */ char nspaces_seen[RAPTOR_RSS_NAMESPACES_SIZE]; /* current BLOCK pointer (inside CONTAINER of type current_type) */ raptor_rss_block *current_block; }; typedef struct raptor_rss_parser_s raptor_rss_parser; typedef enum { RAPTOR_RSS_CONTENT_TYPE_NONE, RAPTOR_RSS_CONTENT_TYPE_XML, RAPTOR_RSS_CONTENT_TYPE_TEXT } raptor_rss_content_type; struct raptor_rss_element_s { raptor_world* world; raptor_uri* uri; /* Two types of content */ raptor_rss_content_type type; /* 1) XML */ raptor_xml_writer* xml_writer; /* XML written to this iostream to the xml_content string */ raptor_iostream* iostream; /* ends up here */ void *xml_content; size_t xml_content_length; /* 2) cdata */ raptor_stringbuffer* sb; }; typedef struct raptor_rss_element_s raptor_rss_element; static void raptor_free_rss_element(raptor_rss_element *rss_element) { if(rss_element->uri) raptor_free_uri(rss_element->uri); if(rss_element->type == RAPTOR_RSS_CONTENT_TYPE_XML) { if(rss_element->xml_writer) raptor_free_xml_writer(rss_element->xml_writer); if(rss_element->iostream) raptor_free_iostream(rss_element->iostream); if(rss_element->xml_content) raptor_free_memory(rss_element->xml_content); } if(rss_element->sb) raptor_free_stringbuffer(rss_element->sb); RAPTOR_FREE(raptor_rss_element, rss_element); } static int raptor_rss_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_sax2* sax2; int n; raptor_rss_common_init(rdf_parser->world); raptor_rss_model_init(rdf_parser->world, &rss_parser->model); rss_parser->prev_type = RAPTOR_RSS_NONE; rss_parser->current_field = RAPTOR_RSS_FIELD_NONE; rss_parser->current_type = RAPTOR_RSS_NONE; rss_parser->current_block = NULL; if(rss_parser->sax2) { raptor_free_sax2(rss_parser->sax2); rss_parser->sax2 = NULL; } rss_parser->nstack = raptor_new_namespaces(rdf_parser->world, 1); /* Initialise the namespaces */ for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { unsigned const char* prefix; raptor_uri* uri; raptor_namespace* nspace = NULL; prefix = (unsigned const char*)raptor_rss_namespaces_info[n].prefix; uri = rdf_parser->world->rss_namespaces_info_uris[n]; if(prefix && uri) nspace = raptor_new_namespace_from_uri(rss_parser->nstack, prefix, uri, 0); rss_parser->nspaces[n] = nspace; } sax2 = raptor_new_sax2(rdf_parser->world, &rdf_parser->locator, rdf_parser); rss_parser->sax2 = sax2; raptor_sax2_set_start_element_handler(sax2, raptor_rss_start_element_handler); raptor_sax2_set_end_element_handler(sax2, raptor_rss_end_element_handler); raptor_sax2_set_characters_handler(sax2, raptor_rss_cdata_handler); raptor_sax2_set_cdata_handler(sax2, raptor_rss_cdata_handler); raptor_sax2_set_comment_handler(sax2, raptor_rss_comment_handler); raptor_sax2_set_namespace_handler(sax2, raptor_rss_sax2_new_namespace_handler); raptor_statement_init(&rss_parser->statement, rdf_parser->world); return 0; } static void raptor_rss_parse_terminate(raptor_parser *rdf_parser) { raptor_rss_parser *rss_parser = (raptor_rss_parser*)rdf_parser->context; int n; if(rss_parser->sax2) raptor_free_sax2(rss_parser->sax2); raptor_rss_model_clear(&rss_parser->model); for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { if(rss_parser->nspaces[n]) raptor_free_namespace(rss_parser->nspaces[n]); } if(rss_parser->nstack) raptor_free_namespaces(rss_parser->nstack); raptor_rss_common_terminate(rdf_parser->world); } static int raptor_rss_parse_start(raptor_parser *rdf_parser) { raptor_uri *uri = rdf_parser->base_uri; raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int n; /* base URI required for RSS */ if(!uri) return 1; for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) rss_parser->nspaces_seen[n] = 'N'; /* Optionally forbid internal network and file requests in the XML parser */ raptor_sax2_set_option(rss_parser->sax2, RAPTOR_OPTION_NO_NET, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_NET)); raptor_sax2_set_option(rss_parser->sax2, RAPTOR_OPTION_NO_FILE, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_NO_FILE)); raptor_sax2_set_option(rss_parser->sax2, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES, NULL, RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES)); if(rdf_parser->uri_filter) raptor_sax2_set_uri_filter(rss_parser->sax2, rdf_parser->uri_filter, rdf_parser->uri_filter_user_data); raptor_sax2_parse_start(rss_parser->sax2, uri); return 0; } static int raptor_rss_add_container(raptor_rss_parser *rss_parser, const char *name) { raptor_rss_type type = RAPTOR_RSS_NONE; if(!strcmp(name, "rss") || !strcmp(name, "rdf") || !strcmp(name, "RDF")) { /* rss */ } else if(!raptor_strcasecmp(name, "channel")) { /* rss or atom 0.3 channel */ type = RAPTOR_RSS_CHANNEL; } else if(!strcmp(name, "feed")) { /* atom 1.0 feed */ type = RAPTOR_RSS_CHANNEL; rss_parser->is_atom = 1; } else if(!strcmp(name, "item")) { type = RAPTOR_RSS_ITEM; } else if(!strcmp(name, "entry")) { type = RAPTOR_RSS_ITEM; rss_parser->is_atom = 1; } else { int i; for(i = 0; i < RAPTOR_RSS_COMMON_SIZE; i++) { if(!(raptor_rss_items_info[i].flags & RAPTOR_RSS_ITEM_CONTAINER)) continue; if(!strcmp(name, raptor_rss_items_info[i].name)) { /* rss and atom clash on the author name field (rss) or type (atom) */ if(i != RAPTOR_ATOM_AUTHOR || (i == RAPTOR_ATOM_AUTHOR && rss_parser->is_atom)) { type = (raptor_rss_type)i; break; } } } } if(type != RAPTOR_RSS_NONE) { if(type == RAPTOR_RSS_ITEM) raptor_rss_model_add_item(&rss_parser->model); else raptor_rss_model_add_common(&rss_parser->model, type); /* Inner container - push the current type onto a 1-place stack */ if(rss_parser->current_type != RAPTOR_RSS_NONE) rss_parser->prev_type = rss_parser->current_type; rss_parser->current_type = type; } return (type == RAPTOR_RSS_NONE); } static raptor_uri* raptor_rss_promote_namespace_uri(raptor_world *world, raptor_uri* nspace_URI) { /* RSS 0.9 and RSS 1.1 namespaces => RSS 1.0 namespace */ if((raptor_uri_equals(nspace_URI, world->rss_namespaces_info_uris[RSS0_9_NS]) || raptor_uri_equals(nspace_URI, world->rss_namespaces_info_uris[RSS1_1_NS]))) { nspace_URI = world->rss_namespaces_info_uris[RSS1_0_NS]; } /* Atom 0.3 namespace => Atom 1.0 namespace */ if(raptor_uri_equals(nspace_URI, world->rss_namespaces_info_uris[ATOM0_3_NS])) { nspace_URI = world->rss_namespaces_info_uris[ATOM1_0_NS]; } return nspace_URI; } static raptor_rss_item* raptor_rss_get_current_item(raptor_rss_parser *rss_parser) { raptor_rss_item* item; if(rss_parser->current_type == RAPTOR_RSS_ITEM) item = rss_parser->model.last; else item = raptor_rss_model_get_common(&rss_parser->model, rss_parser->current_type); return item; } static int raptor_rss_block_set_field(raptor_world *world, raptor_uri *base_uri, raptor_rss_block *block, const raptor_rss_block_field_info *bfi, const char *string) { int attribute_type = bfi->attribute_type; int offset = bfi->offset; if(attribute_type == RSS_BLOCK_FIELD_TYPE_URL) { raptor_uri* uri; uri = raptor_new_uri_relative_to_base(world, base_uri, (const unsigned char*)string); if(!uri) return 1; block->urls[offset] = uri; } else if(attribute_type == RSS_BLOCK_FIELD_TYPE_STRING) { size_t len = strlen(string); block->strings[offset] = RAPTOR_MALLOC(char*, len + 1); if(!block->strings[offset]) return 1; memcpy(block->strings[offset], string, len+1); } else { #ifdef RAPTOR_DEBUG RAPTOR_FATAL2("Found unknown attribute_type %d\n", attribute_type); #endif return 1; } return 0; } static void raptor_rss_start_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser *rdf_parser; raptor_rss_parser *rss_parser; raptor_rss_block *block = NULL; raptor_uri* base_uri; raptor_qname *el_qname; const unsigned char *name; int ns_attributes_count; raptor_qname** named_attrs; const raptor_namespace* el_nspace; raptor_rss_element* rss_element; int i; rdf_parser = (raptor_parser*)user_data; rss_parser = (raptor_rss_parser*)rdf_parser->context; rss_element = RAPTOR_CALLOC(raptor_rss_element*, 1, sizeof(*rss_element)); if(!rss_element) { rdf_parser->failed = 1; return; } rss_element->world = rdf_parser->world; rss_element->sb = raptor_new_stringbuffer(); xml_element->user_data = rss_element; if(xml_element->parent) { raptor_rss_element* parent_rss_element; parent_rss_element = (raptor_rss_element*)(xml_element->parent->user_data); if(parent_rss_element->xml_writer) rss_element->xml_writer = parent_rss_element->xml_writer; } if(rss_element->xml_writer) { raptor_xml_writer_start_element(rss_element->xml_writer, xml_element); return; } el_qname = raptor_xml_element_get_name(xml_element); name = el_qname->local_name; el_nspace = el_qname->nspace; named_attrs = raptor_xml_element_get_attributes(xml_element); ns_attributes_count = raptor_xml_element_get_attributes_count(xml_element); base_uri = raptor_sax2_inscope_base_uri(rss_parser->sax2); /* No container type - identify and record in rss_parser->current_type * either as a top-level container or an inner-container */ if(!raptor_rss_add_container(rss_parser, (const char*)name)) { #ifdef RAPTOR_DEBUG if(1) { raptor_rss_type old_type = rss_parser->prev_type; if(old_type != rss_parser->current_type && old_type != RAPTOR_RSS_NONE) RAPTOR_DEBUG5("FOUND inner container type %d - %s INSIDE current container type %d - %s\n", rss_parser->current_type, raptor_rss_items_info[rss_parser->current_type].name, old_type, raptor_rss_items_info[old_type].name); else RAPTOR_DEBUG3("FOUND container type %d - %s\n", rss_parser->current_type, raptor_rss_items_info[rss_parser->current_type].name); } #endif /* check a few container attributes */ if(named_attrs) { raptor_rss_item* update_item = raptor_rss_get_current_item(rss_parser); for(i = 0; i < ns_attributes_count; i++) { raptor_qname* attr = named_attrs[i]; const char* attrName = (const char*)attr->local_name; const unsigned char* attrValue = attr->value; RAPTOR_DEBUG3(" container attribute %s=%s\n", attrName, attrValue); if(!strcmp(attrName, "about")) { if(update_item) { update_item->uri = raptor_new_uri(rdf_parser->world, attrValue); update_item->term = raptor_new_term_from_uri(rdf_parser->world, update_item->uri); } } } } return; } else if(rss_parser->current_type == RAPTOR_RSS_NONE) { RAPTOR_DEBUG2("Unknown container element named %s\n", name); /* Nothing more that can be done with unknown element - skip it */ return; } /* have container (current_type) so this element is inside it is either: * 1. a metadata block element (such as rss:enclosure) * 2. a field (such as atom:title) */ /* Find field ID */ rss_parser->current_field = RAPTOR_RSS_FIELD_UNKNOWN; for(i = 0; i < RAPTOR_RSS_FIELDS_SIZE; i++) { raptor_uri* nspace_URI; raptor_uri* field_nspace_URI; rss_info_namespace nsid = raptor_rss_fields_info[i].nspace; if(strcmp((const char*)name, raptor_rss_fields_info[i].name)) continue; if(!el_nspace) { if(nsid != RSS_NO_NS && nsid != RSS1_0_NS && nsid != RSS0_91_NS && nsid != RSS0_9_NS && nsid != RSS1_1_NS) continue; /* Matches if the element has no namespace and field is not atom */ rss_parser->current_field = (raptor_rss_fields_type)i; break; } /* Promote element namespaces */ nspace_URI = raptor_rss_promote_namespace_uri(rdf_parser->world, raptor_namespace_get_uri(el_nspace)); field_nspace_URI = rdf_parser->world->rss_namespaces_info_uris[raptor_rss_fields_info[i].nspace]; if(raptor_uri_equals(nspace_URI, field_nspace_URI)) { rss_parser->current_field = (raptor_rss_fields_type)i; break; } } if(rss_parser->current_field == RAPTOR_RSS_FIELD_UNKNOWN) { RAPTOR_DEBUG3("Unknown field element named %s inside type %s\n", name, raptor_rss_items_info[rss_parser->current_type].name); return; } /* Found a block element to process */ if(raptor_rss_fields_info[rss_parser->current_field].flags & RAPTOR_RSS_INFO_FLAG_BLOCK_VALUE) { raptor_rss_type block_type; raptor_rss_item* update_item; const unsigned char *id; raptor_term* block_term; block_type = raptor_rss_fields_info[rss_parser->current_field].block_type; RAPTOR_DEBUG3("FOUND new block type %d - %s\n", block_type, raptor_rss_items_info[block_type].name); update_item = raptor_rss_get_current_item(rss_parser); id = raptor_world_generate_bnodeid(rdf_parser->world); block_term = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); block = raptor_new_rss_block(rdf_parser->world, block_type, block_term); raptor_free_term(block_term); raptor_rss_item_add_block(update_item, block); rss_parser->current_block = block; rss_parser->nspaces_seen[raptor_rss_items_info[block_type].nspace] = 'Y'; /* Now check block attributes */ if(named_attrs) { for(i = 0; i < ns_attributes_count; i++) { raptor_qname* attr = named_attrs[i]; const char* attrName = (const char*)attr->local_name; const unsigned char* attrValue = attr->value; const raptor_rss_block_field_info *bfi; int offset = -1; for(bfi = &raptor_rss_block_fields_info[0]; bfi->type != RAPTOR_RSS_NONE; bfi++) { if(!bfi->attribute) continue; if(bfi->type == block_type && !strcmp(attrName, bfi->attribute)) { offset = bfi->offset; break; } } if(offset < 0) continue; /* Found attribute for this block type */ RAPTOR_DEBUG3(" found block attribute %s=%s\n", attrName, attrValue); if(raptor_rss_block_set_field(rdf_parser->world, base_uri, block, bfi, (const char*)attrValue)) { rdf_parser->failed = 1; return; } } } return; } /* Process field */ RAPTOR_DEBUG4("FOUND field %d - %s inside type %s\n", rss_parser->current_field, raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); /* Mark namespace seen in new field */ if(1) { rss_info_namespace ns_index; ns_index = raptor_rss_fields_info[rss_parser->current_field].nspace; rss_parser->nspaces_seen[ns_index] = 'Y'; } /* Now check for field attributes */ if(named_attrs) { for(i = 0; i < ns_attributes_count; i++) { raptor_qname* attr = named_attrs[i]; const unsigned char* attrName = attr->local_name; const unsigned char* attrValue = attr->value; RAPTOR_DEBUG3(" attribute %s=%s\n", attrName, attrValue); /* Pick a few attributes to care about */ if(!strcmp((const char*)attrName, "isPermaLink")) { raptor_rss_item* update_item = rss_parser->model.last; if(!strcmp((const char*)name, "guid")) { /* <guid isPermaLink="..."> */ if(update_item) { raptor_rss_field* field = raptor_rss_new_field(rdf_parser->world); RAPTOR_DEBUG1("fa1 - "); raptor_rss_item_add_field(update_item, RAPTOR_RSS_FIELD_GUID, field); if(!strcmp((const char*)attrValue, "true")) { RAPTOR_DEBUG2(" setting guid to URI '%s'\n", attrValue); field->uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, (const unsigned char*)attrValue); } else { size_t len = strlen((const char*)attrValue); RAPTOR_DEBUG2(" setting guid to string '%s'\n", attrValue); field->value = RAPTOR_MALLOC(unsigned char*, len + 1); if(!field->value) { rdf_parser->failed = 1; return; } memcpy(field->value, attrValue, len + 1); } } } } else if(!strcmp((const char*)attrName, "href")) { if(rss_parser->current_field == RAPTOR_RSS_FIELD_LINK || rss_parser->current_field == RAPTOR_RSS_FIELD_ATOM_LINK) { RAPTOR_DEBUG2(" setting href as URI string for type %s\n", raptor_rss_items_info[rss_parser->current_type].name); if(rss_element->uri) raptor_free_uri(rss_element->uri); rss_element->uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, (const unsigned char*)attrValue); } } else if(!strcmp((const char*)attrName, "type")) { if(rss_parser->current_field == RAPTOR_RSS_FIELD_ATOM_LINK) { /* do nothing with atom link attribute type */ } else if(rss_parser->is_atom) { /* Atom only typing */ if(!strcmp((const char*)attrValue, "xhtml") || !strcmp((const char*)attrValue, "xml") || strstr((const char*)attrValue, "+xml")) { RAPTOR_DEBUG2(" found type '%s', making an XML writer\n", attrValue); rss_element->type = RAPTOR_RSS_CONTENT_TYPE_XML; rss_element->iostream = raptor_new_iostream_to_string(rdf_parser->world, &rss_element->xml_content, &rss_element->xml_content_length, raptor_alloc_memory); rss_element->xml_writer = raptor_new_xml_writer(rdf_parser->world, NULL, rss_element->iostream); raptor_xml_writer_set_option(rss_element->xml_writer, RAPTOR_OPTION_WRITER_XML_DECLARATION, NULL, 0); raptor_free_stringbuffer(rss_element->sb); rss_element->sb = NULL; } } } else if(!strcmp((const char*)attrName, "version")) { if(!raptor_strcasecmp((const char*)name, "feed")) { if(!strcmp((const char*)attrValue, "0.3")) rss_parser->is_atom = 1; } } } } /* if have field attributes */ } static void raptor_rss_end_element_handler(void *user_data, raptor_xml_element* xml_element) { raptor_parser* rdf_parser; raptor_rss_parser* rss_parser; #ifdef RAPTOR_DEBUG const unsigned char* name = raptor_xml_element_get_name(xml_element)->local_name; #endif raptor_rss_element* rss_element; size_t cdata_len = 0; unsigned char* cdata = NULL; rss_element = (raptor_rss_element*)xml_element->user_data; rdf_parser = (raptor_parser*)user_data; rss_parser = (raptor_rss_parser*)rdf_parser->context; if(rss_element->xml_writer) { if(rss_element->type != RAPTOR_RSS_CONTENT_TYPE_XML) { raptor_xml_writer_end_element(rss_element->xml_writer, xml_element); goto tidy_end_element; } /* otherwise we are done making XML */ raptor_free_iostream(rss_element->iostream); rss_element->iostream = NULL; cdata = (unsigned char*)rss_element->xml_content; cdata_len = rss_element->xml_content_length; } if(rss_element->sb) { cdata_len = raptor_stringbuffer_length(rss_element->sb); cdata = raptor_stringbuffer_as_string(rss_element->sb); } if(cdata) { raptor_uri* base_uri = NULL; base_uri = raptor_sax2_inscope_base_uri(rss_parser->sax2); if(rss_parser->current_block) { const raptor_rss_block_field_info *bfi; #ifdef RAPTOR_DEBUG int handled = 0; #endif /* in a block, maybe store the CDATA there */ for(bfi = &raptor_rss_block_fields_info[0]; bfi->type != RAPTOR_RSS_NONE; bfi++) { if(bfi->type != rss_parser->current_block->rss_type || bfi->attribute != NULL) continue; /* Set author name from element */ if(raptor_rss_block_set_field(rdf_parser->world, base_uri, rss_parser->current_block, bfi, (const char*)cdata)) { rdf_parser->failed = 1; return; } #ifdef RAPTOR_DEBUG handled = 1; #endif break; } #ifdef RAPTOR_DEBUG if(!handled) { raptor_rss_type block_type = rss_parser->current_block->rss_type; RAPTOR_DEBUG3("Ignoring cdata for block %d - %s\n", block_type, raptor_rss_items_info[block_type].name); } #endif rss_parser->current_block = NULL; goto do_end_element; } if(rss_parser->current_type == RAPTOR_RSS_NONE || (rss_parser->current_field == RAPTOR_RSS_FIELD_NONE || rss_parser->current_field == RAPTOR_RSS_FIELD_UNKNOWN)) { unsigned char *p = cdata; size_t i; for(i = cdata_len; i > 0 && *p; i--) { if(!isspace(*p)) break; p++; } if(i > 0 && *p) { RAPTOR_DEBUG4("IGNORING non-whitespace text '%s' inside type %s, field %s\n", cdata, raptor_rss_items_info[rss_parser->current_type].name, raptor_rss_fields_info[rss_parser->current_field].name); } goto do_end_element; } if(rss_parser->current_type >= RAPTOR_RSS_COMMON_IGNORED) { /* skipHours, skipDays common but IGNORED */ RAPTOR_DEBUG2("Ignoring fields for type %s\n", raptor_rss_items_info[rss_parser->current_type].name); } else { raptor_rss_item* update_item = raptor_rss_get_current_item(rss_parser); raptor_rss_field* field = raptor_rss_new_field(rdf_parser->world); /* if value is always an uri, make it so */ if(raptor_rss_fields_info[rss_parser->current_field].flags & RAPTOR_RSS_INFO_FLAG_URI_VALUE) { RAPTOR_DEBUG4("Added URI %s to field %s of type %s\n", cdata, raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); field->uri = raptor_new_uri_relative_to_base(rdf_parser->world, base_uri, cdata); } else { RAPTOR_DEBUG4("Added text '%s' to field %s of type %s\n", cdata, raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); field->uri = NULL; field->value = RAPTOR_MALLOC(unsigned char*, cdata_len + 1); if(!field->value) { rdf_parser->failed = 1; raptor_rss_field_free(field); return; } memcpy(field->value, cdata, cdata_len); field->value[cdata_len] = '\0'; } RAPTOR_DEBUG1("fa3 - "); raptor_rss_item_add_field(update_item, rss_parser->current_field, field); } } /* end if contained cdata */ if(raptor_xml_element_is_empty(xml_element)) { /* Empty element, so consider adding one of the attributes as * literal or URI content */ if(rss_parser->current_type >= RAPTOR_RSS_COMMON_IGNORED) { /* skipHours, skipDays common but IGNORED */ RAPTOR_DEBUG3("Ignoring empty element %s for type %s\n", name, raptor_rss_items_info[rss_parser->current_type].name); } else if(rss_element->uri) { raptor_rss_item* update_item = raptor_rss_get_current_item(rss_parser); raptor_rss_field* field = raptor_rss_new_field(rdf_parser->world); if(rss_parser->current_field == RAPTOR_RSS_FIELD_UNKNOWN) { RAPTOR_DEBUG2("Cannot add URI from alternate attribute to type %s unknown field\n", raptor_rss_items_info[rss_parser->current_type].name); raptor_rss_field_free(field); } else { RAPTOR_DEBUG3("Added URI to field %s of type %s\n", raptor_rss_fields_info[rss_parser->current_field].name, raptor_rss_items_info[rss_parser->current_type].name); field->uri = rss_element->uri; rss_element->uri = NULL; RAPTOR_DEBUG1("fa2 - "); raptor_rss_item_add_field(update_item, rss_parser->current_field, field); } } } do_end_element: if(rss_parser->current_type != RAPTOR_RSS_NONE) { if(rss_parser->current_field != RAPTOR_RSS_FIELD_NONE) { RAPTOR_DEBUG3("Ending element %s field %s\n", name, raptor_rss_fields_info[rss_parser->current_field].name); rss_parser->current_field = RAPTOR_RSS_FIELD_NONE; } else { RAPTOR_DEBUG3("Ending element %s type %s\n", name, raptor_rss_items_info[rss_parser->current_type].name); if(rss_parser->prev_type != RAPTOR_RSS_NONE) { rss_parser->current_type = rss_parser->prev_type; rss_parser->prev_type = RAPTOR_RSS_NONE; RAPTOR_DEBUG3("Returning to type %d - %s\n", rss_parser->current_type, raptor_rss_items_info[rss_parser->current_type].name); } else rss_parser->current_type = RAPTOR_RSS_NONE; } } if(rss_parser->current_block) { #ifdef RAPTOR_DEBUG raptor_rss_type block_type = rss_parser->current_block->rss_type; RAPTOR_DEBUG3("Ending current block %d - %s\n", block_type, raptor_rss_items_info[block_type].name); #endif rss_parser->current_block = NULL; } tidy_end_element: raptor_free_rss_element(rss_element); } static void raptor_rss_cdata_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s, int len) { raptor_rss_element* rss_element; rss_element = (raptor_rss_element*)xml_element->user_data; if(rss_element->xml_writer) { raptor_xml_writer_cdata_counted(rss_element->xml_writer, s, len); return; } raptor_stringbuffer_append_counted_string(rss_element->sb, s, len, 1); } static void raptor_rss_comment_handler(void *user_data, raptor_xml_element* xml_element, const unsigned char *s) { raptor_rss_element* rss_element; if(!xml_element) return; rss_element = (raptor_rss_element*)xml_element->user_data; if(rss_element->xml_writer) { raptor_xml_writer_comment(rss_element->xml_writer, s); return; } } static void raptor_rss_sax2_new_namespace_handler(void *user_data, raptor_namespace* nspace) { raptor_parser* rdf_parser = (raptor_parser*)user_data; raptor_rss_parser* rss_parser; int n; rss_parser = (raptor_rss_parser*)rdf_parser->context; for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { raptor_uri* ns_uri = rdf_parser->world->rss_namespaces_info_uris[n]; if(!ns_uri) continue; if(!raptor_uri_equals(ns_uri, nspace->uri)) { rss_parser->nspaces_seen[n] = 'Y'; break; } } } /* Add an rss:link from string contents of either: * atom:id * atom:link[@rel="self"]/@href */ static int raptor_rss_insert_rss_link(raptor_parser* rdf_parser, raptor_rss_item* item) { raptor_rss_block *block; raptor_rss_field* id_field; raptor_rss_field* field = NULL; /* Try atom:id first */ id_field = item->fields[RAPTOR_RSS_FIELD_ATOM_ID]; if(id_field && id_field->value) { const char *value = (const char*)id_field->value; size_t len = strlen(value); field = raptor_rss_new_field(item->world); if(!field) return 1; field->value = RAPTOR_MALLOC(unsigned char*, len + 1); if(!field->value) { raptor_rss_field_free(field); return 1; } memcpy(field->value, value, len + 1); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_LINK, field); return 0; } for(block = item->blocks; block; block = block->next) { if(block->rss_type != RAPTOR_ATOM_LINK) continue; /* <link @href> is url at offset RAPTOR_RSS_LINK_HREF_URL_OFFSET * <link @rel> is string at offset RAPTOR_RSS_LINK_REL_STRING_OFFSET * The raptor_rss_block_fields_info structure records this */ if(!block->urls[RAPTOR_RSS_LINK_HREF_URL_OFFSET] || (block->strings[RAPTOR_RSS_LINK_REL_STRING_OFFSET] && strcmp(block->strings[RAPTOR_RSS_LINK_REL_STRING_OFFSET], "self")) ) continue; /* set the field rss:link to the string value of the @href */ field = raptor_rss_new_field(item->world); field->value = raptor_uri_to_string(block->urls[0]); raptor_rss_item_add_field(item, RAPTOR_RSS_FIELD_LINK, field); return 0; } return 0; } static int raptor_rss_insert_identifiers(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; raptor_rss_item* item; for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { for(item = rss_parser->model.common[i]; item; item = item->next) { if(!item->fields_count) continue; RAPTOR_DEBUG3("Inserting identifiers in common type %d - %s\n", i, raptor_rss_items_info[i].name); if(item->uri) { item->term = raptor_new_term_from_uri(rdf_parser->world, item->uri); } else { int url_fields[2]; int url_fields_count = 1; int f; url_fields[0] = (i== RAPTOR_RSS_IMAGE) ? RAPTOR_RSS_FIELD_URL : RAPTOR_RSS_FIELD_LINK; if(i == RAPTOR_RSS_CHANNEL) { url_fields[1] = RAPTOR_RSS_FIELD_ATOM_ID; url_fields_count++; } for(f = 0; f < url_fields_count; f++) { raptor_rss_field* field; for(field = item->fields[url_fields[f]]; field; field = field->next) { raptor_uri *new_uri = NULL; if(field->value) new_uri = raptor_new_uri(rdf_parser->world, (const unsigned char*)field->value); else if(field->uri) new_uri = raptor_uri_copy(field->uri); if(new_uri) { item->term = raptor_new_term_from_uri(rdf_parser->world, new_uri); raptor_free_uri(new_uri); if(!item->term) return 1; break; } } } if(!item->term) { const unsigned char *id; /* need to make bnode */ id = raptor_world_generate_bnodeid(rdf_parser->world); item->term = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); } } /* Try to add an rss:link if missing */ if(i == RAPTOR_RSS_CHANNEL && !item->fields[RAPTOR_RSS_FIELD_LINK]) { if(raptor_rss_insert_rss_link(rdf_parser, item)) return 1; } item->node_type = &raptor_rss_items_info[i]; item->node_typei = i; } } /* sequence of rss:item */ for(item = rss_parser->model.items; item; item = item->next) { raptor_rss_block *block; raptor_uri* uri = NULL; if(!item->fields[RAPTOR_RSS_FIELD_LINK]) { if(raptor_rss_insert_rss_link(rdf_parser, item)) return 1; } if(item->uri) { uri = raptor_uri_copy(item->uri); } else { if(item->fields[RAPTOR_RSS_FIELD_LINK]) { if(item->fields[RAPTOR_RSS_FIELD_LINK]->value) uri = raptor_new_uri(rdf_parser->world, (const unsigned char*)item->fields[RAPTOR_RSS_FIELD_LINK]->value); else if(item->fields[RAPTOR_RSS_FIELD_LINK]->uri) uri = raptor_uri_copy(item->fields[RAPTOR_RSS_FIELD_LINK]->uri); } else if(item->fields[RAPTOR_RSS_FIELD_ATOM_ID]) { if(item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->value) uri = raptor_new_uri(rdf_parser->world, (const unsigned char*)item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->value); else if(item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->uri) uri = raptor_uri_copy(item->fields[RAPTOR_RSS_FIELD_ATOM_ID]->uri); } } if(!uri) continue; item->term = raptor_new_term_from_uri(rdf_parser->world, uri); raptor_free_uri(uri); uri = NULL; for(block = item->blocks; block; block = block->next) { if(!block->identifier) { const unsigned char *id; /* need to make bnode */ id = raptor_world_generate_bnodeid(rdf_parser->world); item->term = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); } } item->node_type = &raptor_rss_items_info[RAPTOR_RSS_ITEM]; item->node_typei = RAPTOR_RSS_ITEM; } return 0; } static int raptor_rss_emit_type_triple(raptor_parser* rdf_parser, raptor_term *resource, raptor_uri *type_uri) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_term *predicate_term; raptor_term *object_term; if(!resource) { raptor_parser_error(rdf_parser, "RSS node has no identifier"); return 1; } rss_parser->statement.subject = resource; predicate_term = raptor_new_term_from_uri(rdf_parser->world, RAPTOR_RDF_type_URI(rdf_parser->world)); rss_parser->statement.predicate = predicate_term; object_term = raptor_new_term_from_uri(rdf_parser->world, type_uri); rss_parser->statement.object = object_term; /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); raptor_free_term(predicate_term); raptor_free_term(object_term); return 0; } static int raptor_rss_emit_block(raptor_parser* rdf_parser, raptor_term *resource, raptor_rss_block *block) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_rss_type block_type = block->rss_type; raptor_uri *predicate_uri; raptor_term *predicate_term = NULL; const raptor_rss_block_field_info *bfi; raptor_rss_fields_type predicate_field; if(!block->identifier) { raptor_parser_error(rdf_parser, "Block has no identifier"); return 1; } predicate_field = raptor_rss_items_info[block_type].predicate; predicate_uri = rdf_parser->world->rss_fields_info_uris[predicate_field]; predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri); rss_parser->statement.subject = resource; rss_parser->statement.predicate = predicate_term; rss_parser->statement.object = block->identifier; (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); raptor_free_term(predicate_term); predicate_term = NULL; if(raptor_rss_emit_type_triple(rdf_parser, block->identifier, block->node_type)) return 1; for(bfi = &raptor_rss_block_fields_info[0]; bfi->type != RAPTOR_RSS_NONE; bfi++) { int attribute_type; int offset; if(bfi->type != block_type || !bfi->attribute) continue; attribute_type = bfi->attribute_type; offset = bfi->offset; predicate_uri = rdf_parser->world->rss_fields_info_uris[bfi->field]; predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri); rss_parser->statement.predicate = predicate_term; if(attribute_type == RSS_BLOCK_FIELD_TYPE_URL) { raptor_uri *uri = block->urls[offset]; if(uri) { raptor_term* object_term; object_term = raptor_new_term_from_uri(rdf_parser->world, uri); rss_parser->statement.object = object_term; (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); raptor_free_term(object_term); } } else if(attribute_type == RSS_BLOCK_FIELD_TYPE_STRING) { const char *str = block->strings[offset]; if(str) { raptor_term* object_term; object_term = raptor_new_term_from_literal(rdf_parser->world, (const unsigned char*)str, NULL, NULL); rss_parser->statement.object = object_term; (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); raptor_free_term(object_term); } } else { #ifdef RAPTOR_DEBUG RAPTOR_FATAL2("Found unknown attribute_type %d\n", attribute_type); #endif } raptor_free_term(predicate_term); predicate_term = NULL; } return 0; } static int raptor_rss_emit_item(raptor_parser* rdf_parser, raptor_rss_item *item) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int f; raptor_rss_block *block; raptor_uri *type_uri; if(!item->fields_count) return 0; /* HACK - FIXME - set correct atom output class type */ if(item->node_typei == RAPTOR_ATOM_AUTHOR) type_uri = rdf_parser->world->rss_fields_info_uris[RAPTOR_RSS_RDF_ATOM_AUTHOR_CLASS]; else type_uri = rdf_parser->world->rss_types_info_uris[item->node_typei]; if(raptor_rss_emit_type_triple(rdf_parser, item->term, type_uri)) return 1; for(f = 0; f< RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field; raptor_uri* predicate_uri = NULL; raptor_term* predicate_term = NULL; /* This is only made by a connection */ if(f == RAPTOR_RSS_FIELD_ITEMS) continue; /* skip predicates with no URI (no namespace e.g. RSS 2) */ predicate_uri = rdf_parser->world->rss_fields_info_uris[f]; if(!predicate_uri) continue; predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri); if(!predicate_term) continue; rss_parser->statement.predicate = predicate_term; for(field = item->fields[f]; field; field = field->next) { raptor_term* object_term; if(field->value) { /* FIXME - should store and emit languages */ object_term = raptor_new_term_from_literal(rdf_parser->world, field->value, NULL, NULL); } else { object_term = raptor_new_term_from_uri(rdf_parser->world, field->uri); } rss_parser->statement.object = object_term; /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); raptor_free_term(object_term); } raptor_free_term(predicate_term); } for(block = item->blocks; block; block = block->next) { raptor_rss_emit_block(rdf_parser, item->term, block); } return 0; } static int raptor_rss_emit_connection(raptor_parser* rdf_parser, raptor_term *subject_identifier, raptor_uri* predicate_uri, int predicate_ordinal, raptor_term *object_identifier) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; raptor_uri *puri = NULL; raptor_term *predicate_term = NULL; if(!subject_identifier) { raptor_parser_error(rdf_parser, "Connection subject has no identifier"); return 1; } rss_parser->statement.subject = subject_identifier; if(!predicate_uri) { /* new URI object */ puri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world, predicate_ordinal); predicate_uri = puri; } predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri); rss_parser->statement.predicate = predicate_term; rss_parser->statement.object = object_identifier; /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &rss_parser->statement); raptor_free_term(predicate_term); if(puri) raptor_free_uri(puri); return 0; } static int raptor_rss_emit(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; raptor_rss_item* item; int rc = 0; if(!rss_parser->model.common[RAPTOR_RSS_CHANNEL]) { raptor_parser_error(rdf_parser, "No RSS channel item present"); return 1; } if(!rss_parser->model.common[RAPTOR_RSS_CHANNEL]->term) { raptor_parser_error(rdf_parser, "RSS channel has no identifier"); return 1; } /* Emit start default graph mark */ raptor_parser_start_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph++; /* Emit all the common type blocks (channel, author, ...) */ for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { for(item = rss_parser->model.common[i]; item; item = item->next) { if(!item->fields_count) continue; RAPTOR_DEBUG3("Emitting type %i - %s\n", i, raptor_rss_items_info[i].name); if(!item->term) { raptor_parser_error(rdf_parser, "RSS %s has no identifier", raptor_rss_items_info[i].name); rc = 1; goto tidy; } if(raptor_rss_emit_item(rdf_parser, item)) { rc = 1; goto tidy; } /* Add connections to channel */ if(i != RAPTOR_RSS_CHANNEL) { if(raptor_rss_emit_connection(rdf_parser, rss_parser->model.common[RAPTOR_RSS_CHANNEL]->term, rdf_parser->world->rss_types_info_uris[i], 0, item->term)) { rc = 1; goto tidy; } } } } /* Emit the feed item blocks */ if(rss_parser->model.items_count) { const unsigned char* id; raptor_term *items; id = raptor_world_generate_bnodeid(rdf_parser->world); /* make a new genid for the <rdf:Seq> node */ items = raptor_new_term_from_blank(rdf_parser->world, id); RAPTOR_FREE(char*, id); /* _:genid1 rdf:type rdf:Seq . */ if(raptor_rss_emit_type_triple(rdf_parser, items, RAPTOR_RDF_Seq_URI(rdf_parser->world))) { raptor_free_term(items); rc = 1; goto tidy; } /* <channelURI> rss:items _:genid1 . */ if(raptor_rss_emit_connection(rdf_parser, rss_parser->model.common[RAPTOR_RSS_CHANNEL]->term, rdf_parser->world->rss_fields_info_uris[RAPTOR_RSS_FIELD_ITEMS], 0, items)) { raptor_free_term(items); rc= 1; goto tidy; } /* sequence of rss:item */ for(i = 1, item = rss_parser->model.items; item; item = item->next, i++) { if(raptor_rss_emit_item(rdf_parser, item) || raptor_rss_emit_connection(rdf_parser, items, NULL, i,item->term)) { raptor_free_term(items); rc = 1; goto tidy; } } raptor_free_term(items); } tidy: if(rdf_parser->emitted_default_graph) { raptor_parser_end_graph(rdf_parser, NULL, 0); rdf_parser->emitted_default_graph--; } return rc; } static int raptor_rss_copy_field(raptor_rss_parser* rss_parser, raptor_rss_item* item, const raptor_field_pair* pair) { raptor_rss_fields_type from_field = pair->from; raptor_rss_fields_type to_field = pair->to; raptor_rss_field* field = NULL; if(!(item->fields[from_field] && item->fields[from_field]->value)) return 1; if(from_field == to_field) { field = item->fields[from_field]; } else { if(item->fields[to_field] && item->fields[to_field]->value) return 1; field = raptor_rss_new_field(item->world); field->is_mapped = 1; raptor_rss_item_add_field(item, to_field, field); } /* Ensure output namespace is declared */ rss_parser->nspaces_seen[raptor_rss_fields_info[to_field].nspace] = 'Y'; if(!field->value) { if(pair->conversion) pair->conversion(item->fields[from_field], field); else { size_t len; /* Otherwise default action is to copy from_field value */ len = strlen((const char*)item->fields[from_field]->value); field->value = RAPTOR_MALLOC(unsigned char*, len + 1); if(!field->value) return 1; memcpy(field->value, item->fields[from_field]->value, len + 1); } } return 0; } static void raptor_rss_uplift_fields(raptor_rss_parser* rss_parser, raptor_rss_item* item) { int i; /* COPY some fields from atom to rss/dc */ for(i = 0; raptor_atom_to_rss[i].from != RAPTOR_RSS_FIELD_UNKNOWN; i++) { #ifdef RAPTOR_DEBUG raptor_rss_fields_type from_field = raptor_atom_to_rss[i].from; raptor_rss_fields_type to_field = raptor_atom_to_rss[i].to; #endif if(raptor_rss_copy_field(rss_parser, item, &raptor_atom_to_rss[i])) continue; RAPTOR_DEBUG3("Copied field %s to rss field %s\n", raptor_rss_fields_info[from_field].name, raptor_rss_fields_info[to_field].name); } } static void raptor_rss_uplift_items(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; raptor_rss_item* item; for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { for(item = rss_parser->model.common[i]; item; item = item->next) { raptor_rss_uplift_fields(rss_parser, item); } } for(item = rss_parser->model.items; item; item = item->next) { raptor_rss_uplift_fields(rss_parser, item); } } static void raptor_rss_start_namespaces(raptor_parser* rdf_parser) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; int i; int n; /* for each item type (channel, item, ...) */ for(i = 0; i< RAPTOR_RSS_COMMON_SIZE; i++) { raptor_rss_item* item; /* for each item instance of a type */ for(item = rss_parser->model.common[i]; item; item = item->next) { int f; if(!item->fields_count) continue; /* for each field */ for(f = 0; f< RAPTOR_RSS_FIELDS_SIZE; f++) { raptor_rss_field* field = item->fields[f]; if(field) { /* knowing there is one value is enough */ rss_info_namespace ns_index = raptor_rss_fields_info[f].nspace; rss_parser->nspaces_seen[ns_index] = 'Y'; } } } } /* start the namespaces */ for(n = 0; n < RAPTOR_RSS_NAMESPACES_SIZE; n++) { if(rss_parser->nspaces[n] && rss_parser->nspaces_seen[n] == 'Y') raptor_parser_start_namespace(rdf_parser, rss_parser->nspaces[n]); } } static int raptor_rss_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_rss_parser* rss_parser = (raptor_rss_parser*)rdf_parser->context; if(rdf_parser->failed) return 1; raptor_sax2_parse_chunk(rss_parser->sax2, s, len, is_end); if(!is_end) return 0; if(rdf_parser->failed) return 1; /* turn strings into URIs, move things around if needed */ if(raptor_rss_insert_identifiers(rdf_parser)) { rdf_parser->failed = 1; return 1; } /* add some new fields */ raptor_rss_uplift_items(rdf_parser); /* find out what namespaces to declare and start them */ raptor_rss_start_namespaces(rdf_parser); /* generate the triples */ raptor_rss_emit(rdf_parser); return 0; } static int raptor_rss_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { int score = 0; if(suffix) { if(!strcmp((const char*)suffix, "rss")) score = 7; if(!strcmp((const char*)suffix, "atom")) score = 5; if(!strcmp((const char*)suffix, "xml")) score = 4; } if(identifier) { if(!strncmp((const char*)identifier, "http://feed", 11)) score += 5; else if(strstr((const char*)identifier, "feed")) score += 3; if(strstr((const char*)identifier, "rss2")) score += 5; else if(!suffix && strstr((const char*)identifier, "rss")) score += 4; else if(!suffix && strstr((const char*)identifier, "atom")) score += 4; else if(strstr((const char*)identifier, "rss.xml")) score += 4; else if(strstr((const char*)identifier, "atom.xml")) score += 4; } if(mime_type) { if(!strstr((const char*)mime_type, "html")) { if(strstr((const char*)mime_type, "rss")) score += 4; else if(strstr((const char*)mime_type, "xml")) score += 4; else if(strstr((const char*)mime_type, "atom")) score += 4; } } return score; } static const char* const rss_tag_soup_names[2] = { "rss-tag-soup", NULL }; #define RSS_TAG_SOUP_TYPES_COUNT 6 static const raptor_type_q rss_tag_soup_types[RSS_TAG_SOUP_TYPES_COUNT + 1] = { { "application/rss", 15, 8}, { "application/rss+xml", 19, 8}, { "text/rss", 8, 8}, { "application/xml", 15, 3}, { "text/xml", 8, 3}, { "application/atom+xml", 20, 3}, { NULL, 0, 0} }; static int raptor_rss_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = rss_tag_soup_names; factory->desc.mime_types = rss_tag_soup_types; factory->desc.label = "RSS Tag Soup"; factory->desc.uri_strings = NULL; factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI; factory->context_length = sizeof(raptor_rss_parser); factory->init = raptor_rss_parse_init; factory->terminate = raptor_rss_parse_terminate; factory->start = raptor_rss_parse_start; factory->chunk = raptor_rss_parse_chunk; factory->recognise_syntax = raptor_rss_parse_recognise_syntax; return rc; } int raptor_init_parser_rss(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_rss_parser_register_factory); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_sequence.c����������������������������������������������������������������0000644�0001750�0001750�00000055317�12354157602�014263� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_sequence.c - Raptor sequence support * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include "raptor2.h" #include "raptor_internal.h" /* POLICY - minimum size */ #define RAPTOR_SEQUENCE_MIN_CAPACITY 8 #ifndef STANDALONE /* * Sequence of maximum capacity C containing N data items * * array: * 0 <-- N consecutive items --> C - 1 * ----------------------------------------------------------- * | | | data1 | ..... data N | ... | | * ----------------------------------------------------------- * ------ O -----> offset of first data item * * start = O * size = N * capacity = C * */ struct raptor_sequence_s { /* how many items are in the sequence 0..capacity */ int size; /* length of the 'sequence' array below */ int capacity; /* offset of the first data item in the sequence: 0..capacity-1 */ int start; /* array of size 'capacity' pointing to the data */ void **sequence; /* handler to call to free a data item (or NULL) */ raptor_data_free_handler free_handler; /* handler to call to print a data item (or NULL) */ raptor_data_print_handler print_handler; /* context pointer for @context_free_handler and @context_print_handler */ void *handler_context; /* handler to call to free a data item (or NULL) also passing in * as first arg the @handler_context */ raptor_data_context_free_handler context_free_handler; /* handler to call to print a data item (or NULL) also passing in * as first arg the @handler_context */ raptor_data_context_print_handler context_print_handler; }; static int raptor_sequence_ensure(raptor_sequence *seq, int capacity, int grow_at_front); /** * raptor_new_sequence: * @free_handler: handler to free a sequence item * @print_handler: handler to print a sequence item to a FILE* * * Constructor - create a new sequence with the given handlers. * * This creates a sequence over objects that need only the item data * pointers in order to print or free the objects. * * For example sequences of strings could use handlers (free, NULL) * and sequences of #raptor_uri could use (raptor_free_uri, * raptor_print_uri) * * Return value: a new #raptor_sequence or NULL on failure **/ raptor_sequence* raptor_new_sequence(raptor_data_free_handler free_handler, raptor_data_print_handler print_handler) { raptor_sequence* seq = RAPTOR_CALLOC(raptor_sequence*, 1, sizeof(*seq)); if(!seq) return NULL; seq->free_handler = free_handler; seq->print_handler = print_handler; return seq; } /** * raptor_new_sequence_with_context: * @free_handler: handler to free a sequence item * @print_handler: handler to print a sequence item to a FILE* * @handler_context: context information to pass to free/print handlers * * Constructor - create a new sequence with the given handlers and handler context. * * This creates a sequence over objects that need context + item data * pointers in order to print or free the objects. * * Return value: a new #raptor_sequence or NULL on failure **/ raptor_sequence* raptor_new_sequence_with_context(raptor_data_context_free_handler free_handler, raptor_data_context_print_handler print_handler, void *handler_context) { raptor_sequence* seq = RAPTOR_CALLOC(raptor_sequence*, 1, sizeof(*seq)); if(!seq) return NULL; seq->context_free_handler = free_handler; seq->context_print_handler = print_handler; seq->handler_context = handler_context; return seq; } /** * raptor_free_sequence: * @seq: sequence to destroy * * Destructor - free a #raptor_sequence **/ void raptor_free_sequence(raptor_sequence* seq) { int i; int j; if(!seq) return; if(seq->free_handler) { for(i = seq->start, j = seq->start + seq->size; i < j; i++) if(seq->sequence[i]) seq->free_handler(seq->sequence[i]); } else if(seq->context_free_handler) { for(i = seq->start, j = seq->start + seq->size; i < j; i++) if(seq->sequence[i]) seq->context_free_handler(seq->handler_context, seq->sequence[i]); } if(seq->sequence) RAPTOR_FREE(ptrarray, seq->sequence); RAPTOR_FREE(raptor_sequence, seq); } static int raptor_sequence_ensure(raptor_sequence *seq, int capacity, int grow_at_front) { void **new_sequence; int offset; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(capacity && seq->capacity >= capacity) return 0; /* POLICY - minimum size */ if(capacity < RAPTOR_SEQUENCE_MIN_CAPACITY) capacity = RAPTOR_SEQUENCE_MIN_CAPACITY; new_sequence = RAPTOR_CALLOC(void**, capacity, sizeof(void*)); if(!new_sequence) return 1; offset = (grow_at_front ? (capacity - seq->capacity) : 0) + seq->start; if(seq->size) { memcpy(&new_sequence[offset], &seq->sequence[seq->start], sizeof(void*) * seq->size); RAPTOR_FREE(ptrarray, seq->sequence); } seq->start = offset; seq->sequence = new_sequence; seq->capacity = capacity; return 0; } /** * raptor_sequence_size: * @seq: sequence object * * Get the number of items in a sequence. * * Return value: the sequence size (>=0) **/ int raptor_sequence_size(raptor_sequence* seq) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, -1); return seq->size; } /* Store methods */ /** * raptor_sequence_set_at: * @seq: sequence object * @idx: index into sequence to operate at * @data: new data item. * * Replace/set an item in a sequence. * * The item at the offset @idx in the sequence is replaced with the * new item @data (which may be NULL). Any existing item is freed * with the sequence's free_handler. If necessary the sequence * is extended (with NULLs) to handle a larger offset. * * The sequence takes ownership of the new data item. On failure, the * item is freed immediately. * * Return value: non-0 on failure **/ int raptor_sequence_set_at(raptor_sequence* seq, int idx, void *data) { int need_capacity; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); /* Cannot provide a negative index */ if(idx < 0) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->context_free_handler) seq->context_free_handler(seq->handler_context, data); } return 1; } need_capacity = seq->start + idx + 1; if(need_capacity > seq->capacity) { if(seq->capacity * 2 > need_capacity) need_capacity = seq->capacity * 2; if(raptor_sequence_ensure(seq, need_capacity, 0)) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->context_free_handler) seq->context_free_handler(seq->handler_context, data); } return 1; } } if(idx < seq->size) { /* if there is old data, delete it if there is a free handler */ if(seq->sequence[seq->start + idx]) { if(seq->free_handler) seq->free_handler(seq->sequence[seq->start + idx]); else if(seq->context_free_handler) seq->context_free_handler(seq->handler_context, seq->sequence[seq->start + idx]); } /* size remains the same */ } else { /* if there is no old data, size is increasing */ /* make sure there are seq->size items starting from seq->start */ seq->size = idx + 1; } seq->sequence[seq->start + idx] = data; return 0; } /** * raptor_sequence_push: * @seq: sequence to add to * @data: item to add * * Add an item to the end of the sequence. * * The sequence takes ownership of the pushed item and frees it with the * free_handler. On failure, the item is freed immediately. * * Return value: non-0 on failure **/ int raptor_sequence_push(raptor_sequence* seq, void *data) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(seq->start + seq->size == seq->capacity) { if(raptor_sequence_ensure(seq, seq->capacity * 2, 0)) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->context_free_handler) seq->context_free_handler(seq->handler_context, data); } return 1; } } seq->sequence[seq->start + seq->size] = data; seq->size++; return 0; } /** * raptor_sequence_shift: * @seq: sequence to add to * @data: item to add * * Add an item to the start of the sequence. * * The sequence takes ownership of the shifted item and frees it with the * free_handler. On failure, the item is freed immediately. * * Return value: non-0 on failure **/ int raptor_sequence_shift(raptor_sequence* seq, void *data) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(!seq->start) { if(raptor_sequence_ensure(seq, seq->capacity * 2, 1)) { if(data) { if(seq->free_handler) seq->free_handler(data); else if(seq->context_free_handler) seq->context_free_handler(seq->handler_context, data); } return 1; } } seq->sequence[--seq->start] = data; seq->size++; return 0; } /** * raptor_sequence_get_at: * @seq: sequence to use * @idx: index of item to get * * Retrieve an item at offset @index in the sequence. * * This is efficient to perform. #raptor_sequence is optimised * to append/remove from the end of the sequence. * * After this call the item is still owned by the sequence. * * Return value: the object or NULL if @index is out of range (0... sequence size - 1) **/ void* raptor_sequence_get_at(raptor_sequence* seq, int idx) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(idx < 0 || idx > seq->size - 1) return NULL; return seq->sequence[seq->start + idx]; } /** * raptor_sequence_delete_at: * @seq: sequence object * @idx: index into sequence to operate at * * Remove an item from a position a sequence, returning it * * The item at the offset @idx in the sequence is replaced with a * NULL pointer and any existing item is returned. The caller * owns the resulting item. * * Return value: NULL on failure **/ void* raptor_sequence_delete_at(raptor_sequence* seq, int idx) { void* data; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(idx < 0 || idx > seq->size - 1) return NULL; data = seq->sequence[seq->start + idx]; seq->sequence[seq->start + idx] = NULL; return data; } /** * raptor_sequence_pop: * @seq: sequence to use * * Retrieve the item at the end of the sequence. * * Ownership of the item is transferred to the caller, * i.e. caller is responsible of freeing the item. * * Return value: the object or NULL if the sequence is empty **/ void* raptor_sequence_pop(raptor_sequence* seq) { void *data; int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(!seq->size) return NULL; seq->size--; i = seq->start + seq->size; data = seq->sequence[i]; seq->sequence[i] = NULL; return data; } /** * raptor_sequence_unshift: * @seq: sequence to use * * Retrieve the item at the start of the sequence. * * Ownership of the item is transferred to the caller, * i.e. caller is responsible of freeing the item. * * Return value: the object or NULL if the sequence is empty **/ void* raptor_sequence_unshift(raptor_sequence* seq) { void *data; int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, NULL); if(!seq->size) return NULL; i = seq->start++; data = seq->sequence[i]; seq->size--; seq->sequence[i] = NULL; return data; } /** * raptor_sequence_sort: * @seq: sequence to sort * @compare: comparison function with args (a, b) * * Sort a sequence inline * * The comparison function @compare is compatible with that used for * qsort() and provides the addresses of pointers to the data that * must be dereferenced to get to the stored sequence data. * **/ RAPTOR_EXTERN_C void raptor_sequence_sort(raptor_sequence* seq, raptor_data_compare_handler compare) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(seq, raptor_sequence); if(seq->size > 1) qsort(&seq->sequence[seq->start], seq->size, sizeof(void*), compare); } /** * raptor_sequence_sort_r: * @seq: sequence to sort * @compare: comparison function with args (a, b, user data) * @user_data: User data argument for @compare * * Sort a sequence inline with user data * * The comparison function @compare_r is compatible with that used * for raptor_sort_r() and provides the addresses of pointers to the * data that must be dereferenced to get to the stored sequence data. * **/ RAPTOR_EXTERN_C void raptor_sequence_sort_r(raptor_sequence* seq, raptor_data_compare_arg_handler compare, void* user_data) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(seq, raptor_sequence); if(seq->size > 1) raptor_sort_r(&seq->sequence[seq->start], seq->size, sizeof(void*), compare, user_data); } /** * raptor_sequence_print: * @seq: sequence to sort * @fh: file handle * * Print the sequence contents using the print_handler to print the data items. * * Return value: non-0 on failure */ int raptor_sequence_print(raptor_sequence* seq, FILE* fh) { int rc = 0; int i; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); fputc('[', fh); for(i = 0; i < seq->size; i++) { if(i) fputs(", ", fh); if(seq->sequence[seq->start + i]) { if(seq->print_handler) seq->print_handler(seq->sequence[seq->start + i], fh); else if(seq->context_print_handler) seq->context_print_handler(seq->handler_context, seq->sequence[seq->start + i], fh); } else fputs("(empty)", fh); } fputc(']', fh); return rc; } /** * raptor_sequence_join: * @dest: #raptor_sequence destination sequence * @src: #raptor_sequence source sequence * * Join two sequences moving all items from one sequence to the end of another. * * After this operation, sequence src will be empty (zero size) but * will have the same item capacity as before. * * Return value: non-0 on failure */ int raptor_sequence_join(raptor_sequence* dest, raptor_sequence *src) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(dest, raptor_sequence, 1); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(src, raptor_sequence, 1); if(raptor_sequence_ensure(dest, dest->size + src->size, 0)) return 1; memcpy(&dest->sequence[dest->start + dest->size], &src->sequence[src->start], sizeof(void*) * src->size); dest->size += src->size; src->size = 0; return 0; } /** * raptor_sequence_swap: * @seq: sequence * @i: first data index * @j: second data index * * Swap a pair of elements in a sequence * * Return value: non-0 if arguments are out of range */ int raptor_sequence_swap(raptor_sequence* seq, int i, int j) { if(i < 0 || i >= seq->size || j < 0 || j >= seq->size) return 1; if(i != j) { void* tmp = seq->sequence[i]; seq->sequence[i] = seq->sequence[j]; seq->sequence[j] = tmp; } return 0; } /** * raptor_sequence_reverse: * @seq: sequence * @start_index: starting index * @length: number of elements to reverse * * Reverse a range of elements * * Return value: non-0 if arguments are out of range */ int raptor_sequence_reverse(raptor_sequence* seq, int start_index, int length) { int end_index = start_index + length - 1; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(seq, raptor_sequence, 1); if(end_index >= seq->size || start_index < 1 || length <= 1) return 1; while( (start_index != end_index) && (start_index != end_index + 1) ) { raptor_sequence_swap(seq, start_index, end_index); start_index++; end_index--; } return 0; } /** * raptor_sequence_next_permutation: * @seq: int seq * @compare: comparison function * * Get the next permutation of a sequence in lexicographic order * * Assumes the initial order of the items is lexicographically * increasing. This function alters the order of the items until the * last permuatation is done at which point the contents is reset to * the intial order. * * Algorithm used is described in http://en.wikipedia.org/wiki/Permutation * * The comparison function @compare is compatible with that used for * qsort() and provides the addresses of pointers to the data that * must be dereferenced to get to the stored sequence data. * * Return value: non-0 at the last permutation */ RAPTOR_EXTERN_C int raptor_sequence_next_permutation(raptor_sequence *seq, raptor_data_compare_handler compare) { int k; int l; void* temp; if(seq->size < 2) return 1; /* 1. Find the largest index k such that a[k] < a[k + 1]. If no such * index exists, the permutation is the last permutation. */ k = seq->size - 2; while(k >= 0 && compare(seq->sequence[k], seq->sequence[k + 1]) >= 0) k--; if(k == -1) { /* done - reset to starting order */ raptor_sequence_reverse(seq, 0, seq->size); return 1; } /* 2. Find the largest index l such that a[k] < a[l]. Since k + 1 * is such an index, l is well defined and satisfies k < l. */ l = seq->size - 1; while( compare(seq->sequence[k], seq->sequence[l]) >= 0) l--; /* 3. Swap a[k] with a[l]. */ #if 1 temp = seq->sequence[k]; seq->sequence[k] = seq->sequence[l]; seq->sequence[l] = temp; #else raptor_sequence_swap(seq, k, l); #endif /* 4. Reverse the sequence from a[k + 1] up to and including the * final element a[n]. */ raptor_sequence_reverse(seq, k + 1, seq->size - (k + 1)); return 0; } #endif #ifdef STANDALONE #include <stdio.h> int main(int argc, char *argv[]); static int raptor_compare_strings(const void *a, const void *b) { return strcmp(*(char**)a, *(char**)b); } static int raptor_sequence_print_string(void *data, FILE *fh) { fputs((char*)data, fh); return 0; } #define assert_match_string(function, expr, string) do { char *result = expr; if(strcmp(result, string)) { fprintf(stderr, "%s:" #function " failed - returned %s, expected %s\n", program, result, string); exit(1); } } while(0) #define assert_match_int(function, expr, value) do { int result = expr; if(result != value) { fprintf(stderr, "%s:" #function " failed - returned %d, expected %d\n", program, result, value); exit(1); } } while(0) int main(int argc, char *argv[]) { const char *program = raptor_basename(argv[0]); raptor_sequence* seq1 = raptor_new_sequence(NULL, raptor_sequence_print_string); raptor_sequence* seq2 = raptor_new_sequence(NULL, raptor_sequence_print_string); char *s; int i; if(raptor_sequence_pop(seq1) || raptor_sequence_unshift(seq1)) { fprintf(stderr, "%s: should not be able to pop/unshift from an empty sequence\n", program); exit(1); } raptor_sequence_set_at(seq1, 0, (void*)"first"); raptor_sequence_push(seq1, (void*)"third"); raptor_sequence_shift(seq1, (void*)"second"); s = (char*)raptor_sequence_get_at(seq1, 0); assert_match_string(raptor_sequence_get_at, s, "second"); s = (char*)raptor_sequence_get_at(seq1, 1); assert_match_string(raptor_sequence_get_at, s, "first"); s = (char*)raptor_sequence_get_at(seq1, 2); assert_match_string(raptor_sequence_get_at, s, "third"); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 3); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: sequence after additions: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); #endif /* now made alphabetical i.e. first, second, third */ raptor_sequence_sort(seq1, raptor_compare_strings); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: sequence after sort: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); #endif s = (char*)raptor_sequence_pop(seq1); assert_match_string(raptor_sequence_get_at, s, "third"); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 2); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: sequence after pop: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); #endif s = (char*)raptor_sequence_unshift(seq1); assert_match_string(raptor_sequence_get_at, s, "first"); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 1); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: sequence after unshift: ", program); raptor_sequence_print(seq1, stderr); fputc('\n', stderr); #endif s = (char*)raptor_sequence_get_at(seq1, 0); assert_match_string(raptor_sequence_get_at, s, "second"); raptor_sequence_push(seq2, (void*)"first.2"); if(raptor_sequence_join(seq2, seq1)) { fprintf(stderr, "%s: raptor_sequence_join failed\n", program); exit(1); } assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 0); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq2), 2); raptor_free_sequence(seq1); raptor_free_sequence(seq2); /* test sequence growing */ seq1 = raptor_new_sequence(NULL, raptor_sequence_print_string); for(i = 0; i < 100; i++) if(raptor_sequence_shift(seq1, (void*)"foo")) { fprintf(stderr, "%s: raptor_sequence_shift failed\n", program); exit(1); } assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 100); for(i = 0; i < 100; i++) raptor_sequence_unshift(seq1); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 0); raptor_free_sequence(seq1); seq1 = raptor_new_sequence(NULL, raptor_sequence_print_string); for(i = 0; i < 100; i++) if(raptor_sequence_push(seq1, (void*)"foo")) { fprintf(stderr, "%s: raptor_sequence_push failed\n", program); exit(1); } assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 100); for(i = 0; i < 100; i++) raptor_sequence_pop(seq1); assert_match_int(raptor_sequence_size, raptor_sequence_size(seq1), 0); raptor_free_sequence(seq1); return (0); } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/strcasecmp.c���������������������������������������������������������������������0000644�0001750�0001750�00000004033�12020170223�013175� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * strcasecmp.c - strcasecmp compatibility * * This file is in the public domain. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> int raptor_strcasecmp(const char* s1, const char* s2); int raptor_strncasecmp(const char* s1, const char* s2, size_t n); int raptor_strcasecmp(const char* s1, const char* s2) { register int c1, c2; while(*s1 && *s2) { c1 = tolower((int)*s1); c2 = tolower((int)*s2); if(c1 != c2) return (c1 - c2); s1++; s2++; } return (int) (*s1 - *s2); } int raptor_strncasecmp(const char* s1, const char* s2, size_t n) { register int c1, c2; while(*s1 && *s2 && n) { c1 = tolower((int)*s1); c2 = tolower((int)*s2); if(c1 != c2) return (c1 - c2); s1++; s2++; n--; } return 0; } #ifdef STANDALONE static int assert_strcasecmp (const char *s1, const char *s2, int expected) { int result = raptor_strcasecmp(s1, s2); result = (result > 0) ? 1 : ((result <0) ? -1 : 0); if(result != expected) { fprintf(stderr, "FAIL strcasecmp (%s, %s) gave %d != %d\n", s1, s2, result, expected); return 1; } return 0; } static int assert_strncasecmp (const char *s1, const char *s2, size_t size, int expected) { int result = raptor_strncasecmp(s1, s2, size); result = (result > 0) ? 1 : ((result <0) ? -1 : 0); if(result != expected) { fprintf(stderr, "FAIL strncasecmp (%s, %s, %d) gave %d != %d\n", s1, s2, (unsigned int)size, result, expected); return 1; } return 0; } int main(int argc, char *argv[]) { int failures = 0; failures += assert_strcasecmp("foo", "foo", 0); failures += assert_strcasecmp("foo", "FOO", 0); failures += assert_strcasecmp("foo", "BaR", 1); failures += assert_strncasecmp("foo", "foobar", 3, 0); failures += assert_strncasecmp("foo", "FOOxyz", 3, 0); failures += assert_strncasecmp("foo", "BaRfoo", 3, 1); return failures; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/sort_r.h�������������������������������������������������������������������������0000644�0001750�0001750�00000006521�12415611634�012370� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Isaac Turner 29 April 2014 Public Domain */ #ifndef SORT_R_H_ #define SORT_R_H_ #include <stdlib.h> /* sort_r function to be exported. Parameters: base is the array to be sorted nel is the number of elements in the array width is the size in bytes of each element of the array compar is the comparison function arg is a pointer to be passed to the comparison function void sort_r(void *base, size_t nel, size_t width, int (*compar)(const void *_a, const void *_b, void *_arg), void *arg); */ #if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \ defined __FreeBSD__ || defined __BSD__ || defined __bsdi__ || \ defined OpenBSD3_1 || defined OpenBSD3_9 || defined __OpenBSD__ || \ defined __NetBSD__ || \ defined __DragonFly__ || \ defined AMIGA) # define _SORT_R_BSD #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \ defined __linux__ || defined __MINGW32__ || defined __GLIBC__) # define _SORT_R_LINUX #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__) # define _SORT_R_WINDOWS #else # error Cannot detect operating system #endif #if (defined NESTED_QSORT && NESTED_QSORT == 0) # undef NESTED_QSORT #elif (!defined NESTED_QSORT && \ defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ < 8) /* no qsort_r in glibc before 2.8 */ # define NESTED_QSORT #endif #if defined NESTED_QSORT static inline void sort_r(void *base, size_t nel, size_t width, int (*compar)(const void *_a, const void *_b, void *aarg), void *arg) { int nested_cmp(const void *a, const void *b) { return compar(a, b, arg); } qsort(base, nel, width, nested_cmp); } #else /* !NESTED_QSORT */ /* Declare structs and functions */ #if defined _SORT_R_BSD /* BSD requires argument swap */ extern void qsort_r(void *base, size_t nel, size_t width, void *thunk, int (*compar)(void *_thunk, const void *_a, const void *_b)); struct sort_r_data { void *arg; int (*compar)(const void *_a, const void *_b, void *_arg); }; static inline int sort_r_arg_swap(void *s, const void *a, const void *b) { struct sort_r_data *ss = (struct sort_r_data*)s; return (ss->compar)(a, b, ss->arg); } #elif defined _SORT_R_LINUX typedef int(* __compar_d_fn_t)(const void *, const void *, void *); extern void qsort_r(void *base, size_t nel, size_t width, __compar_d_fn_t __compar, void *arg) __attribute__((nonnull (1, 4))); #endif /* implementation */ static inline void sort_r(void *base, size_t nel, size_t width, int (*compar)(const void *_a, const void *_b, void *_arg), void *arg) { #if defined _SORT_R_LINUX qsort_r(base, nel, width, compar, arg); #elif defined _SORT_R_BSD struct sort_r_data tmp; tmp.arg = arg; tmp.compar = compar; qsort_r(base, nel, width, &tmp, sort_r_arg_swap); #else /* defined _SORT_R_WINDOWS */ struct sort_r_data tmp; tmp.arg = arg; tmp.compar = compar; qsort_s(base, nel, width, sort_r_arg_swap, &tmp); #endif } #endif /* !NESTED_QSORT */ #undef _SORT_R_WINDOWS #undef _SORT_R_LINUX #undef _SORT_R_BSD #endif /* SORT_R_H_ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_memstr.c������������������������������������������������������������������0000644�0001750�0001750�00000003621�12020170223�013731� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_memstr.c - search for a string in a block of memory * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <string.h> /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * raptor_memstr: * @haystack: memory block to search in * @haystack_len: size of memory block * @needle: string to search with * * INTERNAL: Search for a string in a block of memory * * The block of memory in @haystack may not be NUL terminated but * the searching for @needle will end if a NUL is found in @haystack. * * Return value: pointer to match string or NULL on failure or failed to find */ const char* raptor_memstr(const char *haystack, size_t haystack_len, const char *needle) { size_t needle_len; const char *p; if(!haystack || !needle) return NULL; if(!*needle) return haystack; needle_len = strlen(needle); /* loop invariant: haystack_len is always length of remaining buffer at *p */ for(p = haystack; (haystack_len >= needle_len) && *p; p++, haystack_len--) { /* check match */ if(!memcmp(p, needle, needle_len)) return p; } return NULL; } ���������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/turtle_lexer.c�������������������������������������������������������������������0000644�0001750�0001750�00000301332�12425344320�013563� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #line 6 "turtle_lexer.c" #line 8 "turtle_lexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE turtle_lexer_restart(yyin ,yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via turtle_lexer_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void turtle_lexer_restart (FILE *input_file ,yyscan_t yyscanner ); void turtle_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void turtle_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void turtle_lexer_pop_buffer_state (yyscan_t yyscanner ); static void turtle_lexer_ensure_buffer_stack (yyscan_t yyscanner ); static void turtle_lexer__load_buffer_state (yyscan_t yyscanner ); static void turtle_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); #define YY_FLUSH_BUFFER turtle_lexer__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) YY_BUFFER_STATE turtle_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *turtle_lexer_alloc (yy_size_t ,yyscan_t yyscanner ); void *turtle_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void turtle_lexer_free (void * ,yyscan_t yyscanner ); #define yy_new_buffer turtle_lexer__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ turtle_lexer_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ turtle_lexer_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 46 #define YY_END_OF_BUFFER 47 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[162] = { 0, 0, 0, 0, 0, 24, 24, 28, 28, 47, 45, 2, 1, 1, 45, 44, 45, 14, 15, 45, 5, 4, 34, 31, 6, 45, 45, 45, 45, 45, 7, 8, 45, 45, 3, 45, 45, 16, 17, 38, 35, 37, 38, 24, 24, 24, 25, 28, 28, 28, 29, 2, 1, 0, 20, 0, 44, 43, 43, 0, 21, 0, 0, 34, 32, 0, 0, 0, 0, 31, 0, 0, 40, 0, 41, 0, 42, 42, 42, 0, 0, 31, 0, 0, 13, 0, 0, 0, 35, 0, 0, 36, 24, 24, 0, 0, 28, 28, 0, 0, 20, 22, 21, 26, 0, 32, 0, 0, 33, 0, 0, 31, 0, 0, 0, 0, 0, 39, 0, 0, 42, 42, 42, 0, 0, 30, 0, 0, 23, 27, 0, 33, 0, 33, 0, 0, 0, 0, 42, 42, 12, 0, 30, 0, 0, 18, 0, 0, 11, 42, 0, 19, 0, 0, 42, 10, 0, 9, 0, 0, 0, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 6, 7, 5, 8, 5, 9, 10, 11, 5, 12, 13, 14, 15, 5, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 5, 22, 23, 24, 25, 25, 26, 27, 28, 28, 29, 28, 28, 28, 28, 28, 28, 30, 28, 31, 32, 28, 33, 28, 28, 34, 28, 28, 35, 36, 37, 38, 39, 1, 40, 41, 25, 25, 42, 43, 28, 28, 44, 28, 28, 45, 28, 28, 28, 46, 28, 47, 48, 49, 50, 28, 28, 51, 28, 28, 52, 1, 53, 5, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55 } ; static yyconst flex_int32_t yy_meta[56] = { 0, 1, 2, 3, 3, 4, 5, 4, 6, 7, 4, 4, 4, 4, 8, 9, 10, 11, 4, 1, 6, 12, 4, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12, 15, 12, 1, 16, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 2, 1, 12, 17 } ; static yyconst flex_int16_t yy_base[195] = { 0, 0, 0, 55, 0, 108, 109, 110, 113, 568, 620, 559, 620, 553, 111, 117, 114, 620, 620, 109, 620, 538, 111, 128, 620, 97, 88, 123, 137, 124, 620, 620, 515, 523, 141, 142, 146, 620, 620, 620, 519, 620, 150, 132, 139, 508, 163, 140, 148, 502, 169, 502, 620, 156, 495, 0, 170, 620, 481, 161, 443, 0, 402, 170, 163, 165, 186, 206, 0, 212, 215, 0, 620, 167, 219, 154, 0, 339, 314, 184, 196, 226, 218, 221, 620, 0, 225, 226, 353, 234, 237, 620, 221, 241, 250, 343, 252, 256, 222, 325, 620, 620, 620, 620, 267, 249, 268, 302, 297, 0, 0, 291, 270, 0, 283, 294, 298, 620, 0, 0, 0, 256, 261, 290, 293, 274, 300, 309, 620, 620, 253, 252, 245, 244, 0, 326, 0, 0, 203, 194, 304, 308, 191, 175, 316, 323, 0, 0, 0, 139, 330, 324, 0, 0, 77, 327, 0, 0, 0, 0, 0, 620, 381, 398, 415, 432, 449, 465, 479, 181, 489, 499, 516, 533, 299, 549, 563, 572, 579, 343, 344, 593, 349, 350, 602, 355, 356, 357, 361, 362, 363, 367, 459, 460, 464 } ; static yyconst flex_int16_t yy_def[195] = { 0, 161, 1, 161, 3, 162, 162, 163, 163, 161, 161, 161, 161, 161, 164, 165, 166, 161, 161, 161, 161, 161, 161, 167, 161, 168, 169, 170, 170, 170, 161, 161, 161, 161, 170, 170, 170, 161, 161, 161, 161, 161, 171, 172, 172, 161, 172, 173, 173, 161, 173, 161, 161, 164, 161, 164, 165, 161, 161, 166, 161, 166, 161, 161, 161, 161, 161, 161, 174, 175, 161, 176, 161, 168, 161, 161, 177, 177, 177, 170, 170, 167, 170, 170, 161, 178, 170, 170, 161, 171, 171, 161, 172, 172, 172, 161, 173, 173, 173, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 179, 180, 175, 111, 181, 161, 161, 161, 161, 182, 183, 177, 177, 177, 170, 170, 184, 170, 170, 161, 161, 161, 161, 161, 161, 185, 161, 186, 187, 177, 177, 170, 170, 184, 184, 170, 170, 188, 189, 177, 177, 170, 170, 190, 191, 177, 170, 192, 177, 193, 194, 191, 0, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161 } ; static yyconst flex_int16_t yy_nxt[676] = { 0, 10, 11, 12, 13, 10, 14, 15, 10, 16, 17, 18, 19, 20, 19, 21, 22, 23, 24, 25, 10, 10, 26, 27, 28, 27, 27, 27, 27, 27, 29, 27, 27, 27, 27, 30, 10, 31, 32, 33, 34, 28, 27, 35, 27, 27, 29, 27, 27, 36, 27, 27, 37, 38, 10, 27, 39, 40, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 41, 39, 39, 39, 39, 39, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 39, 39, 39, 39, 39, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 39, 39, 39, 42, 44, 44, 48, 45, 45, 48, 54, 74, 49, 57, 58, 49, 60, 62, 63, 65, 63, 157, 77, 67, 67, 67, 75, 78, 93, 68, 66, 80, 80, 81, 81, 93, 97, 46, 46, 50, 55, 70, 50, 61, 97, 80, 66, 81, 83, 80, 80, 81, 81, 82, 80, 100, 81, 71, 90, 161, 91, 94, 92, 102, 83, 161, 57, 58, 94, 98, 82, 96, 64, 72, 105, 86, 154, 98, 65, 63, 118, 74, 104, 143, 106, 55, 87, 76, 76, 66, 61, 107, 80, 107, 81, 108, 75, 119, 104, 143, 106, 67, 67, 67, 80, 66, 161, 67, 67, 67, 114, 114, 114, 110, 115, 115, 115, 93, 161, 70, 112, 67, 67, 67, 96, 70, 80, 68, 81, 80, 149, 81, 116, 80, 80, 81, 81, 93, 148, 70, 124, 113, 90, 123, 91, 90, 161, 161, 97, 92, 94, 72, 97, 133, 133, 71, 124, 72, 105, 123, 72, 131, 131, 126, 117, 161, 161, 161, 106, 127, 94, 72, 130, 132, 130, 132, 131, 133, 114, 114, 114, 98, 143, 161, 106, 98, 67, 67, 67, 115, 115, 115, 110, 135, 135, 135, 139, 138, 80, 112, 81, 80, 109, 81, 70, 109, 108, 116, 80, 140, 81, 108, 80, 141, 81, 161, 80, 80, 81, 81, 113, 135, 135, 135, 80, 140, 81, 129, 72, 141, 150, 80, 80, 81, 81, 80, 72, 81, 80, 117, 81, 144, 128, 117, 145, 150, 69, 134, 88, 69, 134, 151, 136, 137, 122, 136, 137, 155, 111, 146, 147, 111, 146, 147, 152, 153, 156, 152, 153, 156, 73, 117, 121, 73, 155, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 53, 53, 64, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 59, 59, 103, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 69, 69, 158, 159, 69, 158, 159, 160, 69, 69, 160, 69, 69, 69, 69, 69, 73, 57, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 79, 79, 79, 79, 101, 79, 79, 51, 79, 79, 89, 89, 89, 89, 99, 89, 89, 95, 89, 89, 92, 92, 92, 92, 88, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 96, 96, 96, 96, 96, 96, 85, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 111, 111, 84, 64, 111, 52, 111, 111, 111, 111, 51, 111, 111, 111, 111, 111, 69, 161, 69, 69, 69, 69, 161, 161, 161, 161, 161, 161, 69, 120, 161, 120, 161, 161, 120, 120, 161, 120, 125, 161, 161, 125, 125, 161, 125, 125, 111, 161, 111, 111, 111, 111, 161, 161, 161, 161, 161, 161, 111, 142, 142, 142, 161, 161, 142, 142, 161, 142, 142, 9, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161 } ; static yyconst flex_int16_t yy_chk[676] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 7, 5, 6, 8, 14, 25, 7, 15, 15, 8, 16, 19, 19, 22, 22, 154, 26, 23, 23, 23, 25, 26, 43, 23, 22, 27, 29, 27, 29, 44, 47, 5, 6, 7, 14, 23, 8, 16, 48, 28, 22, 28, 29, 34, 35, 34, 35, 28, 36, 53, 36, 23, 42, 46, 42, 43, 46, 59, 29, 50, 56, 56, 44, 47, 28, 50, 64, 23, 65, 35, 149, 48, 63, 63, 75, 73, 64, 143, 65, 53, 36, 169, 169, 63, 59, 66, 79, 66, 79, 66, 73, 75, 64, 142, 65, 67, 67, 67, 80, 63, 80, 69, 69, 69, 70, 70, 70, 69, 74, 74, 74, 92, 98, 67, 69, 81, 81, 81, 98, 69, 82, 81, 82, 83, 139, 83, 74, 86, 87, 86, 87, 93, 138, 81, 83, 69, 89, 82, 89, 90, 94, 90, 96, 94, 92, 67, 97, 133, 132, 81, 83, 69, 105, 82, 70, 131, 130, 86, 74, 112, 112, 112, 105, 87, 93, 81, 104, 106, 104, 106, 104, 106, 114, 114, 114, 96, 125, 112, 105, 97, 111, 111, 111, 115, 115, 115, 111, 116, 116, 116, 122, 121, 123, 111, 123, 124, 174, 124, 111, 174, 108, 115, 126, 123, 126, 107, 140, 124, 140, 112, 141, 127, 141, 127, 111, 135, 135, 135, 144, 123, 144, 99, 114, 124, 141, 145, 151, 145, 151, 155, 111, 155, 150, 115, 150, 126, 95, 116, 127, 141, 179, 180, 88, 179, 180, 144, 182, 183, 78, 182, 183, 150, 185, 186, 187, 185, 186, 187, 188, 189, 190, 188, 189, 190, 191, 135, 77, 191, 150, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 164, 164, 62, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 166, 166, 60, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, 192, 193, 167, 192, 193, 194, 167, 167, 194, 167, 167, 167, 167, 167, 168, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 170, 170, 170, 170, 54, 170, 170, 51, 170, 170, 171, 171, 171, 171, 49, 171, 171, 45, 171, 171, 172, 172, 172, 172, 40, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 173, 173, 173, 173, 173, 173, 33, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 175, 175, 32, 21, 175, 13, 175, 175, 175, 175, 11, 175, 175, 175, 175, 175, 176, 9, 176, 176, 176, 176, 0, 0, 0, 0, 0, 0, 176, 177, 0, 177, 0, 0, 177, 177, 0, 177, 178, 0, 0, 178, 178, 0, 178, 178, 181, 0, 181, 181, 181, 181, 0, 0, 0, 0, 0, 0, 181, 184, 184, 184, 0, 0, 184, 184, 0, 184, 184, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET #line 1 "./turtle_lexer.l" /* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_lexer.l - Raptor Turtle lexer - making tokens for turtle grammar generator * * Copyright (C) 2003-2013, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Turtle is defined in http://www.dajobe.org/2004/01/turtle/ * * To generate the C files from this source, rather than use the * shipped turtle_lexer.c/.h needs a patched version of flex 2.5.31 such * as the one available in Debian GNU/Linux. Details below * near the %option descriptions. * */ /* recognise 8-bits */ /* all symbols prefixed by this */ /* This is not needed, flex is invoked -oturtle_lexer.c */ /* %option outfile="turtle_lexer.c" */ /* Emit a C header file for prototypes * Only available in flex 2.5.13 or newer. * It was renamed to header-file in flex 2.5.19 */ /* Do not emit #include <unistd.h> * Only available in flex 2.5.7 or newer. * Broken in flex 2.5.31 without patches. */ #define YY_NO_UNISTD_H 1 /* Never interactive */ /* No isatty() check */ /* Batch scanner */ /* Never use yyunput */ /* Supply our own alloc/realloc/free functions */ /* Re-entrant scanner */ /* Makes turtle_lexer_get_lval() turtle_lexer_set_lval() and yylval appear */ /* Makes yyget_lloc() yyset_lloc() and yylloc appear */ /* %option bison-locations */ /* definitions */ #line 81 "./turtle_lexer.l" /* NOTE: These headers are NOT included here but are inserted by * fix-flex since otherwise it appears far too late in the generated C */ /* #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_SETJMP_H #include <setjmp.h> #endif #include "raptor2.h" #include "raptor_internal.h" #include <turtle_parser.h> #include <turtle_common.h> /* Prototypes */ static unsigned char *turtle_copy_token(unsigned char *text, size_t len); static unsigned char *turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim); void turtle_lexer_syntax_error(void* ctx, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval); #endif #ifdef __cplusplus #define INPUT_FN yyinput #else #define INPUT_FN input #endif #if FLEX_VERSION_DECIMAL < 20536 /* debian flex 2.5.35-10.1 added these column header prototypes in * re-entrant mode. standard flex omits them */ void turtle_lexer_set_column(int column_no, yyscan_t yyscanner); int turtle_lexer_get_column(yyscan_t yyscanner); #endif static void turtle_lexer_cleanup(yyscan_t yyscanner); #ifdef HAVE_SETJMP static jmp_buf turtle_lexer_fatal_error_longjmp_env; /* fatal error handler declaration */ #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_FATAL, msg); \ longjmp(turtle_lexer_fatal_error_longjmp_env, 1); \ abort(); \ } while(0) #else #define YY_FATAL_ERROR(msg) do { \ turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_FATAL, msg); \ abort(); \ } while(0) #endif /* Remove the re-fill function since it should never be called */ #define YY_INPUT(buf,result,max_size) { return YY_NULL; } static void turtle_lexer_error(yyscan_t yyscanner, raptor_log_level level, yyconst char *message, ...) RAPTOR_PRINTF_FORMAT(3, 4); /* Fatal error handler that returns EOF instead of abort()/longjmp() * so that parser can clean up properly */ #define YY_FATAL_ERROR_EOF(msg) do { \ turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_FATAL, "%s", msg); \ yyterminate(); \ } while(0) /* Out-of-memory reporting macro */ #define TURTLE_LEXER_OOM() YY_FATAL_ERROR_EOF(turtle_lexer_oom_text) static char turtle_lexer_oom_text[]="turtle_lexer: Out of memory"; /* Do not need input() to to read from stdin */ #define YY_NO_INPUT 1 /* Tokens from Turtle 2013 spec - lex-ifyed to remove unicode ranges */ /* flex: only 1 level of definition expansion so have to expand PLX */ #line 801 "turtle_lexer.c" #define INITIAL 0 #define PREF 1 #define LONG_DLITERAL 2 #define LONG_SLITERAL 3 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #ifndef YY_NO_UNISTD_H #include <unistd.h> #endif #endif #define YY_EXTRA_TYPE raptor_parser* /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; int yy_n_chars; int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; YYSTYPE * yylval_r; }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ # define yylval yyg->yylval_r int turtle_lexer_lex_init (yyscan_t* scanner); int turtle_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int turtle_lexer_lex_destroy (yyscan_t yyscanner ); int turtle_lexer_get_debug (yyscan_t yyscanner ); void turtle_lexer_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE turtle_lexer_get_extra (yyscan_t yyscanner ); void turtle_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *turtle_lexer_get_in (yyscan_t yyscanner ); void turtle_lexer_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *turtle_lexer_get_out (yyscan_t yyscanner ); void turtle_lexer_set_out (FILE * out_str ,yyscan_t yyscanner ); int turtle_lexer_get_leng (yyscan_t yyscanner ); char *turtle_lexer_get_text (yyscan_t yyscanner ); int turtle_lexer_get_lineno (yyscan_t yyscanner ); void turtle_lexer_set_lineno (int line_number ,yyscan_t yyscanner ); int turtle_lexer_get_column (yyscan_t yyscanner ); void turtle_lexer_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * turtle_lexer_get_lval (yyscan_t yyscanner ); void turtle_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int turtle_lexer_wrap (yyscan_t yyscanner ); #else extern int turtle_lexer_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner ); #else static int input (yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int turtle_lexer_lex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int turtle_lexer_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; #line 204 "./turtle_lexer.l" /* rules */ raptor_parser *rdf_parser = yyextra; raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; #ifdef HAVE_SETJMP if(setjmp(turtle_lexer_fatal_error_longjmp_env)) return 1; #endif #line 1059 "turtle_lexer.c" yylval = yylval_param; if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { turtle_lexer_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } turtle_lexer__load_buffer_state(yyscanner ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yyg->yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 162 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 161 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 218 "./turtle_lexer.l" { turtle_parser->lineno++; } YY_BREAK case 2: YY_RULE_SETUP #line 220 "./turtle_lexer.l" { /* empty */ } YY_BREAK case 3: YY_RULE_SETUP #line 223 "./turtle_lexer.l" { return A; } YY_BREAK case 4: YY_RULE_SETUP #line 225 "./turtle_lexer.l" { return DOT; } YY_BREAK case 5: YY_RULE_SETUP #line 226 "./turtle_lexer.l" { return COMMA; } YY_BREAK case 6: YY_RULE_SETUP #line 227 "./turtle_lexer.l" { return SEMICOLON; } YY_BREAK case 7: YY_RULE_SETUP #line 228 "./turtle_lexer.l" { return LEFT_SQUARE; } YY_BREAK case 8: YY_RULE_SETUP #line 229 "./turtle_lexer.l" { return RIGHT_SQUARE; } YY_BREAK case 9: YY_RULE_SETUP #line 230 "./turtle_lexer.l" { BEGIN(PREF); return PREFIX; } YY_BREAK case 10: YY_RULE_SETUP #line 231 "./turtle_lexer.l" { BEGIN(PREF); return SPARQL_PREFIX; } YY_BREAK case 11: YY_RULE_SETUP #line 233 "./turtle_lexer.l" { return BASE; } YY_BREAK case 12: YY_RULE_SETUP #line 234 "./turtle_lexer.l" { return SPARQL_BASE; } YY_BREAK case 13: YY_RULE_SETUP #line 235 "./turtle_lexer.l" { return HAT; } YY_BREAK case 14: YY_RULE_SETUP #line 236 "./turtle_lexer.l" { return LEFT_ROUND; } YY_BREAK case 15: YY_RULE_SETUP #line 237 "./turtle_lexer.l" { return RIGHT_ROUND; } YY_BREAK case 16: YY_RULE_SETUP #line 238 "./turtle_lexer.l" { return LEFT_CURLY; } YY_BREAK case 17: YY_RULE_SETUP #line 239 "./turtle_lexer.l" { return RIGHT_CURLY; } YY_BREAK case 18: YY_RULE_SETUP #line 240 "./turtle_lexer.l" { return TRUE_TOKEN; } YY_BREAK case 19: YY_RULE_SETUP #line 241 "./turtle_lexer.l" { return FALSE_TOKEN; } YY_BREAK case 20: YY_RULE_SETUP #line 244 "./turtle_lexer.l" { yylval->string = turtle_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!yylval->string) yyterminate(); return STRING_LITERAL; } YY_BREAK case 21: YY_RULE_SETUP #line 250 "./turtle_lexer.l" { yylval->string = turtle_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */ if(!yylval->string) yyterminate(); return STRING_LITERAL; } YY_BREAK case 22: YY_RULE_SETUP #line 256 "./turtle_lexer.l" { BEGIN(LONG_DLITERAL); turtle_parser->sb = raptor_new_stringbuffer(); if(!turtle_parser->sb) TURTLE_LEXER_OOM(); } YY_BREAK case 23: YY_RULE_SETUP #line 262 "./turtle_lexer.l" { size_t len; BEGIN(INITIAL); len = raptor_stringbuffer_length(turtle_parser->sb); yylval->string = RAPTOR_MALLOC(unsigned char*, len + 1); if(!yylval->string) TURTLE_LEXER_OOM(); raptor_stringbuffer_copy_to_string(turtle_parser->sb, (unsigned char*)yylval->string, len); yylval->string[len]='\0'; raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return STRING_LITERAL; } YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 277 "./turtle_lexer.l" { char *p; if(*yytext == EOF) { BEGIN(INITIAL); turtle_syntax_error(rdf_parser, "End of file in middle of literal"); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return EOF; } for(p = yytext; *p; p++) { if(*p == '\n') turtle_parser->lineno++; } if(raptor_stringbuffer_append_turtle_string(turtle_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 0)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } YY_BREAK case 25: YY_RULE_SETUP #line 302 "./turtle_lexer.l" { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of \"\"\"literal\"\"\""); yyterminate(); } YY_BREAK case YY_STATE_EOF(LONG_DLITERAL): #line 311 "./turtle_lexer.l" { BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of \"\"\"literal\"\"\""); yyterminate(); } YY_BREAK case 26: YY_RULE_SETUP #line 319 "./turtle_lexer.l" { BEGIN(LONG_SLITERAL); turtle_parser->sb = raptor_new_stringbuffer(); if(!turtle_parser->sb) TURTLE_LEXER_OOM(); } YY_BREAK case 27: YY_RULE_SETUP #line 325 "./turtle_lexer.l" { size_t len; BEGIN(INITIAL); len = raptor_stringbuffer_length(turtle_parser->sb); yylval->string = RAPTOR_MALLOC(unsigned char*, len + 1); if(!yylval->string) TURTLE_LEXER_OOM(); raptor_stringbuffer_copy_to_string(turtle_parser->sb, (unsigned char*)yylval->string, len); yylval->string[len]='\0'; raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return STRING_LITERAL; } YY_BREAK case 28: /* rule 28 can match eol */ YY_RULE_SETUP #line 340 "./turtle_lexer.l" { char *p; if(*yytext == EOF) { BEGIN(INITIAL); turtle_syntax_error(rdf_parser, "End of file in middle of \'\'\'literal\'\'\'"); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; return EOF; } for(p = yytext; *p; p++) { if(*p == '\n') turtle_parser->lineno++; } if(raptor_stringbuffer_append_turtle_string(turtle_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 0)) { /* " */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } } YY_BREAK case 29: YY_RULE_SETUP #line 365 "./turtle_lexer.l" { /* this should only happen if \ is at the end of the file so the Turtle doc is illegal anyway */ BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of '''literal'''"); yyterminate(); } YY_BREAK case YY_STATE_EOF(LONG_SLITERAL): #line 374 "./turtle_lexer.l" { BEGIN(INITIAL); raptor_free_stringbuffer(turtle_parser->sb); turtle_parser->sb = NULL; turtle_syntax_error(rdf_parser, "End of file in middle of '''literal'''"); yyterminate(); } YY_BREAK case 30: YY_RULE_SETUP #line 382 "./turtle_lexer.l" { yylval->string = turtle_copy_token((unsigned char*)yytext+2, yyleng-2); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return BLANK_LITERAL; } YY_BREAK case 31: YY_RULE_SETUP #line 387 "./turtle_lexer.l" { yylval->uri = turtle_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!yylval->uri) { turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_ERROR, "Failed to convert qname %s to URI", yytext); yyterminate(); } return QNAME_LITERAL; } YY_BREAK case 32: YY_RULE_SETUP #line 395 "./turtle_lexer.l" { yylval->string = turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return DECIMAL_LITERAL; } YY_BREAK case 33: YY_RULE_SETUP #line 401 "./turtle_lexer.l" { yylval->string = turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return FLOATING_LITERAL; } YY_BREAK case 34: YY_RULE_SETUP #line 407 "./turtle_lexer.l" { yylval->string = turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return INTEGER_LITERAL; } YY_BREAK case 35: YY_RULE_SETUP #line 412 "./turtle_lexer.l" { /* eat up leading whitespace */ } YY_BREAK case 36: YY_RULE_SETUP #line 413 "./turtle_lexer.l" { yylval->string=turtle_copy_token((unsigned char*)yytext, yyleng); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); BEGIN(INITIAL); return IDENTIFIER; } YY_BREAK case 37: YY_RULE_SETUP #line 418 "./turtle_lexer.l" { BEGIN(INITIAL); yylval->string = turtle_copy_token((unsigned char*)yytext, 0); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return IDENTIFIER; } YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP #line 424 "./turtle_lexer.l" { BEGIN(INITIAL); if(*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } YY_BREAK case 39: /* rule 39 can match eol */ YY_RULE_SETUP #line 432 "./turtle_lexer.l" { raptor_stringbuffer* sb; unsigned char* uri_string; /* make length just the IRI */ while(yytext[yyleng - 1] != '>') yyleng--; sb = raptor_new_stringbuffer(); if(!sb) TURTLE_LEXER_OOM(); /* start at yytext + 1 to skip '<' and operate over * length-2 bytes to skip '<' and '>' */ if(raptor_stringbuffer_append_turtle_string(sb, (unsigned char*)yytext+1, yyleng-2, '>', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 1)) { raptor_free_stringbuffer(sb); YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } uri_string = raptor_stringbuffer_as_string(sb); if(!*uri_string) yylval->uri = raptor_uri_copy(rdf_parser->base_uri); else yylval->uri = raptor_new_uri_relative_to_base(rdf_parser->world, rdf_parser->base_uri, uri_string); raptor_free_stringbuffer(sb); if(!yylval->uri) TURTLE_LEXER_OOM(); return GRAPH_NAME_LEFT_CURLY; } YY_BREAK case 40: /* rule 40 can match eol */ YY_RULE_SETUP #line 464 "./turtle_lexer.l" { while(1) { int c = yytext[yyleng - 1]; if(c == '{' || c == ' ' || c=='\t' || c == '\v' || c == '\n' || c == '=') { yyleng--; } else break; } yytext[yyleng] = '\0'; yylval->uri = turtle_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng); if(!yylval->uri) { turtle_lexer_error(yyscanner, RAPTOR_LOG_LEVEL_ERROR, "Failed to convert qname %s to URI", yytext); yyterminate(); } return GRAPH_NAME_LEFT_CURLY; } YY_BREAK case 41: YY_RULE_SETUP #line 483 "./turtle_lexer.l" { if(yyleng == 2) yylval->uri = raptor_uri_copy(rdf_parser->base_uri); else { raptor_stringbuffer* sb; unsigned char* uri_string; yytext[yyleng-1]='\0'; sb = raptor_new_stringbuffer(); if(!sb) TURTLE_LEXER_OOM(); if(raptor_stringbuffer_append_turtle_string(sb, (unsigned char*)yytext+1, yyleng-1, '>', (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 1)) { raptor_free_stringbuffer(sb); YY_FATAL_ERROR_EOF("raptor_stringbuffer_append_turtle_string failed"); } uri_string = raptor_stringbuffer_as_string(sb); yylval->uri = raptor_new_uri_relative_to_base(rdf_parser->world, rdf_parser->base_uri, uri_string); if(!yylval->uri) { raptor_free_stringbuffer(sb); TURTLE_LEXER_OOM(); } raptor_free_stringbuffer(sb); } return URI_LITERAL; } YY_BREAK case 42: YY_RULE_SETUP #line 507 "./turtle_lexer.l" { yylval->string = turtle_copy_token((unsigned char*)yytext+1, yyleng-1); if(!yylval->string) YY_FATAL_ERROR_EOF("turtle_copy_token failed"); return LANGTAG; } YY_BREAK case 43: /* rule 43 can match eol */ YY_RULE_SETUP #line 512 "./turtle_lexer.l" { /* # comment */ turtle_parser->lineno++; } YY_BREAK case 44: YY_RULE_SETUP #line 516 "./turtle_lexer.l" { /* # comment on the last line with no terminating newline */ } YY_BREAK case 45: YY_RULE_SETUP #line 519 "./turtle_lexer.l" { if(*yytext == EOF) return EOF; turtle_syntax_error(rdf_parser, "syntax error at '%c'", *yytext); yyterminate(); } YY_BREAK case 46: YY_RULE_SETUP #line 526 "./turtle_lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1613 "turtle_lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PREF): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * turtle_lexer_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( turtle_lexer_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of turtle_lexer_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ turtle_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read ); } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; turtle_lexer_restart(yyin ,yyscanner); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) turtle_lexer_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { register yy_state_type yy_current_state; register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 162 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 162 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 161); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ turtle_lexer_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( turtle_lexer_wrap(yyscanner ) ) return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void turtle_lexer_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! yyg->yy_buffer_stack ){ turtle_lexer_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = turtle_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } turtle_lexer__init_buffer(YY_CURRENT_BUFFER_LVALUE,input_file ,yyscanner); turtle_lexer__load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void turtle_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * turtle_lexer_pop_buffer_state(); * turtle_lexer_push_buffer_state(new_buffer); */ turtle_lexer_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER_LVALUE == new_buffer ) return; if ( YY_CURRENT_BUFFER_LVALUE ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; turtle_lexer__load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during * EOF (turtle_lexer_wrap()) processing, but the only time this flag * is looked at is after turtle_lexer_wrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void turtle_lexer__load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE turtle_lexer__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) turtle_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) turtle_lexer_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__create_buffer()" ); b->yy_is_our_buffer = 1; turtle_lexer__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with turtle_lexer__create_buffer() * @param yyscanner The scanner object. */ void turtle_lexer__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) turtle_lexer_free((void *) b->yy_ch_buf ,yyscanner ); turtle_lexer_free((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a turtle_lexer_restart() or at EOF. */ static void turtle_lexer__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; turtle_lexer__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then turtle_lexer__init_buffer was _probably_ * called from turtle_lexer_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ void turtle_lexer__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) turtle_lexer__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */ void turtle_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; turtle_lexer_ensure_buffer_stack(yyscanner); /* This block is copied from turtle_lexer__switch_to_buffer. */ if ( YY_CURRENT_BUFFER_LVALUE ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER_LVALUE) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from turtle_lexer__switch_to_buffer. */ turtle_lexer__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void turtle_lexer_pop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; turtle_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER_LVALUE) { turtle_lexer__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void turtle_lexer_ensure_buffer_stack (yyscan_t yyscanner) { int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)turtle_lexer_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer_ensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)turtle_lexer_realloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE turtle_lexer__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) turtle_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; turtle_lexer__switch_to_buffer(b ,yyscanner ); return b; } /** Setup the input buffer state to scan a string. The next call to turtle_lexer_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * turtle_lexer__scan_bytes() instead. */ YY_BUFFER_STATE turtle_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner) { return turtle_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to turtle_lexer_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE turtle_lexer__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) turtle_lexer_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in turtle_lexer__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = turtle_lexer__scan_buffer(buf,n ,yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in turtle_lexer__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE turtle_lexer_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int turtle_lexer_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int turtle_lexer_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *turtle_lexer_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *turtle_lexer_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ int turtle_lexer_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *turtle_lexer_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void turtle_lexer_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param line_number * @param yyscanner The scanner object. */ void turtle_lexer_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR("turtle_lexer_set_lineno called with no buffer"); yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ void turtle_lexer_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR("turtle_lexer_set_column called with no buffer"); yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * @param yyscanner The scanner object. * @see turtle_lexer__switch_to_buffer */ void turtle_lexer_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = in_str ; } void turtle_lexer_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = out_str ; } int turtle_lexer_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void turtle_lexer_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ YYSTYPE * turtle_lexer_get_lval (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylval; } void turtle_lexer_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; } /* User-visible API */ /* turtle_lexer_lex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int turtle_lexer_lex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) turtle_lexer_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* turtle_lexer_lex_init_extra has the same functionality as turtle_lexer_lex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to turtle_lexer_alloc in * the yyextra field. */ int turtle_lexer_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; turtle_lexer_set_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) turtle_lexer_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); turtle_lexer_set_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from turtle_lexer_lex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * turtle_lexer_lex_init() */ return 0; } /* turtle_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */ int turtle_lexer_lex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ turtle_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; turtle_lexer_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ turtle_lexer_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ turtle_lexer_free(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * turtle_lexer_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ /* clean up leaks if any before freeing yyscanner */ turtle_lexer_cleanup(yyscanner); turtle_lexer_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #define YYTABLES_NAME "yytables" #line 526 "./turtle_lexer.l" /* user code */ int turtle_lexer_wrap (yyscan_t yyscanner) { return 1; } static unsigned char * turtle_copy_token(unsigned char *text, size_t len) { unsigned char *s; if(!len) len = strlen((const char*)text); s = RAPTOR_MALLOC(unsigned char*, len + 1); if(s) { memcpy(s, text, len); s[len] = '\0'; } return s; } static unsigned char * turtle_copy_string_token(raptor_parser* rdf_parser, unsigned char *string, size_t len, int delim) { raptor_stringbuffer* sb = NULL; int rc; if(len) { sb = raptor_new_stringbuffer(); if(!sb) return NULL; rc = raptor_stringbuffer_append_turtle_string(sb, string, len, delim, (raptor_simple_message_handler)turtle_lexer_syntax_error, rdf_parser, 0); if(rc) { raptor_free_stringbuffer(sb); return NULL; } len = raptor_stringbuffer_length(sb); } string = RAPTOR_MALLOC(unsigned char*, len + 1); if(string) { if(sb) raptor_stringbuffer_copy_to_string(sb, string, len+1); string[len]='\0'; } if(sb) raptor_free_stringbuffer(sb); return string; } void turtle_lexer_syntax_error(void* ctx, const char *message, ...) { raptor_parser* rdf_parser = (raptor_parser *)ctx; raptor_turtle_parser* turtle_parser = (raptor_turtle_parser*)rdf_parser->context; va_list arguments; rdf_parser->locator.line = turtle_parser->lineno; #ifdef RAPTOR_TURTLE_USE_ERROR_COLUMNS rdf_parser->locator.column = turtle_lexer_get_column(yyscanner); #endif va_start(arguments, message); raptor_parser_log_error_varargs(((raptor_parser*)rdf_parser), RAPTOR_LOG_LEVEL_ERROR, message, arguments); va_end(arguments); } /* * turtle_lexer_error: * @yyscanner: scanner object * @level: log level RAPTOR_LOG_LEVEL_FATAL otherwise error * @message: erro message * * INTERNAL - replacement for the generated error handler. */ static void turtle_lexer_error(yyscan_t yyscanner, raptor_log_level level, yyconst char *message, ...) { raptor_parser *rdf_parser = NULL; va_list arguments; va_start(arguments, message); if(yyscanner) rdf_parser = (raptor_parser*)turtle_lexer_get_extra(yyscanner); /* This handles NULL rdf_parser properly */ raptor_parser_log_error_varargs(rdf_parser, level, message, arguments); va_end(arguments); } /* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking * - fixes lexer memory leak when ensure_buffer_stack fails */ #ifdef LEXER_ALLOC_TRACKING typedef struct { /* Number of void* slots allocated */ int lexer_allocs_size; /* Allocted void* slots follow in memory after this header */ } lexer_alloc_tracker_header; /* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */ static const int initial_lexer_allocs_size = 2; #endif /* * turtle_lexer_cleanup: * @yyscanner: * * INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled. */ static void turtle_lexer_cleanup(yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; if(!yyscanner) return; rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs = (void**)&tracker[1]; for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i]) free(lexer_allocs[i]); lexer_allocs[i] = NULL; } free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data = NULL; #endif } /* * turtle_lexer_alloc: * @size * @yyscanner * * INTERNAL - alloc replacement. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_alloc(yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *ptr; /* yyscanner not initialized -> probably initializing yyscanner itself * -> just malloc without tracking */ if(!yyscanner) return malloc(size); rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized"); /* try to allocate tracker if it does not exist */ tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) { /* allocate tracker header + array of void* slots */ tracker = (lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*)); if(!tracker) YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker"); tracker->lexer_allocs_size = initial_lexer_allocs_size; rdf_parser->lexer_user_data = (void *)tracker; } lexer_allocs = (void**)&tracker[1]; /* allocate memory */ ptr = malloc(size); /* find a free slot for ptr */ for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(!lexer_allocs[i]) { lexer_allocs[i] = ptr; break; } } /* no free slots -> grow tracker slot array */ if(i>=tracker->lexer_allocs_size) { int j; void **dest; tracker = (lexer_alloc_tracker_header*)calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*)); if(!tracker) { if(ptr) free(ptr); YY_FATAL_ERROR("lexer_alloc: cannot grow tracker"); } tracker->lexer_allocs_size = i*2; /* copy data from old tracker */ dest = (void**)&tracker[1]; for(j = 0; j < i; ++j) { dest[j] = lexer_allocs[j]; } /* set new item to first free slot */ dest[j] = ptr; /* free old tracker and replace with new one */ free(rdf_parser->lexer_user_data); rdf_parser->lexer_user_data = tracker; } return ptr; #else return malloc(size); #endif } /* * turtle_lexer_realloc: * * INTERNAL - realloc replacement * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void *turtle_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; void *newptr; if(!yyscanner) YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized"); rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized"); tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) YY_FATAL_ERROR("lexer_realloc: no alloc tracker"); lexer_allocs = (void**)&tracker[1]; /* find the old slot for ptr */ for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i] == ptr) break; } /* no old slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_realloc: cell not in tracker"); /* realloc */ newptr = realloc((char*)ptr, size); /* replace entry in tracker */ lexer_allocs[i] = newptr; return newptr; #else return realloc((char*)ptr, size); #endif } /* * turtle_lexer_free: * * INTERNAL - free replacement. * Checks for NULL pointer to be freed unlike the default lexer free function. * Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled. */ void turtle_lexer_free(void *ptr, yyscan_t yyscanner) { #ifdef LEXER_ALLOC_TRACKING raptor_parser *rdf_parser; lexer_alloc_tracker_header *tracker; void **lexer_allocs; int i; /* do not free NULL */ if(!ptr) return; /* free ptr even if we would encounter an error */ free(ptr); /* yyscanner is allocated with turtle_lexer_alloc() but it's never stored in the tracker * - we need yyscanner to access the tracker */ if(!yyscanner || ptr == yyscanner) return; rdf_parser = (raptor_parser *)turtle_lexer_get_extra(yyscanner); if(!rdf_parser) return; tracker = (lexer_alloc_tracker_header *)rdf_parser->lexer_user_data; if(!tracker) return; lexer_allocs = (void**)&tracker[1]; /* find the slot for ptr */ for(i = 0; i < tracker->lexer_allocs_size; ++i) { if(lexer_allocs[i] == ptr) break; } /* no slot -> error */ if(i>=tracker->lexer_allocs_size) YY_FATAL_ERROR("lexer_free: cell not in tracker"); /* remove entry from tracker */ lexer_allocs[i] = NULL; #else if(ptr) free(ptr); #endif } #ifdef RAPTOR_DEBUG const char * turtle_token_print(raptor_world* world, int token, YYSTYPE *lval) { static char buffer[2048]; if(!token) return "<<EOF>>"; switch(token) { case PREFIX: return "PREFIX"; case BASE: return "BASE"; case A: return "A"; case DOT: return "DOT"; case COMMA: return "COMMA"; case SEMICOLON: return "SEMICOLON"; case LEFT_SQUARE: return "LEFT_SQUARE"; case RIGHT_SQUARE: return "RIGHT_SQUARE"; case HAT: return "HAT"; case STRING_LITERAL: sprintf(buffer, "STRING_LITERAL(%s)", lval->string); return buffer; case URI_LITERAL: sprintf(buffer, "URI_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string(lval->uri) : "")); return buffer; case BLANK_LITERAL: sprintf(buffer, "BLANK_LITERAL(%s)", lval->string); return buffer; case QNAME_LITERAL: sprintf(buffer, "QNAME_LITERAL(%s)", (lval->uri ? (char*)raptor_uri_as_string(lval->uri) : "")); return buffer; case INTEGER_LITERAL: sprintf(buffer, "INTEGER_LITERAL(%s)", lval->string); return buffer; case FLOATING_LITERAL: sprintf(buffer, "FLOATING_LITERAL(%s)", lval->string); return buffer; case IDENTIFIER: sprintf(buffer, "IDENTIFIER(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case LANGTAG: sprintf(buffer, "LANGTAG(%s)", (lval->string ? (char*)lval->string : "")); return buffer; case DECIMAL_LITERAL: sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string); return buffer; case ERROR_TOKEN: return "ERROR"; case LEFT_CURLY: return "{"; case RIGHT_CURLY: return "}"; case GRAPH_NAME_LEFT_CURLY: return "GRAPH_NAME {"; default: RAPTOR_DEBUG2("UNKNOWN token %d - add a new case\n", token); return "(UNKNOWN)"; } } #endif void turtle_token_free(raptor_world* world, int token, YYSTYPE *lval) { if(!token) return; switch(token) { case STRING_LITERAL: case BLANK_LITERAL: case IDENTIFIER: if(lval->string) RAPTOR_FREE(char*, lval->string); break; case URI_LITERAL: case QNAME_LITERAL: if(lval->uri) raptor_free_uri(lval->uri); break; default: break; } } #ifdef STANDALONE #define FILE_READ_BUF_SIZE 4096 int main(int argc, char *argv[]) { char *turtle_string = NULL; raptor_parser rdf_parser; raptor_turtle_parser turtle_parser; yyscan_t scanner; int token = EOF; YYSTYPE lval; const unsigned char *uri_string; const char *filename = NULL; char *buf = NULL; size_t len; raptor_world* world; FILE *fh; world = raptor_new_world(); if(argc > 1) { filename = argv[1]; fh = fopen(filename, "r"); if(!fh) { fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename, strerror(errno)); exit(1); } } else { filename="<stdin>"; fh = (FILE*)stdin; } turtle_string = RAPTOR_CALLOC(char*, FILE_READ_BUF_SIZE, 1); fread(turtle_string, FILE_READ_BUF_SIZE, 1, fh); fclose(fh); memset(&rdf_parser, 0, sizeof(rdf_parser)); memset(&turtle_parser, 0, sizeof(turtle_parser)); rdf_parser.world = world; /* discard namespace errors - caused by not interpreting @prefix * and hence causing failed qname construction */ raptor_namespaces_init(rdf_parser.world, &turtle_parser.namespaces, 0); turtle_lexer_lex_init(&turtle_parser.scanner); scanner = turtle_parser.scanner; len = strlen(RAPTOR_GOOD_CAST(const char*, turtle_string)); buf = RAPTOR_MALLOC(char*, len + 3); memcpy(buf, turtle_string, len); buf[len] = ' '; buf[len + 1] = buf[len + 2] = '\0'; /* YY_END_OF_BUFFER_CHAR; */ (void)turtle_lexer__scan_buffer(buf, len + 3, scanner); turtle_lexer_set_extra(&rdf_parser, scanner); /* Initialise enough of the parser and locator to get error messages */ rdf_parser.context = &turtle_parser; turtle_parser.lineno = 1; rdf_parser.locator.file = filename; rdf_parser.locator.column = -1; uri_string = raptor_uri_filename_to_uri_string(filename); rdf_parser.base_uri = raptor_new_uri(world, uri_string); RAPTOR_FREE(char*, uri_string); while(1) { memset(&lval, 0, sizeof(YYSTYPE)); if(turtle_lexer_get_text(scanner) != NULL) printf("yyinput '%s'\n", turtle_lexer_get_text(scanner)); token = turtle_lexer_lex(&lval,scanner); #ifdef RAPTOR_DEBUG printf("token %s\n", turtle_token_print(world, token, &lval)); #else printf("token %d\n", token); #endif turtle_token_free(world, token, &lval); if(!token || token == EOF || token == ERROR_TOKEN) break; } if(buf) RAPTOR_FREE(char*, buf); turtle_lexer_lex_destroy(scanner); raptor_namespaces_clear(&turtle_parser.namespaces); raptor_free_uri(rdf_parser.base_uri); RAPTOR_FREE(char*, turtle_string); raptor_free_world(world); if(token == ERROR_TOKEN) return 1; return 0; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_nfc_icu.c�����������������������������������������������������������������0000644�0001750�0001750�00000003571�12020170223�014034� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_nfc_icu.c - Raptor Unicode NFC checking via ICU library * * Copyright (C) 2012, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <stdio.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include <unicode/unorm.h> /** * raptor_nfc_icu_check: * @input: UTF-8 string * @length: length of string * @errorp: pointer to store offset of character in error (or NULL) * * Unicode Normal Form C (NFC) check function. * * If errorp is not NULL, it is set to the offset of the character * in error in the buffer, or <0 if there is no error. * * Return value: Non 0 if the string is NFC **/ int raptor_nfc_icu_check(const unsigned char* string, size_t len, int *error) { UNormalizationCheckResult res; UErrorCode error_code = U_ZERO_ERROR; res = unorm_quickCheck((const UChar *)string, (int32_t)len, UNORM_NFC, &error_code); if(!U_SUCCESS(error_code)) { if(error) *error = 1; return 0; } return (res == UNORM_YES); } ���������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_escaped.c�����������������������������������������������������������������0000644�0001750�0001750�00000021546�12115153746�014054� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_escaped.c - Raptor escaped writing utilities * * Copyright (C) 2013, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /** * raptor_string_escaped_write: * @string: UTF-8 string to write * @len: length of UTF-8 string * @delim: Terminating delimiter character for string (such as " or >) or \0 for no escaping. * @flags: bit flags - see #raptor_escaped_write_bitflags * @iostr: #raptor_iostream to write to * * Write a UTF-8 string formatted using different escapes to a #raptor_iostream * * Supports writing escapes in the Python, N-Triples, Turtle, JSON, * SPARQL styles to an iostream. * * Return value: non-0 on failure such as bad UTF-8 encoding. **/ int raptor_string_escaped_write(const unsigned char *string, size_t len, const char delim, unsigned int flags, raptor_iostream *iostr) { unsigned char c; int unichar_len; raptor_unichar unichar; if(!string) return 1; for(; (c=*string); string++, len--) { if((delim && c == delim && (delim == '\'' || delim == '"')) || c == '\\') { raptor_iostream_write_byte('\\', iostr); raptor_iostream_write_byte(c, iostr); continue; } if(delim && c == delim) { raptor_iostream_counted_string_write("\\u", 2, iostr); raptor_iostream_hexadecimal_write(c, 4, iostr); continue; } if(flags & RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES) { /* Must escape #x00-#x20<>\"{}|^` */ if(c <= 0x20 || c == '<' || c == '>' || c == '\\' || c == '"' || c == '{' || c == '}' || c == '|' || c == '^' || c == '`') { raptor_iostream_counted_string_write("\\u", 2, iostr); raptor_iostream_hexadecimal_write(c, 4, iostr); continue; } else if(c < 0x7f) { raptor_iostream_write_byte(c, iostr); continue; } } if(flags & RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU) { if(c == 0x09) { raptor_iostream_counted_string_write("\\t", 2, iostr); continue; } else if(c == 0x0a) { raptor_iostream_counted_string_write("\\n", 2, iostr); continue; } else if(c == 0x0d) { raptor_iostream_counted_string_write("\\r", 2, iostr); continue; } else if(c < 0x20 || c == 0x7f) { raptor_iostream_counted_string_write("\\u", 2, iostr); raptor_iostream_hexadecimal_write(c, 4, iostr); continue; } } if(flags & RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF) { if(c == 0x08) { /* JSON has \b for backspace */ raptor_iostream_counted_string_write("\\b", 2, iostr); continue; } else if(c == 0x0b) { /* JSON has \f for formfeed */ raptor_iostream_counted_string_write("\\f", 2, iostr); continue; } } /* Just format remaining characters */ if(c < 0x7f) { raptor_iostream_write_byte(c, iostr); continue; } /* It is unicode */ unichar_len = raptor_unicode_utf8_string_get_char(string, len, &unichar); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > len) /* UTF-8 encoding had an error or ended in the middle of a string */ return 1; if(flags & RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8) { /* UTF-8 is allowed so no need to escape */ raptor_iostream_counted_string_write(string, unichar_len, iostr); } else { if(unichar < 0x10000) { raptor_iostream_counted_string_write("\\u", 2, iostr); raptor_iostream_hexadecimal_write(RAPTOR_GOOD_CAST(unsigned int, unichar), 4, iostr); } else { raptor_iostream_counted_string_write("\\U", 2, iostr); raptor_iostream_hexadecimal_write(RAPTOR_GOOD_CAST(unsigned int, unichar), 8, iostr); } } unichar_len--; /* since loop does len-- */ string += unichar_len; len -= unichar_len; } return 0; } /** * raptor_string_python_write: * @string: UTF-8 string to write * @len: length of UTF-8 string * @delim: Terminating delimiter character for string (such as " or >) * or \0 for no escaping. * @mode: mode 0=N-Triples mode, 1=Turtle (allow raw UTF-8), 2=Turtle long string (allow raw UTF-8), 3=JSON * @iostr: #raptor_iostream to write to * * Write a UTF-8 string using Python-style escapes (N-Triples, Turtle, JSON) to a #raptor_iostream * * @Deprecated: use raptor_string_escaped_write() where the features * requested are bits that can be individually chosen. * * Return value: non-0 on failure such as bad UTF-8 encoding. **/ int raptor_string_python_write(const unsigned char *string, size_t len, const char delim, unsigned int mode, raptor_iostream *iostr) { unsigned int flags = 0; switch(mode) { case 0: flags = RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL; break; case 1: flags = RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL; break; case 2: flags = RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL; break; case 3: flags = RAPTOR_ESCAPED_WRITE_JSON_LITERAL; break; default: return 1; } return raptor_string_escaped_write(string, len, delim, flags, iostr); } /** * raptor_term_escaped_write: * @term: term to write * @flags: bit flags - see #raptor_escaped_write_bitflags * @iostr: raptor iostream * * Write a #raptor_term formatted with escapes to a #raptor_iostream * * Return value: non-0 on failure **/ int raptor_term_escaped_write(const raptor_term *term, unsigned int flags, raptor_iostream* iostr) { const char* quotes="\"\"\"\""; if(!term) return 1; switch(term->type) { case RAPTOR_TERM_TYPE_LITERAL: if(flags == RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL) raptor_iostream_counted_string_write(quotes, 3, iostr); else raptor_iostream_write_byte('"', iostr); raptor_string_escaped_write(term->value.literal.string, term->value.literal.string_len, '"', flags, iostr); if(flags == RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL) raptor_iostream_counted_string_write(quotes, 3, iostr); else raptor_iostream_write_byte('"', iostr); if(term->value.literal.language) { raptor_iostream_write_byte('@', iostr); raptor_iostream_counted_string_write(term->value.literal.language, term->value.literal.language_len, iostr); } if(term->value.literal.datatype) { if(flags == RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL) flags = RAPTOR_ESCAPED_WRITE_NTRIPLES_URI; else if(flags == RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL) flags = RAPTOR_ESCAPED_WRITE_TURTLE_URI; raptor_iostream_counted_string_write("^^", 2, iostr); raptor_uri_escaped_write(term->value.literal.datatype, NULL, flags, iostr); } break; case RAPTOR_TERM_TYPE_BLANK: raptor_iostream_counted_string_write("_:", 2, iostr); raptor_iostream_counted_string_write(term->value.blank.string, term->value.blank.string_len, iostr); break; case RAPTOR_TERM_TYPE_URI: if(flags == RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL) flags = RAPTOR_ESCAPED_WRITE_NTRIPLES_URI; else if(flags == RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL) flags = RAPTOR_ESCAPED_WRITE_TURTLE_URI; raptor_uri_escaped_write(term->value.uri, NULL, flags, iostr); break; case RAPTOR_TERM_TYPE_UNKNOWN: default: raptor_log_error_formatted(term->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Triple has unsupported term type %d", term->type); return 1; } return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/turtle_common.c������������������������������������������������������������������0000644�0001750�0001750�00000024260�12425333224�013737� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * turtle_common.c - Raptor Turtle common code * * Copyright (C) 2003-2007, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #include <turtle_parser.h> #include <turtle_lexer.h> #include <turtle_common.h> /** * raptor_stringbuffer_append_turtle_string: * @stringbuffer: String buffer to add to * @text: turtle string to decode * @len: length of string * @delim: terminating delimiter for string - only ', " or > are allowed * @error_handler: error handling function * @error_data: error handler data * * Append to a stringbuffer a Turtle-escaped string. * * The passed in string is handled according to the Turtle string * escape rules giving a UTF-8 encoded output of the Unicode codepoints. * * The Turtle escapes are \b \f \n \r \t \\ * \uXXXX \UXXXXXXXX where X is [A-F0-9] * * Turtle 2013 allows \ with -_~.!$&\'()*+,;=/?#@% * * URIs may not have \t \b \n \r \f or raw ' ' or \u0020 or \u003C or \u003E * * Return value: non-0 on failure **/ int raptor_stringbuffer_append_turtle_string(raptor_stringbuffer* stringbuffer, const unsigned char *text, size_t len, int delim, raptor_simple_message_handler error_handler, void *error_data, int is_uri) { size_t i; const unsigned char *s; unsigned char *d; unsigned char *string = RAPTOR_MALLOC(unsigned char*, len + 1); const char* label = (is_uri ? "URI" : "string"); if(!string) return -1; for(s = text, d = string, i = 0; i < len; s++, i++) { unsigned char c=*s; if(c == ' ' && is_uri) { error_handler(error_data, "Turtle %s error - character '%c'", label, c); RAPTOR_FREE(char*, string); return 1; } if(c == '\\' ) { s++; i++; c = *s; if(c == 'n' || c == 'r' || c == 't' || c == 'b' || c == 'f') { if(is_uri) { error_handler(error_data, "Turtle %s error - illegal URI escape '\\%c'", label, c); RAPTOR_FREE(char*, string); return 1; } if(c == 'n') *d++ = '\n'; else if(c == 'r') *d++ = '\r'; else if(c == 't') *d++ = '\t'; else if(c == 'b') *d++ = '\b'; else /* 'f' */ *d++ = '\f'; } else if(c == '\\' || c == delim || c == '-' || c == '_' || c == '~' || c == '.' || c == '!' || c == '$' || c == '&' || c == '\'' || c == '(' || c == ')' || c == '*' || c == '+' || c == ',' || c == ';' ||c == '=' || c == '/' || c == '?' || c == '#' || c == '@' ||c == '%') *d++ = c; else if(c == 'u' || c == 'U') { size_t ulen = (c == 'u') ? 4 : 8; unsigned long unichar = 0; int n; int unichar_width; size_t ii; s++; i++; if(i+ulen > len) { error_handler(error_data, "Turtle %s error - \\%c over end of line", label, c); RAPTOR_FREE(char*, string); return 1; } for(ii = 0; ii < ulen; ii++) { char cc = s[ii]; if(!isxdigit(RAPTOR_GOOD_CAST(char, cc))) { error_handler(error_data, "Turtle %s error - illegal hex digit %c in Unicode escape '%c%s...'", label, cc, c, s); RAPTOR_FREE(char*, string); return 1; } } n = sscanf((const char*)s, ((ulen == 4) ? "%04lx" : "%08lx"), &unichar); if(n != 1) { error_handler(error_data, "Turtle %s error - illegal Unicode escape '%c%s...'", label, c, s); RAPTOR_FREE(char*, string); return 1; } s+= ulen-1; i+= ulen-1; if(is_uri && (unichar == 0x0020 || unichar == 0x003C || unichar == 0x003E)) { error_handler(error_data, "Turtle %s error - illegal Unicode escape \\u%04lX in URI.", label, unichar); break; } if(unichar > raptor_unicode_max_codepoint) { error_handler(error_data, "Turtle %s error - illegal Unicode character with code point #x%lX (max #x%lX).", label, unichar, raptor_unicode_max_codepoint); RAPTOR_FREE(char*, string); return 1; } unichar_width = raptor_unicode_utf8_string_put_char(unichar, d, len-(d-string)); if(unichar_width < 0) { error_handler(error_data, "Turtle %s error - illegal Unicode character with code point #x%lX.", label, unichar); RAPTOR_FREE(char*, string); return 1; } d += (size_t)unichar_width; } else { /* don't handle \x where x isn't one of: \t \n \r \\ (delim) */ error_handler(error_data, "Turtle %s error - illegal escape \\%c (#x%02X) in \"%s\"", label, c, c, text); } } else *d++=c; } *d='\0'; /* calculate output string size */ len = d-string; /* string gets owned by the stringbuffer after this */ return raptor_stringbuffer_append_counted_string(stringbuffer, string, len, 0); } /** * raptor_turtle_expand_qname_escapes: * @name: turtle qname string to decode * @len: length of name * @error_handler: error handling function * @error_data: error handler data * * Expands Turtle escapes for the given turtle qname string * * The passed in string is handled according to the Turtle string * escape rules giving a UTF-8 encoded output of the Unicode codepoints. * * The Turtle escapes are \b \f \n \r \t \\ * \uXXXX \UXXXXXXXX where X is [A-F0-9] * * Turtle 2013 allows \ with -_~.!$&\'()*+,;=/?#@% * * Return value: new length or 0 on failure **/ size_t raptor_turtle_expand_qname_escapes(unsigned char *name, size_t len, raptor_simple_message_handler error_handler, void *error_data) { size_t i; const unsigned char *s; unsigned char *d; if(!name) return -1; for(s = name, d = name, i = 0; i < len; s++, i++) { unsigned char c=*s; if(c == '\\' ) { s++; i++; c = *s; if(c == 'n') *d++ = '\n'; else if(c == 'r') *d++ = '\r'; else if(c == 't') *d++ = '\t'; else if(c == 'b') *d++ = '\b'; else if(c == 'f') *d++ = '\f'; else if(c == '\\' || c == '-' || c == '_' || c == '~' || c == '.' || c == '!' || c == '$' || c == '&' || c == '\'' || c == '(' || c == ')' || c == '*' || c == '+' || c == ',' || c == ';' ||c == '=' || c == '/' || c == '?' || c == '#' || c == '@' ||c == '%') *d++ = c; else if(c == 'u' || c == 'U') { size_t ulen = (c == 'u') ? 4 : 8; unsigned long unichar = 0; int n; int unichar_width; size_t ii; s++; i++; if(i+ulen > len) { error_handler(error_data, "Turtle name error - \\%c over end of line", c); return 1; } for(ii = 0; ii < ulen; ii++) { char cc = s[ii]; if(!isxdigit(RAPTOR_GOOD_CAST(char, cc))) { error_handler(error_data, "Turtle name error - illegal hex digit %c in Unicode escape '%c%s...'", cc, c, s); return 1; } } n = sscanf((const char*)s, ((ulen == 4) ? "%04lx" : "%08lx"), &unichar); if(n != 1) { error_handler(error_data, "Turtle name error - illegal Uncode escape '%c%s...'", c, s); return 1; } s+= ulen-1; i+= ulen-1; if(unichar > raptor_unicode_max_codepoint) { error_handler(error_data, "Turtle name error - illegal Unicode character with code point #x%lX (max #x%lX).", unichar, raptor_unicode_max_codepoint); return 1; } unichar_width = raptor_unicode_utf8_string_put_char(unichar, d, len - (d-name)); if(unichar_width < 0) { error_handler(error_data, "Turtle name error - illegal Unicode character with code point #x%lX.", unichar); return 1; } d += (size_t)unichar_width; } else { /* don't handle \x where x isn't one of: \t \n \r \\ (delim) */ error_handler(error_data, "Turtle name error - illegal escape \\%c (#x%02X) in \"%s\"", c, c, name); } } else *d++ = c; } *d='\0'; /* calculate output string size */ len = d - name; /* string gets owned by the stringbuffer after this */ return len; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_abbrev.c������������������������������������������������������������������0000644�0001750�0001750�00000037152�12325013605�013701� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_abbrev.c - Code common to abbreviating serializers (ttl/rdfxmla) * * Copyright (C) 2006, Dave Robillard * Copyright (C) 2004-2011, David Beckett http://www.dajobe.org/ * Copyright (C) 2004-2005, University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005, Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* * raptor_abbrev_node implementation * */ static raptor_abbrev_subject* raptor_new_abbrev_subject(raptor_abbrev_node* node); /** * raptor_new_abbrev_node: * @world: raptor world * @term: term to use * * INTERNAL - Constructor for raptor_abbrev_node * * The @term is copied by the constructor. * * Return value: new raptor abbrev node or NULL on failure **/ raptor_abbrev_node* raptor_new_abbrev_node(raptor_world* world, raptor_term *term) { raptor_abbrev_node* node = NULL; if(term->type == RAPTOR_TERM_TYPE_UNKNOWN) return NULL; node = RAPTOR_CALLOC(raptor_abbrev_node*, 1, sizeof(*node)); if(node) { node->world = world; node->ref_count = 1; node->term = raptor_term_copy(term); } return node; } /** * raptor_new_abbrev_node: * @node: raptor abbrev node * * INTERNAL - Destructor for raptor_abbrev_node */ void raptor_free_abbrev_node(raptor_abbrev_node* node) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(node, raptor_abbrev_node); if(--node->ref_count) return; if(node->term) raptor_free_term(node->term); RAPTOR_FREE(raptor_abbrev_node, node); } /** * raptor_abbrev_node_compare: * @node1: node 1 * @node2: node 2 * * INTERNAL - compare two raptor_abbrev_nodes. * * This needs to be a strong ordering for use by raptor_avltree. * This is very performance critical, anything to make it faster is worth it. * * Return value: <0, 0 or 1 if @node1 less than, equal or greater * than @node2 respectively */ int raptor_abbrev_node_compare(raptor_abbrev_node* node1, raptor_abbrev_node* node2) { if(node1 == node2) return 0; return raptor_term_compare(node1->term, node2->term); } /** * raptor_abbrev_node_equals: * @node1: node 1 * @node2: node 2 * * INTERNAL - compare two raptor_abbrev_nodes for equality * * Return value: non-0 if nodes are equal */ int raptor_abbrev_node_equals(raptor_abbrev_node* node1, raptor_abbrev_node* node2) { return raptor_term_equals(node1->term, node2->term); } /** * raptor_abbrev_node_lookup: * @nodes: Tree of nodes to search * @node: Node value to search for * * INTERNAL - Look in an avltree of nodes for a node described by parameters * and if present create it, add it and return it * * Return value: the node found/created or NULL on failure */ raptor_abbrev_node* raptor_abbrev_node_lookup(raptor_avltree* nodes, raptor_term* term) { raptor_abbrev_node *lookup_node; raptor_abbrev_node *rv_node; /* Create a temporary node for search comparison. */ lookup_node = raptor_new_abbrev_node(term->world, term); if(!lookup_node) return NULL; rv_node = (raptor_abbrev_node*)raptor_avltree_search(nodes, lookup_node); /* If not found, insert/return a new one */ if(!rv_node) { if(raptor_avltree_add(nodes, lookup_node)) return NULL; else return lookup_node; /* Found */ } else { raptor_free_abbrev_node(lookup_node); return rv_node; } } static raptor_abbrev_node** raptor_new_abbrev_po(raptor_abbrev_node* predicate, raptor_abbrev_node* object) { raptor_abbrev_node** nodes = NULL; nodes = RAPTOR_CALLOC(raptor_abbrev_node**, 2, sizeof(raptor_abbrev_node*)); if(!nodes) return NULL; nodes[0] = predicate; nodes[1] = object; return nodes; } static void raptor_free_abbrev_po(raptor_abbrev_node** nodes) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(nodes, raptor_abbrev_node_pair); if(nodes[0]) raptor_free_abbrev_node(nodes[0]); if(nodes[1]) raptor_free_abbrev_node(nodes[1]); RAPTOR_FREE(raptor_abbrev_nodes, nodes); } static int raptor_compare_abbrev_po(raptor_abbrev_node** nodes1, raptor_abbrev_node** nodes2) { int d; d = raptor_abbrev_node_compare(nodes1[0], nodes2[0]); if(!d) d = raptor_abbrev_node_compare(nodes1[1], nodes2[1]); return d; } #ifdef RAPTOR_DEBUG static void raptor_print_abbrev_po(raptor_abbrev_node** nodes, FILE* handle) { raptor_abbrev_node* p = nodes[0]; raptor_abbrev_node* o = nodes[1]; if(p && o) { fputc('[', handle); raptor_term_print_as_ntriples(p->term, handle); fputs(" : ", handle); raptor_term_print_as_ntriples(o->term, handle); fputs("]\n", handle); } } #endif /* * raptor_abbrev_subject implementation * * The subject of triples, with all predicates and values * linked from them. * **/ static raptor_abbrev_subject* raptor_new_abbrev_subject(raptor_abbrev_node* node) { raptor_abbrev_subject* subject; if(!(node->term->type == RAPTOR_TERM_TYPE_URI || node->term->type == RAPTOR_TERM_TYPE_BLANK)) { raptor_log_error(node->world, RAPTOR_LOG_LEVEL_ERROR, NULL, "Subject node is type %d not a uri or blank node"); return NULL; } subject = RAPTOR_CALLOC(raptor_abbrev_subject*, 1, sizeof(*subject)); if(subject) { subject->node = node; subject->node->ref_count++; subject->node->count_as_subject++; subject->node_type = NULL; subject->valid = 1; subject->properties = raptor_new_avltree((raptor_data_compare_handler)raptor_compare_abbrev_po, (raptor_data_free_handler)raptor_free_abbrev_po, 0); #ifdef RAPTOR_DEBUG if(subject->properties) raptor_avltree_set_print_handler(subject->properties, (raptor_data_print_handler)raptor_print_abbrev_po); #endif subject->list_items = raptor_new_sequence((raptor_data_free_handler)raptor_free_abbrev_node, NULL); if(!subject->properties || !subject->list_items) { raptor_free_abbrev_subject(subject); subject = NULL; } } return subject; } void raptor_free_abbrev_subject(raptor_abbrev_subject* subject) { RAPTOR_ASSERT_OBJECT_POINTER_RETURN(subject, raptor_abbrev_subject); if(subject->node) raptor_free_abbrev_node(subject->node); if(subject->node_type) raptor_free_abbrev_node(subject->node_type); if(subject->properties) raptor_free_avltree(subject->properties); if(subject->list_items) raptor_free_sequence(subject->list_items); RAPTOR_FREE(raptor_subject, subject); } int raptor_abbrev_subject_valid(raptor_abbrev_subject *subject) { return subject->valid; } int raptor_abbrev_subject_invalidate(raptor_abbrev_subject *subject) { subject->valid = 0; return 0; } /** * raptor_subject_add_property: * @subject: subject node to add to * @predicate: predicate node * @object: object node * * INTERNAL - Add predicate/object pair into properties array of a subject node. * * The subject node takes ownership of the predicate/object nodes. * On error, predicate/object are freed immediately. * * Return value: <0 on failure, >0 if pair is a duplicate and it was not added **/ int raptor_abbrev_subject_add_property(raptor_abbrev_subject* subject, raptor_abbrev_node* predicate, raptor_abbrev_node* object) { int err; raptor_abbrev_node** nodes; nodes = raptor_new_abbrev_po(predicate, object); if(!nodes) return -1; predicate->ref_count++; object->ref_count++; if(raptor_avltree_search(subject->properties, nodes)) { /* Already present - do not add a duplicate triple (s->[p o]) */ raptor_free_abbrev_po(nodes); return 1; } #if 0 fprintf(stderr, "Adding P,O "); raptor_print_abbrev_po(stderr, nodes); raptor_avltree_dump(subject->properties, stderr); #endif err = raptor_avltree_add(subject->properties, nodes); if(err) return -1; #if 0 fprintf(stderr, "Result "); raptor_avltree_print(subject->properties, stderr); raptor_avltree_dump(subject->properties, stderr); raptor_avltree_check(subject->properties); fprintf(stderr, "\n\n"); #endif return 0; } int raptor_abbrev_subject_compare(raptor_abbrev_subject* subject1, raptor_abbrev_subject* subject2) { return raptor_abbrev_node_compare(subject1->node, subject2->node); } /** * raptor_abbrev_subject_find: * @subjects: AVL-Tree of subject nodes * @term: node to find * * INTERNAL - Find a subject node in an AVL-Tree of subject nodes * * Return value: node or NULL if not found or failure */ raptor_abbrev_subject* raptor_abbrev_subject_find(raptor_avltree *subjects, raptor_term* node) { raptor_abbrev_subject* rv_subject = NULL; raptor_abbrev_node* lookup_node = NULL; raptor_abbrev_subject* lookup = NULL; /* datatype and language are both NULL for a subject node */ lookup_node = raptor_new_abbrev_node(node->world, node); if(!lookup_node) return NULL; lookup = raptor_new_abbrev_subject(lookup_node); if(!lookup) { raptor_free_abbrev_node(lookup_node); return NULL; } rv_subject = (raptor_abbrev_subject*) raptor_avltree_search(subjects, lookup); raptor_free_abbrev_subject(lookup); raptor_free_abbrev_node(lookup_node); return rv_subject; } /** * raptor_abbrev_subject_lookup: * @nodes: AVL-Tree of subject nodes * @subjects: AVL-Tree of URI-subject nodes * @blanks: AVL-Tree of blank-subject nodes * @term: node to find * * INTERNAL - Find a subject node in the appropriate uri/blank AVL-Tree of subject nodes or add it * * Return value: node or NULL on failure */ raptor_abbrev_subject* raptor_abbrev_subject_lookup(raptor_avltree* nodes, raptor_avltree* subjects, raptor_avltree* blanks, raptor_term* term) { raptor_avltree *tree; raptor_abbrev_subject* rv_subject; /* Search for specified resource. */ tree = (term->type == RAPTOR_TERM_TYPE_BLANK) ? blanks : subjects; rv_subject = raptor_abbrev_subject_find(tree, term); /* If not found, create one and insert it */ if(!rv_subject) { raptor_abbrev_node* node = raptor_abbrev_node_lookup(nodes, term); if(node) { rv_subject = raptor_new_abbrev_subject(node); if(rv_subject) { if(raptor_avltree_add(tree, rv_subject)) { rv_subject = NULL; } } } } return rv_subject; } #ifdef ABBREV_DEBUG void raptor_print_subject(raptor_abbrev_subject* subject) { int i; unsigned char *subj; unsigned char *pred; unsigned char *obj; raptor_avltree_iterator* iter = NULL; /* Note: The raptor_abbrev_node field passed as the first argument for * raptor_term_to_string() is somewhat arbitrary, since as * the data structure is designed, the first word in the value union * is what was passed as the subject/predicate/object of the * statement. */ subj = raptor_term_to_string(subject); if(subject->type) { obj = raptor_term_to_string(subject); fprintf(stderr,"[%s, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, %s]\n", subj, obj); RAPTOR_FREE(char*, obj); } for(i = 0; i < raptor_sequence_size(subject->elements); i++) { raptor_abbrev_node* o = raptor_sequence_get_at(subject->elements, i); if(o) { obj = raptor_term_to_string(o); fprintf(stderr,"[%s, [rdf:_%d], %s]\n", subj, i, obj); RAPTOR_FREE(char*, obj); } } iter = raptor_new_avltree_iterator(subject->properties, NULL, NULL, 1); while(iter) { raptor_abbrev_node** nodes; nodes = (raptor_abbrev_node**)raptor_avltree_iterator_get(iter); if(!nodes) break; raptor_print_abbrev_po(stderr, nodes); if(raptor_avltree_iterator_next(iter)) break; } if(iter) raptor_free_avltree_iterator(iter); RAPTOR_FREE(char*, subj); } #endif /* helper functions */ /** * raptor_new_qname_from_resource: * @namespaces: sequence of namespaces (corresponding to nstack) * @nstack: #raptor_namespace_stack to use/update * @namespace_count: size of nstack (may be modified) * @node: #raptor_abbrev_node to use * * INTERNAL - Make an XML QName from the URI associated with the node. * * Return value: the QName or NULL on failure **/ raptor_qname* raptor_new_qname_from_resource(raptor_sequence* namespaces, raptor_namespace_stack* nstack, int* namespace_count, raptor_abbrev_node* node) { unsigned char* name = NULL; /* where to split predicate name */ size_t name_len = 1; unsigned char *uri_string; size_t uri_len; unsigned char *p; raptor_uri *ns_uri; raptor_namespace *ns; raptor_qname *qname; unsigned char *ns_uri_string; size_t ns_uri_string_len; if(node->term->type != RAPTOR_TERM_TYPE_URI) { #ifdef RAPTOR_DEBUG RAPTOR_FATAL1("Node must be a URI\n"); #endif return NULL; } qname = raptor_new_qname_from_namespace_uri(nstack, node->term->value.uri, 10); if(qname) return qname; uri_string = raptor_uri_as_counted_string(node->term->value.uri, &uri_len); p= uri_string; name_len = uri_len; while(name_len >0) { if(raptor_xml_name_check(p, name_len, 10)) { name = p; break; } p++; name_len--; } if(!name || (name == uri_string)) return NULL; ns_uri_string_len = uri_len - name_len; ns_uri_string = RAPTOR_MALLOC(unsigned char*, ns_uri_string_len + 1); if(!ns_uri_string) return NULL; memcpy(ns_uri_string, (const char*)uri_string, ns_uri_string_len); ns_uri_string[ns_uri_string_len] = '\0'; ns_uri = raptor_new_uri_from_counted_string(node->world, ns_uri_string, ns_uri_string_len); RAPTOR_FREE(char*, ns_uri_string); if(!ns_uri) return NULL; ns = raptor_namespaces_find_namespace_by_uri(nstack, ns_uri); if(!ns) { /* The namespace was not declared, so create one */ unsigned char prefix[2 + MAX_ASCII_INT_SIZE + 1]; (*namespace_count)++; prefix[0] = 'n'; prefix[1] = 's'; (void)raptor_format_integer(RAPTOR_GOOD_CAST(char*,&prefix[2]), MAX_ASCII_INT_SIZE + 1, *namespace_count, /* base */ 10, -1, '\0'); ns = raptor_new_namespace_from_uri(nstack, prefix, ns_uri, 0); /* We'll most likely need this namespace again. Push it on our * stack. It will be deleted in raptor_rdfxmla_serialize_terminate() */ if(raptor_sequence_push(namespaces, ns)) { /* namespaces sequence has no free handler so we have to free * the ns ourselves on error */ raptor_free_namespace(ns); raptor_free_uri(ns_uri); return NULL; } } qname = raptor_new_qname_from_namespace_local_name(node->world, ns, name, NULL); raptor_free_uri(ns_uri); return qname; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/turtle_lexer.h�������������������������������������������������������������������0000644�0001750�0001750�00000021674�12425344320�013600� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef turtle_lexer_HEADER_H #define turtle_lexer_HEADER_H 1 #define turtle_lexer_IN_HEADER 1 #line 6 "turtle_lexer.h" #line 8 "turtle_lexer.h" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void turtle_lexer_restart (FILE *input_file ,yyscan_t yyscanner ); void turtle_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void turtle_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void turtle_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void turtle_lexer_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE turtle_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *turtle_lexer_alloc (yy_size_t ,yyscan_t yyscanner ); void *turtle_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void turtle_lexer_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ #define yytext_ptr yytext_r #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 #define PREF 1 #define LONG_DLITERAL 2 #define LONG_SLITERAL 3 #endif #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #define YY_EXTRA_TYPE raptor_parser* int turtle_lexer_lex_init (yyscan_t* scanner); int turtle_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int turtle_lexer_lex_destroy (yyscan_t yyscanner ); int turtle_lexer_get_debug (yyscan_t yyscanner ); void turtle_lexer_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE turtle_lexer_get_extra (yyscan_t yyscanner ); void turtle_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *turtle_lexer_get_in (yyscan_t yyscanner ); void turtle_lexer_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *turtle_lexer_get_out (yyscan_t yyscanner ); void turtle_lexer_set_out (FILE * out_str ,yyscan_t yyscanner ); int turtle_lexer_get_leng (yyscan_t yyscanner ); char *turtle_lexer_get_text (yyscan_t yyscanner ); int turtle_lexer_get_lineno (yyscan_t yyscanner ); void turtle_lexer_set_lineno (int line_number ,yyscan_t yyscanner ); int turtle_lexer_get_column (yyscan_t yyscanner ); void turtle_lexer_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * turtle_lexer_get_lval (yyscan_t yyscanner ); void turtle_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int turtle_lexer_wrap (yyscan_t yyscanner ); #else extern int turtle_lexer_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int turtle_lexer_lex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int turtle_lexer_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ #undef YY_NEW_FILE #undef YY_FLUSH_BUFFER #undef yy_set_bol #undef yy_new_buffer #undef yy_set_interactive #undef YY_DO_BEFORE_ACTION #ifdef YY_DECL_IS_OURS #undef YY_DECL_IS_OURS #undef YY_DECL #endif #line 526 "./turtle_lexer.l" #line 356 "turtle_lexer.h" #undef turtle_lexer_IN_HEADER #endif /* turtle_lexer_HEADER_H */ ��������������������������������������������������������������������raptor2-2.0.15/src/raptor_ntriples.c����������������������������������������������������������������0000644�0001750�0001750�00000051075�12425333224�014303� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_ntriples.c - Raptor N-Triples parsing utilities * * Copyright (C) 2013, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* These are for 7-bit ASCII and not locale-specific */ #define IS_ASCII_ALPHA(c) (((c) > 0x40 && (c) < 0x5B) || ((c) > 0x60 && (c) < 0x7B)) #define IS_ASCII_UPPER(c) ((c) > 0x40 && (c) < 0x5B) #define IS_ASCII_DIGIT(c) ((c) > 0x2F && (c) < 0x3A) #define IS_ASCII_PRINT(c) ((c) > 0x1F && (c) < 0x7F) #define TO_ASCII_LOWER(c) ((c)+0x20) typedef enum { RAPTOR_TERM_CLASS_URI, /* ends on > */ RAPTOR_TERM_CLASS_BNODEID, /* ends on first non [A-Za-z][A-Za-z0-9]* */ RAPTOR_TERM_CLASS_STRING, /* ends on non-escaped " */ RAPTOR_TERM_CLASS_LANGUAGE /* ends on first non [a-z0-9]+ ('-' [a-z0-9]+ )? */ } raptor_ntriples_term_class; static int raptor_ntriples_term_valid(unsigned char c, int position, raptor_ntriples_term_class term_class) { int result = 0; switch(term_class) { case RAPTOR_TERM_CLASS_URI: /* ends on > */ result = (c != '>'); break; case RAPTOR_TERM_CLASS_BNODEID: /* ends on first non [A-Za-z0-9_:][-.A-Za-z0-9]* */ result = IS_ASCII_ALPHA(c) || IS_ASCII_DIGIT(c) || c == '_' || c == ':'; if(position) /* FIXME * This isn't correct; '.' is allowed in positions 1..N-1 but * this calling convention of character-by-character cannot * check this. */ result = (result || c == '-' || c == '.'); break; case RAPTOR_TERM_CLASS_STRING: /* ends on " */ result = (c != '"'); break; case RAPTOR_TERM_CLASS_LANGUAGE: /* ends on first non [a-zA-Z]+ ('-' [a-zA-Z0-9]+ )? * Accept _ as synonym / typo for -. */ result = IS_ASCII_ALPHA(c); if(position) result = (result || IS_ASCII_DIGIT(c) || c == '-' || c == '_'); break; default: RAPTOR_DEBUG2("Unknown N-Triples term class %d", term_class); } return result; } /* * raptor_ntriples_parse_term_internal: * @world: raptor world * @locator: locator object (in/out) (or NULL) * @start: pointer to starting character of string (in) * @dest: destination of string (in) * @lenp: pointer to length of string (in/out) * @dest_lenp: pointer to length of destination string (out) * @end_char: string ending character * @class: string class * * INTERNAL - Parse an N-Triples term with escapes. * * Relies that @dest is long enough; it need only be as large as the * input string @start since when UTF-8 encoding, the escapes are * removed and the result is always less than or equal to length of * input. * * N-Triples strings / URIs are written in ASCII at present; * characters outside the printable ASCII range are discarded with a * warning. See the grammar for full details of the allowed ranges. * * UTF-8 and the \u and \U esapes are both allowed. * * URIs may not have \t \b \n \r \f or raw ' ' or \u0020 or \u003C or \u003E * * Return value: Non 0 on failure **/ static int raptor_ntriples_parse_term_internal(raptor_world* world, raptor_locator* locator, const unsigned char **start, unsigned char *dest, size_t *lenp, size_t *dest_lenp, char end_char, raptor_ntriples_term_class term_class) { const unsigned char *p = *start; unsigned char c = '\0'; size_t ulen = 0; unsigned long unichar = 0; unsigned int position = 0; int end_char_seen = 0; /* find end of string, fixing backslashed characters on the way */ while(*lenp > 0) { int unichar_width; c = *p; p++; (*lenp)--; if(locator) { locator->column++; locator->byte++; } if(term_class == RAPTOR_TERM_CLASS_URI && c == ' ') { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "URI error - illegal character %d (0x%02X) found.", c, c); return 1; } if(c > 0x7f) { /* just copy the UTF-8 bytes through */ int unichar_len; unichar_len = raptor_unicode_utf8_string_get_char(p - 1, 1 + *lenp, NULL); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > *lenp) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "UTF-8 encoding error at character %d (0x%02X) found.", c, c); /* UTF-8 encoding had an error or ended in the middle of a string */ return 1; } memmove(dest, p-1, unichar_len); dest += unichar_len; unichar_len--; /* p, *lenp were moved on by 1 earlier */ p += unichar_len; (*lenp) -= unichar_len; if(locator) { locator->column += unichar_len; locator->byte += unichar_len; } continue; } if(c != '\\') { /* finish at non-backslashed end_char */ if(end_char && c == end_char) { end_char_seen = 1; break; } if(!raptor_ntriples_term_valid(c, position, term_class)) { if(end_char) { /* end char was expected, so finding an invalid thing is an error */ raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Missing terminating '%c' (found '%c')", end_char, c); return 0; } else { /* it's the end - so rewind 1 to save next char */ p--; (*lenp)++; if(locator) { locator->column--; locator->byte--; } if(term_class == RAPTOR_TERM_CLASS_BNODEID && dest[-1] == '.') { /* If bnode id ended on '.' move back one */ dest--; p--; (*lenp)++; if(locator) { locator->column--; locator->byte--; } } break; } } /* otherwise store and move on */ *dest++ = c; position++; continue; } if(!*lenp) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "\\ at end of input."); return 0; } c = *p; p++; (*lenp)--; if(locator) { locator->column++; locator->byte++; } switch(c) { case '"': case '\\': *dest++ = c; break; case 'b': case 'f': case 'n': case 'r': case 't': if(term_class == RAPTOR_TERM_CLASS_URI) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "URI error - illegal URI escape '\\%c'.", c); return 1; } if(c == 'b') *dest++ = '\b'; else if(c == 'f') *dest++ = '\f'; else if(c == 'n') *dest++ = '\n'; else if(c == 'r') *dest++ = '\r'; else /* 't' */ *dest++ = '\t'; break; case '<': case '>': case '{': case '}': case '|': case '^': case '`': /* Turtle 2013 allows these in URIs (as well as \" and \\) */ *dest++ = c; break; case 'u': case 'U': ulen = (c == 'u') ? 4 : 8; if(*lenp < ulen) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "%c over end of input.", c); return 0; } if(1) { unsigned int ii; int n = 0; for(ii = 0; ii < ulen; ii++) { char cc = p[ii]; if(!isxdigit(RAPTOR_GOOD_CAST(char, cc))) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "N-Triples string error - illegal hex digit %c in Unicode escape '%c%s...'", cc, c, p); n = 1; break; } } if(n) break; n = sscanf((const char*)p, ((ulen == 4) ? "%04lx" : "%08lx"), &unichar); if(n != 1) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Illegal Uncode escape '%c%s...'", c, p); break; } } p += ulen; (*lenp) -= ulen; if(locator) { locator->column += RAPTOR_GOOD_CAST(int, ulen); locator->byte += RAPTOR_GOOD_CAST(int, ulen); } if(term_class == RAPTOR_TERM_CLASS_URI && (unichar == 0x0020 || unichar == 0x003C || unichar == 0x003E)) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "URI error - illegal Unicode escape \\u%04lX in URI.", unichar); break; } if(unichar > raptor_unicode_max_codepoint) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Illegal Unicode character with code point #x%lX (max #x%lX).", unichar, raptor_unicode_max_codepoint); break; } unichar_width = raptor_unicode_utf8_string_put_char(unichar, dest, 4); if(unichar_width < 0) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Illegal Unicode character with code point #x%lX.", unichar); break; } /* The destination length is set here to 4 since we know that in * all cases, the UTF-8 encoded output sequence is always shorter * than the input sequence, and the buffer is edited in place. * \uXXXX: 6 bytes input - UTF-8 max 3 bytes output * \uXXXXXXXX: 10 bytes input - UTF-8 max 4 bytes output */ dest += (int)unichar_width; break; default: raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Illegal string escape \\%c in \"%s\"", c, (char*)start); return 0; } position++; } /* end while */ if(end_char && !end_char_seen) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Missing terminating '%c' before end of input.", end_char); return 1; } /* terminate dest, can be shorter than source */ *dest = '\0'; if(dest_lenp) *dest_lenp = p - *start; *start = p; return 0; } static int raptor_parse_turtle_term_internal(raptor_world* world, raptor_locator* locator, const unsigned char **start, unsigned char *dest, size_t *len_p, size_t *dest_lenp, raptor_uri** datatype_uri_p) { const unsigned char *p = *start; unsigned int position = 0; /* 0 = xsd:integer; 1= xsd:decimal; 2= xsd:double */ short dtype = 0; int after_e = 0; while(*len_p > 0) { unsigned char c = *p; if(after_e) { if(!((c >= '0' && c <'9') || c == '+' || c == '-')) break; after_e = 0; } else if((position > 0 && (c == '+' || c == '-')) || !((c >= '0' && c <'9') || c == '.' || c == 'e' || c == 'E')) break; if(c == '.') dtype = 1; else if(c == 'e' || c == 'E') { dtype = 2; after_e = 1; } p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } *dest++ = c; position++; } *dest = '\0'; if(dest_lenp) *dest_lenp = p - *start; *start = p; if(dtype == 0) *datatype_uri_p = raptor_uri_copy(world->xsd_integer_uri); else if (dtype == 1) *datatype_uri_p = raptor_uri_copy(world->xsd_decimal_uri); else *datatype_uri_p = raptor_uri_copy(world->xsd_double_uri); return 0; } /* * raptor_ntriples_parse_term: * @world: raptor world * @locator: raptor locator (in/out) (or NULL) * @string: string input (in) * @len_p: pointer to length of @string (in/out) * @term_p: pointer to store term (out) * @allow_turtle: non-0 to allow Turtle forms such as integers, boolean * * INTERNAL - Parse an N-Triples string into a #raptor_term * * The @len_p destination and @locator fields are modified as parsing * proceeds to be used in error messages. The final value is written * into the #raptor_term pointed at by @term_p * * Return value: number of bytes processed or 0 on failure */ size_t raptor_ntriples_parse_term(raptor_world* world, raptor_locator* locator, unsigned char *string, size_t *len_p, raptor_term** term_p, int allow_turtle) { unsigned char *p = string; unsigned char *dest; size_t term_length = 0; switch(*p) { case '<': dest = p; p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } if(raptor_ntriples_parse_term_internal(world, locator, (const unsigned char**)&p, dest, len_p, &term_length, '>', RAPTOR_TERM_CLASS_URI)) { goto fail; } if(1) { raptor_uri *uri; /* Check for bad ordinal predicate */ if(!strncmp((const char*)dest, "http://www.w3.org/1999/02/22-rdf-syntax-ns#_", 44)) { int ordinal = raptor_check_ordinal(dest + 44); if(ordinal <= 0) raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Illegal ordinal value %d in property '%s'.", ordinal, dest); } if(raptor_uri_uri_string_is_absolute(dest) <= 0) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "URI '%s' is not absolute.", dest); goto fail; } uri = raptor_new_uri(world, dest); if(!uri) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Could not create URI for '%s'", (const char *)dest); goto fail; } *term_p = raptor_new_term_from_uri(world, uri); raptor_free_uri(uri); } break; case '-': case '+': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if(allow_turtle) { raptor_uri* datatype_uri = NULL; dest = p; if(raptor_parse_turtle_term_internal(world, locator, (const unsigned char**)&p, dest, len_p, &term_length, &datatype_uri)) { goto fail; } *term_p = raptor_new_term_from_literal(world, dest, datatype_uri, NULL /* language */); } else goto fail; break; case '"': dest = p; p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } if(raptor_ntriples_parse_term_internal(world, locator, (const unsigned char**)&p, dest, len_p, &term_length, '"', RAPTOR_TERM_CLASS_STRING)) { goto fail; } if(1) { unsigned char *object_literal_language = NULL; unsigned char *object_literal_datatype = NULL; raptor_uri* datatype_uri = NULL; if(*len_p && *p == '@') { unsigned char *q; size_t lang_len; object_literal_language = p; /* Skip - */ p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } if(!*len_p) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Missing language after \"string\"-"); goto fail; } if(raptor_ntriples_parse_term_internal(world, locator, (const unsigned char**)&p, object_literal_language, len_p, &lang_len, '\0', RAPTOR_TERM_CLASS_LANGUAGE)) { goto fail; } if(!lang_len) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Invalid language tag at @%s", p); goto fail; } /* Normalize language to lowercase * http://www.w3.org/TR/rdf-concepts/#dfn-language-identifier * Also convert _ to - as synonym / typo. */ for(q = object_literal_language; *q; q++) { if(IS_ASCII_UPPER(*q)) *q = TO_ASCII_LOWER(*q); if(*q == '_') *q = '-'; } } if(*len_p > 1 && *p == '^' && p[1] == '^') { object_literal_datatype = p; /* Skip ^^ */ p += 2; *len_p -= 2; if(locator) { locator->column += 2; locator->byte += 2; } if(!*len_p || (*len_p && *p != '<')) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Missing datatype URI-ref in\"string\"^^<URI-ref> after ^^"); goto fail; } p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } if(raptor_ntriples_parse_term_internal(world, locator, (const unsigned char**)&p, object_literal_datatype, len_p, NULL, '>', RAPTOR_TERM_CLASS_URI)) { goto fail; } if(raptor_uri_uri_string_is_absolute(object_literal_datatype) <= 0) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Datatype URI '%s' is not absolute.", object_literal_datatype); goto fail; } } if(object_literal_datatype && object_literal_language) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Typed literal used with a language - ignoring the language"); object_literal_language = NULL; } if(object_literal_datatype) { datatype_uri = raptor_new_uri(world, object_literal_datatype); if(!datatype_uri) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Could not create literal datatype uri '%s'", object_literal_datatype); goto fail; } object_literal_language = NULL; } *term_p = raptor_new_term_from_literal(world, dest, datatype_uri, object_literal_language); } break; case '_': /* store where _ was */ dest = p; p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } if(!*len_p || (*len_p > 0 && *p != ':')) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Illegal bNodeID - _ not followed by :"); goto fail; } /* Found ':' - move on */ p++; (*len_p)--; if(locator) { locator->column++; locator->byte++; } if(raptor_ntriples_parse_term_internal(world, locator, (const unsigned char**)&p, dest, len_p, &term_length, '\0', RAPTOR_TERM_CLASS_BNODEID)) { goto fail; } if(!term_length) { raptor_log_error_formatted(world, RAPTOR_LOG_LEVEL_ERROR, locator, "Bad or missing bNodeID after _:"); goto fail; } *term_p = raptor_new_term_from_blank(world, dest); break; default: RAPTOR_DEBUG2("Unknown term type '%c'", *p); goto fail; } fail: return p - string; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_json.c��������������������������������������������������������������������0000644�0001750�0001750�00000054347�12302700141�013407� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_json.c - Raptor JSON Parser * * RDF/JSON * http://n2.talis.com/wiki/RDF_JSON_Specification * * Copyright (C) 2001-2010, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <yajl/yajl_parse.h> /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" typedef enum { RAPTOR_JSON_STATE_ROOT, RAPTOR_JSON_STATE_MAP_ROOT, RAPTOR_JSON_STATE_TRIPLES_KEY, RAPTOR_JSON_STATE_TRIPLES_ARRAY, RAPTOR_JSON_STATE_TRIPLES_TRIPLE, RAPTOR_JSON_STATE_TRIPLES_TERM, RAPTOR_JSON_STATE_RESOURCES_SUBJECT_KEY, RAPTOR_JSON_STATE_RESOURCES_PREDICATE, RAPTOR_JSON_STATE_RESOURCES_OBJECT_ARRAY, RAPTOR_JSON_STATE_RESOURCES_OBJECT } raptor_json_parse_state; typedef enum { RAPTOR_JSON_TERM_UNKNOWN, RAPTOR_JSON_TERM_SUBJECT, RAPTOR_JSON_TERM_PREDICATE, RAPTOR_JSON_TERM_OBJECT } raptor_json_term; typedef enum { RAPTOR_JSON_ATTRIB_UNKNOWN, RAPTOR_JSON_ATTRIB_VALUE, RAPTOR_JSON_ATTRIB_LANG, RAPTOR_JSON_ATTRIB_TYPE, RAPTOR_JSON_ATTRIB_DATATYPE } raptor_json_term_attrib; /* When YAJL V1 support is dropped, this can be removed */ #ifdef HAVE_YAJL2 #define RAPTOR_YAJL_LEN_TYPE size_t #else #define RAPTOR_YAJL_LEN_TYPE unsigned int #endif /* * JSON parser object */ struct raptor_json_parser_context_s { #ifdef HAVE_YAJL2 #else yajl_parser_config config; #endif yajl_handle handle; /* Parser state */ raptor_json_parse_state state; raptor_json_term term; raptor_json_term_attrib attrib; /* Temporary storage, while creating terms */ raptor_term_type term_type; unsigned char* term_value; unsigned char* term_datatype; unsigned char* term_lang; /* Temporary storage, while creating statements */ raptor_statement statement; }; typedef struct raptor_json_parser_context_s raptor_json_parser_context; static void raptor_json_reset_term(raptor_json_parser_context *context) { if(context->term_value) RAPTOR_FREE(char*, context->term_value); if(context->term_lang) RAPTOR_FREE(char*, context->term_lang); if(context->term_datatype) RAPTOR_FREE(char*, context->term_datatype); context->term_value = NULL; context->term_lang = NULL; context->term_datatype = NULL; context->term_type = RAPTOR_TERM_TYPE_UNKNOWN; context->attrib = RAPTOR_JSON_ATTRIB_UNKNOWN; } static unsigned char* raptor_json_cstring_from_counted_string(raptor_parser *rdf_parser, const unsigned char* str, RAPTOR_YAJL_LEN_TYPE len) { unsigned char *cstr = RAPTOR_MALLOC(unsigned char*, len + 1); if(!cstr) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); return NULL; } memcpy(cstr, str, len); cstr[len] = '\0'; return cstr; } static raptor_term* raptor_json_new_term_from_counted_string(raptor_parser *rdf_parser, const unsigned char* str, size_t len) { raptor_term *term = NULL; if(len > 2 && str[0] == '_' && str[1] == ':') { const unsigned char *node_id = &str[2]; term = raptor_new_term_from_counted_blank(rdf_parser->world, node_id, len - 2); } else { raptor_uri *uri = raptor_new_uri_from_counted_string(rdf_parser->world, str, len); if(!uri) { unsigned char* cstr = raptor_json_cstring_from_counted_string(rdf_parser, str, RAPTOR_BAD_CAST(int, len)); raptor_parser_error(rdf_parser, "Could not create uri from '%s'", cstr); RAPTOR_FREE(char*, cstr); return NULL; } term = raptor_new_term_from_uri(rdf_parser->world, uri); raptor_free_uri(uri); } return term; } static raptor_term* raptor_json_generate_term(raptor_parser *rdf_parser) { raptor_json_parser_context *context = (raptor_json_parser_context*)rdf_parser->context; raptor_term *term = NULL; if(!context->term_value) { raptor_parser_error(rdf_parser, "No value for term defined"); return NULL; } switch(context->term_type) { case RAPTOR_TERM_TYPE_URI: { raptor_uri *uri = raptor_new_uri(rdf_parser->world, context->term_value); if(!uri) { raptor_parser_error(rdf_parser, "Could not create uri from '%s'", context->term_value); return NULL; } term = raptor_new_term_from_uri(rdf_parser->world, uri); raptor_free_uri(uri); break; } case RAPTOR_TERM_TYPE_LITERAL: { raptor_uri *datatype_uri = NULL; if(context->term_datatype) { datatype_uri = raptor_new_uri(rdf_parser->world, context->term_datatype); } term = raptor_new_term_from_literal(rdf_parser->world, context->term_value, datatype_uri, context->term_lang); if(datatype_uri) raptor_free_uri(datatype_uri); break; } case RAPTOR_TERM_TYPE_BLANK: { unsigned char *node_id = context->term_value; if(strlen((const char*)node_id) > 2 && node_id[0] == '_' && node_id[1] == ':') { node_id = &node_id[2]; } term = raptor_new_term_from_blank(rdf_parser->world, node_id); break; } case RAPTOR_TERM_TYPE_UNKNOWN: raptor_parser_error(rdf_parser, "No type for term defined"); break; } return term; } static int raptor_json_yajl_null(void * ctx) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_parser_error(rdf_parser, "Nulls are not valid in RDF/JSON"); return 0; } static int raptor_json_yajl_boolean(void * ctx, int b) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_parser_error(rdf_parser, "Booleans are not valid in RDF/JSON"); return 0; } #ifdef HAVE_YAJL2 #define YAJL_INTEGER_CALLBACK_ARG_TYPE long long #else #define YAJL_INTEGER_CALLBACK_ARG_TYPE long #endif static int raptor_json_yajl_integer(void * ctx, YAJL_INTEGER_CALLBACK_ARG_TYPE integerVal) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_parser_error(rdf_parser, "Integers are not valid in RDF/JSON"); return 0; } static int raptor_json_yajl_double(void * ctx, double d) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_parser_error(rdf_parser, "Floats are not valid in RDF/JSON"); return 0; } static int raptor_json_yajl_string(void * ctx, const unsigned char * str, RAPTOR_YAJL_LEN_TYPE len) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->state == RAPTOR_JSON_STATE_TRIPLES_TERM || context->state == RAPTOR_JSON_STATE_RESOURCES_OBJECT) { switch(context->attrib) { case RAPTOR_JSON_ATTRIB_VALUE: context->term_value = raptor_json_cstring_from_counted_string(rdf_parser, str, len); break; case RAPTOR_JSON_ATTRIB_LANG: context->term_lang = raptor_json_cstring_from_counted_string(rdf_parser, str, len); break; case RAPTOR_JSON_ATTRIB_TYPE: if(!strncmp((const char*)str, "uri", len)) { context->term_type = RAPTOR_TERM_TYPE_URI; } else if(!strncmp((const char*)str, "literal", len)) { context->term_type = RAPTOR_TERM_TYPE_LITERAL; } else if(!strncmp((const char*)str, "bnode", len)) { context->term_type = RAPTOR_TERM_TYPE_BLANK; } else { unsigned char * cstr = raptor_json_cstring_from_counted_string(rdf_parser, str, len); context->term_type = RAPTOR_TERM_TYPE_UNKNOWN; raptor_parser_error(rdf_parser, "Unknown term type: %s", cstr); RAPTOR_FREE(char*, cstr); } break; case RAPTOR_JSON_ATTRIB_DATATYPE: context->term_datatype = raptor_json_cstring_from_counted_string(rdf_parser, str, len); break; case RAPTOR_JSON_ATTRIB_UNKNOWN: default: raptor_parser_error(rdf_parser, "Unsupported term attribute in raptor_json_string"); break; } } else { raptor_parser_error(rdf_parser, "Unexpected JSON string"); return 0; } return 1; } static int raptor_json_yajl_map_key(void * ctx, const unsigned char * str, RAPTOR_YAJL_LEN_TYPE len) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->state == RAPTOR_JSON_STATE_MAP_ROOT) { if(!strncmp((const char*)str, "triples", len)) { context->state = RAPTOR_JSON_STATE_TRIPLES_KEY; return 1; } else { if(context->statement.subject) raptor_free_term(context->statement.subject); context->statement.subject = raptor_json_new_term_from_counted_string(rdf_parser, str, len); if(!context->statement.subject) return 0; context->state = RAPTOR_JSON_STATE_RESOURCES_SUBJECT_KEY; return 1; } } else if(context->state == RAPTOR_JSON_STATE_RESOURCES_PREDICATE) { if(context->statement.predicate) raptor_free_term(context->statement.predicate); context->statement.predicate = raptor_json_new_term_from_counted_string(rdf_parser, str, len); if(!context->statement.predicate) return 0; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_TRIPLE) { if(!strncmp((const char*)str, "subject", len)) { context->term = RAPTOR_JSON_TERM_SUBJECT; return 1; } else if(!strncmp((const char*)str, "predicate", len)) { context->term = RAPTOR_JSON_TERM_PREDICATE; return 1; } else if(!strncmp((const char*)str, "object", len)) { context->term = RAPTOR_JSON_TERM_OBJECT; return 1; } else { raptor_parser_error(rdf_parser, "Unexpected JSON key name in triple definition"); return 0; } } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_TERM || context->state == RAPTOR_JSON_STATE_RESOURCES_OBJECT) { if(!strncmp((const char*)str, "value", len)) { context->attrib = RAPTOR_JSON_ATTRIB_VALUE; return 1; } else if(!strncmp((const char*)str, "type", len)) { context->attrib = RAPTOR_JSON_ATTRIB_TYPE; return 1; } else if(!strncmp((const char*)str, "datatype", len)) { context->attrib = RAPTOR_JSON_ATTRIB_DATATYPE; return 1; } else if(!strncmp((const char*)str, "lang", len)) { context->attrib = RAPTOR_JSON_ATTRIB_LANG; return 1; } else { context->attrib = RAPTOR_JSON_ATTRIB_UNKNOWN; raptor_parser_error(rdf_parser, "Unexpected key name in triple definition"); return 0; } } else { raptor_parser_error(rdf_parser, "Unexpected JSON map key"); return 0; } } static int raptor_json_yajl_start_map(void * ctx) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->state == RAPTOR_JSON_STATE_ROOT) { context->state = RAPTOR_JSON_STATE_MAP_ROOT; return 1; } else if(context->state == RAPTOR_JSON_STATE_RESOURCES_SUBJECT_KEY) { context->state = RAPTOR_JSON_STATE_RESOURCES_PREDICATE; return 1; } else if(context->state == RAPTOR_JSON_STATE_RESOURCES_OBJECT_ARRAY) { context->state = RAPTOR_JSON_STATE_RESOURCES_OBJECT; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_ARRAY) { raptor_statement_clear(&context->statement); context->term = RAPTOR_JSON_TERM_UNKNOWN; context->state = RAPTOR_JSON_STATE_TRIPLES_TRIPLE; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_TRIPLE) { context->state = RAPTOR_JSON_STATE_TRIPLES_TERM; raptor_json_reset_term(context); return 1; } else { raptor_parser_error(rdf_parser, "Unexpected start of JSON map"); return 0; } } static int raptor_json_yajl_end_map(void * ctx) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->state == RAPTOR_JSON_STATE_RESOURCES_OBJECT) { context->statement.object = raptor_json_generate_term(rdf_parser); if(!context->statement.object) return 0; /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &context->statement); raptor_free_term(context->statement.object); context->statement.object = NULL; raptor_json_reset_term(context); context->state = RAPTOR_JSON_STATE_RESOURCES_OBJECT_ARRAY; return 1; } else if(context->state == RAPTOR_JSON_STATE_RESOURCES_PREDICATE) { context->state = RAPTOR_JSON_STATE_MAP_ROOT; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_TERM) { raptor_term *term = raptor_json_generate_term(rdf_parser); if(!term) return 0; /* Store the term in the statement */ switch(context->term) { case RAPTOR_JSON_TERM_SUBJECT: if(context->statement.subject) raptor_free_term(context->statement.subject); context->statement.subject = term; break; case RAPTOR_JSON_TERM_PREDICATE: if(context->statement.predicate) raptor_free_term(context->statement.predicate); context->statement.predicate = term; break; case RAPTOR_JSON_TERM_OBJECT: if(context->statement.object) raptor_free_term(context->statement.object); context->statement.object = term; break; case RAPTOR_JSON_TERM_UNKNOWN: default: raptor_parser_error(rdf_parser, "Unknown term in raptor_json_end_map"); break; } context->state = RAPTOR_JSON_STATE_TRIPLES_TRIPLE; raptor_json_reset_term(context); return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_TRIPLE) { if(!context->statement.subject) { raptor_parser_error(rdf_parser, "Triple is missing a subject term"); return 0; } else if(!context->statement.predicate) { raptor_parser_error(rdf_parser, "Triple is missing a predicate term"); return 0; } else if(!context->statement.object) { raptor_parser_error(rdf_parser, "Triple is missing a object term"); return 0; } else { /* Generate the statement */ (*rdf_parser->statement_handler)(rdf_parser->user_data, &context->statement); } raptor_statement_clear(&context->statement); context->state = RAPTOR_JSON_STATE_TRIPLES_ARRAY; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_KEY) { context->state = RAPTOR_JSON_STATE_MAP_ROOT; return 1; } else if(context->state == RAPTOR_JSON_STATE_MAP_ROOT) { context->state = RAPTOR_JSON_STATE_ROOT; return 1; } else { raptor_parser_error(rdf_parser, "Unexpected end of JSON map"); return 0; } } static int raptor_json_yajl_start_array(void * ctx) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->state == RAPTOR_JSON_STATE_RESOURCES_PREDICATE) { context->state = RAPTOR_JSON_STATE_RESOURCES_OBJECT_ARRAY; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_KEY) { context->state = RAPTOR_JSON_STATE_TRIPLES_ARRAY; return 1; } else { raptor_parser_error(rdf_parser, "Unexpected start of array"); return 0; } } static int raptor_json_yajl_end_array(void * ctx) { raptor_parser* rdf_parser = (raptor_parser*)ctx; raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->state == RAPTOR_JSON_STATE_RESOURCES_OBJECT_ARRAY) { context->state = RAPTOR_JSON_STATE_RESOURCES_PREDICATE; return 1; } else if(context->state == RAPTOR_JSON_STATE_TRIPLES_ARRAY) { context->state = RAPTOR_JSON_STATE_MAP_ROOT; return 1; } else { raptor_parser_error(rdf_parser, "Unexpected end of array"); return 0; } } static void* raptor_json_yajl_malloc(void *ctx, RAPTOR_YAJL_LEN_TYPE sz) { return RAPTOR_MALLOC(void*, sz); } static void* raptor_json_yajl_realloc(void *ctx, void * ptr, RAPTOR_YAJL_LEN_TYPE sz) { return RAPTOR_REALLOC(void*, ptr, sz); } static void raptor_json_yajl_free(void *ctx, void * ptr) { RAPTOR_FREE(char*, ptr); } static yajl_alloc_funcs raptor_json_yajl_alloc_funcs = { raptor_json_yajl_malloc, raptor_json_yajl_realloc, raptor_json_yajl_free, NULL }; static yajl_callbacks raptor_json_yajl_callbacks = { raptor_json_yajl_null, raptor_json_yajl_boolean, raptor_json_yajl_integer, raptor_json_yajl_double, NULL, raptor_json_yajl_string, raptor_json_yajl_start_map, raptor_json_yajl_map_key, raptor_json_yajl_end_map, raptor_json_yajl_start_array, raptor_json_yajl_end_array }; /** * raptor_json_parse_init: * * Initialise the Raptor JSON parser. * * Return value: non 0 on failure **/ static int raptor_json_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; /* Initialse the static statement */ raptor_statement_init(&context->statement, rdf_parser->world); /* Configure the parser */ #ifdef HAVE_YAJL2 #else context->config.allowComments = 1; context->config.checkUTF8 = 0; #endif return 0; } /* * raptor_json_parse_terminate - Free the Raptor JSON parser * @rdf_parser: parser object * **/ static void raptor_json_parse_terminate(raptor_parser* rdf_parser) { raptor_json_parser_context *context; context = (raptor_json_parser_context*)rdf_parser->context; if(context->handle) yajl_free(context->handle); raptor_json_reset_term(context); raptor_statement_clear(&context->statement); } static int raptor_json_parse_chunk(raptor_parser* rdf_parser, const unsigned char *s, size_t len, int is_end) { raptor_json_parser_context *context = (raptor_json_parser_context*)rdf_parser->context; yajl_status status; int result = 0; if(len) { /* Parse the chunk passed to us */ status = yajl_parse(context->handle, s, RAPTOR_BAD_CAST(int, len)); if(status != yajl_status_ok #ifdef HAVE_YAJL2 #else && status != yajl_status_insufficient_data #endif ) { unsigned char * str = yajl_get_error(context->handle, 1, s, RAPTOR_BAD_CAST(int, len)); raptor_parser_error(rdf_parser, "YAJL error: %s", (const char *) str); result = 1; yajl_free_error(context->handle, str); } } if(is_end) { /* parse any remaining buffered data */ #ifdef HAVE_YAJL2 #else #define yajl_complete_parse(h) yajl_parse_complete(h) #endif status = yajl_complete_parse(context->handle); if(status != yajl_status_ok) { unsigned char * str = yajl_get_error(context->handle, 0, NULL, 0); raptor_parser_error(rdf_parser, "YAJL error: %s", (const char *) str); result = 1; yajl_free_error(context->handle, str); } raptor_json_reset_term(context); raptor_statement_clear(&context->statement); } return result; } static int raptor_json_parse_start(raptor_parser* rdf_parser) { raptor_json_parser_context *context = (raptor_json_parser_context*)rdf_parser->context; /* Destroy the old parser */ if(context->handle) yajl_free(context->handle); /* Initialise a new parser */ context->handle = yajl_alloc( &raptor_json_yajl_callbacks, #ifdef HAVE_YAJL2 #else &context->config, #endif &raptor_json_yajl_alloc_funcs, (void *)rdf_parser ); if(!context->handle) { raptor_parser_fatal_error(rdf_parser, "Failed to initialise YAJL parser"); return 1; } /* Initialise the parse state */ #ifdef HAVE_YAJL2 yajl_config(context->handle, yajl_allow_comments, 1); yajl_config(context->handle, yajl_dont_validate_strings, 1); #else #endif context->state = RAPTOR_JSON_STATE_ROOT; raptor_json_reset_term(context); raptor_statement_clear(&context->statement); return 0; } static int raptor_json_parse_recognise_syntax(raptor_parser_factory* factory, const unsigned char *buffer, size_t len, const unsigned char *identifier, const unsigned char *suffix, const char *mime_type) { unsigned int pos = 0; int score = 0; if(suffix) { if(!strcmp((const char*)suffix, "json")) score = 8; if(!strcmp((const char*)suffix, "js")) score = 3; } else if(identifier) { if(strstr((const char*)identifier, "json")) score = 4; } if(mime_type && strstr((const char*)mime_type, "json")) score += 6; /* Is the first non-whitespace character a curly brace? */ while(pos<len) { if(isspace(buffer[pos])) { pos++; } else { if(buffer[pos] == '{') score += 2; break; } } return score; } static const char* const json_names[2] = { "json", NULL }; static const char* const json_uri_strings[2] = { "http://docs.api.talis.com/platform-api/output-types/rdf-json", NULL }; #define JSON_TYPES_COUNT 2 static const raptor_type_q json_types[JSON_TYPES_COUNT + 1] = { { "application/json", 16, 1}, { "text/json", 9, 1}, { NULL, 0, 0} }; static int raptor_json_parser_register_factory(raptor_parser_factory *factory) { int rc = 0; factory->desc.names = json_names; factory->desc.mime_types = json_types; factory->desc.label = "RDF/JSON (either Triples or Resource-Centric)"; factory->desc.uri_strings = json_uri_strings; factory->desc.flags = 0; factory->context_length = sizeof(raptor_json_parser_context); factory->init = raptor_json_parse_init; factory->terminate = raptor_json_parse_terminate; factory->start = raptor_json_parse_start; factory->chunk = raptor_json_parse_chunk; factory->recognise_syntax = raptor_json_parse_recognise_syntax; return rc; } int raptor_init_parser_json(raptor_world* world) { return !raptor_world_register_parser_factory(world, &raptor_json_parser_register_factory); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_sax2.c��������������������������������������������������������������������0000644�0001750�0001750�00000062206�12020170223�013303� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_sax2.c - Raptor SAX2 API * * Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* Define this for far too much output */ #undef RAPTOR_DEBUG_CDATA int raptor_sax2_init(raptor_world* world) { return 0; } void raptor_sax2_finish(raptor_world* world) { } /** * raptor_new_sax2: * @world: raptor world * @locator: raptor locator to use for errors * @user_data: pointer context information to pass to SAX handlers * * Constructor - Create a new SAX2 with error handlers * * Return value: new #raptor_sax2 object or NULL on failure */ raptor_sax2* raptor_new_sax2(raptor_world *world, raptor_locator *locator, void* user_data) { raptor_sax2* sax2; RAPTOR_CHECK_CONSTRUCTOR_WORLD(world); if(!locator) return NULL; raptor_world_open(world); sax2 = RAPTOR_CALLOC(raptor_sax2*, 1, sizeof(*sax2)); if(!sax2) return NULL; #ifdef RAPTOR_XML_LIBXML sax2->magic = RAPTOR_LIBXML_MAGIC; #endif sax2->world = world; sax2->locator = locator; sax2->user_data = user_data; sax2->enabled = 1; raptor_object_options_init(&sax2->options, RAPTOR_OPTION_AREA_SAX2); return sax2; } /** * raptor_free_sax2: * @sax2: SAX2 object * * Destructor - destroy a SAX2 object */ void raptor_free_sax2(raptor_sax2 *sax2) { raptor_xml_element *xml_element; if(!sax2) return; #ifdef RAPTOR_XML_LIBXML if(sax2->xc) { raptor_libxml_free(sax2->xc); sax2->xc = NULL; } #endif while( (xml_element = raptor_xml_element_pop(sax2)) ) raptor_free_xml_element(xml_element); raptor_namespaces_clear(&sax2->namespaces); if(sax2->base_uri) raptor_free_uri(sax2->base_uri); raptor_object_options_clear(&sax2->options); RAPTOR_FREE(raptor_sax2, sax2); } /** * raptor_sax2_set_start_element_handler: * @sax2: SAX2 object * @handler: start element handler * * Set SAX2 start element handler. */ void raptor_sax2_set_start_element_handler(raptor_sax2* sax2, raptor_sax2_start_element_handler handler) { sax2->start_element_handler = handler; } /** * raptor_sax2_set_end_element_handler: * @sax2: SAX2 object * @handler: end element handler * * Set SAX2 end element handler. */ void raptor_sax2_set_end_element_handler(raptor_sax2* sax2, raptor_sax2_end_element_handler handler) { sax2->end_element_handler = handler; } /** * raptor_sax2_set_characters_handler: * @sax2: SAX2 object * @handler: characters handler * * Set SAX2 characters handler. */ void raptor_sax2_set_characters_handler(raptor_sax2* sax2, raptor_sax2_characters_handler handler) { sax2->characters_handler = handler; } /** * raptor_sax2_set_cdata_handler: * @sax2: SAX2 object * @handler: CDATA handler * * Set SAX2 CDATA handler. */ void raptor_sax2_set_cdata_handler(raptor_sax2* sax2, raptor_sax2_cdata_handler handler) { sax2->cdata_handler = handler; } /** * raptor_sax2_set_comment_handler: * @sax2: SAX2 object * @handler: comment handler * * Set SAX2 XML comment handler. */ void raptor_sax2_set_comment_handler(raptor_sax2* sax2, raptor_sax2_comment_handler handler) { sax2->comment_handler = handler; } /** * raptor_sax2_set_unparsed_entity_decl_handler: * @sax2: SAX2 object * @handler: unparsed entity declaration handler * * Set SAX2 XML unparsed entity declaration handler. */ void raptor_sax2_set_unparsed_entity_decl_handler(raptor_sax2* sax2, raptor_sax2_unparsed_entity_decl_handler handler) { sax2->unparsed_entity_decl_handler = handler; } /** * raptor_sax2_set_external_entity_ref_handler: * @sax2: SAX2 object * @handler: entity reference handler * * Set SAX2 XML entity reference handler. */ void raptor_sax2_set_external_entity_ref_handler(raptor_sax2* sax2, raptor_sax2_external_entity_ref_handler handler) { sax2->external_entity_ref_handler = handler; } /** * raptor_sax2_set_namespace_handler: * @sax2: #raptor_sax2 object * @handler: new namespace callback function * * Set the XML namespace handler function. * * When a prefix/namespace is seen in an XML parser, call the given * @handler with the prefix string and the #raptor_uri namespace URI. * Either can be NULL for the default prefix or default namespace. * * The handler function does not deal with duplicates so any * namespace may be declared multiple times when a namespace is seen * in different parts of a document. * */ void raptor_sax2_set_namespace_handler(raptor_sax2* sax2, raptor_namespace_handler handler) { sax2->namespace_handler = handler; } raptor_xml_element* raptor_xml_element_pop(raptor_sax2 *sax2) { raptor_xml_element *element = sax2->current_element; if(!element) return NULL; sax2->current_element = element->parent; if(sax2->root_element == element) /* just deleted root */ sax2->root_element = NULL; return element; } void raptor_xml_element_push(raptor_sax2 *sax2, raptor_xml_element* element) { element->parent = sax2->current_element; sax2->current_element = element; if(!sax2->root_element) sax2->root_element = element; } /** * raptor_xml_element_is_empty: * @xml_element: XML Element * * Check if an XML Element is empty. * * Return value: non-0 if the element is empty. */ int raptor_xml_element_is_empty(raptor_xml_element* xml_element) { return !xml_element->content_cdata_seen && !xml_element->content_element_seen; } /** * raptor_sax2_inscope_xml_language: * @sax2: SAX2 object * * Get the in-scope XML language * * The result is a language string which may be "" if xml:lang="" is * given. NULL is returned only if there is no xml:lang in any outer * scope. * * Return value: shared pointer to the XML language or NULL if none is in scope. */ const unsigned char* raptor_sax2_inscope_xml_language(raptor_sax2 *sax2) { raptor_xml_element* xml_element; for(xml_element = sax2->current_element; xml_element; xml_element = xml_element->parent) { if(xml_element->xml_language) return xml_element->xml_language; } return NULL; } /** * raptor_sax2_inscope_base_uri: * @sax2: SAX2 object * * Get the in-scope base URI * * Return value: the in-scope base URI shared object or NULL if none is in scope. */ raptor_uri* raptor_sax2_inscope_base_uri(raptor_sax2 *sax2) { raptor_xml_element *xml_element; for(xml_element = sax2->current_element; xml_element; xml_element = xml_element->parent) if(xml_element->base_uri) return xml_element->base_uri; return sax2->base_uri; } /** * raptor_sax2_set_uri_filter: * @sax2: SAX2 object * @filter: URI filter function * @user_data: User data to pass to filter function * * Set URI filter function for SAX2 internal retrievals. **/ void raptor_sax2_set_uri_filter(raptor_sax2* sax2, raptor_uri_filter_func filter, void *user_data) { sax2->uri_filter = filter; sax2->uri_filter_user_data = user_data; } int raptor_sax2_get_depth(raptor_sax2 *sax2) { return sax2->depth; } void raptor_sax2_inc_depth(raptor_sax2 *sax2) { sax2->depth++; } void raptor_sax2_dec_depth(raptor_sax2 *sax2) { sax2->depth--; } static void raptor_sax2_simple_error(void* user_data, const char *message, ...) RAPTOR_PRINTF_FORMAT(2, 3); /* * raptor_sax2_simple_error - Error from a sax2 - Internal * * Matches the raptor_simple_message_handler API but calls * the sax2 error_handler */ static void raptor_sax2_simple_error(void* user_data, const char *message, ...) { raptor_sax2* sax2 = (raptor_sax2*)user_data; va_list arguments; va_start(arguments, message); if(sax2) { raptor_log_error_varargs(sax2->world, RAPTOR_LOG_LEVEL_ERROR, sax2->locator, message, arguments); } va_end(arguments); } /** * raptor_sax2_parse_start: * @sax2: sax2 object * @base_uri: base URI * * Start an XML SAX2 parse. */ void raptor_sax2_parse_start(raptor_sax2* sax2, raptor_uri *base_uri) { sax2->depth = 0; sax2->root_element = NULL; sax2->current_element = NULL; if(sax2->base_uri) raptor_free_uri(sax2->base_uri); if(base_uri) sax2->base_uri = raptor_uri_copy(base_uri); else sax2->base_uri = NULL; #ifdef RAPTOR_XML_LIBXML raptor_libxml_sax_init(sax2); #if LIBXML_VERSION < 20425 sax2->first_read = 1; #endif if(sax2->xc) { raptor_libxml_free(sax2->xc); sax2->xc = NULL; } #endif raptor_namespaces_clear(&sax2->namespaces); if(raptor_namespaces_init(sax2->world, &sax2->namespaces, 1)) { /* log a fatal error and set sax2 to failed state since the function signature does not currently support returning an error */ raptor_log_error(sax2->world, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "raptor_namespaces_init() failed"); sax2->failed = 1; } } /** * raptor_sax2_parse_chunk: * @sax2: sax2 object * @buffer: input buffer * @len: input buffer lenght * @is_end: non-0 if end of data * * Parse a chunk of XML data generating SAX2 events * * Return value: non-0 on failure */ int raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer, size_t len, int is_end) { #ifdef RAPTOR_XML_LIBXML /* parser context */ xmlParserCtxtPtr xc = sax2->xc; int rc; if(!xc) { int libxml_options = 0; if(!len) { /* no data given at all */ raptor_sax2_update_document_locator(sax2, sax2->locator); raptor_log_error(sax2->world, RAPTOR_LOG_LEVEL_ERROR, sax2->locator, "XML Parsing failed - no element found"); return 1; } xc = xmlCreatePushParserCtxt(&sax2->sax, sax2, /* user data */ (char*)buffer, RAPTOR_BAD_CAST(int, len), NULL); if(!xc) goto handle_error; #ifdef RAPTOR_LIBXML_XML_PARSE_NONET if(RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_NO_NET)) libxml_options |= XML_PARSE_NONET; #endif #ifdef HAVE_XMLCTXTUSEOPTIONS xmlCtxtUseOptions(xc, libxml_options); #endif xc->userData = sax2; /* user data */ xc->vctxt.userData = sax2; /* user data */ xc->vctxt.error = (xmlValidityErrorFunc)raptor_libxml_validation_error; xc->vctxt.warning = (xmlValidityWarningFunc)raptor_libxml_validation_warning; xc->replaceEntities = 1; sax2->xc = xc; if(is_end) len = 0; else return 0; } if(!len) { rc = xmlParseChunk(xc, (char*)buffer, 0, 1); return rc; } /* This works around some libxml versions that fail to work * if the buffer size is larger than the entire file * and thus the entire parsing is done in one operation. * * The code below: * 2.4.19 (oldest tested) to 2.4.24 - required * 2.4.25 - works with or without it * 2.4.26 or later - fails with this code */ #if LIBXML_VERSION < 20425 if(sax2->first_read && is_end) { /* parse all but the last character */ rc = xmlParseChunk(xc, (char*)buffer, len-1, 0); if(rc && rc != XML_WAR_UNDECLARED_ENTITY) goto handle_error; /* last character */ rc = xmlParseChunk(xc, (char*)buffer + (len-1), 1, 0); if(rc && rc != XML_WAR_UNDECLARED_ENTITY) goto handle_error; /* end */ xmlParseChunk(xc, (char*)buffer, 0, 1); return 0; } #endif #if LIBXML_VERSION < 20425 sax2->first_read = 0; #endif rc = xmlParseChunk(xc, (char*)buffer, RAPTOR_BAD_CAST(int, len), is_end); if(rc && rc != XML_WAR_UNDECLARED_ENTITY) /* libxml: non 0 is failure */ goto handle_error; if(is_end) return 0; return rc; handle_error: #endif return 1; } /** * raptor_sax2_set_option: * @sax2: #raptor_sax2 SAX2 object * @option: option to set from enumerated #raptor_option values * @string: string option value (or NULL) * @integer: integer option value * * Set SAX2 option. * * If @string is not NULL and the option type is numeric, the string * value is converted to an integer and used in preference to @integer. * * If @string is NULL and the option type is not numeric, an error is * returned. * * The @string values used are copied. * * The allowed options are available via * raptor_world_get_option_description(). * * Return value: non 0 on failure or if the option is unknown */ int raptor_sax2_set_option(raptor_sax2 *sax2, raptor_option option, char* string, int integer) { return raptor_object_options_set_option(&sax2->options, option, string, integer); } void raptor_sax2_update_document_locator(raptor_sax2* sax2, raptor_locator* locator) { #ifdef RAPTOR_XML_LIBXML raptor_libxml_update_document_locator(sax2, locator); #endif } /* start of an element */ void raptor_sax2_start_element(void* user_data, const unsigned char *name, const unsigned char **atts) { raptor_sax2* sax2 = (raptor_sax2*)user_data; raptor_qname* el_name; unsigned char **xml_atts_copy = NULL; size_t xml_atts_size = 0; int all_atts_count = 0; int ns_attributes_count = 0; raptor_qname** named_attrs = NULL; raptor_xml_element* xml_element = NULL; unsigned char *xml_language = NULL; raptor_uri *xml_base = NULL; if(sax2->failed || !sax2->enabled) return; #ifdef RAPTOR_XML_LIBXML if(atts) { int i; /* Do XML attribute value normalization */ for(i = 0; atts[i]; i += 2) { unsigned char *value = (unsigned char*)atts[i+1]; unsigned char *src = value; unsigned char *dst = xmlStrdup(value); if(!dst) { raptor_log_error(sax2->world, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "Out of memory"); return; } atts[i+1] = dst; while(*src == 0x20 || *src == 0x0d || *src == 0x0a || *src == 0x09) src++; while(*src) { if(*src == 0x20 || *src == 0x0d || *src == 0x0a || *src == 0x09) { while(*src == 0x20 || *src == 0x0d || *src == 0x0a || *src == 0x09) src++; if(*src) *dst++ = 0x20; } else { *dst++ = *src++; } } *dst = '\0'; xmlFree(value); } } #endif raptor_sax2_inc_depth(sax2); if(atts) { int i; /* Save passed in XML attributes pointers so we can * NULL the pointers when they get handled below (various atts[i]=NULL) */ for(i = 0; atts[i]; i++) ; xml_atts_size = sizeof(unsigned char*) * i; if(xml_atts_size) { xml_atts_copy = RAPTOR_MALLOC(unsigned char**, xml_atts_size); if(!xml_atts_copy) goto fail; memcpy(xml_atts_copy, atts, xml_atts_size); } /* XML attributes processing: * xmlns* - XML namespaces (Namespaces in XML REC) * Deleted and used to synthesise namespaces declarations * xml:lang - XML language (XML REC) * Deleted and optionally normalised to lowercase * xml:base - XML Base (XML Base REC) * Deleted and used to set the in-scope base URI for this XML element */ for(i = 0; atts[i]; i+= 2) { all_atts_count++; if(strncmp((char*)atts[i], "xml", 3)) { /* count and skip non xml* attributes */ ns_attributes_count++; continue; } /* synthesise the XML namespace events */ if(!memcmp((const char*)atts[i], "xmlns", 5)) { const unsigned char *prefix = atts[i][5] ? &atts[i][6] : NULL; const unsigned char *namespace_name = atts[i+1]; raptor_namespace* nspace; nspace = raptor_new_namespace(&sax2->namespaces, prefix, namespace_name, raptor_sax2_get_depth(sax2)); if(nspace) { raptor_namespaces_start_namespace(&sax2->namespaces, nspace); if(sax2->namespace_handler) (*sax2->namespace_handler)(sax2->user_data, nspace); } } else if(!strcmp((char*)atts[i], "xml:lang")) { size_t lang_len = strlen((char*)atts[i+1]); xml_language = RAPTOR_MALLOC(unsigned char*, lang_len + 1); if(!xml_language) { raptor_log_error(sax2->world, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "Out of memory"); goto fail; } /* optionally normalize language to lowercase */ if(RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_NORMALIZE_LANGUAGE)) { unsigned char *from = (unsigned char*)atts[i+1]; unsigned char *to = xml_language; while(*from) { if(isupper(*from)) *to++ = tolower(*from++); else *to++ = *from++; } *to = '\0'; } else memcpy(xml_language, atts[i+1], lang_len + 1); /* Copy NUL */ } else if(!strcmp((char*)atts[i], "xml:base")) { raptor_uri* base_uri; raptor_uri* xuri; base_uri = raptor_sax2_inscope_base_uri(sax2); xuri = raptor_new_uri_relative_to_base(sax2->world, base_uri, atts[i+1]); xml_base = raptor_new_uri_for_xmlbase(xuri); raptor_free_uri(xuri); } /* delete all xml attributes whether processed above or not */ atts[i] = NULL; } } /* Create new element structure */ el_name = raptor_new_qname(&sax2->namespaces, name, NULL); if(!el_name) goto fail; xml_element = raptor_new_xml_element(el_name, xml_language, xml_base); if(!xml_element) { raptor_free_qname(el_name); goto fail; } /* xml_language,xml_base now owned by xml_element */ xml_language = NULL; xml_base = NULL; /* Turn string attributes into namespaced-attributes */ if(ns_attributes_count) { int i; int offset = 0; /* Allocate new array to hold namespaced-attributes */ named_attrs = RAPTOR_CALLOC(raptor_qname**, ns_attributes_count, sizeof(raptor_qname*)); if(!named_attrs) { raptor_log_error(sax2->world, RAPTOR_LOG_LEVEL_FATAL, sax2->locator, "Out of memory"); goto fail; } for(i = 0; i < all_atts_count; i++) { raptor_qname* attr; /* Skip previously processed attributes */ if(!atts[i<<1]) continue; /* namespace-name[i] stored in named_attrs[i] */ attr = raptor_new_qname(&sax2->namespaces, atts[i<<1], atts[(i<<1)+1]); if(!attr) { /* failed - tidy up and return */ int j; for(j = 0; j < i; j++) RAPTOR_FREE(raptor_qname, named_attrs[j]); RAPTOR_FREE(raptor_qname_array, named_attrs); goto fail; } named_attrs[offset++] = attr; } } /* end if ns_attributes_count */ if(named_attrs) raptor_xml_element_set_attributes(xml_element, named_attrs, ns_attributes_count); raptor_xml_element_push(sax2, xml_element); if(sax2->start_element_handler) sax2->start_element_handler(sax2->user_data, xml_element); if(xml_atts_copy) { /* Restore passed in XML attributes, free the copy */ memcpy((void*)atts, xml_atts_copy, xml_atts_size); RAPTOR_FREE(cstringpointer, xml_atts_copy); } return; fail: if(xml_atts_copy) RAPTOR_FREE(cstringpointer, xml_atts_copy); if(xml_base) raptor_free_uri(xml_base); if(xml_language) RAPTOR_FREE(char*, xml_language); if(xml_element) raptor_free_xml_element(xml_element); } /* end of an element */ void raptor_sax2_end_element(void* user_data, const unsigned char *name) { raptor_sax2* sax2 = (raptor_sax2*)user_data; raptor_xml_element* xml_element; if(sax2->failed || !sax2->enabled) return; xml_element = sax2->current_element; if(xml_element) { #ifdef RAPTOR_DEBUG_VERBOSE fprintf(stderr, "\nraptor_rdfxml_end_element_handler: End ns-element: "); raptor_qname_print(stderr, xml_element->name); fputc('\n', stderr); #endif if(sax2->end_element_handler) sax2->end_element_handler(sax2->user_data, xml_element); } raptor_namespaces_end_for_depth(&sax2->namespaces, raptor_sax2_get_depth(sax2)); xml_element = raptor_xml_element_pop(sax2); if(xml_element) raptor_free_xml_element(xml_element); raptor_sax2_dec_depth(sax2); } /* characters */ void raptor_sax2_characters(void* user_data, const unsigned char *s, int len) { raptor_sax2* sax2 = (raptor_sax2*)user_data; if(sax2->failed || !sax2->enabled) return; if(sax2->characters_handler) sax2->characters_handler(sax2->user_data, sax2->current_element, s, len); } /* like <![CDATA[...]> */ void raptor_sax2_cdata(void* user_data, const unsigned char *s, int len) { raptor_sax2* sax2 = (raptor_sax2*)user_data; if(sax2->failed || !sax2->enabled) return; if(sax2->cdata_handler) sax2->cdata_handler(sax2->user_data, sax2->current_element, s, len); } /* comment */ void raptor_sax2_comment(void* user_data, const unsigned char *s) { raptor_sax2* sax2 = (raptor_sax2*)user_data; if(sax2->failed || !sax2->enabled) return; if(sax2->comment_handler) sax2->comment_handler(sax2->user_data, sax2->current_element, s); } /* unparsed (NDATA) entity */ void raptor_sax2_unparsed_entity_decl(void* user_data, const unsigned char* entityName, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId, const unsigned char* notationName) { raptor_sax2* sax2 = (raptor_sax2*)user_data; if(sax2->failed || !sax2->enabled) return; if(sax2->unparsed_entity_decl_handler) sax2->unparsed_entity_decl_handler(sax2->user_data, entityName, base, systemId, publicId, notationName); } /* external entity reference */ int raptor_sax2_external_entity_ref(void* user_data, const unsigned char* context, const unsigned char* base, const unsigned char* systemId, const unsigned char* publicId) { raptor_sax2* sax2 = (raptor_sax2*)user_data; if(sax2->failed || !sax2->enabled) return 0; if(sax2->external_entity_ref_handler) return sax2->external_entity_ref_handler(sax2->user_data, context, base, systemId, publicId); raptor_sax2_simple_error((void*)sax2, "Failed to handle external entity reference with base %s systemId %s publicId %s", (base ? (const char*)base : "(None)"), systemId, (publicId ? (const char*)publicId: "(None)")); /* Failed to handle external entity reference */ return 0; } /** * raptor_sax2_check_load_uri_string: * @sax2: SAX2 object * @uri_string: URI or file URI or file name string * * INTERNAL - Check URI loading policy * * Return value: > 0 if it is OK to load the URI, 0 if not, < 0 on failure */ int raptor_sax2_check_load_uri_string(raptor_sax2* sax2, const unsigned char* uri_string) { raptor_uri* abs_uri; const unsigned char* abs_uri_string; int abs_uri_is_file; int load_uri = 0; abs_uri = raptor_new_uri_from_uri_or_file_string(sax2->world, sax2->base_uri, uri_string); if(!abs_uri) return -1; abs_uri_string = raptor_uri_as_string(abs_uri); abs_uri_is_file = raptor_uri_uri_string_is_file_uri(abs_uri_string); if(abs_uri_is_file) load_uri = !RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_NO_FILE); else load_uri = !RAPTOR_OPTIONS_GET_NUMERIC(sax2, RAPTOR_OPTION_NO_NET); if(sax2->uri_filter) { int rc = sax2->uri_filter(sax2->uri_filter_user_data, abs_uri); if(rc) load_uri = 0; } RAPTOR_DEBUG4("URI '%s' Is a file? %s Load URI? %s\n", abs_uri_string, (abs_uri_is_file > 0) ? "YES" : "NO", (load_uri > 0) ? "YES" : "NO"); raptor_free_uri(abs_uri); return load_uri; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/snprintf.c�����������������������������������������������������������������������0000644�0001750�0001750�00000027736�12333764117�012735� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * This file is in the Public Domain * * Based on code from Public Domain snprintf.c from mutt * http://dev.mutt.org/hg/mutt/file/55cd4cb611d9/snprintf.c * Tue Aug 08 22:49:12 2006 +0000 * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef HAVE_VASPRINTF #define _GNU_SOURCE /* to get vasprintf() available */ #endif #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H #include <errno.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include "raptor2.h" #include "raptor_internal.h" /* * Thanks to the patch in this Debian bug for the solution * to the crash inside vsnprintf on some architectures. * * "reuse of args inside the while(1) loop is in violation of the * specs and only happens to work by accident on other systems." * * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=104325 */ #ifndef va_copy #ifdef __va_copy #define va_copy(dest, src) __va_copy(dest,src) #else #define va_copy(dest, src) (dest) = (src) #endif #endif #ifdef CHECK_VSNPRINTF_RUNTIME static int vsnprintf_checked = -1; static int vsnprintf_check_is_c99(char *buf, const char *s, ...) { va_list args; int r; va_start(args, s); r = vsnprintf(buf, buf ? 5 : 0, s, args); va_end(args); return (r == 7); } static int vsnprintf_is_c99(void) { if(vsnprintf_checked < 0) { char buffer[32]; vsnprintf_checked = (vsnprintf_check_is_c99(NULL, "1234567") && vsnprintf_check_is_c99(buffer, "1234567")) ? 1 : 0; } return vsnprintf_checked; } #endif /* CHECK_VSNPRINTF_RUNTIME */ #define VSNPRINTF_C99_BLOCK(len, buffer, size, format, arguments) \ do { \ len = vsnprintf(buffer, size, format, arguments); \ } while(0) #define VSNPRINTF_NOT_C99_BLOCK(len, buffer, size, format, arguments) \ do { \ if(!buffer || !size) { \ /* This vsnprintf doesn't return number of bytes required */ \ size = 2 + strlen(format); \ while(1) { \ va_list args_copy; \ char* tmp_buffer = RAPTOR_MALLOC(char*, size + 1); \ \ if(!tmp_buffer) \ break; \ \ /* copy for re-use */ \ va_copy(args_copy, arguments); \ len = vsnprintf(tmp_buffer, size, format, args_copy); \ va_end(args_copy); \ \ /* On windows, vsnprintf() returns -1 if the buffer does not \ * fit. If the buffer exactly fits the string without a NULL \ * terminator, it returns the string length and it ends up \ * with an unterminated string. The added check makes sure \ * the string returned is terminated - otherwise more buffer \ * space is allocated and the while() loop retries. \ * \ * On tru64, vsnprintf() returns the buffer size minus 1 if \ * the buffer is too small, leaving room for the terminator. \ */ \ if((len >= 0) && \ (RAPTOR_GOOD_CAST(size_t, len) + 1 < size) && \ (tmp_buffer[len] == '\0')) { \ len = RAPTOR_BAD_CAST(int, strlen(tmp_buffer)); \ RAPTOR_FREE(char*, tmp_buffer); \ break; \ } \ RAPTOR_FREE(char*, tmp_buffer); \ size += (size >> 1); \ } \ } \ \ if(buffer) \ len = vsnprintf(buffer, size, format, arguments); \ } while(0) #ifndef STANDALONE /** * raptor_vsnprintf2: * @buffer: buffer (or NULL) * @size: size of buffer (or 0) * @format: printf-style format string * @arguments: variable arguments list * * Format output for a variable arguments list into an allocated sized buffer. * * This is a wrapper around system versions of vsnprintf with * different call and return conventions. * * If @buffer is NULL or size is 0 or the buffer size is too small, * returns the number of bytes that would be needed for buffer * * Return value: number of bytes allocated (excluding NUL) or <0 on failure **/ int raptor_vsnprintf2(char *buffer, size_t size, const char *format, va_list arguments) { int len = -1; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(format, char*, -1); #ifdef CHECK_VSNPRINTF_RUNTIME if(vsnprintf_is_c99()) VSNPRINTF_C99_BLOCK(len, buffer, size, format, arguments) ; else VSNPRINTF_NOT_C99_BLOCK(len, buffer, size, format, arguments) ; #else #ifdef HAVE_C99_VSNPRINTF VSNPRINTF_C99_BLOCK(len, buffer, size, format, arguments) ; #else VSNPRINTF_NOT_C99_BLOCK(len, buffer, size, format, arguments) ; #endif #endif return len; } /** * raptor_vsnprintf: * @format: printf-style format string * @arguments: variable arguments list * * Format output for a variable arguments list into a newly allocated buffer * * @Deprecated: This does not actually conform to vsnprintf's calling * convention and does not return the allocated buffer length. Use * raptor_vsnprintf2() or raptor_vasprintf() instead. * * Return value: a newly allocated string as the formatted result or NULL on failure **/ char* raptor_vsnprintf(const char *format, va_list arguments) { int len; char *buffer = NULL; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(format, char*, NULL); len = raptor_vasprintf(&buffer, format, arguments); if(len < 0) return NULL; return buffer; } /** * raptor_snprintf: * @buffer: buffer (or NULL) * @size: bufer size (or 0) * @format: printf-style format string * @...: format arguments * * Format output into an allocated sized buffer * * This provides a portable version snprintf() over variants on * different systems. * * If @buffer is NULL, calculates the number of bytes needed to * allocate for buffer and do no formatting. * * Return value: number of bytes allocated (excluding NUL) or 0 on failure **/ int raptor_snprintf(char *buffer, size_t size, const char *format, ...) { va_list arguments; int length; RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(format, char*, 0); va_start(arguments, format); length = raptor_vsnprintf2(buffer, size, format, arguments); va_end(arguments); return length; } /** * raptor_vasprintf: * @ret: pointer to store buffer * @format: printf-style format string * @arguments: format arguments list * * Format output into a new buffer and return it * * This is a wrapper around the (GNU) vasprintf function that is not * always avaiable. * * Return value: number of bytes allocated (excluding NUL) or < 0 on failure **/ int raptor_vasprintf(char **ret, const char *format, va_list arguments) { int length; #ifndef HAVE_VASPRINTF va_list args_copy; #endif RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(ret, char**, -1); RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(format, char*, -1); #ifdef HAVE_VASPRINTF length = vasprintf(ret, format, arguments); #else va_copy(args_copy, arguments); length = raptor_vsnprintf2(NULL, 0, format, args_copy); va_end(args_copy); if(length < 0) { *ret = NULL; return length; } *ret = RAPTOR_MALLOC(char*, length + 1); if(!*ret) return -1; va_copy(args_copy, arguments); length = raptor_vsnprintf2(*ret, length + 1, format, args_copy); va_end(args_copy); #endif return length; } static const char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; /** * raptor_format_integer: * @buffer: buffer (or NULL) * @bufsize: size of above (or 0) * @integer: integer value to format * @base: numeric base up to 36 * @width: field width (or -1) * @padding: padding char (or \0) * * INTERNAL - Format an integer as a decimal into a buffer or * calculate the size needed. * * Works Like the C99 snprintf() but just for integers. * * If @buffer is NULL or the @bufsize is too small, the number of * bytes needed (excluding NUL) is returned and no formatting is done. * * NOTE: Does NOT add a '\0' at end of string. * * Return value: number of bytes needed or written (excluding NUL) or 0 on failure */ size_t raptor_format_integer(char* buffer, size_t bufsize, int integer, unsigned int base, int width, char padding) { size_t len = 1; char *p; unsigned int value; if(integer < 0) { value = (unsigned int)-integer; len++; width++; } else value = (unsigned int)integer; while(value /= base) len++; if(width > 0 && RAPTOR_GOOD_CAST(size_t, width) > len) len = width; if(!buffer || bufsize < RAPTOR_GOOD_CAST(size_t, (len + 1))) /* +1 for NUL */ return len; if(!padding) padding = ' '; if(integer < 0) value = (unsigned int)-integer; else value = (unsigned int)integer; p = &buffer[len]; *p-- = '\0'; while(value > 0 && p >= buffer) { *p-- = digits[value % base]; value /= base; } while(p >= buffer) *p-- = padding; if(integer < 0) *buffer = '-'; return len; } #else /* STANDALONE */ int main(int argc, char *argv[]); static int test_snprintf_real(int len_ref, const char *format, va_list arguments) RAPTOR_PRINTF_FORMAT(2, 0); static int test_snprintf(size_t len_ref, const char *format, ...) RAPTOR_PRINTF_FORMAT(2, 3); static const char* program; static int test_snprintf_real(int len_ref, const char *format, va_list arguments) { int len = -2; size_t size = 0; VSNPRINTF_NOT_C99_BLOCK(len, NULL, size, format, arguments); if(len != len_ref) { fprintf(stderr, "%s: VSNPRINTF_NOT_C99_BLOCK(len=%d, size=%d, format=\"%s\") failed : expected %d, got %d\n", program, len, (int)size, format, (int)len_ref, (int)len); return 1; } return 0; } static int test_snprintf(size_t len_ref, const char *format, ...) { va_list arguments; int rc; va_start(arguments, format); rc = test_snprintf_real(RAPTOR_BAD_CAST(int, len_ref), format, arguments); va_end(arguments); return rc; } #define FMT_LEN_MAX 128 #define ARG_LEN_MAX 128 int main(int argc, char *argv[]) { char fmt[FMT_LEN_MAX + 1]; char arg[ARG_LEN_MAX + 1]; size_t x, y; int errors = 0; program = raptor_basename(argv[0]); for(x = 2; x < FMT_LEN_MAX; x++) { for(y = 0; y < ARG_LEN_MAX; y++) { size_t len_ref = x + y - 2; /* fmt = "xxxxxxxx%s" * (number of 'x' characters varies) */ memset(fmt, 'x', x - 2); fmt[x - 2] = '%'; fmt[x - 1] = 's'; fmt[x] = '\0'; /* arg = "yyyyyyyy" * (number of 'y' characters varies) */ memset(arg, 'y', y); arg[y] = '\0'; /* assert(strlen(fmt) == x); */ /* assert(strlen(arg) == y); */ /* len_ref = sprintf(buf_ref, fmt, arg); assert((size_t)len_ref == x + y - 2); */ if(test_snprintf(len_ref, fmt, arg)) errors++; } } return errors; } #endif /* STANDALONE */ ����������������������������������raptor2-2.0.15/src/raptor_unicode.c�����������������������������������������������������������������0000644�0001750�0001750�00000066163�12020170223�014062� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_unicode.c - Raptor Unicode and UTF-8 support * * Copyright (C) 2002-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2002-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" /* Unicode defines only the range U+0000 to U+10FFFF */ const raptor_unichar raptor_unicode_max_codepoint = 0x10FFFF; /** * raptor_unicode_utf8_string_put_char: * @c: Unicode character * @output: UTF-8 string buffer or NULL * @length: length of output buffer * * Encode a Unicode character to a UTF-8 string * * If @output is NULL, then will calculate the length rather than * perform the encoding. This can be used by the called to allocate * space and then re-call this function with the new buffer. * * Return value: number of bytes encoded to output buffer or <0 on failure **/ int raptor_unicode_utf8_string_put_char(raptor_unichar c, unsigned char *output, size_t length) { size_t size = 0; /* check for illegal code positions: * [ U+D800 to U+DFFF (UTF-16 surrogates) - now allowed ] * U+FFFE and U+FFFF */ if(c == 0xFFFE || c == 0xFFFF) return -1; if (c < 0x00000080) size = 1; else if(c < 0x00000800) size = 2; else if(c < 0x00010000) size = 3; else if(c < 0x00200000) size = 4; else if(c < 0x04000000) size = 5; else if(c < 0x80000000) size = 6; else return -1; /* when no buffer given, return size */ if(!output) return RAPTOR_GOOD_CAST(int, size); /* ok since size is in range 1..6 */ if(size > length) return -1; switch(size) { case 6: output[5] = 0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 2 (bits 7,6,5,4,3,2 less 7,6,5,4,3 set below) on last byte */ c |= 0x4000000; /* 0x10000 = 0x04 << 24 */ /* FALLTHROUGH */ case 5: output[4] = 0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 3 (bits 7,6,5,4,3 less 7,6,5,4 set below) on last byte */ c |= 0x200000; /* 0x10000 = 0x08 << 18 */ /* FALLTHROUGH */ case 4: output[3] = 0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 4 (bits 7,6,5,4 less 7,6,5 set below) on last byte */ c |= 0x10000; /* 0x10000 = 0x10 << 12 */ /* FALLTHROUGH */ case 3: output[2] = 0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bit 5 (bits 7,6,5 less 7,6 set below) on last byte */ c |= 0x800; /* 0x800 = 0x20 << 6 */ /* FALLTHROUGH */ case 2: output[1] = 0x80 | (unsigned char)(c & 0x3F); c= c >> 6; /* set bits 7,6 on last byte */ c |= 0xc0; /* FALLTHROUGH */ case 1: output[0] = (unsigned char)c; } return RAPTOR_GOOD_CAST(int, size); /* ok since size is in range 1..6 */ } /** * raptor_unicode_utf8_string_get_char: * @input: UTF-8 string buffer * @length: buffer size * @output: Pointer to the Unicode character or NULL * * Decode a UTF-8 encoded string to get a Unicode character. * * If output is NULL, then will calculate the number of bytes that * will be used from the input buffer and not perform the conversion. * * Return value: bytes used from input buffer or <0 on failure: -1 input buffer too short or length error, -2 overlong UTF-8 sequence, -3 illegal code positions, -4 code out of range U+0000 to U+10FFFF. In cases -2, -3 and -4 the coded character is stored in the output. */ int raptor_unicode_utf8_string_get_char(const unsigned char *input, size_t length, raptor_unichar *output) { unsigned char in; size_t size; raptor_unichar c = 0; if(length < 1) return -1; in=*input++; if((in & 0x80) == 0) { size = 1; c= in & 0x7f; } else if((in & 0xe0) == 0xc0) { size = 2; c= in & 0x1f; } else if((in & 0xf0) == 0xe0) { size = 3; c= in & 0x0f; } else if((in & 0xf8) == 0xf0) { size = 4; c = in & 0x07; } else if((in & 0xfc) == 0xf8) { size = 5; c = in & 0x03; } else if((in & 0xfe) == 0xfc) { size = 6; c = in & 0x01; } else return -1; if(!output) return RAPTOR_GOOD_CAST(int, size); /* ok since size is in range 1..6 */ if(length < size) return -1; switch(size) { case 6: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 5: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 4: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 3: in=*input++ & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ case 2: /* '*input' used here since we never need to use new value of input [CLANG] */ in = *input & 0x3f; c= c << 6; c |= in; /* FALLTHROUGH */ default: break; } *output=c; /* check for overlong UTF-8 sequences */ switch(size) { case 2: if(c < 0x00000080) return -2; break; case 3: if(c < 0x00000800) return -2; break; case 4: if(c < 0x00010000) return -2; break; default: /* 1 */ break; } /* check for illegal code positions: * [ U+D800 to U+DFFF (UTF-16 surrogates) - now allowed ] * U+FFFE and U+FFFF */ if(c == 0xFFFE || c == 0xFFFF) return -3; if(c > raptor_unicode_max_codepoint) return -4; return RAPTOR_GOOD_CAST(int, size); /* ok since size is in range 1..6 */ } static int raptor_unicode_is_letter(long c); static int raptor_unicode_is_basechar(long c); static int raptor_unicode_is_ideographic(long c); static int raptor_unicode_is_combiningchar(long c); static int raptor_unicode_is_digit(long c); static int raptor_unicode_is_extender(long c); /** * raptor_unicode_is_xml11_namestartchar: * @c: Unicode character to check * * Check if Unicode character is legal to start an XML 1.1 Name * * See <ulink url="http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-NameStartChar">Namespaces in XML 1.1 REC 2004-02-04 NameStartChar</ulink> * updating * <ulink url="http://www.w3.org/TR/2004/REC-xml11-20040204/">Extensible Markup Language (XML) 1.1 REC 2004-02-04</ulink> sec 2.3, [4a] * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml11_namestartchar(raptor_unichar c) { return (((c >= 0x0041) && (c <= 0x005A)) || /* [A-Z] */ (c == 0x005F) || /* '_' */ ((c >= 0x0061) && (c <= 0x007A)) || /* [a-z] */ ((c >= 0x00C0) && (c <= 0x00D6)) || ((c >= 0x00D8) && (c <= 0x00F6)) || ((c >= 0x00F8) && (c <= 0x02FF)) || ((c >= 0x0370) && (c <= 0x037D)) || ((c >= 0x037F) && (c <= 0x1FFF)) || ((c >= 0x200C) && (c <= 0x200D)) || ((c >= 0x2070) && (c <= 0x218F)) || ((c >= 0x2C00) && (c <= 0x2FEF)) || ((c >= 0x3001) && (c <= 0xD7FF)) || ((c >= 0xF900) && (c <= 0xFDCF)) || ((c >= 0xFDF0) && (c <= 0xFFFD)) || ((c >= 0x10000) && (c <= 0xEFFFF))); } /** * raptor_unicode_is_xml10_namestartchar: * @c: Unicode character to check * * Check if Unicode character is legal to start an XML 1.0 Name * * See <ulink url="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName">Namespaces in XML REC 1999-01-14</ulink> * updating * <ulink url="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04</ulink> * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml10_namestartchar(raptor_unichar c) { return (raptor_unicode_is_letter(c) || (c == '_')); } /** * raptor_unicode_is_namestartchar: * @c: Unicode character to check * * Check if Unicode character is legal to start an XML Name * * Return value: non-0 if the character is legal **/ int raptor_unicode_is_namestartchar(raptor_unichar c) { #ifdef RAPTOR_XML_1_1 return raptor_unicode_is_xml11_namestartchar(c); #else return raptor_unicode_is_xml10_namestartchar(c); #endif } /** * raptor_unicode_is_xml11_namechar: * @c: Unicode character * * Check if a Unicode codepoint is a legal to continue an XML 1.1 Name * * See <ulink url="http://www.w3.org/TR/2004/REC-xml11-20040204/">Namespaces in XML 1.1 REC 2004-02-04</ulink> * updating * <ulink url="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04</ulink> sec 2.3, [4a] * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml11_namechar(raptor_unichar c) { return (raptor_unicode_is_xml11_namestartchar(c) || (c == 0x002D) || /* '-' */ (c == 0x002E) || /* '.' */ (c >= 0x0030 && c <= 0x0039) || /* 0-9 */ (c == 0x00B7) || (c >= 0x0300 && c <=0x036F) || (c >= 0x203F && c <=0x2040)); } /** * raptor_unicode_is_xml10_namechar: * @c: Unicode character * * Check if a Unicode codepoint is a legal to continue an XML 1.0 Name * * See <ulink url="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCNameChar">Namespaces in XML REC 1999-01-14 NCNameChar</ulink> * updating * <ulink url="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup Language (XML) 1.0 (Third Edition) REC 2004-02-04</ulink> * excluding the ':' * * Return value: non-0 if legal **/ int raptor_unicode_is_xml10_namechar(raptor_unichar c) { return (raptor_unicode_is_letter(c) || raptor_unicode_is_digit(c) || (c == 0x002E) || /* '.' */ (c == 0x002D) || /* '-' */ (c == 0x005F) || /* '_' */ raptor_unicode_is_combiningchar(c) || raptor_unicode_is_extender(c)); } /** * raptor_unicode_is_namechar: * @c: Unicode character to check * * Check if Unicode character is legal to continue an XML Name . * * Return value: non-0 if the character is legal **/ int raptor_unicode_is_namechar(raptor_unichar c) { #ifdef RAPTOR_XML_1_1 return raptor_unicode_is_xml11_namechar(c); #else return raptor_unicode_is_xml10_namechar(c); #endif } /* * All this below was derived by machine-transforming the classes in Appendix B * of http://www.w3.org/TR/2000/REC-xml-20001006 */ static int raptor_unicode_is_letter(long c) { return(raptor_unicode_is_basechar(c) || raptor_unicode_is_ideographic(c)); } static int raptor_unicode_is_basechar(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-BaseChar */ return((c >= 0x0041 && c <= 0x005A ) || (c >= 0x0061 && c <= 0x007A ) || (c >= 0x00C0 && c <= 0x00D6 ) || (c >= 0x00D8 && c <= 0x00F6 ) || (c >= 0x00F8 && c <= 0x00FF ) || (c >= 0x0100 && c <= 0x0131 ) || (c >= 0x0134 && c <= 0x013E ) || (c >= 0x0141 && c <= 0x0148 ) || (c >= 0x014A && c <= 0x017E ) || (c >= 0x0180 && c <= 0x01C3 ) || (c >= 0x01CD && c <= 0x01F0 ) || (c >= 0x01F4 && c <= 0x01F5 ) || (c >= 0x01FA && c <= 0x0217 ) || (c >= 0x0250 && c <= 0x02A8 ) || (c >= 0x02BB && c <= 0x02C1 ) || (c == 0x0386) || (c >= 0x0388 && c <= 0x038A ) || (c == 0x038C) || (c >= 0x038E && c <= 0x03A1 ) || (c >= 0x03A3 && c <= 0x03CE ) || (c >= 0x03D0 && c <= 0x03D6 ) || (c == 0x03DA) || (c == 0x03DC) || (c == 0x03DE) || (c == 0x03E0) || (c >= 0x03E2 && c <= 0x03F3 ) || (c >= 0x0401 && c <= 0x040C ) || (c >= 0x040E && c <= 0x044F ) || (c >= 0x0451 && c <= 0x045C ) || (c >= 0x045E && c <= 0x0481 ) || (c >= 0x0490 && c <= 0x04C4 ) || (c >= 0x04C7 && c <= 0x04C8 ) || (c >= 0x04CB && c <= 0x04CC ) || (c >= 0x04D0 && c <= 0x04EB ) || (c >= 0x04EE && c <= 0x04F5 ) || (c >= 0x04F8 && c <= 0x04F9 ) || (c >= 0x0531 && c <= 0x0556 ) || (c == 0x0559) || (c >= 0x0561 && c <= 0x0586 ) || (c >= 0x05D0 && c <= 0x05EA ) || (c >= 0x05F0 && c <= 0x05F2 ) || (c >= 0x0621 && c <= 0x063A ) || (c >= 0x0641 && c <= 0x064A ) || (c >= 0x0671 && c <= 0x06B7 ) || (c >= 0x06BA && c <= 0x06BE ) || (c >= 0x06C0 && c <= 0x06CE ) || (c >= 0x06D0 && c <= 0x06D3 ) || (c == 0x06D5) || (c >= 0x06E5 && c <= 0x06E6 ) || (c >= 0x0905 && c <= 0x0939 ) || (c == 0x093D) || (c >= 0x0958 && c <= 0x0961 ) || (c >= 0x0985 && c <= 0x098C ) || (c >= 0x098F && c <= 0x0990 ) || (c >= 0x0993 && c <= 0x09A8 ) || (c >= 0x09AA && c <= 0x09B0 ) || (c == 0x09B2) || (c >= 0x09B6 && c <= 0x09B9 ) || (c >= 0x09DC && c <= 0x09DD ) || (c >= 0x09DF && c <= 0x09E1 ) || (c >= 0x09F0 && c <= 0x09F1 ) || (c >= 0x0A05 && c <= 0x0A0A ) || (c >= 0x0A0F && c <= 0x0A10 ) || (c >= 0x0A13 && c <= 0x0A28 ) || (c >= 0x0A2A && c <= 0x0A30 ) || (c >= 0x0A32 && c <= 0x0A33 ) || (c >= 0x0A35 && c <= 0x0A36 ) || (c >= 0x0A38 && c <= 0x0A39 ) || (c >= 0x0A59 && c <= 0x0A5C ) || (c == 0x0A5E) || (c >= 0x0A72 && c <= 0x0A74 ) || (c >= 0x0A85 && c <= 0x0A8B ) || (c == 0x0A8D) || (c >= 0x0A8F && c <= 0x0A91 ) || (c >= 0x0A93 && c <= 0x0AA8 ) || (c >= 0x0AAA && c <= 0x0AB0 ) || (c >= 0x0AB2 && c <= 0x0AB3 ) || (c >= 0x0AB5 && c <= 0x0AB9 ) || (c == 0x0ABD) || (c == 0x0AE0) || (c >= 0x0B05 && c <= 0x0B0C ) || (c >= 0x0B0F && c <= 0x0B10 ) || (c >= 0x0B13 && c <= 0x0B28 ) || (c >= 0x0B2A && c <= 0x0B30 ) || (c >= 0x0B32 && c <= 0x0B33 ) || (c >= 0x0B36 && c <= 0x0B39 ) || (c == 0x0B3D) || (c >= 0x0B5C && c <= 0x0B5D ) || (c >= 0x0B5F && c <= 0x0B61 ) || (c >= 0x0B85 && c <= 0x0B8A ) || (c >= 0x0B8E && c <= 0x0B90 ) || (c >= 0x0B92 && c <= 0x0B95 ) || (c >= 0x0B99 && c <= 0x0B9A ) || (c == 0x0B9C) || (c >= 0x0B9E && c <= 0x0B9F ) || (c >= 0x0BA3 && c <= 0x0BA4 ) || (c >= 0x0BA8 && c <= 0x0BAA ) || (c >= 0x0BAE && c <= 0x0BB5 ) || (c >= 0x0BB7 && c <= 0x0BB9 ) || (c >= 0x0C05 && c <= 0x0C0C ) || (c >= 0x0C0E && c <= 0x0C10 ) || (c >= 0x0C12 && c <= 0x0C28 ) || (c >= 0x0C2A && c <= 0x0C33 ) || (c >= 0x0C35 && c <= 0x0C39 ) || (c >= 0x0C60 && c <= 0x0C61 ) || (c >= 0x0C85 && c <= 0x0C8C ) || (c >= 0x0C8E && c <= 0x0C90 ) || (c >= 0x0C92 && c <= 0x0CA8 ) || (c >= 0x0CAA && c <= 0x0CB3 ) || (c >= 0x0CB5 && c <= 0x0CB9 ) || (c == 0x0CDE) || (c >= 0x0CE0 && c <= 0x0CE1 ) || (c >= 0x0D05 && c <= 0x0D0C ) || (c >= 0x0D0E && c <= 0x0D10 ) || (c >= 0x0D12 && c <= 0x0D28 ) || (c >= 0x0D2A && c <= 0x0D39 ) || (c >= 0x0D60 && c <= 0x0D61 ) || (c >= 0x0E01 && c <= 0x0E2E ) || (c == 0x0E30) || (c >= 0x0E32 && c <= 0x0E33 ) || (c >= 0x0E40 && c <= 0x0E45 ) || (c >= 0x0E81 && c <= 0x0E82 ) || (c == 0x0E84) || (c >= 0x0E87 && c <= 0x0E88 ) || (c == 0x0E8A) || (c == 0x0E8D) || (c >= 0x0E94 && c <= 0x0E97 ) || (c >= 0x0E99 && c <= 0x0E9F ) || (c >= 0x0EA1 && c <= 0x0EA3 ) || (c == 0x0EA5) || (c == 0x0EA7) || (c >= 0x0EAA && c <= 0x0EAB ) || (c >= 0x0EAD && c <= 0x0EAE ) || (c == 0x0EB0) || (c >= 0x0EB2 && c <= 0x0EB3 ) || (c == 0x0EBD) || (c >= 0x0EC0 && c <= 0x0EC4 ) || (c >= 0x0F40 && c <= 0x0F47 ) || (c >= 0x0F49 && c <= 0x0F69 ) || (c >= 0x10A0 && c <= 0x10C5 ) || (c >= 0x10D0 && c <= 0x10F6 ) || (c == 0x1100) || (c >= 0x1102 && c <= 0x1103 ) || (c >= 0x1105 && c <= 0x1107 ) || (c == 0x1109) || (c >= 0x110B && c <= 0x110C ) || (c >= 0x110E && c <= 0x1112 ) || (c == 0x113C) || (c == 0x113E) || (c == 0x1140) || (c == 0x114C) || (c == 0x114E) || (c == 0x1150) || (c >= 0x1154 && c <= 0x1155 ) || (c == 0x1159) || (c >= 0x115F && c <= 0x1161 ) || (c == 0x1163) || (c == 0x1165) || (c == 0x1167) || (c == 0x1169) || (c >= 0x116D && c <= 0x116E ) || (c >= 0x1172 && c <= 0x1173 ) || (c == 0x1175) || (c == 0x119E) || (c == 0x11A8) || (c == 0x11AB) || (c >= 0x11AE && c <= 0x11AF ) || (c >= 0x11B7 && c <= 0x11B8 ) || (c == 0x11BA) || (c >= 0x11BC && c <= 0x11C2 ) || (c == 0x11EB) || (c == 0x11F0) || (c == 0x11F9) || (c >= 0x1E00 && c <= 0x1E9B ) || (c >= 0x1EA0 && c <= 0x1EF9 ) || (c >= 0x1F00 && c <= 0x1F15 ) || (c >= 0x1F18 && c <= 0x1F1D ) || (c >= 0x1F20 && c <= 0x1F45 ) || (c >= 0x1F48 && c <= 0x1F4D ) || (c >= 0x1F50 && c <= 0x1F57 ) || (c == 0x1F59) || (c == 0x1F5B) || (c == 0x1F5D) || (c >= 0x1F5F && c <= 0x1F7D ) || (c >= 0x1F80 && c <= 0x1FB4 ) || (c >= 0x1FB6 && c <= 0x1FBC ) || (c == 0x1FBE) || (c >= 0x1FC2 && c <= 0x1FC4 ) || (c >= 0x1FC6 && c <= 0x1FCC ) || (c >= 0x1FD0 && c <= 0x1FD3 ) || (c >= 0x1FD6 && c <= 0x1FDB ) || (c >= 0x1FE0 && c <= 0x1FEC ) || (c >= 0x1FF2 && c <= 0x1FF4 ) || (c >= 0x1FF6 && c <= 0x1FFC ) || (c == 0x2126) || (c >= 0x212A && c <= 0x212B ) || (c == 0x212E) || (c >= 0x2180 && c <= 0x2182 ) || (c >= 0x3041 && c <= 0x3094 ) || (c >= 0x30A1 && c <= 0x30FA ) || (c >= 0x3105 && c <= 0x312C ) || (c >= 0xAC00 && c <= 0xD7A3 ) ); } static int raptor_unicode_is_ideographic(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-Ideographic */ return((c >= 0x4E00 && c <= 0x9FA5 ) || (c == 0x3007) || (c >= 0x3021 && c <= 0x3029 )); } static int raptor_unicode_is_combiningchar(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-CombiningChar */ return((c >= 0x0300 && c <= 0x0345 ) || (c >= 0x0360 && c <= 0x0361 ) || (c >= 0x0483 && c <= 0x0486 ) || (c >= 0x0591 && c <= 0x05A1 ) || (c >= 0x05A3 && c <= 0x05B9 ) || (c >= 0x05BB && c <= 0x05BD ) || (c == 0x05BF) || (c >= 0x05C1 && c <= 0x05C2 ) || (c == 0x05C4) || (c >= 0x064B && c <= 0x0652 ) || (c == 0x0670) || (c >= 0x06D6 && c <= 0x06DC ) || (c >= 0x06DD && c <= 0x06DF ) || (c >= 0x06E0 && c <= 0x06E4 ) || (c >= 0x06E7 && c <= 0x06E8 ) || (c >= 0x06EA && c <= 0x06ED ) || (c >= 0x0901 && c <= 0x0903 ) || (c == 0x093C) || (c >= 0x093E && c <= 0x094C ) || (c == 0x094D) || (c >= 0x0951 && c <= 0x0954 ) || (c >= 0x0962 && c <= 0x0963 ) || (c >= 0x0981 && c <= 0x0983 ) || (c == 0x09BC) || (c == 0x09BE) || (c == 0x09BF) || (c >= 0x09C0 && c <= 0x09C4 ) || (c >= 0x09C7 && c <= 0x09C8 ) || (c >= 0x09CB && c <= 0x09CD ) || (c == 0x09D7) || (c >= 0x09E2 && c <= 0x09E3 ) || (c == 0x0A02) || (c == 0x0A3C) || (c == 0x0A3E) || (c == 0x0A3F) || (c >= 0x0A40 && c <= 0x0A42 ) || (c >= 0x0A47 && c <= 0x0A48 ) || (c >= 0x0A4B && c <= 0x0A4D ) || (c >= 0x0A70 && c <= 0x0A71 ) || (c >= 0x0A81 && c <= 0x0A83 ) || (c == 0x0ABC) || (c >= 0x0ABE && c <= 0x0AC5 ) || (c >= 0x0AC7 && c <= 0x0AC9 ) || (c >= 0x0ACB && c <= 0x0ACD ) || (c >= 0x0B01 && c <= 0x0B03 ) || (c == 0x0B3C) || (c >= 0x0B3E && c <= 0x0B43 ) || (c >= 0x0B47 && c <= 0x0B48 ) || (c >= 0x0B4B && c <= 0x0B4D ) || (c >= 0x0B56 && c <= 0x0B57 ) || (c >= 0x0B82 && c <= 0x0B83 ) || (c >= 0x0BBE && c <= 0x0BC2 ) || (c >= 0x0BC6 && c <= 0x0BC8 ) || (c >= 0x0BCA && c <= 0x0BCD ) || (c == 0x0BD7) || (c >= 0x0C01 && c <= 0x0C03 ) || (c >= 0x0C3E && c <= 0x0C44 ) || (c >= 0x0C46 && c <= 0x0C48 ) || (c >= 0x0C4A && c <= 0x0C4D ) || (c >= 0x0C55 && c <= 0x0C56 ) || (c >= 0x0C82 && c <= 0x0C83 ) || (c >= 0x0CBE && c <= 0x0CC4 ) || (c >= 0x0CC6 && c <= 0x0CC8 ) || (c >= 0x0CCA && c <= 0x0CCD ) || (c >= 0x0CD5 && c <= 0x0CD6 ) || (c >= 0x0D02 && c <= 0x0D03 ) || (c >= 0x0D3E && c <= 0x0D43 ) || (c >= 0x0D46 && c <= 0x0D48 ) || (c >= 0x0D4A && c <= 0x0D4D ) || (c == 0x0D57) || (c == 0x0E31) || (c >= 0x0E34 && c <= 0x0E3A ) || (c >= 0x0E47 && c <= 0x0E4E ) || (c == 0x0EB1) || (c >= 0x0EB4 && c <= 0x0EB9 ) || (c >= 0x0EBB && c <= 0x0EBC ) || (c >= 0x0EC8 && c <= 0x0ECD ) || (c >= 0x0F18 && c <= 0x0F19 ) || (c == 0x0F35) || (c == 0x0F37) || (c == 0x0F39) || (c == 0x0F3E) || (c == 0x0F3F) || (c >= 0x0F71 && c <= 0x0F84 ) || (c >= 0x0F86 && c <= 0x0F8B ) || (c >= 0x0F90 && c <= 0x0F95 ) || (c == 0x0F97) || (c >= 0x0F99 && c <= 0x0FAD ) || (c >= 0x0FB1 && c <= 0x0FB7 ) || (c == 0x0FB9) || (c >= 0x20D0 && c <= 0x20DC ) || (c == 0x20E1) || (c >= 0x302A && c <= 0x302F ) || (c == 0x3099) || (c == 0x309A)); } static int raptor_unicode_is_digit(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-Digit */ return((c >= 0x0030 && c <= 0x0039 ) || (c >= 0x0660 && c <= 0x0669 ) || (c >= 0x06F0 && c <= 0x06F9 ) || (c >= 0x0966 && c <= 0x096F ) || (c >= 0x09E6 && c <= 0x09EF ) || (c >= 0x0A66 && c <= 0x0A6F ) || (c >= 0x0AE6 && c <= 0x0AEF ) || (c >= 0x0B66 && c <= 0x0B6F ) || (c >= 0x0BE7 && c <= 0x0BEF ) || (c >= 0x0C66 && c <= 0x0C6F ) || (c >= 0x0CE6 && c <= 0x0CEF ) || (c >= 0x0D66 && c <= 0x0D6F ) || (c >= 0x0E50 && c <= 0x0E59 ) || (c >= 0x0ED0 && c <= 0x0ED9 ) || (c >= 0x0F20 && c <= 0x0F29 )); } static int raptor_unicode_is_extender(long c) { /* http://www.w3.org/TR/2000/REC-xml-20001006#NT-Extender */ return((c == 0x00B7) || (c == 0x02D0) || (c == 0x02D1) || (c == 0x0387) || (c == 0x0640) || (c == 0x0E46) || (c == 0x0EC6) || (c == 0x3005) || (c >= 0x3031 && c <= 0x3035 ) || (c >= 0x309D && c <= 0x309E ) || (c >= 0x30FC && c <= 0x30FE )); } /* * raptor_unicode_check_utf8_nfc_string: * @input: UTF-8 string * @length: length of string * @error: pointer to error flag (or NULL) * * INTERNAL - Check if a Unicode UTF-8 encoded string is in Unicode Normal Form C. * * Return value: Non 0 if the string is in NFC (or an error) **/ int raptor_unicode_check_utf8_nfc_string(const unsigned char *input, size_t length, int *error) { unsigned int i; int plain = 1; for(i = 0; i < length; i++) if(input[i] > 0x7f) { plain = 0; break; } if(plain) return 1; #ifdef RAPTOR_NFC_ICU return raptor_nfc_icu_check(input, length, error); #else if(error) *error = 1; return 1; #endif } /** * raptor_unicode_check_utf8_string: * @string: UTF-8 string * @length: length of string * * Check a string is valid Unicode UTF-8. * * Return value: Non 0 if the string is UTF-8 **/ int raptor_unicode_check_utf8_string(const unsigned char *string, size_t length) { while(length > 0) { raptor_unichar unichar = 0; int unichar_len; unichar_len = raptor_unicode_utf8_string_get_char(string, length, &unichar); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > length) return 0; if(unichar > raptor_unicode_max_codepoint) return 0; string += unichar_len; length -= unichar_len; } return 1; } /** * raptor_unicode_utf8_strlen: * @string: buffer * @length: buffer length * * Calculate the number of Unicode characters in the given UTF-8 encoded buffer * * Return value: number of characters or <0 if sequence is invalid */ int raptor_unicode_utf8_strlen(const unsigned char *string, size_t length) { int unicode_length = 0; while(length > 0) { int unichar_len; unichar_len = raptor_unicode_utf8_string_get_char(string, length, NULL); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > length) { unicode_length = -1; break; } string += unichar_len; length -= unichar_len; unicode_length++; } return unicode_length; } /** * raptor_unicode_utf8_substr: * @dest: destination string buffer to write to (or NULL) * @dest_length_p: location to store actual destination length (or NULL) * @src: source string * @src_length: source length in bytes * @startingLoc: starting location offset 0 for first Unicode character * @length: number of Unicode characters to copy at offset @startingLoc (or < 0) * * Get a unicode (UTF-8) substring of an existing UTF-8 string * * If @dest is NULL, returns the number of bytes needed to write and * does no work. * * Return value: number of bytes used in destination string or 0 on failure */ size_t raptor_unicode_utf8_substr(unsigned char* dest, size_t* dest_length_p, const unsigned char* src, size_t src_length, int startingLoc, int length) { size_t dest_length = 0; /* destination unicode characters count */ size_t dest_bytes = 0; /* destination UTF-8 bytes count */ int dest_offset = 0; /* destination string unicode characters index */ unsigned char* p = dest; if(!src) return 0; while(src_length > 0) { int unichar_len; unichar_len = raptor_unicode_utf8_string_get_char(src, src_length, NULL); if(unichar_len < 0 || RAPTOR_GOOD_CAST(size_t, unichar_len) > src_length) break; if(dest_offset >= startingLoc) { if(p) { /* copy 1 Unicode character to dest */ memcpy(p, src, RAPTOR_GOOD_CAST(size_t, unichar_len)); p += unichar_len; } dest_bytes += unichar_len; dest_length++; if(length >= 0 && dest_length == RAPTOR_GOOD_CAST(size_t, length)) break; } src += unichar_len; src_length -= unichar_len; dest_offset++; } if(p) *p = '\0'; if(dest_length_p) *dest_length_p = dest_length; return dest_bytes; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/src/raptor_avltree.c�����������������������������������������������������������������0000644�0001750�0001750�00000131477�12020170223�014077� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_avltree.c - Balanced Binary Tree / AVL Tree * * This file is in the public domain. * * Based on public domain sources posted to comp.sources.misc in 1993 * * From: p...@vix.com (Paul Vixie) * Newsgroups: comp.sources.unix * Subject: v27i034: REPOST AVL Tree subroutines (replaces v11i020 from 1987), Part01/01 * Date: 6 Sep 1993 13:51:22 -0700 * Message-ID: <1.747348668.4037@gw.home.vix.com> * * ---------------------------------------------------------------------- * Original headers below */ /* as_tree - tree library for as * vix 14dec85 [written] * vix 02feb86 [added tree balancing from wirth "a+ds=p" p. 220-221] * vix 06feb86 [added tree_mung()] * vix 20jun86 [added tree_delete per wirth a+ds (mod2 v.) p. 224] * vix 23jun86 [added delete uar to add for replaced nodes] * vix 22jan93 [revisited; uses RCS, ANSI, POSIX; has bug fixes] */ /* This program text was created by Paul Vixie using examples from the book: * "Algorithms & Data Structures," Niklaus Wirth, Prentice-Hall, 1986, ISBN * 0-13-022005-1. This code and associated documentation is hereby placed * in the public domain. */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* Raptor includes */ #include "raptor2.h" #include "raptor_internal.h" #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 #define RAPTOR_AVLTREE_DEBUG1(msg) RAPTOR_DEBUG1(msg) #else #define RAPTOR_AVLTREE_DEBUG1(msg) #endif #define RAPTOR_AVLTREE_ENOMEM -1 #define RAPTOR_AVLTREE_EXISTS 1 #ifndef STANDALONE /* raptor_avltree.c */ typedef struct raptor_avltree_node_s raptor_avltree_node; /* AVL-tree */ struct raptor_avltree_s { /* root node of tree */ raptor_avltree_node* root; /* node comparison function (optional) */ raptor_data_compare_handler compare_handler; /* node deletion function (optional) */ raptor_data_free_handler free_handler; /* node print function (optional) */ raptor_data_print_handler print_handler; /* tree bitflags - bitmask of #raptor_avltree_bitflags flags */ unsigned int flags; /* number of nodes in tree */ unsigned int size; }; /* AVL-tree node */ struct raptor_avltree_node_s { /* parent tree */ struct raptor_avltree_node_s *parent; /* left child tree */ struct raptor_avltree_node_s *left; /* right child tree */ struct raptor_avltree_node_s *right; /* balance factor = * height of the right tree minus the height of the left tree * i.e. equal: 0 left larger: -1 right larger: 1 */ signed char balance; /* actual data */ void* data; }; #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif /* local prototypes */ static int raptor_avltree_sprout(raptor_avltree* tree, raptor_avltree_node* parent, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p); static void* raptor_avltree_delete_internal(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p); static void* raptor_avltree_delete_internal2(raptor_avltree* tree, raptor_avltree_node** ppr_r, int *rebalancing_p, raptor_avltree_node** ppr_q); static void raptor_avltree_balance_left(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p); static void raptor_avltree_balance_right(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p); static raptor_avltree_node* raptor_avltree_search_internal(raptor_avltree* tree, raptor_avltree_node* node, const void* p_data); static int raptor_avltree_visit_internal(raptor_avltree* tree, raptor_avltree_node* node, int depth, raptor_avltree_visit_handler visit_fn, void* user_data); static void raptor_free_avltree_internal(raptor_avltree* tree, raptor_avltree_node* node); #ifdef RAPTOR_DEBUG static void raptor_avltree_check_internal(raptor_avltree* tree, raptor_avltree_node* node, unsigned int* count_p); #endif /** * raptor_new_avltree: * @compare_handler: item comparison handler for ordering * @free_handler: item free handler (or NULL) * @flags: AVLTree flags - bitmask of #raptor_avltree_bitflags flags. * * AVL Tree Constructor * * Return value: new AVL Tree or NULL on failure */ raptor_avltree* raptor_new_avltree(raptor_data_compare_handler compare_handler, raptor_data_free_handler free_handler, unsigned int flags) { raptor_avltree* tree; tree = RAPTOR_MALLOC(raptor_avltree*, sizeof(*tree)); if(!tree) return NULL; tree->root = NULL; tree->compare_handler = compare_handler; tree->free_handler = free_handler; tree->print_handler = NULL; tree->flags = flags; tree->size = 0; return tree; } /** * raptor_free_avltree: * @tree: AVLTree object * * AVL Tree destructor */ void raptor_free_avltree(raptor_avltree* tree) { if(!tree) return; raptor_free_avltree_internal(tree, tree->root); RAPTOR_FREE(raptor_avltree, tree); } static void raptor_free_avltree_internal(raptor_avltree* tree, raptor_avltree_node* node) { if(node) { raptor_free_avltree_internal(tree, node->left); raptor_free_avltree_internal(tree, node->right); if(tree->free_handler) tree->free_handler(node->data); tree->size--; RAPTOR_FREE(raptor_avltree_node, node); } } /* methods */ static raptor_avltree_node* raptor_avltree_search_internal(raptor_avltree* tree, raptor_avltree_node* node, const void* p_data) { if(node) { int cmp= tree->compare_handler(p_data, node->data); if(cmp > 0) return raptor_avltree_search_internal(tree, node->right, p_data); else if(cmp < 0) return raptor_avltree_search_internal(tree, node->left, p_data); /* found */ return node; } /* otherwise not found */ return NULL; } /** * raptor_avltree_search: * @tree: AVL Tree object * @p_data: pointer to data item * * Find an item in an AVL Tree * * Return value: shared pointer to item (still owned by AVL Tree) or NULL on failure or if not found */ void* raptor_avltree_search(raptor_avltree* tree, const void* p_data) { raptor_avltree_node* node; node = raptor_avltree_search_internal(tree, tree->root, p_data); return node ? node->data : NULL; } /** * raptor_avltree_add: * @tree: AVL Tree object * @p_data: pointer to data item * * add an item to an AVL Tree * * The item added becomes owned by the AVL Tree, and will be freed by * the free_handler argument given to raptor_new_avltree(). * * Return value: 0 on success, >0 if equivalent item exists (and the old element remains in the tree), <0 on failure */ int raptor_avltree_add(raptor_avltree* tree, void* p_data) { int rebalancing = FALSE; int rv; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Checking tree before adding\n"); raptor_avltree_check(tree); #endif rv = raptor_avltree_sprout(tree, NULL, &tree->root, p_data, &rebalancing); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Checking tree after adding\n"); raptor_avltree_check(tree); #endif return rv; } /** * raptor_avltree_remove: * @tree: AVL Tree object * @p_data: pointer to data item * * Remove an item from an AVL Tree and return it * * The item removed is no longer owned by the AVL Tree and is * owned by the caller. * * Return value: object or NULL on failure or if not found */ void* raptor_avltree_remove(raptor_avltree* tree, void* p_data) { int rebalancing = FALSE; void* rdata; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Checking tree before removing\n"); raptor_avltree_dump(tree,stderr); raptor_avltree_check(tree); #endif rdata = raptor_avltree_delete_internal(tree, &tree->root, p_data, &rebalancing); if(rdata) tree->size--; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Checking tree after removing\n"); raptor_avltree_dump(tree,stderr); raptor_avltree_check(tree); #endif return rdata; } /** * raptor_avltree_delete: * @tree: AVL Tree object * @p_data: pointer to data item * * Remove an item from an AVL Tree and free it * * Return value: non-0 on failure */ int raptor_avltree_delete(raptor_avltree* tree, void* p_data) { void* rdata; rdata = raptor_avltree_remove(tree, p_data); if(rdata) { if(tree->free_handler) tree->free_handler(rdata); } return (rdata != NULL); } static int raptor_avltree_visit_internal(raptor_avltree* tree, raptor_avltree_node* node, int depth, raptor_avltree_visit_handler visit_handler, void* user_data) { if(!node) return TRUE; if(!raptor_avltree_visit_internal(tree, node->left, depth+1, visit_handler, user_data)) return FALSE; if(!visit_handler(depth, node->data, user_data)) return FALSE; if(!raptor_avltree_visit_internal(tree, node->right, depth+1, visit_handler, user_data)) return FALSE; return TRUE; } /** * raptor_avltree_visit: * @tree: AVL Tree object * @visit_handler: visit function to call at each item * @user_data: user data pointer fo visit function * * Perform an in-order visit of the items in the AVL Tree * * Return value: non-0 if traversal was terminated early by @visit_handler */ int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data) { return raptor_avltree_visit_internal(tree, tree->root, 0, visit_handler, user_data); } #ifdef RAPTOR_DEBUG static void raptor_avltree_print_node(raptor_avltree_node* node) { fprintf(stderr, "%p: parent %p left %p right %p data %p", node, node->parent, node->left, node->right, node->data); } static void raptor_avltree_check_node(raptor_avltree* tree, raptor_avltree_node* node, const char* fn, const char* where) { if(node->parent) { if((node->parent == node->left) || (node->parent == node->right)) { if(fn && where) fprintf(stderr, "%s (%s): ", fn, where); fputs("ERROR bad node ", stderr); raptor_avltree_print_node(node); fputc('\n', stderr); fflush(stderr); abort(); } if(node->parent->left != node && node->parent->right != node) { if(fn && where) fprintf(stderr, "%s (%s): ", fn, where); fputs("ERROR parent node ", stderr); raptor_avltree_print_node(node->parent); fputs(" has no reference to child node ", stderr); raptor_avltree_print_node(node); fputc('\n', stderr); fflush(stderr); abort(); } } if(node->left) { if(node->left->parent != node) { if(fn && where) fprintf(stderr, "%s (%s): ", fn, where); fputs("ERROR left child node ", stderr); raptor_avltree_print_node(node->left); fputs(" has no reference to this[parent] node ", stderr); raptor_avltree_print_node(node); fputc('\n', stderr); fflush(stderr); abort(); } } if(node->right) { if(node->right->parent != node) { if(fn && where) fprintf(stderr, "%s (%s): ", fn, where); fputs("ERROR right child node ", stderr); raptor_avltree_print_node(node->right); fputs(" has no reference to this[parent] node ", stderr); raptor_avltree_print_node(node); fputc('\n', stderr); fflush(stderr); abort(); } } } #endif static int raptor_avltree_sprout_left(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int rc; RAPTOR_AVLTREE_DEBUG1("LESS. raptor_avltree_sprouting left.\n"); p_parent = (*node_pp)->parent; rc = raptor_avltree_sprout(tree, *node_pp, &(*node_pp)->left, p_data, rebalancing_p); if(rc) return rc; if(!*rebalancing_p) return FALSE; /* left branch has grown longer */ RAPTOR_AVLTREE_DEBUG1("LESS: left branch has grown\n"); switch((*node_pp)->balance) { case 1: /* right branch WAS longer; balance is ok now */ RAPTOR_AVLTREE_DEBUG1("LESS: case 1.. balance restored implicitly\n"); (*node_pp)->balance = 0; *rebalancing_p = FALSE; break; case 0: /* balance WAS okay; now left branch longer */ RAPTOR_AVLTREE_DEBUG1("LESS: case 0.. balance bad but still ok\n"); (*node_pp)->balance = -1; break; case -1: /* left branch was already too long. rebalance */ RAPTOR_AVLTREE_DEBUG1("LESS: case -1: rebalancing\n"); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Tree before rebalancing\n"); raptor_avltree_dump(tree, stderr); #endif p1 = (*node_pp)->left; if(p1->balance == -1) { /* LL */ RAPTOR_AVLTREE_DEBUG1("LESS: single LL\n"); (*node_pp)->left = p1->right; if((*node_pp)->left) (*node_pp)->left->parent = (*node_pp); p1->right = *node_pp; if(p1->right) p1->right->parent = p1; (*node_pp)->balance = 0; *node_pp = p1; (*node_pp)->parent = p_parent; } else { /* double LR */ RAPTOR_AVLTREE_DEBUG1("LESS: double LR\n"); p2 = p1->right; p1->right= p2->left; if(p1->right) p1->right->parent = p1; p2->left = p1; if(p2->left) p2->left->parent = p2; (*node_pp)->left = p2->right; if((*node_pp)->left) (*node_pp)->left->parent = (*node_pp); p2->right = *node_pp; if(p2->right) p2->right->parent = p2; if(p2->balance == -1) (*node_pp)->balance = 1; else (*node_pp)->balance = 0; if(p2->balance == 1) p1->balance = -1; else p1->balance = 0; *node_pp = p2; (*node_pp)->parent = p_parent; } /* end else */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Tree after rebalancing\n"); raptor_avltree_dump(tree, stderr); #endif (*node_pp)->balance = 0; *rebalancing_p = FALSE; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 if(1) { unsigned int discard = 0; raptor_avltree_check_internal(tree, *node_pp, &discard); } #endif } /* end switch */ return FALSE; } static int raptor_avltree_sprout_right(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int rc; RAPTOR_AVLTREE_DEBUG1("MORE: raptor_avltree_sprouting to the right\n"); p_parent = (*node_pp)->parent; rc = raptor_avltree_sprout(tree, *node_pp, &(*node_pp)->right, p_data, rebalancing_p); if(rc) return rc; if(!*rebalancing_p) return FALSE; /* right branch has grown longer */ RAPTOR_AVLTREE_DEBUG1("MORE: right branch has grown\n"); switch((*node_pp)->balance) { case -1: RAPTOR_AVLTREE_DEBUG1("MORE: balance was off, fixed implicitly\n"); (*node_pp)->balance = 0; *rebalancing_p = FALSE; break; case 0: RAPTOR_AVLTREE_DEBUG1("MORE: balance was okay, now off but ok\n"); (*node_pp)->balance = 1; break; case 1: RAPTOR_AVLTREE_DEBUG1("MORE: balance was off, need to rebalance\n"); p1 = (*node_pp)->right; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Tree before rebalancing\n"); raptor_avltree_dump(tree, stderr); #endif if(p1->balance == 1) { /* RR */ RAPTOR_AVLTREE_DEBUG1("MORE: single RR\n"); (*node_pp)->right = p1->left; if((*node_pp)->right) (*node_pp)->right->parent = (*node_pp); p1->left = *node_pp; if(p1->left) p1->left->parent = p1; (*node_pp)->balance = 0; *node_pp = p1; (*node_pp)->parent = p_parent; } else { /* double RL */ RAPTOR_AVLTREE_DEBUG1("MORE: double RL\n"); p2 = p1->left; p1->left = p2->right; if(p1->left) p1->left->parent = p1; p2->right = p1; if(p2->right) p2->right->parent = p2; (*node_pp)->right = p2->left; if((*node_pp)->right) (*node_pp)->right->parent = (*node_pp); p2->left = *node_pp; if(p2->left) p2->left->parent = p2; if(p2->balance == 1) (*node_pp)->balance = -1; else (*node_pp)->balance = 0; if(p2->balance == -1) p1->balance = 1; else p1->balance = 0; *node_pp = p2; (*node_pp)->parent = p_parent; } /* end else */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Tree after rebalancing\n"); raptor_avltree_dump(tree, stderr); #endif (*node_pp)->balance = 0; *rebalancing_p = FALSE; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 if(1) { unsigned int discard = 0; raptor_avltree_check_internal(tree, *node_pp, &discard); } #endif } /* end switch */ return FALSE; } /* grow a tree by sprouting with a new node * * Return values: * 0 on success * >0 if equivalent item exists (and the old element remains in the tree) * <0 if memory is exhausted. */ static int raptor_avltree_sprout(raptor_avltree* tree, raptor_avltree_node* parent, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { int cmp; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_AVLTREE_DEBUG1("Enter\n"); if ( *node_pp) { raptor_avltree_print_node(*node_pp); RAPTOR_AVLTREE_DEBUG1("\n"); } else { RAPTOR_AVLTREE_DEBUG1("Nil node\n"); } #endif /* If grounded, add the node here, set the rebalance flag and return */ if(!*node_pp) { RAPTOR_AVLTREE_DEBUG1("grounded. adding new node, setting rebalancing flag true\n"); *node_pp = RAPTOR_MALLOC(raptor_avltree_node*, sizeof(**node_pp)); if(!*node_pp) { if(tree->free_handler) tree->free_handler(p_data); return RAPTOR_AVLTREE_ENOMEM; } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 RAPTOR_DEBUG2("Creating new node %p\n", *node_pp); #endif (*node_pp)->parent = parent; (*node_pp)->left = NULL; (*node_pp)->right = NULL; (*node_pp)->balance = 0; (*node_pp)->data= p_data; *rebalancing_p = TRUE; tree->size++; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 raptor_avltree_check_node(tree, *node_pp, 0, 0); RAPTOR_AVLTREE_DEBUG1("Tree now looks this way\n"); raptor_avltree_dump(tree,stderr); #endif return FALSE; } /* check node */ #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 raptor_avltree_check_node(tree, *node_pp, 0, 0); #endif /* compare the data */ cmp = tree->compare_handler(p_data, (*node_pp)->data); if(cmp < 0) /* if LESS, prepare to move to the left. */ return raptor_avltree_sprout_left(tree, node_pp, p_data, rebalancing_p); else if(cmp > 0) /* if MORE, prepare to move to the right. */ return raptor_avltree_sprout_right(tree, node_pp, p_data, rebalancing_p); /* otherwise equivalent key */ *rebalancing_p = FALSE; if(tree->flags & RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES) { /* replace item with equivalent key */ if(tree->free_handler) tree->free_handler((*node_pp)->data); (*node_pp)->data= p_data; return FALSE; } else { /* ignore item with equivalent key */ if(tree->free_handler) tree->free_handler(p_data); return RAPTOR_AVLTREE_EXISTS; } } static void* raptor_avltree_delete_internal(raptor_avltree* tree, raptor_avltree_node** node_pp, void* p_data, int *rebalancing_p) { int cmp; void* rdata = NULL; RAPTOR_AVLTREE_DEBUG1("Enter\n"); if(*node_pp == NULL) { RAPTOR_AVLTREE_DEBUG1("key not in tree\n"); return rdata; } cmp = tree->compare_handler((*node_pp)->data, p_data); if(cmp > 0) { RAPTOR_AVLTREE_DEBUG1("too high - scan left\n"); rdata = raptor_avltree_delete_internal(tree, &(*node_pp)->left, p_data, rebalancing_p); if(*rebalancing_p) raptor_avltree_balance_left(tree, node_pp, rebalancing_p); } else if(cmp < 0) { RAPTOR_AVLTREE_DEBUG1("too low - scan right\n"); rdata = raptor_avltree_delete_internal(tree, &(*node_pp)->right, p_data, rebalancing_p); if(*rebalancing_p) raptor_avltree_balance_right(tree, node_pp, rebalancing_p); } else { raptor_avltree_node *pr_q; RAPTOR_AVLTREE_DEBUG1("equal\n"); pr_q = *node_pp; rdata = pr_q->data; if(pr_q->right == NULL) { RAPTOR_AVLTREE_DEBUG1("right subtree null\n"); *node_pp = pr_q->left; if(*node_pp) (*node_pp)->parent = pr_q->parent; *rebalancing_p = TRUE; } else if(pr_q->left == NULL) { RAPTOR_AVLTREE_DEBUG1("right subtree non-null, left subtree null\n"); *node_pp = pr_q->right; if(*node_pp) (*node_pp)->parent = pr_q->parent; *rebalancing_p = TRUE; } else { RAPTOR_AVLTREE_DEBUG1("neither subtree null\n"); rdata = raptor_avltree_delete_internal2(tree, &pr_q->left, rebalancing_p, &pr_q); if(*rebalancing_p) raptor_avltree_balance_left(tree, node_pp, rebalancing_p); } RAPTOR_FREE(raptor_avltree_node, pr_q); } return rdata; } static void* raptor_avltree_delete_internal2(raptor_avltree* tree, raptor_avltree_node** ppr_r, int *rebalancing_p, raptor_avltree_node** ppr_q) { void* rdata = NULL; RAPTOR_AVLTREE_DEBUG1("Enter\n"); if((*ppr_r)->right != NULL) { rdata = raptor_avltree_delete_internal2(tree, &(*ppr_r)->right, rebalancing_p, ppr_q); if(*rebalancing_p) raptor_avltree_balance_right(tree, ppr_r, rebalancing_p); } else { raptor_avltree_node* ppr_r_left_new_parent; rdata = (*ppr_q)->data; (*ppr_q)->data = (*ppr_r)->data; *ppr_q = *ppr_r; ppr_r_left_new_parent = (*ppr_r)->parent; *ppr_r = (*ppr_r)->left; if(*ppr_r) (*ppr_r)->parent = ppr_r_left_new_parent; *rebalancing_p = TRUE; } return rdata; } static void raptor_avltree_balance_left(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int b1, b2; RAPTOR_AVLTREE_DEBUG1("left branch has shrunk\n"); p_parent = (*node_pp)->parent; switch((*node_pp)->balance) { case -1: RAPTOR_AVLTREE_DEBUG1("was imbalanced, fixed implicitly\n"); (*node_pp)->balance = 0; break; case 0: RAPTOR_AVLTREE_DEBUG1("was okay, is now one off\n"); (*node_pp)->balance = 1; *rebalancing_p = FALSE; break; case 1: RAPTOR_AVLTREE_DEBUG1("was already off, this is too much\n"); p1 = (*node_pp)->right; b1 = p1->balance; if(b1 >= 0) { RAPTOR_AVLTREE_DEBUG1("single RR\n"); (*node_pp)->right = p1->left; if((*node_pp)->right) (*node_pp)->right->parent = (*node_pp); p1->left = *node_pp; if(p1->left) p1->left->parent = p1; if(b1 == 0) { RAPTOR_AVLTREE_DEBUG1("b1 == 0\n"); (*node_pp)->balance = 1; p1->balance = -1; *rebalancing_p = FALSE; } else { RAPTOR_AVLTREE_DEBUG1("b1 != 0\n"); (*node_pp)->balance = 0; p1->balance = 0; } *node_pp = p1; (*node_pp)->parent = p_parent; } else { RAPTOR_AVLTREE_DEBUG1("double RL\n"); p2 = p1->left; b2 = p2->balance; p1->left = p2->right; if(p1->left) p1->left->parent = p1; p2->right = p1; if(p2->right) p2->right->parent = p2; (*node_pp)->right = p2->left; if((*node_pp)->right) (*node_pp)->right->parent = (*node_pp); p2->left = *node_pp; if(p2->left) p2->left->parent = p2; if(b2 == 1) (*node_pp)->balance = -1; else (*node_pp)->balance = 0; if(b2 == -1) p1->balance = 1; else p1->balance = 0; *node_pp = p2; (*node_pp)->parent = p_parent; p2->balance = 0; } break; } /* end switch */ } static void raptor_avltree_balance_right(raptor_avltree* tree, raptor_avltree_node** node_pp, int *rebalancing_p) { raptor_avltree_node *p1, *p2, *p_parent; int b1, b2; RAPTOR_AVLTREE_DEBUG1("right branch has shrunk\n"); p_parent = (*node_pp)->parent; switch((*node_pp)->balance) { case 1: RAPTOR_AVLTREE_DEBUG1("was imbalanced, fixed implicitly\n"); (*node_pp)->balance = 0; break; case 0: RAPTOR_AVLTREE_DEBUG1("was okay, is now one off\n"); (*node_pp)->balance = -1; *rebalancing_p = FALSE; break; case -1: RAPTOR_AVLTREE_DEBUG1("was already off, this is too much\n"); p1 = (*node_pp)->left; b1 = p1->balance; if(b1 <= 0) { RAPTOR_AVLTREE_DEBUG1("single LL\n"); (*node_pp)->left = p1->right; if((*node_pp)->left) (*node_pp)->left->parent = (*node_pp); p1->right = *node_pp; if(p1->right) p1->right->parent = p1; if(b1 == 0) { RAPTOR_AVLTREE_DEBUG1("b1 == 0\n"); (*node_pp)->balance = -1; p1->balance = 1; *rebalancing_p = FALSE; } else { RAPTOR_AVLTREE_DEBUG1("b1 != 0\n"); (*node_pp)->balance = 0; p1->balance = 0; } *node_pp = p1; (*node_pp)->parent = p_parent; } else { RAPTOR_AVLTREE_DEBUG1("double LR\n"); p2 = p1->right; b2 = p2->balance; p1->right = p2->left; if(p1->right) p1->right->parent = p1; p2->left = p1; if(p2->left) p2->left->parent = p2; (*node_pp)->left = p2->right; if((*node_pp)->left) (*node_pp)->left->parent = (*node_pp); p2->right = *node_pp; if(p2->right) p2->right->parent = p2; if(b2 == -1) (*node_pp)->balance = 1; else (*node_pp)->balance = 0; if(b2 == 1) p1->balance = -1; else p1->balance = 0; *node_pp = p2; (*node_pp)->parent = p_parent; p2->balance = 0; } } /* end switch */ } /** * raptor_avltree_size: * @tree: AVL Tree object * * Get the number of items in the AVL Tree * * Return value: number of items in tree */ int raptor_avltree_size(raptor_avltree* tree) { return tree->size; } /** * raptor_avltree_set_print_handler: * @tree: AVL Tree object * @print_handler: print function * * Set the handler for printing an item in a tree * */ void raptor_avltree_set_print_handler(raptor_avltree* tree, raptor_data_print_handler print_handler) { tree->print_handler = print_handler; } /* Follow left children until a match for range is found (if range not NULL) */ static raptor_avltree_node* raptor_avltree_node_leftmost(raptor_avltree* tree, raptor_avltree_node* node, void* range) { /*assert(node); assert(!range || tree->compare_handler(range, node->data) == 0);*/ if(range) while(node && node->left && tree->compare_handler(range, node->left->data) == 0) node = node->left; else while(node && node->left) node = node->left; return node; } static raptor_avltree_node* raptor_avltree_node_rightmost(raptor_avltree* tree, raptor_avltree_node* node, void* range) { /*assert(node); assert(!range || tree->compare_handler(range, node->data) == 0);*/ if(range) while(node && node->right && tree->compare_handler(range, node->right->data) == 0) node = node->right; else while(node && node->right) node = node->right; return node; } /* Follow right children until a match for range is found (range required) */ static raptor_avltree_node* raptor_avltree_node_search_right(raptor_avltree* tree, raptor_avltree_node* node, void* range) { raptor_avltree_node* result; if(!node) return NULL; result = node->right; while(result) { if(tree->compare_handler(range, result->data) == 0) { return result; } else { result = result->right; } } return node; } /* Follow left children until a match for range is found (range required) */ static raptor_avltree_node* raptor_avltree_node_search_left(raptor_avltree* tree, raptor_avltree_node* node, void* range) { raptor_avltree_node* result; if(!node) return NULL; result = node->left; while(result) { if(tree->compare_handler(range, result->data) == 0) { return result; } else { result = result->left; } } return node; } static raptor_avltree_node* raptor_avltree_node_prev(raptor_avltree* tree, raptor_avltree_node* node, void* range) { int up = 0; /*assert(!range || tree->compare_handler(range, node->data) == 0);*/ if(node->left) { /* Should never go left if the current node is already < range */ raptor_avltree_node* prev; prev = raptor_avltree_node_rightmost(tree, node->left, NULL); /*assert(!range ||tree->compare_handler(range, node->data) <= 0);*/ if(range) { if(tree->compare_handler(range, prev->data) == 0) { up = 0; node = prev; } else { up = 1; } } else { node = prev; up = 0; } } else { up = 1; } if(up) { raptor_avltree_node* last = node; /* Need to go up */ node = node->parent; while(node) { /* moving from right subtree to this node */ if(node->right && last == node->right) { break; } /* moved up to find an unvisited left subtree */ if(node->left && last != node->left) { /* Should never go left if the current node is already > range */ /*assert(!range ||tree->compare_handler(range, node->data) <= 0);*/ node = raptor_avltree_node_rightmost(tree, node->left, range); break; } last = node; node = node->parent; } } if(node && range) { if(tree->compare_handler(range, node->data) == 0) return node; else return NULL; } else { return node; } } /* Follow right children until a match for range is found (if range not NULL) */ static raptor_avltree_node* raptor_avltree_node_next(raptor_avltree* tree, raptor_avltree_node* node, void* range) { int up = 0; /*assert(!range || tree->compare_handler(range, node->data) == 0);*/ if(node->right) { /* Should never go right if the current node is already > range */ raptor_avltree_node* next; next = raptor_avltree_node_leftmost(tree, node->right, NULL); /*assert(!range ||tree->compare_handler(range, node->data) <= 0);*/ if(range) { if(tree->compare_handler(range, next->data) == 0) { up = 0; node = next; } else { up = 1; } } else { node = next; up = 0; } } else { up = 1; } if(up) { raptor_avltree_node* last = node; /* Need to go up */ node = node->parent; while(node) { /* moving from left subtree to this node */ if(node->left && last == node->left) { break; } /* moved up to find an unvisited right subtree */ if(node->right && last != node->right) { /* Should never go right if the current node is already > range */ /*assert(!range ||tree->compare_handler(range, node->data) <= 0);*/ node = raptor_avltree_node_leftmost(tree, node->right, range); break; } last = node; node = node->parent; } } if(node && range) { if(tree->compare_handler(range, node->data) == 0) return node; else return NULL; } else { return node; } } struct raptor_avltree_iterator_s { raptor_avltree* tree; raptor_avltree_node* root; raptor_avltree_node* current; void* range; raptor_data_free_handler range_free_handler; int direction; int is_finished; }; /** * raptor_new_avltree_iterator: * @tree: #raptor_avltree object * @range: range * @range_free_handler: function to free @range object * @direction: <0 to go 'backwards' otherwise 'forwards' * * Get an in-order iterator for the start of a range, or the entire contents * * If range is NULL, the entire tree is walked in order. If range * specifies a range (i.e. the tree comparison function will 'match' * (return 0 for) range and /several/ nodes), the iterator will be * placed at the leftmost child matching range, and * raptor_avltree_iterator_next will iterate over all nodes (and only * nodes) that match range. * * Return value: a new #raptor_avltree_iterator object or NULL on failure **/ raptor_avltree_iterator* raptor_new_avltree_iterator(raptor_avltree* tree, void* range, raptor_data_free_handler range_free_handler, int direction) { raptor_avltree_iterator* iterator; iterator = RAPTOR_CALLOC(raptor_avltree_iterator*, 1, sizeof(*iterator)); if(!iterator) return NULL; iterator->is_finished = 0; iterator->current = NULL; iterator->tree = tree; iterator->range = range; iterator->range_free_handler = range_free_handler; iterator->direction = direction; if(range) { /* find the topmost match (range is contained entirely in tree * rooted here) */ iterator->current = raptor_avltree_search_internal(tree, tree->root, range); } else { iterator->current = tree->root; } iterator->root = iterator->current; if(iterator->current) { if(iterator->direction < 0) { /* go down to find END of range (or tree) */ while(1) { raptor_avltree_node* pred; iterator->current = raptor_avltree_node_rightmost(tree, iterator->current, range); /* move left until a match is found */ pred = raptor_avltree_node_search_left(tree, iterator->current->right, range); if(pred && tree->compare_handler(range, pred->data) == 0) iterator->current = pred; else break; } } else { /* go down to find START of range (or tree) */ while(1) { raptor_avltree_node* pred; iterator->current = raptor_avltree_node_leftmost(tree, iterator->current, range); /* move right until a match is found */ pred = raptor_avltree_node_search_right(tree, iterator->current->left, range); if(pred && tree->compare_handler(range, pred->data) == 0) iterator->current = pred; else break; } } } return iterator; } /** * raptor_free_avltree_iterator: * @iterator: AVL Tree iterator object * * AVL Tree Iterator destructor */ void raptor_free_avltree_iterator(raptor_avltree_iterator* iterator) { if(!iterator) return; if(iterator->range && iterator->range_free_handler) iterator->range_free_handler(iterator->range); RAPTOR_FREE(raptor_avltree_iterator, iterator); } /** * raptor_avltree_iterator_is_end: * @iterator: AVL Tree iterator object * * Test if an iteration is finished * * Return value: non-0 if iteration is finished */ int raptor_avltree_iterator_is_end(raptor_avltree_iterator* iterator) { raptor_avltree_node *node = iterator->current; if(iterator->is_finished) return 1; iterator->is_finished = (node == NULL); return iterator->is_finished; } /** * raptor_avltree_iterator_next: * @iterator: AVL Tree iterator object * * Move iteration to next/prev object * * Return value: non-0 if iteration is finished */ int raptor_avltree_iterator_next(raptor_avltree_iterator* iterator) { raptor_avltree_node *node = iterator->current; if(!node || iterator->is_finished) return 1; if(iterator->direction < 0) iterator->current = raptor_avltree_node_prev(iterator->tree, node, iterator->range); else iterator->current = raptor_avltree_node_next(iterator->tree, node, iterator->range); /* Stay within rooted subtree */ if(iterator->root->parent == iterator->current) iterator->current = NULL; iterator->is_finished = (iterator->current == NULL); return iterator->is_finished; } /** * raptor_avltree_iterator_get: * @iterator: AVL Tree iterator object * * Get current iteration object * * Return value: object or NULL if iteration is finished */ void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator) { raptor_avltree_node *node = iterator->current; if(iterator->is_finished) return NULL; iterator->is_finished = (node == NULL); if(iterator->is_finished) return NULL; return node->data; } /** * raptor_avltree_print: * @tree: AVL Tree * @stream: stream to print to * * Print the items in the tree in order to a stream (for debugging) * * Return value: non-0 on failure */ int raptor_avltree_print(raptor_avltree* tree, FILE* stream) { int i; int rv = 0; raptor_avltree_iterator* iter = NULL; fprintf(stream, "AVL Tree size %u\n", tree->size); for(i = 0, (iter = raptor_new_avltree_iterator(tree, NULL, NULL, 1)); iter && !rv; i++, (rv = raptor_avltree_iterator_next(iter))) { void* data = raptor_avltree_iterator_get(iter); if(!data) continue; fprintf(stream, "%d) ", i); if(tree->print_handler) tree->print_handler(data, stream); else fprintf(stream, "Data Node %p\n", data); } /*assert(i == tree->size);*/ if(iter) raptor_free_avltree_iterator(iter); return 0; } #ifdef RAPTOR_DEBUG static int raptor_avltree_dump_internal(raptor_avltree* tree, raptor_avltree_node* node, int depth, FILE* stream) { int i; if(!node) return TRUE; for(i = 0; i < depth; i++) fputs(" ", stream); fprintf(stream, "Node %p: parent %p left %p right %p data %p\n", node, node->parent, node->left, node->right, node->data); if(tree->print_handler) { for(i= 0; i < depth; i++) fputs(" ", stream); tree->print_handler(node->data, stream); } if(!raptor_avltree_dump_internal(tree, node->left, depth+1, stream)) return FALSE; if(!raptor_avltree_dump_internal(tree, node->right, depth+1, stream)) return FALSE; return TRUE; } /* debugging tree dump with pointers and depth indenting */ int raptor_avltree_dump(raptor_avltree* tree, FILE* stream) { fprintf(stream, "Dumping avltree %p size %u\n", tree, tree->size); return raptor_avltree_dump_internal(tree, tree->root, 0, stream); } static void raptor_avltree_check_internal(raptor_avltree* tree, raptor_avltree_node* node, unsigned int* count_p) { if(!node) return; (*count_p)++; raptor_avltree_check_node(tree, node, NULL, NULL); raptor_avltree_check_internal(tree, node->left, count_p); raptor_avltree_check_internal(tree, node->right, count_p); } /* debugging tree check - parent/child pointers and counts */ void raptor_avltree_check(raptor_avltree* tree) { unsigned int count = 0; raptor_avltree_check_internal(tree, tree->root, &count); if(count != tree->size) { fprintf(stderr, "Tree %p nodes count is %u. actual count %d\n", tree, tree->size, count); abort(); } } #endif #endif #ifdef STANDALONE #include <string.h> typedef struct { FILE *fh; int count; const char** results; int failed; } visit_state; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 static int print_string(int depth, void* data, void *user_data) { visit_state* vs = (visit_state*)user_data; fprintf(vs->fh, "%3d: %s\n", vs->count, (char*) data); vs->count++; return 1; } #endif static int check_string(int depth, void* data, void *user_data) { visit_state* vs = (visit_state*)user_data; const char* result = vs->results[vs->count]; if(strcmp((const char*)data, result)) { fprintf(vs->fh, "%3d: Expected '%s' but found '%s'\n", vs->count, result, (char*)data); vs->failed = 1; } vs->count++; return 1; } static int compare_strings(const void *l, const void *r) { return strcmp((const char*)l, (const char*)r); } /* one more prototype */ int main(int argc, char *argv[]); int main(int argc, char *argv[]) { raptor_world *world; const char *program = raptor_basename(argv[0]); #define ITEM_COUNT 8 const char *items[ITEM_COUNT+1] = { "ron", "amy", "jen", "bij", "jib", "daj", "jim", "def", NULL }; #define DELETE_COUNT 2 const char *delete_items[DELETE_COUNT+1] = { "jen", "jim", NULL }; #define RESULT_COUNT (ITEM_COUNT-DELETE_COUNT) const char *results[RESULT_COUNT+1] = { "amy", "bij", "daj", "def", "jib", "ron", NULL}; raptor_avltree* tree; raptor_avltree_iterator* iter; visit_state vs; int i; world = raptor_new_world(); if(!world || raptor_world_open(world)) exit(1); tree = raptor_new_avltree(compare_strings, NULL, /* no free as they are static pointers above */ 0); if(!tree) { fprintf(stderr, "%s: Failed to create tree\n", program); exit(1); } for(i = 0; items[i]; i++) { int rc; void* node; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Adding tree item '%s'\n", program, items[i]); #endif rc = raptor_avltree_add(tree, (void*)items[i]); if(rc) { fprintf(stderr, "%s: Adding tree item %d '%s' failed, returning error %d\n", program, i, items[i], rc); exit(1); } #ifdef RAPTOR_DEBUG raptor_avltree_check(tree); #endif node = raptor_avltree_search(tree, (void*)items[i]); if(!node) { fprintf(stderr, "%s: Tree did NOT contain item %d '%s' as expected\n", program, i, items[i]); exit(1); } } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Printing tree\n", program); vs.fh = stderr; vs.count = 0; raptor_avltree_visit(tree, print_string, &vs); fprintf(stderr, "%s: Dumping tree\n", program); raptor_avltree_dump(tree, stderr); #endif for(i = 0; delete_items[i]; i++) { int rc; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Deleting tree item '%s'\n", program, delete_items[i]); #endif rc = raptor_avltree_delete(tree, (void*)delete_items[i]); if(!rc) { fprintf(stderr, "%s: Deleting tree item %d '%s' failed, returning error %d\n", program, i, delete_items[i], rc); exit(1); } #ifdef RAPTOR_DEBUG raptor_avltree_check(tree); #endif } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Walking tree forwards via iterator\n", program); #endif iter = raptor_new_avltree_iterator(tree, NULL, NULL, 1); for(i = 0; 1; i++) { const char* data = (const char*)raptor_avltree_iterator_get(iter); const char* result = results[i]; if((!data && data != result) || (data && strcmp(data, result))) { fprintf(stderr, "%3d: Forwards iterator expected '%s' but found '%s'\n", i, result, data); exit(1); } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%3d: Got '%s'\n", i, data); #endif if(raptor_avltree_iterator_next(iter)) break; if(i > RESULT_COUNT) { fprintf(stderr, "Forward iterator did not end on result %i as expected\n", i); exit(1); } } raptor_free_avltree_iterator(iter); #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Checking tree\n", program); #endif vs.count = 0; vs.results = results; vs.failed = 0; raptor_avltree_visit(tree, check_string, &vs); if(vs.failed) { fprintf(stderr, "%s: Checking tree failed\n", program); exit(1); } for(i = 0; results[i]; i++) { const char* result = results[i]; char* data = (char*)raptor_avltree_remove(tree, (void*)result); if(!data) { fprintf(stderr, "%s: remove %i failed at item '%s'\n", program, i, result); exit(1); } if(strcmp(data, result)) { fprintf(stderr, "%s: remove %i returned %s not %s as expected\n", program, i, data, result); exit(1); } } #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "%s: Freeing tree\n", program); #endif raptor_free_avltree(tree); raptor_free_world(world); /* keep gcc -Wall happy */ return(0); } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/autogen.sh���������������������������������������������������������������������������0000755�0001750�0001750�00000024530�12302675544�012126� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # # autogen.sh - Generates initial makefiles from a pristine source tree # # USAGE: # autogen.sh [configure options] # # Configuration is affected by environment variables as follows: # # DRYRUN # If set to any value it will do no configuring but will emit the # programs that would be run. # e.g. DRYRUN=1 ./autogen.sh # # NOCONFIGURE # If set to any value it will generate all files but not invoke the # generated configure script. # e.g. NOCONFIGURE=1 ./autogen.sh # # AUTOMAKE ACLOCAL AUTOCONF AUTOHEADER LIBTOOLIZE GTKDOCIZE # If set (named after program) then this overrides any searching for # the programs on the current PATH. # e.g. AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 ./autogen.sh # # CONFIG_DIR (default ../config) # The directory where fresh GNU config.guess and config.sub can be # found for automatic copying in-place. # # PATH # Where the programs are searched for # # SRCDIR (default .) # Source directory # # This script is based on similar scripts used in various tools # commonly made available via CVS and used with GNU automake. # Try 'locate autogen.sh' on your system and see what you get. # # This script is in the public domain # # Directory for the sources SRCDIR=${SRCDIR-.} # Where the GNU config.sub, config.guess might be found CONFIG_DIR=${CONFIG_DIR-../config} # GIT sub modules file GITMODULES='.gitmodules' # The programs required for configuring which will be searched for # in the current PATH. # Set an envariable of the same name in uppercase, to override scan # programs="automake aclocal autoconf autoheader libtoolize" confs=`find . -name configure.ac -print | grep -v /releases/` gtkdoc_args= if grep "^GTK_DOC_CHECK" $confs >/dev/null; then programs="$programs gtkdocize" gtkdoc_args="--enable-gtk-doc" fi if grep "^AC_CHECK_PROGS.SWIG" $confs >/dev/null; then programs="$programs swig" fi ltdl_args= if grep "^AC_LIBLTDL_" $confs >/dev/null; then ltdl_args="--ltdl" fi silent_args= if grep "^AM_SILENT_RULES" $confs >/dev/null; then silent_args="--enable-silent-rules" fi # Some dependencies for autotools: # automake 1.13 requires autoconf 2.65 # automake 1.12 requires autoconf 2.62 # automake 1.11 requires autoconf 2.62 (needed for AM_SILENT_RULES) automake_min_vers=011102 aclocal_min_vers=$automake_min_vers autoconf_min_vers=026200 autoheader_min_vers=$autoconf_min_vers # libtool 2.2 required for LT_INIT language fix libtoolize_min_vers=020200 gtkdocize_min_vers=010300 swig_min_vers=010324 # Default program arguments automake_args="--gnu --add-missing --force --copy -Wall" aclocal_args="-Wall" autoconf_args="-Wall" libtoolize_args="--force --copy --automake $ltdl_args" gtkdocize_args="--copy" # --enable-gtk-doc does no harm if it's not available configure_args="--enable-maintainer-mode $gtkdoc_args $silent_args" # You should not need to edit below here ###################################################################### # number comparisons may need a C locale LANG=C LC_NUMERIC=C program=`basename $0` if test "X$DRYRUN" != X; then DRYRUN=echo fi cat > autogen-get-version.pl <<EOF use File::Basename; my \$prog=basename \$0; die "\$prog: USAGE PATH PROGRAM-NAME\n e.g. \$prog /usr/bin/foo-123 foo\n" unless @ARGV==2; my(\$path,\$name)=@ARGV; exit 0 if !-f \$path; die "\$prog: \$path not found\n" if !-r \$path; my \$mname=\$name; \$mname =~ s/^g(libtoolize)\$/\$1/; my(@vnums); for my \$varg (qw(--version -version)) { my \$cmd="\$path \$varg"; open(PIPE, "\$cmd 2>&1 |") || next; while(<PIPE>) { chomp; next if @vnums; # drain pipe if we got a vnums next unless /^\$mname/i; my(\$v)=/(\S+)\$/i; \$v =~ s/-.*\$//; @vnums=grep { defined \$_ && !/^\s*\$/} map { s/\D//g; \$_; } split(/\./, \$v); } close(PIPE); last if @vnums; } @vnums=(@vnums, 0, 0, 0)[0..2]; \$vn=join('', map { sprintf('%02d', \$_) } @vnums); print "\$vn\n"; exit 0; EOF autogen_get_version="`pwd`/autogen-get-version.pl" trap "rm -f $autogen_get_version" 0 1 9 15 update_prog_version() { dir=$1 prog=$2 # If there exists an envariable PROG in uppercase, use that and do not scan ucprog=`echo $prog | tr 'a-z' 'A-Z' ` eval env=\$${ucprog} if test X$env != X; then prog_name=$env prog_vers=`perl $autogen_get_version $prog_name $prog` if test X$prog_vers = X; then prog_vers=0 fi eval ${prog}_name=${prog_name} eval ${prog}_vers=${prog_vers} eval ${prog}_dir=environment return fi eval prog_name=\$${prog}_name eval prog_vers=\$${prog}_vers eval prog_dir=\$${prog}_dir if test X$prog_vers = X; then prog_vers=0 fi save_PATH="$PATH" cd "$dir" PATH=".:$PATH" nameglob="$prog*" if [ -x /usr/bin/uname ]; then if [ `/usr/bin/uname` = 'Darwin' -a $prog = 'libtoolize' ] ; then nameglob="g$nameglob" fi fi names=`ls $nameglob 2>/dev/null` if [ "X$names" != "X" ]; then for name in $names; do vers=`perl $autogen_get_version $dir/$name $prog` if [ "X$vers" = "X" ]; then continue fi if expr $vers '>' $prog_vers >/dev/null; then prog_name=$name prog_vers=$vers prog_dir="$dir" fi done fi eval ${prog}_name=${prog_name} eval ${prog}_vers=${prog_vers} eval ${prog}_dir=${prog_dir} PATH="$save_PATH" } check_prog_version() { prog=$1 eval min=\$${prog}_min_vers eval prog_name=\$${prog}_name eval prog_vers=\$${prog}_vers eval prog_dir=\$${prog}_dir echo "$program: $prog program '$prog_name' V $prog_vers (min $min) in $prog_dir" 1>&2 rc=1 if test $prog_vers != 0; then if expr $prog_vers '<' $min >/dev/null; then echo "$program: ERROR: \`$prog' version $prog_vers in $prog_dir is too old." echo " (version $min or newer is required)" rc=0 else # Things are ok, so set the ${prog} name eval ${prog}=${prog_name} fi else echo "$program: ERROR: You must have \`$prog' installed to compile this package." echo " (version $min or newer is required)" rc=0 fi return $rc } # Find newest version of programs in the current PATH save_args=${1+"$*"} save_ifs="$IFS" IFS=":" set - $PATH IFS="$save_ifs" echo "$program: Looking for programs: $programs" here=`pwd` while [ $# -ne 0 ] ; do dir=$1 shift if [ ! -d "$dir" ]; then continue fi for prog in $programs; do update_prog_version "$dir" $prog done done cd $here set - $save_args # END Find programs # Check the versions meet the requirements for prog in $programs; do if check_prog_version $prog; then exit 1 fi done echo "$program: Dependencies satisfied" if test -d $SRCDIR/libltdl; then touch $SRCDIR/libltdl/NO-AUTO-GEN fi config_dir= if test -d $CONFIG_DIR; then config_dir=`cd $CONFIG_DIR; pwd` fi # Initialise and/or update GIT submodules if test -f $GITMODULES ; then echo " " modules=`sed -n -e 's/^.*path = \(.*\)/\1/p' $GITMODULES` for module in $modules; do if test `ls -1 $module | wc -l` -eq 0; then echo "$program: Initializing git submodule in $module" $DRYRUN git submodule init $module fi done echo "$program: Updating git submodules: $modules" $DRYRUN git submodule update fi for coin in `find $SRCDIR -name configure.ac -print | grep -v /releases/` do status=0 dir=`dirname $coin` if test -f "$dir/NO-AUTO-GEN"; then echo "$program: Skipping $dir -- flagged as no auto-generation" else echo " " echo $program: Processing directory $dir ( cd "$dir" # Ensure that these are created by the versions on this system # (indirectly via automake) $DRYRUN rm -f ltconfig ltmain.sh libtool stamp-h* # Made by automake $DRYRUN rm -f missing depcomp # automake junk $DRYRUN rm -rf autom4te*.cache config_macro_dir=`sed -ne 's/^AC_CONFIG_MACRO_DIR(\([^)]*\).*/\1/p' configure.ac` if test "X$config_macro_dir" = X; then config_macro_dir=. else aclocal_args="$aclocal_args -I $config_macro_dir " fi config_aux_dir=`sed -ne 's/^AC_CONFIG_AUX_DIR(\([^)]*\).*/\1/p' configure.ac` if test "X$config_aux_dir" = X; then config_aux_dir=. fi if test "X$config_dir" != X; then echo "$program: Updating config.guess and config.sub" for file in config.guess config.sub; do cfile=$config_dir/$file xfile=$config_aux_dir/$file if test -f $cfile; then $DRYRUN rm -f $xfile $DRYRUN cp -p $cfile $xfile fi done fi echo "$program: Running $libtoolize $libtoolize_args" $DRYRUN rm -f ltmain.sh libtool eval $DRYRUN $libtoolize $libtoolize_args status=$? if test $status != 0; then break fi if grep "^GTK_DOC_CHECK" configure.ac >/dev/null; then # gtkdocize junk $DRYRUN rm -rf gtk-doc.make echo "$program: Running $gtkdocize $gtkdocize_args" $DRYRUN $gtkdocize $gtkdocize_args status=$? if test $status != 0; then break fi fi for docs in NEWS README; do if test ! -f $docs; then echo "$program: Creating empty $docs file to allow configure to work" $DRYRUN touch -t 200001010000 $docs fi done echo "$program: Running $aclocal $aclocal_args" $DRYRUN $aclocal $aclocal_args if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then echo "$program: Running $autoheader" $DRYRUN $autoheader status=$? if test $status != 0; then break fi fi echo "$program: Running $automake $automake_args" $DRYRUN $automake $automake_args status=$? if test $status != 0; then break fi echo "$program: Running $autoconf $autoconf_args" $DRYRUN $autoconf $autoconf_args status=$? if test $status != 0; then break fi ) fi if test $status != 0; then echo "$program: FAILED to configure $dir" exit $status fi done rm -f config.cache AUTOMAKE=$automake AUTOCONF=$autoconf ACLOCAL=$aclocal export AUTOMAKE AUTOCONF ACLOCAL if test "X$NOCONFIGURE" = X; then echo " " if test -z "$*"; then echo "$program: WARNING: Running \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo "\`$program' command line." fi echo "$program: Running ./configure $configure_args $@" if test "X$DRYRUN" = X; then $DRYRUN ./configure $configure_args "$@" \ && echo "$program: Now type \`make' to compile this package" || exit 1 else $DRYRUN ./configure $configure_args "$@" fi fi exit $status ������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/����������������������������������������������������������������������������0000755�0001750�0001750�00000000000�12425347074�012017� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/raptor_abort.c��������������������������������������������������������������0000644�0001750�0001750�00000005475�12020170223�014571� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * raptor_abort.c - Raptor abort example code * * Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/ * Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif /* for the memory allocation functions */ #if defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) #include <dmalloc.h> #endif /* Raptor includes */ #include <raptor2.h> static void handle_statements(void *user_data, raptor_statement *statement); int main(int argc, char *argv[]); typedef struct { raptor_parser *parser; FILE *stream; int count; int max; int stopped; } my_data; static void handle_statements(void *user_data, raptor_statement *statement) { my_data* me=(my_data*)user_data; me->count++; if(me->count > me->max) { fprintf(me->stream, "Reached %d statements, stopping\n", me->max); raptor_parser_parse_abort(me->parser); me->stopped=1; return; } fprintf(me->stream, "Saw statement %d\n", me->count); } int main (int argc, char *argv[]) { raptor_world* world; raptor_parser* rdf_parser; raptor_uri* uri; my_data* me; const char *program; int rc; program=argv[0]; if(argc != 2) { fprintf(stderr, "%s: USAGE [RDF-XML content URI]\n", program); exit(1); } world = raptor_new_world(); me=(my_data*)malloc(sizeof(my_data)); if(!me) { fprintf(stderr, "%s: Out of memory\n", program); exit(1); } me->stream=stderr; me->count = 0; me->max=5; uri = raptor_new_uri(world, (const unsigned char*)argv[1]); rdf_parser = raptor_new_parser(world, "rdfxml"); me->parser = rdf_parser; raptor_parser_set_statement_handler(rdf_parser, me, handle_statements); me->stopped = 0; rc = raptor_parser_parse_uri(rdf_parser, uri, NULL); fprintf(stderr, "%s: Parser returned status %d, stopped? %s\n", program, rc, (me->stopped ? "yes" : "no")); free(me); raptor_free_parser(rdf_parser); raptor_free_uri(uri); raptor_free_world(world); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/Makefile.am�����������������������������������������������������������������0000644�0001750�0001750�00000004635�12222044704�013770� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor examples # # Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # EXTRA_PROGRAMS = \ raptor_abort grapper \ rdfcat rdfprint rdfserialize rdfguess rdfcount examples: $(EXTRA_PROGRAMS) CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS=$(MEM) AM_LDFLAGS=$(MEM_LIBS) AM_CPPFLAGS=-I$(top_srcdir)/src raptor_abort_SOURCES = raptor_abort.c raptor_abort_LDADD=$(top_builddir)/src/libraptor2.la raptor_abort_DEPENDENCIES = $(top_builddir)/src/libraptor2.la grapper_SOURCES = grapper.c grapper_LDADD=$(top_builddir)/src/libraptor2.la grapper_CFLAGS=`pkg-config --cflags gtk+-2.0 gconf-2.0` grapper_LDFLAGS=`pkg-config --libs gtk+-2.0 gconf-2.0` grapper_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfcat_SOURCES = rdfcat.c rdfcat_LDADD=$(top_builddir)/src/libraptor2.la rdfcat_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfprint_SOURCES = rdfprint.c rdfprint_LDADD=$(top_builddir)/src/libraptor2.la rdfprint_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfserialize_SOURCES = rdfserialize.c rdfserialize_LDADD=$(top_builddir)/src/libraptor2.la rdfserialize_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfguess_SOURCES = rdfguess.c rdfguess_LDADD=$(top_builddir)/src/libraptor2.la rdfguess_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfcount_SOURCES = rdfcount.c rdfcount_LDADD=$(top_builddir)/src/libraptor2.la rdfcount_DEPENDENCIES = $(top_builddir)/src/libraptor2.la $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) libraptor2.la $(top_builddir)/../librdf/librdf.la: cd $(top_builddir)/../librdf && $(MAKE) librdf.la grapper-future: $(MAKE) clean $(MAKE) grapper CC="$(CC) -DGTK_DISABLE_DEPRECATED" V=1 ���������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/Makefile.in�����������������������������������������������������������������0000644�0001750�0001750�00000055763�12425344565�014026� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor examples # # Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ # Copyright (C) 2003-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = raptor_abort$(EXEEXT) grapper$(EXEEXT) \ rdfcat$(EXEEXT) rdfprint$(EXEEXT) rdfserialize$(EXEEXT) \ rdfguess$(EXEEXT) rdfcount$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_grapper_OBJECTS = grapper-grapper.$(OBJEXT) grapper_OBJECTS = $(am_grapper_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent grapper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(grapper_CFLAGS) \ $(CFLAGS) $(grapper_LDFLAGS) $(LDFLAGS) -o $@ am_raptor_abort_OBJECTS = raptor_abort.$(OBJEXT) raptor_abort_OBJECTS = $(am_raptor_abort_OBJECTS) am_rdfcat_OBJECTS = rdfcat.$(OBJEXT) rdfcat_OBJECTS = $(am_rdfcat_OBJECTS) am_rdfcount_OBJECTS = rdfcount.$(OBJEXT) rdfcount_OBJECTS = $(am_rdfcount_OBJECTS) am_rdfguess_OBJECTS = rdfguess.$(OBJEXT) rdfguess_OBJECTS = $(am_rdfguess_OBJECTS) am_rdfprint_OBJECTS = rdfprint.$(OBJEXT) rdfprint_OBJECTS = $(am_rdfprint_OBJECTS) am_rdfserialize_OBJECTS = rdfserialize.$(OBJEXT) rdfserialize_OBJECTS = $(am_rdfserialize_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(grapper_SOURCES) $(raptor_abort_SOURCES) $(rdfcat_SOURCES) \ $(rdfcount_SOURCES) $(rdfguess_SOURCES) $(rdfprint_SOURCES) \ $(rdfserialize_SOURCES) DIST_SOURCES = $(grapper_SOURCES) $(raptor_abort_SOURCES) \ $(rdfcat_SOURCES) $(rdfcount_SOURCES) $(rdfguess_SOURCES) \ $(rdfprint_SOURCES) $(rdfserialize_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS = $(MEM) AM_LDFLAGS = $(MEM_LIBS) AM_CPPFLAGS = -I$(top_srcdir)/src raptor_abort_SOURCES = raptor_abort.c raptor_abort_LDADD = $(top_builddir)/src/libraptor2.la raptor_abort_DEPENDENCIES = $(top_builddir)/src/libraptor2.la grapper_SOURCES = grapper.c grapper_LDADD = $(top_builddir)/src/libraptor2.la grapper_CFLAGS = `pkg-config --cflags gtk+-2.0 gconf-2.0` grapper_LDFLAGS = `pkg-config --libs gtk+-2.0 gconf-2.0` grapper_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfcat_SOURCES = rdfcat.c rdfcat_LDADD = $(top_builddir)/src/libraptor2.la rdfcat_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfprint_SOURCES = rdfprint.c rdfprint_LDADD = $(top_builddir)/src/libraptor2.la rdfprint_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfserialize_SOURCES = rdfserialize.c rdfserialize_LDADD = $(top_builddir)/src/libraptor2.la rdfserialize_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfguess_SOURCES = rdfguess.c rdfguess_LDADD = $(top_builddir)/src/libraptor2.la rdfguess_DEPENDENCIES = $(top_builddir)/src/libraptor2.la rdfcount_SOURCES = rdfcount.c rdfcount_LDADD = $(top_builddir)/src/libraptor2.la rdfcount_DEPENDENCIES = $(top_builddir)/src/libraptor2.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): grapper$(EXEEXT): $(grapper_OBJECTS) $(grapper_DEPENDENCIES) $(EXTRA_grapper_DEPENDENCIES) @rm -f grapper$(EXEEXT) $(AM_V_CCLD)$(grapper_LINK) $(grapper_OBJECTS) $(grapper_LDADD) $(LIBS) raptor_abort$(EXEEXT): $(raptor_abort_OBJECTS) $(raptor_abort_DEPENDENCIES) $(EXTRA_raptor_abort_DEPENDENCIES) @rm -f raptor_abort$(EXEEXT) $(AM_V_CCLD)$(LINK) $(raptor_abort_OBJECTS) $(raptor_abort_LDADD) $(LIBS) rdfcat$(EXEEXT): $(rdfcat_OBJECTS) $(rdfcat_DEPENDENCIES) $(EXTRA_rdfcat_DEPENDENCIES) @rm -f rdfcat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfcat_OBJECTS) $(rdfcat_LDADD) $(LIBS) rdfcount$(EXEEXT): $(rdfcount_OBJECTS) $(rdfcount_DEPENDENCIES) $(EXTRA_rdfcount_DEPENDENCIES) @rm -f rdfcount$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfcount_OBJECTS) $(rdfcount_LDADD) $(LIBS) rdfguess$(EXEEXT): $(rdfguess_OBJECTS) $(rdfguess_DEPENDENCIES) $(EXTRA_rdfguess_DEPENDENCIES) @rm -f rdfguess$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfguess_OBJECTS) $(rdfguess_LDADD) $(LIBS) rdfprint$(EXEEXT): $(rdfprint_OBJECTS) $(rdfprint_DEPENDENCIES) $(EXTRA_rdfprint_DEPENDENCIES) @rm -f rdfprint$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfprint_OBJECTS) $(rdfprint_LDADD) $(LIBS) rdfserialize$(EXEEXT): $(rdfserialize_OBJECTS) $(rdfserialize_DEPENDENCIES) $(EXTRA_rdfserialize_DEPENDENCIES) @rm -f rdfserialize$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfserialize_OBJECTS) $(rdfserialize_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grapper-grapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raptor_abort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfcount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfguess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfprint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfserialize.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< grapper-grapper.o: grapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -MT grapper-grapper.o -MD -MP -MF $(DEPDIR)/grapper-grapper.Tpo -c -o grapper-grapper.o `test -f 'grapper.c' || echo '$(srcdir)/'`grapper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/grapper-grapper.Tpo $(DEPDIR)/grapper-grapper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='grapper.c' object='grapper-grapper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -c -o grapper-grapper.o `test -f 'grapper.c' || echo '$(srcdir)/'`grapper.c grapper-grapper.obj: grapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -MT grapper-grapper.obj -MD -MP -MF $(DEPDIR)/grapper-grapper.Tpo -c -o grapper-grapper.obj `if test -f 'grapper.c'; then $(CYGPATH_W) 'grapper.c'; else $(CYGPATH_W) '$(srcdir)/grapper.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/grapper-grapper.Tpo $(DEPDIR)/grapper-grapper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='grapper.c' object='grapper-grapper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(grapper_CFLAGS) $(CFLAGS) -c -o grapper-grapper.obj `if test -f 'grapper.c'; then $(CYGPATH_W) 'grapper.c'; else $(CYGPATH_W) '$(srcdir)/grapper.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am examples: $(EXTRA_PROGRAMS) $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) libraptor2.la $(top_builddir)/../librdf/librdf.la: cd $(top_builddir)/../librdf && $(MAKE) librdf.la grapper-future: $(MAKE) clean $(MAKE) grapper CC="$(CC) -DGTK_DISABLE_DEPRECATED" V=1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �������������raptor2-2.0.15/examples/rdfserialize.c��������������������������������������������������������������0000644�0001750�0001750�00000003040�11556053604�014560� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include <raptor2.h> #include <stdlib.h> /* rdfserialize.c: serialize 1 triple to RDF/XML-Abbrev */ int main(int argc, char *argv[]) { raptor_world *world = NULL; raptor_serializer* rdf_serializer = NULL; unsigned char *uri_string; raptor_uri *base_uri; raptor_statement* triple; world = raptor_new_world(); uri_string = raptor_uri_filename_to_uri_string(argv[1]); base_uri = raptor_new_uri(world, uri_string); rdf_serializer = raptor_new_serializer(world, "rdfxml-abbrev"); raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout); /* Make a triple with URI subject, URI predicate, literal object */ triple = raptor_new_statement(world); triple->subject = raptor_new_term_from_uri_string(world, (const unsigned char*)"http://example.org/subject"); triple->predicate = raptor_new_term_from_uri_string(world, (const unsigned char*)"http://example.org/predicate"); triple->object = raptor_new_term_from_literal(world, (const unsigned char*)"An example literal", NULL, (const unsigned char*)"en"); /* Write the triple */ raptor_serializer_serialize_statement(rdf_serializer, triple); /* Delete the triple */ raptor_free_statement(triple); raptor_serializer_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_uri(base_uri); raptor_free_memory(uri_string); raptor_free_world(world); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/rdfcat.c��������������������������������������������������������������������0000644�0001750�0001750�00000002722�11556053604�013346� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include <raptor2.h> /* rdfcat.c: parse any RDF syntax and serialize to RDF/XML-Abbrev */ static raptor_serializer* rdf_serializer; static void serialize_triple(void* user_data, raptor_statement* triple) { raptor_serializer_serialize_statement(rdf_serializer, triple); } static void declare_namespace(void* user_data, raptor_namespace *nspace) { raptor_serializer_set_namespace_from_namespace(rdf_serializer, nspace); } int main(int argc, char *argv[]) { raptor_world *world = NULL; raptor_parser* rdf_parser = NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; world = raptor_new_world(); uri_string = raptor_uri_filename_to_uri_string(argv[1]); uri = raptor_new_uri(world, uri_string); base_uri = raptor_uri_copy(uri); /* Ask raptor to work out which parser to use */ rdf_parser = raptor_new_parser(world, "guess"); raptor_parser_set_statement_handler(rdf_parser, NULL, serialize_triple); raptor_parser_set_namespace_handler(rdf_parser, NULL, declare_namespace); rdf_serializer = raptor_new_serializer(world, "rdfxml-abbrev"); raptor_serializer_start_to_file_handle(rdf_serializer, base_uri, stdout); raptor_parser_parse_file(rdf_parser, uri, base_uri); raptor_serializer_serialize_end(rdf_serializer); raptor_free_serializer(rdf_serializer); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_free_world(world); return 0; } ����������������������������������������������raptor2-2.0.15/examples/grapper.c�������������������������������������������������������������������0000644�0001750�0001750�00000111340�12020170223�013520� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: c; c-basic-offset: 2 -*- * * grapper.c - Raptor GTK GUI example code * * Copyright (C) 2003-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * * Requires GTK 2.5.0+ * */ #ifdef HAVE_CONFIG_H #include <raptor_config.h> #endif #include <stdio.h> #include <string.h> #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include <unistd.h> /* for the memory allocation functions */ #if defined(HAVE_DMALLOC_H) && defined(RAPTOR_MEMORY_DEBUG_DMALLOC) #include <dmalloc.h> #endif /* Raptor includes */ #include <raptor2.h> /* Gtk 2.0 */ #include <gtk/gtk.h> /* Gconf */ #include <gconf/gconf.h> #include <gconf/gconf-client.h> #if GTK_CHECK_VERSION(2,5,0) #else #error "Requires GTK 2.5.0+" #endif /* Qnames button does nothing */ #undef GRAPPER_QNAMES /* GtkUIManager and external XML file is too damn complex to make work */ #ifdef GTK_DISABLE_DEPRECATED /* GtkItemFactory was deprecated in GTK+ 2.4 */ #undef ITEM_FACTORY /* GtkToolTips was deprecated in GTK+ 2.12 */ #undef TOOL_TIPS #else #define ITEM_FACTORY 1 #define TOOL_TIPS 1 #endif static const char *application_name = "Grapper"; static const char *application_title = "Grapper GUI RDF Parser Utility"; static const char *application_description = "GUI RDF parser utility based on the Raptor RDF parsing library"; /* Top level window */ static GtkWidget *grapper_window; /* GConf */ static GConfClient *gconf_client = NULL; #define GCONF_GRAPPER_NAMESPACE "/apps/grapper" /* configuration dir listened to */ static const gchar* gconf_namespace= GCONF_GRAPPER_NAMESPACE; /* window width key */ static const gchar* width_gconf_key = (const gchar*) GCONF_GRAPPER_NAMESPACE "/width"; /* window height key */ static const gchar* height_gconf_key = (const gchar*) GCONF_GRAPPER_NAMESPACE "/height"; #define MIN_WINDOW_WIDTH 400 #define MIN_WINDOW_HEIGHT 300 typedef struct { raptor_world* world; /* model data */ #ifdef GRAPPER_QNAMES int qnames; #endif int guess; unsigned int syntax; int options[RAPTOR_OPTION_LAST]; int options_set[RAPTOR_OPTION_LAST]; int ignore_warnings; unsigned char *url; /* last picked filename or NULL */ gchar *filename; /* GList *triples_list; */ int triples_count; int warnings_count; int errors_count; gchar *error; /* view/controller data */ GtkWidget *window; GtkWidget *v_box; GtkWidget *url_entry; GtkListStore *triples_store; GtkWidget *file_selection; GtkWidget *status; GtkWidget *triples_frame; GtkWidget *errors_frame; GtkListStore *errors_store; } grapper_state; typedef struct { grapper_state* state; int option; } grapper_widget_data; enum { SUBJECT_COLUMN, PREDICATE_COLUMN, OBJECT_COLUMN, N_COLUMNS }; /* Local prototypes */ static void grapper_model_parse(grapper_state *state); static void grapper_view_url_changed(grapper_state *state) { GtkWidget *url_entry=state->url_entry; gtk_entry_set_text(GTK_ENTRY(url_entry), (const gchar*)state->url); } #ifdef GRAPPER_QNAMES static void grapper_view_qnames_changed(grapper_state *state) { } #endif static void grapper_view_guess_changed(grapper_state *state) { } static void grapper_view_option_changed(grapper_state *state, int option) { } static void grapper_view_syntax_changed(grapper_state *state) { } static void grapper_view_set_triples_count(grapper_state *state, int count) { #define TC_BUF_LEN 18 char buf[TC_BUF_LEN+1]; if(count>0) snprintf(buf, TC_BUF_LEN, "Triples: %d", count); else strcpy(buf, "Triples"); gtk_frame_set_label(GTK_FRAME(state->triples_frame), buf); } static void grapper_view_add_triple(grapper_state *state, unsigned char* nodes[3], int i) { GtkListStore *store=state->triples_store; GtkTreeIter iter; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, SUBJECT_COLUMN, nodes[0], PREDICATE_COLUMN, nodes[1], OBJECT_COLUMN, nodes[2], -1); } static void grapper_view_empty_triples(grapper_state *state) { gtk_list_store_clear(state->triples_store); gtk_list_store_clear(state->errors_store); } static void grapper_view_reset_status(grapper_state *state) { gtk_list_store_clear(state->errors_store); } static void grapper_view_update_error_count(grapper_state *state) { #define EC_BUF_LEN 18 char buf[EC_BUF_LEN+1]; int count=state->errors_count; if(count>0) snprintf(buf, EC_BUF_LEN, "Errors: %d", count); else strcpy(buf, "Errors"); gtk_frame_set_label(GTK_FRAME(state->errors_frame), buf); } static void grapper_view_add_error_message(grapper_state *state, gchar *error, raptor_locator *locator, int is_error) { if(error) { GtkListStore *store = state->errors_store; GtkTreeIter iter; int line = (locator && locator->line >= 0) ? locator->line : 0; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, line, 1, (is_error ? "Error" : "Warning"), 2, error, -1); grapper_view_update_error_count(state); } } static void grapper_model_add_triple(grapper_state *state, unsigned char *nodes[3]) { /* g_list_append(state->triples_list, nodes); */ state->triples_count++; grapper_view_add_triple(state, nodes, state->triples_count-1); grapper_view_set_triples_count(state, state->triples_count); } static void grapper_model_empty_triples(grapper_state *state) { /* g_list_free(state->triples_list); */ grapper_view_empty_triples(state); } static void grapper_model_set_url(grapper_state *state, const unsigned char *url) { if(state->url) { if(!strcmp((const char*)state->url, (const char*)url)) return; g_free(state->url); } state->url = (unsigned char*)g_strdup((const char*)url); strcpy((char*)state->url, (const char*)url); grapper_view_url_changed(state); } #ifdef GRAPPER_QNAMES static void grapper_model_set_qnames (grapper_state *state, int qnames) { if(state->qnames == qnames) return; state->qnames=qnames; grapper_view_qnames_changed(state); } #endif static void grapper_model_set_guess (grapper_state *state, int guess) { if(state->guess == guess) return; state->guess=guess; grapper_view_guess_changed(state); } static void grapper_model_set_option(grapper_state *state, int option, int value) { if(state->options[option] == value) return; state->options[option] = value; state->options_set[option] = 1; grapper_view_option_changed(state, option); } static void grapper_model_set_syntax (grapper_state *state, unsigned int syntax) { if(state->syntax == syntax) return; state->syntax=syntax; grapper_view_syntax_changed(state); } static void grapper_model_reset_counts(grapper_state *state) { state->triples_count = 0; state->warnings_count = 0; state->errors_count = 0; grapper_view_update_error_count(state); } static void grapper_model_reset_error(grapper_state *state) { if(state->error) { g_free(state->error); state->error = NULL; } grapper_view_reset_status(state); } static void grapper_model_log_handler(void *data, raptor_log_message *message) { grapper_state* state = (grapper_state*)data; if(message->level >= RAPTOR_LOG_LEVEL_ERROR) { state->errors_count++; if(state->error) g_free(state->error); state->error = g_strdup(message->text); grapper_view_add_error_message(state, state->error, message->locator, 1); } else { state->warnings_count++; if(state->ignore_warnings) return; if(state->error) g_free(state->error); state->error = g_strdup(message->text); grapper_view_add_error_message(state, state->error, message->locator, 0); } } static void grapper_model_statements_handler(void *data, raptor_statement *statement) { grapper_state* state = (grapper_state*)data; unsigned char* nodes[3]; nodes[0] = raptor_term_to_string(statement->subject); nodes[1] = raptor_term_to_string(statement->predicate); nodes[2] = raptor_term_to_string(statement->object); grapper_model_add_triple(state, nodes); free(nodes[0]); free(nodes[1]); free(nodes[2]); } static void grapper_model_parse(grapper_state *state) { raptor_uri* uri; raptor_parser* rdf_parser; const char *syntax_name; int i; const raptor_syntax_description* sd; if(!state->url) return; grapper_model_empty_triples(state); grapper_model_reset_counts(state); grapper_model_reset_error(state); uri = raptor_new_uri(state->world, state->url); sd = raptor_world_get_parser_description(state->world, state->syntax); syntax_name = sd->names[0]; if(state->guess) { rdf_parser = raptor_new_parser_for_content(state->world, NULL, NULL, NULL, 0, state->url); if(!rdf_parser) { fprintf(stderr, "Failed to create guessed raptor parser from uri %s\n", state->url); exit(1); } fprintf(stdout, "Guessed parser name '%s' from uri %s\n", raptor_parser_get_name(rdf_parser), state->url); } else { rdf_parser = raptor_new_parser(state->world, syntax_name); } for(i = 0; i <= RAPTOR_OPTION_LAST; i++) { if(state->options_set[i]) raptor_parser_set_option(rdf_parser, (raptor_option)i, NULL, state->options[i]); } raptor_world_set_log_handler(state->world, state, grapper_model_log_handler); raptor_parser_set_statement_handler(rdf_parser, state, grapper_model_statements_handler); raptor_parser_parse_uri(rdf_parser, uri, NULL); raptor_free_parser(rdf_parser); raptor_free_uri(uri); } /* go button clicked / url entry activated callback */ static void url_entry_callback(GtkWidget *widget, gpointer data) { grapper_state* state = (grapper_state*)data; GtkWidget *url_entry = state->url_entry; const unsigned char* url; url = (const unsigned char*)gtk_entry_get_text(GTK_ENTRY(url_entry)); grapper_model_set_url(state, url); grapper_model_parse(state); } /* open action wanted */ static void do_open_action(grapper_state* state) { unsigned char *uri_string; GtkWidget *files = gtk_file_chooser_dialog_new("Open", GTK_WINDOW(state->window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if(state->filename) gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(files), state->filename); if (gtk_dialog_run(GTK_DIALOG (files)) == GTK_RESPONSE_ACCEPT) { state->filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(files)); uri_string = (unsigned char*)gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(files)); grapper_model_set_url(state, uri_string); g_free(uri_string); grapper_model_parse(state); } gtk_widget_destroy(files); } /* quit callback */ static void do_quit_action(grapper_state* state) { gtk_main_quit(); } /* preferences option menu item toggled callback */ static void option_menu_toggled(GtkCheckMenuItem *checkmenuitem, gpointer data) { grapper_widget_data* sbdata = (grapper_widget_data*)data; int active = gtk_check_menu_item_get_active(checkmenuitem); grapper_model_set_option(sbdata->state, sbdata->option, active); } #ifdef GRAPPER_QNAMES /* qnames button clicked callback */ static void qnames_button_callback(GtkWidget *widget, gpointer data) { grapper_state* state = (grapper_state*)data; int active = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)) != 0); grapper_model_set_qnames(state, active); } #endif /* guess button clicked callback */ static void guess_button_callback(GtkWidget *widget, gpointer data) { grapper_state* state = (grapper_state*)data; int active = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)) != 0); grapper_model_set_guess(state, active); } /* syntax menu changed callback */ static void syntax_menu_callback(GtkWidget *widget, gpointer data) { grapper_state* state = (grapper_state*)data; unsigned int syntax; syntax = (unsigned int)gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); grapper_model_set_syntax(state, syntax); } /* delete (window) event callback */ static gboolean delete_event_callback(GtkWidget *widget, GdkEvent *event, gpointer data) { return FALSE; /* continue normal event handing */ } /* destroy callback */ static void destroy_callback(GtkWidget *widget, gpointer data) { gtk_main_quit (); } #ifdef ITEM_FACTORY static void open_menu_callback(gpointer user_data, guint action, GtkWidget *widget) { do_open_action((grapper_state*)user_data); } #else static void on_open_menu_callback(GtkAction *action, gpointer user_data) { do_open_action((grapper_state*)user_data); } #endif #ifdef ITEM_FACTORY static void quit_menu_callback(gpointer user_data, guint action, GtkWidget *widget) { do_quit_action((grapper_state*)user_data); } #else static void on_quit_menu_callback(GtkAction *action, gpointer user_data) { do_quit_action((grapper_state*)user_data); } #endif static void do_about_action(grapper_state* state) { const gchar* authors[2]= { "Dave Beckett http://www.dajobe.org/", NULL }; #if 1 /* using 2.5.x+ stock about dialog */ gtk_show_about_dialog(GTK_WINDOW(state->window), "authors", authors, "comments", application_description, "copyright", raptor_short_copyright_string, "license", raptor_license_string, "name", application_name, "version", raptor_version_string, "website", raptor_home_url_string, "website-label", "Raptor", NULL); #else /* using 2.5.x+ by hand about */ GtkWidget *about; about = gtk_about_dialog_new(); gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), application_name); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), raptor_version_string); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), raptor_short_copyright_string); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), application_description); gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about), raptor_license_string); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), raptor_home_url_string); gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about), "Raptor"); gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors); gtk_widget_show_all(about); #endif } #ifdef ITEM_FACTORY static void about_menu_callback(gpointer user_data, guint action, GtkWidget *widget) { do_about_action((grapper_state*)user_data); } #else static void on_about_menu_callback(GtkAction* action, gpointer user_data) { do_about_action((grapper_state*)user_data); } #endif #ifdef ITEM_FACTORY static GtkItemFactoryEntry menu_item_factory_entries[] = { /* path, accelerator, callback, callback_action, item_type, extra_data */ { (gchar*)"/_File", NULL, NULL, 0, (gchar*)"<Branch>" }, { (gchar*)"/File/_Open...", (gchar*)"<CTRL>O", (GtkItemFactoryCallback)open_menu_callback, 1, (gchar*)"<StockItem>", GTK_STOCK_OPEN }, { (gchar*)"/File/sep1", NULL, NULL, 0, (gchar*)"<Separator>" }, { (gchar*)"/File/_Quit", (gchar*)"<CTRL>Q", (GtkItemFactoryCallback)quit_menu_callback, 1, (gchar*)"<StockItem>", GTK_STOCK_QUIT }, { (gchar*)"/_Preferences", NULL, NULL, 0, (gchar*)"<Branch>" }, { (gchar*)"/_Help", NULL, NULL, 0, (gchar*)"<LastBranch>" }, { (gchar*)"/Help/About", NULL, (GtkItemFactoryCallback)about_menu_callback, 1, (gchar*)"<Item>" } }; static gint menu_item_factory_nentries = sizeof(menu_item_factory_entries) / sizeof(menu_item_factory_entries[0]); #else static GtkActionEntry menu_actions[] = { /* name, stock id, label */ { "FileMenuAction", NULL, "_File" }, { "PreferencesMenuAction", NULL, "_Preferences" }, { "HelpMenuAction", NULL, "_Help" }, /* name, stock id, label, accelerator, tooltip, callback */ { "OpenAction", GTK_STOCK_OPEN, "_Open", (gchar*)"<control>O", "Open a file", G_CALLBACK ( on_open_menu_callback ) }, { "QuitAction", GTK_STOCK_QUIT, "_Quit", (gchar*)"<control>Q", "Quit", G_CALLBACK ( on_quit_menu_callback ) }, { "AboutAction", GTK_STOCK_ABOUT, NULL, NULL, "About", G_CALLBACK ( on_about_menu_callback ) } }; static gint menu_actions_nentries = G_N_ELEMENTS (menu_actions); #endif static void init_grapper_window(GtkWidget *window, grapper_state *state) { GtkAccelGroup *accel_group; GtkWidget *menu_bar; GtkMenu *prefs_menu; GtkWidget *v_paned; GtkWidget *v_box; GtkWidget *box; GtkWidget *go_button; GtkWidget* option_items[RAPTOR_OPTION_LAST]; #ifdef GRAPPER_QNAMES GtkWidget *qnames_button; #endif GtkWidget *guess_button; GtkWidget *syntax_combo_box; GtkWidget *url_entry; GtkWidget *triples_frame, *prefs_frame; GtkWidget *triples_scrolled_window; GtkWidget *triples_treeview; GtkCellRenderer *renderer; GtkTreeViewColumn *column; #ifdef GRAPPER_QNAMES GtkTooltips *qnames_tooltips; #endif #ifdef TOOL_TIPS GtkTooltips *guess_tooltips; GtkTooltips *syntax_tooltips; #else #endif GtkWidget *prefs_box; GtkListStore *store; int i; GtkWidget *errors_frame, *errors_scrolled_window; GtkWidget *errors_treeview; GtkListStore *errors_store; #ifdef SYNTAX_LIST_STORE GtkListStore *syntax_list_store; GtkTreeIter iter; GtkCellRenderer* cell; #endif #ifdef ITEM_FACTORY GtkItemFactory* menu_item_factory; #else GtkActionGroup *action_group; GtkUIManager *menu_manager; GError *error; #endif state->window=window; /* connect window delete event to callback */ g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (delete_event_callback), NULL); /* connect window destroy event to callback */ g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy_callback), NULL); /* vertical box */ v_box = gtk_vbox_new (FALSE, 0); /* gtk_container_set_border_width (GTK_CONTAINER (v_box), 10); */ state->v_box = v_box; /* acceleration group for menu bar*/ accel_group = gtk_accel_group_new(); /* Menu bar */ #ifdef ITEM_FACTORY menu_item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<Main>", accel_group); gtk_item_factory_create_items(menu_item_factory, menu_item_factory_nentries, menu_item_factory_entries, state); gtk_window_add_accel_group(GTK_WINDOW(window), accel_group); menu_bar = gtk_item_factory_get_widget (menu_item_factory, "<Main>"); gtk_widget_show(menu_bar); #else action_group = gtk_action_group_new("Actions"); gtk_action_group_add_actions (action_group, menu_actions, menu_actions_nentries, state); menu_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (menu_manager, action_group, 0); error = NULL; gtk_ui_manager_add_ui_from_file(menu_manager, "grapper-ui.xml", &error); if (error) { g_message ("Building menus failed: %s", error->message); g_error_free (error); } /* get the menu bar widget */ menu_bar = gtk_ui_manager_get_widget(menu_manager, "/MainMenu"); #endif gtk_box_pack_start (GTK_BOX (v_box), menu_bar, FALSE, FALSE, 0); #ifdef ITEM_FACTORY #else /* enable keyboard shortcuts */ gtk_window_add_accel_group (GTK_WINDOW(window), gtk_ui_manager_get_accel_group (menu_manager)); #endif /* horizontal box for url entry, OK, Open buttons in vertical box (v_box) */ box = gtk_hbox_new (FALSE, 0); /* url text entry in horizontal box */ url_entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(url_entry), 200); /* connect text entry activate (enter key) callback */ g_signal_connect (G_OBJECT(url_entry), "activate", G_CALLBACK(url_entry_callback), state); gtk_editable_set_editable(GTK_EDITABLE(url_entry), TRUE); /* pack into the invisible box */ gtk_box_pack_start(GTK_BOX(box), url_entry, TRUE, TRUE, 0); gtk_widget_show(url_entry); state->url_entry = url_entry; /* go button in horizontal box */ go_button = gtk_button_new_from_stock(GTK_STOCK_OK); /* connect button clicked event to callback */ g_signal_connect (G_OBJECT (go_button), "clicked", G_CALLBACK (url_entry_callback), state); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(box), go_button, FALSE, TRUE, 0); gtk_widget_show (go_button); gtk_widget_show (box); /* add hbox to vbox */ gtk_box_pack_start (GTK_BOX (v_box), box, FALSE, FALSE, 0); /* horizontal box for syntax prefs in vertical box (v_box) */ prefs_frame = gtk_frame_new ("RDF Syntax"); prefs_box = gtk_hbutton_box_new(); gtk_button_box_set_layout (GTK_BUTTON_BOX(prefs_box), GTK_BUTTONBOX_START); #ifdef GRAPPER_QNAMES /* qnames button in horizontal box */ qnames_button = gtk_check_button_new_with_label ("QNames"); qnames_tooltips = gtk_tooltips_new (); gtk_tooltips_set_tip (qnames_tooltips, qnames_button, "Display URIs as XML QNames", NULL); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(qnames_button), (state->qnames)); /* connect button clicked event to callback */ g_signal_connect (G_OBJECT (qnames_button), "clicked", G_CALLBACK (qnames_button_callback), state); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(prefs_box), qnames_button, TRUE, TRUE, 0); gtk_widget_show (qnames_button); #endif /* guess button in horizontal box */ guess_button = gtk_check_button_new_with_label ("Guess Syntax"); #ifdef TOOL_TIPS guess_tooltips = gtk_tooltips_new (); gtk_tooltips_set_tip (guess_tooltips, guess_button, "Try to guess the syntax from the URI", NULL); #else gtk_widget_set_tooltip_text (GTK_WIDGET(guess_button), "Try to guess the syntax from the URI"); #endif gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(guess_button), (state->guess)); /* connect button clicked event to callback */ g_signal_connect (G_OBJECT (guess_button), "clicked", G_CALLBACK (guess_button_callback), state); /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(prefs_box), guess_button, TRUE, TRUE, 0); gtk_widget_show (guess_button); /* add prefs frame to vbox */ gtk_container_add (GTK_CONTAINER(prefs_frame), prefs_box); gtk_widget_show (prefs_box); /* add prefs frame to start of vbox */ gtk_box_pack_start (GTK_BOX (v_box), prefs_frame, FALSE, TRUE, 0); gtk_widget_show (prefs_frame); /* paned in vertical box */ v_paned = gtk_vpaned_new (); /* triples frame in vertical paned */ triples_frame = gtk_frame_new("Triples"); state->triples_frame = triples_frame; gtk_paned_pack1 (GTK_PANED (v_paned), triples_frame, TRUE, FALSE); gtk_widget_show (triples_frame); /* scroll window in triples frame */ triples_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width (GTK_CONTAINER(triples_scrolled_window), 10); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(triples_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER(triples_frame), triples_scrolled_window); gtk_widget_show (triples_scrolled_window); store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); state->triples_store = store; triples_treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL(store)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(triples_treeview), TRUE); /* set columns renderer for treeview */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Subject", renderer, "text", SUBJECT_COLUMN, NULL); gtk_tree_view_column_set_sort_column_id (column, SUBJECT_COLUMN); gtk_tree_view_column_set_resizable (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (triples_treeview), column); renderer= gtk_cell_renderer_text_new (); column= gtk_tree_view_column_new_with_attributes ("Predicate", renderer, "text", PREDICATE_COLUMN, NULL); gtk_tree_view_column_set_sort_column_id (column, PREDICATE_COLUMN); gtk_tree_view_column_set_resizable (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (triples_treeview), column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Object", renderer, "text", OBJECT_COLUMN, NULL); gtk_tree_view_column_set_sort_column_id (column, OBJECT_COLUMN); gtk_tree_view_column_set_resizable (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (triples_treeview), column); /* pack the store into the scrolled window */ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW(triples_scrolled_window), triples_treeview); gtk_widget_show(triples_treeview); /* errors frame in vertical paned */ errors_frame = gtk_frame_new ("Errors"); state->errors_frame = errors_frame; gtk_paned_pack2 (GTK_PANED (v_paned), errors_frame, TRUE, FALSE); gtk_widget_show (errors_frame); gtk_box_pack_start (GTK_BOX (v_box), v_paned, TRUE, TRUE, 0); gtk_widget_show (v_paned); /* scroll window in errors frame */ errors_scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width (GTK_CONTAINER(errors_scrolled_window), 10); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(errors_scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER(errors_frame), errors_scrolled_window); gtk_widget_show (errors_scrolled_window); errors_store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING); state->errors_store = errors_store; errors_treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL(errors_store)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(errors_treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Line", renderer, "text", 0, NULL); gtk_tree_view_column_set_resizable (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (errors_treeview), column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Type", renderer, "text", 1, NULL); gtk_tree_view_column_set_resizable (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (errors_treeview), column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Message", renderer, "text", 2, NULL); gtk_tree_view_column_set_resizable (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (errors_treeview), column); #ifdef TOOL_TIPS gtk_tooltips_set_tip (gtk_tooltips_new (), errors_treeview, "Errors and warnings from parsing the content.", NULL); #else gtk_widget_set_tooltip_text (GTK_WIDGET(errors_treeview), "Errors and warnings from parsing the content."); #endif /* pack the errors store into the errors scrolled window */ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW(errors_scrolled_window), errors_treeview); gtk_widget_show (errors_treeview); #ifdef ITEM_FACTORY prefs_menu = GTK_MENU(gtk_item_factory_get_widget (menu_item_factory, "/Preferences")); #else prefs_menu = GTK_MENU(gtk_ui_manager_get_widget (menu_manager, "/MainMenu/PreferencesMenu")); #endif /* options in the preferences menu */ for(i = 0; i <= RAPTOR_OPTION_LAST; i++) { grapper_widget_data* sbdata; raptor_option_description* od; od = raptor_world_get_option_description(state->world, RAPTOR_DOMAIN_PARSER, (raptor_option)i); if(!od) break; sbdata = (grapper_widget_data*)malloc(sizeof(grapper_widget_data)); sbdata->state = state; sbdata->option = i; /* add to the preferences menu */ option_items[i] = gtk_check_menu_item_new_with_label (od->label); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(option_items[i]), state->options[i]); gtk_menu_shell_append (GTK_MENU_SHELL(prefs_menu), option_items[i]); g_signal_connect (G_OBJECT(option_items[i]), "toggled", G_CALLBACK(option_menu_toggled), (gpointer)sbdata); gtk_widget_show (option_items[i]); } /* syntax button in horizontal box */ #ifdef SYNTAX_LIST_STORE /* Create combo box with data model behind */ syntax_list_store = gtk_list_store_new (/* N columns */ 1, G_TYPE_STRING); for(i = 0; 1; i++) { const raptor_syntax_description* sd; sd = raptor_world_get_parser_description(state->world, i); if(!sd) break; gtk_list_store_append (syntax_list_store, &iter); gtk_list_store_set (syntax_list_store, &iter, /* column */ 0, (const gchar*)sd->label, -1); } syntax_combo_box = gtk_combo_box_new_with_model(GTK_TREE_MODEL(syntax_list_store)); /* Remove our reference to the store to avoid memory leak */ g_object_unref ( G_OBJECT (syntax_list_store ) ); /* Create text cell renderer */ cell = gtk_cell_renderer_text_new (); /* Pack it to the combo box */ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT ( syntax_combo_box ), cell, TRUE); /* Connect renderer to data source: attr "text" is column 0 in data model */ gtk_cell_layout_set_attributes ( GTK_CELL_LAYOUT ( syntax_combo_box ), cell, /* attribute */ "text", /* column */ 0, NULL); #else /* Create combo box using text API */ syntax_combo_box = gtk_combo_box_new_text (); for(i = 0; 1; i++) { const raptor_syntax_description* sd; sd = raptor_world_get_parser_description(state->world, i); if(!sd) break; gtk_combo_box_append_text (GTK_COMBO_BOX (syntax_combo_box), (const gchar*)sd->label); } #endif g_signal_connect (GTK_OBJECT(syntax_combo_box), "changed", G_CALLBACK(syntax_menu_callback), state); /* Default is item 0 (should be RDF/XML) */ gtk_combo_box_set_active (GTK_COMBO_BOX(syntax_combo_box), 0); #ifdef TOOL_TIPS syntax_tooltips = gtk_tooltips_new (); gtk_tooltips_set_tip (syntax_tooltips, syntax_combo_box, "Choose the Syntax to parse", NULL); #else gtk_widget_set_tooltip_text (GTK_WIDGET(syntax_combo_box), "Choose the Syntax to parse"); #endif /* pack into the invisible box */ gtk_box_pack_start (GTK_BOX(prefs_box), syntax_combo_box, TRUE, TRUE, 0); gtk_widget_show (syntax_combo_box); /* add vbox to window */ gtk_container_add (GTK_CONTAINER (window), v_box); gtk_widget_show (v_box); } static void grapper_gconfclient_notify(GConfClient* client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { /* grapper_state* state = (grapper_state*)user_data; */ GError* err = NULL; int width, height; gtk_window_get_size (GTK_WINDOW(grapper_window), &width, &height); width = gconf_client_get_int (gconf_client, width_gconf_key, &err); if(err) { g_error_free (err); err = NULL; width = -1; } else fprintf(stderr, "gconf width changed to %d\n", width); height = gconf_client_get_int (gconf_client, height_gconf_key, &err); if(err) { g_error_free (err); err = NULL; height = -1; } else fprintf(stderr, "gconf height changed to %d\n", width); /* let's not make it too small */ if(width < MIN_WINDOW_WIDTH) width = MIN_WINDOW_WIDTH; if(height < MIN_WINDOW_HEIGHT) height = MIN_WINDOW_HEIGHT; gtk_window_resize (GTK_WINDOW(grapper_window), width, height); } static void grapper_gconflient_free(gpointer user_data) { } static gint configure_callback(GtkWidget *widget, GdkEvent *event, gpointer data) { gint width, height; GError* err = NULL; gtk_window_get_size (GTK_WINDOW(grapper_window), &width, &height); if(!gconf_client_set_int (gconf_client, width_gconf_key, width, &err)) { fprintf(stderr, "gconf error writing width: %s\n", err->message); g_error_free (err); err = NULL; } if(!gconf_client_set_int (gconf_client, height_gconf_key, height, &err)) { fprintf(stderr, "gconf error writing width: %s\n", err->message); g_error_free (err); err = NULL; } return FALSE; } int main(int argc, char *argv[]) { grapper_state state; GError* err = NULL; guint cnxn; int width, height; gtk_init (&argc, &argv); g_set_application_name (application_name); memset(&state, 0, sizeof(grapper_state)); state.world = raptor_new_world(); gconf_client = gconf_client_get_default(); cnxn = gconf_client_notify_add (gconf_client, gconf_namespace, grapper_gconfclient_notify, (gpointer)&state, /* user data */ grapper_gconflient_free, &err); /* create the main window */ grapper_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW(grapper_window), application_title); init_grapper_window(grapper_window, &state); width = gconf_client_get_int (gconf_client, width_gconf_key, &err); if(err) { fprintf(stderr, "gconf error reading width: %s\n", err->message); g_error_free (err); err = NULL; width= -1; } height = gconf_client_get_int (gconf_client, height_gconf_key, &err); if(err) { fprintf(stderr, "gconf error reading height: %s\n", err->message); g_error_free (err); err = NULL; height= -1; } /* let's not make it too small */ if(width < MIN_WINDOW_WIDTH) width = MIN_WINDOW_WIDTH; if(height < MIN_WINDOW_HEIGHT) height = MIN_WINDOW_HEIGHT; gtk_window_set_default_size (GTK_WINDOW(grapper_window), width, height); /* Connect the window resize event to configure_callback */ g_signal_connect (G_OBJECT (grapper_window), "configure_event", G_CALLBACK (configure_callback), &state); /* finally make it all visible */ gtk_widget_show (grapper_window); if(argc>1) { if(!access(argv[1], R_OK)) { /* it's a file - make a URL out of it */ unsigned char *uri_string = raptor_uri_filename_to_uri_string(argv[1]); grapper_model_set_url(&state, uri_string); free(uri_string); } else grapper_model_set_url(&state, (unsigned char*)argv[1]); grapper_model_parse(&state); } /* main loop, exited when gtk_main_quit() is called */ gtk_main (); raptor_free_world(state.world); gconf_client_notify_remove (gconf_client, cnxn); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/rdfguess.c������������������������������������������������������������������0000644�0001750�0001750�00000004542�11770424657�013737� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <raptor2.h> /* rdfguess.c: guess parser name from filename and its content */ #define READ_BUFFER_SIZE 256 static int rdfguess_guess_name(raptor_world* world, const char* filename) { char *buffer[READ_BUFFER_SIZE]; raptor_iostream* iostr = NULL; const char* name; const unsigned char* identifier; const char* label; size_t read_len; size_t count; if(!strcmp(filename, "-")) { iostr = raptor_new_iostream_from_file_handle(world, stdin); identifier = NULL; label = "<stdin>"; } else { if(access(filename, R_OK)) { fprintf(stderr, "rdfguess: file %s not found\n", filename); return 1; } iostr = raptor_new_iostream_from_filename(world, filename); identifier = (const unsigned char *)filename; label = filename; } if(!iostr) { fprintf(stderr, "rdfguess: Could not create iostream for %s\n", label); goto tidy; } read_len = READ_BUFFER_SIZE; count = raptor_iostream_read_bytes(buffer, 1, read_len, iostr); if(count < 1) { fprintf(stderr, "rdfguess: Failed to read any data from %s\n", label); goto tidy; } name = raptor_world_guess_parser_name(world, /* uri*/ NULL, /* mime_type */ NULL, (const unsigned char*)buffer, read_len, identifier); if(name) fprintf(stdout, "rdfguess: %s guessed to be %s\n", label, name); else fprintf(stdout, "rdfguess: failed to guess parser for %s\n", label); tidy: raptor_free_iostream(iostr); return 0; } int main(int argc, char *argv[]) { raptor_world *world = NULL; const char *filename; int rc = 0; world = raptor_new_world(); if(argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))) { fprintf(stderr, "USAGE rdfguess [FILENAMES...]\n"); rc = 1; goto tidy; } if(argc == 1) { rc = rdfguess_guess_name(world, "-"); } else { int i; for(i = 1; (filename = (const char*)argv[i]); i++) { rc = rdfguess_guess_name(world, filename); if(rc) break; } } tidy: raptor_free_world(world); return rc; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/rdfcount.c������������������������������������������������������������������0000644�0001750�0001750�00000003025�12222044704�013714� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include <raptor2.h> /* rdfcount.c: parse any number of RDF/XML files and count the triples */ static void count_triples(void* user_data, raptor_statement* triple) { unsigned int* count_p = (unsigned int*)user_data; (*count_p)++; } int main(int argc, char *argv[]) { raptor_world *world = NULL; const char* program = "rdfcount"; raptor_parser* rdf_parser = NULL; unsigned int i; unsigned int count; unsigned int files_count = 0; unsigned int total_count = 0; world = raptor_new_world(); /* just one parser is used and reused here */ rdf_parser = raptor_new_parser(world, "rdfxml"); raptor_parser_set_statement_handler(rdf_parser, &count, count_triples); for(i = 1; argv[i]; i++) { const char* filename = argv[i]; unsigned char *uri_string; raptor_uri *uri, *base_uri; uri_string = raptor_uri_filename_to_uri_string(filename); uri = raptor_new_uri(world, uri_string); base_uri = raptor_uri_copy(uri); count = 0; if(!raptor_parser_parse_file(rdf_parser, uri, base_uri)) { fprintf(stderr, "%s: %s : %d triples\n", program, filename, count); total_count += count; files_count++; } else { fprintf(stderr, "%s: %s : failed to parse\n", program, filename); } raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); } raptor_free_parser(rdf_parser); raptor_free_world(world); fprintf(stderr, "%s: Total count: %d files %d triples\n", program, files_count, total_count); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/examples/rdfprint.c������������������������������������������������������������������0000644�0001750�0001750�00000001632�11556053604�013732� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include <raptor2.h> /* rdfprint.c: print triples from parsing RDF/XML */ static void print_triple(void* user_data, raptor_statement* triple) { raptor_statement_print_as_ntriples(triple, stdout); fputc('\n', stdout); } int main(int argc, char *argv[]) { raptor_world *world = NULL; raptor_parser* rdf_parser = NULL; unsigned char *uri_string; raptor_uri *uri, *base_uri; world = raptor_new_world(); rdf_parser = raptor_new_parser(world, "rdfxml"); raptor_parser_set_statement_handler(rdf_parser, NULL, print_triple); uri_string = raptor_uri_filename_to_uri_string(argv[1]); uri = raptor_new_uri(world, uri_string); base_uri = raptor_uri_copy(uri); raptor_parser_parse_file(rdf_parser, uri, base_uri); raptor_free_parser(rdf_parser); raptor_free_uri(base_uri); raptor_free_uri(uri); raptor_free_memory(uri_string); raptor_free_world(world); return 0; } ������������������������������������������������������������������������������������������������������raptor2-2.0.15/ChangeLog.11�������������������������������������������������������������������������0000644�0001750�0001750�00000536641�11524303221�012113� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������2010-12-29 Dave Beckett <dave@dajobe.org> * src/raptor_parse.c: (raptor_world_guess_parser_name): Fix guessing by URI * src/Makefile.am, src/raptor.h.in, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_syntax_description.c: Restore array counts to syntax description. Pull out common validation. raptor_syntax_description gains names_count, mime_types_count and uri_strings_count all computed at registration. (raptor_syntax_description_validate): Added to public API to validate and compute counts. (raptor_world_register_parser_factory, raptor_world_register_serializer_factory): Call above for common validation checks. * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_json.c, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_html.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/turtle_parser.y: Update parsers and serializers to use uri_strings for syntax description. * src/raptor.h.in: raptor_syntax_description has an array of URI strings, loses mime types count. 2010-12-02 Dave Beckett <dave@dajobe.org> * src/raptor_rss.c: Lower RSS mime type q values to 0.8 since that is good enough, raptor cannot ever reach 100% 2010-12-01 Dave Beckett <dave@dajobe.org> * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.9.2 * README.html: N-Quads 2010-12-01 Dave Beckett <dave@dajobe.org> * Snapshotted raptor2_1_9_1 for 1.9.1 release (GIT 697d55552c5897afab65715d16abbce838acd3e7) 2010-11-30 Dave Beckett <dave@dajobe.org> * src/raptor_www_curl.c: Respect Content-Location: header in HTTP responses for final URI (raptor_www_curl_update_status): If HTTP header Content-Location: was found, use that rather than the HTTP 3xx redirect URI. (raptor_www_curl_header_callback): Use raptor_strncasecmp rather than strncmp to find content type and content location. If content location is found, set the final_uri Fixes Issue#0000402 http://bugs.librdf.org/mantis/view.php?id=402 * docs/Makefile.am, docs/raptor1-eol.html: Add raptor1-eol.html * INSTALL.html: update - encouraging the released tarballs path * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Remove unused created_p args / variables from raptor_abbrev internal APIs 2010-11-29 Dave Beckett <dave@dajobe.org> * src/raptor.h.in, src/raptor_term.c: Added convenience methods for constructing URI terms (raptor_new_term_from_counted_uri_string, raptor_new_term_from_uri_string): Added to replace a common pattern of make uri, make term, free uri. 2010-11-22 Dave Beckett <dave@dajobe.org> * src/raptor_general.c, src/raptor_internal.h: Update defensive code for checking raptor_world * src/raptor_general.c: autodocs * docs/raptor-sections.txt: Add new symbols 2010-11-21 Dave Beckett <dave@dajobe.org> * docs/tmpl/section-world.sgml: Update tmpls * src/.gitignore: ignore raptor.h * configure.ac, src/Makefile.am, src/raptor.h, src/raptor.h.in, src/raptor_general.c: (raptor_new_world): Turn into a macro around the internal raptor_new_world_internal() * src/raptor_general.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_libxml.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_statement.c, src/raptor_term.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Check world object is valid for Raptor V2 in every constructor RAPTOR2_WORLD_MAGIC: Alter the RAPTOR_MAGIC value to be different for raptor V2 and rename it in code. RAPTOR1_WORLD_MAGIC is the old value. (raptor_check_constructor_world): Added to handle the check and provide a function to debugger-break on. It warns once about the pointer problems using a static var. (RAPTOR_CHECK_CONSTRUCTOR_WORLD): Macro added to call raptor_check_constructor_world() and replace generic RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE check. * src/raptor_librdfa.c: (raptor_librdfa_parse_start): Call rdfa_set_processor_graph_triple_handler with context. * scripts/process-changes.pl: print_statement_field_renames_as_perl_script added. labels * docs/raptor-1-to-2-map.tsv: more notes * scripts/process-changes.pl: Update titles * scripts/process-changes.pl: Fix delete enum output * docs/raptor-1-to-2-map.tsv: RAPTOR_FEATURE_ASSUME_IS_RDF and RAPTOR_FEATURE_START_URI were deleted. * docs/raptor-1-to-2-map.tsv: Add enum changes * scripts/process-changes.pl: Handle enums * docs/Makefile.am: upgrade-script.pl depends on tsv file 2010-11-17 Dave Beckett <dave@dajobe.org> * src/raptor_librdfa.c: Replace rdfa_set_triple_handler with rdfa_set_default_graph_triple_handler * librdfa/rdfa.c, librdfa/rdfa.h, librdfa/triple.c: Update to librdfa GIT 1a1a08c790b7649a7f6c12fb9e40c0d3dbe70481 2010-11-08 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_internal.h, src/turtle_parser.y: Fixes for C++ - Casts for C++ from void* to typed pointer/function pointers - Rename some prototype args to avoid 'explicit' C++ keyword. 2010-11-07 Dave Beckett <dave@dajobe.org> * docs/raptor-sections.txt, docs/tmpl/section-stringbuffer.sgml, docs/tmpl/section-triples.sgml: Update generated docs * src/raptor_stringbuffer.c: docs * UPGRADING.html: deleted questions * RELEASE.html: 1.9.1 * RELEASE.html, src/raptor.h, src/raptor_term.c: Removed raptor_term_as_counted_string() and raptor_term_as_string() replaced by _to_ versions. These were 'deprecated' in GIT but since 1.9.0 Raptor V2 was beta, it is OK to delete them. * RELEASE.html: 1.9.1 2010-10-27 Dave Beckett <dave@dajobe.org> * src/raptor_avltree.c: (raptor_avltree_print): Free avltree_iterator at end 2010-10-22 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c: N-Quads code tidying * tests/ntriples/Makefile.am: Remove N-Quads from N-Triples test files so Turtle parser doesn't barf. * tests/ntriples/Makefile.am: #typo * configure.ac: Typo in AM_CONDITIONAL enabling N-Quads parser * tests/ntriples/Makefile.am: Add $(NQ_OUT_FILES) to dist * tests/json/Makefile.am: example4.nt * configure.ac, src/Makefile.am, src/ntriples_parse.c, src/raptor_internal.h, src/raptor_parse.c, tests/ntriples/Makefile.am, tests/ntriples/testnq-1.nq, tests/ntriples/testnq-1.out: Added N-Quads parser. Hey, that was easy! Don't allow literal graphs/contexts despite that being in the spec at http://sw.deri.org/2008/07/n-quads/ because it's a stupid idea. Added test from the spec 2010-10-18 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_stringbuffer.c: (raptor_stringbuffer_append_uri_escaped_counted_string): Added * src/raptor.h, src/raptor_stringbuffer.c: (raptor_stringbuffer_append_hexadecimal): Added 2010-10-18 Lauri Aalto <laalto@iki.fi> * src/raptor_serialize.c: #doc typo 2010-10-17 Dave Beckett <dave@dajobe.org> * src/raptor_iostream.c: Fix major copying too much error with raptor_read_string_iostream_read_bytes() memcpy (raptor_read_string_iostream_read_bytes): Adjust copied bytes to the maximum available in the buffer, not the maximum requested by user. Could cause crashes since memcpy is called to always copy the maximum amount the user requests, whatever amount of data is in the string. 2010-10-15 Dave Beckett <dajobe@digg.com> * src/raptor_serialize.c: (raptor_serializer_start_to_iostream): Reset free_iostream_on_end flag to prevent crashes on reuse. 2010-10-11 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c: (raptor_ntriples_parse_recognise_syntax): Refuse to handle .ttl or .n3 named content. 2010-10-09 Dave Beckett <dave@dajobe.org> * librdfa/rdfa.c, librdfa/rdfa.h: Update to librdf GIT commit ddead5d1f72acd7fcd9e4c42503eadcce9d6ec87 2010-10-07 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv: Add raptor_parser_parse_iostream - was new in 1.9.0 2010-10-01 Dave Beckett <dave@dajobe.org> * src/raptor_log.c: (raptor_log_error): code tidy * src/raptor.h: raptor_log_message: autodocs 2010-09-28 Dave Beckett <dave@dajobe.org> * src/raptor_uri.c: Remove use of strncmp when strings are same length (raptor_uri_equals): Use memcmp() on same length strings to remove need for strncmp that looks for NULs. (raptor_uri_compare): Use memcmp() on same length strings to remove need for strncmp that looks for NULs. Sort shorter urls earlier by comparing lengths. 2010-09-28 Nicholas J Humfrey <njh@aelius.com> * tests/json/Makefile.am, tests/json/example4.json, tests/json/example4.nt: Added a more 'real-world' JSON pasing test file, that includes a rdf:type URI. * src/raptor_uri.c: (raptor_uri_equals): small optimisation - URI lengths are now compared before comparing strings. * src/raptor_uri.c: (raptor_uri_compare): URI comparison now takes into account the stored string length, and does not depend upon NULL-termination of strings. 2010-09-24 Dave Beckett <dave@dajobe.org> * configure.ac: Use AC_LANG_SOURCE for gcc flag test 2010-09-19 Dave Beckett <dave@dajobe.org> * ChangeLog, ChangeLog.10, Makefile.am: Added ChangeLog.10 for 2009 * NEWS.html, RELEASE.html, configure.ac, src/win32_raptor_config.h: Bumped version to 1.9.1 * src/raptor_rss_common.c: (raptor_new_rss_block): Copy block_term when needed, do not own it. 2010-09-16 Dave Beckett <dave@dajobe.org> * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Use raptor_term as arg to raptor_new_rss_block (raptor_new_rss_block): Change blank node ID to a raptor_term arg. (raptor_rss_start_element_handler): Adjust call to raptor_new_rss_block. 2010-09-13 Dave Beckett <dave@dajobe.org> * src/raptor_serialize_rss.c: (raptor_rss10_store_statement): Code tidy to move checks out of loop. 2010-09-12 Dave Beckett <dave@dajobe.org> * src/raptor_abbrev.c, src/raptor_serialize_rss.c: Remove internal uses of deprecated raptor_term_as_string() * src/raptor_serialize_rss.c: Copy statements when saving them for later. (raptor_rss10_store_statement): Move copy statement only when not handled, no need to do copy/free. (raptor_rss10_serialize_statement): Pass on handled but do not do copy statmenethere. * src/raptor_serialize_rss.c: When debugging free memory allocated by raptor_term_as_string() * src/raptor.h, src/raptor_term.c: Deprecated raptor_term_as_..._string() for _to_...string form (raptor_term_to_counted_string): Added replacing raptor_term_as_counted_string. (raptor_term_to_string): Added replacing raptor_term_as_string. (raptor_term_as_counted_string, raptor_term_as_string): Deprecated. * src/raptor_librdfa.c: Make rdfa (librdfa) parser correctly initialize static statement (raptor_librdfa_parse_init): Init static statement with raptor_statement_init() so reference counting and copying works. * src/raptor_rss.c: Make RSS parser correctly initialize static statement (raptor_rss_parse_init): Init static statement with raptor_statement_init() so reference counting and copying works. * src/raptor_serialize_rss.c: (raptor_rss10_store_statement): Never call raptor_free_statement() * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Tidy logic looking for type triples. * src/raptor_serialize_rss.c: Update debug messages to emit raptor term not assume URIs * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Do not set block URIs from blank nodes * src/raptor_serialize_rss.c: Fix crash in serializing to atom when comparing blank node as URI (raptor_rss10_serialize_statement): Do not assume object is URI. NOTE: This should use raptor_term_equals and be rewritten to remove the item_uri code. 2010-09-02 Nicholas J Humfrey <njh@aelius.com> * src/raptor_serialize_json.c: (raptor_json_serialize_start): Corrected option macro name from RAPTOR_OPTION_RELATIVE_URIS to RAPTOR_OPTION_JSON_CALLBACK. 2010-08-22 Nicholas J Humfrey <njh@aelius.com> * raptor2.rdf.in: Normalised tabs into spaces #ws 2010-08-17 Dave Beckett <dave@dajobe.org> * src/raptor_nfc_test.c: Update for Raptor 2 API. 2010-08-16 Dave Beckett <dave@dajobe.org> * Snapshotted raptor2_1_9_0 for 1.9.0 release (GIT 9223bfb82c7291dfc778d5bde690a6ecdb652e8e) 2010-08-15 Dave Beckett <dave@dajobe.org> * UPGRADING.html: remove overview section * INSTALL.html, LICENSE.html, NEWS.html, README.html, RELEASE.html, UPGRADING.html: Tidy HTML style and change title to Raptor RDF Syntax Library * TODO.html: Empty document and point at bugs.librdf.org * UPGRADING.html, Makefile.am: Added UPGRADING.html * docs/tmpl/section-general.sgml: Update tmpl for adding raptor_log_message * src/raptor.h: Remove newline so raptor_log_message gets scanned by gtk-doc! * docs/raptor-sections.txt: Add raptor_log_message * docs/.gitignore: Ignore raptor-fake.i for real * docs/.gitignore: Ignore raptor-fake.i * docs/Makefile.am, docs/tmpl/section-general.sgml: Make raptor-fake.i generate properly * scripts/Makefile.am: restore CLEANFILES * docs/Makefile.am, scripts/Makefile.am, scripts/fix-gtkdoc-header.pl: Attempt to fix raptor.h header to make gtk-doc happier * docs/raptor-1-to-2-map.tsv: more words in notes * docs/raptor-tutorial-parsing.xml: need base uri pointer * docs/raptor-tutorial-serializing.xml: enumeration * docs/raptor-tutorial-parsing.xml: enumeration * docs/raptor-tutorial-querying-functionality.xml: typo * docs/raptor-tutorial-parsing.xml: raptor 2 * docs/raptor-tutorial-intro.xml: raptor 2 * docs/.gitignore: Ignore upgrade-script.pl * scripts/build-formats.c: Call emit_format_to_syntax_list() at end to emit last seen mime type. * scripts/build-formats.c: (emit_format_to_syntax_list): Added to emit format -> list of parser/serializers. * scripts/build-formats.c: print previous mime type in types index * src/raptor_serialize_ntriples.c: Label nquads as "N-Quads" 2010-08-14 Dave Beckett <dave@dajobe.org> * docs/libraptor2.3: Cut down for raptor2 and point to API docs in HTML * README.html: N-Quads serializer * docs/raptor-parsers.xml: JSON parser * INSTALL.html, README.html, raptor2.rdf.in: Update docs to point to GitHub source and browse * 000-README-GIT.txt: Remove migration text * AUTHORS: Add Nicholas J Humfrey * docs/tmpl/section-locator.sgml: Update generated tmpl for locator rename * RELEASE.html: 1.9.0 notes * docs/raptor-serializers.xml: Add N-Quads section * tests/trig/Makefile.am: Add bug370.out to dist * tests/trig/Makefile.am, tests/trig/bug370.out, tests/trig/bug370.trig, tests/trig/example1.out, tests/trig/example2.out, tests/trig/example3.out: Convert TRiG output results file to N-Quads to check graph parameter. * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_ntriples.c: Add N-Quads serializer name 'nquads' using N-Triples serializer. Add conditions in makefile to allow ntriples and/or nquads serializers raptor_ntriples_serializer_context rename dummy field to is_quads (raptor_ntriples_serialize_statement): Pass on flag to print graph. (raptor_nquads_serializer_register_factory): Added to register nquads serializer with text/n-quads mime type (raptor_init_serializer_nquads): Added 2010-08-11 Dave Beckett <dave@dajobe.org> * tests/turtle/Makefile.am, tests/turtle/bad-23.ttl: Add bad test bad-23 for http://bugs.librdf.org/mantis/view.php?id=369 2010-08-09 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt, src/raptor.h, src/raptor_locator.c: Revert raptor_locator_uri_string to raptor_locator_uri to protect Reland SWIG API * configure.ac, src/raptor_general.c, src/raptor_internal.h: Remove --with-dmalloc and dmalloc library support 2010-08-09 Lauri Aalto <laalto@iki.fi> * src/raptor_term.c: STANDALONE flagging for raptor_term unit tests 2010-08-08 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv: ID function rename typo 2010-08-08 Dave Beckett <dave@dajobe.org> * docs/tmpl/section-parser.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-world.sgml: Update tmpls 2010-08-08 Dave Beckett <dave@dajobe.org> * docs/raptor-sections.txt: Update sections for ID handler changes * configure.ac: Protect checks for optional configure tests with quoting and X 2010-08-08 Nicholas J Humfrey <njh@aelius.com> * src/raptor_json.c: The JSON parser supports both Resource-Centric and Triples. 2010-08-06 Dave Beckett <dave@dajobe.org> * src/raptor_grddl.c: Simplify libxslt save/restore logic (raptor_libxslt_set_global_state): Always save default security prefs. (raptor_libxslt_reset_global_state): Always restore default security prefs. (raptor_init_parser_grddl_common): Init sec prefs if policy allows and NULL * src/raptor_grddl.c: Alter GRDDL init/cleanup of libxslt to be done around transform This means that raptor can operate in a single threaded environment with other libxslt users, since it saves/restores all the libxslt global vars that it needs back to their original state after every xslt transform. raptor_grddl_parser_context gains saved_xsltGenericError, saved_xsltGenericErrorContext and saved_xsltSecurityPrefs fields. (raptor_grddl_run_grddl_transform_doc): Use raptor_libxslt_set_global_state() and raptor_libxslt_reset_global_state() to save restore around transforms. (raptor_init_parser_grddl_common): Do not set default security prefs. (raptor_terminate_parser_grddl_common): NULL security prefs after freeing them. (raptor_libxslt_set_global_state): Added to save libxslt shared state that grddl parser needs to overwrite. (raptor_libxslt_reset_global_state): Added to reset state back to original values. Candidate for backporting to raptor1 since it has no API impact. * src/raptor_grddl.c: Document libxslt global settings. (raptor_grddl_run_grddl_transform_doc): set per-transform generic error handler * docs/raptor-1-to-2-map.tsv: Update from genid changes Renamed 1.9.0 genid functions are renamed again, moving to world class. - raptor_world_set_generate_bnodeid_parameters renamed from raptor_parser_set_default_generate_id_parameters - raptor_world_set_generate_id_handler renamed from raptor_parser_set_generate_id_handler New 1.9.0 genid function renamed: - raptor_world_generate_bnodeid renamed from raptor_parser_get_new_generated_id and loses type arg. * src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h: Make XSLT security preference setting totally disableable (raptor_world_set_libxslt_security_preferences): If user sets any value, even NULL, record that. (raptor_init_parser_grddl_common): If pointer is NULL and user didn't set it, only then make raptor-specific policy. (raptor_terminate_parser_grddl_common): If pointer is not NULL and raptor set it, then free policy. xslt_security_preferences_policy field of raptor_world internal renamed from free_xslt_security_preferences This patch is a candidate for backporting to raptor1. * src/raptor_www.c: (raptor_www_set_user_agent): memcpy comment * src/raptor_libxml.c: memcpy replacing more strcpy for known length strings. Check NUL copying. * src/raptor_www.c: memcpy replacing more strcpy for known length strings. Check NUL copying. * src/raptor_sax2.c: (raptor_sax2_start_element): memcpy replacing strcpy with known length string. * src/raptor_qname.c: memcpy replacing more strcpy for known length strings. Check NUL copying. * src/raptor_namespace.c: (raptor_new_namespace_from_uri): memcpy replacing strcpy * src/raptor_uri.c: (raptor_uri_filename_to_uri_string): memcpy replacing strcpy * src/raptor_uri.c: (raptor_new_uri_for_rdf_concept): memcpy replacing strcpy * src/raptor_uri.c: (raptor_new_uri_from_id): memcpy replacing strcpy * src/raptor_uri.c: (raptor_uri_print): Correct error check and simplify code. 2010-08-05 Nicholas J Humfrey <njh@aelius.com> * src/raptor_term.c: Changed behaviour of raptor_new_term_from_counted_blank() and raptor_new_term_from_blank() to generate a new identifier if NULL is passed in. * src/ntriples_parse.c: Fix for ntriples parsing after the raptor_world_generate_bnodeid() changes. Fix was to delete code - blank nodes must be named in ntriples. 2010-08-04 Dave Beckett <dave@dajobe.org> * src/raptor_guess.c, src/raptor_internal.h: Remove internal raptor_parser_get_current_base_id and raptor_parser_factory method * src/ntriples_parse.c, src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Move generate ID code from raptor_parser to raptor_world class (raptor_world_generate_bnodeid): Replaces raptor_parser_internal_generate_id with arg RAPTOR_GENID_TYPE_BNODEID. Enum raptor_genid_type deleted - only RAPTOR_GENID_TYPE_BNODEID was ever used. raptor_generate_bnodeid_handler handler typedef renamed from raptor_generate_id_handler since it now just applies to blank node IDs. raptor_generate_bnodeid_handler handler renamed from raptor_generate_id_handler. (raptor_free_world): Free user genid prefix if set. (raptor_world_set_generate_bnodeid_handler): Renamed from raptor_parser_set_generate_id_handler. (raptor_world_generate_bnodeid): Renamed from raptor_parser_get_new_generated_id and loses type arg. (raptor_world_set_generate_bnodeid_parameters): Renamed from raptor_parser_set_default_generate_id_parameters. Update all callers to mostly use raptor_world_generate_bnodeid() except where a user bnode ID is given, such as in Turtle _:foo or RDF/XML rdf:nodeid="foo". Remove copying of genid fields from parsers to parsers when creating sub-parsers for e.g. grddl. typedef raptor_parser loses generate_id* and default_generate_id* fields. (raptor_world_internal_generate_id): Renamed from raptor_parser_internal_generate_id and loses type arg. typedef raptor_world gains generate_bnodeid and default_generate_bnodeid fields. (raptor_free_parser): Lose tidying user genid prefix. (raptor_parser_copy_user_state): Remove copying of genid fields between parser user states. (raptor_parser_get_current_base_id): Deleted, no longer needed to support copying genids between parser states. 2010-08-03 Dave Beckett <dave@dajobe.org> * src/raptor_term.c: More raptor_term unit tests * src/Makefile.am, src/raptor_term.c: Add unit tests for raptor_term 2010-08-02 Dave Beckett <dave@dajobe.org> * src/raptor_term.c: (raptor_term_equals): Make terms *different* not equal if lengths are different 2010-07-20 Dave Beckett <dave@dajobe.org> * tests/rdfa/Makefile.am: typo * tests/rdfa/Makefile.am: Use automake conditional RAPTOR_PARSER_RDFA to enable tests * tests/json/Makefile.am: Use automake conditional RAPTOR_PARSER_JSON to enable tests * tests/grddl/Makefile.am: Use automake conditional RAPTOR_PARSER_GRDDL to enable tests * docs/raptor-parsers.xml: Added json parser section * src/raptor_json.c: Note this is RDF/JSON parser (resource centric) today * src/raptor_serialize_json.c: Accept "text/json" mime type with low Q for json serializers * INSTALL.html: words * INSTALL.html: correct autotools min versions * INSTALL.html: GIT * INSTALL.html: add YAJL pointers * configure.ac: add yajl pointer * configure.ac: Added --with-yajl=DIR (or 'no') to configure where yajl is installed. * scripts/process-changes.pl: docs 2010-07-02 Lauri Aalto <laalto@iki.fi> * tests/json/Makefile.am: Run JSON parser tests only if the parser is enabled 2010-07-01 Nicholas J Humfrey <njh@aelius.com> * src/raptor_json.c: Added space after commas in parameter lists * src/raptor_json.c: Removed spaces after if * src/raptor_json.c: Changed single line if-statments to two line if statements * src/raptor_json.c: Changed C++ style comments to C style * tests/json/Makefile.am, tests/json/bad-13.json: Added a Test Case for missing out the term type * src/raptor_json.c: Textual changes to error messages. 2010-06-30 Nicholas J Humfrey <njh@aelius.com> * src/raptor_json.c: Removed unused debugging code. * tests/json/Makefile.am, tests/json/bad-00.json, tests/json/bad-01.json, tests/json/bad-02.json, tests/json/bad-03.json, tests/json/bad-04.json, tests/json/bad-05.json, tests/json/bad-06.json, tests/json/bad-07.json, tests/json/bad-08.json, tests/json/bad-09.json, tests/json/bad-10.json, tests/json/bad-11.json, tests/json/bad-12.json: Added example of bad RDF/JSON to check for parse errors. * src/raptor_json.c: Slightly stricter parsing of JSON. Better error messages then things go wrong. * src/raptor_json.c, tests/json/Makefile.am, tests/json/example3.json, tests/json/example3.nt: Enabled allowing comments in JSON * src/raptor_json.c: Fixed comparision between signed and unsigned integers. 2010-06-29 Nicholas J Humfrey <njh@aelius.com> * src/raptor_json.c: Improved JSON syntax detection to look at the content. * src/raptor_json.c: Lots of code re-factoring. - Improved error handling - Using Raptor memory allocation - Improved memory management * src/raptor_json.c: Changed malloc() to RAPTOR_MALLOC, free() to RAPTOR_FREE(). * src/raptor_json.c: Rewrote fprintf(stderr, ...) to raptor_parser_fatal_error(...) 2010-06-28 Dave Beckett <dave@dajobe.org> * src/raptor_uri.c: (raptor_new_uri_from_counted_string): autodoc to note counted string need not be NULL-terminated. * src/raptor_term.c: autodocs to note counted string constructors need not be given NULL-terminated strings. 2010-06-27 Nicholas J Humfrey <njh@aelius.com> * src/raptor_json.c: Added RATOR_JSON_ prefix to symbols. Code cleanup. * src/raptor_json.c, tests/json/Makefile.am, tests/json/example1.json, tests/json/example1.nt, tests/json/example2.json, tests/json/example2.nt: Added support for parsing resource-centric JSON * configure.ac, tests/Makefile.am, tests/json/Makefile.am, tests/json/example1.json, tests/json/example1.nt, tests/json/example2.json, tests/json/example2.nt: Created some tests for RDF/JSON. * src/raptor_json.c: Added support for Bnodes and Datatyped literals. Fix for parsing small files. * src/raptor_json.c: Commiting initial work on writing an JSON parser. Currently only handles json-triples. Lots of tidying up required: - symbol names - remove debugging messages - sort out memory management 2010-06-26 Nicholas J Humfrey <njh@aelius.com> * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_parse.c: Added libyajl library checking and json parser building to automake 2010-06-06 Dave Beckett <dave@dajobe.org> * examples/grapper.c: code style * examples/Makefile.am: Add grapper-future rule * examples/grapper.c: fix menu preferences link * examples/grapper.c: Remove more deprecated GTK - GtkToolTips and trigger based on macro 2010-06-05 Dave Beckett <dave@dajobe.org> * examples/grapper.c: Better but preferences menu still broken * examples/grapper.c: Another attempt, still crashes. GTK docs also suck * examples/grapper-ui.xml, examples/grapper.c: GtkUIManager and external XML file is too damn complex to make work - disable. * examples/grapper-ui.xml: Add GTK UI xml * examples/grapper.c: more code explanation * examples/grapper.c: Make both combo box alternatives work * examples/grapper.c: Replace deprecated (in 2.4.x) gtk_option_menu with gtk_combo_box * examples/grapper.c: more 2.5.0+ code pruning * examples/grapper.c: Require GTK 2.5.0+ (that's still quite old!) * examples/grapper.c: code style * examples/grapper.c: Update to Raptor 2 API 2010-06-02 Dave Beckett <dave@dajobe.org> * docs/raptor-sections.txt: added raptor_new_term_from_counted_blank * src/raptor_term.c: fix raptor_new_term_from_counted_blank * docs/raptor-1-to-2-map.tsv, src/raptor.h, src/raptor_term.c: Added raptor_new_term_from_counted_blank for term with counted length ID. (raptor_new_term_from_counted_blank): Added * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt, docs/tmpl/section-triples.sgml: Update docs for raptor_new_term_from_counted_literal * src/raptor.h, src/raptor_term.c: Added raptor_new_term_from_counted_literal for constructing from strings with known lengths. (raptor_new_term_from_counted_literal): Added (raptor_new_term_from_literal): Now calls raptor_new_term_from_counted_literal. 2010-05-25 Dave Beckett <dave@dajobe.org> * src/raptor_term.c: (raptor_new_term_from_literal): Fail if language and datatype are given like librdf_new_node_from_typed_literal * docs/raptor-1-to-2-map.tsv, src/raptor.h, src/raptor_serialize_ntriples.c: (raptor_statement_ntriples_write): Add flag to decide whether to write graph term. * src/raptor_serialize_ntriples.c, src/raptor_statement.c: (raptor_statement_print_as_ntriples, raptor_statement_ntriples_write): Write N-Triples not N-Quads 2010-05-25 Lauri Aalto <laalto@iki.fi> * src/raptor_term.c: (raptor_new_term_from_literal): Ownership of language should not be taken. * src/raptor_term.c: (raptor_new_term_from_literal): Do not overwrite literal length with language length. 2010-05-24 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt: Add new statement methods to sections and functions map * src/raptor_serialize_html.c, src/raptor_serialize_rdfxml.c: (raptor_term_html_write, raptor_rdfxml_serialize_statement): Use literal and language length fields direct, remove strlen()s * src/raptor_serialize_ntriples.c: (raptor_term_ntriples_write, raptor_statement_ntriples_write): Check for NULL args and early write failures * src/raptor_term.c: (raptor_term_as_counted_string, raptor_term_as_string, raptor_term_print_as_ntriples, raptor_term_equals): Check for NULL term args * src/raptor_statement.c: (raptor_statement_compare): Return stable order if both statements are NULL * src/raptor_statement.c: (raptor_statement_print, raptor_statement_print_as_ntriples): Check statement arg is not NULL * src/raptor.h, src/raptor_statement.c: (raptor_statement_equals): Added to public API * src/raptor.h: Add raptor_statement_copy to public API * src/raptor.h, src/raptor_statement.c: Add new public function raptor_statement_clear (raptor_statement_clear): Added based on core of raptor_statement_free. (raptor_statement_free): Simplified. * src/raptor_statement.c: (raptor_new_statement,raptor_new_statement_from_nodes, raptor_statement_copy): Validate args are not NULL * src/raptor.h, src/raptor_internal.h: Export raptor_new_statement, raptor_new_statement_from_nodes and raptor_statement_copy to public API 2010-05-18 Dave Beckett <dave@dajobe.org> * src/Makefile.am, src/raptor_statement.c, src/raptor_term.c: Move raptor_term class code to new raptor_term.c * src/raptor_uri.c: (raptor_uri_compare): code tidier * src/raptor_uri.c: (raptor_uri_compare): Make both NULL be equal. * src/raptor_uri.c: (raptor_uri_compare): Update to match librdf_uri_compare when both NULL. 2010-05-16 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv: Added raptor_term_blank_value * scripts/Makefile.am: add rule for building libraptor2.la * src/raptor_locator.c: #docs * docs/raptor-sections.txt: Add raptor_term_blank_value * utils/rdfdiff.c: Update to new raptor_term blank fields * src/raptor_statement.c: Initialize raptor_term length fields (raptor_new_term_from_literal, raptor_new_term_from_blank): init the fields. (raptor_term_equals): Use lengths as short cut for difference. * src/raptor.h, src/raptor_rdfxml.c, src/raptor_serialize_dot.c, src/raptor_serialize_html.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, src/turtle_parser.y: raptor_term blank is now a new typedef raptor_term_blank_value with length field. Update all callers * src/raptor.h: raptor_term_literal_value gains string_len and language_len fields 2010-05-14 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_namespace.c, src/raptor_option.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_stringbuffer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libxml.c, src/raptor_xml.c, src/turtle_lexer.l, src/turtle_parser.y: code style: Replace strncpy with memcpy - never need strncpy zero-checking/filling semantics. 2010-05-12 Dave Beckett <dave@dajobe.org> * src/raptor_internal.h: Deleted raptor_unique_id prototype * src/raptor_abbrev.c: (raptor_unique_id): Deleted - never used. 2010-05-07 Dave Beckett <dave@dajobe.org> * src/raptor.h: Adjust raptor_term_type so enum values match librdf_node_type raptor_term_type: Made enum values match librdf_node_type usage and introduce unused type '3'. 2010-05-05 Dave Beckett <dave@dajobe.org> * LICENSE.html: Link to specific GPL 2.1 version doc. Wording and formatting 2010-05-04 Dave Beckett <dave@dajobe.org> * docs/raptor-tutorial-parsing.xml: pkg-config * docs/raptor-tutorial-parsing.xml: statement not triples * docs/raptor-tutorial-querying-functionality.xml: Fix exampel of listing parser options to use correct description. * docs/raptor-tutorial-querying-functionality.xml: RAPTOR_OPTION_LAST * docs/raptor-1-to-2-map.tsv: Update raptor_locator_print and raptor_avltree_print signatures * docs/raptor-tutorial-parsing.xml, docs/raptor-tutorial-serializing.xml: Update tutorial references * docs/tmpl/section-avltree.sgml, docs/tmpl/section-locator.sgml: Update tmpls * src/raptor.h, src/raptor_avltree.c: (raptor_avltree_print): Gains an int return status like other print functions * src/raptor.h, src/raptor_locator.c: (raptor_locator_print): Gains an int return status like other print functions * src/raptor_avltree.c: autodocs * docs/tmpl/section-triples.sgml: Update tmpls for raptor_term_compare and raptor_term_equals * src/raptor.h: fix prototype for raptor_term_equals to match code * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt: Add raptor_term_compare and raptor_term_equals to public API * src/raptor.h, src/raptor_internal.h: Move raptor_term_compare and raptor_term_equals to public API * src/raptor_statement.c: (raptor_term_equals): autodocs * src/raptor_parse.c: autodocs * docs/tmpl/section-triples.sgml: Remove RAPTOR_IDENTIFIER docs * docs/raptor-parsers.xml, docs/raptor-serializers.xml, docs/raptor-tutorial-intro.xml, docs/raptor-tutorial-parsing.xml, docs/raptor-tutorial-querying-functionality.xml, docs/raptor-tutorial-serializing.xml: Start to update tutorial - still working through WARNING * scripts/format-changes.pl, scripts/process-changes.pl: Update scripts 2010-05-03 Dave Beckett <dave@dajobe.org> * scripts/process-changes.pl: Generate a perl script to rename names * scripts/process-changes.pl: put docbook xml format generation optional * scripts/process-changes.pl: Use Getopt::Long and Pod::Usage for proper option handling * docs/Makefile.am: Rename format-changes.pl to process-changes.pl * scripts/Makefile.am: Rename format-changes.pl to process-changes.pl * scripts/process-changes.pl: switch to file handle arg on print functions Rename option to --docbook-xml DOCBOOK-XML file rather than print to stdout * docs/raptor-1-to-2-map.tsv: add note for raptor_statement_v2 * docs/raptor-1-to-2-map.tsv: raptor_log is not a type * docs/raptor-1-to-2-map.tsv: # before names in notes * scripts/format-changes.pl: Make links to enum values 2010-05-03 Lauri Aalto <laalto@iki.fi> * src/raptor_xml.c: fixed compiler warning * src/raptor_serialize_rdfxmla.c: #ws * src/turtle_parser.y: fixed casts for !RAPTOR_DEBUG 2010-05-02 Dave Beckett <dave@dajobe.org> * utils/Makefile.am: fix rapper.html rule for scripts * docs/raptor-1-to-2-map.tsv: annotations for raptor_identifier to raptor_term renamings * docs/raptor-1-to-2-map.tsv: Add annotations for old raptor_www_ functions * docs/raptor-1-to-2-map.tsv: Add more annotations for old functions and types * src/raptor_iostream.c: (raptor_new_iostream_to_string): Rename arg to malloc_handler * docs/raptor-1-to-2-map.tsv: typo * docs/raptor-1-to-2-map.tsv: annotate former message handler typedefs * docs/raptor-1-to-2-map.tsv: annotate former URI handler _func typedefs * docs/raptor-1-to-2-map.tsv: raptor_log_message is new * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt, docs/tmpl/section-avltree.sgml, docs/tmpl/section-general.sgml, docs/tmpl/section-www.sgml, src/raptor.h, src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_grddl.c, src/raptor_iostream.c, src/raptor_parse.c, src/raptor_rss_common.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_uri.c, src/raptor_www.c, src/turtle_parser.y: Renamed typedefs ending in _function to _handler. Also changed parameter names and internal field names from foo_fn to foo_handler to match. (raptor_data_free_handler, raptor_data_context_free_handler, raptor_data_context_print_handler and raptor_data_context_print_handler): Signature of these typedefs were changed to match the other handlers to became *pointers* to functions so e.g. a call with e.g.(raptor_data_context_free_handler*)blah becomes (raptor_data_context_free_handler)blah. raptor_data_compare_handler renamed from raptor_data_compare_function raptor_data_malloc_handler renamed from raptor_data_malloc_function raptor_data_free_handler renamed from raptor_data_free_function raptor_avltree_visit_handler renamed from raptor_avltree_visit_function Updated all definitions, fields and arguments to match. * scripts/.gitignore: ignore more * scripts/format-changes.pl: add change table titles * scripts/format-changes.pl: format types * src/raptor.h: autodocs * docs/tmpl/section-serializer.sgml: update tmpls * docs/raptor-1-to-2-map.tsv: Added raptor_serializer_flush * docs/raptor-sections.txt: add new functions * src/raptor.h: raptor_data_free_handler autodocs * docs/raptor-1-to-2-map.tsv: more things were added not removed * docs/raptor-1-to-2-map.tsv: more things were added not removed * docs/raptor-1-to-2-map.tsv: raptor_uri_source type was deleted not added. * docs/raptor-1-to-2-map.tsv: Add type changes * scripts/format-changes.pl: Ignore types for now 2010-04-30 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_serialize.c: (raptor_serializer_flush): Added * src/raptor_internal.h: raptor_serializer_factory_s gains serialize_flush factory method. * Makefile.am, configure.ac, docs/Makefile.am, docs/build-formats.c, docs/format-changes.pl, fix-groff-xhtml, scripts/Makefile.am, scripts/build-formats.c, scripts/fix-bison, scripts/fix-flex, scripts/fix-groff-xhtml, scripts/format-changes.pl, src/Makefile.am, src/fix-bison, src/fix-flex: Move scripts and utility programs into new scripts dir * docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-www.sgml: Update tmpls * docs/raptor-sections.txt, docs/tmpl/section-iostream.sgml, docs/tmpl/section-unused.sgml, docs/tmpl/section-www.sgml, src/raptor.h, src/raptor_iostream.c, src/raptor_www.c: Add typedef raptor_data_malloc_function raptor_data_malloc_function: added for a malloc() signature function. (raptor_www_fetch_to_string, raptor_new_iostream_to_string): Use for argument malloc_handler. * docs/raptor-sections.txt: Remove internal raptor_avltree_check and raptor_avltree_dump * docs/tmpl/section-general.sgml, docs/tmpl/section-parser.sgml: Update tmpls * src/raptor.h, src/raptor_internal.h: Move raptor_avltree_dump and raptor_avltree_check debug prototypes to internal header * docs/raptor-sections.txt: Add raptor_graph_mark_flags, raptor_parser_parse_iostream, raptor_syntax_bitflags * docs/tmpl/section-option.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-www.sgml, docs/tmpl/section-xml-namespace.sgml: Update tmpls 2010-04-29 Dave Beckett <dave@dajobe.org> * src/raptor_serialize_rss.c: code style * src/raptor_serialize.c: code style * src/raptor_abbrev.c: code style * src/raptor_librdfa.c: code style * src/raptor_turtle_writer.c: Update to add RAPTOR_OPTION_STRICT to cases. 2010-04-28 Dave Beckett <dave@dajobe.org> * docs/format-changes.pl: intro section * docs/raptor-1-to-2-map.tsv: More replacements Replace raptor_serializer_get_option_string with raptor_serializer_get_option Note replace raptor_iostream_write_string_turtle with raptor_string_python_write * docs/raptor-1-to-2-map.tsv: Add replacement note for delete raptor_set_parser_strict * docs/raptor-1-to-2-map.tsv: Remove raptor_world_enumerate_parsers with raptor_world_get_parser_description. * docs/raptor-sections.txt: update for graph_handler->graph_mark_handler renames * docs/raptor-sections.txt: Update functions for changes * docs/raptor-1-to-2-map.tsv: Update functions for 2010-03-26 to 2010-03-28 changes missed * docs/raptor-1-to-2-map.tsv: raptor_set_parser_strict removed * utils/rapper.1: Note -m/--mode removed but wasn't in the raptor V1 man page. * src/raptor_parse.c, utils/rapper.c: Replaced raptor_parser_set_strict() with RAPTOR_OPTION_STRICT (raptor_parser_set_strict): Removed from public API and made static, internal. (raptor_parser_set_option): When RAPTOR_OPTION_STRICT is seen, call above function to set the values. Update rapper to remove the -m/--mode lax/strict favouring the -f strict option with boolean value. * src/raptor.h, src/raptor_option.c: Add RAPTOR_OPTION_STRICT for parser with bool value * tests/rdfxml/Makefile.am: (check-scan-rdf): Use -f scanForRDF instead of removed option -s 2010-04-27 Dave Beckett <dave@dajobe.org> * docs/build-formats.c: Fix use of wrong array index. Rewrite for clarity * utils/rapper.1: changes * utils/rapper.1: adjust date * utils/rapper.1: Remove -s / --scan * utils/rapper.c: Remove option --scan / -s since it's the same as -f scanForRDF 2010-04-25 Dave Beckett <dave@dajobe.org> * src/raptor_librdfa.c: Set mime types for RDFA parser with higher Q than GRDDL parser * docs/build-formats.c: Add intro section and remove version from top. * docs/build-formats.c: Note when there is no parser or serializer for a mime type * src/raptor_serialize_html.c: Set html serializer Q 1.0 * src/raptor_serialize_json.c: Pick json resource serializer as json Q 1.0 choice * src/raptor_serialize_rdfxml.c: Make rdfxml serializer accept text/rdf with lower q * src/raptor_serialize_turtle.c: Make turtle serializer accept other turtle mime types with q < 10 * src/raptor_serialize_rss.c: Make RSS tag soup serializer accept other rss mime types with low q * src/raptor_rss.c: Make RSS tag soup parser accept application/atom+xml q=1.0 for atom. * docs/build-formats.c: Emit mime types index section 2010-04-24 Dave Beckett <dave@dajobe.org> * src/raptor_avltree.c, src/raptor_general.c, src/raptor_iostream.c, src/raptor_namespace.c, src/raptor_option.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_xml.c, src/raptor_xml_writer.c: Make all raptor object destructors handle NULL object pointer. All raptor_free_CLASS() functions when given a NULL object now just return rather than a) crash or b) abort() * docs/.gitignore: ignore more * tests/turtle/Makefile.am: remove deprecated rapper -n when testing turtle parser with with ntriples test * docs/.gitignore: ignore more * tests/rdfxml/Makefile.am: check-assume-rdf does not need -a flag. * docs/tmpl/section-avltree.sgml, docs/tmpl/section-constants.sgml, docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-memory.sgml, docs/tmpl/section-option.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-sax2.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-stringbuffer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-unicode.sgml, docs/tmpl/section-unused.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-www.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: Update doc tmpls * docs/build-formats.c: init parsers/serializers count to 0 * docs/.gitignore, docs/rdfcat.c, docs/rdfprint.c, docs/rdfserialize.c: Remove rdf*.c example files from git; copied in by maintainer rule * examples/.gitignore: Update examples for raptor2 API * .gitignore: Do not ignore examples dir 2010-04-19 Dave Beckett <dave@dajobe.org> * docs/build-formats.c: ws * docs/build-formats.c: tidy words * docs/build-formats.c: do not put a title on variablelist * docs/build-formats.c: optional desc list title * docs/raptor-docs.xml: Added raptor-formats.xml * docs/Makefile.am: Added raptor-formats.xml * docs/build-formats.c: now using raptor_iostream 2010-04-18 Dave Beckett <dave@dajobe.org> * docs/build-formats.c: Helper to print raptor syntaxes into docbook xml 2010-04-17 Dave Beckett <dave@dajobe.org> * utils/rapper.c: code style * utils/rapper.c: Remove unused -a flag. sort options strings alphabetically * utils/rapper.1: 2.0.0 * utils/rapper.c: Remove long deprecated -n flag to set syntax to ntriples * src/raptor_general.c, src/raptor_iostream.c, src/raptor_namespace.c, src/raptor_option.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_statement.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml.c, src/raptor_xml_writer.c: Make all constructors check for non-NULL args/world and call raptor_world_open() Adjusted some documentation to allow NULL args that weren't noted, such as raptor_new_turtle_writer() can take a NULL base_uri. * src/raptor.h: raptor_syntax_description docs * src/ntriples_parse.c, src/raptor.h, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: raptor_syntax_description need_base_uri now raptor_syntax_bitflags enum. (raptor_syntax_description): Change need_base_uri filed to a bitmask of bits defined in enum raptor_syntax_bitflags. Enables this structure to be used beyond parser and serializer formats. (raptor_syntax_bitflags): Added with RAPTOR_SYNTAX_NEED_BASE_URI flag. 2010-04-06 Lauri Aalto <laalto@iki.fi> * src/raptor_guess.c: (raptor_guess_guess_get_description): Do not call raptor_parser_get_description() with NULL arg. * src/ntriples_parse.c, src/raptor.h, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize_dot.c, src/raptor_serialize_html.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, src/turtle_parser.y: Removed writable static data. Changed *_names arrays to be const. Also fixed dimensions of *_names arrays to match number of elements. (raptor_syntax_description): Changed syntax names array to const to not lose const qualifiers in initialization/assignment. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c: (raptor_world_get_parser_description, raptor_world_get_serializer_description): Removed const qualifier from pass-by-value args. * src/raptor_serialize.c: #ws 2010-04-01 Dave Beckett <dave@dajobe.org> * src/raptor_serialize_html.c: code style 2010-04-01 Nicholas J Humfrey <njh@aelius.com> * ChangeLog: Updated ChangeLog to include new HTML Table serialiser. * configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_html.c: Added HTML Table serialiser. 2010-03-31 Dave Beckett <dave@dajobe.org> * src/raptor_serialize_ntriples.c: ntriples writes text/plain * utils/rapper.c: Use raptor_world_get_serializer_description() for serializer info. 2010-03-29 Dave Beckett <dave@dajobe.org> * examples/raptor_abort.c, examples/rdfcat.c, examples/rdfprint.c, examples/rdfserialize.c: Update examples to raptor2 API * examples/Makefile.am: 2010 * configure.ac: package name is raptor2 makes things a little easier * Makefile.am: Do not toy with distdir * raptor2.spec.in: Update for raptor2 * raptor2.pc.in: link with -lraptor2 * tests/Makefile.am: Use libraptor2.la * raptor2.pc.in: adjust includedir to be prefixed by package name * utils/Makefile.am: Use libraptor2.la * src/Makefile.am: libraptor2.la * .gitignore, docs/.gitignore, src/.gitignore: Update git ignores * docs/tmpl/section-general.sgml, docs/tmpl/section-option.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-xml-namespace.sgml: update doc tmpls * Makefile.am, configure.ac, docs/Makefile.am, docs/libraptor.3, docs/libraptor2.3, raptor-src-config.in, raptor.pc.in, raptor.rdf.in, raptor.spec.in, raptor2.pc.in, raptor2.rdf.in, raptor2.spec.in, src/Makefile.am, src/raptor-config.1, src/raptor-config.in: Rename raptor to raptor2 2010-03-27 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_parse.c: Added raptor_parser_parse_iostream() to parse from an iostream * src/raptor_rss.c: (raptor_rss_emit): Implement emit graph marks for rss-tag-soup parser. * src/raptor_rdfxml.c: Implement emit graph marks for rdfxml parser. * src/raptor_librdfa.c: Implement emit graph marks for librdfa parser. * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Tidy emit graph mark condition. * src/raptor_librdfa.c: ws * src/raptor_librdfa.c: (raptor_librdfa_generate_statement): Do nothing if there is no statement handler. * src/raptor_grddl.c: (raptor_grddl_parse_chunk): Implement graph marks for GRDDL parser. * src/raptor_grddl.c: (raptor_grddl_ensure_internal_parser): Disable graph marks for child parsers. * src/raptor_parse.c: (raptor_parser_start_graph, raptor_parser_end_graph): Use emit_graph_marks flag. * src/raptor_internal.h, src/raptor_parse.c: Add internal raptor_parser flag emit_graph_marks default set. * src/raptor_parse.c: save editor before commit! * src/raptor_internal.h, src/raptor_parse.c: (raptor_parser_copy_flags_state): Added to copy flags to/from parsers. * src/raptor_parse.c: (raptor_parser_copy_user_state): Copy failed, emitted_default_graph bit flags. * src/ntriples_parse.c: Implement graph marks for ntriples parser * src/turtle_common.h, src/turtle_parser.y: Switch to use raptor_parser emitted_default_graph field * src/raptor_internal.h: raptor_parser_s gains emitted_default_graph flag. * src/raptor.h, src/raptor_internal.h, src/raptor_parse.c, src/turtle_parser.y: Added raptor_parser_get_graph() and factory method (raptor_parser_get_graph): Added to get current graph for a parser. raptor_parser_factory: Added optional method get_graph. If missing this indicates that start/end graph marks need to be synthesised. (raptor_turtle_get_graph): Added to implement this for Turtle and TRiG parsers. * src/raptor.h, src/raptor_namespace.c, src/raptor_serialize_turtle.c, src/raptor_xml.c, src/raptor_xml_writer.c: Rename raptor_namespace_copy to raptor_namespace_stack_start_namespace (raptor_namespace_stack_start_namespace): Renamed from raptor_namespace_copy to follow conventions; this is not a copy constructor for the raptor_namespace class, it's a method on the raptor_namespace_stack class. Update all callers * src/raptor_qname.c: (raptor_qname_copy): Handle NULL qname arg. * src/turtle_common.h, src/turtle_parser.y, utils/rapper.c: Update Turtle and TRiG parsers to emit new graph marks * src/raptor.h, src/raptor_internal.h, src/raptor_parse.c: Updated graph mark handler mechanism in a stream of triples raptor_graph_mark_handler: Renamed from raptor_graph_handler since it returns not just a URI (or NULL for default graph) but flags that indicate if it was a start/end and whether the graph name was declared in the syntax or implicit by the stream of statements. raptor_graph_mark_flags: Added used above to record the start/end marks and declared/not. (raptor_parser_set_graph_mark_handler): Renamed from raptor_parser_set_graph_handler. raptor_parser: Renamed field to graph_mark_handler and changed type to match above. (raptor_parser_start_graph): Renamed from raptor_parser_set_graph_name and added is_declared flag. (raptor_parser_end_graph): Added. 2010-03-26 Dave Beckett <dave@dajobe.org> * docs/tmpl/section-triples.sgml: doc * docs/raptor-sections.txt: fix name * docs/raptor-sections.txt, src/raptor.h: Add extra typedefs for union to help gtkdoc * src/raptor.h: autodocs * docs/raptor-sections.txt: Update sections with renames * docs/raptor-1-to-2-map.tsv: Update for serializer descriptions raptor_serializers_enumerate* replaced by raptor_world_get_serializer_description. Added raptor_serializer_get_description * src/Makefile.am, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_simple.c: Remove obsolete 'simple' serializer' from sources that has not been enabled for a long time * src/raptor.h, src/raptor_internal.h, src/raptor_rss.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, utils/rapper.c: Syntax description replaces serializer enumeration and get desc methods. (raptor_world_get_serializer_description): Renamed from raptor_world_enumerate_serializers and now just takes single int param. (raptor_serializer_get_description): Added Updated all serializers to register static descriptions of names, mime types, label, uris. Updated rapper utility to use raptor_serializer_get_description() for listing serializers. * src/raptor_parse.c: code style * docs/raptor-1-to-2-map.tsv: Update changes for parser descriptions raptor_get_label, raptor_get_mime_type, raptor_get_need_base_uri are deleted and use result fields from raptor_parser_get_description() * docs/raptor-1-to-2-map.tsv: Use raptor_world_get_parser_description to replace raptor_parsers_enumerate* * src/raptor_parse.c: autodocs * src/raptor.h, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, utils/rapper.c: Syntax description replaces parser enumeration and get desc methods. (raptor_world_get_parser_description): Renamed from raptor_world_enumerate_parsers and now just takes single int param. (raptor_parser_get_label, raptor_parser_get_mime_type, raptor_parser_get_need_base_uri): Deleted; use raptor_world_get_parser_description() result fields instead. raptor_parser_factory gains an optional get_description factory method. (raptor_parser_get_name): Note this returns main name and point to raptor_parser_get_description() to get other names and info. (raptor_parser_get_description): Added to either use the factory method or else return the factory desc. (raptor_guess_guess_get_description): Updated guess parser to return internal description rather than that of 'guess'. Updated rapper utility to use raptor_parser_get_description() for listing parsers. * src/raptor.h: group public typedefs (code style) * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Use raptor_syntax_description inside raptor_parser_factory raptor_parser_factory loses fields about description replaced by a static raptor_syntax_description desc field. Updated all users to use factory->desc.FIELD rather than factory->FIELD for the descriptive fields. * src/raptor.h: Added raptor_type_q and raptor_syntax_description types to public API. * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Update parsers to register mime types count * src/raptor_parse.c: Check and use mime_types_count field. (raptor_world_register_parser_factory): Add maintainer/debug check of mime types count. (raptor_world_enumerate_parsers, raptor_parser_get_mime_type): Do not access mime types unless there is one. * src/raptor_internal.h: raptor_parser_factory gains mime_types_count field * src/raptor_internal.h, src/raptor_parse.c, src/turtle_parser.y: Remove raptor_parser_simple_error - only used once. (turtle_parser_error): Call raptor_log_error() direct. (raptor_parser_simple_error): Deleted. * src/raptor_parse.c: ws, code style 2010-03-25 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: Alter parser registration to be more static and declarative. raptor_parser_factory: field name turns into C array of names. field mime_types turns into a C array of #raptor_type_q (raptor_free_parser_factory): Do not free data fields that are now static and shared. (raptor_world_register_parser_factory): Reduce args to just world plus factory handler. (raptor_parser_factory_add_alias, raptor_parser_factory_add_mime_type): Deleted (raptor_world_get_parser_factory, raptor_world_enumerate_parsers, raptor_parser_get_mime_type, raptor_world_guess_parser_name, raptor_parser_get_accept_header_all): Update to handle mime_types as array of #raptor_type_q Alter all parser registrations to pass in static data for names, mime_types, label and uri_string in factory registration function handler. * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/turtle_parser.y: (raptor_world_register_parser_factory): Renamed from raptor_parser_register_factory. 2010-03-24 Dave Beckett <dave@dajobe.org> * src/raptor_internal.h: struct raptor_parser_factory_s: docs * src/raptor_parse.c: (raptor_parser_register_factory): autodocs 2010-03-23 Lauri Aalto <laalto@iki.fi> * src/raptor_statement.c: (raptor_term_as_counted_string): Fixed warning about strict aliasing. 2010-03-23 Lauri Aalto <laalto@iki.fi> * src/raptor_parse.c, src/raptor_serialize_turtle.c, src/strcasecmp.c: Fixed gcc4 warnings about using a char where an int is required 2010-03-21 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv, src/raptor.h, src/raptor_option.c: Remove raptor_option_get_value_type() - can use option description to get this and more details. 2010-03-20 Dave Beckett <dave@dajobe.org> * src/raptor_parse.c: (raptor_new_parser): Set default options *after* initialising options block. * src/raptor_option.c: autodoc words * src/raptor_option.c: raptor_world_get_option_from_uri - autodocs * src/raptor_option.c: raptor_option_get_value_type - fix autodoc * src/raptor_general.c: Added turtle writer label to raptor_domain_labels * docs/raptor-sections.txt: Add raptor_option_description * src/raptor.h: raptor_option_description reformatting for autodocs * docs/raptor-1-to-2-map.tsv: add notes * docs/raptor-1-to-2-map.tsv: Added new raptor_option_description functions raptor_world_get_option_description and raptor_free_option_description * docs/raptor-sections.txt: Added raptor_free_option_description * docs/raptor-sections.txt: raptor_parser_get_option_count renamed to raptor_option_get_count * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt: Update docs and API ref to remove options enumeration functions. * src/raptor.h, src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Remove all raptor_world_enumerate_CLASS_options functions. (raptor_world_options_enumerate_common): Remove internal function no longer used. Update parser test code to use option descriptions for testing option URIs. Update autodocs to refer to raptor_world_get_option_description() for getting the valid option IDs. * src/raptor.h, src/raptor_option.c, utils/rapper.c: Added option description class to describe any domain option. typedef raptor_option_description added (raptor_world_get_option_description): Added, to create an option description object for a domain and option ID. (raptor_free_option_description): Added to free an option description. (raptor_option_get_option_area_for_domain): Added internal helper to map option IDs to area bits. Update rapper to use option description instead of options enumeration calls. * docs/raptor-1-to-2-map.tsv, src/raptor.h, src/raptor_option.c, utils/rapper.c: Rename raptor_parser_get_option_count() to raptor_option_get_count(). * src/raptor.h: Add RAPTOR_DOMAIN_TURTLE_WRITER 2010-03-18 Lauri Aalto <laalto@iki.fi> * src/raptor.h, src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c, src/raptor_serialize.c: Changed raptor_*_set_option() to take in a const char* instead of char*. 2010-03-09 Dave Beckett <dave@dajobe.org> * docs/raptor-1-to-2-map.tsv: code style * src/raptor.h: code style * docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-xml.sgml: Update doc tmpls * docs/raptor-1-to-2-map.tsv: Update raptor_xml_writer_set_feature/string new names * docs/raptor-1-to-2-map.tsv: Remove raptor_world_set_www_flags which was added in raptor2 * docs/raptor-sections.txt, src/raptor.h, src/raptor_general.c, src/raptor_www.c: (raptor_world_set_flag): Replaces raptor_world_set_www_flags with world flag RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH * docs/raptor-sections.txt: Remove get/set option_string forms * docs/raptor-1-to-2-map.tsv: Update serializer and xml_writer get/set options to use just 1 function. * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c: Update sax2 set options (there is no get) to use generic code. (raptor_new_sax2): Init options structure. (raptor_free_sax2): Clear options structure. (raptor_sax2_set_option): Alter signature to use new format. This API is not yet public. Update code and callers to use the option access macros. * src/raptor_xml_writer.c: (raptor_new_xml_writer): Call raptor_object_options_init * src/raptor.h, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_xml_writer.c, utils/rapper.c: Update xml writer set/get option API to use generic code raptor_xml_writer_s: Add raptor_object_options field and delete flags, indent, xml_version, xml_declaration fields that are now managed by it. (raptor_new_xml_writer): Init options with raptor_object_options_init. Set defaults that are not 0 or NULL. (raptor_free_xml_writer): Use raptor_object_options_clear() to tidy up option strings. (raptor_xml_writer_set_option): Use raptor_object_options_set_option(). (raptor_xml_writer_set_option_string): Deleted, merged into above. (raptor_xml_writer_get_option): Use raptor_object_options_get_option(). (raptor_xml_writer_get_option_string): Deleted, merged into above. Update many references in xml_writer code to numeric and string options to use RAPTOR_OPTIONS_GET/SET_STRING/NUMERIC macros. Update callers of raptor_xml_writer_set_option() inside serializers to pass in NULL string arg. Update rapper utility to use new set_options style calls for parser and serializer. * src/raptor.h, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c: Update serializer set/get option API to use generic code raptor_serializer_s: Add raptor_object_options field and delete multiple option_* fields that are now managed by it. (raptor_new_serializer): Init options with raptor_object_options_init. Set defaults that are not 0 or NULL. (raptor_free_serializer): Use raptor_object_options_clear() to tidy up option strings. (raptor_serializer_set_option): Use raptor_object_options_set_option(). (raptor_serializer_set_option_string): Deleted, merged into above. (raptor_serializer_get_option): Use raptor_object_options_get_option(). (raptor_serializer_get_option_string): Deleted, merged into above. Update many references in serializers to numeric and string options to use RAPTOR_OPTIONS_GET/SET_STRING/NUMERIC macros. Some code tidying to break long lines. * docs/raptor-1-to-2-map.tsv: Update API docs for raptor_parser_set_option: args changed raptor_parser_set_option_string: deleted, use above raptor_parser_get_option: args changed raptor_parser_get_option_string: deleted, use above * src/raptor_parse.c: autodocs * src/raptor_option.c: autodocs * src/raptor.h, src/raptor_internal.h, src/raptor_parse.c: Update parser set/get option API to use generic code raptor_parser_s: loose cache_control and user_agent char* option fields that are now managed by the raptor_object_options. (raptor_free_parser): Use raptor_object_options_clear() to tidy up option strings. (raptor_parser_set_option): Use raptor_object_options_set_option(). (raptor_parser_set_option_string): Deleted, merged into above. (raptor_parser_get_option): Use raptor_object_options_get_option(). (raptor_parser_get_option_string): Deleted, merged into above. Update references to string options to use RAPTOR_OPTIONS_GET/SET_STRING macros. * src/raptor_internal.h, src/raptor_option.c: Move support for option get/set into generic code and handle strings. (raptor_object_options_copy_state): Copy strings when copying state. (raptor_object_options_init): Set integers / strings to 0 / NULL. (raptor_object_options_clear_state): Added to free strings. (raptor_object_options_get_option): Added to get any option for an option area. (raptor_object_options_set_option): Added to set any option for an option area. * src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c: Added raptor_object_options_init to initialise options object. (raptor_object_options_init): Added (raptor_new_parser): Call above to init parser's options block. * src/raptor_internal.h: Made raptor_object_options contain an array of union str/int values and area. raptor_object_options gains raptor_option_area area field and options is now an array of raptor_str_int (union of char*/int) Adjusted RAPTOR_OPTIONS_GET/SET_NUMERIC macros to use integer part of union. * src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c: Rename raptor_object_options_copy to raptor_object_options_copy_state since it is not a copy constructor (raptor_object_options_copy_state): Renamed from raptor_object_options_copy. * src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c: Add raptor_object_options_copy() for copying options state (raptor_object_options_copy): Added. (raptor_parser_copy_user_state): Use above. * src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c: Move per-parser-project options into a raptor_object_options type. raptor_object_options typedef added. raptor_parser_s: use above rather than array of int. (RAPTOR_OPTIONS_GET_NUMERIC, RAPTOR_OPTIONS_SET_NUMERIC): Added and used by parsers. * src/raptor_statement.c: (raptor_term_as_counted_string): Use raptor_term_ntriples_write() Intended to address Issue#0000357 2010-03-08 Dave Beckett <dave@dajobe.org> * docs/raptor-docs.xml, docs/tmpl/section-uri-factory.sgml: Remove remaining uri-factory files * src/raptor_general.c: (raptor_world_set_log_handler): Allow setting after world is open. * docs/tmpl/section-unused.sgml: Update doc tmpls * docs/raptor-1-to-2-map.tsv: raptor_new_iostream_from_handler is arg change. no notes * docs/raptor-1-to-2-map.tsv: raptor_uri_is_file_uri is just a rename * docs/format-changes.pl: tweak format_notes regexes * docs/raptor-1-to-2-map.tsv: more deprecation notes * docs/raptor-1-to-2-map.tsv: update raptor_new_identifier/_v2 notes * docs/raptor-1-to-2-map.tsv: raptor_syntax_name_check and raptor_syntax_name_check_v2 replaced by raptor_world_is_parser_name * docs/format-changes.pl: Make format_notes() take is_inline param * docs/format-changes.pl: remove # from formatted type name * docs/format-changes.pl: format notes * docs/format-changes.pl: format notes when present * docs/raptor-1-to-2-map.tsv: Add change notes field * docs/format-changes.pl: read notes field * docs/format-changes.pl: ignore comments 2010-03-08 Lauri Aalto <laalto@iki.fi> * src/raptor_general.c: (raptor_world_set_flag): Set uri_interning to passed in value. 2010-03-07 Dave Beckett <dave@dajobe.org> * docs/format-changes.pl: headers for changed * docs/format-changes.pl: adjust headers * docs/.gitignore, docs/Makefile.am, docs/format-changes.pl, docs/raptor-docs.xml: Add raptor changes formatting script format-changes.pl * docs/raptor-1-to-2-map.tsv, raptor-1-to-2-map.tsv: Move raptor-1-to-2-map.tsv to docs * raptor-1-to-2-map.tsv: move to 1 line TSV * raptor-1-to-2-map.tsv: raptor 1 to raptor 2 function API map * docs/raptor-sections.txt: Add RAPTOR_V2_AVAILABLE to sections. * docs/tmpl/section-unused.sgml, src/raptor_uri.c: fix docbook escapes for % in comments * src/raptor_uri.c: autodocs and docbook for uri-hex literals * src/raptor.h: autodocs for raptor_data_compare_function and raptor_data_free_function * src/raptor.h: autodocs for raptor_avltree, raptor_avltree_iterator and raptor_avltree_visit_function. * src/raptor_avltree.c: autodocs for raptor_avltree_print * src/raptor_unicode.c: autodocs and docbook for linking to urls with #s * src/raptor_xml.c: autodocs * src/raptor_statement.c: autodocs * docs/tmpl/section-avltree.sgml: Added avltree template * docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-option.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-stringbuffer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-unicode.sgml, docs/tmpl/section-unused.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: Updated sgml templates * docs/raptor-sections.txt: raptor_avltree_dump not raptor_avltree_debug * docs/raptor-sections.txt, src/raptor.h, src/raptor_avltree.c: Added enum raptor_avltree_bitflags for raptor_new_avltree() flags with docs. raptor_avltree_bitflags added with docs on flags. (raptor_new_avltree): Updated docs to point to above. * src/raptor.h, src/raptor_general.c, src/raptor_libxml.c: Rename raptor_world_flag enum values to remove plural FLAGS * src/raptor.h: autodocs * src/raptor_statement.c: autodocs * docs/raptor-sections.txt: autodocs * src/raptor_iostream.c: autodocs * src/raptor_locator.c: autodocs * src/raptor_avltree.c: autodocs * src/raptor.h: autodocs * src/raptor_namespace.c: autodocs * docs/raptor-sections.txt: more new names * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_uri.c: Give raptor_world a flags mechanism for pre-open configuration raptor_world_flags: Replaces raptor_libxml_flags and is an enum not a bitmask. Add RAPTOR_WORLD_FLAGS_URI_INTERNING flag for disabling URI interning using an AVL-Tree. (raptor_world_set_libxslt_security_preferences, raptor_world_set_log_handler): Gains an int return value to report failure if world is already opened. (raptor_world_set_flag): Replaces raptor_world_set_libxml_flags and has both an enum flag, int value and int error return. Update libxml code looking for world->libxml_flags to use new enum names as bitmasks. * src/Makefile.am, src/raptor_general.c, src/raptor_log.c: Move raptor logging code to new raptor_log.c 2010-03-06 Dave Beckett <dave@dajobe.org> * src/raptor_option.c: code style static int raptor_option_uri_prefix_len replaces #define RAPTOR_OPTION_URI_PREFIX_LEN * src/raptor_parse.c: autodocs * src/raptor.h, src/raptor_general.c: Added raptor_domain and add it to raptor_log_message structure 2010-03-02 Dave Beckett <dave@dajobe.org> * src/raptor_general.c: Code style 2010-03-01 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, utils/rapper.c, utils/rdfdiff.c: Added raptor_log_message for message callbacks. raptor_log_message: added struct raptor_log_handler function prototype now takes just user dat and message. raptor_world_s gains a static raptor_log_message for use in errors. No field here is reference counted. (raptor_log_error): Rename arg to text and init raptor_log_message structure in world object. Updated rapper and rdfdiff log handler functions to new signature. 2010-02-26 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_general.c: (raptor_log_level_get_label): Added * src/raptor.h: Move raptor_log_level earlier * src/turtle_parser.y: (graph): Do not free graph name twice for TRIG { } * src/raptor_general.c: 2010 2010-02-26 Lauri Aalto <laalto@iki.fi> * src/raptor_statement.c: (raptor_term_compare): Allow NULL terms in comparison * src/raptor_statement.c: (raptor_new_statement_from_nodes): free passed in graph term on alloc failure * src/turtle_parser.y: (graph): No need to NULL something that's already NULL. * src/raptor.h: (raptor_statement): fixed docs * src/turtle_parser.y: (raptor_turtle_parse_terminate): Set graph_name to NULL after freeing to prevent a double free. 2010-02-25 Dave Beckett <dave@dajobe.org> * src/turtle_common.h, src/turtle_parser.y: Generate graph name in raptor_statement object for TRIG syntax struct raptor_turtle_parser_s gains raptor_term* graph_name. Turtle parser: if trig is set, update graph_name field when { and } are parsed, in addition to the raptor_parser_set_graph_name() calls (raptor_turtle_parse_terminate): Free any existing graph name. (raptor_turtle_generate_statement): Set statement graph name for TRIG, free it if copied in. End early if there is no statement handler, no need to compute and free terms. * src/raptor_statement.c: (raptor_free_term): Return if term is nULL * src/raptor.h, src/raptor_internal.h, src/raptor_statement.c, src/turtle_parser.y: Added graph name to raptor_statement raptor_statement typedef gains an optional raptor_term* graph field for the graph name of the triple. (raptor_new_statement_from_nodes): Gains an optional graph argument. (raptor_statement_copy, raptor_free_statement, raptor_statement_print, raptor_statement_print_as_ntriples): Updated to use graph field if present. Updated raptor_new_statement_from_nodes() callers in turtle parser. 2010-02-23 Lauri Aalto <laalto@iki.fi> * src/raptor_uri.c: (raptor_uri_finish): Set world->uris_tree to NULL after freeing * src/raptor_serialize_turtle.c: (raptor_turtle_serialize_init): Free rdf_type_uri, uri_term - already copied to other objects. 2010-02-22 Lauri Aalto <laalto@iki.fi> * src/raptor_parse.c: (raptor_parser_factory_add_alias): Do not leak previously added aliases. FIXME: Discards previously added aliases. 2010-02-21 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c, src/raptor.h, src/raptor_nfc_test.c, src/raptor_unicode.c, src/turtle_common.c: (raptor_unicode_utf8_string_put_char): renamed from raptor_unicode_string_put_char() * src/raptor.h, src/raptor_internal.h: Export raptor_term_copy to public API. * docs/raptor-sections.txt, src/ntriples_parse.c, src/raptor.h, src/raptor_internal.h, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_xml.c, src/turtle_common.c: Define raptor_unicode_max_codepoint for magic number U+10FFFF 2010-02-18 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c, src/raptor.h, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_xml.c: (raptor_unicode_utf8_string_get_char): Renamed from raptor_unicode_decode_utf8_char() * src/raptor.h, src/raptor_nfc_test.c, src/raptor_unicode.c: (raptor_unicode_check_utf8_string): Renamed from raptor_utf8_check() * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_unicode.c: (raptor_unicode_check_utf8_nfc_string): Renamed from raptor_utf8_is_nfc() Internal function rename. * src/ntriples_parse.c, src/raptor.h, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_xml.c: (raptor_unicode_decode_utf8_char): Renamed from raptor_utf8_to_unicode_char() * src/Makefile.am, src/raptor_unicode.c, src/raptor_utf8.c: Renamed raptor_utf8.c to raptor_unicode.c * src/raptor.h, src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_serialize_json.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_uri.c: raptor_new_avltree() loses world arg. (raptor_new_avltree): Delete world arg that is unused and not necessary to tie an avltree to raptor world. * src/raptor.h, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_namespace.c, src/raptor_qname.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_simple.c, src/raptor_turtle_writer.c, src/raptor_xml.c, src/raptor_xml_writer.c: Rename raptor_iostream write bytes/string method to raptor_iostream_TYPE_write form with iostream arg at end. (raptor_iostream_write_bytes, raptor_iostream_write_byte, raptor_iostream_read_bytes): Put iostream arg at end but don't move type, bytes are the lowest level iostream read/writing routines so use a different convention to writing 'types'. (raptor_iostream_string_write); Renamed from raptor_iostream_write_string(). (raptor_iostream_counted_string_write): Renamed from raptor_iostream_write_counted_string(). Update callers - lots of them! * src/raptor_iostream.c: (raptor_iostream_write_bytes): Move offset after a successful write. * src/raptor.h, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_serialize_simple.c, src/raptor_turtle_writer.c, src/raptor_xml.c: Rename iostream writing methods to raptor_iostream_TYPE_write form. (raptor_iostream_decimal_write): Renamed from raptor_iostream_write_decimal() (raptor_iostream_hexadecimal_write): Renamed from raptor_iostream_format_hexadecimal() (raptor_stringbuffer_write): Renamed from raptor_iostream_write_stringbuffer() (raptor_uri_write): Renamed from raptor_iostream_write_uri() (raptor_xml_element_write): Renamed from raptor_iostream_write_xml_element() * src/raptor.h, src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Renamed raptor_namespaces_qname_from_uri() to raptor_new_qname_from_namespace_uri() * src/raptor.h, src/raptor_xml.c, src/raptor_xml_writer.c: Rename XML escaping utility functions to be consistent (raptor_xml_escape_string_any): Renamed from raptor_xml_any_escape_string() (raptor_xml_escape_string_any_write): Renamed from raptor_xml_any_escaped_string_write() (raptor_xml_escape_string_write): Renamed from raptor_xml_escaped_string_write() 2010-02-18 Lauri Aalto <laalto@iki.fi> * src/raptor_internal.h, src/raptor_sax2.c: (raptor_sax2_init,raptor_sax2_finish,raptor_world_s): Removed sax2_initialized flag as no longer necessary. * utils/rdfdiff.c: raptor_parse_uri() -> raptor_parser_parse_uri() 2010-02-17 Dave Beckett <dave@dajobe.org> * docs/raptor-sections.txt, docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-option.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-www.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: update doc templates and sections for function renames * src/raptor.h, src/raptor_serialize.c, src/raptor_serialize_rss.c, utils/rapper.c: Rename serializer methods to match raptor_CLASS_METHOD convention (raptor_serializer_serialize_end): Renamed from raptor_serialize_end(). (raptor_serializer_set_namespace): Renamed from raptor_serialize_set_namespace(). (raptor_serializer_set_namespace_from_namespace): Renamed from raptor_serialize_set_namespace_from_namespace(). (raptor_serializer_start_to_file_handle): Renamed from raptor_serialize_start_to_file_handle(). (raptor_serializer_start_to_filename): Renamed from raptor_serialize_start_to_filename(). (raptor_serializer_start_to_iostream): Renamed from raptor_serialize_start_to_iostream(). (raptor_serializer_start_to_string): Renamed from raptor_serialize_start_to_string(). (raptor_serializer_serialize_statement): Renamed from raptor_serialize_statement(). Updated callers * src/raptor.h, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c, utils/rapper.c: Rename parse methods to match raptor_CLASS_METHOD convention (raptor_parser_parse_file_stream): Renamed from raptor_parse_file_stream() (raptor_parser_parse_file): Renamed from raptor_parse_file() (raptor_parser_parse_uri): Renamed from raptor_parser_uri() (raptor_parser_parse_uri_with_connection): Renamed from raptor_parse_uri_with_connection() * utils/rapper.c: Update call to raptor_namespaces_format * src/raptor.h, src/raptor_namespace.c, src/raptor_xml.c, src/raptor_xml_writer.c, utils/rapper.c: Rename namespace methods to match raptor_CLASS_METHOD convention (raptor_namespace_format_as_xml): Renamed from raptor_namespaces_format() (raptor_xml_namespace_string_parse): Renamed from raptor_new_namespace_parts_from_string() since it is not a constructor for anything. Tidied docs and code. Updated callers. * src/raptor.h, src/raptor_www.c: (raptor_world_set_www_flags): Renamed from raptor_www_no_www_library_init_finish() and gains flags arg. * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_statement.c: raptor_term_print_as_ntriples() now uses raptor_term_ntriples_write() (raptor_term_print_as_ntriples): Put handle at end like other FILE* print methods. Update callers * src/raptor.h, src/raptor_general.c: Remove raptor_print_ntriples_string() debug function * src/raptor.h, src/raptor_serialize_ntriples.c: Give raptor_term_ntriples_write() and raptor_statement_ntriples_write() a return value * src/raptor.h, src/raptor_json_writer.c, src/raptor_namespace.c, src/raptor_qname.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_turtle_writer.c, src/raptor_xml.c, src/raptor_xml_writer.c: Rename write to iostream methods of class to follow raptor_CLASS_write() form (raptor_term_ntriples_write): Renamed from raptor_iostream_write_term_ntriples() and moved iostream to last arg. (raptor_xml_any_escaped_string_write): Renamed from raptor_iostream_write_xml_any_escaped_string() and moved iostream to last arg. (raptor_xml_escaped_string_write): Renamed from raptor_iostream_write_xml_escaped_string() and moved iostream to last arg. (raptor_qname_write): Renamed from raptor_iostream_write_qname() and moved iostream to last arg. (raptor_namespace_write): Renamed from raptor_iostream_write_namespace() and moved iostream to last arg. (raptor_string_ntriples_write): Renamed from raptor_iostream_write_string_ntriples() and moved iostream to last arg. (raptor_string_python_write): Renamed from raptor_iostream_write_string_python() and moved iostream to last arg. * src/raptor.h, src/raptor_internal.h, src/raptor_www.c: Move raptor_www_init and raptor_www_finish to internal API. * src/raptor_parse.c: Define ACCEPT_HEADER_LEN since this has been a crash bug twice. * src/ntriples_parse.c: (raptor_ntriples_generate_statement): Let datatype URI be freed after making literal term. * src/raptor_parse.c: (raptor_parser_get_accept_header): strncpy 9 * src/ntriples_parse.c: Use raptor_free_statement() to clear static statement. * src/raptor_statement.c: (raptor_free_statement): use if(dynamic...) * src/raptor_statement.c: (raptor_free_statement): NULL triple part pointers after free terms. * src/ntriples_parse.c: (raptor_ntriples_parse_init): Init static statement. 2010-02-16 Dave Beckett <dave@dajobe.org> * src/raptor_www_test.c: test fix for www * src/raptor.h, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_www.c, src/raptor_www_test.c: Rename raptor_www constructor / destructor to standard names (raptor_new_www): Renamed from raptor_www_new (raptor_new_www_with_connection): Renamed from raptor_www_new_with_commection (raptor_free_www): Renamed from raptor_www_free Update all callers. 2010-02-16 Lauri Aalto <laalto@iki.fi> * src/raptor_statement.c: (raptor_free_statement): Free terms contained in statically allocated statements. * src/raptor_iostream.c: raptor_iostream write_bytes handlers are supposed to return the number of bytes written or 0 on failure * src/raptor.h, src/raptor_uri.c: (raptor_uri_get_world): Added new API helper function. Needed to prevent API breakage in librdf_uri. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Fixed compilation with RAPTOR_DEBUG > 1. * src/turtle_parser.y: Replaced raptor_term_print() calls with raptor_term_print_as_ntriples() to compile with RAPTOR_DEBUG > 1. 2010-02-14 Dave Beckett <dave@dajobe.org> * docs/tmpl/section-iostream.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-option.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-xml.sgml: Update generated docs * README.html: GIT * src/raptor_parse.c: (raptor_parser_get_accept_header): Static accept header should be 9 when string is correct. 2010-02-12 Lauri Aalto <laalto@iki.fi> * src/raptor.h: Reintroduced RAPTOR_V2_AVAILABLE flag so that library users can support both raptor1 and raptor2. 2010-02-11 Lauri Aalto <laalto@iki.fi> * src/raptor.h, src/raptor_internal.h: Pulled raptor_statement_init(), raptor_free_statement() to public API. 2010-02-10 Lauri Aalto <laalto@iki.fi> * src/raptor.h, src/raptor_internal.h, src/raptor_statement.c: Pulled raptor_new_term_from_{uri,literal,blank}(), raptor_free_term() to public API. Added API documentation. 2010-02-09 Lauri Aalto <laalto@iki.fi> * src/raptor_option.c: Fixed warnings about enum-int mismatches. 2010-02-05 Lauri Aalto <laalto@iki.fi> * src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_json.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_uri.c, src/raptor_xml.c, src/raptor_xml_writer.c: indent + whitespace * src/raptor_rdfxml.c: Made daml_namespace_uri_string_len const. Does not need to be initialised data. * src/raptor_iostream.c: (raptor_iostream_write_end): Return success (0) if iostream handler does not implement write_end. Was returning an uninitialized value (most likely non-0). * src/fix-bison, src/turtle_parser.y: Removed fix-bison/yydestruct hack to pass in YYPARAM* to %destructors. Was required for raptor_uri cleanup before raptor_uri became a struct containting raptor_world*. * src/raptor_www.c: (raptor_www_init,raptor_www_finish): Pulled functionality from similar _common functions (removed, no longer a need to share functionality). * src/raptor_serialize_rdfxmla.c: Remove accidental formatting whitespace from string literal. * src/raptor_rfc2396.c: Fixed code formatter artifact in comment URL. * src/raptor.h: Fixed typo in comment. 2010-02-06 Dave Beckett <dave@dajobe.org> * tests/turtle/Makefile.am: Add check-warn-rdf to check-local * tests/turtle/Makefile.am: Move test-35 to TEST_WARN_FILES * src/raptor_statement.c: (raptor_new_term_from_literal): Remove language used with typed literal and generate warning * src/turtle_parser.y: Fix warning message * src/turtle_parser.y: Remove language used with typed literal and generate warning * tests/turtle/Makefile.am, tests/turtle/test-35.out, tests/turtle/test-35.ttl: Add turtle test 35 to ensure language is removed when datatype is present 2010-02-05 Dave Beckett <dave@dajobe.org> * docs/raptor-sections.txt: some more fn renames * docs/raptor-docs.xml: rename section-feature.xml to section.option.xml * src/raptor_parse.c: (main): need program even when not debugging * docs/raptor-sections.txt, docs/tmpl/section-feature.sgml, docs/tmpl/section-option.sgml: Rename feature to option - tutorial docs not updated * utils/rapper.c: Use raptor_option_get_value_type_label to print option types * src/raptor.h, src/raptor_option.c: (raptor_option_get_value_type_label): Added * src/raptor_option.c: Update option descriptions to give specific instance names. * utils/rapper.c: feature->option in API calls except leave -f/--feature alone * src/raptor_internal.h, src/raptor_option.c: Renamed raptor_options_enumerate_common to raptor_world_options_enumerate_common * src/raptor_uri.c: (main): Make test code less verbose except when very debuggy. * src/raptor_rfc2396.c: (main): Make test code less verbose except when very debuggy. * src/raptor_www_test.c: (main): Make test code less verbose except when very debuggy. * src/raptor_sequence.c: (main): Make test code less verbose except when very debuggy. * src/raptor_iostream.c: (main): Make test code less verbose except when very debuggy. * src/raptor_stringbuffer.c: (main): Make test code less verbose except when very debuggy. * src/raptor_parse.c: (main): Make test code less verbose except when very debuggy. * src/raptor_option.c: Restore old feature URI prefix * src/Makefile.am, src/raptor.h, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Rename feature to option * src/raptor_feature.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Move raptor_world_enumerate_*_features functions to raptor_feature.c * src/raptor_serialize.c: #autodocs * src/raptor_feature.c, src/raptor_internal.h, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Replace raptor_feature_get_areas with raptor_feature_is_valid_for_area (raptor_feature_get_areas): Deleted. (raptor_feature_is_valid_for_area): Added to check if a feature is valid for a given area; this all the calls to raptor_feature_get_areas() ever was used for. * src/raptor_xml_writer.c: Check for valid xml writer features before getting or setting them. (raptor_xml_writer_set_feature, raptor_xml_writer_set_feature_string, raptor_xml_writer_get_feature, raptor_xml_writer_get_feature_string): Use raptor_feature_get_areas() to check the features are valid. * src/raptor_internal.h, src/raptor_turtle_writer.c: Check for valid turtle writer features before setting them. (raptor_world_enumerate_turtle_writer_features): Renamed from raptor_turtle_writer_features_enumerate() (raptor_turtle_writer_set_feature, raptor_turtle_writer_set_feature_string): Use raptor_feature_get_areas() * src/raptor_serialize.c: Check for valid serializer features before getting them (raptor_serializer_get_feature, raptor_serializer_get_feature_string): Use raptor_feature_get_areas() to check for valid serializer features. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Remove unused RAPTOR_FEATURE_START_URI * src/raptor_serialize.c: Check for valid serializer features before setting them (raptor_serializer_set_feature, raptor_serializer_set_feature_string): Use raptor_feature_get_areas() to check for valid serializer features. * src/raptor.h, src/raptor_sax2.c: Added raptor_world_enumerate_sax2_features() * src/raptor_sax2.c: Check for valid features before setting them (raptor_sax2_set_feature): Check for a feature that applies using raptor_feature_get_areas() then set the values. * src/raptor_feature.c, src/raptor_internal.h: Added raptor_feature_get_areas() * src/raptor_internal.h: Add RAPTOR_FEATURE_AREA_NONE * src/raptor_feature.c, src/raptor_internal.h: Added RAPTOR_FEATURE_AREA_SAX2 for raptor_sax2 features raptor_feature_area gains RAPTOR_FEATURE_AREA_SAX2 raptor_features_list: Use RAPTOR_FEATURE_AREA_SAX2 for RAPTOR_FEATURE_NORMALIZE_LANGUAGE and RAPTOR_FEATURE_NO_NET. * src/raptor.h, src/raptor_feature.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Reapply: Remove RAPTOR_FEATURE_ASSUME_IS_RDF - obsolete since 2003 Reapply GIT d7b9a598372cf1630dad79943ecd262427240719 raptor_feature enum loses RAPTOR_FEATURE_ASSUME_IS_RDF (raptor_parser_set_feature, raptor_parser_get_feature): Remove check for RAPTOR_FEATURE_ASSUME_IS_RDF. Remove all case RAPTOR_FEATURE_ASSUME_IS_RDF: * ChangeLog, src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Revert the commits that removed the switch()s around features Reverts commits 60c814c462961b42e3e54dde1a4fb31bb274b2a8 c0db820178c7b4df4d22d7b2e9bbbfb808e21ad4 8834cdc5fe3b9191b999dd1fb438912d19335771 aaa15968153874b15cd084301fc9d01e625503c2 961f3225876929de7aa111b14bfa2470f1738175 791de39082f36e449f586021797e768b798bb4f3 24d277a1a920c393dd905be063784153f7ea6b00 30737c28676891e0602bd2f39c7fe4d2ad56ed03 85f3d2a285238f4dae1f3a344387be7e71afeb50 65f264148fcb4fba792dea2fe40c079ffaa2af0a 33df189465408c1a877a2a8b8ce6ad03c17e3f32 c9baae1679a55ac10b3bd91303679c7974c10335 bf43e7b8a12818742420c7fd860629a10d9584f8 6355375feca96d6dcc2be74f9dd3422f30ff48a6 faa08164fcbd21a390633adfc75ee56595b73857 d7b9a598372cf1630dad79943ecd262427240719 6c28294c30f870f8a26c985af412477cafc4cba9 2010-02-04 Dave Beckett <dave@dajobe.org> * src/raptor_xml_writer.c: code style * src/raptor_xml_writer.c: (raptor_xml_writer_get_feature, raptor_xml_writer_set_feature): Use raptor_feature_get_areas() to check for valid xml writer features. * src/raptor_turtle_writer.c: (raptor_turtle_writer_get_feature): Use raptor_feature_get_areas() to check for valid turtle writer features. * src/raptor_internal.h, src/raptor_turtle_writer.c: Set turtle writer features using feature data tables (raptor_turtle_writer_set_feature): Use raptor_feature_get_areas. (raptor_world_enumerate_turtle_writer_features): Renamed from raptor_turtle_writer_features_enumerate() * src/raptor_serialize.c: Make raptor_serializer_get_feature and raptor_serializer_get_feature_string use area and numeric checks to remove cases (raptor_serializer_set_feature_string): docs. (raptor_serializer_get_feature, raptor_serializer_get_feature_string): Use raptor_feature_get_areas() and raptor_feature_value_is_numeric() to validate features for serializers. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Remove unused RAPTOR_FEATURE_START_URI * src/raptor_serialize.c: (raptor_serializer_set_feature_string): Use raptor_feature_get_areas() to check for valid serializer features. * src/raptor_serialize.c: (raptor_serializer_set_feature): Use raptor_feature_get_areas() to check for valid serializer features. * src/raptor_sax2.c: (raptor_sax2_set_feature): use bit & * src/raptor.h, src/raptor_sax2.c: Added raptor_world_enumerate_sax2_features() * src/raptor_sax2.c: Make raptor_sax2_set_feature smaller using raptor_feature_get_areas (raptor_sax2_set_feature): Check for a feature that applies using raptor_feature_get_areas() then set the values. * src/raptor_feature.c, src/raptor_internal.h: Added raptor_feature_get_areas() * src/raptor_internal.h: Add RAPTOR_FEATURE_AREA_NONE * src/raptor_feature.c, src/raptor_internal.h: Added RAPTOR_FEATURE_AREA_SAX2 for raptor_sax2 features raptor_feature_area gains RAPTOR_FEATURE_AREA_SAX2 raptor_features_list: Use RAPTOR_FEATURE_AREA_SAX2 for RAPTOR_FEATURE_NORMALIZE_LANGUAGE and RAPTOR_FEATURE_NO_NET. * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Remove RAPTOR_FEATURE_ASSUME_IS_RDF - obsolete since 2003 raptor_feature enum loses RAPTOR_FEATURE_ASSUME_IS_RDF (raptor_parser_set_feature, raptor_parser_get_feature): Remove check for RAPTOR_FEATURE_ASSUME_IS_RDF. Remove all case RAPTOR_FEATURE_ASSUME_IS_RDF: * src/raptor_parse.c: Use raptor_feature_value_is_numeric() in get/set parser features (raptor_parser_set_feature, raptor_parser_get_feature): Use raptor_feature_value_is_numeric rather than huge cases with very similar checks. * src/turtle_parser.y: Remove obsolete raptor_init() raptor_finish() calls * utils/rapper.c: Update for feature type api * src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added raptor_feature_value_is_numeric for internal use. (raptor_feature_value_is_numeric): Added. Replaced most uses of same pattern: int value_is_string = (raptor_feature_get_value_type(feature) == RAPTOR_FEATURE_VALUE_TYPE_STRING); if(!value_is_string) ... with a raptor_feature_value_is_numeric() call. * src/raptor.h, src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Add raptor_feature_value_type enum and use for features raptor_features_list gains a raptor_feature_value_type value_type field and uses enum values in data. raptor_feature_area gains RAPTOR_FEATURE_AREA_TURTLE_WRITER since XML writer features don't all apply; just indenting ones. typedef raptor_feature_value_type added to public API (raptor_feature_get_value_type): Renamed from raptor_feature_value_type to return raptor_feature_value_type and updated callers. * src/raptor_feature.c: #ws * src/raptor_feature.c: Use raptor_feature_area to split raptor_features_list area / value type. raptor_features_list flags field is split into area and value_type. Use raptor_features_list enum values in data. (raptor_features_enumerate_common): Get features for an area. (raptor_feature_value_type): Use VT_STRING define. * src/raptor_feature.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: Added raptor_feature_area enum for raptor_features_enumerate_common() raptor_feature_area added internally. (raptor_features_enumerate_common): Switch flags arg to use enum. Update callers. * src/raptor_parse.c: #autodocs * src/raptor_feature.c: Turn feature flag magic numbers into defines * src/raptor_feature.c: Add feature flag 32 for features with URI-string values raptor_features_list: Split the flags into their bits and set RAPTOR_FEATURE_START_URI and RAPTOR_FEATURE_ATOM_ENTRY_URI to have URI string value. 2010-02-03 Dave Beckett <dave@dajobe.org> * docs/.gitignore: Ignore bak files * docs/tmpl/section-general.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-uri.sgml: Update docbook tmpls * src/raptor_sequence.c: code style * src/raptor_sequence.c: Use RAPTOR_SEQUENCE_MIN_CAPACITY to declare magic number * src/raptor_sequence.c: #autodocs * src/raptor.h, src/raptor_sequence.c: Make raptor_sequence_sort take raptor_data_compare_function typedef (raptor_sequence_sort): Adjusted parameters to use raptor_data_compare_function. It's the same parameter type but now via a typedef. * src/raptor.h, src/raptor_iostream.c: iostream write_end now returns a status code typedef raptor_iostream_write_end_func returns an int (raptor_iostream_write_end): Returns an int. (raptor_filename_iostream_write_end): Update file write handlers to return fclose value. * src/raptor.h, src/raptor_iostream.c: Rename raptor_iostream_handler2 to raptor_iostream_handler typedef raptor_iostream_handler: renamed from raptor_iostream_handler2 Update all callers and rename parameters and variables from handler2 to handler. (raptor_new_iostream_from_handler): Renamed from raptor_new_iostream_from_handler2. * src/ntriples_parse.c: Remove support for xml"..." N-Triples literals, long obsolete. * tests/ntriples/Makefile.am, tests/ntriples/bad-07.nt: Add bad07.nt to test literal form xml"..." is refused * .gitignore: do not ignore rdf files * src/raptor.h, src/raptor_sequence.c: Remove raptor_sequence_print_string from public API (raptor_sequence_print_string): Moved to static and used for test only. * src/raptor.h, src/raptor_sequence.c: Remove raptor_compare_strings from public API (raptor_compare_strings): Moved to static and used for test only. * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_serialize_dot.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_statement.c, src/turtle_parser.y: Rename raptor_new_term_from_term to raptor_term_copy (raptor_term_copy): Renamed from raptor_new_term_from_term Updated all callers with new name. All copy constructors should be raptor_CLASS_copy now. 2010-01-30 Dave Beckett <dave@dajobe.org> * src/raptor.h: Reorder prototypes to group class and methods. * src/raptor.h: #ws * src/raptor.h, src/raptor_locator.c: Renamed raptor_format_locator to raptor_locator_format * src/raptor.h, src/raptor_general.c, src/raptor_locator.c, utils/rapper.c, utils/rdfdiff.c: raptor_print_locator renamed to raptor_locator_print * src/raptor.h: Reorder and group by class. * src/raptor_avltree.c, src/raptor_internal.h: Remove legacy raptor_avltree cursor functions raptor_avltree loses cursor_iterator field. (raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next, raptor_avltree_cursor_get): Deleted * src/raptor_avltree.c: code style - whitespace, line breaks * src/raptor.h, src/raptor_avltree.c: Rename raptor_avltree_iterator_end to raptor_avltree_iterator_is_end * src/raptor_avltree.c, src/raptor_internal.h: Move raptor_avltree_s internals into raptor_avltree.c module. * src/raptor_abbrev.c: Use term->world to save knowing internals of raptor_avltree. * docs/raptor-docs.xml, docs/raptor-sections.txt, src/raptor.h, src/raptor_avltree.c, src/raptor_internal.h: Move raptor_avltree to public API. Public opaque typedefs: raptor_avltree and raptor_avltree_iterator Public function typedefs: raptor_data_compare_function, raptor_data_free_function and raptor_avltree_visit_function Public functions: raptor_new_avltree, raptor_free_avltree, raptor_avltree_add, raptor_avltree_delete, raptor_avltree_print, raptor_avltree_remove, raptor_avltree_search, raptor_avltree_set_print_handler, raptor_avltree_size, raptor_avltree_visit, raptor_new_avltree_iterator, raptor_free_avltree_iterator, raptor_avltree_iterator_end, raptor_avltree_iterator_get and raptor_avltree_iterator_next NOTE: These were not made public and seem to be internal/unused: raptor_avltree_cursor_first, raptor_avltree_cursor_last, raptor_avltree_cursor_prev, raptor_avltree_cursor_next and raptor_avltree_cursor_get * docs/raptor-docs.xml: 2010 * NEWS.html, RELEASE.html: Merge 1.4.21 news and release notes * ChangeLog, ChangeLog.9, Makefile.am: ChangeLog.9 for 2008 * .gitignore: Do not ignore ChangeLog* * utils/rapper.c, utils/rdfdiff.c: Update raptor_print_locator calling convention 2010-01-29 Dave Beckett <dave@dajobe.org> * src/raptor_serialize_turtle.c: Ensure serialized Turtle names are legal (raptor_turtle_is_legal_turtle_qname): Added to enforce prefix and local name character constraints. (raptor_turtle_emit_resource): Use above to ensure that XML Qnames that are not legal Turtle Qnames are never serialized. Fixes Issue#0000337 http://bugs.librdf.org/mantis/view.php?id=337 * tests/turtle/Makefile.am, tests/turtle/test-34-out.ttl, tests/turtle/test-34.ttl: Add Turtle serializing test 34 for not serializing a qname with a . Test for Issue#0000337 http://bugs.librdf.org/mantis/view.php?id=337 2010-01-28 Dave Beckett <dave@dajobe.org> * src/raptor_rdfxml.c: Create a new set for checking for duplicate rdf:ID at start of every parse. (raptor_rdfxml_parse_init): Remove creating set from when parser is constructed. (raptor_rdfxml_parse_start): At start of parsing, delete any existing id set and only create a new one if the feature RAPTOR_FEATURE_CHECK_RDF_ID is enabled. * src/turtle_lexer.l: Alter Turtle lexer to refuse to accept . in namespace prefix/local names Adjust Turtle lexer to match spec for the prefixName and name tokens: http://www.w3.org/TeamSubmission/2008/SUBM-turtle-20080114/#prefixName http://www.w3.org/TeamSubmission/2008/SUBM-turtle-20080114/#name This makes some previously accepted not-to-spec turtle documents be rejected. It makes new bad turtle syntax tests bad-21 and bad-22 pass. (NCNAME_PREFIX): Updated for prefixName (NCNAME): Update for name Fixes Issue#0000326 http://bugs.librdf.org/mantis/view.php?id=326 * tests/turtle/Makefile.am, tests/turtle/bad-21.ttl, tests/turtle/bad-22.ttl: Add bad turtle tests 21, 22 for . in prefix and qname * src/ntriples_parse.c: Make ntriples parser accept text/plain with q=0.1 (raptor_ntriples_parser_register_factory): Register mime type text/plain via raptor_parser_factory_add_mime_type. Fixes Issue#0000319 http://bugs.librdf.org/mantis/view.php?id=319 * src/turtle_lexer.l: Make Turtle lexer handle \\ at end of triple-quoted literals Alter literal regex and let raptor_stringbuffer_append_turtle_string report problems with buffer ending in middle of \u and \U. Add rule for bare \ on it's own which can only happen if input ends on a \. Fixes Issue#0000318 http://bugs.librdf.org/mantis/view.php?id=318 * tests/turtle/Makefile.am, tests/turtle/bad-20.ttl: Add bad-20.ttl test for end of file in middle of \ escape * tests/turtle/Makefile.am, tests/turtle/test-33.out, tests/turtle/test-33.ttl: Added test-33 for \\ at end of triple-quoted turtle literal Added tests/turtle/test-33.ttl and tests/turtle/test-33.out files to test Issue#0000318 http://bugs.librdf.org/mantis/view.php?id=318 * librdfa/iri.c: Update to librdfa GIT commit 1979d7246a1d98f95bab78704a32b87cf95d1ef6 * librdfa/curie.c, librdfa/iri.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/triple.c: Merge librdfa changes to GIT 88ca099befcb1b81be1a879663e5e891707e5239 Fixes several buffer alloc/realloc problems and failure to terminate strings when using them with strstr(). Other librdfa changes: - added "first" to list of allowed reserved words. - allow @rel/@rev reserved word values to be in any case (TC 134) - librdfa now treats the following characters as valid whitespace characters: SPACE, \t, \n, \v, \f, and \r. (TC 131) - fix generation of xml:lang if language was already in XML Literal (TC 102) 2010-01-26 Dave Beckett <dave@dajobe.org> * src/raptor_general.c: ws * src/raptor.h, src/raptor_general.c, src/raptor_statement.c: Adjust raptor_print_ntriples_string params to put FILE* last * src/raptor.h, src/raptor_general.c, src/raptor_locator.c: Adjust raptor_print_locator params to put FILE* last like other print methods. * src/raptor_locator.c: ws * src/raptor_general.c, src/raptor_internal.h, src/raptor_sax2.c: Remove raptor_log_error_to_handlers and call raptor_log_error directly. (raptor_log_error_to_handlers): Deleted. Update several sax2 modules to call raptor_log_error instead. * src/raptor_sequence.c: indent * src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_internal.h: Update raptor_avltree to us raptor_data_print_handler typedef raptor_data_print_function: deleted (raptor_new_abbrev_subject, raptor_avltree_set_print_handler): Use raptor_data_print_handler* to replace raptor_data_print_function. (raptor_print_abbrev_po): Swap args to match raptor_data_print_handler calling convention. * src/raptor.h, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_rss_common.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_rss.c, src/turtle_parser.y: Rename sequence-specific handlers typedefs to be more raptor-general raptor_data_free_handler renamed from raptor_sequence_free_handler raptor_data_context_free_handler renamed from raptor_sequence_context_free_handler raptor_data_print_handler renamed from raptor_sequence_print_handler and update docs raptor_data_context_print_handler renamed from raptor_sequence_context_print_handler and update docs Update all users. * src/raptor_internal.h: Make all print methods return an int status code (raptor_statement_print, raptor_uri_print, raptor_sequence_print, raptor_term_print_as_ntriples): Return int success code. * src/raptor.h, src/raptor_sequence.c, src/raptor_statement.c, src/raptor_uri.c: Make all print methods return an int status code (raptor_statement_print, raptor_uri_print, raptor_sequence_print, raptor_term_print_as_ntriples): Return int success code. * src/raptor.h, src/raptor_grddl.c, src/raptor_sequence.c: Update sequence _v2 constructor/methods to use _with_context Rename typedefs for handlers to match, update constructor documentation to explain the difference. typedef raptor_sequence_context_print_handler renamed from raptor_sequence_print_handler_v2. raptor_sequence - renamed fields to add context_NAME for the formerly _v2 handler names. Add explanations of what they are for. (raptor_new_sequence): autodocs and example of use (raptor_new_sequence_with_context): Renamed from raptor_new_sequence_v2 and autodocs. * src/raptor.h, src/raptor_sequence.c: Remove unused raptor_sequence_set_print_handler() and raptor_sequence_set_print_handler_2(). (raptor_sequence_set_print_handler, raptor_sequence_set_print_handler_v2): Deleted. 2010-01-24 Dave Beckett <dave@dajobe.org> * src/turtle_parser.y: (verb): Get rdf:type term from static term and do not lose an URI reference. * src/turtle_parser.y: Free literal strings passed into raptor_new_term_from_literal() * src/turtle_parser.y: (resource): Free uri object references when making resource from QNAME_LITERAL or URI_LITERAL. (raptor_turtle_generate_statement): Redo - free constructed terms * src/turtle_parser.y: (raptor_turtle_generate_statement): UNDO Free constructed terms * src/turtle_parser.y: (raptor_turtle_generate_statement): Free constructed terms * src/turtle_parser.y: Free blank_id not blank * src/raptor_rdfxml.c: When creating new URIs or terms, free allocated values early. Since functions like raptor_new_term_from_uri() take copies of their arguments, any allocated objects passed in such as URIs or literals should be freed. Adjust the code so that's done early. (raptor_rdfxml_generate_statement): Free bag_predicate_uri. (raptor_rdfxml_start_element_grammar): For rdf:ID, move the syntax checks earlier to save extra complexity on errors. Generally update all places to free generated IDs and constructed URIs just after making raptor_uri or raptor_term * src/raptor_uri.c: Use raptor_uri_resolve_uri_reference length with raptor_new_uri_from_counted_string internally. raptor_uri length is now unsigned int (raptor_new_uri_from_counted_string): Add maintainer assert that URI string is length it is declared to be. (raptor_new_uri_relative_to_base): Use raptor_uri_resolve_uri_reference return value to call raptor_new_uri_from_counted_string. (raptor_new_uri_for_rdf_concept): Correctly calcuate passed in buffer length - it was malloced correctly. (assert_uri_is_valid): Added. (assert_uri_to_relative): Use above for checks. * src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): set result_len when relative is #frag. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Calculate the length of namespace part of predicate URI correctly. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Namespace URI buffer was too short by 1. * src/raptor_serialize_rdfxmla.c: Replace rdf_xml_literal_uri with use of static rdf:XMLLiteral URI raptor_rdfxmla_serializer_context loses rdf_xml_literal_uri (raptor_rdfxmla_serialize_init): Remove init with rdf_type_uri, copy RAPTOR_RDF_type_term(). Remove rdf_xml_literal_uri. (raptor_rdfxmla_serialize_terminate): Remove free of rdf_xml_literal_uri. * src/raptor_serialize_rdfxml.c: Replace rdf_xml_literal_uri with use of static rdf:XMLLiteral URI raptor_rdfxml_serializer_context loses rdf_xml_literal_uri (raptor_rdfxml_serialize_init, raptor_rdfxml_serialize_terminate): Remove init, free. (raptor_rdfxml_serialize_statement): Use RAPTOR_RDF_XMLLiteral_URI() * src/raptor.h, src/raptor_rfc2396.c: (raptor_uri_resolve_uri_reference): Now returns length of URI. 2010-01-23 Dave Beckett <dave@dajobe.org> * src/raptor_librdfa.c: (raptor_librdfa_generate_statement): Use raptor_new_uri_from_counted_string for rdf:XMLLiteral datatype. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Use raptor_new_uri_from_counted_string. * src/raptor_feature.c: Create feature URI prefix from counted URI string (raptor_features_enumerate_common): Use raptor_new_uri_from_counted_string. * src/raptor_rdfxml.c: Create daml namespaces from counted string URIs Added daml_namespace_uri_string and daml_namespace_uri_string statics for DAML namespace URI. (raptor_rdfxml_parse_init): Use raptor_new_uri_from_counted_string. * src/raptor_namespace.c: Create rdf and rdfs namespaces from counted string URIs Added raptor_rdf_schema_namespace_uri_len constant int. (raptor_namespaces_init): Use raptor_new_uri_from_counted_string. * src/raptor_uri.c: Ensure URI string field is always set Renamed raptor_uri_s field string_length to length. (raptor_new_uri_from_uri_local_name, raptor_new_uri_relative_to_base, raptor_new_uri_for_rdf_concept): Use raptor_new_uri_from_counted_string with already calculated length. * src/raptor_grddl.c: Create constant strings / lengths for GRDDL predicate URIs Added grddl_namespaceTransformation_uri_string and grddl_profileTransformation_uri_string constant strings with macros for lengths. (raptor_grddl_parse_init): Use above to create grddl parser URIs with raptor_new_uri_from_counted_string. * src/raptor.h, src/raptor_uri.c: Added new uri constructor raptor_new_uri_from_counted_string (raptor_new_uri_from_counted_string): Added (raptor_new_uri): Now a wrapper around raptor_new_uri_from_counted_string. 2010-01-22 Dave Beckett <dave@dajobe.org> * src/raptor_serialize_rss.c: Use raptor_term instead of URIs and 'fake' URIs raptor_rss_group_map uses a raptor_term as identifier, not URI. (raptor_free_group_map): Free term. (raptor_rss_group_map_compare): Compare terms. (raptor_rss10_get_group_item): Use terms in search. (raptor_rss10_set_item_group): Use term to create a new gm. (raptor_rss10_move_statements, raptor_rss10_move_anonymous_statements, raptor_rss10_store_statement): Replace URIs with terms from subject, removing all fake_uri. (raptor_rss10_serialize_statement, raptor_rss10_build_items): Use item term for calling raptor_rss10_set_item_group * src/raptor_serialize_rss.c: Use raptor_term for rdf:Seq node identity and remove a fake_uri raptor_rss10_serializer_context replace seq_uri with raptor_term* seq_term (raptor_rss10_serialize_terminate): Free term. (raptor_rss10_serialize_statement): Copy statement subject to get seq node identity. (raptor_rss10_build_items): Use seq_term for comparisons with subject and delete fake_uri * raptor.rdf.in: GITRepository 2010-01-21 Dave Beckett <dave@dajobe.org> * src/turtle_lexer.l: Make Turtle long literals count raw newlines correctly (Rule <LITERAL>\" ....): Count the raw newlines seen in the yytext to adjust the line numbers correctly for long literals. Fixes Issue#0000331 http://bugs.librdf.org/mantis/view.php?id=331 * src/raptor_general.c: , * raptor.rdf.in: Update DOAP with GIT information. 2010-01-20 Dave Beckett <dave@dajobe.org> * src/raptor_rdfxml.c: Always take a copy of world concepts so they are consitently freed * src/ntriples_parse.c, src/raptor_rdfxml.c: Use rdf namespace raptor_terms to reduce raptor_term creations in parsers. (raptor_ntriples_generate_statement): Tidy code, moving URI construction to local blocks. (raptor_rdfxml_generate_statement): Use concept terms for refiying predicates and rdf:Statement class. (raptor_rdfxml_start_element_grammar, raptor_rdfxml_end_element_grammar): Update to use concept terms. * src/raptor_internal.h: Added macros to access the static RDF namespace raptor terms Added macros RAPTOR_RDF_{NAME}_term(world) to get a shared pointer to the static raptor_term for rdf namespace concepts. * src/raptor_concepts.c, src/raptor_internal.h: Make a set of raptor_term for RDF namespace terms used in graph. raptor_rdf_ns_term_id gains an alias RDF_NS_LAST_SYNTAX_TERM for the last syntax term. raptor_world gains an array of raptor_term 'terms'; not all of these will be used, the first few are syntax only. (raptor_concepts_init, raptor_concepts_finish): Initialised and free the terms. 2010-01-19 Dave Beckett <dave@dajobe.org> * src/raptor_rss.c: (raptor_rss_block_set_field): Fix failure check * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c: Turn two magic number offsets 0 into defines in raptor_rss.h Add defines RAPTOR_RSS_LINK_HREF_URL_OFFSET and RAPTOR_RSS_LINK_REL_STRING_OFFSET for indexes into block urls/strings arrays - both at offset 0. (raptor_rss_insert_rss_link): Use above defines and remove fixme. Update raptor_rss_block_fields_info to use defines. * src/raptor_xml_writer.c: raptor_xml_writer_nsd_compare - Remove FIXME; duplicating a 3 line function is not a worry. * src/raptor_uri.c: (raptor_uri_print): Use world to report fwrite failure, remove FIXME. * src/raptor_serialize_rss.c: raptor_rss10_emit_item - remove fixme now it is documented. * docs/raptor-serializers.xml: note default atom:content type on serializing to atom 1.0 * src/raptor_serialize_rdfxmla.c: remove FIXME no longer relevant * src/raptor_rss.c: Add some resilience to calloc/malloc failure (raptor_rss_parse_init): Code tidy. (raptor_rss_block_set_field): Add return value for failure. Check for URI and string alloc failure. (raptor_rss_start_element_handler, raptor_rss_end_element_handler): Set parser failure and end on alloc failure. (raptor_rss_insert_rss_link): Add return value for failure and check for new field, string failure. (raptor_rss_insert_identifiers): Add return value for failure and check for above function failing. (raptor_rss_copy_field): Return failure on string alloc failure. (raptor_rss_parse_chunk): Fail to parse when raptor_rss_insert_identifiers fails. * src/raptor_parse.c: Make score sorting us a dynamic buffer in raptor_world_guess_parser_name (raptor_world_guess_parser_name): Calloc/free the array and remove FIXME! * src/raptor_grddl.c: raptor_grddl_run_grddl_transform_doc - remove FIXMEs now that these are documented * docs/raptor-parsers.xml: document more GRDDL parser features * src/raptor_grddl.c: raptor_grddl_run_grddl_transform_doc - remove FIXME now that the XSLT params are documented * docs/raptor-parsers.xml: document GRDDL XSTL parameters * src/raptor_abbrev.c: autodocs * src/turtle_parser.y: remove FIXMEs * src/turtle_lexer.l: Update test code to Raptor V2 APIs. * src/raptor_concepts.c, src/raptor_internal.h: Do not try to make an rdf namespace concept URI for the NULL name * src/raptor_concepts.c: (raptor_concepts_init): Return 1 if URI alloc failed not succeeded * src/raptor_concepts.c: (raptor_concepts_init): Return 1 if URI alloc failed. * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Rename abbrev struct compare functions to standard naming. (raptor_abbrev_node_compare): Renamed from raptor_abbrev_node_cmp. (raptor_abbrev_subject_compare): Renamed from raptor_abbrev_subject_cmp. 2010-01-18 Dave Beckett <dave@dajobe.org> * src/raptor_grddl.c: GRDDL parser code style - whitespace, break long lines, loop pre-counting Whitespace around operators and break long lines. For fixed size raptor_sequence or array loops, store size in a var 'size' rather than run a function on every if/while loop. * src/raptor_grddl.c: code style: break into 2 lines the long assignments to grddl_parser * src/raptor_grddl.c: Update conformance urls and doc ptr * src/raptor_rdfxml.c: Code style fixes - indenting, whitespace, add vars to break long lines. Code style, indenting and whitespace. Add variables to break long lines especially error reporting Use __func__ for internal error message rather than hardcoding function name. * src/Makefile.am, src/raptor.h, src/raptor_concepts.c, src/raptor_general.c, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c, src/raptor_uri.c, src/turtle_common.h, src/turtle_parser.y: Update rdf namespace concepts to add PlainLiteral, share across parsers raptor_rdf_ns_term_id gains RDF_NS_PlainLiteral; reordered to put together with RDF_NS_XMLLiteral, the other datatype. raptor_world gains an array of pointers to raptor_uri* concepts. turtle_parser loses nil_uri, first_uri, rest_uri that are now available via the macros. rss_parser loses rdf:type and rdf:Seq concept URIs that are now available via the macros. Added macros RAPTOR_RDF_{name}_URI(world) to get pointer to static raptor_uri* for NS terms. RDF/XML parser cuts down to just 5 DAML NS URIs to manage itself. (raptor_new_uri_for_rdf_concept): now takes const name. (raptor_concepts_init, raptor_concepts_finish): Added. (raptor_world_open): Call raptor_concepts_init; re-order to init URIs then concepts first. (raptor_free_world): Call raptor_concepts_finish Update RDF/XML, RSS and Turtle parsers to use shared URIs. * src/fix-flex: alter lexer output to remove signed/unsigned comparison that gcc 4.x warns. * src/raptor_librdfa.c: Do not strdup language in raptor_librdfa_generate_statement * src/ntriples_parse.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c, src/raptor_statement.c, src/turtle_parser.y: Change raptor_new_term_from_blank calling semantics to copy id inside. (raptor_new_term_from_blank): Copy blank ID. Update all calls to raptor_new_term_from_blank to remove strdup()s and add a few RAPTOR_FREE for generated IDs. * src/ntriples_parse.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_statement.c, src/turtle_parser.y: Change raptor_new_term_from_literal calling semantics to copy inside. (raptor_new_term_from_literal): Copy literals, optional language and datatype URIs. Update all calls to raptor_new_term_from_literal to remove strdup(), malloc/free, or stringbuffer copy for literal string; remove copy URI for datatype URI. * src/raptor_rdfxml.c: Rename RDF ns-checking functions and document their returns (raptor_rdfxml_check_propertyElement_name): Renamed from raptor_rdfxml_forbidden_nodeElement_name and returns tri-state flag (raptor_rdfxml_check_propertyElement_name): Renamed from raptor_rdfxml_forbidden_propertyElement_name and returns tri-state flag. (raptor_rdfxml_check_propertyAttribute_name): Renamed from raptor_rdfxml_forbidden_propertyAttribute_name and returns tri-state flag. Update callers to check for <0: unknown name, 0: allowed, >0: not allowed * src/raptor_rdfxml.c: Set raptor_rdf_ns_terms_info as unsigned int 1 bit so bool works * src/raptor_rdfxml.c: Adjust raptor_rdf_ns_terms_info fields: reorder, make positive and use bitfields. Altered raptor_rdf_ns_terms_info field order to group flag attributes together and use 1 bit each, make them positive allowed flags rather than mix of forbidden/allowed. Adjust the raptor_rdfxml_forbidden_TEST_name calling code to use !raptor_rdf_ns_terms_info[field].allowed_TEST * src/raptor_rdfxml.c: Tidy comments for raptor_rdf_ns_term_id names * src/raptor_rdfxml.c: Tidy RDF terms description raptor_rdf_ns_term_id: Renamed enum from rdf_attr. Names are all RDF_ATTR_[name] now. * src/ntriples_parse.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_statement.c, src/turtle_parser.y: Change raptor_new_term_from_uri calling semantics to take URI copy inside (raptor_new_term_from_uri): autodocs and call raptor_uri_copy. Updated all calls to raptor_new_term_from_uri to remove a raptor_uri_copy or add a raptor_uri_free as appropriate. * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Make raptor_abbrev_node use raptor_term rather than another embedded node raptor_abbrev_node loses the 'value' union and a pile of sub-structure duplicating raptor_term* contents; yet another librdf_node copy bites the dust. (raptor_new_abbrev_node): Use raptor_new_term_from_term (raptor_free_abbrev_node): Use raptor_free_term (raptor_abbrev_node_cmp): Thin wrapper around raptor_term_compare. (raptor_abbrev_node_equals): Thin wrapper around raptor_term_equals. Update all references to the raptor_abbrev_node internals above. (raptor_rdfxmla_serialize_init, raptor_turtle_emit_subject): Fix a couple of places where a static raptor_term was used for creating a raptor_abbrev_node; now make a dynamic one so it can be reference counted and freed. * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_statement.c: Make raptor_term_print_as_ntriples internal so can use for raptor_abbrev (raptor_term_print_as_ntriples): No longer static. 2010-01-17 Dave Beckett <dave@dajobe.org> * docs/rdfprint.c, examples/rdfprint.c, src/raptor.h, src/raptor_grddl.c, src/raptor_rdfxml.c, src/raptor_rss_common.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_statement.c, src/turtle_parser.y, utils/rdfdiff.c: Rename statement printing methods to raptor_statement_NAME() form (raptor_statement_print): Renamed from raptor_print_statement (raptor_statement_print_as_ntriples): Renamed from raptor_print_statement_as_ntriples * src/raptor.h: Remove unused typedefs for old URI handler code raptor_new_uri_func, raptor_new_uri_from_uri_local_name_func, raptor_new_uri_relative_to_base_func, raptor_new_uri_for_rdf_concept_func, raptor_free_uri_func, raptor_uri_equals_func, raptor_uri_compare_func, raptor_uri_copy_func, raptor_uri_as_string_func, raptor_uri_as_counted_string_func: Deleted. * docs/rdfcat.c, docs/rdfprint.c, examples/grapper.c, examples/raptor_abort.c, examples/rdfcat.c, examples/rdfprint.c, src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: Rename parser methods to all start raptor_parser_METHOD (raptor_parser_get_feature): Renamed from raptor_get_feature. (raptor_parser_get_label): Renamed from raptor_get_label. (raptor_parser_get_locator): Renamed from raptor_get_locator. (raptor_parser_get_mime_type): Renamed from raptor_get_mime_type. (raptor_parser_get_name): Renamed from raptor_get_name. (raptor_parser_get_need_base_uri): Renamed from raptor_get_need_base_uri. (raptor_world_get_parser_factory): Renamed from raptor_get_parser_factory. (raptor_parser_parse_abort): Renamed from raptor_parse_abort. (raptor_parser_parse_chunk): Renamed from raptor_parse_chunk. (raptor_parser_set_uri_filter_no_net): Renamed from raptor_parse_uri_no_net_filter. (raptor_parser_get_new_generated_i): Renamed from raptor_parser_generate_id. (raptor_parser_set_default_generate_id_parameters): Renamed from raptor_set_default_generate_id_parameters. (raptor_parser_set_generate_id_handler): Renamed from raptor_set_generate_id_handler. (raptor_parser_set_graph_handler): Renamed from raptor_set_graph_handler. (raptor_parser_set_namespace_handler): Renamed from raptor_set_namespace_handler. (raptor_parser_set_statement_handler): Renamed from raptor_set_statement_handler. (raptor_parser_parse_start): Renamed from raptor_start_parse. * src/raptor.h, src/raptor_general.c, src/raptor_libxml.c, src/raptor_parse.c: Adjust raptor_log_level to match log4j levels: add trace, debug, info. raptor_log_level gains RAPTOR_LOG_LEVEL_TRACE, RAPTOR_LOG_LEVEL_DEBUG and RAPTOR_LOG_LEVEL_INFO. Reordered to match severity from trace level to fatal error. Add autodocs. * src/raptor_statement.c: code style * src/raptor_parse.c: autodocs * src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: autodocs * src/raptor.h, src/raptor_iostream.c, src/raptor_serialize_simple.c: Renamed raptor_iostream_write_uri_v2 to raptor_iostream_write_uri and lose world arg * src/raptor.h, src/raptor_xml_writer.c: Rename raptor_xml_writer_features_enumerate_v2 to raptor_world_enumerate_xml_writer_features * src/raptor.h, src/raptor_general.c: Rename raptor_error_handlers_init_v2 to raptor_error_handlers_init * src/raptor_serialize_rss.c: Fix debug calls to raptor_print_statement_as_ntriples_v2 now called raptor_print_statement_as_ntriples * src/raptor.h, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_xml_writer.c: Remove _v2 from raptor_new_xml_writer_v2 name and remove unused arg. (raptor_new_xml_writer_v2): Renamed from raptor_new_xml_writer and delete unused (never used) canonicalized arg. * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c: Renamed raptor_feature_from_uri_v2 to raptor_world_get_feature_from_uri * src/raptor.h, src/raptor_abbrev.c, src/raptor_namespace.c, src/raptor_qname.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_turtle_writer.c, src/raptor_xml.c, src/raptor_xml_writer.c: Remove _v2 from raptor_new_qname_from_namespace_local_name_v2 (raptor_new_qname_from_namespace_local_name): Renamed from raptor_new_qname_from_namespace_local_name_v2. * src/raptor.h, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_dot.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c, src/turtle_common.h, src/turtle_lexer.l, src/turtle_parser.y: Rename raptor_namespaces/stack functions to lose _v2 in name (raptor_new_namespaces): Renamed from raptor_new_namespaces_v2. (raptor_namespaces_init): Renamed from raptor_namespaces_init_v2 Also note where raptor_namespace_stack is static such as in raptor_sax2, some tests and in raptor_turtle_parser. * src/raptor_www_test.c: Fix test o use raptor_www_new * src/raptor.h, src/raptor_general.c, src/raptor_grddl.c, src/raptor_parse.c, src/raptor_www.c: Rename raptor_www functions to lose _v2 in name (raptor_www_init): Renamed from raptor_www_init_2 - internal. (raptor_www_finish): Renamed from raptor_www_finish_v2 - internal. (raptor_www_new): Renamed from raptor_www_new_v2. (raptor_www_new_with_connection): Renamed from raptor_www_new_with_connection_v2. * src/raptor.h, src/raptor_general.c, src/raptor_locator.c, utils/rapper.c, utils/rdfdiff.c: Remove _v2 from name and world arg from raptor_locator functions (raptor_print_locator): Renamed from raptor_print_locator_v2 and loses world arg. (raptor_format_locator): Renamed from raptor_format_locator_v2 and loses world arg. (raptor_locator_uri_string): Renamed from raptor_locator_uri_v2 and renamed to reflect returns a string not a raptor_uri* * src/raptor_avltree.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_namespace.c, src/raptor_nfc_test.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_turtle_writer.c, src/raptor_www.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/turtle_lexer.l, src/turtle_parser.y: Code style: use TYPE* var_name = RAPTOR_CALLOC(TYPE, 1, sizeof(*var_name)) This fix caught a few times where the calloc added an extra +1 - presumably from the usual thing you need to do with a string malloc. e.g. in raptor_new_json_writer(), raptor_new_turtle_writer() and raptor_new_xml_writer_v2() which probably were all from the same source. * src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c: Remove some un-necessary casts to (unsigned char*) * src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_statement.c: Remove some un-necessary casts to raptor_uri* * src/raptor_serialize_json.c: (raptor_json_serialize_avltree_visit): Use raptor_term_equals instead of hand-crafted equivalent. * src/raptor.h, src/raptor_abbrev.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_rdfxml.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: raptor_term values are now a union of uri / literal fields / blank string raptor_term gains union value with uri field, literal struct and blank field for URI, Literal and Blank rdf terms. Lots of consequent changes; mostly mechanical search and replace. Removed several (raptor_uri*)value and (unsigned char*)value casts. (raptor_rss10_move_statements): Changes but when zeroing uri / literal, do that in separate steps rather than assigning to value. * src/raptor_serialize_dot.c: Convert DOT serializer to use raptor_term not local raptor_dot_serializer_node Deleted raptor_dot_serializer_node typedef (raptor_dot_serializer_free_node, raptor_dot_serializer_node_matches, raptor_dot_serializer_new_node): Deleted and replaced with raptor_term versions - both based on librdf_node. Code style fixes. * src/raptor_statement.c: Fix formatting in raptor_term_as_counted_string for blank and uri (raptor_term_as_counted_string): RAPTOR_TERM_TYPE_BLANK and RAPTOR_TERM_TYPE_URI code was wrong - bad casting. 2010-01-16 Dave Beckett <dave@dajobe.org> * Merge branch 'statement-term' to 'master' with commit efd40982c2356eab8c37c1da1acd8b459ec06b56 2010-01-15 Dave Beckett <dave@dajobe.org> * src/Makefile.am, src/raptor_internal.h, src/raptor_xsd.c: Removed unused raptor_new_identifier_from_double and raptor_xsd module. * src/raptor_librdfa.c: Updated RDFA parser to use statement and term object model * src/raptor_rss.c: Skip attempting to output predicates with no URI/namespace (raptor_rss_emit_item): Check predicate_uri first. * src/raptor_rss.c: Free allocate raptor_term (raptor_rss_emit_item): Free some predicate and object terms just allocated. Code style. * docs/tmpl/section-iostream.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-uri.sgml: update generated docs * src/raptor_rss.c: Construct terms in raptor_rss_emit_item (raptor_rss_emit_item): Use raptor_term constructors * src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_serialize_rss.c: Switch RSS parser and serializer internals from identfier to term Compiles but does not fully work yet. * src/raptor_internal.h: Added raptor_term_equals * src/raptor_statement.c: Added raptor_term_equals 2010-01-14 Dave Beckett <dave@dajobe.org> * src/turtle_parser.y: Convert turtle parser to use raptor_statement and raptor_term Change raptor_identifier to raptor_term Change raptor_turtle_triple to raptor_statement Code style. (raptor_turtle_generate_statement): Use copy constructor for term. (raptor_turtle_new_triple, raptor_turtle_free_triple, raptor_triple_print): Deleted * src/raptor_internal.h, src/raptor_statement.c: Add raptor_new_statement_from_nodes (raptor_new_statement_from_nodes): Added * src/raptor_serialize_turtle.c, src/turtle_parser.y: Update Turtle parser and serializer to statement reference model. (raptor_turtle_generate_statement): Generate new term objects for each statement. (raptor_turtle_serialize_statement): Use correct reference to statement fields. * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_statement.c: Made statement work statically and dynamically, promoting on copies (raptor_new_statement): Added to make a new dynamic statement (raptor_statement_init): Init a static statement with negative usage. (raptor_statement_copy): Do promote to dynamic on copy. (raptor_free_statement): Do not free static statements. (raptor_rdfxml_generate_statement): Do proper predicate creation when reifying - this broke statement copying and rdfdiff. (raptor_rdfxmla_serialize_statement): Correct pointers to statement fields. 2010-01-13 Dave Beckett <dave@dajobe.org> * src/raptor_rdfxml.c: Code style and more fixing up RDF/XML raptor_term object use Code style; introduce variables to break long lines/duplicate expressions that hopefully the compiler will still optimize way. (raptor_rdfxml_generate_statement): Free a locally created reified_term object. (raptor_rdfxml_process_property_attributes): Save a strlen. Code style. (raptor_rdfxml_start_element_grammar): Code style. Add element_name_uri to remove several long lines. Add some OOM checks when an ID/URI then raptor_term are created in two steps. * src/ntriples_parse.c: Update N-Triples parser to use raptor_term objects (raptor_ntriples_generate_statement): Use raptor_term constructors. * src/raptor_rdfxml.c: More conversions of raptor_term statics to dynamic. (raptor_rdfxml_process_property_attributes): Return failure error status. (raptor_rdfxml_process_property_attributes): Convert more static (on stack) raptor_term objects into dynamic/by-reference. * src/raptor_statement.c: (raptor_statement_copy): Delete commented out old deep copy code. (raptor_free_statement): Just call raptor_term to free inner terms. * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c: Deleted raptor_clear_term and raptor_copy_term. literal languages (raptor_clear_term, raptor_copy_term): Deleted - no longer needed or used. (raptor_free_term): Merge in old raptor_clear code here. (raptor_rdfxml_end_element_grammar): A little OOM checking. * src/raptor_rdfxml.c: (raptor_rdfxml_end_element_grammar): Allocate new strings for literals since they become owned by raptor_term. * src/raptor_rdfxml.c, utils/rapper.c: change raptor_rdfxml_element raptor_term statics fields to objects raptor_rdfxml_element: reified, bag, subject, predicate and object fields are now raptor_term* (raptor_free_rdfxml_element): Use raptor_free_term on above fields instead of raptor_clear_term. (raptor_rdfxml_start_element_handler): Do not assign world to above fields - not allocated yet. Move setting of default literal_language inscope to code near the line where raptor_term for a literal is created. Start turning direct references to raptor_statement field->subject->type into static raptor_term objects (memset then assigned) for bags, reified terms, collections, bags, reified statements, ... First stage of conversion to allocated raptor_terms. * src/ntriples_parse.c, src/raptor.h, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: raptor_term and raptor_term get usages. statement is pointer to 3 terms Compiles, does not all work. (raptor_statement_init): Init usage. (raptor_statement_copy): Now just a usage increment; comment out old copying code. (raptor_free_statement): Free on zero usage. (raptor_free_term): Free on zero usage. (raptor_new_term_from_term, raptor_new_term_from_uri, raptor_new_term_from_literal, raptor_new_term_from_blank): Added new term constructors - taking ownership of their input objects. (raptor_rdfxml_generate_statement): Create raptor_term objects to generate reified statements. Update lots of uses in parsers and serializers of object.field to object->field for pointer based access. 2010-01-12 Dave Beckett <dave@dajobe.org> * docs/tmpl/section-iostream.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-uri.sgml: Update generated docs 2010-01-11 Dave Beckett <dave@dajobe.org> * src/raptor_rdfxml.c: raptor_rdfxml_generate_statement() now takes raptor_term subject/ raptor_uri term. (raptor_rdfxml_generate_statement): Use raptor_term fields. (raptor_rdfxml_element_has_property_attributes, raptor_rdfxml_start_element_grammar): Create static raptor_term objects on stack for use in constructing parameter sets for raptor_rdfxml_generate_statement. Several of these should be dynamic and/or constructed once parser-wide. * src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_statement.c: Replace raptor_identifier with raptor_term inside rdf/xml parser. struct raptor_rdfxml_element_s updated to change fields reified, bag, subject, predicate, object from raptor_identifier to raptor_term. Also added a reified_id field for storing an ID used for reification; not clear if this is entirely necessary. (raptor_clear_term): Added based on raptor_clear_identifier. (raptor_free_term): Added. (raptor_copy_term): Added based on raptor_copy_identifier but not calling raptor_free term on dest; call raptor_clear_term instead. (raptor_free_rdfxml_element): Use raptor_clear_term to replace raptor_clear_identifier. (raptor_rdfxml_generate_statement): Updated to use raptor_term field names. Some loss of clarity here since identifier URI/blank node fields are merged into one void* term field 'value' for now. (raptor_rdfxml_process_property_attributes, raptor_rdfxml_start_element_grammar): Updated for raptor_term fields. For capturing bag/reified IDs, use local variables rather than overloading subject/reified/bad.id fields. * src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Make abbrev_node constructors/lookup functions use raptor_term (raptor_new_abbrev_node): Pass in a raptor_term and use that to find fields to copy. (raptor_abbrev_node_lookup, raptor_abbrev_subject_find, raptor_abbrev_subject_lookup): Lookup using fields in a passed in raptor_term. Update callers to use raptor_term when searching - means creating some static raptor_term objects on the stack for now; will be either references or dynamically created when raptor_abbrev_node / raptor_term node merge is done. * src/raptor.h, src/raptor_serialize_ntriples.c: Added raptor_iostream_write_term_ntriples and raptor_iostream_write_statement_ntriples to public API (raptor_iostream_write_statement_ntriples): Renamed from raptor_iostream_write_statement_ntriples_v2 and loses world arg. (raptor_iostream_write_term_ntriples): Renamed from internal raptor_iostream_write_statement_part_ntriples and down to just 2 args: the iostr and term. (raptor_ntriples_serialize_statement): Updated call to raptor_iostream_write_statement_ntriples. * src/raptor_internal.h, src/raptor_statement.c: Added raptor_term_compare split out from raptor_statement_compare * src/raptor.h, src/raptor_abbrev.c, src/raptor_statement.c: Turn print-part-of-statements functions into methods of raptor_term (raptor_term_as_counted_string): Renamed from raptor_statement_part_as_counted_string and just take term arg. (raptor_term_as_string): Renamed from raptor_statement_part_as_string and just take term arg. Update callers to use new 1-arg convention. * src/raptor_statement.c: raptor_term_print_as_ntriples formed from raptor_print_statement_as_ntriples (raptor_term_print_as_ntriples): Renamed from raptor_print_statement_part_as_ntriples (raptor_print_statement_as_ntriples): Call above with raptor_term pointer. * librdfa/curie.c, librdfa/rdfa.c, src/ntriples_parse.c, src/raptor.h, src/raptor_abbrev.c, src/raptor_expat.c, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_librdfa.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/turtle_lexer.l, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: New raptor_uri implementation - reference counted uris with interning. Based on librdf_uri reference counted uris with interning in an librdf_hash, this uses a raptor_avltree to store/lookup previously seen uris so that a single URI string has one raptor_uri* object. Removed initial world parameter from all raptor_uri class methods. Update all callers of above. rdfdiff debug prints also updated to generate ntriples * src/raptor_abbrev.c: Remove too-clever inline editing of uri string in raptor_new_qname_from_resource * src/raptor_general.c, src/raptor_internal.h, src/raptor_uri.c: Add raptor_uri_finish stup for uri class cleanup * docs/raptor-sections.txt, docs/tmpl/section-feature.sgml, docs/tmpl/section-general.sgml, docs/tmpl/section-iostream.sgml, docs/tmpl/section-locator.sgml, docs/tmpl/section-parser.sgml, docs/tmpl/section-sax2.sgml, docs/tmpl/section-sequence.sgml, docs/tmpl/section-serializer.sgml, docs/tmpl/section-triples.sgml, docs/tmpl/section-unused.sgml, docs/tmpl/section-uri.sgml, docs/tmpl/section-world.sgml, docs/tmpl/section-www.sgml, docs/tmpl/section-xml-namespace.sgml, docs/tmpl/section-xml-qname.sgml, docs/tmpl/section-xml.sgml: Update some generated docs. * librdfa/rdfa.c, src/ntriples_parse.c, src/raptor.h, src/raptor_abbrev.c, src/raptor_feature.c, src/raptor_grddl.c, src/raptor_json_writer.c, src/raptor_librdfa.c, src/raptor_namespace.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_serialize.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_test.c, src/raptor_xml_writer.c, src/raptor_xsd.c, src/turtle_lexer.l, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: Remove _v2 suffix from raptor_uri constructors * src/raptor_rss.c: (raptor_rss_emit_connection): Use raptor_uri* for predicate_uri arg * src/raptor_internal.h, src/raptor_uri.c, src/raptor_xml_writer.c: Removed raptor_uri_handler and made all URI functions work direct with default implementation * src/raptor.h, src/raptor_internal.h, src/raptor_uri.c: Move raptor_uri_handler to internal and remove get/set functions. (raptor_uri_get_handler_v2, raptor_uri_set_handler_v2): Deleted (raptor_uri_init): Set default handler directly. * src/raptor.h: Add raptor_new_identifier_from_identifier prototype * src/raptor.h, src/raptor_identifier.c: Add reference count model for raptor_identifier (raptor_new_identifier_from_identifier): Set initial usage to 1 when allocaed as an object; initialising statically does not use this. (raptor_new_identifier_from_identifier): Added copy constructor (raptor_free_identifier): Free when usage is 0. static identifiers do not call this; they use raptor_clear_identifier 2010-01-08 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_rdfxml.c, src/turtle_parser.y: Remove is_malloced field from raptor_identifier raptor_identifier loses is_malloc field (raptor_clear_identifier): Added to clear fields of static identified; pulled out of raptor_free_identifier (raptor_free_identifier): Call above and then free the object. * src/raptor.h, src/raptor_parse.c, src/raptor_serialize.c, utils/rapper.c: Rename parser/serializer feature enumeration methods to be on raptor_world class (raptor_world_enumerate_parser_features): Renamed from raptor_features_enumerate_v2 (raptor_world_enumerate_serializer_features): Renamed from raptor_serializer_features_enumerate_v2. * src/raptor.h, src/raptor_feature.c, src/raptor_parse.c, utils/rapper.c: Rename raptor_set_feature to correct method name raptor_parser_set_feature * src/raptor.h, src/raptor_parse.c, utils/rapper.c: Rename raptor_set_parser_strict to correct method name raptor_parser_set_strict * utils/rdfdiff.c: Update for new parser constructor name * utils/rapper.c: Update for new parser/serializer enumerate/check method names * src/raptor.h, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_serialize_rss.c: Rename parser/serializer enumerating, checking and guessing functions to be methods of raptor_world. (raptor_world_enumerate_parsers): Renamed from raptor_parsers_enumerate_v2 (raptor_syntaxes_enumerate_v2): Deleted; use raptor_world_enumerate_parsers. (raptor_world_is_parser_name): Renamed from raptor_syntax_name_check_v2 (raptor_world_guess_parser_name): Renamed from raptor_guess_parser_name_v2 (raptor_new_parser): Renamed from raptor_new_parser_v2 (raptor_new_parser_for_content): Renamed from raptor_new_parser_for_content_v2. (raptor_world_enumerate_serializers): Renamed from raptor_serializers_enumerate_v2. (raptor_world_is_serializer_name): Renamed from raptor_serializer_syntax_name_check_v2 (raptor_new_serializer): Renamed from raptor_new_serializer_v2 * src/raptor_internal.h: Restore raptor_simple_message_handler for internal use * src/raptor_general.c: (raptor_log_error): All user error handlers are called here now. * src/raptor.h: Delete raptor_simple_message_handler - nothing uses it anymore. * src/raptor.h, src/raptor_namespace.c, src/raptor_xml.c: raptor_xml_any_escape_string and raptor_xml_any_escape_string use raptor_world to replace error_handler/error_data args. (raptor_xml_any_escape_string, raptor_xml_any_escape_string): Delete error_handler and error_data args and replace with raptor_world initial argument. Pass errors via raptor_log_error/formatted. * src/raptor.h, src/raptor_internal.h, src/raptor_serialize.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c: Serializer class loses specific fatal/error/warning handling (raptor_serializer_set_error_handler, raptor_serializer_set_warning_handler): Deleted (raptor_serializer_error, raptor_serializer_simple_error, raptor_serializer_error_varargs, raptor_serializer_warning, raptor_serializer_warning_varargs): Removed the internal functions that called the serializer-specific handlers. In serializers replaced calls to the above functions with raptor_log_error or raptor_log_error_formatted depending on the arguments present. * src/raptor_internal.h, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: raptor_new_turtle_writer loses error_handler / error_data args. struct raptor_turtle_writer_s loses error_handler and error_data fields. (raptor_new_turtle_writer): error_handler and error_data args deleted. Updated callers. * src/raptor.h, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_xml_writer.c: raptor_new_xml_writer_v2 loses error_handler / error_data args. raptor_xml_writer gains raptor_world field. (raptor_new_xml_writer_v2): Delete args. Store world. * src/raptor.h, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize.c, src/raptor_turtle_writer.c, src/raptor_xml.c, src/raptor_xml_writer.c: All raptor_iostream constructors gain an initial raptor_world arg. (raptor_new_iostream_from_handler2, raptor_new_iostream_to_sink, raptor_new_iostream_to_filename, raptor_new_iostream_to_file_handle, raptor_new_iostream_to_string, raptor_new_iostream_from_sink, raptor_new_iostream_from_filename, raptor_new_iostream_from_file_handle, raptor_new_iostream_from_string): Gain an initial raptor_world* world argument. Consequently: (raptor_iostream_write_xml_any_escaped_string, raptor_iostream_write_xml_escaped_string): Both lose the error_handler and error_data args since it can send errors via the internal world. * src/raptor.h, src/raptor_qname.c, src/turtle_parser.y: raptor_qname_string_to_uri loses error_handler/error_data args. (raptor_qname_string_to_uri): Delete error_handler and error_data args. Use raptor_log_error_formatted to report prefix error. * src/raptor.h, src/raptor_qname.c, src/raptor_sax2.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_xml_writer.c: raptor_new_qname loses error_handler / error_data args (raptor_new_qname): delete args and use raptor_log_error_formatted for error reporting. Update callers. * src/raptor.h, src/raptor_namespace.c, src/raptor_rss.c, src/raptor_serialize_dot.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c, src/raptor_xml_writer.c: raptor_new_namespaces_v2 loses error_handler / error_data args. (raptor_new_namespaces_v2): Delete args. Update all callers with the change - many of which were NULL/NULL anyway! * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_namespace.c, src/raptor_sax2.c, src/turtle_parser.y: raptor_namespaces_init_v2 loses error_handler / error_data (raptor_log_error_formatted): Added to write a formatted error message with sprintf style. raptor_namespace_stack: loses error_handler and error_data fields. (raptor_namespaces_init_v2): Remove error_handler and error_data args. (raptor_new_namespace_from_uri): Use raptor_log_error_formatted to format an error message with argument. Update all calls to raptor_namespaces_init_v2 to remove error handler/data args. * src/raptor_json_writer.c: Update call to error_handler in #defined-out code * src/raptor_internal.h, src/raptor_json_writer.c, src/raptor_serialize_json.c: Remove error_handler/error_data from json writer struct raptor_json_writer_s: loses error_handler and error_data fields. (raptor_new_json_writer): loses error_handler and error_data args. (raptor_json_serialize_start): Update for new signature. * src/raptor_libxml.c: Initialise libxml generic error with pointer to raptor_world (raptor_libxml_generic_error): Expect world and never a locator. (raptor_libxml_init): Initialise generic error func with world user data. * src/raptor_libxml.c: Handle new XML_FROM_SCHEMATRONV introduced in libxml 2.6.32 2008-04-08 * src/raptor.h, src/raptor_general.c, src/raptor_internal.h, src/raptor_libxml.c: libxml generic & structured error saving defaults on. These are turned on by default so that when libxml library-wide generic/structured error handlers are set, this happens by default. Previously (1.4.x) it was done anyway, regardless of the flags. raptor_libxml_flags: update docs to note default is on. (raptor_new_world): set the flags on. raptor_world_s: update docs for libxml_flags field to note default. (raptor_libxml_xmlStructuredError_handler_common): Renamed from raptor_libxml_xmlStructuredErrorFunc and contains the core libxml error handling but not the parameter guessing. (raptor_libxml_xmlStructuredError_handler_global): Added to take structured errors from the global libxml handlers. Calls raptor_libxml_xmlStructuredErrorFunc with world and always NULL locator. (raptor_libxml_xmlStructuredError_handler_parsing): Added to take structured errors from serror SAX handler. Calls raptor_libxml_xmlStructuredErrorFunc with any world and locator found. * src/raptor_general.c, src/raptor_internal.h, src/raptor_libxml.c: raptor_log_error no longer needs/uses error hander/data args (raptor_log_error): Remove args and pick handler/data from work error handlers. (raptor_log_error_varags): Just call raptor_log_error and no longer pick error handler/data here. * src/raptor.h, src/raptor_general.c, src/raptor_parse.c, utils/rapper.c, utils/rdfdiff.c: Move error-handler setting functions to methods of raptor_world (raptor_world_set_fatal_error_handler): Renamed from raptor_set_fatal_error_handler from parser class. (raptor_world_set_error_handler): Renamed from raptor_set_error_handler from parser class. (raptor_world_set_warning_handler): Renamed from raptor_set_warning_handler from parser class. Updated rapper.c and rdfdiff.c to use new names and calling convention. * src/raptor_general.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_parse.c, src/raptor_sax2.c, src/raptor_www.c: raptor_log_error_varargs no longer needs/users error handler/data args (raptor_log_error_varargs): Remove args and pick handler and handler data from world error_handlers. Update all callers of above. * src/raptor_www_libxml.c: (raptor_www_libxml_init, raptor_www_libxml_free): Remove error_handlers code. * src/raptor_libxml.c, src/raptor_sax2.c: Move libxml init/free code to raptor_libxml_init and raptor_libxml_finish (raptor_libxml_init): Add xmlInitParser call. (raptor_libxml_finish): Add xmlCleanupParser call. (raptor_sax2_init): Remove xmlInitParser call. (raptor_sax2_finish): Remove xmlCleanupParser call. * src/raptor_grddl.c: Remove use of xmlSetStructuredErrorFunc from GRDDL parser. (raptor_grddl_parse_chunk): Remove call to xmlSetStructuredErrorFunc which is now done in raptor_libxml_init, once per-library. * src/raptor_internal.h, src/raptor_libxml.c: Removed raptor_libxml_sax_init_error_handlers - no users remain. (raptor_libxml_sax_init_error_handlers): Deleted and merged back into raptor_libxml_sax_init * src/raptor_grddl.c: GRDDL parser does not need or use libxml2 sax object. struct raptor_grddl_parser_context_s loses sax field. (raptor_grddl_parse_init_common): Remove call to raptor_libxml_sax_init_error_handlers. * src/raptor_grddl.c: GRDDL parser does not need to create a raptor_sax2 for error handlers. struct raptor_grddl_parser_context_s loses sax2 field. (raptor_grddl_parse_init_common, raptor_grddl_parse_terminate): Do not init / free sax2. * src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_libxml.c, src/raptor_sax2.c: Make libxml error handling save/restore happen once in world struct raptor_sax2_s loses saved_structured_error_context, saved_structured_error_handler, saved_generic_error_context and saved_generic_error_handler struct raptor_world_s gains above fields. (raptor_libxml_init, raptor_libxml_finish): Added to capture the save/restore of xmlSetStructuredErrorFunc and xmlSetGenericErrorFunc context and handlers. (raptor_world_open, raptor_free_world): Call raptor_libxml_init and raptor_libxml_finish. (raptor_libxml_sax_init_error_handlers): Renamed from raptor_libxml_init_sax_error_handlers. (raptor_libxml_sax_init): libxml setup specific to a SAX setup (raptor_grddl_parse_init_common): Use above. (raptor_new_sax2): Delete libxml init code. (raptor_sax2_parse_start): Delete xmlSetStructuredErrorFunc call and use raptor_libxml_sax_init. * src/raptor_grddl.c: (raptor_grddl_parse_init_common): Code style. 2010-01-07 Dave Beckett <dave@dajobe.org> * librdfa/rdfa.c, librdfa/rdfa.h, src/raptor.h, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_libxml.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c: Alter raptor_new_sax2() to take world and locator not error_handlers. struct raptor_sax2_s loses error_handlers field. (raptor_new_sax2): Change to add world and locator at start; store them and forget about error_handlers. (raptor_sax2_simple_error, raptor_sax2_parse_chunk, raptor_sax2_start_element): Take error handlers from world, not sax2. (raptor_grddl_parse_init_common, raptor_librdfa_parse_start, raptor_rdfxml_parse_init, raptor_rss_parse_init): Update to new raptor_new_sax2 calling convention. (raptor_libxml_warning, raptor_libxml_error_common, raptor_libxml_validation_warning): Call error handlers under world rather than in sax2 error_handlers object. (raptor_libxml_xmlStructuredErrorFunc): Find error handlers via world. struct rdfacontext [in librdfa] replaces error_handlers with world and locator fields for use in calling raptor_new_sax2() (rdfa_create_new_element_context) [in librdfa]: no need to copy error_handlers. (rdfa_parse_start) [in librdfa] use stored world and locator. * src/raptor.h: Removed prototype for raptor_www_set_error_handler * src/raptor_general.c, src/raptor_grddl.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_parse.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_www.c: Moved raptor_error_handlers to one instance in raptor_world. structs raptor_parser_s and raptor_www_s lose error_handlers field. struct raptor_world_s gains error_handlers field and new internal_ignore_errors flag to temporarily disable errors. (raptor_new_world): Initialise error handlers structure; this is now the only place in the library this is done the public function raptor_error_handlers_init_v2() Consequently raptor_error_handlers_init_v2() could be moved internal and the raptor_error_handlers structure made just fields in raptor_world rather than a public structure that is hard to version. (raptor_world_internal_set_ignore_errors): Added internal function to disable invoking all error handlers when set. Used in the GRDDL parser and when WWW-fetching in some cases to ignore parse/404 errors. (raptor_log_error_to_handlers, raptor_log_error_varargs, raptor_log_error): Respect the ignore errors flag. (raptor_grddl_discard_message): Deleted. (raptor_grddl_fetch_uri): No longer uses above function but instead calls raptor_world_internal_set_ignore_errors() before and after the WWW fetch. (raptor_grddl_run_recursive): Also no longer sets error handlers to ignore errors and uses raptor_world_internal_set_ignore_errors before and after running an internal parser. (raptor_new_parser_v2): Do not init error_handlers field, just set locator. (raptor_www_set_error_handler): Deleted; not necessary since the error_handlers is part of raptor_world not in raptor_www. (raptor_parse_uri_with_connection): Removed call to raptor_www_set_error_handler. (raptor_parser_copy_user_state): Do not copy removed error_handlers field. (raptor_www_new_with_connection_v2): Do not init error_handlers field. * src/raptor_parse.c: (raptor_parser_copy_user_state): Code style for assignments. * src/raptor_internal.h: Delete unused field from raptor_parser_s * src/raptor_abbrev.c, src/raptor_internal.h: Remove unused ordinal code from raptor_abbrev_node raptor_abbrev_node: lose ordinal union part. (raptor_abbrev_subject_add_list_element): Deleted. * src/raptor.h: Remove RAPTOR_WORLD_DECLARED * src/raptor_internal.h: Remove an old RAPTOR_DISABLE_V1-protected prototype. 2010-01-06 Dave Beckett <dave@dajobe.org> * src/raptor.h: Break raptor_error_handlers struct ABI moving handlers array to end. Remove V2 API fixmes near this; also allows new log levels to be added later. * src/raptor_internal.h: Remove unused static_usage field from raptor_world * src/ntriples_parse.c: Replace raptor_ntriples_term_type with raptor_term_type (raptor_ntriples_generate_statement): Change types of args. Just assign term types to statement types. (raptor_ntriples_parse_line): Declare array of 3 term types. * src/Makefile.am: remove n3 tests * configure.ac, src/Makefile.am, src/n3_common.h, src/n3_lexer.l, src/n3_parser.y, src/turtle_parser.y: Remove experimental N3 flex/bison parser - let turtle parser handle it This code was never in production/released code and will never be since the turtle parser is likely to be updated and rewritten. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_abbrev.c, src/raptor_grddl.c, src/raptor_identifier.c, src/raptor_internal.h, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, src/raptor_xsd.c, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: Rename raptor_identifier_type enum and values to raptor_term_type The enum values changed: from RAPTOR_IDENTIFIER_TYPE_RESOURCE to RAPTOR_TERM_TYPE_URI, from RAPTOR_IDENTIFIER_TYPE_ANONYMOUS to RAPTOR_TERM_TYPE_BLANK, from RAPTOR_IDENTIFIER_TYPE_LITERAL to RAPTOR_TERM_TYPE_LITERAL and from RAPTOR_IDENTIFIER_TYPE_UNKNOWN to RAPTOR_TERM_TYPE_UNKNOWN. * librdfa/iri.c: fix warning: cast from pointer to integer of different size (rdfa_iri_get_base): Do pointer calculations then cast result to unsigned int. * src/raptor.h: Remove RAPTOR_V2_AVAILABLE - not needed * configure.ac: Remove -DRAPTOR_V2_EXPERIMENTAL=1 not needed anymore * src/raptor.h, src/raptor_serialize.c: raptor_serialize_start replaced by raptor_serialize_start_to_iostream (raptor_serialize_start): Removed deprecated function replaced by correctly named raptor_serialize_start_to_iostream. * src/ntriples_parse.c, src/raptor.h: Removed raptor_ntriples_term_type from public api. Moved raptor_ntriples_term_type to ntriples_parse.c module only. It could be replaced by a more general raptor_term_type in future when it gets added. * src/raptor.h, src/raptor_abbrev.c, src/raptor_identifier.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, utils/rdfdiff.c: Remove RAPTOR_IDENTIFIER_TYPE_XML_LITERAL This was used for rdf:parseType="Literal" object literals internally but publically always is turned into RAPTOR_IDENTIFIER_TYPE_LITERAL. raptor_identifier_type loses RAPTOR_IDENTIFIER_TYPE_XML_LITERAL value. Removed all code for this which mostly was deleting switch cases but also deletes some functions from the Turtle and RDF/XML-abbrev serializers. (raptor_rdfxmla_emit_xml_literal, raptor_turtle_emit_xml_literal): Deleted. * src/raptor.h, src/raptor_abbrev.c, src/raptor_identifier.c, src/raptor_rdfxml.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c src/raptor_serialize_rdfxmla.c , src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, utils/rdfdiff.c: raptor_identifier_type loses the RAPTOR_IDENTIFIER_TYPE_ORDINAL value. raptor_identifier loses ordinal field. Consequent removal of RAPTOR_IDENTIFIER_TYPE_ORDINAL from cases especially handling predicates. (raptor_rdfxml_end_element_grammar, raptor_rdfxml_generate_statement, raptor_rdfxml_process_property_attributes, raptor_rdfxml_serialize_statement): Most changes were made here to generate a URI instead of the ordinal integers from the various rdf:li element forms. Multiple serializers are now simpler in not having to check for predicate (or even subject/object) ordinals. Several if ordinal {ordinal handling } .. else {uri handling} were removed. rdfdiff lost several checks for ordinal/resource alternatives. (rdfdiff_ordinal_equals_resource): Deleted. * utils/rdfdiff.c: Remove checks for RAPTOR_IDENTIFIER_TYPE_PREDICATE comparison with ordinal for equality. * src/raptor.h, src/raptor_abbrev.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_statement.c: Removed RAPTOR_IDENTIFIER_TYPE_PREDICATE raptor_identifier_type loses RAPTOR_IDENTIFIER_TYPE_PREDICATE which has been a synonym for RAPTOR_IDENTIFIER_TYPE_RESOURCE for some time. Update code to remove from switch()s and conditions. * src/n3_parser.y, src/raptor.h, src/raptor_identifier.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_serialize_rss.c, src/raptor_xsd.c, src/turtle_parser.y: Deleted raptor_uri_source enum and removed from raptor_identifier. Only in RDF/XML parser and not used for anything public. (raptor_new_identifier_v2): Delete uri_source arg. (raptor_copy_identifier, raptor_set_identifier_uri, raptor_set_identifier_id): Remove assignments to uri_source field. (raptor_rdfxml_generate_statement): Remove 3 uri_source args. (raptor_rss10_emit_item): Remove assignment to uri_source field. Change all calls to raptor_new_identifier_v2() and raptor_rdfxml_generate_statement() in the RDF/XML parser. * src/n3_parser.y, src/ntriples_parse.c, src/raptor.h, src/raptor_grddl.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_statement.c, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: Make a raptor_statement into a 3-tuple of raptor_term. This is a short term stage before merging raptor_term with raptor_identifier and getting rid of raptor_triple (in N3 and Turtle parsers). Also want to make the 3 raptor_terms in raptor_statement as object references not statics, and add a graph term. raptor_identifier_type should be raptor_term_type and have less values: kill ordinal and predicate types. Lots of structure name field changes everywhere statement is used. 2010-01-05 Dave Beckett <dave@dajobe.org> * src/raptor.h, src/raptor_abbrev.c, src/raptor_internal.h, src/raptor_parse.c, src/raptor_rss_common.c, src/raptor_serialize_json.c, src/raptor_serialize_rss.c, src/raptor_statement.c, utils/rdfdiff.c: Add raptor_world field to raptor_statement, remove raptor_statement_v2. raptor_statment gains a raptor_world* field. raptor_statement_v2 typedef is deleted. (raptor_print_statement_as_ntriples_common, raptor_statement_compare_common): Deleted these internal helper functions. (raptor_print_statement_v2): Renamed to raptor_print_statement (raptor_print_statement_as_ntriples_v2): Renamed to raptor_print_statement_as_ntriples. (raptor_statement_part_as_counted_string_v2): Renamed to raptor_statement_part_as_counted_string. (raptor_statement_part_as_string_v2): Renamed to raptor_statement_part_as_string. (raptor_statement_compare_v2): Renamed to raptor_statement_compare. (raptor_statement_copy): Loses world arg. (raptor_statement_copy_v2, raptor_statement_copy_v2_from_v1): Deleted. (raptor_free_statement): Loses world arg. (raptor_free_statement_v2, raptor_print_statement_v1): Deleted (raptor_statement_init): Added to initialise statically a allocated statement. (raptor_new_parser_v2): Init static statement with raptor_statement_init(). 2010-01-05 Dave Beckett <dave@dajobe.org> * src/ntriples_parse.c, src/raptor.h, src/raptor_iostream.c, src/raptor_turtle_writer.c, src/raptor_uri.c: Removed all V1 deprecated functions and structures. (raptor_ntriples_term_as_string, raptor_ntriples_string_as_utf8_string, raptor_new_iostream_from_handler, raptor_iostream_get_bytes_written_count, raptor_iostream_write_string_turtle, raptor_uri_is_file_uri): Deprecated functions deleted raptor_ntriples_parser and raptor_iostream_handler: Deprecated typedefs removed. * src/raptor.h: Remove RAPTOR_V2_AVAILABLE blocks - V2 is always available * src/raptor.h, src/raptor_feature.c, src/raptor_general.c, src/raptor_identifier.c, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_ntriples.c, src/raptor_statement.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_xml_writer.c: Remove all raptor v1 APIs with v2 replacements. Remove RAPTOR_V2_EXPERIMENTAL - no longer experimental. Remove RAPTOR_V1 - not needed. Remove all blocks that were protected by RAPTOR_DISABLE_V1 including structs, prototypes and V1 functions. * src/raptor_parse.c: Fix static accept_header string length so result is always NUL terminated (raptor_parser_get_accept_header): The static last-resource accept_header static string is 11 chars not 9. Ensure buffer is big enough so that the NUL gets copied by strncpy(). * tests/turtle/ex-38-turtle.out: Restore hack out file ex-38-turtle.out * tests/.gitignore, tests/rdfxml/ex-38-rdfxmla.out: Restore hack out file ex-38-rdfxmla.out * src/n3_lexer.l, src/n3_parser.y, src/ntriples_parse.c, src/parsedate.y, src/raptor.h, src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_expat.c, src/raptor_feature.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_identifier.c, src/raptor_iostream.c, src/raptor_json_writer.c, src/raptor_librdfa.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_memstr.c, src/raptor_namespace.c, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss.h, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_simple.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_utf8.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/raptor_xsd.c, src/snprintf.c, src/strcasecmp.c, src/turtle_common.c, src/turtle_lexer.l, src/turtle_parser.y, utils/getopt.c, utils/rapper.c, utils/rdfdiff.c: Code style - whitespace around assignment and comparison ops 2010-01-02 Dave Beckett <dave@dajobe.org> * Use AM_SILENT_RULES and move autotools helper files to build/ dir Update autogen.sh with latest version; dependent on automake 1.11 and it's dependencies to get AM_SILENT_RULES. Update configure.ac to invoke AM_SILENT_RULES defaulting to 'no'. * Remove RCS ID * Update another .gitignore * Add .gitignore to replace SVN properties svn:ignore �����������������������������������������������������������������������������������������������raptor2-2.0.15/NOTICE�������������������������������������������������������������������������������0000644�0001750�0001750�00000000264�10360131567�011021� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This product includes Redland software (http://librdf.org/) developed at the Institute for Learning and Research Technology, University of Bristol, UK (http://www.bristol.ac.uk/). ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/INSTALL������������������������������������������������������������������������������0000644�0001750�0001750�00000036600�12425344566�011162� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `<wchar.h>' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ��������������������������������������������������������������������������������������������������������������������������������raptor2-2.0.15/NEWS.html����������������������������������������������������������������������������0000644�0001750�0001750�00000127346�12425346726�011603� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Raptor RDF Syntax Library - News

Raptor RDF Syntax Library - News

2014-11-01 Raptor2 Version 2.0.15 Released

Made several fixes to Turtle / N-Triples family of parsers and serializers
Added utility functions for re-entrant sorting of objects and sequences.
Made other fixes and improvements including fixing reported issues: 0000574, 0000575, 0000576, 0000577, 0000579, 0000581 and 0000584.

See the Raptor2 2.0.15 Release Notes for the full details of the changes.

2014-05-05 Raptor2 Version 2.0.14 Released

Many code quality fixes from clang and coverity primarily in error path cleanups (oom) and dead code.
Fixed Turtle 1.1 parser about triple quoting alignment with SPARQL
A few internal changes.

See the Raptor2 2.0.14 Release Notes for the full details of the changes.

2013-01-29 Raptor2 Version 2.0.13 Released

Fix configure not finding curl when curl-config --cflags is empty
Fixed reported issue: 0000562.

See the Raptor2 2.0.13 Release Notes for the full details of the changes.

2013-12-13 Raptor2 Version 2.0.12 Released

N-Triples / N-Quads parser updated to pass all the RDF 1.1 2013 tests
Added raptor_new_term_from_counted_string()

See the Raptor2 2.0.12 Release Notes for the full details of the changes.

2013-11-24 Raptor2 Version 2.0.11 Released

Completed support for RDF 1.1 N-Triples (aka N-Triples 2013)
Added a few new API calls
Made several build, portability and configuration improvements
Fixed reported issues: 0000554 and 0000556.

See the Raptor2 2.0.11 Release Notes for the full details of the changes.

2013-07-27 Raptor2 Version 2.0.10 Released

Completed support for Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013 (Turtle 2013)
Added support for N-Triples W3C Working Group Note 09 April 2013 (N-Triples 2013)
Added a few new Turtle and N-Triples support functions
Update configure to better handle mixed pkg-config settings
Fixed reported issues: 0000532, 0000535, 0000545 and 0000548

See the Raptor2 2.0.10 Release Notes for the full details of the changes.

2013-02-26 Raptor2 Version 2.0.9 Released

Added full parsing and serializing support for Turtle Terse RDF Triple Language W3C Candidate Recommendation 19 February 2013
Added CMake build framework for building Raptor on Microsoft (Daniel Richard G.)
Made a few minor fixes and improvements
Fixed reported issues: 0000499, 0000508, 0000520, 0000521 and 0000526

See the Raptor2 2.0.9 Release Notes for the full details of the changes.

2012-06-24 Raptor2 Version 2.0.8 Released

Added support for RDFa 1.1 via updated librdfa
Multiple portability fixes for Windows and Solarises. (Daniel Richard G.)
Multiple minor fixes and improvements
Fixed reported issues: 0000381, 0000487, 0000505 and 0000507

See the Raptor2 2.0.8 Release Notes for the full details of the changes.

2012-03-22 Raptor2 Version 2.0.7 Released

CVE-2012-0037 fixed
Removed Expat support
Removed internal Unicode NFC code for better and optional ICU
Added options for denying file requests and XML entity loading
Added options for SSL certificate verifying
Fixed reported issues: 0000448 and 0000469

See the Raptor2 2.0.7 Release Notes for the full details of the changes.

2011-11-27 Raptor2 Version 2.0.6 Released

Fixed expat support which was broken in 2.0.5
Handle libCurl SSL options before 7.16.4 (2007)
Add a few sequence utility methods for sort, reverse and permute

See the Raptor2 2.0.6 Release Notes for the full details of the changes.

2011-11-14 Raptor2 Version 2.0.5 Released

All parsers and serializers use the W3C Format URIs as their primary URI
N-Quads parser can now handle optional context/graph URI
Turtle serializer uses official text/turtle mime type
Added some additional UTF-8 and snprintf utility functions
No longer needs math functions trunc, lround and round.
Several internal code style fixes and cleanups
Fixed reported issues: 0000465, 0000476, 0000479 and 0000481.

See the Raptor2 2.0.5 Release Notes for the full details of the changes.

2011-07-25 Raptor2 Version 2.0.4 Released

RDF/JSON parser now supports YAJL V2
Support libcurl 7.21.7 that removed the curl/types.h header
TRiG parser now supports the optional ':' in 'uri : { }' syntax
WWW module now supports setting SSL client side certificates
Fixed reported issues: 0000308, 0000449, 0000451, 0000455, 0000456 and 0000457

See the Raptor2 2.0.4 Release Notes for the full details of the changes.

2011-06-01 Raptor2 Version 2.0.3 Released

Added a raptor2.h header
Turtle / TRiG parser improvements for larger documents
Fixes from LLVM clang static code analyzer
Fixed reported issues: 0000437.

See the Raptor2 2.0.3 Release Notes for the full details of the changes.

2011-03-20 Raptor2 Version 2.0.2 Released

Fixed a too strict version checking bug in raptor_new_world()

See the Raptor2 2.0.2 Release Notes for the full details of the changes.

2011-03-20 Raptor Version 2.0.1 Released

DO NOT USE. Use 2.0.2 which fixes a too strict version checking bug in raptor_new_world()
Some minor fixes:
The N-Quads serializer was fixed to output the graph name correctly
The RDFa parser built with librdfa can now be linked with the standard librdfa
Fixed reported issues: 0000416.

See the Raptor 2.0.1 Release Notes for the full details of the changes.

2011-01-03 Raptor Version 2.0.0 Released

Raptor 2 final release
Some minor API changes since the last beta.
Fixed reported issue: 0000405.

The Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 2.0.0 provides detailed function, macro, enum and type changes. The upgrading document explains how to upgrade existing Raptor V1 code to the new APIs.

See the Raptor 2.0.0 Release Notes for the full details of the changes.

2010-12-01 Raptor Version 1.9.1 Released

Raptor 2 second beta release with some API changes. 2.0.0 final expected next.
Improved the V1 to V2 upgrading script
raptor_new_world() checks Raptor header and library are consistent
Constructors now validate the world pointer is from Raptor V2
Added an N-Quads parser
Added and removed a few API calls
Fixed a few bugs including reported issue 0000402

The Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 1.9.1 provides detailed function, macro, enum and type changes. The upgrading document explains how to upgrade existing Raptor V1 code to the new APIs.

See the Raptor 1.9.1 Release Notes for the full details of the changes.

2010-08-16 Raptor Version 1.9.0 Released

Raptor 2 first beta release. There may be changes before a stable 2.0.0 API
Removed all deprecated functions and typedefs.
Renamed all functions to the standard raptor_class_method form.
All constructors take a raptor_world argument.
URIs are interned and there is no longer a swappable implementation.
Statement is now an array of 3-4 RDF Terms to support triples and quads.
World object owns logging, blank node ID generation and describing syntaxes.
Features are now called options and have typed values.
GRDDL parser now saves and restores shared libxslt state.
Added serializers for HTML 'html' and N-Quads 'nquads'.
Added parser 'json' for JSON-Resource centric and JSON-Triples.
Switched to GIT version control hosted by GitHub.
Added memory-based AVL-Tree to the public API.
Fixed reported issues: 0000357, 0000361, 0000369, 0000370, 0000373 and 0000379

The Raptor 2 API reference manual section on Changes between raptor 1.4.21 and 1.9.0 provides detailed function and type changes. The upgrading document explains how to upgrade existing Raptor V1 code to the new APIs.

See the Raptor 1.9.0 Release Notes for the full details of the changes.

2010-01-30 Raptor Version 1.4.21 Released

This is a bug fix only release with no new features. New development has moved to raptor 2 where a planned ABI and API break is underway.
RDFa parser buffer management problems were fixed
Turtle parser and serializer now use QNames correctly against specification
RDF/XML parser now resets correctly to detect duplicate rdf:IDs
Made a few other minor bug and build fixes
Fixed reported issues: 0000318, 0000319, 0000326, 0000331, 0000332 and 0000337

See the Raptor 1.4.21 Release Notes for the full details of the changes.

2009-11-28 Raptor Version 1.4.20 Released

Turtle serializing performance improvement by Chris Cannam
librdfa RDFa parser updates to fix empty datatype, xml:lang and 1-char prefixes by Manu Sporny
Fix a crash when the GRDDL parser reported errors
Enable large file support for 32-bit systems
Several resilience improvements by Lauri Aalto
Other minor portability and bug fixes
Fixed reported issues: 0000306 0000307 0000310 and 0000312.

See the Raptor 1.4.20 Release Notes for the full details of the changes.

2009-07-19 Raptor Version 1.4.19 Released

Many improvements to RSS tag soup (RSSes and Atom) parser and the RSS 1.0 and Atom serializers
Several fixes and improvements to the N-Triples, RDFa and RDF/XML parsers and Turtle serializer
Improved the use and configuration of static libxml functions for better compatibility
Several Win32 portability fixes - Lou Sakey
Many internal changes for upcoming Raptor V2 - primarily by Lauri Aalto
Many other fixes and resilience improvements.
Fixed reported issues: 0000259, 0000262, 0000263, 0000266, 0000269, 0000270, 0000276, 0000277, 0000287, 0000288, 0000289, 0000290, 0000293, 0000296, 0000299 and 0000303.

WARNING: FUTURE ABI and API CHANGES. The next release of raptor 1.4.x will include bug fixes only and no new features. New development will move to raptor 2 where a planned ABI and API break will happen. There may be preview releases of raptor 2 with 1.9.x numbering.

See the Raptor 1.4.19 Release Notes for the full details of the changes.

2008-06-25 Raptor Version 1.4.18 Released

Added an RDFa parser using an embedded version of librdfa by Manu Sporny of Digital Bazaar.
Added an Atom 1.0 (RFC 4287) serializer with several output parameters.
Improved RSS 1.0 serializer functionality and resilience.
Added new API methods for qname, serializer, sequence and XML writer classes.
Many other fixes and resilience improvements.
Fixed reported issues: 0000186 and 0000255.

See the Raptor 1.4.18 Release Notes for the full details of the changes.

2008-03-30 Raptor Version 1.4.17 Released

Added two new JSON serializers: resource-centric 'json' (Talis RDF/JSON) and triple-centric 'json-triples'
Added a new public XML SAX2 API class
Added a new error handling structure
Made the I/O Stream class support reading
Added several new API methods.
Made several fixes, portability and resilience improvements.
Fixed reported issues: 0000252 and 0000245.

See the Raptor 1.4.17 Release Notes for the full details of the changes.

2007-10-01 Raptor Version 1.4.16 Released

100% support for the GRDDL W3C Recommendation of 2007-09-11
Turtle parser and serializer were updated to support @base from Turtle 2007-09-11.
Turtle and RDF/XML serializers had performance improvements for large graphs.
Added a TRiG Parser based on Turtle with named graph support.
Several other API changes, fixed and improvements were made.
Fixed reported issues: 0000188, 0000192, 0000194, 0000195, 0000207, 0000210, 0000214, 0000216, 0000217, 0000232, 0000237, 0000238 and 0000239
Many other fixes and improvements.

See the Raptor 1.4.16 Release Notes for the full details of the changes.

2007-03-26 Raptor Version 1.4.15 Released

GRDDL parser substantially updated to support the GRDDL W3C Working Draft 2 March 2007
Errors for XML parsing and URI 404s are reported much better
Fixed reported issues: 0000174, 0000177, 0000178, 0000180
Many other minor fixes and improvements.

See the Raptor 1.4.15 Release Notes for the full details of the changes.

2007-01-31 Raptor Version 1.4.14 Released

New Turtle serializer by Dave Robillard based on the existing RDF/XML-Abbrev serializer.
New GraphViz DOT format serializer by Evan Nemerson.
GRDDL parser now does namespace and profile URI recursion and has other improvements and fixes.
Fixed reported issues: 0000032, 0000141, 0000143, 0000148, 0000155 and 0000157
Many other fixes and improvements.

See the Raptor 1.4.14 Release Notes for the full details of the changes.

2006-10-22 Raptor Version 1.4.13 Released

Fixed a memory leak in reusing the XML writer
Fixed reported issues: 0000134
Minor updates and fixes to tutorial, configuration and build

See the Raptor 1.4.13 Release Notes for the full details of the changes.

2006-08-27 Raptor Version 1.4.12 Released

Restore serializer enumeration ordering back to that of 1.4.10 which was causing Redland problems when writing type 'application/rdf+xml'.

See the Raptor 1.4.12 Release Notes for the gory details.

2006-08-26 Raptor Version 1.4.11 Released

Added network request filtering for parsers
Improved the GRDDL parser to read Embedded RDF and HCalendar
The Guess parser can now be reused to do multiple guesses
The RSS 1.0 Serializer now works again
Fixed reported issues: 0000014, 0000041, 0000089, 0000091 , 0000110 and 0000112
Made several other changes, fixes and improvements.

See the Raptor 1.4.11 Release Notes for the full details of the changes.

2006-07-14 Raptor Version 1.4.10 Released

Fixed a crash with RSS Tag Soup parser generating triples too late
Fixed a crash with the RDF/XML parser and serializer if a comment was seen outside an element
Parsers no longer generate any triple parts of type RAPTOR_IDENTIFIER_TYPE_ORDINAL

See the Raptor 1.4.10 Release Notes for the full details of the changes.

2006-04-22 Raptor Version 1.4.9 Released

Raptor Tutorial added covering parsing and serializing with examples
Raptor Reference Manual now covers 100% of the public API
rapper can now pretty-print RDF using namespaces as hints
Turtle parser gains boolean literals
Requests for content now send appropriate Accept: headers
No longer require libxml for rss-tag-soup parser
Various Win32 fixes and VC build files updates (John Barstow)
Many other bug fixes and changes were made.

NOTE: Generation of RAPTOR_IDENTIFIER_TYPE_PREDICATE was removed as deprecated in 1.4.8.

See the Raptor 1.4.9 Release Notes for the full details of the changes.

2006-01-03 Raptor Version 1.4.8 Released

RSS Tag Soup parser now reads Atom 1.0 and rewrites old Atom 0.3 terms
Added a guess parser that picks the parser to use based on protocol information such as HTTP Content-Type
Created an enhanced API reference manual with gtk-doc
Serializers to build can now be selected at configure time
Parsers can now return the namespace prefix/URIs seen in parsing
Turtle parser update to version 2006-01-02 (announcement)
Fix for URI resolution bugs (win32 fix by John Barstow)
Several parser bug fixes for RDF/XML, RSS and GRDDL
RDF/XML serializers and XML writer can write XML 1.0 or XML 1.1
Added an alpha Atom 1.0 serializer
Added an Adobe XMP (RDF/XML profile) serializer
Internal source reorganisation
Many other changes, fixes and improvements.

NOTE: Raptor will be switching to use Subversion for version control after the 1.4.8 release. See the Redland Subversion site or the online Raptor installation notes for the latest information.

See the Raptor 1.4.8 Release Notes for the full details of the changes.

2005-06-08 Raptor Version 1.4.7 Released

Fix crashes in the RSS tag soup parser / serializer (Suzan Foster)
Fix a crash in the RDF/XML serializers with bad URI predicates.

See the Raptor 1.4.7 Release Notes for the full details of the changes.

2005-05-19 Raptor Version 1.4.6 Released

Added a Gleaning Resource Descriptions from Dialects of Languages (GRDDL) parser for reading XHTML and XML as RDF triples
Updated RSS enclosures support in RSS tag soup parser and RSS 1.0 serializer (Suzan Foster)
Fixed several crashes with RSS tag soup parser, RDF/XML-abbrev serializer.
The turtle parser now accepts """long literals"""

See the Raptor 1.4.6 Release Notes for the full details of the changes.

2005-02-06 Raptor Version 1.4.5 Released

Added an RDF/XML with abbreviations serializer (Steve Shepard)
Handle RSS 1.1 in RSS tag soup parser
More fixes for broken OSX libxml2

See the Raptor 1.4.5 Release Notes for the full details of the changes.

2005-01-15 Raptor Version 1.4.4 Released

Fixed crashes in RSS tag soup parser and RSS 1.0 serializer
Handle RSS 0.9 namespace in RSS tag soup parser
Portability fixes for Win32 (Dave Viner)

See the Raptor 1.4.4 Release Notes for the full details of the changes.

2005-01-03 Raptor Version 1.4.3 Released

New XML Writer API
Improved RDF/XML serializer allowing user namespace declarations and writing relative URIs where possible
New RSS 1.0 serializer
Updated RSS tag soup parser
URI class can write relative URIs (Patch from René Puls)
Many other API changes

See the Raptor 1.4.3 Release Notes for the full details of the changes.

2004-11-01 Raptor Version 1.4.2 Released

Fix raptor_xml_escape_string error return.

See the Raptor 1.4.2 Release Notes for the full details of the changes.

2004-10-29 Raptor Version 1.4.1 Released

Fixed crashes in URI decoding and RSS enclosures.

See the Raptor 1.4.1 Release Notes for the full details of the changes.

2004-10-24 Raptor Version 1.4.0 Released

Added a serializing class for writing RDF triples as a syntax
Added serializers for RDF/XML and N-Triples
Added an I/O stream class for aiding writing
Added RSS enclosure support to RSS Tag Soup parser (Suzan Foster)

See the Raptor 1.4.0 Release Notes for the full details of the changes.

2004-09-20 Raptor Version 1.3.3 Released

License changed to LGPL 2.1/Apache 2
Added a new Unicode NFC checker
Rewritten URI parsing and resolving code
Added configure selection of RDF parsers
Updated the RSS Tag Soup parser to handle Atom 0.3
Updated the Turtle parser to handle large documents (Geoff Chappell)
Added a parser feature to disable rdf:ID duplicate checking
Updated rdf:ID duplicate value checking implementation
Portability fixes for building on win32 (Chris Pointon)

See the Raptor 1.3.3 Release Notes for the full details of the changes.

2004-07-21 Raptor Version 1.3.2 Released

Added support for compiling against expat source trees (Mark Smith)
Added raptor_alloc_memory to allocate memory in raptor, typically needed by handler routines on win32.
Make errors in fetching WWW content pass to the main error handler.
Added accessor functions for parts of the raptor_locator structure (Edd Dumbill)
Disabled the broken Unicode NFC checking via GNOME glib for this release.

See the Raptor 1.3.2 Release Notes for the full details of the changes.

2004-06-12 Raptor Version 1.3.1 Released

Correct raptor_print_statement declaration argument statement to have one less 'const', to match the code.
raptor.h now includes stdarg.h
Portability fixes for win32
Updates to Turtle parser to only allow language with non-datatyped literals; allow a '_' immediately after a ':' in qnames and make bare ':' work.
Added a warning for unknown rdf:parseType values, when parsing in lax mode. This is controlled by a new parser feature warn_other_parsetypes
The Turtle parser was fixed to re-initialise correctly when performing multiple parsings
Fixes to the file: URI support for %-escaping and for Win32 filenames

See the Raptor 1.3.1 Release Notes for the full details of the changes.

2004-05-11 Raptor Version 1.3.0 Released

Updated Turtle parser to fix the collections syntax, add integer literals and allow - in names.
Added support for guessing a parser from content or identifiers
Completed parser feature support
Added sending HTTP Accept: headers for WWW retrieval when possible
Added new utility sequence and stringbuffer classes
Several other functions added and improvements made.

See the Raptor 1.3.0 Release Notes for the full details of the changes.

2004-01-24 Raptor Version 1.2.0 Released

Added a Turtle parser (was N-Triples Plus) now with collections.
Added raptor_syntaxes_enumerate to get syntax name, label, mime_type or uri_string of all known parsers.
Added WWW access via BSD libfetch if available.
Updated the GNOME GUI grapper program to report errors and warnings

2003-12-31 Raptor Version 1.1.0 Released

Added an N-Triples Plus parser
Updated for RDF/XML Revised Working Draft (10 October 2003) allowing rdf:RDF to be optional by default. No further changes were needed for RDF/XML Revised Proposed Recommendation (15 December 2003)
Made URI class constructors, methods and factory methods as well as some other utility functions using or returning URIs or literals take unsigned char* rather than char*.
Added the XML namespace, XML namespace stack and XML qname classes to the public API.
Added a function to discover supported parsers.
Fixes for line number counting in N-Triples
Added support for libxml2 SAX2 API for 2.6.0 and later.
The N-Triples parser now uses the generate ID code.
Added configure options for XML 1.1 names and disabling NFC check code.

2003-09-08 Raptor Version 1.0.0 Released

Several long-deprecated functions were removed and consequently the library shared version number was increased to 1
Fixed scanning for rdf:RDF so that RDF/XML in other XML works, such as in SVG
raptor-config --libs now works, added --libtool-libs and --version-decimal
Check N-Triples legal Unicode character range #x0-#x10FFFF
Normalize RDF/XML xml:lang and N-Triples language to lowercase on input
Worked around libxml2 bug causing a crash on some error reporting
Added raptor_parse_file_stream for parsing a C FILE*
Tidied rapper utility argument handling, added --version

2003-08-25 Raptor Version 0.9.12 Released

Fix some XML memory leaks in Exclusive XML Canonicalization.
Stop parsing RSS tag soup after a user abort
Improved N-Triples syntax checking.
Crash fixes for 64 bit Alpha/Sparc Linux/Solaris (varargs, size_t)
Fixed some other minor memory leaks with rdf:datatype and rdf:ID attributes.

2003-07-29 Raptor Version 0.9.11 Released

Completely handles the revised RDF/XML syntax (including post W3C Last Call changes)
Added Unicode Normal Form C (NFC) checking for literals (requires GNOME glib 2.0 at present)
Added Exclusive XML Canonicalization for XML Literals
Added many more checks for bad syntax (mostly illegal property attributes)
Updated parseType="Collection" triples after RDF Core WG change
Added an experimental RSS Tag Soup parser to read any pile of XML that has elements such as channel, image, item tags with title, description etc inside them into coherent RSS 1.0 RDF triples. (Requires libxml 2.5.0 or newer)
API: Added new methods raptor_get_name, raptor_get_label.
API: Added new methods raptor_set_default_generate_id_parameters and raptor_set_generate_id_handler to control generation of IDs.
API: Modified utility function raptor_xml_escape_string arguments.
Ripped out ISO 3166 country code parts since commercial use might be subject to a license fee.
Improvements to GTK example 'grapper'.
Several internal reorganisations for pulling out a SAX2 API, XML C14N.
Other minor bug fixes.

2003-04-17 Raptor Version 0.9.10 Released

Added parser lax / strict modes. lax is the default.
rdf:bagID now generates a warning in lax mode, an error in strict
Added raptor_www_no_www_library_init_finish to allow disabling of WWW library startup/shutdown.
Added raptor_parse_abort to abort parsing inside a callback.
Added a GTK GUI example program grapper
Other minor bug fixes.

2003-03-28 Raptor Version 0.9.9 Released

Performance improvements - uses less memory, less repeated small malloc/free sequences, faster for larger files.
Added WWW retrieval - can parse from an URI as well as files, given either libcurl or libxml2 is available.
Minor bug fixes.
Various Win32 configure, building patches
Sources updated to use autoconf 1.6+, automake 2.52+
More debian packaging updates.

2003-02-13 Raptor Version 0.9.8 Released

Minor bug fixes (synchronising with Redland 0.9.12 release).
Fixed crashing on empty files
Fixed accepting illegal xmlns:prefix="" (prefix without URI not allowed)
N-Triples bnodeIDs can now have '0's
Utility program rdfdump renamed to rapper; name conflicted with a common Linux utility.

2002-12-20 Raptor Version 0.9.7 Released

Passes about 90% of RDF Core WG Test Cases
All memory leaks fixed
Portability fixes - compilers, scripts, auto* tools, libxml2 version
rdf:ID syntax and duplicates checked
rdf:bagID supported
Added more conformance tests, errors and warnings.

2002-11-02 Raptor Version 0.9.6 Released

Calling API changed to provide a common interface to the RDF parsers. The libraptor.3 manual page describes the changes.
Added support for RDF datatyped literals in RDF/XML with rdf:datatype attribute on property elements and N-Triples with the "string"^^<datatypeURIref>.
Added support for rdf:parseType="Collection" for RDF Collections
URI class allows swappable implementation by applications.
URI class now handles file: URIs for Win32 and Unix conventions.
Fixes to enable it to work on Apple OSX 10.1, 10.2 (also tested working on Linux/x86, Solaris/sparc, FreeBSD/x86)
Many internal changes to support API changes, allow it to work with Redland when compiled as a separate library
Reorganised source into separate modules - URI, xml parser, ntriples parser, XML namespaces, XML qnames, locator.
More resilience with XML errors and XML parser errors - none of libxml2's XML test suite examples crash raptor.
N-Triples parser recovers gracefully from errors in content
Packing for debian included
Added manual pages libraptor.3 and rapper.1
Added raptor-config script for compiling with the library.

2002-06-08 Raptor Version 0.9.5 Released

Many bugs fixed
Added full relative URI resolving
Work around bugs in libxml and expat (older versions)
Support libxml with the use of entities in the document
Support xml:lang passing to application

2002-03-27 Raptor Version 0.9.4 Released

XML Base support (xml:base) added
xml:lang support added with N-Triples lang-string support
All N-Triples string escapes implemented
N-Triples support with XML literals - xml("<foo/>") and plain "foo"
removed all special code for containers; treated as regular typedNodes
rdf:parseType="Literal" now working
Builds as shared and static libraries
Conformance test suite added

2001-08-21 Raptor Version 0.9.3 Released

N-Triples parser added
rdf:parseType="Literal" works much better (Aaron Michal and me)
DAML collections support added (Aaron Michal)
Win32 patch added - I can't confirm my merge didn't break this (Aaron Michal)
N-Triples updated to support CR, LF and CR LF endings
Make parser generated ids appear distinguised from regular URIs
Added N-Triples output
Made rdf:type, rdf:value as property attributes work
Made empty typed nodes work
GNOME xml / libxml error location (line, column) values corrected.

2001-07-03 Raptor Version 0.9.2 Released

Now called Raptor

2001-06-06 Raptor Version 0.9.1 Released

Many bug fixes
Updates for Redland API changes
Fixed rdf:parsetype="Literal" buffer overrun
Added better XML parser auto-detection for various expats and libxml

2001-01-22 Raptor Version 0.9.0 Released

First release


Copyright (C) 2001-2014 Dave Beckett
Copyright (C) 2001-2005 University of Bristol

raptor2-2.0.15/README-cmake.md0000644000175000017500000002156312020170223012442 00000000000000This file is based on the email that Daniel Richard G. sent to redland-dev: http://lists.librdf.org/pipermail/redland-dev/2012-July/002502.html I lightly edited the email to fit into 80 chars and make more it markdowny and turn it into notes. -- Dave ---------------------------------------------------------------------- Date: Thu, 5 Jul 2012 14:56:01 -0400 From: Daniel Richard G. To: redland-dev Hello list, I've implemented support for building the Raptor library using the CMake build configuration tool. This is intended not to replace the existing GNU-Autotools-based configuration / build framework, but to provide a better solution for building Raptor on Windows (and potentially other platforms) than hand-maintained project files for various popular IDEs. * [http://cmake.org/](CMake) * [http://en.wikipedia.org/wiki/CMake](CMake on Wikipedia) There are several reasons why I chose CMake for this: * It can generate project / solution / workspace files for basically every version of Visual Studio in existence, from a common set of definitions * Likewise, it can generate project files for less-common IDEs (e.g. CodeBlocks, Apple Xcode) and makefile-trees for NMake, Borland, MSYS... * A friendly GUI frontend is provided on Windows, great for IDE users who like to click on things * CMake doesn't neglect to support Linux / Unix, of course; even black-sheep systems like AIX are covered * The tool is actively maintained and developed by the folks at Kitware * The KDE folks moved whole-hog from Autotools to CMake due to its solid support for Windows and popular IDEs, and while I certainly wouldn't advocate a CMake-only zeitgeist, it certainly speaks to their confidence in the tool * Of course: CMake is free software, distributed under the three-clause BSD license * Teragram and I have used CMake extensively for the purpose of facilitating Windows builds of primarily Autotools-based projects, and so my own exerience has borne out the strengths of this approach. That's not to say, of course, that the tool is perfect: * The syntax and naming conventions used in the CMake scripting language and standard modules are more in line with Windows culture than Unix (ALL_CAPS, semicolon separators and CamelCasing are in abundance) * Some operations, like setting predefined compiler flags, are needlessly harder to do compared to Autoconf (where you can just e.g. assign to CFLAGS) * When CMake generates makefiles, they make the ones produced by Automake look simple and elegant by comparison :> You definitely get more of an IDE-like experience when building with these, which some folks may like, but I don't care for at all. Nevertheless, I consider CMake's strengths to outweigh its weaknesses. I myself am as much an Autotools-alternative skeptic as anyone, and tend to look leerily at all the ones that have come along---especially when I've no choice but to deal with them (e.g. SCons in NSIS). But CMake not only stands strong where Autotools is weak (support for non-Cygwin / MSYS Windows environments, support for IDEs), it does so in a fully general, polished, and consistent way. This is the one that, in my view, has risen above the pack. All that said, then, I'll go on to the particulars of this CMake implementation for Raptor. (Everything is in the attached patch, against git master.) This turned out to be a fairly complex project, because the Raptor library has so many features that can be enabled / disabled / configured. These are not merely controlled by #define'ing or #undefing cpp symbols; object files also need to be added or removed, as well as associated third-party library dependencies. Plus, the library conforms to various potential quirks in LibXML2, which need to be checked for at configure time. This complexity may be seen mostly in the top-level CMakeLists.txt file and src/CMakeLists.txt. The `win32_raptor_config.h` header is no longer used; this is replaced by the more general `raptor_config_cmake.h.in`, which CMake instantiates with configuration-specific values much as Autoconf instantiates `raptor_config.h.in`. Rather than remove the `#include ` directive from numerous files, however, I added an `#if 0` block to the header to make it a no-op (to keep an already large patch from becoming even larger). In addition to reproducing the library build in CMake, I've also reproduced most of the test suite. Of course, the test suite is fairly extensive, and consists of numerous similar invocations of rapper and rdfdiff; maintaining all of these in Automake is enough of a task already without the extra work of maintaining it in CMake. So I opted for an approach wherein the CMake test definitions are generated as a side effect of the shell code that drives the tests in Automake. The patch contains `tests/*/CMakeLists.txt`, of course, but it also contains changes to the associated `Makefile.am` files that write out the bulk of the CMake script to `CMakeTests.txt` (filename is arbitrary; `make clean` deletes it). The intent is not full-auto generation of the `CMakeLists.txt` files, but to make most of the work in maintaining them a matter of cut-and-paste. (It wouldn't take much more to enable full-auto generation, but I think there is value in having the maintainer at least eyeball what's going in.) The CMake-based test suite does have a few shortcomings compared to the Automake-based one, and will need further refinement: * Tests that compare output to a reference do not check for file equality as a way of avoiding the use of rdfdiff. This is a problem because rdfdiff currently blows up on certain inputs (e.g. test 0176 in rdfa11). * That would be easier to resolve if it weren't for the issue of comparing CRLF output from rapper on Windows to LF reference files. CMake has built-in functionality to compare files, but as currently implemented, it is basically a cross-platform cmp(1) --- there's no way to see past differences in EOL convention. I've filed a feature request on this... [http://public.kitware.com/Bug/view.php?id=13007](CMake Isue 13007) ...but for now, I'm using CMake's `CONFIGURE_FILE()` to normalize line endings on the output files before doing the comparison. * `tests/turtle/CMakeLists.txt` has yet to be written, as the exit-status logic there is a bit more involved than the other test sections. * There is some awkwardness on Windows, when the rapper and rdfdiff binaries depend on third-party DLLs (e.g. LibXML2). A correctly-set PATH allows the DLLs to be found, but Visual Studio isn't terribly straightforward about how to set PATH when running a program, and (IIRC) the failure mode was not even obvious to begin with. I've addressed this, if a little ham-handedly, by enabling the test suite only when building Raptor with a makefile tree. Other caveats of this CMake implementation: * This build framework is not enough to produce a Raptor DLL. There are issues regarding DLL-export linkage of various functions in `raptor_internal.h` and `turtle_common.h` that need addressing. I'll bring those up here on the list once the CMake stuff is hashed out. * Support for JSON --- and more specifically, the YAJL library --- is penciled in, but not yet working or tested. (I have no experience with this library, let alone on Windows.) * Generation of `turtle_lexer.c`, `turtle_parser.c` and such is not implemented at all. This can be added, but my working premise is that the CMake build framework is meant for library users, not developers. If you would like to kick the tires of this CMake implementation, here are some steps to get you started: 1. Apply my patch to a copy of Raptor's git master source 2. Run `./autogen.sh`, `./configure` and `make dist` 3. Unpack the resulting dist tarball somewhere 4. Download and install the CMake tool 5. (Linux) Create a new, empty build directory, and from there, invoke $ cmake /path/to/raptor2-dist-src This is the equivalent of running plain `./configure`, with default values for everything. Provided that you have all the requisite libraries installed, this should produce a makefile tree. 5. (Windows) Run the `cmake-gui` application, set the source and build paths at the top (the latter should be a new, empty directory) and hit Configure. Select an appropriate "generator" (this is where you choose the specific IDE or other build system you want), then hit Finish. Allow CMake to run the configuration checks, and if these succeed, hit Generate. Once the generation process is finished, you may close CMake and use the newly-generated build system. 6. If you are building with makefiles, the test suite is invoked with the "test" target, not "check". Questions and comments on this implementation are welcome; I'll do my best to answer any. This framework addresses a difficulty that Teragram has had with this library, and I hope it will do the same for others here. --Daniel raptor2-2.0.15/configure0000755000175000017500000211744512425344566012051 00000000000000#! /bin/sh # From configure.ac Revision: . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Raptor RDF Parser and Serializer library 2.0.15. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://bugs.librdf.org/ about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Raptor RDF Parser and Serializer library' PACKAGE_TARNAME='raptor2' PACKAGE_VERSION='2.0.15' PACKAGE_STRING='Raptor RDF Parser and Serializer library 2.0.15' PACKAGE_BUGREPORT='http://bugs.librdf.org/' PACKAGE_URL='' ac_unique_file="src/raptor_general.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_c_werror_flag= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_BUILD_PDF_FALSE GTK_DOC_BUILD_PDF_TRUE GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V abs_top_builddir abs_top_srcdir RAPTOR_XML_PARSER RAPTOR_WWW_LIBRARY RAPTOR_SERIALIZERS RAPTOR_PARSERS RECHO_C RECHO_N MEM_LIBS MEM PKG_CONFIG_REQUIRES RAPTOR_LDFLAGS RAPTOR_LIBTOOLLIBS RAPTOR_XML_LIBXML_FALSE RAPTOR_XML_LIBXML_TRUE PARSEDATE_FALSE PARSEDATE_TRUE LIBOBJS RAPTOR_ICU_NFC_FALSE RAPTOR_ICU_NFC_TRUE RAPTOR_RSS_COMMON_FALSE RAPTOR_RSS_COMMON_TRUE RAPTOR_SERIALIZER_NQUADS_FALSE RAPTOR_SERIALIZER_NQUADS_TRUE RAPTOR_SERIALIZER_JSON_FALSE RAPTOR_SERIALIZER_JSON_TRUE RAPTOR_SERIALIZER_HTML_FALSE RAPTOR_SERIALIZER_HTML_TRUE RAPTOR_SERIALIZER_DOT_FALSE RAPTOR_SERIALIZER_DOT_TRUE RAPTOR_SERIALIZER_ATOM_FALSE RAPTOR_SERIALIZER_ATOM_TRUE RAPTOR_SERIALIZER_RSS_1_0_FALSE RAPTOR_SERIALIZER_RSS_1_0_TRUE RAPTOR_SERIALIZER_TURTLE_FALSE RAPTOR_SERIALIZER_TURTLE_TRUE RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE RAPTOR_SERIALIZER_NTRIPLES_FALSE RAPTOR_SERIALIZER_NTRIPLES_TRUE RAPTOR_SERIALIZER_RDFXML_FALSE RAPTOR_SERIALIZER_RDFXML_TRUE LIBRDFA_FALSE LIBRDFA_TRUE RAPTOR_PARSER_NQUADS_FALSE RAPTOR_PARSER_NQUADS_TRUE RAPTOR_PARSER_JSON_FALSE RAPTOR_PARSER_JSON_TRUE RAPTOR_PARSER_RDFA_FALSE RAPTOR_PARSER_RDFA_TRUE RAPTOR_PARSER_GUESS_FALSE RAPTOR_PARSER_GUESS_TRUE RAPTOR_PARSER_GRDDL_FALSE RAPTOR_PARSER_GRDDL_TRUE RAPTOR_PARSER_RSS_FALSE RAPTOR_PARSER_RSS_TRUE RAPTOR_PARSER_TRIG_FALSE RAPTOR_PARSER_TRIG_TRUE RAPTOR_PARSER_TURTLE_FALSE RAPTOR_PARSER_TURTLE_TRUE RAPTOR_PARSER_NTRIPLES_FALSE RAPTOR_PARSER_NTRIPLES_TRUE RAPTOR_PARSER_RDFXML_FALSE RAPTOR_PARSER_RDFXML_TRUE LIBCURL_LIBS LIBCURL_CFLAGS CURL_CONFIG XSLT_CONFIG LIBXML_LIBS LIBXML_CFLAGS XML_CONFIG PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG GETOPT_FALSE GETOPT_TRUE STRCASECMP_FALSE STRCASECMP_TRUE NEED_STRTOK_R_FALSE NEED_STRTOK_R_TRUE RAPTOR_LIBTOOL_VERSION RAPTOR_VERSION_DECIMAL RAPTOR_VERSION_RELEASE RAPTOR_VERSION_MINOR RAPTOR_VERSION_MAJOR RAPTOR_VERSION RECHO JING PERL TAR BISON LEXLIB LEX_OUTPUT_ROOT LEX CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ac_ct_AR AR host_os host_vendor host_cpu host build_os build_vendor build_cpu build RPM_RELEASE RELEASE_VERSION_FALSE RELEASE_VERSION_TRUE MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_release enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_largefile with_xml2_config with_xslt_config with_curl_config with_icu_config with_www_config with_yajl enable_parsers enable_serializers with_xml_names with_www with_memory_signing enable_debug enable_silent_rules with_html_dir enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBXML_CFLAGS LIBXML_LIBS LIBCURL_CFLAGS LIBCURL_LIBS GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Raptor RDF Parser and Serializer library 2.0.15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/raptor2] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Raptor RDF Parser and Serializer library 2.0.15:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-release Turn on optimizations (for maintainer). --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-parsers=LIST Use RDF parsers (default=all) --enable-serializers=LIST Use RDF serializers (default=all) --enable-debug Enable debug messages (default no). --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-xml2-config=PATH Location of libxml xml2-config --with-xslt-config=PATH Location of libxslt xslt-config --with-curl-config=PATH Location of libcurl curl-config --with-icu-config=PATH Location of ICU icu-config --with-libwww-config=PATH Location of W3C libwww libwww-config --with-yajl=DIR YAJL installation directory or 'no' to disable (default=auto) --with-xml-names=1.1|1.0 Select XML version name checking (default=1.0) --with-www=NAME Use WWW library - curl (default), xml, libfetch, none --with-memory-signing Sign allocated memory (default=no) --with-html-dir=PATH path to installed docs Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LIBXML_CFLAGS C compiler flags for LIBXML, overriding pkg-config LIBXML_LIBS linker flags for LIBXML, overriding pkg-config LIBCURL_CFLAGS C compiler flags for LIBCURL, overriding pkg-config LIBCURL_LIBS linker flags for LIBCURL, overriding pkg-config GTKDOC_DEPS_CFLAGS C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Raptor RDF Parser and Serializer library configure 2.0.15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------- ## ## Report this to http://bugs.librdf.org/ ## ## -------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Raptor RDF Parser and Serializer library $as_me 2.0.15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers src/raptor_config.h" ac_aux_dir= for ac_dir in build "$srcdir"/build; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='raptor2' VERSION='2.0.15' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' libxml_min_version=2.6.8 libxslt_min_version=1.0.18 libcurl_min_version=7.12.0 libcurl_min_vernum=071200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE release_version=no # Check whether --enable-release was given. if test "${enable_release+set}" = set; then : enableval=$enable_release; \ if test "$enableval" = "yes"; then \ release_version=yes fi; fi if test $release_version = yes; then RELEASE_VERSION_TRUE= RELEASE_VERSION_FALSE='#' else RELEASE_VERSION_TRUE='#' RELEASE_VERSION_FALSE= fi if test "$USE_MAINTAINER_MODE" = yes -a $release_version = no; then CFLAGS=`echo $CFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` CPPFLAGS=`echo $CPPFLAGS | sed -e "s/-O[A-Za-z0-9]*//"` fi RPM_RELEASE=SNAP if test "$release_version" = "yes"; then RPM_RELEASE=1 fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is clang" >&5 $as_echo_n "checking whether $CC is clang... " >&6; } case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then 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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then 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~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi FLEX_MIN_VERSION=2.5.19 FLEX_REC_VERSION=2.5.36 # Do not want AM_PROG_LEX which adds 'missing' to LEX if it's not around for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking flex" >&5 $as_echo_n "checking flex... " >&6; } if test "$USE_MAINTAINER_MODE" = yes; then # maintainer mode - flex is required if test "X$LEX" = "X:" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present" >&5 $as_echo "not present" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get flex from http://flex.sourceforge.net/" >&5 $as_echo "$as_me: WARNING: Please get flex from http://flex.sourceforge.net/" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&5 $as_echo "$as_me: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "flex not present See \`config.log' for more details" "$LINENO" 5; } fi # some kind of lexer is present if echo "$LEX" | grep flex >/dev/null 2>&1; then # flex is present FLEX_VERSION=`$LEX -V 2>&1 | $AWK '{print $2}'` FLEX_VERSION_DEC=`echo $FLEX_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` FLEX_MIN_VERSION_DEC=`echo $FLEX_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $FLEX_VERSION_DEC -ge $FLEX_MIN_VERSION_DEC; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX_VERSION - OK" >&5 $as_echo "$FLEX_VERSION - OK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: version $FLEX_VERSION - too old" >&5 $as_echo "version $FLEX_VERSION - too old" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get flex from http://flex.sourceforge.net/" >&5 $as_echo "$as_me: WARNING: Please get flex from http://flex.sourceforge.net/" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&5 $as_echo "$as_me: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "flex is too old See \`config.log' for more details" "$LINENO" 5; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: present - but is not flex" >&5 $as_echo "present - but is not flex" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get flex from http://flex.sourceforge.net/" >&5 $as_echo "$as_me: WARNING: Please get flex from http://flex.sourceforge.net/" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&5 $as_echo "$as_me: WARNING: version $FLEX_MIN_VERSION ($FLEX_REC_VERSION recommended)" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "$LEX is not not flex See \`config.log' for more details" "$LINENO" 5; } fi else # not maintainer mode; flex is not required { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present - not required for non maintainer builds" >&5 $as_echo "not present - not required for non maintainer builds" >&6; } LEX="$SHELL $missing_dir/missing flex" LEX_OUTPUT_ROOT=lex.yy LEXLIB='' FLEX_VERSION_DEC=00000 fi cat >>confdefs.h <<_ACEOF #define FLEX_VERSION_DECIMAL $FLEX_VERSION_DEC _ACEOF BISON_MIN_VERSION=3.0.0 for ac_prog in bison3 bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_BISON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BISON"; then ac_cv_prog_BISON="$BISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_BISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi BISON=$ac_cv_prog_BISON if test -n "$BISON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 $as_echo "$BISON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$BISON" && break done if test "$USE_MAINTAINER_MODE" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU bison" >&5 $as_echo_n "checking for GNU bison... " >&6; } # Match these styles of versions # GNU Bison version 1.28 # bison (GNU Bison) 1.875 BISON_VERSION=`$BISON --version 2>&1 | sed -ne 's/^.*GNU Bison[^0-9]*//p'` if test "X$BISON_VERSION" != X; then BISON_VERSION_DEC=`echo $BISON_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` BISON_MIN_VERSION_DEC=`echo $BISON_MIN_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $BISON_VERSION_DEC -ge $BISON_MIN_VERSION_DEC; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_VERSION - OK" >&5 $as_echo "$BISON_VERSION - OK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: version $BISON_VERSION is too old" >&5 $as_echo "version $BISON_VERSION is too old" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please get GNU Bison from http://www.gnu.org/software/bison/" >&5 $as_echo "$as_me: WARNING: Please get GNU Bison from http://www.gnu.org/software/bison/" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version $BISON_MIN_VERSION or newer" >&5 $as_echo "$as_me: WARNING: version $BISON_MIN_VERSION or newer" >&2;} { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "GNU Bison too old See \`config.log' for more details" "$LINENO" 5; } fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "$BISON is not GNU bison See \`config.log' for more details" "$LINENO" 5; } fi fi # Find a tar command for 'make dist' for ac_prog in gnutar gtar tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_TAR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$TAR"; then ac_cv_prog_TAR="$TAR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_TAR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi TAR=$ac_cv_prog_TAR if test -n "$TAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 $as_echo "$TAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TAR" && break done for ac_prog in perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PERL="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done # Used in tests/feeds for ac_prog in jing do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JING+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JING"; then ac_cv_prog_JING="$JING" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JING="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JING=$ac_cv_prog_JING if test -n "$JING"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JING" >&5 $as_echo "$JING" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JING" && break done ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} for ac_prog in echo do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RECHO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RECHO"; then ac_cv_prog_RECHO="$RECHO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RECHO="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RECHO=$ac_cv_prog_RECHO if test -n "$RECHO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RECHO" >&5 $as_echo "$RECHO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$RECHO" && break done RECHO_C= RECHO_N= case `$RECHO -n x` in -n*) case `$RECHO 'xy\c'` in *c*) ;; xy) RECHO_C='\c' ;; esac;; *) RECHO_N='-n' ;; esac # GCC warning options # http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html # # Too noisy: # -Wconversion # -Wformat-nonliteral : variables for format strings # -Wmissing-field-initializers : too noisy in raptor_rss_common.c # -Wsystem-headers : not debugging system # -Wsign-conversion: : many int / unsigned int / size_t # -Wunused-parameter : variables can be marked __attribute__('unused') # # Apple gcc specific (probably): -Wshorten-64-to-32 possible_warnings="\ -Wall \ -Wc++-compat \ -Wextra \ -Wunused \ \ -Waggregate-return \ -Wbad-function-cast \ -Wcast-align \ -Wdeclaration-after-statement \ -Wdisabled-optimization \ -Wdiv-by-zero \ -Wendif-labels \ -Werror-implicit-function-declaration \ -Wfloat-equal \ -Wformat-security \ -Wframe-larger-than=4096 \ -Winit-self \ -Winline \ -Wmissing-declarations \ -Wmissing-format-attribute \ -Wmissing-noreturn \ -Wmissing-prototypes \ -Wnested-externs \ -Wold-style-definition \ -Wpacked \ -Wpointer-arith \ -Wredundant-decls \ -Wshadow \ -Wsign-compare \ -Wstrict-prototypes \ -Wswitch-enum \ -Wundef \ -Wunreachable-code \ -Wunsafe-loop-optimizations \ -Wwrite-strings \ \ -Wshorten-64-to-32 \ -Wno-conversion \ -Wno-format-nonliteral \ -Wno-missing-field-initializers \ -Wno-sign-conversion \ -Wno-system-headers \ -Wno-unused-parameter \ -Wswitch-bool \ -Wlogical-not-parentheses \ -Wsizeof-array-argument \ -Wbool-compare \ -Wc90-c99-compat \ -Wc99-c11-compat \ " warning_cflags= if test "$USE_MAINTAINER_MODE" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported $CC warning flags" >&5 $as_echo_n "checking for supported $CC warning flags... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warning_cflags" >&5 $as_echo "$warning_cflags" >&6; } for warning in $possible_warnings; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $warning" >&5 $as_echo_n "checking whether $CC supports $warning... " >&6; } ## backup CFLAGS and werror status redland_save_CFLAGS="$CFLAGS" redland_save_ac_c_werror_flag="${ac_c_werror_flag}" ac_c_werror_flag=yes CFLAGS="$CFLAGS $warning" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : redland_cc_flag=yes else redland_cc_flag=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## restore CFLAGS and werror status CFLAGS="$redland_save_CFLAGS" ac_c_werror_flag="${redland_save_ac_c_werror_flag}" if test "X$redland_cc_flag" = "Xyes"; then warning_cflags="$warning_cflags $warning" else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $redland_cc_flag" >&5 $as_echo "$redland_cc_flag" >&6; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC supports warning flags" >&5 $as_echo_n "checking $CC supports warning flags... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warning_cflags" >&5 $as_echo "$warning_cflags" >&6; } fi MAINTAINER_CPPFLAGS="$warning_cflags" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in errno.h fcntl.h stdlib.h stddef.h unistd.h string.h limits.h math.h getopt.h sys/stat.h sys/param.h sys/stat.h sys/time.h setjmp.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in stat do : ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" if test "x$ac_cv_func_stat" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STAT 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_header in fetch.h do : ac_fn_c_check_header_compile "$LINENO" "fetch.h" "ac_cv_header_fetch_h" "#include #ifdef HAVE_SYS_PARAM_H #include #endif " if test "x$ac_cv_header_fetch_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FETCH_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __FUNCTION__ is available" >&5 $as_echo_n "checking whether __FUNCTION__ is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { printf(__FUNCTION__); } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext version_major=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\1/'` version_minor=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\2/'` version_release=`echo $VERSION | sed -e 's/^\([^\.]*\)\.\([^\.]*\)\.\(.*\)$/\3/'` version_decimal=`expr $version_major \* 10000 + $version_minor \* 100 + $version_release` # The minimum runtime API version that is supported. MUST be updated at # an API break as well as changing the libtool version min_version_decimal=20000 cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_MAJOR $version_major _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_MINOR $version_minor _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_RELEASE $version_release _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_VERSION_DECIMAL $version_decimal _ACEOF cat >>confdefs.h <<_ACEOF #define RAPTOR_MIN_VERSION_DECIMAL $min_version_decimal _ACEOF # for raptor-config.in RAPTOR_VERSION_MAJOR=$version_major RAPTOR_VERSION_MINOR=$version_minor RAPTOR_VERSION_RELEASE=$version_release RAPTOR_VERSION_DECIMAL=$version_decimal # Libtool versioning # # CURRENT # The most recent interface number that this library implements. # # REVISION # The implementation number of the CURRENT interface. # # AGE # The difference between the newest and oldest interfaces that this # library implements. In other words, the library implements all the # interface numbers in the range from number `CURRENT - AGE' to # `CURRENT'. # # Rules: # 1. Start with version information of `0:0:0' for each libtool library. # # 2. Update the version information only immediately before a public # release of your software. More frequent updates are unnecessary, # and only guarantee that the current interface number gets larger # faster. # # 3. If the library source code has changed at all since the last # update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). # # 4. If any interfaces have been added, removed, or changed since the # last update, increment CURRENT, and set REVISION to 0. # # 5. If any interfaces have been added since the last public release, # then increment AGE. # # 6. If any interfaces have been removed since the last public release, # then set AGE to 0. # # syntax: CURRENT[:REVISION[:AGE]] RAPTOR_LIBTOOL_VERSION=0:0:0 for ac_func in gettimeofday getopt getopt_long stricmp strcasecmp vsnprintf isascii setjmp strtok_r qsort_r qsort_s do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "$ac_cv_func_strtok_r" = "no"; then NEED_STRTOK_R_TRUE= NEED_STRTOK_R_FALSE='#' else NEED_STRTOK_R_TRUE='#' NEED_STRTOK_R_FALSE= fi oCPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" for ac_func in vasprintf do : ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" if test "x$ac_cv_func_vasprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VASPRINTF 1 _ACEOF fi done CPPFLAGS="$oCPPFLAGS" if test $ac_cv_func_strcasecmp = no -a $ac_cv_func_stricmp = no; then STRCASECMP_TRUE= STRCASECMP_FALSE='#' else STRCASECMP_TRUE='#' STRCASECMP_FALSE= fi if test $ac_cv_func_getopt = no -a $ac_cv_func_getopt_long = no; then GETOPT_TRUE= GETOPT_FALSE='#' else GETOPT_TRUE='#' GETOPT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether need to declare optind" >&5 $as_echo_n "checking whether need to declare optind... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_GETOPT_H #include #endif int main () { int x=optind; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else $as_echo "#define NEED_OPTIND_DECLARATION 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_func_vsnprintf = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf has C99 compatible return value" >&5 $as_echo_n "checking whether vsnprintf has C99 compatible return value... " >&6; } if test "$cross_compiling" = yes; then : $as_echo "#define CHECK_VSNPRINTF_RUNTIME 1" >>confdefs.h else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_STDLIB_H #include #endif #include static int is_c99(char *buf, char *s, ...) { va_list args; int r; va_start(args, s); r = vsnprintf(buf, buf ? 5 : 0, s, args); va_end(args); return (r == 7); } int main(void) { char buffer[32]; return (is_c99(NULL, "1234567") ? 0 : 10) + (is_c99(buffer, "1234567") ? 0 : 1); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi # Save LIBS oLIBS="$LIBS" RAPTOR_LDFLAGS= # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi PKG_CONFIG_REQUIRES= # Check whether --with-xml2-config was given. if test "${with_xml2_config+set}" = set; then : withval=$with_xml2_config; xml2_config="$withval" else xml2_config="" fi if test "X$xml2_config" != "Xno" ; then if test "X$xml2_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $xml2_config" >&5 $as_echo_n "checking for $xml2_config... " >&6; } if test -x $xml2_config ; then XML_CONFIG=$xml2_config { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "xml2-config not found at specified path $xml2_config" "$LINENO" 5 fi fi if test "X$XML_CONFIG" = "X" ; then for ac_prog in xml2-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XML_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XML_CONFIG"; then ac_cv_prog_XML_CONFIG="$XML_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XML_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XML_CONFIG=$ac_cv_prog_XML_CONFIG if test -n "$XML_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_CONFIG" >&5 $as_echo "$XML_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XML_CONFIG" && break done fi fi libxml_source=no if test "X$XML_CONFIG" != "X"; then LIBXML_CFLAGS=`$XML_CONFIG --cflags` LIBXML_LIBS=`$XML_CONFIG --libs` CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" LIBS="$LIBS $LIBXML_LIBS" ac_fn_c_check_func "$LINENO" "xmlCreatePushParserCtxt" "ac_cv_func_xmlCreatePushParserCtxt" if test "x$ac_cv_func_xmlCreatePushParserCtxt" = xyes; then : have_xmlCreatePushParserCtxt=yes else have_xmlCreatePushParserCtxt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml via xml2-config" >&5 $as_echo_n "checking for libxml via xml2-config... " >&6; } if test $have_xmlCreatePushParserCtxt = yes; then libxml_source="xml2-config" LIBXML_VERSION=`$XML_CONFIG --version` fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" else pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5 $as_echo_n "checking for LIBXML... " >&6; } if test -n "$LIBXML_CFLAGS"; then pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBXML_LIBS"; then pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` else LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXML_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS LIBXML_LIBS=$pkg_cv_LIBXML_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion` libxml_source="pkg-config" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml via pkg-config" >&5 $as_echo_n "checking for libxml via pkg-config... " >&6; } fi if test "$libxml_source" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - $LIBXML_VERSION" >&5 $as_echo "yes - $LIBXML_VERSION" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - not found" >&5 $as_echo "no - not found" >&6; } fi # Check whether --with-xslt-config was given. if test "${with_xslt_config+set}" = set; then : withval=$with_xslt_config; xslt_config="$withval" else xslt_config="" fi if test "X$xslt_config" != "Xno" ; then if test "X$xslt_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $xslt_config" >&5 $as_echo_n "checking for $xslt_config... " >&6; } if test -x $xslt_config ; then XSLT_CONFIG=$xslt_config { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "xslt-config not found at specified path $xslt_config" "$LINENO" 5 fi fi if test "X$XSLT_CONFIG" = "X" ; then for ac_prog in xslt-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XSLT_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XSLT_CONFIG"; then ac_cv_prog_XSLT_CONFIG="$XSLT_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XSLT_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XSLT_CONFIG=$ac_cv_prog_XSLT_CONFIG if test -n "$XSLT_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLT_CONFIG" >&5 $as_echo "$XSLT_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XSLT_CONFIG" && break done fi fi # Check whether --with-curl-config was given. if test "${with_curl_config+set}" = set; then : withval=$with_curl_config; curl_config="$withval" else curl_config="" fi if test "X$curl_config" != "Xno" ; then if test "X$curl_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $curl_config" >&5 $as_echo_n "checking for $curl_config... " >&6; } if test -f $curl_config ; then CURL_CONFIG=$curl_config { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - searching PATH" >&5 $as_echo "no - searching PATH" >&6; } fi fi if test "X$CURL_CONFIG" = "X" ; then for ac_prog in curl-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CURL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CURL_CONFIG"; then ac_cv_prog_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CURL_CONFIG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CURL_CONFIG=$ac_cv_prog_CURL_CONFIG if test -n "$CURL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5 $as_echo "$CURL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CURL_CONFIG" && break done fi fi libcurl_source=no if test "X$CURL_CONFIG" != "X"; then LIBCURL_CFLAGS=`$CURL_CONFIG --cflags` LIBCURL_LIBS=`$CURL_CONFIG --libs` CPPFLAGS="$LIBCURL_CFLAGS $CPPFLAGS" LIBS="$LIBS $LIBCURL_LIBS" ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : fi ac_fn_c_check_func "$LINENO" "curl_easy_init" "ac_cv_func_curl_easy_init" if test "x$ac_cv_func_curl_easy_init" = xyes; then : have_curl_easy_init=yes else have_curl_easy_init=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl via curl-config" >&5 $as_echo_n "checking for libcurl via curl-config... " >&6; } if test $have_curl_easy_init = yes; then libcurl_source="curl-config" LIBCURL_VERSION=`$CURL_CONFIG --version | sed -e 's/^libcurl *//'` fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" else pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCURL" >&5 $as_echo_n "checking for LIBCURL... " >&6; } if test -n "$LIBCURL_CFLAGS"; then pkg_cv_LIBCURL_CFLAGS="$LIBCURL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBCURL_LIBS"; then pkg_cv_LIBCURL_LIBS="$LIBCURL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCURL_LIBS=`$PKG_CONFIG --libs "libcurl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBCURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl" 2>&1` else LIBCURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBCURL_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else LIBCURL_CFLAGS=$pkg_cv_LIBCURL_CFLAGS LIBCURL_LIBS=$pkg_cv_LIBCURL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBCURL_VERSION=`$PKG_CONFIG libcurl --modversion` libcurl_source="pkg-config" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl via pkg-config" >&5 $as_echo_n "checking for libcurl via pkg-config... " >&6; } fi if test "$libcurl_source" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - not found" >&5 $as_echo "no - not found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - $LIBCURL_VERSION" >&5 $as_echo "yes - $LIBCURL_VERSION" >&6; } fi # Check whether --with-icu-config was given. if test "${with_icu_config+set}" = set; then : withval=$with_icu_config; icu_config="$withval" else icu_config="" fi have_icu=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU" >&5 $as_echo_n "checking for ICU... " >&6; } if test "X$icu_config" != "Xno" -a "X$icu_config" != "X" ; then ICU_CONFIG=$icu_config ICU_VERSION=`$ICU_CONFIG --version` have_icu=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $ICU_VERSION" >&5 $as_echo "yes - version $ICU_VERSION" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-www-config was given. if test "${with_www_config+set}" = set; then : withval=$with_www_config; libwww_config="$withval" else libwww_config="" fi if test "X$libwww_config" != "Xno" -a "X$libwww_config" != "X" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libwww is no longer supported" >&5 $as_echo "$as_me: WARNING: libwww is no longer supported" >&2;} fi have_libxml=0 need_libxml=0 oCPPFLAGS="$CPPFLAGS" if test "X$XML_CONFIG" != X; then CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" LIBS="$LIBS $LIBXML_LIBS" ac_fn_c_check_func "$LINENO" "xmlCreatePushParserCtxt" "ac_cv_func_xmlCreatePushParserCtxt" if test "x$ac_cv_func_xmlCreatePushParserCtxt" = xyes; then : have_xmlCreatePushParserCtxt=yes else have_xmlCreatePushParserCtxt=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking libxml library" >&5 $as_echo_n "checking libxml library... " >&6; } if test $have_xmlCreatePushParserCtxt = yes; then have_libxml=1 libxml_version_dec=`echo $LIBXML_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxml_min_version_dec=`echo $libxml_min_version | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $LIBXML_VERSION" >&5 $as_echo "yes - version $LIBXML_VERSION" >&6; } if test $libxml_version_dec -lt $libxml_min_version_dec; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required." >&5 $as_echo "$as_me: WARNING: Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required." >&2;} have_libxml=0 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_header in libxml/nanohttp.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxml/nanohttp.h" "ac_cv_header_libxml_nanohttp_h" "$ac_includes_default" if test "x$ac_cv_header_libxml_nanohttp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML_NANOHTTP_H 1 _ACEOF fi done for ac_header in libxml/parser.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default" if test "x$ac_cv_header_libxml_parser_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML_PARSER_H 1 _ACEOF fi done for ac_header in libxml/hash.h libxml/SAX2.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_LIBXML_PARSER_H #include #endif " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$ac_cv_header_libxml_parser_h" = no -a "$ac_cv_header_gnome_xml_parser_h" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libxml library found but not headers - disabling" >&5 $as_echo "$as_me: WARNING: libxml library found but not headers - disabling" >&2;} have_libxml=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlEntity has name_length field" >&5 $as_echo_n "checking if libxml xmlEntity has name_length field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlEntity foo; foo.name_length=0 ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_ENTITY_NAME_LENGTH 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlEntity has etype field" >&5 $as_echo_n "checking if libxml xmlEntity has etype field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlEntity foo; foo.etype=0 ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_ENTITY_ETYPE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlSAXHandler has initialized field" >&5 $as_echo_n "checking if libxml xmlSAXHandler has initialized field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlSAXHandler foo; foo.initialized=0 ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml xmlSAXHandler has externalSubset field" >&5 $as_echo_n "checking if libxml xmlSAXHandler has externalSubset field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlSAXHandler foo; foo.externalSubset=NULL ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for ac_func in xmlSAX2InternalSubset xmlCtxtUseOptions do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml has parser option XML_PARSE_NONET" >&5 $as_echo_n "checking if libxml has parser option XML_PARSE_NONET... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_PARSER_H #include #endif int main () { xmlParserOption foo; foo = XML_PARSE_NONET ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_XML_PARSE_NONET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for ac_header in libxml/HTMLparser.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default" if test "x$ac_cv_header_libxml_HTMLparser_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXML_HTMLPARSER_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libxml has parser option HTML_PARSE_NONET" >&5 $as_echo_n "checking if libxml has parser option HTML_PARSE_NONET... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LIBXML_HTMLPARSER_H #include #endif int main () { htmlParserOption foo; foo = HTML_PARSE_NONET ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define RAPTOR_LIBXML_HTML_PARSE_NONET 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" have_libxslt=0 if test "X$XSLT_CONFIG" != X; then CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" LIBS="$LIBS `$XSLT_CONFIG --libs`" ac_fn_c_check_func "$LINENO" "xsltSaveResultToString" "ac_cv_func_xsltSaveResultToString" if test "x$ac_cv_func_xsltSaveResultToString" = xyes; then : have_xsltSaveResultToString=yes else have_xsltSaveResultToString=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system libxslt library" >&5 $as_echo_n "checking for system libxslt library... " >&6; } if test $have_xsltSaveResultToString = yes; then have_libxslt=1 LIBXSLT_VERSION=`$XSLT_CONFIG --version` libxslt_version_dec=`echo $LIBXSLT_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libxslt_min_version_dec=`echo $libxslt_min_version | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $LIBXSLT_VERSION" >&5 $as_echo "yes - version $LIBXSLT_VERSION" >&6; } if test $libxslt_version_dec -lt $libxslt_min_version_dec; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required." >&5 $as_echo "$as_me: WARNING: Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required." >&2;} have_libxslt=0 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ac_fn_c_check_func "$LINENO" "xsltInit" "ac_cv_func_xsltInit" if test "x$ac_cv_func_xsltInit" = xyes; then : fi for ac_header in libxslt/xslt.h do : ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default" if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXSLT_XSLT_H 1 _ACEOF fi done if test "$ac_cv_header_libxslt_xslt_h" = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libxslt library found but not headers - disabling" >&5 $as_echo "$as_me: WARNING: libxslt library found but not headers - disabling" >&2;} have_libxslt_lib=0 have_libxslt=0 fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" # Check whether --with-yajl was given. if test "${with_yajl+set}" = set; then : withval=$with_yajl; yajl_prefix="$withval" else yajl_prefix="none" fi if test "x$yajl_prefix" != "xno" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl installation" >&5 $as_echo_n "checking for yajl installation... " >&6; } if test "x$yajl_prefix" = "xyes" ; then yajl_prefix="none" fi # Nothing given - search if test "X$yajl_prefix" = "Xnone" ; then for dir in /opt/local /usr/local /usr; do if test -r $dir/include/yajl/yajl_parse.h; then yajl_prefix=$dir break fi done fi if test "X$yajl_prefix" = "Xnone" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found. Get it from http://lloyd.github.com/yajl/ and use --with-yajl=DIR if necessary to configure the installation directory." >&5 $as_echo "not found. Get it from http://lloyd.github.com/yajl/ and use --with-yajl=DIR if necessary to configure the installation directory." >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yajl_prefix" >&5 $as_echo "$yajl_prefix" >&6; } if test "$yajl_prefix" = "/usr"; then yajl_prefix= else LDFLAGS="-L$yajl_prefix/lib $LDFLAGS" CPPFLAGS="-I$yajl_prefix/include $CPPFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl_parse in -lyajl" >&5 $as_echo_n "checking for yajl_parse in -lyajl... " >&6; } if ${ac_cv_lib_yajl_yajl_parse+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lyajl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char yajl_parse (); int main () { return yajl_parse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_yajl_yajl_parse=yes else ac_cv_lib_yajl_yajl_parse=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yajl_yajl_parse" >&5 $as_echo "$ac_cv_lib_yajl_yajl_parse" >&6; } if test "x$ac_cv_lib_yajl_yajl_parse" = xyes; then : libyajl=1 else libyajl=0 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yajl_tree_parse in -lyajl" >&5 $as_echo_n "checking for yajl_tree_parse in -lyajl... " >&6; } if ${ac_cv_lib_yajl_yajl_tree_parse+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lyajl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char yajl_tree_parse (); int main () { return yajl_tree_parse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_yajl_yajl_tree_parse=yes else ac_cv_lib_yajl_yajl_tree_parse=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yajl_yajl_tree_parse" >&5 $as_echo "$ac_cv_lib_yajl_yajl_tree_parse" >&6; } if test "x$ac_cv_lib_yajl_yajl_tree_parse" = xyes; then : yajl_api_version=2 else yajl_api_version=1 fi for ac_header in yajl/yajl_parse.h do : ac_fn_c_check_header_mongrel "$LINENO" "yajl/yajl_parse.h" "ac_cv_header_yajl_yajl_parse_h" "$ac_includes_default" if test "x$ac_cv_header_yajl_yajl_parse_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_YAJL_YAJL_PARSE_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking YAJL API version" >&5 $as_echo_n "checking YAJL API version... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yajl_api_version" >&5 $as_echo "$yajl_api_version" >&6; } if test $yajl_api_version = 2; then cat >>confdefs.h <<_ACEOF #define HAVE_YAJL2 1 _ACEOF fi fi fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" rdfxml_parser=no ntriples_parser=no turtle_parser=no trig_parser=no rss_parser=no grddl_parser=no guess_parser=yes rdfa_parser=no json_parser=no nquads_parser=no rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup rdfa nquads" rdf_parsers_enabled= grddl_parser_ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking GRDDL parser requirements" >&5 $as_echo_n "checking GRDDL parser requirements... " >&6; } if test $have_libxml = 1 -a $have_libxslt = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } grddl_parser_ok=yes rdf_parsers_available="$rdf_parsers_available grddl" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - libxml2 and libxslt are both not available" >&5 $as_echo "no - libxml2 and libxslt are both not available" >&6; } fi json_parser_ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking JSON parser requirements" >&5 $as_echo_n "checking JSON parser requirements... " >&6; } if test "X$ac_cv_header_yajl_yajl_parse_h" = Xyes -a "X$ac_cv_lib_yajl_yajl_parse" = Xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } json_parser_ok=yes rdf_parsers_available="$rdf_parsers_available json" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - libyajl is not available" >&5 $as_echo "no - libyajl is not available" >&6; } fi # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then $as_echo "#define RAPTOR_PARSER_RDFXML 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_NTRIPLES 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_TURTLE 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_TRIG 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_RSS 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_GRDDL 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_GUESS 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_RDFA 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_JSON 1" >>confdefs.h $as_echo "#define RAPTOR_PARSER_NQUADS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking RDF parsers required" >&5 $as_echo_n "checking RDF parsers required... " >&6; } # Check whether --enable-parsers was given. if test "${enable_parsers+set}" = set; then : enableval=$enable_parsers; parsers="$enableval" fi if test "X$parsers" = Xall -o "X$parsers" = X; then parsers="$rdf_parsers_available" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all" >&5 $as_echo "all" >&6; } elif test "X$parsers" = Xnone; then parsers= { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $parsers" >&5 $as_echo "$parsers" >&6; } fi for parser in $parsers; do p=$parser if test $p = rss-tag-soup; then p=rss fi if test $p = grddl; then if test $grddl_parser_ok != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GRDDL parser is not available" >&5 $as_echo "$as_me: WARNING: GRDDL parser is not available" >&2;} continue fi fi if test $p = json; then if test $json_parser_ok != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: YAJL is not available" >&5 $as_echo "$as_me: WARNING: YAJL is not available" >&2;} continue fi fi eval $p'_parser=yes' NAME=`echo $p | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_PARSER_${NAME} cat >>confdefs.h <<_ACEOF #define $n 1 _ACEOF rdf_parsers_enabled="$rdf_parsers_enabled $parser" done use_nfc=no if test $rdfxml_parser = yes; then need_libxml=1 use_nfc=yes fi if test $rss_parser = yes; then need_libxml=1 fi need_libxslt=0 if test $grddl_parser = yes; then need_libxml=1 need_libxslt=1 fi need_librdfa=no if test $rdfa_parser = yes; then need_libxml=1 need_librdfa=yes fi need_libyajl=0 if test $json_parser = yes; then need_libyajl=1 fi if test $rdfxml_parser = yes; then RAPTOR_PARSER_RDFXML_TRUE= RAPTOR_PARSER_RDFXML_FALSE='#' else RAPTOR_PARSER_RDFXML_TRUE='#' RAPTOR_PARSER_RDFXML_FALSE= fi if test $ntriples_parser = yes; then RAPTOR_PARSER_NTRIPLES_TRUE= RAPTOR_PARSER_NTRIPLES_FALSE='#' else RAPTOR_PARSER_NTRIPLES_TRUE='#' RAPTOR_PARSER_NTRIPLES_FALSE= fi if test $turtle_parser = yes; then RAPTOR_PARSER_TURTLE_TRUE= RAPTOR_PARSER_TURTLE_FALSE='#' else RAPTOR_PARSER_TURTLE_TRUE='#' RAPTOR_PARSER_TURTLE_FALSE= fi if test $trig_parser = yes; then RAPTOR_PARSER_TRIG_TRUE= RAPTOR_PARSER_TRIG_FALSE='#' else RAPTOR_PARSER_TRIG_TRUE='#' RAPTOR_PARSER_TRIG_FALSE= fi if test $rss_parser = yes; then RAPTOR_PARSER_RSS_TRUE= RAPTOR_PARSER_RSS_FALSE='#' else RAPTOR_PARSER_RSS_TRUE='#' RAPTOR_PARSER_RSS_FALSE= fi if test $grddl_parser = yes; then RAPTOR_PARSER_GRDDL_TRUE= RAPTOR_PARSER_GRDDL_FALSE='#' else RAPTOR_PARSER_GRDDL_TRUE='#' RAPTOR_PARSER_GRDDL_FALSE= fi if test $guess_parser = yes; then RAPTOR_PARSER_GUESS_TRUE= RAPTOR_PARSER_GUESS_FALSE='#' else RAPTOR_PARSER_GUESS_TRUE='#' RAPTOR_PARSER_GUESS_FALSE= fi if test $rdfa_parser = yes; then RAPTOR_PARSER_RDFA_TRUE= RAPTOR_PARSER_RDFA_FALSE='#' else RAPTOR_PARSER_RDFA_TRUE='#' RAPTOR_PARSER_RDFA_FALSE= fi if test $json_parser = yes; then RAPTOR_PARSER_JSON_TRUE= RAPTOR_PARSER_JSON_FALSE='#' else RAPTOR_PARSER_JSON_TRUE='#' RAPTOR_PARSER_JSON_FALSE= fi if test $nquads_parser = yes; then RAPTOR_PARSER_NQUADS_TRUE= RAPTOR_PARSER_NQUADS_FALSE='#' else RAPTOR_PARSER_NQUADS_TRUE='#' RAPTOR_PARSER_NQUADS_FALSE= fi if test $need_librdfa = yes; then LIBRDFA_TRUE= LIBRDFA_FALSE='#' else LIBRDFA_TRUE='#' LIBRDFA_FALSE= fi rdfxml_serializer=no ntriples_serializer=no rdfxml_abbrev_serializer=no turtle_serializer=no rss_1_0_serializer=no atom_serializer=no dot_serializer=no html_serializer=no json_serializer=no nquads_serializer=no rdf_serializers_available="rdfxml rdfxml-abbrev turtle ntriples rss-1.0 dot html json atom nquads" # This is needed because autoheader can't work out which computed # symbols must be pulled from acconfig.h into config.h.in if test "x" = "y"; then $as_echo "#define RAPTOR_SERIALIZER_RDFXML 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_NTRIPLES 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_RDFXML_ABBREV 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_TURTLE 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_RSS_1_0 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_ATOM 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_DOT 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_HTML 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_JSON 1" >>confdefs.h $as_echo "#define RAPTOR_SERIALIZER_NQUADS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking RDF serializers required" >&5 $as_echo_n "checking RDF serializers required... " >&6; } # Check whether --enable-serializers was given. if test "${enable_serializers+set}" = set; then : enableval=$enable_serializers; serializers="$enableval" fi if test "X$serializers" = Xall -o "X$serializers" = X; then serializers="$rdf_serializers_available" { $as_echo "$as_me:${as_lineno-$LINENO}: result: all" >&5 $as_echo "all" >&6; } elif test "X$serializers" = Xnone; then serializers= { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $serializers" >&5 $as_echo "$serializers" >&6; } fi for serializer in $serializers; do s=`echo $serializer | tr '.-' '__'` eval $s'_serializer=yes' NAME=`echo $s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` n=RAPTOR_SERIALIZER_${NAME} cat >>confdefs.h <<_ACEOF #define $n 1 _ACEOF rdf_serializers_enabled="$rdf_serializers_enabled $serializer" done if test $rdfxml_serializer = yes; then RAPTOR_SERIALIZER_RDFXML_TRUE= RAPTOR_SERIALIZER_RDFXML_FALSE='#' else RAPTOR_SERIALIZER_RDFXML_TRUE='#' RAPTOR_SERIALIZER_RDFXML_FALSE= fi if test $ntriples_serializer = yes; then RAPTOR_SERIALIZER_NTRIPLES_TRUE= RAPTOR_SERIALIZER_NTRIPLES_FALSE='#' else RAPTOR_SERIALIZER_NTRIPLES_TRUE='#' RAPTOR_SERIALIZER_NTRIPLES_FALSE= fi if test $rdfxml_abbrev_serializer = yes; then RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE= RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE='#' else RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE='#' RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE= fi if test $turtle_serializer = yes; then RAPTOR_SERIALIZER_TURTLE_TRUE= RAPTOR_SERIALIZER_TURTLE_FALSE='#' else RAPTOR_SERIALIZER_TURTLE_TRUE='#' RAPTOR_SERIALIZER_TURTLE_FALSE= fi if test $rss_1_0_serializer = yes; then RAPTOR_SERIALIZER_RSS_1_0_TRUE= RAPTOR_SERIALIZER_RSS_1_0_FALSE='#' else RAPTOR_SERIALIZER_RSS_1_0_TRUE='#' RAPTOR_SERIALIZER_RSS_1_0_FALSE= fi if test $atom_serializer = yes; then RAPTOR_SERIALIZER_ATOM_TRUE= RAPTOR_SERIALIZER_ATOM_FALSE='#' else RAPTOR_SERIALIZER_ATOM_TRUE='#' RAPTOR_SERIALIZER_ATOM_FALSE= fi if test $dot_serializer = yes; then RAPTOR_SERIALIZER_DOT_TRUE= RAPTOR_SERIALIZER_DOT_FALSE='#' else RAPTOR_SERIALIZER_DOT_TRUE='#' RAPTOR_SERIALIZER_DOT_FALSE= fi if test $html_serializer = yes; then RAPTOR_SERIALIZER_HTML_TRUE= RAPTOR_SERIALIZER_HTML_FALSE='#' else RAPTOR_SERIALIZER_HTML_TRUE='#' RAPTOR_SERIALIZER_HTML_FALSE= fi if test $json_serializer = yes; then RAPTOR_SERIALIZER_JSON_TRUE= RAPTOR_SERIALIZER_JSON_FALSE='#' else RAPTOR_SERIALIZER_JSON_TRUE='#' RAPTOR_SERIALIZER_JSON_FALSE= fi if test $nquads_serializer = yes; then RAPTOR_SERIALIZER_NQUADS_TRUE= RAPTOR_SERIALIZER_NQUADS_FALSE='#' else RAPTOR_SERIALIZER_NQUADS_TRUE='#' RAPTOR_SERIALIZER_NQUADS_FALSE= fi if test $rss_1_0_serializer = yes -o $rss_parser = yes; then RAPTOR_RSS_COMMON_TRUE= RAPTOR_RSS_COMMON_FALSE='#' else RAPTOR_RSS_COMMON_TRUE='#' RAPTOR_RSS_COMMON_FALSE= fi need_icu=no if test $use_nfc = yes -a $have_icu = yes; then need_icu=yes $as_echo "#define RAPTOR_ICU_NFC 1" >>confdefs.h fi if test $need_icu = yes; then RAPTOR_ICU_NFC_TRUE= RAPTOR_ICU_NFC_FALSE='#' else RAPTOR_ICU_NFC_TRUE='#' RAPTOR_ICU_NFC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking XML names version" >&5 $as_echo_n "checking XML names version... " >&6; } # Check whether --with-xml-names was given. if test "${with_xml_names+set}" = set; then : withval=$with_xml_names; xml_names="$withval" else xml_names="1.0" fi if test $xml_names = 1.1; then $as_echo "#define RAPTOR_XML_1_1 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xml_names" >&5 $as_echo "$xml_names" >&6; } have_libcurl=0 have_libfetch=0 need_libcurl=0 need_libxml_www=0 need_libfetch=0 if test "X$CURL_CONFIG" != X; then CPPFLAGS="$CPPFLAGS $LIBCURL_CFLAGS" LIBS="$LIBS $LIBCURL_LIBS" ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : fi ac_fn_c_check_func "$LINENO" "curl_easy_init" "ac_cv_func_curl_easy_init" if test "x$ac_cv_func_curl_easy_init" = xyes; then : have_curl_easy_init=yes else have_curl_easy_init=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl library" >&5 $as_echo_n "checking for libcurl library... " >&6; } if test $have_curl_easy_init = yes -a "$ac_cv_header_curl_curl_h" = yes; then libcurl_min_version_dec=`echo $libcurl_min_version | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` libcurl_version_dec=`echo $LIBCURL_VERSION | $AWK -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'` if test $libcurl_version_dec -lt $libcurl_min_version_dec; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using libcurl $LIBCURL_VERSION is unsupported - $libcurl_min_version or newer required." >&5 $as_echo "$as_me: WARNING: Using libcurl $LIBCURL_VERSION is unsupported - $libcurl_min_version or newer required." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - version $LIBCURL_VERSION is too old" >&5 $as_echo "no - version $LIBCURL_VERSION is too old" >&6; } else have_libcurl=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - version $LIBCURL_VERSION via $libcurl_source" >&5 $as_echo "yes - version $LIBCURL_VERSION via $libcurl_source" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi LIBS="$oLIBS" CPPFLAGS="$oCPPFLAGS" if test "X$ac_cv_header_curl_curl_h" = Xyes; then $as_echo "#define HAVE_CURL_CURL_H 1" >>confdefs.h fi if test $ac_cv_header_fetch_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fetchXGetURL in -lfetch" >&5 $as_echo_n "checking for fetchXGetURL in -lfetch... " >&6; } if ${ac_cv_lib_fetch_fetchXGetURL+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfetch $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fetchXGetURL (); int main () { return fetchXGetURL (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fetch_fetchXGetURL=yes else ac_cv_lib_fetch_fetchXGetURL=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fetch_fetchXGetURL" >&5 $as_echo "$ac_cv_lib_fetch_fetchXGetURL" >&6; } if test "x$ac_cv_lib_fetch_fetchXGetURL" = xyes; then : have_libfetch=1 fi LIBS="$oLIBS" fi # Check whether --with-www was given. if test "${with_www+set}" = set; then : withval=$with_www; www="$withval" else www="curl" fi for www_name in $www curl xml libfetch none; do case $www_name in curl) if test $have_libcurl = 1; then need_libcurl=1 $as_echo "#define RAPTOR_WWW_LIBCURL 1" >>confdefs.h break fi ;; xml) if test $have_libxml = 1; then need_libxml=1 need_libxml_www=1 $as_echo "#define RAPTOR_WWW_LIBXML 1" >>confdefs.h break fi ;; libfetch) if test $have_libfetch = 1; then need_libfetch=1 $as_echo "#define RAPTOR_WWW_LIBFETCH 1" >>confdefs.h break fi ;; none|no) need_libcurl=0 need_libxml_www=0 $as_echo "#define RAPTOR_WWW_NONE 1" >>confdefs.h break ;; *) as_fn_error $? "No such WWW library $www_name" "$LINENO" 5 ;; esac done { $as_echo "$as_me:${as_lineno-$LINENO}: checking WWW libraries available" >&5 $as_echo_n "checking WWW libraries available... " >&6; } www_libraries_available= if test $have_libcurl = 1; then www_libraries_available="$www_libraries_available libcurl $LIBCURL_VERSION" fi if test $have_libxml = 1; then www_libraries_available="$www_libraries_available libxml $LIBXML_VERSION" fi if test $have_libfetch = 1; then www_libraries_available="$www_libraries_available libfetch" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $www_libraries_available" >&5 $as_echo "$www_libraries_available" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking WWW library to use" >&5 $as_echo_n "checking WWW library to use... " >&6; } www_library= RAPTOR_WWW_LIBRARY=none if test $need_libcurl = 1; then www_library="libcurl $LIBCURL_VERSION via $libcurl_source" RAPTOR_WWW_LIBRARY=libcurl elif test $need_libxml_www = 1; then www_library="libxml $LIBXML_VERSION via $libxml_source" RAPTOR_WWW_LIBRARY=libxml elif test $need_libfetch = 1; then www_library="libfetch" RAPTOR_WWW_LIBRARY=libfetch else www_library=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $www_library" >&5 $as_echo "$www_library" >&6; } if test "X$www_library" = Xnone; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No WWW library in use - only file: URLs will work" >&5 $as_echo "$as_me: WARNING: No WWW library in use - only file: URLs will work" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Install libcurl, libxml2 or BSD libfetch for WWW access" >&5 $as_echo "$as_me: WARNING: Install libcurl, libxml2 or BSD libfetch for WWW access" >&2;} fi if test $need_libcurl = 1; then CPPFLAGS="$CPPFLAGS $LIBCURL_CFLAGS" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $LIBCURL_LIBS" if test libcurl_source = "pkg-config"; then if test "X$PKG_CONFIG_REQUIRES" != X; then PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES," fi PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libcurl >= $libcurl_min_version" fi case " $LIBOBJS " in *" raptor_www_curl.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_www_curl.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking NFC library to use" >&5 $as_echo_n "checking NFC library to use... " >&6; } nfc_library=none if test $need_icu = yes; then CPPFLAGS="$CPPFLAGS `$ICU_CONFIG --cppflags-searchpath`" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$ICU_CONFIG --ldflags-searchpath` -licuuc" case " $LIBOBJS " in *" raptor_nfc_icu.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_nfc_icu.$ac_objext" ;; esac nfc_library="ICU $ICU_VERSION" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nfc_library" >&5 $as_echo "$nfc_library" >&6; } have_lininn=no have_inn_parsedate=no oCPPFLAGS="$CPPFLAGS" if test -d /usr/include/inn; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" fi ac_fn_c_check_header_mongrel "$LINENO" "libinn.h" "ac_cv_header_libinn_h" "$ac_includes_default" if test "x$ac_cv_header_libinn_h" = xyes; then : fi CPPFLAGS="$oCPPFLAGS" oCPPFLAGS="$CPPFLAGS" if test $ac_cv_header_libinn_h = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" LIBS="$LIBS -L/usr/lib/news -linn" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HashMessageID in -linn" >&5 $as_echo_n "checking for HashMessageID in -linn... " >&6; } if ${ac_cv_lib_inn_HashMessageID+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linn $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char HashMessageID (); int main () { return HashMessageID (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inn_HashMessageID=yes else ac_cv_lib_inn_HashMessageID=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inn_HashMessageID" >&5 $as_echo "$ac_cv_lib_inn_HashMessageID" >&6; } if test "x$ac_cv_lib_inn_HashMessageID" = xyes; then : have_libinn=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking parsedate in libinn" >&5 $as_echo_n "checking parsedate in libinn... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include int main () { parsedate("Sun Jun 12 00:04:09 BST 2005", NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_INN_PARSEDATE 1" >>confdefs.h have_inn_parsedate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$oCPPFLAGS" LIBS="$oLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking date parsing source" >&5 $as_echo_n "checking date parsing source... " >&6; } raptor_parsedate_needed=no if test $have_inn_parsedate = yes; then CPPFLAGS="$CPPFLAGS -I/usr/include/inn" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -L/usr/lib/news -linn" { $as_echo "$as_me:${as_lineno-$LINENO}: result: INN parsedate" >&5 $as_echo "INN parsedate" >&6; } else if test $need_libcurl = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcurl curl_getdate" >&5 $as_echo "libcurl curl_getdate" >&6; } else raptor_parsedate_needed=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: raptor parsedate" >&5 $as_echo "raptor parsedate" >&6; } fi fi if test $raptor_parsedate_needed = yes; then PARSEDATE_TRUE= PARSEDATE_FALSE='#' else PARSEDATE_TRUE='#' PARSEDATE_FALSE= fi if test $raptor_parsedate_needed = yes; then $as_echo "#define HAVE_RAPTOR_PARSE_DATE 1" >>confdefs.h fi if test $need_libfetch = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lfetch" case " $LIBOBJS " in *" raptor_www_libfetch.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_www_libfetch.$ac_objext" ;; esac fi RAPTOR_XML_PARSER=none if test $need_libxml = 1; then if test $have_libxml = 1; then $as_echo "#define RAPTOR_XML_LIBXML 1" >>confdefs.h else as_fn_error $? "libxml2 is not available - please get it from http://xmlsoft.org/" "$LINENO" 5 fi if test $need_libxml_www = 1; then case " $LIBOBJS " in *" raptor_www_libxml.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS raptor_www_libxml.$ac_objext" ;; esac fi RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS $LIBXML_LIBS" CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" if test libxml_source = "pkg-config"; then if test "X$PKG_CONFIG_REQUIRES" != X; then PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES," fi PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libxml-2.0 >= $libxml_min_version" fi RAPTOR_XML_PARSER=libxml fi if test $need_libxml = 1; then RAPTOR_XML_LIBXML_TRUE= RAPTOR_XML_LIBXML_FALSE='#' else RAPTOR_XML_LIBXML_TRUE='#' RAPTOR_XML_LIBXML_FALSE= fi if test $need_libxslt = 1; then RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS `$XSLT_CONFIG --libs`" CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS" fi if test $need_libyajl = 1; then if test "x$yajl_prefix" != "x"; then CPPFLAGS="-I$yajl_prefix/include $CPPFLAGS" RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -L$yajl_prefix/lib" fi RAPTOR_LDFLAGS="$RAPTOR_LDFLAGS -lyajl" fi RAPTOR_LIBTOOLLIBS=libraptor2.la xml_parser="none needed" if test $need_libxml = 1; then xml_parser="libxml $LIBXML_VERSION via $libxml_source" fi # Restore LIBS LIBS="$oLIBS" # Make final changes to cflags MEM= MEM_LIBS= CPPFLAGS="-DRAPTOR_INTERNAL=1 $CPPFLAGS" # Check whether --with-memory-signing was given. if test "${with_memory_signing+set}" = set; then : withval=$with_memory_signing; use_memory_signing="$withval" else use_memory_signing="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking using memory signing" >&5 $as_echo_n "checking using memory signing... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_memory_signing" >&5 $as_echo "$use_memory_signing" >&6; }; if test "$use_memory_signing" = yes; then MEM=-DRAPTOR_MEMORY_SIGN=1 MEM_LIBS= fi debug_messages=no # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; debug_messages=$enableval fi if test "$debug_messages" = "yes"; then $as_echo "#define RAPTOR_DEBUG 1" >>confdefs.h fi if test "$USE_MAINTAINER_MODE" = yes; then $as_echo "#define MAINTAINER_MODE 1" >>confdefs.h CPPFLAGS="$MAINTAINER_CPPFLAGS $CPPFLAGS" fi # Features # lists RAPTOR_PARSERS=$rdf_parsers_enabled RAPTOR_SERIALIZERS=$rdf_serializers_enabled # single values or none abs_top_srcdir=`cd $srcdir; pwd` abs_top_builddir=`pwd` # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' ac_config_files="$ac_config_files Makefile raptor2.spec raptor2.rdf data/Makefile docs/Makefile docs/version.xml examples/Makefile scripts/Makefile src/raptor2.h src/Makefile tests/Makefile tests/feeds/Makefile tests/grddl/Makefile tests/ntriples/Makefile tests/ntriples-2013/Makefile tests/nquads-2013/Makefile tests/rdfa/Makefile tests/rdfa11/Makefile tests/json/Makefile tests/rdfxml/Makefile tests/turtle/Makefile tests/turtle-2013/Makefile tests/trig/Makefile utils/Makefile librdfa/Makefile raptor2.pc" # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gtkdoc-rebase do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_REBASE+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 $as_echo "$GTKDOC_REBASE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_REBASE" && break done test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 $as_echo "$GTKDOC_MKPDF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "You need to have gtk-doc >= 1.3 installed to build $PACKAGE_NAME" "$LINENO" 5 fi if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 $as_echo_n "checking for GTKDOC_DEPS... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTKDOC_DEPS_LIBS"; then pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` else GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met: $GTKDOC_DEPS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; else enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. if test "${enable_gtk_doc_pdf+set}" = set; then : enableval=$enable_gtk_doc_pdf; else enable_gtk_doc_pdf=no fi if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc_html = xyes; then GTK_DOC_BUILD_HTML_TRUE= GTK_DOC_BUILD_HTML_FALSE='#' else GTK_DOC_BUILD_HTML_TRUE='#' GTK_DOC_BUILD_HTML_FALSE= fi if test x$enable_gtk_doc_pdf = xyes; then GTK_DOC_BUILD_PDF_TRUE= GTK_DOC_BUILD_PDF_FALSE='#' else GTK_DOC_BUILD_PDF_TRUE='#' GTK_DOC_BUILD_PDF_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi if test -n "$GTKDOC_REBASE"; then GTK_DOC_USE_REBASE_TRUE= GTK_DOC_USE_REBASE_FALSE='#' else GTK_DOC_USE_REBASE_TRUE='#' GTK_DOC_USE_REBASE_FALSE= fi cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RELEASE_VERSION_TRUE}" && test -z "${RELEASE_VERSION_FALSE}"; then as_fn_error $? "conditional \"RELEASE_VERSION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NEED_STRTOK_R_TRUE}" && test -z "${NEED_STRTOK_R_FALSE}"; then as_fn_error $? "conditional \"NEED_STRTOK_R\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${STRCASECMP_TRUE}" && test -z "${STRCASECMP_FALSE}"; then as_fn_error $? "conditional \"STRCASECMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then as_fn_error $? "conditional \"GETOPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_RDFXML_TRUE}" && test -z "${RAPTOR_PARSER_RDFXML_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_RDFXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_NTRIPLES_TRUE}" && test -z "${RAPTOR_PARSER_NTRIPLES_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_NTRIPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_TURTLE_TRUE}" && test -z "${RAPTOR_PARSER_TURTLE_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_TURTLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_TRIG_TRUE}" && test -z "${RAPTOR_PARSER_TRIG_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_TRIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_RSS_TRUE}" && test -z "${RAPTOR_PARSER_RSS_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_RSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_GRDDL_TRUE}" && test -z "${RAPTOR_PARSER_GRDDL_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_GRDDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_GUESS_TRUE}" && test -z "${RAPTOR_PARSER_GUESS_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_GUESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_RDFA_TRUE}" && test -z "${RAPTOR_PARSER_RDFA_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_RDFA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_JSON_TRUE}" && test -z "${RAPTOR_PARSER_JSON_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_JSON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_PARSER_NQUADS_TRUE}" && test -z "${RAPTOR_PARSER_NQUADS_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_PARSER_NQUADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LIBRDFA_TRUE}" && test -z "${LIBRDFA_FALSE}"; then as_fn_error $? "conditional \"LIBRDFA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_RDFXML_TRUE}" && test -z "${RAPTOR_SERIALIZER_RDFXML_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_RDFXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_NTRIPLES_TRUE}" && test -z "${RAPTOR_SERIALIZER_NTRIPLES_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_NTRIPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_RDFXML_ABBREV_TRUE}" && test -z "${RAPTOR_SERIALIZER_RDFXML_ABBREV_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_RDFXML_ABBREV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_TURTLE_TRUE}" && test -z "${RAPTOR_SERIALIZER_TURTLE_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_TURTLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_RSS_1_0_TRUE}" && test -z "${RAPTOR_SERIALIZER_RSS_1_0_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_RSS_1_0\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_ATOM_TRUE}" && test -z "${RAPTOR_SERIALIZER_ATOM_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_ATOM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_DOT_TRUE}" && test -z "${RAPTOR_SERIALIZER_DOT_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_DOT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_HTML_TRUE}" && test -z "${RAPTOR_SERIALIZER_HTML_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_JSON_TRUE}" && test -z "${RAPTOR_SERIALIZER_JSON_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_JSON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_SERIALIZER_NQUADS_TRUE}" && test -z "${RAPTOR_SERIALIZER_NQUADS_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_SERIALIZER_NQUADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_RSS_COMMON_TRUE}" && test -z "${RAPTOR_RSS_COMMON_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_RSS_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_ICU_NFC_TRUE}" && test -z "${RAPTOR_ICU_NFC_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_ICU_NFC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PARSEDATE_TRUE}" && test -z "${PARSEDATE_FALSE}"; then as_fn_error $? "conditional \"PARSEDATE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RAPTOR_XML_LIBXML_TRUE}" && test -z "${RAPTOR_XML_LIBXML_FALSE}"; then as_fn_error $? "conditional \"RAPTOR_XML_LIBXML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Raptor RDF Parser and Serializer library $as_me 2.0.15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Raptor RDF Parser and Serializer library config.status 2.0.15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/raptor_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/raptor_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "raptor2.spec") CONFIG_FILES="$CONFIG_FILES raptor2.spec" ;; "raptor2.rdf") CONFIG_FILES="$CONFIG_FILES raptor2.rdf" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/version.xml") CONFIG_FILES="$CONFIG_FILES docs/version.xml" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "src/raptor2.h") CONFIG_FILES="$CONFIG_FILES src/raptor2.h" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/feeds/Makefile") CONFIG_FILES="$CONFIG_FILES tests/feeds/Makefile" ;; "tests/grddl/Makefile") CONFIG_FILES="$CONFIG_FILES tests/grddl/Makefile" ;; "tests/ntriples/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntriples/Makefile" ;; "tests/ntriples-2013/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntriples-2013/Makefile" ;; "tests/nquads-2013/Makefile") CONFIG_FILES="$CONFIG_FILES tests/nquads-2013/Makefile" ;; "tests/rdfa/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rdfa/Makefile" ;; "tests/rdfa11/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rdfa11/Makefile" ;; "tests/json/Makefile") CONFIG_FILES="$CONFIG_FILES tests/json/Makefile" ;; "tests/rdfxml/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rdfxml/Makefile" ;; "tests/turtle/Makefile") CONFIG_FILES="$CONFIG_FILES tests/turtle/Makefile" ;; "tests/turtle-2013/Makefile") CONFIG_FILES="$CONFIG_FILES tests/turtle-2013/Makefile" ;; "tests/trig/Makefile") CONFIG_FILES="$CONFIG_FILES tests/trig/Makefile" ;; "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; "librdfa/Makefile") CONFIG_FILES="$CONFIG_FILES librdfa/Makefile" ;; "raptor2.pc") CONFIG_FILES="$CONFIG_FILES raptor2.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # 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 cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # 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=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # 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=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Raptor build summary: RDF parsers available : $rdf_parsers_available RDF parsers enabled :$rdf_parsers_enabled RDF serializers available : $rdf_serializers_available RDF serializers enabled :$rdf_serializers_enabled XML parser : $xml_parser WWW library : $www_library NFC check library : $nfc_library " >&5 $as_echo " Raptor build summary: RDF parsers available : $rdf_parsers_available RDF parsers enabled :$rdf_parsers_enabled RDF serializers available : $rdf_serializers_available RDF serializers enabled :$rdf_serializers_enabled XML parser : $xml_parser WWW library : $www_library NFC check library : $nfc_library " >&6; } raptor2-2.0.15/mkinstalldirs0000755000175000017500000000672211330426036012724 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: raptor2-2.0.15/INSTALL.html0000644000175000017500000002717312370052716012122 00000000000000 Raptor RDF Syntax Library - Building and Installing from Source

Raptor RDF Syntax Library - Building and Installing from Source

1. Getting the sources

There are several ways to get the sources. The most stable and tested versions are the sources shipped with each release and these are recommended as the first place to start. If you want to get a newer set, then there are nightly snapshots made of the development sources, which may not yet be committed to GIT. For the latest developent sources, anonymous GIT access is available but this may require some configuring of developer tools that are not needed for the snapshot releases.

The source bundle and package files contain all the HTML files and documentation provided on the web site.

1.1 Getting the sources from releases

This is the recommended source to build and install raptor. It ensures that a tested and working set of files are used.

The released sources are available from http://download.librdf.org/source/ (master site). Do not use GitHub tagged tarballs, they are not the same thing and are not supported.

1.2 Getting the sources from GIT

This is the recommended source for developers. It provides the latest beta or unstable code. For a stable version, use a release as described above.

  git clone git://github.com/dajobe/raptor.git
  cd raptor

At this stage, or after a git pull you will need to create the automake and autoconf derived files, as described below in Create the configure program by using the autogen.sh script.

Building Raptor in this way requires some particular development tools not needed when building from snapshot releases - automake, autoconf, libtool, gtkdocize and their dependencies. The autogen.sh script looks for the newest versions of the auto* tools and checks that they meet the minimum versions.

gtkdocize can be found in the gtk-doc-tools package on Debian-based systems such as Ubuntu, gtk-docgtk-doc on OSX.

2. Configuring and building

Raptor uses the GNU automake and autoconf to handle system dependency checking. It is developed and built on x86 Linux and x86 OSX but is also tested on other systems occasionally.

Raptor has several optional libraries:

  • The libxml2 XML library (2.6.8 or newer) for parsing XML syntaxes.
  • Libcurl, libxml2 or libfetch for retrieving URIs.
  • libxslt (requiring libxml2 also) to provide the XSLT functionality for the GRDDL and microformats parser.
  • YAJL to provide JSON parsers if it is available.
  • ICU to provide Unicode NFC checking only if enabled with --with-icu-config

2.1. Create configure program

If there is a configure program, skip to the next section.

If there is no configure program, you can create it using the autogen.sh script, as long as you have the automake and autoconf tools. This is done by:

  ./autogen.sh

and you can also pass along arguments intended for configure (see below for what these are):

  ./autogen.sh --prefix=/usr/local/somewhere

On OSX you may have to explicitly set the LIBTOOLIZE variable for the libtoolize utility since on OSX libtoolize is a different program. The full path to the utility should be given:

  LIBTOOLIZE=/opt/local/bin/glibtoolize ./autogen.sh

Alternatively you can run them by hand with:

  aclocal; autoheader; automake --add-missing; autoconf

The automake and autoconf tools have many different versions and at present development is being done with automake 1.11.1 (minimum version 1.11), autoconf 2.65 (minimum version 2.62) and libtool 2.2.10 (minimum version 2.2.0). These are only needed when compiling from GIT sources. autogen.sh enforces the requirements.

Raptor also requires flex version 2.5.31 or newer (2.5.4 will not work) and GNU Bison to build lexers and parsers. These are only required when building from GIT.

2.2 Options for configure

Raptor's configure supports the following options:

--disable-nfc-check

Disable Unicode Normal Form C (NFC) checking code. The code primarily consists of large tables plus some checking code which can be removed from the library with this option. All NFC checks will succeed when this is disabled.

--enable-debug

Enable debug messages (default not enabled). Maintainer mode automatically enables this.

--enable-parsers=PARSERS

Pick the RDF parsers to build from the list:
rdfxml ntriples turtle rss-tag-soup
The default when this option is omitted is to enable all parsers. grddl requires libxml2 and libxstl so may not always be available. If all parsers are not enabled, parts of the test suite will likely fail.

The parsers that a built library supports can be found from the API level using functions such as raptor_parsers_enumerate and raptor_syntaxes_enumerate or from the rapper utility in the help message.

--enable-serializers=SERIALIZERS

Pick the RDF serializers to build from the list:
rdfxml ntriples rdfxml-abbrev
The default when this option is omitted is to enable all serializers. If all serializers are not enabled, parts of the test suite will likely fail.

The serializers that a built library supports can be found from the API level using functions such as raptor_serializers_enumerate or from the rapper utility in the help message.

--with-memory-signing

Enable signing of memory allocations so that when memory is allocated with malloc() and released free(), a check is made that the memory was allocated in the same library.

--with-www=NAME

Pick a WWW library to use - either curl, xml (for libxml), libwww for W3C libwww or none to disable it.

--with-xml2-config=NAME

Set the path to the libxml xml2-config program. The default is to look for this on the PATH.

--with-xslt-config=NAME

Set the path to the libxslt xslt-config program. The default is to look for this on the PATH.

--with-curl-config=NAME

Set the path to the libcurl curl-config program. The default is to look for this on the PATH.

--with-icu-config=NAME

Set the path to the ICU icu-config program. This will NOT be searched for on the PATH.

--with-libwww-config=NAME

Legacy option that used to support the libwww library.

--with-yajl=DIR|no

Build against YAJL installed into directory DIR or with 'no', disable looking for YAJL. The default is to search a set of common installation directories such /opt/local, /usr/local and /usr.

2.3 Configuring

The default configuration will install into /usr/local:

   ./configure

To install into the standard Unix / Linux (and also Cygwin) system directory, use:

   ./configure --prefix=/usr

Append to the line any additional options you need like this:

   ./configure --prefix=/usr --enable-parsers=rdfxml

2.4 Compiling

Compile the library and the rapper utility with:

   make

Note: GNU make is probably required which may be called gmake or gnumake if your system has a different make available too.

2.5 Testing

Raptor has a built-in test suite that can be invoked with:

  make check

which should emit lots of exciting test messages to the screen but conclude with something like:
All n tests passed
if everything works correctly. There will be some Unicode NFC checking tests that give ignored failures in 1.3.2 or later as NFC checking has been temporarily removed.

2.6 Installing

Install the library and the rapper utility into the area configure with --prefix (or /usr/local if not given) with:

   make install

Note: This may require root access if the destination area is a system directory such as /usr. In that case you may have to do sudo make install.

3. Using the library

Raptor includes a full tutorial and reference manual for the library. These are installed into PREFIX/share/gtk-doc/html/raptor and are also available from the Raptor web site.

In addition, the examples in the tutorial as well as some other example programs are available in the examples sub-directory. These can be compiled with:

   cd examples

   # Raptor GUI - only if you have the GTK libraries
   make grapper

   # If you have all requirements
   make examples

3.2 rapper utility

Raptor provides an RDF syntax utility program called rapper which can do a variety of parsing and serializing operations.

rapper can be run over RDF/XML content like this:

  rapper http://librdf.org/raptor/raptor.rdf

Raptor can also extract RDF content inside general XML when the -f scanForRDF feature is enabled. For example if some RDF/XML is embedded inside some SVG, it could be extracted with:

  rapper -f scanForRDF /path/to/test/pic.svg

You can also run it on other syntaxes such as N-Triples files with the -i option like this:

  rapper -i ntriples test.nt

The default output is a simple statement dump format, but it can be changed to write N-Triples by using the -o option, like this:

  rapper -o ntriples dc.rdf

See the rapper manual page for full details using 'man rapper' or read the HTML version in docs/rapper.html or on the Raptor website.


Copyright 2000-2014 Dave Beckett
Copyright 2000-2005 University of Bristol

raptor2-2.0.15/ChangeLog.130000644000175000017500000015722212130720446012115 000000000000002012-12-11 Dave Beckett * .gitignore: Ignore CMakeTests.txt 2012-11-07 Dave Beckett * librdfa/rdfa.c: Handle non-namespaced elements without crash in RDFa Fixes Issue #0000521 http://bugs.librdf.org/mantis/view.php?id=521 2012-10-22 Dave Beckett * Merge pull request #6 from ansell/master: Update turtle test manifests 2012-09-23 Dave Beckett * manifest.pl: Remove ancient manifest.pl moved to testing project 2012-09-19 Dave Beckett * Merge pull request #5 from iskunk/drg-win32-2 Win32 parser-guess and DLL linkage fixes 2012-09-19 Daniel Richard G * src/raptor_internal.h, src/turtle_common.h: Fix DLL export linkage for internal functions needed by the test programs This allows the test programs to be linked against a DLL build of Raptor. * src/raptor_internal.h, src/raptor_parse.c: Ensure that a small system BUFSIZ does not affect parser guessing raptor_internal.h: Ensure that RAPTOR_READ_BUFFER_SIZE is never smaller than 4096. (It really only needs to be as large as FIRSTN in raptor_parse.c, i.e. 1024, but 4kB isn't all that much nowadays anyway) (raptor_world_guess_parser_name): Added a compile-time check to ensure that RAPTOR_READ_BUFFER_SIZE is at least as large as FIRSTN, because otherwise the guesser sees fewer than FIRSTN bytes from the document. 2012-09-07 Dave Beckett * utils/rapper.c: Remove -m MODE from help This option was removed in commit f94fa561db05b21132b14a2b72f05b77e666c252 on Wed Apr 28 21:31:54 2010 -0700 as part of the Raptor V2 work. 2012-08-31 Dave Beckett * autogen.sh, configure.ac: Require autoconf 2.62 again * autogen.sh: Update autogen.sh * autogen.sh: Echo autoconf args Merge pull request #4 from iskunk/drg-win32 win32 and autoconf-related changes 2012-08-30 Daniel Richard G * CMakeLists.txt, src/CMakeLists.txt: Simplify CMake usage with CMAKE_INCLUDE_CURRENT_DIR * configure.ac, docs/Makefile.am, examples/grapper.c, examples/raptor_abort.c, scripts/fix-flex, src/.gitignore, src/Makefile.am, src/ntriples_parse.c, src/parsedate.y, src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_concepts.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_iostream.c, src/raptor_json.c, src/raptor_json_writer.c, src/raptor_librdfa.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_log.c, src/raptor_memstr.c, src/raptor_namespace.c, src/raptor_nfc_icu.c, src/raptor_nfc_test.c, src/raptor_option.c, src/raptor_parse.c, src/raptor_permute_test.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_html.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_syntax_description.c, src/raptor_term.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_uri.c, src/raptor_win32.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/snprintf.c, src/strcasecmp.c, src/turtle_common.c, src/turtle_lexer.l, src/turtle_parser.y, src/win32_raptor_config.h.in, utils/rapper.c, utils/rdfdiff.c: Remove all traces of win32_raptor_config.h Remove the file itself, all #include uses of it, and all references to it, as this file is no longer needed. * Makefile.am, README-cmake.md, configure.ac, win32/Makefile.am, win32/README.md, win32/rapper.dsp, win32/rapper.vcproj, win32/raptor.dsp, win32/raptor.dsw, win32/raptor.sln, win32/raptor.vcproj, win32/raptortest.cpp, win32/raptortest.dsp, win32/raptortest.vcproj: Delete win32/ subdirectory The MSVC6 and MSVC7.1 project files in win32/ fail to build current versions of Raptor, require external projects for Curl and Expat which do not appear to be publicly available, are unlikely to get the extensive work they need in the near future due to John Barstow's busy schedule, and are redundant now that Raptor can be built on Windows using CMake. Thus, out they go. win32/README.md: Moved up to README-cmake.md, as this information is useful, and CMake build support is not limited to Win32 2012-08-25 Dave Beckett * configure.ac: fix PKG_CONFIG_REQUIRES version vars * configure.ac, raptor2.pc.in: Allow xml2-config and curl-config to work for libxml and libcurl - report on source of xml, curl libraries in status - remove extra oCPPFLAGS assignements - substitute pkgconfig dependencies into raptor2.pc 2012-08-20 Dave Beckett * src/raptor_log.c: (raptor_log_error): sizeof should take size of field not pointer 2012-08-16 Dave Beckett * src/raptor_libxml.c: Handle ret->checked field not being present The entities checked field was added 2006-10-10 in http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6and released in libxml2 2.6.27 on 2006-10-25 Fixes Issue #0000520 http://bugs.librdf.org/mantis/view.php?id=520 2012-08-14 Dave Beckett * src/raptor_rdfxml.c: (raptor_rdfxml_element_content_type_as_string): LAST is not valid 2012-08-10 Dave Beckett * RELEASE.html: 2.0.9 * win32/Makefile.am: README.md in dist replacing README.txt 2012-08-10 Daniel Richard G * CMakeLists.txt, Makefile.am, librdfa/config.h, src/CMakeLists.txt, src/Makefile.am, src/raptor_config_cmake.h.in, src/win32_raptor_config.h.in, tests/feeds/CMakeLists.txt, tests/feeds/Makefile.am, tests/grddl/CMakeLists.txt, tests/grddl/Makefile.am, tests/json/CMakeLists.txt, tests/json/Makefile.am, tests/ntriples/CMakeLists.txt, tests/ntriples/Makefile.am, tests/rdfa/CMakeLists.txt, tests/rdfa/Makefile.am, tests/rdfa11/CMakeLists.txt, tests/rdfa11/Makefile.am, tests/rdfxml/CMakeLists.txt, tests/rdfxml/Makefile.am, tests/trig/CMakeLists.txt, tests/trig/Makefile.am, utils/CMakeLists.txt, utils/Makefile.am, win32/README.md, win32/README.txt: CMake build framework for Raptor - win32 This commit is based on the email with patch that Daniel Richard G. sent to redland-dev on 5th July 2012 http://lists.librdf.org/pipermail/redland-dev/2012-July/002502.htmlI lightly edited the email to fit into 80 chars and make more it markdowny and turn it into win32/README.md -- Dave Beckett 2012-07-27 Dave Beckett * configure.ac: Fix for flex version message from OSX 2012-07-05 Dave Beckett * src/raptor2.h.in: Protect macro checks for __GNUC__ are defined 2012-07-01 Dave Beckett * src/raptor2.h.in: Add RAPTOR_NORETURN * configure.ac: Set automake -W and gcc -W to same as librdf 2012-06-26 Dave Beckett * Makefile.am: EXTRA_DIST: Remove ChangeLog NEWS since they are in dist by default * scripts/build-formats.c: (sort_type_syntax_by_mime_type): Add explicit cast for ordering mime types * Makefile.am: Restore NEWS building to maintainer mode. Reverts 979af117bb40de4e8391656b3e18f47f7096d1fc but requires autogen.sh to touch NEWS after a GIT checkout so that automake can run. * autogen.sh: autogen.sh updates - Abort run if a configuring program fails. - Generate NEWS with old timestamp if missing so automake can run - small doc and message updates * librdfa/strtok_r.h: Fix strtok_r typo * docs/Makefile.am: Added raptor-1-to-2-map.tsv to EXTRA_DIST 2012-06-24 Dave Beckett * Snapshotted raptor2_2_0_8 for 2.0.8 release (GIT dbdb2f9e4aee4e93383fe62751b52349be64187b) * librdfa/config.h, librdfa/rdfa.h: Fix fake librdfa config.h * librdfa/config.h, librdfa/context.c, librdfa/lists.c, librdfa/rdfa.h: librdfa config.h now includes raptor_config.h directly 2012-06-23 Dave Beckett * src/raptor_www_libxml.c: Init / cleanup libxml nano HTTP library (raptor_www_libxml_init, raptor_www_libxml_free): Call xmlNanoHTTPInit and xmlNanoHTTPCleanup respectively. 2012-06-22 Dave Beckett * librdfa/context.c: DECLARE_URI_MAPPING - start new namespace, do not make a new one Call raptor_namespaces_start_namespace() instead of raptor_namespace_stack_start_namespace() which copies the namespace to the stack and then starts it. * tests/rdfa11/Makefile.am: Update rapper and rdfdiff use like already done for 'rdfa' tests * librdfa/rdfa.c: (raptor_rdfa_start_element): Free attr if allocated * src/raptor_nfc_test.c: Remove include of raptor_nfc.h 2012-06-20 Dave Beckett * NEWS.html, RELEASE.html: 2.0.8 * librdfa/curie.c, librdfa/namespace.c, librdfa/rdfa.c: Build fixes from Daniel Richard G. * RELEASE.html: 2.0.8 2012-06-19 Dave Beckett * src/raptor_parse.c: Lower min syntax guess score to 2 (Q 0.3) * src/turtle_parser.y: If Turtle and Trig are both present, make guessing prefer Turtle Also score higher for Trig if 'trig' is in mime type * examples/.gitignore: ignore rdfguess * examples/rdfguess.c: Update rdfguess example code to read from stdin or a file called '-' (rdfguess_guess_name): Added and alter to accept file called '-' as reading from FILE* stdin. (main): Call above to support reading from stdin. Do something with -h/--help * src/raptor_parse.c: Be conservative in guessing syntax - scoring too low is a failure. (raptor_world_guess_parser_name): Set min guess core to 5 (Q 0.6). this value isn't exposed or user configurable. Addresses Issue #0000487 http://bugs.librdf.org/mantis/view.php?id=487 * tests/feeds/Makefile.am: Fix output turtle files for out of source tree 'make check' 2012-06-18 Dave Beckett * NEWS.html, README.html, RELEASE.html: 2.0.8 2012-06-17 Dave Beckett * librdfa/curie.c: (rdfa_resolve_curie): Protect NULL uri lookup [clang] * librdfa/rdfa_utils.c: (rdfa_add_item): Protect NULL list lookup [clang] * librdfa/curie.c: (rdfa_resolve_curie): Protect NULL uri lookup [clang] * src/raptor_namespace.c: (raptor_namespaces_find_namespace): No NULL prefix for strcmp [clang] * librdfa/context.c: (rdfa_create_new_element_context): Return NULL on OOM [clang] * librdfa/context.c: librdfa in raptor: do not print to stdout on failure (rdfa_create_context): Remove printf with hardcoded message. if malloc fails return NULL * librdfa/rdfa.c: (end_element): Protect for NULL xml_literal before strlen [clang] * librdfa/curie.c: (rdfa_resolve_uri): empty rval check for OOM [clang] * src/raptor_qname.c: (raptor_qname_copy): Free new_qname on OOM [clang] * NEWS.html, RELEASE.html: 2.0.8 * src/raptor_serialize_turtle.c: Do not emit a Turtle (...) collection if the list item is a URI Fixes Issue #0000381 http://bugs.librdf.org/mantis/view.php?id=381 * tests/rdfa11/Makefile.am: 29 failures - 0114 passes * tests/rdfa11/0114.out: Correct expected result based on original sparql * src/raptor_rfc2396.c: Fix URI resolving with reference uri '?y' (raptor_uri_resolve_uri_reference): When reference uri has no path, copy the base path over. (main): Correct the test case expected result for '?y' following RFC3986 section 5.4.1 Normal examples. Add test case based on RDFa 1.1 test 0114 * tests/rdfa11/Makefile.am: 30 failures - 0234 passes * tests/rdfa11/0234.out: Fix test URI * tests/rdfa11/Makefile.am: notes * tests/rdfa11/Makefile.am: 32 failures - 0295 passes * tests/rdfa11/0295.out: Update XML ns; remove non-ascii junk * tests/rdfa11/Makefile.am: 32 failures - 0259 passes * librdfa/curie.c: (rdfa_resolve_curie): Get XML namespace from constnat 2012-06-13 Dave Beckett * src/raptor_guess.c, src/raptor_internal.h, src/raptor_parse.c: Raptor locator accessor for guess parser struct raptor_parser_factory_s gains optional get_locator method. (raptor_parser_get_locator): Call factory get_locator method if present, otherwise use field. (raptor_guess_guess_get_locator): Added to get locator from inner parser if it exists. 2012-06-11 Dave Beckett * configure.ac: Compare libcurl hex vernums as strings * src/raptor_term.c: (raptor_new_term_from_literal): Cast language length again * src/raptor_internal.h: Remove redundant raptor_parser_log_error_varargs * librdfa/Makefile.am: Add missing librdfa files to dist * src/raptor_internal.h: Add prototype for raptor_parser_log_error_varargs * tests/rdfa11/0226.out, tests/rdfa11/0226.xml, tests/rdfa11/0227.out, tests/rdfa11/0227.xml: Updated RDFa 1.1 tests 0226 and 0227 after upstream change Switches from (fake) rdf:inlist property to ex:inlist in example.org namespace 2012-06-10 Dave Beckett * tests/rdfa11/Makefile.am: 33 failures * tests/rdfa11/0221.out: Add rdf:value triple that is also generated by librdfa * tests/rdfa11/0218.out: Fix test URI * tests/rdfa11/0201.out: Fix test URI to .xml * tests/rdfa11/0220.out: Add rdf:value triple that is also generated by librdfa * tests/rdfa11/0197.out: Add other triples not tested in sparql * tests/rdfa11/Makefile.am: More failures detail * tests/rdfa11/0255.out: 1 triple plain literal test * tests/rdfa11/Makefile.am: 39 failures * tests/rdfa11/0061.xml, tests/rdfa11/0062.xml, tests/rdfa11/0076.xml, tests/rdfa11/0077.xml, tests/rdfa11/0172.xml, tests/rdfa11/0173.xml, tests/rdfa11/0260.xml: Format some tests as XHTML1 as the only expected input form. 0061 0062 0076 0077 0172 0173 0260 are marked in the test manifest as only having a host language 'xhtml1' * tests/rdfa11/0260.out: Fix test URI * tests/rdfa11/Makefile.am: 44 failures * src/raptor_sax2.c: (raptor_sax2_inscope_xml_language): Allow returning "" * tests/rdfa11/0296.out: Add vocab triple and homepage one that sparql ommits * tests/rdfa11/0259.out: Add test URI * tests/rdfa11/0258.out: FIx test URI * librdfa/rdfa.c: Simplify and fix languag handling * src/raptor_general.c, src/raptor_internal.h: Move git-version.h include to just one module to speed up recompiles. 2012-06-09 Dave Beckett * tests/rdfa11/Makefile.am: 0295 * tests/rdfa11/0295.out: Test passes if >0 triples are generated * src/raptor_librdfa.c: (raptor_librdfa_parse_start): Set initial line/column to unknown. * librdfa/rdfa.c: librdfa in raptor - pass back error line number info to user (start_element): Update locator from SAX2 * tests/rdfa11/Makefile.am: 50 failures * tests/rdfa11/0189.out: Fix test URI * tests/rdfa11/0187.out: Fix output vocabs * tests/rdfa11/Makefile.am: 0304 note * src/raptor_internal.h: Redefine rdfa_update_uri_mappings to internal symbol * tests/rdfa11/Makefile.am: 52 failures * tests/rdfa11/0301.out, tests/rdfa11/0302.out, tests/rdfa11/0303.out: Use exact output triples including usesVocabulary * tests/rdfa11/0258.out: 1 triple * tests/rdfa11/Makefile.am: 53 failures * tests/rdfa11/0272.out, tests/rdfa11/0273.out, tests/rdfa11/0274.out, tests/rdfa11/0275.out, tests/rdfa11/0276.out, tests/rdfa11/0277.out, tests/rdfa11/0278.out, tests/rdfa11/0279.out, tests/rdfa11/0280.out, tests/rdfa11/0281.out, tests/rdfa11/0282.out, tests/rdfa11/0283.out, tests/rdfa11/0284.out, tests/rdfa11/0285.out, tests/rdfa11/0286.out, tests/rdfa11/0287.out: Fixed expected output bnode subject to be test URI * tests/rdfa11/0188.out, tests/rdfa11/0189.out: Add usesVocabulary triple which comes from @vocab - why!? * tests/rdfa11/0186.out: Add usesVocabulary triple which comes from @vocab - why!? * src/Makefile.am: Add librdfa/namespace.c * librdfa/rdfa.c: Let rdfa_update_uri_mappings() handle RDFa namespace starting. * librdfa/Makefile.am, librdfa/namespace.c: Add namespace.c * librdfa/rdfa.c: Handle @lang tag for raptor * tests/rdfa11/0180.out: Expect 1 triple * tests/rdfa11/0173.out: just 1 triple with a plain literal * tests/rdfa11/Makefile.am: 58 failures * librdfa/rdfa.c: (start_element): Do not abort @prefix handling too early * tests/rdfa11/Makefile.am: 0176 passes * tests/rdfa11/0176.out: Use exact expected output for quick cmp * tests/rdfa11/Makefile.am: Use cmp as a quicker test before doing an rdfdiff * tests/rdfa11/0107.out, tests/rdfa11/0122.out, tests/rdfa11/0140.out, tests/rdfa11/0180.out, tests/rdfa11/0235.out, tests/rdfa11/0258.out: Add expect 0 triples files * tests/rdfa11/0295.out: 0295 expected output * tests/rdfa11/Makefile.am: comments * configure.ac, tests/Makefile.am, tests/rdfa11/0001.out, tests/rdfa11/0001.xml, tests/rdfa11/0006.out, tests/rdfa11/0006.xml, tests/rdfa11/0007.out, tests/rdfa11/0007.xml, tests/rdfa11/0008.out, tests/rdfa11/0008.xml, tests/rdfa11/0009.out, tests/rdfa11/0009.xml, tests/rdfa11/0010.out, tests/rdfa11/0010.xml, tests/rdfa11/0012.out, tests/rdfa11/0012.xml, tests/rdfa11/0013.out, tests/rdfa11/0013.xml, tests/rdfa11/0014.out, tests/rdfa11/0014.xml, tests/rdfa11/0015.out, tests/rdfa11/0015.xml, tests/rdfa11/0017.out, tests/rdfa11/0017.xml, tests/rdfa11/0018.out, tests/rdfa11/0018.xml, tests/rdfa11/0019.out, tests/rdfa11/0019.xml, tests/rdfa11/0020.out, tests/rdfa11/0020.xml, tests/rdfa11/0021.out, tests/rdfa11/0021.xml, tests/rdfa11/0023.out, tests/rdfa11/0023.xml, tests/rdfa11/0025.out, tests/rdfa11/0025.xml, tests/rdfa11/0026.out, tests/rdfa11/0026.xml, tests/rdfa11/0027.out, tests/rdfa11/0027.xml, tests/rdfa11/0029.out, tests/rdfa11/0029.xml, tests/rdfa11/0030.out, tests/rdfa11/0030.xml, tests/rdfa11/0031.out, tests/rdfa11/0031.xml, tests/rdfa11/0032.out, tests/rdfa11/0032.xml, tests/rdfa11/0033.out, tests/rdfa11/0033.xml, tests/rdfa11/0034.out, tests/rdfa11/0034.xml, tests/rdfa11/0035.out, tests/rdfa11/0035.xml, tests/rdfa11/0036.out, tests/rdfa11/0036.xml, tests/rdfa11/0037.out, tests/rdfa11/0037.xml, tests/rdfa11/0038.out, tests/rdfa11/0038.xml, tests/rdfa11/0039.out, tests/rdfa11/0039.xml, tests/rdfa11/0041.out, tests/rdfa11/0041.xml, tests/rdfa11/0048.out, tests/rdfa11/0048.xml, tests/rdfa11/0049.out, tests/rdfa11/0049.xml, tests/rdfa11/0050.out, tests/rdfa11/0050.xml, tests/rdfa11/0051.out, tests/rdfa11/0051.xml, tests/rdfa11/0052.out, tests/rdfa11/0052.xml, tests/rdfa11/0053.out, tests/rdfa11/0053.xml, tests/rdfa11/0054.out, tests/rdfa11/0054.xml, tests/rdfa11/0055.out, tests/rdfa11/0055.xml, tests/rdfa11/0056.out, tests/rdfa11/0056.xml, tests/rdfa11/0057.out, tests/rdfa11/0057.xml, tests/rdfa11/0059.out, tests/rdfa11/0059.xml, tests/rdfa11/0060.out, tests/rdfa11/0060.xml, tests/rdfa11/0061.out, tests/rdfa11/0061.xml, tests/rdfa11/0062.out, tests/rdfa11/0062.xml, tests/rdfa11/0063.out, tests/rdfa11/0063.xml, tests/rdfa11/0064.out, tests/rdfa11/0064.xml, tests/rdfa11/0065.out, tests/rdfa11/0065.xml, tests/rdfa11/0066.out, tests/rdfa11/0066.xml, tests/rdfa11/0067.out, tests/rdfa11/0067.xml, tests/rdfa11/0068.out, tests/rdfa11/0068.xml, tests/rdfa11/0069.out, tests/rdfa11/0069.xml, tests/rdfa11/0070.out, tests/rdfa11/0070.xml, tests/rdfa11/0071.out, tests/rdfa11/0071.xml, tests/rdfa11/0072.out, tests/rdfa11/0072.xml, tests/rdfa11/0073.out, tests/rdfa11/0073.xml, tests/rdfa11/0074.out, tests/rdfa11/0074.xml, tests/rdfa11/0075.out, tests/rdfa11/0075.xml, tests/rdfa11/0076.out, tests/rdfa11/0076.xml, tests/rdfa11/0077.out, tests/rdfa11/0077.xml, tests/rdfa11/0079.out, tests/rdfa11/0079.xml, tests/rdfa11/0080.out, tests/rdfa11/0080.xml, tests/rdfa11/0083.out, tests/rdfa11/0083.xml, tests/rdfa11/0084.out, tests/rdfa11/0084.xml, tests/rdfa11/0085.out, tests/rdfa11/0085.xml, tests/rdfa11/0087.out, tests/rdfa11/0087.xml, tests/rdfa11/0088.out, tests/rdfa11/0088.xml, tests/rdfa11/0089.out, tests/rdfa11/0089.xml, tests/rdfa11/0091.out, tests/rdfa11/0091.xml, tests/rdfa11/0093.out, tests/rdfa11/0093.xml, tests/rdfa11/0099.out, tests/rdfa11/0099.xml, tests/rdfa11/0104.out, tests/rdfa11/0104.xml, tests/rdfa11/0106.out, tests/rdfa11/0106.xml, tests/rdfa11/0107.xml, tests/rdfa11/0108.out, tests/rdfa11/0108.xml, tests/rdfa11/0109.out, tests/rdfa11/0109.xml, tests/rdfa11/0110.out, tests/rdfa11/0110.xml, tests/rdfa11/0111.out, tests/rdfa11/0111.xml, tests/rdfa11/0112.out, tests/rdfa11/0112.xml, tests/rdfa11/0113.out, tests/rdfa11/0113.xml, tests/rdfa11/0114.out, tests/rdfa11/0114.xml, tests/rdfa11/0115.out, tests/rdfa11/0115.xml, tests/rdfa11/0117.out, tests/rdfa11/0117.xml, tests/rdfa11/0118.out, tests/rdfa11/0118.xml, tests/rdfa11/0119.out, tests/rdfa11/0119.xml, tests/rdfa11/0120.out, tests/rdfa11/0120.xml, tests/rdfa11/0121.out, tests/rdfa11/0121.xml, tests/rdfa11/0122.xml, tests/rdfa11/0126.out, tests/rdfa11/0126.xml, tests/rdfa11/0131.out, tests/rdfa11/0131.xml, tests/rdfa11/0134.out, tests/rdfa11/0134.xml, tests/rdfa11/0140.xml, tests/rdfa11/0147.out, tests/rdfa11/0147.xml, tests/rdfa11/0172.out, tests/rdfa11/0172.xml, tests/rdfa11/0173.out, tests/rdfa11/0173.xml, tests/rdfa11/0174.out, tests/rdfa11/0174.xml, tests/rdfa11/0175.out, tests/rdfa11/0175.xml, tests/rdfa11/0176.out, tests/rdfa11/0176.xml, tests/rdfa11/0177.out, tests/rdfa11/0177.xml, tests/rdfa11/0178.out, tests/rdfa11/0178.xml, tests/rdfa11/0179.out, tests/rdfa11/0179.xml, tests/rdfa11/0180.xml, tests/rdfa11/0181.out, tests/rdfa11/0181.xml, tests/rdfa11/0182.out, tests/rdfa11/0182.xml, tests/rdfa11/0183.out, tests/rdfa11/0183.xml, tests/rdfa11/0186.out, tests/rdfa11/0186.xml, tests/rdfa11/0187.out, tests/rdfa11/0187.xml, tests/rdfa11/0188.out, tests/rdfa11/0188.xml, tests/rdfa11/0189.out, tests/rdfa11/0189.xml, tests/rdfa11/0190.out, tests/rdfa11/0190.xml, tests/rdfa11/0196.out, tests/rdfa11/0196.xml, tests/rdfa11/0197.out, tests/rdfa11/0197.xml, tests/rdfa11/0198.out, tests/rdfa11/0198.xml, tests/rdfa11/0201.out, tests/rdfa11/0201.xml, tests/rdfa11/0202.out, tests/rdfa11/0202.xml, tests/rdfa11/0203.out, tests/rdfa11/0203.xml, tests/rdfa11/0206.out, tests/rdfa11/0206.xml, tests/rdfa11/0207.out, tests/rdfa11/0207.xml, tests/rdfa11/0213.out, tests/rdfa11/0213.xml, tests/rdfa11/0214.out, tests/rdfa11/0214.xml, tests/rdfa11/0216.out, tests/rdfa11/0216.xml, tests/rdfa11/0217.out, tests/rdfa11/0217.xml, tests/rdfa11/0218.out, tests/rdfa11/0218.xml, tests/rdfa11/0219.out, tests/rdfa11/0219.xml, tests/rdfa11/0220.out, tests/rdfa11/0220.xml, tests/rdfa11/0221.out, tests/rdfa11/0221.xml, tests/rdfa11/0222.out, tests/rdfa11/0222.xml, tests/rdfa11/0223.out, tests/rdfa11/0223.xml, tests/rdfa11/0224.out, tests/rdfa11/0224.xml, tests/rdfa11/0225.out, tests/rdfa11/0225.xml, tests/rdfa11/0226.out, tests/rdfa11/0226.xml, tests/rdfa11/0227.out, tests/rdfa11/0227.xml, tests/rdfa11/0228.out, tests/rdfa11/0228.xml, tests/rdfa11/0229.out, tests/rdfa11/0229.xml, tests/rdfa11/0230.out, tests/rdfa11/0230.xml, tests/rdfa11/0231.out, tests/rdfa11/0231.xml, tests/rdfa11/0232.out, tests/rdfa11/0232.xml, tests/rdfa11/0233.out, tests/rdfa11/0233.xml, tests/rdfa11/0234.out, tests/rdfa11/0234.xml, tests/rdfa11/0235.xml, tests/rdfa11/0236.out, tests/rdfa11/0236.xml, tests/rdfa11/0237.out, tests/rdfa11/0237.xml, tests/rdfa11/0238.out, tests/rdfa11/0238.xml, tests/rdfa11/0239.out, tests/rdfa11/0239.xml, tests/rdfa11/0246.out, tests/rdfa11/0246.xml, tests/rdfa11/0247.out, tests/rdfa11/0247.xml, tests/rdfa11/0248.out, tests/rdfa11/0248.xml, tests/rdfa11/0249.out, tests/rdfa11/0249.xml, tests/rdfa11/0250.out, tests/rdfa11/0250.xml, tests/rdfa11/0251.out, tests/rdfa11/0251.xml, tests/rdfa11/0252.out, tests/rdfa11/0252.xml, tests/rdfa11/0253.out, tests/rdfa11/0253.xml, tests/rdfa11/0254.out, tests/rdfa11/0254.xml, tests/rdfa11/0255.out, tests/rdfa11/0255.xml, tests/rdfa11/0256.out, tests/rdfa11/0256.xml, tests/rdfa11/0257.out, tests/rdfa11/0257.xml, tests/rdfa11/0258.xml, tests/rdfa11/0259.out, tests/rdfa11/0259.xml, tests/rdfa11/0260.out, tests/rdfa11/0260.xml, tests/rdfa11/0261.out, tests/rdfa11/0261.xml, tests/rdfa11/0262.out, tests/rdfa11/0262.xml, tests/rdfa11/0263.out, tests/rdfa11/0263.xml, tests/rdfa11/0264.out, tests/rdfa11/0264.xml, tests/rdfa11/0265.out, tests/rdfa11/0265.xml, tests/rdfa11/0266.out, tests/rdfa11/0266.xml, tests/rdfa11/0267.out, tests/rdfa11/0267.xml, tests/rdfa11/0268.out, tests/rdfa11/0268.xml, tests/rdfa11/0269.out, tests/rdfa11/0269.xml, tests/rdfa11/0271.out, tests/rdfa11/0271.xml, tests/rdfa11/0272.out, tests/rdfa11/0272.xml, tests/rdfa11/0273.out, tests/rdfa11/0273.xml, tests/rdfa11/0274.out, tests/rdfa11/0274.xml, tests/rdfa11/0275.out, tests/rdfa11/0275.xml, tests/rdfa11/0276.out, tests/rdfa11/0276.xml, tests/rdfa11/0277.out, tests/rdfa11/0277.xml, tests/rdfa11/0278.out, tests/rdfa11/0278.xml, tests/rdfa11/0279.out, tests/rdfa11/0279.xml, tests/rdfa11/0280.out, tests/rdfa11/0280.xml, tests/rdfa11/0281.out, tests/rdfa11/0281.xml, tests/rdfa11/0282.out, tests/rdfa11/0282.xml, tests/rdfa11/0283.out, tests/rdfa11/0283.xml, tests/rdfa11/0284.out, tests/rdfa11/0284.xml, tests/rdfa11/0285.out, tests/rdfa11/0285.xml, tests/rdfa11/0286.out, tests/rdfa11/0286.xml, tests/rdfa11/0287.out, tests/rdfa11/0287.xml, tests/rdfa11/0289.out, tests/rdfa11/0289.xml, tests/rdfa11/0290.out, tests/rdfa11/0290.xml, tests/rdfa11/0291.out, tests/rdfa11/0291.xml, tests/rdfa11/0292.out, tests/rdfa11/0292.xml, tests/rdfa11/0293.out, tests/rdfa11/0293.xml, tests/rdfa11/0295.xml, tests/rdfa11/0296.out, tests/rdfa11/0296.xml, tests/rdfa11/0297.out, tests/rdfa11/0297.xml, tests/rdfa11/0298.out, tests/rdfa11/0298.xml, tests/rdfa11/0299.out, tests/rdfa11/0299.xml, tests/rdfa11/0300.out, tests/rdfa11/0300.xml, tests/rdfa11/0301.out, tests/rdfa11/0301.xml, tests/rdfa11/0302.out, tests/rdfa11/0302.xml, tests/rdfa11/0303.out, tests/rdfa11/0303.xml, tests/rdfa11/0304.out, tests/rdfa11/0304.xml, tests/rdfa11/Makefile.am: Add RDFa 1.1 tests and expected failures * librdfa/rdfa.c: Crash fix for @prefix (start_element): Do not crash if strtok_r returns NULL during walk through @prefix. Instead, abort attribute prefix search This makes RDFA 1.0 test 0209 work for me * src/raptor_librdfa.c: Default for parser 'rdfa' is whatever librdfa does by default * librdfa/lists.c: Removed assignment of never-read 'triple' variable [clang] * src/turtle_lexer.l: Make failure to convert Turtle qname log as level error not fatal 2012-06-08 Dave Beckett * Makefile.am: Restore README and NEWS building for building from GIT * RELEASE.html: 2.0.8 * ChangeLog, ChangeLog.12, Makefile.am: Added ChangeLog.12 for 2011 * docs/tmpl/section-uri.sgml: Updated uri tmpl * src/snprintf.c: Prototypes for test functions to remove GCC format warnings * src/Makefile.am, src/snprintf.c: Add snprintf module simple unit tests * configure.ac: Set CPPFLAGS temporarily before libxml and libxslt tests * configure.ac: Make stripping -O flags (for maintainer) work unless --enable-release * configure.ac: --enable-debug no longer adds -g to CFLAGS 2012-06-07 Dave Beckett * src/turtle_lexer.l, src/turtle_parser.y: Remove fatal errors when a Turtle qname cannot be found (turtle_lexer_error): Renamed from turtle_lexer_fatal_error and takes a log level and now is in varargs format. {QNAME}: Call turtle_lexer_error with a regular error log level and provide user level information on the qname that failed. Updated other calls to turtle_lexer_fatal error. (turtle_syntax_error): Call raptor_parser_log_error_varargs(). Fixes Issue#0000507 http://bugs.librdf.org/mantis/view.php?id=507 * src/raptor_grddl.c, src/raptor_internal.h, src/raptor_parse.c: Pass in log level to parser error helper (raptor_parser_log_error_varargs): Renamed from raptor_parser_error_varargs and pass on log level to raptor_log_error_varargs * librdfa/Makefile.am, librdfa/config.h: Add librdfa config.h to dist * src/raptor_term.c: (raptor_new_term_from_literal): Bad cast for language len truncation. * utils/Makefile.am: Improve building of rdfdiff Declare rdfdiff as noinst_PROGRAMS instead of EXTRA_PROGRAMS, so that it's always built (but not installed) There is no need to mention rdfdiff in CLEANFILES, as Automake already knows to clean it * tests/grddl/Makefile.am, tests/json/Makefile.am, tests/ntriples/Makefile.am, tests/rdfa/Makefile.am, tests/rdfxml/Makefile.am, tests/trig/Makefile.am, tests/turtle/Makefile.am: Fixes for out of tree testing Place the path to rapper in a variable RAPPER that can be overridden by the user and ensure all instances have a $(EXEEXT) suffix. Use $(RAPPER) instead of the path to same in target bodies. Place the path to rdfdiff in a variable RDFDIFF that can be overridden by the user. Use $(RDFDIFF) instead of the path to same in target bodies * tests/feeds/Makefile.am: Fixes for feeds testing for out of tree builds and portability Do not use a variable containing a list of filenames both in a target's dependencies and in the target body, at least outside of maintainer mode. Make on Solaris 8 has a funny idea of how to implement VPATH; it modifies the value of the variable by prefixing the srcdir path to each filename therein, and this breaks our rule code. Remove the use of $? as this is not well-supported outside of GNU Make and the semantics of it are not needed or wanted. Adjust check-validate-atom target to look for input fields in either builddir or srcdir since some are generated and some are source. * tests/feeds/Makefile.am: TRANG in a variable and add docs ptr * src/Makefile.am: Fixes for out of tree builds of library Declare the turtle lex/yacc sources as BUILT_SOURCES, to take advantage of Automake semantics for these. Remove LEX and YACC variables, as these are already handled automagically. Replaced all instances of $(srcdir)/.. with $(top_srcdir) Added some guard logic to the turtle_lexer.c rule so that it doesn't erroneously generate the target file. Added dummy turtle_lexer.h and turtle_parser.h rules to satisfy dependencies Fixed a typo in the raptor_parse_test rule * docs/Makefile.am: Fixes for out of tree builds of docs Removed $(builddir)/ from target files since that is where they already are. raptor2.h is a file generated by config.status, so it always lives in $(builddir), not $(srcdir) Replaced all instances of $(srcdir)/.. with $(top_srcdir) Added "dist-hook-local: docs" so that the docs are generated during a "make dist" if they haven't been generated already (otherwise "make dist" fails when they can't be found) * configure.ac: Quote testing $use_memory_signing * configure.ac: Make all AC_ARG_WITH(blah) options handle --without-blah correctly Now these forms can be used --with-foo - enable feature --without-foo - disable feature --with-foo=blah - enable and give a value --with-foo= - (default action) enable and search for value (not given) - (default action) enable and search for value for --with-xml2-config, --with-xslt-config, --with-curl-config, --with-icu-config and --with-libwww-config where 'no' can be used to disable it and prevent automatic searches for the config script in the PATH. * configure.ac: Fix some configure portability issues Fixed a typo in the STRCASECMP conditional Set CPPFLAGS whether or not the check for xsltSaveResultToString succeeds, because AC_CHECK_HEADERS() depends on this and the result of the header check should not depend on the result of the lib check. Put -DRAPTOR_DEBUG and -DMAINTAINER_MODE into the config header instead of CPPFLAGS. This prevents the flags from potentially being passed to "make distcheck" builds, where they can cause trouble (e.g. absence of git-version.h header) Removed -g from maintainer CPPFLAGS since it does not belong there and add to CFLAGS when --enable-debug is given. * Makefile.am: Fix README and NEWS building - only for maintainer Generate NEWS in $(srcdir) as automake won't look for it in $(builddir) Remove not needed dist-hook target since README and NEWS are copied in by the standard 'make dist' mechanism. * autogen.sh: Support NOCONFIGURE variable, like Lib{XML2,XSLT} 2012-06-06 Dave Beckett * src/snprintf.c: Portability improvements to vsnprintf code and macros (vsnprintf_check_is_c99): Initialize len to -1 when the variable is declared instead of in the macro to remove redundancy. (vsnprintf_is_c99): Check that len < size before looking at tmp_buffer[len] otherwise we may be looking past the buffer size. (macro VSNPRINTF_NOT_C99_BLOCK): free tmp_buffer when breaking out of the while(1) loop. set len to a non-negative value in the buffer != NULL case (raptor_vsnprintf2): Initialize len to -1 here instead of in the VSNPRINTF_NOT_C99_BLOCK() macro. Return -1 if format is NULL. (raptor_vasprintf): Copy var args to re-use them when calling raptor_vsnprintf2() * configure.ac: Make configure vsnprintf() check more comprehensive - Test program also needs and (now) - Declare is_c99() function as static to avoid "no previous declaration" warning from GCC's -Wmissing-declarations - Improved test to invoke vsnprintf(NULL, 0, ...) because on Solaris 8, the function returns -1 in this case but works normally otherwise - Declare main(void) instead of main(int argc, char* argv) to avoid "unused parameter" warnings - Make test program return 0 if the test is successful, as otherwise a false-positive result is possible (note that AC_TRY_RUN() interprets failure to compile/link the program, etc. the same as a non-zero program exit status) - Make the test program return an exit status indicative of the failure mode: 1 = non-NULL case fails, 10 = NULL case fails, 11 = both fail - Use proper m4 quoting in modified code * src/turtle_common.h: struct raptor_turtle_parser_s: trig field is now int (compiler bugs) * src/parsedate.y: Include raptor headers here for CAST macros 2012-05-23 Dave Beckett * librdfa/rdfa.c: (start_element): Start a raptor namespace for RDFa 1.1 @prefix 2012-05-23 Lauri Aalto * src/snprintf.c: (raptor_vsnprintf2): Fix uninitialized variable problems in non-c99 variant. Thanks to John Emmas for reporting. - Compute len internally using int, not size_t as standard vsnprintf() returns ints anyway. This fixes for negative value comparison. Cast from size_t to int required for strlen() return value. - Initialize len earlier - Use passed in size if a buffer is given 2012-05-22 Dave Beckett * configure.ac: Use #ifdef in parsedate code fragment 2012-05-21 Dave Beckett * src/win32_raptor_config.h.in: win32 config RAPTOR_VERSION_DECIMAL renamed from RAPTOR_VERSION * src/turtle_parser.y: (main): Store fread result in a size_t * utils/rdfdiff.c: Fixed reference leak of blank->owner * utils/rdfdiff.c: Add raptor internal macros when building without RAPTOR_INTERNAL * utils/rapper.c, utils/rdfdiff.c: Need on Windows for _access() * src/turtle_lexer.l: Removed const qualifier from turtle_lexer_oom_text[] Fixes warning when passed as a non-const function argument * src/turtle_parser.y: (turtle_parse): Added casts to quell type-compatibility warnings * src/strcasecmp.c: Removed needless #include and main() prototype (assert_strcasecmp): Test raptor_strcasecmp(), not whatever strcasecmp() resolves to * src/raptor_xml.c: Changed quote to a char for better type compatibility * src/raptor_uri.c: URI test build fixes Removed redundant WIN32_URI_TEST construct Added STANDALONE cpp conditional around library functions * src/raptor_term.c: (raptor_new_term_from_literal): size_t and char casts. * src/raptor_serialize_rss.c: Fix reference leaks for rss tag soup parser. (raptor_rss10_emit_rdfxml_item_triples): Don't make a copy of base_uri to pass to raptor_serializer_start_to_iostream(), because this function already makes its own copy (raptor_rss10_ensure_atom_feed_valid): Use time() instead of gettimeofday() with struct timeval when HAVE_GETTIMEOFDAY is not defined. (raptor_rss10_emit_item): Moved the "atom:summary" short-circuit up to prevent a potential memory leak ("predicate") (raptor_rss10_serialize_end): Don't leak entry_uri * src/raptor_rdfxml.c: Fixed some rdfxml parser memory leaks / double frees (raptor_rdfxml_start_element_grammar): Fixed a memory leak (raptor_rdfxml_end_element_grammar): Fixed a double-free() by setting a pointer to NULL * src/raptor_rdfxml.c: Broaden range of RDF/XML entity recognizing heuristic (raptor_rdfxml_parse_recognise_syntax): Removed angle brackets from the HAS_RDF_ENTITY* strings to allow recognition of documents produced by Stanford's Protege software (and possibly others) * src/raptor_rdfxml.c: (raptor_rdfxml_parse_terminate): Fixed leaks when freeing rdf_xml_parser * src/raptor_log.c: Guard against a buffer underrun * src/raptor_iostream.c: Change raptor_iostream offset type to size_t (raptor_iostream_tell): Cast it (BAD) to "unsigned long" here. FIXME: Needs a new iostream API method that returns the full offset as a size_t * src/raptor_internal.h: Quell cpp warnings for undefined symbols * src/raptor_general.c: Use RAPTOR_VERSION_STRING for raptor_version_string * src/parsedate.y: Quell cpp warnings for undefined symbols (LookupWord): Use a cast to assign a size_t to an int 2012-05-17 Dave Beckett * tests/rdfa/0304.out, tests/rdfa/0304.xml, tests/rdfa/Makefile.am: Add approved test 0304 (SVG) - failing * tests/rdfa/Makefile.am: 0294.xml now passes * librdfa/curie.c: Do not match the 'xml' prefix in raptor * tests/rdfa/Makefile.am: Remove unused unapproved test framework * utils/rapper.1: typo 2012-05-16 Dave Beckett * librdfa/config.h, librdfa/context.c, librdfa/curie.c, librdfa/iri.c, librdfa/language.c, librdfa/lists.c, librdfa/rdfa.c, librdfa/rdfa.h, librdfa/rdfa_utils.c, librdfa/rdfa_utils.h, librdfa/strtok_r.c, librdfa/strtok_r.h, librdfa/subject.c, librdfa/triple.c, src/Makefile.am, src/raptor_internal.h, src/raptor_librdfa.c, tests/rdfa/Makefile.am: Update librdfa in raptor to latest GIT and make it work for RDFa 1.0 Add RDFa parser version aliases rdfa10, rdfa11 and default to 1.1 Existing RDFa 1.0 tests pass ONLY IF RDFa 1.0 is forced with -i rdfa10 * tests/ntriples/bug-481.out: Add surrogate chars to bug 481 output * tests/turtle/Makefile.am, tests/turtle/bad-15.ttl, tests/turtle/bad-16.ttl: Add (currently) bad turtle forms of bnode subjects * tests/turtle/Makefile.am, tests/turtle/test-38.out, tests/turtle/test-38.ttl: Turtle test 38 for reading/writing UTF-16 surrogates Test for Issue #0000505 http://bugs.librdf.org/mantis/view.php?id=505 * src/turtle_lexer.l: Do not report double errors for Turtle string decoding problems. * src/ntriples_parse.c, src/raptor_nfc_test.c, src/turtle_common.c: Handle errors from raptor_unicode_utf8_string_put_char (raptor_stringbuffer_append_turtle_string) (raptor_string_python_write, raptor_ntriples_term): Store result in int and only use it if positive. Part of fix for Issue #0000505 http://bugs.librdf.org/mantis/view.php?id=505 * src/raptor_unicode.c: Allow reading/writing U+D800 to U+DFFF (UTF-16 surrogates) (raptor_unicode_utf8_string_put_char) (raptor_unicode_utf8_string_get_char): Should be ok to pass through. Leaving the BOMs as forbidden - definitely not UTF-8 Part of fix for Issue #0000505 http://bugs.librdf.org/mantis/view.php?id=505 * tests/rdfa/0001.out, tests/rdfa/0001.xhtml, tests/rdfa/0001.xml, tests/rdfa/0006.out, tests/rdfa/0006.xhtml, tests/rdfa/0006.xml, tests/rdfa/0007.out, tests/rdfa/0007.xhtml, tests/rdfa/0007.xml, tests/rdfa/0008.out, tests/rdfa/0008.xhtml, tests/rdfa/0008.xml, tests/rdfa/0009.xhtml, tests/rdfa/0009.xml, tests/rdfa/0010.xhtml, tests/rdfa/0010.xml, tests/rdfa/0011.out, tests/rdfa/0011.xhtml, tests/rdfa/0012.xhtml, tests/rdfa/0012.xml, tests/rdfa/0013.xhtml, tests/rdfa/0013.xml, tests/rdfa/0014.xhtml, tests/rdfa/0014.xml, tests/rdfa/0015.out, tests/rdfa/0015.xhtml, tests/rdfa/0015.xml, tests/rdfa/0017.xhtml, tests/rdfa/0017.xml, tests/rdfa/0018.out, tests/rdfa/0018.xhtml, tests/rdfa/0018.xml, tests/rdfa/0019.xhtml, tests/rdfa/0019.xml, tests/rdfa/0020.out, tests/rdfa/0020.xhtml, tests/rdfa/0020.xml, tests/rdfa/0021.out, tests/rdfa/0021.xhtml, tests/rdfa/0021.xml, tests/rdfa/0023.out, tests/rdfa/0023.xhtml, tests/rdfa/0023.xml, tests/rdfa/0025.out, tests/rdfa/0025.xhtml, tests/rdfa/0025.xml, tests/rdfa/0026.xhtml, tests/rdfa/0026.xml, tests/rdfa/0027.xhtml, tests/rdfa/0027.xml, tests/rdfa/0029.xhtml, tests/rdfa/0029.xml, tests/rdfa/0030.out, tests/rdfa/0030.xhtml, tests/rdfa/0030.xml, tests/rdfa/0031.out, tests/rdfa/0031.xhtml, tests/rdfa/0031.xml, tests/rdfa/0032.out, tests/rdfa/0032.xhtml, tests/rdfa/0032.xml, tests/rdfa/0033.out, tests/rdfa/0033.xhtml, tests/rdfa/0033.xml, tests/rdfa/0034.xhtml, tests/rdfa/0034.xml, tests/rdfa/0035.xhtml, tests/rdfa/0035.xml, tests/rdfa/0036.xhtml, tests/rdfa/0036.xml, tests/rdfa/0037.xhtml, tests/rdfa/0037.xml, tests/rdfa/0038.xhtml, tests/rdfa/0038.xml, tests/rdfa/0039.xhtml, tests/rdfa/0039.xml, tests/rdfa/0040.xhtml, tests/rdfa/0040.xml, tests/rdfa/0041.xhtml, tests/rdfa/0041.xml, tests/rdfa/0042.xhtml, tests/rdfa/0042.xml, tests/rdfa/0046.xhtml, tests/rdfa/0046.xml, tests/rdfa/0047.xhtml, tests/rdfa/0047.xml, tests/rdfa/0048.xhtml, tests/rdfa/0048.xml, tests/rdfa/0049.xhtml, tests/rdfa/0049.xml, tests/rdfa/0050.xhtml, tests/rdfa/0050.xml, tests/rdfa/0051.out, tests/rdfa/0051.xhtml, tests/rdfa/0051.xml, tests/rdfa/0052.xhtml, tests/rdfa/0052.xml, tests/rdfa/0053.xhtml, tests/rdfa/0053.xml, tests/rdfa/0054.out, tests/rdfa/0054.xhtml, tests/rdfa/0054.xml, tests/rdfa/0055.out, tests/rdfa/0055.xhtml, tests/rdfa/0055.xml, tests/rdfa/0056.xhtml, tests/rdfa/0056.xml, tests/rdfa/0057.xhtml, tests/rdfa/0057.xml, tests/rdfa/0058.xhtml, tests/rdfa/0058.xml, tests/rdfa/0059.out, tests/rdfa/0059.xhtml, tests/rdfa/0059.xml, tests/rdfa/0060.xhtml, tests/rdfa/0060.xml, tests/rdfa/0061.out, tests/rdfa/0061.xhtml, tests/rdfa/0061.xml, tests/rdfa/0062.out, tests/rdfa/0062.xhtml, tests/rdfa/0062.xml, tests/rdfa/0063.out, tests/rdfa/0063.xhtml, tests/rdfa/0063.xml, tests/rdfa/0064.out, tests/rdfa/0064.xhtml, tests/rdfa/0064.xml, tests/rdfa/0065.out, tests/rdfa/0065.xhtml, tests/rdfa/0065.xml, tests/rdfa/0066.out, tests/rdfa/0066.xhtml, tests/rdfa/0066.xml, tests/rdfa/0067.out, tests/rdfa/0067.xhtml, tests/rdfa/0067.xml, tests/rdfa/0068.out, tests/rdfa/0068.xhtml, tests/rdfa/0068.xml, tests/rdfa/0069.out, tests/rdfa/0069.xhtml, tests/rdfa/0069.xml, tests/rdfa/0070.out, tests/rdfa/0070.xhtml, tests/rdfa/0070.xml, tests/rdfa/0071.out, tests/rdfa/0071.xhtml, tests/rdfa/0071.xml, tests/rdfa/0072.xhtml, tests/rdfa/0072.xml, tests/rdfa/0073.xhtml, tests/rdfa/0073.xml, tests/rdfa/0074.xhtml, tests/rdfa/0074.xml, tests/rdfa/0075.xhtml, tests/rdfa/0075.xml, tests/rdfa/0076.out, tests/rdfa/0076.xhtml, tests/rdfa/0076.xml, tests/rdfa/0077.out, tests/rdfa/0077.xhtml, tests/rdfa/0077.xml, tests/rdfa/0078.out, tests/rdfa/0078.xhtml, tests/rdfa/0078.xml, tests/rdfa/0079.xhtml, tests/rdfa/0079.xml, tests/rdfa/0080.xhtml, tests/rdfa/0080.xml, tests/rdfa/0081.xhtml, tests/rdfa/0081.xml, tests/rdfa/0082.xhtml, tests/rdfa/0082.xml, tests/rdfa/0083.xhtml, tests/rdfa/0083.xml, tests/rdfa/0084.xhtml, tests/rdfa/0084.xml, tests/rdfa/0085.xhtml, tests/rdfa/0085.xml, tests/rdfa/0086.out, tests/rdfa/0086.xhtml, tests/rdfa/0087.out, tests/rdfa/0087.xhtml, tests/rdfa/0087.xml, tests/rdfa/0088.xhtml, tests/rdfa/0088.xml, tests/rdfa/0089.xhtml, tests/rdfa/0089.xml, tests/rdfa/0090.xhtml, tests/rdfa/0090.xml, tests/rdfa/0091.out, tests/rdfa/0091.xhtml, tests/rdfa/0091.xml, tests/rdfa/0092.out, tests/rdfa/0092.xhtml, tests/rdfa/0093.out, tests/rdfa/0093.xhtml, tests/rdfa/0093.xml, tests/rdfa/0094.out, tests/rdfa/0094.xhtml, tests/rdfa/0099.xhtml, tests/rdfa/0099.xml, tests/rdfa/0100.out, tests/rdfa/0100.xhtml, tests/rdfa/0101.out, tests/rdfa/0101.xhtml, tests/rdfa/0102.out, tests/rdfa/0102.xhtml, tests/rdfa/0103.out, tests/rdfa/0103.xhtml, tests/rdfa/0104.out, tests/rdfa/0104.xhtml, tests/rdfa/0104.xml, tests/rdfa/0105.out, tests/rdfa/0105.xhtml, tests/rdfa/0106.out, tests/rdfa/0106.xhtml, tests/rdfa/0106.xml, tests/rdfa/0107.xhtml, tests/rdfa/0107.xml, tests/rdfa/0108.xhtml, tests/rdfa/0108.xml, tests/rdfa/0109.out, tests/rdfa/0109.xhtml, tests/rdfa/0109.xml, tests/rdfa/0110.out, tests/rdfa/0110.xhtml, tests/rdfa/0110.xml, tests/rdfa/0111.out, tests/rdfa/0111.xhtml, tests/rdfa/0111.xml, tests/rdfa/0112.xhtml, tests/rdfa/0112.xml, tests/rdfa/0113.out, tests/rdfa/0113.xml, tests/rdfa/0114.out, tests/rdfa/0114.xml, tests/rdfa/0115.out, tests/rdfa/0115.xml, tests/rdfa/0117.out, tests/rdfa/0117.xml, tests/rdfa/0118.out, tests/rdfa/0118.xml, tests/rdfa/0119.out, tests/rdfa/0119.xml, tests/rdfa/0120.out, tests/rdfa/0120.xml, tests/rdfa/0121.out, tests/rdfa/0121.xml, tests/rdfa/0122.out, tests/rdfa/0122.xml, tests/rdfa/0126.out, tests/rdfa/0126.xml, tests/rdfa/0131.out, tests/rdfa/0131.xml, tests/rdfa/0134.out, tests/rdfa/0134.xml, tests/rdfa/0140.out, tests/rdfa/0140.xml, tests/rdfa/0147.out, tests/rdfa/0147.xml, tests/rdfa/0172.out, tests/rdfa/0172.xhtml, tests/rdfa/0172.xml, tests/rdfa/0173.out, tests/rdfa/0173.xhtml, tests/rdfa/0173.xml, tests/rdfa/0174.out, tests/rdfa/0174.xhtml, tests/rdfa/0174.xml, tests/rdfa/0181.out, tests/rdfa/0181.xml, tests/rdfa/0197.out, tests/rdfa/0197.xml, tests/rdfa/0201.out, tests/rdfa/0201.xml, tests/rdfa/0202.out, tests/rdfa/0202.xml, tests/rdfa/0203.out, tests/rdfa/0203.xml, tests/rdfa/0207.out, tests/rdfa/0207.xml, tests/rdfa/0209.out, tests/rdfa/0209.xml, tests/rdfa/0210.out, tests/rdfa/0210.xml, tests/rdfa/0211.out, tests/rdfa/0211.xml, tests/rdfa/0212.out, tests/rdfa/0212.xml, tests/rdfa/0215.out, tests/rdfa/0215.xml, tests/rdfa/0258.out, tests/rdfa/0258.xml, tests/rdfa/0262.out, tests/rdfa/0262.xml, tests/rdfa/0291.out, tests/rdfa/0291.xml, tests/rdfa/0292.out, tests/rdfa/0292.xml, tests/rdfa/0294.out, tests/rdfa/0294.xml, tests/rdfa/1001.out, tests/rdfa/1001.xhtml, tests/rdfa/Makefile.am: Update RDFa 1.0 tests - Rename test files to .xml so expected result urls are correct - Just approved tests - Turned sparql queries into expected triple output - Hand edited all negative tests to expect 0 triples - Removed duplicate xmlns from generated xml - 0201.xml 0202.xml 0203.xml are SVG not XHTML; altered expected output triples * librdfa/curie.c: (rdfa_resolve_uri): Pulled from newer RDFA git * librdfa/rdfa.c: (rdfa_init_base): Calculate buffer expansion correctly Pulled from newer RDFA git * tests/rdfa/Makefile.am: check-rdfa: Allow rapper result warning (status 2) as success * src/raptor_librdfa.c: Do not generate blank node predicate RDFa triples (raptor_librdfa_generate_statement): Return warning instead of generating blank node predicate RDFa triples. Maybe should be silent? * configure.ac: Add strtok_r check for upcoming librdfa RDFA 1.1 2012-05-15 Dave Beckett * src/raptor_qname.c: doc 2012-05-14 Dave Beckett * src/raptor_libxml.c: (raptor_libxml_resolveEntity): Init entity_input [clang] 2012-04-13 Dave Beckett * src/raptor_www_curl.c: (raptor_www_curl_header_callback): Do not send CRNL to URI constructor. * src/raptor_www_curl.c: Interpret Content-Location header as absolute or relative URI (raptor_www_curl_header_callback): Use raptor_new_uri_relative_to_base_counted to construct URI relative to current base. * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_uri.c: (raptor_new_uri_relative_to_base_counted): Added 2012-03-30 Dave Beckett * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, docs/tmpl/section-triples.sgml, docs/tmpl/section-uri.sgml: Update api docs for turtle write fns * Merge pull request #3 from Anchakor/node_rw_turtle_string turtle uri and term writing/tostring functions 2012-03-29 Jiří Procházka * src/raptor2.h.in, src/raptor_serialize_turtle.c: (raptor_uri_to_turtle_counted_string, raptor_term_to_turtle_counted_string): add counted string versions. style and docs changes * Merge remote-tracking branch 'dajobe/master' into node_rw_turtle_string 2012-03-23 Dave Beckett * docs/raptor2-sections.txt, docs/tmpl/section-www.sgml: Add raptor_www_set_ssl_verify_option to docs - missing 's' in sections * RELEASE.html: RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES words 2012-03-22 Dave Beckett * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.8 * Snapshotted raptor2_2_0_7 for 2.0.7 release (GIT a676f235309a59d4aa78eeffd2574ae5d341fcb0) 2012-01-29 Dave Beckett * librdfa/rdfa.c, src/raptor2.h.in, src/raptor_libxml.c, src/raptor_option.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_turtle_writer.c: CVE-2012-0037 Enforce entity loading policy in raptor_libxml_resolveEntity and raptor_libxml_getEntity by checking for file URIs and network URIs. Add RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES / loadExternalEntities for turning on loading of XML external entity loading, disabled by default. This affects all the parsers that use SAX2: rdfxml, rdfa, rss-tag-soup (and aliases). 2012-03-15 Dave Beckett * librdfa/rdfa.c: Pass on options NO_NET and NO_FILE to RDFA SAX2 object 2012-03-11 Dave Beckett * src/raptor_general.c: (raptor_world_default_generate_bnodeid_handler): size_t for id_length. * src/snprintf.c: (raptor_format_integer): cast for comparing width to len * INSTALL.html, configure.ac, src/Makefile.am, src/raptor_internal.h, src/raptor_nfc.c, src/raptor_nfc.h, src/raptor_nfc_data.c, src/raptor_nfc_icu.c, src/raptor_rdfxml.c, src/raptor_unicode.c: Use ICU to check for Unicode NFC This commit removes the built-in Raptor code for checking that RDF/XML literals in Unicode NFC. This is now provided by the ICU library which is only linked in if configure is given the --with-icu-config=PATH argument. Advantages: 1. Removes a large compiled-in static dataset in the library and makes raptor smaller. 2. Uses a library that is kept up to date for new Unicode versions. 3. Should make RDF/XML parsing faster since it does not need to check for NFC on every literal. Disadvantages: 1. Removes an existing (but likely rarely used) feature * src/raptor_nfc_test.c: Run all tests, fix file decoding * src/raptor_nfc_test.c: size_t 2012-02-20 Dave Beckett * src/raptor_internal.h, src/snprintf.c: (raptor_format_integer): Return size_t for this internal function. 2012-02-17 Dave Beckett * docs/tmpl/section-option.sgml, docs/tmpl/section-sax2.sgml, docs/tmpl/section-uri.sgml: Update tmpls 2012-02-13 Lauri Aalto * autogen.sh: require automake 1.11.2+ for -Wextra-portability 2012-02-08 Dave Beckett * build/.gitignore, configure.ac: Add automake option -Wextra-portability and AM_PROG_AR to make it happy 2012-02-04 Dave Beckett * utils/rapper.c: Put raptor_option_get_count() out of the loops * src/raptor_parse.c: (raptor_new_parser): Set default strictness * docs/raptor2-sections.txt: docs * ChangeLog, RELEASE.html: 2.0.7 * src/raptor_option.c, src/raptor_parse.c, src/raptor_serialize.c, src/raptor_xml_writer.c: (raptor_object_options_init): Move default option settings here * RELEASE.html, docs/raptor-1-to-2-map.tsv, src/raptor2.h.in, src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c, src/raptor_turtle_writer.c, src/raptor_www.c, src/raptor_www_curl.c: Add options for controlling SSL certificate verifying Add options RAPTOR_OPTION_WWW_SSL_VERIFY_PEER for controlling verifying an SSL peer. Takes an integer value: non-0 to verify peer SSL certificate (default 1) Add option RAPTOR_OPTION_WWW_SSL_VERIFY_HOST for controlling verifying an SSL host. Takes an integer value: 0 none, 1 CN match, 2 host match (default). Other values are ignored. (raptor_www_set_ssl_verify_options): Added to set the verify options on the raptor_www object. Fixes Issue #0000469 http://bugs.librdf.org/mantis/view.php?id=469 * INSTALL.html, LICENSE.html, NEWS.html, README.html, RELEASE.html, TODO.html, UPGRADING.html: 2011 * configure.ac: tidy xml parser message * configure.ac, src/Makefile.am, src/raptor_expat.c, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_sax2.c: Remove expat support Update configure to properly let you build raptor without any XML support either - it only needs it if a parser that requires XML is configured. 2012-02-01 Dave Beckett * src/raptor_sax2.c: (raptor_sax2_check_load_uri_string): Failure returned * src/raptor_uri.c: casts * src/raptor_uri.c: (raptor_new_uri_from_uri_or_file_string): Never free uri_or_file_string * src/raptor_uri.c: Make raptor_new_uri_from_uri_or_file_string check for files first. (raptor_new_uri_from_uri_or_file_string): If the arg is a file that exists, use that as the path. * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_uri.c: (raptor_uri_filename_exists): Added 2012-02-01 Lauri Aalto * src/raptor_sax2.c: (raptor_sax2_parse_chunk): Return parse errors to caller. Fixes part of Issue #0000488 http://bugs.librdf.org/mantis/view.php?id=488 * src/raptor_json.c: (raptor_json_new_term_from_counted_string): RAPTOR_BAD_CAST for shortening size_t -> int cast * src/turtle_parser.y: (turtle_parse,raptor_turtle_parse_chunk): Return parse error status to caller Fixes Issue #0000488 http://bugs.librdf.org/mantis/view.php?id=488 2012-01-30 Dave Beckett * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_sax2.c, src/raptor_uri.c: More file URI updates (raptor_new_uri_from_uri_or_file_string): Added new constructor (raptor_uri_uri_string_to_counted_filename): Removed (raptor_sax2_check_load_uri_string): Use raptor_new_uri_from_uri_or_file_string() and just check for file: (raptor_uri_uri_string_is_file_uri): Just check for file: (raptor_uri_file_exists): Check if URI is a file URI and the file exists. * src/raptor_internal.h, src/raptor_sax2.c, utils/rapper.c: Consolidate URI policy checks and call SAX2 uri filter (raptor_sax2_check_load_uri_string): add and use for policy checks, making file URIs from canonical filename and calling URI filter callback on SAX2. rapper (rapper_uri_trace): Use trace word since it is not just processing 2012-01-29 Dave Beckett * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_internal.h, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c: (raptor_sax2_set_uri_filter): Added to filter for SAX2 * src/raptor_www.c: (raptor_www_fetch): Return status code from URI filter * docs/raptor-1-to-2-map.tsv, src/raptor2.h.in, src/raptor_option.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_turtle_writer.c: Add RAPTOR_OPTION_NO_FILE to deny internal file requests * src/raptor_json.c: Handle size changing between YAJL V1 and V2 Use RAPTOR_YAJL_LEN_TYPE macro to deal with the arg type change 2012-01-28 Dave Beckett * src/raptor_uri.c: code cleanup * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_uri.c: Rename file uri string to match convention (raptor_uri_uri_string_to_counted_filename_fragment): Added to return count lengths (raptor_uri_uri_string_is_file_uri): Use raptor_uri_uri_string_to_counted_filename() after a simple URI test. (raptor_uri_uri_string_to_filename): Renamed from raptor_uri_uri_string_as_filename and use above. (raptor_uri_uri_string_to_counted_filename): Added using above and returning count. * configure.ac, docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_uri.c: raptor_uri_uri_string_as_filename * src/raptor_internal.h, src/raptor_sax2.c: Add internal SAX2 enabled flag for enabling/disabling callbacks raptor2-2.0.15/ChangeLog.120000644000175000017500000010357011764537242012125 000000000000002011-11-27 Dave Beckett * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.7 2011-11-27 Dave Beckett * Snapshotted raptor2_2_0_6 for 2.0.6 release (GIT f9f3768e7080f1f132856b731c232c8cbeac1634) * docs/raptor-1-to-2-map.tsv: raptor_sequence swap, reverse and next_permutation * docs/raptor2-sections.txt: raptor_sequence_next_permutation * src/raptor_permute_test.c: (intseq_get_at): Add for testing clarity * src/raptor_permute_test.c: Add a proper value checking test for permute size 5 * src/Makefile.am, src/raptor_permute.c, src/raptor_permute_test.c: raptor_permute_test.c is a pure test and never linked into libraptor2 * src/raptor_permute.c: Turn permute code into a test for sequence raptor_sequence_next_permutation * src/raptor2.h.in, src/raptor_sequence.c: (raptor_sequence_next_permutation): Added based on int permute code * docs/raptor2-sections.txt, src/raptor2.h.in, src/raptor_sequence.c: (raptor_sequence_swap): Added pulled out of raptor_sequence_reverse 2011-11-25 Dave Beckett * src/raptor2.h.in, src/raptor_sequence.c: (raptor_sequence_reverse): Added * src/raptor_expat.c, src/raptor_sax2.c: Fix expat support 2011-11-23 Dave Beckett * src/Makefile.am, src/raptor_permute.c: Add test permutations code * configure.ac: Use AWK * src/raptor_namespace.c: Explain namespace depth, starting and scopes 2011-11-15 Nicholas J Humfrey * src/Makefile.am: Made git-version.h a non-distributable source file. 2011-11-14 Dave Beckett * src/raptor_www_curl.c: (raptor_www_curl_set_ssl_cert_options): Handle curl < 7.16.4 * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.6 * Snapshotted raptor2_2_0_5 for 2.0.5 release (GIT b286cc333996006f008a5ddd3ed116a7613a86bc) 2011-11-13 Dave Beckett * docs/.gitignore, docs/Makefile.am: docs fixes to use raptor-fake.h * docs/tmpl/section-general.sgml, src/snprintf.c, src/raptor2.h.in: autodocs * ChangeLog, NEWS.html, RELEASE.html: 2.0.5 * src/Makefile.am: no rdfdiff here * src/ntriples_parse.c, src/raptor_nfc_test.c, src/raptor_turtle_writer.c, src/raptor_xml.c: Check for error return for all raptor_unicode_utf8_string_get_char() calls Fixes Issue #000481 http://bugs.librdf.org/mantis/view.php?id=481 * .gitignore: Ignore git-version.h * tests/ntriples/Makefile.am, tests/ntriples/bug-481.nq, tests/ntriples/bug-481.out: Add test/results for Issue #481 * autogen.sh: update autogen.sh * configure.ac, src/Makefile.am, src/raptor_general.c, src/raptor_internal.h: Generate GIT commit in version string when compiling from GIT Approach copied from rasqal 2011-11-05 Lauri Aalto * src/ntriples_parse.c: (raptor_nquads_parse_recognise_syntax): Guess nquads over ntriples since now ntriples parses fine on nquads parser 2011-11-04 Lauri Aalto * tests/ntriples/Makefile.am, tests/ntriples/testnq-optional-context.nq, tests/ntriples/testnq-optional-context.out: added test case for optional context node in nquads * src/ntriples_parse.c: (raptor_ntriples_parse_line): Make context optional for nquads. Fixes Issue #0000479 http://bugs.librdf.org/mantis/view.php?id=479 2011-10-18 Nicholas J Humfrey * src/turtle_parser.y: Added the W3C format URI for the Turtle parser 2011-10-13 Nicholas J Humfrey * src/ntriples_parse.c, src/raptor_librdfa.c, src/raptor_rdfxml.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c: Added W3C Format URIs to the parser and serialiser syntax descriptions. 2011-10-13 Nicholas J Humfrey * src/raptor_json.c, src/raptor_serialize_json.c: Updated the URL for RDF/JSON serialisation specification. 2011-09-26 Dave Beckett * Merge GitHub pull request #2 from presbrey/master 2011-09-26 Joe Presbrey * (raptor_uri_string_to_relative_uri_string): compare paths not files. Bugfix raptor_uri_string_to_relative_uri_string Fixes Issue #0000472 http://bugs.librdf.org/mantis/view.php?id=472 2011-09-13 Dave Beckett * src/raptor_uri.c: set errno to 0 2011-09-08 Dave Beckett * configure.ac, src/raptor_internal.h, src/snprintf.c: Removed calls to trunc() and lround() and optional linking of libm (raptor_format_float): Removed unused internal function and thus removed the only need for trunc() and lround(). configure: Removed checks for trunc(), lround() in libc or libm. * src/raptor_abbrev.c, src/raptor_general.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_uri.c, src/raptor_xml.c, src/snprintf.c: Make raptor_format_integer handle hex too (raptor_format_integer): Add base, width and padding fields (raptor_format_hexadecimal): Deleted, replaced by above with base = 16. Updated all callers of above with new parameters. * src/raptor_json.c: (raptor_json_parse_chunk): bad cast size_t to len for yajl API 2011-08-31 Dave Beckett * src/raptor_general.c, src/raptor_iostream.c, src/raptor_locator.c, src/raptor_nfc.c, src/raptor_nfc_test.c, src/raptor_qname.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_www_curl.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/snprintf.c: Add more RAPTOR_GOOD_CAST and RAPTOR_BAD_CAST and fix some. * src/raptor_uri.c: (raptor_new_uri_from_rdf_ordinal): Use raptor_format_integer() * src/raptor_general.c, src/raptor_internal.h: Use raptor_format_integer() in generating bnode IDs (raptor_world_default_generate_bnodeid_handler): Use raptor_format_integer() and tidy code. raptor_world field default_generate_bnodeid_handler_prefix_length is an integer; long enough. * src/raptor_abbrev.c: (raptor_new_qname_from_resource): Use raptor_format_integer() * src/raptor_internal.h, src/raptor_iostream.c, src/raptor_xml.c, src/snprintf.c: (raptor_format_hexadecimal): Added for formatting uppercase hex in a fixed width field. (raptor_iostream_hexadecimal_write): Use raptor_format_hexadecimal() (raptor_xml_escape_string_any): Use raptor_format_hexadecimal() to remove a sprintf for &#xXX. * utils/rdfdiff.c: (rdfdiff_add_statement): Malloc right size * src/ntriples_parse.c, src/raptor_grddl.c, src/raptor_iostream.c, src/raptor_libxml.c, src/raptor_nfc.c, src/raptor_rdfxml.c, src/raptor_rss.c, src/raptor_sax2.c, src/raptor_serialize_html.c, src/raptor_serialize_rdfxml.c, src/raptor_term.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_xml.c, src/snprintf.c, src/turtle_common.h: Use RAPTOR_BAD_CAST and RAPTOR_GOOD_CAST Some good uses: - narrowing a known, checked unicode char to a U16 Some 'bad' uses: - only handing error messages, literal language, qname prefixes of a max len constrained by int - passing in data to libxml constrained by int max len - locator column field constrained to int size Some bad uses: - iostream read_bytes and write-bytes methods return int but could easily return a lot more in the size_t range (compare to fread). API change needed. - locator byte field constrained to int size. should be size_t - raptor_nfc_check returns int offset into a buffer that could be larger raptor_ntriples_parser_context changed line_length and offset to size_t raptor_turtle_parser changed buffer_length to size_t * src/raptor_internal.h: Add macros for describing types of casts RAPTOR_GOOD_CAST: code checks or logic ensures cast will not truncate RAPTOR_BAD_CAST: value may be truncated; may require API change/break. Might be unrealistic e.g. a >4G error message, qname prefix. 2011-08-30 Dave Beckett * src/snprintf.c: snprintf return code and size guessing fixes vsnprintf_is_c99 macro: start guessing length from len strlen(format) and grow size by 50% each loop to hopefully get big enough faster. (raptor_vsnprintf): Error out when raptor_vasprintf result < 0 (raptor_snprintf): Note error is < 0 response (raptor_vasprintf): Error out when raptor_vsnprintf2 result is < 0 2011-08-28 Dave Beckett * src/raptor_locator.c: (raptor_locator_format): Use raptor_format_integer to kill snprintf * src/raptor_internal.h, src/snprintf.c: (raptor_format_integer): Added * src/raptor_json_writer.c: (raptor_json_writer_literal_datatype): Remove unused code. 2011-08-27 Dave Beckett * utils/rdfdiff.c: Fix rdfdiff assumption that RAPTOR_DEBUG is defined * src/raptor_grddl.c: Fix a few more RAPTOR_DEBUG is defined assumptions * src/raptor_avltree.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_iostream.c, src/raptor_namespace.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_sequence.c, src/raptor_serialize_rss.c, src/raptor_set.c, src/raptor_stringbuffer.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/turtle_parser.y: Code style for comparing a possibly undefined macro to a value Use: #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > N rather than: #if RAPTOR_DEBUG > N * src/raptor_internal.h: Do not assume RAPTOR_DEBUG is defined * src/snprintf.c: autodocs * configure.ac: Do not enable debug messages by default for --enable-maintainer-mode This now requires the extra --enable-debug option to configure or autogen.sh * docs/tmpl/section-general.sgml: updated doc tmpl * configure.ac: Check for vasprintf once * configure.ac, src/snprintf.c: Define -D_GNU_SOURCE to get vasprintf() * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt: Add new snprintf functions to docs * src/raptor_json_writer.c, src/raptor_locator.c, src/raptor_log.c: Use raptor_snprintf() and raptor_vasprintf() In preference to raw snprintf() or doing strlen() on raptor_vsnprintf(). * configure.ac, src/raptor2.h.in, src/raptor_general.c, src/snprintf.c: Portability fixes to snprintf / vsnprintf / vasprintf (raptor_vsnprintf2): Added with actual vsnprintf() calling contention, deprecating raptor_vsnprintf which doesn't (raptor_snprintf): Added with snprintf() calling convention using raptor_vsnprintf2() to provide a portable version. (raptor_vasprintf): Added with vasprintf() calling convention (GNU) using raptor_vsnprintf2() to implement it if not present. Moved the formatted printing code all to src/snprintf.c 2011-08-25 Dave Beckett * src/raptor_locator.c: Avoid snprintf(NULL, ) when there there is no C99 vsnprintf() (raptor_locator_format): Pick a large enough buffer size if snprintf is likely not portable, when HAVE_C99_VSNPRINTF is not defined. Fixes Issue#0000465 http://bugs.librdf.org/mantis/view.php?id=465 2011-08-21 Dave Beckett * librdfa/rdfa.c: Switch deprecated index() to more portable strchr() * src/snprintf.c: Compile a local lround() if it is not present. * configure.ac: Add check for lround() * src/win32_raptor_config.h.in: Define isnan() macro around _isnan() * configure.ac: Define HAVE_TRUNC and HAVE_ROUND from configure 2011-08-12 Dave Beckett * src/raptor_statement.c: (raptor_statement_compare): Calculate pointer differences using ptrdiff_t * src/raptor_unicode.c: Casts for returning unicode char lengths (raptor_unicode_utf8_string_put_char, raptor_unicode_utf8_string_get_char): Cast small int return values. * src/raptor_general.c: (raptor_world_default_generate_bnodeid_handler): Use unsigned int for ID lengths. * src/raptor_internal.h, src/raptor_qname.c: Use size_t for qname value length and unsigned int for name lengths. raptor_qname_s changes value_length to size_t (raptor_new_qname, raptor_new_qname_from_namespace_local_name, raptor_qname_string_to_uri): unsigned ints for prefix and name lengths. * src/raptor_namespace.c: Use raptor_namespace prefix_length as unsigned int; it's long enough. (raptor_namespaces_find_namespace, raptor_new_namespace_from_uri): Casts for unsigned int. * src/raptor_internal.h: raptor_namespace prefix_length is unsigned int * src/raptor_serialize_turtle.c, src/turtle_parser.y: Use turtle's actual mime type text/turtle in syntax recognizing code. This should make guessing from the registered mime type accurate. 2011-08-09 Dave Beckett * docs/raptor-1-to-2-map.tsv, docs/raptor2-sections.txt, docs/tmpl/section-unicode.sgml, src/raptor2.h.in, src/raptor_unicode.c: Added UTF-8 strlen and substr utility functions (raptor_unicode_utf8_strlen): Added (raptor_unicode_utf8_substr): Added 2011-08-01 Dave Beckett * configure.ac: stddef.h for ptrdiff_t * src/raptor_uri.c: code style - casts for lengths (raptor_new_uri_from_counted_string, (raptor_new_uri_from_counted_string): Cast size_t length from strlen to unsigned int. (raptor_new_uri_from_uri_local_name, raptor_new_uri_relative_to_base, raptor_new_uri_from_id) raptor_new_uri_for_rdf_concept): size_t for string and uri lengths (raptor_uri_path_common_base_length): Use size_t inside and return size_t (raptor_uri_path_make_relative_path): size_t for path lengths. (raptor_uri_print): use size_t for number of objects fwrite prints * src/raptor_serialize_rss.c: cast uri len to unsigned int * src/raptor_www_curl.c: size_t for len 2011-07-31 Dave Beckett * src/ntriples_parse.c, src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_internal.h, src/raptor_iostream.c, src/raptor_json.c, src/raptor_json_writer.c, src/raptor_libxml.c, src/raptor_log.c, src/raptor_namespace.c, src/raptor_option.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_term.c, src/raptor_turtle_writer.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libxml.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/turtle_common.c, src/turtle_lexer.l, src/turtle_parser.y, utils/rdfdiff.c: Code style change and cleanup for alloc/free macros Code style: 1. var = RAPTOR_CALLOC(type, count, size) Prefering: var = RAPTOR_CALLOC(type, 1, sizeof(*var)) when count = 1 2. var = RAPTOR_MALLOC(type, size) 3. RAPTOR_FREE(type, var) The consequence here is allocs that mostly fit into 1 line without so much boilerplate and duplication of types. The RAPTOR_MALLOC and RAPTOR_CALLOC now do the cast to the return type. RAPTOR_FREE takes the object type too but always casts arg to void This certainly contains many wrong types to the arg but might be used later in some kind of smart type-aware debugging allocator. * librdfa/curie.c: Use size_t to compute sizes otherwise may truncate on 64-bit systems (rdfa_resolve_uri): Use size_t for strlen tmp (rdfa_resolve_curie): cast for strlen when ifdef LIBRDFA_IN_RAPTOR * librdfa/rdfa.c: Use size_t to compute sizes otherwise may truncate on 64-bit systems 2011-07-30 Dave Beckett * docs/.gitignore, docs/raptor-overrides.txt, docs/raptor-sections.txt, docs/raptor.types, docs/raptor2-overrides.txt, docs/raptor2-sections.txt, docs/raptor2.types, docs/tmpl/.gitignore: More changes from DOC_MODULE=raptor2 * docs/Makefile.am: Install raptor V2 docs in with doc module raptor2 so they don't clash with raptor V1 docs 2011-07-25 Dave Beckett * src/raptor_grddl.c: (raptor_grddl_run_grddl_transform_uri): Set base_uri for sheet URI get. * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.5 * docs/tmpl/section-option.sgml, docs/tmpl/section-www.sgml: Update tmpls * Snapshotted raptor2_2_0_4 for 2.0.4 release (GIT 76194e074160848d6f690a62b395d5dd23aff728) * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt, src/raptor2.h.in, src/raptor_internal.h, src/raptor_option.c, src/raptor_parse.c, src/raptor_turtle_writer.c, src/raptor_www.c, src/raptor_www_curl.c: Implement WWW feching SSL client certificate options raptor_option gains: RAPTOR_OPTION_WWW_CERT_FILENAME, RAPTOR_OPTION_WWW_CERT_TYPE and RAPTOR_OPTION_WWW_CERT_PASSPHRASE (raptor_www_set_ssl_cert_options): Added public API to set SSL client certificates on WWW. (raptor_www_curl_set_ssl_cert_options): Added for libcurl to implement above. (raptor_parser_parse_uri_with_connection): Use raptor_www_set_ssl_cert_options() to turn the parser options into settings on the WWW object. 2011-07-24 Dave Beckett * src/ntriples_parse.c: (raptor_ntriples_parse_line): Calculate term_lengths only when debugging. [-Wunused-but-set-variable] * src/turtle_lexer.l: Disable input() for Turtle lexer - never needed. * src/turtle_parser.y: (turtle_parse): Do not assign buffer which is unused [-Wunused-but-set-variable] * src/raptor_internal.h, src/raptor_parse.c: Move parser buffer from stack to parser object (reducing call stack size) RAPTOR_READ_BUFFER_SIZE internal define added. raptor_parser gains a buffer of RAPTOR_READ_BUFFER_SIZE + 1 for NUL. (raptor_parser_parse_file_stream): Use parser object buffer not stack. (raptor_parser_parse_uri_write_bytes): Use size_t in len calculation. (raptor_parser_parse_iostream): Use parser object buffer not stack. Use size_t for read length. * configure.ac: -Wno-sign-conversion for now * src/raptor_internal.h, src/raptor_www.c: Reduce stack use of raptor_www_file_handle_fetch (raptor_www_file_handle_fetch): Use www->buffer for file buffer for all builds not just www with libxml or libfetch. * src/raptor_xml.c: (raptor_valid_xml_ID): use size_t for strlen * src/raptor_locator.c: (raptor_locator_format): Cast calculated bufsize to int return. * src/raptor_internal.h, src/raptor_www.c, src/raptor_www_curl.c: Use a total_bytes for byte counts inside raptor_www * src/snprintf.c: (raptor_format_float): use a long for the intpart. * configure.ac: Expand (GCC) compiler warnings lots * docs/raptor-1-to-2-map.tsv, docs/raptor-sections.txt, src/raptor2.h.in, src/raptor_internal.h, src/raptor_serialize_ntriples.c, src/raptor_serialize_turtle.c, src/raptor_turtle_writer.c: Make sure N-Triples and Turtle serialize legal blank node IDs Fixes Issue #0000449 http://bugs.librdf.org/mantis/view.php?id=449 (raptor_bnodeid_ntriples_write): Added to write a N-Triples blank node ID in legal form, replacing any letters not in the allowed set. (raptor_turtle_writer_bnodeid): Added internal method for Turtle writer to do this too. (raptor_turtle_emit_blank): Use above. * configure.ac: Enforce libcurl earliest version supported 7.12.0 See previous commit for Issue#0000457 http://bugs.librdf.org/mantis/view.php?id=457 and curl GIT commit https://github.com/bagder/curl/commit/ffc5fa3a2be787c8198eb68836a45c440876c1bd * src/raptor_internal.h: Remove curl/types.h Fixes Issue#0000457 http://bugs.librdf.org/mantis/view.php?id=457 Was made a blank file over 7 years ago. curl GIT commit ffc5fa3a2be787c8198eb68836a45c440876c1bd Date: Mon Apr 26 14:06:51 2004 +0000 "typedef CURL in the curl.h file instead of only having a single useful typedef in the separate types.h" Which is 7.11.2 but it wasn't mentioned in the release notes (even if I'd read them): http://curl.haxx.se/changes.html * configure.ac: Improve checking for trunc and round Fixes Issue#0000308 http://bugs.librdf.org/mantis/view.php?id=308 2011-07-14 Dave Beckett * src/raptor_avltree.c: Condition protect more debug printfs * src/raptor_avltree.c: Fix losing node parents in deleting (raptor_avltree_delete_internal, raptor_avltree_delete_internal2): Fix parents when moving nodes during deletion. Based on patch from 'v-for-vandal' in notes of Issue#0000455 http://bugs.librdf.org/mantis/view.php?id=455 Thanks! Fixes Issue#0000455 http://bugs.librdf.org/mantis/view.php?id=455 * src/raptor_avltree.c: Add extra AVL Tree debugging Based on patch in Issue #0000455 http://bugs.librdf.org/mantis/view.php?id=455 with code style changes * configure.ac, src/raptor_json.c: Add YAJL V2 support Note that YAJL V1 and V2 both install the same library name 'libyajl' even though they have different ABI & APIs. Fixes Issue #0000456 http://bugs.librdf.org/mantis/view.php?id=456 2011-07-11 Dave Beckett * tests/trig/bug451.out, tests/trig/bug451.trig: Make bug451.trig legal. Fixes Issue #000451 http://bugs.librdf.org/mantis/view.php?id=451 * src/turtle_lexer.l: Allow = instead of := in TRiG * tests/trig/Makefile.am, tests/trig/bug451.out, tests/trig/bug451.trig, tests/trig/example2.trig: Add tests for bug 451 - fixing TrIG to be legal 2011-06-01 Dave Beckett * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.4 * Snapshotted raptor2_2_0_3 for 2.0.3 release (GIT 148879e3346d0976792b51bddf4d98db34263d07) 2011-05-31 Dave Beckett * docs/raptor-1-to-2-map.tsv: Fix API change typos; there are no raptor_term_as.*string() functions * src/turtle_lexer.l: Cleanup stringbuffer if EOF happens in a literal * docs/tmpl/section-general.sgml: doc tmpls 2011-05-30 Dave Beckett * src/turtle_parser.y: More fixups for going back to pull parser bison's yacc.c skeleton output does not support %lex-param so use #define YYLEX_PARAM again * src/turtle_parser.y: (turtle_parser_error): Remove yy_init_globals call. 2011-05-22 Dave Beckett * utils/Makefile.am: CLEANFILES cleans *.plist from clang output * utils/rdfdiff.c: (rdfdiff_statement_equals): Return different if object URIs differ. [CLANG] * utils/Makefile.am: ANALYZE * src/Makefile.am: all SOURCES * src/Makefile.am: analyze for maintainer only * src/Makefile.am: CLEANFILES cleans *.plist from clang output * librdfa/triple.c: Fixes from clang --analyze (rdfa_complete_object_literal_triples): Remove assignment of 'current_object_literal' that always assigns the existing value. * librdfa/rdfa.c: Fixes from clang --analyze (start_element): Remove unused (attribute) 'value' var Remove usless assignment of 'insert_xmlns_definition' at end of block it is scoped to. * librdfa/curie.c: Fixes from clang --analyze (rdfa_resolve_uri): use rval_copy to alter final char from '/' not rval, which is always NULL. (rdfa_resolve_curie): Remove unused var 'expanded_prefix_length' * src/raptor_xml_writer.c: (raptor_new_xml_writer): Remove useless assignment to 'nstack'. [CLANG] * src/raptor_uri.c: Fixes [CLANG] (raptor_uri_print): Initialize 'world' carefully and check if it is NULL when calling raptor_log_error_formatted. * src/raptor_unicode.c: Fixes [CLANG] (raptor_unicode_utf8_string_get_char): Do not uslessly increment 'input' pointer at end of function. * src/raptor_turtle_writer.c: Fixes [CLANG] (raptor_new_turtle_writer): Remove useless assignment to 'nstack'. (raptor_turtle_writer_quoted_counted_string): Initialize 'rc' and use it to return faiure from raptor_string_python_write() * src/raptor_serialize_turtle.c: Fixes [CLANG] (raptor_turtle_emit_subject_collection_items) (raptor_turtle_emit_subject_properties): Return 'rv' on error. * src/raptor_serialize_rss.c: (raptor_rss10_serialize_statement): Return failure on not handled [CLANG] * src/raptor_serialize_rdfxmla.c: (raptor_rdfxmla_emit_subject_properties): Return 'rv' on error [CLANG]. * src/raptor_serialize_rdfxml.c: Fixes [CLANG] (raptor_rdfxml_serialize_statement): Remove 'end_predicate_element' assignemnts that are immediately overwritten. Use 'attrs_count' in writing a URI - be consistent with other emitting even know we know in all cases what the values will be. * src/raptor_rss.c: Fixes [CLANG] (raptor_rss_start_element_handler): Remove unused 'attribute_type' var. (raptor_rss_insert_identifiers): Initialize 'new_uri' to NULL and check for failures of it and term construction. * src/raptor_rfc2396.c: Fixes [CLANG] (raptor_uri_resolve_uri_reference): Remove assignment to 'last_char' never needed - loop continue action overwrites it. * src/raptor_rdfxml.c: Fixes [CLANG] (raptor_rdfxml_start_element_handler): Check element->parent is not NULL before using pointer. (raptor_rdfxml_generate_statement): Remove unused rdf_xml_parser var. (raptor_rdfxml_start_element_grammar): Remove assignments to 'finished' that are immediately re-assigned. * src/raptor_nfc.c: (raptor_nfc_check): Remove unused 'start' var [CLANG] * src/raptor_namespace.c: (raptor_namespace_format_as_xml): Do not increment p at end [CLANG] * src/raptor_memstr.c: (raptor_memstr): Remove unused 'c' var [CLANG] * src/raptor_libxml.c: Fixes [CLANG] (raptor_libxml_error_common): Set world and locator to NULL and carefully assign and check use. (raptor_libxml_xmlStructuredError_handler_parsing): Turn assignment into something that does work. Hints that the workaround for an ancient libxml2 context error pointer bug are no longer needed since anyone using such an old libxml would have crashed at this point when an error happened. Could bump minimum libxml2 version. * src/raptor_librdfa.c: (raptor_librdfa_parse_init): Remove unused librdfa_parser [CLANG] * src/raptor_json_writer.c: Fixes [CLANG] (raptor_json_writer_quoted): Initialize rc and set it to value of any raptor_string_python_write error return. Return rc. (raptor_json_writer_key_uri_value): Return error rc * src/raptor_grddl.c: Fixes [CLANG] (raptor_grddl_run_grddl_transform_doc): Initialize userCtxt (raptor_grddl_run_grddl_transform_uri): Remove unused grddl_parser (raptor_grddl_parse_chunk): Remove assigning rc a value never read * src/ntriples_parse.c: (raptor_ntriples_parse_line): Initialize term fields in all cases[CLANG] * src/.gitignore: .gitignore * src/Makefile.am: 'analyze' target fixes * src/Makefile.am: Added 'analyze' target to invoke clang over sources 2011-05-19 Dave Beckett * src/turtle_parser.y: lets have bison debugging with push parser too * src/raptor_parse.c, src/raptor_serialize.c, src/raptor_www_curl.c: Fixes for building in RAPTOR_DEBUG > 2 mode * src/raptor_qname.c: docs 2011-05-12 Dave Beckett * configure.ac: Ensure Bison 2.4+ is used 2011-05-11 Dave Beckett * src/turtle_lexer.l: Make TRiG lexer recognize URI/qname (ws)* (:-)? (ws)* { Add new rule to recognize QNAME as the graph name. Adjust it to skip over extra optional tokens. Adjust existing rule to handle all whitespace around optional ':-' 2011-05-10 Dave Beckett * src/turtle_lexer.l: Handle trig graph name and start in lexer (GRAPH_NAME_LEFT_CURLY): Added returning URI for { with optional ':-' * src/turtle_parser.y: Fix calls to raptor_term_print_as_ntriples() to raptor 2 API form * src/raptor_statement.c: (raptor_statement_print): Handle printing partial statements for debugging. * src/.gitignore: ignore raptor2.h * src/turtle_parser.y: (turtle_push_parse): world only if very debuggy * src/turtle_parser.y: (turtle_push_parse): print token on very debug only. 2011-04-27 Dave Beckett * docs/libraptor2.3, examples/grapper.c, examples/raptor_abort.c, examples/rdfcat.c, examples/rdfguess.c, examples/rdfprint.c, examples/rdfserialize.c, scripts/build-formats.c, tests/empty.c: Use raptor2.h header 2011-04-26 Dave Beckett * docs/Makefile.am: Make docs use raptor2.h * configure.ac, docs/tmpl/section-general.sgml, librdfa/rdfa.h, src/.gitignore, src/Makefile.am, src/ntriples_parse.c, src/raptor.h, src/raptor.h.in, src/raptor2.h.in, src/raptor_abbrev.c, src/raptor_avltree.c, src/raptor_concepts.c, src/raptor_expat.c, src/raptor_general.c, src/raptor_grddl.c, src/raptor_guess.c, src/raptor_iostream.c, src/raptor_json.c, src/raptor_json_writer.c, src/raptor_librdfa.c, src/raptor_libxml.c, src/raptor_locator.c, src/raptor_log.c, src/raptor_memstr.c, src/raptor_namespace.c, src/raptor_nfc.c, src/raptor_nfc_data.c, src/raptor_nfc_test.c, src/raptor_option.c, src/raptor_parse.c, src/raptor_qname.c, src/raptor_rdfxml.c, src/raptor_rfc2396.c, src/raptor_rss.c, src/raptor_rss_common.c, src/raptor_sax2.c, src/raptor_sequence.c, src/raptor_serialize.c, src/raptor_serialize_dot.c, src/raptor_serialize_html.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxml.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_rss.c, src/raptor_serialize_turtle.c, src/raptor_set.c, src/raptor_statement.c, src/raptor_stringbuffer.c, src/raptor_syntax_description.c, src/raptor_term.c, src/raptor_turtle_writer.c, src/raptor_unicode.c, src/raptor_uri.c, src/raptor_www.c, src/raptor_www_curl.c, src/raptor_www_libfetch.c, src/raptor_www_libxml.c, src/raptor_www_test.c, src/raptor_xml.c, src/raptor_xml_writer.c, src/snprintf.c, src/turtle_common.c, src/turtle_lexer.l, src/turtle_parser.y, utils/rapper.c, utils/rdfdiff.c: Switch to raptor2.h as main header. raptor.h includes it * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.3 2011-04-15 Nicholas J Humfrey * docs/Makefile.am: Set DISTCLEANFILES to empty before including gtk-doc.make * docs/Makefile.am: Moved raptor-fake.i from CLEANFILES to DISTCLEANFILES. 2011-04-05 Dave Beckett * src/turtle_parser.y: (graph): Ensure $1 is NULLed out and ownership passed on Fixes Issue #0000437 http://bugs.librdf.org/mantis/view.php?id=437 * src/raptor_statement.c: (raptor_statement_print): Handle NULL terms. * src/turtle_parser.y: Fix extra debugging use of raptor_term_print_as_ntriples 2011-03-27 Dave Beckett * src/turtle_lexer.l: Use %option extra-type to set type of extra arg. 2011-03-20 Dave Beckett * Snapshotted raptor2_2_0_2 for 2.0.2 release (GIT 4d782df45fd4b3e11243008c4dc221effcaad591) * configure.ac, src/raptor_general.c: Error out when calling library presents a too old header (raptor_new_world_internal): Switch to checking for too old, not exact match. * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.2 * src/raptor_term.c: autodocs * Snapshotted raptor2_2_0_1 for 2.0.1 release (GIT 6f1655f985df370999a92897726d359946c1dbd9) 2011-03-14 Dave Beckett * src/raptor.h.in, src/raptor_parse.c: autodocs 2011-03-10 Dave Beckett * src/raptor_term.c: Autodocs - mention UTF-8 encodings in args/returns for raptor_term docs 2011-02-27 Dave Beckett * scripts/process-changes.pl: Update to latest process-changes.pl 2011-02-14 Dave Beckett * scripts/process-changes.pl: Update to latest process-changes.pl * tests/turtle/Makefile.am, tests/turtle/test-36.out, tests/turtle/test-36.ttl, tests/turtle/test-37.out, tests/turtle/test-37.ttl: Add tests for long literal with dups and lang 2011-02-07 Dave Beckett * ChangeLog, ChangeLog.11, Makefile.am: Add ChangeLog.11 for 2010 2011-02-06 Dave Beckett * LICENSE.html: Make GPL V2 or newer explicit. 2011-02-01 Dave Beckett * raptor2.spec.in: fix Source: 2011-01-27 Dave Beckett * src/raptor_internal.h: Remove get_curie_type rename for librdfa - now static * librdfa/curie.c, librdfa/rdfa_utils.h: Update to librda GIT commit 3838bb11fb155bbae200a2388096cbe6804a7551 No longer exports get_curie_type. * NEWS.html, RELEASE.html, configure.ac: Bumped version to 2.0.1 2011-01-26 Dave Beckett * src/raptor_internal.h: Rename librdfa symbols for internal linking of librdfa Fixes Issue #0000416 http://bugs.librdf.org/mantis/view.php?id=416 * librdfa/rdfa.c, librdfa/rdfa_utils.c, librdfa/triple.c: Update to librdfa GIT commit aeebd00d68ab7292cae35ebfbcb638f3a2625f39 2011-01-24 Nicholas J Humfrey * src/raptor_serialize_ntriples.c, tests/ntriples/testnq-1.out, tests/trig/bug370.out, tests/trig/example1.out, tests/trig/example2.out, tests/trig/example3.out: Fixed the nquads serialiser to output the graph name in the fourth column, instead of repeating the object 2011-01-21 Dave Beckett * src/ntriples_parse.c, src/raptor_abbrev.c, src/raptor_librdfa.c, src/raptor_serialize_dot.c, src/raptor_serialize_html.c, src/raptor_serialize_json.c, src/raptor_serialize_ntriples.c, src/raptor_serialize_rdfxmla.c, src/raptor_serialize_turtle.c, src/raptor_uri.c: Replace all RAPTOR_FATAL with error log messages in user builds All RAPTOR_FATAL calls are now only called inside RAPTOR_DEBUG blocks. * src/raptor_abbrev.c, src/raptor_internal.h: (raptor_new_abbrev_subject): Made static to this module * src/raptor_statement.c: (raptor_statement_init): Init statement to NULL pointers 2011-01-03 Dave Beckett * Snapshotted raptor2_2_0_0 for 2.0.0 release (GIT 8ba659697c83891eb6ae9b47ce0e0ce8bb070e40) * docs/raptor-docs.xml: shorter title * NEWS.html, RELEASE.html: 2.0.0 * librdfa/rdfa.c: Revert upstream 62d939ec1e3756a69eef48a50be0ab0624e2d4ad * librdfa/triple.c: (rdfa_generate_namespace_triple): Protect processor_graph_triple_callback * examples/grapper.c, librdfa/iri.c, librdfa/rdfa.c, src/raptor_general.c: Casts for C++ * examples/grapper.c: Use raptor_term_to_string in final 2.0.0 API * docs/raptor-sections.txt: Added raptor_syntax_description_validate * docs/raptor-1-to-2-map.tsv: Added raptor_syntax_description_validate * docs/raptor-1-to-2-map.tsv: Update for older API change: raptor_term_to_.*string not _as_ * src/.gitignore: Ignore generated win32_raptor_config.h * src/win32_raptor_config.h.in: Insert generated @symbols * src/win32_raptor_config.h, src/win32_raptor_config.h.in: Rename win32_raptor_config.h to win32_raptor_config.h.in * configure.ac: generate src/win32_raptor_config.h raptor2-2.0.15/data/0000755000175000017500000000000012425347071011107 500000000000000raptor2-2.0.15/data/Makefile.am0000644000175000017500000000002210674751730013062 00000000000000EXTRA_DIST=dc.rdf raptor2-2.0.15/data/Makefile.in0000644000175000017500000002730712425344565013112 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = dc.rdf all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/data/dc.rdf0000644000175000017500000000050610360131567012110 00000000000000 Dave Beckett's Home Page Dave Beckett raptor2-2.0.15/utils/0000755000175000017500000000000012425347071011336 500000000000000raptor2-2.0.15/utils/Makefile.am0000644000175000017500000000444112011242612013277 00000000000000# -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor utils # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # bin_PROGRAMS = rapper noinst_PROGRAMS = rdfdiff man_MANS = rapper.1 CLEANFILES = *.plist # Memory debugging MEM=@MEM@ MEM_LIBS=@MEM_LIBS@ AM_CPPFLAGS= $(MEM) -I$(top_srcdir)/src LIBS=@LIBS@ $(MEM_LIBS) ANALYZE = clang ANALYZE_FLAGS = "--analyze" # Based on COMPILE target ANALYZE_COMMAND = $(ANALYZE) \ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) EXTRA_DIST= \ CMakeLists.txt \ rapper.html \ $(man_MANS) rapper_SOURCES = rapper.c if GETOPT rapper_SOURCES += getopt.c raptor_getopt.h endif rapper_LDADD= $(top_builddir)/src/libraptor2.la rdfdiff_SOURCES = rdfdiff.c if GETOPT rdfdiff_SOURCES += getopt.c raptor_getopt.h endif rdfdiff_LDADD= $(top_builddir)/src/libraptor2.la if MAINTAINER_MODE rapper.html: $(srcdir)/rapper.1 $(srcdir)/../scripts/fix-groff-xhtml -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/../scripts/fix-groff-xhtml $@ endif $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) libraptor2.la if MAINTAINER_MODE # Run Clang static analyzer over sources. analyze: $(SOURCES) @list='$(SOURCES)'; \ result=0; \ for file in $$list; do \ if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \ $(RECHO) "Analyzing $$file"; \ $(ANALYZE_COMMAND) $(srcdir)/$$file; \ status=$$?; \ if test $$status != 0; then \ result=1; \ fi; \ fi; \ done; \ set -e; exit $$result endif raptor2-2.0.15/utils/Makefile.in0000644000175000017500000006463112425344566013343 00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- Mode: Makefile -*- # # Makefile.am - automake file for Raptor utils # # Copyright (C) 2000-2009, David Beckett http://www.dajobe.org/ # Copyright (C) 2000-2004, University of Bristol, UK http://www.bristol.ac.uk/ # # This package is Free Software and part of Redland http://librdf.org/ # # It is licensed under the following three licenses as alternatives: # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version # 2. GNU General Public License (GPL) V2 or any newer version # 3. Apache License, V2.0 or any newer version # # You may not use this file except in compliance with at least one of # the above three licenses. # # See LICENSE.html or LICENSE.txt at the top of this package for the # complete terms and further detail along with the license texts for # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. # # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = rapper$(EXEEXT) noinst_PROGRAMS = rdfdiff$(EXEEXT) @GETOPT_TRUE@am__append_1 = getopt.c raptor_getopt.h @GETOPT_TRUE@am__append_2 = getopt.c raptor_getopt.h subdir = utils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/gtk-doc.m4 \ $(top_srcdir)/build/libtool.m4 \ $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/raptor_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__rapper_SOURCES_DIST = rapper.c getopt.c raptor_getopt.h @GETOPT_TRUE@am__objects_1 = getopt.$(OBJEXT) am_rapper_OBJECTS = rapper.$(OBJEXT) $(am__objects_1) rapper_OBJECTS = $(am_rapper_OBJECTS) rapper_DEPENDENCIES = $(top_builddir)/src/libraptor2.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__rdfdiff_SOURCES_DIST = rdfdiff.c getopt.c raptor_getopt.h am_rdfdiff_OBJECTS = rdfdiff.$(OBJEXT) $(am__objects_1) rdfdiff_OBJECTS = $(am_rdfdiff_OBJECTS) rdfdiff_DEPENDENCIES = $(top_builddir)/src/libraptor2.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(rapper_SOURCES) $(rdfdiff_SOURCES) DIST_SOURCES = $(am__rapper_SOURCES_DIST) $(am__rdfdiff_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JING = @JING@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ $(MEM_LIBS) LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # Memory debugging MEM = @MEM@ MEM_LIBS = @MEM_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PKG_CONFIG_REQUIRES = @PKG_CONFIG_REQUIRES@ RANLIB = @RANLIB@ RAPTOR_LDFLAGS = @RAPTOR_LDFLAGS@ RAPTOR_LIBTOOLLIBS = @RAPTOR_LIBTOOLLIBS@ RAPTOR_LIBTOOL_VERSION = @RAPTOR_LIBTOOL_VERSION@ RAPTOR_PARSERS = @RAPTOR_PARSERS@ RAPTOR_SERIALIZERS = @RAPTOR_SERIALIZERS@ RAPTOR_VERSION = @RAPTOR_VERSION@ RAPTOR_VERSION_DECIMAL = @RAPTOR_VERSION_DECIMAL@ RAPTOR_VERSION_MAJOR = @RAPTOR_VERSION_MAJOR@ RAPTOR_VERSION_MINOR = @RAPTOR_VERSION_MINOR@ RAPTOR_VERSION_RELEASE = @RAPTOR_VERSION_RELEASE@ RAPTOR_WWW_LIBRARY = @RAPTOR_WWW_LIBRARY@ RAPTOR_XML_PARSER = @RAPTOR_XML_PARSER@ RECHO = @RECHO@ RECHO_C = @RECHO_C@ RECHO_N = @RECHO_N@ RPM_RELEASE = @RPM_RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TAR = @TAR@ VERSION = @VERSION@ XML_CONFIG = @XML_CONFIG@ XSLT_CONFIG = @XSLT_CONFIG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man_MANS = rapper.1 CLEANFILES = *.plist AM_CPPFLAGS = $(MEM) -I$(top_srcdir)/src ANALYZE = clang ANALYZE_FLAGS = "--analyze" # Based on COMPILE target ANALYZE_COMMAND = $(ANALYZE) \ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \ $(ANALYZE_FLAGS) EXTRA_DIST = \ CMakeLists.txt \ rapper.html \ $(man_MANS) rapper_SOURCES = rapper.c $(am__append_1) rapper_LDADD = $(top_builddir)/src/libraptor2.la rdfdiff_SOURCES = rdfdiff.c $(am__append_2) rdfdiff_LDADD = $(top_builddir)/src/libraptor2.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu utils/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list rapper$(EXEEXT): $(rapper_OBJECTS) $(rapper_DEPENDENCIES) $(EXTRA_rapper_DEPENDENCIES) @rm -f rapper$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rapper_OBJECTS) $(rapper_LDADD) $(LIBS) rdfdiff$(EXEEXT): $(rdfdiff_OBJECTS) $(rdfdiff_DEPENDENCIES) $(EXTRA_rdfdiff_DEPENDENCIES) @rm -f rdfdiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rdfdiff_OBJECTS) $(rdfdiff_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfdiff.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-man uninstall-man1 @MAINTAINER_MODE_TRUE@rapper.html: $(srcdir)/rapper.1 $(srcdir)/../scripts/fix-groff-xhtml @MAINTAINER_MODE_TRUE@ -groff -man -Thtml -P-l $< | tidy -asxml -wrap 1000 2>/dev/null | $(PERL) $(srcdir)/../scripts/fix-groff-xhtml $@ $(top_builddir)/src/libraptor2.la: cd $(top_builddir)/src && $(MAKE) libraptor2.la # Run Clang static analyzer over sources. @MAINTAINER_MODE_TRUE@analyze: $(SOURCES) @MAINTAINER_MODE_TRUE@ @list='$(SOURCES)'; \ @MAINTAINER_MODE_TRUE@ result=0; \ @MAINTAINER_MODE_TRUE@ for file in $$list; do \ @MAINTAINER_MODE_TRUE@ if echo $$file | grep '\.c$$' >/dev/null 2>&1; then \ @MAINTAINER_MODE_TRUE@ $(RECHO) "Analyzing $$file"; \ @MAINTAINER_MODE_TRUE@ $(ANALYZE_COMMAND) $(srcdir)/$$file; \ @MAINTAINER_MODE_TRUE@ status=$$?; \ @MAINTAINER_MODE_TRUE@ if test $$status != 0; then \ @MAINTAINER_MODE_TRUE@ result=1; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ fi; \ @MAINTAINER_MODE_TRUE@ done; \ @MAINTAINER_MODE_TRUE@ set -e; exit $$result # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: raptor2-2.0.15/utils/CMakeLists.txt0000644000175000017500000000126412011242612014003 00000000000000# raptor/utils/CMakeLists.txt # # Original listfile by Daniel Richard G. # This file is in the public domain. # INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR} ) IF(NOT HAVE_GETOPT AND NOT HAVE_GETOPT_LONG) SET(getopt_sources getopt.c raptor_getopt.h) ENDIF(NOT HAVE_GETOPT AND NOT HAVE_GETOPT_LONG) ADD_EXECUTABLE(rapper rapper.c ${getopt_sources}) TARGET_LINK_LIBRARIES(rapper raptor2) ADD_EXECUTABLE(rdfdiff rdfdiff.c ${getopt_sources}) TARGET_LINK_LIBRARIES(rdfdiff raptor2) INSTALL(FILES rapper.1 DESTINATION share/man/man1) INSTALL(TARGETS rapper DESTINATION bin) # end raptor/utils/CMakeLists.txt raptor2-2.0.15/utils/getopt.c0000644000175000017500000000710611472513121012720 00000000000000/* * Public Domain getopt - history below * */ /* * From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.sources * Subject: getopt library routine Date: 30 Mar 85 04:45:33 GMT */ /* * getopt -- public domain version of standard System V routine * * Strictly enforces the System V Command Syntax Standard; provided by D A * Gwyn of BRL for generic ANSI C implementations * * #define STRICT to prevent acceptance of clustered options with arguments * and ommision of whitespace between option and arg. */ /* * Modified by Manuel Novoa III on 1/5/01 to use weak symbols. * Programs needing long options will link gnu_getopt instead. */ /* * Last public domain version 1.5 downloaded from uclibc CVS: * http://www.uclibc.org/cgi-bin/cvsweb/uClibc/libc/unistd/getopt.c * on 2003-02-18 by Dave Beckett and tidied: * Ran through "indent getopt.c -gnu" then fixed up the mess * Removed register - compilers are smart these days * ANSI-fied the declarations * Prefixed with raptor_ so that it doesn't clash with any getopt * linked in later. */ #include #include #include int opterr; /* error => print message */ int optind; /* next argv[] index */ int optopt; /* Set for unknown arguments */ char *optarg; /* option parameter if any */ /* * Err: * program name argv[0] * specific message * defective option letter */ static int Err (char *name, char *mess, int c) /* returns '?' */ { optopt = c; if(opterr) { (void) fprintf (stderr, "%s: %s -- %c\n", name, mess, c); } return '?'; /* erroneous-option marker */ } int getopt (int argc, char * const argv[], const char *optstring) { static int sp = 1; /* position within argument */ int osp; /* saved `sp' for param test */ #ifndef STRICT int oind; /* saved `optind' for param test */ #endif int c; /* option letter */ char *cp; /* -> option in `optstring' */ optarg = NULL; /* initialise getopt vars */ if(optind == 0) { optind = 1; opterr = 1; optopt = 1; optarg = NULL; } if(sp == 1) { /* fresh argument */ if(optind >= argc /* no more arguments */ || argv[optind][0] != '-' /* no more options */ || argv[optind][1] == '\0' /* not option; stdin */ ) return EOF; else if(strcmp (argv[optind], "--") == 0) { ++optind; /* skip over "--" */ return EOF; /* "--" marks end of options */ } } c = argv[optind][sp]; /* option letter */ osp = sp++; /* get ready for next letter */ #ifndef STRICT oind = optind; /* save optind for param test */ #endif if(argv[optind][sp] == '\0') { /* end of argument */ ++optind; /* get ready for next try */ sp = 1; /* beginning of next argument */ } if(c == ':' || c == '?' /* optstring syntax conflict */ || (cp = strchr (optstring, c)) == NULL) /* not found */ { return Err (argv[0], "illegal option", c); } if(cp[1] == ':') { /* option takes parameter */ #ifdef STRICT if(osp != 1) { return Err (argv[0], "option must not be clustered", c); } /* reset by end of argument */ if(sp != 1) { return Err (argv[0], "option must be followed by white space", c); } #else if(oind == optind) { /* argument w/o whitespace */ optarg = &argv[optind][sp]; sp = 1; /* beginning of next argument */ } else #endif if(optind >= argc) { return Err (argv[0], "option requires an argument", c); } else /* argument w/ whitespace */ optarg = argv[optind]; ++optind; /* skip over parameter */ } return c; } raptor2-2.0.15/utils/rapper.c0000644000175000017500000007024212415536211012713 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * rapper.c - Raptor RDF Parsing and Serializing utility * * Copyright (C) 2000-2010, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* Raptor includes */ #include /* for access() and R_OK */ #ifdef HAVE_STDLIB_H #include #endif #ifdef WIN32 #include #endif /* many places for getopt */ #ifdef HAVE_GETOPT_H #include #else #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef NEED_OPTIND_DECLARATION extern int optind; extern char *optarg; #endif static void print_triples(void *user_data, raptor_statement *statement); static void print_graph(void *user_data, raptor_uri *graph, int flags); static void print_namespaces(void* user_data, raptor_namespace *nspace); static void relay_namespaces(void* user_data, raptor_namespace *nspace); int main(int argc, char *argv[]); static char *program = NULL; /* replace newlines in literal string output with spaces */ static int replace_newlines = 0; /* extra noise? */ static int quiet = 0; /* just count, no printing */ static int count = 0; static int triple_count = 0; static raptor_serializer* serializer = NULL; static int guess = 0; static int reported_guess = 0; static int report_namespace = 0; static int report_graph = 0; static void print_triples(void *user_data, raptor_statement *triple) { raptor_parser* rdf_parser = (raptor_parser*)user_data; triple_count++; if(guess && !quiet && !reported_guess) { fprintf(stderr, "%s: Guessed parser name '%s'\n", program, raptor_parser_get_name(rdf_parser)); reported_guess = 1; } if(count) return; /* replace newlines with spaces if object is a literal string */ if(replace_newlines && triple->object->type == RAPTOR_TERM_TYPE_LITERAL) { char *s; for(s = (char*)triple->object->value.literal.string; *s; s++) if(*s == '\n') *s=' '; } raptor_serializer_serialize_statement(serializer, triple); return; } static void print_graph(void *user_data, raptor_uri *graph, int flags) { /* raptor_parser *parser = (raptor_parser *)user_data; */ const char* const label = (flags & RAPTOR_GRAPH_MARK_START) ? (const char*)"start" : (const char*)"end"; if(!report_graph) return; if(graph) fprintf(stderr, "%s: Graph URI %s %s\n", program, raptor_uri_as_string(graph), label); else fprintf(stderr, "%s: Default graph %s\n", program, label); } static void print_namespaces(void* user_data, raptor_namespace *nspace) { /* raptor_parser* rdf_parser = (raptor_parser*)user_data; */ unsigned char *s; if(!report_namespace) return; s = raptor_namespace_format_as_xml(nspace, NULL); fprintf(stderr, "%s: Namespace declared: %s\n", program, s); raptor_free_memory(s); return; } static void relay_namespaces(void* user_data, raptor_namespace *nspace) { raptor_serializer* rdf_serializer = (raptor_serializer*)user_data; if(report_namespace) print_namespaces(user_data, nspace); raptor_serializer_set_namespace_from_namespace(rdf_serializer, nspace); } #ifdef HAVE_GETOPT_LONG #define HELP_TEXT(short, long, description) " -" short ", --" long " " description #define HELP_TEXT_LONG(long, description) " --" long " " description #define HELP_ARG(short, long) "--" #long #define HELP_ARG_BOTH(short, long) " \"-" short "\" or \"--" long "\"" #define HELP_PAD "\n " #else #define HELP_TEXT(short, long, description) " -" short " " description #define HELP_TEXT_LONG(long, description) #define HELP_ARG(short, long) "-" #short #define HELP_ARG_BOTH(short, long) "\"-" short "\"" #define HELP_PAD "\n " #endif #define GETOPT_STRING "cef:ghi:I:o:O:qrtvw" #ifdef HAVE_GETOPT_LONG #define SHOW_NAMESPACES_FLAG 0x100 #define SHOW_GRAPHS_FLAG 0x200 static const struct option long_options[] = { /* name, has_arg, flag, val */ {"count", 0, 0, 'c'}, {"ignore-errors", 0, 0, 'e'}, {"feature", 1, 0, 'f'}, {"guess", 0, 0, 'g'}, {"help", 0, 0, 'h'}, {"input", 1, 0, 'i'}, {"input-uri", 1, 0, 'I'}, {"output", 1, 0, 'o'}, {"output-uri", 1, 0, 'O'}, {"quiet", 0, 0, 'q'}, {"replace-newlines", 0, 0, 'r'}, {"show-graphs", 0, 0, SHOW_GRAPHS_FLAG}, {"show-namespaces", 0, 0, SHOW_NAMESPACES_FLAG}, {"trace", 0, 0, 't'}, {"version", 0, 0, 'v'}, {"ignore-warnings", 0, 0, 'w'}, {NULL, 0, 0, 0} }; #endif static int error_count = 0; static int warning_count = 0; static int ignore_warnings = 0; static int ignore_errors = 0; static const char * const title_format_string = "Raptor RDF syntax parsing and serializing utility %s\n"; static void rapper_log_handler(void *data, raptor_log_message *message) { raptor_parser *parser = (raptor_parser *)data; switch(message->level) { case RAPTOR_LOG_LEVEL_FATAL: case RAPTOR_LOG_LEVEL_ERROR: if(!ignore_errors) { fprintf(stderr, "%s: Error - ", program); raptor_locator_print(message->locator, stderr); fprintf(stderr, " - %s\n", message->text); raptor_parser_parse_abort(parser); } error_count++; break; case RAPTOR_LOG_LEVEL_WARN: if(!ignore_warnings) { fprintf(stderr, "%s: Warning - ", program); raptor_locator_print(message->locator, stderr); fprintf(stderr, " - %s\n", message->text); } warning_count++; break; case RAPTOR_LOG_LEVEL_NONE: case RAPTOR_LOG_LEVEL_TRACE: case RAPTOR_LOG_LEVEL_DEBUG: case RAPTOR_LOG_LEVEL_INFO: fprintf(stderr, "%s: Unexpected %s message - ", program, raptor_log_level_get_label(message->level)); raptor_locator_print(message->locator, stderr); fprintf(stderr, " - %s\n", message->text); break; } } struct namespace_decl { unsigned char *prefix; unsigned char *uri_string; }; static void rapper_free_namespace_decl(void* data) { struct namespace_decl* nsd = (struct namespace_decl*)data; if(nsd->prefix) raptor_free_memory(nsd->prefix); if(nsd->uri_string) raptor_free_memory(nsd->uri_string); raptor_free_memory(nsd); } static int rapper_uri_trace(void *user_data, raptor_uri* uri) { fprintf(stderr, "%s: Tracing retrieval of URI %s\n", program, raptor_uri_as_string(uri)); return 0; } typedef struct { raptor_option option; int i_value; const char* s_value; } option_value; int main(int argc, char *argv[]) { /* input variables - parser * 'uri_string' is set to a URI otherwise 'filename' is file name * or if NULL, stdin. Base URI in 'base_uri_string' is required for stdin. */ raptor_world* world = NULL; raptor_parser* rdf_parser = NULL; char *filename = NULL; #define FILENAME_LABEL(name) ((name) ? (name) : "") unsigned char *uri_string = NULL; int free_uri_string = 0; raptor_uri *uri; unsigned char *base_uri_string = NULL; raptor_uri *base_uri = NULL; const char *syntax_name="rdfxml"; raptor_sequence* parser_options = NULL; int trace = 0; /* output variables - serializer */ /* 'serializer' object variable is a global */ const char *serializer_syntax_name = "ntriples"; const unsigned char *output_base_uri_string = NULL; raptor_uri *output_base_uri = NULL; raptor_sequence* serializer_options = NULL; raptor_sequence *namespace_declarations = NULL; /* other variables */ int rc; int usage = 0; int help = 0; char *p; program = argv[0]; if((p = strrchr(program, '/'))) program = p + 1; else if((p = strrchr(program, '\\'))) program = p + 1; argv[0] = program; world = raptor_new_world(); if(!world) exit(1); rc = raptor_world_open(world); if(rc) exit(1); while(!usage && !help) { int c; #ifdef HAVE_GETOPT_LONG int option_index = 0; c = getopt_long (argc, argv, GETOPT_STRING, long_options, &option_index); #else c = getopt (argc, argv, GETOPT_STRING); #endif if(c == -1) break; switch (c) { case 0: case '?': /* getopt() - unknown option */ usage = 1; break; case 'c': count = 1; if(serializer_syntax_name) serializer_syntax_name = NULL; break; case 'f': if(optarg) { if(!strcmp(optarg, "help")) { int option_count = (int)raptor_option_get_count(); int i; fprintf(stderr, "%s: Valid parser options are:\n", program); for(i = 0; i < option_count; i++) { raptor_option_description *od; od = raptor_world_get_option_description(world, RAPTOR_DOMAIN_PARSER, (raptor_option)i); if(od) { fprintf(stderr, " %-21s %s (%s)\n", od->name, od->label, raptor_option_get_value_type_label(od->value_type)); } } fprintf(stderr, "%s: Valid serializer options are:\n", program); for(i = 0; i < option_count; i++) { raptor_option_description *od; od = raptor_world_get_option_description(world, RAPTOR_DOMAIN_SERIALIZER, (raptor_option)i); if(od) { fprintf(stderr, " %-21s %s (%s)\n", od->name, od->label, raptor_option_get_value_type_label(od->value_type)); raptor_free_option_description(od); } } fputs("Options are set with `" HELP_ARG(f, option) " OPTION = VALUE or `-f OPTION'\n" "and take a decimal integer VALUE except where noted, defaulting to 1 if omitted.\n", stderr); fputs("\nA option of the form xmlns:PREFIX=\"URI\" can be used to declare output\n" "namespace prefixes and names for serializing using an XML-style syntax\n" "Either or both of PREFIX or URI can be omitted such as -f xmlns=\"URI\"\n" "This form can be repeated for multiple declarations.\n", stderr); raptor_free_world(world); exit(0); } else if(!strncmp(optarg, "xmlns", 5)) { struct namespace_decl *nd; nd = (struct namespace_decl *)raptor_alloc_memory(sizeof(*nd)); if(raptor_xml_namespace_string_parse((unsigned char*)optarg, &nd->prefix, &nd->uri_string)) { fprintf(stderr, "%s: Bad xmlns syntax in '%s'\n", program, optarg); rapper_free_namespace_decl(nd); raptor_free_world(world); exit(0); } if(!namespace_declarations) namespace_declarations = raptor_new_sequence(rapper_free_namespace_decl, NULL); raptor_sequence_push(namespace_declarations, nd); } else { int option_count = (int)raptor_option_get_count(); int i; size_t arg_len = strlen(optarg); option_value* fv; int ok = 0; /* parser options */ for(i = 0; i < option_count; i++) { raptor_domain domain; raptor_option_description *od; size_t name_len; domain = RAPTOR_DOMAIN_PARSER; od = raptor_world_get_option_description(world, domain, (raptor_option)i); if(!od) { domain = RAPTOR_DOMAIN_SERIALIZER; od = raptor_world_get_option_description(world, domain, (raptor_option)i); if(!od) /* Neither a parser or serializer option - skip */ continue; } name_len = od->name_len; if(!strncmp(optarg, od->name, name_len)) { fv = (option_value*)raptor_calloc_memory(sizeof(option_value), 1); fv->option = (raptor_option)i; if(od->value_type == RAPTOR_OPTION_VALUE_TYPE_BOOL || od->value_type == RAPTOR_OPTION_VALUE_TYPE_INT) { if(name_len < arg_len && optarg[name_len] == '=') fv->i_value = atoi(&optarg[name_len + 1]); else if(name_len == arg_len) fv->i_value = 1; } else { if(name_len < arg_len && optarg[name_len] == '=') fv->s_value = &optarg[name_len + 1]; else if(name_len == arg_len) fv->s_value = (const char*)""; } if(domain == RAPTOR_DOMAIN_PARSER) { if(!parser_options) parser_options = raptor_new_sequence(raptor_free_memory, NULL); raptor_sequence_push(parser_options, fv); } else { /* RAPTOR_DOMAIN_SERIALIZER */ if(!serializer_options) serializer_options = raptor_new_sequence(raptor_free_memory, NULL); raptor_sequence_push(serializer_options, fv); } ok = 1; } raptor_free_option_description(od); if(ok) break; } if(!ok) { fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(f, option) "'\n" "Try '%s " HELP_ARG(f, option) " help' for a list of valid options\n", program, optarg, program); usage = 1; } } } break; case 'g': guess = 1; break; case 'h': help = 1; break; case 't': trace = 1; break; case 'q': quiet = 1; break; case 'r': replace_newlines = 1; break; case 'o': if(optarg) { if(raptor_world_is_serializer_name(world, optarg)) serializer_syntax_name = optarg; else { int i; fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(o, output) "'\n", program, optarg); fprintf(stderr, "Valid arguments are:\n"); for(i = 0; 1; i++) { const raptor_syntax_description* sd; sd = raptor_world_get_serializer_description(world, i); if(!sd) break; fprintf(stderr, " %-14s for %s\n", sd->names[0], sd->label); } usage = 1; break; } } break; case 'O': if(optarg) output_base_uri_string = (const unsigned char*)optarg; break; case 'i': if(optarg) { if(raptor_world_is_parser_name(world, optarg)) syntax_name = optarg; else { int i; fprintf(stderr, "%s: invalid argument `%s' for `" HELP_ARG(i, input) "'\n", program, optarg); fprintf(stderr, "Valid arguments are:\n"); for(i = 0; 1; i++) { const raptor_syntax_description* sd; sd = raptor_world_get_parser_description(world, i); if(!sd) break; fprintf(stderr, " %-14s for %s\n", sd->names[0], sd->label); } usage = 1; break; } } break; case 'I': if(optarg) base_uri_string = (unsigned char*)optarg; break; case 'w': ignore_warnings = 1; break; case 'e': ignore_errors = 1; break; case 'v': fputs(raptor_version_string, stdout); fputc('\n', stdout); raptor_free_world(world); exit(0); #ifdef SHOW_NAMESPACES_FLAG case SHOW_NAMESPACES_FLAG: report_namespace = 1; break; #endif #ifdef SHOW_GRAPHS_FLAG case SHOW_GRAPHS_FLAG: report_graph = 1; break; #endif } /* end switch */ } if(optind != argc-1 && optind != argc-2 && !help && !usage) { usage = 2; /* Title and usage */ } if(usage) { if(usage > 1) { fprintf(stderr, title_format_string, raptor_version_string); fputs("Raptor home page: ", stderr); fputs(raptor_home_url_string, stderr); fputc('\n', stderr); fputs(raptor_copyright_string, stderr); fputs("\nLicense: ", stderr); fputs(raptor_license_string, stderr); fputs("\n\n", stderr); } fprintf(stderr, "Try `%s " HELP_ARG(h, help) "' for more information.\n", program); raptor_free_world(world); exit(1); } if(help) { int i; printf(title_format_string, raptor_version_string); puts("Parse RDF syntax from a source into serialized RDF triples."); printf("Usage: %s [OPTIONS] INPUT-URI [INPUT-BASE-URI]\n\n", program); fputs(raptor_copyright_string, stdout); fputs("\nLicense: ", stdout); puts(raptor_license_string); fputs("Raptor home page: ", stdout); puts(raptor_home_url_string); puts("\nArguments:"); puts(" INPUT-URI a filename, URI or '-' for standard input (stdin)."); puts(" INPUT-BASE-URI the input/parser base URI or '-' for none.\n" " Default is INPUT-URI\n" " Equivalent to" HELP_ARG_BOTH("I INPUT-BASE-URI", "input-uri INPUT-BASE-URI")); puts("\nMain options:"); puts(HELP_TEXT("i FORMAT", "input FORMAT ", "Set the input format/parser to one of:")); for(i = 0; 1; i++) { const raptor_syntax_description* sd; sd = raptor_world_get_parser_description(world, i); if(!sd) break; printf(" %-14s %s", sd->names[0], sd->label); if(!i) puts(" (default)"); else putchar('\n'); } puts(HELP_TEXT("I URI", "input-uri URI ", "Set the input/parser base URI. '-' for none.") HELP_PAD " Default is INPUT-BASE-URI argument value."); putchar('\n'); puts(HELP_TEXT("o FORMAT", "output FORMAT", "Set the output format/serializer to one of:")); for(i = 0; 1; i++) { const raptor_syntax_description* sd; sd = raptor_world_get_serializer_description(world, i); if(!sd) break; printf(" %-14s %s", sd->names[0], sd->label); if(!i) puts(" (default)"); else putchar('\n'); } puts(HELP_TEXT("O URI", "output-uri URI ", "Set the output/serializer base URI. '-' for none.") HELP_PAD " Default is input/parser base URI."); putchar('\n'); puts("General options:"); puts(HELP_TEXT("c", "count ", "Count triples only - do not print them.")); puts(HELP_TEXT("e", "ignore-errors ", "Ignore error messages")); puts(HELP_TEXT("f OPTION(=VALUE)", "feature OPTION(=VALUE)", HELP_PAD "Set parser or serializer options" HELP_PAD "Use `-f help' for a list of valid options")); puts(HELP_TEXT("g", "guess ", "Guess the input syntax (same as -i guess)")); puts(HELP_TEXT("h", "help ", "Print this help, then exit")); puts(HELP_TEXT("q", "quiet ", "No extra information messages")); puts(HELP_TEXT("r", "replace-newlines", "Replace newlines with spaces in literals")); #ifdef SHOW_GRAPHS_FLAG puts(HELP_TEXT_LONG("show-graphs ", "Show named graphs as they are declared")); #endif #ifdef SHOW_NAMESPACES_FLAG puts(HELP_TEXT_LONG("show-namespaces ", "Show namespaces as they are declared")); #endif puts(HELP_TEXT("t", "trace ", "Trace URIs retrieved during parsing")); puts(HELP_TEXT("w", "ignore-warnings ", "Ignore warning messages")); puts(HELP_TEXT("v", "version ", "Print the Raptor version")); puts("\nReport bugs to http://bugs.librdf.org/"); raptor_free_world(world); exit(0); } if(optind == argc-1) uri_string = (unsigned char*)argv[optind]; else { uri_string = (unsigned char*)argv[optind++]; base_uri_string = (unsigned char*)argv[optind]; } /* If uri_string is "path-to-file", turn it into a file: URI */ if(!strcmp((const char*)uri_string, "-")) { if(!base_uri_string) { fprintf(stderr, "%s: A Base URI is required when reading from standard input.\n", program); return(1); } uri_string = NULL; } else if(!access((const char*)uri_string, R_OK)) { filename = (char*)uri_string; uri_string = raptor_uri_filename_to_uri_string(filename); if(!uri_string) { fprintf(stderr, "%s: Failed to create URI for file %s.\n", program, filename); return(1); } free_uri_string = 1; } if(uri_string) { uri = raptor_new_uri(world, uri_string); if(!uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, uri_string); return(1); } } else uri = NULL; /* stdin */ /* Set the input/parser base URI */ if(base_uri_string) { if(strcmp((const char*)base_uri_string, "-")) { base_uri = raptor_new_uri(world, base_uri_string); if(!base_uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, base_uri_string); return(1); } } } /* Set the output/serializer base URI from the argument if explicitly * set, otherwise default to the input base URI if present. */ if(!output_base_uri_string) { if(base_uri) output_base_uri = raptor_uri_copy(base_uri); } else { if(strcmp((const char*)output_base_uri_string, "-")) { output_base_uri = raptor_new_uri(world, output_base_uri_string); if(!output_base_uri) { fprintf(stderr, "%s: Failed to create output base URI for %s\n", program, output_base_uri_string); return(1); } } else output_base_uri = NULL; } if(guess) syntax_name="guess"; rdf_parser = raptor_new_parser(world, syntax_name); if(!rdf_parser) { fprintf(stderr, "%s: Failed to create raptor parser type %s\n", program, syntax_name); return(1); } raptor_world_set_log_handler(world, rdf_parser, rapper_log_handler); if(parser_options) { option_value *fv; while((fv = (option_value*)raptor_sequence_pop(parser_options))) { raptor_parser_set_option(rdf_parser, fv->option, fv->s_value, fv->i_value); raptor_free_memory(fv); } raptor_free_sequence(parser_options); parser_options = NULL; } if(trace) raptor_parser_set_uri_filter(rdf_parser, rapper_uri_trace, rdf_parser); if(!quiet) { if(uri_string) { if(base_uri_string) fprintf(stderr, "%s: Parsing URI %s with parser %s and base URI %s\n", program, uri_string, syntax_name, base_uri_string); else fprintf(stderr, "%s: Parsing URI %s with parser %s\n", program, uri_string, syntax_name); } else { if(base_uri_string) fprintf(stderr, "%s: Parsing file %s with parser %s and base URI %s\n", program, FILENAME_LABEL(filename), syntax_name, base_uri_string); else fprintf(stderr, "%s: Parsing file %s with parser %s\n", program, FILENAME_LABEL(filename), syntax_name); } } raptor_parser_set_statement_handler(rdf_parser, rdf_parser, print_triples); if(report_graph) raptor_parser_set_graph_mark_handler(rdf_parser, rdf_parser, print_graph); if(report_namespace) raptor_parser_set_namespace_handler(rdf_parser, rdf_parser, print_namespaces); if(serializer_syntax_name) { if(!quiet) { if(output_base_uri) fprintf(stderr, "%s: Serializing with serializer %s and base URI %s\n", program, serializer_syntax_name, raptor_uri_as_string(output_base_uri)); else fprintf(stderr, "%s: Serializing with serializer %s\n", program, serializer_syntax_name); } serializer = raptor_new_serializer(world, serializer_syntax_name); if(!serializer) { fprintf(stderr, "%s: Failed to create raptor serializer type %s\n", program, serializer_syntax_name); return(1); } if(namespace_declarations) { int i; for(i = 0; i< raptor_sequence_size(namespace_declarations); i++) { struct namespace_decl *nd; raptor_uri *ns_uri = NULL; nd = (struct namespace_decl*)raptor_sequence_get_at(namespace_declarations, i); if(nd->uri_string) ns_uri = raptor_new_uri(world, nd->uri_string); raptor_serializer_set_namespace(serializer, ns_uri, nd->prefix); if(ns_uri) raptor_free_uri(ns_uri); } raptor_free_sequence(namespace_declarations); namespace_declarations = NULL; } if(serializer_options) { option_value *fv; while((fv = (option_value*)raptor_sequence_pop(serializer_options))) { raptor_serializer_set_option(serializer, fv->option, fv->s_value, fv->i_value); raptor_free_memory(fv); } raptor_free_sequence(serializer_options); serializer_options = NULL; } raptor_serializer_start_to_file_handle(serializer, output_base_uri, stdout); if(!report_namespace) raptor_parser_set_namespace_handler(rdf_parser, serializer, relay_namespaces); } /* Begin the parsing of the content from file or URI, * sending it to serializer via callback print_triples() */ rc = 0; if(!uri || filename) { if(raptor_parser_parse_file(rdf_parser, uri, base_uri)) { fprintf(stderr, "%s: Failed to parse file %s %s content\n", program, FILENAME_LABEL(filename), syntax_name); rc = 1; } } else { if(raptor_parser_parse_uri(rdf_parser, uri, base_uri)) { fprintf(stderr, "%s: Failed to parse URI %s %s content\n", program, uri_string, syntax_name); rc = 1; } } raptor_free_parser(rdf_parser); if(serializer) { raptor_serializer_serialize_end(serializer); raptor_free_serializer(serializer); } if(!quiet) { if(triple_count == 1) fprintf(stderr, "%s: Parsing returned 1 triple\n", program); else fprintf(stderr, "%s: Parsing returned %d triples\n", program, triple_count); } if(output_base_uri) raptor_free_uri(output_base_uri); if(base_uri) raptor_free_uri(base_uri); if(uri) raptor_free_uri(uri); if(free_uri_string) raptor_free_memory(uri_string); if(namespace_declarations) raptor_free_sequence(namespace_declarations); if(parser_options) raptor_free_sequence(parser_options); if(serializer_options) raptor_free_sequence(serializer_options); raptor_free_world(world); if(error_count && !ignore_errors) return 1; if(warning_count && !ignore_warnings) return 2; return(rc); } raptor2-2.0.15/utils/rapper.10000644000175000017500000001343212333764117012636 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" .\" rapper.1 - Raptor RDF parsing and serializing utility manual page .\" .\" Copyright (C) 2002-2010 David Beckett - http://www.dajobe.org/ .\" Copyright (C) 2002-2005 University of Bristol - http://www.bristol.ac.uk/ .\" .TH rapper 1 "2010-04-28" .\" Please adjust this date whenever revising the manpage. .SH NAME rapper \- Raptor RDF parsing and serializing utility .SH SYNOPSIS .B rapper .RB [ OPTIONS ] .IR "INPUT-URI" .IR "[INPUT-BASE-URI]" .SH EXAMPLE .nf .B rapper -o ntriples http://planetrdf.com/guide/rss.rdf .br .B rapper -i rss-tag-soup -o rss-1.0 pile-of-rss.xml http://example.org/base/ .br .B rapper --count http://example.org/index.rdf .SH DESCRIPTION The .B rapper utility allows parsing of RDF content by the .B Raptor RDF parser toolkit emitting the results as RDF triples in a choice of syntaxes. The \fIINPUT-URI\fR can be a file name, '-' for standard input or if Raptor is built with a WWW retrieval library, a general URI. The optional \fIINPUT-BASE-URI\fR is used as the document parser base URI if present otherwise defaults to the \fIINPUT-URI\fR. A value of '-' means no base URI. .SH OPTIONS rapper uses the usual GNU command line syntax, with long options starting with two dashes (`-') if supported by the getopt_long function. Otherwise the short options are only available. .TP .B \-h, \-\-help Show a summary of the options. .TP .B \-i, \-\-input FORMAT Set the input .I FORMAT to one of 'rdfxml' (RDF/XML, default), 'ntriples' (N-Triples, see below), 'turtle' (Turtle, see below) or 'rss-tag-soup' (RSS Tag Soup). The RSS Tag Soup parser can turn the many XML RSS formats and Atom 0.3 into RDF triples. .IP The list of parsers depends on how libraptor(3) was built. The list of supported parsers is given in the help summary given by \-h. .TP .B \-I, \-\-input-uri URI Set the input/parser base .I URI or use value '-' for no base. The default is the INPUT-URI argument value. .TP .B \-o, \-\-output FORMAT Set the output .I FORMAT to 'ntriples' (N-Triples, default), 'rdfxml' (RDF/XML), 'rdfxml-abbrev' (RDF/XML with abbreviations) or 'rss-1.0' (RSS 1.0, also an RDF/XML syntax). .IP The list of serializers depends on how libraptor(3) was built. The list of supported serializers is given in the help summary given by \-h. .TP .B \-O, \-\-output-uri URI Set the output/serializer base .I URI or use value '-' for no base. The default is the input base uri, either set by the argument INPUT-BASE-URI or via options .B \-I, \-\-input-uri URI .TP .B \-c, \-\-count Only count the triples and produce no other output. .TP .B \-e, \-\-ignore-errors Ignore errors, do not emit the messages and try to continue parsing. .TP .B \-f, \-\-feature FEATURE[=VALUE] Set a parser or serializer feature .I FEATURE to a value, or to 1 if .I VALUE is omitted, Use \-f help to get lists of valid parser and serializer features. .IP If the form \-f 'xmlns:\fIprefix\fP=\(dq\fIuri\fP\(dq' is used, the prefix and namespace uri given will be set for serializing. The syntax matches XML in that either or both of \fIprefix\fP or \fIuri\fP can be omitted. .TP .B \-g, \-\-guess Guess the parser to use from the source-URI rather than use the \-i FORMAT. .TP .B \-q, \-\-quiet No extra information messages. .TP .B \-r, \-\-replace-newlines Replace newlines in multi-line literals with spaces. .TP .B \-\-show-graphs Print graph names (URIs) as they are seen in the input. This only has a meaning for parsers that support graph names such as the TRiG parser. .TP .B \-\-show-namespaces Print namespaces as they are seen in the input. .TP .B \-t, \-\-trace Print URIs retrieved during parsing. Especially useful for monitoring what the guess and GRDDL parsers are doing. .TP .B \-w, \-\-ignore-warnings Ignore warnings, do not emit the messages. .TP .B \-v, \-\-version Print the raptor version and exit. .SH "EXAMPLES" .br .B rapper -q -i ntriples -o rdfxml -f 'xmlns:rss="http://purl.org/rss/1.0/"' -f 'xmlns:ex="http://example.org/"' tests/test.nt .br .B rapper -q -o rdfxml -f 'xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"' tests/rdf-schema.rdf 'http://www.w3.org/2000/01/rdf-schema#' .SH "CONFORMING TO" \fIRDF/XML Syntax (Revised)\fR, W3C Recommendation, .UR http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-syntax-grammar/ .UE \fIN-Triples\fR, in \fIRDF Test Cases\fR, Jan Grant and Dave Beckett (eds.), W3C Recommendation, .UR http://www.w3.org/TR/rdf-testcases/#ntriples http://www.w3.org/TR/rdf-testcases/#ntriples .UE \fITurtle Terse RDF Triple Language\fR, Dave Beckett, .UR http://www.dajobe.org/2004/01/turtle/ http://www.dajobe.org/2004/01/turtle/ .UE \fIRDFA in XHTML: Syntax and Processing\fR, Ben Adida, Mark Birbeck, Shane McCarron and Steven Pemberton (eds.), W3C Candidate Recommendation, 20 June 2008 .UR http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/ .UE \fIRDF Site Summary (RSS) 1.0\fR, 2000-12-06 .UR http://purl.org/rss/1.0/spec http://purl.org/rss/1.0/spec .UE .SH SEE ALSO .BR libraptor(3), raptor-config(1) .SH CHANGES .SS 2.0.0 Removed \-a option that did nothing. .LP Removed \-m option from rapper but it was never documented here. .LP Removed \-n option that was long hidden. .LP Removed \-s option that was equivalent to \-f scanForRDF .SS 1.4.16 Added \-I/\-\-input-uri and \-O/\-\-output\-uri to set the input and output (parser and serializer) base URIs separately. .SS 1.4.15 Added \-t/\-\-trace to do URI traces. .SS 1.4.5 Updated to add serializer rdfxml-abbrev .SS 1.4.3 Updated potential parser and serializers and described \-f for defining namespaces. .SS 1.3.0 Added \-f for features. .br Added \-g for guessing the parser to use. .SS 1.1.0 Removed \-a, \-\-assume since rdf:RDF is now always optional. .br .SH AUTHOR Dave Beckett - .UR http://www.dajobe.org/ http://www.dajobe.org/ .UE .br raptor2-2.0.15/utils/rapper.html0000644000175000017500000002313612354157631013444 00000000000000 Raptor RDF Parser Toolkit - Raptor RDF parser utility

Raptor RDF Parser Toolkit - Raptor RDF parser utility


NAME

rapper − Raptor RDF parsing and serializing utility

SYNOPSIS

rapper [OPTIONS] INPUT-URI [INPUT-BASE-URI]

EXAMPLE

rapper -o ntriples http://planetrdf.com/guide/rss.rdf
rapper -i rss-tag-soup -o rss-1.0 pile-of-rss.xml http://example.org/base/
rapper --count http://example.org/index.rdf

DESCRIPTION

The rapper utility allows parsing of RDF content by the Raptor RDF parser toolkit emitting the results as RDF triples in a choice of syntaxes. The INPUT-URI can be a file name, ’-’ for standard input or if Raptor is built with a WWW retrieval library, a general URI. The optional INPUT-BASE-URI is used as the document parser base URI if present otherwise defaults to the INPUT-URI. A value of ’-’ means no base URI.

OPTIONS

rapper uses the usual GNU command line syntax, with long options starting with two dashes (’-’) if supported by the getopt_long function. Otherwise the short options are only available.
−h, −−help

Show a summary of the options.

−i, −−input FORMAT

Set the input FORMAT to one of ’rdfxml’ (RDF/XML, default), ’ntriples’ (N-Triples, see below), ’turtle’ (Turtle, see below) or ’rss-tag-soup’ (RSS Tag Soup). The RSS Tag Soup parser can turn the many XML RSS formats and Atom 0.3 into RDF triples.

The list of parsers depends on how libraptor(3) was built. The list of supported parsers is given in the help summary given by −h.

−I, −−input-uri URI

Set the input/parser base URI or use value ’-’ for no base. The default is the INPUT-URI argument value.

−o, −−output FORMAT

Set the output FORMAT to ’ntriples’ (N-Triples, default), ’rdfxml’ (RDF/XML), ’rdfxml-abbrev’ (RDF/XML with abbreviations) or ’rss-1.0’ (RSS 1.0, also an RDF/XML syntax).

The list of serializers depends on how libraptor(3) was built. The list of supported serializers is given in the help summary given by −h.

−O, −−output-uri URI

Set the output/serializer base URI or use value ’-’ for no base. The default is the input base uri, either set by the argument INPUT-BASE-URI or via options −I, −−input-uri URI

−c, −−count

Only count the triples and produce no other output.

−e, −−ignore-errors

Ignore errors, do not emit the messages and try to continue parsing.

−f, −−feature FEATURE[=VALUE]

Set a parser or serializer feature FEATURE to a value, or to 1 if VALUE is omitted, Use −f help to get lists of valid parser and serializer features.

If the form −f ’xmlns:prefix="uri"’ is used, the prefix and namespace uri given will be set for serializing. The syntax matches XML in that either or both of prefix or uri can be omitted.

−g, −−guess

Guess the parser to use from the source-URI rather than use the −i FORMAT.

−q, −−quiet

No extra information messages.

−r, −−replace-newlines

Replace newlines in multi-line literals with spaces.

−−show-graphs

Print graph names (URIs) as they are seen in the input. This only has a meaning for parsers that support graph names such as the TRiG parser.

−−show-namespaces

Print namespaces as they are seen in the input.

−t, −−trace

Print URIs retrieved during parsing. Especially useful for monitoring what the guess and GRDDL parsers are doing.

−w, −−ignore-warnings

Ignore warnings, do not emit the messages.

−v, −−version

Print the raptor version and exit.

EXAMPLES

rapper -q -i ntriples -o rdfxml -f ’xmlns:rss="http://purl.org/rss/1.0/"’ -f ’xmlns:ex="http://example.org/"’ tests/test.nt
rapper -q -o rdfxml -f ’xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"’ tests/rdf-schema.rdf ’http://www.w3.org/2000/01/rdf-schema#’

CONFORMING TO

RDF/XML Syntax (Revised), W3C Recommendation, http://www.w3.org/TR/rdf-syntax-grammar/

N-Triples, in RDF Test Cases, Jan Grant and Dave Beckett (eds.), W3C Recommendation, http://www.w3.org/TR/rdf-testcases/#ntriples

Turtle Terse RDF Triple Language, Dave Beckett, http://www.dajobe.org/2004/01/turtle/

RDFA in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane McCarron and Steven Pemberton (eds.), W3C Candidate Recommendation, 20 June 2008 http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/

RDF Site Summary (RSS) 1.0, 2000-12-06 http://purl.org/rss/1.0/spec

SEE ALSO

libraptor(3),raptor-config(1)

CHANGES

2.0.0
Removed −a option that did nothing.

Removed −m option from rapper but it was never documented here.

Removed −n option that was long hidden.

Removed −s option that was equivalent to −f scanForRDF

1.4.16
Added −I/−−input-uri and −O/−−output−uri to set the input and output (parser and serializer) base URIs separately.

1.4.15
Added −t/−−trace to do URI traces.

1.4.5
Updated to add serializer rdfxml-abbrev

1.4.3
Updated potential parser and serializers and described −f for defining namespaces.

1.3.0
Added −f for features.
Added −g for guessing the parser to use.

1.1.0
Removed −a, −−assume since rdf:RDF is now always optional.

AUTHOR

Dave Beckett - http://www.dajobe.org/


Copyright 2002-2014 Dave Beckett
2002-2014 University of Bristol

raptor2-2.0.15/utils/raptor_getopt.h0000644000175000017500000000044311322277070014315 00000000000000/* * Public Domain getopt header * */ #ifndef RAPTOR_GETOPT_H #define RAPTOR_GETOPT_H #ifdef __cplusplus extern "C" { #endif int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt; #ifdef __cplusplus } #endif #endif raptor2-2.0.15/utils/rdfdiff.c0000644000175000017500000006207712414070650013034 00000000000000/* -*- Mode: c; c-basic-offset: 2 -*- * * rdfdiff.c - Raptor RDF diff tool * * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ * Copyright (C) 2005, Steve Shepard steveshep@gmail.com * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * * */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* Raptor includes */ #include #include /* for access() and R_OK */ #ifdef HAVE_STDLIB_H #include #endif #ifdef WIN32 #include #endif /* many places for getopt */ #ifdef HAVE_GETOPT_H #include #else #include #endif #ifdef HAVE_UNISTD_H #include #endif #if 0 #undef RAPTOR_DEBUG #define RAPTOR_DEBUG 2 #endif #ifndef RAPTOR_INTERNAL #define RAPTOR_MALLOC(type, size) (type)malloc(size) #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size) #define RAPTOR_FREE(type, ptr) free((void*)ptr) #endif #ifdef NEED_OPTIND_DECLARATION extern int optind; extern char *optarg; #endif #define MAX_ASCII_INT_SIZE 13 #define RDF_NAMESPACE_URI_LEN 43 #define ORDINAL_STRING_LEN (RDF_NAMESPACE_URI_LEN + MAX_ASCII_INT_SIZE + 1) #define GETOPT_STRING "bhf:t:u:" #ifdef HAVE_GETOPT_LONG static const struct option long_options[] = { /* name, has_arg, flag, val */ {"brief" , 0, 0, 'b'}, {"help" , 0, 0, 'h'}, {"from-format" , 1, 0, 'f'}, {"to-format" , 1, 0, 't'}, {"base-uri" , 1, 0, 'u'}, {NULL , 0, 0, 0} }; #endif #ifdef HAVE_GETOPT_LONG #define HELP_TEXT(short, long, description) " -" short ", --" long " " description #define HELP_ARG(short, long) "--" #long #define HELP_PAD "\n " #else #define HELP_TEXT(short, long, description) " -" short " " description #define HELP_ARG(short, long) "-" #short #define HELP_PAD "\n " #endif typedef struct rdfdiff_link_s { struct rdfdiff_link_s *next; raptor_statement *statement; } rdfdiff_link; typedef struct rdfdiff_blank_s { struct rdfdiff_blank_s *next; raptor_world *world; char *blank_id; raptor_statement *owner; rdfdiff_link *first; rdfdiff_link *last; int matched; } rdfdiff_blank; typedef struct { raptor_world *world; char *name; raptor_parser *parser; rdfdiff_link *first; rdfdiff_link *last; rdfdiff_blank *first_blank; rdfdiff_blank *last_blank; int statement_count; int error_count; int warning_count; int difference_count; } rdfdiff_file; static int brief = 0; static char *program = NULL; static const char * const title_format_string="Raptor RDF diff utility %s\n"; static int ignore_errors = 0; static int ignore_warnings = 0; static int emit_from_header = 1; static int emit_to_header = 1; static rdfdiff_file* from_file = NULL; static rdfdiff_file*to_file = NULL; static rdfdiff_file* rdfdiff_new_file(raptor_world* world, const unsigned char *name, const char *syntax); static void rdfdiff_free_file(rdfdiff_file* file); static rdfdiff_blank *rdfdiff_find_blank(rdfdiff_blank *first, char *blank_id); static rdfdiff_blank *rdfdiff_new_blank(raptor_world *world, char *blank_id); static void rdfdiff_free_blank(rdfdiff_blank *blank); static int rdfdiff_blank_equals(const rdfdiff_blank *b1, const rdfdiff_blank *b2, rdfdiff_file*b1_file, rdfdiff_file*b2_file); static void rdfdiff_log_handler(void *data, raptor_log_message *message); static void rdfdiff_collect_statements(void *user_data, raptor_statement *statement); int main(int argc, char *argv[]); /* Version of strcmp that can take NULL parameters. Assume that * Non-NULL strings are lexically greater than NULL strings */ static int safe_strcmp(const char *s1, const char *s2) { if(s1 == NULL && s2 == NULL) { return 0; } else if(s1 == NULL && s2 != NULL) { return -1; } else if(s1 != NULL && s2 == NULL) { return 1; } else { return strcmp(s1, s2); } } static rdfdiff_file* rdfdiff_new_file(raptor_world *world, const unsigned char *name, const char *syntax) { rdfdiff_file* file = RAPTOR_CALLOC(rdfdiff_file*, 1, sizeof(*file)); if(file) { file->world = world; file->name = RAPTOR_MALLOC(char*, strlen((const char*)name) + 1); strcpy((char*)file->name, (const char*)name); file->parser = raptor_new_parser(world, syntax); if(file->parser) { raptor_world_set_log_handler(world, file, rdfdiff_log_handler); } else { fprintf(stderr, "%s: Failed to create raptor parser type %s for %s\n", program, syntax, name); rdfdiff_free_file(file); return(0); } } return file; } static void rdfdiff_free_file(rdfdiff_file* file) { rdfdiff_link *cur, *next; rdfdiff_blank *cur1, *next1; if(file->name) RAPTOR_FREE(char*, file->name); if(file->parser) raptor_free_parser(file->parser); for(cur = file->first; cur; cur = next) { next = cur->next; raptor_free_statement(cur->statement); RAPTOR_FREE(rdfdiff_link, cur); } for(cur1 = file->first_blank; cur1; cur1 = next1) { next1 = cur1->next; rdfdiff_free_blank(cur1); } RAPTOR_FREE(rdfdiff_file, file); } static rdfdiff_blank * rdfdiff_new_blank(raptor_world* world, char *blank_id) { rdfdiff_blank *blank = RAPTOR_CALLOC(rdfdiff_blank*, 1, sizeof(*blank)); if(blank) { blank->world = world; blank->blank_id = RAPTOR_MALLOC(char*, strlen(blank_id) + 1); strcpy((char*)blank->blank_id, (const char*)blank_id); } return blank; } static void rdfdiff_free_blank(rdfdiff_blank *blank) { rdfdiff_link *cur, *next; if(blank->blank_id) RAPTOR_FREE(char*, blank->blank_id); if(blank->owner) raptor_free_statement(blank->owner); for(cur = blank->first; cur; cur = next) { next = cur->next; raptor_free_statement(cur->statement); RAPTOR_FREE(rdfdiff_link, cur); } RAPTOR_FREE(rdfdiff_blank, blank); } static int rdfdiff_statement_equals(raptor_world *world, const raptor_statement *s1, const raptor_statement *s2) { int rv = 0; if(!s1 || !s2) return 0; #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, "(rdfdiff_statement_equals) Comparing "); raptor_statement_print_as_ntriples(s1, stderr); fprintf(stderr, " to "); raptor_statement_print_as_ntriples(s2, stderr); #endif /* normal comparison */ if(s1->subject->type != s2->subject->type) { rv = 0; goto done; } if(s1->subject->type == RAPTOR_TERM_TYPE_BLANK) { /* Here for completeness. Anonymous nodes are taken care of * elsewhere */ /*if(strcmp((const char *)s1->subject, (const char *)s2->subject->value) != 0) return 0;*/ } else { if(!raptor_uri_equals(s1->subject->value.uri, s2->subject->value.uri)) { rv = 0; goto done; } } if(s1->predicate->type != s2->predicate->type) { rv = 0; goto done; } if(!raptor_uri_equals(s1->predicate->value.uri, s2->predicate->value.uri)) { rv = 0; goto done; } if(s1->object->type != s2->object->type) { rv = 0; goto done; } if(s1->object->type == RAPTOR_TERM_TYPE_LITERAL) { int equal; equal= !safe_strcmp((char *)s1->object->value.literal.string, (char *)s2->object->value.literal.string); if(equal) { if(s1->object->value.literal.language && s2->object->value.literal.language) equal = !strcmp((char *)s1->object->value.literal.language, (char *)s2->object->value.literal.language); else if(s1->object->value.literal.language || s2->object->value.literal.language) equal = 0; else equal = 1; if(equal) equal = raptor_uri_equals(s1->object->value.literal.datatype, s2->object->value.literal.datatype); } rv = equal; goto done; } else if(s1->object->type == RAPTOR_TERM_TYPE_BLANK) { /* Here for completeness. Anonymous nodes are taken care of * elsewhere */ /* if(strcmp((const char *)s1->object, (const char *)s2->object->value) != 0) return 0; */ } else { if(!raptor_uri_equals(s1->object->value.uri, s2->object->value.uri)) { rv = 0; goto done; } } rv = 1; done: #if defined(RAPTOR_DEBUG) && RAPTOR_DEBUG > 1 fprintf(stderr, " : %s\n", (rv ? "equal" : "not equal")); #endif return rv; } static int rdfdiff_blank_equals(const rdfdiff_blank *b1, const rdfdiff_blank *b2, rdfdiff_file *b1_file, rdfdiff_file *b2_file) { /* first compare "owners". Owners are subject/predicate or arcs * in. */ int equal = 0; if(b1->owner == NULL && b2->owner == NULL) { /* Both are "top-level" anonymous objects. I.E. Neither is the * object of a statement. Fall through and compare based on their * contents. */ equal = 1; } else if(b1->owner == NULL || b2->owner == NULL) { equal = 0; } else if(b1->owner->subject->type != RAPTOR_TERM_TYPE_BLANK && b2->owner->subject->type != RAPTOR_TERM_TYPE_BLANK) { /* Neither are anonymous. Normal comparison. This will return * false if both the subject and the predicates don't match. We * know the objects are blank nodes. */ equal = rdfdiff_statement_equals(b1->world, b1->owner, b2->owner); } else if(b1->owner->subject->type == RAPTOR_TERM_TYPE_BLANK && b2->owner->subject->type == RAPTOR_TERM_TYPE_BLANK) { rdfdiff_blank *p1; rdfdiff_blank *p2; /* Both are anonymous. Need further testing. Check that the * containing anononymous nodes are eaual. */ #if 0 fprintf(stderr, "b1->owner: "); raptor_statement_print_as_ntriples(b1->owner, stderr); fprintf(stderr, "\n"); fprintf(stderr, "b2->owner: "); raptor_statement_print_as_ntriples(b2->owner, stderr); fprintf(stderr, "\n"); #endif p1 = rdfdiff_find_blank(b1_file->first_blank, (char *)b1->owner->subject->value.blank.string); p2 = rdfdiff_find_blank(b2_file->first_blank, (char *)b2->owner->subject->value.blank.string); equal = rdfdiff_blank_equals(p1, p2, b1_file, b2_file); } else { equal = 0; } /* Now compare the contents. This accounts for the case where a * subject has several properties (of the same predicate value) with * different blank nodes as values. */ if(equal) { rdfdiff_link *s1 = b1->first; while(s1) { rdfdiff_link *s2 = b2->first; while(s2) { if(rdfdiff_statement_equals(b1->world, s1->statement, s2->statement)) break; s2 = s2->next; } if(s2 == 0) { equal = 0; break; } s1 = s1->next; } } return equal; } static void rdfdiff_log_handler(void *data, raptor_log_message *message) { rdfdiff_file* file = (rdfdiff_file*)data; switch(message->level) { case RAPTOR_LOG_LEVEL_FATAL: case RAPTOR_LOG_LEVEL_ERROR: if(!ignore_errors) { fprintf(stderr, "%s: Error - ", program); raptor_locator_print(message->locator, stderr); fprintf(stderr, " - %s\n", message->text); raptor_parser_parse_abort(file->parser); } file->error_count++; break; case RAPTOR_LOG_LEVEL_WARN: if(!ignore_warnings) { fprintf(stderr, "%s: Warning - ", program); raptor_locator_print(message->locator, stderr); fprintf(stderr, " - %s\n", message->text); } file->warning_count++; break; case RAPTOR_LOG_LEVEL_NONE: case RAPTOR_LOG_LEVEL_TRACE: case RAPTOR_LOG_LEVEL_DEBUG: case RAPTOR_LOG_LEVEL_INFO: fprintf(stderr, "%s: Unexpected %s message - ", program, raptor_log_level_get_label(message->level)); raptor_locator_print(message->locator, stderr); fprintf(stderr, " - %s\n", message->text); break; } } static rdfdiff_blank * rdfdiff_find_blank(rdfdiff_blank *first, char *blank_id) { rdfdiff_blank *rv_blank = 0; rdfdiff_blank *cur = first; while(cur) { if(strcmp(cur->blank_id, blank_id) == 0) { rv_blank = cur; break; } cur = cur->next; } return rv_blank; } static rdfdiff_blank * rdfdiff_lookup_blank(rdfdiff_file* file, char *blank_id) { rdfdiff_blank *rv_blank = rdfdiff_find_blank(file->first_blank, blank_id); if(!rv_blank) { rv_blank = rdfdiff_new_blank(file->world, blank_id); if(rv_blank) { if(!file->first_blank) { file->first_blank = rv_blank; file->last_blank = rv_blank; } else { file->last_blank->next = rv_blank; file->last_blank = rv_blank; } } } return rv_blank; } static int rdfdiff_add_blank_statement(rdfdiff_file* file, raptor_statement *statement) { rdfdiff_blank *blank; rdfdiff_link *dlink; blank = rdfdiff_lookup_blank(file, (char *)statement->subject->value.blank.string); if(!blank) goto failed; dlink = RAPTOR_MALLOC(rdfdiff_link*, sizeof(*dlink)); if(!dlink) goto failed; dlink->statement = raptor_statement_copy(statement); if(!dlink->statement) { RAPTOR_FREE(rdfdiff_link, dlink); goto failed; } dlink->next = NULL; if(!blank->first) { blank->first = dlink; blank->last = dlink; } else { blank->last->next = dlink; blank->last = dlink; } return 0; failed: fprintf(stderr, "%s: Internal Error\n", program); return 1; } static int rdfdiff_add_blank_statement_owner(rdfdiff_file* file, raptor_statement *statement) { rdfdiff_blank *blank; blank = rdfdiff_lookup_blank(file, (char*)statement->object->value.blank.string); if(!blank) goto failed; if(blank->owner) raptor_free_statement(blank->owner); blank->owner = raptor_statement_copy(statement); if(!blank->owner) goto failed; return 0; failed: fprintf(stderr, "%s: Internal Error\n", program); return 1; } static int rdfdiff_add_statement(rdfdiff_file* file, raptor_statement *statement) { int rv = 0; rdfdiff_link *dlink = RAPTOR_MALLOC(rdfdiff_link*, sizeof(*dlink)); if(dlink) { dlink->statement = raptor_statement_copy(statement); if(dlink->statement) { dlink->next = NULL; if(!file->first) { file->first = dlink; file->last = dlink; } else { file->last->next = dlink; file->last = dlink; } } else { RAPTOR_FREE(rdfdiff_link, dlink); rv = 1; } } else { rv = 1; } if(rv != 0) fprintf(stderr, "%s: Internal Error\n", program); return rv; } static rdfdiff_link* rdfdiff_statement_find(rdfdiff_file* file, const raptor_statement *statement, rdfdiff_link** prev_p) { rdfdiff_link* prev = NULL; rdfdiff_link* cur = file->first; while(cur) { if(rdfdiff_statement_equals(file->world, cur->statement, statement)) { if(prev_p) *prev_p=prev; return cur; } prev = cur; cur = cur->next; } return NULL; } static int rdfdiff_statement_exists(rdfdiff_file* file, const raptor_statement *statement) { rdfdiff_link* node; rdfdiff_link* prev = NULL; node = rdfdiff_statement_find(file, statement, &prev); return (node != NULL); } /* * rdfdiff_collect_statements - Called when parsing "from" file to build a * list of statements for comparison with those in the "to" file. */ static void rdfdiff_collect_statements(void *user_data, raptor_statement *statement) { int rv = 0; rdfdiff_file* file = (rdfdiff_file*)user_data; if(rdfdiff_statement_exists(file, statement)) return; file->statement_count++; if(statement->subject->type == RAPTOR_TERM_TYPE_BLANK || statement->object->type == RAPTOR_TERM_TYPE_BLANK) { if(statement->subject->type == RAPTOR_TERM_TYPE_BLANK) rv = rdfdiff_add_blank_statement(file, statement); if(rv == 0 && statement->object->type == RAPTOR_TERM_TYPE_BLANK) rv = rdfdiff_add_blank_statement_owner(file, statement); } else { rv = rdfdiff_add_statement(file, statement); } if(rv != 0) { raptor_parser_parse_abort(file->parser); } } int main(int argc, char *argv[]) { raptor_world *world = NULL; unsigned char *from_string = NULL; unsigned char *to_string = NULL; raptor_uri *from_uri = NULL; raptor_uri *to_uri = NULL; raptor_uri *base_uri = NULL; const char *from_syntax = "rdfxml"; const char *to_syntax = "rdfxml"; int free_from_string = 0; int free_to_string = 0; int usage = 0; int help = 0; char *p; int rv = 0; rdfdiff_blank *b1; rdfdiff_link *cur; program = argv[0]; if((p = strrchr(program, '/'))) program = p+1; else if((p = strrchr(program, '\\'))) program = p+1; argv[0] = program; world = raptor_new_world(); if(!world) exit(1); rv = raptor_world_open(world); if(rv) exit(1); while(!usage && !help) { int c; #ifdef HAVE_GETOPT_LONG int option_index = 0; c = getopt_long (argc, argv, GETOPT_STRING, long_options, &option_index); #else c = getopt (argc, argv, GETOPT_STRING); #endif if(c == -1) break; switch (c) { case 0: case '?': /* getopt() - unknown option */ usage = 1; break; case 'b': brief = 1; break; case 'h': help = 1; break; case 'f': if(optarg) from_syntax = optarg; break; case 't': if(optarg) to_syntax = optarg; break; case 'u': if(optarg) base_uri = raptor_new_uri(world, (const unsigned char*)optarg); break; } } if(optind != argc-2 && !help && !usage) { usage = 2; /* Title and usage */ } if(usage) { if(usage > 1) { fprintf(stderr, title_format_string, raptor_version_string); fputs(raptor_short_copyright_string, stderr); fputc('\n', stderr); } fprintf(stderr, "Try `%s " HELP_ARG(h, help) "' for more information.\n", program); rv = 1; goto exit; } if(help) { printf("Usage: %s [OPTIONS] \n", program); printf(title_format_string, raptor_version_string); puts(raptor_short_copyright_string); puts("Find differences between two RDF files."); puts("\nOPTIONS:"); puts(HELP_TEXT("h", "help ", "Print this help, then exit")); puts(HELP_TEXT("b", "brief ", "Report only whether files differ")); puts(HELP_TEXT("u BASE-URI", "base-uri BASE-URI ", "Set the base URI for the files")); puts(HELP_TEXT("f FORMAT", "from-format FORMAT ", "Format of (default is rdfxml)")); puts(HELP_TEXT("t FORMAT", "to-format FORMAT ", "Format of (default is rdfxml)")); rv = 1; goto exit; } from_string = (unsigned char *)argv[optind++]; to_string = (unsigned char *)argv[optind]; if(!access((const char *)from_string, R_OK)) { char *filename = (char *)from_string; from_string = raptor_uri_filename_to_uri_string(filename); if(!from_string) { fprintf(stderr, "%s: Failed to create URI for file %s.\n", program, filename); rv = 2; goto exit; } free_from_string = 1; } if(!access((const char *)to_string, R_OK)) { char *filename = (char *)to_string; to_string = raptor_uri_filename_to_uri_string(filename); if(!to_string) { fprintf(stderr, "%s: Failed to create URI for file %s.\n", program, filename); rv = 2; goto exit; } free_to_string = 1; } from_uri = raptor_new_uri(world, from_string); if(!from_uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, from_string); rv = 2; goto exit; } to_uri = raptor_new_uri(world, to_string); if(!to_uri) { fprintf(stderr, "%s: Failed to create URI for %s\n", program, from_string); rv = 2; goto exit; } /* create and init "from" data structures */ from_file = rdfdiff_new_file(world, from_string, from_syntax); if(!from_file) { rv = 2; goto exit; } /* create and init "to" data structures */ to_file = rdfdiff_new_file(world, to_string, to_syntax); if(!to_file) { rv = 2; goto exit; } /* parse the files */ raptor_parser_set_statement_handler(from_file->parser, from_file, rdfdiff_collect_statements); if(raptor_parser_parse_uri(from_file->parser, from_uri, base_uri)) { fprintf(stderr, "%s: Failed to parse URI %s as %s content\n", program, from_string, from_syntax); rv = 1; goto exit; } else { /* Note intentional from_uri as base_uri */ raptor_parser_set_statement_handler(to_file->parser, to_file, rdfdiff_collect_statements); if(raptor_parser_parse_uri(to_file->parser, to_uri, base_uri ? base_uri: from_uri)) { fprintf(stderr, "%s: Failed to parse URI %s as %s content\n", program, to_string, to_syntax); rv = 1; goto exit; } } /* Compare triples with no blank nodes */ cur = to_file->first; while(cur) { rdfdiff_link* node; rdfdiff_link* prev; node = rdfdiff_statement_find(from_file, cur->statement, &prev); if(node) { /* exists in from file - remove it from the list */ if(from_file->first == node) { from_file->first = node->next; } else { prev->next = node->next; } raptor_free_statement(node->statement); RAPTOR_FREE(rdfdiff_link, node); } else { if(!brief) { if(emit_from_header) { fprintf(stderr, "Statements in %s but not in %s\n", to_file->name, from_file->name); emit_from_header = 0; } fprintf(stderr, "< "); raptor_statement_print_as_ntriples(cur->statement, stderr); fprintf(stderr, "\n"); } to_file->difference_count++; } cur = cur->next; } /* Now compare the blank nodes */ b1 = to_file->first_blank; while(b1) { rdfdiff_blank *b2 = from_file->first_blank; while(b2) { if(!b2->matched && rdfdiff_blank_equals(b1, b2, to_file, from_file)) { b1->matched = 1; b2->matched = 1; break; } b2 = b2->next; } if(b2 == 0) { if(!brief) { #if 0 fprintf(stderr, "< "); raptor_statement_print_as_ntriples(b1->owner, stderr); fprintf(stderr, "\n"); #else if(emit_from_header) { fprintf(stderr, "Statements in %s but not in %s\n", to_file->name, from_file->name); emit_from_header = 0; } fprintf(stderr, "< anonymous node %s\n", b1->blank_id); #endif } to_file->difference_count++; } b1 = b1->next; } if(from_file->first) { /* The entrys left in from_file have not been found in to_file. */ if(!brief) { if(emit_to_header) { fprintf(stderr, "Statements in %s but not in %s\n", from_file->name, to_file->name); emit_to_header = 0; } cur = from_file->first; while(cur) { if(!brief) { fprintf(stderr, "> "); raptor_statement_print_as_ntriples(cur->statement, stderr); fprintf(stderr, "\n"); } cur = cur->next; from_file->difference_count++; } } } if(from_file->first_blank) { rdfdiff_blank *blank = from_file->first_blank; while(blank) { if(!blank->matched) { if(!brief) { #if 0 fprintf(stderr, "> "); raptor_statement_print_as_ntriples(blank->owner, stderr); fprintf(stderr, "\n"); #else if(emit_to_header) { fprintf(stderr, "Statements in %s but not in %s\n", from_file->name, to_file->name); emit_to_header = 0; } fprintf(stderr, "> anonymous node %s\n", blank->blank_id); #endif } from_file->difference_count++; } blank = blank->next; } } if(!(from_file->difference_count == 0 && to_file->difference_count == 0)) { if(brief) fprintf(stderr, "Files differ\n"); rv = 1; } exit: if(base_uri) raptor_free_uri(base_uri); if(from_file) rdfdiff_free_file(from_file); if(to_file) rdfdiff_free_file(to_file); if(free_from_string) raptor_free_memory(from_string); if(free_to_string) raptor_free_memory(to_string); if(from_uri) raptor_free_uri(from_uri); if(to_uri) raptor_free_uri(to_uri); raptor_free_world(world); return rv; } raptor2-2.0.15/aclocal.m40000644000175000017500000012167612425344564011777 00000000000000# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) ]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, # 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few `make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using `$V' instead of `$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([build/gtk-doc.m4]) m4_include([build/libtool.m4]) m4_include([build/ltoptions.m4]) m4_include([build/ltsugar.m4]) m4_include([build/ltversion.m4]) m4_include([build/lt~obsolete.m4]) m4_include([build/pkg.m4]) raptor2-2.0.15/raptor2.rdf.in0000644000175000017500000000712411472513121012605 00000000000000 Raptor Raptor RDF Parser Toolkit Library. is a free software / Open Source C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples by parsing syntaxes or serialize the triples into a syntax. The supported parsing syntaxes are RDF/XML, N-Triples, TRiG, Turtle, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing syntaxes are RDF/XML (regular, and abbreviated), N-Triples, RSS 1.0, Atom 1.0, XMP, Turtle, GraphViz DOT and JSON. Dave Beckett 970987f991961f2553a1bf2574166fa29befbccb stable 2005-02-01 @VERSION@ Dave Beckett 970987f991961f2553a1bf2574166fa29befbccb raptor2-2.0.15/gtk-doc.make0000644000175000017500000002061312425344561012310 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) else all-local: endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### setup-build.stamp: -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ echo ' DOC Preparing build'; \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi @touch setup-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo ' DOC Scanning header files' @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ echo " DOC Introspecting gobjects"; \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo ' DOC Rebuilding template files' @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo ' DOC Building XML' @-chmod -R u+w $(srcdir) @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building PDF' @rm -f $(DOC_MODULE).pdf @mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ rm -rf tmpl; \ fi maintainer-clean-local: clean @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs