summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-11 13:41:22 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-04-11 13:44:49 +0200
commitf873a4c40c43e29b449ead2fd792333b018afc8b (patch)
tree3eafff8578e0795875742dc2156a8bf9454e23ab /docs
parenta3d3a4c01ff0481e97991f052cacc0560197fd5b (diff)
downloadmupdf-f873a4c40c43e29b449ead2fd792333b018afc8b.tar.xz
Update examples.
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/example.c3
-rw-r--r--docs/examples/multi-threaded.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/examples/example.c b/docs/examples/example.c
index 2cfe2b73..492f846b 100644
--- a/docs/examples/example.c
+++ b/docs/examples/example.c
@@ -18,6 +18,9 @@ gcc -I/usr/local/include -o example \
#include <mupdf/fitz.h>
+#include <stdio.h>
+#include <stdlib.h>
+
int main(int argc, char **argv)
{
char *input;
diff --git a/docs/examples/multi-threaded.c b/docs/examples/multi-threaded.c
index d8541983..2a5d4faf 100644
--- a/docs/examples/multi-threaded.c
+++ b/docs/examples/multi-threaded.c
@@ -33,6 +33,8 @@ depending on your environment.
//Include the MuPDF header file, and pthread's header file.
#include <mupdf/fitz.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <pthread.h>
// A convenience function for dying abruptly on pthread errors.
@@ -229,7 +231,7 @@ int main(int argc, char **argv)
// Create a white pixmap using the correct dimensions.
- pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), fz_round_rect(&rbox, &bbox), 0);
+ pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), fz_round_rect(&rbox, &bbox), NULL, 0);
fz_clear_pixmap_with_value(ctx, pix, 0xff);
// Populate the data structure to be sent to the