diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-04 01:05:28 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-08 18:53:00 +0800 |
commit | dc2c77351a2b3188c971551b1231cf480dad9986 (patch) | |
tree | 5a952590baccc56b73cfc1828ad6d7fd0093d09d /source/fitz | |
parent | 5e81ff34ecbf364b091aedc0c4044d2aafde6531 (diff) | |
download | mupdf-dc2c77351a2b3188c971551b1231cf480dad9986.tar.xz |
Make fz_option_eq() available outside of pdf-writer.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/writer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/fitz/writer.c b/source/fitz/writer.c index c4e95e2a..d7fd60f9 100644 --- a/source/fitz/writer.c +++ b/source/fitz/writer.c @@ -41,6 +41,13 @@ fz_has_option(fz_context *ctx, const char *opts, const char *key, const char **v return 0; } +int +fz_option_eq(const char *a, const char *b) +{ + size_t n = strlen(b); + return !strncmp(a, b, n) && (a[n] == ',' || a[n] == 0); +} + fz_document_writer * fz_new_document_writer(fz_context *ctx, const char *path, const char *format, const char *options) { |