Subversion Repositories svn1

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 root 1
/*************************************************************************
2
*       Copyright (C) 1995 Datacraft Technologies Pty. Ltd.
3
*                       All rights reserved
4
*
5
* file:     hdrs/consts.h
6
*
7
* purpose:  PREFIX - constant definitions
8
*
9
* programmer: David Purdie
10
*
11
* revision  date        by      reason
12
*   00.0    27/01/95    DDP     Tidies up the program and formatted the file
13
*   00.0    27/01/95    DDP     initial release
14
*
15
*   2.05    17/12/95    DDP     Merged a few menus ( uploads )
16
*                               Added staggered start and other start options
17
*
18
**************************************************************************/
19
 
20
#define VERSION         "3.02"
21
/*#define   END_VALID_DATE  (725945647L)      1-Jan-93 */
22
#define END_VALID_DATE  (0L)                     /*  Always valid */
23
 
24
#define MAX_EVENT_NAME  50                       /* Max chars in the EVENT name */
25
#define MAX_TM_NAME     30                       /* Maximum chars in a team name */
26
#define LEN_CNTRY_NAME  15                       /* Maximum number of chars in a country name */
27
#define MAX_PERSON_NAME 20                       /* Max chars in a persons name */
28
#define MAX_LEGS        5                        /* Maximum of this system */
29
#define MAX_MEMB        5                        /* Max team members */
30
#define MAX_TMS_SPLIT   8                        /* Max number of breaks in team defs */
31
#define MAX_LEG_NAME    15                       /* Max chars in each leg name */
32
#define LEN_CLASS_NAME  15                       /* Chars in a class name */
33
#define MAX_COUNTRY     40                       /* Maximum countries maintained */
34
#define MAX_CLASS       40                       /* Number of classes allowed */
35
#define MAX_FAME        10                       /* Number of life time awards */
36
 
37
/*
38
**  Characters used with the programs
39
*/
40
#define RUBOUT          '\177'                   /* Default rubout character */
41
#define ABORT_CHAR      '\001'                   /* Abort character */
42
#define ABORT_CHAR_1    '\033'                   /* Alternate abort character */
43
 
44
/*
45
**  Common definitions
46
*/
47
#if !defined(TRUE)
48
#define TRUE    1
49
#define FALSE   0
50
#endif
51
 
52
#if !defined(NULL)
53
#define NULL (0)
54
#endif
55
 
56
#undef offsetof
57
#define offsetof(TYPE, MEMBER) ((unsigned int) &((TYPE *)0)->MEMBER)
58
 
59
 
60
/*
61
**  Define the values for the decoder and encoder type field
62
**  These will be used by the decode and encode routine to determine
63
**  the display type
64
*/
65
 
66
#define D_STRING    1                            /* an ascii string */
67
#define D_USTRING   2                            /* Upper case string */
68
#define D_SEX       3                            /* a type of sex */
69
#define D_NUMBER    4                            /* a number */
70
#define D_TIME      5                            /* a time field */
71
#define D_NULL      6                            /* no data field - only the prompt is valid */
72
#define D_CLASS     7                            /* Team class data field */
73
#define D_COUNTRY   8                            /* Team country data field */
45 - 74
#define D_AGE       9                            /* Age field */
1 root 75
 
76
/*
77
**  Define the types of updates available.
78
**  In practice only the first two are available to most programs
79
**  the values are used in the routine d_field
80
*/
81
 
82
#define M_DISPLAY       1                       /* Display only */
83
#define M_UPDATE        2                       /* Update data fields */
84
#define M_TEAM         (M_UPDATE<<1)            /* Update the team data records only */
85
#define M_LEGS         (M_UPDATE<<2)            /* Update the leg timming information */
86
#define M_ALEGS        (M_UPDATE<<3)            /* Update ALL leg timing information */
87
#define M_ALL          (M_TEAM|M_LEGS|M_ALEGS)  /* Update ALL information */
88
#define M_PREDISPLAY    1<<7                    /* Predisplay ready for updates */
89
 
90
/*
91
**  A few bits that must be sorted out for different machines
92
*/
93
#ifdef HI_TECH_C
94
#define OPEN_RW     2                            /* Used in open calls */
95
#define toupper(a)  to_upper(a)                  /* Doesn't exist in Hi Tech C */
96
#define tolower(a)  to_lower(a)                  /* Doesn't exist either */
97
#else
98
#define OPEN_RW     O_RDWR|O_BINARY              /* Used in open calls */
99
#endif
100
 
101
/*
102
**  Internal key codes
103
*/
104
 
105
#define UPARROW     200                          /* Key for upparrow */
106
#define DOWNARROW   201
107
#define RIGHTARROW  202
108
#define LEFTARROW   203
109
#define PAGE_UP     204
110
#define PAGE_DOWN   205
111
#define HOME_KEY    206
112
#define END_KEY     207
113
#define DELETE_KEY  208
114
#define INSERT_KEY  209
115
#define BACKTAB     210
116
#define FNC1 1
117
#define FNC2 2
118
#define FNC3 3
119
#define FNC4 4
120
#define FNC5 5
121
#define FNC6 6
122
#define FNC7 7
123
#define FNC8 8
124
#define FNC9 9
125
#define FNC10 10
126
 
127
/*
128
**  Nice HTML colours
129
*/
130
#define HTML_COLOUR_GREEN   0xeeffeeL