summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/pdfapp.c2
-rw-r--r--apps/pdfclean.c12
-rw-r--r--apps/pdfdraw.c6
-rw-r--r--apps/pdfextract.c4
-rw-r--r--apps/pdfshow.c4
-rw-r--r--apps/win_main.c2
-rw-r--r--apps/x11_main.c4
7 files changed, 17 insertions, 17 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c
index 1f451f33..20c27065 100644
--- a/apps/pdfapp.c
+++ b/apps/pdfapp.c
@@ -103,7 +103,7 @@ void pdfapp_open(pdfapp_t *app, char *filename, int fd)
*/
file = fz_openfile(fd);
- error = pdf_openxrefwithstream(&app->xref, file, NULL);
+ error = pdf_openxrefwithstream(&app->xref, file, nil);
if (error)
pdfapp_error(app, fz_rethrow(error, "cannot open document '%s'", filename));
fz_close(file);
diff --git a/apps/pdfclean.c b/apps/pdfclean.c
index 430e1ac4..fbea8fd4 100644
--- a/apps/pdfclean.c
+++ b/apps/pdfclean.c
@@ -12,18 +12,18 @@
#include "fitz.h"
#include "mupdf.h"
-static FILE *out = NULL;
+static FILE *out = nil;
-static char *uselist = NULL;
-static int *ofslist = NULL;
-static int *genlist = NULL;
-static int *renumbermap = NULL;
+static char *uselist = nil;
+static int *ofslist = nil;
+static int *genlist = nil;
+static int *renumbermap = nil;
static int dogarbage = 0;
static int doexpand = 0;
static int doascii = 0;
-static pdf_xref *xref = NULL;
+static pdf_xref *xref = nil;
void die(fz_error error)
{
diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c
index e31fd016..9ce72cf0 100644
--- a/apps/pdfdraw.c
+++ b/apps/pdfdraw.c
@@ -11,7 +11,7 @@
#include <sys/time.h>
#endif
-char *output = NULL;
+char *output = nil;
float resolution = 72;
float rotation = 0;
@@ -66,10 +66,10 @@ static int gettime(void)
struct timeval now;
if (once)
{
- gettimeofday(&first, NULL);
+ gettimeofday(&first, nil);
once = 0;
}
- gettimeofday(&now, NULL);
+ gettimeofday(&now, nil);
return (now.tv_sec - first.tv_sec) * 1000 + (now.tv_usec - first.tv_usec) / 1000;
}
diff --git a/apps/pdfextract.c b/apps/pdfextract.c
index fa515638..340a351d 100644
--- a/apps/pdfextract.c
+++ b/apps/pdfextract.c
@@ -5,7 +5,7 @@
#include "fitz.h"
#include "mupdf.h"
-static pdf_xref *xref = NULL;
+static pdf_xref *xref = nil;
static int dorgb = 0;
void die(fz_error error)
@@ -142,7 +142,7 @@ static void savefont(fz_obj *dict, int num)
printf("extracting font %s\n", name);
f = fopen(name, "wb");
- if (f == NULL)
+ if (f == nil)
die(fz_throw("Error creating font file"));
n = fwrite(buf->data, 1, buf->len, f);
diff --git a/apps/pdfshow.c b/apps/pdfshow.c
index 27bbd0e4..eda01e30 100644
--- a/apps/pdfshow.c
+++ b/apps/pdfshow.c
@@ -5,7 +5,7 @@
#include "fitz.h"
#include "mupdf.h"
-static pdf_xref *xref = NULL;
+static pdf_xref *xref = nil;
static int showbinary = 0;
static int showdecode = 1;
static int showcolumn;
@@ -192,7 +192,7 @@ static void showgrep(char *filename)
int main(int argc, char **argv)
{
- char *password = NULL; /* don't throw errors if encrypted */
+ char *password = nil; /* don't throw errors if encrypted */
char *filename;
fz_error error;
int c;
diff --git a/apps/win_main.c b/apps/win_main.c
index 29f2b29e..07d1e932 100644
--- a/apps/win_main.c
+++ b/apps/win_main.c
@@ -130,7 +130,7 @@ char *winpassword(pdfapp_t *app, char *filename)
win32error("cannot create password dialog");
if (pd_okay)
return pd_password;
- return NULL;
+ return nil;
}
INT CALLBACK
diff --git a/apps/x11_main.c b/apps/x11_main.c
index 395f9fd8..9ef08012 100644
--- a/apps/x11_main.c
+++ b/apps/x11_main.c
@@ -93,7 +93,7 @@ void winerror(pdfapp_t *app, fz_error error)
char *winpassword(pdfapp_t *app, char *filename)
{
char *r = password;
- password = NULL;
+ password = nil;
return r;
}
@@ -289,7 +289,7 @@ static void winblit(pdfapp_t *app)
{
int i = gapp.image->w*gapp.image->h;
unsigned char *color = malloc(i*4);
- if (color != NULL)
+ if (color != nil)
{
unsigned char *s = gapp.image->samples;
unsigned char *d = color;