Back to index

tetex-bin  3.0
omegamem.h
Go to the documentation of this file.
00001 /* omegamem.h: C declarations for types and accessing routines in omega.c
00002 
00003 This file is part of the Omega project, which
00004 is based on the web2c distribution of TeX.
00005 
00006 Copyright (c) 1994--2000 John Plaice and Yannis Haralambous
00007 
00008 This library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Library General Public
00010 License as published by the Free Software Foundation; either
00011 version 2 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Library General Public License for more details.
00017 
00018 You should have received a copy of the GNU Library General Public
00019 License along with this library; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00021 
00022 
00023 /* argument(s) added to function, by team 18 */
00024 extern boolean new_input_line (FILE *, halfword); 
00025 /* argument(s) added to function, by team 18 */
00026 extern boolean newinputln (FILE*, halfword, halfword, boolean); 
00027 extern int getc_two ();
00028 /* argument(s) added to function, by team 18 */
00029 extern int getfilemode (FILE*, int);
00030 extern void ungetc_two ();
00031 extern int ocptemp;
00032 
00033 #define newinputline(stream, mode, flag)   new_input_line (stream, mode)
00034 
00035 extern memoryword **fonttables;
00036 extern memoryword **fontsorttables;
00037 extern int **ocptables;
00038 
00039 typedef struct hashw
00040 {
00041   integer p;
00042   struct hashw *ptr;
00043   memoryword mw;
00044 } hashword;
00045 
00046 extern hashword hashtable[];
00047 /* argument(s) added to function, by team 18 */
00048 extern hashword *createhashpos(int); 
00049 /* argument(s) added to function, by team 18 */
00050 extern hashword *createeqtbpos(int); 
00051 /* argument(s) added to function, by team 18 */
00052 extern hashword *createxeqlevel(int); 
00053 extern void inithhashtable();
00054 extern void dumphhashtable();
00055 extern void undumphhashtable();
00056 /* argument(s) added to function, by team 18 */
00057 extern void allocatefonttable(int,int); 
00058 /* argument(s) added to function, by team 18 */
00059 extern void dumpfonttable(int,int); 
00060 /* argument(s) added to function, by team 18 */
00061 extern void undumpfonttable(int); 
00062 /* argument(s) added to function, by team 18 */
00063 extern void allocatefontsorttable(int,int); 
00064 /* argument(s) added to function, by team 18 */
00065 extern void dumpfontsorttable(int , int); 
00066 /* argument(s) added to function, by team 18 */
00067 extern void undumpfontsorttable(int); 
00068 /* argument(s) added to function, by team 18 */
00069 extern void allocateocptable(int,int); 
00070 /* argument(s) added to function, by team 18 */
00071 extern void dumpocptable(int);  
00072 /* argument(s) added to function, by team 18 */
00073 extern void undumpocptable(int); 
00074 /* argument(s) added to function, by team 18 */
00075 extern void odateandtime(int, int, int, int ); 
00076 extern void btestin();
00077 extern void runexternalocp(char *);
00078 
00079 #define initeqtbtable()            inithhashtable();
00080 #define dumpeqtbtable()            dumphhashtable();
00081 #define undumpeqtbtable()   undumphhashtable();
00082 
00083 #define HASHTABLESIZE              23123
00084 #define neweqtb(a)          (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00085                              (hashtable[(a)%HASHTABLESIZE].mw) : \
00086                                  (createeqtbpos(a)->mw))
00087 #define neweqtbint(a)              (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00088                              (hashtable[(a)%HASHTABLESIZE].mw.cint) : \
00089                                  (createeqtbpos(a)->mw.cint))
00090 #define neweqtbsc(a)        (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00091                              (hashtable[(a)%HASHTABLESIZE].mw.cint) : \
00092                                  (createeqtbpos(a)->mw.cint))
00093 #define newequiv(a)         (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00094                              (hashtable[(a)%HASHTABLESIZE].mw.hh.rh) : \
00095                                  (createeqtbpos(a)->mw.hh.rh))
00096 #define newequiv1(a)        (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00097                      (hashtable[(a)%HASHTABLESIZE].mw.cint1) : \
00098                                  (createeqtbpos(a)->mw.cint1))
00099 #define neweqlevel(a)              (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00100                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b1) : \
00101                                  (createeqtbpos(a)->mw.hh.b1))
00102 #define neweqtype(a)        (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00103                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b0) : \
00104                                  (createeqtbpos(a)->mw.hh.b0))
00105 #define setneweqtb(a,v)            (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00106                              (hashtable[(a)%HASHTABLESIZE].mw=v) : \
00107                                  (createeqtbpos(a)->mw=v))
00108 #define setneweqtbint(a,v)  (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00109                              (hashtable[(a)%HASHTABLESIZE].mw.cint=v) : \
00110                                  (createeqtbpos(a)->mw.cint=v))
00111 #define setneweqtbsc(a,v)   (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00112                              (hashtable[(a)%HASHTABLESIZE].mw.cint=v) : \
00113                                  (createeqtbpos(a)->mw.cint=v))
00114 #define setequiv(a,v)              (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00115                              (hashtable[(a)%HASHTABLESIZE].mw.hh.rh=v) : \
00116                                  (createeqtbpos(a)->mw.hh.rh=v))
00117 #define setequiv1(a,v)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00118                       (hashtable[(a)%HASHTABLESIZE].mw.cint1=v) : \
00119                                  (createeqtbpos(a)->mw.cint1=v))
00120 #define seteqlevel(a,v)            (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00121                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b1=v) : \
00122                                  (createeqtbpos(a)->mw.hh.b1=v))
00123 #define seteqtype(a,v)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00124                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b0=v) : \
00125                                  (createeqtbpos(a)->mw.hh.b0=v))
00126 
00127 #define newhashnext(a)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00128                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.LH) : \
00129                                  (createhashpos(a)->mw.hh.v.LH))
00130 #define newhashtext(a)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00131                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.RH) : \
00132                                  (createhashpos(a)->mw.hh.v.RH))
00133 #define sethashnext(a,d)    (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00134                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.LH=d) : \
00135                                  (createhashpos(a)->mw.hh.v.LH=d))
00136 #define sethashtext(a,d)    (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00137                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.RH=d) : \
00138                                  (createhashpos(a)->mw.hh.v.RH=d))
00139 
00140 #define newxeqlevel(a)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00141                              (hashtable[(a)%HASHTABLESIZE].mw.cint) : \
00142                                  (createxeqlevel(a)->mw.cint))
00143 
00144 #define setintzero(w,a)            ((w).cint=(a))
00145 #define setintone(w,a)             ((w).cint1=(a))