diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-04-01 15:40:19 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-04-01 15:40:19 -0400 |
commit | c8ab44d29c3384210cd8f27533abfd0fb2205cc5 (patch) | |
tree | 91e09bbe8841e808492dc8e5671a2622aba5a419 /libdimension/png-stubs.c | |
parent | e0313016725bc9f87243571e75b2e77f1cae265e (diff) | |
download | dimension-c8ab44d29c3384210cd8f27533abfd0fb2205cc5.tar.xz |
Set errno on failures.
Diffstat (limited to 'libdimension/png-stubs.c')
-rw-r--r-- | libdimension/png-stubs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libdimension/png-stubs.c b/libdimension/png-stubs.c index eca7697..db4a19d 100644 --- a/libdimension/png-stubs.c +++ b/libdimension/png-stubs.c @@ -19,35 +19,41 @@ *************************************************************************/ #include "dimension.h" +#include <errno.h> /* Stubs for PNG functions when compiled with --disable-png */ int dmnsn_png_optimize_canvas(dmnsn_canvas *canvas) { - return 1; + errno = ENOTSUP; + return -1; } int dmnsn_png_write_canvas(const dmnsn_canvas *canvas, FILE *file) { - return 1; + errno = ENOTSUP; + return -1; } dmnsn_progress * dmnsn_png_write_canvas_async(const dmnsn_canvas *canvas, FILE *file) { + errno = ENOTSUP; return NULL; } dmnsn_canvas * dmnsn_png_read_canvas(FILE *file) { + errno = ENOTSUP; return NULL; } dmnsn_progress * dmnsn_png_read_canvas_async(dmnsn_canvas **canvas, FILE *file) { + errno = ENOTSUP; return NULL; } |