home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0975.lha / PCal / pcalglob.h < prev    next >
C/C++ Source or Header  |  1992-02-19  |  5KB  |  190 lines

  1. /*
  2.  * pcalglob.h - definitions and declarations of globals used throughout Pcal
  3.  *
  4.  * Revision history:
  5.  *
  6.  *    4.3    AWR    12/05/91    Add global "progpath" (used when
  7.  *                    searching for moon file)
  8.  *
  9.  *            12/03/91    Added support for -s flag
  10.  *
  11.  *    4.2    AWR    10/08/91    Added support for -[kK] flags
  12.  *
  13.  *            10/02/91    Added support for -c, -N, -S flags
  14.  *
  15.  *    4.1    AWR    07/16/91    Added support for -G flag
  16.  *
  17.  *    4.0    AWR    01/28/91    Added support for -b and -w flags
  18.  *
  19.  *            01/15/91    Extracted from pcal.c
  20.  *
  21.  */
  22.  
  23. #ifdef PROTOS
  24. #include "protos.h"
  25. #else
  26. #include "noprotos.h"
  27. #endif
  28.  
  29. /*
  30.  * Definitions and/or declarations of globals
  31.  */
  32.  
  33. #ifdef MAIN_MODULE
  34.  
  35. /*
  36.  * Misc. globals
  37.  */
  38.  
  39. year_info *head = NULL;        /* head of internal data structure */
  40. int curr_year;            /* current default year for date file entries */
  41. char *words[MAXWORD];        /* maximum number of words per date file line */
  42. char lbuf[LINSIZ];        /* date file source line buffer */
  43. char progname[STRSIZ];        /* program name (for error messages) */
  44. char progpath[STRSIZ];        /* directory where executable lives */
  45. char version[20];        /* program version (for info messages) */
  46.  
  47. /* lengths and offsets of months in common year */
  48. char month_len[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
  49. short month_off[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
  50.  
  51. /* dispatch table for wildcard matching routines */
  52. #ifdef PROTOS
  53. int (*pdatefcn[])(int, int, int) = {
  54. #else
  55. int (*pdatefcn[])() = {
  56. #endif
  57.     is_anyday, is_weekday, is_workday, is_holiday, not_weekday,
  58.     not_workday, not_holiday, is_newmoon, is_firstq, is_fullmoon,
  59.     is_lastq };
  60.  
  61. /*
  62.  * Default values for command-line options:
  63.  */
  64.  
  65. char default_color[] = DAY_COLOR;     /* -b, -g */
  66. char day_color[7];
  67.  
  68. int datefile_type = SYS_DATEFILE;    /* -e, -f */
  69. char datefile[STRSIZ] = "";
  70.  
  71. int rotate = ROTATE;            /* -l, -p */
  72.  
  73. int draw_moons = DRAW_MOONS;        /* -m, -M */
  74.  
  75. char dayfont[STRSIZ] = DAYFONT;        /* -d, -t, -n */
  76. char titlefont[STRSIZ] = TITLEFONT;
  77. char notesfont[STRSIZ] = NOTESFONT;
  78.  
  79. char shading[STRSIZ] = SHADING;        /* -s */
  80.  
  81. char lfoot[STRSIZ] = LFOOT;             /* -L, -C, -R */
  82. char cfoot[STRSIZ] = CFOOT;
  83. char rfoot[STRSIZ] = RFOOT;
  84.  
  85. char notes_hdr[STRSIZ];            /* -N (initialized in main()) */
  86.  
  87. int first_day_of_week = FIRST_DAY;    /* -F */
  88.  
  89. int date_style = DATE_STYLE;        /* -A, -E */
  90.  
  91. char outfile[STRSIZ] = OUTFILE;        /* -o */
  92.  
  93. char xsval[12] = XSVAL;            /* -x, -y, -X, -Y */
  94. char ysval[12] = YSVAL;
  95. char xtval[12] = XTVAL;
  96. char ytval[12] = YTVAL;
  97.  
  98. int julian_dates = JULIAN_DATES;    /* -j */
  99.  
  100. int do_whole_year = FALSE;        /* -w */
  101.  
  102. int calendar_out = FALSE;        /* -c */
  103.  
  104. int blank_boxes = FALSE;        /* -B */
  105.  
  106. int small_cal_pos = SMALL_CAL_POS;    /* -k, -K, -S */
  107. int prev_cal_box[4] = PREV_CAL_BOX;
  108. int next_cal_box[4] = NEXT_CAL_BOX;
  109.  
  110. int num_style = NUM_STYLE;        /* -G, -O */
  111.  
  112. int debug_flags = 0;            /* -Z */
  113.  
  114. #else
  115.  
  116. /*
  117.  * Misc. globals
  118.  */
  119.  
  120. extern year_info *head;        /* head of internal data structure */
  121. extern int curr_year;        /* current default year for date file entries */
  122. extern char *words[];        /* maximum number of words per date file line */
  123. extern char lbuf[];        /* date file source line buffer */
  124. extern char progname[];        /* program name (for error messages) */
  125. extern char progpath[];        /* directory where executable lives */
  126. extern char version[];        /* program version (for info messages) */
  127.  
  128. /* lengths and offsets of months in common year */
  129. extern char month_len[];
  130. extern short month_off[];
  131.  
  132. /* dispatch functions and table for wildcard processing */
  133. extern int (*pdatefcn[])(); 
  134.  
  135. /*
  136.  * Default values for command-line options:
  137.  */
  138.  
  139. extern char default_color[];         /* -b, -g */
  140. extern char day_color[];
  141.  
  142. extern int datefile_type;        /* -e, -f */
  143. extern char datefile[];
  144.  
  145. extern int rotate;            /* -l, -p */
  146.  
  147. extern int draw_moons;            /* -m, -M */
  148.  
  149. extern char dayfont[];            /* -d, -t, -n */
  150. extern char titlefont[];
  151. extern char notesfont[];
  152.  
  153. extern char shading[];            /* -s */
  154.  
  155. extern char lfoot[];            /* -L, -C, -R */
  156. extern char cfoot[];
  157. extern char rfoot[];
  158.  
  159. extern char notes_hdr[];        /* -N */
  160.  
  161. extern int first_day_of_week;        /* -F */
  162.  
  163. extern int date_style;            /* -A, -E */
  164.  
  165. extern char outfile[];            /* -o */
  166.  
  167. extern char xsval[];            /* -x, -y, -X, -Y */
  168. extern char ysval[];
  169. extern char xtval[];
  170. extern char ytval[];
  171.  
  172. extern int julian_dates;        /* -j */
  173.  
  174. extern int do_whole_year;        /* -w */
  175.  
  176. extern int calendar_out;        /* -c */
  177.  
  178. extern int blank_boxes;            /* -B */
  179.  
  180. extern int small_cal_pos;        /* -k, -K, -S */
  181. extern int prev_cal_box[];
  182. extern int next_cal_box[];
  183.  
  184. extern int num_style;            /* -G, -O */
  185.  
  186. extern int debug_flags;            /* -Z */
  187.  
  188. #endif
  189.  
  190.