Top   Types   Functions   Classes   Options   Index   Sources 

Functions


List

Global_hashval_tGlobal_char_case_hash(unsigned char x)
Global_hashval_tGlobal_char_case_hash(unsigned char x)
Global_hashval_tGlobal_char_case_hash2(unsigned char x)
Global_hashval_tGlobal_char_case_hash2(unsigned char x)
Global_hashval_tGlobal_char_case_hash3(unsigned char x)
Global_hashval_tGlobal_char_case_hash3(unsigned char x)
Global_hashval_tGlobal_char_case_hash4(unsigned char x)
Global_hashval_tGlobal_char_case_hash4(unsigned char x)
Global_hashval_tGlobal_char_hash(unsigned char x)
Global_hashval_tGlobal_char_hash(unsigned char x)
Global_hashval_tGlobal_char_hash2(unsigned char x)
Global_hashval_tGlobal_char_hash2(unsigned char x)
Global_hashval_tGlobal_char_hash3(unsigned char x)
Global_hashval_tGlobal_char_hash3(unsigned char x)
Global_hashval_tGlobal_char_hash4(unsigned char x)
Global_hashval_tGlobal_char_hash4(unsigned char x)
Global_ERWIN_BOOLGlobal_char_is_alpha(char)
Global_ERWIN_BOOLGlobal_char_is_cr(char)
Global_ERWIN_BOOLGlobal_char_is_cr0(char)
Global_ERWIN_BOOLGlobal_char_is_digit(char)
Global_ERWIN_BOOLGlobal_char_is_lower(char)
Global_ERWIN_BOOLGlobal_char_is_space(char)
Global_ERWIN_BOOLGlobal_char_is_space0(char)
Global_ERWIN_BOOLGlobal_char_is_upper(char)
Global_ERWIN_BOOLGlobal_char_is_xdigit(char)
charGlobal_char_to_lower(char)
charGlobal_char_to_upper(char)
unsigned long intGlobal_erwin_det_random()
intGlobal_erwin_digit_value(char)
charGlobal_erwin_get_digit(int digit)
charGlobal_erwin_get_digit_upper(int digit)
Global_hashval_tGlobal_erwin_hash(bool x)
Global_hashval_tGlobal_erwin_hash(bool x)
Global_hashval_tGlobal_erwin_hash(char x)
Global_hashval_tGlobal_erwin_hash(char x)
Global_hashval_tGlobal_erwin_hash(signed char x)
Global_hashval_tGlobal_erwin_hash(signed char x)
Global_hashval_tGlobal_erwin_hash(unsigned char x)
Global_hashval_tGlobal_erwin_hash(unsigned char x)
Global_hashval_tGlobal_erwin_hash(short x)
Global_hashval_tGlobal_erwin_hash(short x)
Global_hashval_tGlobal_erwin_hash(unsigned short x)
Global_hashval_tGlobal_erwin_hash(unsigned short x)
Global_hashval_tGlobal_erwin_hash(int x)
Global_hashval_tGlobal_erwin_hash(int x)
Global_hashval_tGlobal_erwin_hash(unsigned x)
Global_hashval_tGlobal_erwin_hash(unsigned x)
Global_hashval_tGlobal_erwin_hash(long x)
Global_hashval_tGlobal_erwin_hash(long x)
Global_hashval_tGlobal_erwin_hash(unsigned long x)
Global_hashval_tGlobal_erwin_hash(unsigned long x)
Global_hashval_tGlobal_erwin_hash(ERWIN_LONG_LONG x)
Global_hashval_tGlobal_erwin_hash(ERWIN_LONG_LONG x)
Global_hashval_tGlobal_erwin_hash(ERWIN_UNSIGNED_LONG_LONG x)
Global_hashval_tGlobal_erwin_hash(ERWIN_UNSIGNED_LONG_LONG x)
Global_hashval_tGlobal_erwin_hash(void const * x)
Global_hashval_tGlobal_erwin_hash(void const * x)
voidGlobal_erwin_init(int * argc, char ** * argv)
char const *Global_erwin_kind_to_string(Global_erwin_kind_t)
Global_hashval_tGlobal_erwin_make_hash_result(Global_hashval_t, Global_hashval_t)
Global_hashval_tGlobal_erwin_make_hash_result(Global_hashval_t h1, Global_hashval_t h2)
void *Global_erwin_memset0(void * p, size_t start, size_t end_plus_1)
voidGlobal_erwin_merge_sort(void * abase, size_t anmemb, size_t asize, Global_erwin_comparison_t acompar)
Global_hashval_tGlobal_erwin_mul9(Global_hashval_t x)
Global_hashval_tGlobal_erwin_mul9(Global_hashval_t x)
Global_hashval_tGlobal_erwin_mul_x1(Global_hashval_t x)
Global_hashval_tGlobal_erwin_mul_x1(Global_hashval_t x)
Vector_t const *Global_erwin_ptr_const_of(Vector_t const * x)
Vector_t const *Global_erwin_ptr_const_of(Vector_t const & x)
Map_t const *Global_erwin_ptr_const_of(Map_t const * x)
Map_t const *Global_erwin_ptr_const_of(Map_t const & x)
List_t const *Global_erwin_ptr_const_of(List_t const * x)
List_t const *Global_erwin_ptr_const_of(List_t const & x)
Vector_t *Global_erwin_ptr_of(Vector_t * x)
Vector_t *Global_erwin_ptr_of(Vector_t & x)
Map_t *Global_erwin_ptr_of(Map_t * x)
Map_t *Global_erwin_ptr_of(Map_t & x)
List_t *Global_erwin_ptr_of(List_t * x)
List_t *Global_erwin_ptr_of(List_t & x)
intGlobal_erwin_register_init(Global_initializer_t)
Global_ERWIN_BOOLGlobal_erwin_require_determinism()
Global_hashval_tGlobal_erwin_s16_array_hash(ERWIN_S16 const * x, size_t s)
Global_hashval_tGlobal_erwin_s16_array_hash(ERWIN_S16 const * x, size_t s)
Global_hashval_tGlobal_erwin_s16_hash(ERWIN_S16 x)
Global_hashval_tGlobal_erwin_s16_hash(ERWIN_S16 x)
Global_hashval_tGlobal_erwin_s32_array_hash(ERWIN_S32 const * x, size_t s)
Global_hashval_tGlobal_erwin_s32_array_hash(ERWIN_S32 const * x, size_t s)
Global_hashval_tGlobal_erwin_s32_hash(ERWIN_S32 x)
Global_hashval_tGlobal_erwin_s32_hash(ERWIN_S32 x)
Global_hashval_tGlobal_erwin_s64_array_hash(ERWIN_S64 const * x, size_t s)
Global_hashval_tGlobal_erwin_s64_array_hash(ERWIN_S64 const * x, size_t s)
Global_hashval_tGlobal_erwin_s64_hash(ERWIN_S64 const x)
Global_hashval_tGlobal_erwin_s64_hash(ERWIN_S64 const x)
Global_hashval_tGlobal_erwin_s8_array_case_hash(ERWIN_S8 const * x, size_t s)
Global_hashval_tGlobal_erwin_s8_array_case_hash(ERWIN_S8 const * x, size_t s)
Global_hashval_tGlobal_erwin_s8_array_hash(ERWIN_S8 const * x, size_t s)
Global_hashval_tGlobal_erwin_s8_array_hash(ERWIN_S8 const * x, size_t s)
Global_hashval_tGlobal_erwin_s8_hash(ERWIN_S8 x)
Global_hashval_tGlobal_erwin_s8_hash(ERWIN_S8 x)
Global_hashval_tGlobal_erwin_s8_hash_case(ERWIN_S8 x)
Global_hashval_tGlobal_erwin_s8_hash_case(ERWIN_S8 x)
voidGlobal_erwin_set_determinism(Global_ERWIN_BOOL)
long intGlobal_erwin_strntol(char const * c, size_t strlen, char * * endptr = NULL, int base = 0)
ERWIN_LONG_LONGGlobal_erwin_strntoll(char const * c, size_t strlen, char * * endptr = NULL, int base = 0)
unsigned long intGlobal_erwin_strntoul(char const * c, size_t strlen, char * * endptr = NULL, int base = 0)
ERWIN_UNSIGNED_LONG_LONGGlobal_erwin_strntoull(char const * c, size_t strlen, char * * endptr = NULL, int base = 0)
char const *Global_erwin_strsignal(int)
long intGlobal_erwin_strtol(char const * c, char * * endptr = NULL, int base = 0)
ERWIN_LONG_LONGGlobal_erwin_strtoll(char const * c, char * * endptr = NULL, int base = 0)
unsigned long intGlobal_erwin_strtoul(char const * c, char * * endptr = NULL, int base = 0)
ERWIN_UNSIGNED_LONG_LONGGlobal_erwin_strtoull(char const * c, char * * endptr = NULL, int base = 0)
Global_hashval_tGlobal_erwin_u16_array_hash(ERWIN_U16 const *, size_t)
Global_hashval_tGlobal_erwin_u16_hash(ERWIN_U16 x)
Global_hashval_tGlobal_erwin_u16_hash(ERWIN_U16 x)
Global_hashval_tGlobal_erwin_u32_array_hash(ERWIN_U32 const *, size_t)
Global_hashval_tGlobal_erwin_u32_hash(ERWIN_U32 x)
Global_hashval_tGlobal_erwin_u32_hash(ERWIN_U32 x)
Global_hashval_tGlobal_erwin_u64_array_hash(ERWIN_U64 const *, size_t)
Global_hashval_tGlobal_erwin_u64_hash(ERWIN_U64 x)
Global_hashval_tGlobal_erwin_u64_hash(ERWIN_U64 x)
Global_hashval_tGlobal_erwin_u8_array_case_hash(ERWIN_U8 const *, size_t)
Global_hashval_tGlobal_erwin_u8_array_hash(ERWIN_U8 const *, size_t)
Global_hashval_tGlobal_erwin_u8_hash(ERWIN_S8 x)
Global_hashval_tGlobal_erwin_u8_hash(ERWIN_S8 x)
Global_hashval_tGlobal_erwin_u8_hash_case(ERWIN_S8 x)
Global_hashval_tGlobal_erwin_u8_hash_case(ERWIN_S8 x)
int *Global_erwininternallisterrnoptr()
char const *Global_erwininternalliststrerror(int)
int *Global_erwininternalmaperrnoptr()
char const *Global_erwininternalmapstrerror(int)
int *Global_erwininternalvectorerrnoptr()
char const *Global_erwininternalvectorstrerror(int)
Global_hashval_tGlobal_hash_voidp(void const * x)
Global_hashval_tGlobal_hash_voidp(void const * x)
Global_hashval_tGlobal_int_hash(unsigned int x)
Global_hashval_tGlobal_int_hash(unsigned int x)
Global_hashval_tGlobal_long_hash(unsigned long x)
Global_hashval_tGlobal_long_hash(unsigned long x)
Global_hashval_tGlobal_long_long_hash(ERWIN_UNSIGNED_LONG_LONG x)
Global_hashval_tGlobal_long_long_hash(ERWIN_UNSIGNED_LONG_LONG x)
intGlobal_memory_cmp(void const * a, void const * b, size_t cnt)
void *Global_memory_memory(void const * haystack, size_t haycnt, void const * needle, size_t needlecnt)
Global_hashval_tGlobal_short_hash(unsigned short x)
Global_hashval_tGlobal_short_hash(unsigned short x)
Global_hashval_tGlobal_size_t_hash(size_t x)
Global_hashval_tGlobal_size_t_hash(size_t x)
intGlobal_string_case_cmp(char const * a, char const * b)
Global_hashval_tGlobal_string_case_hash(char const *)
Global_hashval_tGlobal_string_case_hash(char const * c)
char *Global_string_case_string(char const * haystack, char const * needle)
intGlobal_string_cmp(char const * a, char const * b)
char *Global_string_dup(char const * c, int * err = (int*)NULL)
voidGlobal_string_free(char * c)
Global_hashval_tGlobal_string_hash(char const *)
Global_hashval_tGlobal_string_hash(char const * c)
Global_ERWIN_BOOLGlobal_string_is_prefix(int * needle_length, char const * haystack, char const * needle)
Global_ERWIN_BOOLGlobal_string_is_suffix(int * needle_length, char const * haystack, char const * needle)
size_tGlobal_string_length(char const *)
intGlobal_string_n_case_cmp(char const * a, char const * b, size_t n)
char *Global_string_n_case_string(char const * haystack, char const * needle, size_t)
intGlobal_string_n_cmp(char const * a, char const * b, size_t n)
char *Global_string_n_dup(char const * c, size_t n, int * err = (int*)NULL)
size_tGlobal_string_n_length(char const *, size_t)
char *Global_string_n_string(char const * haystack, char const * needle, size_t)
char *Global_string_string(char const * haystack, char const * needle)
Global_hashval_tGlobal_voidp_hash(void const * x)
Global_hashval_tGlobal_voidp_hash(void const * x)
List_t *List_copy(List_t const * self)
List_t *List_copy_err(List_t const * self, int * err)
voidList_delete(List_t * self)
intList_errno(List_t const *)
Global_hashval_tList_hash(List_t const *)
Global_hashval_tList_hash(List_t const * x)
Global_hashval_tList_hash_raw(List_t const *)
List_t *List_new()
List_t *List_new_with_zero(oTypeTouched zero)
Global_list_key_tList_next_raw(Global_list_key_t key)
Global_list_key_tList_previous_raw(Global_list_key_t key)
oTypeResultList_value_raw(Global_list_key_t key)
oTypeResultList_zero(List_t const * self)
voidMap_clear_flags_no_resize(Map_t * self, Global_ERWIN_BOOL destroy_keys, Global_ERWIN_BOOL destroy_values)
intMap_cmp_keys(Map_t const * self, Map_t const * other)
Map_t *Map_copy(Map_t const * self)
Map_t *Map_copy_err(Map_t const * self, int * err)
voidMap_delete(Map_t * self)
voidMap_delete_flags(Map_t * self, Global_ERWIN_BOOL destroy_keys, Global_ERWIN_BOOL destroy_values)
voidMap_destroy(Map_t * self)
voidMap_destroy_flags(Map_t * self, Global_ERWIN_BOOL destroy_keys, Global_ERWIN_BOOL destroy_values)
Global_ERWIN_BOOLMap_equal_keys(Map_t const * self, Map_t const * other)
intMap_erase_map_no_resize(Map_t * self, Map_t const * other)
intMap_erase_no_resize(Map_t * self, iTypeTouched index)
intMap_errno(Map_t const *)
Global_ERWIN_BOOLMap_expect_size(Map_t * self, int newsize)
intMap_find_any_pair(Map_key_result_t *, Map_t const * self)
Global_hashval_tMap_hash(Map_t const *)
intMap_init(Map_t * self)
intMap_init_with_initial_size(Map_t * self, int initial_size)
intMap_init_with_zero_and_initial_size(Map_t * self, oTypeTouched zero, int initial_size)
intMap_insert(Map_t * self, iTypeTouched key)
Map_t *Map_new()
Map_t *Map_new_with_initial_size(int initial_size)
Map_t *Map_new_with_zero(oTypeTouched zero)
Map_t *Map_new_with_zero_and_initial_size(oTypeTouched zero, int initial_size)
intMap_poke(iType * key_out, Map_t * self, iTypeTouched key, Global_ERWIN_BOOL introduce)
intMap_poke_no_icopy(iType * key_out, Map_t * self, iTypeVarParam key, Global_ERWIN_BOOL introduce)
oTypeVarMap_remove_no_resize(Map_t * self, iTypeTouched index)
intVector_chop_flags(Vector_t * self, Vector_cnt_t count, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL delete_elems)
Vector_t *Vector_copy(Vector_t const * self)
Vector_t *Vector_copy_err(Vector_t const * self, int * err)
voidVector_delete(Vector_t * self)
voidVector_destroy(Vector_t * self)
Global_ERWIN_BOOLVector_empty(Vector_t const * self)
Global_ERWIN_BOOLVector_empty(Vector_t const * self)
intVector_erase_flags(Vector_t * self, Vector_index_t index, Vector_cnt_t number_of_elements_to_delete, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL delete_elems)
Vector_cnt_tVector_erase_if(Vector_t * self, Vector_feature_t feature, Global_ERWIN_BOOL value)
Vector_cnt_tVector_erase_if_flags(Vector_t * self, Vector_feature_t feature, Global_ERWIN_BOOL value, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL dealloc)
intVector_errno(Vector_t const *)
Vector_element_ptr_tVector_find_ptr(Vector_t const * self, Vector_index_t start, oTypeParam needle)
oTypeResultVector_first(Vector_t const * self)
voidVector_format(Vector_t * self, Tchar const * format, ...)
voidVector_format_info_done(Vector_format_info_t *)
voidVector_format_info_init(Vector_format_info_t *)
Vector_index_tVector_format_pos()
Global_ERWIN_BOOLVector_format_quoted()
Vector_quotation_method_t const *Vector_get_quotation_method(Vector_t const * self, int which)
Global_hashval_tVector_hash(Vector_t const *)
intVector_init(Vector_t * self)
intVector_init_with_initial_size(Vector_t * self, Vector_cnt_t initial_size)
intVector_init_with_zero_and_initial_size(Vector_t * self, oTypeTouched zero, Vector_cnt_t initial_size)
oTypeResultVector_last(Vector_t const * self)
Vector_cnt_tVector_nentries(Vector_t const * self)
Vector_t *Vector_new()
Vector_t *Vector_new_from_raw(oTypeVar * contents, Vector_cnt_t nentries, Vector_cnt_t allocsize)
Vector_t *Vector_new_from_raw_with_zero(oTypeVar * contents, Vector_cnt_t nentries, Vector_cnt_t allocsize, oTypeTouched zero)
Vector_t *Vector_new_with_initial_size(Vector_cnt_t initial_size)
Vector_t *Vector_new_with_zero(oTypeTouched zero)
Vector_t *Vector_new_with_zero_and_initial_size(oTypeTouched zero, Vector_cnt_t initial_size)
oTypeResultVector_nth(Vector_t const * self, Vector_index_t idx)
oType const *Vector_nth_ptr_char_const(Vector_t const * self, Vector_index_t idx)
oType const *Vector_nth_ptr_check_const(Vector_t const * self, Vector_index_t idx)
oType const *Vector_nth_ptr_const(Vector_t const * self, Vector_index_t idx)
voidVector_oformat(Vector_t * self, unsigned long int options, Tchar const * format, ...)
voidVector_ovformat(Vector_t * self, unsigned long int options, Tchar const * format, va_list arguments)
Vector_index_tVector_pos(Vector_t *)
Vector_index_tVector_pos(Vector_t * x)
Vector_index_t *Vector_pos_ptr(Vector_t *)
Vector_index_t *Vector_pos_ptr(Vector_t * x)
Vector_element_ptr_tVector_rfind_ptr(Vector_t const * self, Vector_index_t start, oTypeParam needle)
voidVector_roformat(Vector_format_info_t * info, Vector_t * self, unsigned long int options, Tchar const * format, ... arguments)
voidVector_rovformat(Vector_format_info_t * info, Vector_t * self, unsigned long int options, Tchar const * format, va_list arguments)
voidVector_set_pos(Vector_t *, Vector_index_t)
voidVector_set_pos(Vector_t * x, Vector_index_t y)
voidVector_set_quotation_method(Vector_t const * self, int which, Vector_quotation_method_t const *)
intVector_set_size_no_resize(Vector_t * self, Vector_cnt_t size)
intVector_set_size_raw(Vector_t * self, Vector_cnt_t size)
Vector_t *Vector_subvector(Vector_t const * self, Vector_index_t start_index, Vector_cnt_t size, Global_ERWIN_BOOL docopy)
intVector_swap_erase_flags(Vector_t * self, Vector_index_t index, Vector_cnt_t number_of_elements_to_delete, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL delete_elems)
voidVector_vformat(Vector_t * self, Tchar const * format, va_list)
boolerwin_nonnegative(char)
boolerwin_nonnegative(char x)
boolerwin_nonnegative(signed char)
boolerwin_nonnegative(signed char x)
boolerwin_nonnegative(signed short int)
boolerwin_nonnegative(signed short x)
boolerwin_nonnegative(signed int)
boolerwin_nonnegative(signed int x)
boolerwin_nonnegative(signed long int)
boolerwin_nonnegative(signed long x)
boolerwin_nonnegative(ERWIN_LONG_LONG)
boolerwin_nonnegative(ERWIN_LONG_LONG x)
boolerwin_nonnegative(float)
boolerwin_nonnegative(float x)
boolerwin_nonnegative(double)
boolerwin_nonnegative(double x)
boolerwin_nonnegative(long double)
boolerwin_nonnegative(long double x)
boolerwin_nonnegative(bool)
boolerwin_nonnegative(bool)
boolerwin_nonnegative(unsigned char)
boolerwin_nonnegative(unsigned char)
boolerwin_nonnegative(unsigned short int)
boolerwin_nonnegative(unsigned short int)
boolerwin_nonnegative(unsigned int)
boolerwin_nonnegative(unsigned int)
boolerwin_nonnegative(unsigned long int)
boolerwin_nonnegative(unsigned long int)
boolerwin_nonnegative(ERWIN_UNSIGNED_LONG_LONG)
boolerwin_nonnegative(ERWIN_UNSIGNED_LONG_LONG)


Detailed Descriptions


Global_ERWIN_EXPORT Vector_t * Vector_new ()

Create a new vector with default values. I.e., with the default zero element Vector_ZERO and the default initial hash table size of Vector_INITIAL_SIZE.

Declaration  ]


#if Vector_DYN_ZERO

Global_ERWIN_EXPORT Vector_t * Vector_new_with_zero (oTypeTouched zero)

Create a vector specifying the zero element.

#endif
Declaration  ]


#if Vector_DYN_ZERO

Global_ERWIN_EXPORT Vector_t * Vector_new_with_zero_and_initial_size (oTypeTouched zero, Vector_cnt_t initial_size)

Create a new, empty vector. The first form uses Global_oType_zero as the zero element.

If initial_size < 0

the default size Vector_INITIAL_SIZE will be used.

If initial_size == 0 but Vector_MINIMAL_SIZE > 0

a size of 1 will be used.

Note

The vector always has size==0 even if initial_size > 0. This initial size is the size of the data structure used. The vector does not resize it until the vector becomes larger than that.

#endif
Declaration  ]


Global_ERWIN_EXPORT Vector_t * Vector_new_with_initial_size (Vector_cnt_t initial_size)

Initialise with a given table size. See Vector_new_with_zero_and_initial_size.

Declaration  ]


Global_ERWIN_EXPORT Vector_t * Vector_new_from_raw (oTypeVar * contents, Vector_cnt_t nentries, Vector_cnt_t allocsize)

This makes a vector from contents. It 'steals' the pointer and makes it its internal vector table. It is assumed that we can (re/de)allocate the contents using the normal Global_ERWIN_TMALLOC/REALLOC/CMALLOC/FREE mechanism.

Initial_size is the amount of memory that is allocated. You can safely pass less than nentries, meaning we should assume that there are only nentries allocated cells (this is safe behaviour). If you know the amount that is allocated, you should pass it to this function to improve performance by preventing unnecessary reallocations.

If you want to copy contents into a vector, use _new_with_initial_size and _append_raw instead.

If contents is NULL or allocsize is 0, then we invoke new_with_initial_size instead, so whether you get a vector that has no allocated table at all depends on the setting of Vector_ZERO_SIZE. By default, table with Vector_INITIAL_SIZE will be allocated.

If allocsize is non-zero, Vector_MINIMAL_SIZE is ignored (as with the constructors that contain _with_initial_size), so you may allocate smaller vectors. (A size of 0, however, is special, see previous paragraph.)

Declaration  ]


#if Vector_DYN_ZERO

Global_ERWIN_EXPORT Vector_t * Vector_new_from_raw_with_zero (oTypeVar * contents, Vector_cnt_t nentries, Vector_cnt_t allocsize, oTypeTouched zero)

Same as before but with a given zero element.

#endif
Declaration  ]


Global_ERWIN_EXPORT int Vector_init (Vector_t * self)

This is for initialising non-heap Vector_t objects that are allocated manually (thus, not via Vector_new).

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


#if Vector_DYN_ZERO

Global_ERWIN_EXPORT int Vector_init_with_zero_and_initial_size (Vector_t * self, oTypeTouched zero, Vector_cnt_t initial_size)

This is for initialising non-heap Vector_t objects that are allocated manually (thus, not via Vector_new).

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

#endif
Declaration  ]


Global_ERWIN_EXPORT int Vector_init_with_initial_size (Vector_t * self, Vector_cnt_t initial_size)

This is for initialising non-heap Vector_t objects.

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT void Vector_destroy (Vector_t * self)

This is for deleting non-heap Vector_t objects.

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


#if !Global_ERWIN_GLOBAL_ERRNO

Global_ERWIN_EXPORT int Vector_errno (Vector_t const *)

If you compiled Erwin with Global_ERWIN_THREAD_SAFE, this is the way to get the status code of a given vector.

If you do not have a thread-safe Erwin library, there is a macro with the same name as this function.

Error Codes

The operation is always successful (not thinking of assertion failures).

#endif
Declaration  ]


Global_ERWIN_EXPORT Vector_t * Vector_copy (Vector_t const * self)

Copies a vector with all its elements and returns that copy.

Declaration  ]


Global_ERWIN_EXPORT Vector_t * Vector_copy_err (Vector_t const * self, int * err)

Like Vector_copy but sets *err to 1 on failure.

Declaration  ]


Global_ERWIN_EXPORT Vector_t * Vector_subvector (Vector_t const * self, Vector_index_t start_index, Vector_cnt_t size, Global_ERWIN_BOOL docopy)

Copies only a portion of the vector. The semantics of the parameters is like in Vector_insert_subvector.

Declaration  ]


Global_ERWIN_EXPORT void Vector_delete (Vector_t * self)

Deletes everything in the vector and the vector structure itself. Vector_delete is NULL safe (self may be NULL without crash or failed assertion).

Declaration  ]


Global_ERWIN_EXPORT oTypeResult Vector_first (Vector_t const * self)

Returns the first element of the vector. This is the same as

Vector_nth (self, 0)

Declaration  ]


Global_ERWIN_EXPORT oTypeResult Vector_last (Vector_t const * self)

Returns the last element of the vector

This is the same as

Vector_nth (self, Vector_nentries (self) - 1)

Declaration  ]


ERWIN_STATIC_INLINE oType const * Vector_nth_ptr_const (Vector_t const * self, Vector_index_t idx)

Like Vector_nth_ptr, but constant in input and output type.

Does not output anything to stderr even if you define Global_ERWIN_VERBOSE.

Dev.Note: not pure with ALLOW_OUTOFRANGE option.

Declaration  ]


ERWIN_STATIC_INLINE oType const * Vector_nth_ptr_check_const (Vector_t const * self, Vector_index_t idx)

Like Vector_nth_ptr_check, but constant in input and output type.

Does not output anything to stderr even if you define Global_ERWIN_VERBOSE.

Dev.Note: not pure with ALLOW_OUTOFRANGE option.

Declaration  ]


ERWIN_STATIC_INLINE oType const * Vector_nth_ptr_char_const (Vector_t const * self, Vector_index_t idx)

Like Vector_nth_ptr_char, but constant in input and output type.

Note that despite the 'const', this zero-terminates the vector just like Vector_nth_ptr_char() and Vector_as_array().

Does not output anything to stderr even if you define Global_ERWIN_VERBOSE.

Declaration  ]


Global_ERWIN_EXPORT int Vector_erase_flags (Vector_t * self, Vector_index_t index, Vector_cnt_t number_of_elements_to_delete, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL delete_elems)

Like Vector_erase but you can specify whether

Returns its success.

Declaration  ]


Global_ERWIN_EXPORT int Vector_swap_erase_flags (Vector_t * self, Vector_index_t index, Vector_cnt_t number_of_elements_to_delete, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL delete_elems)

Like Vector_swap_erase but you can specify whether

  1. the vector should be re-allocated by resize

  2. elements should be freed by delete_elems.

Returns its success.

Declaration  ]


Global_ERWIN_EXPORT Vector_cnt_t Vector_erase_if (Vector_t * self, Vector_feature_t feature, Global_ERWIN_BOOL value)

Erases those elements that satisfy feature. You can specify which value feature must return for the element in order to trigger that deletion. So if value is Global_ERWIN_FALSE, the feature described by feature is negated.

The values erased from the vector are freed using oType_OFREE.

Returns the number of elements cut out of the vector.

Note

In CommonLisp, this is called remove-if.

Declaration  ]


Global_ERWIN_EXPORT Vector_cnt_t Vector_erase_if_flags (Vector_t * self, Vector_feature_t feature, Global_ERWIN_BOOL value, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL dealloc)

Additional to Vector_erase_if, you can specify whether to resize the vector or whether to deallocate the elements that are cut out.

Returns the number of elements cut out of the vector.

Declaration  ]


Global_ERWIN_EXPORT int Vector_chop_flags (Vector_t * self, Vector_cnt_t count, Global_ERWIN_BOOL resize, Global_ERWIN_BOOL delete_elems)

Like Vector_chop you can specify the deallocation behaviour.

Returns its success.

Declaration  ]


Global_ERWIN_EXPORT int Vector_set_size_no_resize (Vector_t * self, Vector_cnt_t size)

Set the vector size (by shrinking or enlarging and filling with null elements). When shrinking, no resizing of the table will be done.

Returns its success.

Declaration  ]


Global_ERWIN_EXPORT int Vector_set_size_raw (Vector_t * self, Vector_cnt_t size)

Set the vector size by shrinking or enlarging without, resizing, deallocation and without filling with null elements.

This function similar to Vector_set_size_no_resize: when shrinking, no resizing will be done. Further, this function does not free any elements during shrinking, so that the elements up to the allocation size will remain in memory unmodified. When enlarging the vector up to the allocation size, this function will not initialise the data.

This function is useful if you want to temporarily hide elements at the end of the vector. E.g. when handling heaps where the vector size is different from the heap size. See Vector_make_heap.

BE CAREFUL: if you use this function to shrink the vector, and then use it to enlarge the vector to a size greater than the original size, then there will be uninitialised elements. Basic initialisation (constructor invocation) is performed when the vector needs to be reallocated to enlarged it, however. But no null element is ever written by this function.

Returns its success.

Declaration  ]


#if defined(Global_ERWIN_COMPILING) || !defined(NDEBUG)

Global_ERWIN_EXPORT Global_ERWIN_BOOL Vector_empty (Vector_t const * self)

Returns whether the vector contains no elements.

#endif
Declaration  ]


Global_ERWIN_EXPORT Vector_element_ptr_t Vector_find_ptr (Vector_t const * self, Vector_index_t start, oTypeParam needle)

Like Vector_find but returns a pointer to the found item or NULL on failure.

Declaration  ]


Global_ERWIN_EXPORT Vector_element_ptr_t Vector_rfind_ptr (Vector_t const * self, Vector_index_t start, oTypeParam needle)

Like Vector_rfind but returns a pointer to the found item or NULL on failure.

Declaration  ]


ERWIN_WRAPPER Global_hashval_t Vector_hash (Vector_t const *)

Same as Vector_hash_raw() now that hash_raw() is good enough.

Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_set_quotation_method (Vector_t const * self, int which, Vector_quotation_method_t const *)

Set new quotation methods for the `s' and `v' formats. `which' may only be Global_FO_QUOTE_USER1 or Global_FO_QUOTE_USER2.

self is needed to set the status code.

This function is not thread safe, even if you define Global_ERWIN_THREAD_SAFE. There is only one array of user quotation methods. If you change it, do it at the beginning of your program in the main thread!

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT Vector_quotation_method_t const * Vector_get_quotation_method (Vector_t const * self, int which)

Get quotation methods. Which must be from the Global_FO_QUOTE_* family.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_format (Vector_t * self, Tchar const * format, ...)

See Vector_oformat.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_vformat (Vector_t * self, Tchar const * format, va_list)

See Vector_oformat.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_oformat (Vector_t * self, unsigned long int options, Tchar const * format, ...)

The format is as in the printf family according to C99 standard. These functions will never cause a buffer overflow. The \type(long long) type (64 bits integer) is supported if the compiler supports one. Its format character is 'll', but `L' is also understood.

This function reimplements the whole printf functionality, so if you do not like this overhead, you can define Vector_NO_FORMAT, but because of the guaranteed prevention of buffer overflows, it is usually good to use this.

To keep ANSI/ISO conformance (ISO/IEC 9899:1999 = C99), all extra functionality has been put into the additional `options' argument. The following format options are supported:

d, i, u, o, x, X, c, s, m, pconversion, own implementation
e, E, f, F, g, G, a, Aconversions passed through to standard library
#, 0, -, SPACEflags
h, hh, l, ll, L, j, z, tlength

Note

Use ll with integers only and L with floats only to be compliant with POSIX. (Erwin treats both exactly the same just like glibc.)

Currently unsupported
$argument reordering
nnumber of characters written so far
Compatibility

For compatibility, the following are implemented (don't use if you want to be POSIX compliant).

Cuse lc instead
Suse ls instead
Zuse z instead
quse ll instead
L + intuse ll instead
ll + floatuse L instead
l + floatdouble instead of float
' (apostrophy)No locale support: always digit width 3, separator=' '

Note

FO_RADIX(64) uses base-64 digits, but is not mmencode compatible, as the base64 encoding works on chunks of 3 bytes which are interpreted as 4 6-bit digits each. The problem is that the digit order is reversed to the normal order, so you cannot easily convert from the format output to real base64 output. Maybe we'll introduce a quotation method for base64 some day.

Further note that you can print negative number with base != 10 by using %d with the option FO_RADIX(...).

Options

You can use the Global_FO_CHECK option to simulate operation. By this, you can check things via the first argument to Vector_rovformat or Vector_roformat. The use of Vector_format_pos() and Vector_format_quoted() is deprecated.

The following options are supported to allow extended functionality. They can be ORed together.

Global_FO_VECTOR

All %p refer to a \type(Vector_t ) instead of to a \type(char ).

Global_FO_UPCASE

Use upper case digits first in numbers (this is needed because there is no %D). e.g.

format (Global_FO_UPCASE + Global_FO_RADIX(23), "%d", 2387)

appends 4BI

Global_FO_CENTER

Selects centering. I.e. in addition to default right adjustment or right adjustment by the - option.

This does not work for floating point arguments (see below) since the clib does not support it.

This can be combined with - to specify that if it cannot be centred exactly, it should be more left adjusted instead of right. E.g.

Vector_oformat (v, Global_FO_CENTER, "%04X", 10)

will append "00A " whereas

Vector_oformat (v, Global_FO_CENTER, "%-04X", 10)

will append "0A  ".

Global_FO_RADIX(radix)

radix: a number between 0 and 64: Switches the radix of the %d, %i, %x and %o command from their default to this number.

The digit set is as follows:

radix <= 36

for %x (lower case): 0..9, a..z and for %X (upper case): 0..9, A..Z

radix = 64

always base64 digits (but different digit order!)

radix > 36 && radix < 64

base64 with only the first radix characters.

Also see the documentation of the Global_FO_RADIX macro to learn about the special radix values of 'd', 'i', 'o', 'x', 'X', 'b', 'e', 'E', 'f', 'F', 'g', 'G', 'a', 'A'.

Global_FO_QUOTE_SHELL

Quotation for Shell: either Unix or Windows, depending on compilation environment: equivalent to Global_FO_QUOTE_BOURNE_SHELL under Unix and te Global_FO_QUOTE_WIN_SHELL under Dos or Windows.

Global_FO_QUOTE_BOURNE_SHELL

Quote for a Bourne shell.

Vector_oformat (FO_QUOTE_BOURNE_SHELL, "%s", "a b!c")

-> a\ b\!c

Global_FO_QUOTE_WIN_SHELL

Quote for a Windows shell.

Vector_oformat (FO_QUOTE_WIN_SHELL, "%s", "a b!c")

-> "a b!c"

Global_FO_QUOTE_C_STRING

Quote in double quoted C syntax. Single quotes are still quoted as \'. This also tries to get maximum compatibility for reading such a string by sometimes quoting although unnecessary since it is known that some buggy compilers may misinterpret something. E.g. someone might read \0001 as only one character. Therefore, the previous is quoted as \000\001.

Vector_oformat (FO_QUOTE_C_STRING, "%s", "a'b\\c\"d\0\7e")

-> "a\'b\\c\"d\000\007e"

This handles NULL and prints it as NULL.

Global_FO_QUOTE_IN_C_STRING

Similar to previous, but does not output enclosing double quotes, so it is suitable for either appending several quoted strings or for quoting in character syntax (single quotes), by manually providing enclosing quotes in the format string.

Vector_oformat (FO_QUOTE_C_STRING, "%s", "a'b\\c\"d\0\7e")

-> a\'b\\c\"d\000\007e

Global_FO_QUOTE_LISP_STRING

CommonLisp quotation: this is like a simple C quotation: basically, only " and \ need quotation.

Vector_oformat (FO_QUOTE_C_STRING, "%s", "a'b\\c\"d")

-> "a'b\\c\"d"

Global_FO_QUOTE_IN_LISP_STRING

Same as before without enclosing double quotes.

Vector_oformat (FO_QUOTE_C_STRING, "%s", "a'b\\c\"d")

-> a'b\\c\"d

Global_FO_QUOTE_FORMAT

Quote to be suitable as a printf format string. I.e., % is quoted as %%. Note that this does not include a C quotation, so when you have a literal string, and want to print a format string in C, you'll need to first quote for format, and then again for C.

Vector_oformat (FO_QUOTE_FORMAT, "%s", "%s")

-> %%s

Global_FO_QUOTE_USER1 ... USER3

User quotation: can be defined by the application by Vector_set_quotation_method().

Of the above, one can be selected: all %s and %c commands will quote their argument according to the given quotation.

Note

Quotation is only done for %s and %c, not for anything else!

Further Note

because it appeared to happened too often, to mix quotation and non-quotation in one format string, you can specify left adjustment without giving a minimal width to switch off quotation. So to switch off quotation for some %s, use %-s.

Note

This will only work if the minimal with is not given at all to prevent confusion:

Vector_oformat (FO_QUOTE_C_STRING, "%s.%-s.%s", "b", "c", "d")

This will append: "b".c."d"

Global_FO_SEP_AT(position)

Position is a number between 0 and 15.

Put commas into a number. E.g.

oformat (Global_FO_SEP_AT(3), "%d", 10000000)

-> 10,000,000

This is equivalent to using "%'d" for an appropriate locale.

The number defines at how many digits this should happen. So Chinese people would perhaps want it between blocks of four digits:

oformat(Global_FO_SEP_AT(4), "%d", 10000000)

-> 1000,0000

(since 1000,0000 = qian1 wan4; qian1 (=1000) wan4 (=10000))

(For some unknown reason, however, it seems that Asian languages with base words up to 10000 (instead of 1000 as most Western European languages) still use separators at all three digits. Why?)

Global_FO_USE_SEP('.')

Define which character to use for digit separation:

E.g Germans might want to format their numbers like this:

oformat(Global_FO_USE_SEP('.') |
        Global_FO_SEP_AT(3), "%d", 10000000)

-> 10.000.000

Format specifiers

- %n: writes the current length of the vector into the given int* pointer. (or short* or long* or long long* if this is indicated by s, l or q).

Note

it writes the absolute length of the vector, NOT the relative length wrt. to the starting length!

Chopping behaviour with quoted strings

When using both width arguments, characters will never be output in halves (or other pieces). Instead, the string is tried to be kept shorter. Sometimes this is not possible (e.g. when the length of the prefix + suffix exceeds the total width). In rare cases the string will therefore be longer. This behaviour is useful for breaking strings over several lines.

If you specify the exact length argument, the string will still not be expanded or chopped. (e.g. %80.78s will produce lines which are always 80 characters wide and which contain at most 78 characters representing a string and which will be padded with spaces to the right):

Example

Vector_oformat(Global_FO_SHELL_QUOTE, "%7.5s", "Du da!")
  // This means: max. 5 chars, min.7 resulting in padding.)

appends Du\ d  

The number of characters read from the input string can be retrieved by using Vector_roformat() or Vector_rovformat() and reading it from the resulting info structure.

E.g. the following loop generates a C parsable string which does not exceed 78 characters on each line:

int print_c_string (Vector_t *v, char const *c)
{
    Vector_format_info_t info;
    do {
        Vector_roformat (&info, Global_FO_QUOTE_C_STRING, v, "%.78s\n", c);
        c+= info.pos;
    } while (Global_VECTOR_IS_OK(Global_vector_errno) && *c != '\0');
}

If more than one l, q, h and Z flag is given, the last one will be used.

Note

float and double formatations are passed to the standard library. So whether e.g. long double is implemented depends on your clib. This includes the `a' and `A' conversions (GNU).

Further Note

oType_ZERO will be used! This means that if it is != '\0', the %s argument will terminate printing at the first character equal to oType_ZERO.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_ovformat (Vector_t * self, unsigned long int options, Tchar const * format, va_list arguments)

See Vector_oformat.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_format_info_init (Vector_format_info_t *)

Initialises a Vector_format_info_t structure. Only required for C code. In C++, the constructor is used for this.

A Vector_format_info_t structure must be initialised before invoking Vector_rovformat() with a pointer to it.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_format_info_done (Vector_format_info_t *)

Sweeps a Vector_format_info_t structure. Only required for C code. In C++, the destructor is used for this.

A Vector_format_info_t structure must be sweeps before deallocation.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_roformat (Vector_format_info_t * info, Vector_t * self, unsigned long int options, Tchar const * format, ... arguments)

Additional to Vector_oformat it stores information about the performed formatting in info. Use this in favour of Vector_format_quoted to retrieve information you need.

#endif
Declaration  ]


#if Vector_NO_FORMAT == 0

Global_ERWIN_EXPORT void Vector_rovformat (Vector_format_info_t * info, Vector_t * self, unsigned long int options, Tchar const * format, va_list arguments)

Additional to Vector_ovformat it stores information about the performed formatting in info. Use this in favour of Vector_format_quoted to retrieve information you need.

#endif
Declaration  ]


#if (Vector_NO_FORMAT == 0) && Global_ERWIN_GLOBAL_ERRNO

Global_ERWIN_EXPORT Global_ERWIN_BOOL Vector_format_quoted ()

DEPRECATED

Use

Vector_roformat (&info, FO_CHECK ...

Was quotation ever necessary during the format?

This function is not thread safe. It uses global variables. Therefore, this function is not available when you compile with thread support (Global_ERWIN_THREAD_SAFE). Use Vector_rovformat or Vector_roformat.

#endif
Declaration  ]


#if (Vector_NO_FORMAT == 0) && Global_ERWIN_GLOBAL_ERRNO

Global_ERWIN_EXPORT Vector_index_t Vector_format_pos ()

DEPRECATED

Use

Vector_roformat (&info, FO_CHECK ...

Returns how many characters were read from the last %s command.

This function is not thread safe. It uses global variables. Therefore, this function is not available when you compile with thread support (Global_ERWIN_THREAD_SAFE). Use Vector_rovformat or Vector_roformat.

#endif
Declaration  ]


ERWIN_WRAPPER Vector_t * Global_erwin_ptr_of (Vector_t * x)

Declaration & Source  ]


ERWIN_WRAPPER Vector_t * Global_erwin_ptr_of (Vector_t & x)

Declaration & Source  ]


ERWIN_WRAPPER Vector_t const * Global_erwin_ptr_const_of (Vector_t const * x)

Declaration & Source  ]


ERWIN_WRAPPER Vector_t const * Global_erwin_ptr_const_of (Vector_t const & x)

Declaration & Source  ]


#if Vector_POSITION_POINTER

ERWIN_WRAPPER Vector_index_t * Vector_pos_ptr (Vector_t *)

#endif
Declaration  ]


#if Vector_POSITION_POINTER

ERWIN_WRAPPER Vector_index_t * Vector_pos_ptr (Vector_t * x)

#endif
Declaration & Source  ]


#if Vector_POSITION_POINTER

ERWIN_WRAPPER Vector_index_t Vector_pos (Vector_t *)

#endif
Declaration  ]


#if Vector_POSITION_POINTER

ERWIN_WRAPPER Vector_index_t Vector_pos (Vector_t * x)

#endif
Declaration & Source  ]


#if Vector_POSITION_POINTER

ERWIN_WRAPPER void Vector_set_pos (Vector_t *, Vector_index_t)

#endif
Declaration  ]


#if Vector_POSITION_POINTER

ERWIN_WRAPPER void Vector_set_pos (Vector_t * x, Vector_index_t y)

#endif
Declaration & Source  ]


#if defined(Vector_INLINE__NTH)

ERWIN_STATIC_INLINE oTypeResult Vector_nth (Vector_t const * self, Vector_index_t idx)

#endif
Declaration & Source  ]


#if defined(Vector_INLINE__NENTRIES)

ERWIN_STATIC_INLINE Vector_cnt_t Vector_nentries (Vector_t const * self)

#endif
Declaration & Source  ]


#if defined(Vector_INLINE__NENTRIES)

ERWIN_STATIC_INLINE Global_ERWIN_BOOL Vector_empty (Vector_t const * self)

#endif
Declaration & Source  ]


Global_ERWIN_EXPORT Map_t * Map_new ()

--BEGIN-C--

Return a new map with default settings. I.e., with the default zero element Map_ZERO and the default initial hash table size of Map_INITIAL_SIZE.

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT Map_t * Map_new_with_initial_size (int initial_size)

Create a new map with a given initial hash table. This is useful whenever you know how many entries you will have.

The number you pass is interpreted as the number of elements. The real hash size that will be used will be computed in such a way that no rehash will occur when inserting the number of elements given. Note that a single deletion of an element may still trigger a rehash, only when only inserting the elements, no rehash is guaranteed.

If initial_size < 0 the default size Map_INITIAL_SIZE will be used. If initial_size == 0 but Map_MINIMAL_SIZE > 0, a size of 1 will be used.

With the default value of the re-hash parameters, a re-hash will be done when the map has more than 80% entries compared to the hash table size. So if you intend to insert 80 entries, you must specify more than 100 for the initial size. To be precise, you must specify more than Map_TRIGGER_NUMERATOR * 80 / Map_TRIGGER_DENOMINATOR.

Error Codes (errno)

Declaration  ]


#if Map_DYN_ZERO

Global_ERWIN_EXPORT Map_t * Map_new_with_zero (oTypeTouched zero)

zero will eventually be tried to be copied! So if you provide oType_OCOPY, make sure it handles the zero element appropriately.

Error Codes (errno)

#endif
Declaration  ]


#if Map_DYN_ZERO

Global_ERWIN_EXPORT Map_t * Map_new_with_zero_and_initial_size (oTypeTouched zero, int initial_size)

Create a new, empty map. The first form uses Global_oType_zero as the zero element.

If initial_size < 0 the default size Map_INITIAL_SIZE will be used. If initial_size == 0 but Map_MINIMAL_SIZE > 0, a size of 1 will be used.

Error Codes (errno)

#endif
Declaration  ]


Global_ERWIN_EXPORT int Map_init (Map_t * self)

This is for initialising non-heap Map_t objects.

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


#if Map_DYN_ZERO

Global_ERWIN_EXPORT int Map_init_with_zero_and_initial_size (Map_t * self, oTypeTouched zero, int initial_size)

This is for initialising non-heap Map_t objects that are allocated manually (thus, not via Map_new).

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

#endif
Declaration  ]


Global_ERWIN_EXPORT int Map_init_with_initial_size (Map_t * self, int initial_size)

This is for initialising non-heap Map_t objects.

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT void Map_destroy (Map_t * self)

This is for deleting non-heap Map_t objects.

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT void Map_destroy_flags (Map_t * self, Global_ERWIN_BOOL destroy_keys, Global_ERWIN_BOOL destroy_values)

Same as Map_destroy with the possiblity to determine what to destroy.

Invoking this function manually is usually discouraged. It is thought to be for nesting data structures. However, if you need to optimise heap usage, it is ok to use this function.

Error Codes (errno)

Declaration  ]


#if !Global_ERWIN_GLOBAL_ERRNO

Global_ERWIN_EXPORT int Map_errno (Map_t const *)

If the library was compiled with Global_ERWIN_THREAD_SAFE, this is the way to retrieve the status code of a map.

If you do not have a thread-safe Erwin library, there is a macro with the same name as this function.

Error Codes

The operation is always successful (not thinking of assertion failures).

#endif
Declaration  ]


Global_ERWIN_EXPORT Map_t * Map_copy (Map_t const * self)

Copies the map with all its keys and elements

NULL is allowed and passed through.

Don't use as a copy function for other Erwin structures. Use _copy_err instead.

Error Codes (errno)

Note that a rehash warning means that the operation was successfully completed. However, there may be serious problems like heap corruption, so handling this as an error is not a bad idea.

Declaration  ]


Global_ERWIN_EXPORT Map_t * Map_copy_err (Map_t const * self, int * err)

Copies the map with all its keys and elements. *err will be set to 1 if an error occurs.

Error Codes (errno)

Note that a rehash warning means that the operation was successfully completed. However, there may be serious problems like heap corruption, so handling this as an error is not a bad idea.

Declaration  ]


Global_ERWIN_EXPORT void Map_delete (Map_t * self)

Deletes everything in the map and the map structure itself

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT void Map_delete_flags (Map_t * self, Global_ERWIN_BOOL destroy_keys, Global_ERWIN_BOOL destroy_values)

Deletes only the map structure, not the entries. This is useful if you got the entries via Map_get_{values|keys}. Map_delete_flat (a, true, true) is the same as Map_delete (a);

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT int Map_insert (Map_t * self, iTypeTouched key)

Declaration  ]


Global_ERWIN_EXPORT int Map_find_any_pair (Map_key_result_t *, Map_t const * self)

Declaration  ]


Global_ERWIN_EXPORT oTypeVar Map_remove_no_resize (Map_t * self, iTypeTouched index)

Like Map_remove, but does not shrink the internal hash table.

Error Codes (errno)

Note that a warning means that the operation was successfully completed.

Declaration  ]


Global_ERWIN_EXPORT int Map_erase_no_resize (Map_t * self, iTypeTouched index)

Same as Map_erase, but does not shrink the internal hash table.

Error Codes (errno)

Note that a warning means that the operation was successfully completed.

Declaration  ]


Global_ERWIN_EXPORT int Map_erase_map_no_resize (Map_t * self, Map_t const * other)

Like Map_erase_map, but does not shrink the internal hash table.

Error Codes (errno)

Note that a warning means that the operation was successfully completed.

Declaration  ]


Global_ERWIN_EXPORT int Map_poke (iType * key_out, Map_t * self, iTypeTouched key, Global_ERWIN_BOOL introduce)

Declaration  ]


Global_ERWIN_EXPORT int Map_poke_no_icopy (iType * key_out, Map_t * self, iTypeVarParam key, Global_ERWIN_BOOL introduce)

Declaration  ]


Global_ERWIN_EXPORT int Map_cmp_keys (Map_t const * self, Map_t const * other)

Returns whether the set of keys in the map is equal.

Note

This operation is quite expensive. Use keys_equal if that is sufficient.

Further Note

Calling this results in a runtime error if either Global_iType_CMP is not defined.

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT Global_ERWIN_BOOL Map_equal_keys (Map_t const * self, Map_t const * other)

Returns whether the set of keys in the map is equal.

Note

This operation is quite expensive but less expensive than Map_keys_cmp

Error Codes (errno)

Declaration  ]


ERWIN_WRAPPER Global_hashval_t Map_hash (Map_t const *)

Same as Map_hash_raw() now that hash_raw() is good enough.

Declaration  ]


Global_ERWIN_EXPORT void Map_clear_flags_no_resize (Map_t * self, Global_ERWIN_BOOL destroy_keys, Global_ERWIN_BOOL destroy_values)

Like Map_clear_flags, but does not shrink the internal hash table.

Error Codes (errno)

Declaration  ]


Global_ERWIN_EXPORT Global_ERWIN_BOOL Map_expect_size (Map_t * self, int newsize)

Declare that the immediately following action will insert or delete elements so that the new number of elements will be newsize. This will possibly rehash to a hash size that requires no rehashes during the following operation. Note: this only works if you consistently insert or consistently delete elements. If you mix the operations, further rehashes might occur.

Returns whether a rehash was performed.

Error Codes (errno)

Note that a rehash warning means that the operation was successfully completed. However, there may be serious problems like heap corruption, so handling this as an error is not a bad idea.

Declaration  ]


ERWIN_WRAPPER Map_t * Global_erwin_ptr_of (Map_t * x)

Declaration & Source  ]


ERWIN_WRAPPER Map_t * Global_erwin_ptr_of (Map_t & x)

Declaration & Source  ]


ERWIN_WRAPPER Map_t const * Global_erwin_ptr_const_of (Map_t const * x)

Declaration & Source  ]


ERWIN_WRAPPER Map_t const * Global_erwin_ptr_const_of (Map_t const & x)

Declaration & Source  ]


Global_ERWIN_EXPORT List_t * List_new ()

Create a new list with default values. I.e., with the default zero element List_ZERO and the default initial hash table size of List_INITIAL_SIZE.

Declaration  ]


#if List_DYN_ZERO

Global_ERWIN_EXPORT List_t * List_new_with_zero (oTypeTouched zero)

Create a list specifying the zero element.

#endif
Declaration  ]


Global_ERWIN_EXPORT oTypeResult List_zero (List_t const * self)

Declaration  ]


#if !Global_ERWIN_GLOBAL_ERRNO

Global_ERWIN_EXPORT int List_errno (List_t const *)

If you compiled Erwin with Global_ERWIN_THREAD_SAFE, this is the way to get the status code of a given list.

If you do not have a thread-safe Erwin library, there is a macro with the same name as this function.

Error Codes

The operation is always successful (not thinking of assertion failures).

#endif
Declaration  ]


Global_ERWIN_EXPORT List_t * List_copy (List_t const * self)

Copies a list with all its elements and returns that copy.

Declaration  ]


Global_ERWIN_EXPORT List_t * List_copy_err (List_t const * self, int * err)

Like List_copy but sets *err to 1 on failure.

Declaration  ]


Global_ERWIN_EXPORT void List_delete (List_t * self)

Deletes everything in the list and the list structure itself. List_delete is NULL safe (self may be NULL without crash or failed assertion).

Declaration  ]


Global_ERWIN_EXPORT Global_list_key_t List_previous_raw (Global_list_key_t key)

Returns the previous element in the list or NULL if non exists.

If key == Global_LIST_KEY_ZERO, this function cannot return List_back(), because the list pointer is not given. Instead, it returns Global_LIST_KEY_ZERO again.

Declaration  ]


Global_ERWIN_EXPORT Global_list_key_t List_next_raw (Global_list_key_t key)

Returns the next element in the list or NULL if non exists

If key == Global_LIST_KEY_ZERO, this function cannot return List_front(), because the list pointer is not given. Instead, it returns Global_LIST_KEY_ZERO again.

Declaration  ]


Global_ERWIN_EXPORT oTypeResult List_value_raw (Global_list_key_t key)

Returns the value for the given key or the zero element.

Invocation is only valid for key != Global_LIST_KEY_ZERO.

Declaration  ]


Global_ERWIN_EXPORT Global_hashval_t List_hash_raw (List_t const *)

Returns a hash value, which is derived from hash values for oType.

Note

Usually you want hash values if you work with maps. So you should define the hash value in such a way that both the map header as well as the list header find them.

Further Note

This will only be implemented if Global_oType_HASH_RAW is defined.

Declaration  ]


ERWIN_WRAPPER Global_hashval_t List_hash (List_t const *)

Same as List_hash_raw() now that hash_raw() is good enough.

Declaration  ]


ERWIN_WRAPPER Global_hashval_t List_hash (List_t const * x)

Declaration & Source  ]


ERWIN_WRAPPER List_t * Global_erwin_ptr_of (List_t * x)

Declaration & Source  ]


ERWIN_WRAPPER List_t * Global_erwin_ptr_of (List_t & x)

Declaration & Source  ]


ERWIN_WRAPPER List_t const * Global_erwin_ptr_const_of (List_t const * x)

Declaration & Source  ]


ERWIN_WRAPPER List_t const * Global_erwin_ptr_const_of (List_t const & x)

Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char Global_char_to_upper (char)

These are in base.c but are needed here already.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char Global_char_to_lower (char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash2 (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash2 (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash3 (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash3 (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash4 (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_hash4 (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_mul9 (Global_hashval_t x)

Internal function, do not use! It may change or disappear without notice!

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_mul9 (Global_hashval_t x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && !defined(Global_erwin_mul_x1_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_mul_x1 (Global_hashval_t x)

Internal function, do not use! It may change or disappear without notice!

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && !defined(Global_erwin_mul_x1_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_mul_x1 (Global_hashval_t x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && !defined(Global_erwin_u16_hash_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u16_hash (ERWIN_U16 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && !defined(Global_erwin_u16_hash_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u16_hash (ERWIN_U16 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && !defined(Global_erwin_u32_hash_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u32_hash (ERWIN_U32 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && !defined(Global_erwin_u32_hash_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u32_hash (ERWIN_U32 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_U64) && !defined(Global_erwin_u64_hash_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u64_hash (ERWIN_U64 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_U64) && !defined(Global_erwin_u64_hash_defined)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u64_hash (ERWIN_U64 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_short_hash (unsigned short x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_short_hash (unsigned short x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_int_hash (unsigned int x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_int_hash (unsigned int x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_long_hash (unsigned long x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_long_hash (unsigned long x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && (defined(ERWIN_UNSIGNED_LONG_LONG) && defined(ERWIN_U64))

ERWIN_WRAPPER Global_hashval_t Global_long_long_hash (ERWIN_UNSIGNED_LONG_LONG x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && (defined(ERWIN_UNSIGNED_LONG_LONG) && defined(ERWIN_U64))

ERWIN_WRAPPER Global_hashval_t Global_long_long_hash (ERWIN_UNSIGNED_LONG_LONG x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_voidp_hash (void const * x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_voidp_hash (void const * x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_size_t_hash (size_t x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_size_t_hash (size_t x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_hash_voidp (void const * x)

Shoot, this has a bad name. Use voidp_hash() instead. We keep it for compatibility, but mark it deprecated:

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_hash_voidp (void const * x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash2 (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash2 (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash3 (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash3 (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash4 (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_char_case_hash4 (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_make_hash_result (Global_hashval_t, Global_hashval_t)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_make_hash_result (Global_hashval_t h1, Global_hashval_t h2)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_hashval_t Global_erwin_u8_array_hash (ERWIN_U8 const *, size_t)

And another one for hashing memory areas of a given size (with various sizes). All functions take the pointer to the array and the number of elements of the array to be hashed:

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_hashval_t Global_erwin_u8_array_case_hash (ERWIN_U8 const *, size_t)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_hashval_t Global_erwin_u16_array_hash (ERWIN_U16 const *, size_t)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_hashval_t Global_erwin_u32_array_hash (ERWIN_U32 const *, size_t)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_U64)

extern Global_hashval_t Global_erwin_u64_array_hash (ERWIN_U64 const *, size_t)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_array_hash (ERWIN_S8 const * x, size_t s)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_array_hash (ERWIN_S8 const * x, size_t s)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_array_case_hash (ERWIN_S8 const * x, size_t s)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_array_case_hash (ERWIN_S8 const * x, size_t s)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s16_array_hash (ERWIN_S16 const * x, size_t s)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s16_array_hash (ERWIN_S16 const * x, size_t s)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s32_array_hash (ERWIN_S32 const * x, size_t s)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s32_array_hash (ERWIN_S32 const * x, size_t s)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && (defined(ERWIN_U64) && defined(ERWIN_S64))

ERWIN_WRAPPER Global_hashval_t Global_erwin_s64_array_hash (ERWIN_S64 const * x, size_t s)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && (defined(ERWIN_U64) && defined(ERWIN_S64))

ERWIN_WRAPPER Global_hashval_t Global_erwin_s64_array_hash (ERWIN_S64 const * x, size_t s)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u8_hash (ERWIN_S8 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u8_hash (ERWIN_S8 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u8_hash_case (ERWIN_S8 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_u8_hash_case (ERWIN_S8 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_hash (ERWIN_S8 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_hash (ERWIN_S8 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_hash_case (ERWIN_S8 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s8_hash_case (ERWIN_S8 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s16_hash (ERWIN_S16 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s16_hash (ERWIN_S16 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s32_hash (ERWIN_S32 x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_s32_hash (ERWIN_S32 x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && (defined(ERWIN_U64) && defined(ERWIN_S64))

ERWIN_WRAPPER Global_hashval_t Global_erwin_s64_hash (ERWIN_S64 const x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && (defined(ERWIN_U64) && defined(ERWIN_S64))

ERWIN_WRAPPER Global_hashval_t Global_erwin_s64_hash (ERWIN_S64 const x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (bool x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (bool x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (signed char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (signed char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned char x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (short x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (short x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned short x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned short x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (int x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (int x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (long x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (long x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned long x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (unsigned long x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (ERWIN_LONG_LONG x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (ERWIN_LONG_LONG x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (ERWIN_UNSIGNED_LONG_LONG x)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (ERWIN_UNSIGNED_LONG_LONG x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (void const * x)

Pointers

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_erwin_hash (void const * x)

#endif
Declaration & Source  ]


#if !(!defined(Global_ERWIN_ADAM_NAME) && (!defined(Global_ERWIN_THREAD_SAFE) || Global_ERWIN_USE_THREAD_KEYWORD)) && elif

extern int * Global_erwininternalmaperrnoptr ()

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char const * Global_erwininternalmapstrerror (int)

#endif
Declaration  ]


#if !(!defined(Global_ERWIN_ADAM_NAME) && (!defined(Global_ERWIN_THREAD_SAFE) || Global_ERWIN_USE_THREAD_KEYWORD)) && elif

extern int * Global_erwininternalvectorerrnoptr ()

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char const * Global_erwininternalvectorstrerror (int)

#endif
Declaration  ]


#if !(!defined(Global_ERWIN_ADAM_NAME) && (!defined(Global_ERWIN_THREAD_SAFE) || Global_ERWIN_USE_THREAD_KEYWORD)) && elif

extern int * Global_erwininternallisterrnoptr ()

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char const * Global_erwininternalliststrerror (int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed char x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed short int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed short x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed int x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed long int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (signed long x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

ERWIN_WRAPPER bool erwin_nonnegative (ERWIN_LONG_LONG)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

ERWIN_WRAPPER bool erwin_nonnegative (ERWIN_LONG_LONG x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (float)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (float x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (double)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (double x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && SIZEOF_LONG_DOUBLE > 0

ERWIN_WRAPPER bool erwin_nonnegative (long double)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && SIZEOF_LONG_DOUBLE > 0

ERWIN_WRAPPER bool erwin_nonnegative (long double x)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (bool)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (bool)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned char)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned short int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned short int)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned int)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned long int)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER bool erwin_nonnegative (unsigned long int)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_UNSIGNED_LONG_LONG)

ERWIN_WRAPPER bool erwin_nonnegative (ERWIN_UNSIGNED_LONG_LONG)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_UNSIGNED_LONG_LONG)

ERWIN_WRAPPER bool erwin_nonnegative (ERWIN_UNSIGNED_LONG_LONG)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern unsigned long int Global_erwin_strtoul (char const * c, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern long int Global_erwin_strtol (char const * c, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

extern ERWIN_UNSIGNED_LONG_LONG Global_erwin_strtoull (char const * c, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

extern ERWIN_LONG_LONG Global_erwin_strtoll (char const * c, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern unsigned long int Global_erwin_strntoul (char const * c, size_t strlen, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern long int Global_erwin_strntol (char const * c, size_t strlen, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

extern ERWIN_UNSIGNED_LONG_LONG Global_erwin_strntoull (char const * c, size_t strlen, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(ERWIN_LONG_LONG)

extern ERWIN_LONG_LONG Global_erwin_strntoll (char const * c, size_t strlen, char * * endptr = NULL, int base = 0)

Read numbers from string. Use instead of system functions as the clib functions may be broken on some systems. Note, however, that the functions have no overflow checking. (FIXME: implement that).

These functions have the following extensions compared to the standard strto* family:

To disable these extensions, use the following constants in the radix parameter:

And or them with the base. E.g.:

Global_erwin_strtol (x, &r, 16 | Global_ERWIN_NO_UNDERBAR)

SO is short for 'scan option'. (Vectors have a 'format option' and this is the reverse)

NULL is allowed for all pointers. If c == NULL, the result is 0.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern void Global_string_free (char * c)

Overwrites the string before free() to make sure its contents will not be used. Do not use this as a random number generator This is NULL safe.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_string_cmp (char const * a, char const * b)

This compares two strings like the standard strcmp().

This has macro aliases Global_erwin_strcmp().

For Global_erwin_strcmp(a,b) == 0, there is an alias:

Global_erwin_strequ(a,b)

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_memory_cmp (void const * a, void const * b, size_t cnt)

This compares two strings like the standard memcmp().

This has macro aliases Global_erwin_memcmp().

For Global_erwin_strcmp(a,b) == 0, there is an alias:

Global_erwin_strequ(a,b)

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_string_n_cmp (char const * a, char const * b, size_t n)

Replacement for strncmp()

This has macro aliases Global_erwin_strncmp().

For Global_erwin_strncmp(a,b,n) == 0, there is an alias:

Global_erwin_strnequ(a,b,n)

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char * Global_string_string (char const * haystack, char const * needle)

Like strstr: finds a substring.

Has a macro alias Global_erwin_strstr.

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char * Global_string_n_string (char const * haystack, char const * needle, size_t)

Like a potential strnstr: finds a substring for a needle with a limited length.

Has a macro alias Global_erwin_strnstr.

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern void * Global_memory_memory (void const * haystack, size_t haycnt, void const * needle, size_t needlecnt)

Like memmem: finds a substring.

Has a macro alias Global_erwin_memmem.

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_string_case_cmp (char const * a, char const * b)

Like strcasecmp() / stricmp().

This has macro aliases Global_erwin_strcasecmp() and Global_erwin_stricmp

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_string_n_case_cmp (char const * a, char const * b, size_t n)

Like strncasecmp() / strnicmp()

This has macro aliases Global_erwin_strncasecmp() and Global_erwin_strnicmp

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char * Global_string_case_string (char const * haystack, char const * needle)

Like a potential strcasestr: finds a substring case-insensitively.

Has a macro alias Global_erwin_strcasestr.

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char * Global_string_n_case_string (char const * haystack, char const * needle, size_t)

Like a potential strcasestr: finds a substring for a needle with a limited length.

Has a macro alias Global_erwin_strncasestr.

NULL-safe string functions:

These are all NULL safe (NULL < "") comparison functions: Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

Note that the case functions use 'tolower' (via char_to_lower), so that they pay attention to the locale if that function does.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char * Global_string_dup (char const * c, int * err = (int*)NULL)

This DOES NOT change NULL to "(null)" or anything like that. NULL on input returns NULL. Otherwise, the index NULL could not be found after insertion in an array. If there is not enough memory, *err is set to 1. Otherwise, *err is not touched. err may be NULL. In that case, NULL is returned of the system is out of memory.

This has an alias Global_erwin_strdup.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char * Global_string_n_dup (char const * c, size_t n, int * err = (int*)NULL)

Also see Global_string_dup.

This has an alias Global_erwin_strdup.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern void * Global_erwin_memset0 (void * p, size_t start, size_t end_plus_1)

Like memset or bzero, but by using start, you can clear a suffix only. This is internally used to emulate clearing after malloc and realloc. Depending on what is available, the internal implementation uses memset, bzero, or clears with a for loop manually.

The returned pointer is just the one passed to the function. If it is NULL or start >= end_plus_1, no clearing is attempted.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern size_t Global_string_length (char const *)

A NULL-safe replacement for strlen(): NULL has length 0.

This has an alias Global_erwin_strlen.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern size_t Global_string_n_length (char const *, size_t)

A NULL-safe replacement for strnlen(): NULL has length 0.

This has an alias Global_erwin_strnlen.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_erwin_digit_value (char)

Returns the digit value of a given character. Can be used up to a radix of 36. (Probably usually used for hexadecimal digits.)

If the character is invalid, returns 100, which is larger a value than that of any representable digit.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char Global_erwin_get_digit (int digit)

The reverse of the Global_erwin_digit_value. Returns '\0' if digit is not between 0 and 35.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char Global_erwin_get_digit_upper (int digit)

This variant of Global_erwin_get_digit returns upper case letters first.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_string_is_prefix (int * needle_length, char const * haystack, char const * needle)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_string_is_suffix (int * needle_length, char const * haystack, char const * needle)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern char const * Global_erwin_strsignal (int)

This returns NULL if the signal is not known or no name is known.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_alpha (char)

Some character functions. These are wrappers around ctype functions.

extern char Global_char_to_upper (char); declared in map.h

extern char Global_char_to_lower (char); declared in map.h

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_lower (char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_upper (char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_digit (char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_xdigit (char)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_space (char)

'\0' is not space.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_space0 (char)

'\0' is space.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_cr (char)

'\0' is not cr.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern Global_ERWIN_BOOL Global_char_is_cr0 (char)

'\0' is cr.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_string_hash (char const *)

The following functions hash the contents of the strings:

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_string_hash (char const * c)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_string_case_hash (char const *)

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

ERWIN_WRAPPER Global_hashval_t Global_string_case_hash (char const * c)

#endif
Declaration & Source  ]


#if !defined(Global_ERWIN_ADAM_NAME)

void Global_erwin_merge_sort (void * abase, size_t anmemb, size_t asize, Global_erwin_comparison_t acompar)

The stable sort algorithm Mergesort.

Warning: This needs as much additional memory as you have stored in the array being sorted!

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern void Global_erwin_init (int * argc, char ** * argv)

Initialise erwin and all its modules. This might read eventually parse options some time.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME)

extern int Global_erwin_register_init (Global_initializer_t)

The suggested usage is this:

static void module_init (int argc, char **argv) { .... }

static int init_dummy = erwin_register_initialiser (module_init);

module_init will then automatically be called by erwin_init

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(Global_ERWIN_REQUIRE_DETERMINISM)

extern void Global_erwin_set_determinism (Global_ERWIN_BOOL)

Default: Global_ERWIN_TRUE This means: if you define Global_ERWIN_REQUIRE_DETERMINISM, you get Global_ERWIN_TRUE as a default. If you don't, you get Global_ERWIN_FALSE as a default because the whole machinery needed for enforcing determinism is not compiled in.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(Global_ERWIN_REQUIRE_DETERMINISM)

extern Global_ERWIN_BOOL Global_erwin_require_determinism ()

returns the current status of the determinism state.

#endif
Declaration  ]


#if !defined(Global_ERWIN_ADAM_NAME) && defined(Global_ERWIN_NEED_DET_RANDOM)

extern unsigned long int Global_erwin_det_random ()

deterministic random. (haha!) No srand() necessary... Usually, use the frontend Global_ERWIN_RANDOM(N) (defs.h)

#endif
Declaration  ]


#if defined(TYPE_INFO_T) && defined(Global_erwin_kind_t_defined)

extern char const * Global_erwin_kind_to_string (Global_erwin_kind_t)

#endif
Declaration  ]

Index

Stoppt die Vorratsdatenspeicherung
November 26th, 2007
Comments? Suggestions? Corrections? You can drop me a line.
zpentrabvagiktu@theiling.de
Schwerpunktpraxis