C---------------------------------------------------------------------
C  UDELIM  -- CHECK IF CHARACTER IS A UREAD WORD DELIMITER CHARACTER
C
      SUBROUTINE UDELIM(CHAR,ISTAT)
C
      INCLUDE 'USERIO'
C
      CHARACTER*1 CHAR
      INTEGER ISTAT
C
C  MOD DMC 3/89 -- DOUBLE QUOTE IS NO LONGER CONSIDERED A DELIMITER.
C
C  CHAR -- CHARACTER UNDER TEST (INPUT)
C  ISTAT -- RESULT (OUTPUT)
C   =0  NOT A DELIMITER CHARACTER
C   =1  BLANK OR TAB
C   =2  COMMA (ONLY IF THERE IS *NO* USER SPECIFIED PUNCTUATION)
CXXX   =3  DOUBLE QUOTE CHARACTER  *NO MORE*  DMC 3/89
C   =4  USER SPECIFIED PUNCTUATION CHARACTER
C
C  NOTE -- USER SPECIFIED PUNCTUATION CHARACTERS ARE NONBLANK,
C   NONTAB, NONALPHANUMERIC AND NOT DOUBLEQUOTE.  IF COMMA IS A
C   USER SPECIFIED PUNCTUATION CHARACTER, ISTAT=3 IS RETURNED, NOT
C   ISTAT=2.
C
C  COMMAS ARE FLAGGED AS DELIMITERS ONLY IF THERE IS NO USER SPECIFIED
C   USER PUNCTUATION -- AS PER THE OLD UREAD
C
C  THIS ROUTINE CREATED DMC FEB 1989 AS A MEANS TO CHANGE UREAD TO
C  BE COMPATIBLE WITH THE LOCUS USER INTERFACE
C
C--------------------------
C
      ISTAT=0
      IF((CHAR.EQ.' ').OR.(CHAR.EQ.'	')) ISTAT=1
C
      IF(LPUNCT.GT.0) THEN
        IF(INDEX(UPUNCT(1:LPUNCT),CHAR).GT.0) ISTAT=4
      ELSE
        IF(CHAR.EQ.',') ISTAT=2
      ENDIF
C
      RETURN
      END
