X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=blobdiff_plain;f=prs_inf.c;h=1f4b633a0780d0828939c5a757608c63d361146c;hb=97c88ec31ee3ce21bab2ae0cba93184b18298eb9;hp=5651e33ad5913a5e0b44de7602a74dee22f299e9;hpb=219d769a92db35047889d2ede526ae9dbd6eedb1;p=tedtools.git diff --git a/prs_inf.c b/prs_inf.c index 5651e33..1f4b633 100644 --- a/prs_inf.c +++ b/prs_inf.c @@ -327,4 +327,48 @@ INFGetString(InfMap *inf, char *sect, char *key, char **val) { return 1; } +static int +parseBool(char *str) +{ + struct { + char *key; + int val; + } + bdata[] = + { + {"1", 1}, + {"0", 0}, + {"on", 1}, + {"off", 0}, + {"enable", 1}, + {"disable", 0}, + {"true", 1}, + {"false", 0}, + {"yes", 1}, + {"no", 0} + }; + int i; + + while(*str && isspace(*str)) + str++; + + for(i=0;ivalue); + return 0; + } + return 1; +} +