home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FGDEMO40.ZIP / SOURCE.COM / DEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-12  |  2.3 KB  |  109 lines

  1. /* compiler include files */
  2.  
  3. #include <ctype.h>
  4. #include <dos.h>
  5. #include <fastgraf.h>
  6. #include <io.h>
  7. #include <process.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11.  
  12. #ifdef   __TURBOC__
  13. #include <alloc.h>
  14. #else
  15. #include <malloc.h>
  16. #endif
  17.  
  18. #define BETWEEN(x,a,b) ((x >= a) && (x <= b))
  19. #define MAX(x,y) ((x) > (y)) ? (x) : (y)
  20. #define MIN(x,y) ((x) < (y)) ? (x) : (y)
  21.  
  22. #define PAGES 2      /* number of video pages needed in mode 16 */
  23.  
  24. #define PTSIZE 14    /* height of bitmapped characters */
  25.  
  26. #define OFF   0
  27. #define ON    1
  28.  
  29. #define ERR  -1
  30. #define OK    1
  31.  
  32. #define FALSE 0
  33. #define TRUE  1
  34.  
  35. #define ASCII        0
  36. #define ALPHANUMERIC 1
  37.  
  38. #define BS           8
  39. #define CR          13
  40. #define ESC         27
  41. #define SPACEBAR    32
  42.  
  43. #define UP_ARROW    72
  44. #define DOWN_ARROW  80
  45. #define LEFT_ARROW  75
  46. #define RIGHT_ARROW 77
  47.  
  48. #define HOME        71
  49. #define PAGE_UP     73
  50. #define END         79
  51. #define PAGE_DOWN   81
  52.  
  53. #define INSERT      82
  54. #define DELETE      83
  55.  
  56. #define ITEMS 5  /* number of items on main menu */
  57.  
  58. #ifndef _commonc_
  59.     #define DECLARE extern
  60. #else
  61.     #define DECLARE
  62. #endif
  63.  
  64. DECLARE int background;
  65. DECLARE int buttons;
  66. DECLARE int hidden, visual;
  67. DECLARE int mouse;
  68. DECLARE int old_mode, mode;
  69. DECLARE int xlimit, ylimit;
  70. DECLARE int xmouse, ymouse;
  71. DECLARE unsigned int clockspeed;
  72. DECLARE int menu_top;
  73. DECLARE int menu_bottom;
  74. DECLARE int ptsize;
  75. DECLARE int redraw;
  76. DECLARE int selection;
  77.  
  78. #ifdef _commonc_
  79.    unsigned char matrix1[] = {0xAA,0x55,0xAA,0x55};
  80.    unsigned char matrix2[] = {0x24,0x92,0x24,0x92};
  81.    int default_colors[] = {0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63};
  82.    int mouse_limits[] = {0,92,191,346,458,640};
  83. #else
  84.    extern unsigned char matrix1[];  /* dither patterns */
  85.    extern unsigned char matrix2[];
  86.    extern int default_colors[];
  87.    extern int mouse_limits[];
  88. #endif
  89.  
  90. typedef int (*funcptr)();   /* pointer to an integer function */
  91.  
  92. /* command structure */
  93.  
  94. typedef struct menu
  95. {
  96.    funcptr menu_func;       /* function to carry out the command */
  97.    char *menu_item;         /* the menu item as written on the screen */
  98.    int x1;                  /* coordinates of location of menu_item */
  99.    int x2;
  100.    int next;
  101.    int prev;
  102. }  MENU;
  103.  
  104. extern MENU main_menu[];
  105.  
  106. /* function declarations */
  107.  
  108. #include "declare.h"
  109.