
#include	"sysdef.h"
#include	"scerrd.h"
#define	then

/*								*/
/*	Copyright Notice					*/
/*								*/
/*								*/
/*	C version Copyright (C) 1984 Change Software, Inc.	*/
/*	Copyright (C) 1978 1979 1980 1981 1982 1983 1984 by	*/
/*		      Change Software, Inc.			*/
/*								*/
/*								*/
/*	This software is furnished under a license and may	*/
/*	be  used  and  copied  only in accordance with the	*/
/*	terms of such license and with  the  inclusion  of	*/
/*	the  above copyright notice.  This software or any	*/
/*	other copies thereof may not be provided or other-	*/
/*	wise made available to any other person.  No title	*/
/*	to and ownership of the software is hereby  trans-	*/
/*	ferred.							*/
/*								*/





vtsystem()
{

	char s[64] ;
	register int status ;
	
#if VAXVMS
	ceol24() ;
	kpnormal() ;
	if ( (status=lgetbin(s,"System command: ")) != 0 )
	  then	{
		clrbro_trap() ;
		scunloadline() ;
		creset() ;
		home() ;
		sclear() ;
		dclcommand(s) ;
		setbro_trap() ;
		putbin("\015\012",2) ;
		status = lgetbin(s,"Type a carriage return to continue") ;
		scloadline() ;
		ref_screen() ;
		}
	kpapplication() ;
	goback() ;
#endif

}


vtlogsys()
{
#if	VAXVMS
	char f[64],s[64] ;
	register int status, status1 ;
	extern int *loclow ;
	
	kpnormal() ;
	getuniquefile(f) ;
	ceol24() ;
	if ( (status=lgetbin(s,"System command: ")) != 0 )
	  then	{
		clrbro_trap() ;
		scunloadline() ;
		creset() ;
		home() ;
		sclear() ;
		if ( (status1 = dombx(s,f)) == 0 ) then prsys_error() ;
		setbro_trap() ;
		putbin("\015\012",2) ;
		status = lgetbin(s,"Type a carriage return to continue") ;
		scloadline() ;
		if ( status1 )
		  then	{
			scinsfile(f) ;
			delfile(f) ;
			rstpage(*loclow) ;
			}
		ref_screen() ;
		}
	kpapplication() ;
	goback() ;
#endif
}


static prsys_error()
{
	char s[80] ;
	geterror(s) ;
	xprintf("%s\n",s) ;
}




