      INTEGER GETARG,SFDATA,EQUAL
      INTEGER PATH(180),ACLPA0(180),PAIRS(200)
      INTEGER ATTAC0,I,JUNK(9),J,K
      INTEGER A$BUF(200)
      INTEGER USAGE(64)
      INTEGER OOPS(29)
      INTEGER NOTAC0(48)
      INTEGER PARSCL
      INTEGER AAAAA0(11)
      INTEGER AAAAB0(6)
      DATA USAGE/213,243,225,231,229,186,160,243,225,227,236,160,188,240
     *,225,244,232,238,225,237,229,190,160,219,188,225,227,236,160,236,2
     *33,243,244,190,221,160,219,173,236,160,188,240,225,244,232,238,225
     *,237,229,190,160,252,160,173,225,160,188,225,227,225,244,190,221,0
     */
      DATA OOPS/195,225,238,238,239,244,160,243,229,244,160,193,195,204,
     *160,225,243,160,243,240,229,227,233,230,233,229,228,174,0/
      DATA NOTAC0/207,226,234,229,227,244,160,243,240,229,227,233,230,23
     *3,229,228,160,225,230,244,229,242,160,244,232,229,160,162,173,225,
     *162,160,233,243,160,238,239,244,160,225,238,160,225,227,225,244,17
     *4,0/
      DATA AAAAA0/225,188,242,243,190,236,188,242,243,190,0/
      DATA AAAAB0/174,225,227,225,244,0/
      IF((PARSCL(AAAAA0,A$BUF).NE.-3))GOTO 10000
        CALL ERROR(USAGE)
10000 IF((GETARG(1,PATH,180).NE.-1))GOTO 10001
        CALL ERROR(USAGE)
10001 I=1
      J=2
10002   K=GETARG(J,PAIRS(I),200+1-I)
        IF((K.NE.-1))GOTO 10003
          GOTO 10004
10003     I=I+(K+1)
          PAIRS(I-1)=160
          J=J+(1)
      GOTO 10002
10004 PAIRS(I)=0
      IF((A$BUF(225-225+1).EQ.0))GOTO 10005
      IF((A$BUF(236-225+1).EQ.0))GOTO 10005
        CALL ERROR(USAGE)
        GOTO 10006
10005   IF((A$BUF(236-225+1).EQ.0))GOTO 10007
          IF((SFDATA(6,PATH,PAIRS,ATTAC0,A$BUF(A$BUF(236-225+27))).NE.-3
     *))GOTO 10008
            CALL ERROR(OOPS)
10008     GOTO 10009
10007     IF((A$BUF(225-225+1).EQ.0))GOTO 10010
            CALL CTOC(A$BUF(A$BUF(225-225+27)),ACLPA0,180)
            I=1
            GOTO 10013
10011       I=I+(1)
10013       IF((ACLPA0(I).EQ.0))GOTO 10012
              CONTINUE
            GOTO 10011
10012       IF((I.GE.7))GOTO 10014
              CALL ERROR(NOTAC0)
              GOTO 10015
10014         CALL CTOC(ACLPA0(I-5),JUNK,9)
              CALL MAPSTR(JUNK,1)
              IF((EQUAL(JUNK,AAAAB0).EQ.1))GOTO 10016
                CALL ERROR(NOTAC0)
10016       CONTINUE
10015       IF((SFDATA(6,PATH,0,ATTAC0,ACLPA0).NE.-3))GOTO 10017
              CALL ERROR('Could not add object to acat.')
10017       GOTO 10018
10010       IF((SFDATA(6,PATH,PAIRS,ATTAC0,0).NE.-3))GOTO 10019
              CALL ERROR(OOPS)
10019     CONTINUE
10018   CONTINUE
10009 CONTINUE
10006 CALL SWT
      END
C ---- Long Name Map ----
C notacat                        notac0
C aclpath                        aclpa0
C attachsw                       attac0