libkeymap  2.0.4
Library to manage the Linux keymaps
src/libkeymap/keymap/array.h
Go to the documentation of this file.
00001 #ifndef LK_ARRAY_H
00002 #define LK_ARRAY_H
00003 
00008 struct lk_array {
00009         void *array;  
00010         size_t memb;  
00011         size_t count; 
00012         size_t total; 
00013 };
00014 
00015 int lk_array_init(struct lk_array *a, size_t memb, size_t size);
00016 int lk_array_free(struct lk_array *a);
00017 
00018 int lk_array_empty(struct lk_array *a);
00019 
00020 int lk_array_append(struct lk_array *a, const void *e);
00021 
00022 int lk_array_set(struct lk_array *a, unsigned int i, const void *e);
00023 void *lk_array_get(struct lk_array *a, unsigned int i);
00024 void *lk_array_get_ptr(struct lk_array *a, unsigned int i);
00025 
00026 int lk_array_unset(struct lk_array *a, unsigned int i);
00027 int lk_array_exists(struct lk_array *a, unsigned int i);
00028 
00029 #endif /* LK_ARRAY_H */