From: Thibault Godouet Date: Sat, 10 Mar 2001 13:10:23 +0000 (+0000) Subject: boolean option can be set using "yes" and "no" X-Git-Tag: ver2_9_4~385 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=200ce2dcd0ee527bdfcaf85ef89e7fed0941b9d9;p=thirdparty%2Ffcron.git boolean option can be set using "yes" and "no" --- 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;