[xml] ain't this redundand? (libxml2-2.4.3)
- From: Herbert Valerio Riedel <hvr hvrlab org>
- To: <xml gnome org>
- Subject: [xml] ain't this redundand? (libxml2-2.4.3)
- Date: Sun, 2 Sep 2001 18:13:04 +0200 (CEST)
...the directory handling code looks a bit strange/repeating... :-/
xmlParserCtxtPtr
xmlCreateFileParserCtxt(const char *filename)
{
char *directory = NULL;
...
if ((ctxt->directory == NULL) && (directory == NULL))
directory = xmlParserGetDirectory(filename);
if ((ctxt->directory == NULL) && (directory != NULL))
ctxt->directory = directory;
return(ctxt);
}
xmlDocPtr
xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename,
int recovery) {
...
ctxt = xmlCreateFileParserCtxt(filename);
...
if ((ctxt->directory == NULL) && (directory == NULL))
directory = xmlParserGetDirectory(filename);
if ((ctxt->directory == NULL) && (directory != NULL))
ctxt->directory = (char *) xmlStrdup((xmlChar *) directory);
...
xmlParseDocument(ctxt);
...
--
Herbert Valerio Riedel / Phone: (EUROPE) +43-1-58801-18840
Email: hvr kernel org / Finger hvr gnu org for GnuPG Public Key
GnuPG Key Fingerprint: 7BB9 2D6C D485 CE64 4748 5F65 4981 E064 883F 4142
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]