From 4a05689ac239535c3441f8d43d21c1373bc0194a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 9 Apr 2011 23:15:17 +0200 Subject: Throw an error if none of the content stream parts could be loaded. --- fitz/fitz.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fitz') 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 #include #include /* INT_MAX & co */ -#include /* FLT_EPSILON */ -#include /* O_RDONLY & co */ +#include /* FLT_EPSILON */ +#include /* 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); -- cgit v1.2.3