Debian Codegraph @

texk/bibtex-x/datatype.h

raw
1 /*-
2 ******************************************************************************
3 ******************************************************************************
4 **
5 ** MODULE
6 **
7 ** file: datatype.h
8 **
9 ** DESCRIPTION
10 **
11 ** A 32-bit implementation of BibTeX v0.99c for MS-DOS, OS/2 2.x,
12 ** Unix and VMS. This C language implementation is based on the
13 ** original WEB source but it has been enhanced to support 8-bit input
14 ** characters and a very large processing capacity.
15 **
16 ** For documentation describing how to use and build this program,
17 ** see the 00README.TXT file that accompanies this distribution.
18 **
19 ** MODULE CONTENTS
20 **
21 ** This module defines the data types used in the BibTeX WEB source. C
22 ** isn't as flexible as PASCAL when defining data types, so some of the
23 ** types defined are fairly abitrary.
24 **
25 ** There are particular problems when defining data types for variables
26 ** that will be used for indexing arrays. Whilst the "short" data
27 ** type will often suffice, "unsigned short" has to be used to index
28 ** the string pool, which has 65,000 elements. Care must be taken when
29 ** mixing signed and unsigned values, especially if the signed value
30 ** can be negative.
31 **
32 ** AUTHORS
33 **
34 ** Original WEB translation to C, conversion to "big" (32-bit) capacity,
35 ** addition of run-time selectable capacity and 8-bit support extensions
36 ** by:
37 **
38 ** Niel Kempson
39 ** Snowy Owl Systems Limited, Cheltenham, England
40 ** E-mail: [email protected]
41 **
42 ** 8-bit support extensions also by:
43 **
44 ** Alejandro Aguilar-Sierra
45 ** Centro de Ciencias de la Atm\'osfera,
46 ** Universidad Nacional Aut\'onoma de M\'exico, M\'exico
47 ** E-mail: [email protected]
48 **
49 ** COPYRIGHT
50 **
51 ** This implementation copyright (c) 1991-1995 by Niel Kempson
52 ** and copyright (c) 1995 by Alejandro Aguilar-Sierra.
53 **
54 ** This program is free software; you can redistribute it and/or
55 ** modify it under the terms of the GNU General Public License as
56 ** published by the Free Software Foundation; either version 1, or
57 ** (at your option) any later version.
58 **
59 ** This program is distributed in the hope that it will be useful,
60 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
61 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
62 ** General Public License for more details.
63 **
64 ** You should have received a copy of the GNU General Public License
65 ** along with this program; if not, write to the Free Software
66 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
67 **
68 ** In other words, you are welcome to use, share and improve this
69 ** program. You are forbidden to forbid anyone else to use, share
70 ** and improve what you give them. Help stamp out software-hoarding!
71 **
72 ** ACKNOWLEDGEMENT
73 **
74 ** The original BibTeX was written by Oren Patashnik using Donald
75 ** Knuth's WEB system. This format produces a PASCAL program for
76 ** execution and a TeX documented version of the source code. This
77 ** program started as a (manual) translation of the WEB source into C.
78 **
79 ** CHANGE LOG
80 **
81 ** $Log: datatype.h,v $
82 ** Revision 3.71 1996/08/18 20:37:06 kempson
83 ** Official release 3.71 (see HISTORY file for details).
84 **
85 ** Revision 3.70 1996/04/08 10:08:40 kempson
86 ** Final documentation & cosmetic changes for official release 3.70.
87 **
88 ** Revision 3.5 1995/09/24 20:44:37 kempson
89 ** Many changes for final beta test version.
90 **
91 ** Revision 3.4 1995/04/09 22:15:44 kempson
92 ** Placed under RCS control
93 **
94 ******************************************************************************
95 ******************************************************************************
96 */
97 #ifndef __DATATYPE_H__
98 # define __DATATYPE_H__ 1
99
100
101 /*-
102 **============================================================================
103 ** Define the generic data types. For the BIG version of BibTeX, we declare
104 ** that all integers are 32 bit. This will only work on systems with a
105 ** 'flat' 32 bit addressing scheme and lots of virtual memory.
106 **============================================================================
107 */
108 typedef char Boolean_T;
109 typedef unsigned char UChar_T;
110 typedef char Char_T;
111 typedef char Integer8_T;
112 typedef FILE *File_ptr;
113 typedef jmp_buf LongJumpBuf_T;
114
115
116 /*-
117 ** Define some data types for 16-bit BibTex
118 **
119 ** typedef short Integer16_T;
120 ** typedef long Integer32_T;
121 ** typedef unsigned short Unsigned16_T;
122 ** typedef unsigned long Unsigned32_T;
123 ** typedef Integer16_T Integer_T;
124 */
125
126 /*-
127 ** Define some data types for 32-bit BibTeX
128 */
129 typedef long Integer16_T;
130 typedef long Integer32_T;
131 typedef unsigned long Unsigned16_T;
132 typedef unsigned long Unsigned32_T;
133 typedef long Integer_T;
134
135
136 /*-
137 **============================================================================
138 ** The generic data types defined above will be used to approximate the
139 ** data types used in the BibTeX WEB source.
140 **============================================================================
141 */
142 typedef UChar_T ASCIICode_T;
143 typedef File_ptr AlphaFile_T;
144 typedef Integer16_T AuxNumber_T;
145 typedef Integer16_T BibNumber_T;
146 typedef Integer16_T BltInRange_T;
147 typedef Integer16_T BufPointer_T;
148 typedef ASCIICode_T *BufType_T;
149 typedef Integer16_T CiteNumber_T;
150 typedef Integer16_T FieldLoc_T;
151 typedef Integer8_T FnClass_T;
152
153 /*
154 **typedef Integer16_T HashLoc_T;
155 **typedef Integer16_T HashPointer_T;
156 **typedef Integer16_T HashPtr2_T;
157 */
158 typedef Integer32_T HashLoc_T;
159 typedef Integer32_T HashPointer_T;
160 typedef Integer32_T HashPtr2_T;
161
162 typedef Integer8_T IDType_T;
163 typedef Integer16_T IntEntLoc_T;
164 typedef Integer8_T LexType_T;
165 typedef Integer16_T LitStkLoc_T;
166 typedef UChar_T PdsLen_T;
167 typedef Integer8_T PdsLoc_T;
168 typedef const Char_T *PdsType_T;
169 typedef Unsigned16_T PoolPointer_T;
170 typedef Integer8_T StkType_T;
171 typedef Integer16_T StrEntLoc_T;
172 typedef Integer8_T StrGlobLoc_T;
173 typedef Integer8_T StrIlk_T;
174 typedef Integer16_T StrNumber_T;
175 typedef Integer16_T WizFnLoc_T;
176
177
178
179 #endif /* __DATATYPE_H__ */