[xml] Minor troubles compiling xinclude.c, again

Date view Thread view Subject view Author view

From: Oliver Eikemeier (eikemeier@gmx.de)
Date: Mon Feb 19 2001 - 14:49:37 EST


Hi Daniel,

here is a patch file to make the changes from 'typedef xmlChar *URL' to just
'xmlChar *', to cope with problems with the Apple-modified GCC. Would you
put it into the repository?

Thanks
    Oliver

*** /tmp/pbcvsdiff.428/1.3_xinclude.c 2000-11-12 16:56:55 +0100
--- /Users/eik/Development/libxml/xinclude.c 2001-02-19 20:40:25 +0100
***************
*** 53,60 ****
  /*
   * An XInclude context
   */
- typedef xmlChar *URL;
  typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
  typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
  struct _xmlXIncludeCtxt {
--- 53,59 ----
***************
*** 65,76 ****
      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 */
      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 */
  };
  
  /**
--- 64,75 ----
      int docNr; /* number of parsed documents */
      int docMax; /* size of parsed documents tab */
      xmlDocPtr *docTab; /* array of parsed documents */
! xmlChar **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 */
! xmlChar **txturlTab; /* array of unparsed txtuments URLs */
  };
  
  /**
***************
*** 129,136 ****
   * Add a new document to the list
   */
  void
! xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const URL url) {
      if (ctxt->docMax == 0) {
      ctxt->docMax = 4;
          ctxt->docTab = (xmlDocPtr *) xmlMalloc(ctxt->docMax *
--- 128,135 ----
   * Add a new document to the list
   */
  void
! xmlXIncludeAddDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const xmlChar
*url) {
      if (ctxt->docMax == 0) {
      ctxt->docMax = 4;
          ctxt->docTab = (xmlDocPtr *) xmlMalloc(ctxt->docMax *
***************
*** 139,146 ****
              "malloc failed !\n");
          return;
      }
! ctxt->urlTab = (URL *) xmlMalloc(ctxt->docMax *
                                    sizeof(ctxt->urlTab[0]));
          if (ctxt->urlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
--- 138,145 ----
              "malloc failed !\n");
          return;
      }
! ctxt->urlTab = (xmlChar **) xmlMalloc(ctxt->docMax *
                                    sizeof(ctxt->urlTab[0]));
          if (ctxt->urlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
***************
*** 156,163 ****
              "realloc failed !\n");
          return;
      }
! ctxt->urlTab = (URL *) xmlRealloc(ctxt->urlTab,
                   ctxt->docMax * sizeof(ctxt->urlTab[0]));
          if (ctxt->urlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
--- 155,162 ----
              "realloc failed !\n");
          return;
      }
! ctxt->urlTab = (xmlChar **) xmlRealloc(ctxt->urlTab,
                   ctxt->docMax * sizeof(ctxt->urlTab[0]));
          if (ctxt->urlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
***************
*** 178,185 ****
   * Add a new txtument to the list
   */
  void
! xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const URL url)
{
      if (ctxt->txtMax == 0) {
      ctxt->txtMax = 4;
          ctxt->txtTab = (xmlNodePtr *) xmlMalloc(ctxt->txtMax *
--- 177,184 ----
   * Add a new txtument to the list
   */
  void
! xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlChar
*url) {
      if (ctxt->txtMax == 0) {
      ctxt->txtMax = 4;
          ctxt->txtTab = (xmlNodePtr *) xmlMalloc(ctxt->txtMax *
***************
*** 188,195 ****
              "malloc failed !\n");
          return;
      }
! ctxt->txturlTab = (URL *) xmlMalloc(ctxt->txtMax *
                                    sizeof(ctxt->txturlTab[0]));
          if (ctxt->txturlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
--- 187,194 ----
              "malloc failed !\n");
          return;
      }
! ctxt->txturlTab = (xmlChar **) xmlMalloc(ctxt->txtMax *
                                    sizeof(ctxt->txturlTab[0]));
          if (ctxt->txturlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
***************
*** 205,212 ****
              "realloc failed !\n");
          return;
      }
! ctxt->txturlTab = (URL *) xmlRealloc(ctxt->txturlTab,
                   ctxt->txtMax * sizeof(ctxt->urlTab[0]));
          if (ctxt->txturlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,
--- 204,211 ----
              "realloc failed !\n");
          return;
      }
! ctxt->txturlTab = (xmlChar **) xmlRealloc(ctxt->txturlTab,
                   ctxt->txtMax * sizeof(ctxt->urlTab[0]));
          if (ctxt->txturlTab == NULL) {
          xmlGenericError(xmlGenericErrorContext,

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Feb 19 2001 - 18:43:32 EST