diff options
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/mupdf.h | 2 | ||||
-rw-r--r-- | pdf/pdf_object.c | 4 | ||||
-rw-r--r-- | pdf/pdf_parse.c | 12 | ||||
-rw-r--r-- | pdf/pdf_write.c | 4 | ||||
-rw-r--r-- | pdf/pdf_xobject.c | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/pdf/mupdf.h b/pdf/mupdf.h index 59302951..6ebe4437 100644 --- a/pdf/mupdf.h +++ b/pdf/mupdf.h @@ -17,7 +17,7 @@ pdf_obj *pdf_new_null(fz_context *ctx); pdf_obj *pdf_new_bool(fz_context *ctx, int b); pdf_obj *pdf_new_int(fz_context *ctx, int i); pdf_obj *pdf_new_real(fz_context *ctx, float f); -pdf_obj *fz_new_name(fz_context *ctx, char *str); +pdf_obj *pdf_new_name(fz_context *ctx, char *str); pdf_obj *pdf_new_string(fz_context *ctx, char *str, int len); pdf_obj *pdf_new_indirect(fz_context *ctx, int num, int gen, void *doc); pdf_obj *pdf_new_array(fz_context *ctx, int initialcap); diff --git a/pdf/pdf_object.c b/pdf/pdf_object.c index 35291fc9..9c6e0e9a 100644 --- a/pdf/pdf_object.c +++ b/pdf/pdf_object.c @@ -117,7 +117,7 @@ pdf_new_string(fz_context *ctx, char *str, int len) } pdf_obj * -fz_new_name(fz_context *ctx, char *str) +pdf_new_name(fz_context *ctx, char *str) { pdf_obj *obj; obj = Memento_label(fz_malloc(ctx, offsetof(pdf_obj, u.n) + strlen(str) + 1), "pdf_obj(name)"); @@ -945,7 +945,7 @@ pdf_dict_put(pdf_obj *obj, pdf_obj *key, pdf_obj *val) void pdf_dict_puts(pdf_obj *obj, char *key, pdf_obj *val) { - pdf_obj *keyobj = fz_new_name(obj->ctx, key); + pdf_obj *keyobj = pdf_new_name(obj->ctx, key); pdf_dict_put(obj, keyobj, val); pdf_drop_obj(keyobj); } diff --git a/pdf/pdf_parse.c b/pdf/pdf_parse.c index dd710891..542b1af7 100644 --- a/pdf/pdf_parse.c +++ b/pdf/pdf_parse.c @@ -165,7 +165,7 @@ pdf_obj * pdf_to_utf8_name(fz_context *ctx, pdf_obj *src) { char *buf = pdf_to_utf8(ctx, src); - pdf_obj *dst = fz_new_name(ctx, buf); + pdf_obj *dst = pdf_new_name(ctx, buf); fz_free(ctx, buf); return dst; } @@ -258,7 +258,7 @@ pdf_parse_array(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) break; case PDF_TOK_NAME: - obj = fz_new_name(ctx, buf->scratch); + obj = pdf_new_name(ctx, buf->scratch); pdf_array_push(ary, obj); pdf_drop_obj(obj); obj = NULL; @@ -341,7 +341,7 @@ pdf_parse_dict(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) if (tok != PDF_TOK_NAME) fz_throw(ctx, "invalid key in dict"); - key = fz_new_name(ctx, buf->scratch); + key = pdf_new_name(ctx, buf->scratch); tok = pdf_lex(file, buf); @@ -355,7 +355,7 @@ pdf_parse_dict(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) val = pdf_parse_dict(xref, file, buf); break; - case PDF_TOK_NAME: val = fz_new_name(ctx, buf->scratch); break; + case PDF_TOK_NAME: val = pdf_new_name(ctx, buf->scratch); break; case PDF_TOK_REAL: val = pdf_new_real(ctx, buf->f); break; case PDF_TOK_STRING: val = pdf_new_string(ctx, buf->scratch, buf->len); break; case PDF_TOK_TRUE: val = pdf_new_bool(ctx, 1); break; @@ -424,7 +424,7 @@ pdf_parse_stm_obj(pdf_document *xref, fz_stream *file, pdf_lexbuf *buf) return pdf_parse_array(xref, file, buf); case PDF_TOK_OPEN_DICT: return pdf_parse_dict(xref, file, buf); - case PDF_TOK_NAME: return fz_new_name(ctx, buf->scratch); break; + case PDF_TOK_NAME: return pdf_new_name(ctx, buf->scratch); break; case PDF_TOK_REAL: return pdf_new_real(ctx, buf->f); break; case PDF_TOK_STRING: return pdf_new_string(ctx, buf->scratch, buf->len); break; case PDF_TOK_TRUE: return pdf_new_bool(ctx, 1); break; @@ -475,7 +475,7 @@ pdf_parse_ind_obj(pdf_document *xref, obj = pdf_parse_dict(xref, file, buf); break; - case PDF_TOK_NAME: obj = fz_new_name(ctx, buf->scratch); break; + case PDF_TOK_NAME: obj = pdf_new_name(ctx, buf->scratch); break; case PDF_TOK_REAL: obj = pdf_new_real(ctx, buf->f); break; case PDF_TOK_STRING: obj = pdf_new_string(ctx, buf->scratch, buf->len); break; case PDF_TOK_TRUE: obj = pdf_new_bool(ctx, 1); break; diff --git a/pdf/pdf_write.c b/pdf/pdf_write.c index 6a07894a..c2ca3541 100644 --- a/pdf/pdf_write.c +++ b/pdf/pdf_write.c @@ -1054,7 +1054,7 @@ add_linearization_objs(pdf_document *xref, pdf_write_options *opts) /* FIXME: Do we have document information? Do an I entry */ /* FIXME: Do we have logical structure heirarchy? Do a C entry */ /* FIXME: Do L, Page Label hint table */ - o = fz_new_name(ctx, "FlateDecode"); + o = pdf_new_name(ctx, "FlateDecode"); pdf_dict_puts(hint_obj, "Filter", o); pdf_drop_obj(o); o = NULL; @@ -1426,7 +1426,7 @@ static void addhexfilter(pdf_document *xref, pdf_obj *dict) pdf_obj *ahx, *nullobj; fz_context *ctx = xref->ctx; - ahx = fz_new_name(ctx, "ASCIIHexDecode"); + ahx = pdf_new_name(ctx, "ASCIIHexDecode"); nullobj = pdf_new_null(ctx); newf = newdp = NULL; diff --git a/pdf/pdf_xobject.c b/pdf/pdf_xobject.c index c5fc2a83..f9a5793f 100644 --- a/pdf/pdf_xobject.c +++ b/pdf/pdf_xobject.c @@ -153,11 +153,11 @@ pdf_new_xobject(pdf_document *xref, fz_rect *bbox, fz_matrix *mat) res = pdf_new_dict(ctx, 0); procset = pdf_new_array(ctx, 2); - obj = fz_new_name(ctx, "PDF"); + obj = pdf_new_name(ctx, "PDF"); pdf_array_push(procset, obj); pdf_drop_obj(obj); obj = NULL; - obj = fz_new_name(ctx, "Text"); + obj = pdf_new_name(ctx, "Text"); pdf_array_push(procset, obj); pdf_drop_obj(obj); obj = NULL; @@ -166,12 +166,12 @@ pdf_new_xobject(pdf_document *xref, fz_rect *bbox, fz_matrix *mat) procset = NULL; pdf_dict_puts(dict, "Resources", res); - obj = fz_new_name(ctx, "Form"); + obj = pdf_new_name(ctx, "Form"); pdf_dict_puts(dict, "Subtype", obj); pdf_drop_obj(obj); obj = NULL; - obj = fz_new_name(ctx, "XObject"); + obj = pdf_new_name(ctx, "XObject"); pdf_dict_puts(dict, "Type", obj); pdf_drop_obj(obj); obj = NULL; |