From:	US2RMC::"EVERHART@gce.mv.com" 22-SEP-1995 22:06:43.31
To:	star::everhart
CC:	
Subj:	get this

From:	SMTP%"everhart@star.zko.dec.com" 21-SEP-1995 18:31:10.07
To:	EVERHART
CC:	
Subj:	Patch 1.4.4 for plan (X/Motif calendar and day planner) - alt.sources #12841

Date: Thu, 21 Sep 1995 15:51:22 -0400
Message-Id: <95092115512250@star.zko.dec.com>
From: everhart@star.zko.dec.com (Glenn C. Everhart 603 881 1497)
To: everhart@gce.MV.COM
Subject: Patch 1.4.4 for plan (X/Motif calendar and day planner) - alt.sources #12841
X-Vms-To: smtp%"everhart@gce.mv.com"

In article <1995Sep19.183712.1716@bitrot.in-berlin.de>, thomas@bitrot.in-berlin.de (Thomas Driemeyer) writes:
This patch brings plan 1.4.3 up to 1.4.4. The full sources are available
on ftp.fu-berlin.de (/pub/unix/graphics/plan/, may take a few days to
reach this directory), and ftp.x.org (contrib/applications, already there).
Here are the changes:

FEATURES:
    * Italian holiday file (Riccardo Scateni (riccardo@crs4.it))
    * user assignment popup shows multi-column user list if the list is long
    * notifier popups contain user, length, end time, and optional note string
    * "Execute" commands in alarm options may contain %s, replaced with note

BUG FIXES:
    * notifier snooze now works (Karsten Gaier)
    * pland ignored some repeating appointments
    * plan -t yesterday now works
    * error message bugs for fonts, colors, and holiday syntax (Bob Tomlinson)

For your reference, here is the relevant part of the README:

Plan is a schedule planner based on X/Motif. It displays a month calendar
similar to xcal, but every day box is large enough to show appointments
in small print. By pressing on a day box, the appointments for that day
can be listed and edited. Appointments are entered with the following
information (everything except the time is optional):

- the date, time, and length of the appointment
- an optional text message to be printed,
- an optional script to be executed,
- early-warn and late-warn triggers that precede the alarm time
- repetitions: [n-th] weekdays, days-of-the-month, every n days, yearly
- optional fast command-line appointment entry
- flexible ways to specify holidays and vacations
- extensive context help

The action being taken when a warn or alarm time is reached is programmable;
by default a window pops up. In addition, a program can be executed, or mail
can be sent. Other methods of listing appointments (today, this week, next
week, or a keyword search for regular expressions) are also available. Plan
can be configured to display times in 12-hour or 24-hour formats, mmddyy and
ddmmyy date formats, and can show either Monday or Sunday in the leftmost
column. Three view modes are supported: one month, one year, and one week.
The week view plots appointments as colored and labelled bars in a hour vs.
day chart, and allows other users' appointments to be included.

You do not need root access to install and run these programs. Edit the
Makefile to change the installation directories (default /usr/local/bin),
and run "make <systemname>". Default is sgi. For a list of supported system
names, run "make help".

----------------------------------------------------------------------------

And the patch itself, in a single part, as a shell archive. Save to a file
and run "sh" and "patch" on it in the 1.4.3 source directory:

Submitted-by: thomas@bitrot
Archive-name: Patch/part01

#!/bin/sh
# This is Patch, a shell archive (shar 3.47)
# made 09/19/1995 07:06 UTC by thomas@bitrot
# Source directory /usr/people/thomas/toys/plan-1.4.4
#
# existing files will NOT be overwritten unless -c is specified
#
#                                                                          
#                                                                          
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#  24833 -rw-r--r-- Patch
#
if test -r _shar_seq_.tmp; then
	echo 'Must unpack archives in sequence!'
	echo Please unpack part `cat _shar_seq_.tmp` next
	exit 1
fi
# ============= Patch ==============
if test -f 'Patch' -a X"$1" != X"-c"; then
	echo 'x - skipping Patch (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting Patch (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Patch' &&
*** ../plan-1.4.3//./README	Wed May 24 22:30:38 1995
--- ./README	Thu Sep 14 22:11:51 1995
***************
*** 98,102 ****
X  
X  The main ftp site for this program is ftp.fu-berlin.de (directory
! /pub/unix/graphics/plan).
X  
X  
--- 98,103 ----
X  
X  The main ftp site for this program is ftp.fu-berlin.de (directory
! /pub/unix/graphics/plan) and ftp.x.org (contrib/applications). Also
! check out my home page, http://www.IN-Berlin.DE/User/bitrot.home.html.
X  
X  
*** ../plan-1.4.3//./HISTORY	Sun Jul  9 10:09:17 1995
--- ./HISTORY	Thu Sep 14 22:11:52 1995
***************
*** 366,367 ****
--- 366,381 ----
X  BUG FIXES:
X      * pland didn't pop up advance-warning popups
+ 
+ 
+ ====== 1.4.4 released =======
+ 
+ FEATURES:
+     * Italian holiday file (Riccardo Scateni (riccardo@crs4.it))
+     * user assignment popup shows multi-column user list if the list is long
+     * notifier popups contain user, length, end time, and optional note string
+     * "Execute" commands in alarm options may contain %s, replaced with note
+ 
+ BUG FIXES:
+     * notifier snooze now works (Karsten Gaier)
+     * pland ignored some repeating appointments
+     * plan -t yesterday now works
*** ../plan-1.4.3//./plan.1cat	Wed May 24 22:30:38 1995
--- ./plan.1cat	Thu Sep 14 22:11:52 1995
***************
*** 15,19 ****
X            plan [mmdd]hhmm [message]*
X            pland [-d] [-kK]
!           notifier [-hdv123] [-ttitle] [-iicontitle] [file]
X  
X       DESCRIPTION
--- 15,20 ----
X            plan [mmdd]hhmm [message]*
X            pland [-d] [-kK]
!           notifier [-hdv123] [-ttitle] [-ssubtitle] [-iicontitle]
!           [file]
X  
X       DESCRIPTION
***************
*** 57,65 ****
X            -t [D
X                 Print a list of today's appointments to stdout. Don't
-                start up interactive windows. The exit status is 0 if
X  
X  
X  
!      Page 1                                          (printed 5/22/95)
X  
X  
--- 58,65 ----
X            -t [D
X                 Print a list of today's appointments to stdout. Don't
X  
X  
X  
!      Page 1                                           (printed 9/6/95)
X  
X  
***************
*** 72,75 ****
--- 72,76 ----
X  
X  
+                start up interactive windows. The exit status is 0 if
X                 there are appointments on the specified date, and 1
X                 otherwise. If a date D is specified, print appointments
***************
*** 123,131 ****
X            -d   Debug mode. Runs pland in the foreground without
X                 forking, and prints debugging information. Recommended
-                if pland seems to die unexpectedly.  (The most common
X  
X  
X  
!      Page 2                                          (printed 5/22/95)
X  
X  
--- 124,131 ----
X            -d   Debug mode. Runs pland in the foreground without
X                 forking, and prints debugging information. Recommended
X  
X  
X  
!      Page 2                                           (printed 9/6/95)
X  
X  
***************
*** 138,141 ****
--- 138,142 ----
X  
X  
+                if pland seems to die unexpectedly.  (The most common
X                 cause of disappearing pland's is a nonfunctional utmp;
X                 if -d is used pland recommends to recompile with the
***************
*** 169,172 ****
--- 170,177 ----
X                 read from stdin).
X  
+           -ssubtitle
+                Set the subtitle string below the main title, in a
+                small font.
+ 
X            -iicontitle
X                 Set the icon title string that is printed below the
***************
*** 185,197 ****
X            contains "." as its last item.
X  
-           ~/.dayplan
-                Database with all public entries and configuration
-                options of plan.  See plan(4) for details.
- 
-           ~/.dayplan.priv
X  
X  
X  
!      Page 3                                          (printed 5/22/95)
X  
X  
--- 190,197 ----
X            contains "." as its last item.
X  
X  
X  
X  
!      Page 3                                           (printed 9/6/95)
X  
X  
***************
*** 204,207 ****
--- 204,212 ----
X  
X  
+           ~/.dayplan
+                Database with all public entries and configuration
+                options of plan.  See plan(4) for details.
+ 
+           ~/.dayplan.priv
X                 Database with all private entries.
X  
***************
*** 254,263 ****
X  
X  
! 
! 
! 
! 
! 
!      Page 4                                          (printed 5/22/95)
X  
X  
--- 259,263 ----
X  
X  
!      Page 4                                           (printed 9/6/95)
X  
X  
*** ../plan-1.4.3//./plan.4cat	Wed May 24 22:30:39 1995
--- ./plan.4cat	Thu Sep 14 22:11:53 1995
***************
*** 61,65 ****
X  
X  
!      Page 1                                          (printed 5/22/95)
X  
X  
--- 61,65 ----
X  
X  
!      Page 1                                           (printed 9/6/95)
X  
X  
***************
*** 127,131 ****
X  
X  
!      Page 2                                          (printed 5/22/95)
X  
X  
--- 127,131 ----
X  
X  
!      Page 2                                           (printed 9/6/95)
X  
X  
***************
*** 193,197 ****
X  
X  
!      Page 3                                          (printed 5/22/95)
X  
X  
--- 193,197 ----
X  
X  
!      Page 3                                           (printed 9/6/95)
X  
X  
***************
*** 259,263 ****
X  
X  
!      Page 4                                          (printed 5/22/95)
X  
X  
--- 259,263 ----
X  
X  
!      Page 4                                           (printed 9/6/95)
X  
X  
***************
*** 325,329 ****
X  
X  
!      Page 5                                          (printed 5/22/95)
X  
X  
--- 325,329 ----
X  
X  
!      Page 5                                           (printed 9/6/95)
X  
X  
*** ../plan-1.4.3//./plan.1	Wed May 24 22:30:40 1995
--- ./plan.1	Thu Sep 14 22:11:53 1995
***************
*** 19,23 ****
X  .br
X  .B notifier
! [-hdv123] [-t\fItitle\fR] [-i\fIicontitle\fR] [file]
X  .SH DESCRIPTION
X  .B plan
--- 19,23 ----
X  .br
X  .B notifier
! [-hdv123] [-t\fItitle\fR] [-s\fIsubtitle\fR] [-i\fIicontitle\fR] [file]
X  .SH DESCRIPTION
X  .B plan
***************
*** 133,136 ****
--- 133,138 ----
X  .IP \-t\fItitle\fR
X  Set the title string above the message text (which is read from stdin).
+ .IP \-s\fIsubtitle\fR
+ Set the subtitle string below the main title, in a small font.
X  .IP \-i\fIicontitle\fR
X  Set the icon title string that is printed below the mwm/4Dwm icon.
*** ../plan-1.4.3//./plan.help	Wed May 24 22:30:45 1995
--- ./plan.help	Thu Sep 14 22:11:59 1995
***************
*** 602,606 ****
X  	   noises is a good choice. This is independent of the appointment's
X  	   script, which is always executed (at the alarm time only, not at
! 	   warning time).
X  
X  	The daemon's PATH environment variable is used to locate the mailer
--- 602,608 ----
X  	   noises is a good choice. This is independent of the appointment's
X  	   script, which is always executed (at the alarm time only, not at
! 	   warning time). If the command string contains %s, it is replaced
! 	   with the appointment's note string (last column in appointment
! 	   entry dialog).
X  
X  	The daemon's PATH environment variable is used to locate the mailer
***************
*** 626,630 ****
X  
X  	The program specified in the text area on the left is executed when
! 	the early-warning time is reached.
X  %% opt_late
X  	LATE WARNING
--- 628,634 ----
X  
X  	The program specified in the text area on the left is executed when
! 	the early-warning time is reached. If the command string contains %s,
! 	it is replaced with the appointment's note string (last column in
! 	appointment entry dialog).
X  %% opt_late
X  	LATE WARNING
***************
*** 646,650 ****
X  
X  	The program specified in the text area on the left is executed when
! 	the late-warning time is reached.
X  %% opt_alarm
X  	ALARM
--- 650,656 ----
X  
X  	The program specified in the text area on the left is executed when
! 	the late-warning time is reached. If the command string contains %s,
! 	it is replaced with the appointment's note string (last column in
! 	appointment entry dialog).
X  %% opt_alarm
X  	ALARM
***************
*** 666,670 ****
X  
X  	The program specified in the text area on the left is executed when
! 	the main alarm time is reached.
X  %% opt_mailer
X  	MAILER
--- 672,678 ----
X  
X  	The program specified in the text area on the left is executed when
! 	the main alarm time is reached. If the command string contains %s,
! 	it is replaced with the appointment's note string (last column in
! 	appointment entry dialog).
X  %% opt_mailer
X  	MAILER
*** ../plan-1.4.3//./Makefile	Wed May 24 22:30:46 1995
--- ./Makefile	Thu Sep 14 22:12:00 1995
***************
*** 449,453 ****
X  	  holiday_german holiday_uk holiday_us holiday_swedish holiday_japan\
X  	  holiday_spain holiday_quebec holiday_bavarian holiday_australia\
! 	  Monochrome plan_cal.ps Plan.icon
X  
X  shar:
--- 449,453 ----
X  	  holiday_german holiday_uk holiday_us holiday_swedish holiday_japan\
X  	  holiday_spain holiday_quebec holiday_bavarian holiday_australia\
! 	  holiday_italy Monochrome plan_cal.ps Plan.icon
X  
X  shar:
*** ../plan-1.4.3//./main.c	Wed May 24 22:30:50 1995
--- ./main.c	Fri Sep 15 08:54:02 1995
***************
*** 336,340 ****
X  	create_list(&mainlist);
X  	(void)read_mainlist(0);
- 	(void)recycle_all(mainlist, TRUE, 0);
X  
X  	start = parse_datestring(date && *date ? date : "today", 0);
--- 336,339 ----
***************
*** 710,718 ****
X  		get_rsrc(&c, n, class_name, XtRString);
X  		if (!XParseColor(display, cmap, c, &rgb))
! 			fprintf(stderr, "%s: unknown color \"%s\" (%s)\n",
! 							progname, c, n);
X  		else if (!XAllocColor(display, cmap, &rgb))
! 			fprintf(stderr, "%s: can't alloc color \"%s\" (%s)\n",
! 							progname, c, n);
X  		else {
X  			color[i] = rgb.pixel;
--- 709,717 ----
X  		get_rsrc(&c, n, class_name, XtRString);
X  		if (!XParseColor(display, cmap, c, &rgb))
! 			fprintf(stderr, "%s: unknown color for %s\n",
! 							progname, n);
X  		else if (!XAllocColor(display, cmap, &rgb))
! 			fprintf(stderr, "%s: can't alloc color for %s\n",
! 							progname, n);
X  		else {
X  			color[i] = rgb.pixel;
***************
*** 741,745 ****
X  {
X  	int			i;
! 	char			*f, class_name[256];
X  
X  	for (i=0; i < NFONTS; i++) {
--- 740,744 ----
X  {
X  	int			i;
! 	char			*f, *nf, class_name[256];
X  
X  	for (i=0; i < NFONTS; i++) {
***************
*** 767,773 ****
X  		strcpy(class_name, f);
X  		class_name[0] &= ~('a'^'A');
! 		get_rsrc(&f, f, class_name, XtRString);
! 		if (!(font[i] = XLoadQueryFont(display, f))) {
! 			fprintf(stderr, "plan: warning: bad font \"%s\"\n", f);
X  			if (!(font[i] = XLoadQueryFont(display, "variable")) &&
X  			    !(font[i] = XLoadQueryFont(display, "fixed")))
--- 766,772 ----
X  		strcpy(class_name, f);
X  		class_name[0] &= ~('a'^'A');
! 		get_rsrc(&nf, f, class_name, XtRString);
! 		if (!(font[i] = XLoadQueryFont(display, nf))) {
! 			fprintf(stderr, "plan: warning: bad font for %s\n", f);
X  			if (!(font[i] = XLoadQueryFont(display, "variable")) &&
X  			    !(font[i] = XLoadQueryFont(display, "fixed")))
*** ../plan-1.4.3//./popup.c	Wed May 24 22:30:50 1995
--- ./popup.c	Thu Sep 14 22:12:04 1995
***************
*** 52,56 ****
X  Japanese version by Ogura Yoshito <ogura@ndc.ngsk.sony.co.jp>\n\n\
X  Send mail to thomas@bitrot.in-berlin.de if you would like to\n\
! subscribe to the mailing list, plan@bitrot.in-berlin.de.\
X  \n";
X  
--- 52,57 ----
X  Japanese version by Ogura Yoshito <ogura@ndc.ngsk.sony.co.jp>\n\n\
X  Send mail to thomas@bitrot.in-berlin.de if you would like to\n\
! subscribe to the plan mailing list. Or check out my home page,\n\n\
! http://www.IN-Berlin.DE/User/bitrot.home.html\
X  \n";
X  
*** ../plan-1.4.3//./print.c	Wed May 24 22:30:51 1995
--- ./print.c	Thu Sep 14 22:12:04 1995
***************
*** 380,384 ****
X  {
X  	create_error_popup(mainwindow, 0,
! 				"Print failed, aborted with signal %d\n", sig);
X  	signal(SIGPIPE, SIG_IGN);
X  }
--- 380,385 ----
X  {
X  	create_error_popup(mainwindow, 0,
! 	     "Print failed, aborted with signal %d\nCheck your spooler string.",
! 				sig);
X  	signal(SIGPIPE, SIG_IGN);
X  }
*** ../plan-1.4.3//./mondraw.c	Wed May 24 22:30:55 1995
--- ./mondraw.c	Thu Sep 14 22:12:09 1995
***************
*** 107,111 ****
X  		return;
X  	}
! 	if (!pos_to_day(&day, x, y) || day == edit_day)
X  		return;
X  	if (edit_day) {
--- 107,111 ----
X  		return;
X  	}
! 	if (!pos_to_day(&day, x, y))
X  		return;
X  	if (edit_day) {
*** ../plan-1.4.3//./dayedit.c	Wed May 24 22:30:59 1995
--- ./dayedit.c	Thu Sep 14 22:12:12 1995
***************
*** 408,412 ****
X  	XtSetArg(args[n], XmNrightOffset,	6);			n++;
X  	XtSetArg(args[n], XmNhighlightThickness,0);			n++;
! 	XtSetArg(args[n], XmNspacing,		4);			n++;
X  	radio = XmCreateRadioBox(form, "radio", args, n);
X  
--- 408,413 ----
X  	XtSetArg(args[n], XmNrightOffset,	6);			n++;
X  	XtSetArg(args[n], XmNhighlightThickness,0);			n++;
! 	XtSetArg(args[n], XmNspacing,		0);			n++;
! 	XtSetArg(args[n], XmNnumColumns,	nusers/20+1);		n++;
X  	radio = XmCreateRadioBox(form, "radio", args, n);
X  
*** ../plan-1.4.3//./usermenu.c	Wed May 24 22:31:11 1995
--- ./usermenu.c	Thu Sep 14 22:12:26 1995
***************
*** 412,416 ****
X  	for (i=0; i < nusers; i++) {
X  		if (x == 4 && i != y && !strcmp(string, user[i].name)) {
! 			create_error_popup(mainmenu, 0,
X  				"User name is not unique, rejected");
X  			return;
--- 412,416 ----
X  	for (i=0; i < nusers; i++) {
X  		if (x == 4 && i != y && !strcmp(string, user[i].name)) {
! 			create_error_popup(shell, 0,
X  				"User name is not unique, rejected");
X  			return;
***************
*** 417,421 ****
X  		}
X  		if (x == 5 && i != y && !strcmp(string, user[i].home)) {
! 			create_error_popup(mainmenu, 0,
X  				"Home directory is not unique, rejected");
X  			return;
--- 417,421 ----
X  		}
X  		if (x == 5 && i != y && !strcmp(string, user[i].home)) {
! 			create_error_popup(shell, 0,
X  				"Home directory is not unique, rejected");
X  			return;
*** ../plan-1.4.3//./dbase.c	Sun Jul  9 10:09:17 1995
--- ./dbase.c	Thu Sep 14 22:12:30 1995
***************
*** 563,567 ****
X  		return(0);
X  
! 	for (found = lookup_entry(&lookup, list, time-86400, TRUE, FALSE, '*');
X  	     found;
X  	     found = lookup_next_entry(&lookup)) {
--- 563,567 ----
X  		return(0);
X  
! 	for (found = lookup_entry(&lookup, list, time-3*3600, TRUE, FALSE, '*');
X  	     found;
X  	     found = lookup_next_entry(&lookup)) {
*** ../plan-1.4.3//./convert.c	Wed May 24 22:31:19 1995
--- ./convert.c	Thu Sep 14 22:12:34 1995
***************
*** 22,25 ****
--- 22,26 ----
X  extern struct tm	*time_to_tm();
X  
+ #ifndef FRENCH
X  char *weekday_name[] =	    { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};
X  char *alt_weekday_name[7] = { "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So" };
***************
*** 27,30 ****
--- 28,38 ----
X  			      "June", "July", "August", "September", "October",
X  			      "November", "December"};
+ #else
+ char *weekday_name[] =	    { "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"};
+ char *alt_weekday_name[7] = { "Lu", "Ma", "Me", "Je", "Ve", "Sa", "Di" };
+ char *monthname[] =	    { "Janvier", "Fivrier", "Mars", "Avril", "Mai",
+ 			      "Juin", "Juillet", "Ao{t", "Septembre", "Octobre",
+ 			      "Novembre", "Dicembre"};
+ #endif
X  
X  
*** ../plan-1.4.3//./holiday.c	Wed May 24 22:31:21 1995
--- ./holiday.c	Fri Sep 15 08:54:02 1995
***************
*** 75,83 ****
X  {
X  	fprintf(stderr, "%s: %s in line %d of %s\n", progname,
! 					msg, yylineno, HOLIDAY_PATH);
X  	if (!*errormsg)
X  		sprintf(errormsg,
X  		      "Problem with holiday file %s:\n%.80s in line %d",
! 					filename, msg, yylineno);
X  }
X  
--- 75,83 ----
X  {
X  	fprintf(stderr, "%s: %s in line %d of %s\n", progname,
! 					msg, yylineno+1, filename);
X  	if (!*errormsg)
X  		sprintf(errormsg,
X  		      "Problem with holiday file %s:\n%.80s in line %d",
! 					filename, msg, yylineno+1);
X  }
X  
*** ../plan-1.4.3//./daemon.c	Wed May 24 22:31:24 1995
--- ./daemon.c	Thu Sep 14 22:12:38 1995
***************
*** 28,33 ****
X  #include <signal.h>
X  #include <time.h>
! #include <Xm/Xm.h>
! #include "cal.h"
X  #ifndef RABBITS
X  #include <pwd.h>
--- 28,32 ----
X  #include <signal.h>
X  #include <time.h>
! #include "conf.h"
X  #ifndef RABBITS
X  #include <pwd.h>
***************
*** 64,68 ****
X  
X  static void popup_window(), send_mail(), write_script(), exec_program();
! static char *get_subject(), *get_icontitle();
X  extern struct tm *time_to_tm();
X  extern void set_tzone(), destroy_list();
--- 63,67 ----
X  
X  static void popup_window(), send_mail(), write_script(), exec_program();
! static char *get_subject(), *get_subtitle(), *get_icontitle();
X  extern struct tm *time_to_tm();
X  extern void set_tzone(), destroy_list();
***************
*** 237,240 ****
--- 236,241 ----
X  	int			reason;		/* why: 1=early,2=late,3=time*/
X  {
+ 	char			cmd[4096];	/* command to execute */
+ 
X  	switch(reason) {
X  	  case 1:
***************
*** 243,248 ****
X  		if (config.ewarn_mail)
X  			send_mail(reason, entry);
! 		if (config.ewarn_exec)
! 			exec_program(entry, config.ewarn_prog, FALSE);
X  		break;
X  
--- 244,252 ----
X  		if (config.ewarn_mail)
X  			send_mail(reason, entry);
! 		if (config.ewarn_exec) {
! 			sprintf(cmd, config.ewarn_prog,
! 					entry->note ? entry->note : "");
! 			exec_program(entry, cmd, FALSE);
! 		}
X  		break;
X  
***************
*** 252,257 ****
X  		if (config.lwarn_mail)
X  			send_mail(reason, entry);
! 		if (config.lwarn_exec)
! 			exec_program(entry, config.lwarn_prog, FALSE);
X  		break;
X  
--- 256,264 ----
X  		if (config.lwarn_mail)
X  			send_mail(reason, entry);
! 		if (config.lwarn_exec) {
! 			sprintf(cmd, config.lwarn_prog,
! 					entry->note ? entry->note : "");
! 			exec_program(entry, cmd, FALSE);
! 		}
X  		break;
X  
***************
*** 261,266 ****
X  		if (config.alarm_mail && !entry->noalarm)
X  			send_mail(reason, entry);
! 		if (config.alarm_exec && !entry->noalarm)
! 			exec_program(entry, config.alarm_prog, FALSE);
X  		if (entry->script)
X  			exec_program(entry, entry->script, TRUE);
--- 268,276 ----
X  		if (config.alarm_mail && !entry->noalarm)
X  			send_mail(reason, entry);
! 		if (config.alarm_exec && !entry->noalarm) {
! 			sprintf(cmd, config.alarm_prog,
! 					entry->note ? entry->note : "");
! 			exec_program(entry, cmd, FALSE);
! 		}
X  		if (entry->script)
X  			exec_program(entry, entry->script, TRUE);
***************
*** 288,300 ****
X  	}
X  	if (config.wintimeout > 59)
! 		sprintf(cmd, "%s -%d -e%d -t\1%s\2 -i\1%s\2",
X  					prog, reason,
X  					(int)config.wintimeout/60,
X  					get_subject(reason, entry, FALSE),
X  					get_icontitle(reason, entry));
X  	else
! 		sprintf(cmd, "%s -%d -t\1%s\2 -i\1%s\2",
X  					prog, reason,
X  					get_subject(reason, entry, FALSE),
X  					get_icontitle(reason, entry));
X  	exec_program(entry, cmd, FALSE);
--- 298,312 ----
X  	}
X  	if (config.wintimeout > 59)
! 		sprintf(cmd, "%s -%d -e%d -t\1%s\2 -s\1%s\2 -i\1%s\2",
X  					prog, reason,
X  					(int)config.wintimeout/60,
X  					get_subject(reason, entry, FALSE),
+ 					get_subtitle(entry),
X  					get_icontitle(reason, entry));
X  	else
! 		sprintf(cmd, "%s -%d -t\1%s\2 -s\1%s\2 -i\1%s\2",
X  					prog, reason,
X  					get_subject(reason, entry, FALSE),
+ 					get_subtitle(entry),
X  					get_icontitle(reason, entry));
X  	exec_program(entry, cmd, FALSE);
***************
*** 551,554 ****
--- 563,605 ----
X  		msg[len] = ')';
X  		msg[len+1] = 0;
+ 	}
+ 	return(msg);
+ }
+ 
+ 
+ 
+ /*
+  * Return a subtitle string with extra info for notifier window
+  */
+ 
+ static char *get_subtitle(entry)
+ 	register struct entry	*entry;		/* entry that triggered */
+ {
+ 	static char		msg[160];
+ 	time_t			time;
+ 	char			ampm = 0;
+ 
+ 	*msg = 0;
+ 	if (entry->user)
+ 		sprintf(msg, "user %s", entry->user);
+ 
+ 	if (entry->length) {
+ 		time = ((entry->time + entry->length) % 86400) / 60;
+ 		if (config.ampm) {
+ 			ampm = time < 12*60 ? 'a' : 'p';
+ 			time %= 12*60;
+ 			if (time < 60)
+ 				time = 12*60;
+ 		}
+ 		if (*msg)
+ 			strcat(msg, ": ");
+ 		sprintf(msg+strlen(msg), "length %d:%02d, until %d:%02d%c",
+ 				entry->length/3600, (entry->length/60)%60,
+ 				time/60, time%60, ampm);
+ 	}
+ 	if (entry->note && entry->message) {
+ 		if (*msg)
+ 			strcat(msg, " - ");
+ 		strncpy(msg+strlen(msg), entry->note, 80);
X  	}
X  	return(msg);
*** ../plan-1.4.3//./notifier.c	Wed May 24 22:31:24 1995
--- ./notifier.c	Fri Sep 15 08:54:03 1995
***************
*** 64,67 ****
--- 64,68 ----
X  #endif
X  	"*title.fontList:	-*-times-*-*-*-*-34-*",
+ 	"*subtitle.fontList:	-*-times-*-r-*-*-14-*",
X  #if !defined(sgi) && !defined(_sgi)
X  	"*message.fontList:	-*-new century schoolbook-*-r-*-*-17-*",
***************
*** 90,93 ****
--- 91,95 ----
X  	char			*msg = 0;	/* points to ascii message */
X  	char			*title = "Notifier";
+ 	char			*subtitle = "";
X  	char			*icontitle = "Notify";
X  	long			timeout = 0;
***************
*** 152,155 ****
--- 154,161 ----
X  					i = -1;
X  					break;
+ 				  case 's':
+ 					subtitle = &argv[n][i+1];
+ 					i = -1;
+ 					break;
X  				  case 'i':
X  					icontitle = &argv[n][i+1];
***************
*** 184,188 ****
X  
X  	XtVaSetValues(toplevel, XmNiconName, icontitle, NULL);
! 	create_widgets(toplevel, title, msg);
X  	XtRealizeWidget(toplevel);
X  	XBell(display, 0);
--- 190,194 ----
X  
X  	XtVaSetValues(toplevel, XmNiconName, icontitle, NULL);
! 	create_widgets(toplevel, title, subtitle, msg);
X  	XtRealizeWidget(toplevel);
X  	XBell(display, 0);
***************
*** 268,271 ****
--- 274,278 ----
X  			"\t-d\t\tdump fallback app-defaults and exit\n",
X  			"\t-tstring\tset title string (quote blanks)\n",
+ 			"\t-sstring\tset subtitle string (quote blanks)\n",
X  			"\t-istring\tset icon title string (quote blanks)\n",
X  			"\t-v\t\tprint version string\n",
***************
*** 327,335 ****
X  		c = string_resource(n, class_name);
X  		if (!XParseColor(display, cmap, c, &rgb))
! 			fprintf(stderr, "%s: unknown color \"%s\" (%s)\n",
! 							progname, c, n);
X  		else if (!XAllocColor(display, cmap, &rgb))
! 			fprintf(stderr, "%s: can't alloc color \"%s\" (%s)\n",
! 							progname, c, n);
X  		else {
X  			color[i] = rgb.pixel;
--- 334,342 ----
X  		c = string_resource(n, class_name);
X  		if (!XParseColor(display, cmap, c, &rgb))
! 			fprintf(stderr, "%s: unknown color for %s\n",
! 							progname, n);
X  		else if (!XAllocColor(display, cmap, &rgb))
! 			fprintf(stderr, "%s: can't alloc color for %s\n",
! 							progname, n);
X  		else {
X  			color[i] = rgb.pixel;
*** ../plan-1.4.3//./notmenu.c	Wed May 24 22:31:24 1995
--- ./notmenu.c	Thu Sep 14 22:12:39 1995
***************
*** 28,34 ****
X  
X  
! create_widgets(toplevel, title, msg)
X  	Widget			toplevel;
X  	char			*title;		/* title string */
X  	char			*msg;		/* message text */
X  {
--- 28,35 ----
X  
X  
! create_widgets(toplevel, title, subtitle, msg)
X  	Widget			toplevel;
X  	char			*title;		/* title string */
+ 	char			*subtitle;	/* subtitle string */
X  	char			*msg;		/* message text */
X  {
***************
*** 80,83 ****
--- 81,101 ----
X  	XmStringFree(string);
X  
+ 	if (subtitle && *subtitle) {				/* subtitle */
+ 	  n = 0;
+ 	  string = XmStringCreateSimple(subtitle);
+ 	  XtSetArg(args[n], XmNtopAttachment,	XmATTACH_WIDGET);	n++;
+ 	  XtSetArg(args[n], XmNtopWidget,	w);			n++;
+ 	  XtSetArg(args[n], XmNtopOffset,	0);			n++;
+ 	  XtSetArg(args[n], XmNleftAttachment,	XmATTACH_FORM);		n++;
+ 	  XtSetArg(args[n], XmNleftOffset,	8);			n++;
+ 	  XtSetArg(args[n], XmNrightAttachment,	XmATTACH_FORM);		n++;
+ 	  XtSetArg(args[n], XmNrightOffset,	8);			n++;
+ 	  XtSetArg(args[n], XmNbackground,	color[bkcolor]);	n++;
+ 	  XtSetArg(args[n], XmNlabelString,	string);		n++;
+ 	  w = XtCreateManagedWidget("subtitle", xmLabelWidgetClass,
+ 			form, args, n);
+ 	  XmStringFree(string);
+ 	}
+ 
X  	n = 0;							/* message */
X  	XtSetArg(args[n], XmNtopAttachment,	XmATTACH_WIDGET);	n++;
***************
*** 158,161 ****
--- 176,180 ----
X  {
X  	XtPopdown(XtParent(mainwindow));
+ 	XtUnmapWidget(XtParent(mainwindow));
X  	timer_id = XtAppAddTimeOut(app, SNOOZE_PERIOD, timer_callback, 0);
X  }
*** ../plan-1.4.3//./version.h	Sun Jul  9 10:09:17 1995
--- ./version.h	Thu Sep 14 22:12:46 1995
***************
*** 8,10 ****
X  #define VERSION "V1.4"
X  #endif
! #define PATCHLEVEL "PL 3"
--- 8,10 ----
X  #define VERSION "V1.4"
X  #endif
! #define PATCHLEVEL "PL 4"
SHAR_EOF
chmod 0644 Patch ||
echo 'restore of Patch failed'
Wc_c="`wc -c < 'Patch'`"
test 24833 -eq "$Wc_c" ||
	echo 'Patch: original size 24833, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
exit 0

Thomas
-- 

--
Thomas Driemeyer       thomas@bitrot.in-berlin.de       voice: +49 30 8924936
  <A HREF="http://www.IN-Berlin.DE/User/bitrot.home.html"> my home page </A>


% ====== Internet headers and postmarks (see DECWRL::GATEWAY.DOC) ======
% Received: from mail1.digital.com by us2rmc.zko.dec.com (5.65/rmc-22feb94) id AA04419; Fri, 22 Sep 95 21:13:41 -040
% Received: from gce.mv.com by mail1.digital.com; (5.65 EXP 4/12/95 for V3.2/1.0/WV) id AA10295; Fri, 22 Sep 1995 17:52:55 -070
% Date: Fri, 22 Sep 1995 20:54:28 -0400 (EDT)
% From: EVERHART@gce.mv.com
% To: star::everhart
% Message-Id: <950922205428.62@gce.mv.com>
% Subject: get this
