summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdf/mupdf-internal.h4
-rw-r--r--pdf/pdf_cmap_parse.c20
-rw-r--r--pdf/pdf_form.c4
-rw-r--r--pdf/pdf_function.c4
-rw-r--r--pdf/pdf_interpret.c2
-rw-r--r--pdf/pdf_parse.c8
-rw-r--r--pdf/pdf_repair.c6
-rw-r--r--pdf/pdf_xref.c6
8 files changed, 27 insertions, 27 deletions
diff --git a/pdf/mupdf-internal.h b/pdf/mupdf-internal.h
index 26f78202..fdf6a26d 100644
--- a/pdf/mupdf-internal.h
+++ b/pdf/mupdf-internal.h
@@ -31,7 +31,7 @@ struct pdf_image_s
* tokenizer and low-level object parser
*/
-enum
+typedef enum
{
PDF_TOK_ERROR, PDF_TOK_EOF,
PDF_TOK_OPEN_ARRAY, PDF_TOK_CLOSE_ARRAY,
@@ -43,7 +43,7 @@ enum
PDF_TOK_STREAM, PDF_TOK_ENDSTREAM,
PDF_TOK_XREF, PDF_TOK_TRAILER, PDF_TOK_STARTXREF,
PDF_NUM_TOKENS
-};
+} pdf_token;
enum
{
diff --git a/pdf/pdf_cmap_parse.c b/pdf/pdf_cmap_parse.c
index cedbf2be..db9f7f2f 100644
--- a/pdf/pdf_cmap_parse.c
+++ b/pdf/pdf_cmap_parse.c
@@ -51,7 +51,7 @@ pdf_code_from_string(char *buf, int len)
static int
pdf_lex_cmap(fz_stream *file, pdf_lexbuf *buf)
{
- int tok = pdf_lex(file, buf);
+ pdf_token tok = pdf_lex(file, buf);
if (tok == PDF_TOK_KEYWORD)
tok = pdf_cmap_token_from_keyword(buf->scratch);
@@ -62,7 +62,7 @@ pdf_lex_cmap(fz_stream *file, pdf_lexbuf *buf)
static void
pdf_parse_cmap_name(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
tok = pdf_lex_cmap(file, buf);
@@ -75,7 +75,7 @@ pdf_parse_cmap_name(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf
static void
pdf_parse_wmode(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
tok = pdf_lex_cmap(file, buf);
@@ -88,7 +88,7 @@ pdf_parse_wmode(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *bu
static void
pdf_parse_codespace_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
int lo, hi;
while (1)
@@ -119,7 +119,7 @@ pdf_parse_codespace_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_
static void
pdf_parse_cid_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
int lo, hi, dst;
while (1)
@@ -153,7 +153,7 @@ pdf_parse_cid_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf
static void
pdf_parse_cid_char(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
int src, dst;
while (1)
@@ -181,7 +181,7 @@ pdf_parse_cid_char(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf
static void
pdf_parse_bf_range_array(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf, int lo, int hi)
{
- int tok;
+ pdf_token tok;
int dst[256];
int i;
@@ -212,7 +212,7 @@ pdf_parse_bf_range_array(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_l
static void
pdf_parse_bf_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
int lo, hi, dst;
while (1)
@@ -283,7 +283,7 @@ pdf_parse_bf_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf
static void
pdf_parse_bf_char(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
int dst[256];
int src;
int i;
@@ -321,7 +321,7 @@ pdf_load_cmap(fz_context *ctx, fz_stream *file)
pdf_cmap *cmap;
char key[64];
pdf_lexbuf buf;
- int tok;
+ pdf_token tok;
const char *where;
pdf_lexbuf_init(ctx, &buf, PDF_LEXBUF_SMALL);
diff --git a/pdf/pdf_form.c b/pdf/pdf_form.c
index 249b4dfc..a1b2118b 100644
--- a/pdf/pdf_form.c
+++ b/pdf/pdf_form.c
@@ -298,7 +298,7 @@ static void parse_da(fz_context *ctx, char *da, da_info *di)
{
float stack[32];
int top = 0;
- int tok;
+ pdf_token tok;
char *name = NULL;
pdf_lexbuf lbuf;
fz_stream *str = fz_open_memory(ctx, (unsigned char *)da, strlen(da));
@@ -943,7 +943,7 @@ static fz_buffer *create_text_appearance(pdf_document *doc, fz_rect *bbox, fz_ma
static void update_marked_content(pdf_document *doc, pdf_xobject *form, fz_buffer *fzbuf)
{
fz_context *ctx = doc->ctx;
- int tok;
+ pdf_token tok;
pdf_lexbuf lbuf;
fz_stream *str_outer = NULL;
fz_stream *str_inner = NULL;
diff --git a/pdf/pdf_function.c b/pdf/pdf_function.c
index c0b67ef3..3e11519f 100644
--- a/pdf/pdf_function.c
+++ b/pdf/pdf_function.c
@@ -703,7 +703,7 @@ resize_code(fz_context *ctx, pdf_function *func, int newsize)
static void
parse_code(pdf_function *func, fz_stream *stream, int *codeptr, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
int opptr, elseptr, ifptr;
int a, b, mid, cmp;
fz_context *ctx = stream->ctx;
@@ -844,7 +844,7 @@ load_postscript_func(pdf_function *func, pdf_document *xref, pdf_obj *dict, int
fz_stream *stream = NULL;
int codeptr;
pdf_lexbuf buf;
- int tok;
+ pdf_token tok;
fz_context *ctx = xref->ctx;
int locked = 0;
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c
index 860ad62d..dc1044b4 100644
--- a/pdf/pdf_interpret.c
+++ b/pdf/pdf_interpret.c
@@ -2607,7 +2607,7 @@ static void
pdf_run_stream(pdf_csi *csi, pdf_obj *rdb, fz_stream *file, pdf_lexbuf *buf)
{
fz_context *ctx = csi->dev->ctx;
- int tok = PDF_TOK_ERROR;
+ pdf_token tok = PDF_TOK_ERROR;
int in_array;
int ignoring_errors = 0;
diff --git a/pdf/pdf_parse.c b/pdf/pdf_parse.c
index ed7889ed..58165894 100644
--- a/pdf/pdf_parse.c
+++ b/pdf/pdf_parse.c
@@ -207,7 +207,7 @@ pdf_parse_array(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf)
pdf_obj *ary = NULL;
pdf_obj *obj = NULL;
int a = 0, b = 0, n = 0;
- int tok;
+ pdf_token tok;
fz_context *ctx = file->ctx;
pdf_obj *op;
@@ -347,7 +347,7 @@ pdf_parse_dict(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf)
pdf_obj *dict;
pdf_obj *key = NULL;
pdf_obj *val = NULL;
- int tok;
+ pdf_token tok;
int a, b;
fz_context *ctx = file->ctx;
@@ -444,7 +444,7 @@ pdf_parse_dict(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf)
pdf_obj *
pdf_parse_stm_obj(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf)
{
- int tok;
+ pdf_token tok;
fz_context *ctx = file->ctx;
tok = pdf_lex(file, buf);
@@ -474,7 +474,7 @@ pdf_parse_ind_obj(pdf_document *xref,
{
pdf_obj *obj = NULL;
int num = 0, gen = 0, stm_ofs;
- int tok;
+ pdf_token tok;
int a, b;
fz_context *ctx = file->ctx;
diff --git a/pdf/pdf_repair.c b/pdf/pdf_repair.c
index 44d69b99..be3779d2 100644
--- a/pdf/pdf_repair.c
+++ b/pdf/pdf_repair.c
@@ -18,7 +18,7 @@ struct entry
static void
pdf_repair_obj(fz_stream *file, pdf_lexbuf *buf, int *stmofsp, int *stmlenp, pdf_obj **encrypt, pdf_obj **id)
{
- int tok;
+ pdf_token tok;
int stm_len;
int n;
fz_context *ctx = file->ctx;
@@ -143,7 +143,7 @@ pdf_repair_obj_stm(pdf_document *xref, int num, int gen)
{
pdf_obj *obj;
fz_stream *stm = NULL;
- int tok;
+ pdf_token tok;
int i, n, count;
fz_context *ctx = xref->ctx;
pdf_lexbuf buf;
@@ -226,7 +226,7 @@ pdf_repair_xref(pdf_document *xref, pdf_lexbuf *buf)
int gen = 0;
int tmpofs, numofs = 0, genofs = 0;
int stm_len, stm_ofs = 0;
- int tok;
+ pdf_token tok;
int next;
int i, n, c;
fz_context *ctx = xref->ctx;
diff --git a/pdf/pdf_xref.c b/pdf/pdf_xref.c
index 0f47cdaa..6b5570f9 100644
--- a/pdf/pdf_xref.c
+++ b/pdf/pdf_xref.c
@@ -69,7 +69,7 @@ pdf_read_old_trailer(pdf_document *xref, pdf_lexbuf *buf)
int len;
char *s;
int t;
- int tok;
+ pdf_token tok;
int c;
fz_read_line(xref->file, buf->scratch, buf->size);
@@ -193,7 +193,7 @@ pdf_read_old_xref(pdf_document *xref, pdf_lexbuf *buf)
int ofs, len;
char *s;
int n;
- int tok;
+ pdf_token tok;
int i;
int c;
pdf_obj *trailer;
@@ -942,7 +942,7 @@ pdf_load_obj_stm(pdf_document *xref, int num, int gen, pdf_lexbuf *buf)
int first;
int count;
int i;
- int tok;
+ pdf_token tok;
fz_context *ctx = xref->ctx;
fz_var(numbuf);