mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
split up string/time functions into separate header files
make more LOW_MEMORY optimizations, and ensure that a non-inline version of each inlinable function is always available (for external modules) move compiler-specific stuff into a separate header file git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
30
config.c
30
config.c
@@ -82,36 +82,6 @@ struct ast_config {
|
||||
int max_include_level;
|
||||
};
|
||||
|
||||
int ast_true(const char *s)
|
||||
{
|
||||
if (!s)
|
||||
return 0;
|
||||
/* Determine if this is a true value */
|
||||
if (!strcasecmp(s, "yes") ||
|
||||
!strcasecmp(s, "true") ||
|
||||
!strcasecmp(s, "y") ||
|
||||
!strcasecmp(s, "t") ||
|
||||
!strcasecmp(s, "1") ||
|
||||
!strcasecmp(s, "on"))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ast_false(const 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") ||
|
||||
!strcasecmp(s, "off"))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ast_variable *ast_variable_new(const char *name, const char *value)
|
||||
{
|
||||
struct ast_variable *variable;
|
||||
|
Reference in New Issue
Block a user