        SUBROUTINE GSCRSR(X,Y,IBUTN,IERR)
C
C       THIS DIGLIB SUBROUTINE TRIES TO GET GRAPHIC INPUT FROM
C       THE CURRENTLY SELECTED DEVICE.   IF THE DEVICE IS NOT CAPABLE
C       OF IT, IERR=-1, ELSE IERR=0 AND:
C         X     = X POSITION OF CURSOR IN VIRTUAL COORDINATES
C         Y     = Y POSITION OF CURSOR IN VIRTUAL COORDINATES
C         IBUTN = NEW BUTTON STATE
C
        INCLUDE GCDCHR.PRM
        INCLUDE GCDPRM.PRM
        DIMENSION ARRAY(3)
C
C       SEE IF DEVICE SUPPORTS CURSOR
C
        IF (IAND(IDVBTS,1024) .EQ. 0) GO TO 900
C
C       NOW ASK FOR CURSOR FROM DEVICE DRIVER
C
        CALL GSDRVR(12,ARRAY,DUMMY)
C
C       CONVERT ABSOLUTE CM. COORD. TO VIRTUAL COORDINATES
C
        CALL GSIRST(ARRAY(2),ARRAY(3),X,Y)
C
C       GET BUTTON STATE
C
        IBUTN = ARRAY(1)
120     CONTINUE
        IERR = 0
        RETURN
C
C       DEVICE DOESN'T SUPPORT GIN
C
900     IERR = -1
        RETURN
        END
