/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by John E. Lloyd.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#include "../h/cdefs.h"

#ifdef VXWORKS_CFG

#include <strings.h>

static char *RCCLenv = NULL;
static char *HOMEenv = NULL;

rciSetenvRCCL(name)
char *name;
{
	if (RCCLenv)
	 { free (RCCLenv);
	 }
	RCCLenv = strcpy((char*)malloc(strlen(name)+1),name);
}

rciSetenvHOME(name)
char *name;
{
	if (HOMEenv)
	 { free (HOMEenv);
	 }
	HOMEenv = strcpy((char*)malloc(strlen(name)+1),name);
}

#else
extern char* getenv();
#endif

char *getenvRCCL()
{
#ifdef VXWORKS_CFG
	return (RCCLenv);
#else
	return (getenv("RCCL"));
#endif
}

char *getenvHOME()
{
#ifdef VXWORKS_CFG
	return (HOMEenv);
#else
	return (getenv("HOME"));
#endif
}

