From 66ad09e68f97df2d11c86710527b7af545fbcdb4 Mon Sep 17 00:00:00 2001 From: thib Date: Sat, 10 Mar 2001 13:10:23 +0000 Subject: [PATCH] boolean option can be set using "yes" and "no" --- fileconf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fileconf.c b/fileconf.c index 7063d5e..229218a 100644 --- a/fileconf.c +++ b/fileconf.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fileconf.c,v 1.41 2001-03-01 18:40:47 thib Exp $ */ + /* $Id: fileconf.c,v 1.42 2001-03-10 13:10:23 thib Exp $ */ #include "fcrontab.h" @@ -406,10 +406,18 @@ get_bool(char *ptr, int *i) ptr += 3; goto true; } + else if ( strncmp(ptr, "yes", 3) == 0 ) { + ptr += 2; + goto true; + } else if ( strncmp(ptr, "false", 5) == 0 ) { ptr += 4; goto false; } + else if ( strncmp(ptr, "no", 2) == 0 ) { + ptr += 1; + goto false; + } else return NULL; -- 2.40.0