[Remind-Fans] [PATCH] Fix default value for -z

Simon Ruderich simon at ruderich.org
Thu Nov 1 11:41:58 EDT 2012


Hello,

I noticed that the default value for -z is not 5 as mentioned in
the man page but 1.

The following patches fix the problem. Either by updating the man
page (and the source comment) or changing the default to 5.

diff --git a/man/remind.1 b/man/remind.1
index 2855f19..0801d60 100644
--- a/man/remind.1
+++ b/man/remind.1
@@ -249,7 +249,7 @@ option must be prepared to handle the entire message as a single argument.
 Runs \fBRemind\fR in the daemon mode.  If \fIn\fR is supplied, it
 specifies how often (in minutes) \fBRemind\fR should wake up to
 check if the reminder script has been changed.  \fIN\fR defaults
-to 5, and can range from 1 to 60.  Note that the use of the
+to 1, and can range from 1 to 60.  Note that the use of the
 \fB\-z\fR option also enables the \fB\-f\fR option.
 .PP
 .RS
diff --git a/src/init.c b/src/init.c
index 74d2d3c..8fe2745 100644
--- a/src/init.c
+++ b/src/init.c
@@ -59,7 +59,7 @@
  *             v = Dump variables at end
  *             l = Display entire line in error messages
  *  -e       = Send messages normally sent to stderr to stdout instead
- *  -z[n]    = Daemon mode waking up every n (def 5) minutes.
+ *  -z[n]    = Daemon mode waking up every n (def 1) minutes.
  *  -bn      = Time format for cal (0, 1, or 2)
  *  -xn      = Max. number of iterations for SATISFY
  *  -uname   = Run as user 'name' - only valid when run by root.  If run

diff --git a/src/init.c b/src/init.c
index 74d2d3c..6ba3171 100644
--- a/src/init.c
+++ b/src/init.c
@@ -310,7 +310,7 @@ void InitRemind(int argc, char const *argv[])
 		    else if (Daemon > 60) Daemon = 60;
 		} else {
 		    PARSENUM(Daemon, arg);
-		    if (Daemon<1) Daemon=1;
+		    if (Daemon<1) Daemon=5;
 		    else if (Daemon>60) Daemon=60;
 		}
 		break;

I'm not sure what's the best way to handle that, but I guess some
people rely on the current real default and patching the man page
is better for backwards compatibility.

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20121101/5f3d74e6/attachment.pgp>


More information about the Remind-fans mailing list