diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fitz/base.h | 2 | ||||
-rw-r--r-- | include/fitz/filter.h | 5 | ||||
-rw-r--r-- | include/fitz/font.h | 1 | ||||
-rw-r--r-- | include/fitz/math.h | 14 | ||||
-rw-r--r-- | include/fitz/object.h | 2 | ||||
-rw-r--r-- | include/mupdf/syntax.h | 2 |
6 files changed, 17 insertions, 9 deletions
diff --git a/include/fitz/base.h b/include/fitz/base.h index 9ead6c88..e08b2f09 100644 --- a/include/fitz/base.h +++ b/include/fitz/base.h @@ -25,11 +25,11 @@ typedef struct fz_error_s fz_error; struct fz_error_s { + int nrefs; char msg[184]; char file[32]; char func[32]; int line; - int frozen; }; #define fz_outofmem (&fz_koutofmem) diff --git a/include/fitz/filter.h b/include/fitz/filter.h index 225cb172..7f45bd34 100644 --- a/include/fitz/filter.h +++ b/include/fitz/filter.h @@ -17,6 +17,7 @@ extern fz_error fz_kiodone; TYPE *VAR; \ *fp = fz_malloc(sizeof(TYPE)); \ if (!*fp) return fz_outofmem; \ + (*fp)->nrefs = 1; \ (*fp)->process = fz_process ## NAME ; \ (*fp)->drop = fz_drop ## NAME ; \ (*fp)->consumed = 0; \ @@ -26,6 +27,7 @@ extern fz_error fz_kiodone; struct fz_filter_s { + int nrefs; fz_error* (*process)(fz_filter *filter, fz_buffer *in, fz_buffer *out); void (*drop)(fz_filter *filter); int consumed; @@ -35,6 +37,7 @@ struct fz_filter_s struct fz_buffer_s { + int nrefs; int ownsdata; unsigned char *bp; unsigned char *rp; @@ -44,6 +47,7 @@ struct fz_buffer_s }; 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_newnullfilter(fz_filter **fp, int len); @@ -57,6 +61,7 @@ fz_error *fz_newbuffer(fz_buffer **bufp, int size); fz_error *fz_newbufferwithdata(fz_buffer **bufp, unsigned char *data, int size); 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); fz_error *fz_newa85d(fz_filter **filterp, fz_obj *param); diff --git a/include/fitz/font.h b/include/fitz/font.h index 9fd9218b..a3caec7f 100644 --- a/include/fitz/font.h +++ b/include/fitz/font.h @@ -61,5 +61,6 @@ fz_vmtx fz_getvmtx(fz_font *font, int cid); 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 *); diff --git a/include/fitz/math.h b/include/fitz/math.h index bfc1f8e6..30577691 100644 --- a/include/fitz/math.h +++ b/include/fitz/math.h @@ -7,16 +7,18 @@ static inline unsigned char fz_mul255(unsigned char a, unsigned char b) /* floor / ceil towards/from +/- inf */ static inline float fz_floor(float x) { - if (x > 0) - return floor(x); - return ceil(x); + return floor(x); +// if (x > 0) +// return floor(x); +// return ceil(x); } static inline float fz_ceil(float x) { - if (x > 0) - return ceil(x); - return floor(x); + return ceil(x); +// if (x > 0) +// return ceil(x); +// return floor(x); } /* divide and floor towards -inf */ diff --git a/include/fitz/object.h b/include/fitz/object.h index e275074b..d24b8a7a 100644 --- a/include/fitz/object.h +++ b/include/fitz/object.h @@ -24,8 +24,8 @@ struct fz_keyval_s struct fz_obj_s { + unsigned short nrefs; unsigned short kind; /* fz_objkind takes 4 bytes :( */ - unsigned short refcount; union { int b; diff --git a/include/mupdf/syntax.h b/include/mupdf/syntax.h index 0df89d65..ce9d9c80 100644 --- a/include/mupdf/syntax.h +++ b/include/mupdf/syntax.h @@ -50,7 +50,7 @@ struct pdf_crypt_s fz_error *pdf_newdecrypt(pdf_crypt **cp, fz_obj *enc, fz_obj *id); fz_error *pdf_newencrypt(pdf_crypt **cp, char *userpw, char *ownerpw, int p, int n, fz_obj *id); fz_error *pdf_setpassword(pdf_crypt *crypt, char *pw); -fz_error *pdf_cryptstm(fz_filter **fp, pdf_crypt *crypt, int oid, int gid); +fz_error *pdf_cryptstream(fz_filter **fp, pdf_crypt *crypt, int oid, int gid); void pdf_cryptobj(pdf_crypt *crypt, fz_obj *obj, int oid, int gid); void pdf_dropcrypt(pdf_crypt *crypt); |