Remove OS2_POPUP crap.

This commit is contained in:
dfs
2005-09-28 02:39:11 +00:00
parent f786d05c04
commit da1b5ed9a0
6 changed files with 17 additions and 112 deletions

View File

@@ -1,4 +1,4 @@
$Id: README.OS2,v 1.4 2005-04-12 01:18:22 dfs Exp $
$Id: README.OS2,v 1.5 2005-09-28 02:39:11 dfs Exp $
REMIND version 3.0 for OS/2
I DO NOT SUPPORT REMIND ON OS/2. THE OS/2 PORT HAS NOT BEEN MAINTAINED
@@ -46,7 +46,7 @@ However, if you have problems, please contact me.
RELEASE NOTES -- miscellaneous info that couldn't go anywhere else!
1. POPUP REMINDERS
1. POPUP REMINDERS -- NO LONGER WORK; CODE FOR THIS WAS REMOVED.
If you define the symbol OS2_POPUP in the OS/2 Makefile, you get
"full-screen popups" (as implemented by Russ Herman) for all MSG-

View File

@@ -13,7 +13,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: dorem.c,v 1.10 2005-04-12 01:49:45 dfs Exp $";
static char const RCSID[] = "$Id: dorem.c,v 1.11 2005-09-28 02:39:14 dfs Exp $";
#include <stdio.h>
#include <ctype.h>
@@ -123,11 +123,7 @@ ParsePtr p;
if (ShouldTriggerReminder(&trig, &tim, jul)) {
#ifdef OS2_POPUP
if ( (r=TriggerReminder(p, &trig, &tim, jul, 0)) )
#else
if ( (r=TriggerReminder(p, &trig, &tim, jul)) )
#endif
if ( (r=TriggerReminder(p, &trig, &tim, jul)) )
{
return r;
}
@@ -582,27 +578,13 @@ PRIVATE int ParseScanFrom(ParsePtr s, Trigger *t)
/* */
/***************************************************************/
#ifdef HAVE_PROTOS
#ifdef OS2_POPUP
PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
int AsPopUp)
#else /* ! OS2_POPUP */
PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
#endif /* OS2_POPUP */
#else /* ! HAVE_PROTOS */
#ifdef OS2_POPUP
int TriggerReminder(p, t, tim, jul, AsPopUp)
ParsePtr p;
Trigger *t;
TimeTrig *tim;
int jul;
int AsPopUp;
#else /* ! OS2_POPUP */
int TriggerReminder(p, t, tim, jul)
ParsePtr p;
Trigger *t;
TimeTrig *tim;
int jul;
#endif /* OS2_POPUP */
#endif /* HAVE_PROTOS */
{
int r, y, m, d;
@@ -624,14 +606,7 @@ PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
if (!DoSubstFromString(DBufValue(&Banner), &buf,
JulianToday, NO_TIME) &&
DBufLen(&buf)) {
#ifdef OS2_POPUP
if (AsPopUp)
PutlPopUp(DBufValue(&buf));
else
printf("%s\n", DBufValue(&buf));
#else
printf("%s\n", DBufValue(&buf));
#endif
}
DBufFree(&buf);
}
@@ -645,24 +620,9 @@ PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
return OK;
}
FromJulian(jul, &y, &m, &d);
#ifdef OS2_POPUP
if (AsPopUp) {
char tmpBuf[64];
sprintf(tmpBuf, "%04d%c%02d%c%02d %s", y, DATESEP, m+1, DATESEP, d,
SimpleTime(tim->ttime));
StartPopUp();
PutsPopUp(tmpBuf);
PutlPopUp(DBufValue(&buf));
}
else
printf("%04d%c%02d%c%02d %s%s\n", y, DATESEP, m+1, DATESEP, d,
SimpleTime(tim->ttime),
DBufValue(&buf));
#else
printf("%04d%c%02d%c%02d %s%s\n", y, DATESEP, m+1, DATESEP, d,
SimpleTime(tim->ttime),
DBufValue(&buf));
#endif
DBufFree(&buf);
return OK;
}
@@ -723,29 +683,12 @@ PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
if (MsgCommand) {
DoMsgCommand(MsgCommand, DBufValue(&buf));
} else {
#ifdef OS2_POPUP
if (AsPopUp)
PutlPopUp(DBufValue(&buf));
else
printf("%s", DBufValue(&buf));
#else
printf("%s", DBufValue(&buf));
#endif
}
break;
case MSF_TYPE:
#ifdef OS2_POPUP
if (AsPopUp) {
StartPopUp();
FillParagraph(DBufValue(&buf), 1);
EndPopUp();
} else {
FillParagraph(DBufValue(&buf), 0);
}
#else
FillParagraph(DBufValue(&buf));
#endif
break;
case RUN_TYPE:

View File

@@ -12,7 +12,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: main.c,v 1.11 2000-02-18 03:46:01 dfs Exp $";
static char const RCSID[] = "$Id: main.c,v 1.12 2005-09-28 02:39:14 dfs Exp $";
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
@@ -76,11 +76,7 @@ long timelocal ARGS((struct tm *tm));
/* Whooo... the putchar/Putchar/PutChar macros are a mess...
my apologies... */
#ifdef OS2_POPUP
#define Putchar(c) {if (AsPopUp) PutcPopUp(c); else putchar(c);}
#else
#define Putchar(c) PutChar(c)
#endif
/***************************************************************/
/***************************************************************/
@@ -1345,21 +1341,11 @@ int jul, tim, *mins, *isdst;
#define ISBLANK(c) (isspace(c) && (c) != '\n')
#ifdef HAVE_PROTOS
#ifdef OS2_POPUP
PUBLIC void FillParagraph(char *s, int AsPopUp)
#else
PUBLIC void FillParagraph(char *s)
#endif
#else
#ifdef OS2_POPUP
void FillParagraph(s, AsPopUp)
char *s;
int AsPopUp;
#else
void FillParagraph(s)
char *s;
#endif
#endif
{
int line = 0;

View File

@@ -10,7 +10,7 @@
/* */
/***************************************************************/
/* $Id: protos.h,v 1.8 2000-02-18 03:46:05 dfs Exp $ */
/* $Id: protos.h,v 1.9 2005-09-28 02:39:14 dfs Exp $ */
#ifdef HAVE_PROTOS
#define ARGS(x) x
@@ -38,12 +38,7 @@ int DoRem ARGS ((ParsePtr p));
int DoFlush ARGS ((ParsePtr p));
void DoExit ARGS ((ParsePtr p));
int ParseRem ARGS ((ParsePtr s, Trigger *trig, TimeTrig *tim));
#ifdef OS2_POPUP
int TriggerReminder ARGS ((ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
int AsPopUp));
#else
int TriggerReminder ARGS ((ParsePtr p, Trigger *t, TimeTrig *tim, int jul));
#endif
int ShouldTriggerReminder ARGS ((Trigger *t, TimeTrig *tim, int jul));
int DoSubst ARGS ((ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul, int mode));
int DoSubstFromString ARGS ((char *source, DynamicBuffer *dbuf, int jul, int tim));
@@ -141,11 +136,7 @@ int GetSysVar ARGS ((const char *name, Value *val));
int SetSysVar ARGS ((const char *name, Value *val));
void DumpSysVarByName ARGS ((const char *name));
int CalcMinsFromUTC ARGS ((int jul, int tim, int *mins, int *isdst));
#ifdef OS2_POPUP
void FillParagraph ARGS ((char *s, int AsPopUp));
#else
void FillParagraph ARGS ((char *s));
#endif
void LocalToUTC ARGS ((int locdate, int loctime, int *utcdate, int *utctime));
void UTCToLocal ARGS ((int utcdate, int utctime, int *locdate, int *loctime));
int MoonPhase ARGS ((int date, int time));
@@ -160,13 +151,6 @@ void GotSigInt ARGS ((void));
#if defined(__OS2__)
int fork ARGS ((void));
#if defined(OS2_POPUP)
void StartPopUp ARGS ((void));
void EndPopUp ARGS ((void));
int PutcPopUp ARGS ((int c));
int PutlPopUp ARGS ((char *s));
int PutsPopUp ARGS ((char *s));
#endif
#endif
#ifdef BROKEN_PUTC

View File

@@ -11,7 +11,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: queue.c,v 1.16 2000-06-26 14:44:07 dfs Exp $";
static char const RCSID[] = "$Id: queue.c,v 1.17 2005-09-28 02:39:14 dfs Exp $";
/* Solaris needs this to get select() prototype */
#ifdef __sun__
@@ -180,9 +180,9 @@ void HandleQueuedReminders()
Daemon = 0;
} else FileModTime = StatBuf.st_mtime;
}
/* Initialize the queue - initialize all the entries time of issue */
while (q) {
q->tt.nexttime = (int) (SystemTime(0)/60 - 1);
q->tt.nexttime = CalculateNextTime(q);
@@ -256,20 +256,16 @@ void HandleQueuedReminders()
}
/* Set up global variables so some functions like trigdate()
and trigtime() work correctly */
and trigtime() work correctly */
LastTriggerDate = JulianToday;
LastTriggerTime = q->tt.ttime;
LastTrigValid = 1;
#ifdef OS2_POPUP
(void) TriggerReminder(&p, &trig, &q->tt, JulianToday, 1);
#else
(void) TriggerReminder(&p, &trig, &q->tt, JulianToday);
#endif
if (Daemon < 0) {
printf("NOTE endreminder\n");
}
fflush(stdout);
/* Calculate the next trigger time */
q->tt.nexttime = CalculateNextTime(q);
}
@@ -278,7 +274,7 @@ void HandleQueuedReminders()
#endif
exit(0);
}
/***************************************************************/
/* */
@@ -312,7 +308,7 @@ QueuedRem *q;
}
if (delta == NO_DELTA) {
if (tim < curtime) {
return NO_TIME;
return NO_TIME;
} else {
return tim;
}
@@ -347,12 +343,12 @@ static QueuedRem *FindNextReminder()
if (!ans) ans = q;
else if (q->tt.nexttime < ans->tt.nexttime) ans = q;
}
q = q->next;
}
return ans;
}
/***************************************************************/
/* */
@@ -455,7 +451,7 @@ QueuedRem *q;
if (v.type == TIM_TYPE) {
ThisTime = v.v.val;
} else if (v.type == INT_TYPE) {
if (v.v.val > 0)
if (v.v.val > 0)
ThisTime = q->tt.nexttime + v.v.val;
else
ThisTime = q->tt.ttime + v.v.val;

View File

@@ -11,7 +11,7 @@
/***************************************************************/
#include "config.h"
static char const RCSID[] = "$Id: sort.c,v 1.6 2000-02-18 03:46:09 dfs Exp $";
static char const RCSID[] = "$Id: sort.c,v 1.7 2005-09-28 02:39:14 dfs Exp $";
#include <stdio.h>
#include <string.h>
@@ -173,11 +173,7 @@ void IssueSortedReminders()
break;
case MSF_TYPE:
#ifdef OS2_POPUP
FillParagraph(cur->text, 0);
#else
FillParagraph(cur->text);
#endif
break;
case RUN_TYPE: