summaryrefslogtreecommitdiff
path: root/fitz/fitz_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/fitz_stream.h')
-rw-r--r--fitz/fitz_stream.h138
1 files changed, 69 insertions, 69 deletions
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);