From cfb66cd25bbf31857b471735e5ff0f7c2aea4d3c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 12 Mar 2017 11:19:09 -0500 Subject: Rename fz_putc/puts/printf to fz_write_*. Rename fz_write to fz_write_data. Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*. Be consistent in naming: fz_write_* calls write to fz_output. fz_append_* calls append to fz_buffer. Update documentation. --- platform/java/mupdf_native.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'platform/java') diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 4b6ca33a..311560fd 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -4864,22 +4864,22 @@ FUN(Page_textAsHtml)(JNIEnv *env, jobject self) buf = fz_new_buffer(ctx, 256); out = fz_new_output_with_buffer(ctx, buf); - fz_printf(ctx, out, "\n"); - fz_printf(ctx, out, "\n"); - fz_printf(ctx, out, "
"); + fz_write_printf(ctx, out, "\n"); + fz_write_printf(ctx, out, "\n"); + fz_write_printf(ctx, out, "
"); fz_print_stext_page_html(ctx, out, text); - fz_printf(ctx, out, "
\n"); - fz_printf(ctx, out, "\n\n"); + fz_write_printf(ctx, out, "\n\n"); } fz_always(ctx) { @@ -5244,7 +5244,7 @@ FUN(Buffer_writeByte)(JNIEnv *env, jobject self, jbyte b) if (!ctx || !buf) return; fz_try(ctx) - fz_write_buffer_byte(ctx, buf, b); + fz_append_byte(ctx, buf, b); fz_catch(ctx) jni_rethrow(env, ctx); } @@ -5265,7 +5265,7 @@ FUN(Buffer_writeBytes)(JNIEnv *env, jobject self, jobject jbs) if (!bs) { jni_throw_io(env, "cannot get bytes to write"); return; } fz_try(ctx) - fz_write_buffer(ctx, buf, bs, len); + fz_append_data(ctx, buf, bs, len); fz_always(ctx) (*env)->ReleaseByteArrayElements(env, jbs, bs, JNI_ABORT); fz_catch(ctx) @@ -5306,7 +5306,7 @@ FUN(Buffer_writeBytesFrom)(JNIEnv *env, jobject self, jobject jbs, jint joff, ji if (!bs) { jni_throw_io(env, "cannot get bytes to write"); return; } fz_try(ctx) - fz_write_buffer(ctx, buf, &bs[off], len); + fz_append_data(ctx, buf, &bs[off], len); fz_always(ctx) (*env)->ReleaseByteArrayElements(env, jbs, bs, JNI_ABORT); fz_catch(ctx) @@ -5358,8 +5358,8 @@ FUN(Buffer_writeLine)(JNIEnv *env, jobject self, jstring jline) fz_try(ctx) { - fz_write_buffer(ctx, buf, line, strlen(line)); - fz_write_buffer_byte(ctx, buf, '\n'); + fz_append_string(ctx, buf, line); + fz_append_byte(ctx, buf, '\n'); } fz_always(ctx) (*env)->ReleaseStringUTFChars(env, jline, line); @@ -5395,8 +5395,8 @@ FUN(Buffer_writeLines)(JNIEnv *env, jobject self, jobject jlines) fz_try(ctx) { - fz_write_buffer(ctx, buf, line, strlen(line)); - fz_write_buffer_byte(ctx, buf, '\n'); + fz_append_string(ctx, buf, line); + fz_append_byte(ctx, buf, '\n'); } fz_always(ctx) (*env)->ReleaseStringUTFChars(env, jline, line); -- cgit v1.2.3