      SUBROUTINE HYEDIT (IEDFLG,FILE)
C--RUN AN EDITOR WITHIN HYPOINVERSE. USED TO INTERACTIVELY PROCESS EVENTS.
      CHARACTER FILE*(*),CTEMP*80
      CTEMP=' '

C--VAX
C      IF (IEDFLG.EQ.1) THEN
C        CALL EDT$EDIT (FILE)
C      ELSE IF (IEDFLG.EQ.2) THEN
C        CALL SPAWN (('ED '//FILE))
C      END IF

C--SUN/UNIX
      IF (IEDFLG.EQ.1) THEN
        CTEMP=('dtpad '//FILE)
      ELSE IF (IEDFLG.EQ.2) THEN
        CTEMP=('vi '//FILE)
      ELSE IF (IEDFLG.EQ.3) THEN
        CTEMP=('textedit '//FILE)
      END IF
      CALL SPAWN (CTEMP)

      RETURN
      END
