You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
270 B
15 lines
270 B
14 years ago
|
/* strdup() replacement (from stdwin, if you must know) */
|
||
|
|
||
|
#include "pgenheaders.h"
|
||
|
|
||
|
char *
|
||
|
strdup(const char *str)
|
||
|
{
|
||
|
if (str != NULL) {
|
||
|
register char *copy = malloc(strlen(str) + 1);
|
||
|
if (copy != NULL)
|
||
|
return strcpy(copy, str);
|
||
|
}
|
||
|
return NULL;
|
||
|
}
|