summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJames Golovich <james@gnuinter.net>2004-03-02 07:57:06 +0000
committerJames Golovich <james@gnuinter.net>2004-03-02 07:57:06 +0000
commit7409bc052db02f928956796ed2545b783e19729c (patch)
tree6b1ea6f3614d0cec186ab568c2cc9db50bdd10e9 /config.c
parent8f73da1f794094a47940f5fa7f23ffadde7d50a8 (diff)
Add function ast_false, like ast_true
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'config.c')
-rwxr-xr-xconfig.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/config.c b/config.c
index c217ac624..e25b24235 100755
--- a/config.c
+++ b/config.c
@@ -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;