00001 /* $Id: sgmldefs.h,v 1.2 2005/03/03 17:23:07 kifer Exp $ 00002 00003 Part of SWI-Prolog 00004 00005 Author: Jan Wielemaker 00006 E-mail: jan@swi.psy.uva.nl 00007 WWW: http://www.swi-prolog.org 00008 Copyright (C): 1985-2002, University of Amsterdam 00009 00010 This library is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU Lesser General Public 00012 License as published by the Free Software Foundation; either 00013 version 2.1 of the License, or (at your option) any later version. 00014 00015 This library is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public 00021 License along with this library; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 */ 00024 00025 #ifndef SGMLDEFS_H_INCLUDED 00026 #define SGMLDEFS_H_INCLUDED 00027 00028 #ifdef HAVE_CONFIG_H 00029 #include <config.h> 00030 #else 00031 #ifdef WIN_NT 00032 #define HAVE_MALLOC_H 1 00033 #define HAVE_IO_H 1 00034 #endif 00035 #endif 00036 00037 #ifdef HAVE_DMALLOC_H 00038 #include <dmalloc.h> 00039 #endif 00040 00041 #define UTF8 1 /* Include UTF-8 decoding */ 00042 #define XMLNS 1 /* support XML namespaces */ 00043 00044 /******************************* 00045 * INPUT/OUTPUT CHARACTERS * 00046 *******************************/ 00047 00048 typedef unsigned char ochar; /* output character */ 00049 typedef unsigned char ichar; /* input character */ 00050 00051 #define ICHARSET_SIZE (1<<(8*sizeof(ichar))) 00052 00053 #define USE_STRING_FUNCTIONS 1 /* use built-in str* functions */ 00054 00055 00056 /******************************* 00057 * LIMITS * 00058 *******************************/ 00059 00060 #define INPUT_CHARSET_SIZE (1<<(sizeof(ichar)*8)) 00061 #define OUTPUT_CHARSET_SIZE (1<<(sizeof(ochar)*8)) 00062 #define SYMBOLHASHSIZE 256 00063 #define MAXSTRINGLEN 2048 00064 #define MAXNMLEN 256 00065 #define MAXDECL 10240 00066 #define MAXATTELEM 256 /* #elements in one ATTLIST */ 00067 #define MAXNAMEGROUP 256 /* #names in a (group) */ 00068 #define MAXATTRIBUTES 256 /* attributes per element */ 00069 #define MAXMAPLEN 32 /* max sequence length for SHORTREF */ 00070 #define SHORTENTITYFILE 100 /* short external entities in mem */ 00071 00072 00073 /******************************* 00074 * CONSTANTS * 00075 *******************************/ 00076 00077 #ifndef TRUE 00078 #define TRUE 1 00079 #define FALSE 0 00080 #endif 00081 00082 #define LF 10 00083 #define CR 13 00084 00085 #endif /*SGMLDEFS_H_INCLUDED*/