home *** CD-ROM | disk | FTP | other *** search
- /* compiler include files */
-
- #include <ctype.h>
- #include <dos.h>
- #include <fastgraf.h>
- #include <io.h>
- #include <process.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- #ifdef __TURBOC__
- #include <alloc.h>
- #else
- #include <malloc.h>
- #endif
-
- #define BETWEEN(x,a,b) ((x >= a) && (x <= b))
- #define MAX(x,y) ((x) > (y)) ? (x) : (y)
- #define MIN(x,y) ((x) < (y)) ? (x) : (y)
-
- #define PAGES 2 /* number of video pages needed in mode 16 */
-
- #define PTSIZE 14 /* height of bitmapped characters */
-
- #define OFF 0
- #define ON 1
-
- #define ERR -1
- #define OK 1
-
- #define FALSE 0
- #define TRUE 1
-
- #define ASCII 0
- #define ALPHANUMERIC 1
-
- #define BS 8
- #define CR 13
- #define ESC 27
- #define SPACEBAR 32
-
- #define UP_ARROW 72
- #define DOWN_ARROW 80
- #define LEFT_ARROW 75
- #define RIGHT_ARROW 77
-
- #define HOME 71
- #define PAGE_UP 73
- #define END 79
- #define PAGE_DOWN 81
-
- #define INSERT 82
- #define DELETE 83
-
- #define ITEMS 5 /* number of items on main menu */
-
- #ifndef _commonc_
- #define DECLARE extern
- #else
- #define DECLARE
- #endif
-
- DECLARE int background;
- DECLARE int buttons;
- DECLARE int hidden, visual;
- DECLARE int mouse;
- DECLARE int old_mode, mode;
- DECLARE int xlimit, ylimit;
- DECLARE int xmouse, ymouse;
- DECLARE unsigned int clockspeed;
- DECLARE int menu_top;
- DECLARE int menu_bottom;
- DECLARE int ptsize;
- DECLARE int redraw;
- DECLARE int selection;
-
- #ifdef _commonc_
- unsigned char matrix1[] = {0xAA,0x55,0xAA,0x55};
- unsigned char matrix2[] = {0x24,0x92,0x24,0x92};
- int default_colors[] = {0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63};
- int mouse_limits[] = {0,92,191,346,458,640};
- #else
- extern unsigned char matrix1[]; /* dither patterns */
- extern unsigned char matrix2[];
- extern int default_colors[];
- extern int mouse_limits[];
- #endif
-
- typedef int (*funcptr)(); /* pointer to an integer function */
-
- /* command structure */
-
- typedef struct menu
- {
- funcptr menu_func; /* function to carry out the command */
- char *menu_item; /* the menu item as written on the screen */
- int x1; /* coordinates of location of menu_item */
- int x2;
- int next;
- int prev;
- } MENU;
-
- extern MENU main_menu[];
-
- /* function declarations */
-
- #include "declare.h"