pngminus: Fix and improve the PNM processing

Improve png2pnm.c:

 * Add support for writing 16-bit raw PNM image files.

Fix and improve pnm2png.c:

 * Add support for reading 16-bit raw PNM image files.

 * Fix the parsing of arbitrarily long numeric strings.
   In the parsing of PNM tokens, we can and we should avoid storing
   more than one leading '0' in the token buffer. All valid (in-range)
   numeric strings must fit in this limited-size buffer, regardless of
   their actual length in the input file.

 * Refactor the PNM parsing in order to make it more capable to handle
   various kinds of input file errors.

 * Remove the volatile qualifiers from all variable declarations.
   Their original purpose was to appease old (and incorrect) warnings
   issued by ancient optimizing compilers.

 * Print a note about the program's lack of support for the PAM ("P7")
   file format when the input is in this format.

 * Add FIXME notes about the need to signal incorrect or incomplete
   input files. (For png2pnm, this is done inside libpng.)
2 files changed