1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* * strdup --- duplicate a string * * We supply this routine for those systems that aren't standard yet. */ char * strdup (str) register const char *str; { char *p; p=(char *)malloc(strlen(str)+1); return strcpy(p,str); }