/*****************************************************************************

	ZStoFl()

	This function is called to store the name of the file being edited,
so that the next time TECO-C is invoked,  the user doesn't have to put the
file name on the command line.  How the name is stored and retrieved from
one invokation to another is system dependent.  In the worst case,  the name
can be stored in a file.
*****************************************************************************/

#include "ZPort.h"		/* define portability identifiers */
#include "DefTeco.h"		/* define general identifiers */

EXTERN	char	LBfBeg[];	/* last-file-edited file name buffer */
EXTERN	char	*LBfPtr;	/* pointer to end of name in LBfBeg */



#ifdef UNKNOWN
DEFAULT ZStoFl()	/* store file name */
{
	puts("Terminating in function ZStoFl.\n");
	exit(1);
}
#endif





#ifdef vax11c
#include descrip	/* define string descriptor macros */
#include ssdef		/* define system service status return identifiers */

int	lib$set_logical();	/* RTL routine to define a logical name */

readonly $DESCRIPTOR(filemem_descriptor,"TECOC$MEMORY");


DEFAULT ZStoFl()		/* store file name */
{
	int status;
	struct dsc$descriptor_s EQU_desc =
		{
		0,				/* dsc$w_length */
		DSC$K_DTYPE_T,			/* dsc$b_dtype */
		DSC$K_CLASS_S,			/* dsc$b_class */
		LBfBeg				/* dsc$a_pointer */
		};


	EQU_desc.dsc$w_length = LBfPtr-LBfBeg;
	status = lib$set_logical(	&filemem_descriptor, /* logical name */
					&EQU_desc);	/* equivalence name */
	if ((status != SS$_NORMAL) && (status != SS$_SUPERSEDE))
		lib$stop(status);
}
#endif




#ifdef XENIX
DEFAULT ZStoFl()	/* store file name */
{
}
#endif
