diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-03-14 12:32:43 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-03-14 12:32:43 +0000 |
commit | 4fcbd8f87cab61e77ce04d958991ca59604b7e86 (patch) | |
tree | 8a087c2c5eba1cac85556d307daad7304efd6e96 /common.h | |
parent | 869c403c497d881a099e401ebd9e3f3db0f75599 (diff) | |
download | ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar.gz ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar.bz2 ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar.xz ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.zip |
add dmitable use
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,8 +1,10 @@ #define psizeof(a) (sizeof(a) / sizeof(*(a))) - -static inline void *memdup(void *src, size_t size) { - void *r = malloc(size); - memcpy(r, src, size); - return r; -} #define ifree(p) do { if (p) { free(p); p = NULL; } } while (0) + + +typedef struct { + FILE *f; + pid_t pid; +} fh; +extern fh fh_open(const char *name); +extern void fh_close(fh *f); |