Files | |
file | wbxml_buffers.c |
Generic Buffers Functions. | |
file | wbxml_buffers.h |
Generic Buffers Functions. | |
Defines | |
#define | wbxml_buffer_create(a, b, c) wbxml_mem_cleam(wbxml_buffer_create_real((const WB_UTINY *)a,b,c)) |
#define | wbxml_buffer_create_from_cstr(a) wbxml_buffer_create((const WB_UTINY *)a,WBXML_STRLEN(a),WBXML_STRLEN(a)) |
#define | wbxml_buffer_append_data(a, b, c) wbxml_buffer_append_data_real(a,(const WB_UTINY *)b,c) |
#define | wbxml_buffer_append_cstr(a, b) wbxml_buffer_append_cstr_real(a,(const WB_UTINY *)b) |
#define | wbxml_buffer_split_words(a) wbxml_mem_cleam(wbxml_buffer_split_words_real(a)) |
Functions | |
WBXMLBuffer * | wbxml_buffer_create_real (const WB_UTINY *data, WB_ULONG len, WB_ULONG malloc_block) |
Create a Buffer. | |
void | wbxml_buffer_destroy (WBXMLBuffer *buffer) |
Destroy a Buffer. | |
void | wbxml_buffer_destroy_item (void *buff) |
Destroy a Buffer. | |
WBXMLBuffer * | wbxml_buffer_duplicate (WBXMLBuffer *buff) |
Duplicate a Buffer. | |
unsigned int | wbxml_buffer_len (WBXMLBuffer *buffer) |
Get data length of a buffer. | |
WB_BOOL | wbxml_buffer_get_char (WBXMLBuffer *buff, WB_ULONG pos, WB_UTINY *result) |
Get a byte from a Buffer. | |
void | wbxml_buffer_set_char (WBXMLBuffer *buff, WB_ULONG pos, WB_UTINY ch) |
Set a byte in a Buffer. | |
unsigned char * | wbxml_buffer_get_cstr (WBXMLBuffer *buffer) |
Get pointer to internal buffer data. | |
WB_BOOL | wbxml_buffer_insert (WBXMLBuffer *to, WBXMLBuffer *buff, WB_ULONG pos) |
Append a Buffer into another one. | |
WB_BOOL | wbxml_buffer_insert_cstr (WBXMLBuffer *to, WB_UTINY *str, WB_ULONG pos) |
Append a C String into a WBXMLBuffer. | |
unsigned char | wbxml_buffer_append (WBXMLBuffer *dest, WBXMLBuffer *buff) |
Append a Buffer to another Buffer. | |
WB_BOOL | wbxml_buffer_append_data_real (WBXMLBuffer *buff, const WB_UTINY *data, WB_ULONG len) |
Append data to a Buffer. | |
WB_BOOL | wbxml_buffer_append_cstr_real (WBXMLBuffer *buff, const WB_UTINY *data) |
Append a C String (NULL terminated) to a Buffer. | |
WB_BOOL | wbxml_buffer_append_char (WBXMLBuffer *buff, WB_UTINY ch) |
Append a byte to a Buffer. | |
WB_BOOL | wbxml_buffer_append_mb_uint_32 (WBXMLBuffer *buff, WB_ULONG value) |
Append a Multibyte Integer. | |
void | wbxml_buffer_delete (WBXMLBuffer *buff, WB_ULONG pos, WB_ULONG len) |
Delete a range of Bytes in a Buffer. | |
void | wbxml_buffer_shrink_blanks (WBXMLBuffer *buffer) |
Shrink all spaces in a Buffer. | |
void | wbxml_buffer_strip_blanks (WBXMLBuffer *buffer) |
Remove whitespaces at beginning and end of a Buffer. | |
int | wbxml_buffer_compare (WBXMLBuffer *buff1, WBXMLBuffer *buff2) |
Compare two Buffers. | |
WB_LONG | wbxml_buffer_compare_cstr (WBXMLBuffer *buff, const WB_TINY *str) |
Compare a WBXML Buffer with a C String. | |
WBXMLList * | wbxml_buffer_split_words_real (WBXMLBuffer *buff) |
Split a Buffer into words at whitespace. | |
WB_BOOL | wbxml_buffer_search_char (WBXMLBuffer *to, WB_UTINY ch, WB_ULONG pos, WB_ULONG *result) |
Search a char in Buffer. | |
WB_BOOL | wbxml_buffer_search (WBXMLBuffer *to, WBXMLBuffer *search, WB_ULONG pos, WB_ULONG *result) |
Search a Buffer in another Buffer. | |
WB_BOOL | wbxml_buffer_search_cstr (WBXMLBuffer *to, WB_UTINY *search, WB_ULONG pos, WB_ULONG *result) |
Search a C String in a WBXMLBuffer Buffer. | |
unsigned char | wbxml_buffer_contains_only_whitespaces (WBXMLBuffer *buffer) |
Check if a buffer contains only Whitespaces. | |
void | wbxml_buffer_hex_to_binary (WBXMLBuffer *buffer) |
Convert an Hexa buffer to Binary. | |
WB_BOOL | wbxml_buffer_binary_to_hex (WBXMLBuffer *buffer, WB_BOOL uppercase) |
Convert an Binary buffer to Hexa. | |
void | wbxml_buffer_remove_trailing_zeros (WBXMLBuffer **buffer) |
Remove trailing Zeros. |
|
Wrapper around wbxml_buffer_append_cstr_real() to avoid Casts in code Definition at line 170 of file wbxml_buffers.h. Referenced by wbxml_tree_clb_xml_end_element(). |
|
Wrapper around wbxml_buffer_append_data_real() to avoid Casts in code Definition at line 159 of file wbxml_buffers.h. Referenced by wbxml_buffer_append(), wbxml_buffer_append_cstr_real(), and wbxml_buffer_append_mb_uint_32(). |
|
Wrapper around wbxml_buffer_create_real() to track Memory Definition at line 67 of file wbxml_buffers.h. Referenced by wbxml_attribute_name_create_literal(), wbxml_buffer_split_words_real(), wbxml_encoder_encode_to_wbxml(), wbxml_encoder_encode_to_xml(), wbxml_parser_parse(), wbxml_tag_create_literal(), wbxml_tree_clb_xml_characters(), and wbxml_tree_clb_xml_end_element(). |
|
Wrapper around wbxml_buffer_create() when creating buffer with a C String (NULL Terminated) Definition at line 70 of file wbxml_buffers.h. |
|
Definition at line 233 of file wbxml_buffers.h. |
|
Append a Buffer to another Buffer.
Definition at line 187 of file wbxml_buffers.c. References FALSE, NULL, TRUE, WB_BOOL, wbxml_buffer_append_data, wbxml_buffer_get_cstr(), and wbxml_buffer_len(). |
|
Append a byte to a Buffer.
|
|
Append a C String (NULL terminated) to a Buffer.
|
|
Append data to a Buffer.
|
|
Append a Multibyte Integer.
|
|
Convert an Binary buffer to Hexa.
|
|
Compare two Buffers.
Definition at line 332 of file wbxml_buffers.c. References WBXMLBuffer_s::data, WBXMLBuffer_s::len, NULL, and WB_LONG. |
|
Compare a WBXML Buffer with a C String.
|
|
Check if a buffer contains only Whitespaces.
Definition at line 557 of file wbxml_buffers.c. References WBXMLBuffer_s::data, FALSE, WBXMLBuffer_s::len, NULL, TRUE, WB_BOOL, and WB_ULONG. |
|
Create a Buffer.
Referenced by wbxml_buffer_duplicate(), and wbxml_tree_clb_wbxml_characters(). |
|
Delete a range of Bytes in a Buffer.
Referenced by wbxml_buffer_remove_trailing_zeros(), wbxml_buffer_shrink_blanks(), and wbxml_buffer_strip_blanks(). |
|
Destroy a Buffer.
Definition at line 104 of file wbxml_buffers.c. References WBXMLBuffer_s::data, NULL, and wbxml_free(). Referenced by wbxml_attribute_destroy(), wbxml_attribute_name_destroy(), wbxml_buffer_destroy_item(), wbxml_encoder_destroy(), wbxml_parser_destroy(), wbxml_tag_destroy(), wbxml_tree_clb_xml_end_element(), and wbxml_tree_node_destroy(). |
|
Destroy a Buffer.
Definition at line 113 of file wbxml_buffers.c. References wbxml_buffer_destroy(). Referenced by wbxml_buffer_split_words_real(). |
|
Duplicate a Buffer.
Definition at line 119 of file wbxml_buffers.c. References NULL, wbxml_buffer_create_real(), wbxml_buffer_get_cstr(), and wbxml_buffer_len(). Referenced by wbxml_attribute_duplicate(), wbxml_attribute_name_duplicate(), and wbxml_tag_duplicate(). |
|
Get a byte from a Buffer.
Referenced by wbxml_buffer_remove_trailing_zeros(), wbxml_buffer_shrink_blanks(), and wbxml_buffer_strip_blanks(). |
|
Get pointer to internal buffer data.
Definition at line 160 of file wbxml_buffers.c. References WBXMLBuffer_s::data, WBXMLBuffer_s::len, NULL, WB_UTINY, and WBXML_UTINY_NULL_STRING. Referenced by wbxml_attribute_get_xml_value(), wbxml_attribute_name_get_xml_name(), wbxml_buffer_append(), wbxml_buffer_duplicate(), wbxml_tag_get_xml_name(), and wbxml_tree_clb_xml_end_element(). |
|
Convert an Hexa buffer to Binary.
Definition at line 573 of file wbxml_buffers.c. References WBXMLBuffer_s::data, WBXMLBuffer_s::len, NULL, WB_ULONG, WB_UTINY, and wbxml_buffer_len(). |
|
Append a Buffer into another one.
|
|
Append a C String into a WBXMLBuffer.
|
|
Get data length of a buffer.
Definition at line 134 of file wbxml_buffers.c. References WBXMLBuffer_s::len, NULL, and WB_ULONG. Referenced by wbxml_buffer_append(), wbxml_buffer_binary_to_hex(), wbxml_buffer_duplicate(), wbxml_buffer_hex_to_binary(), wbxml_buffer_remove_trailing_zeros(), wbxml_buffer_shrink_blanks(), and wbxml_buffer_strip_blanks(). |
|
Remove trailing Zeros.
Definition at line 641 of file wbxml_buffers.c. References NULL, WB_UTINY, wbxml_buffer_delete(), wbxml_buffer_get_char(), and wbxml_buffer_len(). |
|
Search a Buffer in another Buffer.
|
|
Search a char in Buffer.
Referenced by wbxml_buffer_search(), and wbxml_buffer_search_cstr(). |
|
Search a C String in a WBXMLBuffer Buffer.
|
|
Set a byte in a Buffer.
Referenced by wbxml_buffer_shrink_blanks(). |
|
Shrink all spaces in a Buffer.
Definition at line 272 of file wbxml_buffers.c. References NULL, WB_ULONG, WB_UTINY, wbxml_buffer_delete(), wbxml_buffer_get_char(), wbxml_buffer_len(), and wbxml_buffer_set_char(). |
|
Split a Buffer into words at whitespace.
Definition at line 416 of file wbxml_buffers.c. References WBXMLBuffer_s::data, WBXMLBuffer_s::len, NULL, WB_ULONG, WB_UTINY, wbxml_buffer_create, wbxml_buffer_destroy_item(), WBXML_BUFFER_SPLIT_BLOCK, wbxml_list_append(), wbxml_list_create, and wbxml_list_destroy(). |
|
Remove whitespaces at beginning and end of a Buffer.
Definition at line 302 of file wbxml_buffers.c. References WB_ULONG, WB_UTINY, wbxml_buffer_delete(), wbxml_buffer_get_char(), and wbxml_buffer_len(). |