|
ReactOS 0.4.16-dev-2208-g6350669
|
#include <libxml/tree.h>

Go to the source code of this file.
| XML_HIDDEN 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 758 of file buf.c.
Referenced by xmlBufCat(), xmlBufMergeBuffer(), and xmlBufWriteQuotedString().
| XML_HIDDEN 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
| XML_HIDDEN 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 reserves one byte for the NUL terminator character that is usually needed, so there is no need to subtract 1 from the result anymore.
Returns the amount, or 0 if none or if an error occurred.
| XML_HIDDEN 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 938 of file buf.c.
| XML_HIDDEN 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 816 of file buf.c.
Referenced by xmlBufCCat(), and xmlBufWriteQuotedString().
| XML_HIDDEN 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 835 of file buf.c.
Referenced by xmlBufWriteQuotedString().
| XML_HIDDEN xmlBufPtr xmlBufCreate | ( | void | ) |
| XML_HIDDEN xmlBufPtr xmlBufCreateSize | ( | size_t | size | ) |
| XML_HIDDEN 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.
Referenced by xmlLoadEntityContent().
| XML_HIDDEN size_t xmlBufDump | ( | FILE * | file, |
| xmlBufPtr | buf | ||
| ) |
Definition at line 464 of file buf.c.
| XML_HIDDEN void xmlBufEmpty | ( | xmlBufPtr | buf | ) |
| XML_HIDDEN 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 276 of file buf.c.
Referenced by xmlBufBackToBuffer().
| XML_HIDDEN 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
| XML_HIDDEN int xmlBufGetAllocationScheme | ( | xmlBufPtr | buf | ) |
| XML_HIDDEN 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 443 of file buf.c.
| XML_HIDDEN 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 610 of file buf.c.
Referenced by xmlParseDocument(), and xmlSwitchInputEncoding().
| XML_HIDDEN size_t xmlBufLength | ( | const xmlBufPtr | buf | ) |
| XML_HIDDEN 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
| XML_HIDDEN 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 1019 of file buf.c.
Referenced by xmlCreateDocParserCtxt(), xmlCreateMemoryParserCtxt(), xmlCtxtResetPush(), xmlLoadEntityContent(), xmlNewInputFromFile(), xmlNewIOInputStream(), xmlNewStringInputStream(), and xmlSwitchInputEncoding().
| XML_HIDDEN 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 629 of file buf.c.
Referenced by xmlBufAdd().
| XML_HIDDEN 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 241 of file buf.c.
| XML_HIDDEN int xmlBufUpdateInput | ( | xmlBufPtr | buf, |
| xmlParserInputPtr | input, | ||
| size_t | pos | ||
| ) |
xmlBufUpdateInput: @buf: an xmlBufPtr @input: an xmlParserInputPtr @pos: 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 1044 of file buf.c.
Referenced by xmlCtxtResetPush(), xmlParserGrow(), and xmlParserShrink().
| XML_HIDDEN 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 852 of file buf.c.