diff options
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/fitz.h | 5 | ||||
-rw-r--r-- | fitz/stm_output.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index a2c67b6e..d45bd7e2 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -1906,6 +1906,11 @@ fz_output *fz_new_output_with_buffer(fz_context *, fz_buffer *); int fz_printf(fz_output *, const char *, ...); /* + fz_puts: fputs equivalent for output streams. +*/ +int fz_puts(fz_output *, const char *); + +/* fz_write: fwrite equivalent for output streams. */ int fz_write(fz_output *out, const void *data, int len); diff --git a/fitz/stm_output.c b/fitz/stm_output.c index 7b5fb05a..7c181a9c 100644 --- a/fitz/stm_output.c +++ b/fitz/stm_output.c @@ -62,6 +62,14 @@ fz_write(fz_output *out, const void *data, int len) return out->write(out, data, len); } +int +fz_puts(fz_output *out, const char *str) +{ + if (!out) + return 0; + return out->write(out, str, strlen(str)); +} + static int buffer_printf(fz_output *out, const char *fmt, va_list list) { |