source:
libabac/abac_util.h
@
80f0770
Last change on this file since 80f0770 was 7764378, checked in by , 11 years ago | |
---|---|
|
|
File size: 593 bytes |
Rev | Line | |
---|---|---|
[7f25a67f] | 1 | #ifndef __UTIL_H__ |
[f2622ee] | 2 | #define __UTIL_H__ |
[7f25a67f] | 3 | |
4 | #include <sys/types.h> | |
[461541a] | 5 | #include <stdlib.h> |
[7f25a67f] | 6 | |
[f2622ee] | 7 | #ifndef __ABAC_CHUNK_T__ |
8 | #define __ABAC_CHUNK_T__ | |
9 | typedef struct _abac_chunk_t { | |
10 | unsigned char *ptr; | |
11 | int len; | |
12 | } abac_chunk_t; | |
13 | #endif /* __ABAC_CHUNK_T__ */ | |
14 | ||
15 | void abac_chunk_free(abac_chunk_t); | |
[7764378] | 16 | void *abac_xmalloc(size_t); |
[3c251d0] | 17 | char *abac_xstrdup(char *); |
[461541a] | 18 | void *abac_xrealloc(void *, size_t); |
[9a411d7] | 19 | void abac_split(char *string, char *delim, char **ret, int *num); |
[7f25a67f] | 20 | |
[dbbf777] | 21 | #ifdef DEBUG |
22 | #define debug_printf(...) fprintf(stderr, __VA_ARGS__) | |
23 | #else | |
24 | #define debug_printf(...) do { } while (0) | |
25 | #endif | |
26 | ||
[7f25a67f] | 27 | #endif /* __UTIL_H__ */ |
Note: See TracBrowser
for help on using the repository browser.