| mowgli.h | | mowgli.h | |
| | | | |
| skipping to change at line 79 | | skipping to change at line 79 | |
| #include "mowgli_bitvector.h" | | #include "mowgli_bitvector.h" | |
| #include "mowgli_hook.h" | | #include "mowgli_hook.h" | |
| #include "mowgli_signal.h" | | #include "mowgli_signal.h" | |
| #include "mowgli_error_backtrace.h" | | #include "mowgli_error_backtrace.h" | |
| #include "mowgli_random.h" | | #include "mowgli_random.h" | |
| #include "mowgli_ioevent.h" | | #include "mowgli_ioevent.h" | |
| #include "mowgli_argstack.h" | | #include "mowgli_argstack.h" | |
| #include "mowgli_object_messaging.h" | | #include "mowgli_object_messaging.h" | |
| #include "mowgli_object_metadata.h" | | #include "mowgli_object_metadata.h" | |
| #include "mowgli_global_storage.h" | | #include "mowgli_global_storage.h" | |
|
| | | #include "mowgli_string.h" | |
| | | | |
| MOWGLI_DECLS_END | | MOWGLI_DECLS_END | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| mowgli_config.h | | mowgli_config.h | |
| | | | |
| skipping to change at line 133 | | skipping to change at line 133 | |
| slash. */ | | slash. */ | |
| #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | |
| | | | |
| /* Define to the address where bug reports for this package should be sent.
*/ | | /* Define to the address where bug reports for this package should be sent.
*/ | |
| #define PACKAGE_BUGREPORT "bugs+libmowgli@atheme.org" | | #define PACKAGE_BUGREPORT "bugs+libmowgli@atheme.org" | |
| | | | |
| /* Define to the full name of this package. */ | | /* Define to the full name of this package. */ | |
| #define PACKAGE_NAME "libmowgli" | | #define PACKAGE_NAME "libmowgli" | |
| | | | |
| /* Define to the full name and version of this package. */ | | /* Define to the full name and version of this package. */ | |
|
| #define PACKAGE_STRING "libmowgli 0.2.0" | | #define PACKAGE_STRING "libmowgli 0.3.0" | |
| | | | |
| /* Define to the one symbol short name of this package. */ | | /* Define to the one symbol short name of this package. */ | |
| #define PACKAGE_TARNAME "libmowgli" | | #define PACKAGE_TARNAME "libmowgli" | |
| | | | |
| /* Define to the version of this package. */ | | /* Define to the version of this package. */ | |
|
| #define PACKAGE_VERSION "0.2.0" | | #define PACKAGE_VERSION "0.3.0" | |
| | | | |
| /* Define the shared module suffix extension on your platform. */ | | /* Define the shared module suffix extension on your platform. */ | |
| #define SHARED_SUFFIX ".so" | | #define SHARED_SUFFIX ".so" | |
| | | | |
| /* Define to 1 if you have the ANSI C header files. */ | | /* Define to 1 if you have the ANSI C header files. */ | |
| #define STDC_HEADERS 1 | | #define STDC_HEADERS 1 | |
| | | | |
| /* Define to empty if `const' does not conform to ANSI C. */ | | /* Define to empty if `const' does not conform to ANSI C. */ | |
| /* #undef const */ | | /* #undef const */ | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| mowgli_dictionary.h | | mowgli_dictionary.h | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| | | | |
| struct mowgli_dictionary_; /* defined in src/dictionary.c */ | | struct mowgli_dictionary_; /* defined in src/dictionary.c */ | |
| | | | |
| typedef struct mowgli_dictionary_ mowgli_dictionary_t; | | typedef struct mowgli_dictionary_ mowgli_dictionary_t; | |
| | | | |
| /* | | /* | |
| * mowgli_dictionary_elem_t is a child of node_t, which adds a key field. | | * mowgli_dictionary_elem_t is a child of node_t, which adds a key field. | |
| * node_t access is done by ((node_t *) delem)->next|prev, | | * node_t access is done by ((node_t *) delem)->next|prev, | |
| * or through delem->node.(next|prev). | | * or through delem->node.(next|prev). | |
| */ | | */ | |
|
| | | typedef struct mowgli_dictionary_elem_ mowgli_dictionary_elem_t; | |
| | | | |
| struct mowgli_dictionary_elem_ | | struct mowgli_dictionary_elem_ | |
| { | | { | |
|
| mowgli_node_t node; | | mowgli_dictionary_elem_t *left, *right, *prev, *next; | |
| | | void *data; | |
| const char *key; | | const char *key; | |
| }; | | }; | |
| | | | |
|
| typedef struct mowgli_dictionary_elem_ mowgli_dictionary_elem_t; | | | |
| | | | |
| /* | | /* | |
| * mowgli_dictionary_iteration_state_t, private. | | * mowgli_dictionary_iteration_state_t, private. | |
| */ | | */ | |
| struct mowgli_dictionary_iteration_state_ | | struct mowgli_dictionary_iteration_state_ | |
| { | | { | |
|
| int bucket; | | | |
| mowgli_dictionary_elem_t *cur, *next; | | mowgli_dictionary_elem_t *cur, *next; | |
| }; | | }; | |
| | | | |
| typedef struct mowgli_dictionary_iteration_state_ mowgli_dictionary_iterati
on_state_t; | | typedef struct mowgli_dictionary_iteration_state_ mowgli_dictionary_iterati
on_state_t; | |
| | | | |
| /* | | /* | |
| * this is a convenience macro for inlining iteration of dictionaries. | | * this is a convenience macro for inlining iteration of dictionaries. | |
| */ | | */ | |
| #define MOWGLI_DICTIONARY_FOREACH(element, state, dict) for (mowgli_diction
ary_foreach_start((dict), (state)); (element = mowgli_dictionary_foreach_cu
r((dict), (state))); mowgli_dictionary_foreach_next((dict), (state))) | | #define MOWGLI_DICTIONARY_FOREACH(element, state, dict) for (mowgli_diction
ary_foreach_start((dict), (state)); (element = mowgli_dictionary_foreach_cu
r((dict), (state))); mowgli_dictionary_foreach_next((dict), (state))) | |
| | | | |
| /* | | /* | |
| * mowgli_dictionary_create() creates a new dictionary tree of the defined
resolution. | | * mowgli_dictionary_create() creates a new dictionary tree of the defined
resolution. | |
|
| * name is only used for statistical purposes. | | | |
| * compare_cb is the comparison function, typically strcmp, strcasecmp or | | * compare_cb is the comparison function, typically strcmp, strcasecmp or | |
| * irccasecmp. | | * irccasecmp. | |
| */ | | */ | |
|
| extern mowgli_dictionary_t *mowgli_dictionary_create(int resolution, int (*
compare_cb)(const char *a, const char *b)); | | extern mowgli_dictionary_t *mowgli_dictionary_create(int (*compare_cb)(cons
t char *a, const char *b)); | |
| | | | |
| /* | | /* | |
| * mowgli_dictionary_destroy() destroys all entries in a dtree, and also op
tionally calls | | * mowgli_dictionary_destroy() destroys all entries in a dtree, and also op
tionally calls | |
| * a defined callback function to destroy any data attached to it. | | * a defined callback function to destroy any data attached to it. | |
| */ | | */ | |
| extern void mowgli_dictionary_destroy(mowgli_dictionary_t *dtree, | | extern void mowgli_dictionary_destroy(mowgli_dictionary_t *dtree, | |
| void (*destroy_cb)(mowgli_dictionary_elem_t *delem, void *privdata), | | void (*destroy_cb)(mowgli_dictionary_elem_t *delem, void *privdata), | |
| void *privdata); | | void *privdata); | |
| | | | |
| /* | | /* | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 5 lines changed or added | |
|
| mowgli_object_class.h | | mowgli_object_class.h | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| | | | |
| extern void mowgli_object_class_init(mowgli_object_class_t *klass, const ch
ar *name, mowgli_destructor_t des, mowgli_boolean_t dynamic); | | extern void mowgli_object_class_init(mowgli_object_class_t *klass, const ch
ar *name, mowgli_destructor_t des, mowgli_boolean_t dynamic); | |
| extern int mowgli_object_class_check_cast(mowgli_object_class_t *klass1, mo
wgli_object_class_t *klass2); | | extern int mowgli_object_class_check_cast(mowgli_object_class_t *klass1, mo
wgli_object_class_t *klass2); | |
| extern void mowgli_object_class_set_derivitive(mowgli_object_class_t *klass
, mowgli_object_class_t *parent); | | extern void mowgli_object_class_set_derivitive(mowgli_object_class_t *klass
, mowgli_object_class_t *parent); | |
| extern void *mowgli_object_class_reinterpret_impl(/* mowgli_object_t */ voi
d *object, mowgli_object_class_t *klass); | | extern void *mowgli_object_class_reinterpret_impl(/* mowgli_object_t */ voi
d *object, mowgli_object_class_t *klass); | |
| extern mowgli_object_class_t *mowgli_object_class_find_by_name(const char *
name); | | extern mowgli_object_class_t *mowgli_object_class_find_by_name(const char *
name); | |
| extern void mowgli_object_class_destroy(mowgli_object_class_t *klass); | | extern void mowgli_object_class_destroy(mowgli_object_class_t *klass); | |
| | | | |
| #define MOWGLI_REINTERPRET_CAST(object, klass) (klass *) mowgli_object_clas
s_reinterpret_impl(object, mowgli_object_class_find_by_name( # klass )); | | #define MOWGLI_REINTERPRET_CAST(object, klass) (klass *) mowgli_object_clas
s_reinterpret_impl(object, mowgli_object_class_find_by_name( # klass )); | |
| | | | |
|
| | | #define mowgli_forced_cast(from_type, to_type, from, to)\ | |
| | | do { \ | |
| | | union cast_union \ | |
| | | { \ | |
| | | to_type out; \ | |
| | | from_type in; \ | |
| | | } u; \ | |
| | | typedef int cant_use_union_cast[ \ | |
| | | sizeof (from_type) == sizeof (u) \ | |
| | | && sizeof (from_type) == sizeof (to_type) ? 1 : -1];\ | |
| | | u.in = from; \ | |
| | | to = u.out; \ | |
| | | } while (0) | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 14 lines changed or added | |
|