diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-09 23:15:17 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-09 23:15:17 +0200 |
commit | 4a05689ac239535c3441f8d43d21c1373bc0194a (patch) | |
tree | 4d5ef120cc0f0f8e7f91ff0912adee802f60c9f2 /fitz | |
parent | 63848329d1ee61e30a557a31a3b2d811a13ed421 (diff) | |
download | mupdf-4a05689ac239535c3441f8d43d21c1373bc0194a.tar.xz |
Throw an error if none of the content stream parts could be loaded.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/fitz.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 491db28b..7de81c42 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -15,11 +15,16 @@ #include <assert.h> #include <errno.h> #include <limits.h> /* INT_MAX & co */ -#include <float.h> /* FLT_EPSILON */ -#include <fcntl.h> /* O_RDONLY & co */ +#include <float.h> /* FLT_EPSILON */ +#include <fcntl.h> /* O_RDONLY & co */ #define nelem(x) (sizeof(x)/sizeof((x)[0])) +#define ABS(x) ( (x) < 0 ? -(x) : (x) ) +#define MIN(a,b) ( (a) < (b) ? (a) : (b) ) +#define MAX(a,b) ( (a) > (b) ? (a) : (b) ) +#define CLAMP(x,a,b) ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) ) + /* * Some differences in libc can be smoothed over */ @@ -110,6 +115,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tz); typedef int fz_error; +#define fz_okay ((fz_error)0) + void fz_warn(char *fmt, ...) __printflike(1, 2); void fz_flush_warnings(void); @@ -121,8 +128,6 @@ fz_error fz_throw_impx(char *fmt, ...) __printflike(1, 2); fz_error fz_rethrow_impx(fz_error cause, char *fmt, ...) __printflike(2, 3); void fz_catch_impx(fz_error cause, char *fmt, ...) __printflike(2, 3); -#define fz_okay ((fz_error)0) - /* extract the last error stack trace */ int fz_get_error_count(void); char *fz_get_error_line(int n); @@ -131,11 +136,6 @@ char *fz_get_error_line(int n); * Basic runtime and utility functions */ -#define ABS(x) ( (x) < 0 ? -(x) : (x) ) -#define MIN(a,b) ( (a) < (b) ? (a) : (b) ) -#define MAX(a,b) ( (a) > (b) ? (a) : (b) ) -#define CLAMP(x,a,b) ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) ) - /* memory allocation */ void *fz_malloc(int size); void *fz_calloc(int count, int size); |