diff --git a/Makefile b/Makefile index ab0b4856..3b74f1da 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile for REMIND -# $Id: Makefile,v 1.20 1997-07-31 01:57:10 dfs Exp $ +# $Id: Makefile,v 1.21 1997-09-16 03:16:30 dfs Exp $ #----------------------------------------------------------------------------- # THINGS FOR YOU TO EDIT START BELOW @@ -54,7 +54,7 @@ GROUP=bin # YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things # in config.h; then, you should be able to type 'make'. #----------------------------------------------------------------------------- -VERSION= 03.00.17 +VERSION= 03.00.18 MATHLIB= -lm HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \ @@ -133,9 +133,9 @@ tgz: -rm -rf remind-$(VERSION) -mkdir remind-$(VERSION) cd remind-$(VERSION); for i in www $(MANIFEST) ;do ln -s ../$$i .; done; cd .. - tar --exclude CVS -c -h -v -f remind-3.0.17.tar remind-$(VERSION) - gzip -v -9 remind-3.0.17.tar - mv remind-3.0.17.tar.gz remind-3.0.17.tgz + tar --exclude CVS -c -h -v -f remind-3.0.18.tar remind-$(VERSION) + gzip -v -9 remind-3.0.18.tar + mv remind-3.0.18.tar.gz remind-3.0.18.tgz rm -rf remind-$(VERSION) shar: diff --git a/Makefile_QDOS b/Makefile_QDOS index 128e5313..87427a4f 100644 --- a/Makefile_QDOS +++ b/Makefile_QDOS @@ -1,4 +1,4 @@ -#$Id: Makefile_QDOS,v 1.5 1997-03-30 19:07:36 dfs Exp $ +#$Id: Makefile_QDOS,v 1.6 1997-09-16 03:16:30 dfs Exp $ # Makefile for REMIND for QDOS / SMSQ #----------------------------------------------------------------------------- @@ -24,7 +24,7 @@ LDFLAGS= -bufp200K # YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things # in config_h; then, you should be able to type 'make'. #----------------------------------------------------------------------------- -VERSION= 03.00.17 +VERSION= 03.00.18 MATHLIB= -lm HDRS= config_h err_h expr_h globals_h protos_h types_h version_h \ diff --git a/README_QDOS b/README_QDOS index 149798f5..78f62978 100644 --- a/README_QDOS +++ b/README_QDOS @@ -1,5 +1,5 @@ -$Id: README_QDOS,v 1.5 1997-03-30 19:07:36 dfs Exp $ -REMIND version 3.0.17 for QDOS / SMSQ +$Id: README_QDOS,v 1.6 1997-09-16 03:16:30 dfs Exp $ +REMIND version 3.0.18 for QDOS / SMSQ REMIND is a sophisticated alarm/calendar program. Details are given in the documentation file, "remind_doc" (QUILL format). diff --git a/calendar.c b/calendar.c index aee86ec2..1412e7bb 100644 --- a/calendar.c +++ b/calendar.c @@ -10,7 +10,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: calendar.c,v 1.4 1997-03-30 19:07:37 dfs Exp $"; +static char const RCSID[] = "$Id: calendar.c,v 1.5 1997-09-16 03:16:30 dfs Exp $"; #include #include @@ -34,6 +34,9 @@ typedef struct cal_entry { char *pos; int time; int priority; + char tag[TAG_LEN+1]; + char passthru[PASSTHRU_LEN+1]; + int duration; } CalEntry; /* Global variables */ @@ -661,6 +664,12 @@ int col; FindToken(buf, &tok); if (tok.type == T_Empty || tok.type == T_Comment) return OK; if (tok.type != T_RemType || tok.val == SAT_TYPE) return E_PARSE_ERR; + if (tok.val == PASSTHRU_TYPE) { + r=ParseToken(p, buf); + if (r) return r; + if (!*buf) return E_EOLN; + StrnCpy(trig.passthru, buf, PASSTHRU_LEN); + } trig.typ = tok.val; jul = LastTriggerDate; if (!LastTrigValid) return OK; @@ -670,10 +679,21 @@ int col; if (r) return r; } - if (!PsCal && (trig.typ == PS_TYPE || trig.typ == PSF_TYPE)) return OK; + /* Convert PS and PSF to PASSTHRU */ + if (trig.typ == PS_TYPE) { + strcpy(trig.passthru, "PPPP"); + trig.typ = PASSTHRU_TYPE; + } else if (trig.typ == PSF_TYPE) { + strcpy(trig.passthru, "FFFF"); + trig.typ = PASSTHRU_TYPE; + } + if (!PsCal && trig.typ == PASSTHRU_TYPE) return OK; /* Remove any "at" times from PS or PSFILE reminders */ - if (trig.typ == PS_TYPE || trig.typ == PSF_TYPE) tim.ttime = NO_TIME; + if (trig.typ == PASSTHRU_TYPE) { + tim.ttime = NO_TIME; + tim.duration = NO_TIME; + } /* If trigger date == today, add it to the current entry */ if (jul == JulianToday) { @@ -682,7 +702,7 @@ int col; *s = 0; if (DoSimpleCalendar || tim.ttime != NO_TIME) s += strlen(SimpleTime(tim.ttime, s)); - if (trig.typ != PS_TYPE && trig.typ != PSF_TYPE && + if (trig.typ != PASSTHRU_TYPE && UserFuncExists("calprefix")==1) { sprintf(buf, "calprefix(%d)", trig.priority); s2 = buf; @@ -697,7 +717,7 @@ int col; } if ( (r=DoSubst(p, s, &trig, &tim, jul, CAL_MODE)) ) return r; if (!*s) return OK; - if (trig.typ != PS_TYPE && trig.typ != PSF_TYPE && + if (trig.typ != PASSTHRU_TYPE && UserFuncExists("calsuffix")==1) { sprintf(buf, "calsuffix(%d)", trig.priority); s2 = buf; @@ -719,9 +739,15 @@ int col; free(e); return E_NO_MEM; } + StrnCpy(e->tag, trig.tag, TAG_LEN); + if (!e->tag[0]) { + strcpy(e->tag, "*"); + } + e->duration = tim.duration; e->priority = trig.priority; - if (trig.typ == PS_TYPE || trig.typ == PSF_TYPE) { - e->pos = (trig.typ == PS_TYPE) ? "P" : "F"; + if (trig.typ == PASSTHRU_TYPE) { + StrnCpy(e->passthru, trig.passthru, PASSTHRU_LEN); + e->pos = e->passthru; e->time = NO_TIME; e->next = CurPs; CalPs[col] = e; @@ -753,14 +779,34 @@ int col, jul; { CalEntry *e = CalPs[col]; CalEntry *n; - int y, m, d; + int y, m, d, i, j; -/* Do all the PostScript entries first, if any */ +/* Do all the PASSTHRU entries first, if any */ FromJulian(jul, &y, &m, &d); while(e) { - printf("%c%c%c%c%c%02d%c%02d ", *(e->pos), *(e->pos), - *(e->pos), *(e->pos), DATESEP, + /* Print the PASSTHRU */ + j = 0; + for(i=0; ipos+j)); + if (*(e->pos+j+1)) { + j++; + } else { + j=0; + } + } + printf("%c%02d%c%02d ", DATESEP, m+1, DATESEP, d); + printf("%s ", e->tag); + if (e->duration != NO_TIME) { + printf("%d ", e->duration); + } else { + printf("* "); + } + if (e->time != NO_TIME) { + printf("%d ", e->time); + } else { + printf("* "); + } printf("%s\n", e->text); free(e->text); n = e->next; @@ -772,6 +818,17 @@ int col, jul; e = CalColumn[col]; while(e) { printf("%04d%c%02d%c%02d ", y, DATESEP, m+1, DATESEP, d); + printf("%s ", e->tag); + if (e->duration != NO_TIME) { + printf("%d ", e->duration); + } else { + printf("* "); + } + if (e->time != NO_TIME) { + printf("%d ", e->time); + } else { + printf("* "); + } printf("%s\n", e->text); free(e->text); n = e->next; @@ -859,8 +916,7 @@ char *out; switch(ScFormat) { case SC_AMPM: - if (tim == NO_TIME) sprintf(out, " "); - else { + if (tim != NO_TIME) { h = tim / 60; min = tim % 60; if (h == 0) hh=12; @@ -871,8 +927,7 @@ char *out; break; case SC_MIL: - if (tim == NO_TIME) sprintf(out, " "); - else { + if (tim != NO_TIME) { h = tim / 60; min = tim % 60; sprintf(out, "%02d%c%02d ", h, TIMESEP, min); diff --git a/config.h b/config.h index 310d9f94..7ebb8f3e 100644 --- a/config.h +++ b/config.h @@ -11,7 +11,7 @@ /* */ /***************************************************************/ -/* $Id: config.h,v 1.8 1997-07-13 16:18:48 dfs Exp $ */ +/* $Id: config.h,v 1.9 1997-09-16 03:16:31 dfs Exp $ */ /*---------------------------------------------------------------------*/ /* LAT_DEG, LAT_MIN and LAT_SEC: Latitude of your location */ @@ -267,6 +267,14 @@ /*---------------------------------------------------------------------*/ /* Don't change the next definitions */ /*---------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------*/ +/* TAG_LEN: The maximum length of tags. Don't change it */ +/*---------------------------------------------------------------------*/ +#define TAG_LEN 32 + +#define PASSTHRU_LEN 4 + #define PUBLIC #define PRIVATE static diff --git a/dorem.c b/dorem.c index 4fec3d72..ceb6d775 100644 --- a/dorem.c +++ b/dorem.c @@ -12,7 +12,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: dorem.c,v 1.5 1997-03-30 19:07:37 dfs Exp $"; +static char const RCSID[] = "$Id: dorem.c,v 1.6 1997-09-16 03:16:31 dfs Exp $"; #include #include @@ -77,7 +77,15 @@ ParsePtr p; if (r) return r; FindToken(buf, &tok); if (tok.type == T_Empty || tok.type == T_Comment) return OK; - if (tok.type != T_RemType || tok.val == SAT_TYPE) return E_PARSE_ERR; + if (tok.type != T_RemType || tok.val == SAT_TYPE) { + return E_PARSE_ERR; + } + if (tok.val == PASSTHRU_TYPE) { + r=ParseToken(p, buf); + if (r) return r; + if (!*buf) return E_EOLN; + StrnCpy(trig.passthru, buf, PASSTHRU_LEN); + } trig.typ = tok.val; jul = LastTriggerDate; if (!LastTrigValid) return OK; @@ -148,9 +156,11 @@ ParsePtr p; trig->priority = DefaultPrio; trig->sched[0] = 0; trig->warn[0] = 0; + trig->tag[0] = 0; tim->ttime = NO_TIME; tim->delta = NO_DELTA; tim->rep = NO_REP; + tim->duration = NO_TIME; while(1) { /* Read space-delimited string */ @@ -194,6 +204,12 @@ ParsePtr p; trig->typ = tok.val; if (s->isnested) return E_CANT_NEST_RTYPE; if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday; + if (trig->typ == PASSTHRU_TYPE) { + r = ParseToken(s, TokBuffer); + if (r) return r; + if (!*TokBuffer) return E_EOLN; + StrnCpy(trig->passthru, TokBuffer, PASSTHRU_LEN); + } return OK; case T_Until: @@ -246,6 +262,25 @@ ParsePtr p; StrnCpy(trig->warn, TokBuffer, VAR_NAME_LEN); break; + case T_Tag: + r = ParseToken(s, TokBuffer); + if (r) return r; + StrnCpy(trig->tag, TokBuffer, TAG_LEN); + break; + + case T_Duration: + r = ParseToken(s, TokBuffer); + if (r) return r; + FindToken(TokBuffer, &tok); + switch(tok.type) { + case T_Time: + tim->duration = tok.val; + break; + default: + return E_BAD_TIME; + } + break; + case T_Sched: r=ParseToken(s, TokBuffer); if(r) return r; @@ -500,7 +535,10 @@ ParsePtr p; Value v; if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED; - if (t->typ == CAL_TYPE || t->typ == PS_TYPE || t->typ == PSF_TYPE) + if (t->typ == PASSTHRU_TYPE || + t->typ == CAL_TYPE || + t->typ == PS_TYPE || + t->typ == PSF_TYPE) return OK; /* If it's a MSG-type reminder, and no -k option was used, issue the banner. */ diff --git a/makefile.bcc b/makefile.bcc index 869d003e..5751c260 100644 --- a/makefile.bcc +++ b/makefile.bcc @@ -1,7 +1,7 @@ # Makefile for REMIND for Borland C++ -# $Id: makefile.bcc,v 1.5 1997-03-30 19:07:41 dfs Exp $ +# $Id: makefile.bcc,v 1.6 1997-09-16 03:16:32 dfs Exp $ -VERSION= 03.00.17 +VERSION= 03.00.18 MODEL=l diff --git a/makefile.tc b/makefile.tc index 767d0797..ca38b5aa 100644 --- a/makefile.tc +++ b/makefile.tc @@ -1,8 +1,8 @@ # Makefile for REMIND for Turbo C for MSDOS -# $Id: makefile.tc,v 1.5 1997-03-30 19:07:41 dfs Exp $ +# $Id: makefile.tc,v 1.6 1997-09-16 03:16:32 dfs Exp $ CC= tcc -VERSION= 03.00.17 +VERSION= 03.00.18 HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \ lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \ diff --git a/omit.c b/omit.c index a5436655..5b1b5ef3 100644 --- a/omit.c +++ b/omit.c @@ -11,7 +11,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: omit.c,v 1.4 1997-03-30 19:07:42 dfs Exp $"; +static char const RCSID[] = "$Id: omit.c,v 1.5 1997-09-16 03:16:32 dfs Exp $"; #include #ifdef HAVE_STDLIB_H @@ -328,6 +328,8 @@ ParsePtr p; case T_Comment: case T_RemType: case T_Priority: + case T_Tag: + case T_Duration: parsing = 0; break; diff --git a/rem2ps.c b/rem2ps.c index 6d4869ea..7cabccc5 100644 --- a/rem2ps.c +++ b/rem2ps.c @@ -10,7 +10,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: rem2ps.c,v 1.7 1997-03-30 19:07:45 dfs Exp $"; +static char const RCSID[] = "$Id: rem2ps.c,v 1.8 1997-09-16 03:16:32 dfs Exp $"; #include "lang.h" #include @@ -197,6 +197,7 @@ void DoPsCal() int i; int is_ps; int firstcol; + char *startOfBody; CalEntry *c, *d; @@ -282,14 +283,37 @@ void DoPsCal() fprintf(stderr, "malloc failed - aborting.\n"); exit(1); } - is_ps = (*LineBuffer == 'F' || *LineBuffer == 'P'); c->next = NULL; - c->entry = malloc(strlen(LineBuffer+10) + 1 + is_ps); + + is_ps = ((LineBuffer[0] == 'F' && + LineBuffer[1] == 'F' && + LineBuffer[2] == 'F' && + LineBuffer[3] == 'F') || + (LineBuffer[0] == 'P' && + LineBuffer[1] == 'P' && + LineBuffer[2] == 'P' && + LineBuffer[3] == 'P')); + + /* Skip the tag, duration and time */ + startOfBody = LineBuffer+10; + while(*startOfBody && isspace(*startOfBody)) startOfBody++; + while(*startOfBody && !isspace(*startOfBody)) startOfBody++; + while(*startOfBody && isspace(*startOfBody)) startOfBody++; + while(*startOfBody && !isspace(*startOfBody)) startOfBody++; + while(*startOfBody && isspace(*startOfBody)) startOfBody++; + while(*startOfBody && !isspace(*startOfBody)) startOfBody++; + while(*startOfBody && isspace(*startOfBody)) startOfBody++; + + /* If no time, skip it */ + if (*startOfBody == '*') { + startOfBody++; + } + c->entry = malloc(strlen(startOfBody) + 1 + is_ps); if (!c->entry) { fprintf(stderr, "malloc failed - aborting.\n"); exit(1); } - strcpy(c->entry+is_ps, LineBuffer+10); + strcpy(c->entry+is_ps, startOfBody); if (is_ps) { /* Save the 'P' or 'F' flag */ diff --git a/remind.LSM b/remind.LSM index 64fa412e..21fbb44c 100644 --- a/remind.LSM +++ b/remind.LSM @@ -1,6 +1,6 @@ Begin3 Title: Remind -Version: 03.00.17 +Version: 03.00.18 Entered-date: 10 February 1997 Description: Full-featured calendar/reminder program featuring sophisticated date calculation, moon phases, sunrise/sunset, @@ -13,7 +13,7 @@ Keywords: calendar reminder alarm datebook PostScript www Author: aa775@freenet.carleton.ca (David F. Skoll) Maintained-by: aa775@freenet.carleton.ca (David F. Skoll) Primary-site: ftp.doe.carleton.ca /pub/Remind-3.0 - 230kB remind-3.0.17.tgz + 230kB remind-3.0.18.tgz Alternate-site: Original-site: Platform: Linux, Solaris, SunOS, HP-UX -- virtually any UN*X-like diff --git a/test-rem.ami b/test-rem.ami index ea706310..85851e09 100644 --- a/test-rem.ami +++ b/test-rem.ami @@ -631,7 +631,7 @@ set a057 value("a05"+"6") "a05" + "6" => "a056" value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH" set a058 version() -version() => "03.00.17" +version() => "03.00.18" set a059 wkday(today()) today() => 1991/02/16 wkday(1991/02/16) => "Saturday" @@ -772,7 +772,7 @@ dump a048 "foo" a067 "INT" a039 "February" - a058 "03.00.17" + a058 "03.00.18" a077 "1992 92 " a049 21 diff --git a/test.cmp b/test.cmp index 50a389aa..ab982bfe 100644 --- a/test.cmp +++ b/test.cmp @@ -631,7 +631,7 @@ set a057 value("a05"+"6") "a05" + "6" => "a056" value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH" set a058 version() -version() => "03.00.17" +version() => "03.00.18" set a059 wkday(today()) today() => 1991/02/16 wkday(1991/02/16) => "Saturday" @@ -772,7 +772,7 @@ dump a048 "foo" a067 "INT" a039 "February" - a058 "03.00.17" + a058 "03.00.18" a077 "1992 92 " a049 21 diff --git a/test1.cmp b/test1.cmp index d783ed58..ed07b6a4 100644 --- a/test1.cmp +++ b/test1.cmp @@ -1,6 +1,6 @@ # Test file for REMIND # -# $Id: test1.cmp,v 1.6 1997-03-30 19:07:49 dfs Exp $ +# $Id: test1.cmp,v 1.7 1997-09-16 03:16:34 dfs Exp $ # # Use this file to test the date calculation routines # of the REMIND program by typing: @@ -633,7 +633,7 @@ set a057 value("a05"+"6") "a05" + "6" => "a056" value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH" set a058 version() -version() => "03.00.17" +version() => "03.00.18" set a059 wkday(today()) today() => 1991/02/16 wkday(1991/02/16) => "Saturday" @@ -774,7 +774,7 @@ dump a048 "foo" a067 "INT" a039 "February" - a058 "03.00.17" + a058 "03.00.18" a077 "1992 92 " a049 21 diff --git a/test2.cmp b/test2.cmp index ef68974a..f62bd9f9 100644 --- a/test2.cmp +++ b/test2.cmp @@ -1,6 +1,6 @@ # Test file for REMIND # -# $Id: test2.cmp,v 1.6 1997-03-30 19:07:49 dfs Exp $ +# $Id: test2.cmp,v 1.7 1997-09-16 03:16:34 dfs Exp $ # # Use this file to test the date calculation routines # of the REMIND program by typing: @@ -633,7 +633,7 @@ set a057 value("a05"+"6") "a05" + "6" => "a056" value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH" set a058 version() -version() => "03.00.17" +version() => "03.00.18" set a059 wkday(today()) today() => 1991/02/16 wkday(1991/02/16) => "Saturday" @@ -774,7 +774,7 @@ dump a048 "foo" a067 "INT" a039 "February" - a058 "03.00.17" + a058 "03.00.18" a077 "1992 92 " a049 21 diff --git a/token.c b/token.c index 45a00dad..0448d557 100644 --- a/token.c +++ b/token.c @@ -11,7 +11,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: token.c,v 1.5 1997-07-13 16:18:49 dfs Exp $"; +static char const RCSID[] = "$Id: token.c,v 1.6 1997-09-16 03:16:35 dfs Exp $"; #include #include @@ -52,13 +52,14 @@ Token TokArray[] = { { "banner", 3, T_Banner, 0 }, { "before", 3, T_Skip, BEFORE_SKIP }, { "cal", 3, T_RemType, CAL_TYPE }, - { "clear-omit-context", 5, T_Clr, 0 }, - { "debug", 5, T_Debug, 0 }, - { "december", 3, T_Month, 11 }, - { "dumpvars", 4, T_Dumpvars, 0 }, + { "clear-omit-context", 5, T_Clr, 0 }, + { "debug", 5, T_Debug, 0 }, + { "december", 3, T_Month, 11 }, + { "dumpvars", 4, T_Dumpvars, 0 }, + { "duration", 3, T_Duration, 0 }, { "else", 4, T_Else, 0 }, { "endif", 5, T_EndIf, 0 }, - { "errmsg", 6, T_ErrMsg, 0 }, + { "errmsg", 6, T_ErrMsg, 0 }, { "exit", 4, T_Exit, 0 }, { "february", 3, T_Month, 1 }, { "flush", 5, T_Flush, 0 }, @@ -67,7 +68,7 @@ Token TokArray[] = { { "if", 2, T_If, 0 }, { "iftrig", 6, T_IfTrig, 0 }, { "include", 3, T_Include, 0 }, - { "january", 3, T_Month, 0 }, + { "january", 3, T_Month, 0 }, { "july", 3, T_Month, 6 }, { "june", 3, T_Month, 5 }, { "march", 3, T_Month, 2 }, @@ -76,27 +77,29 @@ Token TokArray[] = { { "msf", 3, T_RemType, MSF_TYPE }, { "msg", 3, T_RemType, MSG_TYPE }, { "november", 3, T_Month, 10 }, - { "october", 3, T_Month, 9 }, + { "october", 3, T_Month, 9 }, { "omit", 3, T_Omit, 0 }, { "once", 3, T_Once, 0 }, { "pop-omit-context", 3, T_Pop, 0 }, - { "preserve", 8, T_Preserve, 0 }, + { "preserve", 8, T_Preserve, 0 }, { "priority", 8, T_Priority, 0 }, { "ps", 2, T_RemType, PS_TYPE }, - { "psfile", 6, T_RemType, PSF_TYPE }, + { "psfile", 6, T_RemType, PSF_TYPE }, { "push-omit-context", 4, T_Push, 0 }, { "rem", 3, T_Rem, 0 }, { "run", 3, T_RemType, RUN_TYPE }, - { "satisfy", 7, T_RemType, SAT_TYPE }, + { "satisfy", 7, T_RemType, SAT_TYPE }, { "saturday", 3, T_WkDay, 5 }, { "scanfrom", 4, T_Scanfrom, 0 }, { "sched", 5, T_Sched, 0 }, { "september", 3, T_Month, 8 }, { "set", 3, T_Set, 0 }, { "skip", 3, T_Skip, SKIP_SKIP }, + { "special", 7, T_RemType, PASSTHRU_TYPE }, { "sunday", 3, T_WkDay, 6 }, + { "tag", 3, T_Tag, 0 }, { "thursday", 3, T_WkDay, 3 }, - { "tuesday", 3, T_WkDay, 1 }, + { "tuesday", 3, T_WkDay, 1 }, { "unset", 5, T_UnSet, 0 }, { "until", 3, T_Until, 0 }, { "warn", 4, T_Warn, 0 }, diff --git a/types.h b/types.h index 486298d0..6af52a59 100644 --- a/types.h +++ b/types.h @@ -9,7 +9,7 @@ /* */ /***************************************************************/ -/* $Id: types.h,v 1.4 1997-08-31 17:03:27 dfs Exp $ */ +/* $Id: types.h,v 1.5 1997-09-16 03:16:35 dfs Exp $ */ /* Values */ typedef struct { @@ -58,6 +58,8 @@ typedef struct { int priority; char sched[VAR_NAME_LEN+1]; /* Scheduling function */ char warn[VAR_NAME_LEN+1]; /* Warning function */ + char tag[TAG_LEN+1]; + char passthru[PASSTHRU_LEN+1]; } Trigger; /* A time trigger */ @@ -66,6 +68,7 @@ typedef struct { int nexttime; int delta; int rep; + int duration; } TimeTrig; /* The parse pointer */ @@ -109,6 +112,8 @@ typedef Parser *ParsePtr; /* Pointer to parser structure */ #define PS_TYPE 5 #define PSF_TYPE 6 #define MSF_TYPE 7 +#define PASSTHRU_TYPE 8 + /* DEFINES for debugging flags */ #define DB_PRTLINE 1 @@ -138,7 +143,9 @@ enum TokTypes T_Flush, T_Priority, T_Sched, - T_Warn + T_Warn, + T_Tag, + T_Duration }; /* The structure of a token */ diff --git a/version.h b/version.h index a412955c..8dbbe0df 100644 --- a/version.h +++ b/version.h @@ -9,5 +9,5 @@ /* */ /***************************************************************/ -/* $Id: version.h,v 1.6 1997-03-30 19:07:52 dfs Exp $ */ -#define VERSION "03.00.17" +/* $Id: version.h,v 1.7 1997-09-16 03:16:35 dfs Exp $ */ +#define VERSION "03.00.18" diff --git a/www/rem2html b/www/rem2html index aa442782..6628c85c 100755 --- a/www/rem2html +++ b/www/rem2html @@ -2,7 +2,7 @@ # rem2html # -# $Id: rem2html,v 1.2 1997-07-06 14:36:01 dfs Exp $ +# $Id: rem2html,v 1.3 1997-09-16 03:16:42 dfs Exp $ # # A script to convert from the output of "remind -p" to Hyper-Text Markup # Language (HTML), the text format used in WWW documents. By default, it @@ -91,6 +91,8 @@ sub parse_options { sub parse_input { local $where = 0; local $msg; + local $type; + local $day; @days = (); while (<>) { @@ -109,10 +111,16 @@ sub parse_input { @nextsc = split(" "); } else { last if /rem2(html|ps) end/; - next unless m%^(\d*)/*(\d*)/*(\d*) ([^ ]*)?\s*(.*)$%; - $msg = $5; - $msg = "$4 $msg" if $4; - $days[$3] .= "

$msg

"; + next unless m/^(....).(\d*).(\d*)\s+(\S+)\s+(\S+)\s+(\S+)\s*(.*)$/; + $type = $1; + $msg = $7; + $day = $3; + next unless ($type eq "HTML" || ($type =~ /\d\d\d\d/)); + if ($type eq "HTML") { + $days[$day] .= "$msg "; + } else { + $days[$day] .= "

$msg

"; + } } $where++; }