summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2002-06-20 05:15:59 +0000
committerPeter Johnson <peter@tortall.net>2002-06-20 05:15:59 +0000
commitf78505a6a5487e9e18a849d4d5ba7a1206e6203c (patch)
tree286b588fb4b52a99da07c4a02a5d0b06c924b726 /util.h
parent13c443b70c999bfa9c4876fa2b05be01683f5e3d (diff)
downloadyasm-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.h b/util.h
index a4fc61e7..05d8d782 100644
--- a/util.h
+++ b/util.h
@@ -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);