CSE 271: Programming Assignment 3

Assigned: 7 February 2007
Due: 14 February 2007

Abstract

Extend the simple character compression filter of p2 to
  1. process command line arguments
  2. handle command line options
  3. provide decompression capabilities

Details

Take the compression program written for p2, and: In addition, use the getopt(3c) function to add the following options to your simple compressor: Generate a specific error message followed by a usage message to stderr if the command line arguments are incorrect.

In general, the program should have all the default features and functionality of the previous version. Note that since this version also decompresses, you can now use this program to test itself.

While I will not require that this program be able to compress newlines, it must be able to compress anything else (and it really should be able to handle newlines too). Take a look at the sample solution for p2 if you are uncertain that your p2 submission is correct.

Submission Requirements

  1. As usual, the program must be named p3.c and must reside in the cse271.071/p3 subdirectory.
  2. Divide the source code into two or more .c and .h files.
  3. Create and use an appropriate Makefile that will compile your program using make into an executable named p3, and will clean the directory with make clean.
  4. Your name must be in the comment section (along with appropriate description, etc.).
  5. Do a touch DONE when the program is ready to be collected.

Last revised: 5 February 2007.