C***    GSPEAK

       SUBROUTINE GSPEAK(LOC)

C  PRINT LOCATION DESCRIPTIONS.  WORKS JUST LIKE SPEAK, EXCEPT THAT
C  LOCATION NUMBER IS PREFIXED TO EACH LINE.  THIS IS A SLAVE RTN FOR
C  GRIPE.  WOULD USE XSPEAK, EXCEPT THAT XSPEAK USES 'PRINT' STMTS
C  INSTEAD OF WRITES, THANX TO LOSING '$' FEATURE WHEN TRYING TO SEND
C  MULTI-PART LINES TO A DISK FILE.

       IMPLICIT INTEGER(A-Z)
      INTEGER*4 RTEXT,PTEXT,MTEXT
      INTEGER*4 LINES
       COMMON /TXTCOM/ LINES(25000),RTEXT(400),PTEXT(150),MTEXT(45)
      INTEGER*4 LTEXT,STEXT,M,OLINE
       COMMON /LTXCOM/ LTEXT(250),STEXT(250),KEY(250),ABB(250),LOCSIZ
       COMMON /PLACOM/ ATLOC(250),LINK(300),PLACE(150),
     1          FIXED(150),MAXOBJ
      INTEGER*4 POINTS,K,L
       COMMON /OBJCOM/ PLAC(150),FIXD(150),WEIGHT(150),PROP(150),
     1          POINTS(150)
       DIMENSION OLINE(18)

       K=STEXT(LOC)
      IF(K.EQ.0.OR.LINES(K+1).EQ.XOR('>$< ','CLYD'))K=LTEXT(LOC)
1       L=IABS(LINES(K))-K-1
       DO 2 I=1,L
2     OLINE(I)=XOR(LINES(K+I),'CLYD')
       WRITE (14,3)LOC,(OLINE(I),I=1,L)
3       FORMAT (1X,I3,'  ',18A4)
       K=K+L+1
       IF(LINES(K).GE.0)GOTO 1

C  NOW PRINT OUT NAMES OF OBJECTS AT THIS LOCATION

       DO 7 OBJ=1,MAXOBJ
       IF(LOC.NE.PLACE(OBJ).AND.LOC.NE.FIXED(OBJ))GOTO 7
       SKIP=PROP(OBJ)
       IF(OBJ.EQ.STEPS.AND.LOC.EQ.FIXED(STEPS))SKIP=1
C*
       M=PTEXT(OBJ)
       IF(SKIP.LT.0)GOTO 40
       DO 30 I=0,SKIP
10      M=IABS(LINES(M))
       IF(LINES(M).GE.0)GOTO 10
30      CONTINUE
C*
40      L=IABS(LINES(M))-M-1
       DO 6 I=1,L
6     OLINE(I)=XOR(LINES(M+I),'CLYD')
       WRITE (14,9)(OLINE(J),J=1,L)
9       FORMAT (8X,18A4)
7       CONTINUE
       RETURN

       END
