blob: aeb06c2bbb093e8035e6d97fd7cb4e559f468b3a (
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
|
/* $Header: standconst.h,v 1.1 88/01/15 13:07:08 simpson Rel $ */
/*
$Log: standconst.h,v $
* Revision 1.1 88/01/15 13:07:08 simpson
* initial release
*
* Revision 0.1 87/12/11 18:34:13 simpson
* beta test
*
*/
/* Standard constants. */
#ifndef STANDARD_CONST
#define STANDARD_CONST
/*
* These are the only values boolean variables may be set to,
* or that boolean functions may return.
*/
#define TRUE 1
#define FALSE 0
/*
* Program exit status.
* These two codes are intended to be used as arguments to the
* exit(2) system call. Obviously, more failure codes may be
* defined but for simple programs that need indicate only
* success or failure these will suffice.
*/
#define SUCCEED 0 /* successful program execution */
#define FAIL 1 /* some error in running program */
/* All bits on or off. */
#define ON ~(long)0 /* all bits set */
#define OFF (long)0 /* all bits off */
/* UNIX file descriptor numbers for standard input, output, and error. */
#define STANDARD_IN 0
#define STANDARD_OUT 1
#define STANDARD_ERROR 2
/*
* Extreme values.
* These constants are the largest and smallest values
* that variables of the indicated type may hold.
*/
#if defined(vax) || defined(pyr) || defined(sun)
# define MAX_TINY 0x7f
# define MIN_TINY 0x80
# define MAX_UNSIGNED_TINY 0xff
# define MIN_UNSIGNED_TINY 0
# define MAX_SHORT 0x7fff
# define MIN_SHORT 0x8000
# define MAX_UNSIGNED_SHORT 0xffff
# define MIN_UNSIGNED_SHORT 0
# define MAX_INTEGER 0x7fffffff
# define MIN_INTEGER 0x80000000
# define MAX_UNSIGNED_INTEGER 0xffffffff
# define MIN_UNSIGNED_INTEGER 0
# define MAX_LONG MAX_INTEGER
# define MIN_LONG MIN_INTEGER
# define MAX_UNSIGNED_LONG MAX_UNSIGNED_INTEGER
# define MIN_UNSIGNED_LONG MIN_UNSIGNED_INTEGER
# define BITS_PER_BYTE 8
#endif
/* for pointers */
#define NIL ((long)0)
#endif STANDARD_CONST
|