/* strdup.c,v 1.1 1995/08/17 23:23:11 explorer Exp */

#include <stdlib.h>
#include <string.h>

/*
 * strdup for those machines lacking it.
 */

char *
strdup(const char *s)
{
  char *t;

  if (s == NULL)
    return NULL;

  t = (char *)malloc(strlen(s) + 1);

  strcpy(t, s);

  return t;
}
