diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-04-10 17:48:52 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-04-10 18:02:09 +0200 |
commit | 0c92635914becb4f6913c3f1d5a6f3756325315b (patch) | |
tree | 7c0d79a51259691a6c127dde7ed30cfabfc50995 | |
parent | bd03e87753241dee328ead1c0c8193d1ee3750cc (diff) | |
download | fetchmail-0c92635914becb4f6913c3f1d5a6f3756325315b.tar.gz fetchmail-0c92635914becb4f6913c3f1d5a6f3756325315b.tar.bz2 fetchmail-0c92635914becb4f6913c3f1d5a6f3756325315b.zip |
Add Doxygen markup for xmalloc.?.
-rw-r--r-- | xmalloc.h | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* xmalloc.h -- split out of fetchmail.h */ +/** \file xmalloc.h -- Declarations for the fail-on-OOM string functions */ #ifndef XMALLOC_H #define XMALLOC_H @@ -11,9 +11,18 @@ #else #define XMALLOCTYPE char #endif -XMALLOCTYPE *xmalloc(size_t); -XMALLOCTYPE *xrealloc(/*@null@*/ XMALLOCTYPE *, size_t); + +/** Allocate \a n characters of memory, abort program on failure. */ +XMALLOCTYPE *xmalloc(size_t n); + +/** Reallocate \a n characters of memory, abort program on failure. */ +XMALLOCTYPE *xrealloc(/*@null@*/ XMALLOCTYPE *, size_t n); + +/** Free memory at position \a p and set pointer \a p to NULL afterwards. */ #define xfree(p) { if (p) { free(p); } (p) = 0; } -char *xstrdup(const char *); + +/** Duplicate string \a src to a newly malloc()d memory region and return its + * pointer, abort program on failure. */ +char *xstrdup(const char *src); #endif |