/* Copy the given string into a new section of dynamic memory and return a */
/* pointer to the copy. */

#include "stdio.h"

char *strsave(s)
  char *s;
{
  char *p, *q;

  if (s == NULL) return(NULL);
  q = p = (char *)malloc(strlen(s)+1);
  while (*s != NULL) *p++ = *s++;
  *p = (char)NULL;
  return(q);
}
