From 9821a6af983f07bf146b19ca9993e37b88339bf2 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Wed, 29 Jan 2020 18:32:13 -0600 Subject: add some more files --- libiberty/strdup.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 libiberty/strdup.c (limited to 'libiberty/strdup.c') diff --git a/libiberty/strdup.c b/libiberty/strdup.c new file mode 100755 index 0000000..1785b34 --- /dev/null +++ b/libiberty/strdup.c @@ -0,0 +1,10 @@ +char * +strdup(s) + char *s; +{ + char *result = (char*)malloc(strlen(s) + 1); + if (result == (char*)0) + return (char*)0; + strcpy(result, s); + return result; +} -- cgit v1.2.3