diff --git a/include/st.h b/include/st.h index 2276a021e7e..4907a7d390d 100644 --- a/include/st.h +++ b/include/st.h @@ -19,8 +19,7 @@ typedef unsigned long st_data_t; #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP typedef unsigned LONG_LONG st_data_t; #else -#error---->> st.c requires sizeof(void \ - *) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<---- +#error---->> st.c requires sizeof(void *) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<---- #endif #define ST_DATA_T_DEFINED @@ -49,8 +48,7 @@ typedef st_data_t st_index_t; typedef int st_compare_func(st_data_t, st_data_t); typedef st_index_t st_hash_func(st_data_t); -typedef char st_check_for_sizeof_st_index_t - [SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1]; +typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1]; #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP struct st_hash_type { @@ -105,21 +103,17 @@ int st_insert(st_table *, st_data_t, st_data_t); int st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t)); int st_lookup(st_table *, st_data_t, st_data_t *); int st_get_key(st_table *, st_data_t, st_data_t *); -typedef int st_update_callback_func(st_data_t *key, st_data_t *value, - st_data_t arg, int existing); +typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing); /* *key may be altered, but must equal to the old key, i.e., the * results of hash() are same and compare() returns 0, otherwise the * behavior is undefined */ -int st_update(st_table *table, st_data_t key, st_update_callback_func *func, - st_data_t arg); +int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg); int st_foreach(st_table *, int (*)(ANYARGS), st_data_t); int st_foreach_check(st_table *, int (*)(ANYARGS), st_data_t, st_data_t); st_index_t st_keys(st_table *table, st_data_t *keys, st_index_t size); -st_index_t st_keys_check(st_table *table, st_data_t *keys, st_index_t size, - st_data_t never); +st_index_t st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never); st_index_t st_values(st_table *table, st_data_t *values, st_index_t size); -st_index_t st_values_check(st_table *table, st_data_t *values, st_index_t size, - st_data_t never); +st_index_t st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never); void st_add_direct(st_table *, st_data_t, st_data_t); void st_free_table(st_table *); void st_cleanup_safe(st_table *, st_data_t);