Subversion Repositories svn1-original

Rev

Rev 45 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*************************************************************************
*       Copyright (C) 1995 Datacraft Technologies Pty. Ltd.
*                       All rights reserved
*
* file:     hdrs/consts.h
*
* purpose:  PREFIX - constant definitions
*
* programmer: David Purdie
*
* revision  date        by      reason
*   00.0    27/01/95    DDP     Tidies up the program and formatted the file
*   00.0    27/01/95    DDP     initial release
*
*   2.05    17/12/95    DDP     Merged a few menus ( uploads )
*                               Added staggered start and other start options
*
**************************************************************************/

#define VERSION         "3.02"
/*#define   END_VALID_DATE  (725945647L)      1-Jan-93 */
#define END_VALID_DATE  (0L)                     /*  Always valid */

#define MAX_EVENT_NAME  50                       /* Max chars in the EVENT name */
#define MAX_TM_NAME     30                       /* Maximum chars in a team name */
#define LEN_CNTRY_NAME  15                       /* Maximum number of chars in a country name */
#define MAX_PERSON_NAME 20                       /* Max chars in a persons name */
#define MAX_LEGS        5                        /* Maximum of this system */
#define MAX_MEMB        5                        /* Max team members */
#define MAX_TMS_SPLIT   8                        /* Max number of breaks in team defs */
#define MAX_LEG_NAME    15                       /* Max chars in each leg name */
#define LEN_CLASS_NAME  15                       /* Chars in a class name */
#define MAX_COUNTRY     40                       /* Maximum countries maintained */
#define MAX_CLASS       40                       /* Number of classes allowed */
#define MAX_FAME        10                       /* Number of life time awards */

/*
**  Characters used with the programs
*/
#define RUBOUT          '\177'                   /* Default rubout character */
#define ABORT_CHAR      '\001'                   /* Abort character */
#define ABORT_CHAR_1    '\033'                   /* Alternate abort character */

/*
**  Common definitions
*/
#if !defined(TRUE)
#define TRUE    1
#define FALSE   0
#endif

#if !defined(NULL)
#define NULL (0)
#endif

#undef offsetof
#define offsetof(TYPE, MEMBER) ((unsigned int) &((TYPE *)0)->MEMBER)


/*
**  Define the values for the decoder and encoder type field
**  These will be used by the decode and encode routine to determine
**  the display type
*/

#define D_STRING    1                            /* an ascii string */
#define D_USTRING   2                            /* Upper case string */
#define D_SEX       3                            /* a type of sex */
#define D_NUMBER    4                            /* a number */
#define D_TIME      5                            /* a time field */
#define D_NULL      6                            /* no data field - only the prompt is valid */
#define D_CLASS     7                            /* Team class data field */
#define D_COUNTRY   8                            /* Team country data field */
#define D_AGE       9                            /* Age field */

/*
**  Define the types of updates available.
**  In practice only the first two are available to most programs
**  the values are used in the routine d_field
*/

#define M_DISPLAY       1                       /* Display only */
#define M_UPDATE        2                       /* Update data fields */
#define M_TEAM         (M_UPDATE<<1)            /* Update the team data records only */
#define M_LEGS         (M_UPDATE<<2)            /* Update the leg timming information */
#define M_ALEGS        (M_UPDATE<<3)            /* Update ALL leg timing information */
#define M_ALL          (M_TEAM|M_LEGS|M_ALEGS)  /* Update ALL information */
#define M_PREDISPLAY    1<<7                    /* Predisplay ready for updates */

/*
**  A few bits that must be sorted out for different machines
*/
#ifdef HI_TECH_C
#define OPEN_RW     2                            /* Used in open calls */
#define toupper(a)  to_upper(a)                  /* Doesn't exist in Hi Tech C */
#define tolower(a)  to_lower(a)                  /* Doesn't exist either */
#else
#define OPEN_RW     O_RDWR|O_BINARY              /* Used in open calls */
#endif

/*
**  Internal key codes
*/

#define UPARROW     200                          /* Key for upparrow */
#define DOWNARROW   201
#define RIGHTARROW  202
#define LEFTARROW   203
#define PAGE_UP     204
#define PAGE_DOWN   205
#define HOME_KEY    206
#define END_KEY     207
#define DELETE_KEY  208
#define INSERT_KEY  209
#define BACKTAB     210
#define FNC1 1
#define FNC2 2
#define FNC3 3
#define FNC4 4
#define FNC5 5
#define FNC6 6
#define FNC7 7
#define FNC8 8
#define FNC9 9
#define FNC10 10

/*
**  Nice HTML colours
*/
#define HTML_COLOUR_GREEN   0xeeffeeL