1 #ifndef COMMON_H_QPRCB1BH
2 #define COMMON_H_QPRCB1BH
15 #define DYNARRAY_ITEM(da, index) ( (char *)(da).a + ( (da).entry_size * index ) )
17 int dynarray_init(struct dynamic_array
*da
, size_t entry_size
, size_t grow_size
);
18 struct dynamic_array
*dynarray_new(size_t entry_size
, size_t grow_size
);
19 void *dynarray_add(struct dynamic_array
*da
, void *item
);
20 void dynarray_empty(struct dynamic_array
*da
, void (*free_element
)(void *));
22 int str_to_word(char *s
);
24 char *strqtok_r(char *str
, const char *sep
, int esc
, const char *quote
, char **lastq
, char **lasts
);
26 int gettimespecofday(struct timespec
*ts
);
27 int timespec_add(struct timespec
*result
, const struct timespec
*x
);
28 int timespec_subtract(struct timespec
*result
, struct timespec
*x
, struct timespec
*y
);
30 #endif /* COMMON_H_QPRCB1BH */