summaryrefslogtreecommitdiff
path: root/dviware/quicspool/man/standard.l
blob: 5146c71c44bf8827268d5bba4c752fbce2c70172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
.\" $Header: standard.l,v 1.1 88/01/15 12:58:46 simpson Rel $
.\" $Log:	standard.l,v $
.\" Revision 1.1  88/01/15  12:58:46  simpson
.\" initial release
.\" 
.\" Revision 0.1  87/12/11  17:57:01  simpson
.\" beta test
.\" 
.TH STANDARD 5 TRW
.UC
.SH NAME
standard \- standard include file for portability
.SH ORIGIN
TRW
.SH SYNOPSIS
#include <local/standard.h>
.SH DESCRIPTION
.I Standard
is a set of defines, macro definitions and typedefs that provide
portable constructs 
and machine specific information
for different machine architectures and C compilers.
Basically, the include file is divided up into four sections: 
machine
environment
information,
standard type definitions,
useful constants and useful macros.
.PP
The environment of the computer a program is executing on is described by
the following defines:
.TP
HAS_UNSIGNED_SHORT
If defined, unsigned shorts are supported.
.TP
CHAR_IS_SIGNED
If defined, chars are signed.
.TP
HAS_UNSIGNED_CHAR
If defined, unsigned chars are supported.
.TP
HAS_UNSIGNED_LONG
If defined, unsigned longs are supported.
.TP
HAS_VOID
If defined, the void function type is supported.
.TP
BITS_PER_CHAR
Defined as the number of bits in a char.
.TP
BITS_PER_SHORT
Defined as the number of bits in a short.
.TP
BITS_PER_INT
Defined as the number of bits in an int.
.TP
BITS_PER_LONG
Defined as the number of bits in a long.
.TP
BITS_PER_POINTER
Defined as the number of bits in a pointer.
.PP
There are a set of machine independent type definitions and macros.
.TP
Tiny
A signed character type.
.TP
TINY(\fIx\fP)
An extraction macro for a signed character.  The value of the macro is an
integer that will be sign extended if the most significant bit of the 
character is one.
.TP
UnsignedTiny
An unsigned character type.
.TP
UNSIGNED_TINY(\fIx\fP)
An extraction macro for an unsigned character.  The value of the macro is an
integer that will not be signed extended even if the most significant bit
of the character is one.
.TP
Short
Simply a short type.  All compilers have a short type but this is included
for lexical consistency.
.TP
UnsignedShort
An unsigned short type.
.TP
UNSIGNED_SHORT(\fIx\fP)
An extraction macro for an unsigned short.
The value of the macro is an integer that will not be sign extended even if
the most significant bit of the short is one.
.TP
Integer
The int type.  Included for lexical consistency.
.TP
UnsignedInteger
The unsigned integer type.
.TP
Long
The long type.
.TP
UnsignedLong
An unsigned long type.
.TP
UNSIGNED_LONG(\fIx\fP)
An extraction macro for an unsigned long integer.
Not all compilers support unsigned longs so we may have to simulate them.
.TP
TinyBoolean
A tiny boolean value.  Boolean types take on only the values TRUE and FALSE.
.TP
Boolean
A regular boolean value.
.TP
Character
The char type.  Included for lexical consistency.
.TP
TinyBits
A type used only for bit set, clear and test operations.
.TP
Bits
The regular size bit type.
.TP
LongBits
The long size bit type.
.TP
Void
The void type.  If the void type is not supported then it is defined as
an int.
.TP
Import
The storage class used when importing variables from separate files.
It is defined to be the keyword 
.I extern.
.TP
Export
The storage class used when exporting variables from separate files.
In C, you needn't 
declare that a variable is available to other files if it is declared
outside a function so this is defined as a no-op.
.TP
Local
The static storage class.
.PP
A number of useful constants are also defined.
.TP
TRUE and FALSE
The values 1 and 0 respectively.
.TP
SUCCEED and FAIL
The values 0 and 1 respectively.  These are normally used as exit statuses.
.TP
ON
A long with all the bits set.  
.TP
OFF
A long with no bits set.
.TP
STANDARD_IN
Defined as 0.
.TP
STANDARD_OUT
Defined as 1.
.TP
STANDARD_ERROR
Defined as 2.
.TP
MAX_TINY
The maximum value a Tiny type can hold.
.TP
MIN_TINY
The minimum value a Tiny type can hold.
.TP
MAX_UNSIGNED_TINY
The maximum value an UnsignedTiny type can hold.
.TP
MIN_UNSIGNED_TINY
The minimum value an UnsignedTiny type can hold.
.TP
MAX_SHORT
The maximum value a Short type can hold.
.TP
MIN_SHORT 
The minimum value a Short type can hold.
.TP
MAX_UNSIGNED_SHORT
The maximum value an UnsignedShort type can hold.
.TP
MIN_UNSIGNED_SHORT
The minimum value an UnsignedShort type can hold.
.TP
MAX_INTEGER
The maximum value an Integer type can hold.
.TP
MIN_INTEGER
The minimum value an Integer type can hold.
.TP
MAX_UNSIGNED_INTEGER
The maximum value an UnsignedInteger type can hold.
.TP
MIN_UNSIGNED_INTEGER
The minimum value an UnsignedInteger type can hold.
.TP
MAX_LONG
The maximum value a Long type can hold.
.TP
MIN_LONG
The minimum value a Long type can hold.
.TP
MAX_UNSIGNED_LONG
The maximum value an UnsignedLong type can hold.
.TP
MIN_UNSIGNED_LONG
The minimum value an UnsignedLong type can hold.
.TP
BITS_PER_BYTE
The number of bits in a byte.
.PP
A number of useful macro are also defined.
.TP
MAX(\fIx\fP, \fIy\fP)
Returns the maximum value of 
.I x
and 
.I y.
.TP
MIN(\fIx\fP, \fIy\fP)
Returns the minimum value of 
.I x
and
.I y.
.TP
ABS(\fIx\fP)
Returns the absolute value of its parameter.  This works for integers and
reals.
.TP
ROUND(\fIx\fP)
Returns
its parameter rounded to the nearest integer value.
.TP
CEILING(\fIx\fP)
Returns the ceiling of its parameter.
.TP
FLOOR(\fIx\fP)
Returns the floor of its parameter.
.TP
EQ(\fIs\fP, \fIt\fP)
Returns true if the two strings passed to it as parameters are equal.
.TP
EQN(\fIs\fP, \fIt\fP, \fIn\fP)
Returns true if the two strings passed to it as parameters are equal in
the first
.I n
characters (as in
.IR strcmp ).
.SH FILES
.nf
.ta \w'/usr/include/local/standenviron.h   'u
/usr/include/local/standard.h
/usr/include/local/standenviron.h
/usr/include/local/standtype.h
/usr/include/local/standconst.h
/usr/include/local/standmacro.h
.fi
.SH AUTHOR
Michael Gorlick