diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-05-30 10:15:42 -0400 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-30 10:16:30 -0400 |
commit | 0fed8c5da797f25c6794a56de7706c2bb9e94700 (patch) | |
tree | 950dd5679dc489d9b6bf91d571734c6ed49b5039 /fitz | |
parent | a620073f23dca7b4e2222c9585184ebb70fd18c5 (diff) | |
download | mupdf-0fed8c5da797f25c6794a56de7706c2bb9e94700.tar.xz |
Add fz_puts to the fz_output bestiary.
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) { |