mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 14:28:40 +02:00
Compare commits
19 Commits
v03_00_14
...
v3_00_15_g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3183d6340e | ||
|
|
4d37a817cd | ||
|
|
072e5ffe3e | ||
|
|
28dfd69147 | ||
|
|
82f15a7d4a | ||
|
|
b681b72515 | ||
|
|
a255620f76 | ||
|
|
0990ec1967 | ||
|
|
28e147ec87 | ||
|
|
2b609c899c | ||
|
|
e10dd441b0 | ||
|
|
754aefebc2 | ||
|
|
79094a2ca5 | ||
|
|
6f03e960e8 | ||
|
|
2dd2a8ad6d | ||
|
|
0050c317f5 | ||
|
|
ab76407b51 | ||
|
|
d65532d43b | ||
|
|
b1928fe92d |
15
COPYRIGHT
15
COPYRIGHT
@@ -1,4 +1,4 @@
|
||||
$Id: COPYRIGHT,v 1.2 1996-05-25 18:14:49 dfs Exp $
|
||||
$Id: COPYRIGHT,v 1.4 1996-10-12 03:13:04 dfs Exp $
|
||||
THE REMIND COPYRIGHT
|
||||
|
||||
1. REMIND refers to the entire set of files and documentation in the
|
||||
@@ -7,16 +7,19 @@ REMIND package.
|
||||
2. REMIND is Copyright 1992-1996 by David Skoll,
|
||||
except where noted in individual files.
|
||||
|
||||
3. REMIND is distributed under the GNU General Public License,
|
||||
Version 2, WITH THE FOLLOWING IMPORTANT MODIFICATIONS:
|
||||
|
||||
Notwithstanding any statements in the GNU General Public License:
|
||||
3. DISTRIBUTION AND USE
|
||||
|
||||
a) REMIND may not be used under Microsoft Windows (3.0, 3.1, 95
|
||||
or NT) or any future version of Windows. Such use constitutes
|
||||
a violation of copyright.
|
||||
|
||||
b) REMIND may not be used by Cadabra Design Libraries Inc. or its
|
||||
directors. Such use constitutes a violation of copyright.
|
||||
directors, nor by any of Cadabra's subsidiaries or their directors.
|
||||
Such use constitutes a violation of copyright.
|
||||
|
||||
c) Except for situations (a) and (b), REMIND may be used and
|
||||
distributed according to the terms of the GNU General Public
|
||||
License, Version 2, which follows:
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
28
Makefile
28
Makefile
@@ -1,5 +1,5 @@
|
||||
# Makefile for REMIND
|
||||
# $Id: Makefile,v 1.9 1996-05-26 03:17:35 dfs Exp $
|
||||
# $Id: Makefile,v 1.15 1996-10-27 21:49:54 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.14
|
||||
VERSION= 03.00.15
|
||||
MATHLIB= -lm
|
||||
|
||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
||||
@@ -64,7 +64,7 @@ danish.h polish.h
|
||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
||||
|
||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
||||
polish.h
|
||||
polish.h portbr.h italian.h
|
||||
|
||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c hbcal.c \
|
||||
init.c main.c moon.c omit.c sort.c queue.c token.c trigger.c userfns.c \
|
||||
@@ -74,14 +74,14 @@ MANIFEST=COPYRIGHT Makefile Makefile_QDOS README.AMIGA README.BCC \
|
||||
README.DOS README.OS2 README.UNIX README_QDOS WHATSNEW.30 \
|
||||
amiga-SCOPTIONS amiga.c calendar.c config.h danish.h defs.rem dorem.c \
|
||||
dosubst.c dutch.h english.h err.h expr.c expr.h files.c finnish.h \
|
||||
french.h funcs.c german.h globals.c globals.h hbcal.c init.c kall \
|
||||
french.h funcs.c german.h globals.c globals.h hbcal.c init.c italian.h kall \
|
||||
kall.1 lang.h lnk.bcc lnk.msc lnk.tc main.c makefile.bcc makefile.msc \
|
||||
makefile.os2 makefile.tc moon.c norwgian.h omit.c os2func.c polish.h \
|
||||
protos.h queue.c rem rem.1 rem2ps.1 rem2ps.c rem2ps.h remind-all.csh \
|
||||
remind-all.sh remind.1 remind.def smakefile sort.c test-rem \
|
||||
test-rem.ami test-rem.bat test-rem.cmd test-rem.rexx test.cmp test.rem \
|
||||
test1.cmp test2.cmp tkremind tkremind.1 token.c trigger.c tstlang.rem \
|
||||
types.h userfns.c utils.c var.c version.h
|
||||
types.h userfns.c utils.c var.c version.h remind.LSM portbr.h
|
||||
|
||||
OBJS= $(SRCS:.c=.o)
|
||||
|
||||
@@ -130,9 +130,13 @@ var.o: var.c $(STDHDRS) expr.h
|
||||
# probably won't be too useful to you! -- dfs
|
||||
|
||||
tgz:
|
||||
tar cvf remind-3.0.14.tar $(MANIFEST)
|
||||
gzip -v -9 remind-3.0.14.tar
|
||||
mv remind-3.0.14.tar.gz remind-3.0.14.tgz
|
||||
-rm -rf remind-$(VERSION)
|
||||
-mkdir remind-$(VERSION)
|
||||
cd remind-$(VERSION); for i in $(MANIFEST) ;do ln -s ../$$i .; done; cd ..
|
||||
tar -c -h -v -f remind-3.0.15.tar remind-$(VERSION)
|
||||
gzip -v -9 remind-3.0.15.tar
|
||||
mv remind-3.0.15.tar.gz remind-3.0.15.tgz
|
||||
rm -rf remind-$(VERSION)
|
||||
|
||||
shar:
|
||||
shar -o./Shar -sdfs@doe.carleton.ca -a -c -n"Remind $(VERSION)" -m -l58 -o./Shar $(MANIFEST)
|
||||
@@ -172,6 +176,10 @@ install-scripts:
|
||||
-chmod $(EXEMODE) $(SCRIPTDIR)/rem
|
||||
-chown $(OWNER) $(SCRIPTDIR)/rem
|
||||
-chgrp $(GROUP) $(SCRIPTDIR)/rem
|
||||
cp tkremind $(SCRIPTDIR)/tkremind
|
||||
-chmod $(EXEMODE) $(SCRIPTDIR)/tkremind
|
||||
-chown $(OWNER) $(SCRIPTDIR)/tkremind
|
||||
-chgrp $(GROUP) $(SCRIPTDIR)/tkremind
|
||||
|
||||
install-man:
|
||||
cp remind.1 $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
|
||||
@@ -198,9 +206,9 @@ install-man:
|
||||
release:
|
||||
-mkdir RELEASE
|
||||
-rm -f RELEASE/*
|
||||
mkpatch ../prev . patch.14 Shar "Remind-3.0/Patch-14/part"
|
||||
mkpatch ../prev . patch.15 Shar "Remind-3.0/Patch-15/part"
|
||||
mv Shar* RELEASE
|
||||
rm -f patch.14*
|
||||
rm -f patch.15*
|
||||
for i in *.1; do nroff -man $$i | sed -e 's/_//g' > `basename $$i .1`.man; done
|
||||
mv *.man RELEASE
|
||||
for i in *.1; do groff -man -Tps $$i > `basename $$i .1`.ps; done
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#$Id: Makefile_QDOS,v 1.2 1996-03-31 04:08:10 dfs Exp $
|
||||
#$Id: Makefile_QDOS,v 1.3 1996-09-28 18:17:06 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.14
|
||||
VERSION= 03.00.15
|
||||
MATHLIB= -lm
|
||||
|
||||
HDRS= config_h err_h expr_h globals_h protos_h types_h version_h \
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
$Id: README.DOS,v 1.1 1996-03-27 03:25:49 dfs Exp $
|
||||
$Id: README.DOS,v 1.2 1996-10-12 02:59:06 dfs Exp $
|
||||
REMIND version 3.0 for MS-DOS
|
||||
|
||||
IMPORTANT NOTE: I'm no longer officially supporting Remind under
|
||||
DOS. It may very well work, but if it doesn't... you're on your own.
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the man page, "remind.1".
|
||||
|
||||
|
||||
12
README.UNIX
12
README.UNIX
@@ -1,4 +1,4 @@
|
||||
$Id: README.UNIX,v 1.1 1996-03-27 03:25:49 dfs Exp $
|
||||
$Id: README.UNIX,v 1.2 1996-10-12 02:59:06 dfs Exp $
|
||||
REMIND version 3.0 for UNIX
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
@@ -14,11 +14,13 @@ in the man page, "remind.1".
|
||||
|
||||
3 - Examine the Makefile and change any parameters which need to be
|
||||
changed for your system. As it stands, the Makefile is set up for a
|
||||
BSD system.
|
||||
Linux system.
|
||||
|
||||
4 - Examine the file config.h and adjust parameters as needed
|
||||
|
||||
5 - Examine lang.h and choose the language you want Remind to use.
|
||||
(You can do this on the "make" command-line -- see "OTHER
|
||||
LANGUAE SUPPORT.)
|
||||
|
||||
6 - Type 'make'
|
||||
|
||||
@@ -68,6 +70,12 @@ only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french.h" for an
|
||||
example of the latter.
|
||||
|
||||
To compile Remind for a non-english language, look at the constants
|
||||
defined in "lang.h". Then, to compile Remind for Italian (as an
|
||||
example), type:
|
||||
|
||||
make "CDEFS=-DLANG=ITALIAN"
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$Id: README_QDOS,v 1.2 1996-03-31 04:08:11 dfs Exp $
|
||||
REMIND version 3.0.14 for QDOS / SMSQ
|
||||
$Id: README_QDOS,v 1.3 1996-09-28 18:17:07 dfs Exp $
|
||||
REMIND version 3.0.15 for QDOS / SMSQ
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the documentation file, "remind_doc" (QUILL format).
|
||||
|
||||
30
WHATSNEW.30
30
WHATSNEW.30
@@ -1,5 +1,35 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* Version 3.0 Patch 15
|
||||
|
||||
+ IMPORTANT NOTES
|
||||
|
||||
- The tar file now unpacks into a Remind subdirectory rather than into
|
||||
the current working directory.
|
||||
|
||||
- I no longer support Remind under DOS. I don't think I've done anything
|
||||
to stop it from working under DOS, but will no longer compile and test
|
||||
it under DOS, and can't help you if you get stuck. Sorry -- I no longer
|
||||
have a DOS machine.
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Changed psshade() to accept 1 or 3 arguments for colored shading in
|
||||
PostScript calendar mode.
|
||||
|
||||
- Added a Print dialog to tkremind.
|
||||
|
||||
- Added support for Brazilian Portuguese courtesy of Marco Paganini
|
||||
|
||||
- Added support for Italian courtesy of Valerio Aimale
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed confusing error in rem2ps help messages.
|
||||
|
||||
- Fixed bug in TkRemind which caused a crash if the "-m" option was used
|
||||
for a month beginning on Sunday. Doh!!!
|
||||
|
||||
* Version 3.0 Patch 14
|
||||
|
||||
+ CHANGE IN COPYING POLICY
|
||||
|
||||
4
config.h
4
config.h
@@ -11,7 +11,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: config.h,v 1.4 1996-05-25 18:14:51 dfs Exp $ */
|
||||
/* $Id: config.h,v 1.5 1996-10-12 02:49:32 dfs Exp $ */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* LAT_DEG, LAT_MIN and LAT_SEC: Latitude of your location */
|
||||
@@ -73,7 +73,7 @@
|
||||
/* ISOLATIN1: uncomment the following line if your system uses the */
|
||||
/* ISO 8859-1 character set instead of ASCII. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* #define ISOLATIN1 1 */
|
||||
#define ISOLATIN1 1
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* IBMEXTENDED: uncomment the following line if you want to use the */
|
||||
|
||||
13
dosubst.c
13
dosubst.c
@@ -10,7 +10,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: dosubst.c,v 1.2 1996-04-29 19:34:36 dfs Exp $";
|
||||
static char const RCSID[] = "$Id: dosubst.c,v 1.3 1996-10-12 02:49:32 dfs Exp $";
|
||||
|
||||
#define L_IN_DOSUBST
|
||||
#include "config.h"
|
||||
@@ -78,8 +78,19 @@ int jul, mode;
|
||||
adiff = ABS(tdiff);
|
||||
mdiff = adiff % 60;
|
||||
hdiff = adiff / 60;
|
||||
|
||||
#ifdef L_MPLU_OVER
|
||||
L_MPLU_OVER
|
||||
#else /* L_MPLU_OVER */
|
||||
mplu = (mdiff == 1 ? "" : L_MPLU);
|
||||
#endif /* L_MPLU_OVER */
|
||||
|
||||
#ifdef L_HPLU_OVER
|
||||
L_HPLU_OVER
|
||||
#else /* L_HPLU_OVER */
|
||||
hplu = (hdiff == 1 ? "" : L_HPLU);
|
||||
#endif /* L_HPLU_OVER */
|
||||
|
||||
when = (tdiff < 0 ? L_AGO : L_FROMNOW);
|
||||
|
||||
h = tim / 60;
|
||||
|
||||
23
funcs.c
23
funcs.c
@@ -10,7 +10,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: funcs.c,v 1.3 1996-03-31 04:01:56 dfs Exp $";
|
||||
static char const RCSID[] = "$Id: funcs.c,v 1.4 1996-10-06 21:03:49 dfs Exp $";
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
@@ -228,7 +228,7 @@ Operator Func[] = {
|
||||
{ "ostype", 0, 0, FOstype },
|
||||
{ "plural", 1, 3, FPlural },
|
||||
{ "psmoon", 1, 4, FPsmoon},
|
||||
{ "psshade", 1, 1, FPsshade},
|
||||
{ "psshade", 1, 3, FPsshade},
|
||||
{ "realnow", 0, 0, FRealnow},
|
||||
{ "realtoday", 0, 0, FRealtoday },
|
||||
{ "sgn", 1, 1, FSgn },
|
||||
@@ -2155,9 +2155,16 @@ static int FPsshade()
|
||||
{
|
||||
char psbuff[256];
|
||||
char *s = psbuff;
|
||||
if (ARG(0).type != INT_TYPE) return E_BAD_TYPE;
|
||||
if (ARG(0).v.val < 0) return E_2LOW;
|
||||
if (ARG(0).v.val > 100) return E_2HIGH;
|
||||
int i;
|
||||
|
||||
/* 1 or 3 args */
|
||||
if (Nargs != 1 && Nargs != 3) return E_2MANY_ARGS;
|
||||
|
||||
for (i=0; i<Nargs; i++) {
|
||||
if (ARG(i).type != INT_TYPE) return E_BAD_TYPE;
|
||||
if (ARG(i).v.val < 0) return E_2LOW;
|
||||
if (ARG(i).v.val > 100) return E_2HIGH;
|
||||
}
|
||||
|
||||
sprintf(s, "/_A LineWidth 2 div def ");
|
||||
s += strlen(s);
|
||||
@@ -2165,7 +2172,11 @@ static int FPsshade()
|
||||
s += strlen(s);
|
||||
sprintf(s, "BoxWidth _A sub _A lineto BoxWidth _A sub BoxHeight _A sub lineto ");
|
||||
s += strlen(s);
|
||||
sprintf(s, "_A BoxHeight _A sub lineto closepath %d 100 div setgray fill 0.0 setgray", ARG(0).v.val);
|
||||
if (Nargs == 1) {
|
||||
sprintf(s, "_A BoxHeight _A sub lineto closepath %d 100 div setgray fill 0.0 setgray", ARG(0).v.val);
|
||||
} else {
|
||||
sprintf(s, "_A BoxHeight _A sub lineto closepath %d 100 div %d 100 div %d 100 div setrgbcolor fill 0.0 setgray", ARG(0).v.val, ARG(1).v.val, ARG(2).v.val);
|
||||
}
|
||||
return RetStrVal(psbuff);
|
||||
}
|
||||
|
||||
|
||||
14
init.c
14
init.c
@@ -11,7 +11,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: init.c,v 1.2 1996-04-28 02:01:58 dfs Exp $";
|
||||
static char const RCSID[] = "$Id: init.c,v 1.3 1996-10-27 21:28:03 dfs Exp $";
|
||||
|
||||
#define L_IN_INIT 1
|
||||
#include "config.h"
|
||||
@@ -77,12 +77,12 @@ static char const RCSID[] = "$Id: init.c,v 1.2 1996-04-28 02:01:58 dfs Exp $";
|
||||
|
||||
/* For parsing an integer */
|
||||
#define PARSENUM(var, s) \
|
||||
var = 0; \
|
||||
while (isdigit(*(s))) { \
|
||||
var *= 10; \
|
||||
var += *(s) - '0'; \
|
||||
s++; \
|
||||
}
|
||||
var = 0; \
|
||||
while (isdigit(*(s))) { \
|
||||
var *= 10; \
|
||||
var += *(s) - '0'; \
|
||||
s++; \
|
||||
}
|
||||
|
||||
#ifdef UNIX
|
||||
PRIVATE void ChgUser ARGS((char *uname));
|
||||
|
||||
139
italian.h
Normal file
139
italian.h
Normal file
@@ -0,0 +1,139 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ITALIAN.H */
|
||||
/* */
|
||||
/* Support for the Italian language. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* It is Copyright (C) 1996 by Valerio Aimale */
|
||||
/* */
|
||||
/* Remind is copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: italian.h,v 1.1 1996-10-12 02:49:33 dfs Exp $ */
|
||||
|
||||
/* The very first define in a language support file must be L_LANGNAME: */
|
||||
#define L_LANGNAME "Italian"
|
||||
|
||||
/* Day names */
|
||||
#ifdef ISOLATIN1
|
||||
#define L_SUNDAY "Domenica"
|
||||
#define L_MONDAY "Luned\354"
|
||||
#define L_TUESDAY "Marted\354"
|
||||
#define L_WEDNESDAY "Mercoled\354"
|
||||
#define L_THURSDAY "Gioved\354"
|
||||
#define L_FRIDAY "Venerd\354"
|
||||
#define L_SATURDAY "Sabato"
|
||||
#else /* ISOLATIN1 */
|
||||
#define L_SUNDAY "Domenica"
|
||||
#define L_MONDAY "Lunedi`"
|
||||
#define L_TUESDAY "Martedi`"
|
||||
#define L_WEDNESDAY "Mercoledi`"
|
||||
#define L_THURSDAY "Giovedi`"
|
||||
#define L_FRIDAY "Venerdi`"
|
||||
#define L_SATURDAY "Sabato"
|
||||
#endif /* ISOLATIN */
|
||||
|
||||
|
||||
/* Day initials - first letter only */
|
||||
#define L_DAYINIT "DLMMGVS"
|
||||
|
||||
/* Month names */
|
||||
#define L_JAN "Gennaio"
|
||||
#define L_FEB "Febbraio"
|
||||
#define L_MAR "Marzo"
|
||||
#define L_APR "Aprile"
|
||||
#define L_MAY "Maggio"
|
||||
#define L_JUN "Giugno"
|
||||
#define L_JUL "Luglio"
|
||||
#define L_AUG "Agosto"
|
||||
#define L_SEP "Settembre"
|
||||
#define L_OCT "Ottobre"
|
||||
#define L_NOV "Novembre"
|
||||
#define L_DEC "Dicembre"
|
||||
|
||||
/* Today and tomorrow */
|
||||
#define L_TODAY "oggi"
|
||||
|
||||
#define L_TOMORROW "domani"
|
||||
|
||||
/* The default banner */
|
||||
#define L_BANNER "Promemoria per %w, %d %m %y%o:"
|
||||
|
||||
/* "am" and "pm" */
|
||||
#define L_AM "am"
|
||||
#define L_PM "pm"
|
||||
|
||||
/*** The following are only used in dosubst.c ***/
|
||||
#ifdef L_IN_DOSUBST
|
||||
|
||||
/* Ago and from now */
|
||||
#define L_AGO "fa"
|
||||
#define L_FROMNOW "da oggi"
|
||||
|
||||
/* "in %d days' time" */
|
||||
#define L_INXDAYS "fra %d giorni"
|
||||
|
||||
/* "on" as in "on date..." */
|
||||
#define L_ON ""
|
||||
|
||||
/* Pluralizing - this is a problem for many languages and may require
|
||||
a more drastic fix */
|
||||
|
||||
/* Minutes, hours, at, etc */
|
||||
#define L_NOW "ora"
|
||||
#define L_AT "alle"
|
||||
#define L_MINUTE "minut"
|
||||
#define L_HOUR "or"
|
||||
#ifdef ISOLATIN1
|
||||
#define L_IS "\350"
|
||||
#else /* ISOLATIN1 */
|
||||
#define L_IS "e`"
|
||||
#endif/* ISOLATIN1 */
|
||||
#define L_WAS "era"
|
||||
#define L_AND "e"
|
||||
/* What to add to make "hour" plural */
|
||||
#define L_HPLU "s"
|
||||
/* What to add to make "minute" plural */
|
||||
#define L_MPLU "s"
|
||||
|
||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
||||
See the file dosubst.c for more info. */
|
||||
|
||||
#define L_P_OVER sprintf(s, (diff == 1 ? "o" : "i"));
|
||||
#define L_Q_OVER sprintf(s, (diff == 1 ? "a" : "e"));
|
||||
|
||||
#define L_HPLU_OVER hplu = (hdiff == 1 ? "a" : "e");
|
||||
#define L_MPLU_OVER mplu = (mdiff == 1 ? "o" : "i");
|
||||
|
||||
#define L_A_OVER sprintf(s, "%s, %d %s %d", DayName[jul%7], d,\
|
||||
MonthName[m], y);
|
||||
#define L_C_OVER sprintf(s, "%s", DayName[jul%7]);
|
||||
|
||||
#define L_E_OVER sprintf(s, "%02d%c%02d%c%04d", d, DATESEP,\
|
||||
m+1, DATESEP, y);
|
||||
|
||||
#define L_F_OVER sprintf(s, "%02d%c%02d%c%04d", m+1, DATESEP, d, DATESEP, y);
|
||||
|
||||
#define L_G_OVER sprintf(s, "%s, %d %s", DayName[jul%7], d, MonthName[m]);
|
||||
|
||||
#define L_H_OVER sprintf(s, "%02d%c%02d", d, DATESEP, m+1);
|
||||
|
||||
#define L_I_OVER sprintf(s, "%02d%c%02d", m+1, DATESEP, d);
|
||||
|
||||
#define L_J_OVER sprintf(s, "%s, %d %s %d", DayName[jul%7], d, \
|
||||
MonthName[m], y);
|
||||
|
||||
#define L_K_OVER sprintf(s, "%s, %d %s", DayName[jul%7], d, \
|
||||
MonthName[m]);
|
||||
#define L_L_OVER sprintf(s, "%04d%c%02d%c%02d", y, DATESEP, m+1, DATESEP, d);
|
||||
|
||||
#define L_U_OVER sprintf(s, "%s, %d %s %d", DayName[jul%7], d, \
|
||||
MonthName[m], y);
|
||||
|
||||
#define L_V_OVER sprintf(s, "%s, %d %s", DayName[jul%7], d, \
|
||||
MonthName[m]);
|
||||
|
||||
|
||||
#endif /* L_IN_DOSUBST */
|
||||
8
lang.h
8
lang.h
@@ -9,7 +9,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: lang.h,v 1.2 1996-04-29 19:34:38 dfs Exp $ */
|
||||
/* $Id: lang.h,v 1.4 1996-10-12 02:49:33 dfs Exp $ */
|
||||
|
||||
/* I'm chauvinistic and name each language with its English name... */
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#define NORWEGIAN 5 /* translated by Trygve Randen */
|
||||
#define DANISH 6 /* translated by Mogens Lynnerup */
|
||||
#define POLISH 7 /* translated by Jerzy Sobczyk */
|
||||
#define BRAZPORT 8 /* Brazilian Portuguese by Marco Paganini */
|
||||
#define ITALIAN 9 /* translated by Valerio Aimale */
|
||||
|
||||
/* Add more languages here - but please e-mail aa775@freenet.carleton.ca
|
||||
to have your favorite language assigned a number. If you add a
|
||||
@@ -56,6 +58,10 @@
|
||||
#include "danish.h"
|
||||
#elif LANG == POLISH
|
||||
#include "polish.h"
|
||||
#elif LANG == BRAZPORT
|
||||
#include "portbr.h"
|
||||
#elif LANG == ITALIAN
|
||||
#include "italian.h"
|
||||
|
||||
/* If no sensible language, choose English. I intended to use
|
||||
the #error directive here, but some C compilers barf. */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for REMIND for Borland C++
|
||||
# $Id: makefile.bcc,v 1.2 1996-03-31 04:08:11 dfs Exp $
|
||||
# $Id: makefile.bcc,v 1.3 1996-09-28 18:17:07 dfs Exp $
|
||||
|
||||
VERSION= 03.00.14
|
||||
VERSION= 03.00.15
|
||||
|
||||
MODEL=l
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Makefile for REMIND
|
||||
#
|
||||
# $Id: makefile.os2,v 1.1 1996-03-27 03:26:02 dfs Exp $
|
||||
# $Id: makefile.os2,v 1.2 1996-10-12 02:49:34 dfs Exp $
|
||||
#
|
||||
# THIS IS OUT OF DATE!
|
||||
#
|
||||
# - for GNU gcc (emx 0.8g kit) [executables for OS/2 2.x or DOS (32-bit)]
|
||||
# - for Microsoft C 6.00A [executables for OS/2 or MSDOS (16-bit)]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Makefile for REMIND for Turbo C for MSDOS
|
||||
# $Id: makefile.tc,v 1.2 1996-03-31 04:08:11 dfs Exp $
|
||||
# $Id: makefile.tc,v 1.3 1996-09-28 18:17:08 dfs Exp $
|
||||
|
||||
CC= tcc
|
||||
VERSION= 03.00.14
|
||||
VERSION= 03.00.15
|
||||
|
||||
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 \
|
||||
|
||||
297
portbr.h
Normal file
297
portbr.h
Normal file
@@ -0,0 +1,297 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* PORTBR.H */
|
||||
/* */
|
||||
/* Support for the Brazilian Portuguese Language. */
|
||||
/* */
|
||||
/* Contributed by Marco Paganini (paganini@ism.com.br). */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* */
|
||||
/* REMIND is Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* This file is Copyright (C) 1996 by Marco Paganini and */
|
||||
/* David F. Skoll. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: portbr.h,v 1.1 1996-06-22 02:21:29 dfs Exp $ */
|
||||
|
||||
/* The very first define in a language support file must be L_LANGNAME: */
|
||||
#define L_LANGNAME "Brazilian Portuguese"
|
||||
|
||||
/* Day names */
|
||||
#define L_SUNDAY "domingo"
|
||||
#define L_MONDAY "segunda"
|
||||
#define L_TUESDAY "terca"
|
||||
#define L_WEDNESDAY "quarta"
|
||||
#define L_THURSDAY "quinta"
|
||||
#define L_FRIDAY "sexta"
|
||||
#define L_SATURDAY "sabado"
|
||||
|
||||
/* Day initials - first letter only */
|
||||
#define L_DAYINIT "dstqqss"
|
||||
|
||||
/* Month names */
|
||||
#define L_JAN "janeiro"
|
||||
#define L_FEB "fevereiro"
|
||||
#define L_MAR "marco"
|
||||
#define L_APR "abril"
|
||||
#define L_MAY "maio"
|
||||
#define L_JUN "junho"
|
||||
#define L_JUL "julho"
|
||||
#define L_AUG "agosto"
|
||||
#define L_SEP "setembro"
|
||||
#define L_OCT "outubro"
|
||||
#define L_NOV "novembro"
|
||||
#define L_DEC "dezembro"
|
||||
|
||||
/* Today and tomorrow */
|
||||
#define L_TODAY "hoje"
|
||||
#define L_TOMORROW "amanha"
|
||||
|
||||
/* The default banner */
|
||||
#define L_BANNER "Avisos para %w, %d de %m de %y%o:"
|
||||
|
||||
/* "am" and "pm" */
|
||||
#define L_AM "am"
|
||||
#define L_PM "pm"
|
||||
|
||||
/*** The following are only used in dosubst.c ***/
|
||||
#ifdef L_IN_DOSUBST
|
||||
|
||||
/* Ago and from now */
|
||||
#define L_AGO "atras"
|
||||
#define L_FROMNOW "adiante"
|
||||
|
||||
/* "in %d days' time" */
|
||||
#define L_INXDAYS "em %d dias"
|
||||
|
||||
/* "on" as in "on date..." */
|
||||
#define L_ON "em"
|
||||
|
||||
/* Pluralizing - this is a problem for many languages and may require
|
||||
a more drastic fix */
|
||||
#define L_PLURAL "s"
|
||||
|
||||
/* Minutes, hours, at, etc */
|
||||
#define L_NOW "agora"
|
||||
#define L_AT "as"
|
||||
#define L_MINUTE "minuto"
|
||||
#define L_HOUR "hora"
|
||||
#define L_IS "sao"
|
||||
#define L_WAS "eram"
|
||||
#define L_AND "e"
|
||||
|
||||
/* What to add to make "hour" plural */
|
||||
#define L_HPLU "s"
|
||||
/* What to add to make "minute" plural */
|
||||
#define L_MPLU "s"
|
||||
|
||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
||||
See the file dosubst.c for more info. */
|
||||
|
||||
#define L_ORDINAL_OVERRIDE plu = "";
|
||||
|
||||
/* Portuguese weekdays must be treated separately */
|
||||
#define _ON_WEEKDAY(x) ((x % 7) < 2) ? "no" : "na"
|
||||
|
||||
#define L_A_OVER \
|
||||
sprintf(s, "%s %s, %d de %s de %d", _ON_WEEKDAY(jul), DayName[jul%7], d, MonthName[m], y);
|
||||
|
||||
#define L_C_OVER \
|
||||
sprintf(s, "%s %s", _ON_WEEKDAY(jul), DayName[jul%7]);
|
||||
|
||||
#define L_G_OVER \
|
||||
sprintf(s, "%s %s, %d %s", _ON_WEEKDAY(jul), DayName[jul%7], d, MonthName[m]);
|
||||
|
||||
#define L_J_OVER \
|
||||
sprintf(s, "%s %s, %d de %s de %d", _ON_WEEKDAY(jul), DayName[jul%7], d, MonthName[m], y);
|
||||
|
||||
#define L_K_OVER \
|
||||
sprintf(s, "%s %s, %d de %s", _ON_WEEKDAY(jul), DayName[jul%7], d, MonthName[m]);
|
||||
|
||||
/* Portuguese does not use some suffixes, some some %u and %j are the same */
|
||||
#define L_U_OVER \
|
||||
sprintf(s, "%s %s, %d de %s de %d", _ON_WEEKDAY(jul), DayName[jul%7], d, MonthName[m], y);
|
||||
|
||||
#define L_V_OVER \
|
||||
sprintf(s, "%s %s, %d de %s", _ON_WEEKDAY(jul), DayName[jul%7], d, MonthName[m]);
|
||||
|
||||
#define L_1_OVER \
|
||||
{ \
|
||||
if (tdiff == 0) \
|
||||
sprintf(s, L_NOW); \
|
||||
else \
|
||||
if (hdiff == 0) \
|
||||
{ \
|
||||
if (mdiff > 0) \
|
||||
sprintf(s, "em %d %s%s", mdiff, L_MINUTE, mplu); \
|
||||
else \
|
||||
sprintf(s, "%d %s%s atras", mdiff, L_MINUTE, mplu); \
|
||||
} \
|
||||
else if (mdiff == 0) \
|
||||
{ \
|
||||
if (hdiff > 0) \
|
||||
sprintf(s, "em %d %s%s", hdiff, L_HOUR, hplu); \
|
||||
else \
|
||||
sprintf(s, "%d %s%s atras", hdiff, L_HOUR, hplu); \
|
||||
} else { \
|
||||
if (tdiff > 0) \
|
||||
sprintf(s, "em %d %s%s %s %d %s%s", hdiff, L_HOUR, hplu, L_AND, mdiff, L_MINUTE, mplu); \
|
||||
else \
|
||||
sprintf(s, "%d %s%s %s %d %s%s atras", hdiff, L_HOUR, hplu, L_AND, mdiff, L_MINUTE, mplu); \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif /* L_IN_DOSUBST */
|
||||
|
||||
/* The next ones are used only when MK_GLOBALS is set */
|
||||
#ifdef MK_GLOBALS
|
||||
#define L_ERR_OVERRIDE 1
|
||||
EXTERN char *ErrMsg[] =
|
||||
{
|
||||
"Ok",
|
||||
"Falta um ']'",
|
||||
"Falta uma aspa",
|
||||
"Expressao muito complexa - muitos operadores",
|
||||
"Expressao muito complexa - muitos operandos",
|
||||
"Falta um ')'",
|
||||
"Funcao nao definida",
|
||||
"Caracter ilegal",
|
||||
"Esperando operador binario",
|
||||
"Sem memoria",
|
||||
"Numero mal-formado",
|
||||
"Op stack underflow - erro interno",
|
||||
"Va stack underflow - erro interno",
|
||||
"Nao consigo fazer 'coerce'",
|
||||
"Type mismatch",
|
||||
"Overflow na data",
|
||||
"Erro de stack - erro interno",
|
||||
"Divisao por zero",
|
||||
"Variavel nao definida",
|
||||
"Fim da linha nao esperado",
|
||||
"Fim de arquivo nao esperado",
|
||||
"Erro de I/O",
|
||||
"Linha muito longa",
|
||||
"Erro interno",
|
||||
"Especificacao de data invalida",
|
||||
"Argumentos insuficientes",
|
||||
"Argumentos em excesso",
|
||||
"Hora mal-formada",
|
||||
"Numero muito grande",
|
||||
"Numero muito pequeno",
|
||||
"Nao consigo abrir o arquivo",
|
||||
"Ninho de INCLUDEs muito profundo",
|
||||
"Erro de parsing",
|
||||
"Nao consigo computar o 'trigger'",
|
||||
"Muitos IFs aninhados",
|
||||
"ELSE sem o IF correspondente",
|
||||
"ENDIF sem o IF correspondente",
|
||||
"Nao se pode usar OMIT para todos os dias da semana",
|
||||
"Token nao reconhecido na linha",
|
||||
"POP-OMIT-CONTEXT sem PUSH-OMIT-CONTEXT correspondente",
|
||||
"RUN desabilitado",
|
||||
"Erro de dominio",
|
||||
"Identificados invalido",
|
||||
"Chamada de funcao recursiva detectada",
|
||||
"",
|
||||
"Nao posso modificar variavel de sistema",
|
||||
"Funcao da biblioteca C nao pode representar data/hora",
|
||||
"Tentativa de redefinir funcao interna",
|
||||
"Nao e' possivel aninhar definicao de funcao em expressao",
|
||||
"Data deve ser completamente especificada para usar o fator de REPEAT",
|
||||
"Ano especificado duas vezes",
|
||||
"Mes especificado duas vezes",
|
||||
"Dia especificado duas vezes",
|
||||
"Token desconhecido",
|
||||
"Mes e dia devem ser especificados no comando OMIT",
|
||||
"Muitos OMITs parciais",
|
||||
"Muitos OMITs full",
|
||||
"Aviso: PUSH-OMIT-CONTEXT sem POP-OMIT-CONTEXT correspondente",
|
||||
"Erro na leitura do arquivo",
|
||||
"Aguardando fim do arquivo",
|
||||
"Data hebraica invalida",
|
||||
"IIF necessita de numero impar de argumentos",
|
||||
"Warning: ENDIF faltando",
|
||||
"Esperando virgula",
|
||||
"Dia da semana especificado duas vezes",
|
||||
"Use apenas um de BEFORE, AFTER ou SKIP",
|
||||
"Nao e possivel aninhar MSG, MSF, RUN, etc. em expressoes",
|
||||
"Valor de Repeat especificado duas vezes",
|
||||
"Valor de Delta especificado duas vezes",
|
||||
"Valor de Back especificado duas vezes",
|
||||
"ONCE usado duas vezes (Eheheh)",
|
||||
"Esperando hora apos AT",
|
||||
"Keyword UNTIL usada duas vezes",
|
||||
"Especificacao de data incompleta",
|
||||
"Keyword SCANFROM usada duas vezes",
|
||||
"Variavel",
|
||||
"Valor",
|
||||
"*INDEFINIDO*",
|
||||
"Entrando UserFN",
|
||||
"Saindo UserFN",
|
||||
"Expirou",
|
||||
"fork() falhou - Nao posso processar compromissos na fila",
|
||||
"Nao consigo acessar o arquivo",
|
||||
"Data do sistema ilegal: Ano e menor que %d\n",
|
||||
"Flag de debug desconhecido '%c'\n",
|
||||
"Opcao desconhecida '%c'\n",
|
||||
"Usuario desconhecido '%s'\n",
|
||||
"Nao consigo mudar gid para %d\n",
|
||||
"Nao consigo mudar uid para %d\n",
|
||||
"Sem memoria para o environment\n",
|
||||
"Falta o sinal de '='",
|
||||
"Falta o nome da variavel",
|
||||
"Falta a expressao",
|
||||
"Nao consigo resetar a data de acesso de %s\n",
|
||||
"Remind: '-i' opcao: %s\n",
|
||||
"Sem compromissos.",
|
||||
"%d compromisso(s) colocados na fila para mais tarde.\n",
|
||||
"Esperando numero",
|
||||
"Funcao ilegal na clausula WARN"
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
/* The following is only used in init.c */
|
||||
#ifdef L_IN_INIT
|
||||
#define L_USAGE_OVERRIDE 1
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void Usage(void)
|
||||
#else
|
||||
void Usage()
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
fprintf(ErrFp, "\nREMIND %s (versao %s) (C) 1992-1996 by David F. Skoll\n", VERSION, L_LANGNAME);
|
||||
#ifdef BETA
|
||||
fprintf(ErrFp, ">>>> VERSAO BETA <<<<\n");
|
||||
#endif
|
||||
fprintf(ErrFp, "Uso: remind [opcoes] arquivo [data] [hora] [*rep]\n");
|
||||
fprintf(ErrFp, "Opcoes:\n");
|
||||
fprintf(ErrFp, " -n Imprime a proxima ocorrencia em formato simples\n");
|
||||
fprintf(ErrFp, " -r Desabilita a diretiva RUN\n");
|
||||
fprintf(ErrFp, " -c[n] Produz calendario para n (default 1) meses\n");
|
||||
fprintf(ErrFp, " -c+[n] Produz calendario para n (default 1) semanas\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Especifica largura, preenchimento e espacejamento do calendario\n");
|
||||
fprintf(ErrFp, " -s[+][n] Produz um `calendario simples' para n (1) meses (semanas)\n");
|
||||
fprintf(ErrFp, " -p[n] Identico a -s, porem com saida compativel com rem2ps\n");
|
||||
fprintf(ErrFp, " -v Modo verbose\n");
|
||||
fprintf(ErrFp, " -o Ignora diretivas ONCE\n");
|
||||
fprintf(ErrFp, " -t Aciona todos os compromissos futuros, sem considerar o delta\n");
|
||||
fprintf(ErrFp, " -h Modo `Hush' - quieto\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a Nao aciona compromissos com hora imediatamente - apenas coloca na fila\n");
|
||||
fprintf(ErrFp, " -q Nao coloca compromissos com hora na fila\n");
|
||||
fprintf(ErrFp, " -f Aciona compromissos com hora em modo foreground\n");
|
||||
fprintf(ErrFp, " -z[n] Modo `daemon', acordando a cada n (5) minutos.\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trigger v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Desvia mensagens normalmente enviadas a stderr para stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Formato da hora para o cal: 0=am/pm, 1=24hr, 2=nenhum\n");
|
||||
fprintf(ErrFp, " -x[n] Limite de iteracoes para a clausula SATISFY (default=150)\n");
|
||||
fprintf(ErrFp, " -kcmd Executa `cmd' para os compromissos com MSG\n");
|
||||
fprintf(ErrFp, " -g[ddd] Classifica compromissos por data, hora e prioridade antes de exibir\n");
|
||||
fprintf(ErrFp, " -ivar=val Inicializa (e preserva) variavel var com val\n");
|
||||
fprintf(ErrFp, " -m Inicia o calendario na segunda, ao inves de domingo\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif /* L_IN_INIT */
|
||||
3
rem2ps.c
3
rem2ps.c
@@ -9,7 +9,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: rem2ps.c,v 1.3 1996-04-28 02:02:02 dfs Exp $";
|
||||
static char const RCSID[] = "$Id: rem2ps.c,v 1.4 1996-07-07 16:35:42 dfs Exp $";
|
||||
|
||||
#include "config.h"
|
||||
#include "lang.h"
|
||||
@@ -740,7 +740,6 @@ char *s;
|
||||
fprintf(stderr, "-p file Include user-supplied PostScript code in prologue\n");
|
||||
fprintf(stderr, "-l Do calendar in landscape mode\n");
|
||||
fprintf(stderr, "-c[n] Control small calendars: 0=none; 1=bt; 2=tb; 3=sbt\n");
|
||||
fprintf(stderr, " and next month\n");
|
||||
fprintf(stderr, "-i Use ISO 8859-1 encoding in PostScript output\n");
|
||||
fprintf(stderr, "-m media Set page size (eg, Letter, Legal, A4.) Case sensitive!\n");
|
||||
fprintf(stderr, " (Default page size is %s)\n", DefaultPage[0].name);
|
||||
|
||||
17
remind.1
17
remind.1
@@ -1,4 +1,4 @@
|
||||
.\" $Id: remind.1,v 1.2 1996-04-28 02:02:04 dfs Exp $
|
||||
.\" $Id: remind.1,v 1.5 1996-10-12 02:49:34 dfs Exp $
|
||||
.TH REMIND 1 "27 April 1996"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
@@ -2106,10 +2106,12 @@ moon displayed, you could use this in your reminder script:
|
||||
Note how the time is coerced to a string by concatenating the null string.
|
||||
.RE
|
||||
.TP
|
||||
.B psshade(i_num)
|
||||
\fBpsshade(i_gray)\fR or \fBpsshade(i_red, i_green, i_blue)\fR
|
||||
Returns a \fBSTRING\fR which consists of PostScript commands to
|
||||
shade a calendar box. \fINum\fR can range from 0 (completely black)
|
||||
to 100 (completely white.) Here's an example of how to use this:
|
||||
to 100 (completely white.) If three arguments are given, they specify
|
||||
red, green and blue intensity from 0 to 100.
|
||||
Here's an example of how to use this:
|
||||
.RS
|
||||
.PP
|
||||
.nf
|
||||
@@ -3611,6 +3613,12 @@ Mogens Lynnerup
|
||||
.PP
|
||||
\fBPolish\fR --
|
||||
Jerzy Sobczyk (complete)
|
||||
.PP
|
||||
\fBBrazilian Portuguese\fR --
|
||||
Marco Paganini (complete)
|
||||
.PP
|
||||
\fBItalian\fR --
|
||||
Valerio Aimale
|
||||
.SH BUGS
|
||||
.PP
|
||||
There's no good reason why read-only system variables are not
|
||||
@@ -3619,6 +3627,9 @@ are not implemented as read-only system variables.
|
||||
.PP
|
||||
Hebrew dates in \fBRemind\fR change at midnight instead of sunset.
|
||||
.PP
|
||||
Language should be selectable at run-time, not compile-time. Don't
|
||||
expect this to happen soon!
|
||||
.PP
|
||||
The UTC functions may not be reliable under MS-DOS.
|
||||
.PP
|
||||
The MS-DOS version of \fBRemind\fR does not support queuing or timed
|
||||
|
||||
24
remind.LSM
Normal file
24
remind.LSM
Normal file
@@ -0,0 +1,24 @@
|
||||
Begin3
|
||||
Title: Remind
|
||||
Version: 03.00.15
|
||||
Entered-date: 27 October 1996
|
||||
Description: Full-featured calendar/reminder program featuring
|
||||
sophisticated date calculation, moon phases, sunrise/sunset,
|
||||
Hebrew calendar, alarms, PostScript output, X-Windows
|
||||
front-end, multilingual messages, and proper handling of
|
||||
holidays. Available for UNIX, MS-DOS, OS/2, and other
|
||||
platforms.
|
||||
Keywords: calendar reminder alarm datebook PostScript
|
||||
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
|
||||
215kB remind-3.0.15.tgz
|
||||
Alternate-site:
|
||||
Original-site:
|
||||
Platform: Linux, Solaris, SunOS, HP-UX -- virtually any UN*X-like
|
||||
system. Wish 4.x required for TCL/Tk front-end, but
|
||||
this is not essential to use the software.
|
||||
Copying-policy: An AMENDED version of GPL. The amendments prohibit
|
||||
porting to MS Windows and use by a certain Canadian
|
||||
corporation.
|
||||
End
|
||||
@@ -1,6 +1,7 @@
|
||||
# $Id: smakefile,v 1.2 1996-04-29 19:34:39 dfs Exp $
|
||||
# $Id: smakefile,v 1.3 1996-10-12 02:49:35 dfs Exp $
|
||||
# Makefile for REMIND, suitable for SAS/C 6.50 under AmigaDOS
|
||||
# English version
|
||||
# THIS IS OUT OF DATE!
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# THINGS FOR YOU TO EDIT START BELOW
|
||||
|
||||
@@ -631,7 +631,7 @@ set a057 value("a05"+"6")
|
||||
"a05" + "6" => "a056"
|
||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
set a058 version()
|
||||
version() => "03.00.14"
|
||||
version() => "03.00.15"
|
||||
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.14"
|
||||
a058 "03.00.15"
|
||||
a077 "1992 92
|
||||
"
|
||||
a049 21
|
||||
|
||||
4
test.cmp
4
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.14"
|
||||
version() => "03.00.15"
|
||||
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.14"
|
||||
a058 "03.00.15"
|
||||
a077 "1992 92
|
||||
"
|
||||
a049 21
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Test file for REMIND
|
||||
#
|
||||
# $Id: test1.cmp,v 1.3 1996-04-28 02:02:07 dfs Exp $
|
||||
# $Id: test1.cmp,v 1.4 1996-09-28 18:17:09 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.14"
|
||||
version() => "03.00.15"
|
||||
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.14"
|
||||
a058 "03.00.15"
|
||||
a077 "1992 92
|
||||
"
|
||||
a049 21
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Test file for REMIND
|
||||
#
|
||||
# $Id: test2.cmp,v 1.3 1996-04-28 02:02:07 dfs Exp $
|
||||
# $Id: test2.cmp,v 1.4 1996-09-28 18:17:10 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.14"
|
||||
version() => "03.00.15"
|
||||
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.14"
|
||||
a058 "03.00.15"
|
||||
a077 "1992 92
|
||||
"
|
||||
a049 21
|
||||
|
||||
376
tkremind
376
tkremind
@@ -11,7 +11,7 @@
|
||||
#
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# $Id: tkremind,v 1.6 1996-05-25 19:36:50 dfs Exp $
|
||||
# $Id: tkremind,v 1.11 1996-10-12 02:49:36 dfs Exp $
|
||||
|
||||
# the next line restarts using wish \
|
||||
exec wish "$0" "$@"
|
||||
@@ -26,6 +26,9 @@ set ConfirmQuit 0
|
||||
# Remind program to execute -- supply full path if you want
|
||||
set Remind "remind"
|
||||
|
||||
# Rem2PS program to execute -- supply full path if you want
|
||||
set Rem2PS "rem2ps"
|
||||
|
||||
# Reminder file to source -- default
|
||||
set ReminderFile {NOSUCHFILE}
|
||||
catch {set ReminderFile "$env(HOME)/.reminders"}
|
||||
@@ -60,20 +63,28 @@ set SkipType 1
|
||||
|
||||
# Remind command line
|
||||
set CommandLine {}
|
||||
set PSCmd {}
|
||||
|
||||
# Print options -- destination file; letter-size; landscape; fill page
|
||||
set PrintDest file
|
||||
set PrintSize letter
|
||||
set PrintOrient landscape
|
||||
set PrintFill 1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Initialize -- initialize things
|
||||
#---------------------------------------------------------------------------
|
||||
proc Initialize {} {
|
||||
|
||||
global DayNames argc argv CommandLine ReminderFile AppendFile Remind
|
||||
global DayNames argc argv CommandLine ReminderFile AppendFile Remind PSCmd
|
||||
|
||||
set CommandLine "|$Remind -itkremind=1 -p"
|
||||
|
||||
set PSCmd "$Remind -p"
|
||||
set i 0
|
||||
while {$i < $argc} {
|
||||
if {[regexp -- {-[bgxim].*} [lindex $argv $i]]} {
|
||||
append CommandLine " [lindex $argv $i]"
|
||||
append PSCmd " [lindex $argv $i]"
|
||||
} else {
|
||||
break
|
||||
}
|
||||
@@ -91,16 +102,17 @@ proc Initialize {} {
|
||||
|
||||
# Check system sanity
|
||||
if {! [file readable $ReminderFile]} {
|
||||
tk_dialog .error Error "Can't read reminder file `$ReminderFile'" error -1 Ok
|
||||
tk_dialog .error Error "Can't read reminder file `$ReminderFile'" error 0 Ok
|
||||
exit 1
|
||||
}
|
||||
|
||||
if {! [file writable $AppendFile]} {
|
||||
tk_dialog .error Error "Can't write reminder file `$AppendFile'" error -1 Ok
|
||||
tk_dialog .error Error "Can't write reminder file `$AppendFile'" error 0 Ok
|
||||
exit 1
|
||||
}
|
||||
|
||||
append CommandLine " $ReminderFile"
|
||||
append PSCmd " $ReminderFile"
|
||||
set DayNames [GetWeekdayNames]
|
||||
# puts "CommandLine: $CommandLine"
|
||||
}
|
||||
@@ -148,9 +160,12 @@ proc GetWeekdayNames {} {
|
||||
# day -- day whose row number is needed
|
||||
#---------------------------------------------------------------------------
|
||||
proc RowNumber {firstDay mondayFirst day} {
|
||||
# If month starts on Sunday, but Monday is in first column, handle it...
|
||||
set adjust 0
|
||||
if {$mondayFirst && !$firstDay} {incr adjust}
|
||||
set modDay [expr $day - $mondayFirst]
|
||||
if { $modDay < 0 } { set modDay 6 }
|
||||
return [expr ($modDay + $firstDay - 1) / 7 + 1]
|
||||
return [expr ($modDay + $firstDay - 1) / 7 + 1 + $adjust]
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -222,9 +237,10 @@ proc CreateCalWindow { firstDay mondayFirst daysInMonth month year dayNames } {
|
||||
button .b.this -text {Today} -command {ThisMonth}
|
||||
button .b.next -text {Next Month} -command {MoveMonth 1}
|
||||
button .b.goto -text {Go To Date...} -command {GotoDialog}
|
||||
button .b.print -text {Print...} -command {DoPrint}
|
||||
button .b.quit -text {Quit} -command {Quit}
|
||||
label .b.status -text "" -width 10 -relief sunken
|
||||
pack .b.prev .b.this .b.next .b.goto .b.quit -side left -fill x
|
||||
pack .b.prev .b.this .b.next .b.goto .b.print .b.quit -side left -fill x
|
||||
pack .b.status -side left -fill x -expand 1
|
||||
pack .h -side top -expand 1 -fill both
|
||||
pack .b -side top -fill x -expand 0
|
||||
@@ -326,6 +342,129 @@ proc Status { stuff } {
|
||||
update idletasks
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# DoPrint -- print a calendar
|
||||
# Arguments:
|
||||
# None
|
||||
#---------------------------------------------------------------------------
|
||||
proc DoPrint {} {
|
||||
global PrintDest PrintSize PrintOrient PrintFill PrintStatus Rem2PS PSCmd
|
||||
global CurMonth CurYear MonthNames
|
||||
catch {destroy .p}
|
||||
toplevel .p
|
||||
wm title .p "Print..."
|
||||
wm iconname .p "Print..."
|
||||
frame .p.f1 -relief sunken -border 2
|
||||
frame .p.f11
|
||||
frame .p.f12
|
||||
frame .p.f2 -relief sunken -border 2
|
||||
frame .p.f3 -relief sunken -border 2
|
||||
frame .p.f4
|
||||
|
||||
radiobutton .p.tofile -text "To file: " -variable PrintDest -value file
|
||||
entry .p.filename
|
||||
button .p.browse -text "Browse..." -command PrintFileBrowse
|
||||
radiobutton .p.tocmd -text "To command: " -variable PrintDest -value command
|
||||
entry .p.command
|
||||
.p.command insert end "lpr"
|
||||
|
||||
label .p.size -text "Paper Size:"
|
||||
radiobutton .p.letter -text "Letter" -variable PrintSize -value letter
|
||||
radiobutton .p.a4 -text "A4" -variable PrintSize -value a4
|
||||
|
||||
label .p.orient -text "Orientation:"
|
||||
radiobutton .p.landscape -text "Landscape" -variable PrintOrient -value landscape
|
||||
radiobutton .p.portrait -text "Portrait" -variable PrintOrient -value portrait
|
||||
|
||||
checkbutton .p.fill -text "Fill page" -variable PrintFill
|
||||
|
||||
button .p.print -text "Print" -command {set PrintStatus print}
|
||||
button .p.cancel -text "Cancel" -command {set PrintStatus cancel}
|
||||
|
||||
pack .p.f1 .p.f2 .p.f3 -side top -fill both -expand 1 -anchor w
|
||||
pack .p.fill -side top -anchor w -fill none -expand 0
|
||||
pack .p.f4 -side top -fill both -expand 1 -anchor w
|
||||
pack .p.f11 .p.f12 -in .p.f1 -side top -fill none -expand 0 -anchor w
|
||||
pack .p.tofile .p.filename .p.browse -in .p.f11 -side left -fill none -expand 0 -anchor w
|
||||
pack .p.tocmd .p.command -in .p.f12 -side left -fill none -expand 0 -anchor w
|
||||
pack .p.size .p.letter .p.a4 -in .p.f2 -side top -fill none -expand 0 -anchor w
|
||||
pack .p.orient .p.landscape .p.portrait -in .p.f3 -side top -fill none -expand 0 -anchor w
|
||||
pack .p.print .p.cancel -in .p.f4 -side left -fill none -expand 0
|
||||
|
||||
bind .p <KeyPress-Escape> ".p.cancel flash; .p.cancel invoke"
|
||||
bind .p <KeyPress-Return> ".p.print flash; .p.print invoke"
|
||||
set PrintStatus 2
|
||||
CenterWindow .p
|
||||
tkwait visibility .p
|
||||
set oldFocus [focus]
|
||||
focus .p.filename
|
||||
grab .p
|
||||
tkwait variable PrintStatus
|
||||
catch {focus $oldFocus}
|
||||
set fname [.p.filename get]
|
||||
set cmd [.p.command get]
|
||||
destroy .p
|
||||
if {$PrintStatus == "cancel"} {
|
||||
return
|
||||
}
|
||||
if {$PrintDest == "file"} {
|
||||
if {$fname == ""} {
|
||||
tk_dialog .error Error "No filename specified" error 0 Ok
|
||||
return
|
||||
}
|
||||
if {[file isdirectory $fname]} {
|
||||
tk_dialog .error Error "$fname is a directory" error 0 Ok
|
||||
return
|
||||
}
|
||||
if {[file readable $fname]} {
|
||||
set ans [tk_dialog .error Overwrite? "Overwrite $fname?" question 0 No Yes]
|
||||
if {$ans == 0} {
|
||||
return
|
||||
}
|
||||
}
|
||||
set fname "> $fname"
|
||||
} else {
|
||||
set fname "| $cmd"
|
||||
}
|
||||
|
||||
# Build the command line
|
||||
set cmd "$PSCmd 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PS -c3"
|
||||
if {$PrintSize == "letter"} {
|
||||
append cmd " -m Letter"
|
||||
} else {
|
||||
append cmd " -m A4"
|
||||
}
|
||||
|
||||
if {$PrintOrient == "landscape"} {
|
||||
append cmd " -l"
|
||||
}
|
||||
|
||||
if {$PrintFill} {
|
||||
append cmd " -e"
|
||||
}
|
||||
|
||||
append cmd " $fname"
|
||||
Status "Printing..."
|
||||
if {[catch {eval "exec $cmd"} err]} {
|
||||
tk_dialog .error Error "Error during printing: $err" error 0 Ok
|
||||
}
|
||||
Status "Ready."
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PrintFileBrowse -- browse for a filename for Print dialog
|
||||
# Arguments: none
|
||||
#---------------------------------------------------------------------------
|
||||
proc PrintFileBrowse {} {
|
||||
set ans [BrowseForFile .filebrowse "Print to file..." "Ok" 0 "*.ps"]
|
||||
if {$ans != ""} {
|
||||
.p.filename delete 0 end
|
||||
.p.filename insert end $ans
|
||||
.p.filename icursor end
|
||||
.p.filename xview end
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# GotoDialog -- Do the "Goto..." dialog
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -358,6 +497,7 @@ proc GotoDialog {} {
|
||||
pack .g.y.e -side left -fill x -expand 1
|
||||
pack .g.y -expand 1 -fill x
|
||||
pack .g.b -expand 1 -fill x
|
||||
bind .g <KeyPress-Escape> ".g.b.cancel flash; .g.b.cancel invoke"
|
||||
CenterWindow .g
|
||||
set oldFocus [focus]
|
||||
grab .g
|
||||
@@ -373,11 +513,11 @@ proc DoGoto {} {
|
||||
global CurYear CurMonth MonthNames
|
||||
set year [.g.y.e get]
|
||||
if { ! [regexp {^[0-9]+$} $year] } {
|
||||
tk_dialog .error Error {Illegal year specified (1990-2078)} error -1 Ok
|
||||
tk_dialog .error Error {Illegal year specified (1990-2078)} error 0 Ok
|
||||
return
|
||||
}
|
||||
if { $year < 1990 || $year > 2078 } {
|
||||
tk_dialog .error Error {Illegal year specified (1990-2078)} error -1 Ok
|
||||
tk_dialog .error Error {Illegal year specified (1990-2078)} error 0 Ok
|
||||
return
|
||||
}
|
||||
set month [lsearch -exact $MonthNames [.g.mon cget -text]]
|
||||
@@ -394,10 +534,11 @@ proc Quit {} {
|
||||
global ConfirmQuit
|
||||
if { !$ConfirmQuit } {
|
||||
destroy .
|
||||
return
|
||||
exit
|
||||
}
|
||||
if { [tk_dialog .question "Confirm..." {Really quit?} question 0 No Yes] } {
|
||||
destroy .
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,6 +727,7 @@ proc CreateModifyDialog {w day firstDay} {
|
||||
button $w.cancel -text "Cancel" -background "#e0c9c9" -command "set ModifyDialogResult 3"
|
||||
pack $w.add $w.preview $w.cancel -side left -anchor w -in $w.buttons -expand 1 -fill x
|
||||
|
||||
bind $w <KeyPress-Escape> "$w.cancel flash; $w.cancel invoke"
|
||||
set ModifyDialogResult 0
|
||||
|
||||
# Center the window on the root
|
||||
@@ -694,7 +836,7 @@ proc ModifyDay {d firstDay} {
|
||||
}
|
||||
set problem [catch {set rem [CreateReminder .mod]} err]
|
||||
if {$problem} {
|
||||
tk_dialog .error Error "$err" error -1 Ok
|
||||
tk_dialog .error Error "$err" error 0 Ok
|
||||
} else {
|
||||
if {$ModifyDialogResult == 2} {
|
||||
set err [EditReminder $err]
|
||||
@@ -999,6 +1141,7 @@ proc EditReminder {rem} {
|
||||
pack .edit.t -side top -fill both -expand 1
|
||||
pack .edit.f -side top -fill x -expand 1
|
||||
pack .edit.ok .edit.cancel -in .edit.f -side left -fill x -expand 1
|
||||
bind .edit <KeyPress-Escape> ".edit.cancel flash; .edit.cancel invoke"
|
||||
set ModifyDialogResult 0
|
||||
CenterWindow .edit
|
||||
tkwait visibility .edit
|
||||
@@ -1012,6 +1155,217 @@ proc EditReminder {rem} {
|
||||
return $rem
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# SetWinAttr -- sets an attribute for a window
|
||||
# Arguments:
|
||||
# w -- window name
|
||||
# attr -- attribute name
|
||||
# val -- value to set it to
|
||||
# Returns:
|
||||
# $val
|
||||
#---------------------------------------------------------------------------
|
||||
proc SetWinAttr {w attr val} {
|
||||
global attrPriv
|
||||
set attrPriv($w-$attr) $val
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# GetWinAttr -- gets an attribute for a window
|
||||
# Arguments:
|
||||
# w -- window name
|
||||
# attr -- attribute name
|
||||
# Returns:
|
||||
# Value of attribute
|
||||
#---------------------------------------------------------------------------
|
||||
proc GetWinAttr {w attr} {
|
||||
global attrPriv
|
||||
return $attrPriv($w-$attr)
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# WaitWinAttr -- wait for a window attribute to change
|
||||
# Arguments:
|
||||
# w -- window name
|
||||
# attr -- attribute name
|
||||
# Returns:
|
||||
# Value of attribute
|
||||
#---------------------------------------------------------------------------
|
||||
proc WaitWinAttr {w attr} {
|
||||
global attrPriv
|
||||
tkwait variable attrPriv($w-$attr)
|
||||
return $attrPriv($w-$attr)
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# BrowseForFile -- creates and operates a file browser dialog.
|
||||
# Arguments:
|
||||
# w -- dialog window.
|
||||
# title -- dialog title
|
||||
# oktext -- text for "OK" button
|
||||
# showdots -- if non-zero, shows "dot" files as well.
|
||||
# Returns:
|
||||
# complete path of filename chosen, or "" if Cancel pressed.
|
||||
#---------------------------------------------------------------------------
|
||||
proc BrowseForFile {w title {oktext "OK"} {showdots 0} {filter "*"}} {
|
||||
catch {destroy $w}
|
||||
toplevel $w
|
||||
wm title $w $title
|
||||
|
||||
# Global array to hold window attributes
|
||||
global a${w}
|
||||
|
||||
SetWinAttr $w status busy
|
||||
SetWinAttr $w showdots $showdots
|
||||
|
||||
frame $w.fileframe
|
||||
frame $w.butframe
|
||||
label $w.cwd -text [pwd]
|
||||
entry $w.entry
|
||||
label $w.masklab -text "Match: "
|
||||
listbox $w.list -yscrollcommand "$w.scroll set"
|
||||
scrollbar $w.scroll -command "$w.list yview"
|
||||
button $w.ok -text $oktext -command "BrowseForFileOK $w"
|
||||
button $w.cancel -text "Cancel" -command "BrowseForFileCancel $w"
|
||||
entry $w.filter -width 7
|
||||
$w.filter insert end $filter
|
||||
|
||||
pack $w.cwd $w.entry -side top -expand 0 -fill x
|
||||
pack $w.fileframe -side top -expand 1 -fill both
|
||||
pack $w.butframe -side top -expand 0 -fill x
|
||||
pack $w.list -in $w.fileframe -side left -expand 1 -fill both
|
||||
pack $w.scroll -in $w.fileframe -side left -expand 0 -fill y
|
||||
pack $w.ok -in $w.butframe -side left -expand 1 -fill x
|
||||
pack $w.cancel -in $w.butframe -side left -expand 1 -fill x
|
||||
pack $w.masklab -in $w.butframe -side left -expand 0
|
||||
pack $w.filter -in $w.butframe -side left -expand 1 -fill x
|
||||
|
||||
# Fill in the box and wait for status to change
|
||||
BrowseForFileRead $w [pwd]
|
||||
|
||||
bind $w <KeyPress-Escape> "$w.cancel flash; $w.cancel invoke"
|
||||
bind $w.list <Button-1> "$w.entry delete 0 end; $w.entry insert 0 \[selection get\]"
|
||||
bind $w.list <Double-Button-1> "$w.ok flash; $w.ok invoke"
|
||||
bind $w.list <Return> "$w.entry delete 0 end; $w.entry insert 0 \[selection get\]; $w.ok flash; $w.ok invoke"
|
||||
bind $w.entry <Return> "$w.ok flash; $w.ok invoke"
|
||||
bind $w.filter <Return> "BrowseForFileRead $w"
|
||||
bind $w.entry <KeyPress> "CompleteFile $w"
|
||||
bind $w.entry <KeyPress-space> "ExpandFile $w"
|
||||
bindtags $w.entry "Entry $w.entry $w all"
|
||||
|
||||
bindtags $w.list "Listbox $w.list $w all"
|
||||
CenterWindow $w
|
||||
set oldFocus [focus]
|
||||
tkwait visibility $w
|
||||
focus $w.entry
|
||||
set oldGrab [grab current $w]
|
||||
grab set $w
|
||||
WaitWinAttr $w status
|
||||
catch {focus $oldFocus}
|
||||
catch {grab set $oldGrab}
|
||||
set ans [GetWinAttr $w status]
|
||||
destroy $w
|
||||
return $ans
|
||||
}
|
||||
|
||||
proc CompleteFile {w} {
|
||||
set index [lsearch [$w.list get 0 end] [$w.entry get]* ]
|
||||
if {$index > -1} {
|
||||
$w.list see $index
|
||||
$w.list selection clear 0 end
|
||||
$w.list selection set $index
|
||||
}
|
||||
}
|
||||
|
||||
proc ExpandFile {w} {
|
||||
set stuff [$w.list curselection]
|
||||
if {[string compare $stuff ""]} {
|
||||
$w.entry delete 0 end
|
||||
$w.entry insert end [$w.list get $stuff]
|
||||
}
|
||||
}
|
||||
|
||||
proc BrowseForFileCancel {w} {
|
||||
SetWinAttr $w status {}
|
||||
}
|
||||
|
||||
proc BrowseForFileOK {w} {
|
||||
set fname [$w.entry get]
|
||||
if {[string compare $fname ""]} {
|
||||
# If it starts with a slash, handle it specially.
|
||||
if {[string match "/*" $fname]} {
|
||||
if {[file isdirectory $fname]} {
|
||||
BrowseForFileRead $w $fname
|
||||
return
|
||||
} else {
|
||||
SetWinAttr $w status $fname
|
||||
return
|
||||
}
|
||||
}
|
||||
if {[string match */ $fname]} {
|
||||
set fname [string trimright $fname /]
|
||||
}
|
||||
if {[$w.cwd cget -text] == "/"} {
|
||||
set fname "/$fname"
|
||||
} else {
|
||||
set fname "[$w.cwd cget -text]/$fname"
|
||||
}
|
||||
# If it's a directory, change directories
|
||||
if {[file isdirectory $fname]} {
|
||||
BrowseForFileRead $w $fname
|
||||
} else {
|
||||
SetWinAttr $w status $fname
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# BrowseForFileRead -- read the current directory into the file browser
|
||||
# Arguments:
|
||||
# w -- window name
|
||||
# dir -- directory
|
||||
# Returns:
|
||||
# nothing
|
||||
#---------------------------------------------------------------------------
|
||||
proc BrowseForFileRead {w {dir ""}} {
|
||||
# Save working dir
|
||||
set cwd [pwd]
|
||||
if {$dir == ""} {
|
||||
set dir [$w.cwd cget -text]
|
||||
}
|
||||
if {[catch "cd $dir" err]} {
|
||||
tk_dialog .error Error "$err" error 0 Ok
|
||||
return
|
||||
}
|
||||
$w.cwd configure -text [pwd]
|
||||
if {[GetWinAttr $w showdots]} {
|
||||
set flist [glob -nocomplain .* *]
|
||||
} else {
|
||||
set flist [glob -nocomplain *]
|
||||
}
|
||||
set flist [lsort $flist]
|
||||
set filter [$w.filter get]
|
||||
if {$filter == ""} {
|
||||
set filter "*"
|
||||
}
|
||||
$w.list delete 0 end
|
||||
foreach item $flist {
|
||||
if {$item != "." && $item != ".."} {
|
||||
if {[file isdirectory $item]} {
|
||||
$w.list insert end "$item/"
|
||||
} else {
|
||||
if {[string match $filter $item]} {
|
||||
$w.list insert end $item
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if {[pwd] != "/"} {
|
||||
$w.list insert 0 "../"
|
||||
}
|
||||
cd $cwd
|
||||
$w.entry delete 0 end
|
||||
}
|
||||
|
||||
proc main {} {
|
||||
wm withdraw .
|
||||
puts "\nTkRemind Copyright (c) 1996 by David F. Skoll\n"
|
||||
|
||||
31
tkremind.1
31
tkremind.1
@@ -1,5 +1,5 @@
|
||||
.\" $Id: tkremind.1,v 1.2 1996-05-25 19:29:27 dfs Exp $ "
|
||||
.TH TKREMIND 1 "23 April 1996"
|
||||
.\" $Id: tkremind.1,v 1.4 1996-09-28 18:46:57 dfs Exp $ "
|
||||
.TH TKREMIND 1 "7 July 1996"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
tkremind \- graphical front-end to Remind calendar program
|
||||
@@ -105,6 +105,33 @@ edit the reminder, thereby gaining access to advanced features of
|
||||
\fBRemind\fR. You can also use it simply to play around and discover
|
||||
\fBRemind\fR's idioms for expressing different types of reminders.
|
||||
|
||||
.SH PRINTING
|
||||
To print the current month's calender, click \fBPrint...\fR on the
|
||||
main calendar window. This brings up the print dialog. Printing
|
||||
either produces a PostScript file or sends PostScript to a UNIX command.
|
||||
|
||||
Select the print destination by choosing either \fBTo file:\fR or
|
||||
\fBTo command:\fR in the print dialog. Press \fBBrowse...\fR to bring
|
||||
up a file browser. In the file browser, you can enter a filename in
|
||||
the text entry, double-click on a filename in the listbox, or
|
||||
double-click on a directory to navigate the file system. You can also
|
||||
type the first few characters of a file name in the text entry box and
|
||||
press space to complete the name to the first matching entry.
|
||||
|
||||
The \fBMatch:\fR box contains a filename wildcard which filters files
|
||||
in the listbox. You can change the filter and press enter to rescan
|
||||
the directory.
|
||||
|
||||
Select the appropriate paper size and orientation. Activate
|
||||
\fBFill page\fR if you want the calendar to fill the page. This should
|
||||
be the normal case unless you have many reminders in a particular
|
||||
day. (See the \fBRem2PS\fR documentation.)
|
||||
|
||||
Finally, click \fBPrint\fR to print or \fBCancel\fR to cancel.
|
||||
Note that during printing, \fBRemind\fR is \fInot\fR called with
|
||||
the \fB-itkremind=1\fR option, because it is operated in normal
|
||||
PostScript-producing mode.
|
||||
|
||||
.SH ODDS AND ENDS
|
||||
\fBTkRemind\fR performs some basic consistency checks when you add or
|
||||
preview a reminder. However, if you edit a reminder in the previewer,
|
||||
|
||||
Reference in New Issue
Block a user