summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-09 03:08:52 +0200
committerTor Andersson <tor@ghostscript.com>2010-07-09 03:08:52 +0200
commit634daac467e4c7dd0844c89e7a8317d44e566a16 (patch)
tree911d2cbcd8981c8d55bc85c66ecb0a26a0d10e1c
parent8d68dec4b460ac292ce0021717160a8cd9fcc8dd (diff)
downloadmupdf-634daac467e4c7dd0844c89e7a8317d44e566a16.tar.xz
Fix up restrict keyword in prototypes to remove warnings on MSVC.
-rw-r--r--draw/archport.c7
-rw-r--r--draw/imagedraw.c10
-rw-r--r--draw/imagescale.c40
-rw-r--r--draw/imageunpack.c10
-rw-r--r--draw/porterduff.c28
-rw-r--r--fitz/fitz.h104
-rw-r--r--mupdf/pdf_image.c2
7 files changed, 100 insertions, 101 deletions
diff --git a/draw/archport.c b/draw/archport.c
index 2fb491d7..3ed56973 100644
--- a/draw/archport.c
+++ b/draw/archport.c
@@ -7,9 +7,8 @@ typedef unsigned char byte;
#define MASK 0xFF00FF00;
static void
-path_w4i1o4_32bit(byte * restrict rgba,
- byte * restrict src, byte cov, int len,
- byte * restrict dst)
+path_w4i1o4_32bit(byte *rgba,
+ byte * restrict src, byte cov, int len, byte * restrict dst)
{
/* COLOR * coverage + DST * (256-coverage) = (COLOR - DST)*coverage + DST*256 */
unsigned int *dst32 = (unsigned int *)(void *)dst;
@@ -77,7 +76,7 @@ path_w4i1o4_32bit(byte * restrict rgba,
}
static void
-text_w4i1o4_32bit(byte * restrict rgba,
+text_w4i1o4_32bit(byte *rgba,
byte * restrict src, int srcw,
byte * restrict dst, int dstw, int w0, int h)
{
diff --git a/draw/imagedraw.c b/draw/imagedraw.c
index 71bd4360..c43f9f24 100644
--- a/draw/imagedraw.c
+++ b/draw/imagedraw.c
@@ -343,8 +343,8 @@ img_w4i1o4(byte *rgba, byte * restrict src, byte cov, int len, byte * restrict d
}
}
-void (*fz_img_1o1)(byte*, byte, int, byte*, fz_pixmap *image, int u, int v, int fa, int fb) = img_1o1;
-void (*fz_img_2o2)(byte*, byte, int, byte*, fz_pixmap *image, int u, int v, int fa, int fb) = img_2o2;
-void (*fz_img_4o4)(byte*, byte, int, byte*, fz_pixmap *image, int u, int v, int fa, int fb) = img_4o4;
-void (*fz_img_w2i1o2)(byte*, byte*, byte, int, byte*, fz_pixmap *image, int u, int v, int fa, int fb) = img_w2i1o2;
-void (*fz_img_w4i1o4)(byte*, byte*, byte, int, byte*, fz_pixmap *image, int u, int v, int fa, int fb) = img_w4i1o4;
+void (*fz_img_1o1)(byte*restrict, byte, int, byte*restrict, fz_pixmap *image, int u, int v, int fa, int fb) = img_1o1;
+void (*fz_img_2o2)(byte*restrict, byte, int, byte*restrict, fz_pixmap *image, int u, int v, int fa, int fb) = img_2o2;
+void (*fz_img_4o4)(byte*restrict, byte, int, byte*restrict, fz_pixmap *image, int u, int v, int fa, int fb) = img_4o4;
+void (*fz_img_w2i1o2)(byte*, byte*restrict, byte, int, byte*restrict, fz_pixmap *image, int u, int v, int fa, int fb) = img_w2i1o2;
+void (*fz_img_w4i1o4)(byte*, byte*restrict, byte, int, byte*restrict, fz_pixmap *image, int u, int v, int fa, int fb) = img_w4i1o4;
diff --git a/draw/imagescale.c b/draw/imagescale.c
index 687b53b5..60edadb5 100644
--- a/draw/imagescale.c
+++ b/draw/imagescale.c
@@ -102,22 +102,22 @@ static inline void srowc(byte * restrict src, byte * restrict dst, int w, int de
}
}
-static void srow1(byte *src, byte *dst, int w, int denom)
+static void srow1(byte * restrict src, byte * restrict dst, int w, int denom)
{
srowc(src, dst, w, denom, 1);
}
-static void srow2(byte *src, byte *dst, int w, int denom)
+static void srow2(byte * restrict src, byte * restrict dst, int w, int denom)
{
srowc(src, dst, w, denom, 2);
}
-static void srow4(byte *src, byte *dst, int w, int denom)
+static void srow4(byte * restrict src, byte * restrict dst, int w, int denom)
{
srowc(src, dst, w, denom, 4);
}
-static void srow5(byte *src, byte *dst, int w, int denom)
+static void srow5(byte * restrict src, byte * restrict dst, int w, int denom)
{
srowc(src, dst, w, denom, 5);
}
@@ -190,37 +190,37 @@ static inline void scolc(byte * restrict src, byte * restrict dst, int w, int de
}
}
-static void scol1(byte *src, byte *dst, int w, int denom)
+static void scol1(byte * restrict src, byte * restrict dst, int w, int denom)
{
scolc(src, dst, w, denom, 1);
}
-static void scol2(byte *src, byte *dst, int w, int denom)
+static void scol2(byte * restrict src, byte * restrict dst, int w, int denom)
{
scolc(src, dst, w, denom, 2);
}
-static void scol4(byte *src, byte *dst, int w, int denom)
+static void scol4(byte * restrict src, byte * restrict dst, int w, int denom)
{
scolc(src, dst, w, denom, 4);
}
-static void scol5(byte *src, byte *dst, int w, int denom)
+static void scol5(byte * restrict src, byte * restrict dst, int w, int denom)
{
scolc(src, dst, w, denom, 5);
}
-void (*fz_srown)(byte *src, byte *dst, int w, int denom, int n) = srown;
-void (*fz_srow1)(byte *src, byte *dst, int w, int denom) = srow1;
-void (*fz_srow2)(byte *src, byte *dst, int w, int denom) = srow2;
-void (*fz_srow4)(byte *src, byte *dst, int w, int denom) = srow4;
-void (*fz_srow5)(byte *src, byte *dst, int w, int denom) = srow5;
+void (*fz_srown)(byte *restrict, byte *restrict, int w, int denom, int n) = srown;
+void (*fz_srow1)(byte *restrict, byte *restrict, int w, int denom) = srow1;
+void (*fz_srow2)(byte *restrict, byte *restrict, int w, int denom) = srow2;
+void (*fz_srow4)(byte *restrict, byte *restrict, int w, int denom) = srow4;
+void (*fz_srow5)(byte *restrict, byte *restrict, int w, int denom) = srow5;
-void (*fz_scoln)(byte *src, byte *dst, int w, int denom, int n) = scoln;
-void (*fz_scol1)(byte *src, byte *dst, int w, int denom) = scol1;
-void (*fz_scol2)(byte *src, byte *dst, int w, int denom) = scol2;
-void (*fz_scol4)(byte *src, byte *dst, int w, int denom) = scol4;
-void (*fz_scol5)(byte *src, byte *dst, int w, int denom) = scol5;
+void (*fz_scoln)(byte *restrict, byte *restrict, int w, int denom, int n) = scoln;
+void (*fz_scol1)(byte *restrict, byte *restrict, int w, int denom) = scol1;
+void (*fz_scol2)(byte *restrict, byte *restrict, int w, int denom) = scol2;
+void (*fz_scol4)(byte *restrict, byte *restrict, int w, int denom) = scol4;
+void (*fz_scol5)(byte *restrict, byte *restrict, int w, int denom) = scol5;
fz_pixmap *
fz_scalepixmap(fz_pixmap *src, int xdenom, int ydenom)
@@ -231,8 +231,8 @@ fz_scalepixmap(fz_pixmap *src, int xdenom, int ydenom)
int ow, oh, n;
int remaining;
- void (*srowx)(byte *src, byte *dst, int w, int denom) = nil;
- void (*scolx)(byte *src, byte *dst, int w, int denom) = nil;
+ void (*srowx)(byte * restrict src, byte * restrict dst, int w, int denom) = nil;
+ void (*scolx)(byte * restrict src, byte * restrict dst, int w, int denom) = nil;
ow = (src->w + xdenom - 1) / xdenom;
oh = (src->h + ydenom - 1) / ydenom;
diff --git a/draw/imageunpack.c b/draw/imageunpack.c
index 48c420bf..25a21770 100644
--- a/draw/imageunpack.c
+++ b/draw/imageunpack.c
@@ -303,9 +303,9 @@ static void loadtile16(byte * restrict src, int sw, byte * restrict dst, int dw,
TILE(thex)
void (*fz_decodetile)(fz_pixmap *pix, int skip, float *decode) = decodetile;
-void (*fz_loadtile1)(byte*, int sw, byte*, int dw, int w, int h, int pad) = loadtile1;
-void (*fz_loadtile2)(byte*, int sw, byte*, int dw, int w, int h, int pad) = loadtile2;
-void (*fz_loadtile4)(byte*, int sw, byte*, int dw, int w, int h, int pad) = loadtile4;
-void (*fz_loadtile8)(byte*, int sw, byte*, int dw, int w, int h, int pad) = loadtile8;
-void (*fz_loadtile16)(byte*, int sw, byte*, int dw, int w, int h, int pad) = loadtile16;
+void (*fz_loadtile1)(byte*restrict, int sw, byte*restrict, int dw, int w, int h, int pad) = loadtile1;
+void (*fz_loadtile2)(byte*restrict, int sw, byte*restrict, int dw, int w, int h, int pad) = loadtile2;
+void (*fz_loadtile4)(byte*restrict, int sw, byte*restrict, int dw, int w, int h, int pad) = loadtile4;
+void (*fz_loadtile8)(byte*restrict, int sw, byte*restrict, int dw, int w, int h, int pad) = loadtile8;
+void (*fz_loadtile16)(byte*restrict, int sw, byte*restrict, int dw, int w, int h, int pad) = loadtile16;
diff --git a/draw/porterduff.c b/draw/porterduff.c
index 9af8b55c..40f900e0 100644
--- a/draw/porterduff.c
+++ b/draw/porterduff.c
@@ -207,7 +207,7 @@ path_1o1(byte * restrict src, byte cov, int len, byte * restrict dst)
}
static void
-path_w2i1o2(byte * restrict ga, byte * restrict src, byte cov, int len, byte * restrict dst)
+path_w2i1o2(byte *ga, byte * restrict src, byte cov, int len, byte * restrict dst)
{
byte g = ga[0];
int a = FZ_EXPAND(ga[1]);
@@ -224,7 +224,7 @@ path_w2i1o2(byte * restrict ga, byte * restrict src, byte cov, int len, byte * r
}
static void
-path_w4i1o4(byte * restrict rgba, byte * restrict src, byte cov, int len, byte * restrict dst)
+path_w4i1o4(byte *rgba, byte * restrict src, byte cov, int len, byte * restrict dst)
{
byte r = rgba[0];
byte g = rgba[1];
@@ -268,7 +268,7 @@ text_1o1(byte * restrict src, int srcw, byte * restrict dst, int dstw, int w0, i
}
static void
-text_w2i1o2(byte * restrict ga, byte * restrict src, int srcw, byte * restrict dst, int dstw, int w0, int h)
+text_w2i1o2(byte *ga, byte * restrict src, int srcw, byte * restrict dst, int dstw, int w0, int h)
{
byte g = ga[0];
int a = FZ_EXPAND(ga[1]);
@@ -292,7 +292,7 @@ text_w2i1o2(byte * restrict ga, byte * restrict src, int srcw, byte * restrict d
}
static void
-text_w4i1o4(byte * restrict rgba, byte * restrict src, int srcw, byte * restrict dst, int dstw, int w0, int h)
+text_w4i1o4(byte *rgba, byte * restrict src, int srcw, byte * restrict dst, int dstw, int w0, int h)
{
byte r = rgba[0];
byte g = rgba[1];
@@ -323,15 +323,15 @@ text_w4i1o4(byte * restrict rgba, byte * restrict src, int srcw, byte * restrict
* ... and the function pointers
*/
-void (*fz_duff_ni1on)(byte*,int,int,byte*,int,byte*,int,int,int) = duff_ni1on;
-void (*fz_duff_1i1o1)(byte*,int,byte*,int,byte*,int,int,int) = duff_1i1o1;
-void (*fz_duff_2i1o2)(byte*,int,byte*,int,byte*,int,int,int) = duff_2i1o2;
-void (*fz_duff_4i1o4)(byte*,int,byte*,int,byte*,int,int,int) = duff_4i1o4;
+void (*fz_duff_ni1on)(byte*restrict,int,int,byte*restrict,int,byte*restrict,int,int,int) = duff_ni1on;
+void (*fz_duff_1i1o1)(byte*restrict,int,byte*restrict,int,byte*restrict,int,int,int) = duff_1i1o1;
+void (*fz_duff_2i1o2)(byte*restrict,int,byte*restrict,int,byte*restrict,int,int,int) = duff_2i1o2;
+void (*fz_duff_4i1o4)(byte*restrict,int,byte*restrict,int,byte*restrict,int,int,int) = duff_4i1o4;
-void (*fz_path_1o1)(byte*,byte,int,byte*) = path_1o1;
-void (*fz_path_w2i1o2)(byte*,byte*,byte,int,byte*) = path_w2i1o2;
-void (*fz_path_w4i1o4)(byte*,byte*,byte,int,byte*) = path_w4i1o4;
+void (*fz_path_1o1)(byte*restrict,byte,int,byte*restrict) = path_1o1;
+void (*fz_path_w2i1o2)(byte*,byte*restrict,byte,int,byte*restrict) = path_w2i1o2;
+void (*fz_path_w4i1o4)(byte*,byte*restrict,byte,int,byte*restrict) = path_w4i1o4;
-void (*fz_text_1o1)(byte*,int,byte*,int,int,int) = text_1o1;
-void (*fz_text_w2i1o2)(byte*,byte*,int,byte*,int,int,int) = text_w2i1o2;
-void (*fz_text_w4i1o4)(byte*,byte*,int,byte*,int,int,int) = text_w4i1o4;
+void (*fz_text_1o1)(byte*restrict,int,byte*restrict,int,int,int) = text_1o1;
+void (*fz_text_w2i1o2)(byte*,byte*restrict,int,byte*restrict,int,int,int) = text_w2i1o2;
+void (*fz_text_w4i1o4)(byte*,byte*restrict,int,byte*restrict,int,int,int) = text_w4i1o4;
diff --git a/fitz/fitz.h b/fitz/fitz.h
index e64af123..e74f12cc 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -299,9 +299,9 @@ typedef struct fz_aes_s fz_aes;
struct fz_aes_s
{
- int nr; /* number of rounds */
- unsigned long *rk; /* AES round keys */
- unsigned long buf[68]; /* unaligned data */
+ int nr; /* number of rounds */
+ unsigned long *rk; /* AES round keys */
+ unsigned long buf[68]; /* unaligned data */
};
void aes_setkey_enc( fz_aes *ctx, const unsigned char *key, int keysize );
@@ -442,10 +442,10 @@ char *fz_objkindstr(fz_obj *obj);
/*
* Data buffers for streams and filters.
*
- * bp is the pointer to the allocated memory
- * rp is read-position (*in->rp++ to read data)
- * wp is write-position (*out->wp++ to write data)
- * ep is the sentinel
+ * bp is the pointer to the allocated memory
+ * rp is read-position (*in->rp++ to read data)
+ * wp is write-position (*out->wp++ to write data)
+ * ep is the sentinel
*
* Only the data between rp and wp is valid data.
*
@@ -486,17 +486,17 @@ void fz_dropbuffer(fz_buffer *buf);
* A filter has one method, process, that takes an input and an output buffer.
*
* It returns one of three statuses:
- * ioneedin -- input buffer exhausted, please give me more data (wp-rp)
- * ioneedout -- output buffer exhausted, please provide more space (ep-wp)
- * iodone -- finished, please never call me again. ever!
+ * ioneedin -- input buffer exhausted, please give me more data (wp-rp)
+ * ioneedout -- output buffer exhausted, please provide more space (ep-wp)
+ * iodone -- finished, please never call me again. ever!
* or...
- * any other error code -- oops, something blew up.
+ * any other error code -- oops, something blew up.
*
* To make using the filter easier, three variables are updated:
- * produced -- if we actually produced any new data
- * consumed -- like above
- * count -- number of bytes produced in total since the beginning
- * done -- remember if we've ever returned fz_iodone
+ * produced -- if we actually produced any new data
+ * consumed -- like above
+ * count -- number of bytes produced in total since the beginning
+ * done -- remember if we've ever returned fz_iodone
*
* Most filters take fz_obj as a way to specify parameters.
* In most cases, this is a dictionary that contains the same keys
@@ -522,9 +522,9 @@ typedef struct fz_filter_s fz_filter;
TYPE *VAR; \
VAR = fz_malloc(sizeof(TYPE)); \
((fz_filter*)VAR)->refs = 1; \
- ((fz_filter*)VAR)->process = fz_process ## NAME ; \
- ((fz_filter*)VAR)->drop = fz_drop ## NAME ; \
- ((fz_filter*)VAR)->consumed = 0; \
+ ((fz_filter*)VAR)->process = fz_process ## NAME ; \
+ ((fz_filter*)VAR)->drop = fz_drop ## NAME ; \
+ ((fz_filter*)VAR)->consumed = 0; \
((fz_filter*)VAR)->produced = 0; \
((fz_filter*)VAR)->count = 0; \
((fz_filter*)VAR)->done = 0;
@@ -940,7 +940,7 @@ struct fz_edge_s
int x, e, h, y;
int adjup, adjdown;
int xmove;
- int xdir, ydir; /* -1 or +1 */
+ int xdir, ydir; /* -1 or +1 */
};
struct fz_gel_s
@@ -1117,43 +1117,43 @@ void fz_executedisplaylist(fz_displaylist *list, fz_device *dev, fz_matrix ctm);
extern void fz_accelerate(void);
extern void fz_acceleratearch(void);
-extern void (*fz_duff_ni1on)(unsigned char*,int,int,unsigned char*,int,unsigned char*,int,int,int);
-extern void (*fz_duff_1i1o1)(unsigned char*,int,unsigned char*,int,unsigned char*,int,int,int);
-extern void (*fz_duff_2i1o2)(unsigned char*,int,unsigned char*,int,unsigned char*,int,int,int);
-extern void (*fz_duff_4i1o4)(unsigned char*,int,unsigned char*,int,unsigned char*,int,int,int);
+extern void (*fz_duff_ni1on)(unsigned char*restrict,int,int,unsigned char*restrict,int,unsigned char*restrict,int,int,int);
+extern void (*fz_duff_1i1o1)(unsigned char*restrict,int,unsigned char*restrict,int,unsigned char*restrict,int,int,int);
+extern void (*fz_duff_2i1o2)(unsigned char*restrict,int,unsigned char*restrict,int,unsigned char*restrict,int,int,int);
+extern void (*fz_duff_4i1o4)(unsigned char*restrict,int,unsigned char*restrict,int,unsigned char*restrict,int,int,int);
-extern void (*fz_path_1o1)(unsigned char*,unsigned char,int,unsigned char*);
-extern void (*fz_path_w2i1o2)(unsigned char*,unsigned char*,unsigned char,int,unsigned char*);
-extern void (*fz_path_w4i1o4)(unsigned char*,unsigned char*,unsigned char,int,unsigned char*);
+extern void (*fz_path_1o1)(unsigned char*restrict,unsigned char,int,unsigned char*restrict);
+extern void (*fz_path_w2i1o2)(unsigned char*,unsigned char*restrict,unsigned char,int,unsigned char*restrict);
+extern void (*fz_path_w4i1o4)(unsigned char*,unsigned char*restrict,unsigned char,int,unsigned char*restrict);
-extern void (*fz_text_1o1)(unsigned char*,int,unsigned char*,int,int,int);
-extern void (*fz_text_w2i1o2)(unsigned char*,unsigned char*,int,unsigned char*,int,int,int);
-extern void (*fz_text_w4i1o4)(unsigned char*,unsigned char*,int,unsigned char*,int,int,int);
+extern void (*fz_text_1o1)(unsigned char*restrict,int,unsigned char*restrict,int,int,int);
+extern void (*fz_text_w2i1o2)(unsigned char*,unsigned char*restrict,int,unsigned char*restrict,int,int,int);
+extern void (*fz_text_w4i1o4)(unsigned char*,unsigned char*restrict,int,unsigned char*restrict,int,int,int);
-extern void (*fz_img_non)(unsigned char*,unsigned char,int,unsigned char*,fz_pixmap*,fz_matrix*);
-extern void (*fz_img_1o1)(unsigned char*,unsigned char,int,unsigned char*,fz_pixmap*,int u, int v, int fa, int fb);
-extern void (*fz_img_4o4)(unsigned char*,unsigned char,int,unsigned char*,fz_pixmap*,int u, int v, int fa, int fb);
-extern void (*fz_img_2o2)(unsigned char*,unsigned char,int,unsigned char*,fz_pixmap*,int u, int v, int fa, int fb);
-extern void (*fz_img_w2i1o2)(unsigned char*,unsigned char*,unsigned char,int,unsigned char*,fz_pixmap*,int u, int v, int fa, int fb);
-extern void (*fz_img_w4i1o4)(unsigned char*,unsigned char*,unsigned char,int,unsigned char*,fz_pixmap*,int u, int v, int fa, int fb);
+extern void (*fz_img_non)(unsigned char*restrict,unsigned char,int,unsigned char*restrict,fz_pixmap*,fz_matrix*);
+extern void (*fz_img_1o1)(unsigned char*restrict,unsigned char,int,unsigned char*restrict,fz_pixmap*,int u, int v, int fa, int fb);
+extern void (*fz_img_4o4)(unsigned char*restrict,unsigned char,int,unsigned char*restrict,fz_pixmap*,int u, int v, int fa, int fb);
+extern void (*fz_img_2o2)(unsigned char*restrict,unsigned char,int,unsigned char*restrict,fz_pixmap*,int u, int v, int fa, int fb);
+extern void (*fz_img_w2i1o2)(unsigned char*,unsigned char*restrict,unsigned char,int,unsigned char*restrict,fz_pixmap*,int u, int v, int fa, int fb);
+extern void (*fz_img_w4i1o4)(unsigned char*,unsigned char*restrict,unsigned char,int,unsigned char*restrict,fz_pixmap*,int u, int v, int fa, int fb);
extern void (*fz_decodetile)(fz_pixmap *pix, int skip, float *decode);
-extern void (*fz_loadtile1)(unsigned char*, int sw, unsigned char*, int dw, int w, int h, int pad);
-extern void (*fz_loadtile2)(unsigned char*, int sw, unsigned char*, int dw, int w, int h, int pad);
-extern void (*fz_loadtile4)(unsigned char*, int sw, unsigned char*, int dw, int w, int h, int pad);
-extern void (*fz_loadtile8)(unsigned char*, int sw, unsigned char*, int dw, int w, int h, int pad);
-extern void (*fz_loadtile16)(unsigned char*, int sw, unsigned char*, int dw, int w, int h, int pad);
-
-extern void (*fz_srown)(unsigned char *src, unsigned char *dst, int w, int denom, int n);
-extern void (*fz_srow1)(unsigned char *src, unsigned char *dst, int w, int denom);
-extern void (*fz_srow2)(unsigned char *src, unsigned char *dst, int w, int denom);
-extern void (*fz_srow4)(unsigned char *src, unsigned char *dst, int w, int denom);
-extern void (*fz_srow5)(unsigned char *src, unsigned char *dst, int w, int denom);
-
-extern void (*fz_scoln)(unsigned char *src, unsigned char *dst, int w, int denom, int n);
-extern void (*fz_scol1)(unsigned char *src, unsigned char *dst, int w, int denom);
-extern void (*fz_scol2)(unsigned char *src, unsigned char *dst, int w, int denom);
-extern void (*fz_scol4)(unsigned char *src, unsigned char *dst, int w, int denom);
-extern void (*fz_scol5)(unsigned char *src, unsigned char *dst, int w, int denom);
+extern void (*fz_loadtile1)(unsigned char*restrict, int sw, unsigned char*restrict, int dw, int w, int h, int pad);
+extern void (*fz_loadtile2)(unsigned char*restrict, int sw, unsigned char*restrict, int dw, int w, int h, int pad);
+extern void (*fz_loadtile4)(unsigned char*restrict, int sw, unsigned char*restrict, int dw, int w, int h, int pad);
+extern void (*fz_loadtile8)(unsigned char*restrict, int sw, unsigned char*restrict, int dw, int w, int h, int pad);
+extern void (*fz_loadtile16)(unsigned char*restrict, int sw, unsigned char*restrict, int dw, int w, int h, int pad);
+
+extern void (*fz_srown)(unsigned char *restrict, unsigned char *restrict, int w, int denom, int n);
+extern void (*fz_srow1)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+extern void (*fz_srow2)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+extern void (*fz_srow4)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+extern void (*fz_srow5)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+
+extern void (*fz_scoln)(unsigned char *restrict, unsigned char *restrict, int w, int denom, int n);
+extern void (*fz_scol1)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+extern void (*fz_scol2)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+extern void (*fz_scol4)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
+extern void (*fz_scol5)(unsigned char *restrict, unsigned char *restrict, int w, int denom);
#endif
diff --git a/mupdf/pdf_image.c b/mupdf/pdf_image.c
index 332c8d3a..e4cfabe6 100644
--- a/mupdf/pdf_image.c
+++ b/mupdf/pdf_image.c
@@ -489,7 +489,7 @@ maskcolorkeyindexed(fz_pixmap *ind, fz_pixmap *pix, int *colorkey)
fz_error
pdf_loadtile(pdf_image *src, fz_pixmap *tile)
{
- void (*tilefunc)(unsigned char*,int,unsigned char*, int, int, int, int);
+ void (*tilefunc)(unsigned char*restrict,int,unsigned char*restrict, int, int, int, int);
assert(tile->x == 0); /* can't handle general tile yet, only y-banding */