/*
**  Portable, public domain strdup() by Bob Stout
*/

#include <stdlib.h>

#include <string.h>


char *strdup(const char *string)
{
      char *new;

      if (NULL != (new = malloc(strlen(string) + 1)))
            strcpy(new, string);
      return new;
}


syntax highlighted by Code2HTML, v. 0.9.1