From d1f63675905f1f480757f00bebcfde0e4642263d Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Fri, 22 Aug 2008 16:10:19 +0000 Subject: [PATCH] - comment function --- src/util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/util.h b/src/util.h index 5488965..c5d3d15 100644 --- a/src/util.h +++ b/src/util.h @@ -16,6 +16,10 @@ #include #include +/** + * malloc + * exits with error message on error + */ extern void *sat_malloc(size_t); extern void *sat_malloc2(size_t, size_t); extern void *sat_calloc(size_t, size_t); @@ -39,6 +43,14 @@ static inline void *sat_extend(void *buf, size_t len, size_t nmemb, size_t size, return buf; } +/** + * extend an array by reallocation and zero's the new section + * buf old pointer + * len current size + * nmbemb number of elements to add + * size size of each element + * block block size used to allocate the elements + */ static inline void *sat_zextend(void *buf, size_t len, size_t nmemb, size_t size, size_t block) { buf = sat_extend(buf, len, nmemb, size, block); -- 2.7.4