NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/49177: usr.bin/uuencode is not functioning correctly, there are some problems in the source code.



The following reply was made to PR bin/49177; it has been noted by GNATS.

From: Dave Huang <khym%azeotrope.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/49177: usr.bin/uuencode is not functioning correctly, there 
are some problems in the source code.
Date: Sat, 6 Sep 2014 13:48:53 -0500

 On Sep 6, 2014, at 10:15, skyblack%live.cn@localhost wrote:
 > I've read through the code carefully, and i found the following =
 problems:
 > it says "usage: %s [-m] [inputfile] outputname\n", right?
 > despite of the "-m" , it means if i pass two arguments to it, the =
 first one will be treated as input and the second one will be treated as =
 output
 
 It's hard to document how a program works in a one-line usage summary.=20=
 
 The man page should have a better explanation of what "outputname"=20
 means (although in the case of uuencode, it's still not very clear,=20
 unfortunately). However, it is clear that "uuencode reads inputfile (or=20=
 
 by default the standard input) and writes an encoded version to the=20
 standard output."
 
 In other words, uuencode always writes to stdout. The "outputname"=20
 parameter just affects the filename in the "begin" line of the encoded=20=
 
 file; uuencode doesn't actually write to that file. I think the purpose=20=
 
 of "outputname" is if you are encoding stdin; you need to provide=20
 uuencode a filename to store in the begin line. E.g.,
 
 $ gzip -c /vmunix | uuencode vmunix.gz | mail khym
 
 P.S. I do think the uuencode man page could be improved. It talks about=20=
 
 "outputname" in the paragraph describing "uudecode", and in the=20
 documentation of the options, it lists "-o outputname" for uudecode,=20
 when uudecode's synopsis has "-o outputfile"
 


Home | Main Index | Thread Index | Old Index