home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1990-02-04 | 45.8 KB | 1,820 lines
*** /tmp/,RCSt1a16916 Fri Dec 15 17:22:32 1989 --- ct.h Fri Dec 15 17:17:07 1989 *************** *** 1,5 /* ! * $Header: ct.h,v 2.2 89/07/19 20:26:27 billr Exp $ */ /* * ct.h - header file for calentool --- 1,5 ----- /* ! * $Header: ct.h,v 2.3 89/12/15 17:17:04 billr Exp $ */ /* * ct.h - header file for calentool *************** *** 22,27 * notice remains intact. */ /* directory for date/event files */ #ifndef DATELIB_DIR # define DATELIB_DIR "/usr/net/lib/calentool" --- 22,35 ----- * notice remains intact. */ + /* ignore several things for calencheck program */ + #ifdef CALENCHECK + # define NO_PRINTER + # define NO_HOLIDAYS + # define NO_SUN_MOON + # define NOTOOL + #endif + /* directory for date/event files */ #ifndef DATELIB_DIR # define DATELIB_DIR "/usr/net/lib/calentool" *************** *** 27,33 # define DATELIB_DIR "/usr/net/lib/calentool" #endif ! #ifndef NOPRINTER /* command string for sending a file to the Postscript printer */ # ifndef PRINT_CMD # define PRINT_CMD "lpr -Plw" --- 35,41 ----- # define DATELIB_DIR "/usr/net/lib/calentool" #endif ! #ifndef NO_PRINTER /* command string for sending a file to the Postscript printer */ # ifndef PRINT_CMD # define PRINT_CMD "lpr -Plw" *************** *** 39,44 #endif #endif /* define NR_WEEKDAYS for desired week display */ /* NR_WEEKDAYS display */ /* 5 Mon-Fri */ --- 47,57 ----- #endif #endif + #ifndef MAILPROG + # define MAILPROG "/usr/ucb/mail" + /* assumes -s option is available */ + #endif + /* define NR_WEEKDAYS for desired week display */ /* NR_WEEKDAYS display */ /* 5 Mon-Fri */ *************** *** 43,49 /* NR_WEEKDAYS display */ /* 5 Mon-Fri */ /* 6 Mon-Sat */ ! /* 7 Sun-Sat */ /**/ #ifndef NR_WEEKDAYS # define NR_WEEKDAYS 5 --- 56,62 ----- /* NR_WEEKDAYS display */ /* 5 Mon-Fri */ /* 6 Mon-Sat */ ! /* 7 Sun-Sat or Mon-Sun */ /**/ #ifndef NR_WEEKDAYS # define NR_WEEKDAYS 5 *************** *** 48,53 #ifndef NR_WEEKDAYS # define NR_WEEKDAYS 5 #endif #ifndef START_HOUR # define START_HOUR 8 /* 8am */ --- 61,69 ----- #ifndef NR_WEEKDAYS # define NR_WEEKDAYS 5 #endif + #ifndef MON_FIRST + # define MON_FIRST 0 /* 0=Sun-Sat, 1=Mon-Sun */ + #endif #ifndef START_HOUR # define START_HOUR 8 /* 8am */ *************** *** 55,60 #ifndef END_HOUR # define END_HOUR 18 /* 6pm */ #endif #ifndef START_YEAR # define START_YEAR 89 --- 71,82 ----- #ifndef END_HOUR # define END_HOUR 18 /* 6pm */ #endif + #ifndef HOUR_24 + # define HOUR_24 0 /* 0=12hr time, 1=24hr time */ + #endif + #ifndef DAY_FIRST + # define DAY_FIRST 0 /* 0=M/D/Y, 1=D/M/Y */ + #endif #ifndef START_YEAR # define START_YEAR 89 *************** *** 66,72 #ifndef UPDATE_RATE # define UPDATE_RATE "second" /* update time */ #endif /* options are "second" & "minute" */ ! #define TIME_OUT 5 /* check appts every 5 minutes */ /* * If calentool is too big and you want a stripped-down version --- 88,94 ----- #ifndef UPDATE_RATE # define UPDATE_RATE "second" /* update time */ #endif /* options are "second" & "minute" */ ! #define TIME_OUT 2 /* check appts every 5 minutes */ /* * APPT_CHECK_LIMIT is typically either "n_tslots" *************** *** 69,74 #define TIME_OUT 5 /* check appts every 5 minutes */ /* * If calentool is too big and you want a stripped-down version * define some or all of these here or in the Makefile. Combined, * they save ~100K bytes. --- 91,106 ----- #define TIME_OUT 2 /* check appts every 5 minutes */ /* + * APPT_CHECK_LIMIT is typically either "n_tslots" + * or "N_SLOTS" depending on whether we include the + * notes section when indicating that we still have + * appts today. + */ + #ifndef APPT_CHECK_LIMIT + # define APPT_CHECK_LIMIT n_tslots + #endif + + /* * If calentool is too big and you want a stripped-down version * define some or all of these here or in the Makefile. Combined, * they save ~100K bytes. *************** *** 94,109 #define N_SLOTS (N_TSLOTS+10) /* Total number of slots on a day page. */ #define MAX_FUTURE_ENTRIES 32 /* number of appts displayed in popup window */ - /* - * APPT_CHECK_LIMIT is typically either "n_tslots" - * or "N_SLOTS" depending on whether we include the - * notes section when indicating that we still have - * appts today. - */ - #ifndef APPT_CHECK_LIMIT - # define APPT_CHECK_LIMIT n_tslots - #endif - /* Dimensions of 30-minute week slot. * Message size determines width - everything else keyed * off font size and message size --- 126,131 ----- #define N_SLOTS (N_TSLOTS+10) /* Total number of slots on a day page. */ #define MAX_FUTURE_ENTRIES 32 /* number of appts displayed in popup window */ /* Dimensions of 30-minute week slot. * Message size determines width - everything else keyed * off font size and message size *************** *** 110,115 */ #define WEEK_MESSAGE_SIZE 12 #define DISPLAYING_DAY 1 /* Defs for state of main */ #define DISPLAYING_WEEK 2 /* subwindow (mainsw_state) */ #define DISPLAYING_MONTH 3 --- 132,139 ----- */ #define WEEK_MESSAGE_SIZE 12 + #define MAX_INCLUDE_NESTING 4 /* number of allowed include files */ + #define DISPLAYING_DAY 1 /* Defs for state of main */ #define DISPLAYING_WEEK 2 /* subwindow (mainsw_state) */ #define DISPLAYING_MONTH 3 *************** *** 185,190 #define MARKED 0x800 /* don't show in month/year display */ #define MARKED_NOTE 0xc00 #define DELETED 0x1000 /* don't show the appt that matches this */ /* format of repeat field for every_someday type appts */ #define WEEK1 0x1 --- 209,215 ----- #define MARKED 0x800 /* don't show in month/year display */ #define MARKED_NOTE 0xc00 #define DELETED 0x1000 /* don't show the appt that matches this */ + #define RUN 0x2000 /* format of repeat field for every_someday type appts */ #define WEEK1 0x1 *************** *** 216,221 #define DST_STDOUT 1 #define DST_MAIL 2 /* header line in appts file implies one-based entries and 99 memo flag */ #define HEADER "# CalenTool V2 - DO NOT REMOVE THIS LINE\n" --- 241,253 ----- #define DST_STDOUT 1 #define DST_MAIL 2 + /* return codes from get_day_appts() */ + #define NO_ENTRIES 0 + #define SOME_APPTS 1 + #define SOME_NOTES 2 + #define SOME_MKNOTES 4 + #define SOME_FUTURES 8 + /* header line in appts file implies one-based entries and 99 memo flag */ #define HEADER "# CalenTool V2 - DO NOT REMOVE THIS LINE\n" *************** *** 224,229 /* describes an entry in the appointments file */ int year, month, day, hour, minute, arrows; int repeat, lookahead, flags, sindex; char str[MAX_STRLEN]; struct appt_entry *next; /* ptr to next appt in list */ }; /* NULL if last entry */ --- 256,262 ----- /* describes an entry in the appointments file */ int year, month, day, hour, minute, arrows; int repeat, lookahead, flags, sindex; + int runlength; char str[MAX_STRLEN]; struct appt_entry *next; /* ptr to next appt in list */ }; /* NULL if last entry */ *** /tmp/,RCSt1a16921 Fri Dec 15 17:22:36 1989 --- datelib.c Fri Dec 15 17:17:17 1989 *************** *** 1,5 /* ! * $Header: datelib.c,v 2.2 89/07/19 20:34:23 billr Exp $ * * datelib.c - Calendar (date) computation library * --- 1,5 ----- /* ! * $Header: datelib.c,v 2.3 89/12/15 17:17:08 billr Exp $ * * datelib.c - Calendar (date) computation library * *************** *** 89,94 "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; static char timebuf[16]; /* * date_string: --- 89,96 ----- "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; static char timebuf[16]; + static double passoverJD, easterJD; + static int passoverJY; /* * date_string: *************** *** 254,259 } /* * julian_day: * Compute Julian day (>=1) * given day (1-31), month (1-12), year (1901-2009) --- 256,289 ----- } /* + * nth_mday_of_month: + * Compute nth m-day of the month (1-31) + * given n (1-5), day of week (0-6, 0 for Sunday), month (1-12), + * year (1583-9999) + */ + double + nth_mday_of_month(n, day_of_week, month, year) + int day_of_week, month, n, year; + { + int atmp, btmp, ctmp, dtmp, etmp, tmonth, tyear; + + if (month > 2) { + tmonth = month + 1; + tyear = year; + } + else { + tmonth = month + 13; + tyear = year - 1; + } + atmp = 2.6 * tmonth; + btmp = 1.25 * tyear; + ctmp = (tyear / 100) - 7; + dtmp = 0.75 * ctmp; + etmp = (day_of_week - atmp - btmp + dtmp) % 7; + return (double) (etmp + (n * 7)); + } + + /* * julian_day: * Compute Julian day (>=1) * given day (1-31), month (1-12), year (1901-2009) *************** *** 270,277 double day; int month, year; { ! int atmp, btmp, monthp, yearp; ! double ctmp; if (month > 2) { monthp = month + 1; --- 300,307 ----- double day; int month, year; { ! int atmp, monthp, yearp; ! double ctmp = 1720994.5 + day; if (month > 2) { monthp = month + 1; *************** *** 282,288 yearp = year - 1; } if ((year > 1582) || (year == 1582 && month >= 10) ! || (year == 1582 && month ==10 && day >= 15)) { atmp = year / 100; btmp = 2 - atmp + (atmp / 4); } --- 312,318 ----- yearp = year - 1; } if ((year > 1582) || (year == 1582 && month >= 10) ! || (year == 1582 && month == 10 && day >= 15)) { atmp = year / 100; ctmp += 2 - atmp + (int)(atmp / 4); } *************** *** 284,290 if ((year > 1582) || (year == 1582 && month >= 10) || (year == 1582 && month ==10 && day >= 15)) { atmp = year / 100; ! btmp = 2 - atmp + (atmp / 4); } else btmp = 0; --- 314,320 ----- if ((year > 1582) || (year == 1582 && month >= 10) || (year == 1582 && month == 10 && day >= 15)) { atmp = year / 100; ! ctmp += 2 - atmp + (int)(atmp / 4); } ctmp += (int)(365.25 * yearp) + (int)(30.6001 * monthp); return ctmp; *************** *** 286,298 atmp = year / 100; btmp = 2 - atmp + (atmp / 4); } ! else ! btmp = 0; ! atmp = 365.25 * yearp; ! ctmp = atmp; ! atmp = 30.6001 * monthp; ! ctmp = ctmp + atmp; ! return ctmp + day + 1720994.5 + btmp; } #ifndef NO_HOLIDAYS --- 316,323 ----- atmp = year / 100; ctmp += 2 - atmp + (int)(atmp / 4); } ! ctmp += (int)(365.25 * yearp) + (int)(30.6001 * monthp); ! return ctmp; } #ifndef NO_HOLIDAYS *************** *** 297,302 #ifndef NO_HOLIDAYS /* * corrected_julian_day: * Correct Julian day (>=1) for conversion from JULIAN CALENDAR * to GREGORIAN CALENDAR. --- 322,341 ----- #ifndef NO_HOLIDAYS /* + * datelib_int: + * Calculate often used quantities (e.g. Easter, Passover) as an + * optimization. + */ + datelib_init(year) + int year; + { + void passover_init(), easter_init(); + + easter_init(year); + passover_init(year); + } + + /* * corrected_julian_day: * Correct Julian day (>=1) for conversion from JULIAN CALENDAR * to GREGORIAN CALENDAR. *************** *** 374,411 } /* - * nth_mday_of_month: - * Compute nth m-day of the month (1-31) - * given n (1-5), day of week (0-6, 0 for Sunday), month (1-12), - * year (1583-9999) - */ - double - nth_mday_of_month(n, day_of_week, month, year) - int day_of_week, month, n, year; - { - int atmp, btmp, ctmp, dtmp, etmp, ftmp, tmonth, tyear; - - if (month > 2) { - tmonth = month + 1; - tyear = year; - } - else { - tmonth = month + 13; - tyear = year - 1; - } - atmp = 2.6 * tmonth; - btmp = 1.25 * tyear; - ctmp = (tyear / 100) - 7; - dtmp = 0.75 * ctmp; - etmp = (day_of_week - atmp - btmp + dtmp) % 7; - if (etmp == 0) - ftmp = 7; - else - ftmp = etmp; - return (double) (ftmp + (n * 7)); - } - - /* * years_date_is_mday: * Compute year(s) for which a given date is an m-day * given starting year, ending year, --- 413,418 ----- } /* * years_date_is_mday: * Compute year(s) for which a given date is an m-day * given starting year, ending year, *************** *** 698,705 * Method valid for all dates in the Gregorian calendar * (from 15 October 1583 on) */ ! double ! easter(year) int year; { double day; --- 705,712 ----- * Method valid for all dates in the Gregorian calendar * (from 15 October 1583 on) */ ! void ! easter_init(year) int year; { double day; *************** *** 721,727 mtmp = (atmp + (11 * htmp) + (22 * ltmp)) / 451; month = (htmp + ltmp - (7 * mtmp) + 114) / 31; day = ((htmp + ltmp - (7 * mtmp) + 114) % 31) + 1; ! return julian_day(day, month, year); } /* --- 728,734 ----- mtmp = (atmp + (11 * htmp) + (22 * ltmp)) / 451; month = (htmp + ltmp - (7 * mtmp) + 114) / 31; day = ((htmp + ltmp - (7 * mtmp) + 114) % 31) + 1; ! easterJD = julian_day(day, month, year); } double *************** *** 724,729 return julian_day(day, month, year); } /* * first_sunday_advent: * Christian holidays: compute Julian day for First Sunday in Advent --- 731,743 ----- easterJD = julian_day(day, month, year); } + double + easter(year) + int year; + { + return easterJD; + } + /* * first_sunday_advent: * Christian holidays: compute Julian day for First Sunday in Advent *************** *** 755,763 double offset; int year; { ! double easter(); ! ! return easter(year) + offset; } /* --- 769,775 ----- double offset; int year; { ! return easterJD + offset; } /* *************** *** 1030,1038 * Floating point implementation by R.P.C. Rodgers; integer implementation * (for faster calculation) by Amos Shapir (amos@nsc.com). */ ! double ! passover(year, jyear) ! int *jyear, year; { int etmp, p_day; int atmp, btmp, ctmp, day_of_week, dtmp, ftmp, gtmp; --- 1042,1050 ----- * Floating point implementation by R.P.C. Rodgers; integer implementation * (for faster calculation) by Amos Shapir (amos@nsc.com). */ ! void ! passover_init(year) ! int year; { int etmp, p_day; int atmp, btmp, ctmp, day_of_week, dtmp, ftmp, gtmp; *************** *** 1039,1045 int p_month; atmp = year + 3760; ! *jyear = atmp; btmp = (12 * atmp + 17) % 19; ctmp = atmp % 4; etmp = (765433 * btmp) - (1565 * atmp) --- 1051,1057 ----- int p_month; atmp = year + 3760; ! passoverJY = atmp; btmp = (12 * atmp + 17) % 19; ctmp = atmp % 4; etmp = (765433 * btmp) - (1565 * atmp) *************** *** 1049,1055 /* day_of_week is not to be confused with the value returned by the day_of_week routine; here, Sunday = 1 */ day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7; ! if (day_of_week == 0 && btmp > 11 && etmp >= 311676) p_day = dtmp + 1; else if (day_of_week == 1 && btmp > 6 && etmp >= 311676) p_day = dtmp + 2; --- 1061,1067 ----- /* day_of_week is not to be confused with the value returned by the day_of_week routine; here, Sunday = 1 */ day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7; ! if (day_of_week == 0 && btmp > 11 && etmp >= 442111) p_day = dtmp + 1; else if (day_of_week == 1 && btmp > 6 && etmp >= 311676) p_day = dtmp + 2; *************** *** 1067,1073 } else p_month = 3; ! return julian_day(p_day, p_month, year); } /* --- 1079,1085 ----- } else p_month = 3; ! passoverJD = julian_day((double)p_day, p_month, year); } double *************** *** 1070,1075 return julian_day(p_day, p_month, year); } /* * passover_offset: * Jewish holidays: compute Julian day as offset from Passover --- 1082,1095 ----- passoverJD = julian_day((double)p_day, p_month, year); } + double + passover(year, jyear) + int year, *jyear; + { + *jyear = passoverJY; + return passoverJD; + } + /* * passover_offset: * Jewish holidays: compute Julian day as offset from Passover *************** *** 1080,1088 double offset; int *jyear, year; { ! double passover(); ! ! return passover(year, jyear) + offset; } /* --- 1100,1107 ----- double offset; int *jyear, year; { ! *jyear = passoverJY; ! return passoverJD + offset; } /* *************** *** 1178,1185 chanukah(year, jyear) int *jyear, year; { ! double atmp; ! int btmp, dummy; atmp = passover(year, jyear); btmp = passover((year + 1), &dummy) - atmp; --- 1197,1204 ----- chanukah(year, jyear) int *jyear, year; { ! double atmp, ptmp; ! int btmp, ytmp; atmp = passover(year, jyear); /* we need top compute passover for next year, so *************** *** 1182,1188 int btmp, dummy; atmp = passover(year, jyear); ! btmp = passover((year + 1), &dummy) - atmp; (*jyear)++; if (btmp == 355 || btmp == 385) return atmp + 247.0; --- 1201,1215 ----- int btmp, ytmp; atmp = passover(year, jyear); ! /* we need top compute passover for next year, so ! * save current info and restore when done ! */ ! ptmp = passoverJD; ! ytmp = passoverJY; ! passover_init(year + 1); ! btmp = passoverJD - atmp; ! passoverJD = ptmp; ! passoverJY = ytmp; (*jyear)++; if (btmp == 355 || btmp == 385) return atmp + 247.0; *** /tmp/,RCSt1a16926 Fri Dec 15 17:22:44 1989 --- devent.c Fri Dec 15 17:17:23 1989 *************** *** 1,5 /* ! * $Header: devent.c,v 2.5 89/09/19 05:58:58 billr Exp $ */ /* * devent.c --- 1,5 ----- /* ! * $Header: devent.c,v 2.6 89/12/15 17:17:18 billr Exp $ */ /* * devent.c *************** *** 43,48 extern Panel_item everyx_pi, repeat_pi, remind_pi; extern Panel_item whichwk_pi, marked_pi; extern Panel_item del_choice_pi; extern Frame del_frame; extern Panel del_panel; extern Pixrect tri_right_pr, tri_up_pr; --- 43,49 ----- extern Panel_item everyx_pi, repeat_pi, remind_pi; extern Panel_item whichwk_pi, marked_pi; extern Panel_item del_choice_pi; + extern Panel_item runl_pi; extern Frame del_frame; extern Panel del_panel; extern Pixrect tri_right_pr, tri_up_pr; *************** *** 463,469 /* clears a day slot */ deactivate_slot(bi, dpyflag) ! int bi; { slots[bi].active = INACTIVE; if (!dpyflag) --- 464,470 ----- /* clears a day slot */ deactivate_slot(bi, dpyflag) ! int bi, dpyflag; { slots[bi].active = INACTIVE; if (!dpyflag) *************** *** 485,491 /* returns pointer to slot containing arrow head */ int deactivate_lower_arrows(bi, dpyflag) ! int bi; { while (bi < N_SLOTS-1) { bi++; --- 486,492 ----- /* returns pointer to slot containing arrow head */ int deactivate_lower_arrows(bi, dpyflag) ! int bi, dpyflag; { while (bi < N_SLOTS-1) { bi++; *************** *** 517,522 slots[bi].cur_appt->arrows = 0; slots[bi].cur_appt->flags = slots[bi].cur_appt->repeat = 0; slots[bi].cur_appt->lookahead = slots[bi].cur_appt->sindex = 0; if (bi >= n_tslots) { /* notes section */ slots[bi].cur_appt->hour = 99; --- 518,524 ----- slots[bi].cur_appt->arrows = 0; slots[bi].cur_appt->flags = slots[bi].cur_appt->repeat = 0; slots[bi].cur_appt->lookahead = slots[bi].cur_appt->sindex = 0; + slots[bi].cur_appt->runlength = 0; if (bi >= n_tslots) { /* notes section */ slots[bi].cur_appt->hour = 99; *************** *** 756,761 panel_set_value(repeat_pi, ""); /* set default */ panel_set_value(remind_pi, ""); /* set default */ if (apt->flags & ALL_DAYS) everyx_val |= 0x1; if (apt->flags & ALL_MONTHS) --- 758,764 ----- panel_set_value(repeat_pi, ""); /* set default */ panel_set_value(remind_pi, ""); /* set default */ + panel_set_value(runl_pi, ""); /* set default */ if (apt->flags & ALL_DAYS) everyx_val |= 0x1; if (apt->flags & ALL_MONTHS) *************** *** 780,785 if (apt->flags & LOOKAHEAD) { sprintf(str, "%d", apt->lookahead); panel_set_value(remind_pi, str); } panel_set_value(marked_pi, (apt->flags & MARKED ? 1 : 0)); if (apt->flags & A_NOTE) --- 783,792 ----- if (apt->flags & LOOKAHEAD) { sprintf(str, "%d", apt->lookahead); panel_set_value(remind_pi, str); + } + if (apt->flags & RUN) { + sprintf(str, "%d", apt->runlength); + panel_set_value(runl_pi, str); } panel_set_value(marked_pi, (apt->flags & MARKED ? 1 : 0)); if (apt->flags & A_NOTE) *** /tmp/,RCSt1a16931 Fri Dec 15 17:22:51 1989 --- dpaint.c Fri Dec 15 17:17:29 1989 *************** *** 1,5 /* ! * $Header: dpaint.c,v 2.3 89/07/19 20:27:45 billr Exp $ */ /* * dpaint.c --- 1,5 ----- /* ! * $Header: dpaint.c,v 2.4 89/12/15 17:17:25 billr Exp $ */ /* * dpaint.c *************** *** 28,35 * * ***************************************************/ - #include <suntool/sunview.h> - #include <suntool/canvas.h> #include <ctype.h> #include <sys/time.h> #include <stdio.h> --- 28,33 ----- * * ***************************************************/ #include <ctype.h> #include <sys/time.h> #include <stdio.h> *************** *** 33,38 #include <ctype.h> #include <sys/time.h> #include <stdio.h> #include "ct.h" #include "paint.h" #include "riseset.h" --- 31,40 ----- #include <ctype.h> #include <sys/time.h> #include <stdio.h> + #ifndef NOTOOL + #include <suntool/sunview.h> + #include <suntool/canvas.h> + #endif #include "ct.h" #include "paint.h" #ifndef NOTOOL *************** *** 35,40 #include <stdio.h> #include "ct.h" #include "paint.h" #include "riseset.h" #define J1970 2440587.5 /* VAX clock Epoch 1970 Jan 1 (0h UT) */ --- 37,43 ----- #endif #include "ct.h" #include "paint.h" + #ifndef NOTOOL #include "riseset.h" #define J1970 2440587.5 /* VAX clock Epoch 1970 Jan 1 (0h UT) */ *************** *** 42,48 extern Frame mframe, sframe; extern Canvas mcanvas, scanvas; extern Panel_item mdate_pi, sdate_pi; ! #endif extern Pixrect *leftarrow, *rightarrow; extern Pixrect *arrowshaft_pr, *arrowhead_pr; extern int day_message_size; --- 45,51 ----- extern Frame mframe, sframe; extern Canvas mcanvas, scanvas; extern Panel_item mdate_pi, sdate_pi; ! #endif /* NO_SUN_MOON */ extern Pixrect *leftarrow, *rightarrow; extern Pixrect *arrowshaft_pr, *arrowhead_pr; extern char riseset_buf[][64]; *************** *** 45,51 #endif extern Pixrect *leftarrow, *rightarrow; extern Pixrect *arrowshaft_pr, *arrowhead_pr; - extern int day_message_size; extern char riseset_buf[][64]; extern int old_slot; extern int show_future; --- 48,53 ----- #endif /* NO_SUN_MOON */ extern Pixrect *leftarrow, *rightarrow; extern Pixrect *arrowshaft_pr, *arrowhead_pr; extern char riseset_buf[][64]; extern int old_slot; #endif /* NOTOOL */ *************** *** 48,53 extern int day_message_size; extern char riseset_buf[][64]; extern int old_slot; extern int show_future; extern char *index(); --- 50,57 ----- extern Pixrect *arrowshaft_pr, *arrowhead_pr; extern char riseset_buf[][64]; extern int old_slot; + #endif /* NOTOOL */ + extern int day_message_size; extern int show_future; extern char *index(); *************** *** 55,60 struct appt_entry future[MAX_FUTURE_ENTRIES]; int findex = 0; /* index into struct future array */ /* * This one draws the current selected day in the * main subwindow. --- 59,65 ----- struct appt_entry future[MAX_FUTURE_ENTRIES]; int findex = 0; /* index into struct future array */ + #ifndef NOTOOL /* * This one draws the current selected day in the * main subwindow. *************** *** 116,125 starty = y = (rect->r_height - (N_SLOTS * dayslot_height)) / 2; /* Format daystring to say, for example, */ ! /* Tuesday, March 12, 1985 */ ! sprintf(daystring, "%s %s %d, %d", ! daynames[current.tm_wday], monthnames[current.tm_mon], ! current.tm_mday, 1900 + current.tm_year); pw_text(main_pixwin, (rect->r_width - bigfont->pf_defaultsize.x*strlen(daystring))/2, starty/2 + 7, PIX_SRC, bigfont, daystring); --- 121,136 ----- starty = y = (rect->r_height - (N_SLOTS * dayslot_height)) / 2; /* Format daystring to say, for example, */ ! if (day_first) ! /* Tuesday, 13 March 1990 */ ! sprintf(daystring, "%s %d %s %d", ! daynames[current.tm_wday], current.tm_mday, ! monthnames[current.tm_mon], 1900 + current.tm_year); ! else ! /* Tuesday, March 13, 1990 */ ! sprintf(daystring, "%s %s %d, %d", ! daynames[current.tm_wday], monthnames[current.tm_mon], ! current.tm_mday, 1900 + current.tm_year); pw_text(main_pixwin, (rect->r_width - bigfont->pf_defaultsize.x*strlen(daystring))/2, starty/2 + 7, PIX_SRC, bigfont, daystring); *************** *** 146,154 pw_write(main_pixwin,x,y,dayslot_width,dayslot_height,PIX_SRC,timeslot_pr,0,0); if (i < n_tslots) { /* display time */ ! sprintf(timestring, "%2d:%s", ! (START_HOUR+(i/2))%12 == 0 ? 12 : (START_HOUR+(i/2))%12, ! i%2 == 0 ? "00" : "30"); } else if (i == n_tslots) { sprintf(timestring, "Notes"); } else { --- 157,170 ----- pw_write(main_pixwin,x,y,dayslot_width,dayslot_height,PIX_SRC,timeslot_pr,0,0); if (i < n_tslots) { /* display time */ ! if (hour24) ! sprintf(timestring, "%2d:%s", ! START_HOUR+(i/2), ! i%2 == 0 ? "00" : "30"); ! else ! sprintf(timestring, "%2d:%s%s", ! (START_HOUR+(i/2))%12 == 0 ? 12 : (START_HOUR+(i/2))%12, ! i%2 == 0 ? "00" : "30", (START_HOUR+(i/2) < 12 ? "am" : "pm")); } else if (i == n_tslots) { sprintf(timestring, "Notes"); } else { *************** *** 154,160 } else { sprintf(timestring, " "); } ! pw_text(main_pixwin,x-8*font->pf_defaultsize.x,y+font->pf_defaultsize.y,PIX_SRC,font,timestring); y += dayslot_height - 1; } --- 170,176 ----- } else { sprintf(timestring, " "); } ! pw_text(main_pixwin,x-9*font->pf_defaultsize.x,y+font->pf_defaultsize.y,PIX_SRC,font,timestring); y += dayslot_height - 1; } *************** *** 168,173 sun_moon_buttons(TRUE); print_button(TRUE); } /* --- 184,190 ----- sun_moon_buttons(TRUE); print_button(TRUE); } + #endif /* NOTOOL */ /* * Fills in appointments for the day. *************** *** 169,175 print_button(TRUE); } - /* * Fills in appointments for the day. * The ".tmp.aptsXXXXX" file is filled out --- 186,191 ----- } #endif /* NOTOOL */ /* * Fills in appointments for the day. * The ".tmp.aptsXXXXX" file is filled out *************** *** 182,187 FILE *apts, *temp_apts; int slotno, n_arrows, i; int read_stat, some_appt = 0; struct appt_entry appt; struct appt_entry *nappt, *aptr; char buf[MAX_STRLEN], *sptr; --- 198,204 ----- FILE *apts, *temp_apts; int slotno, n_arrows, i; int read_stat, some_appt = 0; + int runl; struct appt_entry appt; struct appt_entry *nappt, *aptr; char buf[MAX_STRLEN], *sptr; *************** *** 235,241 /* * now go thru the appointments file */ ! while ((read_stat=get_aentry(apts, &appt)) != EOF) { if (read_stat) continue; /* read error (ignore) */ if (appt.flags & A_COMMENT) { --- 252,258 ----- /* * now go thru the appointments file */ ! while ((read_stat=get_aentry(apts, &appt, FALSE)) != EOF) { if (read_stat) continue; /* read error (ignore) */ if (appt.flags & A_COMMENT) { *************** *** 256,263 current.tm_mday = First.tm_mday; else if (appt.flags & EVERY_SOMEDAY) { if (Pickday(appt.flags) == First.tm_wday) { ! if (chk_week(appt.repeat, First.tm_mday)) ! current.tm_mday = First.tm_mday; } } else if (appt.flags & REPEAT) { while (ymd_compare(current, First) < 0) { --- 273,284 ----- current.tm_mday = First.tm_mday; else if (appt.flags & EVERY_SOMEDAY) { if (Pickday(appt.flags) == First.tm_wday) { ! if (chk_week(appt.repeat, First.tm_mday)) { ! if (appt.flags & RUN) ! find_date(&appt); ! else ! current.tm_mday = First.tm_mday; ! } } } else if (appt.flags & REPEAT) { if (appt.flags & RUN) *************** *** 260,268 current.tm_mday = First.tm_mday; } } else if (appt.flags & REPEAT) { ! while (ymd_compare(current, First) < 0) { ! current.tm_mday += appt.repeat; ! fix_current_day(); } } if (ymd_compare(current, First) == 0) { --- 281,297 ----- } } } else if (appt.flags & REPEAT) { ! if (appt.flags & RUN) ! runl = appt.runlength; ! else ! runl = 1; ! while (ymd_compare(current, First) < 0 && runl) { ! if (appt.flags & RUN) ! --runl; ! if (runl) { ! current.tm_mday += appt.repeat; ! fix_current_day(); ! } } } if (ymd_compare(current, First) == 0) { *************** *** 267,273 } if (ymd_compare(current, First) == 0) { /* if it's for this day, fill in slot info */ ! if (appt.flags & A_NOTE) /* notes section */ add_note(&appt); else { --- 296,302 ----- } if (ymd_compare(current, First) == 0) { /* if it's for this day, fill in slot info */ ! if (appt.flags & A_NOTE) { /* notes section */ add_note(&appt); if (appt.flags & MARKED) *************** *** 270,276 if (appt.flags & A_NOTE) /* notes section */ add_note(&appt); ! else { /* regular appointment */ slotno = (appt.hour-START_HOUR) * 2 + appt.minute / 30; if (slotno < 0) --- 299,311 ----- if (appt.flags & A_NOTE) { /* notes section */ add_note(&appt); ! if (appt.flags & MARKED) ! /* marked note */ ! some_appt |= SOME_MKNOTES; ! else ! /* regular note */ ! some_appt |= SOME_NOTES; ! } else { /* regular appointment */ slotno = (appt.hour-START_HOUR) * 2 + appt.minute / 30; if (slotno < 0) *************** *** 280,285 /* add this appt to the list of appts for the slot */ /* and update all the reference counts */ add_to_slot(slotno, &appt, FALSE); } } else if (appt.flags & LOOKAHEAD) { /* This lookahead appt was not for today, so --- 315,321 ----- /* add this appt to the list of appts for the slot */ /* and update all the reference counts */ add_to_slot(slotno, &appt, FALSE); + some_appt |= SOME_APPTS; } } else if (appt.flags & LOOKAHEAD) { /* This lookahead appt was not for today, so *************** *** 316,321 future[findex].month = save_day.tm_mon; future[findex].day = save_day.tm_mday; ++findex; } } } else { /* line is not for today */ --- 352,358 ----- future[findex].month = save_day.tm_mon; future[findex].day = save_day.tm_mday; ++findex; + some_appt |= SOME_FUTURES; } } } else { /* line is not for today */ *************** *** 334,350 fclose(apts); current = First; fix_current_day(); ! /* now check to see if there is anything happening this day */ ! if (findex) ! some_appt = 1; ! else { ! for (i=0; i<N_SLOTS; i++) { ! if (slots[i].count > 0) { ! some_appt = 1; ! break; ! } ! } ! } return(some_appt); } --- 371,377 ----- fclose(apts); current = First; fix_current_day(); ! return(some_appt); } *************** *** 380,385 struct appt_entry *appt; { struct tm save; save = current; /* set current to match dow of repeated appt */ --- 407,413 ----- struct appt_entry *appt; { struct tm save; + int runl; save = current; /* set current to match dow of repeated appt */ *************** *** 390,395 current.tm_mday += 7; fix_current_day(); } /* search for first matching week */ while (!chk_week(appt->repeat, current.tm_mday)) { current.tm_mday += 7; --- 418,427 ----- current.tm_mday += 7; fix_current_day(); } + if (appt->flags & RUN) + runl = appt->runlength; + else + runl = 1; /* search for first matching week */ while (!chk_week(appt->repeat, current.tm_mday) && runl) { current.tm_mday += 7; *************** *** 391,397 fix_current_day(); } /* search for first matching week */ ! while (!chk_week(appt->repeat, current.tm_mday)) { current.tm_mday += 7; fix_current_day(); } --- 423,429 ----- else runl = 1; /* search for first matching week */ ! while (!chk_week(appt->repeat, current.tm_mday) && runl) { current.tm_mday += 7; fix_current_day(); if (appt->flags & RUN) *************** *** 394,399 while (!chk_week(appt->repeat, current.tm_mday)) { current.tm_mday += 7; fix_current_day(); } /* now check to make sure this is legal, i.e. there * were no month or year restrictions --- 426,433 ----- while (!chk_week(appt->repeat, current.tm_mday) && runl) { current.tm_mday += 7; fix_current_day(); + if (appt->flags & RUN) + --runl; } /* now check to make sure this is legal, i.e. there * were no month or year restrictions and runlength *************** *** 396,402 fix_current_day(); } /* now check to make sure this is legal, i.e. there ! * were no month or year restrictions */ if ((!(appt->flags & ALL_YEARS) && current.tm_year != save.tm_year) || (!(appt->flags & ALL_MONTHS) && current.tm_mon != save.tm_mon)) --- 430,437 ----- --runl; } /* now check to make sure this is legal, i.e. there ! * were no month or year restrictions and runlength ! * wasn't exceeded */ if (!runl || (!(appt->flags & ALL_YEARS) && current.tm_year != save.tm_year) || (!(appt->flags & ALL_MONTHS) && current.tm_mon != save.tm_mon)) *************** *** 398,404 /* now check to make sure this is legal, i.e. there * were no month or year restrictions */ ! if ((!(appt->flags & ALL_YEARS) && current.tm_year != save.tm_year) || (!(appt->flags & ALL_MONTHS) && current.tm_mon != save.tm_mon)) /* invalid date, due to month or year wrap */ current = save; --- 433,439 ----- * were no month or year restrictions and runlength * wasn't exceeded */ ! if (!runl || (!(appt->flags & ALL_YEARS) && current.tm_year != save.tm_year) || (!(appt->flags & ALL_MONTHS) && current.tm_mon != save.tm_mon)) /* invalid date, due to month or year wrap */ current = save; *************** *** 409,415 add_note(appt) struct appt_entry *appt; { ! int slotno; /* auto-hunt for free note slot */ for (slotno=n_tslots; slotno<N_SLOTS; slotno++) --- 444,451 ----- add_note(appt) struct appt_entry *appt; { ! int slotno, found = 0; ! struct appt_entry *optr; /* This used to just find a free slot and add the note * to it. However, with deleted notes we need to find *************** *** 411,420 { int slotno; ! /* auto-hunt for free note slot */ ! for (slotno=n_tslots; slotno<N_SLOTS; slotno++) ! if (slots[slotno].active == INACTIVE) ! break; if (slotno == N_SLOTS) { /* overflow of notes field, so * add to last note field list --- 447,484 ----- int slotno, found = 0; struct appt_entry *optr; ! /* This used to just find a free slot and add the note ! * to it. However, with deleted notes we need to find ! * the matching slotno (if it exists) to make sure that ! * the deleted and non-deleted notes end up in the same ! * slot number (so they won't be displayed). ! */ ! if (appt->flags & DELETED) { ! /* look for matching non-deleted note */ ! for (slotno=n_tslots; slotno<N_SLOTS && !found; slotno++) { ! if (slots[slotno].active == INACTIVE) ! break; /* no more notes */ ! for (optr=slots[slotno].first;optr;optr=optr->next) { ! if (!strcmp(appt->str, optr->str) && !(optr->flags & DELETED)) { ! found = 1; ! break; ! } ! } ! } ! } else { ! /* look for matching deleted note */ ! for (slotno=n_tslots; slotno<N_SLOTS && !found; slotno++) { ! if (slots[slotno].active == INACTIVE) ! break; /* no more notes */ ! for (optr=slots[slotno].first;optr;optr=optr->next) ! if (!strcmp(appt->str, optr->str) && (optr->flags & DELETED)) { ! found = 1; ! break; ! } ! } ! } ! if (found) ! --slotno; /* for loop incremented slotno */ if (slotno == N_SLOTS) { /* overflow of notes field, so * add to last note field list *************** *** 424,429 add_to_slot(slotno, appt, FALSE); } /* draw in todays appointments */ draw_day_appts() { --- 488,494 ----- add_to_slot(slotno, appt, FALSE); } + #ifndef NOTOOL /* draw in todays appointments */ draw_day_appts() { *************** *** 555,560 } } } /* * Add an appointment entry pointed to by aptr to the day slot --- 620,626 ----- } } } + #endif /* NOTOOL */ /* * Add an appointment entry pointed to by aptr to the day slot *************** *** 600,606 n_arrows = nappt->arrows; if (nappt->flags & DELETED) { /* look for matching non-deleted appt in list */ ! for (optr=slots[slotno].first;optr;optr=optr->next) if (!strcmp(nappt->str, optr->str) && !(optr->flags & DELETED)) { found = 1; break; --- 666,672 ----- n_arrows = nappt->arrows; if (nappt->flags & DELETED) { /* look for matching non-deleted appt in list */ ! for (optr=slots[slotno].first;optr && !found;optr=optr->next) if (!strcmp(nappt->str, optr->str) && !(optr->flags & DELETED)) { found = 1; break; *************** *** 645,651 } } else { /* look for matching deleted appt in list */ ! for (optr=slots[slotno].first;optr;optr=optr->next) if (!strcmp(nappt->str, optr->str) && optr->flags & DELETED) { found = 1; break; --- 711,717 ----- } } else { /* look for matching deleted appt in list */ ! for (optr=slots[slotno].first;optr && !found;optr=optr->next) if (!strcmp(nappt->str, optr->str) && optr->flags & DELETED) { found = 1; break; *** /tmp/,RCSt1a16937 Fri Dec 15 17:22:58 1989 --- event.c Fri Dec 15 17:17:33 1989 *************** *** 1,5 /* ! * $Header: event.c,v 2.1 89/05/09 14:23:23 billr Exp $ */ /* * event.c --- 1,5 ----- /* ! * $Header: event.c,v 2.2 89/12/15 17:17:30 billr Exp $ */ /* * event.c *************** *** 40,46 extern Frame fframe, sframe, mframe; extern struct tm olddate; extern int update_interval, show_time; ! extern char timestr[], todays_date[]; extern Icon icon; Notify_value myframe_interposer(); --- 40,46 ----- extern Frame fframe, sframe, mframe; extern struct tm olddate; extern int update_interval, show_time; ! extern char timestr[]; extern Icon icon; extern int monday_first, hour24; extern Pixfont *sfont; *************** *** 42,47 extern int update_interval, show_time; extern char timestr[], todays_date[]; extern Icon icon; Notify_value myframe_interposer(); void --- 42,49 ----- extern int update_interval, show_time; extern char timestr[]; extern Icon icon; + extern int monday_first, hour24; + extern Pixfont *sfont; Notify_value myframe_interposer(); void *************** *** 120,125 (y <= week_arrows[i].bottom)) { week_index = i; current.tm_mday = -current.tm_wday + 1 + (7 * week_index); selected_type = WEEK; pw_write(main_pixwin,week_arrows[week_index].left, week_arrows[week_index].top,smallarrow_pr->pr_size.x, --- 122,129 ----- (y <= week_arrows[i].bottom)) { week_index = i; current.tm_mday = -current.tm_wday + 1 + (7 * week_index); + if (monday_first) + current.tm_mday++; selected_type = WEEK; pw_write(main_pixwin,week_arrows[week_index].left, week_arrows[week_index].top,smallarrow_pr->pr_size.x, *************** *** 211,217 sframe_done(0); #endif check_calendar(); /* update icon */ ! if (show_time) { /* update time label */ strcpy(timestr, todays_date+10); if (update_interval == 60) --- 215,221 ----- sframe_done(0); #endif check_calendar(); /* update icon */ ! if (show_time) /* update time label */ update_icon_time(); } *************** *** 213,227 check_calendar(); /* update icon */ if (show_time) { /* update time label */ ! strcpy(timestr, todays_date+10); ! if (update_interval == 60) ! /* display hh:mm */ ! timestr[6] = '\0'; ! else ! /* display hh:mm:ss */ ! timestr[9] = '\0'; ! cur_icon = (Icon) window_get(frame, FRAME_ICON); ! icon_set(cur_icon, ICON_LABEL, timestr, 0); ! window_set(frame, FRAME_ICON, cur_icon, 0); } } --- 217,256 ----- check_calendar(); /* update icon */ if (show_time) /* update time label */ ! update_icon_time(); ! } ! ! /* update the time field of the current icon */ ! update_icon_time() ! { ! Icon cur_icon; ! ! format_icon_time(); ! cur_icon = (Icon) window_get(frame, FRAME_ICON); ! icon_set(cur_icon, ICON_LABEL, timestr, 0); ! window_set(frame, FRAME_ICON, cur_icon, 0); ! } ! ! format_icon_time() ! { ! if (update_interval >= 60) ! /* display hh:mm */ ! sprintf(timestr, " %2d:%02d", today.tm_hour, today.tm_min); ! else ! /* display hh:mm:ss */ ! sprintf(timestr, " %2d:%02d:%02d", today.tm_hour, today.tm_min, today.tm_sec); ! if (!hour24) { ! /* display am/pm for 12-hour time */ ! if (today.tm_hour > 12) { ! strcat(timestr, "pm"); ! timestr[1] = ((today.tm_hour - 12) / 10) + '0'; ! timestr[2] = ((today.tm_hour - 12) % 10) + '0'; ! } else if (today.tm_hour == 12) { ! strcat(timestr, "pm"); ! } else { ! strcat(timestr, "am"); ! } ! if (timestr[1] == '0') ! timestr[1] = ' '; } } *** /tmp/,RCSt1a24048 Mon Dec 18 17:14:37 1989 --- dates/space Mon Dec 18 17:13:53 1989 *************** *** 1,5 # CalenTool V2 - DO NOT REMOVE THIS LINE ! # $Header: space,v 1.2 89/08/25 11:18:46 billr Exp $ # Special days file for calentool (rel 2.1) # Submitted by Steve Gilbreath <steve@prism.gatech.edu> # Space events of note --- 1,5 ----- # CalenTool V2 - DO NOT REMOVE THIS LINE ! # $Header: space,v 2.1 89/12/18 17:13:32 billr Exp $ # Special days file for calentool (rel 2.1) # Submitted by Steve Gilbreath <steve@prism.gatech.edu> # Space events of note *************** *** 111,117 ** 04 20 99 99 00 Soyuz T-8 launched; mission aborted when capsule failed to dock with Salyut station. (1983) ** 04 23 99 99 00 Advisory council for Aeronautics became National Advisory Council on Aeronautics (NACA). (1915) ** 04 23 99 99 00 Launch of 1st Soviet communications satelite. (1965) ! ** 04 23 99 99 00 USSR Soyus 1 launched with Vladimir Komarov becoming the 1st cosomonaut to make 2 flights. He also became 1st man to die in space after his parachute line tangled on re-entry. Soyus 1. All Soviet manned flights ceased for 18 months. (1967) ** 04 24 99 99 00 China becomes 5th nation to launch artificial satellite. (1970) ** 04 25 99 99 00 Mercury/Atlas rocket lifted off with an electronic mannequin; when inertial guidance system failed 40 seconds after launch the rocket was destroyed by range safety officer. (1961) ** 04 26 99 99 00 US/UK launched Ariel; 1st International payload. (1962) --- 111,117 ----- ** 04 20 99 99 00 Soyuz T-8 launched; mission aborted when capsule failed to dock with Salyut station. (1983) ** 04 23 99 99 00 Advisory council for Aeronautics became National Advisory Council on Aeronautics (NACA). (1915) ** 04 23 99 99 00 Launch of 1st Soviet communications satelite. (1965) ! ** 04 23 99 99 00 USSR Soyus 1 launched with Vladimir Komarov becoming the 1st cosomonaut to make 2 flights. Also became 1st man to die in space after his parachute line tangled on re-entry. All Soviet manned flights ceased for 18 months. (1967) ** 04 24 99 99 00 China becomes 5th nation to launch artificial satellite. (1970) ** 04 25 99 99 00 Mercury/Atlas rocket lifted off with an electronic mannequin; when inertial guidance system failed 40 seconds after launch the rocket was destroyed by range safety officer. (1961) ** 04 26 99 99 00 US/UK launched Ariel; 1st International payload. (1962) *** /tmp/,RCSt1a24057 Mon Dec 18 17:15:10 1989 --- dates/world Mon Dec 18 17:14:16 1989 *************** *** 1,5 # CalenTool V2 - DO NOT REMOVE THIS LINE ! # $Header: world,v 2.2 89/05/16 10:46:16 billr Exp $ # Special days file for calentool (rel 2.1); modified from network posting by # RPC Rodgers, UCSF, Nov. 1988 # Various holidays commemorated around the world (non-US and Canadian) --- 1,5 ----- # CalenTool V2 - DO NOT REMOVE THIS LINE ! # $Header: world,v 2.3 89/12/18 17:14:00 billr Exp $ # Special days file for calentool (rel 2.1); modified from network posting by # RPC Rodgers, UCSF, Nov. 1988 # Various holidays commemorated around the world (non-US and Canadian) *************** *** 41,47 ** 01 23 99 99 00 Feast of St. Ildefonsus ** 01 24 99 99 00 Economic Liberation Day (Togo) ** 01 26 99 99 00 Republic Day (India) ! ** 01 30 99 99 00 Australia Day (Australia) ** 02 01 99 99 00 Chinese New Year Holiday (3 days) (Taiwan) ** 02 03 99 99 00 Setsubun, Change of Season or "Bean Throwing Night" (Japan) ** 02 04 99 99 00 Independence Commemoration Day (Sri Lanka) --- 41,47 ----- ** 01 23 99 99 00 Feast of St. Ildefonsus ** 01 24 99 99 00 Economic Liberation Day (Togo) ** 01 26 99 99 00 Republic Day (India) ! ** 01 26 99 99 00 Australia Day (Australia) ** 02 01 99 99 00 Chinese New Year Holiday (3 days) (Taiwan) ** 02 03 99 99 00 Setsubun, Change of Season or "Bean Throwing Night" (Japan) ** 02 04 99 99 00 Independence Commemoration Day (Sri Lanka) *************** *** 366,372 ** 09 30 99 99 00 Botswanna Day (Botswanna) ** 10 01 99 99 00 Armed Forces Day (South Korea) ** 10 01 99 99 00 Independence Day (Nigeria) ! ** 10 01 99 99 00 Labor Day (Australia) ** 10 01 99 99 00 National Liberation Day (2 days) (China) ** 10 01 99 99 00 Public Holiday (Botswanna) ** 10 02 99 99 00 Anniversary of Guinean Independence (Guinea) --- 366,372 ----- ** 09 30 99 99 00 Botswanna Day (Botswanna) ** 10 01 99 99 00 Armed Forces Day (South Korea) ** 10 01 99 99 00 Independence Day (Nigeria) ! #** 10 01 99 99 00 Labor Day (Australia) [really 1st Monday in October] ** 10 01 99 99 00 National Liberation Day (2 days) (China) ** 10 01 99 99 00 Public Holiday (Botswanna) ** 10 02 99 99 00 Anniversary of Guinean Independence (Guinea)