diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-07-29 23:17:46 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-07-29 23:17:46 +0000 |
commit | d797d4707564bd9c0e1536d1d6355945aa1be740 (patch) | |
tree | b6aef992de0ce2aa306c4dd330512852c1a63ede /apps/pdfclean.c | |
parent | 0b954421d7908c8b835d96b4a945418c2ae08de7 (diff) | |
download | mupdf-d797d4707564bd9c0e1536d1d6355945aa1be740.tar.xz |
Use chained reader like interface for filters instead of process interface.
Diffstat (limited to 'apps/pdfclean.c')
-rw-r--r-- | apps/pdfclean.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c index 27c8693c..aca76e2a 100644 --- a/apps/pdfclean.c +++ b/apps/pdfclean.c @@ -380,7 +380,7 @@ static void copystream(fz_obj *obj, int num, int gen) fprintf(out, "%d %d obj\n", num, gen); fz_fprintobj(out, obj, !doexpand); fprintf(out, "stream\n"); - fwrite(buf->rp, 1, buf->wp - buf->rp, out); + fwrite(buf->data, 1, buf->len, out); fprintf(out, "endstream\nendobj\n\n"); fz_dropbuffer(buf); @@ -400,14 +400,14 @@ static void expandstream(fz_obj *obj, int num, int gen) fz_dictdels(newdict, "Filter"); fz_dictdels(newdict, "DecodeParms"); - newlen = fz_newint(buf->wp - buf->rp); + newlen = fz_newint(buf->len); fz_dictputs(newdict, "Length", newlen); fz_dropobj(newlen); fprintf(out, "%d %d obj\n", num, gen); fz_fprintobj(out, newdict, !doexpand); fprintf(out, "stream\n"); - fwrite(buf->rp, 1, buf->wp - buf->rp, out); + fwrite(buf->data, 1, buf->len, out); fprintf(out, "endstream\nendobj\n\n"); fz_dropobj(newdict); |