ekg2
|
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "dynstuff.h"
#include "dynstuff_inline.h"
#include "xmalloc.h"
Funkcje | |
EXPORTNOT void * | list_add_beginning (list_t *list, void *data) |
void * | list_add_sorted3 (list_t *list, list_t new, int(*comparision)(void *, void *)) |
EXPORTNOT void | list_add_beginning3 (list_t *list, list_t new) |
void * | list_add3 (list_t *list, list_t new) |
int | list_count (list_t list) |
EXPORTNOT int | list_remove_safe (list_t *list, void *data) |
EXPORTNOT void | list_cleanup (list_t *list) |
void * | list_remove3 (list_t *list, list_t elem, void(*func)(list_t data)) |
EXPORTNOT void * | list_remove3i (list_t *list, list_t elem, void(*func)(list_t data)) |
EXPORTNOT void * | list_unlink3 (list_t *list, list_t elem) |
int | list_destroy3 (list_t list, void(*func)(void *)) |
EXPORTNOT int | list_destroy (list_t list) |
static void | string_realloc (string_t s, int count) |
int | string_append_c (string_t s, char c) |
EXPORTNOT int | string_append_n (string_t s, const char *str, int count) |
EXPORTNOT int | string_append_raw (string_t s, const char *str, int count) |
int | string_append (string_t s, const char *str) |
string_t | string_init (const char *value) |
EXPORTNOT void | string_remove (string_t s, int count) |
char * | string_free (string_t s, int free_string) |
const char * | itoa (long int i) |
char ** | array_make (const char *string, const char *sep, int max, int trim, int quotes) |
int | array_count (char **array) |
int | array_add (char ***array, char *string) |
int | array_add_check (char ***array, char *string, int casesensitive) |
char * | array_join (char **array, const char *sep) |
int | array_item_contains (char **array, const char *string, int casesensitive) |
void | array_free (char **array) |
static int | private_data_cmp (private_data_t *item1, private_data_t *item2) |
static void | private_data_free (private_data_t *item) |
static | __DYNSTUFF_ADD_SORTED (static __DYNSTUFF_REMOVE_SAFE(private_items, static __DYNSTUFF_REMOVE_SAFE(private_data_t, private_data_cmp) |
int | private_item_get_int (private_data_t **data, const char *item_name) |
EXPORTNOT void | private_item_set (private_data_t **data, const char *item_name, const char *value) |
static __DYNSTUFF_ADD_SORTED | ( | static __DYNSTUFF_REMOVE_SAFE( | private_items, |
static __DYNSTUFF_REMOVE_SAFE( | private_data_t, | ||
private_data_cmp | |||
) | [static] |
int array_add | ( | char *** | array, |
char * | string | ||
) |
int array_add_check | ( | char *** | array, |
char * | string, | ||
int | casesensitive | ||
) |
int array_count | ( | char ** | array | ) |
void array_free | ( | char ** | array | ) |
int array_item_contains | ( | char ** | array, |
const char * | string, | ||
int | casesensitive | ||
) |
char* array_join | ( | char ** | array, |
const char * | sep | ||
) |
char** array_make | ( | const char * | string, |
const char * | sep, | ||
int | max, | ||
int | trim, | ||
int | quotes | ||
) |
const char* itoa | ( | long int | i | ) |
EXPORTNOT void* list_add_beginning | ( | list_t * | list, |
void * | data | ||
) |
Add item data to the begining of the list
(Once again), item will be added at begining of the list - as first item
EXPORTNOT void list_cleanup | ( | list_t * | list | ) |
Remove from list_t all items with l->data set to NULL.
Use with list_remove_safe() after list is not in use.
int list_count | ( | list_t | list | ) |
EXPORTNOT int list_destroy | ( | list_t | list | ) |
int list_destroy3 | ( | list_t | list, |
void(*)(void *) | func | ||
) |
EXPORTNOT int list_remove_safe | ( | list_t * | list, |
void * | data | ||
) |
static int private_data_cmp | ( | private_data_t * | item1, |
private_data_t * | item2 | ||
) | [static] |
static void private_data_free | ( | private_data_t * | item | ) | [static] |
int private_item_get_int | ( | private_data_t ** | data, |
const char * | item_name | ||
) |
EXPORTNOT void private_item_set | ( | private_data_t ** | data, |
const char * | item_name, | ||
const char * | value | ||
) |
int string_append | ( | string_t | s, |
const char * | str | ||
) |
Append to string_t s, NUL terminated string pointed by str
Wrapper to:string_append_n(s, str, -1)
int string_append_c | ( | string_t | s, |
char | c | ||
) |
Append to string_t s char c.
s | - string_t |
c | - char to append |
EXPORTNOT int string_append_n | ( | string_t | s, |
const char * | str, | ||
int | count | ||
) |
Append to string_t s, first count chars, from str
s | - string_t |
str | - buffer to append. |
count | - how many chars copy copy from str, or -1 to copy whole. |
count = xstrnlen(str, count);
?EXPORTNOT int string_append_raw | ( | string_t | s, |
const char * | str, | ||
int | count | ||
) |
Append to string_t s, count bytes from memory pointed by str
char* string_free | ( | string_t | s, |
int | free_string | ||
) |
Cleanup memory after string_t s, and perhaps (if free_string set) cleanup memory after char buffer.
s | - string_t which we want to free. |
free_string | - do we want to free memory after char buffer? |
string_t string_init | ( | const char * | value | ) |
init string_t struct, allocating memory for string passed by value, and setting internal string_t data.
value | - if NULL char buffer will be inited with "", otherwise with given value. |
static void string_realloc | ( | string_t | s, |
int | count | ||
) | [static] |
EXPORTNOT void string_remove | ( | string_t | s, |
int | count | ||
) |
Remove first count chars from string.