C******************** START FILE IDCODE.FOR ; GROUP URDUTS *************
C=============================================
C&  IDCODE  UREAD DECODE INTEGER INPUT (OBSCELESCENT)
C
C  DECODE UNPACKED LINE TO INTEGER
C
C  LINE WAS READ IN BY SUBROUTINE UREAD, IS UNPACKED 1 CHAR/
C  WORD IN ARRAY DBUFF
C
      INTEGER FUNCTION IDCODE(ZBUFF,IER)
C  REVISED   D. MC CUNE   JULY 14 1980   ADD ERROR CODE "IER"
C    ON RETURN IER=0 IS NORMAL
C         IER=1 INDICATES ILLEGAL FORMAT, FCN VALUE OF ZERO
C          RETURNED.
C
C
C  *** DMC 13 JAN 1985 *** ARGUMENT ZBUFF IS NOT USED
C   ROUTINE IS OBSCELESCENT, MAINTAINED FOR COMPATIBILITY
C   OF OLD ROUTINES-- CHAR STRING FOR DECOD IS CBUFF, UREAD
C   COMMON
C  WORK IS NOW DONE IN JIDCOD
C
      USE USERIO
      CHARACTER*1 ZBUFF(4)  ! NOT USED
C
      I=JIDCOD(CBUFF,IC,ID,ICOD)
C
      IF(ICOD.EQ.-1) THEN
        IDCODE=0
        IER=0
      ELSE IF(ICOD.EQ.0) THEN
        IDCODE=I
        IER=0
      ELSE
        GO TO 900
      ENDIF
C
C  HAVE INTEGER
      CALL UROTOR(ID)
      RETURN
C  ERRORS
 900  CONTINUE
      IDCODE=0
      IER=1
      CALL UERMSG(' % IDCODE:  NOT AN INTEGER:',CBUFF(1:ID),0)
      IF(NLINDI) CALL UPAUST(1)
      RETURN
      	END
C******************** END FILE IDCODE.FOR ; GROUP URDUTS ***************
