home *** CD-ROM | disk | FTP | other *** search
- MODULE 'DOS/dos'
-
- PROC main()
- DEF file[300]:STRING,old,l
-
- StringF(file,'makedir LZXTemp')
- Execute(file,0,0)
- l:=Lock('LZXTemp',-2)
- old:=CurrentDir(l)
- StringF(file,'Lx \s',arg,arg)
- Execute(file,0,0)
- StringF(file,'lzx -r -e a SYS:temp.lzx #?',arg)
- Execute(file,0,0)
- StringF(file,arg)
- UpperStr(file)
- slice(file,arg)
- StringF(file,'Copy SYS:temp.lzx \s',arg)
- Execute(file,0,0)
- StringF(file,'Delete SYS:temp.lzx >NIL:')
- Execute(file,0,0)
- CurrentDir(old)
- UnLock(l)
- StringF(file,'Delete LZXTemp ALL >NIL:')
- Execute(file,0,0)
- ENDPROC
-
-
-
- PROC slice(name,nameX)
-
- MOVE.L name,A0
- MOVE.L nameX,A1
- s: ADD.L #1,A0
- ADD.L #1,A1
- CMP.B #0,(A0)
- BEQ outa
- CMP.L #".LHA",(A0)
- BNE s1
- MOVE.L #".LZX",(A1)
- s1:
- CMP.L #".LZH",(A0)
- BNE s2
- MOVE.L #".LZX",(A1)
- s2:
- CMP.L #".ARC",(A0)
- BNE s3
- MOVE.L #".LZX",(A1)
- s3:
- CMP.L #".ZOO",(A0)
- BNE s4
- MOVE.L #".LZX",(A1)
- s4:
- CMP.L #".ARJ",(A0)
- BNE s5
- MOVE.L #".LZX",(A1)
- s5:
- CMP.L #".ZIP",(A0)
- BNE s6
- MOVE.L #".LZX",(A1)
- s6: CMP.L #".LZX",(A0)
- BNE s
-
- outa:
-
-
- ENDPROC
-