diff options
author | Seth Alves <alves@src.gnome.org> | 2000-02-18 02:02:37 +0800 |
---|---|---|
committer | Seth Alves <alves@src.gnome.org> | 2000-02-18 02:02:37 +0800 |
commit | 788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b (patch) | |
tree | f5f14715c1c0aede7eb872eda7166cd3ddcd7e3b /libical/MacOS/strdup.c | |
parent | b39cda14b7678b925a6e3e645b60fb9858fdfaf6 (diff) | |
download | gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.gz gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.bz2 gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.lz gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.xz gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.zst gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.zip |
Initial revision
svn path=/trunk/; revision=1823
Diffstat (limited to 'libical/MacOS/strdup.c')
-rw-r--r-- | libical/MacOS/strdup.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libical/MacOS/strdup.c b/libical/MacOS/strdup.c new file mode 100644 index 0000000000..ae60fee3df --- /dev/null +++ b/libical/MacOS/strdup.c @@ -0,0 +1,17 @@ + +#include "strdup.h" +#include <string.h> +#include <stdlib.h> + + +char *strdup(const char *s ) +{ + char *p; + + if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) + return( NULL ); + + strcpy( p, s ); + + return( p ); +} |