Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> (or a myriad of other C libraries)

Thankfully it's not a myriad, but pretty much only a handful libraries which had been derived from libjpeg one way or another (and libjpeg - and by extension libpng - is a huge pile of excrement, and not just because of its weird "poor man's exception handling via setjmp/longjmp").

If you want to load image files with minimal effort, use stb_image.h instead.



Well, I didn't do a detailed survey into the ecosystem, but I think you might be underestimating the prevalence of setjmp/longjmp a little bit. For one thing, tons of stuff hard depends on libpng, and libpng only has limited support for environments without it, so that alone is a pretty hard limiting factor.

But also, I already ran into two different very common libraries that need it. FreeType also needs setjmp/longjmp!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: