mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Add "a" modifier to -s and -p options (Frank Terbeck)
This commit is contained in:
17
man/remind.1
17
man/remind.1
@@ -1,4 +1,4 @@
|
||||
.\" $Id: remind.1,v 1.17 2006-11-02 20:50:16 dfs Exp $
|
||||
.\" $Id: remind.1,v 1.18 2007-01-25 02:28:53 dfs Exp $
|
||||
.TH REMIND 1 "11 April 2005"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
@@ -49,20 +49,29 @@ Any of \fIcol\fR, \fIpad\fR or \fIspc\fR can be omitted, providing you
|
||||
provide the correct number of commas. Don't use any spaces in the option.
|
||||
.RE
|
||||
.TP
|
||||
.B \-s\fR\fIn\fR
|
||||
.B \-s\fR[\fBa\fR]\fIn\fR
|
||||
The \fB\-s\fR option is very similar to the \fB\-c\fR option, except
|
||||
that the output calendar is not formatted. It is listed in a "simple
|
||||
format" which can be used as input for more sophisticated calendar-drawing
|
||||
programs. If \fIn\fR starts with "+", then it is interpreted as a number
|
||||
of weeks.
|
||||
|
||||
If you immediately follow the \fBs\fR with the letter
|
||||
\fBa\fR, then \fBRemind\fR displays 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 \-p\fR\fIn\fR
|
||||
.B \-p\fR[\fBa\fR]\fIn\fR
|
||||
The \fB\-p\fR option is very similar to the \fB\-s\fR option, except
|
||||
that the output contains additional information for use by the
|
||||
\fBRem2PS\fR program, which creates a PostScript calendar. For this
|
||||
option, \fIn\fR cannot start with "+"; it must specify a number of months.
|
||||
The format of the \fB\-p\fR output is described in the \fBrem2ps(1)\fR
|
||||
man page.
|
||||
man page. If you immediately follow the \fBp\fR with the letter
|
||||
\fBa\fR, then \fBRemind\fR displays 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
|
||||
If you use the \-l option in conjunction with the \-p option, then
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# $Id: tkremind,v 1.40 2005-04-14 17:34:34 dfs Exp $
|
||||
# $Id: tkremind,v 1.41 2007-01-25 02:28:58 dfs Exp $
|
||||
|
||||
# the next line restarts using wish \
|
||||
exec wish "$0" "$@"
|
||||
@@ -623,7 +623,7 @@ proc LoadOptions {} {
|
||||
#***********************************************************************
|
||||
proc ConfigureCalWindow { month year firstDay numDays } {
|
||||
.h.title configure -text "$month $year"
|
||||
wm title . "TkRemind - $month $year"
|
||||
wm title . "$month $year - TkRemind"
|
||||
wm iconname . "$month $year"
|
||||
ConfigureCalFrame .cal $firstDay $numDays
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/***************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
static char const RCSID[] = "$Id: calendar.c,v 1.13 2005-09-30 03:29:32 dfs Exp $";
|
||||
static char const RCSID[] = "$Id: calendar.c,v 1.14 2007-01-25 02:29:00 dfs Exp $";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -648,7 +648,8 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
|
||||
/* If trigger date == today, add it to the current entry */
|
||||
DBufInit(&obuf);
|
||||
if (jul == JulianToday) {
|
||||
if (jul == JulianToday ||
|
||||
(DoSimpleCalDelta && trig.delta != NO_DELTA && jul-trig.delta <= JulianToday)) {
|
||||
NumTriggered++;
|
||||
if (DoSimpleCalendar || tim.ttime != NO_TIME) {
|
||||
if (DBufPuts(&obuf, SimpleTime(tim.ttime)) != OK) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: custom.h,v 1.34 2005-10-16 14:48:02 dfs Exp $ */
|
||||
/* $Id: custom.h,v 1.35 2007-01-25 02:29:00 dfs Exp $ */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* LAT_DEG, LAT_MIN and LAT_SEC: Latitude of your location */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: globals.h,v 1.9 2005-09-30 03:29:32 dfs Exp $ */
|
||||
/* $Id: globals.h,v 1.10 2007-01-25 02:29:00 dfs Exp $ */
|
||||
|
||||
#ifdef MK_GLOBALS
|
||||
#undef EXTERN
|
||||
@@ -42,6 +42,7 @@ EXTERN INIT( int ShowAllErrors, 0);
|
||||
EXTERN INIT( int DebugFlag, 0);
|
||||
EXTERN INIT( int DoCalendar, 0);
|
||||
EXTERN INIT( int DoSimpleCalendar, 0);
|
||||
EXTERN INIT( int DoSimpleCalDelta, 0);
|
||||
EXTERN INIT( int DoPrefixLineNo, 0);
|
||||
EXTERN INIT( int MondayFirst, 0);
|
||||
EXTERN INIT( int Iterations, 1);
|
||||
|
||||
10
src/init.c
10
src/init.c
@@ -13,7 +13,7 @@
|
||||
/***************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
static char const RCSID[] = "$Id: init.c,v 1.16 2005-09-30 03:29:32 dfs Exp $";
|
||||
static char const RCSID[] = "$Id: init.c,v 1.17 2007-01-25 02:29:00 dfs Exp $";
|
||||
|
||||
#define L_IN_INIT 1
|
||||
#include <stdio.h>
|
||||
@@ -258,6 +258,10 @@ void InitRemind(int argc, char *argv[])
|
||||
case 's':
|
||||
case 'S':
|
||||
DoSimpleCalendar = 1;
|
||||
if (*arg == 'a' || *arg == 'A') {
|
||||
DoSimpleCalDelta = 1;
|
||||
arg++;
|
||||
}
|
||||
if (*arg == '+') {
|
||||
arg++;
|
||||
PARSENUM(CalWeeks, arg);
|
||||
@@ -272,6 +276,10 @@ void InitRemind(int argc, char *argv[])
|
||||
case 'P':
|
||||
DoSimpleCalendar = 1;
|
||||
PsCal = 1;
|
||||
if (*arg == 'a' || *arg == 'A') {
|
||||
DoSimpleCalDelta = 1;
|
||||
arg++;
|
||||
}
|
||||
PARSENUM(CalMonths, arg);
|
||||
if (!CalMonths) CalMonths = 1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user