ReactOS  0.4.14-dev-49-gfb4591c
buf.h File Reference
#include <libxml/tree.h>
Include dependency graph for buf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

xmlBufPtr xmlBufCreate (void)
 
xmlBufPtr xmlBufCreateSize (size_t size)
 
xmlBufPtr xmlBufCreateStatic (void *mem, size_t size)
 
int xmlBufSetAllocationScheme (xmlBufPtr buf, xmlBufferAllocationScheme scheme)
 
int xmlBufGetAllocationScheme (xmlBufPtr buf)
 
void xmlBufFree (xmlBufPtr buf)
 
void xmlBufEmpty (xmlBufPtr buf)
 
int xmlBufGrow (xmlBufPtr buf, int len)
 
int xmlBufInflate (xmlBufPtr buf, size_t len)
 
int xmlBufResize (xmlBufPtr buf, size_t len)
 
int xmlBufAdd (xmlBufPtr buf, const xmlChar *str, int len)
 
int xmlBufAddHead (xmlBufPtr buf, const xmlChar *str, int len)
 
int xmlBufCat (xmlBufPtr buf, const xmlChar *str)
 
int xmlBufCCat (xmlBufPtr buf, const char *str)
 
int xmlBufWriteCHAR (xmlBufPtr buf, const xmlChar *string)
 
int xmlBufWriteChar (xmlBufPtr buf, const char *string)
 
int xmlBufWriteQuotedString (xmlBufPtr buf, const xmlChar *string)
 
size_t xmlBufAvail (const xmlBufPtr buf)
 
size_t xmlBufLength (const xmlBufPtr buf)
 
int xmlBufIsEmpty (const xmlBufPtr buf)
 
int xmlBufAddLen (xmlBufPtr buf, size_t len)
 
int xmlBufErase (xmlBufPtr buf, size_t len)
 
xmlCharxmlBufDetach (xmlBufPtr buf)
 
size_t xmlBufDump (FILE *file, xmlBufPtr buf)
 
xmlBufPtr xmlBufFromBuffer (xmlBufferPtr buffer)
 
xmlBufferPtr xmlBufBackToBuffer (xmlBufPtr buf)
 
int xmlBufMergeBuffer (xmlBufPtr buf, xmlBufferPtr buffer)
 
int xmlBufResetInput (xmlBufPtr buf, xmlParserInputPtr input)
 
size_t xmlBufGetInputBase (xmlBufPtr buf, xmlParserInputPtr input)
 
int xmlBufSetInputBaseCur (xmlBufPtr buf, xmlParserInputPtr input, size_t base, size_t cur)
 

Function Documentation

◆ xmlBufAdd()

int xmlBufAdd ( xmlBufPtr  buf,
const xmlChar str,
int  len 
)

xmlBufAdd: @buf: the buffer to dump @str: the xmlChar string @len: the number of xmlChar to add

Add a string range to an XML buffer. if len == -1, the length of str is recomputed.

Returns 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 868 of file buf.c.

868  {
869  unsigned int needSize;
870 
871  if ((str == NULL) || (buf == NULL) || (buf->error))
872  return -1;
874 
875  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
876  if (len < -1) {
877 #ifdef DEBUG_BUFFER
879  "xmlBufAdd: len < 0\n");
880 #endif
881  return -1;
882  }
883  if (len == 0) return 0;
884 
885  if (len < 0)
886  len = xmlStrlen(str);
887 
888  if (len < 0) return -1;
889  if (len == 0) return 0;
890 
891  needSize = buf->use + len + 2;
892  if (needSize > buf->size){
893  if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
894  /*
895  * Used to provide parsing limits
896  */
897  if (needSize >= XML_MAX_TEXT_LENGTH) {
898  xmlBufMemoryError(buf, "buffer error: text too long\n");
899  return(-1);
900  }
901  }
902  if (!xmlBufResize(buf, needSize)){
903  xmlBufMemoryError(buf, "growing buffer");
904  return XML_ERR_NO_MEMORY;
905  }
906  }
907 
908  memmove(&buf->content[buf->use], str, len*sizeof(xmlChar));
909  buf->use += len;
910  buf->content[buf->use] = 0;
912  return 0;
913 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
Definition: xmlstring.c:422
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define XML_MAX_TEXT_LENGTH
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
unsigned char xmlChar
Definition: xmlstring.h:28
GLenum GLsizei len
Definition: glext.h:6722
int xmlBufResize(xmlBufPtr buf, size_t size)
Definition: buf.c:745
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362

Referenced by xmlBufCat(), xmlBufMergeBuffer(), and xmlBufWriteQuotedString().

◆ xmlBufAddHead()

int xmlBufAddHead ( xmlBufPtr  buf,
const xmlChar str,
int  len 
)

xmlBufAddHead: @buf: the buffer @str: the xmlChar string @len: the number of xmlChar to add

Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.

Returns 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 928 of file buf.c.

928  {
929  unsigned int needSize;
930 
931  if ((buf == NULL) || (buf->error))
932  return(-1);
934  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
935  if (str == NULL) {
936 #ifdef DEBUG_BUFFER
938  "xmlBufAddHead: str == NULL\n");
939 #endif
940  return -1;
941  }
942  if (len < -1) {
943 #ifdef DEBUG_BUFFER
945  "xmlBufAddHead: len < 0\n");
946 #endif
947  return -1;
948  }
949  if (len == 0) return 0;
950 
951  if (len < 0)
952  len = xmlStrlen(str);
953 
954  if (len <= 0) return -1;
955 
956  if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
957  size_t start_buf = buf->content - buf->contentIO;
958 
959  if (start_buf > (unsigned int) len) {
960  /*
961  * We can add it in the space previously shrinked
962  */
963  buf->content -= len;
964  memmove(&buf->content[0], str, len);
965  buf->use += len;
966  buf->size += len;
968  return(0);
969  }
970  }
971  needSize = buf->use + len + 2;
972  if (needSize > buf->size){
973  if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
974  /*
975  * Used to provide parsing limits
976  */
977  if (needSize >= XML_MAX_TEXT_LENGTH) {
978  xmlBufMemoryError(buf, "buffer error: text too long\n");
979  return(-1);
980  }
981  }
982  if (!xmlBufResize(buf, needSize)){
983  xmlBufMemoryError(buf, "growing buffer");
984  return XML_ERR_NO_MEMORY;
985  }
986  }
987 
988  memmove(&buf->content[len], &buf->content[0], buf->use);
989  memmove(&buf->content[0], str, len);
990  buf->use += len;
991  buf->content[buf->use] = 0;
993  return 0;
994 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
Definition: xmlstring.c:422
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define XML_MAX_TEXT_LENGTH
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722
int xmlBufResize(xmlBufPtr buf, size_t size)
Definition: buf.c:745
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362

◆ xmlBufAddLen()

int xmlBufAddLen ( xmlBufPtr  buf,
size_t  len 
)

xmlBufAddLen: @buf: the buffer @len: the size which were added at the end

Sometime data may be added at the end of the buffer without using the xmlBuf APIs that is used to expand the used space and set the zero terminating at the end of the buffer

Returns -1 in case of error and 0 otherwise

Definition at line 621 of file buf.c.

621  {
622  if ((buf == NULL) || (buf->error))
623  return(-1);
625  if (len > (buf->size - buf->use))
626  return(-1);
627  buf->use += len;
629  if (buf->size > buf->use)
630  buf->content[buf->use] = 0;
631  else
632  return(-1);
633  return(0);
634 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722

Referenced by xmlCharEncFirstLineInput(), and xmlCharEncInput().

◆ xmlBufAvail()

size_t xmlBufAvail ( const xmlBufPtr  buf)

xmlBufAvail: @buf: the buffer

Function to find how much free space is allocated but not used in the buffer. It does not account for the terminating zero usually needed

Returns the amount or 0 if none or an error occurred

Definition at line 708 of file buf.c.

709 {
710  if ((!buf) || (buf->error))
711  return 0;
713 
714  return(buf->size - buf->use);
715 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71

Referenced by xmlCharEncFirstLineInput(), and xmlCharEncInput().

◆ xmlBufBackToBuffer()

xmlBufferPtr xmlBufBackToBuffer ( xmlBufPtr  buf)

xmlBufBackToBuffer: @buf: new buffer wrapping the old one

Function to be called once internal processing had been done to update back the buffer provided by the user. This can lead to a failure in case the size accumulated in the xmlBuf is larger than what an xmlBuffer can support on 64 bits (INT_MAX) The xmlBufPtr @buf wrapper is deallocated by this call in any case.

Returns the old xmlBufferPtr unless the call failed and NULL is returned

Definition at line 1204 of file buf.c.

1204  {
1205  xmlBufferPtr ret;
1206 
1207  if ((buf == NULL) || (buf->error))
1208  return(NULL);
1209  CHECK_COMPAT(buf)
1210  if (buf->buffer == NULL) {
1211  xmlBufFree(buf);
1212  return(NULL);
1213  }
1214 
1215  ret = buf->buffer;
1216  /*
1217  * What to do in case of error in the buffer ???
1218  */
1219  if (buf->use > INT_MAX) {
1220  /*
1221  * Worse case, we really allocated and used more than the
1222  * maximum allowed memory for an xmlBuffer on this architecture.
1223  * Keep the buffer but provide a truncated size value.
1224  */
1225  xmlBufOverflowError(buf, "Used size too big for xmlBuffer");
1226  ret->use = INT_MAX;
1227  ret->size = INT_MAX;
1228  } else if (buf->size > INT_MAX) {
1229  /*
1230  * milder case, we allocated more than the maximum allowed memory
1231  * for an xmlBuffer on this architecture, but used less than the
1232  * limit.
1233  * Keep the buffer but provide a truncated size value.
1234  */
1235  xmlBufOverflowError(buf, "Allocated size too big for xmlBuffer");
1236  ret->size = INT_MAX;
1237  }
1238  ret->use = (int) buf->use;
1239  ret->size = (int) buf->size;
1240  ret->alloc = buf->alloc;
1241  ret->content = buf->content;
1242  ret->contentIO = buf->contentIO;
1243  xmlFree(buf);
1244  return(ret);
1245 }
#define INT_MAX
Definition: limits.h:40
static void xmlBufOverflowError(xmlBufPtr buf, const char *extra)
Definition: buf.c:107
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
smooth NULL
Definition: ftsmooth.c:416
void xmlBufFree(xmlBufPtr buf)
Definition: buf.c:329
XMLPUBVAR xmlFreeFunc xmlFree
Definition: globals.h:250
int ret
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ xmlBufCat()

int xmlBufCat ( xmlBufPtr  buf,
const xmlChar str 
)

xmlBufCat: @buf: the buffer to add to @str: the xmlChar string

Append a zero terminated string to an XML buffer.

Returns 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 1007 of file buf.c.

1007  {
1008  if ((buf == NULL) || (buf->error))
1009  return(-1);
1010  CHECK_COMPAT(buf)
1011  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
1012  if (str == NULL) return -1;
1013  return xmlBufAdd(buf, str, -1);
1014 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len)
Definition: buf.c:868

Referenced by xmlBufWriteCHAR(), and xmlBufWriteQuotedString().

◆ xmlBufCCat()

int xmlBufCCat ( xmlBufPtr  buf,
const char str 
)

xmlBufCCat: @buf: the buffer to dump @str: the C char string

Append a zero terminated C string to an XML buffer.

Returns 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 1027 of file buf.c.

1027  {
1028  const char *cur;
1029 
1030  if ((buf == NULL) || (buf->error))
1031  return(-1);
1032  CHECK_COMPAT(buf)
1033  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
1034  if (str == NULL) {
1035 #ifdef DEBUG_BUFFER
1037  "xmlBufCCat: str == NULL\n");
1038 #endif
1039  return -1;
1040  }
1041  for (cur = str;*cur != 0;cur++) {
1042  if (buf->use + 10 >= buf->size) {
1043  if (!xmlBufResize(buf, buf->use+10)){
1044  xmlBufMemoryError(buf, "growing buffer");
1045  return XML_ERR_NO_MEMORY;
1046  }
1047  }
1048  buf->content[buf->use++] = *cur;
1049  }
1050  buf->content[buf->use] = 0;
1052  return 0;
1053 }
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
int xmlBufResize(xmlBufPtr buf, size_t size)
Definition: buf.c:745
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362

Referenced by xmlBufWriteChar(), and xmlBufWriteQuotedString().

◆ xmlBufCreate()

xmlBufPtr xmlBufCreate ( void  )

xmlBufCreate:

routine to create an XML buffer. returns the new structure.

Definition at line 122 of file buf.c.

122  {
123  xmlBufPtr ret;
124 
125  ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
126  if (ret == NULL) {
127  xmlBufMemoryError(NULL, "creating buffer");
128  return(NULL);
129  }
130  ret->compat_use = 0;
131  ret->use = 0;
132  ret->error = 0;
133  ret->buffer = NULL;
134  ret->size = xmlDefaultBufferSize;
135  ret->compat_size = xmlDefaultBufferSize;
136  ret->alloc = xmlBufferAllocScheme;
137  ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
138  if (ret->content == NULL) {
139  xmlBufMemoryError(ret, "creating buffer");
140  xmlFree(ret);
141  return(NULL);
142  }
143  ret->content[0] = 0;
144  ret->contentIO = NULL;
145  return(ret);
146 }
XMLPUBVAR xmlMallocFunc xmlMallocAtomic
Definition: globals.h:248
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
Definition: buf.c:43
smooth NULL
Definition: ftsmooth.c:416
xmlBuf * xmlBufPtr
Definition: tree.h:114
XMLPUBVAR xmlFreeFunc xmlFree
Definition: globals.h:250
int ret
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBVAR xmlMallocFunc xmlMalloc
Definition: globals.h:247
XMLPUBVAR int xmlDefaultBufferSize
Definition: globals.h:312
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme
Definition: globals.h:302

Referenced by xmlSwitchInputEncodingInt().

◆ xmlBufCreateSize()

xmlBufPtr xmlBufCreateSize ( size_t  size)

xmlBufCreateSize: @size: initial size of buffer

routine to create an XML buffer. returns the new structure.

Definition at line 156 of file buf.c.

156  {
157  xmlBufPtr ret;
158 
159  ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
160  if (ret == NULL) {
161  xmlBufMemoryError(NULL, "creating buffer");
162  return(NULL);
163  }
164  ret->compat_use = 0;
165  ret->use = 0;
166  ret->error = 0;
167  ret->buffer = NULL;
168  ret->alloc = xmlBufferAllocScheme;
169  ret->size = (size ? size+2 : 0); /* +1 for ending null */
170  ret->compat_size = (int) ret->size;
171  if (ret->size){
172  ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
173  if (ret->content == NULL) {
174  xmlBufMemoryError(ret, "creating buffer");
175  xmlFree(ret);
176  return(NULL);
177  }
178  ret->content[0] = 0;
179  } else
180  ret->content = NULL;
181  ret->contentIO = NULL;
182  return(ret);
183 }
XMLPUBVAR xmlMallocFunc xmlMallocAtomic
Definition: globals.h:248
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
Definition: buf.c:43
smooth NULL
Definition: ftsmooth.c:416
xmlBuf * xmlBufPtr
Definition: tree.h:114
GLsizeiptr size
Definition: glext.h:5919
if(!(yy_init))
Definition: macro.lex.yy.c:714
XMLPUBVAR xmlFreeFunc xmlFree
Definition: globals.h:250
int ret
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBVAR xmlMallocFunc xmlMalloc
Definition: globals.h:247
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme
Definition: globals.h:302
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ xmlBufCreateStatic()

xmlBufPtr xmlBufCreateStatic ( void mem,
size_t  size 
)

xmlBufCreateStatic: @mem: the memory area @size: the size in byte

routine to create an XML buffer from an immutable memory area. The area won't be modified nor copied, and is expected to be present until the end of the buffer lifetime.

returns the new structure.

Definition at line 231 of file buf.c.

231  {
232  xmlBufPtr ret;
233 
234  if (mem == NULL)
235  return(NULL);
236 
237  ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
238  if (ret == NULL) {
239  xmlBufMemoryError(NULL, "creating buffer");
240  return(NULL);
241  }
242  if (size < INT_MAX) {
243  ret->compat_use = size;
244  ret->compat_size = size;
245  } else {
246  ret->compat_use = INT_MAX;
247  ret->compat_size = INT_MAX;
248  }
249  ret->use = size;
250  ret->size = size;
252  ret->content = (xmlChar *) mem;
253  ret->error = 0;
254  ret->buffer = NULL;
255  return(ret);
256 }
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
#define INT_MAX
Definition: limits.h:40
Definition: buf.c:43
smooth NULL
Definition: ftsmooth.c:416
xmlBuf * xmlBufPtr
Definition: tree.h:114
GLsizeiptr size
Definition: glext.h:5919
int ret
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBVAR xmlMallocFunc xmlMalloc
Definition: globals.h:247
Definition: mem.c:156

◆ xmlBufDetach()

xmlChar* xmlBufDetach ( xmlBufPtr  buf)

xmlBufDetach: @buf: the buffer

Remove the string contained in a buffer and give it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.

Returns the previous string contained by the buffer.

Definition at line 196 of file buf.c.

196  {
197  xmlChar *ret;
198 
199  if (buf == NULL)
200  return(NULL);
201  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
202  return(NULL);
203  if (buf->buffer != NULL)
204  return(NULL);
205  if (buf->error)
206  return(NULL);
207 
208  ret = buf->content;
209  buf->content = NULL;
210  buf->size = 0;
211  buf->use = 0;
212  buf->compat_use = 0;
213  buf->compat_size = 0;
214 
215  return ret;
216 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
smooth NULL
Definition: ftsmooth.c:416
int ret
unsigned char xmlChar
Definition: xmlstring.h:28

◆ xmlBufDump()

size_t xmlBufDump ( FILE file,
xmlBufPtr  buf 
)

Definition at line 548 of file buf.c.

548  {
549  size_t ret;
550 
551  if ((buf == NULL) || (buf->error != 0)) {
552 #ifdef DEBUG_BUFFER
554  "xmlBufDump: buf == NULL or in error\n");
555 #endif
556  return(0);
557  }
558  if (buf->content == NULL) {
559 #ifdef DEBUG_BUFFER
561  "xmlBufDump: buf->content == NULL\n");
562 #endif
563  return(0);
564  }
566  if (file == NULL)
567  file = stdout;
568  ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file);
569  return(ret);
570 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
FILE * stdout
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
smooth NULL
Definition: ftsmooth.c:416
int ret
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362
Definition: fci.c:126

◆ xmlBufEmpty()

void xmlBufEmpty ( xmlBufPtr  buf)

xmlBufEmpty: @buf: the buffer

empty a buffer.

Definition at line 355 of file buf.c.

355  {
356  if ((buf == NULL) || (buf->error != 0)) return;
357  if (buf->content == NULL) return;
359  buf->use = 0;
360  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
361  buf->content = BAD_CAST "";
362  } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
363  (buf->contentIO != NULL)) {
364  size_t start_buf = buf->content - buf->contentIO;
365 
366  buf->size += start_buf;
367  buf->content = buf->contentIO;
368  buf->content[0] = 0;
369  } else {
370  buf->content[0] = 0;
371  }
373 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
smooth NULL
Definition: ftsmooth.c:416
#define BAD_CAST
Definition: xmlstring.h:35

◆ xmlBufErase()

int xmlBufErase ( xmlBufPtr  buf,
size_t  len 
)

xmlBufErase: @buf: the buffer @len: the size to erase at the end

Sometime data need to be erased at the end of the buffer

Returns -1 in case of error and 0 otherwise

Definition at line 646 of file buf.c.

646  {
647  if ((buf == NULL) || (buf->error))
648  return(-1);
650  if (len > buf->use)
651  return(-1);
652  buf->use -= len;
653  buf->content[buf->use] = 0;
655  return(0);
656 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722

◆ xmlBufFree()

void xmlBufFree ( xmlBufPtr  buf)

xmlBufFree: @buf: the buffer to free

Frees an XML buffer. It frees both the content and the structure which encapsulate it.

Definition at line 329 of file buf.c.

329  {
330  if (buf == NULL) {
331 #ifdef DEBUG_BUFFER
333  "xmlBufFree: buf == NULL\n");
334 #endif
335  return;
336  }
337 
338  if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
339  (buf->contentIO != NULL)) {
340  xmlFree(buf->contentIO);
341  } else if ((buf->content != NULL) &&
342  (buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
343  xmlFree(buf->content);
344  }
345  xmlFree(buf);
346 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
smooth NULL
Definition: ftsmooth.c:416
XMLPUBVAR xmlFreeFunc xmlFree
Definition: globals.h:250
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362

Referenced by xmlBufBackToBuffer().

◆ xmlBufFromBuffer()

xmlBufPtr xmlBufFromBuffer ( xmlBufferPtr  buffer)

xmlBufFromBuffer: @buffer: incoming old buffer to convert to a new one

Helper routine to switch from the old buffer structures in use in various APIs. It creates a wrapper xmlBufPtr which will be used for internal processing until the xmlBufBackToBuffer() is issued.

Returns a new xmlBufPtr unless the call failed and NULL is returned

Definition at line 1167 of file buf.c.

1167  {
1168  xmlBufPtr ret;
1169 
1170  if (buffer == NULL)
1171  return(NULL);
1172 
1173  ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
1174  if (ret == NULL) {
1175  xmlBufMemoryError(NULL, "creating buffer");
1176  return(NULL);
1177  }
1178  ret->use = buffer->use;
1179  ret->size = buffer->size;
1180  ret->compat_use = buffer->use;
1181  ret->compat_size = buffer->size;
1182  ret->error = 0;
1183  ret->buffer = buffer;
1184  ret->alloc = buffer->alloc;
1185  ret->content = buffer->content;
1186  ret->contentIO = buffer->contentIO;
1187 
1188  return(ret);
1189 }
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
GLuint buffer
Definition: glext.h:5915
Definition: buf.c:43
smooth NULL
Definition: ftsmooth.c:416
xmlBuf * xmlBufPtr
Definition: tree.h:114
int ret
XMLPUBVAR xmlMallocFunc xmlMalloc
Definition: globals.h:247

◆ xmlBufGetAllocationScheme()

int xmlBufGetAllocationScheme ( xmlBufPtr  buf)

xmlBufGetAllocationScheme: @buf: the buffer

Get the buffer allocation scheme

Returns the scheme or -1 in case of error

Definition at line 267 of file buf.c.

267  {
268  if (buf == NULL) {
269 #ifdef DEBUG_BUFFER
271  "xmlBufGetAllocationScheme: buf == NULL\n");
272 #endif
273  return(-1);
274  }
275  return(buf->alloc);
276 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
smooth NULL
Definition: ftsmooth.c:416
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362

◆ xmlBufGetInputBase()

size_t xmlBufGetInputBase ( xmlBufPtr  buf,
xmlParserInputPtr  input 
)

xmlBufGetInputBase: @buf: an xmlBufPtr @input: an xmlParserInputPtr

Get the base of the @input relative to the beginning of the buffer

Returns the size_t corresponding to the displacement

Definition at line 1302 of file buf.c.

1302  {
1303  size_t base;
1304 
1305  if ((input == NULL) || (buf == NULL) || (buf->error))
1306  return(-1);
1307  CHECK_COMPAT(buf)
1308  base = input->base - buf->content;
1309  /*
1310  * We could do some pointer arythmetic checks but that's probably
1311  * sufficient.
1312  */
1313  if (base > buf->size) {
1314  xmlBufOverflowError(buf, "Input reference outside of the buffer");
1315  base = 0;
1316  }
1317  return(base);
1318 }
static void xmlBufOverflowError(xmlBufPtr buf, const char *extra)
Definition: buf.c:107
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
GLuint base
Definition: 3dtext.c:35
smooth NULL
Definition: ftsmooth.c:416
GLenum GLenum GLenum input
Definition: glext.h:9031

Referenced by xmlCtxtResetPush().

◆ xmlBufGrow()

int xmlBufGrow ( xmlBufPtr  buf,
int  len 
)

xmlBufGrow: @buf: the buffer @len: the minimum free size to allocate

Grow the available space of an XML buffer, @len is the target value This is been kept compatible with xmlBufferGrow() as much as possible

Returns -1 in case of error or the length made available otherwise

Definition at line 509 of file buf.c.

509  {
510  size_t ret;
511 
512  if ((buf == NULL) || (len < 0)) return(-1);
513  if (len == 0)
514  return(0);
516  if (buf->error != 0)
517  return(-1);
518  return((int) ret);
519 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
smooth NULL
Definition: ftsmooth.c:416
int ret
GLenum GLsizei len
Definition: glext.h:6722
static size_t xmlBufGrowInternal(xmlBufPtr buf, size_t len)
Definition: buf.c:437

Referenced by xmlCharEncFirstLineInput(), and xmlCharEncInput().

◆ xmlBufInflate()

int xmlBufInflate ( xmlBufPtr  buf,
size_t  len 
)

xmlBufInflate: @buf: the buffer @len: the minimum extra free size to allocate

Grow the available space of an XML buffer, adding at least @len bytes

Returns 0 if successful or -1 in case of error

Definition at line 531 of file buf.c.

531  {
532  if (buf == NULL) return(-1);
533  xmlBufGrowInternal(buf, len + buf->size);
534  if (buf->error)
535  return(-1);
536  return(0);
537 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
smooth NULL
Definition: ftsmooth.c:416
GLenum GLsizei len
Definition: glext.h:6722
static size_t xmlBufGrowInternal(xmlBufPtr buf, size_t len)
Definition: buf.c:437

◆ xmlBufIsEmpty()

int xmlBufIsEmpty ( const xmlBufPtr  buf)

xmlBufIsEmpty: @buf: the buffer

Tell if a buffer is empty

Returns 0 if no, 1 if yes and -1 in case of error

Definition at line 726 of file buf.c.

727 {
728  if ((!buf) || (buf->error))
729  return(-1);
731 
732  return(buf->use == 0);
733 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71

Referenced by xmlSwitchInputEncodingInt().

◆ xmlBufLength()

size_t xmlBufLength ( const xmlBufPtr  buf)

xmlBufLength: @buf: the buffer

Function to get the length of a buffer

Returns the length of data in the internal content

Definition at line 668 of file buf.c.

669 {
670  if ((!buf) || (buf->error))
671  return 0;
673 
674  return(buf->use);
675 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71

◆ xmlBufMergeBuffer()

int xmlBufMergeBuffer ( xmlBufPtr  buf,
xmlBufferPtr  buffer 
)

xmlBufMergeBuffer: @buf: an xmlBufPtr @buffer: the buffer to consume into @buf

The content of @buffer is appended to @buf and @buffer is freed

Returns -1 in case of error, 0 otherwise, in any case @buffer is freed

Definition at line 1257 of file buf.c.

1257  {
1258  int ret = 0;
1259 
1260  if ((buf == NULL) || (buf->error)) {
1262  return(-1);
1263  }
1264  CHECK_COMPAT(buf)
1265  if ((buffer != NULL) && (buffer->content != NULL) &&
1266  (buffer->use > 0)) {
1267  ret = xmlBufAdd(buf, buffer->content, buffer->use);
1268  }
1270  return(ret);
1271 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
XMLPUBFUN void XMLCALL xmlBufferFree(xmlBufferPtr buf)
#define CHECK_COMPAT(buf)
Definition: buf.c:71
GLuint buffer
Definition: glext.h:5915
smooth NULL
Definition: ftsmooth.c:416
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len)
Definition: buf.c:868
int ret

◆ xmlBufResetInput()

int xmlBufResetInput ( xmlBufPtr  buf,
xmlParserInputPtr  input 
)

xmlBufResetInput: @buf: an xmlBufPtr @input: an xmlParserInputPtr

Update the input to use the current set of pointers from the buffer.

Returns -1 in case of error, 0 otherwise

Definition at line 1283 of file buf.c.

1283  {
1284  if ((input == NULL) || (buf == NULL) || (buf->error))
1285  return(-1);
1286  CHECK_COMPAT(buf)
1287  input->base = input->cur = buf->content;
1288  input->end = &buf->content[buf->use];
1289  return(0);
1290 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
smooth NULL
Definition: ftsmooth.c:416
GLenum GLenum GLenum input
Definition: glext.h:9031

Referenced by xmlCreateMemoryParserCtxt(), xmlCtxtResetPush(), xmlNewInputFromFile(), xmlNewIOInputStream(), and xmlSwitchInputEncodingInt().

◆ xmlBufResize()

int xmlBufResize ( xmlBufPtr  buf,
size_t  size 
)

xmlBufResize: @buf: the buffer to resize @size: the desired size

Resize a buffer to accommodate minimum size of @size.

Returns 0 in case of problems, 1 otherwise

Definition at line 745 of file buf.c.

746 {
747  unsigned int newSize;
748  xmlChar* rebuf = NULL;
749  size_t start_buf;
750 
751  if ((buf == NULL) || (buf->error))
752  return(0);
754 
755  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
756  if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
757  /*
758  * Used to provide parsing limits
759  */
760  if (size >= XML_MAX_TEXT_LENGTH) {
761  xmlBufMemoryError(buf, "buffer error: text too long\n");
762  return(0);
763  }
764  }
765 
766  /* Don't resize if we don't have to */
767  if (size < buf->size)
768  return 1;
769 
770  /* figure out new size */
771  switch (buf->alloc){
772  case XML_BUFFER_ALLOC_IO:
774  /*take care of empty case*/
775  newSize = (buf->size ? buf->size*2 : size + 10);
776  while (size > newSize) {
777  if (newSize > UINT_MAX / 2) {
778  xmlBufMemoryError(buf, "growing buffer");
779  return 0;
780  }
781  newSize *= 2;
782  }
783  break;
785  newSize = size+10;
786  break;
788  if (buf->use < BASE_BUFFER_SIZE)
789  newSize = size;
790  else {
791  newSize = buf->size * 2;
792  while (size > newSize) {
793  if (newSize > UINT_MAX / 2) {
794  xmlBufMemoryError(buf, "growing buffer");
795  return 0;
796  }
797  newSize *= 2;
798  }
799  }
800  break;
801 
802  default:
803  newSize = size+10;
804  break;
805  }
806 
807  if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
808  start_buf = buf->content - buf->contentIO;
809 
810  if (start_buf > newSize) {
811  /* move data back to start */
812  memmove(buf->contentIO, buf->content, buf->use);
813  buf->content = buf->contentIO;
814  buf->content[buf->use] = 0;
815  buf->size += start_buf;
816  } else {
817  rebuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + newSize);
818  if (rebuf == NULL) {
819  xmlBufMemoryError(buf, "growing buffer");
820  return 0;
821  }
822  buf->contentIO = rebuf;
823  buf->content = rebuf + start_buf;
824  }
825  } else {
826  if (buf->content == NULL) {
827  rebuf = (xmlChar *) xmlMallocAtomic(newSize);
828  } else if (buf->size - buf->use < 100) {
829  rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
830  } else {
831  /*
832  * if we are reallocating a buffer far from being full, it's
833  * better to make a new allocation and copy only the used range
834  * and free the old one.
835  */
836  rebuf = (xmlChar *) xmlMallocAtomic(newSize);
837  if (rebuf != NULL) {
838  memcpy(rebuf, buf->content, buf->use);
839  xmlFree(buf->content);
840  rebuf[buf->use] = 0;
841  }
842  }
843  if (rebuf == NULL) {
844  xmlBufMemoryError(buf, "growing buffer");
845  return 0;
846  }
847  buf->content = rebuf;
848  }
849  buf->size = newSize;
851 
852  return 1;
853 }
XMLPUBVAR xmlMallocFunc xmlMallocAtomic
Definition: globals.h:248
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
static void xmlBufMemoryError(xmlBufPtr buf, const char *extra)
Definition: buf.c:92
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
#define XML_MAX_TEXT_LENGTH
#define UPDATE_COMPAT(buf)
Definition: buf.c:60
smooth NULL
Definition: ftsmooth.c:416
XMLPUBVAR xmlReallocFunc xmlRealloc
Definition: globals.h:249
GLsizeiptr size
Definition: glext.h:5919
XMLPUBVAR xmlFreeFunc xmlFree
Definition: globals.h:250
unsigned char xmlChar
Definition: xmlstring.h:28
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define UINT_MAX
Definition: limits.h:41
#define BASE_BUFFER_SIZE
Definition: tree.h:56

Referenced by xmlBufAdd(), xmlBufAddHead(), and xmlBufCCat().

◆ xmlBufSetAllocationScheme()

int xmlBufSetAllocationScheme ( xmlBufPtr  buf,
xmlBufferAllocationScheme  scheme 
)

xmlBufSetAllocationScheme: @buf: the buffer to tune @scheme: allocation scheme to use

Sets the allocation scheme for this buffer

returns 0 in case of success and -1 in case of failure

Definition at line 288 of file buf.c.

289  {
290  if ((buf == NULL) || (buf->error != 0)) {
291 #ifdef DEBUG_BUFFER
293  "xmlBufSetAllocationScheme: buf == NULL or in error\n");
294 #endif
295  return(-1);
296  }
297  if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
298  (buf->alloc == XML_BUFFER_ALLOC_IO))
299  return(-1);
305  buf->alloc = scheme;
306  if (buf->buffer)
307  buf->buffer->alloc = scheme;
308  return(0);
309  }
310  /*
311  * Switching a buffer ALLOC_IO has the side effect of initializing
312  * the contentIO field with the current content
313  */
314  if (scheme == XML_BUFFER_ALLOC_IO) {
315  buf->alloc = XML_BUFFER_ALLOC_IO;
316  buf->contentIO = buf->content;
317  }
318  return(-1);
319 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
DWORD scheme
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
smooth NULL
Definition: ftsmooth.c:416
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362

◆ xmlBufSetInputBaseCur()

int xmlBufSetInputBaseCur ( xmlBufPtr  buf,
xmlParserInputPtr  input,
size_t  base,
size_t  cur 
)

xmlBufSetInputBaseCur: @buf: an xmlBufPtr @input: an xmlParserInputPtr @base: the base value relative to the beginning of the buffer @cur: the cur value relative to the beginning of the buffer

Update the input to use the base and cur relative to the buffer after a possible reallocation of its content

Returns -1 in case of error, 0 otherwise

Definition at line 1333 of file buf.c.

1334  {
1335  if ((input == NULL) || (buf == NULL) || (buf->error))
1336  return(-1);
1337  CHECK_COMPAT(buf)
1338  input->base = &buf->content[base];
1339  input->cur = input->base + cur;
1340  input->end = &buf->content[buf->use];
1341  return(0);
1342 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CHECK_COMPAT(buf)
Definition: buf.c:71
GLuint base
Definition: 3dtext.c:35
smooth NULL
Definition: ftsmooth.c:416
GLenum GLenum GLenum input
Definition: glext.h:9031

Referenced by xmlCtxtResetPush().

◆ xmlBufWriteCHAR()

int xmlBufWriteCHAR ( xmlBufPtr  buf,
const xmlChar string 
)

xmlBufWriteCHAR: @buf: the XML buffer @string: the string to add

routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.

Returns 0 if successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 1067 of file buf.c.

1067  {
1068  if ((buf == NULL) || (buf->error))
1069  return(-1);
1070  CHECK_COMPAT(buf)
1071  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
1072  return(-1);
1073  return(xmlBufCat(buf, string));
1074 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
int xmlBufCat(xmlBufPtr buf, const xmlChar *str)
Definition: buf.c:1007
#define CHECK_COMPAT(buf)
Definition: buf.c:71
smooth NULL
Definition: ftsmooth.c:416

◆ xmlBufWriteChar()

int xmlBufWriteChar ( xmlBufPtr  buf,
const char string 
)

xmlBufWriteChar: @buf: the XML buffer output @string: the string to add

routine which manage and grows an output buffer. This one add C chars at the end of the array.

Returns 0 if successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 1088 of file buf.c.

1088  {
1089  if ((buf == NULL) || (buf->error))
1090  return(-1);
1091  CHECK_COMPAT(buf)
1092  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
1093  return(-1);
1094  return(xmlBufCCat(buf, string));
1095 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
int xmlBufCCat(xmlBufPtr buf, const char *str)
Definition: buf.c:1027
#define CHECK_COMPAT(buf)
Definition: buf.c:71
smooth NULL
Definition: ftsmooth.c:416

◆ xmlBufWriteQuotedString()

int xmlBufWriteQuotedString ( xmlBufPtr  buf,
const xmlChar string 
)

xmlBufWriteQuotedString: @buf: the XML buffer output @string: the string to add

routine which manage and grows an output buffer. This one writes a quoted or double quoted xmlChar string, checking first if it holds quote or double-quotes internally

Returns 0 if successful, a positive error code number otherwise and -1 in case of internal or API error.

Definition at line 1111 of file buf.c.

1111  {
1112  const xmlChar *cur, *base;
1113  if ((buf == NULL) || (buf->error))
1114  return(-1);
1115  CHECK_COMPAT(buf)
1116  if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
1117  return(-1);
1118  if (xmlStrchr(string, '\"')) {
1119  if (xmlStrchr(string, '\'')) {
1120 #ifdef DEBUG_BUFFER
1122  "xmlBufWriteQuotedString: string contains quote and double-quotes !\n");
1123 #endif
1124  xmlBufCCat(buf, "\"");
1125  base = cur = string;
1126  while(*cur != 0){
1127  if(*cur == '"'){
1128  if (base != cur)
1129  xmlBufAdd(buf, base, cur - base);
1130  xmlBufAdd(buf, BAD_CAST "&quot;", 6);
1131  cur++;
1132  base = cur;
1133  }
1134  else {
1135  cur++;
1136  }
1137  }
1138  if (base != cur)
1139  xmlBufAdd(buf, base, cur - base);
1140  xmlBufCCat(buf, "\"");
1141  }
1142  else{
1143  xmlBufCCat(buf, "\'");
1144  xmlBufCat(buf, string);
1145  xmlBufCCat(buf, "\'");
1146  }
1147  } else {
1148  xmlBufCCat(buf, "\"");
1149  xmlBufCat(buf, string);
1150  xmlBufCCat(buf, "\"");
1151  }
1152  return(0);
1153 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
int xmlBufCat(xmlBufPtr buf, const xmlChar *str)
Definition: buf.c:1007
int xmlBufCCat(xmlBufPtr buf, const char *str)
Definition: buf.c:1027
#define CHECK_COMPAT(buf)
Definition: buf.c:71
XMLPUBFUN const xmlChar *XMLCALL xmlStrchr(const xmlChar *str, xmlChar val)
Definition: xmlstring.c:321
GLuint base
Definition: 3dtext.c:35
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
Definition: globals.h:346
smooth NULL
Definition: ftsmooth.c:416
#define BAD_CAST
Definition: xmlstring.h:35
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len)
Definition: buf.c:868
unsigned char xmlChar
Definition: xmlstring.h:28
char string[160]
Definition: util.h:11
XMLPUBVAR void * xmlGenericErrorContext
Definition: globals.h:362