summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2001-12-04 21:12:40 +0000
committerSimon Tatham <anakin@pobox.com>2001-12-04 21:12:40 +0000
commit5e3a21913b6a47e78d3e4edd4238d028b90827b7 (patch)
treecfb3f25b5643cb957014f64aa831c27cf9a308eb /malloc.c
parent087e9915b987f1cd6eb679521f87fa3e5b2b9d96 (diff)
downloadhalibut-5e3a21913b6a47e78d3e4edd4238d028b90827b7.zip
halibut-5e3a21913b6a47e78d3e4edd4238d028b90827b7.tar.gz
halibut-5e3a21913b6a47e78d3e4edd4238d028b90827b7.tar.bz2
halibut-5e3a21913b6a47e78d3e4edd4238d028b90827b7.tar.xz
This update should bring the Windows Help back end up to
near-complete functionality. All that's missing now is indexing and horizontal rules. [originally from svn r1449]
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c
index 0f42bde..e9f54d6 100644
--- a/malloc.c
+++ b/malloc.c
@@ -88,6 +88,16 @@ void *(srealloc)(LOGPARAMS void *p, int size) {
}
/*
+ * dupstr is like strdup, but with the never-return-NULL property
+ * of smalloc (and also reliably defined in all environments :-)
+ */
+char *dupstr(char *s) {
+ char *r = smalloc(1+strlen(s));
+ strcpy(r,s);
+ return r;
+}
+
+/*
* Duplicate a linked list of words
*/
word *dup_word_list(word *w) {