summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-01-20 16:42:29 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-02-17 16:36:10 +0100
commit681039767f2ccc72e236246178893eb0989169c9 (patch)
tree2eccad54c5b5bc964335dc97fe5b0fec8449d16e /source/tools
parent76a09166ddbe5b741f54f0fd203f2135e5b532c3 (diff)
downloadmupdf-681039767f2ccc72e236246178893eb0989169c9.tar.xz
Rename fz_close_* and fz_free_* to fz_drop_*.
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/mjsgen.c2
-rw-r--r--source/tools/mudraw.c40
-rw-r--r--source/tools/pdfclean.c2
-rw-r--r--source/tools/pdfextract.c2
-rw-r--r--source/tools/pdfinfo.c4
-rw-r--r--source/tools/pdfposter.c2
-rw-r--r--source/tools/pdfshow.c4
7 files changed, 28 insertions, 28 deletions
diff --git a/source/tools/mjsgen.c b/source/tools/mjsgen.c
index 1987e76d..cb4c1f1c 100644
--- a/source/tools/mjsgen.c
+++ b/source/tools/mjsgen.c
@@ -287,7 +287,7 @@ int main(int argc, char **argv)
}
fclose(mujstest_file);
- fz_free_context(ctx);
+ fz_drop_context(ctx);
return 0;
}
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index 734429da..7f93d492 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -229,7 +229,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
}
fz_always(ctx)
{
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
}
fz_catch(ctx)
@@ -252,7 +252,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
}
fz_always(ctx)
{
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
}
fz_catch(ctx)
@@ -279,7 +279,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_run_display_list(list, dev, &fz_identity, &fz_infinite_rect, &cookie);
else
fz_run_page(doc, page, dev, &fz_identity, &cookie);
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
if (showtext == TEXT_XML)
{
@@ -298,9 +298,9 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
}
fz_always(ctx)
{
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
- fz_free_text_page(ctx, text);
+ fz_drop_text_page(ctx, text);
}
fz_catch(ctx)
{
@@ -326,7 +326,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
}
fz_always(ctx)
{
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
}
fz_catch(ctx)
@@ -356,12 +356,12 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_run_display_list(list, dev, &ctm, &tbounds, &cookie);
else
fz_run_page(doc, page, dev, &ctm, &cookie);
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
}
fz_always(ctx)
{
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
}
fz_catch(ctx)
@@ -371,7 +371,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_rethrow(ctx);
}
pdf_insert_page(pdfout, newpage, INT_MAX);
- pdf_free_page(pdfout, newpage);
+ pdf_drop_page(pdfout, newpage);
}
if (output && output_format == OUT_SVG)
@@ -408,14 +408,14 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_run_display_list(list, dev, &ctm, &tbounds, &cookie);
else
fz_run_page(doc, page, dev, &ctm, &cookie);
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
}
fz_always(ctx)
{
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
- fz_close_output(out);
+ fz_drop_output(out);
if (file != stdout)
fclose(file);
}
@@ -556,7 +556,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_run_display_list(list, dev, &ctm, &tbounds, &cookie);
else
fz_run_page(doc, page, dev, &ctm, &cookie);
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
if (invert)
@@ -639,11 +639,11 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_output_png_trailer(output_file, poc);
}
- fz_free_device(dev);
+ fz_drop_device(dev);
dev = NULL;
fz_drop_pixmap(ctx, pix);
if (output_file)
- fz_close_output(output_file);
+ fz_drop_output(output_file);
}
fz_catch(ctx)
{
@@ -749,8 +749,8 @@ static void drawoutline(fz_context *ctx, fz_document *doc)
}
fz_always(ctx)
{
- fz_close_output(out);
- fz_free_outline(ctx, outline);
+ fz_drop_output(out);
+ fz_drop_outline(ctx, outline);
}
fz_catch(ctx)
{
@@ -1105,11 +1105,11 @@ int main(int argc, char **argv)
}
if (showtext)
- fz_free_text_sheet(ctx, sheet);
+ fz_drop_text_sheet(ctx, sheet);
if (showxml || showtext)
{
- fz_close_output(out);
+ fz_drop_output(out);
out = NULL;
}
@@ -1131,7 +1131,7 @@ int main(int argc, char **argv)
}
}
- fz_free_context(ctx);
+ fz_drop_context(ctx);
if (showmemory)
{
diff --git a/source/tools/pdfclean.c b/source/tools/pdfclean.c
index d7d5ac97..bfeca0e4 100644
--- a/source/tools/pdfclean.c
+++ b/source/tools/pdfclean.c
@@ -310,7 +310,7 @@ int pdfclean_main(int argc, char **argv)
{
errors++;
}
- fz_free_context(ctx);
+ fz_drop_context(ctx);
return errors == 0;
}
diff --git a/source/tools/pdfextract.c b/source/tools/pdfextract.c
index b9697985..0c7463f7 100644
--- a/source/tools/pdfextract.c
+++ b/source/tools/pdfextract.c
@@ -233,6 +233,6 @@ int pdfextract_main(int argc, char **argv)
pdf_close_document(doc);
fz_flush_warnings(ctx);
- fz_free_context(ctx);
+ fz_drop_context(ctx);
return 0;
}
diff --git a/source/tools/pdfinfo.c b/source/tools/pdfinfo.c
index ff05012f..453f271a 100644
--- a/source/tools/pdfinfo.c
+++ b/source/tools/pdfinfo.c
@@ -1071,7 +1071,7 @@ int pdfinfo_main(int argc, char **argv)
{
ret = 1;
}
- fz_close_output(out);
- fz_free_context(ctx);
+ fz_drop_output(out);
+ fz_drop_context(ctx);
return ret;
}
diff --git a/source/tools/pdfposter.c b/source/tools/pdfposter.c
index aedeccb4..e4b631a6 100644
--- a/source/tools/pdfposter.c
+++ b/source/tools/pdfposter.c
@@ -169,6 +169,6 @@ int pdfposter_main(int argc, char **argv)
pdf_write_document(doc, outfile, &opts);
pdf_close_document(doc);
- fz_free_context(ctx);
+ fz_drop_context(ctx);
return 0;
}
diff --git a/source/tools/pdfshow.c b/source/tools/pdfshow.c
index c5d021ad..344f4c40 100644
--- a/source/tools/pdfshow.c
+++ b/source/tools/pdfshow.c
@@ -118,7 +118,7 @@ static void showstream(int num, int gen)
showsafe(buf, n);
}
- fz_close(stm);
+ fz_drop_stream(stm);
}
static void showobject(int num, int gen)
@@ -265,6 +265,6 @@ int pdfshow_main(int argc, char **argv)
fclose(out);
pdf_close_document(doc);
- fz_free_context(ctx);
+ fz_drop_context(ctx);
return 0;
}