diff options
author | bryanh | 1996-11-27 01:46:52 +0000 |
---|---|---|
committer | bryanh | 1996-11-27 01:46:52 +0000 |
commit | 3c3e47cdb7c0af918e466fa548ff77b5dbb90cea (patch) | |
tree | 0e14a66ccb7ac08100b4fed65702d71ad9fde103 | |
parent | 69b0fddde642608908bf362981f136eda23dbaac (diff) |
Forgot in yesterday's Ultrix compile work.
-rw-r--r-- | src/utils/strdup.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/utils/strdup.c b/src/utils/strdup.c new file mode 100644 index 0000000000..fab0f063c4 --- /dev/null +++ b/src/utils/strdup.c @@ -0,0 +1,24 @@ +/*------------------------------------------------------------------------- + * + * strdup.c-- + * copies a null-terminated string. + * + * Copyright (c) 1994, Regents of the University of California + * + * + * IDENTIFICATION + * $Header$ + * + *------------------------------------------------------------------------- + */ +#include <string.h> +#include "strdup.h" + +char * +strdup(char *string) +{ + char *nstr; + + nstr = strcpy((char *)palloc(strlen(string)+1), string); + return nstr; +} |