From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- 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