	SUBROUTINE SAO_DISPLAY_VECT
C
C  Note:  This is the UNIX version
C
C       This subroutine sends commands to SAOimage via the Imtool protocol
C  in order to display previously drawn straight lines (vectors) 
C  sent with SAO_VECT with ACTION set to 4.  
C					Donald H. Gudehus, September, 1994
C				Version 1U, D. Gudehus, September, 1994
C				Changed code to work under UNIX
C				Version 2, D. Gudehus, July 25, 2006
C				Incorporated new saofacts.for
C
	INTEGER ACTION
C
	INCLUDE 'saofacts.for'
C
	INTEGER*2 ICOUNT
C
	ICOUNT=67
	IBUFFER_SAO(1)='40000'O !  = PACKED;  since is not IIS_READ, is write
	IBUFFER_SAO(2)=-ICOUNT !  imhead.thingct
	IBUFFER_SAO(3)=13 !  = imhead.subunit
        IBUFFER_SAO(4)=0
	IBUFFER_SAO(5)=0
        IBUFFER_SAO(6)=0
        IBUFFER_SAO(7)=1 !  Frame number
        IBUFFER_SAO(8)=0
	CALL IMTOOLCHECKSUM(IBUFFER_SAO)
	NBYTES=16
C  NPIC is the most recent picture number loaded.
	CALL SI_WRITE(BUFFER_SAO,NBYTES)
	YSAO1=0.0
	YSAO2=MAXFB_ROWS_SAO-1.0
	ACTION=5
        ENCODE (2,2002,CBUFFER_SAO(1:2)) ACTION
2002	FORMAT(I2)
	CBUFFER_SAO(3:3)=' '
	CBUFFER_SAO(4:7)='  0' !  Cursor type
	CBUFFER_SAO(8:8)=' '
	CBUFFER_SAO(9:16)='      0' !  Color
	CBUFFER_SAO(17:17)=' '
1009	FORMAT(F9.3)
	CBUFFER_SAO(18:26)='      1.0' !  X1
	CBUFFER_SAO(27:27)=' '
	ENCODE (9,1009,CBUFFER_SAO(28:36)) YSAO1
	CBUFFER_SAO(37:37)=' '
	CBUFFER_SAO(38:46)='      1.0' !  X2
	CBUFFER_SAO(47:47)=' '
	ENCODE (9,1009,CBUFFER_SAO(48:56)) YSAO2
	CBUFFER_SAO(57:57)=' '
	CBUFFER_SAO(58:66)='      0.0' !  INCLINA
	CBUFFER_SAO(67:67)=' '
	NBYTES=ICOUNT
	CALL SI_WRITE(BUFFER_SAO,NBYTES)
C
	RETURN
	END
