home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Extra 1997 #5
/
AmigaPlus_Extra-CD_5-97.iso
/
online-tools
/
mail
/
netmail
/
drivers
/
uuxt.encoder
< prev
next >
Wrap
Text File
|
1995-09-30
|
2KB
|
58 lines
/*
** $VER: UUxT.encoder 1.3 (30.9.95)
** Copyright (c) 1995 Riccardo Solmi
**
*/
OPTIONS RESULTS
OPTIONS FAILAT 21
IF UPPER(ARG(1)) = 'INFO' THEN RETURN 'UUencode'
cmd = 'AmiTCP:bin/UUxT'
IF ~EXISTS(cmd) THEN DO
cmd = GetVar('NetMail/UUxTCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN DO
ADDRESS COMMAND 'SetEnv NetMail/UUxTCmd `Which "UUxT"`'
cmd = GetVar('NetMail/UUxTCmd')
IF cmd = 0 THEN DO
ADDRESS COMMAND 'SetEnv NetMail/UUxTCmd `RequestFile Title "Select UUxT command" Noicons`'
cmd = GetVar('NetMail/UUxTCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN DO
IF UPPER(ARG(1)) = 'ENCODE' THEN RETURN 2
ELSE RETURN ''
END
ADDRESS COMMAND 'Copy QUIET ENV:NetMail/UUxTCmd ENVARC:NetMail/UUxTCmd'
END
END
END
SELECT
WHEN UPPER(ARG(1)) = 'ENCODE' THEN DO
PARSE ARG , from, dest, format
ADDRESS COMMAND '"'cmd'" >NIL: a "'dest'" "'from'"'
RETURN RC
END
WHEN UPPER(ARG(1)) = 'DECODE' THEN DO
PARSE ARG , from, path, format
ADDRESS COMMAND '"'cmd'" >T:attlist x "'from'" "dest='path'"'
attlist = ''
IF OPEN(fin, 'T:attlist', 'Read') THEN DO
DO WHILE EOF(fin) = 0
line = READLN(fin)
PARSE VAR line 'uudecoding "' attfile '"'
IF attfile ~= '' THEN attlist = attlist'|'FilePart(attfile)
END
CLOSE(fin)
DeleteFile('T:attlist')
PARSE VAR attlist '|' attlist
END
RETURN attlist
END
OTHERWISE
END
RETURN ''