49#if defined(_WIN32) || defined(_WIN64)
64#define NAME_EXT_SIZE 128
65#define ATTR_EXT_SIZE 4096
66#define DATA_EXT_SIZE 4096
67#define LINE_BUF_SIZE 8192
69#define xmlError(a, b) xmlErrmsg(a, b, FALSE, __FILE__, __LINE__)
199 return ppos->top->node;
257#ifdef SCIP_DISABLED_CODE
264 if( len == 0 || len >
sizeof(
ppos->buf) - 1 )
267 ppos->buf[len] =
'\0';
271 return (
unsigned char)
ppos->buf[
ppos->pos++];
275#ifdef SPEC_LIKE_SPACE_HANDLING
290 if (
ppos->nextsym == 0 )
299 if (((
c ==
'\n') && (
ppos->lastsym ==
'\r')) || ((
c ==
'\r') && (
ppos->lastsym ==
'\n')))
331 if (
ppos->nextsym == 0 )
343 if ((
c ==
'\n') || (
c ==
'\r'))
345 }
while((
c ==
' ') && (
ppos->lastsym ==
c));
406 if ( !
isalpha(
c) && (
c !=
'_') && (
c !=
':') )
413 while (
isalnum(
c) || (
c ==
'_') || (
c ==
':') || (
c ==
'.') || (
c ==
'-') )
415 if ( len + 1 >= size )
431 name[len++] = (char)
c;
474 if ( (
c !=
'"') && (
c !=
'\'') )
476 xmlError(
ppos,
"Atribute value does not start with \" or \'");
504 attr[len++] = (char)
c;
539 if ( (
c ==
'>') && (state >= 2) )
542 state = (
c ==
'-') ? state + 1 : 0;
580 if ( (
c ==
'>') && (state >= 2) )
601 data[len++] = (char)
c;
611 data[len - 2] =
'\0';
637 while ( (
c !=
EOF) && (
c !=
'>') );
693 end = (int) (
sizeof(key) /
sizeof(key[0])) - 1;
710 while ( (
c !=
EOF) && (
c !=
'>') )
716 assert(
beg < (
int)(
sizeof(key) /
sizeof(*key)));
719 switch(key[
beg].what)
781 xmlError(
ppos,
"Name of endtag does not match starttag");
897 if ( (
c ==
'/') || (
c ==
'>') || (
c ==
EOF) )
978#ifndef SPEC_LIKE_SPACE_HANDLING
985 while ( (
c !=
EOF) && (
c !=
'<') )
987 if ( len + 1 >= size )
1003 data[len++] = (char)
c;
1059 switch (
ppos->state)
1086 const char* filename
1103#ifdef SCIP_WITH_ZLIB
1223 a->next = n->attrlist;
1236 child->parent = parent;
1237 child->prevsibl = parent->lastchild;
1238 child->nextsibl =
NULL;
1239 parent->lastchild = child;
1241 if ( child->prevsibl !=
NULL )
1242 child->prevsibl->nextsibl = child;
1244 if ( parent->firstchild ==
NULL )
1245 parent->firstchild = child;
1287 n = node->lastchild;
1298 if ( node->data !=
NULL )
1318 for (n = root; n !=
NULL; n = n->nextsibl)
1324 for (
a = n->attrlist;
a !=
NULL;
a =
a->next)
1327 if ( n->firstchild !=
NULL )
1347 for (
a = node->attrlist;
a !=
NULL;
a =
a->next)
1355 infoMessage(
"Error: Attribute %s in TAG <%s> not found\n", name, node->name);
1372 for (n = node; n !=
NULL; n = n->nextsibl)
1374 if ( !
strcmp(name, n->name) )
1405 if ( !
strcmp(name, node->name) )
1408 for (n = node->firstchild; n !=
NULL; n = n->nextsibl)
1432 if ( !
strcmp(name, node->name) )
1437 for (n = node->firstchild; n !=
NULL; n = n->nextsibl)
1455 return node->nextsibl;
1465 return node->prevsibl;
1475 return node->firstchild;
1485 return node->lastchild;
1505 return node->lineno;
1533 if ( !
strcmp(n->firstchild->name,
"#PCDATA") )
1534 return n->firstchild->data;
int SCIPstrncpy(char *t, const char *s, int size)
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
#define BMSfreeMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSclearMemory(ptr)
#define BMSallocMemoryArray(ptr, num)
#define BMSfreeMemoryArray(ptr)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSallocMemory(ptr)
internal miscellaneous methods
declarations for XML parsing
struct XML_ATTR_struct XML_ATTR
struct XML_NODE_struct XML_NODE
definitions for XML parsing
#define FGETS(buf, len, fp)
#define FOPEN(file, mode)
#define FREAD(buf, len, fp)
static void ungetsymbol(PPOS *ppos, int c)
static XML_Bool pushPstack(PPOS *ppos, XML_NODE *node)
const XML_NODE * xmlFirstChild(const XML_NODE *node)
const XML_NODE * xmlFindNodeMaxdepth(const XML_NODE *node, const char *name, int depth, int maxdepth)
void xmlAddAttr(XML_NODE *n, XML_ATTR *a)
const XML_NODE * xmlFirstNode(const XML_NODE *node, const char *name)
static XML_Bool xmlParse(PPOS *ppos)
static void handlePi(PPOS *ppos)
const XML_NODE * xmlNextNode(const XML_NODE *node, const char *name)
const XML_NODE * xmlPrevSibl(const XML_NODE *node)
static int mygetc(PPOS *ppos)
void xmlAppendChild(XML_NODE *parent, XML_NODE *child)
static XML_Bool doComment(PPOS *ppos)
XML_NODE * xmlNewNode(const char *name, int lineno)
const char * xmlGetName(const XML_NODE *node)
XML_ATTR * xmlNewAttr(const char *name, const char *value)
const XML_NODE * xmlLastChild(const XML_NODE *node)
static void xmlErrmsg(PPOS *ppos, const char *msg, XML_Bool msg_only, const char *file, int line)
static char * doCdata(PPOS *ppos)
const XML_NODE * xmlFindNode(const XML_NODE *node, const char *name)
const char * xmlGetAttrval(const XML_NODE *node, const char *name)
static int getsymbol(PPOS *ppos)
static XML_Bool popPstack(PPOS *ppos)
static void handleStarttag(PPOS *ppos)
static void procPcdata(PPOS *ppos)
static void handleDecl(PPOS *ppos)
enum parse_state_enum PSTATE
static int skipSpace(PPOS *ppos)
void xmlShowNode(const XML_NODE *root)
static void clearPstack(PPOS *ppos)
const char * xmlFindPcdata(const XML_NODE *node, const char *name)
const XML_NODE * xmlNextSibl(const XML_NODE *node)
static char * getName(PPOS *ppos)
static void xmlFreeAttr(XML_ATTR *attr)
static void handleEndtag(PPOS *ppos)
XML_NODE * xmlProcess(const char *filename)
const char * xmlGetData(const XML_NODE *node)
static XML_NODE * topPstack(const PPOS *ppos)
static void procInTag(PPOS *ppos)
static char * getAttrval(PPOS *ppos)
int xmlGetLine(const XML_NODE *node)
void xmlFreeNode(XML_NODE *node)
static void procBefore(PPOS *ppos)