*"$@I=Bj(J $@%H!<%sIA2h(J GTOOL3(GGTONE)
*
*"$@MzNr(J 90/08/17 $@>B8}(J  $@FX(J
*"$@MzNr(J 95/05/25 $@C]9-??0l(J  for dcl-5.0
*
*
*********************************************************************
*"         << $@%H!<%sIA2h(J >>
*********************************************************************
      SUBROUTINE GGTONE
     I         ( HHEAD , GDATA ,
     I           TONL  , ITON  , NTON  )
*
      CHARACTER  HHEAD ( * )*(*)         !" $@%X%C%@!<(J
      REAL       GDATA ( * )             !" $@%G!<%?(J
      REAL       TONL  ( NTON+1 )        !" $@%H!<%s6-3&CM(J
      INTEGER    ITON  ( NTON )          !" $@%H!<%sHV9f(J
*"    INTEGER    NTON                    ! $@%H!<%s$N?t(J
*
      LOGICAL    OTONS
*
*"         < 1. $@%5%$%:(J >
*
      CALL GUSMIS ( HHEAD )
*
      CALL GHPGET ( HHEAD, 'ASTR1', IXSTR )
      CALL GHPGET ( HHEAD, 'AEND1', IXEND )
      CALL GHPGET ( HHEAD, 'ASTR2', IYSTR )
      CALL GHPGET ( HHEAD, 'AEND2', IYEND )
      IXDIM = IXEND-IXSTR+1
      IYDIM = IYEND-IYSTR+1
*
*"         < 2. $@%H!<%s%l%Y%k(J >
*
      CALL GGPGET ( 'TONESET', ITNSET )
      IF ( ITNSET .LE. 0 ) THEN
         CALL UEITLV                                    !" $@%H!<%s%l%Y%k$rL58z(J
      ENDIF
*
      IF ( (ITNSET .NE. 1) .AND. (NTON .GE. 1) ) THEN
         CALL UESTLN ( TONL, ITON, NTON )               !" $@%H!<%s%l%Y%k$r@_Dj(J
      ENDIF
*
      CALL UEQNTL ( NTONE )                             !" $@%H!<%s%l%Y%k$N?t(J
      IF ( NTONE .LT. 1   ) RETURN
*
*"         < 3. $@%H!<%sIA2h(J >
*
c$$$      CALL GGPGET ( 'TONEPXL' , IPXLX )
c$$$      CALL GGPGET ( 'TONEPXL2', IPXLY )
c$$$      CALL UEPSET ( 'LINTER'  ,.FALSE.)
c$$$*
c$$$      CALL SGQTRN( ITR )
c$$$      IF ( ( 1 .LE. ITR ) .AND. ( ITR .LE. 4 ) ) THEN
c$$$         IF ( IPXLX .EQ. 0 ) THEN
c$$$            CALL VETONG ( GDATA ,
c$$$     I                    IXDIM , IXDIM , IYDIM )
c$$$         ELSE IF ( IPXLX .GT. 0 ) THEN
c$$$            IF ( IPXLY .LE. 0 ) IPXLY = IPXLX
c$$$            CALL VETONF ( GDATA ,
c$$$     I                    IXDIM , IXDIM , IYDIM , IPXLX, IPXLY )
c$$$         ELSE
c$$$            CALL UETONE ( GDATA ,
c$$$     I                    IXDIM , IXDIM , IYDIM )
c$$$         ENDIF
c$$$      ELSE
         CALL UETONE ( GDATA ,
     I                 IXDIM , IXDIM , IYDIM )          !" $@%H!<%sIA2h(J
c$$$      ENDIF
*     
*"         < 4. $@%H!<%s%9%1!<%k(J >
*
      CALL GGPGET ( 'LTONS', OTONS )
      IF ( OTONS ) THEN
         CALL GGTONS                              
     I           ( HHEAD )                              !" $@%H!<%s%9%1!<%kIA2h(J
      ENDIF
*
      CALL GGPSET ( 'TONESET', 0 )
*
      RETURN
      END
