-- Updated WHATSNEW.30

-- Fixed some more bugs.
This commit is contained in:
dfs
1998-02-10 04:11:34 +00:00
parent c31b2e1d27
commit 418e9ff265
8 changed files with 64 additions and 37 deletions

View File

@@ -4,6 +4,14 @@ CHANGES TO REMIND
+ MAJOR ENHANCEMENTS
- Added the script "build.tk" which makes it trivial to compile
and install Remind under UNIX -- no need to edit Makefiles or
header files. A nice GUI installation dialog!
- Got rid of all fixed-size buffers. Hurray! Everything is dynamic --
no built-in limits on line length, token size, etc. This should
cure lots of SEGV's for weird files.
- Added TAG and DURATION clauses for communicating more information to
back-ends and eventually converting REMIND into a full-fledged
scheduler.
@@ -13,6 +21,14 @@ CHANGES TO REMIND
+ MINOR ENHANCEMENTS
- Made parser _very_ forgiving -- the type of reminder now defaults
to MSG. This lets you have lines in the reminder file like this:
Feb 9, 1998 Meeting with Joe.
But I don't recommend abusing it. It's mostly to ease migration from
UNIX calendar(1) files.
- Documented the "remind -p" format.
- Made Remind communicate day and month names to back-ends so they
@@ -22,10 +38,6 @@ CHANGES TO REMIND
"configure" script which should make life very pleasant for UNIX
people.
- Added the script "build.tk" which makes it trivial to compile
and install Remind under UNIX -- no need to edit Makefiles or
header files. A nice GUI installation dialog!
- Made rem2html work properly if more than one month's worth of calendar
data was produced.
@@ -40,6 +52,9 @@ CHANGES TO REMIND
installation on non-UNIX platforms. Sorry. I can't fix it until
I hear back from non-UNIX maintainers.
- Getting rid of fixed-sized buffers meant lots of changes to code.
No doubt, I missed a few regression tests.
* Version 3.0 Patch 17
+ MINOR ENHANCEMENTS

View File

@@ -1,4 +1,4 @@
.\" $Id: remind.1,v 1.3 1998-02-07 05:35:50 dfs Exp $
.\" $Id: remind.1,v 1.4 1998-02-10 04:11:39 dfs Exp $
.TH REMIND 1 "1 February 1998"
.UC 4
.SH NAME
@@ -2178,13 +2178,18 @@ in calendar mode, or if a date has been supplied on the command line.
Returns -1 if \fInum\fR is negative, 1 if \fInum\fR is positive,
and 0 if \fInum\fR is zero.
.TP
.B shell(s_cmd)
.B shell(s_cmd [,i_maxlen])
Executes \fIcmd\fR as a system command, and returns the first 511
characters of output resulting from \fIcmd\fR. Any whitespace
character in the output is converted to a space. Note that if \fBRUN
OFF\fR has been executed, or the \fB\-r\fR command-line option has
been used, \fBshell()\fR will result in an error, and \fIcmd\fR will
not be executed.
.PP
If \fImaxlen\fR is specified, then \fBshell()\fR returns the first
\fImaxlen\fR characters of output (rather than the first 511). If
\fImaxlen\fR is specified as a negative number, then \fIall\fR the
output from \fIcmd\fR is returned.
.TP
.B strlen(s_str)
Returns the length of \fIstr\fR.

View File

@@ -12,7 +12,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: dorem.c,v 1.4 1998-02-10 03:15:47 dfs Exp $";
static char const RCSID[] = "$Id: dorem.c,v 1.5 1998-02-10 04:11:44 dfs Exp $";
#include <stdio.h>
#include <ctype.h>
@@ -328,9 +328,12 @@ PUBLIC int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
break;
default:
Eprint("%s: %s", ErrMsg[E_UNKNOWN_TOKEN], DBufValue(&buf));
PushToken(DBufValue(&buf), s);
DBufFree(&buf);
return E_UNKNOWN_TOKEN;
trig->typ = MSG_TYPE;
if (s->isnested) return E_CANT_NEST_RTYPE;
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
return OK;
}
}
}
@@ -379,7 +382,7 @@ PRIVATE int ParseTimeTrig(ParsePtr s, TimeTrig *tim)
/* Save trigger time in global variable */
LastTriggerTime = tim->ttime;
PushToken(DBufValue(&buf));
PushToken(DBufValue(&buf), s);
DBufFree(&buf);
return OK;
}
@@ -416,7 +419,7 @@ PRIVATE int ParseLocalOmit(ParsePtr s, Trigger *t)
break;
default:
PushToken(DBufValue(&buf));
PushToken(DBufValue(&buf), s);
DBufFree(&buf);
return OK;
}
@@ -490,7 +493,7 @@ PRIVATE int ParseUntil(ParsePtr s, Trigger *t)
return E_BAD_DATE;
}
t->until = Julian(y, m, d);
PushToken(DBufValue(&buf));
PushToken(DBufValue(&buf), s);
DBufFree(&buf);
return OK;
}
@@ -564,7 +567,7 @@ PRIVATE int ParseScanFrom(ParsePtr s, Trigger *t)
return E_BAD_DATE;
}
t->scanfrom = Julian(y, m, d);
PushToken(DBufValue(&buf));
PushToken(DBufValue(&buf), s);
DBufFree(&buf);
return OK;
}
@@ -629,6 +632,7 @@ PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
printf("%s\n", DBufValue(&buf));
#endif
}
DBufFree(&buf);
}
/* If it's NextMode, process as a CAL-type entry, and issue simple-calendar

View File

@@ -11,7 +11,7 @@
/* */
/***************************************************************/
/* $Id: globals.h,v 1.3 1998-02-10 03:15:51 dfs Exp $ */
/* $Id: globals.h,v 1.4 1998-02-10 04:11:45 dfs Exp $ */
#ifdef MK_GLOBALS
#undef EXTERN
@@ -114,7 +114,6 @@ EXTERN INIT( char *EndSentIg, "\"')]}>");
EXTERN DynamicBuffer Banner;
EXTERN DynamicBuffer LineBuffer;
EXTERN DynamicBuffer TPushBuffer;
/* List of months */
EXTERN char *EnglishMonthName[]
#ifdef MK_GLOBALS

View File

@@ -12,7 +12,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: init.c,v 1.4 1998-02-10 03:15:51 dfs Exp $";
static char const RCSID[] = "$Id: init.c,v 1.5 1998-02-10 04:11:45 dfs Exp $";
#define L_IN_INIT 1
#include <stdio.h>
@@ -123,7 +123,6 @@ char *argv[];
/* Initialize global dynamic buffers */
DBufInit(&Banner);
DBufInit(&LineBuffer);
DBufInit(&TPushBuffer);
DBufPuts(&Banner, L_BANNER);

View File

@@ -11,7 +11,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: main.c,v 1.5 1998-02-10 03:15:52 dfs Exp $";
static char const RCSID[] = "$Id: main.c,v 1.6 1998-02-10 04:11:46 dfs Exp $";
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
@@ -73,8 +73,6 @@ long timegm ARGS((struct tm *tm));
long timelocal ARGS((struct tm *tm));
#endif
static char *TokenPushed = NULL;
/* Whooo... the putchar/Putchar/PutChar macros are a mess...
my apologies... */
#ifdef OS2_POPUP
@@ -392,13 +390,13 @@ int peek;
int r;
*err = 0;
if (TokenPushed && *TokenPushed) {
if (peek) return *TokenPushed;
if (p->tokenPushed && *p->tokenPushed) {
if (peek) return *p->tokenPushed;
else {
r = *TokenPushed++;
r = *p->tokenPushed++;
if (!r) {
DBufFree(&TPushBuffer);
TokenPushed = NULL;
DBufFree(&p->pushedToken);
p->tokenPushed = NULL;
}
return r;
}
@@ -702,7 +700,8 @@ ParsePtr p;
p->epos = NULL;
p->etext = NULL;
p->allownested = 1;
TokenPushed = NULL;
p->tokenPushed = NULL;
DBufInit(&p->pushedToken);
}
/***************************************************************/
@@ -724,28 +723,30 @@ ParsePtr p;
p->etext = NULL;
p->isnested = 0;
}
DBufFree(&p->pushedToken);
}
/***************************************************************/
/* */
/* PushToken - one level of token pushback. This is */
/* GLOBAL, not on a per-parser basis. */
/* on a per-parser basis. */
/* */
/***************************************************************/
#ifdef HAVE_PROTOS
PUBLIC int PushToken(const char *tok)
PUBLIC int PushToken(const char *tok, ParsePtr p)
#else
int PushToken(tok)
int PushToken(tok, p)
char *tok;
ParsePtr p;
#endif
{
DBufFree(&TPushBuffer);
if (DBufPuts(&TPushBuffer, (char *) tok) != OK ||
DBufPutc(&TPushBuffer, ' ') != OK) {
DBufFree(&TPushBuffer);
DBufFree(&p->pushedToken);
if (DBufPuts(&p->pushedToken, (char *) tok) != OK ||
DBufPutc(&p->pushedToken, ' ') != OK) {
DBufFree(&p->pushedToken);
return E_NO_MEM;
}
TokenPushed = DBufValue(&TPushBuffer);
p->tokenPushed = DBufValue(&p->pushedToken);
return OK;
}

View File

@@ -9,7 +9,7 @@
/* */
/***************************************************************/
/* $Id: protos.h,v 1.4 1998-02-10 03:15:53 dfs Exp $ */
/* $Id: protos.h,v 1.5 1998-02-10 04:11:46 dfs Exp $ */
#ifdef HAVE_PROTOS
#define ARGS(x) x
@@ -74,7 +74,7 @@ void Eprint ARGS ((const char *fmt, ...));
void OutputLine ARGS ((FILE *fp));
void CreateParser ARGS ((char *s, ParsePtr p));
void DestroyParser ARGS ((ParsePtr p));
int PushToken ARGS ((const char *tok));
int PushToken ARGS ((const char *tok, ParsePtr p));
long SystemTime ARGS ((int realtime));
int SystemDate ARGS ((int *y, int *m, int *d));
int DoIf ARGS ((ParsePtr p));

View File

@@ -9,7 +9,9 @@
/* */
/***************************************************************/
/* $Id: types.h,v 1.2 1998-02-10 03:15:57 dfs Exp $ */
/* $Id: types.h,v 1.3 1998-02-10 04:11:47 dfs Exp $ */
#include "dynbuf.h"
/* Values */
typedef struct {
@@ -79,6 +81,8 @@ typedef struct {
char *pos; /* Current position */
char *etext; /* Substituted text */
char *epos; /* Position in substituted text */
DynamicBuffer pushedToken; /* Pushed-back token */
char *tokenPushed; /* NULL if no pushed-back token */
} Parser;
typedef Parser *ParsePtr; /* Pointer to parser structure */