Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_textbuf.h File Reference
#include "ocs_list.h"

Go to the source code of this file.

Data Structures

struct  ocs_textbuf_segment_t
 
struct  ocs_textbuf_t
 

Macros

#define OCS_TEXTBUF_MAX_ALLOC_LEN   (256*1024)
 

Functions

int32_t ocs_textbuf_alloc (ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t length)
 
uint32_t ocs_textbuf_initialized (ocs_textbuf_t *textbuf)
 
int32_t ocs_textbuf_init (ocs_t *ocs, ocs_textbuf_t *textbuf, void *buffer, uint32_t length)
 
void ocs_textbuf_free (ocs_t *ocs, ocs_textbuf_t *textbuf)
 
void ocs_textbuf_putc (ocs_textbuf_t *textbuf, uint8_t c)
 
void ocs_textbuf_puts (ocs_textbuf_t *textbuf, char *s)
 
 __attribute__ ((format(printf, 2, 3))) extern void ocs_textbuf_printf(ocs_textbuf_t *textbuf
 
const char __attribute__ ((format(printf, 2, 0))) extern void ocs_textbuf_vprintf(ocs_textbuf_t *textbuf
 
void ocs_textbuf_buffer (ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_length)
 
void ocs_textbuf_copy (ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_length)
 
int32_t ocs_textbuf_remaining (ocs_textbuf_t *textbuf)
 
void ocs_textbuf_reset (ocs_textbuf_t *textbuf)
 
uint8_t * ocs_textbuf_get_buffer (ocs_textbuf_t *textbuf)
 
int32_t ocs_textbuf_get_length (ocs_textbuf_t *textbuf)
 
int32_t ocs_textbuf_get_written (ocs_textbuf_t *textbuf)
 
uint8_t * ocs_textbuf_ext_get_buffer (ocs_textbuf_t *textbuf, uint32_t idx)
 
int32_t ocs_textbuf_ext_get_length (ocs_textbuf_t *textbuf, uint32_t idx)
 
int32_t ocs_textbuf_ext_get_written (ocs_textbuf_t *textbuf, uint32_t idx)
 

Variables

const char * fmt
 
const char const char va_list ap
 

Macro Details

#define OCS_TEXTBUF_MAX_ALLOC_LEN   (256*1024)

Definition at line 38 of file ocs_textbuf.h.

Function Details

__attribute__ ( (format(printf, 2, 3))  )
const char __attribute__ ( (format(printf, 2, 0))  )
int32_t ocs_textbuf_alloc ( ocs_t *  ocs,
ocs_textbuf_t *  textbuf,
uint32_t  length 
)

Definition at line 105 of file ocs_textbuf.c.

void ocs_textbuf_buffer ( ocs_textbuf_t *  textbuf,
uint8_t *  buffer,
uint32_t  buffer_length 
)

Definition at line 335 of file ocs_textbuf.c.

void ocs_textbuf_copy ( ocs_textbuf_t *  textbuf,
uint8_t *  buffer,
uint32_t  buffer_length 
)

Definition at line 370 of file ocs_textbuf.c.

uint8_t* ocs_textbuf_ext_get_buffer ( ocs_textbuf_t *  textbuf,
uint32_t  idx 
)

Definition at line 66 of file ocs_textbuf.c.

int32_t ocs_textbuf_ext_get_length ( ocs_textbuf_t *  textbuf,
uint32_t  idx 
)

Definition at line 75 of file ocs_textbuf.c.

int32_t ocs_textbuf_ext_get_written ( ocs_textbuf_t *  textbuf,
uint32_t  idx 
)

Definition at line 84 of file ocs_textbuf.c.

void ocs_textbuf_free ( ocs_t *  ocs,
ocs_textbuf_t *  textbuf 
)

Definition at line 213 of file ocs_textbuf.c.

uint8_t* ocs_textbuf_get_buffer ( ocs_textbuf_t *  textbuf)

Definition at line 42 of file ocs_textbuf.c.

int32_t ocs_textbuf_get_length ( ocs_textbuf_t *  textbuf)

Definition at line 48 of file ocs_textbuf.c.

int32_t ocs_textbuf_get_written ( ocs_textbuf_t *  textbuf)

Definition at line 54 of file ocs_textbuf.c.

int32_t ocs_textbuf_init ( ocs_t *  ocs,
ocs_textbuf_t *  textbuf,
void *  buffer,
uint32_t  length 
)

Definition at line 190 of file ocs_textbuf.c.

uint32_t ocs_textbuf_initialized ( ocs_textbuf_t *  textbuf)

Definition at line 94 of file ocs_textbuf.c.

void ocs_textbuf_putc ( ocs_textbuf_t *  textbuf,
uint8_t  c 
)

Definition at line 308 of file ocs_textbuf.c.

void ocs_textbuf_puts ( ocs_textbuf_t *  textbuf,
char *  s 
)

Definition at line 325 of file ocs_textbuf.c.

int32_t ocs_textbuf_remaining ( ocs_textbuf_t *  textbuf)

Definition at line 386 of file ocs_textbuf.c.

void ocs_textbuf_reset ( ocs_textbuf_t *  textbuf)

Definition at line 406 of file ocs_textbuf.c.

Variable Details

const char const char va_list ap

Definition at line 66 of file ocs_textbuf.h.

const char const char* fmt

Definition at line 64 of file ocs_textbuf.h.