next up previous
Next: Version 2 Up: The Trivial Decoder Previous: The Trivial Decoder

Version 1

Figure 2: The ``Trivial Decoder'', Version 1
3#3

The minimal decoding program is displayed in Figure 2. Only four code lines are needed for the implementation. <stdlib.h> defines NULL, <uudeview.h> declares the decoding library functions, and <config.h>, the library's configuration file, is needed for some configuration details9.

After initialization, the file given as first command line parameter is scanned. No symbolic name is assigned to the file, so that we don't need a file callback. After the scanning, the encoded file is decoded and stored in the current directory by its native name.

Of course, there is much to complain about:


next up previous
Next: Version 2 Up: The Trivial Decoder Previous: The Trivial Decoder
Build Daemon 2002-04-14