include/udanax.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: udanax.h,v $
00032  * Revision 1.7  2004/08/28 13:35:26  jrush
00033  * Catching up CVS to various incomplete versions on local disk.
00034  *
00035  * Revision 1.6  2002/07/14 08:29:43  jrush
00036  * Added include of nana.h and assert.h
00037  *
00038  * Revision 1.5  2002/05/28 03:51:13  jrush
00039  * Updated sources to comply with a GPL licensing.
00040  *
00041  * Revision 1.4  2002/04/13 14:08:35  jrush
00042  * Changed typedef of structs into just structs, for C++ style.
00043  *
00044  * Revision 1.3  2002/04/13 13:43:45  jrush
00045  * Added extern of Diskheader structure.
00046  *
00047  * Revision 1.2  2002/04/12 11:46:25  jrush
00048  * Major rearrangement of include contents, to reflect a hopefully more
00049  * logical layout as we refactor Udanax into classes.
00050  *
00051  * Revision 1.1  2002/04/12 09:32:51  jrush
00052  * Renamed xanadu.h to udanax.h
00053  *
00054  * Revision 1.9  2002/04/10 18:01:54  jrush
00055  * Renamed class typeisa to IStreamAddr.
00056  *
00057  * Revision 1.8  2002/04/09 21:45:46  jrush
00058  * Renamed class 'tumbler' to 'Tumbler', for consistency with Python sources,
00059  * and changed typeisa from typedef to a subclass, in preparation for cleaning
00060  * up the type/class tree.
00061  *
00062  * Revision 1.7  2002/04/06 17:05:57  jrush
00063  * Switched from referring to 'task' for a client connection to 'session',
00064  * and converted the typetask typedef/struct into a Session C++ class.
00065  *
00066  * Revision 1.6  2002/04/06 15:00:34  jrush
00067  * Changed INT to just 'int'.
00068  *
00069  * Revision 1.5  2002/02/14 05:40:42  jrush
00070  * Cleaned up source:
00071  *
00072  * 1. ran thru the indent tool to achieve a standard look,
00073  * 2. added structured comments at top for use with DOxygen reporting
00074  *    as well as CVS keywords,
00075  * 3. added #ifndef/#defines to prevent duplicate inclusions,
00076  * 4. insured all struct/union defs have names,
00077  * 5. centralized prototypes in protos.h, removing incomplete ones,
00078  * 6. cleaned up use of bool/BOOLEAN type to suit C++ type,
00079  * 7. fixed initializer nesting in tumbler constants.
00080  *
00081  */
00082 
00083 #ifndef __UDANAX_UDANAX_H__
00084 #define __UDANAX_UDANAX_H__
00085 
00086 /* udanax.h - top header file */
00087 
00088 #include "nana.h"
00089 #include "assert.h"
00090 #include "constants.h"
00091 #include "types.h"
00092 
00093 #include "blockio.h"
00094 
00095 #define typegranf int *                /* temp -- int for alignment */
00096 extern typegranf granf;
00097 
00098 #define typespanf int *                /* temp -- int for alignment */
00099 extern typespanf spanf;
00100 
00101 #define typeorgl  int *                /* temp -- int for alignment */
00102 
00103 #define typerequest int
00104 #define NREQUESTS 40                   /* number of requests */
00105 extern void (*requestfns[NREQUESTS]) (Session *);
00106 
00107 /* spanfilade span types */
00108 #define LINKFROMSPAN    1
00109 #define LINKTOSPAN      2
00110 #define LINKTHREESPAN   3
00111 #define DOCISPAN        4
00112 
00113 struct typespanpair {
00114     typespanpair       *nextspanpair;
00115     Tumbler             stream1;
00116     Tumbler             stream2;
00117     Tumbler             widthofspan;
00118 };
00119 
00120 typedef typespanpair   *typespanpairset;
00121 
00122 /* 
00123  */
00124 
00125 struct typeitemheader {
00126     typeitemheader     *next;
00127     typeitemid          itemid;
00128 };
00129 
00130 struct typetext {
00131     typetext           *next;
00132     typeitemid          itemid;
00133     int                 length;
00134     char                string[GRANTEXTLENGTH];
00135 };
00136 typedef typetext       *typetextset;
00137 
00138 typedef typespan        typevspan;
00139 typedef typevspan      *typevspanset;
00140 typedef typespan        typeispan;
00141 typedef typeispan      *typeispanset;
00142 
00143 struct typevspec {
00144     typevspec          *next;
00145     typeitemid          itemid;
00146     IStreamAddr         docisa;
00147     typevspanset        vspanset;
00148 };
00149 
00150 union typespec {
00151     typevspec           xxxvspec;
00152     typeispan           xxxispan;
00153 };
00154 typedef typespec *typespecset;
00155 
00156 struct typeboolsetnode {
00157     typeboolsetnode    *next;
00158     typeitemid          itemid;
00159     typespanset         val;
00160 };
00161 
00162 struct typeaddress {
00163     typeaddress        *next;
00164     typeitemid          itemid;
00165     IStreamAddr         address;
00166 };
00167 
00168 typedef typeaddress    *typeaddressset;
00169 typedef typeaddress     typelink;
00170 typedef typelink       *typelinkset;
00171 
00172 union typevstuff {
00173     typetext            xxxtext;
00174     typelink            xxxlink;
00175 };
00176 typedef typevstuff     *typevstuffset;
00177 
00178 struct typesporgl {
00179     typesporgl         *next;
00180     typeitemid          itemid;
00181     Tumbler             sporglorigin;
00182     Tumbler             sporglwidth;
00183     IStreamAddr         sporgladdress;
00184 };
00185 
00186 union typesporglitem {
00187     typeispan           xxxxispan;
00188     typesporgl          xxxxsporgl;
00189 };
00190 typedef typesporglitem *typesporglset;
00191 
00192 union typeitem {
00193     typetext            xxtext;
00194     typespan            xxspan;
00195     typevspec           xxvspec;
00196     typeboolsetnode     xxboolsetnode;
00197     typeaddress         xxaddress;
00198     typesporgl          xxsporgl;
00199 };
00200 
00201 typedef typeitem       *typeitemset;
00202 
00203 #define NODE      1
00204 #define ACCOUNT   2
00205 #define DOCUMENT  3
00206 #define ATOM      4
00207                       /* atom types - don't change these */
00208 #define TEXTATOM  1
00209 #define LINKATOM  2
00210 
00211 struct typehint {
00212     int                 supertype;
00213     int                 subtype;
00214     int                 atomtype;
00215     IStreamAddr         hintisa;
00216 };
00217 
00218 #include "protos.h"
00219 
00220 /*
00221  * Global Variables (work to remove)
00222  */
00223 
00224 extern int  debug;
00225 extern long nsessorcommand;
00226 extern int  reservnumber;
00227 extern int  allocsize;
00228 extern int  incrementalallocsize;
00229 
00230 extern int incrementalallocsize;
00231 extern int allocsize;
00232 
00233 extern Diskheader diskheader;
00234 
00235 #endif /* !__UDANAX_UDANAX_H__*/

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