/*
 * $Header: /udir/vixie/src/mail11/d-1.7beta/RCS/string.c,v 1.1 1991/09/02 23:58:25 vixie Exp vixie $
 */

#include <stdio.h>

#ifdef __STDC__
char *calloc (unsigned int, unsigned int);
#else
char *calloc ();
#endif

char *
strsave (buf)
char *buf;
{
    char *ptr = calloc (strlen (buf) + 1, sizeof (char));
    if (ptr != NULL)
	strcpy (ptr, buf);
    return ptr;
}

char *
str_append (ptr, str, endbuf)
char *ptr, *str, *endbuf;
{
    while (*str && ptr < endbuf)
	*ptr++ = *str++;
    *ptr = '\0';
    return ptr;
}
