mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 23:08:40 +02:00
-- Updated WHATSNEW.30
-- Fixed some more bugs.
This commit is contained in:
@@ -4,6 +4,14 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
+ MAJOR ENHANCEMENTS
|
+ 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
|
- Added TAG and DURATION clauses for communicating more information to
|
||||||
back-ends and eventually converting REMIND into a full-fledged
|
back-ends and eventually converting REMIND into a full-fledged
|
||||||
scheduler.
|
scheduler.
|
||||||
@@ -13,6 +21,14 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ 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.
|
- Documented the "remind -p" format.
|
||||||
|
|
||||||
- Made Remind communicate day and month names to back-ends so they
|
- 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
|
"configure" script which should make life very pleasant for UNIX
|
||||||
people.
|
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
|
- Made rem2html work properly if more than one month's worth of calendar
|
||||||
data was produced.
|
data was produced.
|
||||||
|
|
||||||
@@ -40,6 +52,9 @@ CHANGES TO REMIND
|
|||||||
installation on non-UNIX platforms. Sorry. I can't fix it until
|
installation on non-UNIX platforms. Sorry. I can't fix it until
|
||||||
I hear back from non-UNIX maintainers.
|
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
|
* Version 3.0 Patch 17
|
||||||
|
|
||||||
+ MINOR ENHANCEMENTS
|
+ MINOR ENHANCEMENTS
|
||||||
|
|||||||
@@ -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"
|
.TH REMIND 1 "1 February 1998"
|
||||||
.UC 4
|
.UC 4
|
||||||
.SH NAME
|
.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,
|
Returns -1 if \fInum\fR is negative, 1 if \fInum\fR is positive,
|
||||||
and 0 if \fInum\fR is zero.
|
and 0 if \fInum\fR is zero.
|
||||||
.TP
|
.TP
|
||||||
.B shell(s_cmd)
|
.B shell(s_cmd [,i_maxlen])
|
||||||
Executes \fIcmd\fR as a system command, and returns the first 511
|
Executes \fIcmd\fR as a system command, and returns the first 511
|
||||||
characters of output resulting from \fIcmd\fR. Any whitespace
|
characters of output resulting from \fIcmd\fR. Any whitespace
|
||||||
character in the output is converted to a space. Note that if \fBRUN
|
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
|
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
|
been used, \fBshell()\fR will result in an error, and \fIcmd\fR will
|
||||||
not be executed.
|
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
|
.TP
|
||||||
.B strlen(s_str)
|
.B strlen(s_str)
|
||||||
Returns the length of \fIstr\fR.
|
Returns the length of \fIstr\fR.
|
||||||
|
|||||||
18
src/dorem.c
18
src/dorem.c
@@ -12,7 +12,7 @@
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#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 <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -328,9 +328,12 @@ PUBLIC int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Eprint("%s: %s", ErrMsg[E_UNKNOWN_TOKEN], DBufValue(&buf));
|
PushToken(DBufValue(&buf), s);
|
||||||
DBufFree(&buf);
|
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 */
|
/* Save trigger time in global variable */
|
||||||
LastTriggerTime = tim->ttime;
|
LastTriggerTime = tim->ttime;
|
||||||
PushToken(DBufValue(&buf));
|
PushToken(DBufValue(&buf), s);
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -416,7 +419,7 @@ PRIVATE int ParseLocalOmit(ParsePtr s, Trigger *t)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PushToken(DBufValue(&buf));
|
PushToken(DBufValue(&buf), s);
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -490,7 +493,7 @@ PRIVATE int ParseUntil(ParsePtr s, Trigger *t)
|
|||||||
return E_BAD_DATE;
|
return E_BAD_DATE;
|
||||||
}
|
}
|
||||||
t->until = Julian(y, m, d);
|
t->until = Julian(y, m, d);
|
||||||
PushToken(DBufValue(&buf));
|
PushToken(DBufValue(&buf), s);
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -564,7 +567,7 @@ PRIVATE int ParseScanFrom(ParsePtr s, Trigger *t)
|
|||||||
return E_BAD_DATE;
|
return E_BAD_DATE;
|
||||||
}
|
}
|
||||||
t->scanfrom = Julian(y, m, d);
|
t->scanfrom = Julian(y, m, d);
|
||||||
PushToken(DBufValue(&buf));
|
PushToken(DBufValue(&buf), s);
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -629,6 +632,7 @@ PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
|
|||||||
printf("%s\n", DBufValue(&buf));
|
printf("%s\n", DBufValue(&buf));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
DBufFree(&buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If it's NextMode, process as a CAL-type entry, and issue simple-calendar
|
/* If it's NextMode, process as a CAL-type entry, and issue simple-calendar
|
||||||
|
|||||||
@@ -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
|
#ifdef MK_GLOBALS
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
@@ -114,7 +114,6 @@ EXTERN INIT( char *EndSentIg, "\"')]}>");
|
|||||||
|
|
||||||
EXTERN DynamicBuffer Banner;
|
EXTERN DynamicBuffer Banner;
|
||||||
EXTERN DynamicBuffer LineBuffer;
|
EXTERN DynamicBuffer LineBuffer;
|
||||||
EXTERN DynamicBuffer TPushBuffer;
|
|
||||||
/* List of months */
|
/* List of months */
|
||||||
EXTERN char *EnglishMonthName[]
|
EXTERN char *EnglishMonthName[]
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#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
|
#define L_IN_INIT 1
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -123,7 +123,6 @@ char *argv[];
|
|||||||
/* Initialize global dynamic buffers */
|
/* Initialize global dynamic buffers */
|
||||||
DBufInit(&Banner);
|
DBufInit(&Banner);
|
||||||
DBufInit(&LineBuffer);
|
DBufInit(&LineBuffer);
|
||||||
DBufInit(&TPushBuffer);
|
|
||||||
|
|
||||||
DBufPuts(&Banner, L_BANNER);
|
DBufPuts(&Banner, L_BANNER);
|
||||||
|
|
||||||
|
|||||||
35
src/main.c
35
src/main.c
@@ -11,7 +11,7 @@
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#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
|
#ifdef HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -73,8 +73,6 @@ long timegm ARGS((struct tm *tm));
|
|||||||
long timelocal ARGS((struct tm *tm));
|
long timelocal ARGS((struct tm *tm));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char *TokenPushed = NULL;
|
|
||||||
|
|
||||||
/* Whooo... the putchar/Putchar/PutChar macros are a mess...
|
/* Whooo... the putchar/Putchar/PutChar macros are a mess...
|
||||||
my apologies... */
|
my apologies... */
|
||||||
#ifdef OS2_POPUP
|
#ifdef OS2_POPUP
|
||||||
@@ -392,13 +390,13 @@ int peek;
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
*err = 0;
|
*err = 0;
|
||||||
if (TokenPushed && *TokenPushed) {
|
if (p->tokenPushed && *p->tokenPushed) {
|
||||||
if (peek) return *TokenPushed;
|
if (peek) return *p->tokenPushed;
|
||||||
else {
|
else {
|
||||||
r = *TokenPushed++;
|
r = *p->tokenPushed++;
|
||||||
if (!r) {
|
if (!r) {
|
||||||
DBufFree(&TPushBuffer);
|
DBufFree(&p->pushedToken);
|
||||||
TokenPushed = NULL;
|
p->tokenPushed = NULL;
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@@ -702,7 +700,8 @@ ParsePtr p;
|
|||||||
p->epos = NULL;
|
p->epos = NULL;
|
||||||
p->etext = NULL;
|
p->etext = NULL;
|
||||||
p->allownested = 1;
|
p->allownested = 1;
|
||||||
TokenPushed = NULL;
|
p->tokenPushed = NULL;
|
||||||
|
DBufInit(&p->pushedToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -724,28 +723,30 @@ ParsePtr p;
|
|||||||
p->etext = NULL;
|
p->etext = NULL;
|
||||||
p->isnested = 0;
|
p->isnested = 0;
|
||||||
}
|
}
|
||||||
|
DBufFree(&p->pushedToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* PushToken - one level of token pushback. This is */
|
/* PushToken - one level of token pushback. This is */
|
||||||
/* GLOBAL, not on a per-parser basis. */
|
/* on a per-parser basis. */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
#ifdef HAVE_PROTOS
|
#ifdef HAVE_PROTOS
|
||||||
PUBLIC int PushToken(const char *tok)
|
PUBLIC int PushToken(const char *tok, ParsePtr p)
|
||||||
#else
|
#else
|
||||||
int PushToken(tok)
|
int PushToken(tok, p)
|
||||||
char *tok;
|
char *tok;
|
||||||
|
ParsePtr p;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
DBufFree(&TPushBuffer);
|
DBufFree(&p->pushedToken);
|
||||||
if (DBufPuts(&TPushBuffer, (char *) tok) != OK ||
|
if (DBufPuts(&p->pushedToken, (char *) tok) != OK ||
|
||||||
DBufPutc(&TPushBuffer, ' ') != OK) {
|
DBufPutc(&p->pushedToken, ' ') != OK) {
|
||||||
DBufFree(&TPushBuffer);
|
DBufFree(&p->pushedToken);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
TokenPushed = DBufValue(&TPushBuffer);
|
p->tokenPushed = DBufValue(&p->pushedToken);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
#ifdef HAVE_PROTOS
|
||||||
#define ARGS(x) x
|
#define ARGS(x) x
|
||||||
@@ -74,7 +74,7 @@ void Eprint ARGS ((const char *fmt, ...));
|
|||||||
void OutputLine ARGS ((FILE *fp));
|
void OutputLine ARGS ((FILE *fp));
|
||||||
void CreateParser ARGS ((char *s, ParsePtr p));
|
void CreateParser ARGS ((char *s, ParsePtr p));
|
||||||
void DestroyParser ARGS ((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));
|
long SystemTime ARGS ((int realtime));
|
||||||
int SystemDate ARGS ((int *y, int *m, int *d));
|
int SystemDate ARGS ((int *y, int *m, int *d));
|
||||||
int DoIf ARGS ((ParsePtr p));
|
int DoIf ARGS ((ParsePtr p));
|
||||||
|
|||||||
@@ -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 */
|
/* Values */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -79,6 +81,8 @@ typedef struct {
|
|||||||
char *pos; /* Current position */
|
char *pos; /* Current position */
|
||||||
char *etext; /* Substituted text */
|
char *etext; /* Substituted text */
|
||||||
char *epos; /* Position in substituted text */
|
char *epos; /* Position in substituted text */
|
||||||
|
DynamicBuffer pushedToken; /* Pushed-back token */
|
||||||
|
char *tokenPushed; /* NULL if no pushed-back token */
|
||||||
} Parser;
|
} Parser;
|
||||||
|
|
||||||
typedef Parser *ParsePtr; /* Pointer to parser structure */
|
typedef Parser *ParsePtr; /* Pointer to parser structure */
|
||||||
|
|||||||
Reference in New Issue
Block a user