home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d945 / reminder.lha / Reminder / src / src.lha / Constants.h < prev    next >
C/C++ Source or Header  |  1993-04-19  |  3KB  |  95 lines

  1. /* Constants for both Reminder and ReminderCheck */
  2.  
  3. /* $Id: Constants.h,v 1.15 1993/04/19 15:21:11 Matti_Rintala Exp $ */
  4.  
  5. #ifndef CONSTANTS_H
  6. #define CONSTANTS_H
  7.  
  8. #include <time.h>
  9. #include <exec/nodes.h>
  10.  
  11. /* Tooltype (or command line arg) which tells the database name */
  12. #define FILETYPE "FILE"
  13. /* Default filename for database */
  14. #define DEFAULTFILE "S:Reminder.data"
  15.  
  16. /* Tooltype (or command line arg) which tells the minimum interval
  17.    (in hours) between two checks */
  18. #define INTRVLTYPE "INTERVAL"
  19. #define DEFAULTINTRVL 0
  20.  
  21. /* Tooltype (or command line arg) which tells not to use ReqTools.library */
  22. #define NOREQTOOLSTYPE "NOREQTOOLS"
  23.  
  24. /* Tooltype (or command line arg) which tells not to use ARexx */
  25. #define NOAREXXTYPE "NOAREXX"
  26.  
  27. /* Tooltype (or command line arg) which tells maximum number of events in one
  28.    grouped requester */
  29. #define MAXGROUPTYPE "MAXGROUP"
  30. #define DEFAULTMAXGROUP 4
  31.  
  32. /* Tooltype (or command line arg) which tells maximum width of line in
  33.    ReminderCheck requester */
  34. #define MAXWIDTHTYPE "MAXWIDTH"
  35. #define DEFAULTMAXWIDTH 30
  36.  
  37. /* Minimum and maximum years */
  38. #define MINYEAR 1993
  39. #define MAXYEAR 2099
  40.  
  41. /* Maximum number of days before which the reminding starts */
  42. #define MAXBEFORE 365
  43. /* Same for after event */
  44. #define MAXAFTER MAXBEFORE
  45.  
  46. /* Maximum length of entered text */
  47. #define TEXTLEN 90
  48.  
  49. /* Maximun length of one entry in Eventlist gadget */
  50. #define ENTRYLEN 40
  51.  
  52. /* Length of arexxcom field */
  53. #define AREXXCOMLEN 28
  54.  
  55. /* Length of arexxport field */
  56. #define AREXXPORTLEN 10
  57.  
  58. /* EventNode structure, holding all events in the database */
  59. struct EventNode {
  60.   struct Node node;
  61.  
  62.   unsigned char mode;        /* ARexx mode + 'D' if deleted */
  63.   char arexxcom[AREXXCOMLEN+1];    /* ARexx command */
  64.   char arexxport[AREXXPORTLEN+1]; /* ARexx port */
  65.   char text[TEXTLEN+1];        /* Text of the event */
  66.   short wday, day, month, year;    /* Date of event */
  67.   short after, before;        /* Reminding limits */
  68.   BOOL autodelete;        /* autodeletion flag */
  69.   short aday, amonth, ayear;    /* acknowledgement date */
  70.  
  71.   time_t next_date;        /* Next occurrence of event */
  72.   char entry[ENTRYLEN+1];    /* Text in the Eventlist gadget */
  73. };
  74.  
  75. /* Address range of EventNode to be saved */
  76. #define SAVEADDR(x) (&(x)->mode)
  77. #define SAVELEN(x) ((char *)&(x)->next_date - (char *)&(x)->mode)
  78.  
  79. /* Character in mode, if entry is deleted */
  80. #define DELETEDMODE 'D'
  81.  
  82. /* Character in mode, if ARexx is not used */
  83. #define AREXXNMODE 0
  84.  
  85. /* Character in mode, if ARexx script name is in arexx field */
  86. #define AREXXSMODE 1
  87.  
  88. /* Character in mode, if ARexx command + port is in arexx field */
  89. #define AREXXCMODE 2
  90.  
  91. /* Bitmask used with mode field to indicate grouping */
  92. #define GROUPEDMASK 0x80
  93.  
  94. #endif
  95.