This is next_strdup.c in view mode; [Download] [Up]
#include <string.h>
#include <stdio.h>
char *strdup(char *s) {
char *news = malloc(strlen(s)+1);
strcpy(news,s);
return news;
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.