summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2009-03-11 15:59:50 +0100
committerTor Andersson <tor@ghostscript.com>2009-03-11 15:59:50 +0100
commit31733cfd3ba1a920542da3792f2591cf7ba5f62a (patch)
tree64a6751de8e6c171bfaa334188623a7134c285d2 /fitz
parentb3092ce4920ea6456788a595c5dd9a794f79eed6 (diff)
downloadmupdf-31733cfd3ba1a920542da3792f2591cf7ba5f62a.tar.xz
Change fz_error* struct into an integer error type fz_error.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/base_error.c8
-rw-r--r--fitz/base_hash.c12
-rw-r--r--fitz/filt_a85d.c4
-rw-r--r--fitz/filt_a85e.c4
-rw-r--r--fitz/filt_ahxd.c4
-rw-r--r--fitz/filt_ahxe.c4
-rw-r--r--fitz/filt_arc4.c4
-rw-r--r--fitz/filt_dctd.c6
-rw-r--r--fitz/filt_dcte.c8
-rw-r--r--fitz/filt_faxd.c12
-rw-r--r--fitz/filt_faxe.c14
-rw-r--r--fitz/filt_flate.c12
-rw-r--r--fitz/filt_jbig2d.c6
-rw-r--r--fitz/filt_jpxd.c4
-rw-r--r--fitz/filt_lzwd.c6
-rw-r--r--fitz/filt_lzwe.c8
-rw-r--r--fitz/filt_null.c4
-rw-r--r--fitz/filt_pipeline.c14
-rw-r--r--fitz/filt_predict.c8
-rw-r--r--fitz/filt_rld.c4
-rw-r--r--fitz/filt_rle.c16
-rw-r--r--fitz/fitz_base.h30
-rw-r--r--fitz/fitz_draw.h20
-rw-r--r--fitz/fitz_stream.h138
-rw-r--r--fitz/fitz_tree.h72
-rw-r--r--fitz/node_misc2.c16
-rw-r--r--fitz/node_optimize.c2
-rw-r--r--fitz/node_path.c22
-rw-r--r--fitz/node_text.c8
-rw-r--r--fitz/node_tree.c2
-rw-r--r--fitz/obj_array.c18
-rw-r--r--fitz/obj_dict.c24
-rw-r--r--fitz/obj_parse.c36
-rw-r--r--fitz/obj_simple.c18
-rw-r--r--fitz/res_font.c18
-rw-r--r--fitz/stm_buffer.c8
-rw-r--r--fitz/stm_filter.c4
-rw-r--r--fitz/stm_misc.c8
-rw-r--r--fitz/stm_open.c14
-rw-r--r--fitz/stm_read.c22
40 files changed, 321 insertions, 321 deletions
diff --git a/fitz/base_error.c b/fitz/base_error.c
index c0d4a42f..44df2b59 100644
--- a/fitz/base_error.c
+++ b/fitz/base_error.c
@@ -10,7 +10,7 @@ void fz_warn(char *fmt, ...)
fprintf(stderr, "\n");
}
-fz_error * fz_throwimp(const char *func, const char *file, int line, char *fmt, ...)
+fz_error fz_throwimp(const char *func, const char *file, int line, char *fmt, ...)
{
va_list ap;
fprintf(stderr, "+ %s:%d: %s(): ", file, line, func);
@@ -18,10 +18,10 @@ fz_error * fz_throwimp(const char *func, const char *file, int line, char *fmt,
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
- return ((fz_error*)-1);
+ return ((fz_error)-1);
}
-fz_error * fz_rethrowimp(fz_error *cause, const char *func, const char *file, int line, char *fmt, ...)
+fz_error fz_rethrowimp(fz_error cause, const char *func, const char *file, int line, char *fmt, ...)
{
va_list ap;
fprintf(stderr, "| %s:%d: %s(): ", file, line, func);
@@ -32,7 +32,7 @@ fz_error * fz_rethrowimp(fz_error *cause, const char *func, const char *file, in
return cause;
}
-fz_error * fz_catchimp(fz_error *cause, const char *func, const char *file, int line, char *fmt, ...)
+fz_error fz_catchimp(fz_error cause, const char *func, const char *file, int line, char *fmt, ...)
{
va_list ap;
fprintf(stderr, "\\ %s:%d: %s(): ", file, line, func);
diff --git a/fitz/base_hash.c b/fitz/base_hash.c
index bbf90807..894d33e0 100644
--- a/fitz/base_hash.c
+++ b/fitz/base_hash.c
@@ -45,7 +45,7 @@ static unsigned hash(unsigned char *s, int len)
return hash;
}
-fz_error *
+fz_error
fz_newhash(fz_hashtable **tablep, int initialsize, int keylen)
{
fz_hashtable *table;
@@ -105,10 +105,10 @@ fz_drophash(fz_hashtable *table)
fz_free(table);
}
-fz_error *
+fz_error
fz_resizehash(fz_hashtable *table, int newsize)
{
- fz_error *error;
+ fz_error error;
fz_hashentry *newents;
fz_hashentry *oldents;
int oldload;
@@ -171,10 +171,10 @@ fz_hashfind(fz_hashtable *table, void *key)
}
}
-fz_error *
+fz_error
fz_hashinsert(fz_hashtable *table, void *key, void *val)
{
- fz_error *error;
+ fz_error error;
fz_hashentry *ents;
unsigned size;
unsigned pos;
@@ -209,7 +209,7 @@ fz_hashinsert(fz_hashtable *table, void *key, void *val)
return fz_okay;
}
-fz_error *
+fz_error
fz_hashremove(fz_hashtable *table, void *key)
{
fz_hashentry *ents = table->ents;
diff --git a/fitz/filt_a85d.c b/fitz/filt_a85d.c
index 92ae2f6f..f064091c 100644
--- a/fitz/filt_a85d.c
+++ b/fitz/filt_a85d.c
@@ -20,7 +20,7 @@ static inline int iswhite(int a)
return 0;
}
-fz_error *
+fz_error
fz_newa85d(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_a85d, f, a85d);
@@ -34,7 +34,7 @@ fz_dropa85d(fz_filter *f)
{
}
-fz_error *
+fz_error
fz_processa85d(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_a85d *f = (fz_a85d*)filter;
diff --git a/fitz/filt_a85e.c b/fitz/filt_a85e.c
index 4ae8a6b1..6b06cd77 100644
--- a/fitz/filt_a85e.c
+++ b/fitz/filt_a85e.c
@@ -9,7 +9,7 @@ struct fz_a85e_s
int c;
};
-fz_error *
+fz_error
fz_newa85e(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_a85e, f, a85e);
@@ -22,7 +22,7 @@ fz_dropa85e(fz_filter *f)
{
}
-fz_error *
+fz_error
fz_processa85e(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_a85e *f = (fz_a85e*)filter;
diff --git a/fitz/filt_ahxd.c b/fitz/filt_ahxd.c
index a7fb336d..56bc2aad 100644
--- a/fitz/filt_ahxd.c
+++ b/fitz/filt_ahxd.c
@@ -38,7 +38,7 @@ static inline int fromhex(int a)
return 0;
}
-fz_error *
+fz_error
fz_newahxd(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_ahxd, f, ahxd);
@@ -52,7 +52,7 @@ fz_dropahxd(fz_filter *f)
{
}
-fz_error *
+fz_error
fz_processahxd(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_ahxd *f = (fz_ahxd*)filter;
diff --git a/fitz/filt_ahxe.c b/fitz/filt_ahxe.c
index 4ccd1098..8ca5345b 100644
--- a/fitz/filt_ahxe.c
+++ b/fitz/filt_ahxe.c
@@ -11,7 +11,7 @@ struct fz_ahxe_s
static const char tohex[16] = "0123456789ABCDEF";
-fz_error *
+fz_error
fz_newahxe(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_ahxe, f, ahxe);
@@ -24,7 +24,7 @@ fz_dropahxe(fz_filter *f)
{
}
-fz_error *
+fz_error
fz_processahxe(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_ahxe *f = (fz_ahxe*)filter;
diff --git a/fitz/filt_arc4.c b/fitz/filt_arc4.c
index 968db7b2..a5aa4fcc 100644
--- a/fitz/filt_arc4.c
+++ b/fitz/filt_arc4.c
@@ -9,7 +9,7 @@ struct fz_arc4c_s
fz_arc4 arc4;
};
-fz_error *
+fz_error
fz_newarc4filter(fz_filter **fp, unsigned char *key, unsigned keylen)
{
FZ_NEWFILTER(fz_arc4c, f, arc4filter);
@@ -22,7 +22,7 @@ fz_droparc4filter(fz_filter *f)
{
}
-fz_error *
+fz_error
fz_processarc4filter(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_arc4c *f = (fz_arc4c*)filter;
diff --git a/fitz/filt_dctd.c b/fitz/filt_dctd.c
index 6054a9e6..5814c6ab 100644
--- a/fitz/filt_dctd.c
+++ b/fitz/filt_dctd.c
@@ -48,10 +48,10 @@ static void myskipinput(j_decompress_ptr cinfo, long n)
src->super.next_input_byte = in->rp;
}
-fz_error *
+fz_error
fz_newdctd(fz_filter **fp, fz_obj *params)
{
- fz_error *err;
+ fz_error err;
fz_obj *obj;
int colortransform;
@@ -112,7 +112,7 @@ fz_dropdctd(fz_filter *filter)
jpeg_destroy_decompress(&d->cinfo);
}
-fz_error *
+fz_error
fz_processdctd(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_dctd *d = (fz_dctd*)filter;
diff --git a/fitz/filt_dcte.c b/fitz/filt_dcte.c
index bb95ad9b..72422cbf 100644
--- a/fitz/filt_dcte.c
+++ b/fitz/filt_dcte.c
@@ -29,10 +29,10 @@ static void myinitdest(j_compress_ptr cinfo) { /* empty */ }
static boolean myemptybuf(j_compress_ptr cinfo) { return FALSE; }
static void mytermdest(j_compress_ptr cinfo) { /* empty */ }
-fz_error *
+fz_error
fz_newdcte(fz_filter **fp, fz_obj *params)
{
- fz_error *err;
+ fz_error err;
fz_obj *obj;
int i;
@@ -155,7 +155,7 @@ static const unsigned char unzigzagorder[] =
#define unzigzag(x) (x)
#endif
-fz_error *
+fz_error
fz_setquanttables(fz_dcte *e, unsigned int **qtables, int qfactor)
{
int i, j;
@@ -178,7 +178,7 @@ fz_setquanttables(fz_dcte *e, unsigned int **qtables, int qfactor)
return fz_okay;
}
-fz_error *
+fz_error
fz_processdcte(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_dcte *e = (fz_dcte*)filter;
diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c
index 7223f802..e0f35654 100644
--- a/fitz/filt_faxd.c
+++ b/fitz/filt_faxd.c
@@ -41,7 +41,7 @@ struct fz_faxd_s
unsigned char *dst;
};
-fz_error *
+fz_error
fz_newfaxd(fz_filter **fp, fz_obj *params)
{
fz_obj *obj;
@@ -126,7 +126,7 @@ static inline void eatbits(fz_faxd *fax, int nbits)
fax->bidx += nbits;
}
-static inline fz_error * fillbits(fz_faxd *fax, fz_buffer *in)
+static inline fz_error fillbits(fz_faxd *fax, fz_buffer *in)
{
while (fax->bidx >= 8)
{
@@ -161,7 +161,7 @@ getcode(fz_faxd *fax, const cfd_node *table, int initialbits)
}
/* decode one 1d code */
-static fz_error *
+static fz_error
dec1d(fz_faxd *fax)
{
int code;
@@ -200,7 +200,7 @@ dec1d(fz_faxd *fax)
}
/* decode one 2d code */
-static fz_error *
+static fz_error
dec2d(fz_faxd *fax)
{
int code, b1, b2;
@@ -318,11 +318,11 @@ dec2d(fz_faxd *fax)
return 0;
}
-fz_error *
+fz_error
fz_processfaxd(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
fz_faxd *fax = (fz_faxd*)f;
- fz_error *error;
+ fz_error error;
int i;
unsigned char *tmp;
diff --git a/fitz/filt_faxe.c b/fitz/filt_faxe.c
index d9358546..3aa4f09a 100644
--- a/fitz/filt_faxe.c
+++ b/fitz/filt_faxe.c
@@ -31,7 +31,7 @@ struct fz_faxe_s
unsigned char *src;
};
-fz_error *
+fz_error
fz_newfaxe(fz_filter **fp, fz_obj *params)
{
fz_obj *obj;
@@ -176,7 +176,7 @@ putrun(fz_faxe *fax, fz_buffer *out, int run, int c)
}
}
-static fz_error *
+static fz_error
enc1d(fz_faxe *fax, unsigned char *line, fz_buffer *out)
{
int run;
@@ -200,7 +200,7 @@ enc1d(fz_faxe *fax, unsigned char *line, fz_buffer *out)
return fz_okay;
}
-static fz_error *
+static fz_error
enc2d(fz_faxe *fax, unsigned char *ref, unsigned char *src, fz_buffer *out)
{
int a1, a2, b1, b2;
@@ -257,10 +257,10 @@ enc2d(fz_faxe *fax, unsigned char *ref, unsigned char *src, fz_buffer *out)
return fz_okay;
}
-static fz_error *
+static fz_error
process(fz_faxe *fax, fz_buffer *in, fz_buffer *out)
{
- fz_error *error;
+ fz_error error;
int i, n;
while (1)
@@ -388,11 +388,11 @@ rtc:
return fz_iodone;
}
-fz_error *
+fz_error
fz_processfaxe(fz_filter *p, fz_buffer *in, fz_buffer *out)
{
fz_faxe *fax = (fz_faxe*) p;
- fz_error *error;
+ fz_error error;
/* restore partial bits */
*out->wp = fax->bsave;
diff --git a/fitz/filt_flate.c b/fitz/filt_flate.c
index 056e8670..73105800 100644
--- a/fitz/filt_flate.c
+++ b/fitz/filt_flate.c
@@ -17,10 +17,10 @@ zmalloc(void *opaque, unsigned int items, unsigned int size)
return fz_malloc(items * size);
}
-fz_error *
+fz_error
fz_newflated(fz_filter **fp, fz_obj *params)
{
- fz_error *eo;
+ fz_error eo;
fz_obj *obj;
int zipfmt;
int ei;
@@ -70,7 +70,7 @@ fz_dropflated(fz_filter *f)
fprintf(stderr, "inflateEnd: %s", zp->msg);
}
-fz_error *
+fz_error
fz_processflated(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
z_streamp zp = &((fz_flate*)f)->z;
@@ -110,11 +110,11 @@ fz_processflated(fz_filter *f, fz_buffer *in, fz_buffer *out)
}
}
-fz_error *
+fz_error
fz_newflatee(fz_filter **fp, fz_obj *params)
{
fz_obj *obj;
- fz_error *eo;
+ fz_error eo;
int effort;
int zipfmt;
int ei;
@@ -166,7 +166,7 @@ fz_dropflatee(fz_filter *f)
fz_free(f);
}
-fz_error *
+fz_error
fz_processflatee(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
z_streamp zp = &((fz_flate*)f)->z;
diff --git a/fitz/filt_jbig2d.c b/fitz/filt_jbig2d.c
index 7ec5dec0..9dfeda61 100644
--- a/fitz/filt_jbig2d.c
+++ b/fitz/filt_jbig2d.c
@@ -41,7 +41,7 @@ struct fz_jbig2d_s
int idx;
};
-fz_error *
+fz_error
fz_newjbig2d(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_jbig2d, d, jbig2d);
@@ -58,7 +58,7 @@ fz_dropjbig2d(fz_filter *filter)
jbig2_ctx_free(d->ctx);
}
-fz_error *
+fz_error
fz_setjbig2dglobalstream(fz_filter *filter, unsigned char *buf, int len)
{
fz_jbig2d *d = (fz_jbig2d*)filter;
@@ -68,7 +68,7 @@ fz_setjbig2dglobalstream(fz_filter *filter, unsigned char *buf, int len)
return fz_okay;
}
-fz_error *
+fz_error
fz_processjbig2d(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_jbig2d *d = (fz_jbig2d*)filter;
diff --git a/fitz/filt_jpxd.c b/fitz/filt_jpxd.c
index 35323e29..eb940c93 100644
--- a/fitz/filt_jpxd.c
+++ b/fitz/filt_jpxd.c
@@ -34,7 +34,7 @@ struct fz_jpxd_s
int stage;
};
-fz_error *
+fz_error
fz_newjpxd(fz_filter **fp, fz_obj *params)
{
int err;
@@ -70,7 +70,7 @@ fz_dropjpxd(fz_filter *filter)
if (d->image) jas_image_destroy(d->image);
}
-fz_error *
+fz_error
fz_processjpxd(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_jpxd *d = (fz_jpxd*)filter;
diff --git a/fitz/filt_lzwd.c b/fitz/filt_lzwd.c
index ef491f04..07bdddc8 100644
--- a/fitz/filt_lzwd.c
+++ b/fitz/filt_lzwd.c
@@ -42,7 +42,7 @@ struct fz_lzwd_s
lzw_code table[NUMCODES];
};
-fz_error *
+fz_error
fz_newlzwd(fz_filter **fp, fz_obj *params)
{
int i;
@@ -97,7 +97,7 @@ static inline void eatbits(fz_lzwd *lzw, int nbits)
lzw->bidx += nbits;
}
-static inline fz_error * fillbits(fz_lzwd *lzw, fz_buffer *in)
+static inline fz_error fillbits(fz_lzwd *lzw, fz_buffer *in)
{
while (lzw->bidx >= 8)
{
@@ -117,7 +117,7 @@ static inline void unstuff(fz_lzwd *lzw, fz_buffer *in)
in->rp --;
}
-fz_error *
+fz_error
fz_processlzwd(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_lzwd *lzw = (fz_lzwd*)filter;
diff --git a/fitz/filt_lzwe.c b/fitz/filt_lzwe.c
index c691456b..a20043c0 100644
--- a/fitz/filt_lzwe.c
+++ b/fitz/filt_lzwe.c
@@ -55,7 +55,7 @@ clearhash(fz_lzwe *lzw)
lzw->table[i].hash = -1;
}
-fz_error *
+fz_error
fz_newlzwe(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_lzwe, lzw, lzwe);
@@ -128,7 +128,7 @@ putcode(fz_lzwe *lzw, fz_buffer *out, int code)
}
-static fz_error *
+static fz_error
compress(fz_lzwe *lzw, fz_buffer *in, fz_buffer *out)
{
if (lzw->resume)
@@ -242,11 +242,11 @@ eof:
return fz_iodone;
}
-fz_error *
+fz_error
fz_processlzwe(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_lzwe *lzw = (fz_lzwe*)filter;
- fz_error *error;
+ fz_error error;
/* restore partial bits */
*out->wp = lzw->bsave;
diff --git a/fitz/filt_null.c b/fitz/filt_null.c
index 08478c0b..955354b1 100644
--- a/fitz/filt_null.c
+++ b/fitz/filt_null.c
@@ -10,7 +10,7 @@ struct fz_nullfilter_s
int cur;
};
-fz_error *
+fz_error
fz_newnullfilter(fz_filter **fp, int len)
{
FZ_NEWFILTER(fz_nullfilter, f, nullfilter);
@@ -24,7 +24,7 @@ fz_dropnullfilter(fz_filter *f)
{
}
-fz_error *
+fz_error
fz_processnullfilter(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_nullfilter *f = (fz_nullfilter*)filter;
diff --git a/fitz/filt_pipeline.c b/fitz/filt_pipeline.c
index c6b28ebd..33609a4a 100644
--- a/fitz/filt_pipeline.c
+++ b/fitz/filt_pipeline.c
@@ -5,7 +5,7 @@
typedef struct fz_pipeline_s fz_pipeline;
-fz_error * fz_processpipeline(fz_filter *filter, fz_buffer *in, fz_buffer *out);
+fz_error fz_processpipeline(fz_filter *filter, fz_buffer *in, fz_buffer *out);
struct fz_pipeline_s
{
@@ -16,7 +16,7 @@ struct fz_pipeline_s
int tailneedsin;
};
-fz_error *
+fz_error
fz_chainpipeline(fz_filter **fp, fz_filter *head, fz_filter *tail, fz_buffer *buf)
{
FZ_NEWFILTER(fz_pipeline, p, pipeline);
@@ -38,10 +38,10 @@ fz_unchainpipeline(fz_filter *filter, fz_filter **oldfp, fz_buffer **oldbp)
fz_dropfilter(filter);
}
-fz_error *
+fz_error
fz_newpipeline(fz_filter **fp, fz_filter *head, fz_filter *tail)
{
- fz_error *error;
+ fz_error error;
FZ_NEWFILTER(fz_pipeline, p, pipeline);
p->head = fz_keepfilter(head);
@@ -67,11 +67,11 @@ fz_droppipeline(fz_filter *filter)
fz_dropbuffer(p->buffer);
}
-fz_error *
+fz_error
fz_processpipeline(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_pipeline *p = (fz_pipeline*)filter;
- fz_error *e;
+ fz_error e;
if (p->buffer->eof)
goto tail;
@@ -89,7 +89,7 @@ head:
{
if (p->tailneedsin && !p->head->produced)
{
- fz_error *be = nil;
+ fz_error be = nil;
if (p->buffer->rp > p->buffer->bp)
be = fz_rewindbuffer(p->buffer);
else
diff --git a/fitz/filt_predict.c b/fitz/filt_predict.c
index fff5a8ce..fc1bf1ea 100644
--- a/fitz/filt_predict.c
+++ b/fitz/filt_predict.c
@@ -23,7 +23,7 @@ struct fz_predict_s
int encode;
};
-fz_error *
+fz_error
fz_newpredict(fz_filter **fp, fz_obj *params, int encode)
{
fz_obj *obj;
@@ -187,7 +187,7 @@ png(fz_predict *p, unsigned char *in, unsigned char *out, int predictor)
}
}
-fz_error *
+fz_error
fz_processpredict(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_predict *dec = (fz_predict*)filter;
@@ -240,13 +240,13 @@ fz_processpredict(fz_filter *filter, fz_buffer *in, fz_buffer *out)
}
}
-fz_error *
+fz_error
fz_newpredictd(fz_filter **fp, fz_obj *params)
{
return fz_newpredict(fp, params, 0);
}
-fz_error *
+fz_error
fz_newpredicte(fz_filter **fp, fz_obj *params)
{
return fz_newpredict(fp, params, 1);
diff --git a/fitz/filt_rld.c b/fitz/filt_rld.c
index 53acd615..734c7005 100644
--- a/fitz/filt_rld.c
+++ b/fitz/filt_rld.c
@@ -1,7 +1,7 @@
#include "fitz_base.h"
#include "fitz_stream.h"
-fz_error *
+fz_error
fz_newrld(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_filter, f, rld);
@@ -13,7 +13,7 @@ fz_droprld(fz_filter *rld)
{
}
-fz_error *
+fz_error
fz_processrld(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
int run, i;
diff --git a/fitz/filt_rle.c b/fitz/filt_rle.c
index f0284d4c..2dfdb91d 100644
--- a/fitz/filt_rle.c
+++ b/fitz/filt_rle.c
@@ -28,7 +28,7 @@ enum {
END
};
-fz_error *
+fz_error
fz_newrle(fz_filter **fp, fz_obj *params)
{
FZ_NEWFILTER(fz_rle, enc, rle);
@@ -50,7 +50,7 @@ fz_droprle(fz_filter *enc)
{
}
-static fz_error *
+static fz_error
putone(fz_rle *enc, fz_buffer *in, fz_buffer *out)
{
if (out->wp + 2 >= out->ep)
@@ -66,7 +66,7 @@ fprintf(stderr, "one '%c'\n", enc->buf[0]);
return fz_okay;
}
-static fz_error *
+static fz_error
putsame(fz_rle *enc, fz_buffer *in, fz_buffer *out)
{
if (out->wp + enc->run >= out->ep)
@@ -81,7 +81,7 @@ fprintf(stderr, "same %d x '%c'\n", enc->run, enc->buf[0]);
return fz_okay;
}
-static fz_error *
+static fz_error
putdiff(fz_rle *enc, fz_buffer *in, fz_buffer *out)
{
int i;
@@ -98,7 +98,7 @@ fprintf(stderr, "diff %d\n", enc->run);
return fz_okay;
}
-static fz_error *
+static fz_error
puteod(fz_rle *enc, fz_buffer *in, fz_buffer *out)
{
if (out->wp + 1 >= out->ep)
@@ -112,7 +112,7 @@ fprintf(stderr, "eod\n");
return fz_okay;
}
-static fz_error *
+static fz_error
savebuf(fz_rle *enc, fz_buffer *in, fz_buffer *out)
{
switch (enc->state)
@@ -126,11 +126,11 @@ savebuf(fz_rle *enc, fz_buffer *in, fz_buffer *out)
}
}
-fz_error *
+fz_error
fz_processrle(fz_filter *filter, fz_buffer *in, fz_buffer *out)
{
fz_rle *enc = (fz_rle*)filter;
- fz_error *error;
+ fz_error error;
unsigned char c;
while (1)
diff --git a/fitz/fitz_base.h b/fitz/fitz_base.h
index 4ce6fbc0..211ed8dc 100644
--- a/fitz/fitz_base.h
+++ b/fitz/fitz_base.h
@@ -177,17 +177,17 @@ char *cleanname(char *name);
typedef int fz_error;
-#define fz_outofmem ((fz_error*)-1)
+#define fz_outofmem ((fz_error)-1)
#define fz_throw(...) fz_throwimp(__func__, __FILE__, __LINE__, __VA_ARGS__)
#define fz_rethrow(cause, ...) fz_rethrowimp(cause, __func__, __FILE__, __LINE__, __VA_ARGS__)
#define fz_catch(cause, ...) fz_catchimp(cause, __func__, __FILE__, __LINE__, __VA_ARGS__)
-#define fz_okay ((fz_error*)0)
+#define fz_okay ((fz_error)0)
void fz_warn(char *fmt, ...) __printflike(1,2);
-fz_error *fz_throwimp(const char *func, const char *file, int line, char *fmt, ...) __printflike(4, 5);
-fz_error *fz_rethrowimp(fz_error *cause, const char *func, const char *file, int line, char *fmt, ...) __printflike(5, 6);
-fz_error *fz_catchimp(fz_error *cause, const char *func, const char *file, int line, char *fmt, ...) __printflike(5, 6);
+fz_error fz_throwimp(const char *func, const char *file, int line, char *fmt, ...) __printflike(4, 5);
+fz_error fz_rethrowimp(fz_error cause, const char *func, const char *file, int line, char *fmt, ...) __printflike(5, 6);
+fz_error fz_catchimp(fz_error cause, const char *func, const char *file, int line, char *fmt, ...) __printflike(5, 6);
typedef struct fz_memorycontext_s fz_memorycontext;
@@ -213,15 +213,15 @@ char *fz_strdup(char *s);
typedef struct fz_hashtable_s fz_hashtable;
-fz_error *fz_newhash(fz_hashtable **tablep, int initialsize, int keylen);
-fz_error *fz_resizehash(fz_hashtable *table, int newsize);
+fz_error fz_newhash(fz_hashtable **tablep, int initialsize, int keylen);
+fz_error fz_resizehash(fz_hashtable *table, int newsize);
void fz_debughash(fz_hashtable *table);
void fz_emptyhash(fz_hashtable *table);
void fz_drophash(fz_hashtable *table);
void *fz_hashfind(fz_hashtable *table, void *key);
-fz_error *fz_hashinsert(fz_hashtable *table, void *key, void *val);
-fz_error *fz_hashremove(fz_hashtable *table, void *key);
+fz_error fz_hashinsert(fz_hashtable *table, void *key, void *val);
+fz_error fz_hashremove(fz_hashtable *table, void *key);
int fz_hashlen(fz_hashtable *table);
void *fz_hashgetkey(fz_hashtable *table, int idx);
@@ -323,18 +323,18 @@ struct fz_pixmap_s
fz_sample *samples;
};
-fz_error *fz_newpixmapwithrect(fz_pixmap **mapp, fz_irect bbox, int n);
-fz_error *fz_newpixmap(fz_pixmap **mapp, int x, int y, int w, int h, int n);
-fz_error *fz_newpixmapcopy(fz_pixmap **pixp, fz_pixmap *old);
+fz_error fz_newpixmapwithrect(fz_pixmap **mapp, fz_irect bbox, int n);
+fz_error fz_newpixmap(fz_pixmap **mapp, int x, int y, int w, int h, int n);
+fz_error fz_newpixmapcopy(fz_pixmap **pixp, fz_pixmap *old);
void fz_debugpixmap(fz_pixmap *map, char *prefix);
void fz_clearpixmap(fz_pixmap *map);
void fz_droppixmap(fz_pixmap *map);
-fz_error *fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom);
+fz_error fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom);
/* needed for tiled rendering */
-fz_error *fz_newscaledpixmap(fz_pixmap **dstp, int w, int h, int n, int xdenom, int ydenom);
-fz_error *fz_scalepixmaptile(fz_pixmap *dstp, int xoffs, int yoffs,
+fz_error fz_newscaledpixmap(fz_pixmap **dstp, int w, int h, int n, int xdenom, int ydenom);
+fz_error fz_scalepixmaptile(fz_pixmap *dstp, int xoffs, int yoffs,
fz_pixmap *tile, int xdenom, int ydenom);
diff --git a/fitz/fitz_draw.h b/fitz/fitz_draw.h
index fc7d0a78..494374da 100644
--- a/fitz/fitz_draw.h
+++ b/fitz/fitz_draw.h
@@ -37,22 +37,22 @@ struct fz_ael_s
fz_edge **edges;
};
-fz_error *fz_newgel(fz_gel **gelp);
-fz_error *fz_insertgel(fz_gel *gel, float x0, float y0, float x1, float y1);
+fz_error fz_newgel(fz_gel **gelp);
+fz_error fz_insertgel(fz_gel *gel, float x0, float y0, float x1, float y1);
fz_irect fz_boundgel(fz_gel *gel);
void fz_resetgel(fz_gel *gel, fz_irect clip);
void fz_sortgel(fz_gel *gel);
void fz_dropgel(fz_gel *gel);
-fz_error *fz_newael(fz_ael **aelp);
+fz_error fz_newael(fz_ael **aelp);
void fz_dropael(fz_ael *ael);
-fz_error *fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill,
+fz_error fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill,
fz_irect clip, fz_pixmap *pix, unsigned char *argb, int over);
-fz_error *fz_fillpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness);
-fz_error *fz_strokepath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float linewidth);
-fz_error *fz_dashpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float linewidth);
+fz_error fz_fillpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness);
+fz_error fz_strokepath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float linewidth);
+fz_error fz_dashpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float linewidth);
/*
@@ -121,9 +121,9 @@ struct fz_renderer_s
extern void fz_accelerate();
-fz_error *fz_newrenderer(fz_renderer **gcp, fz_colorspace *pcm, int maskonly, int gcmem);
+fz_error fz_newrenderer(fz_renderer **gcp, fz_colorspace *pcm, int maskonly, int gcmem);
void fz_droprenderer(fz_renderer *gc);
-fz_error *fz_rendertree(fz_pixmap **out, fz_renderer *gc, fz_tree *tree, fz_matrix ctm, fz_irect bbox, int white);
-fz_error *fz_rendertreeover(fz_renderer *gc, fz_pixmap *dest, fz_tree *tree, fz_matrix ctm);
+fz_error fz_rendertree(fz_pixmap **out, fz_renderer *gc, fz_tree *tree, fz_matrix ctm, fz_irect bbox, int white);
+fz_error fz_rendertreeover(fz_renderer *gc, fz_pixmap *dest, fz_tree *tree, fz_matrix ctm);
diff --git a/fitz/fitz_stream.h b/fitz/fitz_stream.h
index a904d04b..17d6c4e0 100644
--- a/fitz/fitz_stream.h
+++ b/fitz/fitz_stream.h
@@ -60,21 +60,21 @@ struct fz_obj_s
} u;
};
-fz_error *fz_newnull(fz_obj **op);
-fz_error *fz_newbool(fz_obj **op, int b);
-fz_error *fz_newint(fz_obj **op, int i);
-fz_error *fz_newreal(fz_obj **op, float f);
-fz_error *fz_newname(fz_obj **op, char *str);
-fz_error *fz_newstring(fz_obj **op, char *str, int len);
-fz_error *fz_newindirect(fz_obj **op, int oid, int gid);
-fz_error *fz_newpointer(fz_obj **op, void *p);
-
-fz_error *fz_newarray(fz_obj **op, int initialcap);
-fz_error *fz_newdict(fz_obj **op, int initialcap);
-fz_error *fz_copyarray(fz_obj **op, fz_obj *array);
-fz_error *fz_copydict(fz_obj **op, fz_obj *dict);
-fz_error *fz_deepcopyarray(fz_obj **op, fz_obj *array);
-fz_error *fz_deepcopydict(fz_obj **op, fz_obj *dict);
+fz_error fz_newnull(fz_obj **op);
+fz_error fz_newbool(fz_obj **op, int b);
+fz_error fz_newint(fz_obj **op, int i);
+fz_error fz_newreal(fz_obj **op, float f);
+fz_error fz_newname(fz_obj **op, char *str);
+fz_error fz_newstring(fz_obj **op, char *str, int len);
+fz_error fz_newindirect(fz_obj **op, int oid, int gid);
+fz_error fz_newpointer(fz_obj **op, void *p);
+
+fz_error fz_newarray(fz_obj **op, int initialcap);
+fz_error fz_newdict(fz_obj **op, int initialcap);
+fz_error fz_copyarray(fz_obj **op, fz_obj *array);
+fz_error fz_copydict(fz_obj **op, fz_obj *dict);
+fz_error fz_deepcopyarray(fz_obj **op, fz_obj *array);
+fz_error fz_deepcopydict(fz_obj **op, fz_obj *dict);
fz_obj *fz_keepobj(fz_obj *obj);
void fz_dropobj(fz_obj *obj);
@@ -104,12 +104,12 @@ int fz_tonum(fz_obj *obj);
int fz_togen(fz_obj *obj);
void *fz_topointer(fz_obj *obj);
-fz_error *fz_newnamefromstring(fz_obj **op, fz_obj *str);
+fz_error fz_newnamefromstring(fz_obj **op, fz_obj *str);
int fz_arraylen(fz_obj *array);
fz_obj *fz_arrayget(fz_obj *array, int i);
-fz_error *fz_arrayput(fz_obj *array, int i, fz_obj *obj);
-fz_error *fz_arraypush(fz_obj *array, fz_obj *obj);
+fz_error fz_arrayput(fz_obj *array, int i, fz_obj *obj);
+fz_error fz_arraypush(fz_obj *array, fz_obj *obj);
int fz_dictlen(fz_obj *dict);
fz_obj *fz_dictgetkey(fz_obj *dict, int idx);
@@ -117,19 +117,19 @@ fz_obj *fz_dictgetval(fz_obj *dict, int idx);
fz_obj *fz_dictget(fz_obj *dict, fz_obj *key);
fz_obj *fz_dictgets(fz_obj *dict, char *key);
fz_obj *fz_dictgetsa(fz_obj *dict, char *key, char *abbrev);
-fz_error *fz_dictput(fz_obj *dict, fz_obj *key, fz_obj *val);
-fz_error *fz_dictputs(fz_obj *dict, char *key, fz_obj *val);
-fz_error *fz_dictdel(fz_obj *dict, fz_obj *key);
-fz_error *fz_dictdels(fz_obj *dict, char *key);
+fz_error fz_dictput(fz_obj *dict, fz_obj *key, fz_obj *val);
+fz_error fz_dictputs(fz_obj *dict, char *key, fz_obj *val);
+fz_error fz_dictdel(fz_obj *dict, fz_obj *key);
+fz_error fz_dictdels(fz_obj *dict, char *key);
void fz_sortdict(fz_obj *dict);
int fz_sprintobj(char *s, int n, fz_obj *obj, int tight);
int fz_fprintobj(FILE *fp, fz_obj *obj, int tight);
void fz_debugobj(fz_obj *obj);
-fz_error *fz_parseobj(fz_obj **objp, char *s);
-fz_error *fz_packobj(fz_obj **objp, char *fmt, ...);
-fz_error *fz_unpackobj(fz_obj *obj, char *fmt, ...);
+fz_error fz_parseobj(fz_obj **objp, char *s);
+fz_error fz_packobj(fz_obj **objp, char *fmt, ...);
+fz_error fz_unpackobj(fz_obj *obj, char *fmt, ...);
char *fz_objkindstr(fz_obj *obj);
@@ -165,11 +165,11 @@ struct fz_buffer_s
int eof;
};
-fz_error *fz_newbuffer(fz_buffer **bufp, int size);
-fz_error *fz_newbufferwithmemory(fz_buffer **bufp, unsigned char *data, int size);
+fz_error fz_newbuffer(fz_buffer **bufp, int size);
+fz_error fz_newbufferwithmemory(fz_buffer **bufp, unsigned char *data, int size);
-fz_error *fz_rewindbuffer(fz_buffer *buf);
-fz_error *fz_growbuffer(fz_buffer *buf);
+fz_error fz_rewindbuffer(fz_buffer *buf);
+fz_error fz_growbuffer(fz_buffer *buf);
fz_buffer *fz_keepbuffer(fz_buffer *buf);
void fz_dropbuffer(fz_buffer *buf);
@@ -202,16 +202,16 @@ void fz_dropbuffer(fz_buffer *buf);
typedef struct fz_filter_s fz_filter;
-#define fz_ioneedin ((fz_error*)1)
-#define fz_ioneedout ((fz_error*)2)
-#define fz_iodone ((fz_error*)3)
+#define fz_ioneedin ((fz_error)1)
+#define fz_ioneedout ((fz_error)2)
+#define fz_iodone ((fz_error)3)
/*
* Evil looking macro to create an initialize a filter struct.
*/
#define FZ_NEWFILTER(TYPE,VAR,NAME) \
- fz_error * fz_process ## NAME (fz_filter*,fz_buffer*,fz_buffer*); \
+ fz_error fz_process ## NAME (fz_filter*,fz_buffer*,fz_buffer*); \
void fz_drop ## NAME (fz_filter*); \
TYPE *VAR; \
*fp = fz_malloc(sizeof(TYPE)); \
@@ -228,7 +228,7 @@ typedef struct fz_filter_s fz_filter;
struct fz_filter_s
{
int refs;
- fz_error* (*process)(fz_filter *filter, fz_buffer *in, fz_buffer *out);
+ fz_error (*process)(fz_filter *filter, fz_buffer *in, fz_buffer *out);
void (*drop)(fz_filter *filter);
int consumed;
int produced;
@@ -236,37 +236,37 @@ struct fz_filter_s
int done;
};
-fz_error *fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out);
+fz_error fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out);
fz_filter *fz_keepfilter(fz_filter *f);
void fz_dropfilter(fz_filter *f);
-fz_error *fz_newpipeline(fz_filter **fp, fz_filter *head, fz_filter *tail);
-fz_error *fz_chainpipeline(fz_filter **fp, fz_filter *head, fz_filter *tail, fz_buffer *buf);
+fz_error fz_newpipeline(fz_filter **fp, fz_filter *head, fz_filter *tail);
+fz_error fz_chainpipeline(fz_filter **fp, fz_filter *head, fz_filter *tail, fz_buffer *buf);
void fz_unchainpipeline(fz_filter *pipe, fz_filter **oldfp, fz_buffer **oldbp);
/* stop and reverse! special case needed for postscript only */
void fz_pushbackahxd(fz_filter *filter, fz_buffer *in, fz_buffer *out, int n);
-fz_error *fz_newnullfilter(fz_filter **fp, int len);
-fz_error *fz_newarc4filter(fz_filter **fp, unsigned char *key, unsigned keylen);
-fz_error *fz_newa85d(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newa85e(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newahxd(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newahxe(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newrld(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newrle(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newdctd(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newdcte(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newfaxd(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newfaxe(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newflated(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newflatee(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newlzwd(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newlzwe(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newpredictd(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newpredicte(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newjbig2d(fz_filter **filterp, fz_obj *param);
-fz_error *fz_newjpxd(fz_filter **filterp, fz_obj *param);
+fz_error fz_newnullfilter(fz_filter **fp, int len);
+fz_error fz_newarc4filter(fz_filter **fp, unsigned char *key, unsigned keylen);
+fz_error fz_newa85d(fz_filter **filterp, fz_obj *param);
+fz_error fz_newa85e(fz_filter **filterp, fz_obj *param);
+fz_error fz_newahxd(fz_filter **filterp, fz_obj *param);
+fz_error fz_newahxe(fz_filter **filterp, fz_obj *param);
+fz_error fz_newrld(fz_filter **filterp, fz_obj *param);
+fz_error fz_newrle(fz_filter **filterp, fz_obj *param);
+fz_error fz_newdctd(fz_filter **filterp, fz_obj *param);
+fz_error fz_newdcte(fz_filter **filterp, fz_obj *param);
+fz_error fz_newfaxd(fz_filter **filterp, fz_obj *param);
+fz_error fz_newfaxe(fz_filter **filterp, fz_obj *param);
+fz_error fz_newflated(fz_filter **filterp, fz_obj *param);
+fz_error fz_newflatee(fz_filter **filterp, fz_obj *param);
+fz_error fz_newlzwd(fz_filter **filterp, fz_obj *param);
+fz_error fz_newlzwe(fz_filter **filterp, fz_obj *param);
+fz_error fz_newpredictd(fz_filter **filterp, fz_obj *param);
+fz_error fz_newpredicte(fz_filter **filterp, fz_obj *param);
+fz_error fz_newjbig2d(fz_filter **filterp, fz_obj *param);
+fz_error fz_newjpxd(fz_filter **filterp, fz_obj *param);
/*
* Basic crypto functions.
@@ -328,7 +328,7 @@ struct fz_stream_s
fz_buffer *buffer;
fz_filter *filter;
fz_stream *chain;
- fz_error *error; /* delayed error from readbyte and peekbyte */
+ fz_error error; /* delayed error from readbyte and peekbyte */
int file;
};
@@ -336,14 +336,14 @@ struct fz_stream_s
* Various stream creation functions.
*/
-fz_error *fz_openrfile(fz_stream **stmp, char *filename);
+fz_error fz_openrfile(fz_stream **stmp, char *filename);
/* write to memory buffers! */
-fz_error *fz_openrmemory(fz_stream **stmp, unsigned char *mem, int len);
-fz_error *fz_openrbuffer(fz_stream **stmp, fz_buffer *buf);
+fz_error fz_openrmemory(fz_stream **stmp, unsigned char *mem, int len);
+fz_error fz_openrbuffer(fz_stream **stmp, fz_buffer *buf);
/* almost like fork() exec() pipe() */
-fz_error *fz_openrfilter(fz_stream **stmp, fz_filter *flt, fz_stream *chain);
+fz_error fz_openrfilter(fz_stream **stmp, fz_filter *flt, fz_stream *chain);
/*
* Functions that are common to both input and output streams.
@@ -353,19 +353,19 @@ fz_stream *fz_keepstream(fz_stream *stm);
void fz_dropstream(fz_stream *stm);
int fz_tell(fz_stream *stm);
-fz_error * fz_seek(fz_stream *stm, int offset, int whence);
+fz_error fz_seek(fz_stream *stm, int offset, int whence);
/*
* Input stream functions.
*/
int fz_rtell(fz_stream *stm);
-fz_error * fz_rseek(fz_stream *stm, int offset, int whence);
+fz_error fz_rseek(fz_stream *stm, int offset, int whence);
-fz_error * fz_readimp(fz_stream *stm);
-fz_error * fz_read(int *np, fz_stream *stm, unsigned char *buf, int len);
-fz_error * fz_readall(fz_buffer **bufp, fz_stream *stm, int sizehint);
-fz_error * fz_readline(fz_stream *stm, char *buf, int max);
+fz_error fz_readimp(fz_stream *stm);
+fz_error fz_read(int *np, fz_stream *stm, unsigned char *buf, int len);
+fz_error fz_readall(fz_buffer **bufp, fz_stream *stm, int sizehint);
+fz_error fz_readline(fz_stream *stm, char *buf, int max);
/*
* Error handling when reading with readbyte/peekbyte is non-standard.
@@ -374,7 +374,7 @@ fz_error * fz_readline(fz_stream *stm, char *buf, int max);
* So we have to be careful to check the error status eventually.
*/
-fz_error *fz_readerror(fz_stream *stm);
+fz_error fz_readerror(fz_stream *stm);
int fz_readbytex(fz_stream *stm);
int fz_peekbytex(fz_stream *stm);
diff --git a/fitz/fitz_tree.h b/fitz/fitz_tree.h
index 0ad0aef7..205441ad 100644
--- a/fitz/fitz_tree.h
+++ b/fitz/fitz_tree.h
@@ -20,7 +20,7 @@ struct fz_tree_s
};
/* tree operations */
-fz_error *fz_newtree(fz_tree **treep);
+fz_error fz_newtree(fz_tree **treep);
fz_tree *fz_keeptree(fz_tree *tree);
void fz_droptree(fz_tree *tree);
@@ -31,7 +31,7 @@ void fz_insertnodelast(fz_node *parent, fz_node *child);
void fz_insertnodeafter(fz_node *prev, fz_node *child);
void fz_removenode(fz_node *child);
-fz_error *fz_optimizetree(fz_tree *tree);
+fz_error fz_optimizetree(fz_tree *tree);
/* node types */
@@ -153,10 +153,10 @@ fz_rect fz_boundnode(fz_node *node, fz_matrix ctm);
void fz_dropnode(fz_node *node);
/* branch nodes */
-fz_error *fz_newovernode(fz_node **nodep);
-fz_error *fz_newmasknode(fz_node **nodep);
-fz_error *fz_newblendnode(fz_node **nodep, fz_blendkind b, int k, int i);
-fz_error *fz_newtransformnode(fz_node **nodep, fz_matrix m);
+fz_error fz_newovernode(fz_node **nodep);
+fz_error fz_newmasknode(fz_node **nodep);
+fz_error fz_newblendnode(fz_node **nodep, fz_blendkind b, int k, int i);
+fz_error fz_newtransformnode(fz_node **nodep, fz_matrix m);
int fz_istransformnode(fz_node *node);
int fz_isovernode(fz_node *node);
@@ -164,10 +164,10 @@ int fz_ismasknode(fz_node *node);
int fz_isblendnode(fz_node *node);
/* leaf nodes */
-fz_error *fz_newlinknode(fz_node **nodep, fz_tree *subtree);
-fz_error *fz_newsolidnode(fz_node **nodep, float a, fz_colorspace *cs, int n, float *v);
-fz_error *fz_newimagenode(fz_node **nodep, fz_image *image);
-fz_error *fz_newshadenode(fz_node **nodep, fz_shade *shade);
+fz_error fz_newlinknode(fz_node **nodep, fz_tree *subtree);
+fz_error fz_newsolidnode(fz_node **nodep, float a, fz_colorspace *cs, int n, float *v);
+fz_error fz_newimagenode(fz_node **nodep, fz_image *image);
+fz_error fz_newshadenode(fz_node **nodep, fz_shade *shade);
int fz_islinknode(fz_node *node);
int fz_issolidnode(fz_node *node);
@@ -243,21 +243,21 @@ struct fz_pathnode_s
fz_pathel *els;
};
-fz_error *fz_newpathnode(fz_pathnode **pathp);
-fz_error *fz_clonepathnode(fz_pathnode **pathp, fz_pathnode *oldpath);
-fz_error *fz_moveto(fz_pathnode*, float x, float y);
-fz_error *fz_lineto(fz_pathnode*, float x, float y);
-fz_error *fz_curveto(fz_pathnode*, float, float, float, float, float, float);
-fz_error *fz_curvetov(fz_pathnode*, float, float, float, float);
-fz_error *fz_curvetoy(fz_pathnode*, float, float, float, float);
-fz_error *fz_closepath(fz_pathnode*);
-fz_error *fz_endpath(fz_pathnode*, fz_pathkind paint, fz_stroke *stroke, fz_dash *dash);
+fz_error fz_newpathnode(fz_pathnode **pathp);
+fz_error fz_clonepathnode(fz_pathnode **pathp, fz_pathnode *oldpath);
+fz_error fz_moveto(fz_pathnode*, float x, float y);
+fz_error fz_lineto(fz_pathnode*, float x, float y);
+fz_error fz_curveto(fz_pathnode*, float, float, float, float, float, float);
+fz_error fz_curvetov(fz_pathnode*, float, float, float, float);
+fz_error fz_curvetoy(fz_pathnode*, float, float, float, float);
+fz_error fz_closepath(fz_pathnode*);
+fz_error fz_endpath(fz_pathnode*, fz_pathkind paint, fz_stroke *stroke, fz_dash *dash);
fz_rect fz_boundpathnode(fz_pathnode *node, fz_matrix ctm);
void fz_debugpathnode(fz_pathnode *node, int indent);
void fz_printpathnode(fz_pathnode *node, int indent);
-fz_error *fz_newdash(fz_dash **dashp, float phase, int len, float *array);
+fz_error fz_newdash(fz_dash **dashp, float phase, int len, float *array);
void fz_dropdash(fz_dash *dash);
/*
@@ -300,10 +300,10 @@ struct fz_textnode_s
fz_textel *els;
};
-fz_error *fz_newtextnode(fz_textnode **textp, fz_font *face);
-fz_error *fz_clonetextnode(fz_textnode **textp, fz_textnode *oldtext);
-fz_error *fz_addtext(fz_textnode *text, int gid, int ucs, float x, float y);
-fz_error *fz_endtext(fz_textnode *text);
+fz_error fz_newtextnode(fz_textnode **textp, fz_font *face);
+fz_error fz_clonetextnode(fz_textnode **textp, fz_textnode *oldtext);
+fz_error fz_addtext(fz_textnode *text, int gid, int ucs, float x, float y);
+fz_error fz_endtext(fz_textnode *text);
typedef struct fz_colorcube_s fz_colorcube;
typedef struct fz_colorcube1_s fz_colorcube1;
@@ -371,13 +371,13 @@ struct fz_glyph_s
unsigned char *samples;
};
-fz_error * fz_newfreetypefont(fz_font **fontp, char *name, int substitute);
-fz_error * fz_loadfreetypefontfile(fz_font *font, char *path, int index);
-fz_error * fz_loadfreetypefontbuffer(fz_font *font, unsigned char *data, int len, int index);
-fz_error * fz_newtype3font(fz_font **fontp, char *name, fz_matrix matrix);
+fz_error fz_newfreetypefont(fz_font **fontp, char *name, int substitute);
+fz_error fz_loadfreetypefontfile(fz_font *font, char *path, int index);
+fz_error fz_loadfreetypefontbuffer(fz_font *font, unsigned char *data, int len, int index);
+fz_error fz_newtype3font(fz_font **fontp, char *name, fz_matrix matrix);
-fz_error * fz_newfontfrombuffer(fz_font **fontp, unsigned char *data, int len, int index);
-fz_error * fz_newfontfromfile(fz_font **fontp, char *path, int index);
+fz_error fz_newfontfrombuffer(fz_font **fontp, unsigned char *data, int len, int index);
+fz_error fz_newfontfromfile(fz_font **fontp, char *path, int index);
fz_font * fz_keepfont(fz_font *font);
void fz_dropfont(fz_font *font);
@@ -385,10 +385,10 @@ void fz_dropfont(fz_font *font);
void fz_debugfont(fz_font *font);
void fz_setfontbbox(fz_font *font, int xmin, int ymin, int xmax, int ymax);
-fz_error * fz_renderftglyph(fz_glyph *glyph, fz_font *font, int cid, fz_matrix trm);
-fz_error * fz_rendert3glyph(fz_glyph *glyph, fz_font *font, int cid, fz_matrix trm);
-fz_error * fz_newglyphcache(fz_glyphcache **arenap, int slots, int size);
-fz_error * fz_renderglyph(fz_glyphcache*, fz_glyph*, fz_font*, int, fz_matrix);
+fz_error fz_renderftglyph(fz_glyph *glyph, fz_font *font, int cid, fz_matrix trm);
+fz_error fz_rendert3glyph(fz_glyph *glyph, fz_font *font, int cid, fz_matrix trm);
+fz_error fz_newglyphcache(fz_glyphcache **arenap, int slots, int size);
+fz_error fz_renderglyph(fz_glyphcache*, fz_glyph*, fz_font*, int, fz_matrix);
void fz_debugglyphcache(fz_glyphcache *);
void fz_dropglyphcache(fz_glyphcache *);
@@ -397,7 +397,7 @@ void fz_dropglyphcache(fz_glyphcache *);
struct fz_image_s
{
int refs;
- fz_error* (*loadtile)(fz_image*,fz_pixmap*);
+ fz_error (*loadtile)(fz_image*,fz_pixmap*);
void (*drop)(fz_image*);
fz_colorspace *cs;
int w, h, n, a;
@@ -431,5 +431,5 @@ fz_shade *fz_keepshade(fz_shade *shade);
void fz_dropshade(fz_shade *shade);
fz_rect fz_boundshade(fz_shade *shade, fz_matrix ctm);
-fz_error *fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_colorspace *dsts, fz_pixmap *dstp);
+fz_error fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_colorspace *dsts, fz_pixmap *dstp);
diff --git a/fitz/node_misc2.c b/fitz/node_misc2.c
index be442dd0..17ab63c3 100644
--- a/fitz/node_misc2.c
+++ b/fitz/node_misc2.c
@@ -5,7 +5,7 @@
* Over
*/
-fz_error *
+fz_error
fz_newovernode(fz_node **nodep)
{
fz_node *node;
@@ -47,7 +47,7 @@ fz_boundovernode(fz_overnode *node, fz_matrix ctm)
* Mask
*/
-fz_error *
+fz_error
fz_newmasknode(fz_node **nodep)
{
fz_node *node;
@@ -80,7 +80,7 @@ fz_boundmasknode(fz_masknode *node, fz_matrix ctm)
* Blend
*/
-fz_error *
+fz_error
fz_newblendnode(fz_node **nodep, fz_blendkind b, int k, int i)
{
fz_blendnode *node;
@@ -132,7 +132,7 @@ fz_dropblendnode(fz_blendnode *node)
* Transform
*/
-fz_error *
+fz_error
fz_newtransformnode(fz_node **nodep, fz_matrix m)
{
fz_transformnode *node;
@@ -160,7 +160,7 @@ fz_boundtransformnode(fz_transformnode *node, fz_matrix ctm)
* Link to tree
*/
-fz_error *
+fz_error
fz_newlinknode(fz_node **nodep, fz_tree *subtree)
{
fz_linknode *node;
@@ -192,7 +192,7 @@ fz_boundlinknode(fz_linknode *node, fz_matrix ctm)
* Solid color
*/
-fz_error *
+fz_error
fz_newsolidnode(fz_node **nodep, float a, fz_colorspace *cs, int n, float *v)
{
fz_solidnode *node;
@@ -229,7 +229,7 @@ fz_dropsolidnode(fz_solidnode *node)
* Image node
*/
-fz_error *
+fz_error
fz_newimagenode(fz_node **nodep, fz_image *image)
{
fz_imagenode *node;
@@ -266,7 +266,7 @@ fz_boundimagenode(fz_imagenode *node, fz_matrix ctm)
* Shade node
*/
-fz_error *
+fz_error
fz_newshadenode(fz_node **nodep, fz_shade *shade)
{
fz_shadenode *node;
diff --git a/fitz/node_optimize.c b/fitz/node_optimize.c
index 78a014f7..0d173efe 100644
--- a/fitz/node_optimize.c
+++ b/fitz/node_optimize.c
@@ -222,7 +222,7 @@ retry:
*
*/
-fz_error *
+fz_error
fz_optimizetree(fz_tree *tree)
{
if (getenv("DONTOPT"))
diff --git a/fitz/node_path.c b/fitz/node_path.c
index 3b288347..8cd54300 100644
--- a/fitz/node_path.c
+++ b/fitz/node_path.c
@@ -1,7 +1,7 @@
#include "fitz_base.h"
#include "fitz_tree.h"
-fz_error *
+fz_error
fz_newpathnode(fz_pathnode **pathp)
{
fz_pathnode *path;
@@ -25,7 +25,7 @@ fz_newpathnode(fz_pathnode **pathp)
return fz_okay;
}
-fz_error *
+fz_error
fz_clonepathnode(fz_pathnode **pathp, fz_pathnode *oldpath)
{
fz_pathnode *path;
@@ -62,7 +62,7 @@ fz_droppathnode(fz_pathnode *node)
fz_free(node->els);
}
-static fz_error *
+static fz_error
growpath(fz_pathnode *path, int n)
{
int newcap;
@@ -81,7 +81,7 @@ growpath(fz_pathnode *path, int n)
return fz_okay;
}
-fz_error *
+fz_error
fz_moveto(fz_pathnode *path, float x, float y)
{
if (growpath(path, 3) != nil)
@@ -92,7 +92,7 @@ fz_moveto(fz_pathnode *path, float x, float y)
return fz_okay;
}
-fz_error *
+fz_error
fz_lineto(fz_pathnode *path, float x, float y)
{
if (growpath(path, 3) != nil)
@@ -103,7 +103,7 @@ fz_lineto(fz_pathnode *path, float x, float y)
return fz_okay;
}
-fz_error *
+fz_error
fz_curveto(fz_pathnode *path,
float x1, float y1,
float x2, float y2,
@@ -121,7 +121,7 @@ fz_curveto(fz_pathnode *path,
return fz_okay;
}
-fz_error *
+fz_error
fz_curvetov(fz_pathnode *path, float x2, float y2, float x3, float y3)
{
float x1 = path->els[path->len-2].v;
@@ -129,13 +129,13 @@ fz_curvetov(fz_pathnode *path, float x2, float y2, float x3, float y3)
return fz_curveto(path, x1, y1, x2, y2, x3, y3);
}
-fz_error *
+fz_error
fz_curvetoy(fz_pathnode *path, float x1, float y1, float x3, float y3)
{
return fz_curveto(path, x1, y1, x3, y3, x3, y3);
}
-fz_error *
+fz_error
fz_closepath(fz_pathnode *path)
{
if (growpath(path, 1) != nil)
@@ -144,7 +144,7 @@ fz_closepath(fz_pathnode *path)
return fz_okay;
}
-fz_error *
+fz_error
fz_endpath(fz_pathnode *path, fz_pathkind paint, fz_stroke *stroke, fz_dash *dash)
{
if (path->len == 0)
@@ -321,7 +321,7 @@ fz_debugpathnode(fz_pathnode *path, int indent)
}
}
-fz_error *
+fz_error
fz_newdash(fz_dash **dashp, float phase, int len, float *array)
{
fz_dash *dash;
diff --git a/fitz/node_text.c b/fitz/node_text.c
index dc89c3eb..5abca20a 100644
--- a/fitz/node_text.c
+++ b/fitz/node_text.c
@@ -1,7 +1,7 @@
#include "fitz_base.h"
#include "fitz_tree.h"
-fz_error *
+fz_error
fz_newtextnode(fz_textnode **textp, fz_font *font)
{
fz_textnode *text;
@@ -22,7 +22,7 @@ fz_newtextnode(fz_textnode **textp, fz_font *font)
return fz_okay;
}
-fz_error *
+fz_error
fz_clonetextnode(fz_textnode **textp, fz_textnode *oldtext)
{
fz_textnode *text;
@@ -109,7 +109,7 @@ fz_boundtextnode(fz_textnode *text, fz_matrix ctm)
return bbox;
}
-static fz_error *
+static fz_error
growtext(fz_textnode *text, int n)
{
int newcap;
@@ -128,7 +128,7 @@ growtext(fz_textnode *text, int n)
return fz_okay;
}
-fz_error *
+fz_error
fz_addtext(fz_textnode *text, int gid, int ucs, float x, float y)
{
if (growtext(text, 1) != nil)
diff --git a/fitz/node_tree.c b/fitz/node_tree.c
index 1bdac451..9e75b8aa 100644
--- a/fitz/node_tree.c
+++ b/fitz/node_tree.c
@@ -1,7 +1,7 @@
#include "fitz_base.h"
#include "fitz_tree.h"
-fz_error *
+fz_error
fz_newtree(fz_tree **treep)
{
fz_tree *tree;
diff --git a/fitz/obj_array.c b/fitz/obj_array.c
index 72a533f3..ce0309eb 100644
--- a/fitz/obj_array.c
+++ b/fitz/obj_array.c
@@ -3,7 +3,7 @@
void fz_droparray(fz_obj *obj);
-fz_error *
+fz_error
fz_newarray(fz_obj **op, int initialcap)
{
fz_obj *obj;
@@ -32,10 +32,10 @@ fz_newarray(fz_obj **op, int initialcap)
return fz_okay;
}
-fz_error *
+fz_error
fz_copyarray(fz_obj **op, fz_obj *obj)
{
- fz_error *error;
+ fz_error error;
fz_obj *new;
int i;
@@ -61,10 +61,10 @@ fz_copyarray(fz_obj **op, fz_obj *obj)
return fz_okay;
}
-fz_error *
+fz_error
fz_deepcopyarray(fz_obj **op, fz_obj *obj)
{
- fz_error *error;
+ fz_error error;
fz_obj *new;
fz_obj *val;
int i;
@@ -155,7 +155,7 @@ fz_arrayget(fz_obj *obj, int i)
return obj->u.a.items[i];
}
-fz_error *
+fz_error
fz_arrayput(fz_obj *obj, int i, fz_obj *item)
{
if (!fz_isarray(obj))
@@ -172,7 +172,7 @@ fz_arrayput(fz_obj *obj, int i, fz_obj *item)
return fz_okay;
}
-static fz_error *
+static fz_error
growarray(fz_obj *obj)
{
fz_obj **newitems;
@@ -192,10 +192,10 @@ growarray(fz_obj *obj)
return fz_okay;
}
-fz_error *
+fz_error
fz_arraypush(fz_obj *obj, fz_obj *item)
{
- fz_error *error;
+ fz_error error;
if (!fz_isarray(obj))
return fz_throw("assert: not an array (%s)", fz_objkindstr(obj));
diff --git a/fitz/obj_dict.c b/fitz/obj_dict.c
index d8c6226e..6493baf3 100644
--- a/fitz/obj_dict.c
+++ b/fitz/obj_dict.c
@@ -23,7 +23,7 @@ static inline int keystrcmp(fz_obj *key, char *s)
return -1;
}
-fz_error *
+fz_error
fz_newdict(fz_obj **op, int initialcap)
{
fz_obj *obj;
@@ -56,10 +56,10 @@ fz_newdict(fz_obj **op, int initialcap)
return fz_okay;
}
-fz_error *
+fz_error
fz_copydict(fz_obj **op, fz_obj *obj)
{
- fz_error *error;
+ fz_error error;
fz_obj *new;
int i;
@@ -84,10 +84,10 @@ fz_copydict(fz_obj **op, fz_obj *obj)
return fz_okay;
}
-fz_error *
+fz_error
fz_deepcopydict(fz_obj **op, fz_obj *obj)
{
- fz_error *error;
+ fz_error error;
fz_obj *new;
fz_obj *val;
int i;
@@ -154,7 +154,7 @@ fz_deepcopydict(fz_obj **op, fz_obj *obj)
return fz_okay;
}
-static fz_error *
+static fz_error
growdict(fz_obj *obj)
{
fz_keyval *newitems;
@@ -275,10 +275,10 @@ fz_dictgetsa(fz_obj *obj, char *key, char *abbrev)
return fz_dictgets(obj, abbrev);
}
-fz_error *
+fz_error
fz_dictput(fz_obj *obj, fz_obj *key, fz_obj *val)
{
- fz_error *error;
+ fz_error error;
char *s;
int i;
@@ -319,10 +319,10 @@ fz_dictput(fz_obj *obj, fz_obj *key, fz_obj *val)
return fz_okay;
}
-fz_error *
+fz_error
fz_dictputs(fz_obj *obj, char *key, fz_obj *val)
{
- fz_error *error;
+ fz_error error;
fz_obj *keyobj;
error = fz_newname(&keyobj, key);
if (error)
@@ -334,7 +334,7 @@ fz_dictputs(fz_obj *obj, char *key, fz_obj *val)
return fz_okay;
}
-fz_error *
+fz_error
fz_dictdels(fz_obj *obj, char *key)
{
int i;
@@ -355,7 +355,7 @@ fz_dictdels(fz_obj *obj, char *key)
return fz_okay;
}
-fz_error *
+fz_error
fz_dictdel(fz_obj *obj, fz_obj *key)
{
if (fz_isname(key))
diff --git a/fitz/obj_parse.c b/fitz/obj_parse.c
index 4282ca3d..1a063223 100644
--- a/fitz/obj_parse.c
+++ b/fitz/obj_parse.c
@@ -30,7 +30,7 @@ static inline int isregular(int ch)
return !isdelim(ch) && !iswhite(ch) && ch != EOF;
}
-static fz_error *parseobj(fz_obj **obj, char **sp, struct vap *v);
+static fz_error parseobj(fz_obj **obj, char **sp, struct vap *v);
static inline int fromhex(char ch)
{
@@ -60,9 +60,9 @@ static void parsekeyword(char **sp, char *b, char *eb)
*sp = s;
}
-static fz_error *parsename(fz_obj **obj, char **sp)
+static fz_error parsename(fz_obj **obj, char **sp)
{
- fz_error *error;
+ fz_error error;
char buf[64];
char *s = *sp;
char *p = buf;
@@ -79,9 +79,9 @@ static fz_error *parsename(fz_obj **obj, char **sp)
return fz_okay;
}
-static fz_error *parsenumber(fz_obj **obj, char **sp)
+static fz_error parsenumber(fz_obj **obj, char **sp)
{
- fz_error *error;
+ fz_error error;
char buf[32];
char *s = *sp;
char *p = buf;
@@ -106,9 +106,9 @@ static fz_error *parsenumber(fz_obj **obj, char **sp)
return fz_okay;
}
-static fz_error *parsedict(fz_obj **obj, char **sp, struct vap *v)
+static fz_error parsedict(fz_obj **obj, char **sp, struct vap *v)
{
- fz_error *error = fz_okay;
+ fz_error error = fz_okay;
fz_obj *dict = nil;
fz_obj *key = nil;
fz_obj *val = nil;
@@ -184,9 +184,9 @@ cleanup:
return error; /* already rethrown */
}
-static fz_error *parsearray(fz_obj **obj, char **sp, struct vap *v)
+static fz_error parsearray(fz_obj **obj, char **sp, struct vap *v)
{
- fz_error *error;
+ fz_error error;
fz_obj *a;
fz_obj *o;
char *s = *sp;
@@ -230,9 +230,9 @@ static fz_error *parsearray(fz_obj **obj, char **sp, struct vap *v)
return fz_okay;
}
-static fz_error *parsestring(fz_obj **obj, char **sp)
+static fz_error parsestring(fz_obj **obj, char **sp)
{
- fz_error *error;
+ fz_error error;
char buf[512];
char *s = *sp;
char *p = buf;
@@ -297,9 +297,9 @@ static fz_error *parsestring(fz_obj **obj, char **sp)
return fz_okay;
}
-static fz_error *parsehexstring(fz_obj **obj, char **sp)
+static fz_error parsehexstring(fz_obj **obj, char **sp)
{
- fz_error *error;
+ fz_error error;
char buf[512];
char *s = *sp;
char *p = buf;
@@ -336,9 +336,9 @@ static fz_error *parsehexstring(fz_obj **obj, char **sp)
return fz_okay;
}
-static fz_error *parseobj(fz_obj **obj, char **sp, struct vap *v)
+static fz_error parseobj(fz_obj **obj, char **sp, struct vap *v)
{
- fz_error *error;
+ fz_error error;
char buf[32];
int oid, gid, len;
char *tmp;
@@ -465,10 +465,10 @@ static fz_error *parseobj(fz_obj **obj, char **sp, struct vap *v)
return error; /* already rethrown */
}
-fz_error *
+fz_error
fz_packobj(fz_obj **op, char *fmt, ...)
{
- fz_error *error;
+ fz_error error;
struct vap v;
va_list ap;
@@ -484,7 +484,7 @@ fz_packobj(fz_obj **op, char *fmt, ...)
return fz_okay;
}
-fz_error *
+fz_error
fz_parseobj(fz_obj **op, char *str)
{
return parseobj(op, &str, nil);
diff --git a/fitz/obj_simple.c b/fitz/obj_simple.c
index d21bcda8..2e664625 100644
--- a/fitz/obj_simple.c
+++ b/fitz/obj_simple.c
@@ -11,14 +11,14 @@ extern void fz_dropdict(fz_obj *dict);
o->refs = 1; \
o->kind = KIND;
-fz_error *
+fz_error
fz_newnull(fz_obj **op)
{
NEWOBJ(FZ_NULL, sizeof (fz_obj));
return fz_okay;
}
-fz_error *
+fz_error
fz_newbool(fz_obj **op, int b)
{
NEWOBJ(FZ_BOOL, sizeof (fz_obj));
@@ -26,7 +26,7 @@ fz_newbool(fz_obj **op, int b)
return fz_okay;
}
-fz_error *
+fz_error
fz_newint(fz_obj **op, int i)
{
NEWOBJ(FZ_INT, sizeof (fz_obj));
@@ -34,7 +34,7 @@ fz_newint(fz_obj **op, int i)
return fz_okay;
}
-fz_error *
+fz_error
fz_newreal(fz_obj **op, float f)
{
NEWOBJ(FZ_REAL, sizeof (fz_obj));
@@ -42,7 +42,7 @@ fz_newreal(fz_obj **op, float f)
return fz_okay;
}
-fz_error *
+fz_error
fz_newstring(fz_obj **op, char *str, int len)
{
NEWOBJ(FZ_STRING, offsetof(fz_obj, u.s.buf) + len + 1);
@@ -52,7 +52,7 @@ fz_newstring(fz_obj **op, char *str, int len)
return fz_okay;
}
-fz_error *
+fz_error
fz_newname(fz_obj **op, char *str)
{
NEWOBJ(FZ_NAME, offsetof(fz_obj, u.n) + strlen(str) + 1);
@@ -60,7 +60,7 @@ fz_newname(fz_obj **op, char *str)
return fz_okay;
}
-fz_error *
+fz_error
fz_newindirect(fz_obj **op, int objid, int genid)
{
NEWOBJ(FZ_INDIRECT, sizeof (fz_obj));
@@ -69,7 +69,7 @@ fz_newindirect(fz_obj **op, int objid, int genid)
return fz_okay;
}
-fz_error *
+fz_error
fz_newpointer(fz_obj **op, void *p)
{
NEWOBJ(FZ_POINTER, sizeof (fz_obj));
@@ -236,7 +236,7 @@ fz_topointer(fz_obj *obj)
return fz_okay;
}
-fz_error *
+fz_error
fz_newnamefromstring(fz_obj **op, fz_obj *str)
{
NEWOBJ(FZ_NAME, offsetof(fz_obj, u.n) + fz_tostrlen(str) + 1);
diff --git a/fitz/res_font.c b/fitz/res_font.c
index 946997ae..1261f2c4 100644
--- a/fitz/res_font.c
+++ b/fitz/res_font.c
@@ -105,7 +105,7 @@ char *ft_errorstring(int err)
return "Unknown error";
}
-static fz_error *
+static fz_error
fz_initfreetype(void)
{
int code;
@@ -125,10 +125,10 @@ fz_initfreetype(void)
return fz_okay;
}
-fz_error *
+fz_error
fz_newfontfromfile(fz_font **fontp, char *path, int index)
{
- fz_error *error;
+ fz_error error;
fz_font *font;
int code;
@@ -151,10 +151,10 @@ fz_newfontfromfile(fz_font **fontp, char *path, int index)
return fz_okay;
}
-fz_error *
+fz_error
fz_newfontfrombuffer(fz_font **fontp, unsigned char *data, int len, int index)
{
- fz_error *error;
+ fz_error error;
fz_font *font;
int code;
@@ -177,7 +177,7 @@ fz_newfontfrombuffer(fz_font **fontp, unsigned char *data, int len, int index)
return fz_okay;
}
-fz_error *
+fz_error
fz_renderftglyph(fz_glyph *glyph, fz_font *font, int gid, fz_matrix trm)
{
FT_Face face = font->ftface;
@@ -299,7 +299,7 @@ fz_renderftglyph(fz_glyph *glyph, fz_font *font, int gid, fz_matrix trm)
* Type 3 fonts...
*/
-fz_error *
+fz_error
fz_newtype3font(fz_font **fontp, char *name, fz_matrix matrix)
{
fz_font *font;
@@ -326,10 +326,10 @@ fz_newtype3font(fz_font **fontp, char *name, fz_matrix matrix)
return fz_okay;
}
-fz_error *
+fz_error
fz_rendert3glyph(fz_glyph *glyph, fz_font *font, int gid, fz_matrix trm)
{
- fz_error *error;
+ fz_error error;
fz_renderer *gc;
fz_tree *tree;
fz_matrix ctm;
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c
index 21764cde..128d6e8e 100644
--- a/fitz/stm_buffer.c
+++ b/fitz/stm_buffer.c
@@ -1,7 +1,7 @@
#include "fitz_base.h"
#include "fitz_stream.h"
-fz_error *
+fz_error
fz_newbuffer(fz_buffer **bp, int size)
{
fz_buffer *b;
@@ -27,7 +27,7 @@ fz_newbuffer(fz_buffer **bp, int size)
return fz_okay;
}
-fz_error *
+fz_error
fz_newbufferwithmemory(fz_buffer **bp, unsigned char *data, int size)
{
fz_buffer *b;
@@ -66,7 +66,7 @@ fz_dropbuffer(fz_buffer *buf)
}
}
-fz_error *
+fz_error
fz_growbuffer(fz_buffer *buf)
{
unsigned char *newbp;
@@ -90,7 +90,7 @@ fz_growbuffer(fz_buffer *buf)
return fz_okay;
}
-fz_error *
+fz_error
fz_rewindbuffer(fz_buffer *buf)
{
if (!buf->ownsdata)
diff --git a/fitz/stm_filter.c b/fitz/stm_filter.c
index edcdb200..159740e8 100644
--- a/fitz/stm_filter.c
+++ b/fitz/stm_filter.c
@@ -1,10 +1,10 @@
#include "fitz_base.h"
#include "fitz_stream.h"
-fz_error *
+fz_error
fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
- fz_error *reason;
+ fz_error reason;
unsigned char *oldrp;
unsigned char *oldwp;
diff --git a/fitz/stm_misc.c b/fitz/stm_misc.c
index 4a51aeb8..c051d112 100644
--- a/fitz/stm_misc.c
+++ b/fitz/stm_misc.c
@@ -9,10 +9,10 @@
* Read a line terminated by LF or CR or CRLF.
*/
-fz_error *
+fz_error
fz_readline(fz_stream *stm, char *mem, int n)
{
- fz_error *error;
+ fz_error error;
char *s = mem;
int c = EOF;
@@ -46,10 +46,10 @@ fz_readline(fz_stream *stm, char *mem, int n)
* a freshly allocated buffer.
*/
-fz_error *
+fz_error
fz_readall(fz_buffer **bufp, fz_stream *stm, int sizehint)
{
- fz_error *error;
+ fz_error error;
fz_buffer *buf;
int c;
diff --git a/fitz/stm_open.c b/fitz/stm_open.c
index c01ad725..c10809a0 100644
--- a/fitz/stm_open.c
+++ b/fitz/stm_open.c
@@ -64,9 +64,9 @@ fz_dropstream(fz_stream *stm)
}
}
-fz_error * fz_openrfile(fz_stream **stmp, char *path)
+fz_error fz_openrfile(fz_stream **stmp, char *path)
{
- fz_error *error;
+ fz_error error;
fz_stream *stm;
stm = newstm(FZ_SFILE);
@@ -92,9 +92,9 @@ fz_error * fz_openrfile(fz_stream **stmp, char *path)
return fz_okay;
}
-fz_error * fz_openrfilter(fz_stream **stmp, fz_filter *flt, fz_stream *src)
+fz_error fz_openrfilter(fz_stream **stmp, fz_filter *flt, fz_stream *src)
{
- fz_error *error;
+ fz_error error;
fz_stream *stm;
stm = newstm(FZ_SFILTER);
@@ -115,7 +115,7 @@ fz_error * fz_openrfilter(fz_stream **stmp, fz_filter *flt, fz_stream *src)
return fz_okay;
}
-fz_error * fz_openrbuffer(fz_stream **stmp, fz_buffer *buf)
+fz_error fz_openrbuffer(fz_stream **stmp, fz_buffer *buf)
{
fz_stream *stm;
@@ -131,9 +131,9 @@ fz_error * fz_openrbuffer(fz_stream **stmp, fz_buffer *buf)
return fz_okay;
}
-fz_error * fz_openrmemory(fz_stream **stmp, unsigned char *mem, int len)
+fz_error fz_openrmemory(fz_stream **stmp, unsigned char *mem, int len)
{
- fz_error *error;
+ fz_error error;
fz_buffer *buf;
error = fz_newbufferwithmemory(&buf, mem, len);
diff --git a/fitz/stm_read.c b/fitz/stm_read.c
index 1e3bd502..330d4ce7 100644
--- a/fitz/stm_read.c
+++ b/fitz/stm_read.c
@@ -5,12 +5,12 @@
#include "fitz_base.h"
#include "fitz_stream.h"
-fz_error *
+fz_error
fz_readimp(fz_stream *stm)
{
fz_buffer *buf = stm->buffer;
- fz_error *error;
- fz_error *reason;
+ fz_error error;
+ fz_error reason;
int produced;
int n;
@@ -151,10 +151,10 @@ fz_tell(fz_stream *stm)
}
}
-fz_error *
+fz_error
fz_seek(fz_stream *stm, int offset, int whence)
{
- fz_error *error;
+ fz_error error;
fz_buffer *buf = stm->buffer;
int t, c;
@@ -224,10 +224,10 @@ fz_seek(fz_stream *stm, int offset, int whence)
}
}
-fz_error *
+fz_error
fz_read(int *np, fz_stream *stm, unsigned char *mem, int n)
{
- fz_error *error;
+ fz_error error;
fz_buffer *buf = stm->buffer;
int i = 0;
@@ -254,10 +254,10 @@ fz_read(int *np, fz_stream *stm, unsigned char *mem, int n)
return fz_okay;
}
-fz_error *
+fz_error
fz_readerror(fz_stream *stm)
{
- fz_error *error;
+ fz_error error;
if (stm->error)
{
error = stm->error;
@@ -276,7 +276,7 @@ fz_readbytex(fz_stream *stm)
{
if (!buf->eof && !stm->error)
{
- fz_error *error = fz_readimp(stm);
+ fz_error error = fz_readimp(stm);
if (error)
stm->error = fz_rethrow(error, "cannot read data");
}
@@ -294,7 +294,7 @@ fz_peekbytex(fz_stream *stm)
{
if (!buf->eof && !stm->error)
{
- fz_error *error = fz_readimp(stm);
+ fz_error error = fz_readimp(stm);
if (error)
stm->error = fz_rethrow(error, "cannot read data");
}