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:
Kevin P. Fleming
2005-06-24 22:45:15 +00:00
parent 3ddc33f674
commit 3e44b65090
6 changed files with 62 additions and 288 deletions

View File

@@ -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;