(* Graphics output for NeXT terminals *)

(* These variables can be reset during a session to alter subsequently
   created graphics windows: *)

Begin["System`Private`"]

$Display = {}

$DisplayFunction =
        Module[{tmpfile},
                tmpfile = OpenTemporary[] ;
		file = tmpfile[[1]] <> ".eps" ;
                Display[file, #, "EPS", ImageSize -> 72 8.5] ;
                Run["open " <> file] ;
                Close[tmpfile];
                #]&

$SoundDisplayWidth = 300
$SoundDisplayHeight = 250
$SoundDisplayTitle := StringForm["Mathematica Sound:  Out[`1`]", $Line]

$SoundDisplay := {$TtySoundDisplay}
$TtySoundDisplay := StringJoin["!ttyps -h '", ToString[N[$SoundDisplayHeight]],
				"' -w '", ToString[N[$SoundDisplayWidth]],
				"' -T '", ToString[$SoundDisplayTitle], "'" ]

End[]

If[ !($BatchOutput || $Remote || $ParentLink =!= Null),
	Print[" -- NeXT graphics initialized -- "] ]
