We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cfe27d commit 89c7e18Copy full SHA for 89c7e18
src/utils/strdup.c
@@ -0,0 +1,24 @@
1
+/*-------------------------------------------------------------------------
2
+ *
3
+ * strdup.c--
4
+ * copies a null-terminated string.
5
6
+ * Copyright (c) 1994, Regents of the University of California
7
8
9
+ * IDENTIFICATION
10
+ * $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.1 1996/11/27 01:46:52 bryanh Exp $
11
12
+ *-------------------------------------------------------------------------
13
+ */
14
+#include <string.h>
15
+#include "strdup.h"
16
+
17
+char *
18
+strdup(char *string)
19
+{
20
+ char *nstr;
21
22
+ nstr = strcpy((char *)palloc(strlen(string)+1), string);
23
+ return nstr;
24
+}
0 commit comments