libkcal

icalmemory.h File Reference

#include <sys/types.h>

Include dependency graph for icalmemory.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Functions

void icalmemory_add_tmp_buffer (void *)
void icalmemory_append_char (char **buf, char **pos, size_t *buf_size, char ch)
void icalmemory_append_string (char **buf, char **pos, size_t *buf_size, const char *string)
void icalmemory_free_buffer (void *buf)
void icalmemory_free_ring (void)
void * icalmemory_new_buffer (size_t size)
void * icalmemory_resize_buffer (void *buf, size_t size)
char * icalmemory_strdup (const char *s)
void * icalmemory_tmp_buffer (size_t size)
char * icalmemory_tmp_copy (const char *str)

Function Documentation

void icalmemory_add_tmp_buffer ( void *   ) 

Add an externally allocated buffer to the ring.

void icalmemory_append_char ( char **  buf,
char **  pos,
size_t *  buf_size,
char  ch 
)

icalmemory_append_char is similar, but is appends a character instead of a string

void icalmemory_append_string ( char **  buf,
char **  pos,
size_t *  buf_size,
const char *  string 
)

icalmemory_append_string will copy the string 'string' to the buffer 'buf' starting at position 'pos', reallocing 'buf' if it is too small.

'buf_size' is the size of 'buf' and will be changed if 'buf' is reallocated. 'pos' will point to the last byte of the new string in 'buf', usually a ''

void icalmemory_free_buffer ( void *  buf  ) 

void icalmemory_free_ring ( void   ) 

Free all memory used in the ring.

void* icalmemory_new_buffer ( size_t  size  ) 

void* icalmemory_resize_buffer ( void *  buf,
size_t  size 
)

char* icalmemory_strdup ( const char *  s  ) 

A wrapper around strdup.

Partly to trap calls to strdup, partly because in -ansi, gcc on Red Hat claims that strdup is undeclared

void* icalmemory_tmp_buffer ( size_t  size  ) 

char* icalmemory_tmp_copy ( const char *  str  )