#include <ctype.h>
#include <stdarg.h>
-#include <assert.h>
-
#undef XTAG_DEBUG
typedef struct _XList
{
XList *l, *last;
- l = (XList *)malloc( sizeof(XList) );
- assert( l );
+ l = (XList *)xmalloc( sizeof(XList) );
l->prev = l->next = NULL;
l->data = data;
if( xi > 0 && xtag_cin (s[xi], good_end) )
{
- ret = malloc( xi+1 );
- assert( ret );
+ ret = xmalloc( xi+1 );
strncpy( ret, s, xi );
ret[xi] = '\0';
parser->start = &s[xi];
}
}
- ret = malloc( xi+1 );
- assert( ret );
+ ret = xmalloc( xi+1 );
strncpy( ret, s, xi );
ret[xi] = '\0';
parser->start = &s[xi];
goto err_free_name;
}
- attr = malloc( sizeof (*attr) );
- assert( attr );
+ attr = xmalloc( sizeof (*attr) );
attr->name = name;
attr->value = value;
return attr;
if( (pcdata = xtag_slurp_to( parser, X_OPENTAG, X_NONE )) != NULL )
{
- tag = malloc( sizeof(*tag) );
- assert( tag );
+ tag = xmalloc( sizeof(*tag) );
tag->name = NULL;
tag->pcdata = pcdata;
tag->parent = parser->current_tag;
fprintf (stderr, "<%s ...\n", name);
#endif
- tag = malloc( sizeof(*tag) );
- assert( tag );
+ tag = xmalloc( sizeof(*tag) );
tag->name = name;
tag->pcdata = NULL;
tag->parent = parser->current_tag;
return tag;
}
- wrapper = malloc( sizeof(XTag) );
- assert( wrapper );
+ wrapper = xmalloc( sizeof(XTag) );
wrapper->name = NULL;
wrapper->pcdata = NULL;
wrapper->parent = NULL;