diff options
author | Yukihiro Matsumoto <matz@ruby-lang.org> | 1994-12-08 14:17:29 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-17 22:09:30 +0900 |
commit | 00e36aa09f54925c2f9c30524b48f4f54a9adb23 (patch) | |
tree | 57bf15576109b53406796c66b29d5e11d9fd99c0 /missing/strdup.c | |
parent | 4dfd93c72a9a221c5575c5888483f2fb55c82117 (diff) |
version 0.60v0_60
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.60.tar.gz
Thu Dec 8 14:17:29 1994 Yukihiro Matsumoto (matz@ix-02)
* 0.60 released - alpha test baseline.
Diffstat (limited to 'missing/strdup.c')
-rw-r--r-- | missing/strdup.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/missing/strdup.c b/missing/strdup.c new file mode 100644 index 0000000000..2e1fe90bbd --- /dev/null +++ b/missing/strdup.c @@ -0,0 +1,25 @@ +/************************************************ + + strdup.c - + + $Author$ + $Date$ + created at: Wed Dec 7 15:34:01 JST 1994 + +************************************************/ +#include <stdio.h> + +char * +strdup(str) + char *str; +{ + extern char *xmalloc(); + char *tmp; + int len = strlen(str) + 1; + + tmp = xmalloc(len); + if (tmp == NULL) return NULL; + memcpy(tmp, str, len); + + return tmp; +} |