libkeymap 2.6.3 Library to manage the Linux keymaps

array.h
Go to the documentation of this file.
1#ifndef LK_ARRAY_H
2#define LK_ARRAY_H
3
4#include <sys/param.h>
5#include <sys/types.h>
6
11 struct lk_array {
12 char *array;
13 ssize_t memb;
14 ssize_t count;
15 ssize_t total;
16};
17
18 int lk_array_init(struct lk_array *a, ssize_t memb, ssize_t size);
19 int lk_array_free(struct lk_array *a);
20
21 int lk_array_empty(struct lk_array *a);
22
23 int lk_array_append(struct lk_array *a, const void *e);
24
25 int lk_array_set(struct lk_array *a, ssize_t i, const void *e);
26 void *lk_array_get(struct lk_array *a, ssize_t i);
27 void *lk_array_get_ptr(struct lk_array *a, ssize_t i);
28
29 int lk_array_unset(struct lk_array *a, ssize_t i);
30 int lk_array_exists(struct lk_array *a, ssize_t i);
31
32#endif /* LK_ARRAY_H */
lk_array_append
int lk_array_append(struct lk_array *a, const void *e)
lk_array_set
int lk_array_set(struct lk_array *a, ssize_t i, const void *e)
lk_array_get
void * lk_array_get(struct lk_array *a, ssize_t i)
lk_array_empty
int lk_array_empty(struct lk_array *a)
lk_array_free
int lk_array_free(struct lk_array *a)
lk_array_get_ptr
void * lk_array_get_ptr(struct lk_array *a, ssize_t i)
lk_array_exists
int lk_array_exists(struct lk_array *a, ssize_t i)
lk_array_init
int lk_array_init(struct lk_array *a, ssize_t memb, ssize_t size)
lk_array_unset
int lk_array_unset(struct lk_array *a, ssize_t i)
lk_array
Basic structure for array implementation.
Definition array.h:11
lk_array::memb
ssize_t memb
Definition array.h:13
lk_array::count
ssize_t count
Definition array.h:14
lk_array::total
ssize_t total
Definition array.h:15
lk_array::array
char * array
Definition array.h:12