diff options
-rw-r--r-- | hexdump.c | 4 | ||||
-rw-r--r-- | include/fitz/stm_stream.h | 2 | ||||
-rw-r--r-- | include/mupdf/syntax.h | 2 | ||||
-rw-r--r-- | mupdf/pdf_cmap.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_interpret.c | 4 | ||||
-rw-r--r-- | mupdf/pdf_lex.c | 22 | ||||
-rw-r--r-- | mupdf/pdf_open.c | 6 | ||||
-rw-r--r-- | mupdf/pdf_parse.c | 4 | ||||
-rw-r--r-- | mupdf/pdf_repair.c | 2 | ||||
-rw-r--r-- | stream/stm_open.c | 2 | ||||
-rw-r--r-- | stream/stm_write.c | 10 |
11 files changed, 30 insertions, 30 deletions
@@ -27,8 +27,8 @@ main(int argc, char **argv) { FILE *fo; FILE *fi; - unsigned char name[256]; - unsigned char *p; + char name[256]; + char *p; int i, len; if (argc < 3) diff --git a/include/fitz/stm_stream.h b/include/fitz/stm_stream.h index 4f7463bb..5f11c1d2 100644 --- a/include/fitz/stm_stream.h +++ b/include/fitz/stm_stream.h @@ -31,7 +31,7 @@ fz_error *fz_openwfile(fz_stream **stmp, char *filename); fz_error *fz_openafile(fz_stream **stmp, char *filename); /* write to memory buffers! */ -fz_error *fz_openrmemory(fz_stream **stmp, char *mem, int len); +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_openwbuffer(fz_stream **stmp, fz_buffer *buf); diff --git a/include/mupdf/syntax.h b/include/mupdf/syntax.h index c790bda6..236ba5ec 100644 --- a/include/mupdf/syntax.h +++ b/include/mupdf/syntax.h @@ -17,7 +17,7 @@ typedef enum pdf_token_e } pdf_token_e; /* lex.c */ -fz_error *pdf_lex(pdf_token_e *tok, fz_stream *f, unsigned char *buf, int n, int *len); +fz_error *pdf_lex(pdf_token_e *tok, fz_stream *f, char *buf, int n, int *len); /* parse.c */ fz_error *pdf_parsearray(fz_obj **op, fz_stream *f, char *buf, int cap); diff --git a/mupdf/pdf_cmap.c b/mupdf/pdf_cmap.c index 1c470051..fcef601f 100644 --- a/mupdf/pdf_cmap.c +++ b/mupdf/pdf_cmap.c @@ -590,7 +590,7 @@ static pdf_token_e tokenfromkeyword(char *key) return PDF_TKEYWORD; } -static int codefromstring(unsigned char *buf, int len) +static int codefromstring(char *buf, int len) { int a = 0; while (len--) diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c index 2db409ee..63ecc4db 100644 --- a/mupdf/pdf_interpret.c +++ b/mupdf/pdf_interpret.c @@ -239,7 +239,7 @@ runinlineimage(pdf_csi *csi, pdf_xref *xref, fz_obj *rdb, fz_stream *file, fz_ob if (error) return fz_rethrow(error, "cannot load inline image"); - error = pdf_lex(&tok, file, (unsigned char *)buf, sizeof buf, &len); + error = pdf_lex(&tok, file, buf, sizeof buf, &len); if (error) { fz_dropimage((fz_image*)img); @@ -1251,7 +1251,7 @@ pdf_runcsi(pdf_csi *csi, pdf_xref *xref, fz_obj *rdb, fz_stream *file) if (csi->top == 31) return fz_throw("stack overflow"); - error = pdf_lex(&tok, file, (unsigned char *)buf, sizeof buf, &len); + error = pdf_lex(&tok, file, buf, sizeof buf, &len); if (error) return fz_rethrow(error, "lexical error in content stream"); diff --git a/mupdf/pdf_lex.c b/mupdf/pdf_lex.c index 7f486609..aabe3fbb 100644 --- a/mupdf/pdf_lex.c +++ b/mupdf/pdf_lex.c @@ -84,7 +84,7 @@ lexcomment(fz_stream *f) } static void -lexnumber(fz_stream *f, unsigned char *s, int n) +lexnumber(fz_stream *f, char *s, int n) { while (n > 1) { @@ -97,10 +97,10 @@ lexnumber(fz_stream *f, unsigned char *s, int n) } static void -lexname(fz_stream *f, unsigned char *s, int n) +lexname(fz_stream *f, char *s, int n) { - unsigned char *p = s; - unsigned char *q = s; + char *p = s; + char *q = s; while (n > 1) { @@ -125,10 +125,10 @@ lexname(fz_stream *f, unsigned char *s, int n) } static int -lexstring(fz_stream *f, unsigned char *buf, int n) +lexstring(fz_stream *f, char *buf, int n) { - unsigned char *s = buf; - unsigned char *e = buf + n; + char *s = buf; + char *e = buf + n; int bal = 1; int oct; int c; @@ -198,10 +198,10 @@ lexstring(fz_stream *f, unsigned char *buf, int n) } static int -lexhexstring(fz_stream *f, unsigned char *buf, int n) +lexhexstring(fz_stream *f, char *buf, int n) { - unsigned char *s = buf; - unsigned char *e = buf + n; + char *s = buf; + char *e = buf + n; int a = 0, x = 0; int c; @@ -253,7 +253,7 @@ tokenfromkeyword(char *key) } fz_error * -pdf_lex(pdf_token_e *tok, fz_stream *f, unsigned char *buf, int n, int *sl) +pdf_lex(pdf_token_e *tok, fz_stream *f, char *buf, int n, int *sl) { fz_error *error; int c; diff --git a/mupdf/pdf_open.c b/mupdf/pdf_open.c index aeb1b308..1ebe49ec 100644 --- a/mupdf/pdf_open.c +++ b/mupdf/pdf_open.c @@ -39,7 +39,7 @@ static fz_error * readstartxref(pdf_xref *xref) { fz_error *error; - char buf[1024]; + unsigned char buf[1024]; int t, n; int i; @@ -63,7 +63,7 @@ readstartxref(pdf_xref *xref) i += 9; while (iswhite(buf[i]) && i < n) i ++; - xref->startxref = atoi(buf + i); + xref->startxref = atoi((char*)(buf + i)); return fz_okay; } } @@ -269,7 +269,7 @@ readoldxref(fz_obj **trailerp, pdf_xref *xref, char *buf, int cap) for (i = 0; i < len; i++) { - error = fz_read(&n, xref->file, buf, 20); + error = fz_read(&n, xref->file, (unsigned char *) buf, 20); if (error) return fz_rethrow(error, "cannot read xref table"); if (!xref->table[ofs + i].type) diff --git a/mupdf/pdf_parse.c b/mupdf/pdf_parse.c index a74e7def..11bd24d6 100644 --- a/mupdf/pdf_parse.c +++ b/mupdf/pdf_parse.c @@ -30,7 +30,7 @@ fz_matrix pdf_tomatrix(fz_obj *array) fz_error * pdf_toutf8(char **dstp, fz_obj *src) { - unsigned char *srcptr = fz_tostrbuf(src); + unsigned char *srcptr = (unsigned char *) fz_tostrbuf(src); char *dstptr; int srclen = fz_tostrlen(src); int dstlen = 0; @@ -79,7 +79,7 @@ pdf_toutf8(char **dstp, fz_obj *src) fz_error * pdf_toucs2(unsigned short **dstp, fz_obj *src) { - unsigned char *srcptr = fz_tostrbuf(src); + unsigned char *srcptr = (unsigned char *) fz_tostrbuf(src); unsigned short *dstptr; int srclen = fz_tostrlen(src); int i; diff --git a/mupdf/pdf_repair.c b/mupdf/pdf_repair.c index c13fb7a8..c8878cfc 100644 --- a/mupdf/pdf_repair.c +++ b/mupdf/pdf_repair.c @@ -101,7 +101,7 @@ parseobj(fz_stream *file, char *buf, int cap, int *stmofs, int *stmlen, return fz_rethrow(error, "cannot seek in file"); } - error = fz_read(&n, file, buf, 9); + error = fz_read(&n, file, (unsigned char *) buf, 9); if (error) return fz_rethrow(error, "cannot read from file"); diff --git a/stream/stm_open.c b/stream/stm_open.c index 633403bd..14e52642 100644 --- a/stream/stm_open.c +++ b/stream/stm_open.c @@ -219,7 +219,7 @@ fz_error * fz_openwbuffer(fz_stream **stmp, fz_buffer *buf) return fz_okay; } -fz_error * fz_openrmemory(fz_stream **stmp, char *mem, int len) +fz_error * fz_openrmemory(fz_stream **stmp, unsigned char *mem, int len) { fz_error *error; fz_buffer *buf; diff --git a/stream/stm_write.c b/stream/stm_write.c index 9f136292..2d687313 100644 --- a/stream/stm_write.c +++ b/stream/stm_write.c @@ -239,7 +239,7 @@ fz_write(fz_stream *stm, unsigned char *mem, int n) fz_error * fz_printstr(fz_stream *stm, char *s) { - return fz_write(stm, s, strlen(s)); + return fz_write(stm, (unsigned char *) s, strlen(s)); } fz_error * @@ -254,7 +254,7 @@ fz_printobj(fz_stream *file, fz_obj *obj, int tight) if (n < sizeof buf) { fz_sprintobj(buf, sizeof buf, obj, tight); - error = fz_write(file, buf, n); + error = fz_write(file, (unsigned char *) buf, n); if (error) return fz_rethrow(error, "cannot write buffer"); return fz_okay; @@ -265,7 +265,7 @@ fz_printobj(fz_stream *file, fz_obj *obj, int tight) if (!ptr) return fz_throw("outofmem: scratch buffer"); fz_sprintobj(ptr, n, obj, tight); - error = fz_write(file, ptr, n); + error = fz_write(file, (unsigned char *) ptr, n); fz_free(ptr); if (error) return fz_rethrow(error, "cannot write buffer"); @@ -288,7 +288,7 @@ fz_print(fz_stream *stm, char *fmt, ...) if (n < sizeof buf) { - error = fz_write(stm, buf, n); + error = fz_write(stm, (unsigned char *) buf, n); if (error) return fz_rethrow(error, "cannot write buffer"); return fz_okay; @@ -302,7 +302,7 @@ fz_print(fz_stream *stm, char *fmt, ...) vsnprintf(p, n, fmt, ap); va_end(ap); - error = fz_write(stm, p, n); + error = fz_write(stm, (unsigned char *) p, n); fz_free(p); |