33 #if !defined(__OCS_TEXTBUF_H__)
34 #define __OCS_TEXTBUF_H__
38 #define OCS_TEXTBUF_MAX_ALLOC_LEN (256*1024)
42 uint8_t user_allocated:1;
78 #endif // __OCS_TEXTBUF_H__
int32_t ocs_textbuf_get_length(ocs_textbuf_t *textbuf)
int32_t ocs_textbuf_ext_get_length(ocs_textbuf_t *textbuf, uint32_t idx)
ocs_list_t ocs_list_link_t
int32_t ocs_textbuf_ext_get_written(ocs_textbuf_t *textbuf, uint32_t idx)
void ocs_textbuf_copy(ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_length)
int32_t ocs_textbuf_remaining(ocs_textbuf_t *textbuf)
int32_t ocs_textbuf_get_written(ocs_textbuf_t *textbuf)
uint8_t * ocs_textbuf_get_buffer(ocs_textbuf_t *textbuf)
void ocs_textbuf_free(ocs_t *ocs, ocs_textbuf_t *textbuf)
uint32_t allocation_length
uint8_t * ocs_textbuf_ext_get_buffer(ocs_textbuf_t *textbuf, uint32_t idx)
const char const char va_list ap
int32_t ocs_textbuf_init(ocs_t *ocs, ocs_textbuf_t *textbuf, void *buffer, uint32_t length)
void ocs_textbuf_puts(ocs_textbuf_t *textbuf, char *s)
uint32_t total_allocation_length
void ocs_textbuf_vprintf(ocs_textbuf_t *textbuf, const char *fmt, va_list ap)
void ocs_textbuf_printf(ocs_textbuf_t *textbuf, const char *fmt,...)
Helper function to dump message.
void ocs_textbuf_putc(ocs_textbuf_t *textbuf, uint8_t c)
void ocs_textbuf_buffer(ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_length)
__attribute__((format(printf, 3, 4))) extern void ocs_ddump_value(ocs_textbuf_t *textbuf
void ocs_textbuf_reset(ocs_textbuf_t *textbuf)
int32_t ocs_textbuf_alloc(ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t length)
uint32_t ocs_textbuf_initialized(ocs_textbuf_t *textbuf)
const char const char * fmt
uint32_t max_allocation_length