util.h File Reference

#include <stddef.h>
#include <string.h>

Go to the source code of this file.

Functions

void * sat_malloc (size_t)
 malloc exits with error message on error
void * sat_malloc2 (size_t, size_t)
void * sat_calloc (size_t, size_t)
void * sat_realloc (void *, size_t)
void * sat_realloc2 (void *, size_t, size_t)
void * sat_free (void *)
void sat_oom (size_t, size_t)
unsigned int sat_timems (unsigned int subtract)
void sat_sort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *, void *), void *compard)
char * sat_dupjoin (const char *str1, const char *str2, const char *str3)
static void * sat_extend (void *buf, size_t len, size_t nmemb, size_t size, size_t block)
static void * sat_zextend (void *buf, size_t len, size_t nmemb, size_t size, size_t block)
 extend an array by reallocation and zero's the new section buf old pointer len current size nmbemb number of elements to add size size of each element block block size used to allocate the elements
static void * sat_extend_resize (void *buf, size_t len, size_t size, size_t block)
static void * sat_calloc_block (size_t len, size_t size, size_t block)

Function Documentation

void* sat_malloc ( size_t   ) 

malloc exits with error message on error

Definition at line 30 of file util.c.

References sat_oom().

Referenced by map_init_clone(), pool_addfileprovides_dep(), pool_id2langid(), repo_add_solv_flags(), sat_dupjoin(), and sat_malloc2().

void* sat_malloc2 ( size_t  ,
size_t   
)
void* sat_calloc ( size_t  ,
size_t   
)
void* sat_realloc ( void *  ,
size_t   
)
void* sat_realloc2 ( void *  ,
size_t  ,
size_t   
)
void* sat_free ( void *   ) 
void sat_oom ( size_t  ,
size_t   
)

Definition at line 19 of file util.c.

Referenced by sat_calloc(), sat_malloc(), sat_malloc2(), sat_realloc(), and sat_realloc2().

unsigned int sat_timems ( unsigned int  subtract  ) 
void sat_sort ( void *  base,
size_t  nmemb,
size_t  size,
int(*)(const void *, const void *, void *)  compar,
void *  compard 
)
char* sat_dupjoin ( const char *  str1,
const char *  str2,
const char *  str3 
)

Definition at line 122 of file util.c.

References sat_malloc().

static void* sat_extend ( void *  buf,
size_t  len,
size_t  nmemb,
size_t  size,
size_t  block 
) [inline, static]
static void* sat_zextend ( void *  buf,
size_t  len,
size_t  nmemb,
size_t  size,
size_t  block 
) [inline, static]

extend an array by reallocation and zero's the new section buf old pointer len current size nmbemb number of elements to add size size of each element block block size used to allocate the elements

Definition at line 57 of file util.h.

References sat_extend().

static void* sat_extend_resize ( void *  buf,
size_t  len,
size_t  size,
size_t  block 
) [inline, static]
static void* sat_calloc_block ( size_t  len,
size_t  size,
size_t  block 
) [inline, static]
Generated on Mon Dec 12 11:44:13 2011 for satsolver by  doxygen 1.6.3