> Where can I find the source for 'libpng'? It is used by Mosaic.
> RedHat has a file 'libpng-0.98x-1.src.rpm' but I can't get 'rpm'
> to unpack it.
You can get the source in libgr, available from sunsite.unc.edu.
I suggest that you _don't_ look at the source. I have, and it makes
my eyes hurt. It is full of 16-bit pre-ANSI C. It does not look 64-bit
clean. It is truly convoluted. It uses setjump and longjump to exit
from the library back to the calling program when there is an error.
The documentation is poor. The original source (ftp.uunet.net maybe)
even has the CR-LF line endings like DOS and comes in a .ZIP file.
There is no way you will use libpng with a C++ compiler. This library
is so bad that it stores an image as an array of row arrays to avoid
hitting the 64 kB malloc() limit on DOS systems. It expects to read
the image itself using fread(). At least it does not require a
little-endian machine.
I'd love to replace libpng with a more modern library. It should
support 32-bit and 64-bit machines, but not 16-bit machines. Even
DOS programmers can use DJGPP or Watcom C++ to get 32-bit pointers.
It should have ANSI C prototypes and all the 'extern "C"' things
needed for C++. It should take a pointer to the image, which might
be: in a mmaped file, half-downloaded to memory, read from a file,
or passed through a socket.
--
--
Albert Cahalan <acahalan at cs.uml.edu> My address may be mangled to
avoid junk email. Please check it if you wish to respond to a news post.