include/constants.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  * Copyright 2002 Jeff Rush <jrush@taupro.com>
00003  * Original Copyright 1979-2002 Udanax.com
00004  *
00005  * This file is part of the Udanax xanalogical storage system.
00006  *
00007  * Udanax is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * Udanax is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with Udanax; if not, write to the Free Software Foundation,
00019  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  **********************************************************************/
00021 
00030 /* Modification History:
00031  * $Log: constants.h,v $
00032  * Revision 1.4  2002/05/28 03:51:13  jrush
00033  * Updated sources to comply with a GPL licensing.
00034  *
00035  * Revision 1.3  2002/04/16 22:39:50  jrush
00036  * Converted many #defines into enumeration types instead, and adjusted
00037  * function prototypes accordingly.
00038  *
00039  * Revision 1.2  2002/04/12 11:46:24  jrush
00040  * Major rearrangement of include contents, to reflect a hopefully more
00041  * logical layout as we refactor Udanax into classes.
00042  *
00043  * Revision 1.1  2002/04/12 09:33:32  jrush
00044  * To clean up include nesting, added a place to collect constants.
00045  *
00046  *
00047  */
00048 
00049 #ifndef __UDANAX_CONSTANTS_H__
00050 #define __UDANAX_CONSTANTS_H__
00051 
00052 #define BIT
00053 #define GRANTEXTLENGTH  950
00054 #define XUBUFSIZ        1024
00055 #define ERROR           -1
00056 #define stdprint        2
00057 #define INTLEN          7
00058 #define NAMELEN         103 /* size of filename */
00059 #define metachar        int
00060 
00061 #define ESC             '\033' /* Standard ASCII 'escape' character */
00062 #define OK              0      /* General purpose "no error" return value */
00063 #define MAXLINE         400    /* Longest line of input expected from the console */
00064 #define RECURSIVE
00065 
00066 //#define typeitemid char
00067 enum typeitemid {
00068     TEXTID=0,
00069     ISPANID=1,
00070     VSPANID=2,
00071     VSPECID=3,
00072     NODEID=4,
00073     ADDRESSID=5,
00074     SPORGLID=6,
00075     LINKID=ADDRESSID,
00076     UNKNOWNID=99, // Is never legally used, for asserts only
00077 };
00078 
00079 enum GranItemType {
00080     GRANNULL=0,
00081     GRANTEXT=1,
00082     GRANORGL=2,
00083     GRANCLEARLYILLEGALINFO=42,
00084 };
00085 
00086 /*
00087  * Tag constants for things allocated in memory.
00088  */
00089 
00090 enum MemTags {
00091     SESSTAG=                     1,
00092     INTTAG=                      2,
00093     ITEMTAG=                     4,
00094     CONTEXTTAG=                  6,
00095     CONTEXT2DTAG=                8,
00096     CRUMCONTEXTTAG=             10,
00097     CUCTAG=                     12,
00098     CBCTAG=                     14,
00099     SPANTAG=                    16,
00100     TUMBLERTAG=                 18,
00101     ISPANTAG=                   20,
00102     VSPANTAG=                   22,
00103     SPORGLTAG=                  24,
00104     LINKTAG=                    26,
00105     VSPECTAG=                   28,
00106     FREEDISKLOAFTAG=            30,
00107     BERTTAG=                    32,
00108     BERTCONSCELLTAG=            34,
00109     FREEDISKENTRYTAG=           36,
00110     FREEDISKENTRYCONSCELLTAG=   38,
00111     HUMBERTAG=                  40,
00112     LOAFTAG=                    42,
00113     POINTERTAG=                100,
00114 };
00115 
00116 
00117 /*
00118  * bert
00119  */
00120 
00121 enum BertType {
00122     NOBERTREQUIRED=0,
00123     READBERT=1,
00124     WRITEBERT=2,
00125 };
00126 
00127 enum BertMode {
00128     BERTMODEONLY=1,
00129     BERTMODECOPYIF=2,
00130     BERTMODECOPY=3,
00131 };
00132 
00133 /*
00134  * wisp
00135  */
00136 
00137 /*
00138 **        Note that dsp's of gr are not stored on crums
00139 **          themselves, but are discovered thru tree walking
00140 **
00141 **                    wid             dsp
00142 **         -----------------------------------------
00143 **        |
00144 **   gr:  |           WIDTH           WIDTH
00145 **        |
00146 **   sp:  |         ORGLRANGE         ORGLRANGE
00147 **        |           SPANRANGE         SPANRANGE
00148 **        |
00149 **   pm:  |             I                     I
00150 **        |               V                     V
00151 **        |
00152 */
00153 
00154 /* wid and dsp index for gr */
00155 #define WIDTH  0
00156 
00157 /* wid and dsp indexes for sp */
00158 #define ORGLRANGE 0
00159 #define SPANRANGE 1
00160 
00161 /* wid and dsp indexes for pm */
00162 #define I  0
00163 #define V  1
00164 
00165 #define DSPSIZEGR 1
00166 #define WIDSIZEGR 1
00167 #define DSPSIZESP 2
00168 #define WIDSIZESP 2
00169 #define DSPSIZEPM 2
00170 #define WIDSIZEPM 2
00171 
00172 /*
00173  * loaf
00174  */
00175 
00176 #define GRAN            1
00177 #define POOM            2
00178 #define SPAN            3
00179 
00180 #define MAXUCINLOAF     4
00181 #define MAXBCINLOAF     1  /* so text will fit */  /* as you wish */
00182 #define MAX2DBCINLOAF   4  /* for a start */
00183 
00184 
00185 /*
00186  * reaping constants
00187  */
00188 
00189  /* age values */
00190 #ifndef RESERVED
00191 #define RESERVED 0xff /* keeps a crum from being reaped */
00192 #define NEW 0
00193 #define OLD 1         /* set this as you wish, age  up to it from NEW */
00194 #endif
00195 
00196 
00197 /*
00198  * Memory Allocation
00199  */
00200 
00201 #define ALLOCSIZE /* 0x30000*/  20000000 /* 3000000*/ /* 0x20000*/ /*0x62080*/ /* 0x44080 */ /* or0x24080*/ /* 0x10000 almost works 12/24/86 */
00202 #define INCREMENTALALLOCSIZE 2500000
00203 
00204 #endif /* !__UDANAX_CONSTANTS_H__*/

Generated on Sun Aug 21 04:18:13 2005 for Udanax-Green by doxygen1.3.4