diff options
author | Peter Johnson <peter@tortall.net> | 2002-06-20 05:15:59 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2002-06-20 05:15:59 +0000 |
commit | f78505a6a5487e9e18a849d4d5ba7a1206e6203c (patch) | |
tree | 286b588fb4b52a99da07c4a02a5d0b06c924b726 /util.h | |
parent | 13c443b70c999bfa9c4876fa2b05be01683f5e3d (diff) | |
download | yasm-f78505a6a5487e9e18a849d4d5ba7a1206e6203c.tar.gz |
Add xstrndup() to easily create a 0-terminated duplicate of a
non-zero-terminated source string.
svn path=/trunk/yasm/; revision=649
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -126,6 +126,7 @@ int strncasecmp(const char *s1, const char *s2, size_t n); #else /* strdup() implementation with error checking (using xmalloc). */ /*@only@*/ char *xstrdup(const char *str); +/*@only@*/ char *xstrndup(const char *str, size_t len); /* Error-checking memory allocation routines in xmalloc.c. */ /*@only@*/ /*@out@*/ void *xmalloc(size_t size); |