Back to index

tetex-bin  3.0
alephmem.h
Go to the documentation of this file.
00001 /* alephmem.h: C declarations for types and accessing routines in aleph.c
00002 
00003 This file is part of the Aleph project, which
00004 is based on the web2c distribution of TeX.
00005 
00006 Copyleft (c) 2004 the Aleph team
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 extern boolean new_input_line ();
00024 extern boolean newinputln ();
00025 extern int getc_two ();
00026 extern int getfilemode ();
00027 extern void ungetc_two ();
00028 extern int ocptemp;
00029 
00030 #define newinputline(stream, mode, flag)   new_input_line (stream, mode)
00031 
00032 extern memoryword **fonttables;
00033 extern memoryword **fontsorttables;
00034 extern int **ocptables;
00035 
00036 typedef struct hashw
00037 {
00038   integer p;
00039   struct hashw *ptr;
00040   memoryword mw;
00041 } hashword;
00042 
00043 extern hashword hashtable[];
00044 extern hashword *createhashpos();
00045 extern hashword *createeqtbpos();
00046 extern hashword *createxeqlevel();
00047 extern void inithhashtable();
00048 extern void dumphhashtable();
00049 extern void undumphhashtable();
00050 extern void allocatefonttable();
00051 extern void dumpfonttable();
00052 extern void undumpfonttable();
00053 extern void allocatefontsorttable();
00054 extern void dumpfontsorttable();
00055 extern void undumpfontsorttable();
00056 extern void allocateocptable();
00057 extern void dumpocptable();
00058 extern void undumpocptable();
00059 extern void odateandtime();
00060 extern void btestin();
00061 extern void runexternalocp();
00062 
00063 #define initeqtbtable()            inithhashtable();
00064 #define dumpeqtbtable()            dumphhashtable();
00065 #define undumpeqtbtable()   undumphhashtable();
00066 
00067 #define HASHTABLESIZE              23123
00068 #define neweqtb(a)          (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00069                              (hashtable[(a)%HASHTABLESIZE].mw) : \
00070                                  (createeqtbpos(a)->mw))
00071 #define neweqtbint(a)              (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00072                              (hashtable[(a)%HASHTABLESIZE].mw.cint) : \
00073                                  (createeqtbpos(a)->mw.cint))
00074 #define neweqtbsc(a)        (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00075                              (hashtable[(a)%HASHTABLESIZE].mw.cint) : \
00076                                  (createeqtbpos(a)->mw.cint))
00077 #define newequiv(a)         (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00078                              (hashtable[(a)%HASHTABLESIZE].mw.hh.rh) : \
00079                                  (createeqtbpos(a)->mw.hh.rh))
00080 #define newequiv1(a)        (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00081                      (hashtable[(a)%HASHTABLESIZE].mw.cint1) : \
00082                                  (createeqtbpos(a)->mw.cint1))
00083 #define neweqlevel(a)              (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00084                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b1) : \
00085                                  (createeqtbpos(a)->mw.hh.b1))
00086 #define neweqtype(a)        (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00087                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b0) : \
00088                                  (createeqtbpos(a)->mw.hh.b0))
00089 #define setneweqtb(a,v)            (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00090                              (hashtable[(a)%HASHTABLESIZE].mw=v) : \
00091                                  (createeqtbpos(a)->mw=v))
00092 #define setneweqtbint(a,v)  (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00093                              (hashtable[(a)%HASHTABLESIZE].mw.cint=v) : \
00094                                  (createeqtbpos(a)->mw.cint=v))
00095 #define setneweqtbsc(a,v)   (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00096                              (hashtable[(a)%HASHTABLESIZE].mw.cint=v) : \
00097                                  (createeqtbpos(a)->mw.cint=v))
00098 #define setequiv(a,v)              (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00099                              (hashtable[(a)%HASHTABLESIZE].mw.hh.rh=v) : \
00100                                  (createeqtbpos(a)->mw.hh.rh=v))
00101 #define setequiv1(a,v)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00102                       (hashtable[(a)%HASHTABLESIZE].mw.cint1=v) : \
00103                                  (createeqtbpos(a)->mw.cint1=v))
00104 #define seteqlevel(a,v)            (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00105                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b1=v) : \
00106                                  (createeqtbpos(a)->mw.hh.b1=v))
00107 #define seteqtype(a,v)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00108                              (hashtable[(a)%HASHTABLESIZE].mw.hh.b0=v) : \
00109                                  (createeqtbpos(a)->mw.hh.b0=v))
00110 
00111 #define newhashnext(a)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00112                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.LH) : \
00113                                  (createhashpos(a)->mw.hh.v.LH))
00114 #define newhashtext(a)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00115                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.RH) : \
00116                                  (createhashpos(a)->mw.hh.v.RH))
00117 #define sethashnext(a,d)    (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00118                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.LH=d) : \
00119                                  (createhashpos(a)->mw.hh.v.LH=d))
00120 #define sethashtext(a,d)    (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00121                              (hashtable[(a)%HASHTABLESIZE].mw.hh.v.RH=d) : \
00122                                  (createhashpos(a)->mw.hh.v.RH=d))
00123 
00124 #define newxeqlevel(a)             (((a)==hashtable[(a)%HASHTABLESIZE].p) ? \
00125                              (hashtable[(a)%HASHTABLESIZE].mw.cint) : \
00126                                  (createxeqlevel(a)->mw.cint))
00127 
00128 #define setintzero(w,a)            ((w).cint=(a))
00129 #define setintone(w,a)             ((w).cint1=(a))