00001 /*
00002 This product contains certain software code or other information
00003 ("AT&T Software") proprietary to AT&T Corp. ("AT&T"). The AT&T
00004 Software is provided to you "AS IS". YOU ASSUME TOTAL RESPONSIBILITY
00005 AND RISK FOR USE OF THE AT&T SOFTWARE. AT&T DOES NOT MAKE, AND
00006 EXPRESSLY DISCLAIMS, ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND
00007 WHATSOEVER, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00008 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WARRANTIES OF
00009 TITLE OR NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS, ANY
00010 WARRANTIES ARISING BY USAGE OF TRADE, COURSE OF DEALING OR COURSE OF
00011 PERFORMANCE, OR ANY WARRANTY THAT THE AT&T SOFTWARE IS "ERROR FREE" OR
00012 WILL MEET YOUR REQUIREMENTS.
00013
00014 Unless you accept a license to use the AT&T Software, you shall not
00015 reverse compile, disassemble or otherwise reverse engineer this
00016 product to ascertain the source code for any AT&T Software.
00017
00018 (c) AT&T Corp. All rights reserved. AT&T is a registered trademark of AT&T Corp.
00019
00020 ***********************************************************************
00021
00022 History:
00023
00024 24/11/99 - initial release by Hartmut Liefke, liefke@seas.upenn.edu
00025 Dan Suciu, suciu@research.att.com
00026 */
00027
00028 //**************************************************************************
00029 //**************************************************************************
00030
00031 // This file contains several global definitions of types and constants
00032
00033 #ifndef TYPES_HPP
00034 #define TYPES_HPP
00035
00036 typedef unsigned short TLabelID;
00037 #define LABEL_UNDEFINED ((TLabelID)65535)
00038 #define ATTRIBLABEL_STARTIDX ((TLabelID)32768)
00039
00040 #define GET_LABELID(l) ((l)&32767)
00041
00042 typedef unsigned short TContID;
00043 #define CONTID_UNDEFINED ((TContID)65535)
00044
00045 #define SMALLCONT_THRESHOLD 2000
00046
00047
00048 #define LABELIDX_TOKENOFFS 5
00049
00050 #define TREETOKEN_ENDLABEL 0
00051 #define TREETOKEN_EMPTYENDLABEL 1
00052 #define TREETOKEN_WHITESPACE 2
00053 #define TREETOKEN_ATTRIBWHITESPACE 3
00054 #define TREETOKEN_SPECIAL 4
00055
00056 #define WordAlignUInt(v) ((((unsigned)(v)+3)|3)-1)
00057
00058 // We define three types of white-space handling. Each of the
00059 // white-space handlings can be applied to full white space string,
00060 // left white space string and right white space strings.
00061
00062 #define WHITESPACE_IGNORE 0 // Ignores the white space sequence
00063 #define WHITESPACE_STORETEXT 1 // Considers the white space sequence as normal text
00064 #define WHITESPACE_STOREGLOBAL 2 // Stores the white space sequence in a special container
00065 #define WHITESPACE_DEFAULT 3 // Use the gloval setting (one of the three above values)
00066 // as the default for path expressions
00067
00068 #include <string.h>
00069 /*
00070 inline int mymemcmp(const char *buf1,const char *buf2,int len)
00071 {
00072 if(len>20)
00073 return memcmp(buf1,buf2,len);
00074 else
00075 {
00076 while(len--)
00077 {
00078 if(*buf1!=*buf2)
00079 return 1;
00080 buf1++;buf2++;
00081 }
00082 return 0;
00083 }
00084 }
00085
00086 inline void mymemcpy(char *dest,const char *src, int count)
00087 {
00088 if(count>20)
00089 memcpy(dest,src,count);
00090 else
00091 {
00092 while(count--)
00093 {
00094 *dest=*src;
00095 dest++;src++;
00096 }
00097 }
00098 }
00099 */
00100 #define mymemcmp(b1,b2,len) memcmp(b1,b2,len)
00101 #define mymemcpy(b1,b2,len) memcpy(b1,b2,len)
00102
00103 #define mymemset(b1,c,len) memset(b1,c,len)
00104 /*
00105 inline void mymemset(char *dest,char c, int count)
00106 {
00107 while(count--)
00108 {
00109 *dest=c;
00110 dest++;
00111 }
00112 }
00113 */
00114
00115
00116 #endif
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001