1	SUB SMG_RESTORE_SCREEN

	!---------------------------------------------------------------&
	!								&
	!		     SMG_RESTORE_SCREEN				&
	!								&
	!		Creation Date:  1-Oct-1985			&
	!		Author:		Ken Messer			&
	! 		Purpose:        Restore the pasteboard (screen)	&
	!				after non-SMG I/O has taken	&
	!				place.  The pasteboard must 	&
	!				been saved previously with	&
	!				SMG_SAVE_SCREEN.		&
	!								&
	!		Modification history				&
	!								&
	!	Date	Description of change(s)			&
	!								&
	!---------------------------------------------------------------&
	!								&
	! Copyright (c) 1985 -	Ken Messer, Allied Electronics, Inc.,	&
	!			401 E. 8th St., Ft. Worth, TX  76102	&
	!								&
	! This software may be copied and distributed freely to anyone	&
	! for non-commerical use provided that this copyright notice is &
	! included.							&
	!---------------------------------------------------------------&

	OPTION TYPE = INTEGER, SIZE = INTEGER LONG

	%include "SMG$LIBRARY:SMG.DFN"


	DECLARE LONG			RS

	EXTERNAL LONG FUNCTION		SMG$Restore_Physical_Screen
	EXTERNAL LONG CONSTANT		SS$_Normal

	EXTERNAL STRING FUNCTION	Get_Error_Message(LONG)

	COMMON (Save_Restore)		LONG Saved_display_id

	!---------------------------------------------------------------&
	!								&
	!		M a i n   P r o g r a m   L o g i c		&
	!								&
	!---------------------------------------------------------------&

	! The screen is restored via a virtual display identified by
	! Saved_display_id - this is stored in a common area that is shared
	! by SMG_SAVE_SCREEN

	RS = SMG$Restore_Physical_Screen(Current_pasteboard_id,Saved_display_id)

	IF RS AND SS$_Normal = 0	THEN
		PRINT Get_Error_Message(RS)
		STOP
	END IF

32767	SUBEXIT

	END SUB
