	SUBROUTINE DELTSC (STRING, BEGIN, END, LSTPOS)
C
C	   Delete TypeSetting Codes from STRING.  LSTPOS is returned as the
C	   position of the last non-blank character.  The remainder of the
C	   STRING is blanked out.  END is the length of STRING as sent
C	   by the calling program.
C
C	   By: Mark Holomany     Date: 23-Oct-1985
C
C	   Revised: 15-JUL-87 MAH Converted to full FORTRAN 77 lang
C
C=========================================================================

	IMPLICIT INTEGER (A-Z)

	CHARACTER*(*)  STRING

	OLDPOS = BEGIN
	NEWPOS = BEGIN - 1

3001	IF(NEWPOS .GT. END) GO TO 9000
100	IF(OLDPOS .GT. END) GO TO 9000

    	IF(STRING(OLDPOS:OLDPOS) .EQ. '\') THEN
	   OLDPOS = OLDPOS + 3
	   GO TO 100

	ELSE IF(STRING(OLDPOS:OLDPOS) .EQ. '#' .OR.
	1       STRING(OLDPOS:OLDPOS) .EQ. '@' .OR.
	2       STRING(OLDPOS:OLDPOS) .EQ. '|'     ) THEN
	   OLDPOS = OLDPOS + 1
	   GO TO 100

	ELSE
	   NEWPOS = NEWPOS + 1
	   IF(NEWPOS .NE. OLDPOS)  THEN
	      STRING(NEWPOS:NEWPOS) = STRING(OLDPOS:OLDPOS)
	   ENDIF
	   OLDPOS = OLDPOS + 1
	ENDIF
	GO TO 3001

9000	LSTPOS = NEWPOS
	IF(NEWPOS .LT. END) THEN
	   DO 4010 N=NEWPOS+1,END
4010	   STRING(N:N) = ' '
	ENDIF
	RETURN
	END
