From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- vendor/x11iraf/xpm/strdup.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vendor/x11iraf/xpm/strdup.c (limited to 'vendor/x11iraf/xpm/strdup.c') diff --git a/vendor/x11iraf/xpm/strdup.c b/vendor/x11iraf/xpm/strdup.c new file mode 100644 index 00000000..2611949c --- /dev/null +++ b/vendor/x11iraf/xpm/strdup.c @@ -0,0 +1,19 @@ +#include + +/* + * STRDUP -- Return a pointer to a copy of the input string. + */ +char * +strdup (s) +char *s; +{ + char *str; + int nchars; + char *malloc(); + + nchars = strlen(s) + 1; + if ((str = malloc (nchars)) == NULL) + return (NULL); + memmove (str, s, nchars); + return (str); +} -- cgit