mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 14:28:40 +02:00
Compare commits
50 Commits
v3_01_03_R
...
03.01.05
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0aef0703c | ||
|
|
7356a511e0 | ||
|
|
5be26a3cff | ||
|
|
36a80acb0c | ||
|
|
37ab03b49d | ||
|
|
75209cb40e | ||
|
|
4b2d274748 | ||
|
|
1423495b88 | ||
|
|
42e4ec8890 | ||
|
|
58fbd51ef4 | ||
|
|
7552dbb812 | ||
|
|
31e0ecb71d | ||
|
|
f6743a4f87 | ||
|
|
5f574949e6 | ||
|
|
724bce4fb9 | ||
|
|
8d59f025af | ||
|
|
aad44f4716 | ||
|
|
0a38d7d213 | ||
|
|
4fcd60fd95 | ||
|
|
38beeb8cb0 | ||
|
|
26f0acab35 | ||
|
|
3897973bc1 | ||
|
|
7b3da27461 | ||
|
|
a85ee5f31c | ||
|
|
b272863aa0 | ||
|
|
8249964380 | ||
|
|
af81bbb299 | ||
|
|
d818dd9c80 | ||
|
|
fe8e34dece | ||
|
|
ba928989f7 | ||
|
|
742f973028 | ||
|
|
043932fcbe | ||
|
|
ad5e096caa | ||
|
|
06c8fc8f78 | ||
|
|
487338d10c | ||
|
|
3d1c0e5667 | ||
|
|
ce3bb191c4 | ||
|
|
03e9dbf364 | ||
|
|
518aab3d02 | ||
|
|
f055664f77 | ||
|
|
ba3e01f2ce | ||
|
|
b6883c8a45 | ||
|
|
9e49ee3acb | ||
|
|
7481f68bb2 | ||
|
|
99792eec03 | ||
|
|
91458c7845 | ||
|
|
cad5849dc0 | ||
|
|
a38e120e99 | ||
|
|
0b31a78cf2 | ||
|
|
861858c1a6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,3 +12,4 @@ tests/test.out
|
||||
.gitignore
|
||||
*~
|
||||
src/rem2ps
|
||||
src/version.h
|
||||
|
||||
@@ -3,7 +3,7 @@ THE REMIND COPYRIGHT
|
||||
1. REMIND refers to the entire set of files and documentation in the
|
||||
REMIND package.
|
||||
|
||||
2. REMIND is Copyright 1999-2007 Roaring Penguin Software Inc.,
|
||||
2. REMIND is Copyright 1999-2008 Roaring Penguin Software Inc.,
|
||||
except where noted in individual files.
|
||||
|
||||
3. DISTRIBUTION AND USE
|
||||
|
||||
15
configure
vendored
15
configure
vendored
@@ -666,6 +666,7 @@ SET_MAKE
|
||||
CPP
|
||||
GREP
|
||||
EGREP
|
||||
VERSION
|
||||
LIBOBJS
|
||||
LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
@@ -4689,7 +4690,8 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
for ac_header in sys/file.h
|
||||
|
||||
for ac_header in sys/file.h glob.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
@@ -5188,7 +5190,8 @@ fi
|
||||
|
||||
|
||||
|
||||
for ac_func in setenv unsetenv
|
||||
|
||||
for ac_func in setenv unsetenv glob
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
@@ -5281,7 +5284,9 @@ _ACEOF
|
||||
fi
|
||||
done
|
||||
|
||||
ac_config_files="$ac_config_files src/Makefile www/Makefile"
|
||||
VERSION=03.01.05
|
||||
|
||||
ac_config_files="$ac_config_files src/Makefile www/Makefile src/version.h"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -5839,6 +5844,7 @@ do
|
||||
"src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
|
||||
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
|
||||
"www/Makefile") CONFIG_FILES="$CONFIG_FILES www/Makefile" ;;
|
||||
"src/version.h") CONFIG_FILES="$CONFIG_FILES src/version.h" ;;
|
||||
|
||||
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||
@@ -5952,11 +5958,12 @@ SET_MAKE!$SET_MAKE$ac_delim
|
||||
CPP!$CPP$ac_delim
|
||||
GREP!$GREP$ac_delim
|
||||
EGREP!$EGREP$ac_delim
|
||||
VERSION!$VERSION$ac_delim
|
||||
LIBOBJS!$LIBOBJS$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 54; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
||||
@@ -31,7 +31,7 @@ AC_CHECK_SIZEOF(unsigned int)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_CHECK_HEADERS(sys/file.h)
|
||||
AC_CHECK_HEADERS(sys/file.h glob.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_STRUCT_TM
|
||||
@@ -44,5 +44,7 @@ if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(setenv unsetenv)
|
||||
AC_OUTPUT(src/Makefile www/Makefile)
|
||||
AC_CHECK_FUNCS(setenv unsetenv glob)
|
||||
VERSION=03.01.05
|
||||
AC_SUBST(VERSION)
|
||||
AC_OUTPUT(src/Makefile www/Makefile src/version.h)
|
||||
|
||||
@@ -1,5 +1,57 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* Version 3.1 Patch 5 - 2008-04-15
|
||||
|
||||
- MAJOR ENHANCEMENT: If you supply a directory name on the command line
|
||||
or for an INCLUDE command, then Remind reads all *.rem file in that
|
||||
directory (in the order returned by "glob")
|
||||
|
||||
- ENHANCEMENT: The plain-text calendar ("-c") can draw lines using VT-100
|
||||
line-drawing characters if invoked as "-cl"
|
||||
|
||||
- ENHANCEMENT: The plain-text calendar can approximate SPECIAL COLOR reminders
|
||||
using VT-100 color escape sequences if invoked as "-cc". (You can combine
|
||||
the colors and line-drawing characters with -clc or -ccl.)
|
||||
|
||||
- ENHANCEMENT: The "-t" option can take a numeric argument n. In this case,
|
||||
all reminders are assumed to have a delta of +n. (Without the argument,
|
||||
an infinite delta is assumed, as before.) If a numeric argument is given,
|
||||
the new system variable $DeltaOffset is set to the argument.
|
||||
|
||||
- MINOR ENHANCEMENT: The "-i" command-line option can be used to define
|
||||
a function as well as set a variable.
|
||||
|
||||
- MINOR ENHANCEMENT: String constants can have embedded quotes "Like \"this"
|
||||
|
||||
- MINOR ENHANCEMENT: tkremind works better on small screens like that of
|
||||
the Eee-PC.
|
||||
|
||||
- BUG FIX: Minor fix to HTML output courtesy of Ian! Allen.
|
||||
|
||||
- BUG FIX: Parse error in calendar mode was fixed.
|
||||
|
||||
* Version 3.1 Patch 4 - 2008-02-03
|
||||
|
||||
- ENHANCMENT: tkremind respects the "-b1" option and operates in 24-hour
|
||||
clock mode if the option is supplied.
|
||||
|
||||
- ENHANCEMENT: tkremind has been tweaked to look better with Tcl/Tk 8.5.
|
||||
|
||||
- CLEANUP: Version is kept only in configure.in instead of two different
|
||||
places.
|
||||
|
||||
- CLEANUP: Added "const" qualifier to many places in the code that previously
|
||||
lacked it.
|
||||
|
||||
- BUG FIX: A rare parsing error involving interaction between SATISFY and
|
||||
SKIP has been fixed.
|
||||
|
||||
- BUG FIX: rem2html would output a horribly-wrong calendar for a 28-day
|
||||
February starting on Sunday (such as February 2009.) This has been fixed.
|
||||
|
||||
- BUG FIX: The "-ivar=value" command-line option failed if Remind re-execed
|
||||
itself because we overwrote argv[]. This has been fixed.
|
||||
|
||||
* Version 3.1 Patch 3 - 2007-10-15
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
72
man/remind.1
72
man/remind.1
@@ -13,6 +13,13 @@ a program to be executed.
|
||||
If \fIfilename\fR is specified as a single dash '-', then \fBRemind\fR
|
||||
takes its input from standard input. This also implicitly enables
|
||||
the \fB\-o\fR option, described below.
|
||||
.PP
|
||||
If \fIfilename\fR happens to
|
||||
be a directory rather than a plain file, then \fBRemind\fR reads all of
|
||||
the files in that directory that match the pattern "*.rem". The files
|
||||
are read in sorted order; the sort order may depend on your locale, but
|
||||
should match the sort order used by the shell to expand "*.rem".
|
||||
|
||||
.SH OPTIONS
|
||||
\fBRemind\fR has a slew of options. If you're new to the program,
|
||||
ignore them for now and skip to the section "Reminder Files".
|
||||
@@ -26,12 +33,38 @@ date by piping the output through \fBsort(1)\fR.
|
||||
The \fB\-r\fR option disables \fBRUN\fR directives and the \fBshell()\fR
|
||||
function. As of Remind 3.00.17, using \fB\-u\fR implies \fB\-r\fR.
|
||||
.TP
|
||||
.B \-c\fR\fIn\fR
|
||||
The \fB\-c\fR option causes \fBRemind\fR to produce a calendar that is sent to
|
||||
standard output. If you supply a number \fIn\fR, then a calendar will
|
||||
be generated for \fIn\fR months, starting with the current month. By
|
||||
default, a calendar for only the current month is produced. If \fIn\fR
|
||||
starts with '+', then a calendar for \fIn\fR weeks is produced.
|
||||
.B \-c\fI[flags]\fIn\fR
|
||||
The \fB\-c\fR option causes \fBRemind\fR to produce a calendar that is
|
||||
sent to standard output. If you supply a number \fIn\fR, then a
|
||||
calendar will be generated for \fIn\fR months, starting with the
|
||||
current month. By default, a calendar for only the current month is
|
||||
produced.
|
||||
.PP
|
||||
You can precede \fIn\fR (if any) with a set of flags. The flags
|
||||
are as follows:
|
||||
.TP
|
||||
.B '+'
|
||||
causes a calendar for \fIn\fR
|
||||
weeks to be produced.
|
||||
.TP
|
||||
.B 'a'
|
||||
causes \fBRemind\fR to display reminders on the calendar on the
|
||||
day they actually occur \fIas well as\fR on any preceding days
|
||||
specified by the reminder's \fIdelta\fR.
|
||||
.TP
|
||||
.B 'l'
|
||||
causes \fBRemind\fR to use VT100 line-drawing characters to draw
|
||||
the calendar. The characters are hard-coded and will only work
|
||||
on terminals that emulate the VT00 line-drawing character set.
|
||||
.TP
|
||||
.B 'c'
|
||||
causes \fBRemind\fR to use VT100 escape sequences to approximate
|
||||
SPECIAL COLOR reminders. The approximation is (of necessity) very
|
||||
coarse, because the VT100 only has eight different color sequences,
|
||||
each with one of two brightnesses. A color component greater than
|
||||
64 is considered "on", and if any of the three color components is
|
||||
greater than 128, the color is considered "bright".
|
||||
|
||||
.TP
|
||||
.B \-w\fR\fIcol\fR[,\fIpad\fR[,\fIspc\fR]]]
|
||||
The \fB\-w\fR option specifies the output width, padding and spacing
|
||||
@@ -97,6 +130,11 @@ The \fB\-o\fR option causes \fBRemind\fR to ignore all \fBONCE\fR directives.
|
||||
The \fB\-t\fR option causes \fBRemind\fR to trigger all non-expired reminders,
|
||||
regardless of the \fIdelta\fR supplied for each reminder.
|
||||
.TP
|
||||
.B \-t\fR\fIn\fR
|
||||
If you supply a number \fIn\fR after the \fB\-t\fR option, then
|
||||
\fBRemind\fR pretends that each non-expired reminder has a \fIdelta\fR
|
||||
of \fIn\fR days and triggers reminders accordingly.
|
||||
.TP
|
||||
.B \-h
|
||||
The \fB\-h\fR option ("hush...") suppresses certain warning and information
|
||||
messages. In particular, if no reminders are triggered, this mode
|
||||
@@ -139,6 +177,9 @@ Dump the variable table after execution of the reminder script
|
||||
.TP
|
||||
.B l
|
||||
Echo lines when displaying error messages
|
||||
.TP
|
||||
.B f
|
||||
Trace the reading of reminder files
|
||||
.RE
|
||||
.TP
|
||||
\fB\-g\fR[\fBa|d\fR[\fBa|d\fR[\fBa|d\fR]]]
|
||||
@@ -225,6 +266,9 @@ TAG clause.
|
||||
Sets the value of the specified \fIvar\fR to \fIexpr\fR, and \fBpreserves\fR
|
||||
\fIvar\fR. \fIExpr\fR can be any valid \fBRemind\fR expression. See the
|
||||
section "Initializing Variables on the Command Line" for more details.
|
||||
.TP
|
||||
\fB\-i\fR\fIfunc\fR(\fIargs\fR)=\fIdefinition\fR
|
||||
Allows you to define a function on the command line.
|
||||
.PP
|
||||
If you supply a \fIdate\fR on the command line, it must consist of
|
||||
\fIday month year\fR, where \fIday\fR is the day of the month,
|
||||
@@ -1248,6 +1292,12 @@ administrator.)
|
||||
.PP
|
||||
If you specify a filename of "-" in the \fBINCLUDE\fR command, \fBRemind\fR
|
||||
will begin reading from standard input.
|
||||
.PP
|
||||
If you specify a \fIdirectory\fR as the argument to \fBINCLDUE\fR, then
|
||||
\fBRemind\fR will process all files in that directory that match the shell
|
||||
patterm "*.rem". The files are processed in sorted order; the sort order
|
||||
matches that used by the shell when it expands "*.rem".
|
||||
|
||||
.SH THE RUN COMMAND
|
||||
.PP
|
||||
If you include other files in your reminder script, you may not always
|
||||
@@ -3033,7 +3083,7 @@ under program control. The format is:
|
||||
.PP
|
||||
\fBDEBUG\fR [+\fIflagson\fR] [\-\fIflagsoff\fR]
|
||||
.PP
|
||||
\fIFlagson\fR and \fIflagsoff\fR consist of strings of the characters "extvl"
|
||||
\fIFlagson\fR and \fIflagsoff\fR consist of strings of the characters "extvlf"
|
||||
that correspond to the debugging options discussed in the command-line
|
||||
options section. If preceded with a "+", the corresponding group of
|
||||
debugging options is switched on. Otherwise, they are switched off.
|
||||
@@ -3244,6 +3294,11 @@ You should not have any spaces between the \fB\-i\fR option and the equal
|
||||
sign; otherwise, strange variable names are created that can only be accessed
|
||||
with the \fBvalue()\fR or \fBdefined()\fR functions.
|
||||
.PP
|
||||
You can also define a function on the command line by using:
|
||||
.PP
|
||||
\fB\-i\fR\fIfunc\fR(\fIargs\fR)=\fIdefinition\fR
|
||||
.PP
|
||||
Be sure to protect special characters from shell interpretation.
|
||||
.SH MORE ABOUT POSTSCRIPT
|
||||
.PP
|
||||
The \fBPS\fR and \fBPSFILE\fR reminders pass PostScript code directly
|
||||
@@ -3766,6 +3821,9 @@ The rest of the line is the text to put in the calendar.
|
||||
.PP
|
||||
The COLOR special is "doubly special", because in its normal operating
|
||||
mode, \fBremind\fR treats a COLOR special just like a MSG-type reminder.
|
||||
Also, if you invoke \fBRemind\fR with \fB\-cc\fR..., then it approximates
|
||||
SPECIAL COLOR reminders on your terminal.
|
||||
|
||||
.SH MISCELLANEOUS
|
||||
.PP
|
||||
.B COMMAND ABBREVIATIONS
|
||||
|
||||
@@ -21,6 +21,8 @@ extra features as you become a more sophisticated \fBRemind\fR programmer.
|
||||
on to \fBRemind\fR. The options it passes are
|
||||
\fB\-b\fR, \fB\-g\fR, \fB\-x\fR, \fB\-i\fR and \fB\-m\fR.
|
||||
See the \fBRemind\fR man page for details about the options.
|
||||
Note that \fBTkRemind\fR will respect the \fB\-m\fR and
|
||||
\fB\-b1\fR options and adjust its appearance accordingly.
|
||||
|
||||
\fIRead_file\fR is the file from which \fBTkRemind\fR reads reminders.
|
||||
It is in standard \fBRemind\fR format. \fIWrite_file\fR is the file
|
||||
|
||||
140
scripts/tkremind
140
scripts/tkremind
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# This file is part of REMIND.
|
||||
# Copyright (C) 1992-1998 David F. Skoll
|
||||
# Copyright (C) 1999-2005 Roaring Penguin Software Inc.
|
||||
# Copyright (C) 1999-2008 Roaring Penguin Software Inc.
|
||||
#
|
||||
#--------------------------------------------------------------
|
||||
|
||||
@@ -93,8 +93,12 @@ set EditorPid -1
|
||||
set AppendFile {NOSUCHFILE}
|
||||
catch {set AppendFile $ReminderFile}
|
||||
|
||||
set SetFontsWorked 0
|
||||
#---------------- DON'T CHANGE STUFF BELOW HERE ------------------
|
||||
|
||||
# 24-hour clock mode
|
||||
set TwentyFourHourMode 0
|
||||
|
||||
# Is Monday in first column?
|
||||
set MondayFirst 0
|
||||
|
||||
@@ -153,7 +157,7 @@ set HighestTagSoFar 0
|
||||
proc Initialize {} {
|
||||
|
||||
global DayNames argc argv CommandLine ReminderFile AppendFile Remind PSCmd
|
||||
global MondayFirst
|
||||
global MondayFirst TwentyFourHourMode
|
||||
|
||||
set CommandLine "|$Remind -itkremind=1 -p -y -l"
|
||||
set PSCmd "$Remind -p -l"
|
||||
@@ -165,6 +169,9 @@ proc Initialize {} {
|
||||
if {[regexp -- {m} [lindex $argv $i]]} {
|
||||
set MondayFirst 1
|
||||
}
|
||||
if {"[lindex $argv $i]" == "-b1"} {
|
||||
set TwentyFourHourMode 1
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
@@ -180,6 +187,14 @@ proc Initialize {} {
|
||||
}
|
||||
}
|
||||
|
||||
# If reminder file is a directory and appendfile is the same as
|
||||
# reminder file, choose append file to be $ReminderFile/100-tkremind.rem
|
||||
if {[file isdirectory $ReminderFile]} {
|
||||
if {"$ReminderFile" == "$AppendFile"} {
|
||||
set AppendFile [file join $ReminderFile "100-tkremind.rem"]
|
||||
}
|
||||
}
|
||||
|
||||
# Check system sanity
|
||||
if {! [file readable $ReminderFile]} {
|
||||
set ans [tk_dialog .error "TkRemind: Warning" "Can't read reminder file `$ReminderFile'" warning 0 "Create it and continue" "Exit"]
|
||||
@@ -271,9 +286,14 @@ proc CalEntryOffset { firstDay } {
|
||||
#***********************************************************************
|
||||
proc CreateCalFrame { w dayNames } {
|
||||
# Figure out reasonable height for text frames
|
||||
global SetFontsWorked
|
||||
set h [winfo screenheight .]
|
||||
if {$h <= 480} {
|
||||
set h 2
|
||||
if {$SetFontsWorked} {
|
||||
set h 3
|
||||
} else {
|
||||
set h 2
|
||||
}
|
||||
} elseif {$h <= 600} {
|
||||
set h 4
|
||||
} else {
|
||||
@@ -329,10 +349,17 @@ proc CreateCalFrame { w dayNames } {
|
||||
#***********************************************************************
|
||||
proc ConfigureCalFrame { w firstDay numDays } {
|
||||
global CurMonth CurYear TodayMonth TodayYear TodayDay
|
||||
global tk_version
|
||||
set offset [CalEntryOffset $firstDay]
|
||||
set first [expr $offset+1]
|
||||
set last [expr $offset+$numDays]
|
||||
|
||||
if {$tk_version >= 8.5} {
|
||||
set bg "#d9d9d9"
|
||||
} else {
|
||||
set bg [lindex [$w.t0 configure -background] 3]
|
||||
}
|
||||
|
||||
for {set i 0} {$i < $first} {incr i} {
|
||||
grid $w.l$i $w.t$i
|
||||
$w.l$i configure -text "" -command "" -state disabled -relief flat
|
||||
@@ -344,8 +371,8 @@ proc ConfigureCalFrame { w firstDay numDays } {
|
||||
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
||||
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
||||
$w.t$i configure -state disabled
|
||||
$w.t$i configure -background [lindex [$w.t$i configure -background] 3]
|
||||
$w.l$i configure -background [lindex [$w.l$i configure -background] 3]
|
||||
$w.t$i configure -background $bg
|
||||
$w.l$i configure -background $bg
|
||||
}
|
||||
for {set i $first} {$i <= $last} {incr i} {
|
||||
grid $w.l$i $w.t$i
|
||||
@@ -360,8 +387,8 @@ proc ConfigureCalFrame { w firstDay numDays } {
|
||||
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
||||
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
||||
$w.t$i configure -state disabled
|
||||
$w.t$i configure -background [lindex [$w.t$i configure -background] 3]
|
||||
$w.l$i configure -background [lindex [$w.l$i configure -background] 3]
|
||||
$w.t$i configure -background $bg
|
||||
$w.l$i configure -background $bg
|
||||
}
|
||||
set forgetIt 0
|
||||
for {set i [expr $last+1]} {$i < 42} {incr i} {
|
||||
@@ -385,8 +412,8 @@ proc ConfigureCalFrame { w firstDay numDays } {
|
||||
$w.t$i tag bind TAGGED <ButtonPress-1> "EditTaggedReminder $w.t$i"
|
||||
$w.t$i tag bind REM <ButtonPress-3> "FireEditor $w.t$i"
|
||||
$w.t$i configure -state disabled
|
||||
$w.t$i configure -background [lindex [$w.t$i configure -background] 3]
|
||||
$w.l$i configure -background [lindex [$w.l$i configure -background] 3]
|
||||
$w.t$i configure -background $bg
|
||||
$w.l$i configure -background $bg
|
||||
}
|
||||
if { $CurMonth == $TodayMonth && $CurYear == $TodayYear } {
|
||||
set n [expr $TodayDay + $offset]
|
||||
@@ -1067,7 +1094,7 @@ proc CreateModifyDialog {w day firstDay args} {
|
||||
|
||||
# Set up: Year, Month, Day, WeekdayName
|
||||
global CurYear CurMonth EnglishDayNames MonthNames OptionType SkipType
|
||||
global ModifyDialogResult
|
||||
global ModifyDialogResult TwentyFourHourMode
|
||||
|
||||
set OptionType 1
|
||||
set SkipType 1
|
||||
@@ -1187,7 +1214,11 @@ proc CreateModifyDialog {w day firstDay args} {
|
||||
checkbutton $w.timebut -text "Timed reminder at"
|
||||
$w.timebut deselect
|
||||
menubutton $w.timehour -text "12" -menu $w.timehour.menu -relief raised
|
||||
CreateDayMenu $w.timehour 1 12 0
|
||||
if {$TwentyFourHourMode} {
|
||||
CreateDayMenu $w.timehour 0 23 0
|
||||
} else {
|
||||
CreateDayMenu $w.timehour 1 12 0
|
||||
}
|
||||
menubutton $w.timemin -text "00" -menu $w.timemin.menu -relief raised
|
||||
menu $w.timemin.menu -tearoff 0
|
||||
foreach i {00 05 10 15 20 25 30 35 40 45 50 55} {
|
||||
@@ -1195,10 +1226,12 @@ proc CreateModifyDialog {w day firstDay args} {
|
||||
-command "$w.timemin configure -text $i"
|
||||
}
|
||||
|
||||
menubutton $w.ampm -text "PM" -menu $w.ampm.menu -relief raised
|
||||
menu $w.ampm.menu -tearoff 0
|
||||
$w.ampm.menu add command -label "AM" -command "$w.ampm configure -text {AM}"
|
||||
$w.ampm.menu add command -label "PM" -command "$w.ampm configure -text {PM}"
|
||||
if {!$TwentyFourHourMode} {
|
||||
menubutton $w.ampm -text "PM" -menu $w.ampm.menu -relief raised
|
||||
menu $w.ampm.menu -tearoff 0
|
||||
$w.ampm.menu add command -label "AM" -command "$w.ampm configure -text {AM}"
|
||||
$w.ampm.menu add command -label "PM" -command "$w.ampm configure -text {PM}"
|
||||
}
|
||||
|
||||
checkbutton $w.timeadvbut -text "with"
|
||||
$w.timeadvbut deselect
|
||||
@@ -1217,7 +1250,11 @@ proc CreateModifyDialog {w day firstDay args} {
|
||||
$w.timerep.menu add command -label $i -command "$w.timerep configure -text $i"
|
||||
}
|
||||
label $w.timelab2 -text "minutes"
|
||||
pack $w.timebut $w.timehour $w.timemin $w.ampm $w.timeadvbut $w.timeadv $w.timelab1 $w.timerepbut $w.timerep $w.timelab2 -side left -anchor w -in $w.time
|
||||
if {$TwentyFourHourMode} {
|
||||
pack $w.timebut $w.timehour $w.timemin $w.timeadvbut $w.timeadv $w.timelab1 $w.timerepbut $w.timerep $w.timelab2 -side left -anchor w -in $w.time
|
||||
} else {
|
||||
pack $w.timebut $w.timehour $w.timemin $w.ampm $w.timeadvbut $w.timeadv $w.timelab1 $w.timerepbut $w.timerep $w.timelab2 -side left -anchor w -in $w.time
|
||||
}
|
||||
|
||||
# SKIP TYPE
|
||||
label $w.labhol -text "On holidays or weekends:"
|
||||
@@ -1295,13 +1332,20 @@ proc RemindDialogToOptions { w } {
|
||||
#***********************************************************************
|
||||
proc OptionsToRemindDialog { w opts } {
|
||||
global OptionType SkipType repbut expbut advbut advcount
|
||||
global timebut timeadvbut timerepbut
|
||||
global timebut timeadvbut timerepbut TwentyFourHourMode
|
||||
global dSaturday dSunday dMonday dTuesday dWednesday dThursday dFriday
|
||||
set hour ""
|
||||
set ampm ""
|
||||
foreach {flag value} $opts {
|
||||
switch -glob -- $flag {
|
||||
"-text-*" {
|
||||
set win [string range $flag 6 end]
|
||||
$w.$win configure -text $value
|
||||
catch { $w.$win configure -text $value }
|
||||
if {"$flag" == "-text-ampm"} {
|
||||
set ampm $value
|
||||
} elseif {"$flag" == "-text-timehour"} {
|
||||
set hour $value
|
||||
}
|
||||
}
|
||||
"-global-*" {
|
||||
set win [string range $flag 8 end]
|
||||
@@ -1314,6 +1358,26 @@ proc OptionsToRemindDialog { w opts } {
|
||||
}
|
||||
}
|
||||
}
|
||||
if {"$hour" != ""} {
|
||||
if {$TwentyFourHourMode} {
|
||||
if {"$ampm" != ""} {
|
||||
if {"$ampm" == "PM" && $hour < 12} {
|
||||
incr hour 12;
|
||||
$w.timehour configure -text $hour
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if {$hour > 12} {
|
||||
incr hour -12
|
||||
$w.timehour configure -text $hour
|
||||
$w.ampm configure -text "PM"
|
||||
} else {
|
||||
if {"$ampm" == ""} {
|
||||
$w.ampm configure -text "AM"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1467,7 +1531,7 @@ proc CenterWindow {w} {
|
||||
# The reminder as a string.
|
||||
#---------------------------------------------------------------------------
|
||||
proc CreateReminder {w} {
|
||||
global DidOmit
|
||||
global DidOmit TwentyFourHourMode
|
||||
|
||||
set body [string trim [$w.entry get]]
|
||||
|
||||
@@ -1504,13 +1568,15 @@ proc CreateReminder {w} {
|
||||
if {$timebut} {
|
||||
set hour [$w.timehour cget -text]
|
||||
set min [$w.timemin cget -text]
|
||||
if {[$w.ampm cget -text] == "PM"} {
|
||||
if {$hour < 12} {
|
||||
incr hour 12
|
||||
}
|
||||
} else {
|
||||
if {$hour == 12} {
|
||||
set hour 0
|
||||
if {!$TwentyFourHourMode} {
|
||||
if {[$w.ampm cget -text] == "PM"} {
|
||||
if {$hour < 12} {
|
||||
incr hour 12
|
||||
}
|
||||
} else {
|
||||
if {$hour == 12} {
|
||||
set hour 0
|
||||
}
|
||||
}
|
||||
}
|
||||
append rem " AT $hour:$min"
|
||||
@@ -2192,8 +2258,9 @@ proc main {} {
|
||||
global AppendFile HighestTagSoFar DayNames
|
||||
catch {
|
||||
puts "\nTkRemind Copyright (C) 1996-1998 David F. Skoll"
|
||||
puts "Copyright (C) 1999-2007 Roaring Penguin Software Inc."
|
||||
puts "Copyright (C) 1999-2008 Roaring Penguin Software Inc."
|
||||
}
|
||||
catch { SetFonts }
|
||||
LoadOptions
|
||||
CreateMoonImages
|
||||
Initialize
|
||||
@@ -2647,7 +2714,12 @@ proc DoMoonSpecial { n stuff } {
|
||||
# Displays current date and time in status window
|
||||
#***********************************************************************
|
||||
proc DisplayTime {} {
|
||||
set msg [clock format [clock seconds] -format "%e %b %Y %I:%M%p"]
|
||||
global TwentyFourHourMode
|
||||
if {$TwentyFourHourMode} {
|
||||
set msg [clock format [clock seconds] -format "%e %b %Y %H:%M"]
|
||||
} else {
|
||||
set msg [clock format [clock seconds] -format "%e %b %Y %I:%M%p"]
|
||||
}
|
||||
Status $msg
|
||||
}
|
||||
|
||||
@@ -2784,4 +2856,16 @@ proc ClosePopup { w after_token mail_addr close_win ignore_or_kill tag reminder
|
||||
}
|
||||
}
|
||||
|
||||
# Adjust font defaults for screen size
|
||||
proc SetFonts {} {
|
||||
global SetFontsWorked
|
||||
set h [winfo screenheight .]
|
||||
if {$h <= 480} {
|
||||
# Small screen (maybe eeepc?)
|
||||
font configure TkDefaultFont -size 6
|
||||
font configure TkFixedFont -size 6
|
||||
}
|
||||
set SetFontsWorked 1
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Makefile.in for REMIND
|
||||
#
|
||||
|
||||
VERSION=03.01.03
|
||||
SHELL= /bin/sh
|
||||
BETA = 1
|
||||
srcdir=@srcdir@
|
||||
@@ -12,6 +11,7 @@ bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
datarootdir=@datarootdir@
|
||||
VPATH=$(srcdir)
|
||||
VERSION=@VERSION@
|
||||
|
||||
INSTALL=@INSTALL@
|
||||
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||
@@ -92,3 +92,4 @@ beta-tgz:
|
||||
|
||||
#---------------- Stuff after this added by "make depend" -----------------
|
||||
|
||||
|
||||
|
||||
362
src/calendar.c
362
src/calendar.c
@@ -28,28 +28,103 @@
|
||||
/* Data structures used by the calendar */
|
||||
typedef struct cal_entry {
|
||||
struct cal_entry *next;
|
||||
char *text;
|
||||
char *pos;
|
||||
char const *text;
|
||||
char const *pos;
|
||||
int is_color;
|
||||
int r, g, b;
|
||||
int time;
|
||||
int priority;
|
||||
char tag[TAG_LEN+1];
|
||||
char passthru[PASSTHRU_LEN+1];
|
||||
int duration;
|
||||
char *filename;
|
||||
char const *filename;
|
||||
int lineno;
|
||||
} CalEntry;
|
||||
|
||||
/* Line-drawing sequences */
|
||||
struct line_drawing {
|
||||
char const *graphics_on;
|
||||
char const *graphics_off;
|
||||
char tlr, bl, tbl, blr, tblr, tr, tb, br, tbr, tl, lr;
|
||||
};
|
||||
|
||||
static struct line_drawing NormalDrawing = {
|
||||
"", "", '+', '+', '+', '+', '+', '+', '|', '+', '+', '+', '-'
|
||||
};
|
||||
|
||||
static struct line_drawing VT100Drawing = {
|
||||
"\x1B(0", "\x1B(B",
|
||||
'\x76', '\x6b', '\x75', '\x77', '\x6e', '\x6d', '\x78',
|
||||
'\x6c', '\x74', '\x6a', '\x71'
|
||||
};
|
||||
|
||||
static char *VT100Colors[2][2][2][2] /* [Br][R][G][B] */ = {
|
||||
{
|
||||
/*** DIM COLORS ***/
|
||||
{
|
||||
{
|
||||
/* 0, 0, 0 = Black */ "\x1B[0;30m",
|
||||
/* 0, 0, 1 = Blue */ "\x1B[0;34m"
|
||||
},
|
||||
{
|
||||
/* 0, 1, 0 = Green */ "\x1B[0;32m",
|
||||
/* 0, 1, 1 = Cyan */ "\x1B[0;36m"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
/* 1, 0, 0 = Red */ "\x1B[0;31m",
|
||||
/* 1, 0, 1 = Magenta */ "\x1B[0;35m"
|
||||
},
|
||||
{
|
||||
/* 1, 1, 0 = Yellow */ "\x1B[0;33m",
|
||||
/* 1, 1, 1 = White */ "\x1B[0;37m"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
/*** BRIGHT COLORS ***/
|
||||
{
|
||||
{
|
||||
/* 0, 0, 0 = Grey */ "\x1B[30;1m",
|
||||
/* 0, 0, 1 = Blue */ "\x1B[34;1m"
|
||||
},
|
||||
{
|
||||
/* 0, 1, 0 = Green */ "\x1B[32;1m",
|
||||
/* 0, 1, 1 = Cyan */ "\x1B[36;1m"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
/* 1, 0, 0 = Red */ "\x1B[31;1m",
|
||||
/* 1, 0, 1 = Magenta */ "\x1B[35;1m"
|
||||
},
|
||||
{
|
||||
/* 1, 1, 0 = Yellow */ "\x1B[33;1m",
|
||||
/* 1, 1, 1 = White */ "\x1B[37;1m"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static struct line_drawing *linestruct;
|
||||
#define DRAW(x) putchar(linestruct->x)
|
||||
|
||||
/* Global variables */
|
||||
static CalEntry *CalColumn[7];
|
||||
|
||||
static int ColSpaces;
|
||||
|
||||
static void Colorize(CalEntry const *e);
|
||||
static void Decolorize(void);
|
||||
static void SortCol (CalEntry **col);
|
||||
static void DoCalendarOneWeek (void);
|
||||
static void DoCalendarOneWeek (int nleft);
|
||||
static void DoCalendarOneMonth (void);
|
||||
static int WriteCalendarRow (void);
|
||||
static void PrintLeft (char *s, int width, char pad);
|
||||
static void PrintCentered (char *s, int width, char pad);
|
||||
static void WriteWeekHeaderLine (void);
|
||||
static void WritePostHeaderLine (void);
|
||||
static void PrintLeft (char const *s, int width, char pad);
|
||||
static void PrintCentered (char const *s, int width, char pad);
|
||||
static int WriteOneCalLine (void);
|
||||
static int WriteOneColLine (int col);
|
||||
static void GenerateCalEntries (int col);
|
||||
@@ -57,10 +132,42 @@ static void WriteCalHeader (void);
|
||||
static void WriteCalTrailer (void);
|
||||
static int DoCalRem (ParsePtr p, int col);
|
||||
static void WriteSimpleEntries (int col, int jul);
|
||||
static void WriteSolidCalLine (void);
|
||||
static void WriteTopCalLine (void);
|
||||
static void WriteBottomCalLine (void);
|
||||
static void WriteIntermediateCalLine (void);
|
||||
static void WriteCalDays (void);
|
||||
|
||||
static void gon(void)
|
||||
{
|
||||
printf("%s", linestruct->graphics_on);
|
||||
}
|
||||
static void goff(void)
|
||||
{
|
||||
printf("%s", linestruct->graphics_off);
|
||||
}
|
||||
|
||||
static void Decolorize(void)
|
||||
{
|
||||
printf("%s", "\x1B[0m");
|
||||
}
|
||||
|
||||
static void Colorize(CalEntry const *e)
|
||||
{
|
||||
int bright = 0;
|
||||
int r, g, b;
|
||||
if (e->r > 128 || e->g > 128 || e->b > 128) {
|
||||
bright = 1;
|
||||
}
|
||||
if (e->r > 64) r = 1;
|
||||
else r = 0;
|
||||
if (e->g > 64) g = 1;
|
||||
else g = 0;
|
||||
if (e->b > 64) b = 1;
|
||||
else b = 0;
|
||||
|
||||
printf("%s", VT100Colors[bright][r][g][b]);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ProduceCalendar */
|
||||
@@ -72,6 +179,11 @@ void ProduceCalendar(void)
|
||||
{
|
||||
int y, m, d;
|
||||
|
||||
if (UseVTChars) {
|
||||
linestruct = &VT100Drawing;
|
||||
} else {
|
||||
linestruct = &NormalDrawing;
|
||||
}
|
||||
ShouldCache = 1;
|
||||
|
||||
ColSpaces = (CalWidth - 9) / 7;
|
||||
@@ -88,13 +200,13 @@ void ProduceCalendar(void)
|
||||
else JulianToday -= ((JulianToday+1)%7);
|
||||
|
||||
if (!DoSimpleCalendar) {
|
||||
WriteIntermediateCalLine();
|
||||
WriteWeekHeaderLine();
|
||||
WriteCalDays();
|
||||
WriteIntermediateCalLine();
|
||||
}
|
||||
|
||||
while (CalWeeks--)
|
||||
DoCalendarOneWeek();
|
||||
DoCalendarOneWeek(CalWeeks);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +218,7 @@ void ProduceCalendar(void)
|
||||
/* Write a calendar for a single week */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void DoCalendarOneWeek(void)
|
||||
static void DoCalendarOneWeek(nleft)
|
||||
{
|
||||
int y, m, d, done, i, l, wd;
|
||||
char buf[81];
|
||||
@@ -132,7 +244,9 @@ static void DoCalendarOneWeek(void)
|
||||
}
|
||||
|
||||
/* Here come the first few lines... */
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
FromJulian(OrigJul+i, &y, &m, &d);
|
||||
sprintf(buf, "%d %c%c%c ", d, MonthName[m][0], MonthName[m][1],
|
||||
@@ -141,14 +255,20 @@ static void DoCalendarOneWeek(void)
|
||||
PrintLeft(buf, ColSpaces, '*');
|
||||
else
|
||||
PrintLeft(buf, ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
for (l=0; l<CalPad; l++) {
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
@@ -162,16 +282,24 @@ static void DoCalendarOneWeek(void)
|
||||
|
||||
/* Write any blank lines required */
|
||||
while (LinesWritten++ < CalLines) {
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
/* Write the final line */
|
||||
WriteIntermediateCalLine();
|
||||
if (nleft) {
|
||||
WriteIntermediateCalLine();
|
||||
} else {
|
||||
WriteBottomCalLine();
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -228,6 +356,7 @@ static int WriteCalendarRow(void)
|
||||
char buf[81];
|
||||
int OrigJul = JulianToday;
|
||||
int LinesWritten = 0;
|
||||
int moreleft;
|
||||
|
||||
/* Get the date of the first day */
|
||||
FromJulian(JulianToday, &y, &m, &d);
|
||||
@@ -253,7 +382,9 @@ static int WriteCalendarRow(void)
|
||||
|
||||
|
||||
/* Here come the first few lines... */
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
if (i < wd || d+i-wd>DaysInMonth(m, y))
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
@@ -261,14 +392,20 @@ static int WriteCalendarRow(void)
|
||||
sprintf(buf, "%d", d+i-wd);
|
||||
PrintLeft(buf, ColSpaces, ' ');
|
||||
}
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
for (l=0; l<CalPad; l++) {
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
@@ -282,18 +419,27 @@ static int WriteCalendarRow(void)
|
||||
|
||||
/* Write any blank lines required */
|
||||
while (LinesWritten++ < CalLines) {
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
WriteIntermediateCalLine();
|
||||
moreleft = (d+7-wd <= DaysInMonth(m, y));
|
||||
if (moreleft) {
|
||||
WriteIntermediateCalLine();
|
||||
} else {
|
||||
WriteBottomCalLine();
|
||||
}
|
||||
|
||||
/* Return non-zero if we have not yet finished */
|
||||
return (d+7-wd <= DaysInMonth(m, y));
|
||||
return moreleft;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -303,7 +449,7 @@ static int WriteCalendarRow(void)
|
||||
/* Left-justify a piece of text. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void PrintLeft(char *s, int width, char pad)
|
||||
static void PrintLeft(char const *s, int width, char pad)
|
||||
{
|
||||
int len = strlen(s);
|
||||
printf("%s", s);
|
||||
@@ -317,7 +463,7 @@ static void PrintLeft(char *s, int width, char pad)
|
||||
/* Center a piec of text */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void PrintCentered(char *s, int width, char pad)
|
||||
static void PrintCentered(char const *s, int width, char pad)
|
||||
{
|
||||
int len = strlen(s);
|
||||
int d = (width - len) / 2;
|
||||
@@ -341,14 +487,18 @@ static int WriteOneCalLine(void)
|
||||
{
|
||||
int done = 1, i;
|
||||
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
if (CalColumn[i]) {
|
||||
if (WriteOneColLine(i)) done = 0;
|
||||
} else {
|
||||
PrintCentered("", ColSpaces, ' ');
|
||||
}
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
|
||||
@@ -367,8 +517,8 @@ static int WriteOneCalLine(void)
|
||||
static int WriteOneColLine(int col)
|
||||
{
|
||||
CalEntry *e = CalColumn[col];
|
||||
char *s;
|
||||
char *space;
|
||||
char const *s;
|
||||
char const *space;
|
||||
int numwritten = 0;
|
||||
|
||||
/* Print as many characters as possible within the column */
|
||||
@@ -380,8 +530,8 @@ static int WriteOneColLine(int col)
|
||||
if (!*s && e->next) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e->filename);
|
||||
free((char *) e->text);
|
||||
free((char *) e->filename);
|
||||
free(e);
|
||||
return 1;
|
||||
}
|
||||
@@ -393,6 +543,11 @@ static int WriteOneColLine(int col)
|
||||
s++;
|
||||
}
|
||||
|
||||
/* Colorize reminder if necessary */
|
||||
if (UseVTColors && e->is_color) {
|
||||
Colorize(e);
|
||||
}
|
||||
|
||||
/* If we couldn't find a space char, print what we have. */
|
||||
if (!space) {
|
||||
for (s = e->pos; s - e->pos < ColSpaces; s++) {
|
||||
@@ -411,6 +566,11 @@ static int WriteOneColLine(int col)
|
||||
}
|
||||
}
|
||||
|
||||
/* Decolorize reminder if necessary */
|
||||
if (UseVTColors && e->is_color) {
|
||||
Decolorize();
|
||||
}
|
||||
|
||||
/* Flesh out the rest of the column */
|
||||
while(numwritten++ < ColSpaces) PutChar(' ');
|
||||
|
||||
@@ -420,8 +580,8 @@ static int WriteOneColLine(int col)
|
||||
/* If done, free memory if no next entry. */
|
||||
if (!*s && !e->next) {
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e->filename);
|
||||
free((char *) e->text);
|
||||
free((char *) e->filename);
|
||||
free(e);
|
||||
} else {
|
||||
e->pos = s;
|
||||
@@ -440,7 +600,7 @@ static void GenerateCalEntries(int col)
|
||||
{
|
||||
int r;
|
||||
Token tok;
|
||||
char *s;
|
||||
char const *s;
|
||||
Parser p;
|
||||
|
||||
/* Do some initialization first... */
|
||||
@@ -449,7 +609,7 @@ static void GenerateCalEntries(int col)
|
||||
DestroyVars(0);
|
||||
NumTriggered = 0;
|
||||
|
||||
r=OpenFile(InitialFile);
|
||||
r=IncludeFile(InitialFile);
|
||||
if (r) {
|
||||
fprintf(ErrFp, "%s %s: %s\n", ErrMsg[E_ERR_READING], InitialFile, ErrMsg[r]);
|
||||
exit(1);
|
||||
@@ -549,14 +709,18 @@ static void WriteCalHeader(void)
|
||||
FromJulian(JulianToday, &y, &m, &d);
|
||||
sprintf(buf, "%s %d", MonthName[m], y);
|
||||
|
||||
WriteSolidCalLine();
|
||||
WriteTopCalLine();
|
||||
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
PrintCentered(buf, CalWidth-2, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
PutChar('\n');
|
||||
|
||||
WriteIntermediateCalLine();
|
||||
WritePostHeaderLine();
|
||||
WriteCalDays();
|
||||
WriteIntermediateCalLine();
|
||||
}
|
||||
@@ -588,10 +752,13 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
int jul;
|
||||
CalEntry *CurCol = CalColumn[col];
|
||||
CalEntry *e;
|
||||
char *s, *s2;
|
||||
char const *s, *s2;
|
||||
DynamicBuffer buf, obuf, pre_buf;
|
||||
Token tok;
|
||||
|
||||
int is_color, col_r, col_g, col_b;
|
||||
|
||||
is_color = 0;
|
||||
DBufInit(&buf);
|
||||
DBufInit(&pre_buf);
|
||||
|
||||
@@ -604,6 +771,7 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
if (trig.typ == SAT_TYPE) {
|
||||
r=DoSatRemind(&trig, &tim, p);
|
||||
if (r) return r;
|
||||
if (!LastTrigValid) return OK;
|
||||
r=ParseToken(p, &buf);
|
||||
if (r) return r;
|
||||
FindToken(DBufValue(&buf), &tok);
|
||||
@@ -640,6 +808,7 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
if (trig.typ == PASSTHRU_TYPE) {
|
||||
if (!PsCal && strcmp(trig.passthru, "COLOR")) return OK;
|
||||
if (!strcmp(trig.passthru, "COLOR")) {
|
||||
is_color = 1;
|
||||
/* Strip off the three color numbers */
|
||||
DBufFree(&buf);
|
||||
r=ParseToken(p, &buf);
|
||||
@@ -657,6 +826,15 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
DBufPutc(&pre_buf, ' ');
|
||||
DBufFree(&buf);
|
||||
if (r) return r;
|
||||
(void) sscanf(DBufValue(&pre_buf), "%d %d %d",
|
||||
&col_r, &col_g, &col_b);
|
||||
if (col_r < 0) col_r = 0;
|
||||
else if (col_r > 255) col_r = 255;
|
||||
if (col_g < 0) col_g = 0;
|
||||
else if (col_g > 255) col_g = 255;
|
||||
if (col_b < 0) col_b = 0;
|
||||
else if (col_b > 255) col_b = 255;
|
||||
|
||||
if (!PsCal && !DoSimpleCalendar) {
|
||||
DBufFree(&pre_buf);
|
||||
}
|
||||
@@ -666,8 +844,7 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
/* If trigger date == today, add it to the current entry */
|
||||
DBufInit(&obuf);
|
||||
if ((jul == JulianToday) ||
|
||||
(DoSimpleCalendar &&
|
||||
DoSimpleCalDelta &&
|
||||
(DoSimpleCalDelta &&
|
||||
ShouldTriggerReminder(&trig, &tim, jul))) {
|
||||
NumTriggered++;
|
||||
|
||||
@@ -749,6 +926,10 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
DBufPuts(&pre_buf, s);
|
||||
s = DBufValue(&pre_buf);
|
||||
e = NEW(CalEntry);
|
||||
e->is_color = is_color;
|
||||
e->r = col_r;
|
||||
e->g = col_g;
|
||||
e->b = col_b;
|
||||
if (!e) {
|
||||
DBufFree(&obuf);
|
||||
DBufFree(&pre_buf);
|
||||
@@ -830,8 +1011,8 @@ static void WriteSimpleEntries(int col, int jul)
|
||||
printf("* ");
|
||||
}
|
||||
printf("%s\n", e->text);
|
||||
free(e->text);
|
||||
free(e->filename);
|
||||
free((char *) e->text);
|
||||
free((char *) e->filename);
|
||||
n = e->next;
|
||||
free(e);
|
||||
e = n;
|
||||
@@ -844,11 +1025,64 @@ static void WriteSimpleEntries(int col, int jul)
|
||||
/* Various functions for writing different types of lines. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void WriteSolidCalLine(void)
|
||||
static void WriteTopCalLine(void)
|
||||
{
|
||||
PutChar('+');
|
||||
PrintCentered("", CalWidth-2, '-');
|
||||
PutChar('+');
|
||||
gon();
|
||||
DRAW(br);
|
||||
PrintCentered("", CalWidth-2, linestruct->lr);
|
||||
DRAW(bl);
|
||||
goff();
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
static void WriteBottomCalLine(void)
|
||||
{
|
||||
int i;
|
||||
gon();
|
||||
DRAW(tr);
|
||||
for (i=0; i<7; i++) {
|
||||
PrintCentered("", ColSpaces, linestruct->lr);
|
||||
if (i != 6) {
|
||||
DRAW(tlr);
|
||||
} else {
|
||||
DRAW(tl);
|
||||
}
|
||||
}
|
||||
goff();
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
static void WritePostHeaderLine(void)
|
||||
{
|
||||
int i;
|
||||
gon();
|
||||
DRAW(tbr);
|
||||
for (i=0; i<7; i++) {
|
||||
PrintCentered("", ColSpaces, linestruct->lr);
|
||||
if (i != 6) {
|
||||
DRAW(blr);
|
||||
} else {
|
||||
DRAW(tbl);
|
||||
}
|
||||
}
|
||||
goff();
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
static void WriteWeekHeaderLine(void)
|
||||
{
|
||||
int i;
|
||||
gon();
|
||||
DRAW(br);
|
||||
for (i=0; i<7; i++) {
|
||||
PrintCentered("", ColSpaces, linestruct->lr);
|
||||
if (i != 6) {
|
||||
DRAW(blr);
|
||||
} else {
|
||||
DRAW(bl);
|
||||
}
|
||||
}
|
||||
goff();
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
@@ -856,24 +1090,34 @@ static void WriteIntermediateCalLine(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
PutChar('+');
|
||||
gon();
|
||||
DRAW(tbr);
|
||||
for (i=0; i<7; i++) {
|
||||
PrintCentered("", ColSpaces, '-');
|
||||
PutChar('+');
|
||||
PrintCentered("", ColSpaces, linestruct->lr);
|
||||
if (i != 6) {
|
||||
DRAW(tblr);
|
||||
} else {
|
||||
DRAW(tbl);
|
||||
}
|
||||
}
|
||||
goff();
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
static void WriteCalDays(void)
|
||||
{
|
||||
int i;
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
for (i=0; i<7; i++) {
|
||||
if (!MondayFirst)
|
||||
PrintCentered(DayName[(i+6)%7], ColSpaces, ' ');
|
||||
else
|
||||
PrintCentered(DayName[i%7], ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
gon();
|
||||
DRAW(tb);
|
||||
goff();
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
@@ -888,14 +1132,14 @@ static void WriteCalDays(void)
|
||||
/* This takes into account duration */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *
|
||||
char const *
|
||||
CalendarTime(int tim, int duration)
|
||||
{
|
||||
static char buf[128];
|
||||
int h, min, hh;
|
||||
int h2, min2, hh2, newtim, days;
|
||||
char *ampm1;
|
||||
char *ampm2;
|
||||
char const *ampm1;
|
||||
char const *ampm2;
|
||||
char daybuf[64];
|
||||
|
||||
buf[0] = 0;
|
||||
@@ -970,7 +1214,7 @@ CalendarTime(int tim, int duration)
|
||||
/* A trailing space is always added. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *SimpleTime(int tim)
|
||||
char const *SimpleTime(int tim)
|
||||
{
|
||||
static char buf[32];
|
||||
int h, min, hh;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* src/config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
#undef HAVE_UTIME_NULL
|
||||
|
||||
@@ -12,6 +10,11 @@
|
||||
/* Define if you have the <sys/file.h> header file. */
|
||||
#undef HAVE_SYS_FILE_H
|
||||
|
||||
/* Define if you have the <glob.h> header file */
|
||||
#undef HAVE_GLOB_H
|
||||
|
||||
#undef HAVE_GLOB
|
||||
|
||||
#undef HAVE_SETENV
|
||||
|
||||
#undef HAVE_UNSETENV
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* INCLUDE_NEST: How many nested INCLUDES do we handle? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define INCLUDE_NEST 8
|
||||
#define INCLUDE_NEST 9
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* IF_NEST: How many nested IFs do we handle? Maximum is the number */
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* INCLUDE_NEST: How many nested INCLUDES do we handle? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define INCLUDE_NEST 8
|
||||
#define INCLUDE_NEST 9
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* IF_NEST: How many nested IFs do we handle? Maximum is the number */
|
||||
|
||||
20
src/dorem.c
20
src/dorem.c
@@ -555,7 +555,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
||||
char tmpBuf[64];
|
||||
DynamicBuffer buf, calRow;
|
||||
DynamicBuffer pre_buf;
|
||||
char *s;
|
||||
char const *s;
|
||||
Value v;
|
||||
|
||||
DBufInit(&buf);
|
||||
@@ -781,6 +781,11 @@ int ShouldTriggerReminder(Trigger *t, TimeTrig *tim, int jul)
|
||||
|
||||
/* If there's a "warn" function, it overrides any deltas */
|
||||
if (t->warn[0] != 0) {
|
||||
if (DeltaOffset) {
|
||||
if (jul <= JulianToday + DeltaOffset) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return ShouldTriggerBasedOnWarn(t, jul);
|
||||
}
|
||||
|
||||
@@ -798,7 +803,7 @@ int ShouldTriggerReminder(Trigger *t, TimeTrig *tim, int jul)
|
||||
}
|
||||
|
||||
/* Should we trigger the reminder? */
|
||||
return (jul <= JulianToday);
|
||||
return (jul <= JulianToday + DeltaOffset);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -812,7 +817,8 @@ int DoSatRemind(Trigger *trig, TimeTrig *tim, ParsePtr p)
|
||||
{
|
||||
int iter, jul, r;
|
||||
Value v;
|
||||
char *s, *t;
|
||||
char const *s;
|
||||
char const *t;
|
||||
|
||||
t = p->pos;
|
||||
iter = 0;
|
||||
@@ -848,7 +854,7 @@ int DoSatRemind(Trigger *trig, TimeTrig *tim, ParsePtr p)
|
||||
static int ParsePriority(ParsePtr s, Trigger *t)
|
||||
{
|
||||
int p, r;
|
||||
char *u;
|
||||
char const *u;
|
||||
DynamicBuffer buf;
|
||||
DBufInit(&buf);
|
||||
|
||||
@@ -886,14 +892,14 @@ static int ParsePriority(ParsePtr s, Trigger *t)
|
||||
/* Execute the '-k' command, escaping shell chars in message. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int DoMsgCommand(char *cmd, char *msg)
|
||||
int DoMsgCommand(char const *cmd, char const *msg)
|
||||
{
|
||||
int r;
|
||||
int i, l;
|
||||
DynamicBuffer execBuffer;
|
||||
|
||||
DynamicBuffer buf;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
DBufInit(&buf);
|
||||
DBufInit(&execBuffer);
|
||||
@@ -951,7 +957,7 @@ static int ShouldTriggerBasedOnWarn(Trigger *t, int jul)
|
||||
{
|
||||
char buffer[VAR_NAME_LEN+32];
|
||||
int i;
|
||||
char *s;
|
||||
char const *s;
|
||||
int r;
|
||||
Value v;
|
||||
int lastReturnVal = 0; /* Silence compiler warning */
|
||||
|
||||
@@ -54,11 +54,12 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul,
|
||||
int d, m, y;
|
||||
int tim = tt->ttime;
|
||||
int h, min, hh, ch, cmin, chh;
|
||||
char *pm, *cpm;
|
||||
char const *pm, *cpm;
|
||||
int tdiff, adiff, mdiff, hdiff;
|
||||
char *mplu, *hplu, *when, *plu;
|
||||
char const *mplu, *hplu, *when, *plu;
|
||||
int has_quote = 0;
|
||||
char *ss, *os;
|
||||
char *ss;
|
||||
char *os;
|
||||
char s[256];
|
||||
int origLen = DBufLen(dbuf);
|
||||
|
||||
@@ -649,7 +650,7 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul,
|
||||
/* default triggers and a mode of NORMAL_MODE. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int DoSubstFromString(char *source, DynamicBuffer *dbuf,
|
||||
int DoSubstFromString(char const *source, DynamicBuffer *dbuf,
|
||||
int jul, int tim)
|
||||
{
|
||||
Trigger tempTrig;
|
||||
|
||||
@@ -42,7 +42,7 @@ static int DBufMakeRoom(DynamicBuffer *dbuf, int n)
|
||||
}
|
||||
|
||||
/* Allocate memory */
|
||||
buf = (char *) malloc(size);
|
||||
buf = malloc(size);
|
||||
if (!buf) return E_NO_MEM;
|
||||
|
||||
/* Copy contents */
|
||||
@@ -102,7 +102,7 @@ int DBufPutcFN(DynamicBuffer *dbuf, char c)
|
||||
%DESCRIPTION:
|
||||
Appends a string to the buffer.
|
||||
**********************************************************************/
|
||||
int DBufPuts(DynamicBuffer *dbuf, char *str)
|
||||
int DBufPuts(DynamicBuffer *dbuf, char const *str)
|
||||
{
|
||||
int l = strlen(str);
|
||||
if (!l) return OK;
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef struct {
|
||||
|
||||
void DBufInit(DynamicBuffer *dbuf);
|
||||
int DBufPutcFN(DynamicBuffer *dbuf, char c);
|
||||
int DBufPuts(DynamicBuffer *dbuf, char *str);
|
||||
int DBufPuts(DynamicBuffer *dbuf, char const *str);
|
||||
void DBufFree(DynamicBuffer *dbuf);
|
||||
int DBufGets(DynamicBuffer *dbuf, FILE *fp);
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
#define E_EXPECTING_NUMBER 97
|
||||
#define M_BAD_WARN_FUNC 98
|
||||
#define E_CANT_CONVERT_TZ 99
|
||||
#define E_NO_MATCHING_REMS 100
|
||||
|
||||
#ifdef MK_GLOBALS
|
||||
#undef EXTERN
|
||||
@@ -189,7 +190,7 @@ EXTERN char *ErrMsg[]
|
||||
"Too many partial OMITs",
|
||||
"Too many full OMITs",
|
||||
"Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT",
|
||||
"Error reading file",
|
||||
"Error reading",
|
||||
"Expecting end-of-line",
|
||||
"Invalid Hebrew date",
|
||||
"IIF needs odd number of arguments",
|
||||
@@ -230,7 +231,8 @@ EXTERN char *ErrMsg[]
|
||||
"%d reminder(s) queued for later today.\n",
|
||||
"Expecting number",
|
||||
"Bad function in WARN clause",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
}
|
||||
#endif /* MK_GLOBALS */
|
||||
;
|
||||
|
||||
78
src/expr.c
78
src/expr.c
@@ -41,8 +41,8 @@ static int Multiply(void), Divide(void), Mod(void), Add(void),
|
||||
UnMinus(void), LogNot(void),
|
||||
Compare(int);
|
||||
|
||||
static int MakeValue (char *s, Value *v, Var *locals);
|
||||
static int ParseLiteralDate (char **s, int *jul, int *tim);
|
||||
static int MakeValue (char const *s, Value *v, Var *locals);
|
||||
static int ParseLiteralDate (char const **s, int *jul, int *tim);
|
||||
|
||||
/* Binary operators - all left-associative */
|
||||
|
||||
@@ -132,9 +132,9 @@ static void CleanStack(void)
|
||||
/* PeekChar - peek ahead to next char. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static char PeekChar(char **s)
|
||||
static char PeekChar(char const **s)
|
||||
{
|
||||
char *t = *s;
|
||||
char const *t = *s;
|
||||
while (*t && isspace(*t)) t++;
|
||||
return *t;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ static char PeekChar(char **s)
|
||||
/* Read a token. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int ParseExprToken(DynamicBuffer *buf, char **in)
|
||||
static int ParseExprToken(DynamicBuffer *buf, char const **in)
|
||||
{
|
||||
|
||||
char c;
|
||||
@@ -204,6 +204,46 @@ static int ParseExprToken(DynamicBuffer *buf, char **in)
|
||||
if (c == '\"') {
|
||||
if (!**in) return E_MISS_QUOTE;
|
||||
while (**in) {
|
||||
/* Allow backslash-escapes */
|
||||
if (**in == '\\') {
|
||||
int r;
|
||||
(*in)++;
|
||||
if (!**in) {
|
||||
DBufFree(buf);
|
||||
return E_MISS_QUOTE;
|
||||
}
|
||||
switch(**in) {
|
||||
case 'a':
|
||||
r = DBufPutc(buf, '\a');
|
||||
break;
|
||||
case 'b':
|
||||
r = DBufPutc(buf, '\b');
|
||||
break;
|
||||
case 'f':
|
||||
r = DBufPutc(buf, '\f');
|
||||
break;
|
||||
case 'n':
|
||||
r = DBufPutc(buf, '\n');
|
||||
break;
|
||||
case 'r':
|
||||
r = DBufPutc(buf, '\r');
|
||||
break;
|
||||
case 't':
|
||||
r = DBufPutc(buf, '\t');
|
||||
break;
|
||||
case 'v':
|
||||
r = DBufPutc(buf, '\v');
|
||||
break;
|
||||
default:
|
||||
r = DBufPutc(buf, **in);
|
||||
}
|
||||
(*in)++;
|
||||
if (r != OK) {
|
||||
DBufFree(buf);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
c = *(*in)++;
|
||||
if (DBufPutc(buf, c) != OK) {
|
||||
DBufFree(buf);
|
||||
@@ -266,7 +306,7 @@ static int ParseExprToken(DynamicBuffer *buf, char **in)
|
||||
/* Put the result into value pointed to by v. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int EvalExpr(char **e, Value *v)
|
||||
int EvalExpr(char const **e, Value *v)
|
||||
{
|
||||
int r;
|
||||
|
||||
@@ -289,7 +329,7 @@ int EvalExpr(char **e, Value *v)
|
||||
}
|
||||
|
||||
/* Evaluate - do the actual work of evaluation. */
|
||||
int Evaluate(char **s, Var *locals)
|
||||
int Evaluate(char const **s, Var *locals)
|
||||
{
|
||||
int OpBase, ValBase;
|
||||
int r;
|
||||
@@ -297,7 +337,7 @@ int Evaluate(char **s, Var *locals)
|
||||
int args; /* Number of function arguments */
|
||||
Operator op, op2;
|
||||
Value va;
|
||||
char *ufname = NULL; /* Stop GCC from complaining about use of uninit var */
|
||||
char const *ufname = NULL; /* Stop GCC from complaining about use of uninit var */
|
||||
|
||||
OpBase = OpStackPtr;
|
||||
ValBase = ValStackPtr;
|
||||
@@ -339,7 +379,7 @@ int Evaluate(char **s, Var *locals)
|
||||
if (f) r = CallFunc(f, 0);
|
||||
else {
|
||||
r = CallUserFunc(ufname, 0);
|
||||
free(ufname);
|
||||
free((char *) ufname);
|
||||
}
|
||||
if (r) return r;
|
||||
r = ParseExprToken(&ExprBuf, s); /* Guaranteed to be right paren. */
|
||||
@@ -349,12 +389,12 @@ int Evaluate(char **s, Var *locals)
|
||||
args++;
|
||||
r = Evaluate(s, locals);
|
||||
if (r) {
|
||||
if (!f) free(ufname);
|
||||
if (!f) free((char *) ufname);
|
||||
return r;
|
||||
}
|
||||
if (*DBufValue(&ExprBuf) == ')') break;
|
||||
else if (*DBufValue(&ExprBuf) != ',') {
|
||||
if (!f) free(ufname);
|
||||
if (!f) free((char *) ufname);
|
||||
Eprint("%s: `%c'", ErrMsg[E_EXPECT_COMMA],
|
||||
*DBufValue(&ExprBuf));
|
||||
DBufFree(&ExprBuf);
|
||||
@@ -364,7 +404,7 @@ int Evaluate(char **s, Var *locals)
|
||||
if (f) r = CallFunc(f, args);
|
||||
else {
|
||||
r = CallUserFunc(ufname, args);
|
||||
free(ufname);
|
||||
free((char *) ufname);
|
||||
}
|
||||
DBufFree(&ExprBuf);
|
||||
if (r) return r;
|
||||
@@ -448,7 +488,7 @@ int Evaluate(char **s, Var *locals)
|
||||
/* a date or the value of a symbol. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int MakeValue(char *s, Value *v, Var *locals)
|
||||
static int MakeValue(char const *s, Value *v, Var *locals)
|
||||
{
|
||||
int len;
|
||||
int h, m, r;
|
||||
@@ -456,7 +496,7 @@ static int MakeValue(char *s, Value *v, Var *locals)
|
||||
if (*s == '\"') { /* It's a literal string "*/
|
||||
len = strlen(s)-1;
|
||||
v->type = STR_TYPE;
|
||||
v->v.str = (char *) malloc(len);
|
||||
v->v.str = malloc(len);
|
||||
if (! v->v.str) {
|
||||
v->type = ERR_TYPE;
|
||||
return E_NO_MEM;
|
||||
@@ -533,7 +573,7 @@ static int MakeValue(char *s, Value *v, Var *locals)
|
||||
int DoCoerce(char type, Value *v)
|
||||
{
|
||||
int h, d, m, y, i, k;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
/* Do nothing if value is already the right type */
|
||||
if (type == v->type) return OK;
|
||||
@@ -751,7 +791,7 @@ static int Add(void)
|
||||
return r;
|
||||
}
|
||||
v3.type = STR_TYPE;
|
||||
v3.v.str = (char *) malloc(strlen(v1.v.str) + strlen(v2.v.str) + 1);
|
||||
v3.v.str = malloc(strlen(v1.v.str) + strlen(v2.v.str) + 1);
|
||||
if (!v3.v.str) {
|
||||
DestroyValue(v1); DestroyValue(v2);
|
||||
return E_NO_MEM;
|
||||
@@ -1078,7 +1118,7 @@ static int LogNot(void)
|
||||
/* Find a function. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
Operator *FindFunc(char *name, Operator where[], int num)
|
||||
Operator *FindFunc(char const *name, Operator where[], int num)
|
||||
{
|
||||
int top=num-1, bot=0;
|
||||
int mid, r;
|
||||
@@ -1102,7 +1142,7 @@ Operator *FindFunc(char *name, Operator where[], int num)
|
||||
void PrintValue (Value *v, FILE *fp)
|
||||
{
|
||||
int y, m, d;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
if (v->type == STR_TYPE) {
|
||||
s=v->v.str;
|
||||
@@ -1154,7 +1194,7 @@ int CopyValue(Value *dest, const Value *src)
|
||||
/* and tim; update s. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int ParseLiteralDate(char **s, int *jul, int *tim)
|
||||
static int ParseLiteralDate(char const **s, int *jul, int *tim)
|
||||
{
|
||||
int y, m, d;
|
||||
int hour, min;
|
||||
|
||||
279
src/files.c
279
src/files.c
@@ -30,6 +30,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_GLOB_H
|
||||
#include <glob.h>
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
#include "globals.h"
|
||||
@@ -42,20 +46,34 @@
|
||||
/* Define the structures needed by the file caching system */
|
||||
typedef struct cache {
|
||||
struct cache *next;
|
||||
char *text;
|
||||
char const *text;
|
||||
int LineNo;
|
||||
} CachedLine;
|
||||
|
||||
typedef struct cheader {
|
||||
struct cheader *next;
|
||||
char *filename;
|
||||
char const *filename;
|
||||
CachedLine *cache;
|
||||
int ownedByMe;
|
||||
} CachedFile;
|
||||
|
||||
/* A linked list of filenames if we INCLUDE /some/directory/ */
|
||||
typedef struct fname_chain {
|
||||
struct fname_chain *next;
|
||||
char const *filename;
|
||||
} FilenameChain;
|
||||
|
||||
/* Cache filename chains for directories */
|
||||
typedef struct directory_fname_chain {
|
||||
struct directory_fname_chain *next;
|
||||
FilenameChain *chain;
|
||||
char const *dirname;
|
||||
} DirectoryFilenameChain;
|
||||
|
||||
/* Define the structures needed by the INCLUDE file system */
|
||||
typedef struct {
|
||||
char *filename;
|
||||
char const *filename;
|
||||
FilenameChain *chain;
|
||||
int LineNo;
|
||||
unsigned int IfFlags;
|
||||
int NumIfs;
|
||||
@@ -66,6 +84,7 @@ typedef struct {
|
||||
|
||||
static CachedFile *CachedFiles = (CachedFile *) NULL;
|
||||
static CachedLine *CLine = (CachedLine *) NULL;
|
||||
static DirectoryFilenameChain *CachedDirectoryChains = NULL;
|
||||
|
||||
static FILE *fp;
|
||||
|
||||
@@ -73,9 +92,26 @@ static IncludeStruct IStack[INCLUDE_NEST];
|
||||
static int IStackPtr = 0;
|
||||
|
||||
static int ReadLineFromFile (void);
|
||||
static int CacheFile (const char *fname);
|
||||
static int CacheFile (char const *fname);
|
||||
static void DestroyCache (CachedFile *cf);
|
||||
static int CheckSafety (void);
|
||||
static int PopFile (void);
|
||||
|
||||
static void FreeChainItem(FilenameChain *chain)
|
||||
{
|
||||
if (chain->filename) free((void *) chain->filename);
|
||||
free(chain);
|
||||
}
|
||||
|
||||
static void FreeChain(FilenameChain *chain)
|
||||
{
|
||||
FilenameChain *next;
|
||||
while(chain) {
|
||||
next = chain->next;
|
||||
FreeChainItem(chain);
|
||||
chain = next;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
@@ -140,7 +176,7 @@ static int ReadLineFromFile(void)
|
||||
}
|
||||
l = DBufLen(&buf);
|
||||
if (l && (DBufValue(&buf)[l-1] == '\\')) {
|
||||
DBufValue(&buf)[l-1] = 0;
|
||||
DBufValue(&buf)[l-1] = '\n';
|
||||
if (DBufPuts(&LineBuffer, DBufValue(&buf)) != OK) {
|
||||
DBufFree(&buf);
|
||||
DBufFree(&LineBuffer);
|
||||
@@ -171,7 +207,7 @@ static int ReadLineFromFile(void)
|
||||
/* ShouldCache is 1, cache the file */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int OpenFile(const char *fname)
|
||||
int OpenFile(char const *fname)
|
||||
{
|
||||
CachedFile *h = CachedFiles;
|
||||
int r;
|
||||
@@ -183,6 +219,9 @@ int OpenFile(const char *fname)
|
||||
|
||||
while (h) {
|
||||
if (!strcmp(fname, h->filename)) {
|
||||
if (DebugFlag & DB_TRACE_FILES) {
|
||||
fprintf(ErrFp, "Reading `%s': Found in cache\n", fname);
|
||||
}
|
||||
CLine = h->cache;
|
||||
STRSET(FileName, fname);
|
||||
LineNo = 0;
|
||||
@@ -197,8 +236,14 @@ int OpenFile(const char *fname)
|
||||
/* If it's a dash, then it's stdin */
|
||||
if (!strcmp(fname, "-")) {
|
||||
fp = stdin;
|
||||
if (DebugFlag & DB_TRACE_FILES) {
|
||||
fprintf(ErrFp, "Reading `-': Reading stdin\n");
|
||||
}
|
||||
} else {
|
||||
fp = fopen(fname, "r");
|
||||
if (DebugFlag & DB_TRACE_FILES) {
|
||||
fprintf(ErrFp, "Reading `%s': Opening file on disk\n", fname);
|
||||
}
|
||||
}
|
||||
if (!fp || !CheckSafety()) return E_CANT_OPEN;
|
||||
CLine = NULL;
|
||||
@@ -230,13 +275,16 @@ int OpenFile(const char *fname)
|
||||
/* Returns an indication of success or failure. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int CacheFile(const char *fname)
|
||||
static int CacheFile(char const *fname)
|
||||
{
|
||||
int r;
|
||||
CachedFile *cf;
|
||||
CachedLine *cl;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
if (DebugFlag & DB_TRACE_FILES) {
|
||||
fprintf(ErrFp, "Caching file `%s' in memory\n", fname);
|
||||
}
|
||||
cl = NULL;
|
||||
/* Create a file header */
|
||||
cf = NEW(CachedFile);
|
||||
@@ -311,13 +359,33 @@ static int CacheFile(const char *fname)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* NextChainedFile - move to the next chained file in a glob */
|
||||
/* list. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int NextChainedFile(IncludeStruct *i)
|
||||
{
|
||||
while(i->chain) {
|
||||
FilenameChain *cur = i->chain;
|
||||
i->chain = i->chain->next;
|
||||
if (OpenFile(cur->filename) == OK) {
|
||||
return OK;
|
||||
} else {
|
||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], cur->filename);
|
||||
}
|
||||
}
|
||||
return E_EOF;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* PopFile - we've reached the end. Pop up to the previous */
|
||||
/* file, or return E_EOF */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int PopFile(void)
|
||||
static int PopFile(void)
|
||||
{
|
||||
IncludeStruct *i;
|
||||
|
||||
@@ -326,8 +394,21 @@ int PopFile(void)
|
||||
|
||||
if (!Hush && NumIfs) Eprint("%s", ErrMsg[E_MISS_ENDIF]);
|
||||
if (!IStackPtr) return E_EOF;
|
||||
i = &IStack[IStackPtr-1];
|
||||
|
||||
if (i->chain) {
|
||||
int oldRunDisabled = RunDisabled;
|
||||
if (NextChainedFile(i) == OK) {
|
||||
return OK;
|
||||
}
|
||||
RunDisabled = oldRunDisabled;
|
||||
}
|
||||
|
||||
if (IStackPtr <= 1) {
|
||||
return E_EOF;
|
||||
}
|
||||
|
||||
IStackPtr--;
|
||||
i = &IStack[IStackPtr];
|
||||
|
||||
LineNo = i->LineNo;
|
||||
IfFlags = i->IfFlags;
|
||||
@@ -349,7 +430,7 @@ int PopFile(void)
|
||||
if (fp != stdin)
|
||||
(void) fseek(fp, i->offset, 0); /* Trust that it works... */
|
||||
}
|
||||
free(i->filename);
|
||||
free((char *) i->filename);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -361,13 +442,13 @@ int PopFile(void)
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int DoInclude(ParsePtr p)
|
||||
{
|
||||
{
|
||||
DynamicBuffer buf;
|
||||
int r, e;
|
||||
|
||||
DBufInit(&buf);
|
||||
if ( (r=ParseToken(p, &buf)) ) return r;
|
||||
e = VerifyEoln(p);
|
||||
e = VerifyEoln(p);
|
||||
if (e) Eprint("%s", ErrMsg[e]);
|
||||
if ( (r=IncludeFile(DBufValue(&buf))) ) {
|
||||
DBufFree(&buf);
|
||||
@@ -379,6 +460,114 @@ int DoInclude(ParsePtr p)
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GLOB
|
||||
static int SetupGlobChain(char const *dirname, IncludeStruct *i)
|
||||
{
|
||||
DynamicBuffer pattern;
|
||||
char *dir;
|
||||
size_t l;
|
||||
int r;
|
||||
glob_t glob_buf;
|
||||
DirectoryFilenameChain *dc = CachedDirectoryChains;
|
||||
|
||||
i->chain = NULL;
|
||||
if (!*dirname) return E_CANT_OPEN;
|
||||
|
||||
dir = StrDup(dirname);
|
||||
if (!dir) return E_NO_MEM;
|
||||
|
||||
/* Strip trailing slashes off directory */
|
||||
l = strlen(dir);
|
||||
while(l) {
|
||||
if (*(dir+l-1) == '/') {
|
||||
l--;
|
||||
*(dir+l) = 0;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Repair root directory :-) */
|
||||
if (!l) {
|
||||
*dir = '/';
|
||||
}
|
||||
|
||||
/* Check the cache */
|
||||
while(dc) {
|
||||
if (!strcmp(dc->dirname, dir)) {
|
||||
free(dir);
|
||||
i->chain = dc->chain;
|
||||
return OK;
|
||||
}
|
||||
dc = dc->next;
|
||||
}
|
||||
|
||||
if (ShouldCache) {
|
||||
dc = malloc(sizeof(DirectoryFilenameChain));
|
||||
if (dc) {
|
||||
dc->dirname = StrDup(dir);
|
||||
if (!dc->dirname) {
|
||||
free(dc);
|
||||
dc = NULL;
|
||||
}
|
||||
}
|
||||
if (dc) {
|
||||
dc->chain = NULL;
|
||||
dc->next = CachedDirectoryChains;
|
||||
CachedDirectoryChains = dc;
|
||||
}
|
||||
}
|
||||
|
||||
DBufInit(&pattern);
|
||||
DBufPuts(&pattern, dir);
|
||||
DBufPuts(&pattern, "/*.rem");
|
||||
free(dir);
|
||||
|
||||
r = glob(DBufValue(&pattern), 0, NULL, &glob_buf);
|
||||
DBufFree(&pattern);
|
||||
|
||||
if (r == GLOB_NOMATCH) {
|
||||
globfree(&glob_buf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
if (r != 0) {
|
||||
globfree(&glob_buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Add the files to the chain backwards to preserve sort order */
|
||||
for (r=glob_buf.gl_pathc-1; r>=0; r--) {
|
||||
FilenameChain *ch = malloc(sizeof(FilenameChain));
|
||||
if (!ch) {
|
||||
globfree(&glob_buf);
|
||||
FreeChain(i->chain);
|
||||
i->chain = NULL;
|
||||
return E_NO_MEM;
|
||||
}
|
||||
|
||||
/* TODO: stat the file and only add if it's a plain file and
|
||||
readable by us */
|
||||
ch->filename = StrDup(glob_buf.gl_pathv[r]);
|
||||
if (!ch->filename) {
|
||||
globfree(&glob_buf);
|
||||
FreeChain(i->chain);
|
||||
i->chain = NULL;
|
||||
free(ch);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
ch->next = i->chain;
|
||||
i->chain = ch;
|
||||
}
|
||||
if (dc) {
|
||||
dc->chain = i->chain;
|
||||
}
|
||||
|
||||
globfree(&glob_buf);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* IncludeFile */
|
||||
@@ -387,22 +576,28 @@ int DoInclude(ParsePtr p)
|
||||
/* inclusion. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int IncludeFile(const char *fname)
|
||||
int IncludeFile(char const *fname)
|
||||
{
|
||||
IncludeStruct *i;
|
||||
int r;
|
||||
int oldRunDisabled;
|
||||
struct stat statbuf;
|
||||
|
||||
FreshLine = 1;
|
||||
if (IStackPtr+1 >= INCLUDE_NEST) return E_NESTED_INCLUDE;
|
||||
i = &IStack[IStackPtr];
|
||||
|
||||
i->filename = StrDup(FileName);
|
||||
if (!i->filename) return E_NO_MEM;
|
||||
if (FileName) {
|
||||
i->filename = StrDup(FileName);
|
||||
if (!i->filename) return E_NO_MEM;
|
||||
} else {
|
||||
i->filename = NULL;
|
||||
}
|
||||
i->LineNo = LineNo;
|
||||
i->NumIfs = NumIfs;
|
||||
i->IfFlags = IfFlags;
|
||||
i->CLine = CLine;
|
||||
i->offset = -1L;
|
||||
i->chain = NULL;
|
||||
if (RunDisabled & RUN_NOTOWNER) {
|
||||
i->ownedByMe = 0;
|
||||
} else {
|
||||
@@ -415,15 +610,55 @@ int IncludeFile(const char *fname)
|
||||
|
||||
IStackPtr++;
|
||||
|
||||
#ifdef HAVE_GLOB
|
||||
/* If it's a directory, set up the glob chain here. */
|
||||
if (stat(fname, &statbuf) == 0) {
|
||||
FilenameChain *fc;
|
||||
if (S_ISDIR(statbuf.st_mode)) {
|
||||
if (DebugFlag & DB_TRACE_FILES) {
|
||||
fprintf(ErrFp, "Scanning directory `%s' for *.rem files\n", fname);
|
||||
}
|
||||
if (SetupGlobChain(fname, i) == OK) { /* Glob succeeded */
|
||||
if (!i->chain) { /* Oops... no matching files */
|
||||
if (!Hush) {
|
||||
Eprint("%s: %s", fname, ErrMsg[E_NO_MATCHING_REMS]);
|
||||
}
|
||||
PopFile();
|
||||
return E_NO_MATCHING_REMS;
|
||||
}
|
||||
while(i->chain) {
|
||||
fc = i->chain;
|
||||
i->chain = i->chain->next;
|
||||
|
||||
/* Munch first file */
|
||||
oldRunDisabled = RunDisabled;
|
||||
if (!OpenFile(fc->filename)) {
|
||||
return OK;
|
||||
}
|
||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], fc->filename);
|
||||
RunDisabled = oldRunDisabled;
|
||||
}
|
||||
/* Couldn't open anything... bail */
|
||||
return PopFile();
|
||||
} else {
|
||||
if (!Hush) {
|
||||
Eprint("%s: %s", fname, ErrMsg[E_NO_MATCHING_REMS]);
|
||||
}
|
||||
}
|
||||
return E_NO_MATCHING_REMS;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
oldRunDisabled = RunDisabled;
|
||||
/* Try to open the new file */
|
||||
if (!OpenFile(fname)) {
|
||||
return OK;
|
||||
}
|
||||
RunDisabled = oldRunDisabled;
|
||||
/* Ugh! We failed! */
|
||||
if ( (r=PopFile()) ) return r;
|
||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], fname);
|
||||
/* Ugh! We failed! */
|
||||
PopFile();
|
||||
return E_CANT_OPEN;
|
||||
}
|
||||
|
||||
@@ -432,7 +667,7 @@ int IncludeFile(const char *fname)
|
||||
/* GetAccessDate - get the access date of a file. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int GetAccessDate(char *file)
|
||||
int GetAccessDate(char const *file)
|
||||
{
|
||||
struct stat statbuf;
|
||||
struct tm *t1;
|
||||
@@ -457,10 +692,10 @@ static void DestroyCache(CachedFile *cf)
|
||||
{
|
||||
CachedLine *cl, *cnext;
|
||||
CachedFile *temp;
|
||||
if (cf->filename) free(cf->filename);
|
||||
if (cf->filename) free((char *) cf->filename);
|
||||
cl = cf->cache;
|
||||
while (cl) {
|
||||
if (cl->text) free (cl->text);
|
||||
if (cl->text) free ((char *) cl->text);
|
||||
cnext = cl->next;
|
||||
free(cl);
|
||||
cl = cnext;
|
||||
|
||||
31
src/funcs.c
31
src/funcs.c
@@ -11,6 +11,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
#include "version.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -47,7 +48,6 @@
|
||||
#include "protos.h"
|
||||
#include "err.h"
|
||||
#include "expr.h"
|
||||
#include "version.h"
|
||||
|
||||
/* Function prototypes */
|
||||
static int FCurrent (void);
|
||||
@@ -358,11 +358,11 @@ static int CleanUpAfterFunc(void)
|
||||
/* Return a string value from a function. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int RetStrVal(const char *s)
|
||||
static int RetStrVal(char const *s)
|
||||
{
|
||||
RetVal.type = STR_TYPE;
|
||||
if (!s) {
|
||||
RetVal.v.str = (char *) malloc(1);
|
||||
RetVal.v.str = malloc(1);
|
||||
if (RetVal.v.str) *RetVal.v.str = 0;
|
||||
} else
|
||||
RetVal.v.str = StrDup(s);
|
||||
@@ -493,7 +493,7 @@ static int FDateTime(void)
|
||||
/***************************************************************/
|
||||
static int FCoerce(void)
|
||||
{
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
if (ARG(0).type != STR_TYPE) return E_BAD_TYPE;
|
||||
s = ARG(0).v.str;
|
||||
@@ -591,7 +591,7 @@ static int FChar(void)
|
||||
if (ARG(0).v.val < -128) return E_2LOW;
|
||||
if (ARG(0).v.val > 255) return E_2HIGH;
|
||||
len = ARG(0).v.val ? 2 : 1;
|
||||
RetVal.v.str = (char *) malloc(len);
|
||||
RetVal.v.str = malloc(len);
|
||||
if (!RetVal.v.str) return E_NO_MEM;
|
||||
RetVal.type = STR_TYPE;
|
||||
*(RetVal.v.str) = ARG(0).v.val;
|
||||
@@ -599,7 +599,7 @@ static int FChar(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
RetVal.v.str = (char *) malloc(Nargs + 1);
|
||||
RetVal.v.str = malloc(Nargs + 1);
|
||||
if (!RetVal.v.str) return E_NO_MEM;
|
||||
RetVal.type = STR_TYPE;
|
||||
for (i=0; i<Nargs; i++) {
|
||||
@@ -710,7 +710,7 @@ static int FWkdaynum(void)
|
||||
|
||||
static int FWkday(void)
|
||||
{
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
if (!HASDATE(ARG(0)) && ARG(0).type != INT_TYPE) return E_BAD_TYPE;
|
||||
if (ARG(0).type == INT_TYPE) {
|
||||
@@ -726,7 +726,7 @@ static int FWkday(void)
|
||||
|
||||
static int FMon(void)
|
||||
{
|
||||
char *s;
|
||||
char const *s;
|
||||
int y, m, d, v;
|
||||
|
||||
if (!HASDATE(ARG(0)) && ARG(0).type != INT_TYPE) return E_BAD_TYPE;
|
||||
@@ -833,7 +833,7 @@ static int FSgn(void)
|
||||
static int FOrd(void)
|
||||
{
|
||||
int t, u, v;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
if (ARG(0).type != INT_TYPE) return E_BAD_TYPE;
|
||||
|
||||
@@ -874,7 +874,7 @@ static int FPlural(void)
|
||||
return OK;
|
||||
}
|
||||
RetVal.type = STR_TYPE;
|
||||
RetVal.v.str = (char *) malloc(strlen(ARG(1).v.str)+2);
|
||||
RetVal.v.str = malloc(strlen(ARG(1).v.str)+2);
|
||||
if (!RetVal.v.str) {
|
||||
RetVal.type = ERR_TYPE;
|
||||
return E_NO_MEM;
|
||||
@@ -1315,7 +1315,8 @@ static int FIsomitted(void)
|
||||
/***************************************************************/
|
||||
static int FSubstr(void)
|
||||
{
|
||||
char *s, *t;
|
||||
char *s;
|
||||
char const *t;
|
||||
int start, end;
|
||||
|
||||
if (ARG(0).type != STR_TYPE || ARG(1).type != INT_TYPE) return E_BAD_TYPE;
|
||||
@@ -1349,7 +1350,7 @@ static int FSubstr(void)
|
||||
/***************************************************************/
|
||||
static int FIndex(void)
|
||||
{
|
||||
char *s;
|
||||
char const *s;
|
||||
int start;
|
||||
|
||||
if (ARG(0).type != STR_TYPE || ARG(1).type != STR_TYPE ||
|
||||
@@ -1463,7 +1464,7 @@ static int FFiledir(void)
|
||||
static int FAccess(void)
|
||||
{
|
||||
int amode;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
if (ARG(0).type != STR_TYPE ||
|
||||
(ARG(1).type != INT_TYPE && ARG(1).type != STR_TYPE)) return E_BAD_TYPE;
|
||||
@@ -2096,7 +2097,7 @@ static int FPsmoon(void)
|
||||
char sizebuf[30];
|
||||
char fontsizebuf[30];
|
||||
char *s = psbuff;
|
||||
char *extra = NULL;
|
||||
char const *extra = NULL;
|
||||
int size = -1;
|
||||
int fontsize = -1;
|
||||
|
||||
@@ -2366,7 +2367,7 @@ static int tz_convert(int year, int month, int day,
|
||||
int r;
|
||||
time_t t;
|
||||
struct tm *res;
|
||||
char *old_tz;
|
||||
char const *old_tz;
|
||||
|
||||
/* init tm struct */
|
||||
tm->tm_sec = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ EXTERN int CurMon;
|
||||
EXTERN int CurYear;
|
||||
EXTERN int LineNo;
|
||||
EXTERN int FreshLine;
|
||||
EXTERN INIT( char *MsgCommand, NULL);
|
||||
EXTERN INIT( char const *MsgCommand, NULL);
|
||||
EXTERN INIT( int ShowAllErrors, 0);
|
||||
EXTERN INIT( int DebugFlag, 0);
|
||||
EXTERN INIT( int DoCalendar, 0);
|
||||
@@ -53,6 +53,7 @@ EXTERN INIT( int CalMonths, 0);
|
||||
EXTERN INIT( int Hush, 0);
|
||||
EXTERN INIT( int NextMode, 0);
|
||||
EXTERN INIT( int InfiniteDelta, 0);
|
||||
EXTERN INIT( int DeltaOffset, 0);
|
||||
EXTERN INIT( int RunDisabled, 0);
|
||||
EXTERN INIT( int IgnoreOnce, 0);
|
||||
EXTERN INIT( int SortByTime, 0);
|
||||
@@ -61,7 +62,7 @@ EXTERN INIT( int SortByPrio, 0);
|
||||
EXTERN INIT( int DefaultPrio, NO_PRIORITY);
|
||||
EXTERN INIT( long SysTime, -1L);
|
||||
|
||||
EXTERN char *InitialFile;
|
||||
EXTERN char const *InitialFile;
|
||||
EXTERN int FileAccessDate;
|
||||
|
||||
EXTERN INIT( int DontFork, 0);
|
||||
@@ -83,12 +84,14 @@ EXTERN INIT( int LastTriggerDate, 0);
|
||||
EXTERN INIT( int LastTrigValid, 0);
|
||||
EXTERN INIT( int LastTriggerTime, 0);
|
||||
EXTERN INIT( int ShouldCache, 0);
|
||||
EXTERN char *CurLine;
|
||||
EXTERN char const *CurLine;
|
||||
EXTERN INIT( int NumTriggered, 0);
|
||||
EXTERN int ArgC;
|
||||
EXTERN char **ArgV;
|
||||
EXTERN char const **ArgV;
|
||||
EXTERN INIT( int CalLines, CAL_LINES);
|
||||
EXTERN INIT( int CalPad, 1);
|
||||
EXTERN INIT( int UseVTChars, 0);
|
||||
EXTERN INIT( int UseVTColors, 0);
|
||||
|
||||
/* Latitude and longitude */
|
||||
EXTERN INIT( int LatDeg, LAT_DEG);
|
||||
|
||||
16
src/hbcal.c
16
src/hbcal.c
@@ -55,7 +55,7 @@
|
||||
#define ADAR2ADARA 1
|
||||
#define ADAR2BOTH 2
|
||||
|
||||
static char *HebMonthNames[] = {
|
||||
static char const *HebMonthNames[] = {
|
||||
"Tishrey", "Heshvan", "Kislev", "Tevet", "Shvat", "Adar A", "Adar B",
|
||||
"Nisan", "Iyar", "Sivan", "Tamuz", "Av", "Elul", "Adar"};
|
||||
|
||||
@@ -137,7 +137,7 @@ int DaysInHebYear(int y)
|
||||
/* given the LENGTH of the Hebrew year. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *DaysInHebMonths(int ylen)
|
||||
char const *DaysInHebMonths(int ylen)
|
||||
{
|
||||
static char monlen[13] =
|
||||
{30, 29, 30, 29, 30, 0, 29, 30, 29, 30, 29, 30, 29};
|
||||
@@ -166,7 +166,7 @@ char *DaysInHebMonths(int ylen)
|
||||
int HebToJul(int hy, int hm, int hd)
|
||||
{
|
||||
int ylen;
|
||||
char *monlens;
|
||||
char const *monlens;
|
||||
int rh;
|
||||
int m;
|
||||
|
||||
@@ -201,7 +201,7 @@ void JulToHeb(int jul, int *hy, int *hm, int *hd)
|
||||
int y, m, d;
|
||||
int rh;
|
||||
int ylen;
|
||||
char *monlen;
|
||||
char const *monlen;
|
||||
/* Get the common year */
|
||||
FromJulian(jul, &y, &m, &d);
|
||||
y += 3763; /* Over-estimate a bit to be on the safe side below... */
|
||||
@@ -232,7 +232,7 @@ void JulToHeb(int jul, int *hy, int *hm, int *hd)
|
||||
/* year. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int HebNameToNum(const char *mname)
|
||||
int HebNameToNum(char const *mname)
|
||||
{
|
||||
int i;
|
||||
int m=-1;
|
||||
@@ -254,7 +254,7 @@ int HebNameToNum(const char *mname)
|
||||
/* year. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *HebMonthName(int m, int y)
|
||||
char const *HebMonthName(int m, int y)
|
||||
{
|
||||
if (m != ADARA && m != ADARB) return HebMonthNames[m];
|
||||
|
||||
@@ -293,7 +293,7 @@ char *HebMonthName(int m, int y)
|
||||
int GetValidHebDate(int yin, int min, int din, int adarbehave,
|
||||
int *mout, int *dout, int jahr)
|
||||
{
|
||||
char *monlen;
|
||||
char const *monlen;
|
||||
int ylen;
|
||||
|
||||
*mout = min;
|
||||
@@ -448,7 +448,7 @@ int GetNextHebrewDate(int julstart, int hm, int hd,
|
||||
/***************************************************************/
|
||||
int ComputeJahr(int y, int m, int d, int *ans)
|
||||
{
|
||||
char *monlen;
|
||||
char const *monlen;
|
||||
int len;
|
||||
|
||||
*ans = JAHR_NONE;
|
||||
|
||||
138
src/init.c
138
src/init.c
@@ -12,6 +12,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
#include "version.h"
|
||||
#include "config.h"
|
||||
|
||||
#define L_IN_INIT 1
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "protos.h"
|
||||
#include "expr.h"
|
||||
#include "err.h"
|
||||
#include "version.h"
|
||||
#include "globals.h"
|
||||
|
||||
/***************************************************************
|
||||
@@ -52,6 +52,7 @@
|
||||
* -h = Hush mode
|
||||
* -f = Do not fork
|
||||
* -dchars = Debugging mode: Chars are:
|
||||
* f = Trace file openings
|
||||
* e = Echo input lines
|
||||
* x = Display expression evaluation
|
||||
* t = Display trigger dates
|
||||
@@ -79,10 +80,10 @@ while (isdigit(*(s))) { \
|
||||
s++; \
|
||||
}
|
||||
|
||||
static void ChgUser(char *u);
|
||||
static void InitializeVar(char *str);
|
||||
static void ChgUser(char const *u);
|
||||
static void InitializeVar(char const *str);
|
||||
|
||||
static char *BadDate = "Illegal date on command line\n";
|
||||
static char const *BadDate = "Illegal date on command line\n";
|
||||
|
||||
static DynamicBuffer default_filename_buf;
|
||||
|
||||
@@ -94,9 +95,9 @@ static DynamicBuffer default_filename_buf;
|
||||
/* default filename. Use $DOTREMINDERS or $HOME/.reminders */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static char *DefaultFilename(void)
|
||||
static char const *DefaultFilename(void)
|
||||
{
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
DBufInit(&default_filename_buf);
|
||||
|
||||
@@ -122,14 +123,15 @@ static char *DefaultFilename(void)
|
||||
/* Initialize the system - called only once at beginning! */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void InitRemind(int argc, char *argv[])
|
||||
void InitRemind(int argc, char const *argv[])
|
||||
{
|
||||
char *arg;
|
||||
char const *arg;
|
||||
int i;
|
||||
int y, m, d, rep;
|
||||
Token tok;
|
||||
int InvokedAsRem = 0;
|
||||
char *s;
|
||||
char const *s;
|
||||
int weeks;
|
||||
|
||||
/* Initialize global dynamic buffers */
|
||||
DBufInit(&Banner);
|
||||
@@ -222,9 +224,15 @@ void InitRemind(int argc, char *argv[])
|
||||
|
||||
case 't':
|
||||
case 'T':
|
||||
InfiniteDelta = 1;
|
||||
if (!*arg) {
|
||||
InfiniteDelta = 1;
|
||||
} else {
|
||||
PARSENUM(DeltaOffset, arg);
|
||||
if (DeltaOffset < 0) {
|
||||
DeltaOffset = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
ErrFp = stdout;
|
||||
@@ -295,8 +303,33 @@ void InitRemind(int argc, char *argv[])
|
||||
case 'c':
|
||||
case 'C':
|
||||
DoCalendar = 1;
|
||||
if (*arg == '+') {
|
||||
arg++;
|
||||
weeks = 0;
|
||||
/* Parse the flags */
|
||||
while(*arg) {
|
||||
if (*arg == 'a' ||
|
||||
*arg == 'A') {
|
||||
DoSimpleCalDelta = 1;
|
||||
arg++;
|
||||
continue;
|
||||
}
|
||||
if (*arg == '+') {
|
||||
weeks = 1;
|
||||
arg++;
|
||||
continue;
|
||||
}
|
||||
if (*arg == 'l' || *arg == 'L') {
|
||||
UseVTChars = 1;
|
||||
arg++;
|
||||
continue;
|
||||
}
|
||||
if (*arg == 'c' || *arg == 'C') {
|
||||
UseVTColors = 1;
|
||||
arg++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (weeks) {
|
||||
PARSENUM(CalWeeks, arg);
|
||||
if (!CalWeeks) CalWeeks = 1;
|
||||
} else {
|
||||
@@ -308,12 +341,21 @@ void InitRemind(int argc, char *argv[])
|
||||
case 's':
|
||||
case 'S':
|
||||
DoSimpleCalendar = 1;
|
||||
if (*arg == 'a' || *arg == 'A') {
|
||||
weeks = 0;
|
||||
while(*arg) {
|
||||
if (*arg == 'a' || *arg == 'A') {
|
||||
DoSimpleCalDelta = 1;
|
||||
arg++;
|
||||
continue;
|
||||
}
|
||||
if (*arg == '+') {
|
||||
arg++;
|
||||
weeks = 1;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (*arg == '+') {
|
||||
arg++;
|
||||
if (weeks) {
|
||||
PARSENUM(CalWeeks, arg);
|
||||
if (!CalWeeks) CalWeeks = 1;
|
||||
} else {
|
||||
@@ -363,11 +405,12 @@ void InitRemind(int argc, char *argv[])
|
||||
case 'D':
|
||||
while (*arg) {
|
||||
switch(*arg++) {
|
||||
case 'e': case 'E': DebugFlag |= DB_ECHO_LINE; break;
|
||||
case 'x': case 'X': DebugFlag |= DB_PRTEXPR; break;
|
||||
case 't': case 'T': DebugFlag |= DB_PRTTRIG; break;
|
||||
case 'v': case 'V': DebugFlag |= DB_DUMP_VARS; break;
|
||||
case 'l': case 'L': DebugFlag |= DB_PRTLINE; break;
|
||||
case 'e': case 'E': DebugFlag |= DB_ECHO_LINE; break;
|
||||
case 'x': case 'X': DebugFlag |= DB_PRTEXPR; break;
|
||||
case 't': case 'T': DebugFlag |= DB_PRTTRIG; break;
|
||||
case 'v': case 'V': DebugFlag |= DB_DUMP_VARS; break;
|
||||
case 'l': case 'L': DebugFlag |= DB_PRTLINE; break;
|
||||
case 'f': case 'F': DebugFlag |= DB_TRACE_FILES; break;
|
||||
default:
|
||||
fprintf(ErrFp, ErrMsg[M_BAD_DB_FLAG], *(arg-1));
|
||||
}
|
||||
@@ -506,7 +549,7 @@ void InitRemind(int argc, char *argv[])
|
||||
void Usage(void)
|
||||
{
|
||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1998 David F. Skoll\n", VERSION, L_LANGNAME);
|
||||
fprintf(ErrFp, "Copyright 1999-2007 Roaring Penguin Software Inc.\n");
|
||||
fprintf(ErrFp, "Copyright 1999-2008 Roaring Penguin Software Inc.\n");
|
||||
#ifdef BETA
|
||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
||||
#endif
|
||||
@@ -514,21 +557,21 @@ void Usage(void)
|
||||
fprintf(ErrFp, "Options:\n");
|
||||
fprintf(ErrFp, " -n Output next occurrence of reminders in simple format\n");
|
||||
fprintf(ErrFp, " -r Disable RUN directives\n");
|
||||
fprintf(ErrFp, " -c[n] Produce a calendar for n (default 1) months\n");
|
||||
fprintf(ErrFp, " -c+[n] Produce a calendar for n (default 1) weeks\n");
|
||||
fprintf(ErrFp, " -c[a][n] Produce a calendar for n (default 1) months\n");
|
||||
fprintf(ErrFp, " -c[a]+[n] Produce a calendar for n (default 1) weeks\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Specify width, padding and spacing of calendar\n");
|
||||
fprintf(ErrFp, " -s[a][+][n] Produce `simple calendar' for n (1) months (weeks)\n");
|
||||
fprintf(ErrFp, " -p[a][n] Same as -s, but input compatible with rem2ps\n");
|
||||
fprintf(ErrFp, " -l Prefix each simple calendar line with line number and filename comment\n");
|
||||
fprintf(ErrFp, " -v Verbose mode\n");
|
||||
fprintf(ErrFp, " -o Ignore ONCE directives\n");
|
||||
fprintf(ErrFp, " -t Trigger all future reminders regardless of delta\n");
|
||||
fprintf(ErrFp, " -t[n] Trigger all future (or those within `n' days)\n");
|
||||
fprintf(ErrFp, " -h `Hush' mode - be very quiet\n");
|
||||
fprintf(ErrFp, " -a Don't trigger timed reminders immediately - just queue them\n");
|
||||
fprintf(ErrFp, " -q Don't queue timed reminders\n");
|
||||
fprintf(ErrFp, " -f Trigger timed reminders by staying in foreground\n");
|
||||
fprintf(ErrFp, " -z[n] Enter daemon mode, waking every n (5) minutes.\n");
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline f=tracefiles\n");
|
||||
fprintf(ErrFp, " -e Divert messages normally sent to stderr to stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Time format for cal: 0=am/pm, 1=24hr, 2=none\n");
|
||||
fprintf(ErrFp, " -x[n] Iteration limit for SATISFY clause (def=150)\n");
|
||||
@@ -550,12 +593,15 @@ void Usage(void)
|
||||
/* USER environment variables. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void ChgUser(char *user)
|
||||
static void ChgUser(char const *user)
|
||||
{
|
||||
uid_t myuid;
|
||||
|
||||
struct passwd *pwent;
|
||||
static char *home, *shell, *username, *logname;
|
||||
static char *home;
|
||||
static char *shell;
|
||||
static char *username;
|
||||
static char *logname;
|
||||
|
||||
myuid = getuid();
|
||||
|
||||
@@ -609,6 +655,20 @@ static void ChgUser(char *user)
|
||||
putenv(logname);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
DefineFunction(char const *str)
|
||||
{
|
||||
Parser p;
|
||||
int r;
|
||||
|
||||
CreateParser(str, &p);
|
||||
r = DoFset(&p);
|
||||
DestroyParser(&p);
|
||||
if (r != OK) {
|
||||
fprintf(ErrFp, "-i option: %s: %s\n", str, ErrMsg[r]);
|
||||
}
|
||||
}
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* InitializeVar */
|
||||
@@ -616,22 +676,34 @@ static void ChgUser(char *user)
|
||||
/* Initialize and preserve a variable */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void InitializeVar(char *str)
|
||||
static void InitializeVar(char const *str)
|
||||
{
|
||||
char *varname, *expr;
|
||||
char const *expr;
|
||||
char const *ostr = str;
|
||||
char varname[VAR_NAME_LEN+1];
|
||||
|
||||
Value val;
|
||||
|
||||
int r;
|
||||
|
||||
/* Scan for an '=' sign */
|
||||
varname = str;
|
||||
while (*str && *str != '=') str++;
|
||||
r = 0;
|
||||
while (*str && *str != '=') {
|
||||
if (r < VAR_NAME_LEN) {
|
||||
varname[r++] = *str;
|
||||
}
|
||||
if (*str == '(') {
|
||||
/* Do a function definition if we see a paren */
|
||||
DefineFunction(ostr);
|
||||
return;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
varname[r] = 0;
|
||||
if (!*str) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_EQ]);
|
||||
return;
|
||||
}
|
||||
*str = 0;
|
||||
if (!*varname) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_VAR]);
|
||||
return;
|
||||
|
||||
@@ -307,7 +307,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d viesti(\xE4) t\xE4m\xE4n p\xE4iv\xE4n jonossa.\n",
|
||||
"Numero puuttuu",
|
||||
"Virheellinen funktio WARN-lausekkeessa",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
|
||||
#elif IBMEXTENDED
|
||||
"Ok",
|
||||
@@ -409,7 +410,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d viesti(\x84) t\x84m\x84n p\x84iv\x84n jonossa.\n",
|
||||
"Numero puuttuu"
|
||||
"Virheellinen funktio WARN-lausekkeessa",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
#else
|
||||
"Ok",
|
||||
"Puuttuva ']'",
|
||||
@@ -510,7 +512,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d viesti({) t{m{n p{iv{n jonossa.\n",
|
||||
"Numero puuttuu",
|
||||
"Virheellinen funktio WARN-lausekkeessa",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -244,7 +244,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d rappel(s) en file pour aujourd'hui.\n",
|
||||
"Nombre attendu",
|
||||
"Fonction ill\351gale apr\350s WARN",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
#else /* ISOLATIN1 */
|
||||
"Ok",
|
||||
"']' manquant",
|
||||
@@ -345,7 +346,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d rappel(s) en file pour aujourd'hui.\n",
|
||||
"Nombre attendu",
|
||||
"Fonction illegale apres WARN",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
#endif /* ISOLATIN1 */
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
@@ -279,7 +279,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d Przypomnienia zakolejkowane na p\363\274niej.\n",
|
||||
"Spodziewana liczba",
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION TO POLISH)",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
#else /* ISOLATIN1 */
|
||||
"OK",
|
||||
"Brakujacy ']'",
|
||||
@@ -380,7 +381,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d Przypomnienia zakolejkowane na pozniej.\n",
|
||||
"Spodziewana liczba",
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION TO POLISH)",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
#endif /* ISOLATIN1 */
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
@@ -245,7 +245,8 @@ EXTERN char *ErrMsg[] =
|
||||
"%d compromisso(s) colocados na fila para mais tarde.\n",
|
||||
"Esperando numero",
|
||||
"Funcao ilegal na clausula WARN",
|
||||
"Can't convert between time zones"
|
||||
"Can't convert between time zones",
|
||||
"No files matching *.rem"
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
|
||||
43
src/main.c
43
src/main.c
@@ -62,9 +62,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Set up global vars */
|
||||
ArgC = argc;
|
||||
ArgV = argv;
|
||||
ArgV = (char const **) argv;
|
||||
|
||||
InitRemind(argc, argv);
|
||||
InitRemind(argc, (char const **) argv);
|
||||
if (DoCalendar || (DoSimpleCalendar && (!NextMode || PsCal))) {
|
||||
ProduceCalendar();
|
||||
return 0;
|
||||
@@ -134,7 +134,7 @@ static void DoReminders(void)
|
||||
{
|
||||
int r;
|
||||
Token tok;
|
||||
char *s;
|
||||
char const *s;
|
||||
Parser p;
|
||||
|
||||
if (!UseStdin) {
|
||||
@@ -148,7 +148,7 @@ static void DoReminders(void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
r=OpenFile(InitialFile);
|
||||
r=IncludeFile(InitialFile);
|
||||
if (r) {
|
||||
fprintf(ErrFp, "%s %s: %s\n", ErrMsg[E_ERR_READING],
|
||||
InitialFile, ErrMsg[r]);
|
||||
@@ -330,7 +330,7 @@ int ParseChar(ParsePtr p, int *err, int peek)
|
||||
return *(p->epos++);
|
||||
}
|
||||
}
|
||||
free(p->etext); /* End of substituted expression */
|
||||
free((void *) p->etext); /* End of substituted expression */
|
||||
p->etext = NULL;
|
||||
p->epos = NULL;
|
||||
p->isnested = 0;
|
||||
@@ -345,6 +345,7 @@ int ParseChar(ParsePtr p, int *err, int peek)
|
||||
return *(p->pos++);
|
||||
}
|
||||
}
|
||||
p->expr_happened = 1;
|
||||
p->pos++;
|
||||
r = EvalExpr(&(p->pos), &val);
|
||||
if (r) {
|
||||
@@ -503,21 +504,23 @@ int EvaluateExpr(ParsePtr p, Value *v)
|
||||
/* Eprint - print an error message. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void Eprint(const char *fmt, ...)
|
||||
void Eprint(char const *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
/* Check if more than one error msg. from this line */
|
||||
if (!FreshLine && !ShowAllErrors) return;
|
||||
|
||||
if (FreshLine) {
|
||||
if (FreshLine && FileName) {
|
||||
FreshLine = 0;
|
||||
if (strcmp(FileName, "-"))
|
||||
(void) fprintf(ErrFp, "%s(%d): ", FileName, LineNo);
|
||||
else
|
||||
(void) fprintf(ErrFp, "-stdin-(%d): ", LineNo);
|
||||
if (DebugFlag & DB_PRTLINE) OutputLine(ErrFp);
|
||||
} else fprintf(ErrFp, " ");
|
||||
} else if (FileName) {
|
||||
fprintf(ErrFp, " ");
|
||||
}
|
||||
|
||||
va_start(argptr, fmt);
|
||||
(void) vfprintf(ErrFp, fmt, argptr);
|
||||
@@ -536,8 +539,8 @@ void Eprint(const char *fmt, ...)
|
||||
/***************************************************************/
|
||||
void OutputLine(FILE *fp)
|
||||
{
|
||||
register char *s = CurLine;
|
||||
register char c = 0;
|
||||
char const *s = CurLine;
|
||||
char c = 0;
|
||||
|
||||
while (*s) {
|
||||
if (*s == '\n') Putc('\\', fp);
|
||||
@@ -554,7 +557,7 @@ void OutputLine(FILE *fp)
|
||||
/* Create a parser given a string buffer */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void CreateParser(char *s, ParsePtr p)
|
||||
void CreateParser(char const *s, ParsePtr p)
|
||||
{
|
||||
p->text = s;
|
||||
p->pos = s;
|
||||
@@ -563,6 +566,7 @@ void CreateParser(char *s, ParsePtr p)
|
||||
p->etext = NULL;
|
||||
p->allownested = 1;
|
||||
p->tokenPushed = NULL;
|
||||
p->expr_happened = 0;
|
||||
DBufInit(&p->pushedToken);
|
||||
}
|
||||
|
||||
@@ -576,7 +580,7 @@ void CreateParser(char *s, ParsePtr p)
|
||||
void DestroyParser(ParsePtr p)
|
||||
{
|
||||
if (p->isnested && p->etext) {
|
||||
free(p->etext);
|
||||
free((void *) p->etext);
|
||||
p->etext = NULL;
|
||||
p->isnested = 0;
|
||||
}
|
||||
@@ -589,10 +593,10 @@ void DestroyParser(ParsePtr p)
|
||||
/* on a per-parser basis. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int PushToken(const char *tok, ParsePtr p)
|
||||
int PushToken(char const *tok, ParsePtr p)
|
||||
{
|
||||
DBufFree(&p->pushedToken);
|
||||
if (DBufPuts(&p->pushedToken, (char *) tok) != OK ||
|
||||
if (DBufPuts(&p->pushedToken, tok) != OK ||
|
||||
DBufPutc(&p->pushedToken, ' ') != OK) {
|
||||
DBufFree(&p->pushedToken);
|
||||
return E_NO_MEM;
|
||||
@@ -859,6 +863,11 @@ int DoDebug(ParsePtr p)
|
||||
else DebugFlag &= ~DB_PRTLINE;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
case 'F':
|
||||
if (val) DebugFlag |= DB_TRACE_FILES;
|
||||
else DebugFlag &= ~DB_TRACE_FILES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -977,7 +986,7 @@ int DoErrMsg(ParsePtr p)
|
||||
TimeTrig tt;
|
||||
Trigger t;
|
||||
int r;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
DynamicBuffer buf;
|
||||
|
||||
@@ -1079,7 +1088,7 @@ int CalcMinsFromUTC(int jul, int tim, int *mins, int *isdst)
|
||||
/* A macro safe ONLY if used with arg with no side effects! */
|
||||
#define ISBLANK(c) (isspace(c) && (c) != '\n')
|
||||
|
||||
void FillParagraph(char *s)
|
||||
void FillParagraph(char const *s)
|
||||
{
|
||||
|
||||
int line = 0;
|
||||
@@ -1087,7 +1096,7 @@ void FillParagraph(char *s)
|
||||
int doublespace = 1;
|
||||
int pendspace;
|
||||
int len;
|
||||
char *t;
|
||||
char const *t;
|
||||
|
||||
int roomleft;
|
||||
|
||||
|
||||
@@ -113,12 +113,12 @@ int PushOmitContext(ParsePtr p)
|
||||
|
||||
context->numfull = NumFullOmits;
|
||||
context->numpart = NumPartialOmits;
|
||||
context->fullsave = (int *) malloc(NumFullOmits * sizeof(int));
|
||||
context->fullsave = malloc(NumFullOmits * sizeof(int));
|
||||
if (NumFullOmits && !context->fullsave) {
|
||||
free(context);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
context->partsave = (int *) malloc(NumPartialOmits * sizeof(int));
|
||||
context->partsave = malloc(NumPartialOmits * sizeof(int));
|
||||
if (NumPartialOmits && !context->partsave) {
|
||||
free(context->fullsave);
|
||||
free(context);
|
||||
|
||||
86
src/protos.h
86
src/protos.h
@@ -14,15 +14,15 @@
|
||||
#define STRSET(x, str) { if (x) free(x); (x) = StrDup(str); }
|
||||
|
||||
/* Define a general malloc routine for creating pointers to objects */
|
||||
#define NEW(type) ((type *) malloc(sizeof(type)))
|
||||
#define NEW(type) (malloc(sizeof(type)))
|
||||
|
||||
#include "dynbuf.h"
|
||||
|
||||
int CallUserFunc (char *name, int nargs);
|
||||
int CallUserFunc (char const *name, int nargs);
|
||||
int DoFset (ParsePtr p);
|
||||
void ProduceCalendar (void);
|
||||
char *SimpleTime (int tim);
|
||||
char *CalendarTime (int tim, int duration);
|
||||
char const *SimpleTime (int tim);
|
||||
char const *CalendarTime (int tim, int duration);
|
||||
int DoRem (ParsePtr p);
|
||||
int DoFlush (ParsePtr p);
|
||||
void DoExit (ParsePtr p);
|
||||
@@ -30,36 +30,34 @@ int ParseRem (ParsePtr s, Trigger *trig, TimeTrig *tim);
|
||||
int TriggerReminder (ParsePtr p, Trigger *t, TimeTrig *tim, int jul);
|
||||
int ShouldTriggerReminder (Trigger *t, TimeTrig *tim, int jul);
|
||||
int DoSubst (ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul, int mode);
|
||||
int DoSubstFromString (char *source, DynamicBuffer *dbuf, int jul, int tim);
|
||||
int EvalExpr (char **e, Value *v);
|
||||
int DoSubstFromString (char const *source, DynamicBuffer *dbuf, int jul, int tim);
|
||||
int EvalExpr (char const **e, Value *v);
|
||||
int DoCoerce (char type, Value *v);
|
||||
void PrintValue (Value *v, FILE *fp);
|
||||
int CopyValue (Value *dest, const Value *src);
|
||||
int ReadLine (void);
|
||||
int OpenFile (const char *fname);
|
||||
int PopFile (void);
|
||||
int OpenFile (char const *fname);
|
||||
int DoInclude (ParsePtr p);
|
||||
int IncludeFile (const char *fname);
|
||||
int GetAccessDate (char *file);
|
||||
int SetAccessDate (char *fname, int jul);
|
||||
int IncludeFile (char const *fname);
|
||||
int GetAccessDate (char const *file);
|
||||
int SetAccessDate (char const *fname, int jul);
|
||||
int TopLevel (void);
|
||||
int CallFunc (Operator *f, int nargs);
|
||||
void InitRemind (int argc, char *argv[]);
|
||||
void InitRemind (int argc, char const *argv[]);
|
||||
void Usage (void);
|
||||
int main (int argc, char *argv[]);
|
||||
int Julian (int year, int month, int day);
|
||||
void FromJulian (int jul, int *y, int *m, int *d);
|
||||
int ParseChar (ParsePtr p, int *err, int peek);
|
||||
int ParseToken (ParsePtr p, DynamicBuffer *dbuf);
|
||||
int ParseIdentifier (ParsePtr p, DynamicBuffer *dbuf);
|
||||
int EvaluateExpr (ParsePtr p, Value *v);
|
||||
int Evaluate (char **s, Var *locals);
|
||||
int Evaluate (char const **s, Var *locals);
|
||||
int FnPopValStack (Value *val);
|
||||
void Eprint (const char *fmt, ...);
|
||||
void Eprint (char const *fmt, ...);
|
||||
void OutputLine (FILE *fp);
|
||||
void CreateParser (char *s, ParsePtr p);
|
||||
void CreateParser (char const *s, ParsePtr p);
|
||||
void DestroyParser (ParsePtr p);
|
||||
int PushToken (const char *tok, ParsePtr p);
|
||||
int PushToken (char const *tok, ParsePtr p);
|
||||
long SystemTime (int realtime);
|
||||
int SystemDate (int *y, int *m, int *d);
|
||||
int DoIf (ParsePtr p);
|
||||
@@ -79,53 +77,53 @@ int PushOmitContext (ParsePtr p);
|
||||
int PopOmitContext (ParsePtr p);
|
||||
int IsOmitted (int jul, int localomit);
|
||||
int DoOmit (ParsePtr p);
|
||||
int QueueReminder (ParsePtr p, Trigger *trig, TimeTrig *tim, const char *sched);
|
||||
int QueueReminder (ParsePtr p, Trigger *trig, TimeTrig *tim, char const *sched);
|
||||
void HandleQueuedReminders (void);
|
||||
char *FindInitialToken (Token *tok, char *s);
|
||||
void FindToken (const char *s, Token *tok);
|
||||
void FindNumericToken (const char *s, Token *t);
|
||||
char const *FindInitialToken (Token *tok, char const *s);
|
||||
void FindToken (char const *s, Token *tok);
|
||||
void FindNumericToken (char const *s, Token *t);
|
||||
int ComputeTrigger (int today, Trigger *trig, int *err);
|
||||
char *StrnCpy (char *dest, const char *source, int n);
|
||||
int StrMatch (const char *s1, const char *s2, int n);
|
||||
int StrinCmp (const char *s1, const char *s2, int n);
|
||||
char *StrDup (const char *s);
|
||||
int StrCmpi (const char *s1, const char *s2);
|
||||
Var *FindVar (const char *str, int create);
|
||||
int DeleteVar (const char *str);
|
||||
int SetVar (const char *str, Value *val);
|
||||
int GetVarValue (const char *str, Value *val, Var *locals);
|
||||
char *StrnCpy (char *dest, char const *source, int n);
|
||||
int StrMatch (char const *s1, char const *s2, int n);
|
||||
int StrinCmp (char const *s1, char const *s2, int n);
|
||||
char *StrDup (char const *s);
|
||||
int StrCmpi (char const *s1, char const *s2);
|
||||
Var *FindVar (char const *str, int create);
|
||||
int DeleteVar (char const *str);
|
||||
int SetVar (char const *str, Value *val);
|
||||
int GetVarValue (char const *str, Value *val, Var *locals);
|
||||
int DoSet (Parser *p);
|
||||
int DoUnset (Parser *p);
|
||||
int DoDump (ParsePtr p);
|
||||
void DumpVarTable (void);
|
||||
void DestroyVars (int all);
|
||||
int PreserveVar (char *name);
|
||||
int PreserveVar (char const *name);
|
||||
int DoPreserve (Parser *p);
|
||||
int DoSatRemind (Trigger *trig, TimeTrig *tim, ParsePtr p);
|
||||
int DoMsgCommand (char *cmd, char *msg);
|
||||
int DoMsgCommand (char const *cmd, char const *msg);
|
||||
int ParseNonSpaceChar (ParsePtr p, int *err, int peek);
|
||||
unsigned int HashVal (const char *str);
|
||||
unsigned int HashVal (char const *str);
|
||||
int DateOK (int y, int m, int d);
|
||||
Operator *FindFunc (char *name, Operator where[], int num);
|
||||
int InsertIntoSortBuffer (int jul, int tim, char *body, int typ, int prio);
|
||||
void IssueSortedReminders (void);
|
||||
int UserFuncExists (char *fn);
|
||||
Operator *FindFunc (char const *name, Operator where[], int num);
|
||||
int InsertIntoSortBuffer (int jul, int tim, char const *body, int typ, int prio);
|
||||
void IssueSortedReminders (void);
|
||||
int UserFuncExists (char const *fn);
|
||||
void JulToHeb (int jul, int *hy, int *hm, int *hd);
|
||||
int HebNameToNum (const char *mname);
|
||||
char *HebMonthName (int m, int y);
|
||||
int HebNameToNum (char const *mname);
|
||||
char const *HebMonthName (int m, int y);
|
||||
int RoshHashana (int i);
|
||||
long DaysToHebYear (int y);
|
||||
int DaysInHebYear (int y);
|
||||
char *DaysInHebMonths (int ylen);
|
||||
char const *DaysInHebMonths (int ylen);
|
||||
int HebToJul (int hy, int hm, int hd);
|
||||
int GetValidHebDate (int yin, int min, int din, int adarbehave, int *mout, int *dout, int yahr);
|
||||
int GetNextHebrewDate (int julstart, int hm, int hd, int yahr, int adarbehave, int *ans);
|
||||
int ComputeJahr (int y, int m, int d, int *ans);
|
||||
int GetSysVar (const char *name, Value *val);
|
||||
int SetSysVar (const char *name, Value *val);
|
||||
void DumpSysVarByName (const char *name);
|
||||
int GetSysVar (char const *name, Value *val);
|
||||
int SetSysVar (char const *name, Value *val);
|
||||
void DumpSysVarByName (char const *name);
|
||||
int CalcMinsFromUTC (int jul, int tim, int *mins, int *isdst);
|
||||
void FillParagraph (char *s);
|
||||
void FillParagraph (char const *s);
|
||||
void LocalToUTC (int locdate, int loctime, int *utcdate, int *utctime);
|
||||
void UTCToLocal (int utcdate, int utctime, int *locdate, int *loctime);
|
||||
int MoonPhase (int date, int time);
|
||||
|
||||
@@ -40,7 +40,7 @@ typedef struct queuedrem {
|
||||
int typ;
|
||||
int RunDisabled;
|
||||
int ntrig;
|
||||
char *text;
|
||||
char const *text;
|
||||
char passthru[PASSTHRU_LEN+1];
|
||||
char sched[VAR_NAME_LEN+1];
|
||||
char tag[TAG_LEN+1];
|
||||
@@ -69,7 +69,7 @@ static void reread (void);
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int QueueReminder(ParsePtr p, Trigger *trig,
|
||||
TimeTrig *tim, const char *sched)
|
||||
TimeTrig *tim, char const *sched)
|
||||
{
|
||||
QueuedRem *qelem;
|
||||
|
||||
@@ -396,7 +396,7 @@ static int CalculateNextTimeUsingSched(QueuedRem *q)
|
||||
/* Use LineBuffer for temp. string storage. */
|
||||
int r;
|
||||
Value v;
|
||||
char *s;
|
||||
char const *s;
|
||||
int LastTime = -1;
|
||||
int ThisTime;
|
||||
|
||||
@@ -517,6 +517,6 @@ static void DaemonWait(unsigned int sleeptime)
|
||||
/***************************************************************/
|
||||
static void reread(void)
|
||||
{
|
||||
execvp(ArgV[0], ArgV);
|
||||
execvp(ArgV[0], (char **) ArgV);
|
||||
}
|
||||
|
||||
|
||||
59
src/rem2ps.c
59
src/rem2ps.c
@@ -10,6 +10,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
#include "version.h"
|
||||
#include "config.h"
|
||||
#include "dynbuf.h"
|
||||
|
||||
@@ -20,9 +21,8 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "rem2ps.h"
|
||||
#include "version.h"
|
||||
|
||||
#define NEW(type) ((type *) malloc(sizeof(type)))
|
||||
#define NEW(type) (malloc(sizeof(type)))
|
||||
|
||||
#define SPECIAL_NORMAL 0
|
||||
#define SPECIAL_POSTSCRIPT 1
|
||||
@@ -38,13 +38,13 @@ typedef struct calentry {
|
||||
} CalEntry;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char const *name;
|
||||
int xsize, ysize;
|
||||
} PageType;
|
||||
|
||||
char DayName[7][33];
|
||||
|
||||
char *SmallCalLoc[] = {
|
||||
char const *SmallCalLoc[] = {
|
||||
"",
|
||||
"bt",
|
||||
"tb",
|
||||
@@ -52,7 +52,7 @@ char *SmallCalLoc[] = {
|
||||
};
|
||||
|
||||
#define NUMSMALL (sizeof(SmallCalLoc)/sizeof(SmallCalLoc[0]))
|
||||
char *SmallLocation;
|
||||
char const *SmallLocation;
|
||||
int SmallCol1, SmallCol2;
|
||||
|
||||
PageType Pages[] =
|
||||
@@ -88,20 +88,20 @@ char PortraitMode;
|
||||
char NoSmallCal;
|
||||
char UseISO;
|
||||
|
||||
char *HeadFont="Helvetica";
|
||||
char *TitleFont="Helvetica";
|
||||
char *DayFont="Helvetica-BoldOblique";
|
||||
char *EntryFont="Helvetica";
|
||||
char *SmallFont="Helvetica";
|
||||
char *LineWidth = "1";
|
||||
char const *HeadFont="Helvetica";
|
||||
char const *TitleFont="Helvetica";
|
||||
char const *DayFont="Helvetica-BoldOblique";
|
||||
char const *EntryFont="Helvetica";
|
||||
char const *SmallFont="Helvetica";
|
||||
char const *LineWidth = "1";
|
||||
|
||||
char *HeadSize="14";
|
||||
char *TitleSize="14";
|
||||
char *DaySize="14";
|
||||
char *EntrySize="8";
|
||||
char *BorderSize = "6";
|
||||
char const *HeadSize="14";
|
||||
char const *TitleSize="14";
|
||||
char const *DaySize="14";
|
||||
char const *EntrySize="8";
|
||||
char const *BorderSize = "6";
|
||||
|
||||
char *UserProlog = NULL;
|
||||
char const *UserProlog = NULL;
|
||||
|
||||
int validfile = 0;
|
||||
|
||||
@@ -116,15 +116,15 @@ int FillPage;
|
||||
int Verbose = 0;
|
||||
|
||||
void Init (int argc, char *argv[]);
|
||||
void Usage (char *s);
|
||||
void Usage (char const *s);
|
||||
void DoPsCal (void);
|
||||
int DoQueuedPs (void);
|
||||
void DoSmallCal (char *m, int days, int first, int col, int which);
|
||||
void DoSmallCal (char const *m, int days, int first, int col, int which);
|
||||
void WriteProlog (void);
|
||||
void WriteCalEntry (void);
|
||||
void WriteOneEntry (CalEntry *c);
|
||||
void GetSmallLocations (void);
|
||||
char *EatToken(char *in, char *out, int maxlen);
|
||||
char const *EatToken(char const *in, char *out, int maxlen);
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
@@ -182,7 +182,7 @@ void DoPsCal(void)
|
||||
int i;
|
||||
int is_ps;
|
||||
int firstcol;
|
||||
char *startOfBody;
|
||||
char const *startOfBody;
|
||||
char passthru[PASSTHRU_LEN+1];
|
||||
DynamicBuffer buf;
|
||||
CalEntry *c, *d;
|
||||
@@ -388,7 +388,7 @@ void WriteProlog(void)
|
||||
int i;
|
||||
int x = CurPage->xsize;
|
||||
int y = CurPage->ysize;
|
||||
char *isostuff;
|
||||
char const *isostuff;
|
||||
FILE *fp;
|
||||
int nread;
|
||||
char buffer[512];
|
||||
@@ -574,7 +574,7 @@ void WriteCalEntry(void)
|
||||
void WriteOneEntry(CalEntry *c)
|
||||
{
|
||||
int ch, i;
|
||||
char *s = c->entry;
|
||||
char const *s = c->entry;
|
||||
|
||||
printf(" [");
|
||||
|
||||
@@ -635,7 +635,8 @@ void WriteOneEntry(CalEntry *c)
|
||||
/***************************************************************/
|
||||
void Init(int argc, char *argv[])
|
||||
{
|
||||
char *s, *t;
|
||||
char const *s;
|
||||
char const *t;
|
||||
int i=1;
|
||||
int j;
|
||||
int offset;
|
||||
@@ -791,7 +792,7 @@ void Init(int argc, char *argv[])
|
||||
/* Usage - print usage information */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void Usage(char *s)
|
||||
void Usage(char const *s)
|
||||
{
|
||||
if (s) fprintf(stderr, "Rem2PS: %s\n\n", s);
|
||||
|
||||
@@ -820,7 +821,7 @@ void Usage(char *s)
|
||||
/* month. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void DoSmallCal(char *m, int days, int first, int col, int which)
|
||||
void DoSmallCal(char const *m, int days, int first, int col, int which)
|
||||
{
|
||||
/* Do the small calendar */
|
||||
int i, j;
|
||||
@@ -885,7 +886,7 @@ int DoQueuedPs(void)
|
||||
FILE *fp;
|
||||
int fnoff;
|
||||
char buffer[512];
|
||||
char *size, *extra;
|
||||
char const *size, *extra;
|
||||
int num, r, g, b, phase, fontsize, moonsize;
|
||||
unsigned char c;
|
||||
|
||||
@@ -1060,7 +1061,7 @@ int DoQueuedPs(void)
|
||||
void GetSmallLocations(void)
|
||||
{
|
||||
char c;
|
||||
char *s = SmallLocation;
|
||||
char const *s = SmallLocation;
|
||||
int colfirst, collast;
|
||||
|
||||
/* Figure out the first and last columns */
|
||||
@@ -1122,7 +1123,7 @@ void GetSmallLocations(void)
|
||||
/* Read a space-delimited token into an output buffer. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *EatToken(char *in, char *out, int maxlen)
|
||||
char const *EatToken(char const *in, char *out, int maxlen)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
||||
12
src/sort.c
12
src/sort.c
@@ -25,7 +25,7 @@
|
||||
/* The structure of a sorted entry */
|
||||
typedef struct sortrem {
|
||||
struct sortrem *next;
|
||||
char *text;
|
||||
char const *text;
|
||||
int trigdate;
|
||||
int trigtime;
|
||||
int typ;
|
||||
@@ -35,7 +35,7 @@ typedef struct sortrem {
|
||||
/* The sorted reminder queue */
|
||||
static Sortrem *SortedQueue = (Sortrem *) NULL;
|
||||
|
||||
static Sortrem *MakeSortRem (int jul, int tim, char *body, int typ, int prio);
|
||||
static Sortrem *MakeSortRem (int jul, int tim, char const *body, int typ, int prio);
|
||||
static void IssueSortBanner (int jul);
|
||||
|
||||
/***************************************************************/
|
||||
@@ -45,7 +45,7 @@ static void IssueSortBanner (int jul);
|
||||
/* Create a new Sortrem entry - return NULL on failure. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static Sortrem *MakeSortRem(int jul, int tim, char *body, int typ, int prio)
|
||||
static Sortrem *MakeSortRem(int jul, int tim, char const *body, int typ, int prio)
|
||||
{
|
||||
Sortrem *new = NEW(Sortrem);
|
||||
if (!new) return NULL;
|
||||
@@ -71,7 +71,7 @@ static Sortrem *MakeSortRem(int jul, int tim, char *body, int typ, int prio)
|
||||
/* Insert a reminder into the sort buffer */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int InsertIntoSortBuffer(int jul, int tim, char *body, int typ, int prio)
|
||||
int InsertIntoSortBuffer(int jul, int tim, char const *body, int typ, int prio)
|
||||
{
|
||||
Sortrem *new = MakeSortRem(jul, tim, body, typ, prio);
|
||||
Sortrem *cur = SortedQueue, *prev = NULL;
|
||||
@@ -154,7 +154,7 @@ void IssueSortedReminders(void)
|
||||
break;
|
||||
}
|
||||
|
||||
free(cur->text);
|
||||
free((char *) cur->text);
|
||||
free(cur);
|
||||
cur = next;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ static void IssueSortBanner(int jul)
|
||||
char BanExpr[64];
|
||||
int y, m, d;
|
||||
Value v;
|
||||
char *s = BanExpr;
|
||||
char const *s = BanExpr;
|
||||
DynamicBuffer buf;
|
||||
|
||||
if (UserFuncExists("sortbanner") != 1) return;
|
||||
|
||||
12
src/token.c
12
src/token.c
@@ -128,7 +128,7 @@ Token NonEnglishToks[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static int TokStrCmp (const Token *t, const char *s);
|
||||
static int TokStrCmp (Token const *t, char const *s);
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
@@ -138,7 +138,7 @@ static int TokStrCmp (const Token *t, const char *s);
|
||||
/* left square bracket, return a T_Illegal type. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *FindInitialToken(Token *tok, char *s)
|
||||
char const *FindInitialToken(Token *tok, char const *s)
|
||||
{
|
||||
DynamicBuffer buf;
|
||||
DBufInit(&buf);
|
||||
@@ -165,7 +165,7 @@ char *FindInitialToken(Token *tok, char *s)
|
||||
/* Given a string, which token is it? */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void FindToken(const char *s, Token *tok)
|
||||
void FindToken(char const *s, Token *tok)
|
||||
{
|
||||
int top, bot, mid, r, max;
|
||||
int l;
|
||||
@@ -252,7 +252,7 @@ void FindToken(const char *s, Token *tok)
|
||||
/* Rep - *n */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void FindNumericToken(const char *s, Token *t)
|
||||
void FindNumericToken(char const *s, Token *t)
|
||||
{
|
||||
int mult = 1, hour, min;
|
||||
|
||||
@@ -335,10 +335,10 @@ void FindNumericToken(const char *s, Token *t)
|
||||
/* Compare a token to a string. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static int TokStrCmp(const Token *t, const char *s)
|
||||
static int TokStrCmp(Token const *t, char const *s)
|
||||
{
|
||||
register int r;
|
||||
char *tk = t->name;
|
||||
char const *tk = t->name;
|
||||
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
|
||||
r = *tk - tolower(*s);
|
||||
tk++;
|
||||
|
||||
@@ -419,6 +419,14 @@ int ComputeTrigger(int today, Trigger *trig, int *err)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (trig->skip == SKIP_SKIP &&
|
||||
IsOmitted(result, trig->localomit) &&
|
||||
nextstart <= start &&
|
||||
result >= start) {
|
||||
nextstart = result + 1;
|
||||
}
|
||||
|
||||
/* Keep scanning... unless there's no point in doing it.*/
|
||||
if (nextstart <= start) {
|
||||
if (result != -1) {
|
||||
|
||||
26
src/types.h
26
src/types.h
@@ -24,7 +24,7 @@ typedef struct {
|
||||
|
||||
/* Define the type of operators */
|
||||
typedef struct {
|
||||
char *name;
|
||||
char const *name;
|
||||
char prec;
|
||||
char type;
|
||||
int (*func)(void);
|
||||
@@ -71,14 +71,15 @@ typedef struct {
|
||||
|
||||
/* The parse pointer */
|
||||
typedef struct {
|
||||
char isnested; /* Is it a nested expression? */
|
||||
char isnested; /* Is it a nested expression? */
|
||||
char allownested;
|
||||
char *text; /* Start of text */
|
||||
char *pos; /* Current position */
|
||||
char *etext; /* Substituted text */
|
||||
char *epos; /* Position in substituted text */
|
||||
char const *text; /* Start of text */
|
||||
char const *pos; /* Current position */
|
||||
char const *etext; /* Substituted text */
|
||||
char const *epos; /* Position in substituted text */
|
||||
DynamicBuffer pushedToken; /* Pushed-back token */
|
||||
char *tokenPushed; /* NULL if no pushed-back token */
|
||||
char const *tokenPushed; /* NULL if no pushed-back token */
|
||||
char expr_happened; /* Did we encounter an [expression] ? */
|
||||
} Parser;
|
||||
|
||||
typedef Parser *ParsePtr; /* Pointer to parser structure */
|
||||
@@ -116,11 +117,12 @@ typedef Parser *ParsePtr; /* Pointer to parser structure */
|
||||
|
||||
|
||||
/* DEFINES for debugging flags */
|
||||
#define DB_PRTLINE 1
|
||||
#define DB_PRTEXPR 2
|
||||
#define DB_PRTTRIG 4
|
||||
#define DB_DUMP_VARS 8
|
||||
#define DB_ECHO_LINE 16
|
||||
#define DB_PRTLINE 1
|
||||
#define DB_PRTEXPR 2
|
||||
#define DB_PRTTRIG 4
|
||||
#define DB_DUMP_VARS 8
|
||||
#define DB_ECHO_LINE 16
|
||||
#define DB_TRACE_FILES 32
|
||||
|
||||
/* Enumeration of the tokens */
|
||||
enum TokTypes
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
typedef struct udf_struct {
|
||||
struct udf_struct *next;
|
||||
char name[VAR_NAME_LEN+1];
|
||||
char *text;
|
||||
char const *text;
|
||||
Var *locals;
|
||||
char IsActive;
|
||||
int nargs;
|
||||
@@ -47,7 +47,7 @@ extern Value ValStack[];
|
||||
extern int ValStackPtr;
|
||||
|
||||
static void DestroyUserFunc (UserFunc *f);
|
||||
static void FUnset (char *name);
|
||||
static void FUnset (char const *name);
|
||||
static void FSet (UserFunc *f);
|
||||
static int SetUpLocalVars (UserFunc *f);
|
||||
static void DestroyLocalVals (UserFunc *f);
|
||||
@@ -142,6 +142,11 @@ int DoFset(ParsePtr p)
|
||||
}
|
||||
}
|
||||
|
||||
/* Allow an optional = sign: FSET f(x) = x*x */
|
||||
c = ParseNonSpaceChar(p, &r, 1);
|
||||
if (c == '=') {
|
||||
c = ParseNonSpaceChar(p, &r, 0);
|
||||
}
|
||||
/* Copy the text over */
|
||||
if (p->isnested) {
|
||||
Eprint("%s", ErrMsg[E_CANTNEST_FDEF]);
|
||||
@@ -184,7 +189,7 @@ static void DestroyUserFunc(UserFunc *f)
|
||||
}
|
||||
|
||||
/* Free the function definition */
|
||||
if (f->text) free(f->text);
|
||||
if (f->text) free( (char *) f->text);
|
||||
|
||||
/* Free the data structure itself */
|
||||
free(f);
|
||||
@@ -198,7 +203,7 @@ static void DestroyUserFunc(UserFunc *f)
|
||||
/* it exists. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void FUnset(char *name)
|
||||
static void FUnset(char const *name)
|
||||
{
|
||||
UserFunc *cur, *prev;
|
||||
int h;
|
||||
@@ -238,12 +243,12 @@ static void FSet(UserFunc *f)
|
||||
/* Call a user-defined function. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int CallUserFunc(char *name, int nargs)
|
||||
int CallUserFunc(char const *name, int nargs)
|
||||
{
|
||||
UserFunc *f;
|
||||
int h = HashVal(name) % FUNC_HASH_SIZE;
|
||||
int i;
|
||||
char *s;
|
||||
char const *s;
|
||||
|
||||
/* Search for the function */
|
||||
f = FuncHash[h];
|
||||
@@ -356,7 +361,7 @@ static void DestroyLocalVals(UserFunc *f)
|
||||
/* it is defined, or -1 if it is not defined. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int UserFuncExists(char *fn)
|
||||
int UserFuncExists(char const *fn)
|
||||
{
|
||||
UserFunc *f;
|
||||
int h = HashVal(fn) % FUNC_HASH_SIZE;
|
||||
|
||||
16
src/utils.c
16
src/utils.c
@@ -30,9 +30,9 @@
|
||||
/* Just like strncpy EXCEPT we ALWAYS copy the trailing 0. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *StrnCpy(char *dest, const char *source, int n)
|
||||
char *StrnCpy(char *dest, char const *source, int n)
|
||||
{
|
||||
register char *odest = dest;
|
||||
char *odest = dest;
|
||||
|
||||
while (n-- && (*dest++ = *source++)) ;
|
||||
if (*(dest-1)) *dest = 0;
|
||||
@@ -48,7 +48,7 @@ char *StrnCpy(char *dest, const char *source, int n)
|
||||
/* of the first string, whichever is greater. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int StrMatch(const char *s1, const char *s2, int n)
|
||||
int StrMatch(char const *s1, char const *s2, int n)
|
||||
{
|
||||
int l;
|
||||
if ((l = strlen(s1)) < n) return 0;
|
||||
@@ -60,7 +60,7 @@ int StrMatch(const char *s1, const char *s2, int n)
|
||||
/* StrinCmp - compare strings, case-insensitive */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int StrinCmp(const char *s1, const char *s2, int n)
|
||||
int StrinCmp(char const *s1, char const *s2, int n)
|
||||
{
|
||||
register int r;
|
||||
while (n && *s1 && *s2) {
|
||||
@@ -80,10 +80,10 @@ int StrinCmp(const char *s1, const char *s2, int n)
|
||||
/* Like ANSI strdup */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
char *StrDup(const char *s)
|
||||
char *StrDup(char const *s)
|
||||
{
|
||||
char *ret = (char *) malloc(strlen(s)+1);
|
||||
if (!ret) return (char *) NULL;
|
||||
char *ret = malloc(strlen(s)+1);
|
||||
if (!ret) return NULL;
|
||||
strcpy(ret, s);
|
||||
return ret;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ char *StrDup(const char *s)
|
||||
/* Compare strings, case insensitive. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int StrCmpi(const char *s1, const char *s2)
|
||||
int StrCmpi(char const *s1, char const *s2)
|
||||
{
|
||||
int r;
|
||||
while (*s1 && *s2) {
|
||||
|
||||
36
src/var.c
36
src/var.c
@@ -80,7 +80,7 @@ static int time_sep_func(int do_set, Value *val)
|
||||
/* Given a string, compute the hash value. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
unsigned int HashVal(const char *str)
|
||||
unsigned int HashVal(char const *str)
|
||||
{
|
||||
register unsigned int i=0;
|
||||
register unsigned int j=1;
|
||||
@@ -102,7 +102,7 @@ unsigned int HashVal(const char *str)
|
||||
/* string. If create is 1, create the variable. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
Var *FindVar(const char *str, int create)
|
||||
Var *FindVar(char const *str, int create)
|
||||
{
|
||||
register int h;
|
||||
register Var *v;
|
||||
@@ -139,7 +139,7 @@ Var *FindVar(const char *str, int create)
|
||||
/* string and delete it. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int DeleteVar(const char *str)
|
||||
int DeleteVar(char const *str)
|
||||
{
|
||||
register int h;
|
||||
register Var *v;
|
||||
@@ -168,7 +168,7 @@ int DeleteVar(const char *str)
|
||||
/* Set the indicate variable to the specified value. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int SetVar(const char *str, Value *val)
|
||||
int SetVar(char const *str, Value *val)
|
||||
{
|
||||
Var *v = FindVar(str, 1);
|
||||
|
||||
@@ -186,7 +186,7 @@ int SetVar(const char *str, Value *val)
|
||||
/* Get a copy of the value of the variable. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int GetVarValue(const char *str, Value *val, Var *locals)
|
||||
int GetVarValue(char const *str, Value *val, Var *locals)
|
||||
{
|
||||
Var *v;
|
||||
|
||||
@@ -223,6 +223,11 @@ int DoSet (Parser *p)
|
||||
r = ParseIdentifier(p, &buf);
|
||||
if (r) return r;
|
||||
|
||||
/* Allow option equals-sign: SET var = value */
|
||||
if (ParseNonSpaceChar(p, &r, 1) == '=') {
|
||||
ParseNonSpaceChar(p, &r, 0);
|
||||
}
|
||||
|
||||
r = EvaluateExpr(p, &v);
|
||||
if (r) {
|
||||
DBufFree(&buf);
|
||||
@@ -383,7 +388,7 @@ void DestroyVars(int all)
|
||||
/* Given the name of a variable, "preserve" it. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int PreserveVar(char *name)
|
||||
int PreserveVar(char const *name)
|
||||
{
|
||||
Var *v;
|
||||
|
||||
@@ -440,7 +445,7 @@ int DoPreserve (Parser *p)
|
||||
|
||||
/* The structure of a system variable */
|
||||
typedef struct {
|
||||
char *name;
|
||||
char const *name;
|
||||
char modifiable;
|
||||
int type;
|
||||
void *value;
|
||||
@@ -463,6 +468,7 @@ static SysVar SysVarArr[] = {
|
||||
{ "Daemon", 0, INT_TYPE, &Daemon, 0, 0 },
|
||||
{ "DateSep", 1, SPECIAL_TYPE, date_sep_func, 0, 0 },
|
||||
{ "DefaultPrio", 1, INT_TYPE, &DefaultPrio, 0, 9999 },
|
||||
{ "DeltaOffset", 0, INT_TYPE, &DeltaOffset, 0, 0 },
|
||||
{ "DontFork", 0, INT_TYPE, &DontFork, 0, 0 },
|
||||
{ "DontQueue", 0, INT_TYPE, &DontQueue, 0, 0 },
|
||||
{ "DontTrigAts", 0, INT_TYPE, &DontIssueAts, 0, 0 },
|
||||
@@ -498,8 +504,8 @@ static SysVar SysVarArr[] = {
|
||||
};
|
||||
|
||||
#define NUMSYSVARS ( sizeof(SysVarArr) / sizeof(SysVar) )
|
||||
static SysVar *FindSysVar (const char *name);
|
||||
static void DumpSysVar (const char *name, const SysVar *v);
|
||||
static SysVar *FindSysVar (char const *name);
|
||||
static void DumpSysVar (char const *name, const SysVar *v);
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* SetSysVar */
|
||||
@@ -507,7 +513,7 @@ static void DumpSysVar (const char *name, const SysVar *v);
|
||||
/* Set a system variable to the indicated value. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int SetSysVar(const char *name, Value *value)
|
||||
int SetSysVar(char const *name, Value *value)
|
||||
{
|
||||
SysVar *v = FindSysVar(name);
|
||||
if (!v) return E_NOSUCH_VAR;
|
||||
@@ -542,7 +548,7 @@ int SetSysVar(const char *name, Value *value)
|
||||
/* Get the value of a system variable */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int GetSysVar(const char *name, Value *val)
|
||||
int GetSysVar(char const *name, Value *val)
|
||||
{
|
||||
SysVar *v = FindSysVar(name);
|
||||
|
||||
@@ -577,7 +583,7 @@ int GetSysVar(const char *name, Value *val)
|
||||
/* Find a system var with specified name. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static SysVar *FindSysVar(const char *name)
|
||||
static SysVar *FindSysVar(char const *name)
|
||||
{
|
||||
int top=NUMSYSVARS-1, bottom=0;
|
||||
int mid=(top + bottom) / 2;
|
||||
@@ -601,7 +607,7 @@ static SysVar *FindSysVar(const char *name)
|
||||
/* If name is "", dump all system variables. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
void DumpSysVarByName(const char *name)
|
||||
void DumpSysVarByName(char const *name)
|
||||
{
|
||||
int i;
|
||||
SysVar *v;
|
||||
@@ -623,7 +629,7 @@ void DumpSysVarByName(const char *name)
|
||||
/* Dump the system variable. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static void DumpSysVar(const char *name, const SysVar *v)
|
||||
static void DumpSysVar(char const *name, const SysVar *v)
|
||||
{
|
||||
char buffer[VAR_NAME_LEN+10];
|
||||
|
||||
@@ -643,7 +649,7 @@ static void DumpSysVar(const char *name, const SysVar *v)
|
||||
}
|
||||
DestroyValue(val);
|
||||
} else if (v->type == STR_TYPE) {
|
||||
char *s = *((char **)v->value);
|
||||
char const *s = *((char **)v->value);
|
||||
int y;
|
||||
Putc('"', ErrFp);
|
||||
for (y=0; y<MAX_PRT_LEN && *s; y++) {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* VERSION.H */
|
||||
/* */
|
||||
/* What version of remind do we have? */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1998 by David F. Skoll */
|
||||
/* Copyright (C) 1999-2007 by Roaring Penguin Software Inc. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
#define VERSION "03.01.03"
|
||||
1
src/version.h.in
Normal file
1
src/version.h.in
Normal file
@@ -0,0 +1 @@
|
||||
#define VERSION "@VERSION@"
|
||||
17
tests/colors.rem
Normal file
17
tests/colors.rem
Normal file
@@ -0,0 +1,17 @@
|
||||
REM 28 SPECIAL COLOR 0 0 0 Black
|
||||
REM 28 SPECIAL COLOR 65 0 0 Dim Red
|
||||
REM 28 SPECIAL COLOR 0 65 0 Dim Green
|
||||
REM 28 SPECIAL COLOR 0 0 65 Dim Blue
|
||||
REM 28 SPECIAL COLOR 0 65 65 Dim Cyan
|
||||
REM 28 SPECIAL COLOR 65 0 65 Dim Magenta
|
||||
REM 28 SPECIAL COLOR 65 65 0 Dim Yellow
|
||||
REM 28 SPECIAL COLOR 65 65 65 Dim White
|
||||
|
||||
REM 28 SPECIAL COLOR 129 0 0 Bright Red
|
||||
REM 28 SPECIAL COLOR 0 129 0 Bright Green
|
||||
REM 28 SPECIAL COLOR 0 0 129 Bright Blue
|
||||
REM 28 SPECIAL COLOR 0 129 129 Bright Cyan
|
||||
REM 28 SPECIAL COLOR 129 0 129 Bright Magenta
|
||||
REM 28 SPECIAL COLOR 129 129 0 Bright Yellow
|
||||
REM 28 SPECIAL COLOR 129 129 129 Bright White
|
||||
|
||||
1
tests/include_dir/01.rem
Normal file
1
tests/include_dir/01.rem
Normal file
@@ -0,0 +1 @@
|
||||
REM 15 MSG 01
|
||||
1
tests/include_dir/02.rem
Normal file
1
tests/include_dir/02.rem
Normal file
@@ -0,0 +1 @@
|
||||
REM 15 MSG 02
|
||||
1
tests/include_dir/03.notrem
Normal file
1
tests/include_dir/03.notrem
Normal file
@@ -0,0 +1 @@
|
||||
REM MSG IGNORE
|
||||
1
tests/include_dir/04cantread.rem
Normal file
1
tests/include_dir/04cantread.rem
Normal file
@@ -0,0 +1 @@
|
||||
REM 15 MSG You can't read this file.
|
||||
1
tests/include_dir_no_rems/03.notrem
Normal file
1
tests/include_dir_no_rems/03.notrem
Normal file
@@ -0,0 +1 @@
|
||||
REM MSG IGNORE
|
||||
5
tests/include_test.rem
Normal file
5
tests/include_test.rem
Normal file
@@ -0,0 +1,5 @@
|
||||
INCLUDE include_dir
|
||||
INCLUDE include_dir_no_rems
|
||||
INCLUDE nonexistent_include_dir
|
||||
|
||||
REM 15 MSG Whee!!!!
|
||||
@@ -11,6 +11,14 @@
|
||||
# Copyright (C) 1999-2000 Roaring Penguin Software Inc.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
DIR=`dirname $0`
|
||||
cd $DIR
|
||||
if test $? != 0 ; then
|
||||
echo "Unable to cd $DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod 000 include_dir/04cantread.rem
|
||||
TEST_GETENV="foo bar baz" ; export TEST_GETENV
|
||||
echo "Test 1" > ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
@@ -18,7 +26,7 @@ echo "" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
echo "Test 2" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -p ../tests/test2.rem 1 aug 2007 >> ../tests/test.out
|
||||
../src/remind -p -l ../tests/test2.rem 1 aug 2007 >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
echo "Test 3" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
@@ -29,13 +37,28 @@ echo "" >> ../tests/test.out
|
||||
../src/remind -sa ../tests/test2.rem 1 aug 2007 >> ../tests/test.out
|
||||
echo "Test 5" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -p -b0 ../tests/test3.rem 1 aug 2007 >> ../tests/test.out
|
||||
../src/remind -p -l -b0 ../tests/test3.rem 1 aug 2007 >> ../tests/test.out
|
||||
echo "Test 6" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -p -b1 ../tests/test3.rem 1 aug 2007 >> ../tests/test.out
|
||||
../src/remind -p -l -b1 ../tests/test3.rem 1 aug 2007 >> ../tests/test.out
|
||||
echo "Test 7" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -p -b2 ../tests/test3.rem 1 aug 2007 >> ../tests/test.out
|
||||
../src/remind -p -l -b2 ../tests/test3.rem 1 aug 2007 >> ../tests/test.out
|
||||
|
||||
echo "Test 8" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -df -p -l -b2 ../tests/include_dir 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
|
||||
echo "Test 9" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -df -p -l -b2 ../tests/nonexistent_include_dir 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
../src/remind -df -p -l -b2 ../tests/include_dir_no_rems 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
../src/remind -df -p -l -b2 ../tests/include_test.rem 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
|
||||
chmod 644 include_dir/04cantread.rem
|
||||
|
||||
echo "Color Test" >> ../tests/test.out
|
||||
../src/remind -ccl ../tests/colors.rem 1 aug 2007 >> ../tests/test.out
|
||||
|
||||
cmp -s ../tests/test.out ../tests/test.cmp
|
||||
if [ "$?" = "0" ]; then
|
||||
|
||||
752
tests/test.cmp
752
tests/test.cmp
@@ -638,7 +638,7 @@ set a057 value("a05"+"6")
|
||||
"a05" + "6" => "a056"
|
||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
set a058 version()
|
||||
version() => "03.01.03"
|
||||
version() => "03.01.05"
|
||||
set a059 wkday(today())
|
||||
today() => 1991-02-16
|
||||
wkday(1991-02-16) => "Saturday"
|
||||
@@ -779,7 +779,7 @@ dump
|
||||
a048 "foo"
|
||||
a067 "INT"
|
||||
a039 "February"
|
||||
a058 "03.01.03"
|
||||
a058 "03.01.05"
|
||||
a077 "1992 92
|
||||
"
|
||||
a049 21
|
||||
@@ -843,88 +843,177 @@ August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
# fileinfo 17 ../tests/test2.rem
|
||||
2007/08/01 COLOR * * * 0 0 255 Blue Wednesday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/01 * * * * 0 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/01 * * * * 0 NonOmit-2
|
||||
# fileinfo 18 ../tests/test2.rem
|
||||
2007/08/02 COLOR * * * 255 0 0 Red Thursday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/02 * * * * 1 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/02 * * * * 1 NonOmit-2
|
||||
# fileinfo 21 ../tests/test2.rem
|
||||
2007/08/03 SHADE * * * 0 255 0
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/03 * * * * 2 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/03 * * * * 2 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/04 * * * * 3 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/04 * * * * 3 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/05 * * * * 4 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/05 * * * * 3 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/06 * * * * 5 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/06 * * * * 3 NonOmit-2
|
||||
# fileinfo 43 ../tests/test2.rem
|
||||
2007/08/06 * * * * Blort
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/07 * * * * 6 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/07 * * * * 4 NonOmit-2
|
||||
# fileinfo 17 ../tests/test2.rem
|
||||
2007/08/08 COLOR * * * 0 0 255 Blue Wednesday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/08 * * * * 7 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/08 * * * * 5 NonOmit-2
|
||||
# fileinfo 18 ../tests/test2.rem
|
||||
2007/08/09 COLOR * * * 255 0 0 Red Thursday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/09 * * * * 8 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/09 * * * * 6 NonOmit-2
|
||||
# fileinfo 21 ../tests/test2.rem
|
||||
2007/08/10 SHADE * * * 0 255 0
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/10 * * * * 9 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/10 * * * * 7 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/11 * * * * 10 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/11 * * * * 8 NonOmit-2
|
||||
# fileinfo 24 ../tests/test2.rem
|
||||
2007/08/12 MOON * * * 0
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/12 * * * * 11 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/12 * * * * 8 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/13 * * * * 12 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/13 * * * * 8 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/14 * * * * 13 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/14 * * * * 9 NonOmit-2
|
||||
# fileinfo 17 ../tests/test2.rem
|
||||
2007/08/15 COLOR * * * 0 0 255 Blue Wednesday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/15 * * * * 13 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/15 * * * * 9 NonOmit-2
|
||||
# fileinfo 18 ../tests/test2.rem
|
||||
2007/08/16 COLOR * * * 255 0 0 Red Thursday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/16 * * * * 14 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/16 * * * * 10 NonOmit-2
|
||||
# fileinfo 21 ../tests/test2.rem
|
||||
2007/08/17 SHADE * * * 0 255 0
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/17 * * * * 15 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/17 * * * * 11 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/18 * * * * 16 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/18 * * * * 12 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/19 * * * * 17 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/19 * * * * 12 NonOmit-2
|
||||
# fileinfo 31 ../tests/test2.rem
|
||||
2007/08/20 COLOR * * 825 6 7 8 1:45pm Mooo!
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/20 * * * * 18 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/20 * * * * 12 NonOmit-2
|
||||
# fileinfo 43 ../tests/test2.rem
|
||||
2007/08/20 * * * * Blort
|
||||
# fileinfo 34 ../tests/test2.rem
|
||||
2007/08/21 PostScript * * 115 (wookie) show
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/21 * * * * 19 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/21 * * * * 13 NonOmit-2
|
||||
# fileinfo 17 ../tests/test2.rem
|
||||
2007/08/22 COLOR * * * 0 0 255 Blue Wednesday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/22 * * * * 20 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/22 * * * * 14 NonOmit-2
|
||||
# fileinfo 35 ../tests/test2.rem
|
||||
2007/08/22 PostScript * * * (cabbage) show
|
||||
# fileinfo 38 ../tests/test2.rem
|
||||
2007/08/23 blort * * 1004 snoo glup
|
||||
# fileinfo 18 ../tests/test2.rem
|
||||
2007/08/23 COLOR * * * 255 0 0 Red Thursday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/23 * * * * 21 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/23 * * * * 15 NonOmit-2
|
||||
# fileinfo 21 ../tests/test2.rem
|
||||
2007/08/24 SHADE * * * 0 255 0
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/24 * * * * 22 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/24 * * * * 16 NonOmit-2
|
||||
# fileinfo 39 ../tests/test2.rem
|
||||
2007/08/24 blort * * * gulp wookie
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/25 * * * * 23 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/25 * * * * 17 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/26 * * * * 24 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/26 * * * * 17 NonOmit-2
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/27 * * * * 25 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/27 * * * * 17 NonOmit-2
|
||||
# fileinfo 43 ../tests/test2.rem
|
||||
2007/08/27 * * * * Blort
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/28 * * * * 26 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/28 * * * * 18 NonOmit-2
|
||||
# fileinfo 17 ../tests/test2.rem
|
||||
2007/08/29 COLOR * * * 0 0 255 Blue Wednesday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/29 * * * * 27 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/29 * * * * 19 NonOmit-2
|
||||
# fileinfo 18 ../tests/test2.rem
|
||||
2007/08/30 COLOR * * * 255 0 0 Red Thursday
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/30 * * * * 28 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/30 * * * * 20 NonOmit-2
|
||||
# fileinfo 21 ../tests/test2.rem
|
||||
2007/08/31 SHADE * * * 0 255 0
|
||||
# fileinfo 27 ../tests/test2.rem
|
||||
2007/08/31 * * * * 29 NonOmit-1
|
||||
# fileinfo 28 ../tests/test2.rem
|
||||
2007/08/31 * * * * 21 NonOmit-2
|
||||
# rem2ps end
|
||||
|
||||
@@ -944,6 +1033,7 @@ Test 3
|
||||
2007/08/05 * * * * 3 NonOmit-2
|
||||
2007/08/06 * * * * 5 NonOmit-1
|
||||
2007/08/06 * * * * 3 NonOmit-2
|
||||
2007/08/06 * * * * Blort
|
||||
2007/08/07 * * * * 6 NonOmit-1
|
||||
2007/08/07 * * * * 4 NonOmit-2
|
||||
2007/08/08 COLOR * * * 0 0 255 Blue Wednesday
|
||||
@@ -977,6 +1067,7 @@ Test 3
|
||||
2007/08/20 COLOR * * 825 6 7 8 1:45pm Mooo!
|
||||
2007/08/20 * * * * 18 NonOmit-1
|
||||
2007/08/20 * * * * 12 NonOmit-2
|
||||
2007/08/20 * * * * Blort
|
||||
2007/08/21 * * * * 19 NonOmit-1
|
||||
2007/08/21 * * * * 13 NonOmit-2
|
||||
2007/08/22 COLOR * * * 0 0 255 Blue Wednesday
|
||||
@@ -993,6 +1084,7 @@ Test 3
|
||||
2007/08/26 * * * * 17 NonOmit-2
|
||||
2007/08/27 * * * * 25 NonOmit-1
|
||||
2007/08/27 * * * * 17 NonOmit-2
|
||||
2007/08/27 * * * * Blort
|
||||
2007/08/28 * * * * 26 NonOmit-1
|
||||
2007/08/28 * * * * 18 NonOmit-2
|
||||
2007/08/29 COLOR * * * 0 0 255 Blue Wednesday
|
||||
@@ -1021,6 +1113,7 @@ Test 4
|
||||
2007/08/06 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||
2007/08/06 * * * * 5 NonOmit-1
|
||||
2007/08/06 * * * * 3 NonOmit-2
|
||||
2007/08/06 * * * * Blort
|
||||
2007/08/07 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||
2007/08/07 * * * * 6 NonOmit-1
|
||||
2007/08/07 * * * * 4 NonOmit-2
|
||||
@@ -1059,6 +1152,7 @@ Test 4
|
||||
2007/08/20 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||
2007/08/20 * * * * 18 NonOmit-1
|
||||
2007/08/20 * * * * 12 NonOmit-2
|
||||
2007/08/20 * * * * Blort
|
||||
2007/08/21 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||
2007/08/21 * * * * 19 NonOmit-1
|
||||
2007/08/21 * * * * 13 NonOmit-2
|
||||
@@ -1077,6 +1171,7 @@ Test 4
|
||||
2007/08/27 COLOR * * * 0 0 255 Blue Wednesday is in 2 days' time
|
||||
2007/08/27 * * * * 25 NonOmit-1
|
||||
2007/08/27 * * * * 17 NonOmit-2
|
||||
2007/08/27 * * * * Blort
|
||||
2007/08/28 COLOR * * * 0 0 255 Blue Wednesday is tomorrow
|
||||
2007/08/28 * * * * 26 NonOmit-1
|
||||
2007/08/28 * * * * 18 NonOmit-2
|
||||
@@ -1095,26 +1190,47 @@ August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
# fileinfo 1 ../tests/test3.rem
|
||||
2007/08/01 * * * 660 11:00am Wookie
|
||||
# fileinfo 5 ../tests/test3.rem
|
||||
2007/08/01 * * 45 660 11:00-11:45am Lettuce
|
||||
# fileinfo 9 ../tests/test3.rem
|
||||
2007/08/01 * * 105 660 11:00am-12:45pm Apple
|
||||
# fileinfo 13 ../tests/test3.rem
|
||||
2007/08/01 * * 885 660 11:00am-1:45am+1 Green
|
||||
# fileinfo 17 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 660 11:00am-11:45am+1 Yellow
|
||||
# fileinfo 21 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 660 11:00am-11:45pm+1 Purple
|
||||
# fileinfo 25 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 660 11:00am-11:45am+2 Sad
|
||||
# fileinfo 2 ../tests/test3.rem
|
||||
2007/08/01 * * * 720 12:00pm Cookie
|
||||
# fileinfo 6 ../tests/test3.rem
|
||||
2007/08/01 * * 45 720 12:00-12:45pm Cabbage
|
||||
# fileinfo 10 ../tests/test3.rem
|
||||
2007/08/01 * * 165 720 12:00-2:45pm Pear
|
||||
# fileinfo 14 ../tests/test3.rem
|
||||
2007/08/01 * * 885 720 12:00pm-2:45am+1 Blue
|
||||
# fileinfo 18 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 720 12:00pm-12:45pm+1 Orange
|
||||
# fileinfo 22 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 720 12:00pm-12:45am+2 Black
|
||||
# fileinfo 26 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 720 12:00pm-12:45pm+2 Happy
|
||||
# fileinfo 3 ../tests/test3.rem
|
||||
2007/08/01 * * * 780 1:00pm Snookie
|
||||
# fileinfo 7 ../tests/test3.rem
|
||||
2007/08/01 * * 45 780 1:00-1:45pm Tomato
|
||||
# fileinfo 11 ../tests/test3.rem
|
||||
2007/08/01 * * 225 780 1:00-4:45pm Grape
|
||||
# fileinfo 15 ../tests/test3.rem
|
||||
2007/08/01 * * 885 780 1:00pm-3:45am+1 Red
|
||||
# fileinfo 19 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 780 1:00pm-1:45pm+1 Magenta
|
||||
# fileinfo 23 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 780 1:00pm-1:45am+2 Brown
|
||||
# fileinfo 27 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 780 1:00pm-1:45pm+2 Strange
|
||||
# rem2ps end
|
||||
Test 6
|
||||
@@ -1124,26 +1240,47 @@ August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
# fileinfo 1 ../tests/test3.rem
|
||||
2007/08/01 * * * 660 11:00 Wookie
|
||||
# fileinfo 5 ../tests/test3.rem
|
||||
2007/08/01 * * 45 660 11:00-11:45 Lettuce
|
||||
# fileinfo 9 ../tests/test3.rem
|
||||
2007/08/01 * * 105 660 11:00-12:45 Apple
|
||||
# fileinfo 13 ../tests/test3.rem
|
||||
2007/08/01 * * 885 660 11:00-01:45+1 Green
|
||||
# fileinfo 17 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 660 11:00-11:45+1 Yellow
|
||||
# fileinfo 21 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 660 11:00-23:45+1 Purple
|
||||
# fileinfo 25 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 660 11:00-11:45+2 Sad
|
||||
# fileinfo 2 ../tests/test3.rem
|
||||
2007/08/01 * * * 720 12:00 Cookie
|
||||
# fileinfo 6 ../tests/test3.rem
|
||||
2007/08/01 * * 45 720 12:00-12:45 Cabbage
|
||||
# fileinfo 10 ../tests/test3.rem
|
||||
2007/08/01 * * 165 720 12:00-14:45 Pear
|
||||
# fileinfo 14 ../tests/test3.rem
|
||||
2007/08/01 * * 885 720 12:00-02:45+1 Blue
|
||||
# fileinfo 18 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 720 12:00-12:45+1 Orange
|
||||
# fileinfo 22 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 720 12:00-00:45+2 Black
|
||||
# fileinfo 26 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 720 12:00-12:45+2 Happy
|
||||
# fileinfo 3 ../tests/test3.rem
|
||||
2007/08/01 * * * 780 13:00 Snookie
|
||||
# fileinfo 7 ../tests/test3.rem
|
||||
2007/08/01 * * 45 780 13:00-13:45 Tomato
|
||||
# fileinfo 11 ../tests/test3.rem
|
||||
2007/08/01 * * 225 780 13:00-16:45 Grape
|
||||
# fileinfo 15 ../tests/test3.rem
|
||||
2007/08/01 * * 885 780 13:00-03:45+1 Red
|
||||
# fileinfo 19 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 780 13:00-13:45+1 Magenta
|
||||
# fileinfo 23 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 780 13:00-01:45+2 Brown
|
||||
# fileinfo 27 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 780 13:00-13:45+2 Strange
|
||||
# rem2ps end
|
||||
Test 7
|
||||
@@ -1153,25 +1290,636 @@ August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
# fileinfo 1 ../tests/test3.rem
|
||||
2007/08/01 * * * 660 Wookie
|
||||
# fileinfo 5 ../tests/test3.rem
|
||||
2007/08/01 * * 45 660 Lettuce
|
||||
# fileinfo 9 ../tests/test3.rem
|
||||
2007/08/01 * * 105 660 Apple
|
||||
# fileinfo 13 ../tests/test3.rem
|
||||
2007/08/01 * * 885 660 Green
|
||||
# fileinfo 17 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 660 Yellow
|
||||
# fileinfo 21 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 660 Purple
|
||||
# fileinfo 25 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 660 Sad
|
||||
# fileinfo 2 ../tests/test3.rem
|
||||
2007/08/01 * * * 720 Cookie
|
||||
# fileinfo 6 ../tests/test3.rem
|
||||
2007/08/01 * * 45 720 Cabbage
|
||||
# fileinfo 10 ../tests/test3.rem
|
||||
2007/08/01 * * 165 720 Pear
|
||||
# fileinfo 14 ../tests/test3.rem
|
||||
2007/08/01 * * 885 720 Blue
|
||||
# fileinfo 18 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 720 Orange
|
||||
# fileinfo 22 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 720 Black
|
||||
# fileinfo 26 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 720 Happy
|
||||
# fileinfo 3 ../tests/test3.rem
|
||||
2007/08/01 * * * 780 Snookie
|
||||
# fileinfo 7 ../tests/test3.rem
|
||||
2007/08/01 * * 45 780 Tomato
|
||||
# fileinfo 11 ../tests/test3.rem
|
||||
2007/08/01 * * 225 780 Grape
|
||||
# fileinfo 15 ../tests/test3.rem
|
||||
2007/08/01 * * 885 780 Red
|
||||
# fileinfo 19 ../tests/test3.rem
|
||||
2007/08/01 * * 1485 780 Magenta
|
||||
# fileinfo 23 ../tests/test3.rem
|
||||
2007/08/01 * * 2205 780 Brown
|
||||
# fileinfo 27 ../tests/test3.rem
|
||||
2007/08/01 * * 2925 780 Strange
|
||||
# rem2ps end
|
||||
Test 8
|
||||
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Opening file on disk
|
||||
Caching file `../tests/include_dir/01.rem' in memory
|
||||
Reading `../tests/include_dir/02.rem': Opening file on disk
|
||||
Caching file `../tests/include_dir/02.rem' in memory
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
Scanning directory `../tests/include_dir' for *.rem files
|
||||
Reading `../tests/include_dir/01.rem': Found in cache
|
||||
Reading `../tests/include_dir/02.rem': Found in cache
|
||||
Reading `../tests/include_dir/04cantread.rem': Opening file on disk
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
# rem2ps begin
|
||||
August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
# fileinfo 1 ../tests/include_dir/01.rem
|
||||
2007/08/15 * * * * 01
|
||||
# fileinfo 1 ../tests/include_dir/02.rem
|
||||
2007/08/15 * * * * 02
|
||||
# rem2ps end
|
||||
Test 9
|
||||
|
||||
Reading `../tests/nonexistent_include_dir': Opening file on disk
|
||||
Can't open file: ../tests/nonexistent_include_dir
|
||||
Error reading ../tests/nonexistent_include_dir: Can't open file
|
||||
# rem2ps begin
|
||||
August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
Scanning directory `../tests/include_dir_no_rems' for *.rem files
|
||||
../tests/include_dir_no_rems: No files matching *.rem
|
||||
Error reading ../tests/include_dir_no_rems: No files matching *.rem
|
||||
# rem2ps begin
|
||||
August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
Reading `../tests/include_test.rem': Opening file on disk
|
||||
Caching file `../tests/include_test.rem' in memory
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Opening file on disk
|
||||
Caching file `include_dir/01.rem' in memory
|
||||
Reading `include_dir/02.rem': Opening file on disk
|
||||
Caching file `include_dir/02.rem' in memory
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
Reading `../tests/include_test.rem': Found in cache
|
||||
Scanning directory `include_dir' for *.rem files
|
||||
Reading `include_dir/01.rem': Found in cache
|
||||
Reading `include_dir/02.rem': Found in cache
|
||||
Reading `include_dir/04cantread.rem': Opening file on disk
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
Scanning directory `include_dir_no_rems' for *.rem files
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
Reading `nonexistent_include_dir': Opening file on disk
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
# rem2ps begin
|
||||
August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
# fileinfo 1 include_dir/01.rem
|
||||
2007/08/15 * * * * 01
|
||||
# fileinfo 1 include_dir/02.rem
|
||||
2007/08/15 * * * * 02
|
||||
# fileinfo 5 ../tests/include_test.rem
|
||||
2007/08/15 * * * * Whee!!!!
|
||||
# rem2ps end
|
||||
Color Test
|
||||
(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk(B
|
||||
(0x(B August 2007 (0x(B
|
||||
(0tqqqqqqqqqqwqqqqqqqqqqwqqqqqqqqqqwqqqqqqqqqqwqqqqqqqqqqwqqqqqqqqqqwqqqqqqqqqqu(B
|
||||
(0x(B Sunday (0x(B Monday (0x(B Tuesday (0x(BWednesday (0x(B Thursday (0x(B Friday (0x(B Saturday (0x(B
|
||||
(0tqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqu(B
|
||||
(0x(B (0x(B (0x(B (0x(B1 (0x(B2 (0x(B3 (0x(B4 (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0tqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqu(B
|
||||
(0x(B5 (0x(B6 (0x(B7 (0x(B8 (0x(B9 (0x(B10 (0x(B11 (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0tqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqu(B
|
||||
(0x(B12 (0x(B13 (0x(B14 (0x(B15 (0x(B16 (0x(B17 (0x(B18 (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0tqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqu(B
|
||||
(0x(B19 (0x(B20 (0x(B21 (0x(B22 (0x(B23 (0x(B24 (0x(B25 (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0tqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqnqqqqqqqqqqu(B
|
||||
(0x(B26 (0x(B27 (0x(B28 (0x(B29 (0x(B30 (0x(B31 (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;30mBlack[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;31mDim Red[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;32mDim Green[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;34mDim Blue[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;36mDim Cyan[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;35mDim[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;35mMagenta[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;33mDim Yellow[0m(0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[0;37mDim White[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[31;1mBright Red[0m(0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[32;1mBright[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[32;1mGreen[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[34;1mBright[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[34;1mBlue[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[36;1mBright[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[36;1mCyan[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[35;1mBright[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[35;1mMagenta[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[33;1mBright[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[33;1mYellow[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[37;1mBright[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0x(B (0x(B (0x(B[37;1mWhite[0m (0x(B (0x(B (0x(B (0x(B (0x(B
|
||||
(0mqqqqqqqqqqvqqqqqqqqqqvqqqqqqqqqqvqqqqqqqqqqvqqqqqqqqqqvqqqqqqqqqqvqqqqqqqqqqj(B
|
||||
|
||||
@@ -38,3 +38,6 @@ REM 22 AUG SPECIAL PostScript (cabbage) show
|
||||
REM 23 AUG AT 16:44 SPECIAL blort snoo glup
|
||||
REM 24 AUG SPECIAL blort gulp wookie
|
||||
|
||||
# Bug discovered by Paul Pelzl
|
||||
OMIT 13 August
|
||||
REM 6 August 2007 *7 SKIP SATISFY [1] MSG Blort
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Unconfiguring Remind..."
|
||||
echo rm -f config.cache config.log config.status src/Makefile src/config.h
|
||||
rm -f config.cache config.log config.status src/Makefile src/config.h
|
||||
echo rm -f config.cache config.log config.status src/Makefile src/config.h src/version.h
|
||||
rm -f config.cache config.log config.status src/Makefile src/config.h src/version.h
|
||||
exit 0
|
||||
|
||||
31
www/rem2html
31
www/rem2html
@@ -400,7 +400,7 @@ sub output_calendar
|
||||
$col++;
|
||||
}
|
||||
|
||||
if ($last_col == 6) {
|
||||
if ($last_col == 6 && $first_col > 0) {
|
||||
small_calendar($Nextmon, $Nextlen, $Options{'forwurl'},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
$col++;
|
||||
@@ -451,6 +451,22 @@ sub output_calendar
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
# Add a row for small calendars if they were not yet done!
|
||||
if ($first_col == 0 && $last_col == 6) {
|
||||
if ($Options{'nostyle'}) {
|
||||
print "<tr>\n";
|
||||
} else {
|
||||
print "<tr class=\"rem-cal-row\">\n";
|
||||
}
|
||||
small_calendar($Prevmon, $Prevlen, $Options{'backurl'},
|
||||
($Firstwkday - $Prevlen + 35) % 7);
|
||||
for (my $i=0; $i<5; $i++) {
|
||||
print("<td$class> </td>\n");
|
||||
}
|
||||
small_calendar($Nextmon, $Nextlen, $Options{'forwurl'},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
print("</tr>\n");
|
||||
}
|
||||
# End the table
|
||||
print "</table>\n";
|
||||
}
|
||||
@@ -471,9 +487,9 @@ sub draw_day_cell
|
||||
$shade = "";
|
||||
}
|
||||
if ($class ne '') {
|
||||
print "<td class=\"$class\"$shade>\n<p>";
|
||||
print "<td class=\"$class\"$shade>\n";
|
||||
} else {
|
||||
print "<td valign=\"top\" $shade>\n<p>";
|
||||
print "<td valign=\"top\" $shade>\n";
|
||||
}
|
||||
if ($moons->[$day]) {
|
||||
my $phase = $moons->[$day]->{'phase'};
|
||||
@@ -508,16 +524,15 @@ sub draw_day_cell
|
||||
if ($Options{'nostyle'}) {
|
||||
print("<div style=\"float: left\"><img border=\"0\" width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
||||
} else {
|
||||
print("<div class=\"rem-moon\"><img border=\"0\" width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
||||
print("<div class=\"rem-moon\"><img width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
||||
}
|
||||
}
|
||||
|
||||
if ($Options{'nostyle'}) {
|
||||
print "<div style=\"float: right\">$day</div></p>\n";
|
||||
print "<div style=\"float: right\">$day</div>\n";
|
||||
print "<p> </p>\n";
|
||||
} else {
|
||||
print "<div class=\"rem-daynumber\">$day</div></p>\n";
|
||||
print "<p class=\"rem-entry\"> </p>\n";
|
||||
print "<div class=\"rem-daynumber\">$day</div>\n";
|
||||
}
|
||||
if ($days->[$day]) {
|
||||
print(join("\n", @{$days->[$day]}));
|
||||
@@ -561,7 +576,7 @@ while(1) {
|
||||
}
|
||||
if ($found_something) {
|
||||
end_output();
|
||||
exit(1);
|
||||
exit(0);
|
||||
} else {
|
||||
print STDERR "$TIDY_PROGNAME: Could not find any calendar data on STDIN.\n";
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user