(FILECREATED " 3-Sep-85 11:03:48" {DSK}<LISPFILES>MATT>FX80STREAMPATCH.;18 4133   

      changes to:  (FNS \DUMPPAGEBUFFER1.FX80)
		   (VARS FX80STREAMPATCHCOMS)
		   (PROPS (FX80STREAMPATCH FILETYPE))

      previous date: " 3-Jun-85 12:59:56" {DSK}<LISPFILES>MATT>FX80STREAMPATCH.;15)


(* Copyright (c) 1985 by Matt Heffron. All rights reserved.)

(PRETTYCOMPRINT FX80STREAMPATCHCOMS)

(RPAQQ FX80STREAMPATCHCOMS ((FILES (FROM VALUEOF LISPUSERSDIRECTORIES)
				   FX80STREAM)
			    (ADVISE BITMAPCREATE-IN-OPENFX80STREAM CREATEREGION-IN-OPENFX80STREAM 
				    TEDIT.HARDCOPY)
			    (VARS FX80STREAMHEIGHT FX80STREAMWIDTH)
			    (FNS \DUMPPAGEBUFFER1.FX80)
			    (P (MOVD (QUOTE \DUMPPAGEBUFFER1.FX80)
				     (QUOTE \DUMPPAGEBUFFER.FX80)))
			    (PROP FILETYPE FX80STREAMPATCH)))
(FILESLOAD (FROM VALUEOF LISPUSERSDIRECTORIES)
	   FX80STREAM)

(PUTPROPS BITMAPCREATE-IN-OPENFX80STREAM READVICE [(OPENFX80STREAM . BITMAPCREATE)
						   (BEFORE NIL (PROGN (SETQ WIDTH FX80STREAMWIDTH)
								      (SETQ HEIGHT FX80STREAMHEIGHT])

(PUTPROPS CREATEREGION-IN-OPENFX80STREAM READVICE [(OPENFX80STREAM . CREATEREGION)
						   (BEFORE NIL (PROGN (SETQ WIDTH FX80STREAMWIDTH)
								      (SETQ HEIGHT FX80STREAMHEIGHT])

(PUTPROPS TEDIT.HARDCOPY READVICE [NIL (AROUND NIL (COND ((EQ (PRINTERTYPE SERVER)
							      (QUOTE FX80))
							  (TEDIT.FORMAT.HARDCOPY STREAM
										 (OR FILE
										     (QUOTE 
										{RS232}TEDIT.FX80))
										 T BREAKPAGETITLE 
										 SERVER PRINTOPTIONS
										 (QUOTE FX80)))
							 (T *])
(READVISE BITMAPCREATE-IN-OPENFX80STREAM CREATEREGION-IN-OPENFX80STREAM TEDIT.HARDCOPY)

(RPAQQ FX80STREAMHEIGHT 792)

(RPAQQ FX80STREAMWIDTH 972)
(DEFINEQ

(\DUMPPAGEBUFFER1.FX80
  [LAMBDA (BITMAP FX80STREAM)
    (CLISP: INTEGER FAST)                                    (* mth: " 3-Sep-85 11:02")
    (DECLARE (LOCALVARS . T)
	     (GLOBALVARS BITMASKARRAY))
    (LET* ((WIDTH (BITMAPWIDTH BITMAP))
       (HEIGHT (BITMAPHEIGHT BITMAP))
       (SUBSTREAM (FETCHFIELD (QUOTE (STREAM 12 POINTER))
			      FX80STREAM)                    (* (fetch (STREAM F1) of FX80STREAM) is where FX80 
							     streams keep the SUBSTREAM)
		  )
       (WIDTHSUB1 WIDTH-1)
       (HEIGHTSUB1 HEIGHT-1)
       (ByteRow (ARRAY WIDTH (QUOTE BYTE)
		       0 0))
       (BM.BASE BITMAP:BITMAPBASE)
       (ROWOFFSET BITMAP:BITMAPRASTERWIDTH)
       RowWidth WorkWidth)
      (BOUT SUBSTREAM (CHARCODE ESC))
      (BOUT SUBSTREAM (CHARCODE "O"))                        (* Cancel skip over perforation.)
      (\FX80.PRINTERMODE (QUOTE UniDirectionalOn)
			 SUBSTREAM)
      (\FX80.PRINTERMODE (QUOTE EightSpacingOn)
			 SUBSTREAM)
      (for RowGroup from 0 to HEIGHTSUB1 by 8 bind (RGBase ← 0)
	 do (RowWidth←0)
	    (WorkWidth←0)
	    (for Column from 0 to WIDTHSUB1 bind BMask ByteVal ColBitMask
	       do (BMask←128)
		  (ByteVal←0)
		  (ColBitMask←(\WORDELT BITMASKARRAY (LOGAND 15 Column)))
		  (for Row from 0 to 7 as WordOffset from (LRSH Column 4)+RGBase by ROWOFFSET
		     do (if (LOGAND ColBitMask (\GETBASE BM.BASE WordOffset))
			    ~=0
			    then ByteVal←(BITSET ByteVal BMask))
			(BMask←(LRSH BMask 1)))
		  (\BYTESETA ByteRow WorkWidth ByteVal)
		  (WorkWidth←WorkWidth+1)
		  (if ByteVal~=0
		      then RowWidth←WorkWidth))
	    (RGBase←RGBase+(LSH ROWOFFSET 3))
	    [if RowWidth gt 0
		then (\FX80.GRAPHICSMODE RowWidth SUBSTREAM)
		     (for Column from 0 to RowWidth-1 do (BOUT SUBSTREAM (\BYTELT ByteRow Column]
	    (BOUT SUBSTREAM (CHARCODE CR))
	    (BOUT SUBSTREAM (CHARCODE LF)))
      (\FX80.PRINTERMODE (QUOTE UniDirectionalOff)
			 SUBSTREAM)
      NIL])
)
(MOVD (QUOTE \DUMPPAGEBUFFER1.FX80)
      (QUOTE \DUMPPAGEBUFFER.FX80))

(PUTPROPS FX80STREAMPATCH FILETYPE CLISP)
(PUTPROPS FX80STREAMPATCH COPYRIGHT ("Matt Heffron" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1729 3933 (\DUMPPAGEBUFFER1.FX80 1739 . 3931)))))
STOP