[comp.sources.sun] v01i072: Patches for calentool

mcgrew@dartagnan.rutgers.edu (Charles Mcgrew) (10/20/89)

Submitted-by: Bill Randle <billr@saab.cna.tek.com>
Posting-number: Volume 1, Issue 72
Archive-name: calentool/patch4a



   These are patches to calentool to take it to patchlevel 4 from
patchlevel 2 (patchlevel 3 is incorporated).  Use the program "patch"
to insert these fixes after unsharing the files.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 4)."
# Contents:  patches04a
# Wrapped by billr@saab on Tue Sep 19 06:29:30 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches04a' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patches04a'\"
else
echo shar: Extracting \"'patches04a'\" \(49839 characters\)
sed "s/^X//" >'patches04a' <<'END_OF_FILE'
XIndex: patchlevel.h
XPrereq: 2.3
X*** /tmp/,RCSt1a06183	Tue Sep 19 06:20:43 1989
X--- patchlevel.h	Tue Sep 19 06:20:19 1989
X***************
X*** 1,5
X  /*
X!  * $Header: patchlevel.h,v 2.3 89/05/16 16:31:28 billr Exp $
X   */
X  /*
X   * patchlevel.h - current patchlevel of calentool program
X
X--- 1,5 -----
X  /*
X!  * $Header: patchlevel.h,v 2.5 89/09/19 06:19:56 billr Exp $
X   */
X  /*
X   * patchlevel.h - current patchlevel of calentool program
X***************
X*** 5,8
X   * patchlevel.h - current patchlevel of calentool program
X   */
X  
X! #define PATCHLEVEL	2
X
X--- 5,8 -----
X   * patchlevel.h - current patchlevel of calentool program
X   */
X  
X! #define PATCHLEVEL	4
X*** /tmp/,RCSt1a06154	Tue Sep 19 06:18:16 1989
X--- PATCHLOG	Tue Sep 19 06:17:30 1989
X***************
X*** 1,4
X! # $Header: PATCHLOG,v 2.3 89/05/16 16:32:23 billr Exp $
X  
X  #$Log:	PATCHLOG,v $
X  # Revision 2.3  89/05/16  16:32:23  billr
X
X--- 1,4 -----
X! # $Header: PATCHLOG,v 2.5 89/09/19 06:17:10 billr Exp $
X  
X  #$Log:	PATCHLOG,v $
X  # Revision 2.5  89/09/19  06:17:10  billr
X***************
X*** 1,6
X  # $Header: PATCHLOG,v 2.3 89/05/16 16:32:23 billr Exp $
X  
X  #$Log:	PATCHLOG,v $
X  # Revision 2.3  89/05/16  16:32:23  billr
X  # Fix bug whereby nfs mounted appointment files were not being
X  # properly updated.  Add support for PostScript pretty printing
X
X--- 1,38 -----
X  # $Header: PATCHLOG,v 2.5 89/09/19 06:17:10 billr Exp $
X  
X  #$Log:	PATCHLOG,v $
X+ # Revision 2.5  89/09/19  06:17:10  billr
X+ # Patchlevel 4 of calentool. Fixes the following bug reports:
X+ # 
X+ # Bug fix in pcal.c for printing month of September <alexl@daemon.cna.tek.com>
X+ # Bug fix for 386i machines when viewing long appointment strings <baron@neptune.cs.ucla.edu>
X+ # Fix typos and clean up man page <rodgers@maxwell.mmwb.ucsf.edu>
X+ # 
X+ # Revision 2.4  89/08/11  08:34:47  billr
X+ # Patchlevel 3 of calentool. Fixes the following bug reports:
X+ # 
X+ # Bug fix for moontool <kelvin%throop@acad.uucp>
X+ # Bug fix/new version of passover() <amos@nsc.com>
X+ # Bug in moon phase calculation <kent@tfd.com>, <ras@needle1.bellcore.com>, <roberts%studguppy@lanl.gov>, <darcic@lachlan.sts.te.com>
X+ # Check return from get_defaults <ian@sq.com>
X+ # Cleanup Makefile <casey@gauss.llnl.gov>
X+ # Idea for monthly printout for terminal users <ian@sq.com>
X+ # Makefile did not copy dates/computing to lib dir <jmc@ptsfa.pacbell.com>
X+ # Missing arg for rotate function in ras2ps <jasmerb@hobbes.cs.orst.edu>
X+ # More makefile cleanup <lwv27%chemabs@cis.ohio-state.edu>
X+ # Off by one in mt2ct conversion <tom@cis.udel.edu>, <kas@cs.aber.ac.uk>, <paul%gill@uunet.uu.net>
X+ # Optimize nr weeks calculation for month display <rwolff@noao.edu>
X+ # Prevent calentool from sending mail when there are no appts <zander%trak@lanl.gov>, <john@math.nwu.edu>, <kayhan@cleopatra.usc.edu>
X+ # Raster print command missing '-v' argument <hleroy@presto.irisa.fr>
X+ # Scrambled moon icon on 386i <scott@cfi.com>, <lwv27%chemabs@cis.ohio-state.edu>, <syd@dsi.com>, <alfred@mcc.com>
X+ # Seg fault when cursor moved to long appt entry (386i) <alfred@mcc.com>, <jmc@pbjmc.pacbell.com>, <baron@neptune.cs.ucla.edu>
X+ # Set file access permissions on tmp file to match .appointments file <brooks@ge-dab.ge.com>
X+ # Space date file <steve@prism.gatech.edu>
X+ # Typo in man page "Save" file shoudl be "Update" file <lwv27%chemabs@cis.ohio-state.edu>
X+ # Typo in riseset.c (tzp.minuteswest should be tzp.tz_minuteswest) <hleroy@presto.irisa.fr>, <correira@austin.lockheed.com>
X+ # When deleteing an overlapping entry, background entry is not displayed <rgh@shell.uucp>
X+ # Wrong week displayed when selecting a week in month display <rodgers@maxwell.mmwb.ucsf.edu>
X+ #
X  # Revision 2.3  89/05/16  16:32:23  billr
X  # Fix bug whereby nfs mounted appointment files were not being
X  # properly updated.  Add support for PostScript pretty printing
X*** /tmp/,RCSt1a05523	Wed Jul 19 20:45:38 1989
X--- calentool.c	Wed Jul 19 20:26:26 1989
X***************
X*** 1,5
X  /*
X!  * $Header: calentool.c,v 2.1 89/05/09 15:28:43 billr Exp $
X   */
X  /*
X   * calentool.c
X
X--- 1,5 -----
X  /*
X!  * $Header: calentool.c,v 2.2 89/07/19 20:25:41 billr Exp $
X   */
X  /*
X   * calentool.c
X***************
X*** 155,160
X  {
X  	int   flag, i;
X  	int   printit = 0, toolrunning = 1, user_pos = 0;
X  	extern char *optarg;
X  	
X  	if (progname = rindex(*argv, '/'))
X
X--- 155,161 -----
X  {
X  	int   flag, i;
X  	int   printit = 0, toolrunning = 1, user_pos = 0;
X+ 	int   printit_dst = 0;
X  	extern char *optarg;
X  	
X  	if (progname = rindex(*argv, '/'))
X***************
X*** 171,177
X  	working_msg = 1;
X  
X  	/*
X! 	 * Check for -p or -m option, which means we don't want
X  	 * to create the tool. Also check for -Wp so we can supply
X  	 * a resonable default if the user doesn't supply one.
X  	 */
X
X--- 172,178 -----
X  	working_msg = 1;
X  
X  	/*
X! 	 * Check for -p, -P or -m option, which means we don't want
X  	 * to create the tool. Also check for -Wp so we can supply
X  	 * a resonable default if the user doesn't supply one.
X  	 */
X***************
X*** 177,184
X  	 */
X  	i = argc;
X  	while (--i > 0) {
X! 		if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "-m")
X! 		    || !strcmp(argv[i], "-P"))
X  			toolrunning = 0;
X  		if (!strcmp(argv[i], "-Wp"))
X  			user_pos = 1;
X
X--- 178,194 -----
X  	 */
X  	i = argc;
X  	while (--i > 0) {
X! 		if (!strncmp(argv[i], "-p", 2) || !strcmp(argv[i], "-m")
X! 		    || !strncmp(argv[i], "-P", 2)) {
X! 			/* standard getopt doesn't allow optional
X! 			 * arguments, so we do a check here for
X! 			 * obsolete usage of the -p option
X! 			 */
X! 			if ((argv[i][1] == 'p' || argv[i][1] == 'P') &&
X! 				argv[i][2] == '\0') {
X! 				fprintf(stderr, "calentool: -p/-P requires a 'd', 'w' or 'm' argument\n");
X! 				exit(1);
X! 			}
X  			toolrunning = 0;
X  		} else if (!strcmp(argv[i], "-Wp"))
X  			user_pos = 1;
X***************
X*** 180,186
X  		if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "-m")
X  		    || !strcmp(argv[i], "-P"))
X  			toolrunning = 0;
X! 		if (!strcmp(argv[i], "-Wp"))
X  			user_pos = 1;
X  	}
X  	if (toolrunning) {
X
X--- 190,196 -----
X  				exit(1);
X  			}
X  			toolrunning = 0;
X! 		} else if (!strcmp(argv[i], "-Wp"))
X  			user_pos = 1;
X  	}
X  	if (toolrunning) {
X***************
X*** 195,201
X  				0);
X  	}
X  
X! 	while ((flag = getopt(argc, argv, "57bd:f:im:opPrtu:zH:h:w")) != EOF)
X  		switch (flag) {   
X  		    case 'f':	/* use this file */
X  			otherfile = 1;
X
X--- 205,211 -----
X  				0);
X  	}
X  
X! 	while ((flag = getopt(argc, argv, "57bd:f:im:op:P:rtu:zH:h:w")) != EOF)
X  		switch (flag) {   
X  		    case 'f':	/* use this file */
X  			otherfile = 1;
X***************
X*** 212,218
X  			
X  		    case 'p':	/* print and exit */
X  			read_only = 1;
X! 			printit = 1;
X  			break;
X  
X  		    case 'P':	/* print and exit (ignore some notes) */
X
X--- 222,246 -----
X  			
X  		    case 'p':	/* print and exit */
X  			read_only = 1;
X! 			switch (*optarg) {
X! 				case 'd':
X! 				case 'D':
X! 					printit = PRI_DAY;
X! 					break;
X! 				case 'w':
X! 				case 'W':
X! 					printit = PRI_WEEK;
X! 					break;
X! 				case 'm':
X! 				case 'M':
X! 					printit = PRI_MONTH;
X! 					break;
X! 				default:
X! 					fprintf(stderr, "calentool: unknown print option.", NON_FATAL);
X! 					break;
X! 			}
X! 			if (!printit_dst)
X! 				printit_dst = DST_STDOUT;
X  			break;
X  
X  		    case 'P':	/* print and exit (ignore some notes) */
X***************
X*** 217,223
X  
X  		    case 'P':	/* print and exit (ignore some notes) */
X  			read_only = 1;
X! 			printit = 3;
X  			break;
X  
X  		    case 'm':	/* mail today's appts and exit */
X
X--- 245,269 -----
X  
X  		    case 'P':	/* print and exit (ignore some notes) */
X  			read_only = 1;
X! 			switch (*optarg) {
X! 				case 'd':
X! 				case 'D':
X! 					printit = PRI_DAY_XNOTES;
X! 					break;
X! 				case 'w':
X! 				case 'W':
X! 					printit = PRI_WEEK_XNOTES;
X! 					break;
X! 				case 'm':
X! 				case 'M':
X! 					printit = PRI_MONTH_XNOTES;
X! 					break;
X! 				default:
X! 					fprintf(stderr, "calentool: unknown print option.", NON_FATAL);
X! 					break;
X! 			}
X! 			if (!printit_dst)
X! 				printit_dst = DST_STDOUT;
X  			break;
X  
X  		    case 'm':	/* mail today's appts and exit */
X***************
X*** 222,228
X  
X  		    case 'm':	/* mail today's appts and exit */
X  			read_only = 1;
X! 			printit = 2;
X  			mailto = optarg;
X  			break;
X  
X
X--- 268,274 -----
X  
X  		    case 'm':	/* mail today's appts and exit */
X  			read_only = 1;
X! 			printit_dst = DST_MAIL;
X  			mailto = optarg;
X  			break;
X  
X***************
X*** 292,298
X  					holiday_s = 1;
X  					break;
X  				default:
X! 					fprintf(stderr, "unknown holiday option (must be one of \"Aacijs\")");
X  					break;
X  			}
X  			break;
X
X--- 338,344 -----
X  					holiday_s = 1;
X  					break;
X  				default:
X! 					fprintf(stderr, "calentool: unknown holiday option (must be one of \"Aacijs\")");
X  					break;
X  			}
X  			break;
X***************
X*** 326,332
X  					holiday_s = 2;
X  					break;
X  				default:
X! 					fprintf(stderr, "unknown holiday option (must be one of \"Aacijs\")");
X  					break;
X  			}
X  			break;
X
X--- 372,378 -----
X  					holiday_s = 2;
X  					break;
X  				default:
X! 					fprintf(stderr, "calentool: unknown holiday option (must be one of \"Aacijs\")");
X  					break;
X  			}
X  			break;
X***************
X*** 333,339
X  #else
X  		    case 'h':
X  		    case 'H':
X! 			    fprintf(stderr, "-h and -H options not available\n");
X  			    break;
X  #endif
X  		    case '?':
X
X--- 379,385 -----
X  #else
X  		    case 'h':
X  		    case 'H':
X! 			    fprintf(stderr, "calentool: -h and -H options not available\n");
X  			    break;
X  #endif
X  		    case '?':
X***************
X*** 341,348
X  			fprintf(stderr, "usage: %s [options...]\nwhere <options> are:\n", progname);
X  			fprintf(stderr, " -f <appointment_file>\n");
X  			fprintf(stderr, " -r		// readonly\n");
X! 			fprintf(stderr, " -p		// print selected days appts and exit\n");
X! 			fprintf(stderr, " -P		// like -p, only don't print marked notes\n");
X  			fprintf(stderr, " -m <user>	// mail selected days appts to <user>\n");
X  			fprintf(stderr, " [-5|-7]	// 5-day or 7-day week display\n");
X  			fprintf(stderr, " -d <date>	// display appts for <date>\n");
X
X--- 387,394 -----
X  			fprintf(stderr, "usage: %s [options...]\nwhere <options> are:\n", progname);
X  			fprintf(stderr, " -f <appointment_file>\n");
X  			fprintf(stderr, " -r		// readonly\n");
X! 			fprintf(stderr, " -p <dwm>	// print selected day [d], week [w] or month [m] appts and exit\n");
X! 			fprintf(stderr, " -P <dwm>	// like -p, only don't print marked notes\n");
X  			fprintf(stderr, " -m <user>	// mail selected days appts to <user>\n");
X  			fprintf(stderr, " [-5|-7]	// 5-day or 7-day week display\n");
X  			fprintf(stderr, " -d <date>	// display appts for <date>\n");
X***************
X*** 382,388
X  	get_printer();
X  	
X  	if (printit) {
X! 		print_apts(printit);
X  		exit(0);
X  	}
X  
X
X--- 428,434 -----
X  	get_printer();
X  	
X  	if (printit) {
X! 		print_apts(printit, printit_dst);
X  		exit(0);
X  	}
X  
X***************
X*** 630,636
X  			close_day();
X  		current = today;
X  		err2console(TRUE);
X! 		get_day_appts();
X  		err2console(FALSE);
X  		day_is_open = TRUE;
X  		if (!new_day) {
X
X--- 676,682 -----
X  			close_day();
X  		current = today;
X  		err2console(TRUE);
X! 		(void)get_day_appts();
X  		err2console(FALSE);
X  		day_is_open = TRUE;
X  		if (!new_day) {
X***************
X*** 769,775
X  				close_day();
X  			current = Save;
X  			err2console(TRUE);
X! 			get_day_appts();
X  			err2console(FALSE);
X  			day_is_open = TRUE;
X  		}
X
X--- 815,821 -----
X  				close_day();
X  			current = Save;
X  			err2console(TRUE);
X! 			(void)get_day_appts();
X  			err2console(FALSE);
X  			day_is_open = TRUE;
X  		}
X*** /tmp/,RCSt1a05528	Wed Jul 19 20:45:42 1989
X--- ct.h	Wed Jul 19 20:26:54 1989
X***************
X*** 1,5
X  /*
X!  * $Header: ct.h,v 2.1 89/05/09 14:25:13 billr Exp $
X   */
X  /*
X   * ct.h - header file for calentool
X
X--- 1,5 -----
X  /*
X!  * $Header: ct.h,v 2.2 89/07/19 20:26:27 billr Exp $
X   */
X  /*
X   * ct.h - header file for calentool
X***************
X*** 24,30
X  
X  /* directory for date/event files */
X  #ifndef DATELIB_DIR
X! #	define DATELIB_DIR	"/usr/local/lib/calentool"
X  #endif
X  
X  #ifndef NOPRINTER
X
X--- 24,30 -----
X  
X  /* directory for date/event files */
X  #ifndef DATELIB_DIR
X! #	define DATELIB_DIR	"/usr/net/lib/calentool"
X  #endif
X  
X  #ifndef NOPRINTER
X***************
X*** 34,39
X  #	endif
X  
X  /*#	define RASTER_ONLY	/* define this if no Postscript printer available */
X  #endif
X  
X  /* define NR_WEEKDAYS for desired week display */
X
X--- 34,41 -----
X  #	endif
X  
X  /*#	define RASTER_ONLY	/* define this if no Postscript printer available */
X+ #ifndef PS_NOTE_FONT
X+ #       define PS_NOTE_FONT     "Helvetica-Narrow"
X  #endif
X  #endif
X  
X***************
X*** 35,40
X  
X  /*#	define RASTER_ONLY	/* define this if no Postscript printer available */
X  #endif
X  
X  /* define NR_WEEKDAYS for desired week display */
X  /* NR_WEEKDAYS		display   */
X
X--- 37,43 -----
X  #ifndef PS_NOTE_FONT
X  #       define PS_NOTE_FONT     "Helvetica-Narrow"
X  #endif
X+ #endif
X  
X  /* define NR_WEEKDAYS for desired week display */
X  /* NR_WEEKDAYS		display   */
X***************
X*** 197,202
X  #define NON_FATAL	0
X  #define FATAL		1
X  
X  #define STD_ICON	0		/* flags for icon currently displayed */
X  #define REV_ICON	1
X  #define NA_ICON		2
X
X--- 200,206 -----
X  #define NON_FATAL	0
X  #define FATAL		1
X  
X+ /* icon identifiers */
X  #define STD_ICON	0		/* flags for icon currently displayed */
X  #define REV_ICON	1
X  #define NA_ICON		2
X***************
X*** 200,205
X  #define STD_ICON	0		/* flags for icon currently displayed */
X  #define REV_ICON	1
X  #define NA_ICON		2
X  
X  /* header line in appts file implies one-based entries and 99 memo flag */
X  #define HEADER		"# CalenTool V2 - DO NOT REMOVE THIS LINE\n"
X
X--- 204,220 -----
X  #define STD_ICON	0		/* flags for icon currently displayed */
X  #define REV_ICON	1
X  #define NA_ICON		2
X+ 
X+ /* arguments to print_apts() */
X+ #define PRI_DAY			1
X+ #define PRI_WEEK		2
X+ #define PRI_MONTH		3
X+ #define PRI_XNOTES		4
X+ #define PRI_DAY_XNOTES		(PRI_DAY|PRI_XNOTES)
X+ #define PRI_WEEK_XNOTES		(PRI_WEEK|PRI_XNOTES)
X+ #define PRI_MONTH_XNOTES 	(PRI_MONTH|PRI_XNOTES)
X+ #define DST_STDOUT		1
X+ #define DST_MAIL		2
X  
X  /* header line in appts file implies one-based entries and 99 memo flag */
X  #define HEADER		"# CalenTool V2 - DO NOT REMOVE THIS LINE\n"
X*** /tmp/,RCSt1a05533	Wed Jul 19 20:45:45 1989
X--- datelib.c	Wed Jul 19 20:35:04 1989
X***************
X*** 1,5
X  /*
X!  * $Header: datelib.c,v 2.1 89/05/09 14:18:52 billr Exp $
X   *
X   * datelib.c - Calendar (date) computation library
X   *
X
X--- 1,5 -----
X  /*
X!  * $Header: datelib.c,v 2.2 89/07/19 20:34:23 billr Exp $
X   *
X   * datelib.c - Calendar (date) computation library
X   *
X***************
X*** 1026,1033
X   * and that it exhibits the eccentricity of always computing the day
X   * relative to March, so that April 2 appears as March 33, which is also
X   * corrected below.
X!  * This formula is probably only accurate for years up to and including
X!  * 2000 (tested); I know that it fails for 2011.
X   */
X  double
X  passover(year, jyear)
X
X--- 1026,1034 -----
X   * and that it exhibits the eccentricity of always computing the day
X   * relative to March, so that April 2 appears as March 33, which is also
X   * corrected below.
X!  *
X!  * Floating point implementation by R.P.C. Rodgers; integer implementation
X!  * (for faster calculation) by Amos Shapir (amos@nsc.com).
X   */
X  double
X  passover(year, jyear)
X***************
X*** 1033,1039
X  passover(year, jyear)
X  	int	*jyear, year;
X  {
X! 	double	etmp, p_day;
X  	int	atmp, btmp, ctmp, day_of_week, dtmp, ftmp, gtmp;
X  	int	p_month;
X  
X
X--- 1034,1040 -----
X  passover(year, jyear)
X  	int	*jyear, year;
X  {
X! 	int	etmp, p_day;
X  	int	atmp, btmp, ctmp, day_of_week, dtmp, ftmp, gtmp;
X  	int	p_month;
X  
X***************
X*** 1041,1050
X  	*jyear = atmp;
X  	btmp = (12 * atmp + 17) % 19;
X  	ctmp = atmp % 4;
X! 	etmp = (1.55424180 * btmp) - (0.003177794 * atmp)
X! 		+ (ctmp / 4) + 32.04409316;
X! 	dtmp = etmp;
X! 	etmp = etmp - dtmp;
X  		/* day_of_week is not to be confused with the
X  		 value returned by the day_of_week routine; here, Sunday = 1 */
X  	day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
X
X--- 1042,1051 -----
X  	*jyear = atmp;
X  	btmp = (12 * atmp + 17) % 19;
X  	ctmp = atmp % 4;
X! 	etmp = (765433 * btmp) - (1565 * atmp)
X! 		+ (ctmp * 123120) + 15781075;
X! 	dtmp = etmp / 492480;
X! 	etmp %= 492480;
X  		/* day_of_week is not to be confused with the
X  		 value returned by the day_of_week routine; here, Sunday = 1 */
X  	day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
X***************
X*** 1048,1057
X  		/* day_of_week is not to be confused with the
X  		 value returned by the day_of_week routine; here, Sunday = 1 */
X  	day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
X! 	if (day_of_week == 0 && btmp > 11 && etmp >= 0.89772377)
X! 		p_day = dtmp + 1.0;
X! 	else if (day_of_week == 1 && btmp > 6 && etmp >= 0.63287037)
X! 		p_day = dtmp + 2.0;
X  	else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
X  		p_day = dtmp + 1.0;
X  	else {
X
X--- 1049,1058 -----
X  		/* day_of_week is not to be confused with the
X  		 value returned by the day_of_week routine; here, Sunday = 1 */
X  	day_of_week = ((3 * atmp) + (5 * ctmp) + dtmp + 5) % 7;
X! 	if (day_of_week == 0 && btmp > 11 && etmp >= 311676)
X! 		p_day = dtmp + 1;
X! 	else if (day_of_week == 1 && btmp > 6 && etmp >= 311676)
X! 		p_day = dtmp + 2;
X  	else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
X  		p_day = dtmp + 1;
X  	else {
X***************
X*** 1053,1059
X  	else if (day_of_week == 1 && btmp > 6 && etmp >= 0.63287037)
X  		p_day = dtmp + 2.0;
X  	else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
X! 		p_day = dtmp + 1.0;
X  	else {
X  		p_day = dtmp;
X  	}
X
X--- 1054,1060 -----
X  	else if (day_of_week == 1 && btmp > 6 && etmp >= 311676)
X  		p_day = dtmp + 2;
X  	else if (day_of_week == 2 || day_of_week == 4 || day_of_week ==6)
X! 		p_day = dtmp + 1;
X  	else {
X  		p_day = dtmp;
X  	}
X*** /tmp/,RCSt1a06079	Tue Sep 19 06:02:26 1989
X--- devent.c	Tue Sep 19 05:59:20 1989
X***************
X*** 1,5
X  /*
X!  * $Header: devent.c,v 2.1 89/05/09 14:18:59 billr Exp $
X   */
X  /*
X   * devent.c
X
X--- 1,5 -----
X  /*
X!  * $Header: devent.c,v 2.5 89/09/19 05:58:58 billr Exp $
X   */
X  /*
X   * devent.c
X***************
X*** 68,74
X  	event = canvas_window_event(canvas, event);
X          x = event_x(event);
X          y = event_y(event);
X- 	/*fix_event(canvas, event);	/* check for LOC_RGNENTER */
X  	if (event_id(event) == LOC_RGNEXIT && old_slot >= 0) {
X  		/* erase text cursor */
X  		text_cursor(old_slot);
X
X--- 68,73 -----
X  	event = canvas_window_event(canvas, event);
X          x = event_x(event);
X          y = event_y(event);
X  	if (event_id(event) == LOC_RGNEXIT && old_slot >= 0) {
X  		/* erase text cursor */
X  		text_cursor(old_slot);
X***************
X*** 202,208
X  			}
X  		}
X  		expecting = 0;
X!         } else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
X  		/* Process a MB click. */
X  		if (box_index >= n_tslots)
X  			/* don't flow into notes section */
X
X--- 201,207 -----
X  			}
X  		}
X  		expecting = 0;
X! 	} else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
X  		/* Process a MB click. */
X  		if (event_is_down(event)) {
X  			/* try to start dragging from here */
X***************
X*** 204,212
X  		expecting = 0;
X          } else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
X  		/* Process a MB click. */
X- 		if (box_index >= n_tslots)
X- 			/* don't flow into notes section */
X- 			box_index = n_tslots - 1;
X  		if (event_is_down(event)) {
X  			/* try to start dragging from here */
X  			if (slots[box_index].active != ACTIVE) {
X
X--- 203,208 -----
X  		expecting = 0;
X  	} else if (found_flag == FOUND_SLOT && event_id(event) == MS_MIDDLE) {
X  		/* Process a MB click. */
X  		if (event_is_down(event)) {
X  			/* try to start dragging from here */
X  			if (slots[box_index].active != ACTIVE || box_index >= n_tslots) {
X***************
X*** 209,215
X  			box_index = n_tslots - 1;
X  		if (event_is_down(event)) {
X  			/* try to start dragging from here */
X! 			if (slots[box_index].active != ACTIVE) {
X  				start_arrow_box = -1;
X  				return(0);
X  			}
X
X--- 205,212 -----
X  		/* Process a MB click. */
X  		if (event_is_down(event)) {
X  			/* try to start dragging from here */
X! 			if (slots[box_index].active != ACTIVE || box_index >= n_tslots) {
X! 				/* not allowed in notes slots, either */
X  				start_arrow_box = -1;
X  				return(0);
X  			}
X***************
X*** 223,232
X  			}
X  			prev_box = start_arrow_box = box_index;
X  		} else {
X! 			/* end of dragging => end of arrow */
X! 			if (box_index < start_arrow_box || start_arrow_box == -1) {
X! 				start_arrow_box = -1;
X! 				return(0);
X  			}
X  			if (box_index > start_arrow_box) {
X  				i = start_arrow_box;
X
X--- 220,233 -----
X  			}
X  			prev_box = start_arrow_box = box_index;
X  		} else {
X! 			if (box_index >= n_tslots) {
X! 				/* mouse currently in notes section */
X! 				if (start_arrow_box == -1)
X! 					/* started in notes section, too */
X! 					return(0);
X! 				else
X! 					/* truncate at start of notes section */
X! 					box_index = n_tslots - 1;
X  			}
X  			/* end of dragging => end of arrow */
X  			if (box_index > start_arrow_box && start_arrow_box != -1) {
X***************
X*** 228,234
X  				start_arrow_box = -1;
X  				return(0);
X  			}
X! 			if (box_index > start_arrow_box) {
X  				i = start_arrow_box;
X  				slots[i].cur_appt->arrows = box_index - start_arrow_box;
X  				while (++i < box_index) {
X
X--- 229,236 -----
X  					/* truncate at start of notes section */
X  					box_index = n_tslots - 1;
X  			}
X! 			/* end of dragging => end of arrow */
X! 			if (box_index > start_arrow_box && start_arrow_box != -1) {
X  				i = start_arrow_box;
X  				slots[i].cur_appt->arrows = box_index - start_arrow_box;
X  				while (++i < box_index) {
X***************
X*** 337,343
X  				}
X  		}
X  		i = (int) menu_show(day_sel_menu, canvas, event, 0);
X! 		if (i > 0)
X  			switch (i) {
X  				case MDELETE:
X  					delete_appt(box_index, canvas);
X
X--- 339,345 -----
X  				}
X  		}
X  		i = (int) menu_show(day_sel_menu, canvas, event, 0);
X! 		if (i > 0) {
X  			switch (i) {
X  				case MDELETE:
X  					delete_appt(box_index, canvas);
X***************
X*** 358,366
X  					undelete_appt(box_index);
X  					break;
X  			}
X! 		if (new_entry) {
X! 			close_day();
X! 			draw_day();	/* redraw display */
X  		}
X  	} else
X  		window_default_event_proc(canvas, event, 0);
X
X--- 360,369 -----
X  					undelete_appt(box_index);
X  					break;
X  			}
X! 			if (new_entry) {
X! 				close_day();
X! 				draw_day();	/* redraw display */
X! 			}
X  		}
X  	} else
X  		window_default_event_proc(canvas, event, 0);
X***************
X*** 393,402
X  	int	strl, x;
X  
X  	strl = strlen(&slots[slotno].cur_appt->str[slots[slotno].cur_appt->sindex]);
X! 	if (strl > (day_message_size-1)) {
X! 		pw_write(main_pixwin, slots[slotno].slot_pos.right, slots[slotno].slot_pos.bottom-4,
X! 		  8, 8, PIX_SRC^PIX_DST, &tri_right_pr, 0, 0);
X! 	} else {
X  		x = slots[slotno].slot_pos.left + strl * font->pf_defaultsize.x;
X  		pw_write(main_pixwin, x, slots[slotno].slot_pos.bottom-4,
X  		  16, 16, PIX_SRC^PIX_DST, &tri_up_pr, 0, 0);
X
X--- 396,402 -----
X  	int	strl, x;
X  
X  	strl = strlen(&slots[slotno].cur_appt->str[slots[slotno].cur_appt->sindex]);
X! 	if (strl <= (day_message_size-1)) {
X  		x = slots[slotno].slot_pos.left + strl * font->pf_defaultsize.x;
X  		pw_write(main_pixwin, x, slots[slotno].slot_pos.bottom-4,
X  		  16, 16, PIX_SRC^PIX_DST, &tri_up_pr, 0, 0);
X***************
X*** 829,836
X  	/* run through the list to see if there are any deleted */
X  	for (aptr=slots[bi].first; aptr; aptr=aptr->next)
X  		if (aptr->flags & DELETED) {
X! 			found = 1;
X! 			break;
X  		}
X  	/* now see if the current one matches */
X  	if (found && !strcmp(aptr->str, slots[bi].cur_appt->str))
X
X--- 829,837 -----
X  	/* run through the list to see if there are any deleted */
X  	for (aptr=slots[bi].first; aptr; aptr=aptr->next)
X  		if (aptr->flags & DELETED) {
X! 			/* now see if the current one matches */
X! 			if (!strcmp(aptr->str, slots[bi].cur_appt->str))
X! 				return(1);
X  		}
X  	
X  	return(0);
X***************
X*** 832,840
X  			found = 1;
X  			break;
X  		}
X- 	/* now see if the current one matches */
X- 	if (found && !strcmp(aptr->str, slots[bi].cur_appt->str))
X- 		return(1);
X  	
X  	return(0);
X  }
X
X--- 833,838 -----
X  			if (!strcmp(aptr->str, slots[bi].cur_appt->str))
X  				return(1);
X  		}
X  	
X  	return(0);
X  }
X*** /tmp/,RCSt1a05543	Wed Jul 19 20:45:55 1989
X--- dpaint.c	Wed Jul 19 20:27:58 1989
X***************
X*** 1,5
X  /*
X!  * $Header: dpaint.c,v 2.2 89/05/10 10:06:20 billr Exp $
X   */
X  /*
X   * dpaint.c
X
X--- 1,5 -----
X  /*
X!  * $Header: dpaint.c,v 2.3 89/07/19 20:27:45 billr Exp $
X   */
X  /*
X   * dpaint.c
X***************
X*** 77,82
X   */
X  draw_day1()
X  {
X  	lock_cursors();
X  	fix_current_day();
X  	working(TRUE);
X
X--- 77,84 -----
X   */
X  draw_day1()
X  {
X+ 	int i;
X+ 
X  	lock_cursors();
X  	fix_current_day();
X  	working(TRUE);
X***************
X*** 83,89
X  	pw_batch_on(main_pixwin);
X  	draw_day_outline();
X  	pw_batch_off(main_pixwin);
X! 	get_day_appts();
X  	working(FALSE);
X  	pw_batch_on(main_pixwin);
X  	draw_day_appts();
X
X--- 85,91 -----
X  	pw_batch_on(main_pixwin);
X  	draw_day_outline();
X  	pw_batch_off(main_pixwin);
X! 	i = get_day_appts();
X  	working(FALSE);
X  	if (i) {
X  		pw_batch_on(main_pixwin);
X***************
X*** 85,93
X  	pw_batch_off(main_pixwin);
X  	get_day_appts();
X  	working(FALSE);
X! 	pw_batch_on(main_pixwin);
X! 	draw_day_appts();
X! 	pw_batch_off(main_pixwin);
X  	day_is_open = TRUE;
X  	unlock_cursors();
X  }
X
X--- 87,97 -----
X  	pw_batch_off(main_pixwin);
X  	i = get_day_appts();
X  	working(FALSE);
X! 	if (i) {
X! 		pw_batch_on(main_pixwin);
X! 		draw_day_appts();
X! 		pw_batch_off(main_pixwin);
X! 	}
X  	day_is_open = TRUE;
X  	unlock_cursors();
X  }
X***************
X*** 172,177
X   * with all the lines from the ".appointments" file 
X   * which do not pertain to the current day.
X   */
X  get_day_appts()
X  {
X  	FILE *apts, *temp_apts;
X
X--- 176,182 -----
X   * with all the lines from the ".appointments" file 
X   * which do not pertain to the current day.
X   */
X+ int
X  get_day_appts()
X  {
X  	FILE *apts, *temp_apts;
X***************
X*** 176,182
X  {
X  	FILE *apts, *temp_apts;
X  	int slotno, n_arrows, i;
X! 	int read_stat;
X  	struct appt_entry appt;
X  	struct appt_entry *nappt, *aptr;
X  	char buf[MAX_STRLEN], *sptr;
X
X--- 181,187 -----
X  {
X  	FILE *apts, *temp_apts;
X  	int slotno, n_arrows, i;
X! 	int read_stat, some_appt = 0;
X  	struct appt_entry appt;
X  	struct appt_entry *nappt, *aptr;
X  	char buf[MAX_STRLEN], *sptr;
X***************
X*** 329,334
X          fclose(apts);             
X  	current = First;
X  	fix_current_day();
X  }
X  
X  
X
X--- 334,351 -----
X          fclose(apts);             
X  	current = First;
X  	fix_current_day();
X+ 	/* now check to see if there is anything happening this day */
X+ 	if (findex)
X+ 		some_appt = 1;
X+ 	else {
X+ 		for (i=0; i<N_SLOTS; i++) {
X+ 			if (slots[i].count > 0) {
X+ 				some_appt = 1;
X+ 				break;
X+ 			}
X+ 		}
X+ 	}
X+ 	return(some_appt);
X  }
X  
X  
X*** /tmp/,RCSt1a05550	Wed Jul 19 20:45:59 1989
X--- init.c	Wed Jul 19 20:28:11 1989
X***************
X*** 1,5
X  /*
X!  * $Header: init.c,v 2.1 89/05/09 14:23:19 billr Exp $
X   */
X  /*
X   * init.c
X
X--- 1,5 -----
X  /*
X!  * $Header: init.c,v 2.2 89/07/19 20:27:59 billr Exp $
X   */
X  /*
X   * init.c
X***************
X*** 35,40
X  #include <suntool/menu.h>
X  #include <sunwindow/defaults.h>
X  #include <sys/file.h>
X  #include <pwd.h>
X  #include "ct.h"
X  
X
X--- 35,41 -----
X  #include <suntool/menu.h>
X  #include <sunwindow/defaults.h>
X  #include <sys/file.h>
X+ #include <sys/stat.h>
X  #include <pwd.h>
X  #include "ct.h"
X  
X***************
X*** 321,327
X  	char *strcpy(), *rindex(), *getenv();
X  	char *slash, *default_ptr, *envptr;
X  	char buff[80];
X! 	int to_slash, getpid(), fd, errflag;
X  	struct passwd *pw;
X  	FILE *appts;
X  
X
X--- 322,328 -----
X  	char *strcpy(), *rindex(), *getenv();
X  	char *slash, *default_ptr, *envptr;
X  	char buff[80];
X! 	int to_slash, getpid(), fd, errflag, numask;
X  	struct passwd *pw;
X  	struct stat statbuf;
X  	FILE *appts;
X***************
X*** 323,328
X  	char buff[80];
X  	int to_slash, getpid(), fd, errflag;
X  	struct passwd *pw;
X  	FILE *appts;
X  
X  	/* the tmp file */
X
X--- 324,330 -----
X  	char buff[80];
X  	int to_slash, getpid(), fd, errflag, numask;
X  	struct passwd *pw;
X+ 	struct stat statbuf;
X  	FILE *appts;
X  
X  	/* the tmp file */
X***************
X*** 382,388
X  			if ((int)window_loop(prompt_frame) == 0) {
X  				/* try to create the file */
X  				fprintf(stderr, "creating file\n");
X! 				if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0664)) <= 0) {
X  					perror(apts_pathname);
X  					errflag = 1;
X  					fprintf(stderr, "..error\n");
X
X--- 384,390 -----
X  			if ((int)window_loop(prompt_frame) == 0) {
X  				/* try to create the file */
X  				fprintf(stderr, "creating file\n");
X! 				if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0644)) <= 0) {
X  					perror(apts_pathname);
X  					errflag = 1;
X  					fprintf(stderr, "..error\n");
X***************
X*** 406,412
X  			fprintf(stderr, "Cannot access calendar file %s - create? ", apts_pathname);
X  			fgets(buff, 80, stdin);
X  			if (buff[0] == 'y' || buff[0] == 'Y') {
X! 				if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0664)) <= 0) {
X  					perror(apts_pathname);
X  					return(1);
X  				} else {
X
X--- 408,414 -----
X  			fprintf(stderr, "Cannot access calendar file %s - create? ", apts_pathname);
X  			fgets(buff, 80, stdin);
X  			if (buff[0] == 'y' || buff[0] == 'Y') {
X! 				if ((fd=open(apts_pathname, O_CREAT|O_RDWR, 0644)) <= 0) {
X  					perror(apts_pathname);
X  					return(1);
X  				} else {
X***************
X*** 424,429
X  	}
X  	if (access(apts_pathname, W_OK) == -1)
X  		read_only = 1;
X  
X  	/* update base frame label, if the tool is running */
X  	if (frame) {
X
X--- 426,439 -----
X  	}
X  	if (access(apts_pathname, W_OK) == -1)
X  		read_only = 1;
X+ 	/*
X+ 	 * set permissions on tmp file based on .appointments file
X+ 	 * with the expception that we need at least write permission
X+ 	 * for the owner.
X+ 	 */
X+ 	(void)stat(apts_pathname, &statbuf);
X+ 	numask = ~statbuf.st_mode & 0077;  /* yes, this is octal 77 */
X+ 	(void)umask(numask);
X  
X  	/* update base frame label, if the tool is running */
X  	if (frame) {
X*** /tmp/,RCSt1a05560	Wed Jul 19 20:46:07 1989
X--- mpaint.c	Wed Jul 19 20:29:26 1989
X***************
X*** 1,5
X  /*
X!  * $Header: mpaint.c,v 2.1 89/05/09 14:19:29 billr Exp $
X   */
X  /*
X   * mpaint.c
X
X--- 1,5 -----
X  /*
X!  * $Header: mpaint.c,v 2.2 89/07/19 20:29:01 billr Exp $
X   */
X  /*
X   * mpaint.c
X***************
X*** 41,48
X  
X  draw_month()
X  {
X! 	int start_dow, i, x, y, n_days, n_weeks;
X! 	int histo[7], days_in_week;
X  	int arrow_index, last_top, index;
X  	char c[4], title[20], *cp;
X  	int left_border, right_border, top_border, bottom_border;
X
X--- 41,48 -----
X  
X  draw_month()
X  {
X! 	int start_dow, i, x, y, n_days;
X! 	int days_in_week;
X  	int arrow_index, last_top, index;
X  	char c[4], title[20], *cp;
X  	int left_border, right_border, top_border, bottom_border;
X***************
X*** 66,80
X  	working(TRUE);
X  	start_dow = current.tm_wday;
X  	n_days = monthlength(current.tm_mon);
X! 	for (i=0; i<7; i++)	/* Calculate # of full/partial weeks. */
X! 		histo[i] = 0;
X! 	for (i=0; i<n_days; i++)
X! 		histo[(start_dow + i) % 7] += 1;
X! 	n_weeks = 0;
X! 	for (i=0; i<7; i++)
X! 		if (histo[i] > n_weeks)
X! 			n_weeks = histo[i];
X! 
X  	pw_batch_on(main_pixwin);
X          rect = (Rect *) window_get(canvas, WIN_RECT);
X  	/* Erase the window */
X
X--- 66,72 -----
X  	working(TRUE);
X  	start_dow = current.tm_wday;
X  	n_days = monthlength(current.tm_mon);
X! 	
X  	pw_batch_on(main_pixwin);
X          rect = (Rect *) window_get(canvas, WIN_RECT);
X  	/* Erase the window */
X***************
X*** 80,86
X  	/* Erase the window */
X          pw_writebackground(main_pixwin,0,0,rect->r_width,rect->r_height,PIX_CLR);
X          left_border = (rect->r_width - 7*64)/2 + 32;
X!         top_border = (rect->r_height - n_weeks*64) / 2;
X          right_border = left_border + 7*64;
X           
X  	sprintf(title, "%s, %d",
X
X--- 72,78 -----
X  	/* Erase the window */
X          pw_writebackground(main_pixwin,0,0,rect->r_width,rect->r_height,PIX_CLR);
X          left_border = (rect->r_width - 7*64)/2 + 32;
X!         top_border = (rect->r_height - 5*64) / 2;
X          right_border = left_border + 7*64;
X           
X  	sprintf(title, "%s, %d",
X*** /tmp/,RCSt1a05567	Wed Jul 19 20:46:09 1989
X--- mt2ct.c	Wed Jul 19 20:29:42 1989
X***************
X*** 1,5
X  /*
X!  * $Header: mt2ct.c,v 2.1 89/05/09 14:19:31 billr Exp $
X   */
X  /*
X   * mt2ct - convert monthtool reminder files to calentool style files
X
X--- 1,5 -----
X  /*
X!  * $Header: mt2ct.c,v 2.2 89/07/19 20:29:27 billr Exp $
X   */
X  /*
X   * mt2ct - convert monthtool reminder files to calentool style files
X***************
X*** 109,117
X  			aptr->flags |= ALL_YEARS;
X  		if (aptr->month == 0)
X  			aptr->flags |= ALL_MONTHS;
X! 		if (aptr->day == 0)
X! 			aptr->flags |= ALL_DAYS;
X! 		if (aptr->month == 99) {
X  			/* weekly reminder */
X  			aptr->flags |= ALL_MONTHS;
X  			aptr->flags |= Setday(aptr->day-1);
X
X--- 109,115 -----
X  			aptr->flags |= ALL_YEARS;
X  		if (aptr->month == 0)
X  			aptr->flags |= ALL_MONTHS;
X! 		else if (aptr->month == 99) {
X  			/* weekly reminder */
X  			aptr->flags |= ALL_MONTHS;
X  			aptr->flags |= Setday(aptr->day-1);
X***************
X*** 115,121
X  			/* weekly reminder */
X  			aptr->flags |= ALL_MONTHS;
X  			aptr->flags |= Setday(aptr->day-1);
X! 		}
X  		aptr->next = (struct appt_entry *)malloc(sizeof(struct appt_entry));
X  		if (aptr->next == NULL) {
X  			fprintf(stderr, "out of memory\n");
X
X--- 113,122 -----
X  			/* weekly reminder */
X  			aptr->flags |= ALL_MONTHS;
X  			aptr->flags |= Setday(aptr->day-1);
X! 		} else
X! 			--aptr->month;
X! 		if (aptr->day == 0)
X! 			aptr->flags |= ALL_DAYS;
X  		aptr->next = (struct appt_entry *)malloc(sizeof(struct appt_entry));
X  		if (aptr->next == NULL) {
X  			fprintf(stderr, "out of memory\n");
X*** /tmp/,RCSt1a06103	Tue Sep 19 06:06:51 1989
X--- calentool.1	Tue Sep 19 06:06:30 1989
X***************
X*** 1,4
X! .\" $Header: calentool.1,v 2.2 89/05/16 16:38:22 billr Exp $
X  .\"
X  .TH CALENTOOL 1 "15 May 1989"
X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
X
X--- 1,4 -----
X! .\" $Header: calentool.1,v 2.4 89/09/19 06:06:11 billr Exp $
X  .\"
X  .TH CALENTOOL 1 "14 September 1989"
X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
X***************
X*** 1,6
X  .\" $Header: calentool.1,v 2.2 89/05/16 16:38:22 billr Exp $
X  .\"
X! .TH CALENTOOL 1 "15 May 1989"
X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
X  .SH NAME
X  calentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
X
X--- 1,6 -----
X  .\" $Header: calentool.1,v 2.4 89/09/19 06:06:11 billr Exp $
X  .\"
X! .TH CALENTOOL 1 "14 September 1989"
X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
X  .SH NAME
X  calentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
X***************
X*** 7,13
X  .SH SYNOPSIS
X  .B calentool
X  [
X! .B -b
X  ]
X  [
X  .B -d
X
X--- 7,13 -----
X  .SH SYNOPSIS
X  .B calentool
X  [
X! .B \-b
X  ]
X  [
X  .B \-d
X***************
X*** 10,16
X  .B -b
X  ]
X  [
X! .B -d
X  .I date
X  ]
X  [
X
X--- 10,16 -----
X  .B \-b
X  ]
X  [
X! .B \-d
X  .I date
X  ]
X  [
X***************
X*** 14,20
X  .I date
X  ]
X  [
X! .B -f
X  .I apptsfile
X  ]
X  [
X
X--- 14,20 -----
X  .I date
X  ]
X  [
X! .B \-f
X  .I apptsfile
X  ]
X  [
X***************
X*** 18,24
X  .I apptsfile
X  ]
X  [
X! .B -h
X  [
X  .I A a c i l j s
X  ]]
X
X--- 18,24 -----
X  .I apptsfile
X  ]
X  [
X! .B \-h
X  [
X  .I A a c i l j s
X  ]]
X***************
X*** 23,29
X  .I A a c i l j s
X  ]]
X  [
X! .B -H
X  [
X  .I A a c i l j s
X  ]]
X
X--- 23,29 -----
X  .I A a c i l j s
X  ]]
X  [
X! .B \-H
X  [
X  .I A a c i l j s
X  ]]
X***************
X*** 28,34
X  .I A a c i l j s
X  ]]
X  [
X! .B -i
X  ]
X  [
X  .B -m
X
X--- 28,34 -----
X  .I A a c i l j s
X  ]]
X  [
X! .B \-i
X  ]
X  [
X  .B \-m
X***************
X*** 31,37
X  .B -i
X  ]
X  [
X! .B -m
X  .I userid
X  ]
X  [
X
X--- 31,37 -----
X  .B \-i
X  ]
X  [
X! .B \-m
X  .I userid
X  ]
X  [
X***************
X*** 35,41
X  .I userid
X  ]
X  [
X! .B -o
X  ]
X  [
X  .B -p
X
X--- 35,41 -----
X  .I userid
X  ]
X  [
X! .B \-o
X  ]
X  [
X  .B \-p
X***************
X*** 38,45
X  .B -o
X  ]
X  [
X! .B -p
X! ]
X  [
X  .B -P
X  ]
X
X--- 38,44 -----
X  .B \-o
X  ]
X  [
X! .B \-p
X  [
X  .I d w m
X  ]]
X***************
X*** 41,48
X  .B -p
X  ]
X  [
X! .B -P
X! ]
X  [
X  .B -r
X  ]
X
X--- 40,47 -----
X  [
X  .B \-p
X  [
X! .I d w m
X! ]]
X  [
X  .B \-P
X  [
X***************
X*** 44,50
X  .B -P
X  ]
X  [
X! .B -r
X  ]
X  [
X  .B -t
X
X--- 43,54 -----
X  .I d w m
X  ]]
X  [
X! .B \-P
X! [
X! .I d w m
X! ]]
X! [
X! .B \-r
X  ]
X  [
X  .B \-t
X***************
X*** 47,53
X  .B -r
X  ]
X  [
X! .B -t
X  ]
X  [
X  .B -u
X
X--- 51,57 -----
X  .B \-r
X  ]
X  [
X! .B \-t
X  ]
X  [
X  .B \-u
X***************
X*** 50,56
X  .B -t
X  ]
X  [
X! .B -u
X  .I int
X  ]
X  [
X
X--- 54,60 -----
X  .B \-t
X  ]
X  [
X! .B \-u
X  .I int
X  ]
X  [
X***************
X*** 54,60
X  .I int
X  ]
X  [
X! .B -w
X  ]
X  [
X  .B -z
X
X--- 58,64 -----
X  .I int
X  ]
X  [
X! .B \-w
X  ]
X  [
X  .B \-z
X***************
X*** 57,63
X  .B -w
X  ]
X  [
X! .B -z
X  ]
X  [
X  .B -5
X
X--- 61,67 -----
X  .B \-w
X  ]
X  [
X! .B \-z
X  ]
X  [
X  .B \-5
X***************
X*** 60,66
X  .B -z
X  ]
X  [
X! .B -5
X  ]
X  [
X  .B -7
X
X--- 64,70 -----
X  .B \-z
X  ]
X  [
X! .B \-5
X  ]
X  [
X  .B \-7
X***************
X*** 63,69
X  .B -5
X  ]
X  [
X! .B -7
X  ]
X  [
X  .I window options
X
X--- 67,73 -----
X  .B \-5
X  ]
X  [
X! .B \-7
X  ]
X  [
X  .I suntools options
X***************
X*** 66,72
X  .B -7
X  ]
X  [
X! .I window options
X  ]
X  .SH DESCRIPTION
X  .I Calentool
X
X--- 70,76 -----
X  .B \-7
X  ]
X  [
X! .I suntools options
X  ]
X  .SH DESCRIPTION
X  .I Calentool
X***************
X*** 120,126
X  .I suntools
X  command line options at the end of the command line.
X  .TP 15
X! .B -b
X  When an appointment is pending, a bell character (along with the appointment
X  message) is sent to the console; only one reminder is sent for each
X  appointment.  Also, place a copy of the appointment text in the file
X
X--- 124,130 -----
X  .I suntools
X  command line options at the end of the command line.
X  .TP 15
X! .B \-b
X  When an appointment is pending, a bell character (along with the appointment
X  message) is sent to the console; only one reminder is sent for each
X  appointment.  Also, place a copy of the appointment text in the file
X***************
X*** 160,166
X  described by a particular appointments file should have write permission for
X  that file.
X  .TP
X! .BI \-h char
X  Compute and display holidays which do not fall on set dates of the Gregorian
X  calendar.  Notes appear in the day and week displays, and marks appear in
X  the month and year displays.  This option is followed by a single character
X
X--- 164,170 -----
X  described by a particular appointments file should have write permission for
X  that file.
X  .TP
X! .BI \-h " char"
X  Compute and display holidays which do not fall on set dates of the Gregorian
X  calendar.  Notes appear in the day and week displays, and marks appear in
X  the month and year displays.  This option is followed by a single character
X***************
X*** 199,205
X  US Secular holidays.
X  .RE
X  .TP
X! .BI \-H char
X  Identical to the
X  .B \-h
X  option, except that computed dates are displayed only in the day and week
X
X--- 203,209 -----
X  US Secular holidays.
X  .RE
X  .TP
X! .BI \-H " char"
X  Identical to the
X  .B \-h
X  option, except that computed dates are displayed only in the day and week
X***************
X*** 212,218
X  .I yy
X  represents the last two digits of a past year).
X  .TP
X! .BI \-m \ userid
X  Send mail listing todays appointments to the user specified by
X  .I userid
X  and exit.
X
X--- 216,222 -----
X  .I yy
X  represents the last two digits of a past year).
X  .TP
X! .BI \-m " userid"
X  Send mail listing todays appointments to the user specified by
X  .I userid
X  and exit.
X***************
X*** 218,224
X  and exit.
X  This feature is useful when calentool is run from
X  .IR cron (1),
X! to send yourself mail about today's appointments.
X  (Note: this option eliminates the need for the separate program,
X  .IR calenmail (1L),
X  which was distributed with earlier releases of
X
X--- 222,229 -----
X  and exit.
X  This feature is useful when calentool is run from
X  .IR cron (1),
X! to send yourself mail about today's appointments.  No mail is
X! sent about today's appointments, if there are none.
X  (Note: this option eliminates the need for the separate program,
X  .IR calenmail (1L),
X  which was distributed with earlier releases of
X***************
X*** 232,238
X  .I yy
X  represents the last two digits of the past year).
X  .TP
X! .B -p
X  Print today's appointments and exit.  This is useful for reviewing
X  appointments from an ordinary terminal or
X  .IR shelltool (1).
X
X--- 237,243 -----
X  .I yy
X  represents the last two digits of the past year).
X  .TP
X! .BI \-p char
X  Print today's appointments and exit.  This is useful for reviewing
X  appointments from an ordinary terminal or
X  .IR shelltool "(1)."
X***************
X*** 235,241
X  .B -p
X  Print today's appointments and exit.  This is useful for reviewing
X  appointments from an ordinary terminal or
X! .IR shelltool (1).
X  .TP
X  .B -P
X  Print today's appointments and exit, ignoring notes which are not to mark
X
X--- 240,252 -----
X  .BI \-p char
X  Print today's appointments and exit.  This is useful for reviewing
X  appointments from an ordinary terminal or
X! .IR shelltool "(1)."
X! The
X! .I d, w, m
X! modifiers select a printout of the current day, week or month, respectively.
X! The day and week printouts are straight ASCII; the month printout is in
X! \*(Ps.  No printout is provide of the current days appointments, if there
X! are none.
X  .TP
X  .BI \-P char
X  Print today's appointments and exit, ignoring notes which are not to mark
X***************
X*** 237,243
X  appointments from an ordinary terminal or
X  .IR shelltool (1).
X  .TP
X! .B -P
X  Print today's appointments and exit, ignoring notes which are not to mark
X  the month or year displays.  This is useful for suppressing trivia when
X  reviewing appointments from an ordinary terminal or
X
X--- 248,254 -----
X  \*(Ps.  No printout is provide of the current days appointments, if there
X  are none.
X  .TP
X! .BI \-P char
X  Print today's appointments and exit, ignoring notes which are not to mark
X  the month or year displays.  This is useful for suppressing trivia when
X  reviewing appointments from an ordinary terminal or
X***************
X*** 241,247
X  Print today's appointments and exit, ignoring notes which are not to mark
X  the month or year displays.  This is useful for suppressing trivia when
X  reviewing appointments from an ordinary terminal or
X! .IR shelltool (1).
X  .TP
X  .B -r
X  Open the calendar tool in read-only mode.
X
X--- 252,264 -----
X  Print today's appointments and exit, ignoring notes which are not to mark
X  the month or year displays.  This is useful for suppressing trivia when
X  reviewing appointments from an ordinary terminal or
X! .IR shelltool "(1)."
X! The
X! .I d, w, m
X! modifiers select a printout of the current day, week or month, respectively.
X! The day and week printouts are straight ASCII; the month printout is in
X! \*(Ps.  No printout is provide of the current days appointments, if there
X! are none.
X  .TP
X  .B \-r
X  Open the calendar tool in read-only mode.
X***************
X*** 243,249
X  reviewing appointments from an ordinary terminal or
X  .IR shelltool (1).
X  .TP
X! .B -r
X  Open the calendar tool in read-only mode.
X  Appointments can be edited, but no changes will be saved.
X  The tool's banner strip will contain the string "[Read Only]".
X
X--- 260,266 -----
X  \*(Ps.  No printout is provide of the current days appointments, if there
X  are none.
X  .TP
X! .B \-r
X  Open the calendar tool in read-only mode.
X  Appointments can be edited, but no changes will be saved.
X  The tool's banner strip will contain the string "[Read Only]".
X***************
X*** 252,258
X  .B -f
X  option.
X  .TP
X! .B -t
X  Display the current time below the
X  .I calentool
X  icon (no further need for
X
X--- 269,275 -----
X  .B -f
X  option.
X  .TP
X! .B \-t
X  Display the current time below the
X  .I calentool
X  icon (no further need for
X***************
X*** 258,264
X  icon (no further need for
X  .IR clocktool (1)).
X  .TP
X! .BI -u int
X  Update the time at the interval of
X  .I int
X  seconds.
X
X--- 275,281 -----
X  icon (no further need for
X  .IR clocktool (1)).
X  .TP
X! .BI \-u " int"
X  Update the time at the interval of
X  .I int
X  seconds.
X***************
X*** 263,269
X  .I int
X  seconds.
X  .TP
X! .B -w
X  Don't display the "Working!" message in the control panel during
X  lengthy operations.  The cursor still changes to an hourglass.
X  .TP
X
X--- 280,286 -----
X  .I int
X  seconds.
X  .TP
X! .B \-w
X  Don't display the "Working!" message in the control panel during
X  lengthy operations.  The cursor still changes to an hourglass.
X  .TP
X***************
X*** 267,273
X  Don't display the "Working!" message in the control panel during
X  lengthy operations.  The cursor still changes to an hourglass.
X  .TP
X! .B -z
X  Convert appointments file used by earlier versions of
X  .I calentool
X  to the format used by the current version.  This option should be invoked only
X
X--- 284,290 -----
X  Don't display the "Working!" message in the control panel during
X  lengthy operations.  The cursor still changes to an hourglass.
X  .TP
X! .B \-z
X  Convert appointments file used by earlier versions of
X  .I calentool
X  to the format used by the current version.  This option should be invoked only
X***************
X*** 274,280
X  once, the first time an old format file is read by
X  .IR calentool .
X  .TP
X! .B -5
X  Display only five days (Monday through Friday) in the week display.  This is
X  useful if the installer has set the default display format to 7 days.
X  .TP
X
X--- 291,297 -----
X  once, the first time an old format file is read by
X  .IR calentool .
X  .TP
X! .B \-5
X  Display only five days (Monday through Friday) in the week display.  This is
X  useful if the installer has set the default display format to 7 days.
X  .TP
X***************
X*** 278,284
X  Display only five days (Monday through Friday) in the week display.  This is
X  useful if the installer has set the default display format to 7 days.
X  .TP
X! .B -7
X  Display all seven days in the week display.  This is useful if the installer
X  has set the default value to 5 days.  The 7-day display is wider than the 5-day
X  display, allowing longer messages to be displayed.
X
X--- 295,301 -----
X  Display only five days (Monday through Friday) in the week display.  This is
X  useful if the installer has set the default display format to 7 days.
X  .TP
X! .B \-7
X  Display all seven days in the week display.  This is useful if the installer
X  has set the default value to 5 days.  The 7-day display is wider than the 5-day
X  display, allowing longer messages to be displayed.
X***************
X*** 525,531
X  selecting
X  .BR Accept .
X  The
X! .B Save
X  button updates the current appointments file with any changes made that
X  have not yet been logged.  This is typically not an often used option.
X  .SH "FILE FORMAT"
X
X--- 542,548 -----
X  selecting
X  .BR Accept .
X  The
X! .B Update
X  button updates the current appointments file with any changes made that
X  have not yet been logged.
X  .SH "FILE FORMAT"
X***************
X*** 527,533
X  The
X  .B Save
X  button updates the current appointments file with any changes made that
X! have not yet been logged.  This is typically not an often used option.
X  .SH "FILE FORMAT"
X  Using an included file (see below) is the one instance where manual editing
X  of the
X
X--- 544,550 -----
X  The
X  .B Update
X  button updates the current appointments file with any changes made that
X! have not yet been logged.
X  .SH "FILE FORMAT"
X  Using an included file (see below) is the one instance where manual editing
X  of the
X***************
X*** 663,668
X  events
X  Historical events (major and minor)
X  .TP
X  lives
X  Biographical dates of note
X  .TP
X
X--- 680,688 -----
X  events
X  Historical events (major and minor)
X  .TP
X+ gdead
X+ Dates concerning the rock group Grateful Dead
X+ .TP
X  lives
X  Biographical dates of note
X  .TP
X***************
X*** 676,681
X  popcult
X  Special dates in Western popular culture
X  .TP
X  usa_holiday
X  Major US/Canadian holidays (holidays from work)
X  .TP
X
X--- 696,704 -----
X  popcult
X  Special dates in Western popular culture
X  .TP
X+ space
X+ Dates of note in the history of the exploration of outer space
X+ .TP
X  usa_holiday
X  Major US/Canadian holidays (holidays from work)
X  .TP
X***************
X*** 863,870
X  R. P. C. Rodgers (School of Pharmacy, University of California,
X  San Francisco, rodgers@maxwell.mmwb.ucsf.edu), performed extensive beta
X  testing, made numerous design suggestions, and contributed the holiday
X! computation library, icons, manual pages, and special dates files (which were
X! modified from earlier net postings contributed by unknown authors).
X  We thank Dr. Omar Afzal of Cornell University (Chairman of the Committee
X  for Crescent Observation) for his help in implementing the Islamic date
X  computations.
X
X--- 886,904 -----
X  R. P. C. Rodgers (School of Pharmacy, University of California,
X  San Francisco, rodgers@maxwell.mmwb.ucsf.edu), performed extensive beta
X  testing, made numerous design suggestions, and contributed the holiday
X! computation library, icons, manual pages, and special dates files.  The initial
X! set of special dates files were modified from earlier net postings contributed
X! by Rich Kulawiec (rsk@boulder.Colorado.EDU) and
X! Dick Wexelblat (...decvax!ittvax!wxlvax!rlw), assisted by the following
X! contributors known only by their network addresses:
X! (decvax!seismo!rochester!ritcv!ccieng5!ccieng6!wla),
X! (decvax!sii!mem),
X! (ittvax!bunker!dick),
X! (ittvax!decvax!bellcore!yquem!psl),
X! (ittvax!decvax!harpo!eagle!mhuxl!ihnp4!ihuxw!pector),
X! and (seismo!rochester!rocksvax!sunybcs!colonel),
X! in addition to others whose identifications have been lost (speak up!).
X! .LP
X  We thank Dr. Omar Afzal of Cornell University (Chairman of the Committee
X  for Crescent Observation) for his help in implementing the Islamic date
X  computations.
END_OF_FILE
if test 49839 -ne `wc -c <'patches04a'`; then
    echo shar: \"'patches04a'\" unpacked with wrong size!
fi
# end of 'patches04a'
fi
echo shar: End of archive 1 \(of 4\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 4 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0