      SUBROUTINE WIINWS(IERASE)
C
C     PURPOSE--INITIALIZE THE WINDOW SYSTEM
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IERASE
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'INWS')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIINWS--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IERASE,IWERIN
   55 FORMAT('IERASE,IWERIN = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWERIN=IERASE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 8-45          **
C               ************************************************
C
 1100 CONTINUE
      CALL SHINIT(' ')
      IF(IERASE.EQ.'ON')CALL CLSCRN
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'INWS')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIINWS--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IERASE,IWERIN
 9015 FORMAT('IERASE,IWERIN = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIEXWS(IERASE)
C
C     PURPOSE--EXIT FROM THE WINDOW SYSTEM
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IERASE
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'INIT')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIEXWS--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IERASE,IWEREX
   55 FORMAT('IERASE,IWEREX = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWEREX=IERASE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 8-47          **
C               ************************************************
C
 1100 CONTINUE
      IF(IWEREX.EQ.'OFF')CALL SHQUIT(' ')
      IF(IWEREX.EQ.'ON')CALL SHQUIT('C')
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'INIT')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIEXWS--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IERASE,IWEREX
 9015 FORMAT('IERASE,IWEREX = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIOPWI
C
C     PURPOSE--OPEN A WINDOW
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'OPWI')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIOPWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW,MAXWIN
   54 FORMAT('IWINCW,MAXWIN = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,61)IWINBC(IWINCW),IWINFC(IWINCW),IWINCW
   61 FORMAT('IWINBC(IWINCW),IWINFC(IWINCW),IWINCW = ',
     1A4,2X,A4,2X,I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,62)IWINFR(IWINCW),IWEROP(IWINCW),WIPOP(IWINCW)
   62 FORMAT('IWINFR(IWINCW),IWEROP(IWINCW),WIPOP(IWINCW) = ',
     1A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,63)IWINX1(IWINCW),IWINY1(IWINCW)
   63 FORMAT('IWINX1(IWINCW),IWINY1(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,64)IWINX2(IWINCW),IWINY2(IWINCW)
   64 FORMAT('IWINX2(IWINCW),IWINY2(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEED BE DONE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-30          **
C               ************************************************
C
 1100 CONTINUE
      IX1=IWINX1(IWINCW)
      IY1=IWINY1(IWINCW)
      IXLEN=IWINXL(IWINCW)
      IYLEN=IWINYL(IWINCW)
      CALL WNOPEN(IX1,IY1,IXLEN,IYLEN)
      WRITE(ICOUT,777)
  777 FORMAT('WNOPEN HAS JUST BEEN CALLED')
      CALL DPWRST('XXX','BUG ')
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'OPWI')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIOPWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW,MAXWIN
 9014 FORMAT('IWINCW,MAXWIN = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IX1,IY1,IXLEN,IYLEN
 9015 FORMAT('IX1,IY1,IXLEN,IYLEN = ',4I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9021)IWINBC(IWINCW),IWINFC(IWINCW),IWINCW
 9021 FORMAT('IWINBC(IWINCW),IWINFC(IWINCW),IWINCW = ',
     1A4,2X,A4,2X,I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9022)IWINFR(IWINCW),IWEROP(IWINCW),WIPOP(IWINCW)
 9022 FORMAT('IWINFR(IWINCW),IWEROP(IWINCW),WIPOP(IWINCW) = ',
     1A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9023)IWINX1(IWINCW),IWINY1(IWINCW)
 9023 FORMAT('IWINX1(IWINCW),IWINY1(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9024)IWINXL(IWINCW),IWINYL(IWINCW)
 9024 FORMAT('IWINXL(IWINCW),IWINYL(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9025)IWINX2(IWINCW),IWINY2(IWINCW)
 9025 FORMAT('IWINX2(IWINCW),IWINY2(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WICLWI(IERASE,IWRPRE)
C
C     PURPOSE--CLOSE A WINDOW
C              (CLEAR?  WRITE PREVIOUS WINDOW?)
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IERASE
      CHARACTER*4 IWRPRE
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'CLWI')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WICLWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IERASE,IWRPRE
   55 FORMAT('IERASE,IWRPRE = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)IWEROP(IWINCW),IWINTY(IWINCW)
   56 FORMAT('IWEROP(IWINCW),IWINTY(IWINCW) = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWERCL(IWINCW)=IERASE
      IWWRPR(IWINCW)=IWRPRE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-28          **
C               ************************************************
C
 1100 CONTINUE
      IFLAG=0
      IF(IERASE.EQ.'ON'.OR.IWRPRE.EQ.'ON')IFLAG=1
      CALL WNCLOS(IFLAG)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'CLWI')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WICLWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IERASE,IWRPRE
 9015 FORMAT('IERASE,IWRPRE = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)IWEROP(IWINCW),IWINTY(IWINCW)
 9016 FORMAT('IWEROP(IWINCW),IWINTY(IWINCW) = ',A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)IFLAG
 9017 FORMAT('IFLAG = ',I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISEWI(ICURWI)
C
C     PURPOSE--SELECT A WINDOW (TO OPERATE ON)
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SEWI')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISEWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)ICURWI
   54 FORMAT('ICURWI = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IWINCW
   55 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWINCW=ICURWI
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-37          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNSEL(ICURWI)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SEWI')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISEWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)ICURWI
 9014 FORMAT('ICURWI = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IWINCW
 9015 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISECO(IBCOL,IFCOL)
C
C     PURPOSE--SET THE COLOR FOR A WINDOW
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IBCOL
      CHARACTER*4 IFCOL
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SECO')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISECO--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW,MAXWIN
   54 FORMAT('IWINCW,MAXWIN = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IBCOL,IFCOL,IWINCW
   55 FORMAT('IBCOL,IFCOL,IWINCW = ',A4,2X,A4,I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)IWINBC(IWINCW),IWINFC(IWINCW),IWINCW
   56 FORMAT('IWINBC(IWINCW),IWINFC(IWINCW),IWINCW = ',
     1A4,2X,A4,I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWINBC(IWINCW)=IBCOL
      IWINFC(IWINCW)=IFCOL
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-15          **
C               ************************************************
C
 1100 CONTINUE
      CALL COLOR(IFCOL,IBCOL)
      WRITE(ICOUT,777)
  777 FORMAT('COLOR HAS JUST BEEN CALLED')
      CALL DPWRST('XXX','BUG ')
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SECO')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISECO--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW,MAXWIN
 9014 FORMAT('IWINCW,MAXWIN = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IBCOL,IFCOL,IWINCW
 9015 FORMAT('IBCOL,IFCOL,IWINCW = ',A4,2X,A4,I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)IWINBC(IWINCW),IWINFC(IWINCW),IWINCW
 9016 FORMAT('IWINBC(IWINCW),IWINFC(IWINCW),IWINCW = ',
     1A4,2X,A4,I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISETY(ITYPE)
C
C     PURPOSE--SET THE FRAME (ON/OFF) FOR A WINDOW
C              FOR OTG INTERACTER WINDOW WYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IERASE
      CHARACTER*4 ITYPE
      CHARACTER*4 IFRAME
C
      CHARACTER*4 IC4
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
      IC4='XXXX'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SETY')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISETY--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)ITYPE
   55 FORMAT('ITYPE = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,57)IWEROP(IWINCW)
   57 FORMAT('IWEROP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,58)WIPOP(IWINCW)
   58 FORMAT('WIPOP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,59)IWINFR(IWINCW)
   59 FORMAT('IWINFR(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      WIPOP(IWINCW)=ITYPE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-27          **
C               ************************************************
C
 1100 CONTINUE
      IERASE=IWEROP(IWINCW)
      IFRAME=IWINFR(IWINCW)
      IC4='    '
      IF(IERASE.EQ.'ON')IC4(1:1)='C'
      IF(ITYPE.EQ.'POP')IC4(2:2)='P'
      IF(IFRAME.EQ.'ON')IC4(3:3)='F'
      CALL WNACTN(IC4)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SETY')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISETY--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)ITYPE
 9015 FORMAT('ITYPE = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)IWEROP(IWINCW)
 9017 FORMAT('IWEROP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9018)WIPOP(IWINCW)
 9018 FORMAT('WIPOP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9019)IWINFR(IWINCW)
 9019 FORMAT('IWINFR(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9021)IC4
 9021 FORMAT('IC4 = ',A4)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISEFR(IFRAME)
C
C     PURPOSE--SET THE FRAME (ON/OFF) FOR A WINDOW
C              FOR OTG INTERACTER WINDOW WYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IERASE
      CHARACTER*4 ITYPE
      CHARACTER*4 IFRAME
C
      CHARACTER*4 IC4
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SEFR')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISEFR--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IFRAME
   55 FORMAT('IFRAME = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,57)IWEROP(IWINCW)
   57 FORMAT('IWEROP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,58)WIPOP(IWINCW)
   58 FORMAT('WIPOP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,59)IWINFR(IWINCW)
   59 FORMAT('IWINFR(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWINFR(IWINCW)=IFRAME
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-27          **
C               ************************************************
C
 1100 CONTINUE
      IERASE=IWEROP(IWINCW)
      ITYPE=WIPOP(IWINCW)
      IC4='    '
      IF(IERASE.EQ.'ON')IC4(1:1)='C'
      IF(ITYPE.EQ.'POP')IC4(2:2)='P'
      IF(IFRAME.EQ.'ON')IC4(3:3)='F'
      CALL WNACTN(IC4)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SEFR')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISEFR--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IFRAME
 9015 FORMAT('IFRAME = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)IWEROP(IWINCW)
 9017 FORMAT('IWEROP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9018)WIPOP(IWINCW)
 9018 FORMAT('WIPOP(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9019)IWINFR(IWINCW)
 9019 FORMAT('IWINFR(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9021)IC4
 9021 FORMAT('IC4 = ',A4)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISEWR(IWRAP)
C
C     PURPOSE--SET THE WITHIN-WINDOW TEXT WRAP ATTRIBUTE
C              (OFF = NO WRAP        ON = WRAP)
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IWRAP
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SEWR')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISEWR--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IWRAP,IWINCW
   55 FORMAT('IWRAP,IWINCW = ',A4,I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)IWINWR(IWINCW)
   56 FORMAT('IWINWR(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWINWR(IWINCW)=IWRAP
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-15          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNWRAP(IWRAP)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SEWR')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISEWR--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IWRAP,IWINCW
 9015 FORMAT('IWRAP,IWINCW = ',A4,I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)IWINWR(IWINCW)
 9016 FORMAT('IWINWR(IWINCW) = ',A4)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISELS(IX1,IY1,IXLEN,IYLEN)
C
C     PURPOSE--SET THE LOCATION AND SIZE OF A WINDOW
C              (IX1,IY1) IXLEN,IYLEN
C             WHERE (1,1) IS TOP/LEFT POINT ON THE SCREEN
C             AND SCREEN IS 80 COLUMNS WIDE AND 24 LINES DOWN
C             FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SELS')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISELS--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IX1,IY1,IXLEN,IYLEN
   55 FORMAT('IX1,IY1,IXLEN,IYLEN = ',4I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)IWINX1(IWINCW),IWINY1(IWINCW)
   56 FORMAT('IWINX1(IWINCW),IWINY1(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,57)IWINXL(IWINCW),IWINYL(IWINCW)
   57 FORMAT('IWINXL(IWINCW),IWINYL(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,58)IWINX2(IWINCW),IWINY2(IWINCW)
   58 FORMAT('IWINX2(IWINCW),IWINY2(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)IERRWI='YES'
      IF(IWINCW.LE.0.OR.IWINCW.GE.MAXWIN)GOTO9000
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWINX1(IWINCW)=IX1
      IWINY1(IWINCW)=IY1
      IWINXL(IWINCW)=IXLEN
      IWINYL(IWINCW)=IYLEN
      IX2=IX1+IXLEN-1
      IY2=IY1+IYLEN-1
      IWINX2(IWINCW)=IX2
      IWINY2(IWINCW)=IY2
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-30          **
C               **  (NO ACTION DONE UNTIL WNOPEN(.) COMMAND   **
C               ************************************************
C
 1100 CONTINUE
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SELS')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISELS--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IX1,IY1,IXLEN,IYLEN,IX2,IY2
 9015 FORMAT('IX1,IY1,IXLEN,IYLEN,IX2,IY2 = ',6I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)IWINX1(IWINCW),IWINY1(IWINCW)
 9016 FORMAT('IWINX1(IWINCW),IWINY1(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)IWINXL(IWINCW),IWINYL(IWINCW)
 9017 FORMAT('IWINXL(IWINCW),IWINYL(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9018)IWINX2(IWINCW),IWINY2(IWINCW)
 9018 FORMAT('IWINX2(IWINCW),IWINY2(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIERWI
C
C     PURPOSE--ERASE (= CLEAR) CURRENT WINDOW
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'ERWI')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIERWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEED BE DONE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-28          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNCLR
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'ERWI')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIERWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIMOHO
C
C     PURPOSE--MOVE TO HOME POSITION (= UPPER LEFT) OF CURRENT WINDOW
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MOHO')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIMOHO--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEED BE DONE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-29          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNHOME
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MOHO')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIMOHO--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIMOCU(IX,IY)
C
C     PURPOSE--MOVE WINDOW CURSOR TO (IX,IY)
C              (WHERE (1,1) IS THE UPPER LEFT OF THE WINDOW)
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MOCU')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIMOCU--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IX,IY
   55 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)IWINXC(IWINCW),IWINYC(IWINCW)
   56 FORMAT('IWINXC(IWINCW),IWINYC(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
      IWINXC(IWINCW)=IX
      IWINYC(IWINCW)=IY
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-29          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNCUXY(IX,IY)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MOCU')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIMOCU--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IX,IY
 9015 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)IWINXC(IWINCW),IWINYC(IWINCW)
 9016 FORMAT('IWINXC(IWINCW),IWINYC(IWINCW) = ',2I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIMWST(IX,IY,ISTRIN,NSTRIN)
C
C     PURPOSE--MOVE TO (IX,IY) WITHIN A WINDOW
C              AND WRITE NSTRIN CHARACTERS
C              OF THE STRING ISTRIN
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*80 ISTRIN
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MWST')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIMWST--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IX,IY
   55 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)NSTRIN
   56 FORMAT('NSTRIN = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,57)(ISTRIN(I:I),I=1,NSTRIN)
   57 FORMAT('ISTRIN = ',80A1)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEEDED
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-29          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNOUSX(IX,IY,ISTRIN(1:NSTRIN))
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MWST')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIMWST--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IX,IY
 9015 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)NSTRIN
 9016 FORMAT('NSTRIN = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)(ISTRIN(I:I),I=1,NSTRIN)
 9017 FORMAT('ISTRIN = ',80A1)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIMWIN(IX,IY,IVALUE,NVALUE)
C
C     PURPOSE--MOVE TO (IX,IY) WITHIN A WINDOW
C              AND WRITE OUT THE INTEGER    IVALUE
C              WITH AN I-NVALUE FORMAT (E.G., I1,I2,I3,...)
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MWIN')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIMWIN--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IX,IY
   55 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)NVALUE
   56 FORMAT('NVALUE = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,57)IVALUE
   57 FORMAT('IVALUE = ',I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEEDED
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-29 AND 5-34 **
C               ************************************************
C
 1100 CONTINUE
 
      CALL WNCUXY(IX,IY)
      CALL WNOUIN(IVALUE,NVALUE)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MWIN')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIMWIN--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IX,IY
 9015 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)NVALUE
 9016 FORMAT('NVALUE = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)IVALUE
 9017 FORMAT('IVALUE = ',I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIMWRE(IX,IY,VALUE,ICFORM,NCFORM)
C
C     PURPOSE--MOVE TO (IX,IY) WITHIN A WINDOW
C              AND WRITE OUT THE REAL    VALUE
C              WITH A F FORMAT AS DEFINED BY THE FIRST NCFORM
C              CHARACTERS OF THE STRING ICFORM
C              (WITH FIRST AND LAST CHARACTERS BEING ( AND ))
C              (E.G., (F6.2), (F10.4), ETC.)
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*80 ICFORM
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MWRE')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIMWRE--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IX,IY
   55 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)NCFORM
   56 FORMAT('NCFORM = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,57)(ICFORM(I:I),I=1,NCFORM)
   57 FORMAT('ICFORM = ',80A1)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,58)VALUE
   58 FORMAT('VALUE = ',E15.7)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEED BE DONE
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-29 AND 5-35 **
C               ************************************************
C
 1100 CONTINUE
      CALL WNCUXY(IX,IY)
      CALL WNOURE(VALUE,ICFORM(1:NCFORM))
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'MWRE')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIMWRE--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IX,IY
 9015 FORMAT('IX,IY = ',2I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)NCFORM
 9016 FORMAT('NCFORM = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9017)(ICFORM(I:I),I=1,NCFORM)
 9017 FORMAT('ICFORM = ',80A1)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9018)VALUE
 9018 FORMAT('VALUE = ',E15.7)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WIREST(ISTRIN,NSTRIN)
C
C     PURPOSE--READ A STRING (ISTRIN) WITHIN A WINDOW
C              AND REPORT NUMBER OF ENTERED CHARACTERS (NSTRIN).
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*80 ISTRIN
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
      ISTRIN=' '
      NSTRIN=(-999)
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'REST')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WIREST--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)NSTRIN
   56 FORMAT('NSTRIN = ',I8)
      CALL DPWRST('XXX','BUG ')
      IF(NSTRIN.GE.1)WRITE(ICOUT,57)(ISTRIN(I:I),I=1,NSTRIN)
   57 FORMAT('ISTRIN = ',80A1)
      IF(NSTRIN.GE.1)CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     NO COPYING NEEDED
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-29          **
C               ************************************************
C
 1100 CONTINUE
      CALL INSTR(ISTRIN,NSTRIN)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'REST')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WIREST--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)NSTRIN
 9016 FORMAT('NSTRIN = ',I8)
      CALL DPWRST('XXX','BUG ')
      IF(NSTRIN.GE.1)WRITE(ICOUT,9017)(ISTRIN(I:I),I=1,NSTRIN)
 9017 FORMAT('ISTRIN = ',80A1)
      IF(NSTRIN.GE.1)CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WISCWI(IDIR,NUMLIN)
C
C     PURPOSE--SCROLL WINDOW CONTENTS UP/DOWN BY NUMLIN LINES
C              FOR OTG INTERACTER WINDOW SYSTEM
C     WRITTEN BY--JAMES J. FILLIBEN
C                 STATISTICAL ENGINEERING DIVISION
C                 CENTER FOR APPLIED MATHEMATICS
C                 NATIONAL BUREAU OF STANDARDS
C                 WASHINGTON, D. C. 20234
C                 PHONE--301-975-2855
C     NOTE--DATAPLOT IS A REGISTERED TRADEMARK
C           OF THE NATIONAL BUREAU OF STANDARDS.
C           THIS SUBROUTINE MAY NOT BE COPIED, EXTRACTED,
C           MODIFIED, OR OTHERWISE USED IN A CONTEXT
C           OUTSIDE OF THE DATAPLOT LANGUAGE/SYSTEM.
C     LANGUAGE--ANSI FORTRAN (1977)
C     VERSION NUMBER--90.9
C     ORIGINAL VERSION --AUGUST      1990
C
C-----NON-COMMON VARIABLES-----------------------------
C
      CHARACTER*4 IDIR
C
C-----COMMON (FOR WINDOW SYSTEM)-----------------------------
C
      INCLUDE 'DPCOWI.INC'
      INCLUDE 'DPCOHO.INC'
C
C-----COMMON VARIABLES (GENERAL)--------------------------------------
C
      CHARACTER*4 IFEEDB
      CHARACTER*4 IPRINT
      CHARACTER*240 ICOUT
C
      COMMON /MACH/IRD,IPR,CPUMIN,CPUMAX,NUMBPC,NUMCPW,NUMBPW
      COMMON /PRINT/IFEEDB,IPRINT
      COMMON /TEXTOU/ICOUT,NCOUT,ILOUT
C
C-----START POINT-----------------------------------------------------
C
      IERRWI='NO'
C
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SCWI')GOTO90
      WRITE(ICOUT,999)
  999 FORMAT(1X)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,51)
   51 FORMAT('***** AT THE BEGINNING OF WISCWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,52)IBUGWI,ISUBWI,IERRWI
   52 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,53)IWINSY,IHOST1,IHOST2
   53 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,54)IWINCW
   54 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,55)IDIR
   55 FORMAT('IDIR = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,56)NUMLIN
   56 FORMAT('NUMLIN = ',I8)
      CALL DPWRST('XXX','BUG ')
   90 CONTINUE
C
C               **************************************************
C               **  STEP 1--                                    **
C               **  COPY OVER THE TEMPORARY INPUT VARIABLES     **
C               **  INTO PERMANENT COMMON VARIABLES             **
C               **************************************************
C
C     COPYING NOT NEEDED
C
C               ************************************************
C               **  STEP 11--                                 **
C               **  TREAT THE OTG (UNIV. OF SALFORD) SYSTEM   **
C               **  OTG INTERACTOR MANUAL, PAGE 5-36          **
C               ************************************************
C
 1100 CONTINUE
      CALL WNSCRL(IDIR,NUMLIN)
      GOTO9000
C
C               *****************
C               **  STEP 90--  **
C               **  EXIT       **
C               *****************
C
 9000 CONTINUE
      IF(IBUGWI.EQ.'OFF'.AND.ISUBWI.NE.'SCWI')GOTO9090
      WRITE(ICOUT,999)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9011)
 9011 FORMAT('***** AT THE END       OF WISCWI--')
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9012)IBUGWI,ISUBWI,IERRWI
 9012 FORMAT('IBUGWI,ISUBWI,IERRWI = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9013)IWINSY,IHOST1,IHOST2
 9013 FORMAT('IWINSY,IHOST1,IHOST2 = ',A4,2X,A4,2X,A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9014)IWINCW
 9014 FORMAT('IWINCW = ',I8)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9015)IDIR
 9015 FORMAT('IDIR = ',A4)
      CALL DPWRST('XXX','BUG ')
      WRITE(ICOUT,9016)NUMLIN
 9016 FORMAT('NUMLIN = ',I8)
      CALL DPWRST('XXX','BUG ')
 9090 CONTINUE
C
      RETURN
      END
      SUBROUTINE WNCLR
      RETURN
      END
      SUBROUTINE WNSEL(IN)
      RETURN
      END
      SUBROUTINE SHQUIT(IA)
      CHARACTER*(*) IA
      RETURN
      END
      SUBROUTINE WNHOME
      RETURN
      END
      SUBROUTINE WNWRAP(IA)
      CHARACTER*(*) IA
      RETURN
      END
      SUBROUTINE WNOUSX(IN1,IN2,IA)
      CHARACTER*(*) IA
      RETURN
      END
      SUBROUTINE WNACTN(IA)
      CHARACTER*(*) IA
      RETURN
      END
      SUBROUTINE COLOR(IA1,IA2)
      CHARACTER*(*) IA1, IA2
      RETURN
      END
      SUBROUTINE INSTR(IA1,LENGTH)
      CHARACTER*(*) IA1
      RETURN
      END
      SUBROUTINE WNSCRL(IA1,LENGTH)
      CHARACTER*(*) IA1
      RETURN
      END
      SUBROUTINE SHINIT(IA1)
      CHARACTER*(*) IA1
      RETURN
      END
      SUBROUTINE CLSCRN
      RETURN
      END
      SUBROUTINE WNOURE(VALUE,IA1)
      CHARACTER*(*) IA1
      RETURN
      END
      SUBROUTINE WNCUXY(IX,IY)
      RETURN
      END
      SUBROUTINE WNOUIN(IVALUE,NVALUE)
      RETURN
      END
