;
; saveWarn.sh
;
; Warn the user about saving a document
;
;  1994-1998 Straylight
;

;----- Licensing note -------------------------------------------------------
;
; This file is part of Straylight's Sapphire library.
;
; Sapphire is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2, or (at your option)
; any later version.
;
; Sapphire is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with Sapphire.  If not, write to the Free Software Foundation,
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

;----- Overview -------------------------------------------------------------
;
; Functions provided:
;
;  saveWarn
;  saveWarn_saved
;  saveWarn_close

; --- saveWarn ---
;
; On entry:	R0 == estimated size of data
;		R1 == file type of the data
;		R2 == pointer to name of the file
;		R3 == pointer to handler block
;		R4 == value to pass to handlers in R10
;		R5 == value to pass to handlers in R12
;		R6 == flags (in bottom two bits)
;
; On exit:	--
;
; Use:		Displays a warning box allowing the user to save a modified
;		document.  The flags in R6 are as follows:
;
;		Bit 0	File is safe; don't give a warning
;		Bit 1	File's name is sensible; display it in the warning
;
;		The handler block is the same as that passed to saveAs (q.v.)
;		with an extra entry point on the very beginning, which is
;		expected to remove the document from memory.  This entry
;		point is not passed any arguments except for R10 and R12.
;
;		In order for the system to work, you must call various
;		saveWarn routines from your saveAs entry points:
;
;		saveWarn_saved from saEntry__success
;		saveWarn_close from saEntry__closed

		IMPORT	saveWarn

; --- saveWarn_saved ---
;
; On entry:	--
;
; On exit:	--
;
; Use:		Informs saveWarn that the document has been saved.  If
;		saveWarn is not operating, this call is ignored.  You should
;		only call this routine if the document is *safe*, rather than
;		RAM transferred to another application, for example.

		IMPORT	saveWarn_saved

; --- saveWarn_close ---
;
; On entry:	--
;
; On exit:	--
;
; Use:		Informs saveWarn that the save dialogue box has been closed.
;		If the document is now saved, then it is removed from
;		memory.

		IMPORT	saveWarn_close

;----- That's all, folks ----------------------------------------------------

		END
