diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-02 07:57:06 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-02 07:57:06 +0000 |
commit | f7c6812ba8bdfb065a68a604933ef714ad121da4 (patch) | |
tree | 6b1ea6f3614d0cec186ab568c2cc9db50bdd10e9 /config.c | |
parent | e45225faef9746b72b093b8a2c404137a1047213 (diff) |
Add function ast_false, like ast_true
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2289 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'config.c')
-rwxr-xr-x | config.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -128,6 +128,20 @@ int ast_true(char *s) return 0; } +int ast_false(char *s) +{ + if (!s) + return 0; + /* Determine if this is a false value */ + if (!strcasecmp(s, "no") || + !strcasecmp(s, "false") || + !strcasecmp(s, "n") || + !strcasecmp(s, "f") || + !strcasecmp(s, "0")) + return -1; + return 0; +} + struct ast_variable *ast_variable_browse(struct ast_config *config, char *category) { struct ast_category *cat; |