ReactOS 0.4.16-dev-297-gc569aee
|
#include <libxml/tree.h>
Go to the source code of this file.
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 821 of file buf.c.
Referenced by xmlBufCat(), xmlBufMergeBuffer(), and xmlBufWriteQuotedString().
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 592 of file buf.c.
Referenced by xmlCharEncFirstLineInput(), and xmlCharEncInput().
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.
Definition at line 655 of file buf.c.
Referenced by xmlCharEncFirstLineInput(), and xmlCharEncInput().
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 1013 of file buf.c.
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 884 of file buf.c.
Referenced by xmlBufCCat(), and xmlBufWriteQuotedString().
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 904 of file buf.c.
Referenced by xmlBufWriteQuotedString().
xmlBufCreate:
routine to create an XML buffer. returns the new structure.
Definition at line 122 of file buf.c.
Referenced by xmlSwitchInputEncodingInt().
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.
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 519 of file buf.c.
xmlBufFree: @buf: the buffer to free
Frees an XML buffer. It frees both the content and the structure which encapsulate it.
Definition at line 322 of file buf.c.
Referenced by xmlBufBackToBuffer().
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
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 1113 of file buf.c.
Referenced by xmlCtxtResetPush().
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 498 of file buf.c.
Referenced by xmlCharEncFirstLineInput(), and xmlCharEncInput().
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 673 of file buf.c.
Referenced by xmlSwitchInputEncodingInt().
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 1068 of file buf.c.
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 1094 of file buf.c.
Referenced by xmlCreateMemoryParserCtxt(), xmlCtxtResetPush(), xmlNewInputFromFile(), xmlNewIOInputStream(), and xmlSwitchInputEncodingInt().
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 692 of file buf.c.
Referenced by xmlBufAdd().
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 281 of file buf.c.
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 1144 of file buf.c.
Referenced by xmlCtxtResetPush().
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 921 of file buf.c.