Added binary and unicode file i/o support to msvcrt.
[reactos.git] / reactos / lib / crtdll / string / strdup.c
1
2 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
3 #include <msvcrt/string.h>
4 #include <msvcrt/stdlib.h>
5
6 char *_strdup(const char *_s)
7 {
8 char *rv;
9 if (_s == 0)
10 return 0;
11 rv = (char *)malloc(strlen(_s) + 1);
12 if (rv == 0)
13 return 0;
14 strcpy(rv, _s);
15 return rv;
16 }