diff options
-rw-r--r-- | include/mupdf/fitz/buffer.h | 8 | ||||
-rw-r--r-- | source/fitz/buffer.c | 4 | ||||
-rw-r--r-- | source/pdf/pdf-appearance.c | 4 | ||||
-rw-r--r-- | source/pdf/pdf-lex.c | 2 | ||||
-rw-r--r-- | source/xps/xps-zip.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/include/mupdf/fitz/buffer.h b/include/mupdf/fitz/buffer.h index 0d0bb3b0..64096ca4 100644 --- a/include/mupdf/fitz/buffer.h +++ b/include/mupdf/fitz/buffer.h @@ -101,19 +101,19 @@ void fz_grow_buffer(fz_context *ctx, fz_buffer *buf); void fz_trim_buffer(fz_context *ctx, fz_buffer *buf); /* - fz_buffer_cat: Concatenate buffers + fz_append_buffer: Concatenate buffers buf: first to concatenate and the holder of the result extra: second to concatenate May throw exception on failure to allocate. */ -void fz_buffer_cat(fz_context *ctx, fz_buffer *buf, fz_buffer *extra); +void fz_append_buffer(fz_context *ctx, fz_buffer *buf, fz_buffer *extra); /* fz_write_buffer*: write to a buffer. fz_buffer_printf: print formatted to a buffer. - fz_buffer_cat_pdf_string: Print a string using PDF syntax and escapes. + fz_buffer_print_pdfstring: Print a string using PDF syntax and escapes. The buffer will grow as required. */ void fz_write_buffer(fz_context *ctx, fz_buffer *buf, const void *data, int len); @@ -123,6 +123,6 @@ void fz_write_buffer_bits(fz_context *ctx, fz_buffer *buf, int val, int bits); void fz_write_buffer_pad(fz_context *ctx, fz_buffer *buf); int fz_buffer_printf(fz_context *ctx, fz_buffer *buffer, const char *fmt, ...); int fz_buffer_vprintf(fz_context *ctx, fz_buffer *buffer, const char *fmt, va_list args); -void fz_buffer_cat_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text); +void fz_buffer_print_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text); #endif diff --git a/source/fitz/buffer.c b/source/fitz/buffer.c index df0163f5..26d0afea 100644 --- a/source/fitz/buffer.c +++ b/source/fitz/buffer.c @@ -107,7 +107,7 @@ fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap) } void -fz_buffer_cat(fz_context *ctx, fz_buffer *buf, fz_buffer *extra) +fz_append_buffer(fz_context *ctx, fz_buffer *buf, fz_buffer *extra) { if (buf->cap - buf->len < extra->len) { @@ -255,7 +255,7 @@ fz_buffer_vprintf(fz_context *ctx, fz_buffer *buffer, const char *fmt, va_list o } void -fz_buffer_cat_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text) +fz_buffer_print_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text) { int len = 2; const char *s = text; diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index 6132f97f..055c0f5f 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -319,7 +319,7 @@ static void fzbuf_print_text(fz_context *ctx, fz_buffer *fzbuf, const fz_rect *c if (tm) fz_buffer_printf(ctx, fzbuf, fmt_Tm, tm->a, tm->b, tm->c, tm->d, tm->e, tm->f); - fz_buffer_cat_pdf_string(ctx, fzbuf, text); + fz_buffer_print_pdf_string(ctx, fzbuf, text); fz_buffer_printf(ctx, fzbuf, fmt_Tj); fz_buffer_printf(ctx, fzbuf, fmt_ET); fz_buffer_printf(ctx, fzbuf, fmt_Q); @@ -703,7 +703,7 @@ static fz_buffer *create_text_appearance(fz_context *ctx, pdf_document *doc, con fzbuf_print_text_start1(ctx, fzbuf, &rect, info->col); fzbuf_print_text_start2(ctx, fzbuf, &info->font_rec, &tm); - fz_buffer_cat(ctx, fzbuf, fztmp); + fz_append_buffer(ctx, fzbuf, fztmp); fzbuf_print_text_end(ctx, fzbuf); } diff --git a/source/pdf/pdf-lex.c b/source/pdf/pdf-lex.c index 26a0f2e7..0a909a02 100644 --- a/source/pdf/pdf-lex.c +++ b/source/pdf/pdf-lex.c @@ -587,7 +587,7 @@ void pdf_print_token(fz_context *ctx, fz_buffer *fzbuf, int tok, pdf_lexbuf *buf if (buf->len >= buf->size) pdf_lexbuf_grow(ctx, buf); buf->scratch[buf->len] = 0; - fz_buffer_cat_pdf_string(ctx, fzbuf, buf->scratch); + fz_buffer_print_pdf_string(ctx, fzbuf, buf->scratch); break; case PDF_TOK_OPEN_DICT: fz_buffer_printf(ctx, fzbuf, "<<"); diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c index 0580378b..136e40c8 100644 --- a/source/xps/xps-zip.c +++ b/source/xps/xps-zip.c @@ -69,7 +69,7 @@ xps_read_part(fz_context *ctx, xps_document *doc, char *partname) if (fz_has_archive_entry(ctx, zip, path)) { tmp = fz_read_archive_entry(ctx, zip, path); - fz_buffer_cat(ctx, buf, tmp); + fz_append_buffer(ctx, buf, tmp); fz_drop_buffer(ctx, tmp); } else @@ -78,7 +78,7 @@ xps_read_part(fz_context *ctx, xps_document *doc, char *partname) if (fz_has_archive_entry(ctx, zip, path)) { tmp = fz_read_archive_entry(ctx, zip, path); - fz_buffer_cat(ctx, buf, tmp); + fz_append_buffer(ctx, buf, tmp); fz_drop_buffer(ctx, tmp); seen_last = 1; } |