mirror of
https://github.com/GNOME/libxml2.git
synced 2025-03-31 19:10:28 +08:00
- xinclude.c: fixed a problem building on Mac
Daniel
This commit is contained in:
parent
21a0f91852
commit
edac3c9084
@ -1,3 +1,7 @@
|
||||
Mon Feb 26 03:34:43 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* xinclude.c: fixed a problem building on Mac
|
||||
|
||||
Sun Feb 25 21:52:30 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* parser.c: more work on increasing parsing ferformances
|
||||
|
18
xinclude.c
18
xinclude.c
@ -53,7 +53,7 @@
|
||||
/*
|
||||
* An XInclude context
|
||||
*/
|
||||
typedef xmlChar *URL;
|
||||
typedef xmlChar *xmlURL;
|
||||
typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
|
||||
typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
|
||||
struct _xmlXIncludeCtxt {
|
||||
@ -65,11 +65,11 @@ struct _xmlXIncludeCtxt {
|
||||
int docNr; /* number of parsed documents */
|
||||
int docMax; /* size of parsed documents tab */
|
||||
xmlDocPtr *docTab; /* array of parsed documents */
|
||||
URL *urlTab; /* array of parsed documents URLs */
|
||||
xmlURL *urlTab; /* array of parsed documents URLs */
|
||||
int txtNr; /* number of unparsed documents */
|
||||
int txtMax; /* size of unparsed documents tab */
|
||||
xmlNodePtr *txtTab; /* array of unparsed text nodes */
|
||||
URL *txturlTab; /* array of unparsed txtuments URLs */
|
||||
xmlURL *txturlTab; /* array of unparsed txtuments URLs */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -129,7 +129,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
|
||||
* Add a new document to the list
|
||||
*/
|
||||
void
|
||||
xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const URL url) {
|
||||
xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const xmlURL url) {
|
||||
if (ctxt->docMax == 0) {
|
||||
ctxt->docMax = 4;
|
||||
ctxt->docTab = (xmlDocPtr *) xmlMalloc(ctxt->docMax *
|
||||
@ -139,7 +139,7 @@ xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const URL url) {
|
||||
"malloc failed !\n");
|
||||
return;
|
||||
}
|
||||
ctxt->urlTab = (URL *) xmlMalloc(ctxt->docMax *
|
||||
ctxt->urlTab = (xmlURL *) xmlMalloc(ctxt->docMax *
|
||||
sizeof(ctxt->urlTab[0]));
|
||||
if (ctxt->urlTab == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
@ -156,7 +156,7 @@ xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const URL url) {
|
||||
"realloc failed !\n");
|
||||
return;
|
||||
}
|
||||
ctxt->urlTab = (URL *) xmlRealloc(ctxt->urlTab,
|
||||
ctxt->urlTab = (xmlURL *) xmlRealloc(ctxt->urlTab,
|
||||
ctxt->docMax * sizeof(ctxt->urlTab[0]));
|
||||
if (ctxt->urlTab == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
@ -178,7 +178,7 @@ xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const URL url) {
|
||||
* Add a new txtument to the list
|
||||
*/
|
||||
void
|
||||
xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const URL url) {
|
||||
xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) {
|
||||
if (ctxt->txtMax == 0) {
|
||||
ctxt->txtMax = 4;
|
||||
ctxt->txtTab = (xmlNodePtr *) xmlMalloc(ctxt->txtMax *
|
||||
@ -188,7 +188,7 @@ xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const URL url) {
|
||||
"malloc failed !\n");
|
||||
return;
|
||||
}
|
||||
ctxt->txturlTab = (URL *) xmlMalloc(ctxt->txtMax *
|
||||
ctxt->txturlTab = (xmlURL *) xmlMalloc(ctxt->txtMax *
|
||||
sizeof(ctxt->txturlTab[0]));
|
||||
if (ctxt->txturlTab == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
@ -205,7 +205,7 @@ xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const URL url) {
|
||||
"realloc failed !\n");
|
||||
return;
|
||||
}
|
||||
ctxt->txturlTab = (URL *) xmlRealloc(ctxt->txturlTab,
|
||||
ctxt->txturlTab = (xmlURL *) xmlRealloc(ctxt->txturlTab,
|
||||
ctxt->txtMax * sizeof(ctxt->urlTab[0]));
|
||||
if (ctxt->txturlTab == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
|
Loading…
x
Reference in New Issue
Block a user