	SUBROUTINE IFSTYL( LTYP, LWID )
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY,  JAN-1988
C
C	THIS ROUTINE SETS ACTIVE PLOTTING STYLUS
C	FOR SUBSEQUENT VECTOR GENERATIONS.
C
C	LTYP: ACTIVE LINE TYPE.
C
C		LTYP = 1: SOLID
C		LTYP = 2: DOTTED
C		LTYP = 3: 1 DOT CENTER
C		LTYP = 4: SHORT DASH
C		LTYP = 5: MEDIUM DASH
C		LTYP = 6: 3 DOT CENTER
C		LTYP = 7: LONG AND SHORT DASH
C		LTYP = 8: SPARSE DASH
C
C	LWID: ACTIVE LINE WIDTH NUMBER (NOT IMPLEMENTED ON CRT).
C
	INCLUDE 'TEKLIB.CBS'
     	CHARACTER PATTERN*8

     	IF( LTY.EQ.LTYP .AND. LWD.EQ.LWID ) RETURN
     	IF( IABS(LTYP).GT.0 ) THEN
     	    LTY = IABS(LTYP)
     	    IF( LTY.GT.8 ) LTY = 8
     	ENDIF
     	IF( IABS(LWID).GT.0 ) THEN
     	    LWD = IABS(LWID)
     	    IF( LWD.GT.9 ) LWD = 9
     	ENDIF
     	IF( ITM.EQ.2 ) THEN		!TEK-4100 GRAPHICS
     	    IF( IPL.GT.NBS-IPK-8 ) CALL IFINIT_DUMP
    	    IPB(IPL+1) = 27		!<ESC>MV index: LINE-TYPE
    	    IPB(IPL+2) = 'M'
    	    IPB(IPL+3) = 'V'
    	    IPB(IPL+4) = 47 + LTY
    	    IPL = IPL + 4
     	ENDIF
    	IF( ITM.EQ.3 ) THEN		!REGIS GRAPHICS
     	    IF( IPL.GT.NBS-IPK-12 ) CALL IFINIT_DUMP
    	    IPB(IPL+1) = 'W'
    	    IPB(IPL+2) = '('
    	    IPB(IPL+3) = 'P'
     	    IPL = IPL + 3
     	    IF( LTY.EQ.1 ) THEN
     		PATTERN = '11111111'
     	    ELSE IF( LTY.EQ.2 ) THEN
     		PATTERN = '10001000'
     	    ELSE IF( LTY.EQ.3 ) THEN
     		PATTERN = '11100100'
     	    ELSE IF( LTY.EQ.4 ) THEN
     		PATTERN = '11110000'
     	    ELSE IF( LTY.EQ.5 ) THEN
     		PATTERN = '11111100'
     	    ELSE
     		PATTERN = '11000100'
     	    ENDIF
     	    DO  I=1, 8
     		IPL = IPL + 1
     		IPB(IPL) = ICHAR(PATTERN(I:I))
     	    ENDDO
    	    IPL = IPL + 1
    	    IPB(IPL) = ')'
    	ENDIF

     	IF( IDW.NE.0 ) THEN
     	    IF( NPPS.GT.0 ) CALL IFPLOT_DUMP
     	    WRITE(IDF,1000) LTYP,LWID
     	ENDIF
1000	FORMAT('STYL:',2I3)

999	RETURN
	END

     	SUBROUTINE IFSTYL_NOW( LTYP, LWID )
C
C	THIS ROUTINE REPORTS THE ACTIVE LINE TYPE AND LINE WIDTH.
C
     	INCLUDE 'TEKLIB.CBS'

     	LTYP = LTY
     	LWID = LWD

     	RETURN
     	END
