UUDECODE in Arexx (repost) 
Author Message
 UUDECODE in Arexx (repost)

/* uudecode V2.0 */
/* text to binary decoding (without checksum) */
/* ) by Stefan Haubenthal 1992/94 */
call open input,arg(1)
do forever
        do until datatype(mode)=NUM
                line=readln(input)
                if eof(input) then exit
                parse value line with "begin" mode dest .
        end
        say "uudecoding "dest"..."
        call open output,"ram:"dest,W
        call time(e)
        do lines=1
                line=readln(input)
                if line="end" then leave
                len=c2d(decode(left(line,1)))*4/3
                if len>0 then call writech(output,decode(substr(line,2,trunc(len))))
        end
        say trunc(lines/time(e)*60)" lines per minute"
        call close output
end
exit

/* xx765432 xx107654 xx321076 xx543210
-> 76543210 76543210 76543210 */
DECODE: procedure
/* sub & del */
bin=c2b(translate(arg(1),xrange("00"x,"5f"x),xrange("20"x,"7f"x)))
do n=1 to length(bin) by 6
        bin=delstr(bin,n,2)
end
return b2c(bin)

--
      o o o o o o o . . .   _____________________________ _____=======_||____


 >(________|__|_[_________]_|___________________________|_|_________________|
 _/oo OOOOO oo`  ooo   ooo  'o!o!o                 o!o!o` 'o!o         o!o`
==============================================================================



Fri, 27 Dec 1996 17:28:31 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. UUDECODE - Bit-twiddling in Arexx

2. UUDECODE in Arexx

3. ARexx port <-> ARexx port

4. yEnc / UUDecode

5. uudecode in awk??

6. UUENCODE & UUDECODE in Clarion

7. UUENCODE / UUDECODE

8. UUDECODE with REXX.

9. Uuencode Uudecode In Rexx

10. Uuencode Uudecode In Rexx

11. UUDECODE - Bit-twiddl 2/

12. UUDECODE - Bit-twiddl 1/

 

 
Powered by phpBB® Forum Software