diff --git a/misc/calentool/Makefile b/misc/calentool/Makefile new file mode 100644 index 00000000000..566e7e03266 --- /dev/null +++ b/misc/calentool/Makefile @@ -0,0 +1,24 @@ +# $OpenBSD: Makefile,v 1.1.1.1 1998/09/30 16:27:52 ian Exp $ +# + +DISTNAME= calentool-2.3 +PKGNAME= calentool-2.3 +CATEGORIES= misc x11 +MASTER_SITES = http://www.darwinsys.com/freeware/ + +NO_CDROM= "NOFEE: can not sell" + +LIB_DEPENDS= xview\\.3.*:${PORTSDIR}/x11/xview-lib + +WRKSRC = ${WRKDIR}/xcalentool-2.3 + +USE_IMAKE= yes +USE_X11= yes + +pre-configure: + @if ! [ -f /usr/X11R6/include/images/hglass.cursor ]; then \ + echo "Installing hglass.cursor in /usr/X11R6/include/images."; \ + ${INSTALL_DATA} files/hglass.cursor /usr/X11R6/include/images; \ + fi + +.include diff --git a/misc/calentool/files/hglass.cursor b/misc/calentool/files/hglass.cursor new file mode 100644 index 00000000000..3b276953280 --- /dev/null +++ b/misc/calentool/files/hglass.cursor @@ -0,0 +1,4 @@ +/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16 + */ + 0x7FFE,0x4002,0x200C,0x1A38,0x0FF0,0x07E0,0x03C0,0x0180, + 0x0180,0x0240,0x0520,0x0810,0x1108,0x23C4,0x47E2,0x7FFE diff --git a/misc/calentool/files/md5 b/misc/calentool/files/md5 new file mode 100644 index 00000000000..552c63cf8d3 --- /dev/null +++ b/misc/calentool/files/md5 @@ -0,0 +1 @@ +MD5 (calentool-2.3.tar.gz) = 5148b177c689cf843455bb2b6bf898c4 diff --git a/misc/calentool/patches/patch-01 b/misc/calentool/patches/patch-01 new file mode 100644 index 00000000000..f7581fce71f --- /dev/null +++ b/misc/calentool/patches/patch-01 @@ -0,0 +1,29 @@ +--- Imakefile.orig Tue Sep 29 22:38:28 1998 ++++ Imakefile Wed Sep 30 11:36:45 1998 +@@ -115,10 +115,10 @@ + START_HOUR = 8 + END_HOUR = 18 + N_NOTESLOTS = 6 +-START_YEAR = 90 ++START_YEAR = 98 + NR_YEARS = 5 + UPDATE_RATE = minute +-MAILPROG = /usr/ucb/mail ++MAILPROG = /usr/bin/mail + HOUR_24 = 0 + MON_FIRST = 0 + APPT_CHECK_LIMIT = n_slots +@@ -130,10 +130,10 @@ + #NO_HOLIDAYS = -DNO_HOLIDAYS + #NO_SUN_MOON = -DNO_SUN_MOON + #NEED_CUSERID = -DNEED_CUSERID +-#NEED_DYSIZE = -DNEED_DYSIZE ++NEED_DYSIZE = -DNEED_DYSIZE + #SVR4 = -DSVR4 +-NEEDS_EXTRA_PROTOS = -DNEEDS_EXTRA_PROTOS +-NEEDS_GETTIMEOFDAY_PROTO = -DNEEDS_GETTIMEOFDAY_PROTO ++#NEEDS_EXTRA_PROTOS = -DNEEDS_EXTRA_PROTOS ++#NEEDS_GETTIMEOFDAY_PROTO = -DNEEDS_GETTIMEOFDAY_PROTO + #HAS_STRFTIME = -DHAS_STRFTIME + LOCATION= -DLONG_DEGREES=121. -DLONG_MINUTES=08. -DLONG_SECONDS=56. \ + -DLAT_DEGREES=44. -DLAT_MINUTES=15. -DLAT_SECONDS=15. diff --git a/misc/calentool/patches/patch-02 b/misc/calentool/patches/patch-02 new file mode 100644 index 00000000000..5698a74f80c --- /dev/null +++ b/misc/calentool/patches/patch-02 @@ -0,0 +1,19 @@ +--- cal2ct.c.orig Wed Sep 30 11:44:27 1998 ++++ cal2ct.c Wed Sep 30 11:45:06 1998 +@@ -71,7 +71,7 @@ + #endif + #endif + +-void ++int + main(argc, argv) + int argc; + char *argv[]; +@@ -136,6 +136,7 @@ + exit(1); + } + write_ct_file(); ++ return 0; + } + + /* diff --git a/misc/calentool/patches/patch-03 b/misc/calentool/patches/patch-03 new file mode 100644 index 00000000000..4fee6a16b97 --- /dev/null +++ b/misc/calentool/patches/patch-03 @@ -0,0 +1,19 @@ +--- calencheck.c.orig Wed Sep 30 11:45:30 1998 ++++ calencheck.c Wed Sep 30 11:46:30 1998 +@@ -53,7 +53,7 @@ + int show_future = 1; + int one_based = 0, version2 = 0; + +-void ++int + main(argc,argv) + int argc; + char *argv[]; +@@ -129,6 +129,7 @@ + sleep(TIME_OUT*60); + check_calendar(); + } ++ return 0; + } + + /* some stubs required by routines in common.c not used by calencheck */ diff --git a/misc/calentool/patches/patch-04 b/misc/calentool/patches/patch-04 new file mode 100644 index 00000000000..72d102374fe --- /dev/null +++ b/misc/calentool/patches/patch-04 @@ -0,0 +1,28 @@ +--- calentool.c.orig Tue Sep 29 22:41:22 1998 ++++ calentool.c Wed Sep 30 11:36:45 1998 +@@ -221,7 +221,7 @@ + void set_cms(); + #endif + +-void main(argc,argv) ++int main(argc,argv) + int argc; + char *argv[]; + { +@@ -898,6 +898,7 @@ + xv_main_loop(frame); + + (void)leave((Notify_client)0, 0, (Notify_signal_mode)0); ++ return 0; + } + + +@@ -1017,7 +1018,7 @@ + fputs("\n ", stderr); + XGetErrorDatabaseText(mydisplay, "XlibMessage", "CurrentSerial", + "Current Serial #%d", error_mesg, 1024); +- fprintf(stderr, error_mesg, mydisplay->request); ++ fprintf(stderr, error_mesg, LastKnownRequestProcessed(mydisplay)); + fputs("\n", stderr); + + /** If we were debugging, this would be useful.... diff --git a/misc/calentool/patches/patch-06 b/misc/calentool/patches/patch-06 new file mode 100644 index 00000000000..71686b9a257 --- /dev/null +++ b/misc/calentool/patches/patch-06 @@ -0,0 +1,11 @@ +--- ctexterns.h.orig Tue Sep 29 22:38:23 1998 ++++ ctexterns.h Wed Sep 30 11:36:46 1998 +@@ -87,7 +87,7 @@ + extern int length_of_year (int year); + extern void lock_cursors (void); + extern int monthlength (int month); +-extern void moon_data (long int seconds); ++extern void moon_data (time_t seconds); + extern void moon_data_frame (void); + extern void next_appt (int bi, int dpyflag); + extern void nextmonth (void); diff --git a/misc/calentool/patches/patch-07 b/misc/calentool/patches/patch-07 new file mode 100644 index 00000000000..ecc9dd1218f --- /dev/null +++ b/misc/calentool/patches/patch-07 @@ -0,0 +1,19 @@ +--- month2ct.c.orig Wed Sep 30 11:46:49 1998 ++++ month2ct.c Wed Sep 30 11:46:57 1998 +@@ -43,7 +43,7 @@ + void write_ct_file (); + #endif + +-void ++int + main(argc, argv) + int argc; + char *argv[]; +@@ -66,6 +66,7 @@ + exit(1); + } + write_ct_file(); ++ return 0; + } + + /* diff --git a/misc/calentool/patches/patch-08 b/misc/calentool/patches/patch-08 new file mode 100644 index 00000000000..6b684a7a327 --- /dev/null +++ b/misc/calentool/patches/patch-08 @@ -0,0 +1,11 @@ +--- moon.c.orig Tue Sep 29 22:38:23 1998 ++++ moon.c Wed Sep 30 11:36:47 1998 +@@ -359,7 +359,7 @@ + + void + moon_data(seconds) +-long seconds; ++time_t seconds; + { + int lunation; + int i; diff --git a/misc/calentool/patches/patch-09 b/misc/calentool/patches/patch-09 new file mode 100644 index 00000000000..17a7da56016 --- /dev/null +++ b/misc/calentool/patches/patch-09 @@ -0,0 +1,19 @@ +--- mt2ct.c.orig Wed Sep 30 11:47:04 1998 ++++ mt2ct.c Wed Sep 30 11:47:14 1998 +@@ -45,7 +45,7 @@ + void write_ct_file (); + #endif + +-void ++int + main(argc, argv) + int argc; + char *argv[]; +@@ -74,6 +74,7 @@ + exit(1); + } + write_ct_file(); ++ return 0; + } + + /* diff --git a/misc/calentool/patches/patch-11 b/misc/calentool/patches/patch-11 new file mode 100644 index 00000000000..a485a5edb0d --- /dev/null +++ b/misc/calentool/patches/patch-11 @@ -0,0 +1,46 @@ +--- printer.c.orig Tue Sep 29 22:38:24 1998 ++++ printer.c Wed Sep 30 11:36:47 1998 +@@ -72,8 +72,8 @@ + int format = ZPixmap; + char trailer[256]; + +-char rasfile[] = "/usr/tmp/calentool.xwd"; +-char psfile[256] = "/usr/tmp/calentool.ps"; ++char rasfile[] = "/var/tmp/calentool.xwd"; ++char psfile[256] = "/var/tmp/calentool.ps"; + + #ifdef __STDC__ + void print_one_day (int which, FILE *output, int gdrtn); +@@ -319,12 +319,12 @@ + int i, gd_rtn, target, ndays; + FILE *output, *popen(); + int pclose(); +- char cmd[80], *name, *cuserid(), *mail_subj(); ++ char cmd[80], *name, *getlogin(), *mail_subj(); + struct tm Save; + + fix_current_day(); + sprintf(trailer, "File: '%s' printed for %s on %s", +- apts_pathname, cuserid(NULL), clockstr); ++ apts_pathname, getlogin(), clockstr); + gd_rtn = get_day_appts(); + if (which == PRI_DAY && !gd_rtn) + return; /* nothing to show */ +@@ -334,7 +334,7 @@ + if (dest == DST_MAIL) { + if (mailto != NULL) { + name = mailto; +- } else if ((name = cuserid(NULL)) == NULL) { ++ } else if ((name = getlogin()) == NULL) { + err_rpt("nobody to mail to", FATAL); + } + sprintf(cmd, "%s -s \"Appointments for %s\" %s", MAILPROG, mail_subj(which), name); +@@ -510,7 +510,7 @@ + lock_cursors(); + working(TRUE); + sprintf(trailer, "File: '%s' printed for %s on %s", +- apts_pathname, cuserid(NULL), clockstr); ++ apts_pathname, getlogin(), clockstr); + #ifndef RASTER_ONLY + if (file_type == PR_POSTSCRIPT) { + if ((pfp = fopen(psfile, "w")) == NULL) { diff --git a/misc/calentool/patches/patch-12 b/misc/calentool/patches/patch-12 new file mode 100644 index 00000000000..48273ae0c5d --- /dev/null +++ b/misc/calentool/patches/patch-12 @@ -0,0 +1,44 @@ +--- riseset.c.orig Tue Sep 29 22:38:24 1998 ++++ riseset.c Wed Sep 30 11:36:47 1998 +@@ -48,7 +48,7 @@ + extern char *daynames[], *monthnames[]; + extern int day_first; + +-long UTC, TDT, tim, tim2; ++time_t UTC, TDT, tim, tim2; + double Julian_Day, MJD, Tu, Ru, T70, Local, GMST, LST; + double Eqt, Tua, L, G, e, eps, g, alpha, delta, sd, cd, lha, lhr, sh, ch; + double la, lf, S, C, sp, cp, tp, Az, alt; +@@ -287,7 +287,7 @@ + + struct tm * + sunrise(t0, rs, z) +- long t0; ++ time_t t0; + double rs, z; + { + double cz, dh; +@@ -311,12 +311,12 @@ + + char * + moonrise(t0, rs, z) +- long t0; ++ time_t t0; + double rs, z; + { + #define SRATE 1.033863192 /* ratio of Moon's motion to Sun's motion */ + double cz, dh, sd, cd; +- long t1, dt; ++ time_t t1, dt; + struct tm *ltm; + + moondata(t0); /* get starting declination of Moon */ +@@ -522,7 +522,7 @@ + + /* time functions */ + char *gmctime(t) +-long *t; ++time_t *t; + { + return(asctime(gmtime(t))); + } diff --git a/misc/calentool/patches/patch-13 b/misc/calentool/patches/patch-13 new file mode 100644 index 00000000000..8e9f7482012 --- /dev/null +++ b/misc/calentool/patches/patch-13 @@ -0,0 +1,11 @@ +--- utils.c.orig Tue Sep 29 22:38:24 1998 ++++ utils.c Wed Sep 30 11:36:47 1998 +@@ -170,7 +170,7 @@ + #else + gettimeofday(&tv, 0); + #endif +- tm = localtime(&tv.tv_sec); ++ tm = localtime((time_t*)&tv.tv_sec); + + today = *tm; + diff --git a/misc/calentool/patches/patch-99 b/misc/calentool/patches/patch-99 new file mode 100644 index 00000000000..d5e1de503f2 --- /dev/null +++ b/misc/calentool/patches/patch-99 @@ -0,0 +1,7 @@ +--- dates/computing.orig Tue Sep 29 22:38:17 1998 ++++ dates/computing Wed Sep 30 11:31:15 1998 +@@ -149,3 +149,4 @@ + ** 12 27 99 99 00 APT report published (1956) + ** 12 28 99 99 00 John Von Neumann, First suggested stored program model. (1903) + 85 11 05 99 99 00 At 0:53:20 GMT UNIX time reached the 500000000 (half billion) second mark (1985) ++99 12 31 99 99 00 End of time for much software/firmware, and calentool. diff --git a/misc/calentool/pkg/COMMENT b/misc/calentool/pkg/COMMENT new file mode 100644 index 00000000000..707e5a4fa0d --- /dev/null +++ b/misc/calentool/pkg/COMMENT @@ -0,0 +1 @@ +Nice X-based Calendar/Scheduling tool (using XView). diff --git a/misc/calentool/pkg/DESCR b/misc/calentool/pkg/DESCR new file mode 100644 index 00000000000..57c00a41519 --- /dev/null +++ b/misc/calentool/pkg/DESCR @@ -0,0 +1,30 @@ +$Id: DESCR,v 1.1.1.1 1998/09/30 16:27:53 ian Exp $ + +CALENTOOL - Version 2.3X + +Calentool is a day/week/month/year-at-glance tool for Workstations +and X terminals. The windowed display interface uses XView (2.0 or 3.0) +and X11R4 or X11R5 to present an OPEN LOOK style user interface (including +the Help key!). + +One can view a single day's appointments and notes, a weeks worth (with +abbreviated messages), a month at a time (with appointment flags) or a year +at a time (with appointment flags). Alternate appointment files can be +specified to allow checking other users' schedules. + +Recurring appointments (e.g every Monday or every 1st & 3rd Tuesday), +as well as a reminder of future appointments are available. + +Interesting information about the sun and moon is also available for viewing. + +See the man page for all the gory details. + +Conversion programs are supplied to convert from some of the other +common calendar program appointment files to calentool's file format. + + + Bill Randle + Tektronix, Inc. + billr@saab.CNA.TEK.COM + August 29, 1994 + diff --git a/misc/calentool/pkg/PLIST b/misc/calentool/pkg/PLIST new file mode 100644 index 00000000000..33e8cabb41e --- /dev/null +++ b/misc/calentool/pkg/PLIST @@ -0,0 +1,44 @@ +bin/calentool +bin/calencheck +bin/mt2ct +bin/month2ct +bin/cal2ct +lib/help/calentool.info +@dirrm lib/help +lib/calentool/CREDITS +lib/calentool/README +lib/calentool/ancient +lib/calentool/can_holiday +lib/calentool/celtic +lib/calentool/computing +lib/calentool/events1 +lib/calentool/events2 +lib/calentool/events3 +lib/calentool/events4 +lib/calentool/events5 +lib/calentool/events6 +lib/calentool/gdead +lib/calentool/hawaii +lib/calentool/literature +lib/calentool/lives1 +lib/calentool/lives2 +lib/calentool/lives3 +lib/calentool/lives4 +lib/calentool/lives5 +lib/calentool/lives6 +lib/calentool/lotr +lib/calentool/movies +lib/calentool/music +lib/calentool/radio +lib/calentool/sfo +lib/calentool/space +lib/calentool/sports +lib/calentool/television +lib/calentool/usa_holiday +lib/calentool/usa_other +lib/calentool/usa_states +lib/calentool/witchcraft +lib/calentool/world +lib/calentool/events +lib/calentool/lives +@dirrm lib/calentool