diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-04-11 19:55:27 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-04-11 19:55:27 +0200 |
commit | 353b910ded50ded0c755bb28f7319e8f898c3446 (patch) | |
tree | 046060dec9f34559521b4a79dd510fc3a8d621eb | |
parent | c07e088ff77b7dca022dcf2d11bc6a0882ef72fb (diff) | |
download | mupdf-353b910ded50ded0c755bb28f7319e8f898c3446.tar.xz |
Move MAX4 and MIN4 macros to where they are used.
-rw-r--r-- | fitz/base_matrix.c | 3 | ||||
-rw-r--r-- | fitz/fitz_base.h | 7 | ||||
-rw-r--r-- | mupdf/pdf_function.c | 2 |
3 files changed, 4 insertions, 8 deletions
diff --git a/fitz/base_matrix.c b/fitz/base_matrix.c index 8735b1ad..0bd700fc 100644 --- a/fitz/base_matrix.c +++ b/fitz/base_matrix.c @@ -1,5 +1,8 @@ #include "fitz.h" +#define MAX4(a,b,c,d) MAX(MAX(a,b), MAX(c,d)) +#define MIN4(a,b,c,d) MIN(MIN(a,b), MIN(c,d)) + void fz_invert3x3(float *dst, float *m) { float det; diff --git a/fitz/fitz_base.h b/fitz/fitz_base.h index 515e39e5..5c9f03c1 100644 --- a/fitz/fitz_base.h +++ b/fitz/fitz_base.h @@ -49,7 +49,6 @@ extern char *fz_optarg; extern int gettimeofday(struct timeval *tv, struct timezone *tz); -#define FZ_FLEX 1 #define restrict #define inline __inline @@ -69,7 +68,6 @@ extern int gettimeofday(struct timeval *tv, struct timezone *tz); #else /* C99 or close enough */ #include <unistd.h> -#define FZ_FLEX #endif @@ -135,11 +133,6 @@ extern unsigned fz_cpuflags; #define CLAMP(x,a,b) ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) ) #endif -#define MAX4(a,b,c,d) MAX(MAX(a,b), MAX(c,d)) -#define MIN4(a,b,c,d) MIN(MIN(a,b), MIN(c,d)) - -#define STRIDE(n, bcp) (((bpc) * (n) + 7) / 8) - /* plan9 stuff for utf-8 */ int chartorune(int *rune, char *str); int runetochar(char *str, int *rune); diff --git a/mupdf/pdf_function.c b/mupdf/pdf_function.c index 477aa3d3..8d5068d3 100644 --- a/mupdf/pdf_function.c +++ b/mupdf/pdf_function.c @@ -426,7 +426,7 @@ parsecode(pdf_function *func, fz_stream *stream, int *codeptr) case PDF_TKEYWORD: cmp = -1; a = -1; - b = sizeof(psopnames) / sizeof(psopnames[0]); + b = nelem(psopnames); while (b - a > 1) { mid = (a + b) / 2; |