Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2002 18:08:50 -0400
From:      "Brian T. Schellenberger" <bts@babbleon.org>
To:        thomas@bitrot.de, deischen@freebsd.org, w3d@bitrot.de
Cc:        freebsd-ports@freebsd.org
Subject:   Plan patches - please respond
Message-ID:  <200207211808.50524.bts@babbleon.org>

next in thread | raw e-mail | index | archive | help

--------------Boundary-00=_QIDMENQR3BCRKTG31FLI
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 8bit


Thomas (and Daniel)--

I have some patches for plan that I submitted to thomas@bitrot.de on 
2001-09-29 and then to deischen@freebsd.org on 2002-01-09.  While I 
understand that either or both of you might choose to incorporate my patches 
or to reject them, I'd really appreciate at an acknowledgement and rejection 
letter.

(I'd prefer that they be incorporated into the main plan code since they are 
100% portable, but it would still make *my* life easier if they were instead 
incorporated into the FreeBSD port of the program.)

Perhaps you might have sent me a reply, but if so, I never seem to have 
received it.

Anyway, once again, I have patches to do three things.  I believe them to be 
useful.

1. Allow ISO dates for input.

2. Allow a -O option to allow you specify dates on the command lines that are 
"on the nth y of the month"; for example, -D 2 -O 2 means "on the 2nd Tuesday 
of the month"

3. Fix up the man page to document the above feature and to fix a 
currently-inaccurate description of the -N option.

If anybody reading this knows of a more current address for either Thomas 
Driemeyer or Daniel Eischen, please let me know!

If plan is not being actively maintained (as either a program or a port) then 
I'd like to offer to take it over.  (I'm not a current ports committer but I 
could do the basic stuff and let somebody else do the actual committing, or I 
could look into what's involved in being a ports committer..)

The relatively recent date on the plan web page, though, makes me think that's 
it's still being maintained but I'm not making it past the e-mail barrier.  
Any suggestions for getting messages through to Thomas would be much 
appreciated!

If I continue to get no response, I believe that I will "branch off" my own 
program based on plan, to be called "planb" (a pun; it would both Brian's 
plan and not his preference [ok, let's go to plan B]]), but this sort of 
balkanization of code is something to be avoided whenever possible methinks.

My preference would be to see these integrated into the "main" body of plan 
and perhaps to work with you on a few other ideas and issues I've run into, 
but I don't really like the idea of accumulating a massive batch of patches 
that I keep having to reapply whenever I re-install things.


PS: I love the program.  It both does what I've always wanted; namely (a) have 
a GUI, (b) have a command line to enter data, *and* (c) have a nice, pretty, 
flexible printing mechanism.  *And* the code is beautifully well-organized.  
I only wish that I'd ever written code that was as easy to work with.  
Writing the patches was trivial; I just wish that getting in contact with you 
was as easy!


-- 
Brian, the man from Babble-On . . . .   bts@babbleon.org (personal)
                                        http://www.babbleon.org

http://www.eff.org                      http://www.programming-freedom.org 

--------------Boundary-00=_QIDMENQR3BCRKTG31FLI
Content-Type: text/x-diff;
  charset="us-ascii";
  name="plan-patches"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="plan-patches"

# ====================> CONVERT.C - Allow yyyy/mm/dd <=========================
*** oldsrc/convert.c	Sat Sep 29 16:56:28 2001
--- src/convert.c	Sat Sep 29 18:25:41 2001
***************
*** 106,115 ****
--- 106,116 ----
  	long		num[3];		/* m,d,y or d,m,y */
  	int		nnum;		/* how many numbers in text */
  	long		i;		/* tmp counter */
  	char		*p;		/* text scan pointer */
  	char		buf[10];	/* lowercase weekday name */
+     int     noswap;
  
  	today  = get_time();				/* today's date */
  	today -= today % 86400;
  	tm = time_to_tm(today);
  	for (p=text; *p; p++)				/* ignore "wkday," */
***************
*** 173,183 ****
--- 174,193 ----
  		while (*p && !(*p >= '0' && *p <= '9') && *p!=' ' && *p!='\t')
  			p++;
  	}
  	if (nnum == 0)					/* ... no numbers */
  		return(today);
+     noswap = FALSE;
  	if (nnum == 3) {				/* ... have year? */
+         if (num[0] > 999) {   /* bts: 4-digit first => year is first */
+                               /* 4-digit year => yyyy/mm/dd          */
+             i = num[0];
+             num[0] = num[2];
+             num[2] = i;
+             noswap = TRUE;
+         }
+ 
  		if (num[2] < 70)
  			num[2] += 100;
  		else if (num[2] > 100)
  			num[2] -= 1900;
  		if (num[2] < 70 || num[2] > 137)
***************
*** 190,200 ****
  				tm->tm_mon = 0;
  				tm->tm_year++;
  			}
  		tm->tm_mday = num[0];
  	} else {					/* ... d/m or m/d */
! 		if (config.mmddyy) {
  			i      = num[0];
  			num[0] = num[1];
  			num[1] = i;
  		}
  		if (nnum < 3 && num[1]*100+num[0] <
--- 200,210 ----
  				tm->tm_mon = 0;
  				tm->tm_year++;
  			}
  		tm->tm_mday = num[0];
  	} else {					/* ... d/m or m/d */
! 		if (config.mmddyy && !noswap) {
  			i      = num[0];
  			num[0] = num[1];
  			num[1] = i;
  		}
  		if (nnum < 3 && num[1]*100+num[0] <


# ====================> MAIN.C - Add -O option <=========================

*** oldsrc/main.c	Sat Sep 29 16:56:28 2001
--- src/main.c	Sat Sep 29 17:59:25 2001
***************
*** 369,378 ****
--- 369,381 ----
  			edit.entry.rep_days |= 1 << atoi(argv[i+1]);
  			break;
  		  case 'D':
  			edit.entry.rep_weekdays |= 1 << atoi(argv[i+1]);
  			break;
+           case 'O':
+ 			edit.entry.rep_weekdays |= 1 << (atoi(argv[i+1]) + 7);
+ 			break;
  		  case 'e':
          		edit.entry.rep_last = parse_datestring(argv[i+1],
  								trigger);
  			break;
  		  case 'w':

# ==================> MAN PAGE - fix -D doc; add -O option <=================
*** oldmisc/plan.1	Sat Sep 29 18:03:46 2001
--- misc/plan.1	Sat Sep 29 18:15:26 2001
***************
*** 86,98 ****
  The new appointment repeats every N days. N is an integer greater than zero.
  .IP \-d\ N
  The new appointment repeats on day N of the month. N is an integer between
  1 and 31. There can be multiple -d options.
  .IP \-D\ N
! The new appointment repeats on weekday N. N=0 indicates Monday, 1 is Tuesday,
! 2 is Wednesday, 3 is Thursday, 4 is Friday, 5 is Saturday, and 6 is Sunday.
  There can be multiple -D options.
  .IP \-e\ D
  The new appointment stops repeating on date D. D is a string such as
  '31.12.' or '12/31'.
  .IP \-w\ N
  Set the early warning time of the new appointment to N minutes.
--- 86,102 ----
  The new appointment repeats every N days. N is an integer greater than zero.
  .IP \-d\ N
  The new appointment repeats on day N of the month. N is an integer between
  1 and 31. There can be multiple -d options.
  .IP \-D\ N
! The new appointment repeats on weekday N. N=0 indicates Sunday, 1 is Monday,
! 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, and 6 is Saturday.
  There can be multiple -D options.
+ .IP \-O\ N
+ The -D days only repeat the Nth time of the month.  May be repeated.  For
+ example, "-D 2 -O 2 -O 4" means the 2nd and 4th Tuesdays of each month.
+ -O 6 means the last one.
  .IP \-e\ D
  The new appointment stops repeating on date D. D is a string such as
  '31.12.' or '12/31'.
  .IP \-w\ N
  Set the early warning time of the new appointment to N minutes.

--------------Boundary-00=_QIDMENQR3BCRKTG31FLI--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207211808.50524.bts>