[Asterisk-cvs] asterisk config.c,1.16,1.16.2.1
citats at lists.digium.com
citats at lists.digium.com
Tue Mar 2 03:08:03 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv15354
Modified Files:
Tag: v1-0_stable
config.c
Log Message:
Add function ast_false, like ast_true
Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- config.c 1 Jul 2003 04:08:25 -0000 1.16
+++ config.c 2 Mar 2004 07:58:29 -0000 1.16.2.1
@@ -128,6 +128,20 @@
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;
More information about the svn-commits
mailing list