*/
int ast_get_time_t(const char *src, time_t *dst, time_t _default, int *consumed);
-/* The realloca lets us ast_restrdupa(), but you can't mix any other ast_strdup calls! */
-
-struct ast_realloca {
- char *ptr;
- int alloclen;
-};
-
-#define ast_restrdupa(ra, s) \
- ({ \
- if ((ra)->ptr && strlen(s) + 1 < (ra)->alloclen) { \
- strcpy((ra)->ptr, s); \
- } else { \
- (ra)->ptr = alloca(strlen(s) + 1 - (ra)->alloclen); \
- if ((ra)->ptr) (ra)->alloclen = strlen(s) + 1; \
- } \
- (ra)->ptr; \
- })
-
/*!
* Support for dynamic strings.
*
struct ast_variable *var=NULL;
struct ast_config *cfg=NULL;
struct ast_category *cat=NULL;
- struct ast_realloca ra;
SQLULEN colsize;
SQLSMALLINT colcount=0;
SQLSMALLINT datatype;
va_list aq;
va_copy(aq, ap);
-
-
+
if (!table)
return NULL;
- memset(&ra, 0, sizeof(ra));
obj = ast_odbc_request_obj(database, 0);
if (!obj)
char *chunk;
char *op;
const char *newparam, *newval;
- struct ast_realloca ra;
struct ast_variable *var = NULL;
struct ast_config *cfg = NULL;
struct ast_category *cat = NULL;
return NULL;
}
- memset(&ra, 0, sizeof(ra));
-
if (!(cfg = ast_config_new()))
return NULL;