diff --git a/config.h.in b/config.h.in index 7b54af2..12a461a 100644 --- a/config.h.in +++ b/config.h.in @@ -1,7 +1,5 @@ /* config.h.in. Generated from configure.in by autoheader. */ -#include - /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ @@ -335,6 +333,22 @@ /* The size of a `bool', as computed by sizeof. */ #undef SIZEOF_BOOL +/* The size of a `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + +/* The size of a `unsigned int', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_INT + +/* The size of a `unsigned short', as computed by sizeof. */ +#undef SIZEOF_UNSIGNED_SHORT + +/* The size of a `wchar_t', as computed by sizeof. */ +#undef SIZEOF_WCHAR_T + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#undef SIZE_MAX + /* define this if h_errno should be declared extern int */ #undef SP_DECLARE_H_ERRNO @@ -489,7 +503,7 @@ #define SP_SIZEOF_BOOL_1 #endif -#if (WCHAR_MAX == SHRT_MAX) +#if (SIZEOF_WCHAR_T == SIZEOF_UNSIGNED_SHORT) #define SP_WCHAR_T_USHORT #endif diff --git a/config.h.in.multilib b/config.h.in.multilib deleted file mode 100644 index 12a461a..0000000 --- a/config.h.in.multilib +++ /dev/null @@ -1,627 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* define this if memmove should be declared extern "C" */ -#undef DECLARE_MEMMOVE - -/* define this if strerror should be declared extern "C" */ -#undef DECLARE_STRERROR - -/* if this is not set it defaults to 200 */ -#undef DEFAULT_ERROR_LIMIT - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#undef ENABLE_NLS - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define to 1 if you have the `asprintf' function. */ -#undef HAVE_ASPRINTF - -/* define if bool is a built-in type */ -#undef HAVE_BOOL - -/* Define to 1 if you have the header file. */ -#undef HAVE_CASSERT - -/* Define if you have the gettext() function */ -#undef HAVE_CATGETS - -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -#undef HAVE_CFLOCALECOPYCURRENT - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -#undef HAVE_CFPREFERENCESCOPYAPPVALUE - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#undef HAVE_DCGETTEXT - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#undef HAVE_DECL_FEOF_UNLOCKED - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FGETS_UNLOCKED - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#undef HAVE_DECL_GETC_UNLOCKED - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#undef HAVE_DECL__SNPRINTF - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#undef HAVE_DECL__SNWPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* define if the compiler supports dynamic_cast<> */ -#undef HAVE_DYNAMIC_CAST - -/* Define to 1 if you have the `fwprintf' function. */ -#undef HAVE_FWPRINTF - -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `getegid' function. */ -#undef HAVE_GETEGID - -/* Define to 1 if you have the `geteuid' function. */ -#undef HAVE_GETEUID - -/* Define to 1 if you have the `getgid' function. */ -#undef HAVE_GETGID - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#undef HAVE_GETTEXT - -/* Define to 1 if you have the `getuid' function. */ -#undef HAVE_GETUID - -/* Define if you have the iconv() function. */ -#undef HAVE_ICONV - -/* define if the compiler supports explicit instantiations */ -#undef HAVE_INSTANTIATIONS - -/* Define if you have the 'intmax_t' type in or . */ -#undef HAVE_INTMAX_T - -/* Define if exists and doesn't clash with . */ -#undef HAVE_INTTYPES_H - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#undef HAVE_INTTYPES_H_WITH_UINTMAX - -/* Define to 1 if you have the header file. */ -#undef HAVE_IO_H - -/* Define if you have and nl_langinfo(CODESET). */ -#undef HAVE_LANGINFO_CODESET - -/* Define if your file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#undef HAVE_LIBPTHREAD - -/* Define to 1 if you have the `threads' library (-lthreads). */ -#undef HAVE_LIBTHREADS - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the 'long double' type. */ -#undef HAVE_LONG_DOUBLE - -/* Define if you have the 'long long' type. */ -#undef HAVE_LONG_LONG - -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define to 1 if you have the `memcmp' function. */ -#undef HAVE_MEMCMP - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mempcpy' function. */ -#undef HAVE_MEMPCPY - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the `munmap' function. */ -#undef HAVE_MUNMAP - -/* define if the compiler supports the mutable keyword */ -#undef HAVE_MUTABLE - -/* define if the compiler implements namespaces */ -#undef HAVE_NAMESPACES - -/* define if the C++ compiler supports the std namespace */ -#undef HAVE_NAMESPACE_STD - -/* Define to 1 if you have the header file. */ -#undef HAVE_NEW - -/* define if the compiler accepts the new for scoping rules */ -#undef HAVE_NEW_FOR_SCOPING - -/* Define to 1 if you have the header file. */ -#undef HAVE_NL_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OSFCN_H - -/* define if the compiler supports placement operator delete */ -#undef HAVE_PLACEMENT_OPERATOR_DELETE - -/* define if placement operator new is declared */ -#undef HAVE_PLACEMENT_OPERATOR_NEW - -/* Define if your printf() function supports format strings with positions. */ -#undef HAVE_POSIX_PRINTF - -/* Define to 1 if you have the `putenv' function. */ -#undef HAVE_PUTENV - -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* 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 if exists, doesn't clash with , and declares - uintmax_t. */ -#undef HAVE_STDINT_H_WITH_UINTMAX - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `stpcpy' function. */ -#undef HAVE_STPCPY - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* 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 `strtoul' function. */ -#undef HAVE_STRTOUL - -/* Define to 1 if `st_blksize' is member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_BLKSIZE - -/* Define if your `struct stat' has `st_blksize'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ -#undef HAVE_ST_BLKSIZE - -/* 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_TYPES_H - -/* Define to 1 if you have the `tsearch' function. */ -#undef HAVE_TSEARCH - -/* define if the compiler recognizes typename */ -#undef HAVE_TYPENAME - -/* Define if you have the 'uintmax_t' type in or . */ -#undef HAVE_UINTMAX_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the 'unsigned long long' type. */ -#undef HAVE_UNSIGNED_LONG_LONG - -/* Define if you have the 'wchar_t' type. */ -#undef HAVE_WCHAR_T - -/* Define to 1 if you have the `wcslen' function. */ -#undef HAVE_WCSLEN - -/* Define if you have the 'wint_t' type. */ -#undef HAVE_WINT_T - -/* Define to 1 if you have the `__argz_count' function. */ -#undef HAVE___ARGZ_COUNT - -/* Define to 1 if you have the `__argz_next' function. */ -#undef HAVE___ARGZ_NEXT - -/* Define to 1 if you have the `__argz_stringify' function. */ -#undef HAVE___ARGZ_STRINGIFY - -/* Define to 1 if you have the `__fsetlocking' function. */ -#undef HAVE___FSETLOCKING - -/* Define as const if the declaration of iconv() needs const. */ -#undef ICONV_CONST - -/* Define if integer division by zero raises signal SIGFPE. */ -#undef INTDIV0_RAISES_SIGFPE - -/* 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 version of this package. */ -#undef PACKAGE_VERSION - -/* set this to the path separator */ -#undef PATH_SEPARATOR - -/* Define if exists and defines unusable PRI* macros. */ -#undef PRI_MACROS_BROKEN - -/* set this to the default catalog files list */ -#undef SGML_CATALOG_FILES_DEFAULT - -/* set this to the default SGML search path */ -#undef SGML_SEARCH_PATH_DEFAULT - -/* The size of a `bool', as computed by sizeof. */ -#undef SIZEOF_BOOL - -/* The size of a `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of a `unsigned int', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_INT - -/* The size of a `unsigned short', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_SHORT - -/* The size of a `wchar_t', as computed by sizeof. */ -#undef SIZEOF_WCHAR_T - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#undef SIZE_MAX - -/* define this if h_errno should be declared extern int */ -#undef SP_DECLARE_H_ERRNO - -/* define this to include template definitions in the headers */ -#undef SP_DEFINE_TEMPLATES - -/* define this to build a dll */ -#undef SP_DLLEXPORT - -/* define this tobuild a dll */ -#undef SP_DLLIMPORT - -/* set this to enable DTDDECL support */ -#undef SP_DTDDECL - -/* define this if the new handler takes size_t and returns int */ -#undef SP_FANCY_NEW_HANDLER - -/* define this if _setmode is supported */ -#undef SP_HAVE_SETMODE - -/* define this if sockets are available */ -#undef SP_HAVE_SOCKET - -/* set this to the first line term character */ -#undef SP_LINE_TERM1 - -/* set this to the second line term character */ -#undef SP_LINE_TERM2 - -/* location of message catalogs */ -#undef SP_LOCALE_DIR - -/* define this to compile explicit template instantiations */ -#undef SP_MANUAL_INST - -/* message domain */ -#undef SP_MESSAGE_DOMAIN - -/* define this to build a multi-byte version */ -#undef SP_MULTI_BYTE - -/* define this to use win32 mutex mechanisms */ -#undef SP_MUTEX_WIN32 - -/* define this if your system misses new.h */ -#undef SP_NEW_H_MISSING - -/* define this to not compile message texts in */ -#undef SP_NO_MESSAGE_TEXT - -/* Package name */ -#undef SP_PACKAGE - -/* define this to enable precompiled header support */ -#undef SP_PCH - -/* define this if set_new_handler() has to be declared extern "C" */ -#undef SP_SET_NEW_HANDLER_EXTERN_C - -/* define this to build a dll */ -#undef SP_USE_DLL - -/* define this if you can't or don't want to use the builtin assert() macro */ -#undef SP_USE_OWN_ASSERT - -/* Package version */ -#undef SP_VERSION - -/* define this if the OS provides wide character interfaces */ -#undef SP_WIDE_SYSTEM - -/* set this to enable XML Formatted Messages */ -#undef SP_XML - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -/* 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 - -/* Define to `long' if does not define. */ -#undef off_t - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -#undef ptrdiff_t - -/* Define to `int' if does not define. */ -#undef sig_atomic_t - -/* Define to empty if the C compiler doesn't support this keyword. */ -#undef signed - -/* Define to `unsigned' if does not define. */ -#undef size_t - -/* Define to unsigned long or unsigned long long if and - don't define. */ -#undef uintmax_t - - -#ifdef HAVE_UNISTD_H -#define SP_INCLUDE_UNISTD_H -#endif - -#ifdef HAVE_IO_H -#undef SP_INCLUDE_IO_H -#endif - -#ifdef HAVE_OSFCN_H -#undef SP_INCLUDE_OSFCN_H -#endif - -#ifndef SP_MSDOS_FILENAMES -#define SP_POSIX_FILENAMES -#endif - -#ifdef HAVE_ST_BLKSIZE -#define SP_STAT_BLKSIZE -#endif - -#ifdef HAVE_BOOL -#ifndef SP_HAVE_BOOL -#define SP_HAVE_BOOL -#endif -#endif /* HAVE_BOOL */ - -#ifdef HAVE_TYPENAME -#define SP_HAVE_TYPENAME -#endif /* HAVE_TYPENAME */ - -#if (SIZEOF_BOOL == 1) -#define SP_SIZEOF_BOOL_1 -#endif - -#if (SIZEOF_WCHAR_T == SIZEOF_UNSIGNED_SHORT) -#define SP_WCHAR_T_USHORT -#endif - -#ifdef SP_HAVE_SETMODE -#ifndef SP_LINE_TERM1 -#define SP_LINE_TERM1 '\r' -#define SP_LINE_TERM2 '\n' -#endif -#endif /* not SP_HAVE_SETMODE */ - -#ifndef SP_LINE_TERM1 -#define SP_LINE_TERM1 '\n' -#endif - -#ifndef HAVE_NEW_FOR_SCOPING -// This simulates the new ANSI "for" scope rules -#define for if (0); else for -#endif /* HAVE_NEW_FOR_SCOPING */ - -#ifndef SP_HAVE_TYPENAME -#define typename /* as nothing */ -#endif - -#ifndef SP_DLLEXPORT -#define SP_DLLEXPORT /* as nothing */ -#endif - -#ifndef SP_DLLIMPORT -#define SP_DLLIMPORT /* as nothing */ -#endif - -#ifdef SP_USE_DLL - -#ifdef BUILD_LIBSP -#define SP_API SP_DLLEXPORT -#else -#define SP_API SP_DLLIMPORT -#endif - -#else /* not SP_USE_DLL */ - -#define SP_API /* as nothing */ - -#endif /* not SP_USE_DLL */ - -#ifdef SP_WIDE_SYSTEM -#ifndef SP_MULTI_BYTE -#define SP_MULTI_BYTE -#endif -#endif - -#ifdef HAVE_NAMESPACES -#define SP_NAMESPACE OpenSP -#endif /* HAVE_NAMESPACES */ - -#ifdef SP_NAMESPACE -#define SP_NAMESPACE_SCOPE SP_NAMESPACE:: -#else -#define SP_NAMESPACE_SCOPE -#endif /* SP_NAMESPACE */ - -#ifdef HAVE_DYNAMIC_CAST -#define SP_HAVE_RTTI -#endif /* HAVE_DYNAMIC_CAST */ - -#ifdef HAVE_PATHNAME_STYLE_DOS -#define SP_MSDOS_FILENAMES -#else -#define SP_POSIX_FILENAMES -#endif /* HAVE_PATHNAME_STYLE_DOS */ - -#ifdef HAVE_INSTANTIATIONS -#ifndef SP_ANSI_CLASS_INST -#define SP_ANSI_CLASS_INST -#endif -#endif /* HAVE_INSTANTIATIONS */ - -#ifdef HAVE_SETLOCALE -#ifndef SP_HAVE_LOCALE -#define SP_HAVE_LOCALE -#endif -#endif /* HAVE_SETLOCALE */ - -#if defined(HAVE_GETTEXT) && defined(ENABLE_NLS) -#ifndef SP_HAVE_GETTEXT -#define SP_HAVE_GETTEXT -#endif -#endif /* HAVE_GETTEXT && ENABLE_NLS */ - -#ifdef WORDS_BIGENDIAN -#define SP_BIG_ENDIAN -#endif /* WORDS_BIGENDIAN */ - -#ifdef HAVE_LIBTHREADS -#define SP_MUTEX_MACH -#endif /* HAVE_LIBTHREADS */ - -#ifdef HAVE_LIBPTHREAD -#define SP_MUTEX_PTHREADS -#endif /* HAVE_LIBPTHREAD */ - -#ifdef HAVE_PLACEMENT_OPERATOR_DELETE -#define SP_HAVE_PLACEMENT_OPERATOR_DELETE -#endif /* HAVE_PLACEMENT_OPERATOR_DELETE */ - -#ifndef HAVE_PLACEMENT_OPERATOR_NEW -#define SP_DECLARE_PLACEMENT_OPERATOR_NEW -#endif /* HAVE_PLACEMENT_OPERATOR_NEW */ - -#ifndef HAVE_NAMESPACE_STD -#define SP_NO_STD_NAMESPACE -#endif /* HAVE_NAMESPACE_STD */ - -#if defined(HAVE_NEW) && defined(HAVE_CASSERT) -#define SP_ANSI_LIB 1 -#endif /* HAVE_NEW && HAVE_CASSERT */ - -#ifndef HAVE_MUTABLE -#define mutable -#endif /* HAVE_MUTABLE */ - diff --git a/configure.in b/configure.in index fbfb311..22b5fde 100644 --- a/configure.in +++ b/configure.in @@ -90,7 +90,7 @@ AH_BOTTOM([ #define SP_SIZEOF_BOOL_1 #endif -#if (WCHAR_MAX == SHRT_MAX) +#if (SIZEOF_WCHAR_T == SIZEOF_UNSIGNED_SHORT) #define SP_WCHAR_T_USHORT #endif diff --git a/configure.in.multilib b/configure.in.multilib deleted file mode 100644 index 22b5fde..0000000 --- a/configure.in.multilib +++ /dev/null @@ -1,562 +0,0 @@ -AC_REVISION([$Id: configure.in,v 1.29.2.41 2005/12/16 08:12:19 tbe Exp $]) -dnl -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (C) 1998 Cees A. de Groot -dnl - -dnl -dnl Credits: this autoconf script was largely "inspired" by the -dnl autoconf script around SP made by Henry Thompson. -dnl - -dnl Initialization. -AC_INIT -AC_CONFIG_SRCDIR([pubtext]) -AM_INIT_AUTOMAKE(OpenSP, 1.5.2, no-define) -AM_MAINTAINER_MODE -AC_PREREQ(2.53) -AM_CONFIG_HEADER(config.h) -AM_SANITY_CHECK - -dnl Autoheader definitions - -AH_TEMPLATE([HAVE_CATGETS],[Define if you have the gettext() function]) -AH_TEMPLATE([SGML_CATALOG_FILES_DEFAULT],[set this to the default catalog files list]) -AH_TEMPLATE([SGML_SEARCH_PATH_DEFAULT],[set this to the default SGML search path]) -AH_TEMPLATE([SP_DECLARE_H_ERRNO],[define this if h_errno should be declared extern int]) -AH_TEMPLATE([DECLARE_MEMMOVE],[define this if memmove should be declared extern "C"]) -AH_TEMPLATE([DECLARE_STRERROR],[define this if strerror should be declared extern "C"]) -AH_TEMPLATE([SP_HAVE_SOCKET],[define this if sockets are available]) -AH_TEMPLATE([sig_atomic_t],[define this appropriately if the type sig_atomic_t is not available]) -AH_TEMPLATE([SP_NEW_H_MISSING],[define this if your system misses new.h]) -AH_TEMPLATE([SP_SET_NEW_HANDLER_EXTERN_C],[define this if set_new_handler() has to be declared extern "C"]) -AC_DEFINE(SP_MULTI_BYTE,[1],[define this to build a multi-byte version]) -AH_TEMPLATE([SP_DEFINE_TEMPLATES],[define this to include template definitions in the headers]) -AH_TEMPLATE([SP_MANUAL_INST],[define this to compile explicit template instantiations]) -AH_TEMPLATE([SP_FANCY_NEW_HANDLER],[define this if the new handler takes size_t and returns int.]) -AH_TEMPLATE([PATH_SEPARATOR],[set this to the path separator]) -AH_TEMPLATE([DEFAULT_ERROR_LIMIT],[if this is not set it defaults to 200 ]) -AH_TEMPLATE([SP_USE_OWN_ASSERT],[define this if you can't or don't want to use the builtin assert() macro]) -AH_TEMPLATE([SP_LINE_TERM1],[set this to the first line term character]) -AH_TEMPLATE([SP_LINE_TERM2],[set this to the second line term character]) - -dnl These are really windows only - -AH_TEMPLATE([SP_MUTEX_WIN32],[define this to use win32 mutex mechanisms]) -AH_TEMPLATE([SP_HAVE_SETMODE],[define this if _setmode is supported]) -AH_TEMPLATE([SP_NO_MESSAGE_TEXT],[define this to not compile message texts in]) -AH_TEMPLATE([SP_USE_DLL],[define this to build a dll]) -AH_TEMPLATE([SP_DLLEXPORT],[define this to build a dll]) -AH_TEMPLATE([SP_DLLIMPORT],[define this tobuild a dll]) -AH_TEMPLATE([SP_WIDE_SYSTEM],[define this if the OS provides wide character interfaces]) -AH_TEMPLATE([SP_PCH],[define this to enable precompiled header support]) -AH_TEMPLATE([SP_LOCALE_DIR],[the location we install our messages]) - -AH_TEMPLATE([SIZEOF_WCHAR_T],[size of wchar_t]) - -AH_BOTTOM([ -#ifdef HAVE_UNISTD_H -#define SP_INCLUDE_UNISTD_H -#endif - -#ifdef HAVE_IO_H -#undef SP_INCLUDE_IO_H -#endif - -#ifdef HAVE_OSFCN_H -#undef SP_INCLUDE_OSFCN_H -#endif - -#ifndef SP_MSDOS_FILENAMES -#define SP_POSIX_FILENAMES -#endif - -#ifdef HAVE_ST_BLKSIZE -#define SP_STAT_BLKSIZE -#endif - -#ifdef HAVE_BOOL -#ifndef SP_HAVE_BOOL -#define SP_HAVE_BOOL -#endif -#endif /* HAVE_BOOL */ - -#ifdef HAVE_TYPENAME -#define SP_HAVE_TYPENAME -#endif /* HAVE_TYPENAME */ - -#if (SIZEOF_BOOL == 1) -#define SP_SIZEOF_BOOL_1 -#endif - -#if (SIZEOF_WCHAR_T == SIZEOF_UNSIGNED_SHORT) -#define SP_WCHAR_T_USHORT -#endif - -#ifdef SP_HAVE_SETMODE -#ifndef SP_LINE_TERM1 -#define SP_LINE_TERM1 '\r' -#define SP_LINE_TERM2 '\n' -#endif -#endif /* not SP_HAVE_SETMODE */ - -#ifndef SP_LINE_TERM1 -#define SP_LINE_TERM1 '\n' -#endif - -#ifndef HAVE_NEW_FOR_SCOPING -// This simulates the new ANSI "for" scope rules -#define for if (0); else for -#endif /* HAVE_NEW_FOR_SCOPING */ - -#ifndef SP_HAVE_TYPENAME -#define typename /* as nothing */ -#endif - -#ifndef SP_DLLEXPORT -#define SP_DLLEXPORT /* as nothing */ -#endif - -#ifndef SP_DLLIMPORT -#define SP_DLLIMPORT /* as nothing */ -#endif - -#ifdef SP_USE_DLL - -#ifdef BUILD_LIBSP -#define SP_API SP_DLLEXPORT -#else -#define SP_API SP_DLLIMPORT -#endif - -#else /* not SP_USE_DLL */ - -#define SP_API /* as nothing */ - -#endif /* not SP_USE_DLL */ - -#ifdef SP_WIDE_SYSTEM -#ifndef SP_MULTI_BYTE -#define SP_MULTI_BYTE -#endif -#endif - -#ifdef HAVE_NAMESPACES -#define SP_NAMESPACE OpenSP -#endif /* HAVE_NAMESPACES */ - -#ifdef SP_NAMESPACE -#define SP_NAMESPACE_SCOPE SP_NAMESPACE:: -#else -#define SP_NAMESPACE_SCOPE -#endif /* SP_NAMESPACE */ - -#ifdef HAVE_DYNAMIC_CAST -#define SP_HAVE_RTTI -#endif /* HAVE_DYNAMIC_CAST */ - -#ifdef HAVE_PATHNAME_STYLE_DOS -#define SP_MSDOS_FILENAMES -#else -#define SP_POSIX_FILENAMES -#endif /* HAVE_PATHNAME_STYLE_DOS */ - -#ifdef HAVE_INSTANTIATIONS -#ifndef SP_ANSI_CLASS_INST -#define SP_ANSI_CLASS_INST -#endif -#endif /* HAVE_INSTANTIATIONS */ - -#ifdef HAVE_SETLOCALE -#ifndef SP_HAVE_LOCALE -#define SP_HAVE_LOCALE -#endif -#endif /* HAVE_SETLOCALE */ - -#if defined(HAVE_GETTEXT) && defined(ENABLE_NLS) -#ifndef SP_HAVE_GETTEXT -#define SP_HAVE_GETTEXT -#endif -#endif /* HAVE_GETTEXT && ENABLE_NLS */ - -#ifdef WORDS_BIGENDIAN -#define SP_BIG_ENDIAN -#endif /* WORDS_BIGENDIAN */ - -#ifdef HAVE_LIBTHREADS -#define SP_MUTEX_MACH -#endif /* HAVE_LIBTHREADS */ - -#ifdef HAVE_LIBPTHREAD -#define SP_MUTEX_PTHREADS -#endif /* HAVE_LIBPTHREAD */ - -#ifdef HAVE_PLACEMENT_OPERATOR_DELETE -#define SP_HAVE_PLACEMENT_OPERATOR_DELETE -#endif /* HAVE_PLACEMENT_OPERATOR_DELETE */ - -#ifndef HAVE_PLACEMENT_OPERATOR_NEW -#define SP_DECLARE_PLACEMENT_OPERATOR_NEW -#endif /* HAVE_PLACEMENT_OPERATOR_NEW */ - -#ifndef HAVE_NAMESPACE_STD -#define SP_NO_STD_NAMESPACE -#endif /* HAVE_NAMESPACE_STD */ - -#if defined(HAVE_NEW) && defined(HAVE_CASSERT) -#define SP_ANSI_LIB 1 -#endif /* HAVE_NEW && HAVE_CASSERT */ - -#ifndef HAVE_MUTABLE -#define mutable -#endif /* HAVE_MUTABLE */ -]) - -dnl Since config.h gets included by user programs, we use special names -dnl for PACKAGE and VERSION. -AC_DEFINE_UNQUOTED(SP_PACKAGE, "$PACKAGE", [Package name]) -AC_DEFINE_UNQUOTED(SP_VERSION, "$VERSION", [Package version]) - -dnl libosp current:revision:age -SP_LIBOSP_CUR=5 -dnl AC_DEFINE_UNQUOTED(SP_LIBOSP_CUR, "$SP_LIBOSP_CUR", [libosp current]) -AC_SUBST(SP_LIBOSP_CUR) -AC_SUBST(SP_LIBOSP_REV, 0) -AC_SUBST(SP_LIBOSP_AGE, 0) - -dnl Check for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_CXXCPP -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PATH_PROGS(PERL, perl, perl) -AC_PROG_LIBTOOL -dnl Checks for libraries. -AC_CHECK_LIB(pthread,pthread_create,,AC_CHECK_LIB(threads,cthread_fork)) - -AM_GNU_GETTEXT -AM_GNU_GETTEXT_VERSION([0.14.5]) -AC_CHECK_HEADERS(locale.h) -AC_DEFINE_DIR(SP_LOCALE_DIR, datadir/locale, [location of message catalogs]) -SP_MESSAGE_DOMAIN="sp$SP_LIBOSP_CUR" -AC_DEFINE_UNQUOTED(SP_MESSAGE_DOMAIN, "$SP_MESSAGE_DOMAIN", [message domain]) -AC_SUBST(SP_MESSAGE_DOMAIN) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(limits.h unistd.h io.h osfcn.h) -AC_LANG([C++]) -AC_CHECK_HEADERS(new cassert) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_BIGENDIAN -AC_TYPE_SIZE_T -AC_DIAGNOSE([obsolete],[AC_DIAGNOSE([obsolete],[AC_STRUCT_ST_BLKSIZE: - your code should no longer depend upon `HAVE_ST_BLKSIZE', but - `HAVE_STRUCT_STAT_ST_BLKSIZE'. Remove this warning and - the `AC_DEFINE' when you adjust the code.]) -AC_CHECK_MEMBERS([struct stat.st_blksize],[AC_DEFINE(HAVE_ST_BLKSIZE, 1, - [Define to 1 if your `struct stat' has - `st_blksize'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])]) -: - your code should no longer depend upon `HAVE_ST_BLKSIZE', but - `HAVE_STRUCT_STAT_ST_BLKSIZE'. Remove this warning and - the `AC_DEFINE' when you adjust the code.]) -AC_CHECK_MEMBERS([struct stat.st_blksize],[AC_DEFINE(HAVE_ST_BLKSIZE, 1, - [Define if your `struct stat' has - `st_blksize'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])]) - -AC_CACHE_CHECK(for sig_atomic_t in signal.h, - ac_cv_have_sig_atomic_t, - AC_TRY_LINK([#include ],sig_atomic_t x;, - ac_cv_have_sig_atomic_t=yes, - ac_cv_have_sig_atomic_t=no)) -if test "$ac_cv_have_sig_atomic_t" = "no" -then - AC_CHECK_TYPE(sig_atomic_t,int) -fi -AC_CHECK_SIZEOF(size_t) -AC_CHECK_SIZEOF(unsigned int) -AC_CHECK_SIZEOF(unsigned short) -AC_CHECK_SIZEOF(wchar_t,,[ - #include - #include ]) -AC_CXX_BOOL -if test "$ac_cv_cxx_bool" = yes; then - AC_CHECK_SIZEOF(bool) -fi -AC_CXX_MUTABLE -AC_CXX_TYPENAME -AC_CXX_NEW_FOR_SCOPING -AC_CXX_PLACEMENT_OPERATOR_DELETE -AC_CXX_DYNAMIC_CAST -AC_CXX_NAMESPACES -AC_CXX_EXPLICIT_INSTANTIATIONS -AC_CACHE_CHECK(for placement operator new, -ac_cv_cxx_placement_operator_new, -[AC_TRY_COMPILE([#include -#ifdef HAVE_NEW -#include -#else -#include -#endif -class A { -public: - A() {}; -}; -A* foo() -{ - void *x; - A *bar = new (x) A; - return bar; -};],, - ac_cv_cxx_placement_operator_new=yes, - ac_cv_cxx_placement_operator_new=no) -]) -if test "$ac_cv_cxx_placement_operator_new" = yes; then - AC_DEFINE(HAVE_PLACEMENT_OPERATOR_NEW,1, - [define if placement operator new is declared]) -fi -AC_CACHE_CHECK(whether the C++ compiler supports the std namespace, -ac_cv_cxx_namespace_std, -[AC_TRY_COMPILE([ -#ifdef HAVE_NEW -#include -#else -#include -#endif],[ -std::set_new_handler(0);], - ac_cv_cxx_namespace_std=yes, - ac_cv_cxx_namespace_std=no) -]) -if test "$ac_cv_cxx_namespace_std" = yes; then - AC_DEFINE(HAVE_NAMESPACE_STD,1, - [define if the C++ compiler supports the std namespace]) -fi -if test "$GXX"; then -dnl FIXME these need tests for non-GNU compilers - AC_CACHE_CHECK(whether GNU C++ supports automatic template instantiation, - ac_cv_c_gnu_automatic_templates, - [AC_EGREP_CPP(yes,[ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 8) - yes -#endif - ], - ac_cv_c_gnu_automatic_templates=yes, - ac_cv_c_gnu_automatic_templates=no) - ]) - if test "$ac_cv_c_gnu_automatic_templates" = yes; then - AC_DEFINE(SP_DEFINE_TEMPLATES,1, - [define this to include template definitions in the headers]) - else - AC_DEFINE(SP_MANUAL_INST,1, - [define this to compile explicit template instantiations]) - CXXFLAGS="$CXXFLAGS -fno-implicit-templates" - fi - AC_CACHE_CHECK(whether GNU C++ links with libg++ if we include new.h, - ac_cv_cxx_gnu_avoid_new_h, - [AC_EGREP_CPP(yes,[ -#if (__GNUC__ == 2 && __GNUC_MINOR__ < 8) - yes -#endif - ], - ac_cv_cxx_gnu_avoid_new_h=yes, - ac_cv_cxx_gnu_avoid_new_h=no) - ]) - if test "$ac_cv_cxx_gnu_avoid_new_h" = yes; then - AC_DEFINE(SP_NEW_H_MISSING,1, - [define this if your system misses new.h]) - AC_CACHE_CHECK(whether to declare set_new_handler extern "C", - ac_cv_cxx_new_handler_extern_c, - [AC_TRY_LINK([ -typedef void (*new_handler)(); -new_handler set_new_handler(new_handler);],[ -set_new_handler(0);], - ac_cv_cxx_new_handler_extern_c=no, - ac_cv_cxx_new_handler_extern_c=yes) - ]) - if test "$ac_cv_cxx_new_handler_extern_c" = yes; then - AC_DEFINE(SP_SET_NEW_HANDLER_EXTERN_C,1, - [define this if set_new_handler() has to be declared extern "C"]) - fi - fi -fi -AC_CACHE_CHECK(whether new_handler accepts size_t and returns int, -ac_cv_cxx_fancy_new_handler, -[AC_TRY_COMPILE([ -#include -#include -int oom(size_t) { }],[set_new_handler(oom);], - ac_cv_cxx_fancy_new_handler=yes, - ac_cv_cxx_fancy_new_handler=no) - ]) -if test "$ac_cv_cxx_fancy_new_handler" = yes; then - AC_DEFINE(SP_FANCY_NEW_HANDLER,1, - [define this if the new handler takes size_t and returns int]) -fi - -dnl Checks for library functions. -AC_REPLACE_FUNCS(memmove memcmp strerror strtoul) -AC_CHECK_FUNCS(setlocale) - -dnl Checks for system services. -ACX_CHECK_PATHNAME_STYLE_DOS - -AC_MSG_CHECKING(whether to include support for http) -AC_ARG_ENABLE(http, -[ --enable-http include support for http], - if test $enableval - then - AC_MSG_RESULT(yes) - AC_DEFINE(SP_HAVE_SOCKET,1, - [define this if sockets are available]) - AC_CHECK_LIB(nsl,main,LIBS="$LIBS -lnsl") - AC_CHECK_LIB(socket,main,LIBS="$LIBS -lsocket") - AC_MSG_CHECKING(h_errno in netdb.h) - AC_EGREP_HEADER(h_errno,netdb.h, - AC_MSG_RESULT(yes), - AC_DEFINE(SP_DECLARE_H_ERRNO,1, - [define this if h_errno should be declared extern int]) - AC_MSG_RESULT(no)) - else - AC_MSG_RESULT(no) - fi, - AC_MSG_RESULT(no)) -AC_MSG_CHECKING(for default catalog) -AC_ARG_ENABLE(default-catalog, -[ --enable-default-catalog=pathlist - provide one or more default catalog files or - sysids, e.g. /usr/local/lib/sgml/catalog], - if test $enableval - then - AC_MSG_RESULT($enableval) - AC_DEFINE_UNQUOTED(SGML_CATALOG_FILES_DEFAULT,"$enableval", - [set this to the default catalog files list]) - else - AC_MSG_RESULT(none) - fi, - AC_MSG_RESULT(none)) -AC_MSG_CHECKING(for default search path) -AC_ARG_ENABLE(default-search-path, -[ --enable-default-search-path=pathlist - provide a default value for SGML_SEARCH_PATH], - if test $enableval - then - AC_MSG_RESULT($enableval) - AC_DEFINE_UNQUOTED(SGML_SEARCH_PATH_DEFAULT,"$enableval", - [set this to the default SGML search path]) - else - AC_MSG_RESULT(none) - fi, - AC_MSG_RESULT(none)) -AC_MSG_CHECKING(whether to include support for XML Formatted Messages) -AC_ARG_ENABLE(xml-messages, -[ --enable-xml-messages include support for XML Formatted Messages], - if test $enableval - then - AC_MSG_RESULT(yes) - AC_DEFINE(SP_XML,1,[set this to enable XML Formatted Messages]) - else - AC_MSG_RESULT(no) - fi, - AC_MSG_RESULT(no)) -DTDDECL=yes -AC_MSG_CHECKING(whether to include DTDDECL support) -AC_ARG_ENABLE(dtddecl, -[ --disable-dtddecl disable support for DTDDECL catalog entries], - if test "$enableval" = "no" - then - AC_MSG_RESULT(no) - DTDDECL=no - else - AC_MSG_RESULT(yes) - fi, - AC_MSG_RESULT(yes)) -if test "$DTDDECL" = "yes" -then - AC_DEFINE(SP_DTDDECL,1,[set this to enable DTDDECL support]) - AM_CONDITIONAL(DTDDECL,true) -else - AM_CONDITIONAL(DTDDECL,false) -fi - -dnl Output. -AC_CONFIG_FILES([${PACKAGE}-${VERSION}.spec:spec.in Makefile msggen.pl - lib/Makefile nsgmls/Makefile spent/Makefile - spam/Makefile sgmlnorm/Makefile sx/Makefile spcat/Makefile - include/Makefile include/config.h.old generic/Makefile doc/Makefile - pubtext/Makefile tests/Makefile unicode/Makefile intl/Makefile - po/Makefile.in]) - -BUILDDOCS=yes -AC_MSG_CHECKING([whether to build docs (man and html)]) -AC_ARG_ENABLE(doc-build, - [ --disable-doc-build do not build docs from source], - if test "$enableval" = "no" - then - AC_MSG_RESULT(no) - BUILDDOCS=no - else - AC_MSG_RESULT(yes) - fi, - AC_MSG_RESULT(yes)) - -if test "$BUILDDOCS" = "yes" -then - AC_PATH_PROG(XMLTO, xmlto) - if test -z "$XMLTO" - then AC_MSG_ERROR( -[could not find xmlto; set XMLTO or consider --disable-doc-build]) - fi - AC_SUBST(DOCSRC, docsrc) - AC_CONFIG_FILES(docsrc/Makefile) -fi - -BUILDFULLDOCS=no -AC_MSG_CHECKING([whether to build all docs (man, html, pdf, ps)]) -AC_ARG_ENABLE(full-doc-build, - [ --enable-full-doc-build build all docs from source], - if test "$enableval" = "yes" - then - AC_MSG_RESULT(yes) - BUILDFULLDOCS=yes - else - AC_MSG_RESULT(no) - fi, - AC_MSG_RESULT(no)) - -if test "$BUILDFULLDOCS" = "yes" -then - AC_PATH_PROG(PDF2PS, pdf2ps) - if test -z "$PDF2PS" - then AC_MSG_ERROR( -[could not find pdf2ps; set PDF2PS or consider --disable-doc-build]) - fi - AC_PATH_PROG(JADE, openjade jade) - if test -z "$JADE" - then - AC_MSG_ERROR( -[could not find openjade or jade; set JADE or consider --disable-doc-build]) - fi - AC_PATH_PROG(JADETEX, jadetex) - if test -z "$JADETEX" - then - AC_MSG_ERROR( -[could not find jadetex; set JADETEX or consider --disable-doc-build]) - fi - AC_PATH_PROG(PDFJADETEX, pdfjadetex) - if test -z "$PDFJADETEX" - then - AC_MSG_ERROR( -[could not find pdfjadetex; set PDFJADETEX or consider --disable-doc-build]) - fi - AC_SUBST(EXTRADOCS,["releasenotes.pdf releasenotes.ps"]) -fi - -AC_OUTPUT diff --git a/docsrc/osgmlnorm.xml b/docsrc/osgmlnorm.xml index 85237fc..79f7ad6 100644 --- a/docsrc/osgmlnorm.xml +++ b/docsrc/osgmlnorm.xml @@ -173,15 +173,6 @@ Show error numbers in error messages. - - - - - - Show the generic identifiers of open elements in error - messages. - - diff --git a/docsrc/osgmlnorm.xml.manpage b/docsrc/osgmlnorm.xml.manpage deleted file mode 100644 index 79f7ad6..0000000 --- a/docsrc/osgmlnorm.xml.manpage +++ /dev/null @@ -1,253 +0,0 @@ - - -
- - osgmlnorm - - James - Clark - - - Ian - Castle -
ian.castle@openjade.org
-
- - 2002 - OpenJade Project - -
- -
- Reference - - - - osgmlnorm - January 2002 - OpenJade - - - - osgmlnorm - 1 - - - - osgmlnorm - An SGML/XML document normalizer - - - - - osgmlnorm - - - - - - - - - - - sysid - - - - - - - Description - - osgmlnorm prints on the standard output a normalized document instance - for the SGML document contained in the concatenation of the entities - with system identifiers sysid. - - When the normalized instance is prefixed with the original SGML - declaration and prolog, it will have the same ESIS as the original - SGML document, with the following exceptions: -* The output of osgmlnorm does not protect against the recognition of - short reference delimiters, so any USEMAP declarations must be - removed from the DTD. - * The normalized instance will use the reference delimiters, even if - the original instance did not. - * If marked sections are included in the output using the -m option, - the reference reserved names will be used for the status keywords - even if the original instance did not. - * Any ESIS information relating to the SGML LINK feature will be - lost. - - The normalized instance will not use any markup minimization features - except that: -* Any attributes that were not specified in the original instance - will not be included in the normalized instance. (Current - attributes will be included.) - * If the declared value of an attribute was a name token group, and - a value was specified that was the same as the name of the - attribute, then the attribute name and value indicator will be - omitted. For example, with HTML osgmlnorm would output <DL COMPACT> - rather than <DL COMPACT="COMPACT"> - - Part of an SGML System Conforming to International Standard ISO 8879 -- Standard Generalized Markup Language. An SGML Extended Facilities system conforming to Annex A of International Standard ISO/IEC 10744 -- Hypermedia/Time-based Structuring Language. - The following options are available: - - - - - - - Make doctype or linktype name active. - - - - - - - - Parse with respect to architecture architecture. - - - - - - - - Use the BCTF with name bctf for output. - - - - - - - - Map public identifiers and entity names to system identifiers - using the catalog entry file whose system identifier is - sysid. - - - - - - - - This has the same effect as in onsgmls(1). - - - - - - - - Output a document type declaration with the same external - identifier as the input document, and with no internal - declaration subset. No check is performed that the document - instance is valid with respect to this DTD. - - - - - - - - Search directory for files specified in system identifiers. - This has the same effect as in onsgmls(1). - - - - - - - - Describe open entities in error messages. - - - - - - - Show error numbers in error messages. - - - - - - - - Display a help text and exit. - - - - - - - - This has the same effect as in onsgmls(1). - - - - - - - - Output any marked sections that were in the input document - instance. - - - - - - - - Output any comments that were in the input document instance. - - - - - - - - Raw output. Don't perform any conversion on RSs and REs when - printing the entity. The entity would typically have the - storage manager attribute records=asis. - - - - - - - - This has the same effect as in onsgmls(1). - - - - - - - - Print the version number. - - - - - - - Control warnings and errors according to type. This has the - same effect as in onsgmls(1). - - - - - - - See Also - onsgmls(1), ospam(1), - ospent(1), osx(1) - - -
-
diff --git a/docsrc/ospam.xml b/docsrc/ospam.xml index 93c2098..5217f2e 100644 --- a/docsrc/ospam.xml +++ b/docsrc/ospam.xml @@ -151,16 +151,6 @@ of stderr.
- - - - - - Show the generic identifiers of open elements in error - messages. - - - diff --git a/docsrc/ospam.xml.manpage b/docsrc/ospam.xml.manpage deleted file mode 100644 index 5217f2e..0000000 --- a/docsrc/ospam.xml.manpage +++ /dev/null @@ -1,362 +0,0 @@ - - -
- - ospam - - James - Clark - - - Ian - Castle -
ian.castle@openjade.org
-
- - - 2002 - OpenJade Project - -
- - -
- Reference - - - - ospam - November 2002 - OpenJade - - - - ospam - 1 - - - - ospam - An SGML/XML markup stream editor - - - - - ospam - - - - - - - - - - - sysid - - - - - - Description - - ospam (OpenSP Add Markup) is an SGML markup stream editor implemented using - the OpenSP parser. ospam parses the SGML document contained in sysid and - copies to the standard output the portion of the document entity - containing the document instance, adding or changing markup as - specified by the options. The option can be used to include the - SGML declaration and prolog in the output. The option can be used - to output other entities. The option can be used to expand entity - references. - - Part of an SGML System Conforming to International Standard ISO 8879 -- Standard Generalized Markup Language. An SGML Extended Facilities system conforming to Annex A of Internation Standard ISO/IEC 10744 -- Hypermedia/Time-based Structuring Language. - - The following options are available: - - - - - - - Make doctype or linktype name active. - - - - - - - - Parse with respect to architecture architecture. - - - - - - - - Use bctf bctf for output. - - - - - - - - Use the catalog entry file sysid. - - - - - - - - This has the same effect as in onsgmls(1). - - - - - - - - Search directory for files specified in system identifiers. - This has the same effect as in onsgmls(1). - - - - - - - Describe open entities in error messages. - - - - - - - - Exit after max_errors errors are encountered. - - - - - - - Redirect errors to file. - This is useful mainly with shells that do not support redirection - of stderr. - - - - - - - Hoist omitted tags out from the start of internal entities. If - the text at the beginning of an internal entity causes a tag to - be implied, the tag will usually be treated as being in that - internal entity; this option will instead cause it to be - treated as being in the entity that referenced the internal - entity. This option makes a difference in conjunction with - or . - - - - - - - Display a help text and exit. - - - - - - - - This has the same effect as in onsgmls(1). - - - - - - - - Prefer lower-case. Added names that were subject to upper-case - substitution will be converted to lower-case. - - - - - - - - Change the markup in the output according to the value of - markup_option as follows: - - - Add tags that were omitted using omitted tag - minimization. End tags that were omitted because the - element has a declared content of EMPTY or an explicit - content reference will not be added. - - - Replace short references by named entity references. - - - Change null end-tags into unminimized end-tags, and - change net-enabling start-tags into unminimized - start-tags. - - - Change empty tags into unminimized tags. - - - Change unclosed tags into unminimized tags. - - - Add omitted attribute names and vis. - - - Add literal delimiters omitted from attribute values. - - - Add omitted attribute specifications. - - - Add omitted attribute specifications for current - attributes. This option is implied by the attspec option. - - - Equivalent to combination of net, emptytag, unclosed, - attname, attvalue and attspec options. - - - Add omitted rank suffixes. - - - Put reserved names in upper-case. - - - Remove marked section declarations whose effective status - is IGNORE, and replace each marked section declaration - whose effective status is INCLUDE by its marked section. - In the document instance, empty comments will be added - before or after the marked section declaration to ensure - that ignored record ends remain ignored. - - Multiple -m options are allowed. - - - - - - - - Show error numbers in error messages. - - - - - - - - Output the general entity name instead of the document entity. - The output will correspond to the first time that the entity is - referenced in content. - - - - - - - - Output the part of the document entity containing the SGML - declaration (if it was explicitly present in the document - entity) and the prolog before anything else. If this option is - specified two or more times, then all entity references - occurring between declarations in the prolog will be expanded; - this includes the implicit reference to the entity containing - the external subset of the DTD, if there is one. Note that the - SGML declaration will not be included if it was specified by an - SGMLDECL entry in a catalog. - - - - - - - - Don't perform any conversion on RSs and REs when outputting the - entity. The entity would typically have the storage manager - attribute records=asis. - - - - - - - - This as the same effect as in onsgmls(1) - - - - - - - - Print the version number. - - - - - - - - Control warnings and errors according to type. This has the - same effect as in onsgmls(1). - - - - - - - - Expand references to entities that are changed. If this option - is specified two or more times, then all references to entities - that contain tags will be expanded. - - - - - - - Bugs - - Omitted tags are added at the point where they are implied by the SGML - parser (except as modified by the option); this is often not quite - where they are wanted. - - The case of general delimiters is not preserved. - - Incorrect results may be produced if a variant concrete syntax is used - which is such that there are delimiters in markup to be added that - have a prefix that is a proper suffix of some other delimiter. - - If an entity reference in a default value uses the default entity and - an entity with that name is subsequently defined and that default - value is added to the document instance, then the resulting document - may not be equivalent to the original document. ospam will give a - warning when the first two conditions are met. - - - - See Also - onsgmls(1), ospent(1), - onsgmlnorm(1), osx(1) - - -
-
diff --git a/docsrc/releasenotes.xml b/docsrc/releasenotes.xml index 73ceeb7..48a4a70 100644 --- a/docsrc/releasenotes.xml +++ b/docsrc/releasenotes.xml @@ -1,7 +1,7 @@ - + OpenSP 1.5.2 Release Notes @@ -16,7 +16,7 @@ - OpenSP 1.5.2 Release Notes + OpenSP 1.5.2 Release Notes The OpenJade project provides a suite of tools and libraries for validating, processing and applying DSSSL (Document Style Semantics and @@ -29,7 +29,7 @@ as Jade. can be used as a basis for either open source or commerical projects. The library can be built as either a dynamic or static library. - Applications of OpenSP + Applications of OpenSP The OpenSP library has been used in a number of projects. The World Wide Web consortium on-line HTML and XHTML validator is based on the OpenSP library. In addition to the OpenSP library a set of command line tools @@ -41,7 +41,7 @@ SGML to XML to allow a library of SGML documents to be processed with XML tools. - Obtaining OpenSP + Obtaining OpenSP OpenSP is a project hosted at sourceforge.net and is available from the OpenJade web site at http://openjade.sourceforge.net or directly from the OpenJade project page at http://sourceforge.net/projects/openjade @@ -49,7 +49,7 @@ the OpenJade project page at http://sourceforge.net/projects/openjade linkend="bindist"/> for information on how to obtain pre-compiled binary packages. - Supported Platforms + Supported Platforms OpenSP is intended to be as portable as possible. It should be possible to compile and build on most contemporary UNIX type platforms. In addition OpenSP should also build on Microsoft's Win32 based operating @@ -166,7 +166,7 @@ i386 and ia64, Alpha AXP, Sparc, PPC and S/390. openjade-devel@lists.sourceforge.net, including any diffs/patches you have used. - Building OpenSP from Source + Building OpenSP from Source OpenSP requires 20Mb to 50Mb of disk space to build. An installation will require around 10Mb to 20Mb depending on architecture. @@ -249,7 +249,7 @@ distributions as well as FreeBSD. Expect pre-compiled and packaged versions of the latest version of OpenSP to be available from your distributor in due course. - Installation + Installation In addition to the OpenSP executables and libraries you will also need various DTDs and declaration files. Some DTDs and associated files (entity definitions) are available in the pubtext @@ -263,7 +263,7 @@ versions may be available from other sources. recommended that you set up and use such a catalog system. - Support + Support If, after reading the documentation, you still have a problem, then you may require some additional help. The OpenJade project is a volunteer effort and as such does not provide any formal support. Instead, you should @@ -299,7 +299,7 @@ searchable. It is always worth searching for your problem first, as it is often the case that someone has had the same problem before. - Version 1.5.2 + Version 1.5.2 Released December 2005. The release contains a number of enhancements together with support for version 4.0 of the GNU C++ compiler. @@ -418,7 +418,7 @@ Turkish translation. - Version 1.5.1 + Version 1.5.1 Released October 2003. The release contains a number of new features together with support for version 3.3 for the GNU C++ compiler. @@ -613,7 +613,7 @@ compiler support - Version 1.5 + Version 1.5 Released November 2002. In addition to many new features this version also supports the latest GNU C++ compiler: gcc 3.2 at the time of writing. @@ -976,7 +976,7 @@ characters and supports the full UTF-16 range 0x000000-0x10ffff - + Version 1.4 Released February 2000 Version 1.4 added many improvements. Changes @@ -1023,7 +1023,7 @@ manager. - Version 1.3.4 + Version 1.3.4 Released October 1999 The second release from the OpenJade project. This version was distributed as part of OpenJade 1.3 @@ -1040,7 +1040,7 @@ Added the Entity classes to the public interface of the library/DLL. - Version 1.3.3 + Version 1.3.3 The first release from the OpenJade project diff --git a/docsrc/releasenotes.xml.nodeids b/docsrc/releasenotes.xml.nodeids deleted file mode 100644 index 48a4a70..0000000 --- a/docsrc/releasenotes.xml.nodeids +++ /dev/null @@ -1,1047 +0,0 @@ - - - - - OpenSP 1.5.2 - Release Notes - OpenJade Project - Release 1.5.2 - September 2005 - - 2002 - 2003 - 2005 - OpenJade Project - - - - OpenSP 1.5.2 Release Notes - - The OpenJade project provides a suite of tools and libraries for -validating, processing and applying DSSSL (Document Style Semantics and -Specification Language) style sheets to SGML and XML documents. - OpenJade is a project undertaken by the community to maintain and -extend James Clark's Jade, as well as the related SP suite of SGML/XML -processing tools. OpenJade and OpenSP are distributed under the same license -as Jade. - OpenSP is written in C++ and provides a class library, libosp, which -can be used as a basis for either open source or commerical projects. The -library can be built as either a dynamic or static library. - - Applications of OpenSP - The OpenSP library has been used in a number of projects. The -World Wide Web consortium on-line HTML and XHTML validator is based on the -OpenSP library. In addition to the OpenSP library a set of command line tools -are provided to support the validation and transformation of SGML files. In -particular onsgmls can validate both XML and SGML documents -held on a local file system or accessed remotely via a web server using the -HTTP protocol with standard URI notation; osx will convert -SGML to XML to allow a library of SGML documents to be processed with XML -tools. - - - Obtaining OpenSP - OpenSP is a project hosted at sourceforge.net and is available -from the OpenJade web site at http://openjade.sourceforge.net or directly from -the OpenJade project page at http://sourceforge.net/projects/openjade - OpenSP is provided in source code form. However, see for information on how to obtain pre-compiled -binary packages. - - Supported Platforms - OpenSP is intended to be as portable as possible. It should be -possible to compile and build on most contemporary UNIX type platforms. In -addition OpenSP should also build on Microsoft's Win32 based operating -systems. - - OpenSP is known to compile with both the GNU gcc c++ compiler and -Microsoft Visual C++. Other compilers have not been extensively tested. - OpenSP 1.5.2 should build with the GNU gcc c++ compiler from -version 2.95 up to version 4.0. - OpenSP has been built on a number of architectures including Intel -i386 and ia64, Alpha AXP, Sparc, PPC and S/390. - The following table details known successful builds - Platforms on which OpenSP -1.5 is known to build - - - - - - - - Arch. - OS - Compiler - Notes - - - - - alpha - Debian 3.1 - GNU gcc 4.0 - - - - arm - Debian 3.1 - GNU gcc 4.0 - - - - hppa - Debian 3.1 - GNU gcc 4.0 - - - - i386 - Debian 3.1 - GNU gcc 4.0 - - - - Red Hat Linux 7.3 - Red Hat gcc 2.96 - - - - Red Hat Linux 7.3 - GNU gcc 3.2 - - - - SuSE Linux 8.1 - GNU gcc 3.2 - - - - ia64 - Debian 3.1 - GNU gcc 4.0 - - - - m68k - Debian 3.1 - GNU gcc 4.0 - - - - mips, mipsel - Debian 3.1 - GNU gcc 4.0 - - - - powerpc - Debian 3.1 - GNU gcc 4.0 - - - - s390 - Debian 3.1 - GNU gcc 4.0 - - - - sparc - Debian 3.1 - GNU gcc 4.0 - - - - sparc - Solaris 8/SunOS 5.8 - GNU gcc 4.0 - - - - -
- Please report any successful builds not mentioned above to -openjade-devel@lists.sourceforge.net, including any -diffs/patches you have used. -
- Building OpenSP from Source - OpenSP requires 20Mb to 50Mb of disk space to build. An -installation will require around 10Mb to 20Mb depending on -architecture. - On UNIX platforms, OpenSP makes use of the GNU software -configuration tools (autoconf, libtool, automake etc). The GNU C++ compiler -and make utility should also be used. The steps required to build the OpenSP -tools (onsgmls, osgmlnorm, -ospam, ospcat, -ospent, osx) and libraries are as -follows: -gzip -d OpenSP-1.5.2.tar.gz | tar xvf - -cd OpenSP-1.5.2 -./configure -make You may need to switch to the super user -root to complete the installation -make install -The configure script supports many options. These -can be displayed using the command -./configure --help -In addition to the standard options, the following table describes options -specific to OpenSP. - OpenSP specific configure -options - - - - - - - Option - Default - Explanation - - - - - - No http support - Include support for http. This allows the OpenSP tools to -be used to validate or process SGML or XML documents directly from the World -Wide Web. Example: onsgmls -s http://www.example.com - - - - Not enabled - Provide one or more default catalog files or sysids, e.g. -/usr/local/lib/sgml/catalog - - - - Not enabled - Provide a default value for -SGML_SEARCH_PATH - - - - Not enabled - Include support for XML Formatted Messages - - - - Enabled - Do not build docs (man pages and release notes) - - - - Enabled - Do not include support for DTDDECL - - - -
- Please refer to the system documentation for details on building -on the Win32 platform. -
- Binary Distributions - In addition to binary packages availble from the project, OpenSP -has been a part of many software distributions, including the major Linux -distributions as well as FreeBSD. Expect pre-compiled and packaged versions of -the latest version of OpenSP to be available from your distributor in due -course. - - Installation - In addition to the OpenSP executables and libraries you will also -need various DTDs and declaration files. Some DTDs and associated files -(entity definitions) are available in the pubtext -directory of the distribution. However, more authoritative sources should be -referenced to ensure that up-to-date versions are used. If you wish to process -XML files, then suitable SGML declarations for valid XML documents should be -used. Again, a sample set of declarations (xml.dcl) is -provided in the pubtext, but more complete or recent -versions may be available from other sources. - OpenSP supports the standard SGML catalog facility; it is -recommended that you set up and use such a catalog system. - - - Support - If, after reading the documentation, you still have a problem, -then you may require some additional help. The OpenJade project is a volunteer -effort and as such does not provide any formal support. Instead, you should -look to the community for support. Once part of the community, you, in turn, -will be able to play your part in helping those that come after you. Here are -some pointers to obtaining help: - - - - If you obtained your OpenSP distribution in binary form from -your operating system distributor and you have a build related problem - such -as onsgmls crashing, then your first port of call should be -your distributor. - - - - If you have a problem with the usage of the OpenSP tools, then -you should try the openjade-users mailing list, see -http://sf.net/projects/openjade/ for details. - - - - If you have a patch or bug fix for OpenJade, or are trying to -use the OpenSP API then the openjade-devel mailing list is the appropriate -forum. - - - - - Please choose only one mailing list to post to, as cross-posting -is generally frowned upon. The various mailing lists are archived and -searchable. It is always worth searching for your problem first, as it is -often the case that someone has had the same problem before. - - - Version 1.5.2 - Released December 2005. - The release contains a number of enhancements together with -support for version 4.0 of the GNU C++ compiler. - - The following table details the major improvements in OpenSP -1.5.2 - Changes for release -1.5.2 - - - - - - Item 1 - Added doc building and config option - - - - - Contributors - Terje Bless, Neil Roeth - - - Category - Enhancement - - - Description - Enable creation of release notes and man pages as -part of the standard build process. Added option --disable-doc-build; this -step requires several additional software packages, so a user who chooses not -to install those tools or otherwise has problems building the docs can skip -this step. - - - - - - - - - Item 2 - Updated local gettext - - - - - Contributor - Terje Bless - - - Category - Enhancement - - - Description - A local gettext is provided for those platforms - that have an old or broken gettext. This has been updated to - version 0.14.5. - - - - - - - - - Item 3 - Added config option to turn off DTDDECL support - - - - - Contributor - Neil Roeth - - - Category - Enhancement - - - Description - Added option --disable-dtddecl to disable DTDDECL -support. The combination of DTDDECL support and enabling a default catalog -and default SGML search path can cause poor performance. Using this option -allows you to use a default catalog and search path and still get good -performance if DTDDECL support is not needed. - - - - - - - - - Item 4 - Updated/added translations - - - - - Contributor - Karl Eichwalder - - - Category - Enhancement - - - Description - Updated German and French translations, added -Turkish translation. - - - -
-
- - Version 1.5.1 - Released October 2003. - The release contains a number of new features together with -support for version 3.3 for the GNU C++ compiler. - - The following table details the major improvements in OpenSP -1.5.1 - Changes for release -1.5.1 - - - - - - Item 1 - Runtime selection of message format - - - - - Contributor - Nick Kew - - - Category - Enhancement - - - Description - Enable run time selection of message format with -SP_MESSAGE_FORMAT environment variable. Value is one of -XML, NONE, -TRADITIONAL. - - - - - - - - - Item 2 - Support for HTTP redirection - - - - - Contributor - Nick Kew - - - Category - Enhancement - - - Description - When validating/parseing a document using http, -OpenSP will now follow any redirects headers/requests from the -server - - - - - - - - - Item 3 - Specification of http user agent header - - - - - Contributor - Nick Kew - - - Category - Enhancement - - - Description - The environment variable -SP_HTTP_USER_AGENT can be used to specify a UserAgent: -header. - - - - - - - - - Item 4 - Specification of http Accept: headers - - - - - Contributor - Nick Kew - - - Category - Enhancement - - - Description - The environment variable -SP_HTTP_ACCEPT can be used to specify Accept: -headers. - - - - - - - - - Item 5 - Enhancements to osx - - - - - Contributor - Jessica Perry Hekman - - - Category - Enhancement - - - Description - A number of enhancements have been made to the -osx tool: security fixes in the handling of output files; -addition of the "preserve case option". - - - - - - - - - Item 6 - Addition of a test suite - - - - - Contributor - Karl Eichwalder - - - Category - Enhancement - - - Description - A testing framework together with some initial -tests have been added. Currently there are 22 tests. 6 of which -fail. - - - - - - - - - Item 7 - Sundry build improvments - - - - - Contributor - Neil Roeth, Peter O'Gorman et al - - - Category - Enhancement/Fixes - - - Description - Support for Mac OS/X, Darwin has been improved. -Build infrastructure and localisation fixes and enhancements. Improved -compiler support - - - -
-
- - Version 1.5 - Released November 2002. - In addition to many new features this version also supports the -latest GNU C++ compiler: gcc 3.2 at the time of writing. - - The following table details the major improvements in OpenSP -1.5 - - Changes for release -1.5.1 - - - - - - Item 1 - "--restricted" option - - - - - Contributor - Liam Quinn - - - Category - Security Enhancement - - - Description - This new option restricts parsing of web based -documents to local files. This can be classed as a security fix and is -especially useful when using OpenSP within a CGI (Common Gateway Interface) -application on a web server. - - - - - - - - - Item 2 - UNIX on-line manual pages - - - - - Contributor - Ian Castle - - - Category - Documentation Bug - - - Description - on-line manual (man) pages for the commands -included in the OpenSP package are now available for UNIX -platforms - - - - - - - - - Item 3 - Upgrade GNU source configuration tools - - - - - Contributor - Various - - - Category - Software Bug - - - Description - If you wish to create the various autoconf files -then newer versions are required (autoconf 2.52 and later). As a result of the -upgrades more platforms are potentially supported. - - - - - - - - - Item 4 - "-x" option to osx and other -enhancements - - - - - Contributor - Jessica Hekman - - - Category - Software Enhancement - - - Description - The "-x" command line option enables SDATA entities -to be transformed into PIs or treated like normal entities (the -default). - - - - - - - - - Item 5 - New Translations - - - - - Contributors - Various - - - Category - Documentation Bug - - - Description - New and updated translations are available for -"ja", "fr", "de" and "sv" languages. - - - - - - - - - - Item 6 - Enhanced Message Handling - - - - - Contributor - Epremis Corporation (Peter Newcomb) - - - Category - Software Enhancement - - - Description - Improvement in message handling within the library. -This allows Windows (Win32) applications which make use of the OpenSP DLL to -include other DLLs which can also make use of the message handling -facility. - - - - - - - - - Item 7 - Error Messages formatted as XML - - - - - Contributor - Nick Kew - - - Category - Software Enhancement - - - Description - A build time option to allow error messages to be -output in XML format as opposed to plain old ASCII. Specify with the -./configure option --enable-xml-messages - - - - - - - - - Item 8 - New syntax for PI based architecture -declarations - - - - - Contributor - Epremis Corporation (Peter Newcomb) - - - Category - Software Enhancement - - - Description - Added support for the PI-based architecture using -declaration syntax defined by Amendment 1 to ISO/IEC 10744:1997 (HyTime). This -makes it possible to specify architectural support attributes when using -architectures with XML, and is generally simpler than the original syntax. See -http://www.ornl.gov/sgml/wg8/document/1985.htm for details. - - - - - - - - - Item 9 - Support name based virtual hosts when parsing a -URI - - - - - Contributor - Liam Quinn (and others) - - - Category - Software Enhancement - - - Description - Adds an HTTP/1.0 host header to HTTP requests. This -makes it possible to parse and fetch DTDs specified in SYSTEM identifiers when -the DTD resides on a name-based "Virutal Host". - - - - - - - - - Item 10 - 64 Bit Platform Support - - - - - Category - Software Enhancements - - - Description - Remove 32-bit assumptions so that 64 bit platforms -such as Alpha, IA64, UltraSparc are supported. - - - - - - - - - Item 11 - New output options: comment, omitted, tagomit, -attromit - - - - - Contributor - Robert Braddock - - - Category - Software Enhancement - - - Description - Support for new output options: this allows -comments and implied elements and/or attributes to be produced. - - - - - - - - - Item 12 - Enhanced Support for Annex K of ISO 8879 - - - - - Category - Software Enhancement - - - Description - More of Annex K is now supported. Common data -attributes can now be specified in external entity -declarations. - - - - - - - - - Item 13 - Support for GCC 3.2 - - - - - Category - Software Enhancement - - - Description - GCC 3.2 is now supported. - - - - - - - - - Item 14 - Enhance Unicode support - - - - - Category - Software Enhancement - - - Description - The multibyte version of OpenSP now uses 32 bit -characters and supports the full UTF-16 range 0x000000-0x10ffff - - - -
-
- - Version 1.4 - Released February 2000 - Version 1.4 added many improvements. Changes -included: - - - - Support for the koi8-r (RFC 1489) encoding. - - - - OpenSP now supports long (GNU Style) command line -options. - - - - OpenSP is internationalized - - - - New option -h or --help shows a list of all available options -with descriptions. - - - - New option -n and -x to see message numbers/relevant clauses -with messages. - - - - More of Annex K of ISO 8879 supported: SGML declarations on -subdocs, DATA declared value for attribures, DTD data entities and DTD -notations for doctypes, complete IMPLYDEF support, ENTITIES REF constraints, -URN parsing. Many new -w flags. - - - - DTDDECL support - - - - New spcat command line interface to the catalog -manager. - - - - Version 1.3.4 - Released October 1999 - The second release from the OpenJade project. This version was -distributed as part of OpenJade 1.3 - - - Changes in OpenJade 1.3.4 - - - - -Added the Entity classes to the public interface of the library/DLL. - - - - - - Version 1.3.3 - The first release from the OpenJade project - -
-
diff --git a/lib/ExtendEntityManager.cxx b/lib/ExtendEntityManager.cxx index 19e44c0..fb73a07 100644 --- a/lib/ExtendEntityManager.cxx +++ b/lib/ExtendEntityManager.cxx @@ -1238,8 +1238,7 @@ StorageObjectSpec::StorageObjectSpec() } StorageObjectSpec::StorageObjectSpec(const StorageObjectSpec& x) -: storageManager(x.storageManager), - codingSystemName(x.codingSystemName), +: codingSystemName(x.codingSystemName), codingSystem(x.codingSystem), specId(x.specId), baseId(x.baseId), @@ -1254,7 +1253,6 @@ StorageObjectSpec::StorageObjectSpec(const StorageObjectSpec& x) StorageObjectSpec& StorageObjectSpec::operator=(const StorageObjectSpec& x) { if (this != &x) { - storageManager = x.storageManager; codingSystemName = x.codingSystemName; codingSystem = x.codingSystem; specId = x.specId; diff --git a/lib/ExtendEntityManager.cxx.sigsegv b/lib/ExtendEntityManager.cxx.sigsegv deleted file mode 100644 index fb73a07..0000000 --- a/lib/ExtendEntityManager.cxx.sigsegv +++ /dev/null @@ -1,2209 +0,0 @@ -// Copyright (c) 1994, 1995, 1996 James Clark -// See the file COPYING for copying permission. - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "splib.h" -#include "ExtendEntityManager.h" -#include "Message.h" -#include "MessageArg.h" -#include "OffsetOrderedList.h" -#include "rtti.h" -#include "StorageManager.h" -#include "Vector.h" -#include "NCVector.h" -#include "Owner.h" -#include "constant.h" -#include "EntityManagerMessages.h" -#include "StorageObjectPosition.h" -#include "Owner.h" -#include "CodingSystem.h" -#include "CodingSystemKit.h" -#include "InputSource.h" -#include "Mutex.h" -#include "macros.h" -#include "EntityCatalog.h" -#include "CharMap.h" - -#include -#include -#include -#include -#include - -#ifdef DECLARE_MEMMOVE -extern "C" { - void *memmove(void *, const void *, size_t); -} -#endif - -#ifdef SP_NAMESPACE -namespace SP_NAMESPACE { -#endif - -const char EOFCHAR = '\032'; // Control-Z - -class ExternalInputSource; - -class EntityManagerImpl : public ExtendEntityManager { -public: - EntityManagerImpl(StorageManager *defaultStorageManager, - const InputCodingSystem *defaultCodingSystem, - const ConstPtr &, - Boolean internalCharsetIsDocCharset); - void setCatalogManager(CatalogManager *catalogManager); - void registerStorageManager(StorageManager *); - InputSource *open(const StringC &sysid, - const CharsetInfo &, - InputSourceOrigin *, - unsigned flags, - Messenger &); - const CharsetInfo &charset() const; - Boolean internalCharsetIsDocCharset() const; - ConstPtr makeCatalog(StringC &systemId, - const CharsetInfo &charset, - Messenger &mgr); - Boolean expandSystemId(const StringC &, - const Location &, - Boolean isNdata, - const CharsetInfo &, - const StringC *, - Messenger &, - StringC &); - Boolean mergeSystemIds(const Vector &, - Boolean mapCatalogDocument, - const CharsetInfo &, - Messenger &mgr, - StringC &) const; - StorageManager *lookupStorageType(const StringC &, const CharsetInfo &) const; - StorageManager *lookupStorageType(const char *) const; - StorageManager *guessStorageType(const StringC &, const CharsetInfo &) const; - const InputCodingSystem *lookupCodingSystem(const StringC &, - const CharsetInfo &, - Boolean isBctf, - const char *&) const; - Boolean resolveSystemId(const StringC &str, - const CharsetInfo &idCharset, - Messenger &mgr, - const Location &defLocation, - Boolean isNdata, - ParsedSystemId &parsedSysid) const; - Boolean parseSystemId(const StringC &str, - const CharsetInfo &idCharset, - Boolean isNdata, - const StorageObjectLocation *def, - Messenger &mgr, - ParsedSystemId &parsedSysid) const; - const CharsetInfo &internalCharset(const CharsetInfo &docCharset) const { - if (internalCharsetIsDocCharset_) - return docCharset; - else - return charset(); - } -private: - EntityManagerImpl(const EntityManagerImpl &); // undefined - void operator=(const EntityManagerImpl &); // undefined - static Boolean defLocation(const Location &, StorageObjectLocation &); - static Boolean matchKey(const StringC &type, const char *s, - const CharsetInfo &internalCharset); - NCVector > storageManagers_; - Owner defaultStorageManager_; - const InputCodingSystem *defaultCodingSystem_; - Owner catalogManager_; - Boolean internalCharsetIsDocCharset_; - ConstPtr codingSystemKit_; - friend class FSIParser; -}; - -class ExternalInfoImpl : public ExternalInfo { - RTTI_CLASS -public: - ExternalInfoImpl(ParsedSystemId &parsedSysid); - const StorageObjectSpec &spec(size_t i) const; - size_t nSpecs() const; - const ParsedSystemId &parsedSystemId() const; - void noteRS(Offset); - void noteStorageObjectEnd(Offset); - void noteInsertedRSs(); - void setDecoder(size_t i, Decoder *); - void setId(size_t i, StringC &); - void getId(size_t i, StringC &) const; - Boolean convertOffset(Offset, StorageObjectLocation &) const; -private: - ParsedSystemId parsedSysid_; - NCVector position_; - size_t currentIndex_; - // list of inserted RSs - OffsetOrderedList rsList_; - Boolean notrack_; - Mutex mutex_; -}; - -class ExternalInputSource : public InputSource { -public: - ExternalInputSource(ParsedSystemId &parsedSysid, - const CharsetInfo &internalCharset, - const CharsetInfo &docCharset, - Boolean internalCharsetIsDocCharset, - Char replacementChar, - InputSourceOrigin *origin, - unsigned flags); - void pushCharRef(Char, const NamedCharRef &); - ~ExternalInputSource(); -private: - Xchar fill(Messenger &); - Boolean rewind(Messenger &); - void willNotRewind(); - void setDocCharset(const CharsetInfo &, const CharsetInfo &); - void willNotSetDocCharset(); - - void init(); - void noteRS(); - void noteRSAt(const Char *); - void reallocateBuffer(size_t size); - void insertChar(Char); - void buildMap(const CharsetInfo &internalCharset, - const CharsetInfo &docCharset); - void buildMap1(const CharsetInfo &, const CharsetInfo &); - static const Char *findNextCr(const Char *start, const Char *end); - static const Char *findNextLf(const Char *start, const Char *end); - static const Char *findNextCrOrLf(const Char *start, const Char *end); - - ExternalInfoImpl *info_; - Char *buf_; - const Char *bufLim_; - Offset bufLimOffset_; - size_t bufSize_; - size_t readSize_; - NCVector > sov_; - StorageObject *so_; - size_t soIndex_; - Boolean insertRS_; - Decoder *decoder_; - const char *leftOver_; - size_t nLeftOver_; - Boolean mayRewind_; - Boolean maySetDocCharset_; - Boolean mayNotExist_; - enum RecordType { - unknown, - crUnknown, - crlf, - lf, - cr, - asis - }; - RecordType recordType_; - Boolean zapEof_; - Boolean internalCharsetIsDocCharset_; - Char replacementChar_; - Ptr > map_; -}; - -class FSIParser { -public: - FSIParser(const StringC &, const CharsetInfo &idCharset, - Boolean isNdata, - const StorageObjectLocation *defLoc, - const EntityManagerImpl *em, - Messenger &mgr); - Boolean parse(ParsedSystemId &parsedSysid); - static const char *recordsName(StorageObjectSpec::Records records); - struct RecordType { - const char *name; - StorageObjectSpec::Records value; - }; -private: - Boolean handleInformal(size_t startIndex, ParsedSystemId &parsedSysid); - Boolean convertId(StringC &, Xchar smcrd, const StorageManager *); - Xchar get(); - void unget(); - StorageManager *lookupStorageType(const StringC &key, Boolean &neutral); - Boolean matchKey(const StringC &, const char *); - Boolean matchChar(Xchar, char); - Boolean isS(Xchar); - Boolean convertDigit(Xchar c, int &weight); - void uncharref(StringC &); - Boolean setAttributes(StorageObjectSpec &sos, Boolean neutral, - Xchar &smcrd, Boolean &fold); - Boolean setCatalogAttributes(ParsedSystemId &parsedSysid); - void setDefaults(StorageObjectSpec &sos); - Boolean parseAttribute(StringC &token, Boolean &gotValue, StringC &value); - Boolean lookupRecords(const StringC &token, StorageObjectSpec::Records &); - void convertMinimumLiteral(const StringC &from, StringC &to); - - const StringC &str_; - size_t strIndex_; - Messenger &mgr_; - const EntityManagerImpl *em_; - const StorageObjectSpec *defSpec_; - const StringC *defId_; - const CharsetInfo &idCharset_; - Boolean isNdata_; - static RecordType recordTypeTable[]; -}; - -const Char RS = '\n'; -const Char RE = '\r'; - - -ExtendEntityManager::~ExtendEntityManager() -{ -} - -ExtendEntityManager::CatalogManager::~CatalogManager() -{ -} - -ExtendEntityManager *ExtendEntityManager::make(StorageManager *sm, - const InputCodingSystem *cs, - const ConstPtr &csKit, - Boolean internalCharsetIsDocCharset) -{ - return new EntityManagerImpl(sm, cs, csKit, internalCharsetIsDocCharset); -} - -Boolean ExtendEntityManager::externalize(const ExternalInfo *info, - Offset off, - StorageObjectLocation &loc) -{ - if (!info) - return false; - const ExternalInfoImpl *p = DYNAMIC_CAST_CONST_PTR(ExternalInfoImpl, info); - if (!p) - return false; - return p->convertOffset(off, loc); -} - -const ParsedSystemId * -ExtendEntityManager::externalInfoParsedSystemId(const ExternalInfo *info) -{ - if (!info) - return 0; - const ExternalInfoImpl *p = DYNAMIC_CAST_CONST_PTR(ExternalInfoImpl, info); - if (!p) - return 0; - return &p->parsedSystemId(); -} - -EntityManagerImpl::EntityManagerImpl(StorageManager *defaultStorageManager, - const InputCodingSystem *defaultCodingSystem, - const ConstPtr &codingSystemKit, - Boolean internalCharsetIsDocCharset) -: defaultStorageManager_(defaultStorageManager), - defaultCodingSystem_(defaultCodingSystem), - codingSystemKit_(codingSystemKit), - internalCharsetIsDocCharset_(internalCharsetIsDocCharset) -{ -} - -Boolean EntityManagerImpl::internalCharsetIsDocCharset() const -{ - return internalCharsetIsDocCharset_; -} - -const CharsetInfo &EntityManagerImpl::charset() const -{ - return codingSystemKit_->systemCharset(); -} - -InputSource *EntityManagerImpl::open(const StringC &sysid, - const CharsetInfo &docCharset, - InputSourceOrigin *origin, - unsigned flags, - Messenger &mgr) -{ - ParsedSystemId parsedSysid; - if (!parseSystemId(sysid, docCharset, (flags & ExtendEntityManager::isNdata) != 0, - 0, mgr, parsedSysid) - || !catalogManager_->mapCatalog(parsedSysid, this, mgr)) - return 0; - return new ExternalInputSource(parsedSysid, - charset(), - docCharset, - internalCharsetIsDocCharset_, - codingSystemKit_->replacementChar(), - origin, flags); -} - - -ConstPtr -EntityManagerImpl::makeCatalog(StringC &systemId, - const CharsetInfo &docCharset, - Messenger &mgr) -{ - return catalogManager_->makeCatalog(systemId, docCharset, this, mgr); -} - -Boolean -EntityManagerImpl::mergeSystemIds(const Vector &sysids, - Boolean mapCatalogDocument, - const CharsetInfo &docCharset, - Messenger &mgr, - StringC &result) const -{ - ParsedSystemId parsedSysid; - if (mapCatalogDocument) { - parsedSysid.maps.resize(parsedSysid.maps.size() + 1); - parsedSysid.maps.back().type = ParsedSystemId::Map::catalogDocument; - } - for (size_t i = 0; i < sysids.size(); i++) - if (!parseSystemId(sysids[i], - docCharset, - 0, - 0, - mgr, - parsedSysid)) - return 0; - parsedSysid.unparse(internalCharset(docCharset), 0, result); - return 1; -} - -Boolean -EntityManagerImpl::expandSystemId(const StringC &str, - const Location &defLoc, - Boolean isNdata, - const CharsetInfo &docCharset, - const StringC *mapCatalogPublic, - Messenger &mgr, - StringC &result) -{ - ParsedSystemId parsedSysid; - StorageObjectLocation defSoLoc; - const StorageObjectLocation *defSoLocP; - if (defLocation(defLoc, defSoLoc)) - defSoLocP = &defSoLoc; - else - defSoLocP = 0; - if (!parseSystemId(str, docCharset, isNdata, defSoLocP, mgr, parsedSysid)) - return 0; - if (mapCatalogPublic) { - ParsedSystemId::Map map; - map.type = ParsedSystemId::Map::catalogPublic; - map.publicId = *mapCatalogPublic; - parsedSysid.maps.insert(parsedSysid.maps.begin(), 1, map); - } - parsedSysid.unparse(internalCharset(docCharset), isNdata, result); - return 1; -} - -Boolean EntityManagerImpl::parseSystemId(const StringC &str, - const CharsetInfo &docCharset, - Boolean isNdata, - const StorageObjectLocation *defLoc, - Messenger &mgr, - ParsedSystemId &parsedSysid) const -{ - FSIParser fsiParser(str, internalCharset(docCharset), isNdata, defLoc, this, mgr); - return fsiParser.parse(parsedSysid); -} - -StorageManager * -EntityManagerImpl::guessStorageType(const StringC &type, - const CharsetInfo &internalCharset) const -{ - for (size_t i = 0; i < storageManagers_.size(); i++) - if (storageManagers_[i]->guessIsId(type, internalCharset)) - return storageManagers_[i].pointer(); - if (defaultStorageManager_->guessIsId(type, internalCharset)) - return defaultStorageManager_.pointer(); - return 0; -} - -StorageManager * -EntityManagerImpl::lookupStorageType(const StringC &type, - const CharsetInfo &internalCharset) const -{ - if (type.size() == 0) - return 0; - if (matchKey(type, defaultStorageManager_->type(), internalCharset)) - return defaultStorageManager_.pointer(); - for (size_t i = 0; i < storageManagers_.size(); i++) - if (matchKey(type, storageManagers_[i]->type(), internalCharset)) - return storageManagers_[i].pointer(); - return 0; -} - -StorageManager * -EntityManagerImpl::lookupStorageType(const char *type) const -{ - if (type == defaultStorageManager_->type()) - return defaultStorageManager_.pointer(); - for (size_t i = 0; i < storageManagers_.size(); i++) - if (type == storageManagers_[i]->type()) - return storageManagers_[i].pointer(); - return 0; -} - -const InputCodingSystem * -EntityManagerImpl::lookupCodingSystem(const StringC &type, - const CharsetInfo &internalCharset, - Boolean isBctf, - const char *&name) const -{ - return codingSystemKit_->makeInputCodingSystem(type, internalCharset, isBctf, name); -} - -Boolean -EntityManagerImpl::matchKey(const StringC &type, - const char *s, - const CharsetInfo &internalCharset) -{ - if (strlen(s) != type.size()) - return false; - for (size_t i = 0; i < type.size(); i++) - if (internalCharset.execToDesc(toupper(s[i])) != type[i] - && internalCharset.execToDesc(tolower(s[i])) != type[i]) - return false; - return true; -} - -void EntityManagerImpl::registerStorageManager(StorageManager *sm) -{ - storageManagers_.resize(storageManagers_.size() + 1); - storageManagers_.back() = sm; -} - -void EntityManagerImpl::setCatalogManager(CatalogManager *catalogManager) -{ - catalogManager_ = catalogManager; -} - -Boolean -EntityManagerImpl::defLocation(const Location &defLocation, - StorageObjectLocation &soLoc) -{ - Offset off; - const ExternalInfo *info; - const Origin *origin = defLocation.origin().pointer(); - Index index = defLocation.index(); - for (;;) { - if (!origin) - return 0; - const InputSourceOrigin *inputSourceOrigin = origin->asInputSourceOrigin(); - if (inputSourceOrigin) { - off = inputSourceOrigin->startOffset(index); - info = inputSourceOrigin->externalInfo(); - if (info) - break; - if (!inputSourceOrigin->defLocation(off, origin, index)) - return 0; - } - else { - const Location &parentLoc = origin->parent(); - origin = parentLoc.origin().pointer(); - index = parentLoc.index(); - } - } - return ExtendEntityManager::externalize(info, off, soLoc); -} - -class UnbufferingStorageObject : public StorageObject { -public: - UnbufferingStorageObject(StorageObject *sub, - const Boolean *unbuffer) - : sub_(sub), buf_(0), bufAvail_(0), bufNext_(0), unbuffer_(unbuffer) { } - ~UnbufferingStorageObject() { delete [] buf_; } - Boolean read(char *buf, size_t bufSize, Messenger &mgr, - size_t &nread) { - if (bufNext_ >= bufAvail_) { - bufAvail_ = bufNext_ = 0; - if (!*unbuffer_) - return sub_->read(buf, bufSize, mgr, nread); - if (buf_ == 0) - buf_ = new char[bufSize_ = bufSize]; - if (!sub_->read(buf_, bufSize_, mgr, bufAvail_)) - return 0; - } - *buf = buf_[bufNext_++]; - nread = 1; - return 1; - } - Boolean rewind(Messenger &mgr) { - bufAvail_ = bufNext_ = 0; - return sub_->rewind(mgr); - } - void willNotRewind() { sub_->willNotRewind(); } - size_t getBlockSize() const { return sub_->getBlockSize(); } -private: - Owner sub_; - size_t bufSize_; - size_t bufAvail_; - size_t bufNext_; - char *buf_; - const Boolean *unbuffer_; -}; - -class MappingDecoder : public Decoder { -public: - MappingDecoder(Decoder *, - const ConstPtr > &); - Boolean convertOffset(unsigned long &offset) const; - size_t decode(Char *, const char *, size_t, const char **); -private: - Owner sub_; - ConstPtr > map_; -}; - -MappingDecoder::MappingDecoder(Decoder *sub, - const ConstPtr > &map) -: Decoder(sub->minBytesPerChar()), sub_(sub), map_(map) -{ -} - -size_t MappingDecoder::decode(Char *to, const char *s, - size_t slen, const char **rest) -{ - size_t n = sub_->decode(to, s, slen, rest); - const CharMap &map = *map_; - for (size_t i = 0; i < n; i++) { - Unsigned32 d = map[to[i]]; - if (d & (unsigned(1) << 31)) - to[i] = (d & ~(unsigned(1) << 31)); - else - to[i] += d; - } - return n; -} - -Boolean MappingDecoder::convertOffset(unsigned long &offset) const -{ - return sub_->convertOffset(offset); -} - -ExternalInputSource::ExternalInputSource(ParsedSystemId &parsedSysid, - const CharsetInfo &systemCharset, - const CharsetInfo &docCharset, - Boolean internalCharsetIsDocCharset, - Char replacementChar, - InputSourceOrigin *origin, - unsigned flags) -: InputSource(origin, 0, 0), - mayRewind_((flags & EntityManager::mayRewind) != 0), - mayNotExist_((flags & ExtendEntityManager::mayNotExist) != 0), - sov_(parsedSysid.size()), - internalCharsetIsDocCharset_(internalCharsetIsDocCharset), - // hack - maySetDocCharset_((flags & EntityManager::maySetDocCharset) != 0), - replacementChar_(replacementChar) -{ - for (size_t i = 0; i < parsedSysid.size(); i++) { - if (parsedSysid[i].codingSystemType - != (internalCharsetIsDocCharset - ? StorageObjectSpec::bctf - : StorageObjectSpec::encoding) - && parsedSysid[i].codingSystemType != StorageObjectSpec::special) { - map_ = new CharMapResource; - buildMap(systemCharset, docCharset); - break; - } - } - for (size_t i = 0; i < sov_.size(); i++) - sov_[i] = 0; - init(); - info_ = new ExternalInfoImpl(parsedSysid); - origin->setExternalInfo(info_); -} - -void ExternalInputSource::setDocCharset(const CharsetInfo &docCharset, - const CharsetInfo &systemCharset) -{ - if (!map_.isNull()) - buildMap(systemCharset, docCharset); - willNotSetDocCharset(); -} - -void ExternalInputSource::willNotSetDocCharset() -{ - maySetDocCharset_ = 0; -} - -void ExternalInputSource::buildMap(const CharsetInfo &systemCharset, - const CharsetInfo &docCharset) -{ - CharMap &map = *map_; - // FIXME How should invalidChar be chosen when internalCharsetIsDocCharset_? - Char invalidChar - = internalCharsetIsDocCharset_ ? 0 : replacementChar_; - map.setAll((Unsigned32(1) << 31) | invalidChar); - if (internalCharsetIsDocCharset_) - buildMap1(systemCharset, docCharset); - else - buildMap1(docCharset, systemCharset); -} - -void ExternalInputSource::buildMap1(const CharsetInfo &fromCharset, - const CharsetInfo &toCharset) -{ - UnivCharsetDescIter iter(fromCharset.desc()); - for (;;) { - WideChar descMin, descMax; - UnivChar univMin; - if (!iter.next(descMin, descMax, univMin)) - break; - if (descMin > charMax) - break; - if (descMax > charMax) - descMax = charMax; - WideChar totalCount = 1 + (descMax - descMin); - do { - WideChar count; - WideChar toMin; - ISet set; - int nMap = toCharset.univToDesc(univMin, toMin, set, count); - if (count > totalCount) - count = totalCount; - if (nMap && toMin <= charMax) { - Char toMax; - if (count - 1 > charMax - toMin) - toMax = charMax; - else - toMax = toMin + (count - 1); - map_->setRange(descMin, descMin + (toMax - toMin), Char(toMin - descMin)); - } - descMin += count; - univMin += count; - totalCount -= count; - } while (totalCount > 0); - } -} - -void ExternalInputSource::init() -{ - so_ = 0; - buf_ = 0; - bufSize_ = 0; - bufLim_ = 0; - bufLimOffset_ = 0; - insertRS_ = true; - soIndex_ = 0; - leftOver_ = 0; - nLeftOver_ = 0; -} - -ExternalInputSource::~ExternalInputSource() -{ - if (buf_) - delete [] buf_; -} - -Boolean ExternalInputSource::rewind(Messenger &mgr) -{ - reset(0, 0); - if (buf_) - delete [] buf_; - // reset makes a new EntityOrigin - ParsedSystemId parsedSysid(info_->parsedSystemId()); - ExternalInfoImpl *oldInfo = info_; - info_ = new ExternalInfoImpl(parsedSysid); - so_ = 0; - for (size_t i = 0; i < soIndex_; i++) { - if (sov_[i] && !sov_[i]->rewind(mgr)) - return 0; - StringC tem; - oldInfo->getId(i, tem); - info_->setId(i, tem); - } - inputSourceOrigin()->setExternalInfo(info_); - init(); - return 1; -} - -void ExternalInputSource::willNotRewind() -{ - for (size_t i = 0; i < sov_.size(); i++) - if (sov_[i]) - sov_[i]->willNotRewind(); - mayRewind_ = 0; -} - - -// Round up N so that it is a power of TO. -// TO must be a power of 2. - -inline -size_t roundUp(size_t n, size_t to) -{ - return (n + (to - 1)) & ~(to - 1); -} - -inline -void ExternalInputSource::noteRSAt(const Char *p) -{ - info_->noteRS(bufLimOffset_ - (bufLim_ - p)); -} - -inline -void ExternalInputSource::noteRS() -{ - noteRSAt(cur()); -} - -Xchar ExternalInputSource::fill(Messenger &mgr) -{ - ASSERT(cur() == end()); - while (end() >= bufLim_) { - // need more data - while (so_ == 0) { - if (soIndex_ >= sov_.size()) - return eE; - if (soIndex_ > 0) - info_->noteStorageObjectEnd(bufLimOffset_ - (bufLim_ - end())); - const StorageObjectSpec &spec = info_->spec(soIndex_); - if (!sov_[soIndex_]) { - StringC id; - if (mayNotExist_) { - NullMessenger nullMgr; - sov_[soIndex_] - = spec.storageManager->makeStorageObject(spec.specId, spec.baseId, - spec.search, - mayRewind_, nullMgr, id); - } - else - sov_[soIndex_] - = spec.storageManager->makeStorageObject(spec.specId, spec.baseId, - spec.search, - mayRewind_, mgr, id); - info_->setId(soIndex_, id); - } - so_ = sov_[soIndex_].pointer(); - if (so_) { - decoder_ = spec.codingSystem->makeDecoder(); - if (spec.codingSystemType != StorageObjectSpec::special - && spec.codingSystemType != (internalCharsetIsDocCharset_ - ? StorageObjectSpec::bctf - : StorageObjectSpec::encoding)) { - decoder_ = new MappingDecoder(decoder_, map_); - if (maySetDocCharset_) { - sov_[soIndex_] = new UnbufferingStorageObject(sov_[soIndex_].extract(), &maySetDocCharset_); - so_ = sov_[soIndex_].pointer(); - } - } - info_->setDecoder(soIndex_, decoder_); - zapEof_ = spec.zapEof; - switch (spec.records) { - case StorageObjectSpec::asis: - recordType_ = asis; - insertRS_ = false; - break; - case StorageObjectSpec::cr: - recordType_ = cr; - break; - case StorageObjectSpec::lf: - recordType_ = lf; - break; - case StorageObjectSpec::crlf: - recordType_ = crlf; - break; - case StorageObjectSpec::find: - recordType_ = unknown; - break; - default: - CANNOT_HAPPEN(); - } - soIndex_++; - readSize_ = so_->getBlockSize(); - nLeftOver_ = 0; - break; - } - else - setAccessError(); - soIndex_++; - } - - size_t keepSize = end() - start(); - const size_t align = sizeof(int)/sizeof(Char); - size_t readSizeChars = (readSize_ + (sizeof(Char) - 1))/sizeof(Char); - readSizeChars = roundUp(readSizeChars, align); - size_t neededSize; // in Chars - size_t startOffset; - // compute neededSize and readSize - unsigned minBytesPerChar = decoder_->minBytesPerChar(); - if (nLeftOver_ == 0 && minBytesPerChar >= sizeof(Char)) { - // In this case we want to do decoding in place. - // FIXME It might be a win on some systems (Irix?) to arrange that the - // read buffer is on a page boundary. - - if (keepSize >= size_t(-1)/sizeof(Char) - (align - 1) - insertRS_) - abort(); // FIXME throw an exception - - // Now size_t(-1)/sizeof(Char) - (align - 1) - insertRS_ - keepSize > 0 - if (readSizeChars - > size_t(-1)/sizeof(Char) - (align - 1) - insertRS_ - keepSize) - abort(); - neededSize = roundUp(readSizeChars + keepSize + insertRS_, align); - startOffset = ((neededSize > bufSize_ ? neededSize : bufSize_) - - readSizeChars - insertRS_ - keepSize); - } - else { - // Needs to be room for everything before decoding. - neededSize = (keepSize + insertRS_ + readSizeChars - + (nLeftOver_ + sizeof(Char) - 1)/sizeof(Char)); - // Also must be room for everything after decoding. - size_t neededSize2 - = (keepSize + insertRS_ - // all the converted characters - + (nLeftOver_ + readSize_)/minBytesPerChar - // enough Chars to contain left over bytes - + ((readSize_ % minBytesPerChar + sizeof(Char) - 1) - / sizeof(Char))); - if (neededSize2 > neededSize) - neededSize = neededSize2; - neededSize = roundUp(neededSize, align); - if (neededSize > size_t(-1)/sizeof(Char)) - abort(); - startOffset = 0; - } - if (bufSize_ < neededSize) - reallocateBuffer(neededSize); - Char *newStart = buf_ + startOffset; - if (newStart != start() && keepSize > 0) - memmove(newStart, start(), keepSize*sizeof(Char)); - char *bytesStart = (char *)(buf_ + bufSize_ - readSizeChars) - nLeftOver_; - if (nLeftOver_ > 0 && leftOver_ != bytesStart) - memmove(bytesStart, leftOver_, nLeftOver_); - moveStart(newStart); - bufLim_ = end(); - - size_t nread; - if (so_->read((char *)(buf_ + bufSize_ - readSizeChars), readSize_, - mgr, nread)) { - if (nread > 0) { - const char *bytesEnd = bytesStart + nLeftOver_ + nread; - size_t nChars = decoder_->decode((Char *)end() + insertRS_, - bytesStart, - nLeftOver_ + nread - - (zapEof_ && bytesEnd[-1] == EOFCHAR), - &leftOver_); - nLeftOver_ = bytesEnd - leftOver_; - if (nChars > 0) { - if (insertRS_) { - noteRS(); - *(Char *)end() = RS; - advanceEnd(end() + 1); - insertRS_ = false; - bufLim_ += 1; - bufLimOffset_ += 1; - } - bufLim_ += nChars; - bufLimOffset_ += nChars; - break; - } - } - } - else - so_ = 0; - } - ASSERT(end() < bufLim_); - if (insertRS_) { - noteRS(); - insertChar(RS); - insertRS_ = false; - bufLimOffset_ += 1; - } - switch (recordType_) { - case unknown: - { - const Char *e = findNextCrOrLf(end(), bufLim_); - if (e) { - if (*e == '\n') { - recordType_ = lf; - info_->noteInsertedRSs(); - *(Char *)e = RE; - advanceEnd(e + 1); - insertRS_ = true; - } - else { - if (e + 1 < bufLim_) { - if (e[1] == '\n') { - recordType_ = crlf; - advanceEnd(e + 1); - if (e + 2 == bufLim_) { - bufLim_--; - bufLimOffset_--; - insertRS_ = true; - } - } - else { - advanceEnd(e + 1); - recordType_ = cr; - info_->noteInsertedRSs(); - insertRS_ = true; - } - } - else { - recordType_ = crUnknown; - advanceEnd(e + 1); - } - } - } - else - advanceEnd(bufLim_); - } - break; - case crUnknown: - { - if (*cur() == '\n') { - noteRS(); - advanceEnd(cur() + 1); - recordType_ = crlf; - } - else { - advanceEnd(cur() + 1); - insertRS_ = true; - recordType_ = cr; - info_->noteInsertedRSs(); - } - } - break; - case lf: - { - Char *e = (Char *)findNextLf(end(), bufLim_); - if (e) { - advanceEnd(e + 1); - *e = RE; - insertRS_ = true; - } - else - advanceEnd(bufLim_); - } - break; - case cr: - { - const Char *e = findNextCr(end(), bufLim_); - if (e) { - advanceEnd(e + 1); - insertRS_ = true; - } - else - advanceEnd(bufLim_); - } - break; - case crlf: - { - const Char *e = end(); - for (;;) { - e = findNextLf(e, bufLim_); - if (!e) { - advanceEnd(bufLim_); - break; - } - // Need to delete final RS if not followed by anything. - if (e + 1 == bufLim_) { - bufLim_--; - bufLimOffset_--; - advanceEnd(e); - insertRS_ = true; - if (cur() == end()) - return fill(mgr); - break; - } - noteRSAt(e); - e++; - } - } - break; - case asis: - advanceEnd(bufLim_); - break; - default: - CANNOT_HAPPEN(); - } - ASSERT(cur() < end()); - return nextChar(); -} - -const Char *ExternalInputSource::findNextCr(const Char *start, - const Char *end) -{ - for (; start < end; start++) - if (*start == '\r') - return start; - return 0; -} - -const Char *ExternalInputSource::findNextLf(const Char *start, - const Char *end) -{ - for (; start < end; start++) - if (*start == '\n') - return start; - return 0; -} - -const Char *ExternalInputSource::findNextCrOrLf(const Char *start, - const Char *end) -{ - for (; start < end; start++) - if (*start == '\n' || *start == '\r') - return start; - return 0; -} - -void ExternalInputSource::pushCharRef(Char ch, const NamedCharRef &ref) -{ - ASSERT(cur() == start()); - noteCharRef(startIndex() + (cur() - start()), ref); - insertChar(ch); -} - -void ExternalInputSource::insertChar(Char ch) -{ - if (start() > buf_) { - if (cur() > start()) - memmove((Char *)start() - 1, start(), (cur() - start())*sizeof(Char)); - moveLeft(); - *(Char *)cur() = ch; - } - else { - // must have start == buf - if (buf_ + (bufSize_ - (nLeftOver_ + sizeof(Char) - 1)/sizeof(Char)) - == bufLim_) { - if (bufSize_ == size_t(-1)) - abort(); // FIXME throw an exception - reallocateBuffer(bufSize_ + 1); - } - else if (nLeftOver_ > 0 && ((char *)(bufLim_ + 1) > leftOver_)) { - char *s = (char *)(buf_ + bufSize_) - nLeftOver_; - memmove(s, leftOver_, nLeftOver_); - leftOver_ = s; - } - if (cur() < bufLim_) - memmove((Char *)cur() + 1, cur(), (bufLim_ - cur())*sizeof(Char)); - *(Char *)cur() = ch; - advanceEnd(end() + 1); - bufLim_ += 1; - } -} - -void ExternalInputSource::reallocateBuffer(size_t newSize) -{ - Char *newBuf = new Char[newSize]; - - memcpy(newBuf, buf_, bufSize_*sizeof(Char)); - bufSize_ = newSize; - changeBuffer(newBuf, buf_); - bufLim_ = newBuf + (bufLim_ - buf_); - if (nLeftOver_ > 0) { - char *s = (char *)(newBuf + bufSize_) - nLeftOver_; - memmove(s, - (char *)newBuf + (leftOver_ - (char *)buf_), - nLeftOver_); - leftOver_ = s; - } - delete [] buf_; - buf_ = newBuf; -} - -RTTI_DEF1(ExternalInfoImpl, ExternalInfo) - -ExternalInfoImpl::ExternalInfoImpl(ParsedSystemId &parsedSysid) -: currentIndex_(0), position_(parsedSysid.size()) -{ - parsedSysid.swap(parsedSysid_); - if (parsedSysid_.size() > 0) - notrack_ = parsedSysid_[0].notrack; -} - -void ExternalInfoImpl::setId(size_t i, StringC &id) -{ - Mutex::Lock lock(&mutex_); - id.swap(position_[i].id); -} - -void ExternalInfoImpl::getId(size_t i, StringC &id) const -{ - Mutex::Lock lock(&((ExternalInfoImpl *)this)->mutex_); - id = position_[i].id; -} - -void ExternalInfoImpl::setDecoder(size_t i, Decoder *decoder) -{ - Mutex::Lock lock(&mutex_); - position_[i].decoder = decoder; -} - -void ExternalInfoImpl::noteInsertedRSs() -{ - position_[currentIndex_].insertedRSs = 1; -} - -void ExternalInfoImpl::noteRS(Offset offset) -{ - // We do the locking in OffsetOrderedList. - if (!notrack_) - rsList_.append(offset); - if (offset - == (currentIndex_ == 0 ? 0 : position_[currentIndex_- 1].endOffset)) - position_[currentIndex_].startsWithRS = 1; -} - -void ExternalInfoImpl::noteStorageObjectEnd(Offset offset) -{ - Mutex::Lock lock(&mutex_); - ASSERT(currentIndex_ < position_.size()); - // The last endOffset_ must be -1. - if (currentIndex_ < position_.size() - 1) { - position_[currentIndex_++].endOffset = offset; - position_[currentIndex_].line1RS = rsList_.size(); - notrack_ = parsedSysid_[currentIndex_].notrack; - } -} - -Boolean ExternalInfoImpl::convertOffset(Offset off, - StorageObjectLocation &ret) const -{ - Mutex::Lock lock(&((ExternalInfoImpl *)this)->mutex_); - if (off == Offset(-1) || position_.size() == 0) - return false; - // the last endOffset_ is Offset(-1), so this will - // terminate - int i; - for (i = 0; off >= position_[i].endOffset; i++) - ; - for (; position_[i].id.size() == 0; i--) - if (i == 0) - return false; - ret.storageObjectSpec = &parsedSysid_[i]; - ret.actualStorageId = position_[i].id; - Offset startOffset = i == 0 ? 0 : position_[i - 1].endOffset; - ret.storageObjectOffset = off - startOffset; - ret.byteIndex = ret.storageObjectOffset; - if (parsedSysid_[i].notrack - || parsedSysid_[i].records == StorageObjectSpec::asis) { - ret.lineNumber = (unsigned long)-1; - if (parsedSysid_[i].records != StorageObjectSpec::asis) { - if (position_[i].insertedRSs) - ret.byteIndex = (unsigned long)-1; - else if (ret.byteIndex > 0 && position_[i].startsWithRS) - ret.byteIndex--; // first RS is inserted - } - ret.columnNumber = (unsigned long)-1; - return true; - } - else { - size_t line1RS = position_[i].line1RS; - // line1RS is now the number of RSs that are before or on the current line. - size_t j; - Offset colStart; - if (rsList_.findPreceding(off, j, colStart)) { - if (position_[i].insertedRSs) - ret.byteIndex -= j + 1 - line1RS; - else if (ret.byteIndex > 0 && position_[i].startsWithRS) - ret.byteIndex--; // first RS is inserted - j++; - colStart++; - } - else { - j = 0; - colStart = 0; - } - // j is now the number of RSs that are before or on the current line - // colStart is the offset of the first column - ret.lineNumber = j - line1RS + 1 - position_[i].startsWithRS; - // the offset of the first column - if (colStart < startOffset) - colStart = startOffset; - // the RS that starts a line will be in column 0; - // the first real character of a line will be column 1 - ret.columnNumber = 1 + off - colStart; - } - if (!position_[i].decoder - || !position_[i].decoder->convertOffset(ret.byteIndex)) - ret.byteIndex = (unsigned long)-1; - return true; -} - -const StorageObjectSpec &ExternalInfoImpl::spec(size_t i) const -{ - return parsedSysid_[i]; -} - -size_t ExternalInfoImpl::nSpecs() const -{ - return parsedSysid_.size(); -} - -const ParsedSystemId &ExternalInfoImpl::parsedSystemId() const -{ - return parsedSysid_; -} - -StorageObjectSpec::StorageObjectSpec() -: storageManager(0), codingSystem(0), codingSystemName(0), notrack(0), - records(find), zapEof(1), search(1) -{ -} - -StorageObjectSpec::StorageObjectSpec(const StorageObjectSpec& x) -: codingSystemName(x.codingSystemName), - codingSystem(x.codingSystem), - specId(x.specId), - baseId(x.baseId), - records(x.records), - notrack(x.notrack), - zapEof(x.zapEof), - search(x.search), - codingSystemType(x.codingSystemType) -{ -} - -StorageObjectSpec& StorageObjectSpec::operator=(const StorageObjectSpec& x) -{ - if (this != &x) { - codingSystemName = x.codingSystemName; - codingSystem = x.codingSystem; - specId = x.specId; - baseId = x.baseId; - records = x.records; - notrack = x.notrack; - zapEof = x.zapEof; - search = x.search; - codingSystemType = x.codingSystemType; - } - return *this; -} - -StorageObjectSpec::~StorageObjectSpec() -{ -} - -StorageObjectPosition::StorageObjectPosition() -: endOffset(Offset(-1)), line1RS(0), startsWithRS(0), insertedRSs(0) -{ -} - -FSIParser::FSIParser(const StringC &str, - const CharsetInfo &idCharset, - Boolean isNdata, - const StorageObjectLocation *defLoc, - const EntityManagerImpl *em, - Messenger &mgr) -: str_(str), - strIndex_(0), - idCharset_(idCharset), - isNdata_(isNdata), - defSpec_(defLoc ? defLoc->storageObjectSpec : 0), - defId_(defLoc ? &defLoc->actualStorageId : 0), - em_(em), - mgr_(mgr) -{ -} - -Xchar FSIParser::get() -{ - if (strIndex_ < str_.size()) - return str_[strIndex_++]; - else - return -1; -} - -void FSIParser::unget() -{ - if (strIndex_ > 0) - strIndex_ -= 1; -} - -Boolean FSIParser::matchKey(const StringC &str, const char *s) -{ - if (strlen(s) != str.size()) - return false; - for (size_t i = 0; i < str.size(); i++) - if (idCharset_.execToDesc(toupper(s[i])) != str[i] - && idCharset_.execToDesc(tolower(s[i])) != str[i]) - return false; - return true; -} - -Boolean FSIParser::matchChar(Xchar ch, char execC) -{ - return ch == idCharset_.execToDesc(execC); -} - -Boolean FSIParser::isS(Xchar c) -{ - return (matchChar(c, ' ') - || matchChar(c, '\r') - || matchChar(c, '\n') - || matchChar(c, ' ')); -} - -Boolean FSIParser::convertDigit(Xchar c, int &weight) -{ - static const char digits[] = "0123456789"; - for (int i = 0; digits[i] != '\0'; i++) - if (matchChar(c, digits[i])) { - weight = i; - return 1; - } - return 0; -} - -Boolean FSIParser::parse(ParsedSystemId &parsedSysid) -{ - size_t startIndex = strIndex_; - if (!matchChar(get(), '<')) - return handleInformal(startIndex, parsedSysid); - StringC key; - for (;;) { - Xchar c = get(); - if (c == -1) - return handleInformal(startIndex, parsedSysid); - if (isS(c) || matchChar(c, '>')) - break; - key += Char(c); - } - unget(); - if (matchKey(key, "CATALOG")) { - if (!setCatalogAttributes(parsedSysid)) - return 0; - return parse(parsedSysid); - } - Boolean neutral; - StorageManager *sm = lookupStorageType(key, neutral); - if (!sm) - return handleInformal(startIndex, parsedSysid); - for (;;) { - parsedSysid.resize(parsedSysid.size() + 1); - StorageObjectSpec &sos = parsedSysid.back(); - sos.storageManager = sm; - Xchar smcrd; - Boolean fold; - if (!setAttributes(sos, neutral, smcrd, fold)) - return 0; - sm = 0; - StringC id; - Boolean hadData = 0; - for (;;) { - Xchar c = get(); - if (c == -1) - break; - if (matchChar(c, '<')) { - hadData = 1; - Char stago = c; - key.resize(0); - for (;;) { - c = get(); - if (c == -1) { - id += stago; - id += key; - break; - } - if (isS(c) || matchChar(c, '>')) { - unget(); - sm = lookupStorageType(key, neutral); - if (!sm) { - id += stago; - id += key; - } - break; - } - key += c; - } - if (sm) - break; - } - else if (!((!hadData && matchChar(c, '\r')) // ignored RE - || matchChar(c, '\n') )) { // ignored RS - hadData = 1; - id += c; - } - } - if (id.size() > 0 && matchChar(id[id.size() - 1], '\r')) - id.resize(id.size() - 1); - uncharref(id); - id.swap(sos.specId); - if (!convertId(sos.specId, smcrd, sos.storageManager)) - return 0; - if (neutral) { - if (!sos.storageManager->transformNeutral(sos.specId, fold, mgr_)) - return 0; - } - if (sos.storageManager->resolveRelative(sos.baseId, sos.specId, - sos.search)) - sos.baseId.resize(0); - if (!sm) - break; - } - return 1; -} - -Boolean FSIParser::handleInformal(size_t index, ParsedSystemId &parsedSysid) -{ - parsedSysid.resize(parsedSysid.size() + 1); - StorageObjectSpec &sos = parsedSysid.back(); - sos.specId.assign(str_.data() + index, - str_.size() - index); - sos.storageManager = em_->guessStorageType(sos.specId, idCharset_); - if (!sos.storageManager) { - if (defSpec_ && defSpec_->storageManager->inheritable()) - sos.storageManager = defSpec_->storageManager; - else - sos.storageManager = em_->defaultStorageManager_.pointer(); - } - setDefaults(sos); - if (!convertId(sos.specId, -1, sos.storageManager)) - return 0; - if (sos.storageManager->resolveRelative(sos.baseId, sos.specId, sos.search)) - sos.baseId.resize(0); - return 1; -} - -StorageManager *FSIParser::lookupStorageType(const StringC &key, - Boolean &neutral) -{ - if (matchKey(key, "NEUTRAL")) { - neutral = 1; - if (defSpec_ && defSpec_->storageManager->inheritable()) - return defSpec_->storageManager; - else - return em_->defaultStorageManager_.pointer(); - } - else { - StorageManager *sm = em_->lookupStorageType(key, idCharset_); - if (sm) - neutral = 0; - return sm; - } -} - -Boolean FSIParser::setCatalogAttributes(ParsedSystemId &parsedSysid) -{ - Boolean hadPublic = 0; - parsedSysid.maps.resize(parsedSysid.maps.size() + 1); - parsedSysid.maps.back().type = ParsedSystemId::Map::catalogDocument; - for (;;) { - StringC token, value; - Boolean gotValue; - if (!parseAttribute(token, gotValue, value)) { - mgr_.message(EntityManagerMessages::fsiSyntax, StringMessageArg(str_)); - return 0; - } - if (token.size() == 0) - break; - if (matchKey(token, "PUBLIC")) { - if (hadPublic) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("PUBLIC"))); - else if (gotValue) { - convertMinimumLiteral(value, parsedSysid.maps.back().publicId); - parsedSysid.maps.back().type = ParsedSystemId::Map::catalogPublic; - } - else - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - hadPublic = 1; - } - else - mgr_.message(gotValue - ? EntityManagerMessages::fsiUnsupportedAttribute - : EntityManagerMessages::fsiUnsupportedAttributeToken, - StringMessageArg(token)); - } - return 1; -} - -void FSIParser::convertMinimumLiteral(const StringC &from, StringC &to) -{ - // Do just enough to ensure it can be reparsed. - to.resize(0); - for (size_t i = 0; i < from.size(); i++) { - Char c = from[i]; - if (matchChar(c, '"') || matchChar(c, '#')) - mgr_.message(EntityManagerMessages::fsiLookupChar, NumberMessageArg(c)); - else if (matchChar(c, ' ')) { - if (to.size() && to[to.size() - 1] != c) - to += c; - } - else - to += c; - } - if (to.size() && matchChar(to[to.size() - 1], ' ')) - to.resize(to.size() - 1); -} - -// FIXME This should be table driven. - -Boolean FSIParser::setAttributes(StorageObjectSpec &sos, - Boolean neutral, - Xchar &smcrd, - Boolean &fold) -{ - Boolean hadBctf = 0; - Boolean hadEncoding = 0; - Boolean hadTracking = 0; - Boolean hadSmcrd = 0; - smcrd = -1; - fold = 1; - Boolean hadRecords = 0; - Boolean hadBase = 0; - Boolean hadZapeof = 0; - Boolean hadSearch = 0; - Boolean hadFold = 0; - StorageObjectSpec::Records records; - setDefaults(sos); - for (;;) { - StringC token, value; - Boolean gotValue; - if (!parseAttribute(token, gotValue, value)) { - mgr_.message(EntityManagerMessages::fsiSyntax, StringMessageArg(str_)); - return 0; - } - if (token.size() == 0) - break; - if (matchKey(token, "BCTF")) { - if (sos.storageManager->requiredCodingSystem()) - mgr_.message(EntityManagerMessages::fsiBctfEncodingNotApplicable); - else if (hadBctf) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (hadEncoding) - mgr_.message(EntityManagerMessages::fsiBctfAndEncoding); - else if (gotValue) { - const char *codingSystemName; - const InputCodingSystem *codingSystem - = em_->lookupCodingSystem(value, idCharset_, 1, codingSystemName); - if (codingSystem) { - sos.codingSystem = codingSystem; - sos.codingSystemName = codingSystemName; - sos.codingSystemType = StorageObjectSpec::bctf; - } - else if (matchKey(value, "SAME")) { - if (!isNdata_) { - if (defSpec_) { - sos.codingSystem = defSpec_->codingSystem; - sos.codingSystemName = defSpec_->codingSystemName; - sos.codingSystemType = defSpec_->codingSystemType; - } - else { - sos.codingSystem = em_->defaultCodingSystem_; - sos.codingSystemName = 0; - sos.codingSystemType = (em_->internalCharsetIsDocCharset_ - ? StorageObjectSpec::bctf - : StorageObjectSpec::encoding); - } - } - } - else - mgr_.message(EntityManagerMessages::fsiUnknownBctf, - StringMessageArg(value)); - } - else - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - hadBctf = 1; - } - else if (matchKey(token, "ENCODING")) { - if (sos.storageManager->requiredCodingSystem()) - mgr_.message(EntityManagerMessages::fsiBctfEncodingNotApplicable); - else if (hadEncoding) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (hadBctf) - mgr_.message(EntityManagerMessages::fsiBctfAndEncoding); - else if (gotValue) { - const char *codingSystemName; - const InputCodingSystem *codingSystem - = em_->lookupCodingSystem(value, idCharset_, 0, codingSystemName); - if (codingSystem) { - sos.codingSystem = codingSystem; - sos.codingSystemName = codingSystemName; - sos.codingSystemType = StorageObjectSpec::encoding; - } - else if (matchKey(value, "SAME")) { - if (!isNdata_) { - if (defSpec_) { - sos.codingSystem = defSpec_->codingSystem; - sos.codingSystemName = defSpec_->codingSystemName; - sos.codingSystemType = defSpec_->codingSystemType; - } - else { - sos.codingSystem = em_->defaultCodingSystem_; - sos.codingSystemName = 0; - sos.codingSystemType = (em_->internalCharsetIsDocCharset_ - ? StorageObjectSpec::bctf - : StorageObjectSpec::encoding); - } - } - } - else - mgr_.message(EntityManagerMessages::fsiUnknownEncoding, - StringMessageArg(value)); - } - else - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - hadEncoding = 1; - } - else if (matchKey(token, "TRACKING")) { - if (hadTracking) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) { - if (matchKey(value, "NOTRACK")) - sos.notrack = 1; - else if (!matchKey(value, "TRACK")) - mgr_.message(EntityManagerMessages::fsiBadTracking, - StringMessageArg(value)); - } - else - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - hadTracking = 1; - } - else if (matchKey(token, "ZAPEOF")) { - if (sos.storageManager->requiredCodingSystem()) - mgr_.message(EntityManagerMessages::fsiZapeofNotApplicable); - else if (hadZapeof) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) { - if (matchKey(value, "ZAPEOF")) - sos.zapEof = 1; - else if (matchKey(value, "NOZAPEOF")) - sos.zapEof = 0; - else - mgr_.message(EntityManagerMessages::fsiBadZapeof, - StringMessageArg(value)); - } - else - sos.zapEof = 1; - hadZapeof = 1; - } - else if (matchKey(token, "NOZAPEOF")) { - if (sos.storageManager->requiredCodingSystem()) - mgr_.message(EntityManagerMessages::fsiZapeofNotApplicable); - else if (hadZapeof) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("ZAPEOF"))); - else if (gotValue) - mgr_.message(EntityManagerMessages::fsiValueAsName, - StringMessageArg(token)); - else - sos.zapEof = 0; - hadZapeof = 1; - } - else if (matchKey(token, "SEARCH")) { - if (hadSearch) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) { - if (matchKey(value, "SEARCH")) - sos.search = 1; - else if (matchKey(value, "NOSEARCH")) - sos.search = 0; - else - mgr_.message(EntityManagerMessages::fsiBadSearch, - StringMessageArg(value)); - } - else - sos.search = 1; - hadSearch = 1; - } - else if (matchKey(token, "NOSEARCH")) { - if (hadSearch) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("SEARCH"))); - else if (gotValue) - mgr_.message(EntityManagerMessages::fsiValueAsName, - StringMessageArg(token)); - else - sos.search = 0; - hadSearch = 1; - } - else if (matchKey(token, "FOLD")) { - if (!neutral) - mgr_.message(EntityManagerMessages::fsiFoldNotNeutral); - else if (hadFold) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) { - if (matchKey(value, "FOLD")) - fold = 1; - else if (matchKey(value, "NOFOLD")) - fold = 0; - else - mgr_.message(EntityManagerMessages::fsiBadFold, - StringMessageArg(value)); - } - else - fold = 1; - hadFold = 1; - } - else if (matchKey(token, "NOFOLD")) { - if (!neutral) - mgr_.message(EntityManagerMessages::fsiFoldNotNeutral); - else if (hadFold) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("FOLD"))); - else if (gotValue) - mgr_.message(EntityManagerMessages::fsiValueAsName, - StringMessageArg(token)); - else - fold = 0; - hadFold = 1; - } - else if (matchKey(token, "SMCRD")) { - if (hadSmcrd) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) { - if (value.size() == 0) - smcrd = -1; - else if (value.size() == 1) - smcrd = value[0]; - else - mgr_.message(EntityManagerMessages::fsiBadSmcrd, - StringMessageArg(value)); - } - else - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - hadSmcrd = 1; - } - else if (matchKey(token, "RECORDS")) { - if (sos.storageManager->requiresCr()) - mgr_.message(EntityManagerMessages::fsiRecordsNotApplicable); - else if (hadRecords) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) { - if (!lookupRecords(value, sos.records)) - mgr_.message(EntityManagerMessages::fsiUnsupportedRecords, - StringMessageArg(value)); - } - else - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - hadRecords = 1; - } - else if (matchKey(token, "SOIBASE")) { - if (hadBase) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(token)); - else if (gotValue) - value.swap(sos.baseId); - else { - mgr_.message(EntityManagerMessages::fsiMissingValue, - StringMessageArg(token)); - sos.baseId.resize(0); - } - hadBase = 1; - } - else if (lookupRecords(token, records)) { - if (sos.storageManager->requiresCr()) - mgr_.message(EntityManagerMessages::fsiRecordsNotApplicable); - else if (hadRecords) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("RECORDS"))); - else if (!gotValue) - sos.records = records; - else - mgr_.message(EntityManagerMessages::fsiValueAsName, - StringMessageArg(token)); - hadRecords = 1; - } - else if (matchKey(token, "NOTRACK")) { - if (hadTracking) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("TRACKING"))); - else if (!gotValue) - sos.notrack = 1; - else - mgr_.message(EntityManagerMessages::fsiValueAsName, - StringMessageArg(token)); - hadTracking = 1; - } - else if (matchKey(token, "TRACK")) { - if (hadTracking) - mgr_.message(EntityManagerMessages::fsiDuplicateAttribute, - StringMessageArg(idCharset_.execToDesc("TRACKING"))); - else if (gotValue) - mgr_.message(EntityManagerMessages::fsiValueAsName, - StringMessageArg(token)); - hadTracking = 1; - } - else - mgr_.message(gotValue - ? EntityManagerMessages::fsiUnsupportedAttribute - : EntityManagerMessages::fsiUnsupportedAttributeToken, - StringMessageArg(token)); - } - if (hadBase && sos.baseId.size() > 0) { - convertId(sos.baseId, smcrd, sos.storageManager); - if (neutral) { - if (!sos.storageManager->transformNeutral(sos.baseId, fold, mgr_)) - sos.baseId.resize(0); - } - } - if (!hadZapeof && hadRecords && sos.records == StorageObjectSpec::asis) - sos.zapEof = 0; - return 1; -} - -FSIParser::RecordType FSIParser::recordTypeTable[] = { - { "FIND", StorageObjectSpec::find }, - { "ASIS", StorageObjectSpec::asis }, - { "CR", StorageObjectSpec::cr }, - { "LF", StorageObjectSpec::lf }, - { "CRLF", StorageObjectSpec::crlf } -}; - -const char *FSIParser::recordsName(StorageObjectSpec::Records records) -{ - for (size_t i = 0; i < SIZEOF(recordTypeTable); i++) - if (records == recordTypeTable[i].value) - return recordTypeTable[i].name; - return 0; -} - -Boolean FSIParser::lookupRecords(const StringC &token, - StorageObjectSpec::Records &result) -{ - for (size_t i = 0; i < SIZEOF(recordTypeTable); i++) - if (matchKey(token, recordTypeTable[i].name)) { - result = recordTypeTable[i].value; - return 1; - } - return 0; -} - -void FSIParser::setDefaults(StorageObjectSpec &sos) -{ - if (sos.storageManager->requiresCr()) - sos.records = StorageObjectSpec::cr; - else if (isNdata_ - || (defSpec_ && defSpec_->records == StorageObjectSpec::asis)) - sos.records = StorageObjectSpec::asis; - if (isNdata_ || (defSpec_ && !defSpec_->zapEof)) - sos.zapEof = 0; - if (defSpec_ && defSpec_->storageManager == sos.storageManager) { - if (defId_) - sos.baseId = *defId_; - else { - sos.baseId = defSpec_->specId; - sos.storageManager->resolveRelative(defSpec_->baseId, - sos.baseId, - 0); - } - } - sos.codingSystem = sos.storageManager->requiredCodingSystem(); - if (sos.codingSystem) { - sos.zapEof = 0; // hack - sos.codingSystemType = StorageObjectSpec::special; - } - else { - sos.codingSystem = em_->defaultCodingSystem_; - sos.codingSystemType - = (em_->internalCharsetIsDocCharset_ - ? StorageObjectSpec::bctf - : StorageObjectSpec::encoding); - if (isNdata_) { - sos.codingSystem = em_->codingSystemKit_->identityInputCodingSystem(); - sos.codingSystemType = StorageObjectSpec::special; - } - else if (defSpec_) { - sos.codingSystem = defSpec_->codingSystem; - sos.codingSystemName = defSpec_->codingSystemName; - sos.codingSystemType = defSpec_->codingSystemType; - } - } -} - -Boolean FSIParser::parseAttribute(StringC &token, Boolean &gotValue, - StringC &value) -{ - Xchar c = get(); - while (isS(c)) - c = get(); - if (c == -1) { - return 0; - } - token.resize(0); - if (matchChar(c, '>')) - return 1; - if (matchChar(c, '"') || matchChar(c, '\'') || matchChar(c, '=')) - return 0; - for (;;) { - token += c; - c = get(); - if (c == -1) - return 0; - if (isS(c)) - break; - if (matchChar(c, '>') || matchChar(c, '=')) - break; - } - while (isS(c)) - c = get(); - if (c == -1) - return 0; - if (!matchChar(c, '=')) { - unget(); - gotValue = 0; - return 1; - } - gotValue = 1; - value.resize(0); - - c = get(); - while (isS(c)) - c = get(); - if (matchChar(c, '>') || matchChar(c, '=')) - return 0; - if (matchChar(c, '"') || matchChar(c, '\'')) { - Char lit = c; - for (;;) { - Xchar c = get(); - if (c == lit) - break; - if (c == -1) - return 0; - if (matchChar(c, '\n')) - ; - else if (matchChar(c, '\r') || matchChar(c, '\t')) - value += idCharset_.execToDesc(' '); - else - value += c; - } - uncharref(value); - } - else { - for (;;) { - value += c; - c = get(); - if (c == -1) - return 0; - if (isS(c)) - break; - if (matchChar(c, '>') || matchChar(c, '=')) { - unget(); - break; - } - } - } - return 1; -} - -void FSIParser::uncharref(StringC &str) -{ - size_t j = 0; - size_t i = 0; - while (i < str.size()) { - int digit; - if (matchChar(str[i], '&') - && i + 2 < str.size() - && matchChar(str[i + 1], '#') - && convertDigit(str[i + 2], digit)) { - unsigned long val = digit; - i += 3; - while (i < str.size() && convertDigit(str[i], digit)) { - val = val*10 + digit; - i++; - } - str[j++] = val; - if (i < str.size() && matchChar(str[i], ';')) - i++; - } - else - str[j++] = str[i++]; - } - str.resize(j); -} - -Boolean FSIParser::convertId(StringC &id, Xchar smcrd, - const StorageManager *sm) -{ - const CharsetInfo *smCharset = sm->idCharset(); - StringC newId; - size_t i = 0; - while (i < id.size()) { - UnivChar univ; - WideChar wide; - ISet wideSet; - int digit; - if (Xchar(id[i]) == smcrd - && i + 1 < id.size() - && convertDigit(id[i + 1], digit)) { - i += 2; - Char val = digit; - while (i < id.size() && convertDigit(id[i], digit)) { - val = val*10 + digit; - i++; - } - newId += val; - if (i < id.size() && matchChar(id[i], ';')) - i++; - } - else if (smCharset) { - if (!idCharset_.descToUniv(id[i++], univ)) - return 0; - if (univ == UnivCharsetDesc::rs) - ; - else if (univ == UnivCharsetDesc::re && sm->reString()) - newId += *sm->reString(); - else if (smCharset->univToDesc(univ, wide, wideSet) != 1 - || wide > charMax) - return 0; // FIXME give error - else - newId += Char(wide); - } - else - newId += id[i++]; - } - newId.swap(id); - return 1; -} - -ParsedSystemId::ParsedSystemId() -{ -} - -ParsedSystemId::Map::Map() -{ -} - -ParsedSystemId::Map::Map(const ParsedSystemId::Map& x) -: type(x.type), - publicId(x.publicId) -{ -} - -ParsedSystemId::Map::~Map() -{ -} - -ParsedSystemId::Map& ParsedSystemId::Map::operator=(const ParsedSystemId::Map& x) -{ - if (this != &x) { - type = x.type; - publicId = x.publicId; - } - return *this; -} - -static -void unparseSoi(const StringC &soi, - const CharsetInfo *idCharset, - const CharsetInfo &resultCharset, - StringC &result, - Boolean &needSmcrd); - -void ParsedSystemId::unparse(const CharsetInfo &resultCharset, - Boolean isNdata, - StringC &result) const -{ - size_t len = size(); - result.resize(0); - size_t i; - for (i = 0; i < maps.size(); i++) { - if (maps[i].type == Map::catalogDocument) - result += resultCharset.execToDesc(""); - else if (maps[i].type == Map::catalogPublic) { - result += resultCharset.execToDesc(""); - } - } - for (i = 0; i < len; i++) { - const StorageObjectSpec &sos = (*this)[i]; - result += resultCharset.execToDesc('<'); - result += resultCharset.execToDesc(sos.storageManager->type()); - if (sos.notrack) - result += resultCharset.execToDesc(" NOTRACK"); - if (!sos.search) - result += resultCharset.execToDesc(" NOSEARCH"); - if (!sos.storageManager->requiresCr() - && sos.records != (isNdata ? StorageObjectSpec::asis : StorageObjectSpec::find)) { - result += resultCharset.execToDesc(' '); - result += resultCharset.execToDesc(FSIParser::recordsName(sos.records)); - } - if (sos.codingSystemName && sos.codingSystemType != StorageObjectSpec::special) { - if (!sos.zapEof) - result += resultCharset.execToDesc(" NOZAPEOF"); - result += resultCharset.execToDesc(sos.codingSystemType == StorageObjectSpec::bctf - ? " BCTF=" - : " ENCODING="); - result += resultCharset.execToDesc(sos.codingSystemName); - } - Boolean needSmcrd = 0; - if (sos.baseId.size() != 0) { - result += resultCharset.execToDesc(" SOIBASE='"); - unparseSoi(sos.baseId, - sos.storageManager->idCharset(), - resultCharset, - result, - needSmcrd); - result += resultCharset.execToDesc('\''); - } - StringC tem; - unparseSoi(sos.specId, - sos.storageManager->idCharset(), - resultCharset, - tem, - needSmcrd); - if (needSmcrd) - result += resultCharset.execToDesc(" SMCRD='^'"); - result += resultCharset.execToDesc('>'); - result += tem; - } -} - -void unparseSoi(const StringC &soi, - const CharsetInfo *idCharset, - const CharsetInfo &resultCharset, - StringC &result, - Boolean &needSmcrd) -{ - if (!idCharset) { - for (size_t i = 0; i < soi.size(); i++) { - char buf[32]; - sprintf(buf, "&#%lu;", (unsigned long)soi[i]); - result += resultCharset.execToDesc(buf); - } - return; - } - for (size_t i = 0; i < soi.size(); i++) { - UnivChar univ; - WideChar to; - ISet toSet; - if (!idCharset->descToUniv(soi[i], univ) - || univ >= 127 - || univ < 32 - || univ == 36 // $ - || univ == 96 // ` -#ifndef SP_MSDOS_FILENAMES - || univ == 92 // backslash -#endif - || univ == 94 // ^ - || resultCharset.univToDesc(univ, to, toSet) != 1) { - needSmcrd = 1; - char buf[32]; - sprintf(buf, "^%lu;", (unsigned long)soi[i]); - result += resultCharset.execToDesc(buf); - } - else { - switch (univ) { - case 34: // double quote - case 35: // # - case 39: // apostrophe - case 60: // < - { - char buf[32]; - sprintf(buf, "&#%lu;", (unsigned long)to); - result += resultCharset.execToDesc(buf); - } - break; - default: - result += Char(to); - break; - } - } - } -} - -#ifdef SP_NAMESPACE -} -#endif diff --git a/lib/parser_inst.cxx b/lib/parser_inst.cxx index f71b3a6..a7f7863 100644 --- a/lib/parser_inst.cxx +++ b/lib/parser_inst.cxx @@ -9,7 +9,6 @@ namespace SP_NAMESPACE { // Copyright (c) 1994 James Clark // See the file COPYING for copying permission. -#include #include "splib.h" #ifdef SP_MANUAL_INST @@ -1339,7 +1338,7 @@ typedef Vector Dummy_96; #endif #endif // we really just want to test if size_t == unsigned int -#if INT_MAX != SSIZE_MAX +#if !defined(SIZEOF_SIZE_T) || !defined(SIZEOF_UNSIGNED_INT) || (SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT) #ifdef __DECCXX #pragma define_template Vector #else diff --git a/lib/parser_inst.cxx.multilib b/lib/parser_inst.cxx.multilib deleted file mode 100644 index a7f7863..0000000 --- a/lib/parser_inst.cxx.multilib +++ /dev/null @@ -1,1650 +0,0 @@ -#ifdef SP_NAMESPACE -namespace SP_NAMESPACE { -#endif - - -#ifdef SP_NAMESPACE -} -#endif -// Copyright (c) 1994 James Clark -// See the file COPYING for copying permission. - -#include "splib.h" - -#ifdef SP_MANUAL_INST - -#define SP_DEFINE_TEMPLATES -#include "Owner.h" -#include "CopyOwner.h" -#include "Vector.h" -#include "NCVector.h" -#include "Ptr.h" -#include "IList.h" -#include "IQueue.h" -#include "List.h" -#include "OwnerTable.h" -#include "PointerTable.h" -#include "HashTable.h" -#include "HashTableItemBase.h" -#include "StringOf.h" -#include "IListIter.h" -#include "ListIter.h" -#include "NamedResourceTable.h" -#undef SP_DEFINE_TEMPLATES - -#include -#include "Attribute.h" -#include "Attributed.h" -#include "CharsetDecl.h" -#include "ContentToken.h" -#include "Dtd.h" -#include "ElementType.h" -#include "Entity.h" -#include "EntityCatalog.h" -#include "EntityManager.h" -#include "EquivClass.h" -#include "Event.h" -#include "Hash.h" -#include "HashTable.h" -#include "HashTableItemBase.h" -#include "InputSource.h" -#include "LinkProcess.h" -#include "Lpd.h" -#include "LpdEntityRef.h" -#include "Markup.h" -#include "NamedResource.h" -#include "NamedTable.h" -#include "Named.h" -#include "NameToken.h" -#include "OpenElement.h" -#include "OutputState.h" -#include "Recognizer.h" -#include "Sd.h" -#include "SdText.h" -#include "SdFormalError.h" -#include "SrInfo.h" -#include "StringResource.h" -#include "Syntax.h" -#include "Text.h" -#include "Trie.h" -#include "Undo.h" -#include "Boolean.h" -#include "types.h" -#include "Id.h" - -#ifdef SP_NAMESPACE -namespace SP_NAMESPACE { -#endif - -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_0; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_1; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_2; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_3; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_4; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_5; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_6; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_7; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_8; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_9; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_10; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_11; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_12; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_13; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_14; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_15; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_16; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_17; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_18; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_19; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_20; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_21; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_22; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_23; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Ptr -#else -#ifdef __xlC__ -#pragma define(Ptr) -#else -#ifdef SP_ANSI_CLASS_INST -template class Ptr; -#else -typedef Ptr Dummy_24; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstPtr -#else -#ifdef __xlC__ -#pragma define(ConstPtr) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstPtr; -#else -typedef ConstPtr Dummy_25; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template CopyOwner -#else -#ifdef __xlC__ -#pragma define(CopyOwner) -#else -#ifdef SP_ANSI_CLASS_INST -template class CopyOwner; -#else -typedef CopyOwner Dummy_26; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template CopyOwner -#else -#ifdef __xlC__ -#pragma define(CopyOwner) -#else -#ifdef SP_ANSI_CLASS_INST -template class CopyOwner; -#else -typedef CopyOwner Dummy_27; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template CopyOwner -#else -#ifdef __xlC__ -#pragma define(CopyOwner) -#else -#ifdef SP_ANSI_CLASS_INST -template class CopyOwner; -#else -typedef CopyOwner Dummy_28; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template CopyOwner -#else -#ifdef __xlC__ -#pragma define(CopyOwner) -#else -#ifdef SP_ANSI_CLASS_INST -template class CopyOwner; -#else -typedef CopyOwner Dummy_29; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template NCVector > -#else -#ifdef __xlC__ -#pragma define(NCVector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class NCVector >; -#else -typedef NCVector > Dummy_30; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_31; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template NCVector > -#else -#ifdef __xlC__ -#pragma define(NCVector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class NCVector >; -#else -typedef NCVector > Dummy_32; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_33; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template HashTableItem -#else -#ifdef __xlC__ -#pragma define(HashTableItem) -#else -#ifdef SP_ANSI_CLASS_INST -template class HashTableItem; -#else -typedef HashTableItem Dummy_34; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template HashTable -#else -#ifdef __xlC__ -#pragma define(HashTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class HashTable; -#else -typedef HashTable Dummy_35; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template HashTableItem -#else -#ifdef __xlC__ -#pragma define(HashTableItem) -#else -#ifdef SP_ANSI_CLASS_INST -template class HashTableItem; -#else -typedef HashTableItem Dummy_36; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template HashTable -#else -#ifdef __xlC__ -#pragma define(HashTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class HashTable; -#else -typedef HashTable Dummy_37; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_38; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_39; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_40; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_41; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_42; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_43; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_44; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IQueue -#else -#ifdef __xlC__ -#pragma define(IQueue) -#else -#ifdef SP_ANSI_CLASS_INST -template class IQueue; -#else -typedef IQueue Dummy_45; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IQueue -#else -#ifdef __xlC__ -#pragma define(IQueue) -#else -#ifdef SP_ANSI_CLASS_INST -template class IQueue; -#else -typedef IQueue Dummy_46; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template OwnerTable -#else -#ifdef __xlC__ -#pragma define(OwnerTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class OwnerTable; -#else -typedef OwnerTable Dummy_47; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template OwnerTableIter -#else -#ifdef __xlC__ -#pragma define(OwnerTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class OwnerTableIter; -#else -typedef OwnerTableIter Dummy_48; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_49; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_50; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_51; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_52; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_53; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_54; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_55; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_56; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_57; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_58; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_59; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_60; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_61; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Owner -#else -#ifdef __xlC__ -#pragma define(Owner) -#else -#ifdef SP_ANSI_CLASS_INST -template class Owner; -#else -typedef Owner Dummy_62; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template PointerTableIter -#else -#ifdef __xlC__ -#pragma define(PointerTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class PointerTableIter; -#else -typedef PointerTableIter Dummy_63; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template PointerTable -#else -#ifdef __xlC__ -#pragma define(PointerTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class PointerTable; -#else -typedef PointerTable Dummy_64; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template PointerTable,StringC,Hash,NamedResourceKeyFunction> -#else -#ifdef __xlC__ -#pragma define(PointerTable,StringC,Hash,NamedResourceKeyFunction>) -#else -#ifdef SP_ANSI_CLASS_INST -template class PointerTable,StringC,Hash,NamedResourceKeyFunction>; -#else -typedef PointerTable,StringC,Hash,NamedResourceKeyFunction> Dummy_65; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template PointerTableIter,StringC,Hash,NamedResourceKeyFunction> -#else -#ifdef __xlC__ -#pragma define(PointerTableIter,StringC,Hash,NamedResourceKeyFunction>) -#else -#ifdef SP_ANSI_CLASS_INST -template class PointerTableIter,StringC,Hash,NamedResourceKeyFunction>; -#else -typedef PointerTableIter,StringC,Hash,NamedResourceKeyFunction> Dummy_66; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_67; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_68; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_69; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_70; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_71; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_72; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_73; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_74; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_75; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_76; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_77; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_78; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_79; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_80; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_81; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_82; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_83; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_84; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_85; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_86; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_87; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_88; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_89; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_90; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_91; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_92; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_93; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_94; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_95; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_96; -#endif -#endif -#endif - // we really just want to test if size_t == unsigned int -#if !defined(SIZEOF_SIZE_T) || !defined(SIZEOF_UNSIGNED_INT) || (SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT) -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_97; -#endif -#endif -#endif -#endif - -#ifdef __DECCXX -#pragma define_template NamedTable -#else -#ifdef __xlC__ -#pragma define(NamedTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class NamedTable; -#else -typedef NamedTable Dummy_98; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template NamedTableIter -#else -#ifdef __xlC__ -#pragma define(NamedTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class NamedTableIter; -#else -typedef NamedTableIter Dummy_99; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IListIter -#else -#ifdef __xlC__ -#pragma define(IListIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class IListIter; -#else -typedef IListIter Dummy_100; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IListIter -#else -#ifdef __xlC__ -#pragma define(IListIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class IListIter; -#else -typedef IListIter Dummy_101; -#endif -#endif -#endif - -#ifdef __DECCXX -#pragma define_template NamedResourceTable -#else -#ifdef __xlC__ -#pragma define(NamedResourceTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class NamedResourceTable; -#else -typedef NamedResourceTable Dummy_102; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template NamedResourceTable -#else -#ifdef __xlC__ -#pragma define(NamedResourceTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class NamedResourceTable; -#else -typedef NamedResourceTable Dummy_103; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template NamedResourceTableIter -#else -#ifdef __xlC__ -#pragma define(NamedResourceTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class NamedResourceTableIter; -#else -typedef NamedResourceTableIter Dummy_104; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template NamedResourceTableIter -#else -#ifdef __xlC__ -#pragma define(NamedResourceTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class NamedResourceTableIter; -#else -typedef NamedResourceTableIter Dummy_105; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstNamedResourceTableIter -#else -#ifdef __xlC__ -#pragma define(ConstNamedResourceTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstNamedResourceTableIter; -#else -typedef ConstNamedResourceTableIter Dummy_106; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template ConstNamedResourceTableIter -#else -#ifdef __xlC__ -#pragma define(ConstNamedResourceTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class ConstNamedResourceTableIter; -#else -typedef ConstNamedResourceTableIter Dummy_107; -#endif -#endif -#endif - -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_108; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_109; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > > -#else -#ifdef __xlC__ -#pragma define(Vector > >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector > >; -#else -typedef Vector > > Dummy_110; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_111; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_112; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector > -#else -#ifdef __xlC__ -#pragma define(Vector >) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector >; -#else -typedef Vector > Dummy_113; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template Vector -#else -#ifdef __xlC__ -#pragma define(Vector) -#else -#ifdef SP_ANSI_CLASS_INST -template class Vector; -#else -typedef Vector Dummy_114; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template PointerTable -#else -#ifdef __xlC__ -#pragma define(PointerTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class PointerTable; -#else -typedef PointerTable Dummy_115; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template PointerTableIter -#else -#ifdef __xlC__ -#pragma define(PointerTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class PointerTableIter; -#else -typedef PointerTableIter Dummy_116; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template OwnerTable -#else -#ifdef __xlC__ -#pragma define(OwnerTable) -#else -#ifdef SP_ANSI_CLASS_INST -template class OwnerTable; -#else -typedef OwnerTable Dummy_117; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template OwnerTableIter -#else -#ifdef __xlC__ -#pragma define(OwnerTableIter) -#else -#ifdef SP_ANSI_CLASS_INST -template class OwnerTableIter; -#else -typedef OwnerTableIter Dummy_118; -#endif -#endif -#endif -#ifdef __DECCXX -#pragma define_template IList -#else -#ifdef __xlC__ -#pragma define(IList) -#else -#ifdef SP_ANSI_CLASS_INST -template class IList; -#else -typedef IList Dummy_119; -#endif -#endif -#endif - -#ifdef SP_NAMESPACE -} -#endif - -#endif /* SP_MANUAL_INST */ diff --git a/lib/parser_inst.m4 b/lib/parser_inst.m4 index 29addb1..541c614 100644 --- a/lib/parser_inst.m4 +++ b/lib/parser_inst.m4 @@ -1,7 +1,6 @@ // Copyright (c) 1994 James Clark // See the file COPYING for copying permission. -#include #include "splib.h" #ifdef SP_MANUAL_INST @@ -167,7 +166,7 @@ __instantiate(Vector) __instantiate(Vector) __instantiate(Vector) // we really just want to test if size_t == unsigned int -#if INT_MAX != SSIZE_MAX +#if !defined(SIZEOF_SIZE_T) || !defined(SIZEOF_UNSIGNED_INT) || (SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT) __instantiate(Vector) #endif diff --git a/lib/parser_inst.m4.multilib b/lib/parser_inst.m4.multilib deleted file mode 100644 index 541c614..0000000 --- a/lib/parser_inst.m4.multilib +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) 1994 James Clark -// See the file COPYING for copying permission. - -#include "splib.h" - -#ifdef SP_MANUAL_INST - -#define SP_DEFINE_TEMPLATES -#include "Owner.h" -#include "CopyOwner.h" -#include "Vector.h" -#include "NCVector.h" -#include "Ptr.h" -#include "IList.h" -#include "IQueue.h" -#include "List.h" -#include "OwnerTable.h" -#include "PointerTable.h" -#include "HashTable.h" -#include "HashTableItemBase.h" -#include "StringOf.h" -#include "IListIter.h" -#include "ListIter.h" -#include "NamedResourceTable.h" -#undef SP_DEFINE_TEMPLATES - -#include -#include "Attribute.h" -#include "Attributed.h" -#include "CharsetDecl.h" -#include "ContentToken.h" -#include "Dtd.h" -#include "ElementType.h" -#include "Entity.h" -#include "EntityCatalog.h" -#include "EntityManager.h" -#include "EquivClass.h" -#include "Event.h" -#include "Hash.h" -#include "HashTable.h" -#include "HashTableItemBase.h" -#include "InputSource.h" -#include "LinkProcess.h" -#include "Lpd.h" -#include "LpdEntityRef.h" -#include "Markup.h" -#include "NamedResource.h" -#include "NamedTable.h" -#include "Named.h" -#include "NameToken.h" -#include "OpenElement.h" -#include "OutputState.h" -#include "Recognizer.h" -#include "Sd.h" -#include "SdText.h" -#include "SdFormalError.h" -#include "SrInfo.h" -#include "StringResource.h" -#include "Syntax.h" -#include "Text.h" -#include "Trie.h" -#include "Undo.h" -#include "Boolean.h" -#include "types.h" -#include "Id.h" - -#ifdef SP_NAMESPACE -namespace SP_NAMESPACE { -#endif - -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(Ptr) -__instantiate(ConstPtr) -__instantiate(CopyOwner) -__instantiate(CopyOwner) -__instantiate(CopyOwner) -__instantiate(CopyOwner) -__instantiate(NCVector >) -__instantiate(Vector >) -__instantiate(NCVector >) -__instantiate(Vector) -__instantiate(`HashTableItem') -__instantiate(`HashTable') -__instantiate(`HashTableItem') -__instantiate(`HashTable') -__instantiate(IList) -__instantiate(IList) -__instantiate(IList) -__instantiate(IList) -__instantiate(IList) -__instantiate(IList) -__instantiate(IList) -__instantiate(IQueue) -__instantiate(IQueue) -__instantiate(`OwnerTable') -__instantiate(`OwnerTableIter') -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(Owner) -__instantiate(`PointerTableIter') -__instantiate(`PointerTable') -__instantiate(`PointerTable,StringC,Hash,NamedResourceKeyFunction>') -__instantiate(`PointerTableIter,StringC,Hash,NamedResourceKeyFunction>') -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) -__instantiate(Vector) - // we really just want to test if size_t == unsigned int -#if !defined(SIZEOF_SIZE_T) || !defined(SIZEOF_UNSIGNED_INT) || (SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT) -__instantiate(Vector) -#endif - -__instantiate(NamedTable) -__instantiate(NamedTableIter) -__instantiate(IListIter) -__instantiate(IListIter) - -__instantiate(NamedResourceTable) -__instantiate(NamedResourceTable) -__instantiate(NamedResourceTableIter) -__instantiate(NamedResourceTableIter) -__instantiate(ConstNamedResourceTableIter) -__instantiate(ConstNamedResourceTableIter) - -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector > >) -__instantiate(Vector) -__instantiate(Vector >) -__instantiate(Vector >) -__instantiate(Vector) -__instantiate(`PointerTable') -__instantiate(`PointerTableIter') -__instantiate(`OwnerTable') -__instantiate(`OwnerTableIter') -__instantiate(IList) - -#ifdef SP_NAMESPACE -} -#endif - -#endif /* SP_MANUAL_INST */