- Move source code from `trunk` into program root directory. - Update build files and include paths. - Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
10 lines
182 B
C
10 lines
182 B
C
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
char* strdup(const char* str)
|
|
{
|
|
char* buf = malloc(strlen(str) + 1);
|
|
buf[strlen(str)] = '\0';
|
|
strcpy(buf, str);
|
|
return buf;
|
|
} |