libjpeg is a fairly old library (1991), so it isn't terribly surprising that it doesn't follow modern programming conventions.
libpng is only slightly newer (1995), and may have adopted the pattern from libjpeg.
libpng is only slightly newer (1995), and may have adopted the pattern from libjpeg.
Also libpng. What is it with these graphics guys that they can't just return an error code like a normal person?