#include "cslutils.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
Functions | |
void | csl_error (const char *format,...) |
Display error message. More... | |
void | csl_warning (const char *format,...) |
Display warning message. More... | |
void | csl_message (const char *format,...) |
Display informational message. More... | |
void | csl_set_debug_mask (unsigned int debug_mask) |
Set debugging level. More... | |
CslBool | csl_check_debug (unsigned int debug_key) |
Check debug level. More... | |
void | csl_free (void *mem) |
Free dynamically allocated memory. More... | |
void * | csl_malloc (unsigned int n_bytes) |
Dynamically allocate memory. More... | |
void * | csl_malloc0 (unsigned int n_bytes) |
Dynamically allocate and clear memory. More... | |
void * | csl_realloc (void *mem, unsigned int n_bytes) |
Change size of dynamically allocated memory. More... | |
void * | csl_memdup (void const *mem, unsigned int n_bytes) |
char * | csl_strdup (const char *string) |
Duplicate a string. More... | |
void | csl_strfreevn (unsigned int n, char **str_p) |
Free a group of strings. More... |
|
Check debug level. Return whether the specified debug level is enabled. e.g. csl_check_debug(CSL_DEBUG_PCM);
|
|
Display error message. Display an error message on standard error and then exit using abort().
|
|
Free dynamically allocated memory. Free memory previously allocated by csl_malloc, csl_malloc0, csl_malloc0, csl_new, or csl_new0.
|
|
Dynamically allocate memory. Dynamically allocate storage. Calls csl_error if memory cannot be allocated.
|
|
Dynamically allocate and clear memory. Dynamically allocate storage. Calls csl_error if memory cannot be allocated. Sets the allocated memory to all zeroes.
|
|
|
|
Display informational message. Display an informational message on standard error.
|
|
Change size of dynamically allocated memory. Changes the size of dynamically allocate storage. Calls csl_error if memory cannot be allocated.
|
|
Set debugging level. Set level of debug messages to be displayed. e.g. csl_set_debug_mask(CSL_DEBUG_PCM|CSL_DEBUG_MISC);
|
|
Duplicate a string. Returns a pointer to a new string which is a duplicate of string. Memory for the new string is obtained with csl_malloc and can be freed with csl_free.
|
|
Free a group of strings. A group of strings pointed to by pointers stored sequentially in memory are freed using csl_free.
|
|
Display warning message. Display a warning message on standard error.
|