      SUBROUTINE CATSUB(A,B,BSTART,LENGTH)                              00064 
      BYTE A(1), B(1), NXTB(2)                                          00065 
      INTEGER*2 BSTART, LENGTH, NXT                                     00066 
      EQUIVALENCE (NXT,NXTB(1))                                         00067 
      IF(LENGTH.GT.0)THEN                                               00069 
      NXTB(1)=A(1)              !Get length into I*2 format!850207mao   00073 
      NXTB(2)=A(2)                                      !850207mao      00074 
      NXT = NXT+3                                       !850207mao      00075 
      DO I = BSTART,BSTART+LENGTH-1                                     00077 
      A(NXT) = B(I+2)                                                   00078 
      NXT = NXT + 1                                                     00079 
      ENDDO                                                             00080 
      NXT=NXT-3         !# of char in A                 !850207mao      00082 
      A(1)=NXTB(1)      !put into string                !850207mao      00083 
      A(2)=NXTB(2)                                      !850207mao      00084 
      IF(NXT/2*2.NE.NXT)A(NXT+3) = (1H )                !850207mao      00088 
      ENDIF                                                             00090 
      RETURN                                                            00091 
      END                                                               00092 
      INTEGER FUNCTION CHTYP(CHAR)                                      00142 
      BYTE CHAR(2)                                                      00143 
      INTEGER*2 TYP                                                     00144 
      IF((CHAR(1).GE.1HA).AND.(CHAR(1).LE.1HZ))THEN                     00147 
      TYP = 1                                                           00147 
      ELSEIF((CHAR(1).GE.1Ha).AND.(CHAR(1).LE.1Hz))THEN                 00148 
      TYP = 1   !850207mao                                              00148 
      ELSEIF((CHAR(1).GE.1H0).AND.(CHAR(1).LE.1H9))THEN                 00149 
      TYP = 2                                                           00149 
      ELSEIF(CHAR(1).EQ.1H-)THEN                                        00150 
      TYP = 3                                                           00150 
      ELSEIF(CHAR(1).EQ."50)THEN                                        00151 
      TYP = 4          !(                                               00151 
      ELSEIF(CHAR(1).EQ."51)THEN                                        00152 
      TYP = 5          !)                                               00152 
      ELSEIF(CHAR(1).EQ.(1H ))THEN                                      00153 
      TYP = 6        !space                                             00153 
      ELSEIF(CHAR(1).EQ."11)THEN                                        00154 
      TYP = 6          !tab                                             00154 
      ELSE                                                              00155 
      TYP = 7                                                           00155 
      ENDIF                                                             00156 
      CHTYP = TYP                                                       00157 
      RETURN                                                            00159 
      END                                                               00160 
      SUBROUTINE GETCH(WORD,POS,VALUE)                                  00204 
      INTEGER*2 POS                                                     00205 
      BYTE WORD(2), VALUE(2)                                            00206 
      VALUE(1) = WORD(POS)                                              00208 
      VALUE(2) = 0                                      !850207mao      00209 
      RETURN                                                            00211 
      END                                                               00212 
      SUBROUTINE PUTCH(WORD,POS,VALUE)                                  00256 
      INTEGER*2 POS                                                     00257 
      BYTE WORD(2), VALUE(2)                                            00258 
      WORD(POS) = VALUE(1)                                              00260 
      RETURN                                                            00262 
      END                                                               00263 
      LOGICAL FUNCTION STREQ(A,B)                                       00308 
      INTEGER*2 LENG                                    !850207mao      00310 
      LOGICAL*2 EQUAL                                                   00311 
      BYTE A(1), B(1), LENGB(2)                 !850207mao              00312 
      EQUIVALENCE (LENG,LENGB(1))                       !850207mao      00313 
      EQUAL = A(1).EQ.B(1) .AND. A(2).EQ.B(2)           !850207mao      00317 
      IF(EQUAL)THEN                                                     00318 
      LENGB(1) = A(1)           !string len as I*2      !850207mao      00320 
      LENGB(2) = A(2)                                                   00321 
      LENG = LENG+2             !last used array elem   !850207mao      00322 
      I = 3                                                             00324 
      DOWHILE(EQUAL.AND.(I.LE.LENG))                                    00325 
      IF (A(I).NE.B(I)) EQUAL = .FALSE.                                 00326 
      I = I+1                                                           00327 
      ENDDO                                                             00328 
      ENDIF                                                             00329 
      STREQ = EQUAL                                                     00331 
      RETURN                                                            00333 
      END                                                               00334 
      LOGICAL FUNCTION STRLT(A,B)                                       00380 
      INTEGER*2 ALENG,BLENG                             !850207mao      00381 
      LOGICAL*2 ALESS, MORE                                             00382 
      BYTE A(1), B(1), ALENGB(2), BLENGB(2)             !850207mao      00383 
      EQUIVALENCE (ALENG,ALENGB(1))                     !850207mao      00384 
      EQUIVALENCE (BLENG,BLENGB(1))                     !850207mao      00385 
      DO I=1,2                                                          00387 
      ALENGB(I) = A(I)                          !850207mao              00388 
      BLENGB(I) = B(I)                          !850207mao              00389 
      ENDDO                                                             00390 
      MLENG = MIN (ALENG,BLENG) + 2                     !850207mao      00394 
      I = 3                                                             00396 
      MORE = .TRUE.                                                     00397 
      DOWHILE(MORE.AND.(I.LE.MLENG))                                    00398 
      IF(A(I).GT.B(I))THEN                                              00400 
      MORE = .FALSE.                                                    00401 
      ALESS = .FALSE.                                                   00402 
      ELSEIF(A(I).LT.B(I))THEN                                          00404 
      MORE = .FALSE.                                                    00405 
      ALESS = .TRUE.                                                    00406 
      ELSE                                                              00408 
      ENDIF                                                             00409 
      I = I+1                                                           00410 
      ENDDO                                                             00411 
      IF (MORE) ALESS = ALENG.LT.BLENG          !850207mao              00415 
      STRLT = ALESS                                                     00417 
      RETURN                                                            00419 
      END                                                               00420 
