	load	'macros.dump'
	include 'driver.equ'
	include 'scrap.equ'
	include 'sssc.equ'

	IMPORT	D_AlertBox
	IMPORT	X_AsciiFilter
	IMPORT	X_Blurb1
	IMPORT	X_Button1Text
	IMPORT	X_Button2Text
	IMPORT	X_Button3Text
	IMPORT	D_CloseDialog
	IMPORT	X_ContText
	IMPORT	X_DBtoAsciiScrap
	IMPORT	D_DigitsOnly
	IMPORT	X_DoAsciitoSSScrap
	IMPORT	X_FSBlurbString
	IMPORT	FSDialogTemplate
	IMPORT	X_FormatMask
	IMPORT	D_GetNewModalDialog
	IMPORT	D_GrowHandle
	IMPORT	X_SSButton1Text
	IMPORT	X_SSButton2Text
	IMPORT	X_SSButton3Text
	IMPORT	X_SSContText
	IMPORT	X_PLtoAsciiScrap
	IMPORT	D_SetCursor
	IMPORT	X_WPtoAsciiScrap
	entry	X_AsciitoSSScrap

X_DBtoSSScrap	PROC	EXPORT
	;Using X_SSScrapData

	input Src:l

	local Intermed:l,Isize:l

	output Dest:l

	error err

	begin

	movelong #(-1-X_SSCellParenNeg),X_FormatMask

	SpaceLong
	PushLong Src
	jsl X_DBtoAsciiScrap
	sta err
	PullLong Intermed
	jcs exit

	SpaceLong
	PushLong Intermed
	_GetHandleSize
	PullLong Isize

	Subwl #2,Isize
	PushLong Isize
	PushLong Intermed
	jsl D_GrowHandle

	SpaceLong
	PushLong Intermed
	jsl X_AsciitoSSScrap
	sta err
	PullLong Dest

exit	movelong #-1,X_FormatMask
	return err
	ENDP

X_AsciitoSSScrap	PROC	EXPORT
	;Using X_FieldScannerData

	input Src:l

	output Dest:l

	error err

	begin

	SpaceLong
	PushLong Src
	PushWord #X_TabCR
	pea 0
	jsl X_DoAsciitoSSScrap
	sta err
	PullLong Dest

	return
	ENDP

X_SWtoSSScrap	PROC	EXPORT

	input Src:l

	local Intermed:l

	output Dest:l

	error err

	begin

	SpaceLong
	PushLong Src
	jsl X_PLtoAsciiScrap
	sta err
	PullLong Intermed
	jcs exit

	SpaceLong
	PushLong Intermed
	jsl X_AsciitoSSScrap
	sta err
	PullLong Dest

	PushLong Intermed
	_DisposeHandle

exit	return
	ENDP

X_WPtoSSScrap	PROC	EXPORT

	input Src:l

	local Intermed:l

	output Dest:l

	error err

	begin

	SpaceLong
	PushLong Src
	jsl X_WPtoAsciiScrap
	sta err
	PullLong Intermed
	jcs exit

	SpaceLong
	PushLong Intermed
	jsl X_AsciitoSSScrap
	sta err
	PullLong Dest

	PushLong Intermed
	_DisposeHandle

exit	return
	ENDP

	END

