From: thib Date: Sat, 10 Mar 2001 13:10:23 +0000 (+0000) Subject: boolean option can be set using "yes" and "no" X-Git-Tag: ver1564~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66ad09e68f97df2d11c86710527b7af545fbcdb4;p=fcron 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;