/*---------------------------------------------------------------*/
/*   Copyright (c) 1988 Regents of the University of California  */
/*                 All Rights Reserved                           */
/*---------------------------------------------------------------*/
/*-- SETSTR --------------------------------------*/
/* Returns a pointer to an allocated area of      */
/* memory large enough to hold the given string.  */
/* The string is automatically loaded into the    */
/* area.                                          */
/*                                                */
/*  Entry Requirements:                           */
/*    str: The string to alocate memory for then  */
/*         place in that area.                    */
/*                                                */
/*  Developement History:                         */
/*    Begun: 12/28/86 - Todd King                 */
/*             Under GG44 support.                */
/*                                                */
/*  Version:                                      */
/*     @(#)setstr.c	1.1      (UCLA/IGPP)     03 Mar 1992               */
/*------------------------------------------------*/
#include <stdio.h>
#include <malloc.h>	/* For malloc() */
#include <string.h>	/* For strcpy() */

char *setstr(str)
char str[];
{
  char *ptr;

  ptr = (char *) malloc(strlen(str) + 1);
  if(ptr == NULL) return(NULL);
  strcpy(ptr,str);
  return(ptr);
}
