You are to implement two standard UNIX utilities: uuencode and uudecode. Your implementation should be based on the Linux version of these tools. See the man pages available on the CIS Linux machines:
The specification for this assignment are those man pages plus the utilities themselves. Run the Linux versions of the programs to see what they do with different command-line arguments and different inputs. Your goal is to match this behavior.
Grading will be based upon completed, correct functionality:
The above tasks must be completed in the order that they are listed. For instance, you must implement uuencode first, then uudecode.
The file ~cs611/public/prog1/a.out will be used for grading. All other tests will be hidden.
Your program will be graded primarily by testing it for correct functionality. However, you may lose points if your program is not properly structured or adequately documented.
Before starting, be sure you understand that the input to uuencode is likely to be a binary file (i.e. not an ASCII file) and is therefore likely not viewable using the standard editing tools or by sending it to an ASCII display device.
You may find using the od command helpful for analyzing binary files. In particular, using the -tx1 flag will display the bytes of a file, one byte at a time, in hexadecimal.
When implementing the file mode, the following man pages may be useful:
You must write your programs in C. The source for program uuencode should be placed into a file called "uuencode.c". The source for program uudecode should be placed into a file called "uudecode.c".
You must submit a Makefile (called "Makefile") so that I can conveniently build your programs. The Makefile goal of "uuencode" should build an executable called "uuencode" and the goal of "uudecode" should build an executable called "uudecode".
Your assignment should be submitted for grading from a
CIS Alpha machine (e.g. cisunix.unh.edu).
To turn in this assignment, type:
~cs611/bin/submit prog1 uuencode.c uudecode.c Makefile
Do not turn in any other files!
Submissions can be checked from a CIS Alpha machine by typing:
~cs611/bin/scheck prog1
To receive full credit for the assignment, you must turn in your files prior to 8am on Monday September 17. Late submissions will be accepted at the penalty of 5 points per day up to one week late.
Your programs will be graded using an Intel IA-32 Linux machine (e.g. kng509.unh.edu) so be sure to test in that environment.
Remember: as always you are expected to do your own work on this assignment. Copying code from another student or from sites on the internet is explicitly forbidden!
If you developed your code on a DOS/Windows system, be sure to appropriately transfer your files to the CIS Alpha systems before submitting them. You need to convert the DOS ASCII file format to UNIX format. If you need help with this, please see me.
Comments and questions should be directed to pjh@cs.unh.edu