Small DOC for mdecode
1995 by Marco Paganini
[paganini@embratel.net.br]
-----------------------------------------------------------------------------

1.0. What is mdecode?

Mdecode is a very small (but useful) program designed to decode multi-part
(or single part) uuencoded files contained in mailboxes. 

2.0 huh????

Some newsgroups, notably the alt.binaries.* and comp.binaries.* are places
for distribution of binary files (of course). Usually these binaries come
uuencoded, so they can be transmitted through 7 bit channels. 

Unfortunately, in spite of uuencoded files being almost all alike, there's
no standard for "breaking" such files into multiple pieces. Most news
readers like TRN and TIN offer features that will allow you to re-join the
multi-part file into a single .UUE file, but most of the time the programs
fail miserably due to the enormous variety of fancy things people put into
the message containing the encoded file. 

Luckily, most news readers also allow you to save the desired messages
into a 'mailbox' that can later be read with you preferred mail program
(such as elm, pine, etc). This mailbox may then sorted by SUBJECT (that's
very important, since 99% of the multi-part files contain some kind of
"part x/y or part x/y" and this will get the parts into the correct order)
and piped to mdecode. 

Tip: In ELM, use "O" for options, "S" for sort, "R" to take the reverse
order away and <Space bar> till you see "Subject" in the "Sorting
Criteria"  line. Get back to the index with the "i" key, tag all messages
with "T" and pipe 'em to mdecode using the "|" command. 

3.0 What happens after I pipe?

Mdecode will scan its input ignoring every line that does not look like a
part of a uuencoded file. Whenever it finds a 'begin' line, it starts
outputting the data to a temp file. When it finds a 'end' line, output is
stopped and the original (dumb) uudecode program is called to act upon the
newly generated file. After successful operation, the temp file is
removed. If uudecode reports some problem, the temp file will not be
removed, so you can take a look at it manually. 

4.0. Can I decode ftpmail output and other multi-part like stuff? 

Yes. Since mdecode ignores everything that does not fit to be a uuencoded
line, it can handle multi-part files generated by FTPMAIL, BITFTP, TRICKLE
and I think most others "File by Mail" distribution systems, AS LONG AS
THEY UUENCODE THE FILES. 

5.0. What are the command line options?

Try mdecode -h

6.0. How do I compile mdecode.

Eheh... Try cc -o mdecode mdecode.c :)

7.0. Hey dude, I ran your f&@#*&^* program of SH*&(&#(@ and it 
     f(*&#(&@ my whole damn f(*@&#@ hard-disk. May I kill you?

Of course, the author, Marco Paganini, shall not be liable for any loss of
data, hair, wife, friends, girlfriend, interest in sex, patience or any
other caused by the direct or indirect use of this program. The only
guaranteed thing about this program is that it will take space on your
hard disk. 

If you like (or hate) this program, send a mail to the author,
Marco Paganini, at paganini@embratel.net.br saying so. 

Have a tolerable day
Paga
