      INTEGER ARG(128),NAME(33)
      INTEGER I,NFILES,NODE(2)
      INTEGER GETARG,INPUT,LOOKUP,EQUAL
      INTEGER OFD(10)
      INTEGER OPEN
      INTEGER TABLE
      INTEGER MKTABL
      INTEGER AAAAA0(28)
      INTEGER AAAAB0(1)
      INTEGER AAAAC0(5)
      INTEGER AAAAD0(5)
      INTEGER AAAAE0(5)
      INTEGER AAAAF0(32)
      DATA AAAAA0/170,243,186,160,244,239,239,160,237,225,238,249,160,23
     *9,226,234,229,227,244,160,230,233,236,229,243,170,238,0/
      DATA AAAAB0/0/
      DATA AAAAC0/170,172,163,243,0/
      DATA AAAAD0/174,242,230,236,0/
      DATA AAAAE0/174,243,230,236,0/
      DATA AAAAF0/170,243,186,160,238,239,244,160,230,239,245,238,228,16
     *0,233,238,160,239,226,234,229,227,244,160,230,233,236,229,243,170,
     *238,0/
      CALL DSINIT(32767)
      I=1
      GOTO 10002
10000 I=I+(1)
10002 IF((GETARG(I,ARG,128).EQ.-1))GOTO 10001
        IF((I.LE.10))GOTO 10003
          CALL PRINT(-15,AAAAA0,ARG)
          CALL ERROR(AAAAB0)
10003   OFD(I)=OPEN(ARG,1)
        IF((OFD(I).NE.-3))GOTO 10004
          CALL CANT(ARG)
10004 GOTO 10000
10001 NFILES=I-1
      IF((NFILES.GT.0))GOTO 10005
        CALL SWT
10005 TABLE=MKTABL(2)
      DO 10006 I=1,NFILES
        CALL LOADT0(OFD(I),TABLE)
10006 CONTINUE
10007 CONTINUE
10008 IF((INPUT(-10,AAAAC0,33,NAME).EQ.-1))GOTO 10009
        CALL MAPSTR(NAME,1)
        GOTO 10010
10011     CALL WRBIN(-11,INTL(-1878912768),2)
        GOTO 10012
10013     CALL WRBIN(-11,INTL(-1878913024),2)
        GOTO 10012
10014     CALL OUTPU0(NODE)
          CALL DELET0(NAME,NODE,TABLE)
        GOTO 10012
10010   IF((EQUAL(NAME,AAAAD0).EQ.1))GOTO 10011
        IF((EQUAL(NAME,AAAAE0).EQ.1))GOTO 10013
        IF((LOOKUP(NAME,NODE,TABLE).EQ.1))GOTO 10014
          CALL PRINT(-15,AAAAF0,NAME)
10012 GOTO 10008
10009 CALL WRBIN(-11,0,0)
      CALL SWT
      END
      SUBROUTINE LOADT0(FD,TABLE)
      INTEGER FD
      INTEGER TABLE
      INTEGER NAME(102)
      INTEGER * 4 ADDR
      INTEGER SIZE
      INTEGER GETMO0
10015 IF((GETMO0(FD,NAME,ADDR,SIZE).EQ.-1))GOTO 10016
        CALL ENTER0(TABLE,NAME,ADDR,SIZE,FD)
      GOTO 10015
10016 RETURN
      END
      INTEGER FUNCTION GETMO0(FD,NAME,ADDR,SIZE)
      INTEGER FD
      INTEGER NAME(33)
      INTEGER * 4 ADDR
      INTEGER SIZE
      INTEGER BUF(256),LEN,KLUDG0
      INTEGER RDBIN,HASPR0,GETNA0
      INTEGER * 4 MARKF
      INTEGER AAAAG0
      INTEGER AAAAH0(38)
      INTEGER AAAAI0
      INTEGER AAAAJ0(6)
      INTEGER AAAAK0(6)
      INTEGER AAAAL0(21)
      INTEGER AAAAM0
      INTEGER AAAAN0(42)
      INTEGER AAAAO0(32)
      INTEGER AAAAP0(38)
      INTEGER AAAAQ0(33)
      DATA AAAAH0/226,225,228,160,239,226,234,229,227,244,160,230,233,23
     *6,229,160,168,226,236,239,227,235,160,243,233,250,229,160,237,233,
     *243,237,225,244,227,232,169,0/
      DATA AAAAJ0/174,237,225,233,238,0/
      DATA AAAAK0/174,228,225,244,225,0/
      DATA AAAAL0/229,248,244,242,225,238,229,239,245,243,160,197,206,19
     *6,160,226,236,239,227,235,0/
      DATA AAAAN0/226,225,228,160,239,226,234,229,227,244,160,230,233,23
     *6,229,160,168,245,238,242,229,227,239,231,238,233,250,229,228,160,
     *226,236,239,227,235,160,244,249,240,229,169,0/
      DATA AAAAO0/226,225,228,160,239,226,234,229,227,244,160,230,233,23
     *6,229,160,168,240,242,229,237,225,244,245,242,229,160,197,207,198,
     *169,0/
      DATA AAAAP0/226,225,228,160,239,226,234,229,227,244,160,230,233,23
     *6,229,160,168,226,236,239,227,235,160,243,233,250,229,160,237,233,
     *243,237,225,244,227,232,169,0/
      DATA AAAAQ0/226,225,228,160,239,226,234,229,227,244,160,230,233,23
     *6,229,160,168,226,225,228,160,226,236,239,227,235,160,244,249,240,
     *229,169,0/
10018   ADDR=MARKF(FD)
        LEN=RDBIN(FD,BUF,256)
        IF((LEN.EQ.0))GOTO 10020
        IF((LEN.EQ.-1))GOTO 10020
        GOTO 10019
10020     GETMO0=-1
          RETURN
10019   IF((LEN.LT.0))GOTO 10022
        IF((LEN.NE.RT(BUF(1),8)))GOTO 10022
        GOTO 10021
10022     CALL ERR(FD,AAAAH0)
10021   AAAAI0=RS(BUF(1),12)
        GOTO 10023
10024     IF((HASPR0(BUF).NE.1))GOTO 10025
            KLUDG0=0
            SIZE=1
            IF((GETNA0(BUF,NAME,102).NE.0))GOTO 10026
              CALL SCOPY(AAAAJ0,1,NAME,1)
              LEN=RDBIN(FD,BUF,256)
              KLUDG0=KLUDG0+(1)
              GOTO 10029
10027         LEN=RDBIN(FD,BUF,256)
              KLUDG0=KLUDG0+(1)
10029         IF((RS(BUF(1),12).EQ.11))GOTO 10028
                IF((RS(BUF(1),12).NE.9))GOTO 10030
                IF((GETNA0(BUF,NAME,102).NE.1))GOTO 10030
                  GOTO 10028
10030         GOTO 10027
10028       CONTINUE
10026       IF((RS(BUF(1),12).EQ.11))GOTO 10031
              AAAAG0=1
              GOTO 10017
10032       CONTINUE
10031       SIZE=SIZE+(KLUDG0)
            GETMO0=-2
            RETURN
10025   GOTO 10033
10034     CALL SCOPY(AAAAK0,1,NAME,1)
          AAAAG0=2
          GOTO 10017
10035     GETMO0=-2
          RETURN
10036     CALL ERR(FD,AAAAL0)
        GOTO 10033
10023   AAAAM0=AAAAI0-8
        GOTO(10024,10034,10036),AAAAM0
          CALL ERR(FD,AAAAN0)
10033 CONTINUE
      GOTO 10018
10017 SIZE=1
10037   LEN=RDBIN(FD,BUF,256)
        GOTO 10038
10039   GOTO 10040
10041     CALL ERR(FD,AAAAO0)
        GOTO 10040
10042     CALL ERR(FD,AAAAP0)
        GOTO 10040
10043     CALL ERR(FD,AAAAQ0)
        GOTO 10040
10038   IF((LEN.EQ.0))GOTO 10039
        IF((LEN.LT.0))GOTO 10041
        IF((LEN.EQ.-1))GOTO 10041
        IF((LEN.NE.RT(BUF(1),8)))GOTO 10042
        IF((RS(BUF(1),12).EQ.9))GOTO 10044
        IF((RS(BUF(1),12).EQ.10))GOTO 10044
        IF((RS(BUF(1),12).EQ.11))GOTO 10044
        GOTO 10043
10044   CONTINUE
10040   SIZE=SIZE+(1)
      IF((LEN.EQ.0))GOTO 10045
      IF((RS(BUF(1),12).EQ.11))GOTO 10045
      GOTO 10037
10045 CONTINUE
      GOTO 10046
10046 GOTO(10032,10035),AAAAG0
      GOTO 10046
      END
      INTEGER FUNCTION HASPR0(BUF)
      INTEGER BUF(1)
      INTEGER LEN,I
      LEN=RT(BUF(1),8)
      I=1
      GOTO 10049
10047 I=I+(RT(BUF(I+1),8)+1)
10049 IF((I.GE.LEN))GOTO 10048
        IF((RS(BUF(I+1),8).NE.30))GOTO 10050
          HASPR0=1
          RETURN
10050 GOTO 10047
10048 HASPR0=0
      RETURN
      END
      INTEGER FUNCTION GETNA0(BUF,NAME,SIZE)
      INTEGER BUF(1),SIZE
      INTEGER NAME(SIZE)
      INTEGER LEN,I
      INTEGER AAAAR0
      INTEGER AAAAS0
      LEN=RT(BUF(1),8)
      I=1
      GOTO 10053
10051 I=I+(RT(BUF(I+1),8)+1)
10053 IF((I.GE.LEN))GOTO 10052
        AAAAR0=RS(BUF(I+1),8)
        GOTO 10054
10055     CALL PTOC(BUF(I+3),160,NAME,MIN0(SIZE,RT(BUF(I+1),8)*2-1))
        GOTO 10056
10057     CALL PTOC(BUF(I+2),160,NAME,MIN0(SIZE,RT(BUF(I+1),8)*2+1))
        GOTO 10056
10056     CALL MAPSTR(NAME,1)
          GETNA0=1
          RETURN
10054   AAAAS0=AAAAR0-1
        GOTO(10055,10055),AAAAS0
        AAAAS0=AAAAR0-30
        GOTO(10055,10055,10058,10058,10058,10058,10058,10058,10058,10058
     *,10058,10058,10057),AAAAS0
10058   CONTINUE
      GOTO 10051
10052 GETNA0=0
      RETURN
      END
      SUBROUTINE ENTER0(TABLE,NAME,ADDR,SIZE,FD)
      INTEGER TABLE
      INTEGER NAME(1)
      INTEGER ADDR(2),SIZE,FD
      INTEGER MEMAA0(32767)
      COMMON /DS$MEM/MEMAA0
      INTEGER NODE(2)
      INTEGER LOOKUP
      INTEGER PTR
      INTEGER DSGET
      PTR=DSGET(5)
      MEMAA0(PTR+2)=SIZE
      MEMAA0(PTR+3)=FD
      MEMAA0(PTR+0+0)=ADDR(1)
      MEMAA0(PTR+0+1)=ADDR(2)
      MEMAA0(PTR+4)=0
      IF((LOOKUP(NAME,NODE,TABLE).NE.1))GOTO 10059
        MEMAA0(NODE(2)+4)=PTR
        GOTO 10060
10059   NODE(1)=PTR
10060 NODE(2)=PTR
      CALL ENTER(NAME,NODE,TABLE)
      RETURN
      END
      SUBROUTINE ERR(FD,MSG)
      INTEGER FD
      INTEGER MSG(1)
      INTEGER NAME(180)
      INTEGER AAAAT0(9)
      DATA AAAAT0/170,243,186,160,170,243,170,238,0/
      CALL GFNAM$(FD,NAME,180)
      CALL PRINT(-15,AAAAT0,NAME,MSG)
      CALL SETERR(1000)
      CALL SWT
      END
      SUBROUTINE OUTPU0(NODE)
      INTEGER NODE(2)
      INTEGER MEMAA0(32767)
      COMMON /DS$MEM/MEMAA0
      INTEGER P
      INTEGER BUF(256),I,LEN
      INTEGER RDBIN
      INTEGER AAAAU0(28)
      DATA AAAAU0/229,242,242,239,242,160,227,239,240,249,233,238,231,16
     *0,239,226,234,229,227,244,160,237,239,228,245,236,229,0/
      P=NODE(1)
      CALL SEEKF(MEMAA0(P+0),MEMAA0(P+3),0)
      I=1
      GOTO 10063
10061 I=I+(1)
10063 IF((I.GT.MEMAA0(P+2)))GOTO 10062
        LEN=RDBIN(MEMAA0(P+3),BUF,256)
        IF((LEN.LE.0))GOTO 10065
        IF((LEN.EQ.-1))GOTO 10065
        GOTO 10064
10065     CALL ERR(MEMAA0(P+3),AAAAU0)
10064   CALL WRBIN(-11,BUF,LEN)
      GOTO 10061
10062 RETURN
      END
      SUBROUTINE DELET0(NAME,NODE,TABLE)
      INTEGER NAME(1)
      INTEGER NODE(2)
      INTEGER TABLE
      INTEGER MEMAA0(32767)
      COMMON /DS$MEM/MEMAA0
      INTEGER P
      P=NODE(1)
      IF((MEMAA0(P+4).NE.0))GOTO 10066
        CALL DELETE(NAME,TABLE)
        GOTO 10067
10066   NODE(1)=MEMAA0(P+4)
        CALL ENTER(NAME,NODE,TABLE)
10067 RETURN
      END
      INTEGER FUNCTION RDBIN(FD,BUF,COUNT)
      INTEGER FD,BUF(1),COUNT
      INTEGER CT
      INTEGER * 4 POS
      INTEGER READF,SEEKF
      INTEGER AAAAV0(39)
      DATA AAAAV0/226,236,239,227,235,160,243,233,250,229,160,168,170,23
     *3,169,160,229,248,227,229,229,228,243,160,226,245,230,230,229,242,
     *160,243,240,225,227,229,170,238,0/
      RDBIN=-1
      IF((READF(CT,1,FD).EQ.1))GOTO 10068
        RETURN
10068 IF((CT.LE.COUNT))GOTO 10069
        POS=CT-COUNT
        CALL PRINT(-15,AAAAV0,CT)
        CT=COUNT
        GOTO 10070
10069   POS=0
10070 IF((READF(BUF,CT,FD).EQ.CT))GOTO 10071
        RETURN
10071 IF((POS.EQ.0))GOTO 10072
      IF((SEEKF(POS,FD,1).EQ.-2))GOTO 10072
        RETURN
10072 RDBIN=CT
      RETURN
      END
      INTEGER FUNCTION WRBIN(FD,BUF,COUNT)
      INTEGER FD,BUF(1),COUNT
      INTEGER WRITEF
      WRBIN=-3
      IF((WRITEF(COUNT,1,FD).NE.1))GOTO 10074
      IF((WRITEF(BUF,COUNT,FD).NE.COUNT))GOTO 10074
      GOTO 10073
10074   RETURN
10073 WRBIN=-2
      RETURN
      END
C ---- Long Name Map ----
C getmodule                      getmo0
C hasprocdef                     haspr0
C deletemodule                   delet0
C entermodule                    enter0
C loadtable                      loadt0
C getsize                        getsi0
C Mem                            memaa0
C outputmodule                   outpu0
C kludgesize                     kludg0
C getname                        getna0
