home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DPG.ZIP / VIDEO.H < prev    next >
C/C++ Source or Header  |  1992-04-23  |  2KB  |  69 lines

  1. #define    BLANKDATE            (1 + 1*32 + 80*32*16)
  2.  
  3. #define    dateday(d)            ((d) % 32)
  4. #define    datemonth(d)        (((d) / 32) % 16)
  5. #define    dateyear(d)            ((d) / (32*16))
  6.  
  7. #define    makedate(d,m,y)    (y*32*16 + m*32 + d)
  8.  
  9. #define    foffset(s,f)        ((char *)&s.f - (char *)&s)
  10.  
  11. enum
  12. {
  13.     DIR_RETURN,
  14.     DIR_ESC,
  15.     DIR_UP,
  16.     DIR_DOWN,
  17.     DIR_LEFT,
  18.     DIR_RIGHT,
  19.     DIR_PGUP,
  20.     DIR_PGDN,
  21.     DIR_HOME,
  22.     DIR_END,
  23.     DIR_INS,
  24.     DIR_DEL,
  25.     MAXDIR
  26. };
  27.  
  28. enum
  29. {
  30.     DF_RETURN = 1 << DIR_RETURN,
  31.     DF_ESC = 1 << DIR_ESC,
  32.     DF_UP = 1 << DIR_UP,
  33.     DF_DOWN = 1 << DIR_DOWN,
  34.     DF_LEFT = 1 << DIR_LEFT,
  35.     DF_RIGHT = 1 << DIR_RIGHT,
  36.     DF_PGUP = 1 << DIR_PGUP,
  37.     DF_PGDN = 1 << DIR_PGDN,
  38.     DF_HOME = 1 << DIR_HOME,
  39.     DF_END = 1 << DIR_END,
  40.     DF_INS = 1 << DIR_INS,
  41.     DF_DEL = 1 << DIR_DEL,
  42. };
  43.  
  44. typedef struct execmenuitemstruct
  45. {
  46.     char *text;
  47.     struct execmenuitemstruct *submenu;
  48.     void (*function)();
  49. } execmenuitem;
  50.  
  51. extern dir;
  52.  
  53. void printint (int,int,long,int);
  54. void printfloat (int,int,double,int,int);
  55. void printdate (int,int,unsigned short);
  56. void printstr (int,int,char *,int);
  57. void editlong (long *,int,int,int,int);
  58. void editbyte (signed char *,int,int,int,int);
  59. void editshort (short *,int,int,int,int);
  60. void editfloat (double *,int,int,int,int,int);
  61. void editdate (unsigned short *,int,int,int);
  62. void editstr (char *,int,int,int,int);
  63. void execmenu (execmenuitem *,int,int,int,int);
  64. getkey (void);
  65. void cursor (int,int);
  66. validdate (unsigned short);
  67. void beep (void);
  68. unsigned short atodate (char *);
  69.