home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume17 / calentool / part23 / month.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-07  |  2.1 KB  |  77 lines

  1. /*
  2.  * @(#)$ month.h,v 8.4 88/04/04 10:46:35 hull Exp $
  3.  */
  4. /*
  5.  * truncated from the original to only include what I need
  6.  * and appended month8.h onto the end.
  7.  *
  8.  * Bill Randle 2/22/89
  9.  */
  10.  
  11. #define MAX_EVENT_STRING_LENGTH    70    /* maximum length of an event string */
  12.  
  13. #define READ_WRITE    0        /* open .month with read/write access */
  14. #define READ_ONLY    1        /* open .month with read-only access */
  15.  
  16. extern char *malloc();
  17.  
  18. /* structure of an area */
  19. struct area_rec {
  20.     short area;
  21.     short row;
  22.     short col;
  23. };
  24.  
  25. /* structure of a date */
  26. struct date_rec {
  27.     short month;
  28.     short day;
  29.     short year;
  30. };
  31.  
  32. /* structure of a time */
  33. struct time_rec {
  34.     short hour;
  35.     short minute;
  36. };
  37.  
  38. /* structure of an event pointer */
  39. struct eptr_rec {
  40.     struct event_rec *event;    /* event */
  41.     struct eptr_rec *prev_event;    /* previous event */
  42.     struct eptr_rec *next_event;    /* next event */
  43. };
  44.  
  45. /* structure of a name */
  46. struct name_rec {
  47.     char *name;            /* name */
  48.     struct name_rec *next_name    /* next name */
  49. };
  50.  
  51. /*
  52.  * @(#) month8.h,v 8.0 87/11/13 22:50:14 hull Exp
  53.  */
  54.  
  55. /* structure of an event */
  56. struct event_rec {
  57.     struct date_rec start_date;    /* starting date of the event */
  58.     char monthly;        /* does event occur monthly? */
  59.     char yearly;        /* does event occur yearly? */
  60.     char every;        /* does event occur on every something? */
  61.     char smtwtfs[7];    /* which days of the week are relevant? */
  62.     char nth;        /* does event occur on an nth something? */
  63.     char last;        /* does event occur on a last something? */
  64.     char nth_is_on;        /* is 'nth' selected by user, n is nth above */
  65.     struct time_rec start_time;    /* starting time of the event */
  66.     struct time_rec duration;    /* duration of the event */
  67.     struct time_rec warning;    /* warning of the event */
  68.     struct time_rec end_time;    /* ending time of the event */
  69.     char event_string[MAX_EVENT_STRING_LENGTH];  /* description of event */
  70.     char private;        /* is event private? */
  71.     char anti;        /* is this an anti-event? */
  72.     int event_owner;    /* owner of event */
  73.     char until;        /* does event occur until some date? */
  74.     struct date_rec until_date;    /* date event goes until */
  75.     struct event_rec *next_event;    /* next event */
  76. };
  77.