      SUBROUTINE Y_LINES(LUS,N,X,Y)
C
C----------------------------------------------------------------------
C.IDENTIFICATION: Subroutine Y_LINE
C.LIBRARY:        GRAPHSERV
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 25 Jun 93 - Prototype
C.                0.0a- 19 Jul 94 - using stream I/O (ddf)
C.                0.0b- 12 Aug 94 - bug fix in NBYTES now OK (lc)
C.                0.1 - 17 Aug 94 - officialized + common clientside.inc
C.PURPOSE:        send opcode for polyline
C                 args are npoints, x(1-npoints) y(1-npoints)        
C.SYNTAX:         
C.PARAMETERS:    
C----------------------------------------------------------------------
C
      INTEGER   LUS(2)            
      INTEGER N,IERR,I,NBYTES
      REAL X(N),Y(N)
      INCLUDE 'clientside.inc'
      OPCODE=4
C-->  this routine is unprotected. Since the server requries no more
C-->  than 512 points as set in graphlimit.inc, this routine should
C-->  split the input array, if longer, in 512-point chunks !!!!
*     WRITE(LUS(1),IOSTAT=IERR)OPCODE,N,X,Y            
      IBUF(2)=N
      DO I=1,N
	RBUF(I+2)=X(I)
	RBUF(I+N+2)=Y(I)
      END DO
      NBYTES=N*4*2+8
      CALL Z_WRITE_STREAM(LUS(1),IBUF,NBYTES)
      RETURN
      END
