int listen;
int closedElementType;
int globalAttrType;
- int compositeReadState;
int edgeinverted;
Dt_t *nameMap;
} userdata_t;
user->elements = (gv_stack_t){0};
user->closedElementType = TAG_NONE;
user->globalAttrType = TAG_NONE;
- user->compositeReadState = FALSE;
user->edgeinverted = FALSE;
user->gname = dfltname;
user->nameMap = dtopen(&nameDisc, Dtoset);
} else if (strcmp(name, "attr") == 0) {
char *name;
char *value;
- char *dynbuf = 0;
ud->closedElementType = TAG_NONE;
- if (ud->compositeReadState) {
- size_t len = sizeof(GRAPHML_COMP) + agxblen(&ud->xml_attr_name);
- name = dynbuf = gv_calloc(len, sizeof(char));
- (void)snprintf(name, len, "%s%s", GRAPHML_COMP, agxbuse(&ud->xml_attr_name));
- value = agxbuse(&ud->composite_buffer);
- agxbclear(&ud->xml_attr_value);
- ud->compositeReadState = FALSE;
- } else {
- name = agxbuse(&ud->xml_attr_name);
- value = agxbuse(&ud->xml_attr_value);
- }
+ name = agxbuse(&ud->xml_attr_name);
+ value = agxbuse(&ud->xml_attr_value);
switch (ud->globalAttrType) {
case TAG_NONE:
setGraphAttr(G, name, value, ud);
break;
}
- free(dynbuf);
ud->globalAttrType = TAG_NONE;
}
}
if (!ud->listen)
return;
- if (ud->compositeReadState) {
- agxbput_n(&ud->composite_buffer, s, length);
- return;
- }
-
agxbput_n(&ud->xml_attr_value, s, length);
}