diff options
-rw-r--r-- | apps/unix/x11pdf.c | 12 | ||||
-rw-r--r-- | apps/unix/ximage.c | 6 | ||||
-rw-r--r-- | fitz/filt_faxc.h | 4 | ||||
-rw-r--r-- | fitz/filt_jpxd_jas.c | 2 | ||||
-rw-r--r-- | fitz/obj_print.c | 2 | ||||
-rw-r--r-- | mupdf/cmapdump.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_cmap_table.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_debug.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_font.c | 30 | ||||
-rw-r--r-- | mupdf/pdf_fontagl.c | 4 | ||||
-rw-r--r-- | mupdf/pdf_fontenc.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_fontfile.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_image.c | 2 |
13 files changed, 36 insertions, 36 deletions
diff --git a/apps/unix/x11pdf.c b/apps/unix/x11pdf.c index b8d7c267..28409c3f 100644 --- a/apps/unix/x11pdf.c +++ b/apps/unix/x11pdf.c @@ -178,9 +178,9 @@ void wincursor(pdfapp_t *app, int curs) void wintitle(pdfapp_t *app, char *s) { #ifdef X_HAVE_UTF8_STRING - Xutf8SetWMProperties(xdpy, xwin, s, s, 0, 0, 0, 0, 0); + Xutf8SetWMProperties(xdpy, xwin, s, s, nil, 0, nil, nil, nil); #else - XmbSetWMProperties(xdpy, xwin, s, s, 0, 0, 0, 0, 0); + XmbSetWMProperties(xdpy, xwin, s, s, nil, 0, nil, nil, nil); #endif } @@ -473,9 +473,9 @@ static void winawaitevent(struct timeval *tmo, struct timeval *tmo_at) FD_ZERO(&fds); FD_SET(x11fd, &fds); - if (select(x11fd + 1, &fds, 0, 0, tmo)) + if (select(x11fd + 1, &fds, nil, nil, tmo)) { - gettimeofday(&now, 0); + gettimeofday(&now, nil); timersub(tmo_at, &now, tmo); XNextEvent(xdpy, &xevt); } @@ -489,7 +489,7 @@ static void winsettmo(struct timeval *tmo, struct timeval *tmo_at) tmo->tv_sec = 2; tmo->tv_usec = 0; - gettimeofday(&now, 0); + gettimeofday(&now, nil); timeradd(&now, tmo, tmo_at); } @@ -584,7 +584,7 @@ int main(int argc, char **argv) case KeyPress: wasshowingpage = isshowingpage; - len = XLookupString(&xevt.xkey, buf, sizeof buf, &keysym, 0); + len = XLookupString(&xevt.xkey, buf, sizeof buf, &keysym, nil); if (len) onkey(buf[0]); onmouse(oldx, oldy, 0, 0, 0); diff --git a/apps/unix/ximage.c b/apps/unix/ximage.c index bdf245c7..cb776e29 100644 --- a/apps/unix/ximage.c +++ b/apps/unix/ximage.c @@ -113,7 +113,7 @@ createximage(Display *dpy, Visual *vis, XShmSegmentInfo *xsi, int depth, int w, goto fallback; } - img->data = xsi->shmaddr = shmat(xsi->shmid, 0, 0); + img->data = xsi->shmaddr = shmat(xsi->shmid, nil, 0); if (img->data == (char*)-1) { XDestroyImage(img); @@ -133,14 +133,14 @@ createximage(Display *dpy, Visual *vis, XShmSegmentInfo *xsi, int depth, int w, XSync(dpy, False); - shmctl(xsi->shmid, IPC_RMID, 0); + shmctl(xsi->shmid, IPC_RMID, nil); return img; fallback: info.useshm = 0; - img = XCreateImage(dpy, vis, depth, ZPixmap, 0, 0, w, h, 32, 0); + img = XCreateImage(dpy, vis, depth, ZPixmap, 0, nil, w, h, 32, 0); if (!img) { fprintf(stderr, "fail: could not XCreateImage"); diff --git a/fitz/filt_faxc.h b/fitz/filt_faxc.h index f11334be..9250690a 100644 --- a/fitz/filt_faxc.h +++ b/fitz/filt_faxc.h @@ -52,7 +52,7 @@ findchanging(const unsigned char *line, int x, int w) { int a, b; - if (line == 0) + if (line) return w; if (x == -1) @@ -80,7 +80,7 @@ findchanging(const unsigned char *line, int x, int w) static inline int findchangingcolor(const unsigned char *line, int x, int w, int color) { - if (line == 0) + if (line) return w; x = findchanging(line, x, w); diff --git a/fitz/filt_jpxd_jas.c b/fitz/filt_jpxd_jas.c index c07f396c..f9b5f89c 100644 --- a/fitz/filt_jpxd_jas.c +++ b/fitz/filt_jpxd_jas.c @@ -99,7 +99,7 @@ input: decode: jas_stream_seek(d->stream, 0, 0); - d->image = jas_image_decode(d->stream, -1, 0); + d->image = jas_image_decode(d->stream, -1, nil); if (!d->image) return fz_throw("jasper error: jas_image_decode()"); diff --git a/fitz/obj_print.c b/fitz/obj_print.c index d9bb174a..3e2094a8 100644 --- a/fitz/obj_print.c +++ b/fitz/obj_print.c @@ -250,7 +250,7 @@ static void fmtobj(struct fmt *fmt, fz_obj *obj) int i, c; for (i = 0; i < obj->u.s.len; i++) { c = (unsigned char)obj->u.s.buf[i]; - if (strchr("()\\\n\r\t\b\f", c) != 0) + if (strchr("()\\\n\r\t\b\f", c)) added ++; else if (c < 8) added ++; diff --git a/mupdf/cmapdump.c b/mupdf/cmapdump.c index 69cffa76..3d5cea20 100644 --- a/mupdf/cmapdump.c +++ b/mupdf/cmapdump.c @@ -140,7 +140,7 @@ main(int argc, char **argv) fprintf(fo, "{\n"); fprintf(fo, " -1, "); fprintf(fo, "\"%s\", ", cmap->cmapname); - fprintf(fo, "\"%s\", 0, ", cmap->usecmapname); + fprintf(fo, "\"%s\", nil, ", cmap->usecmapname); fprintf(fo, "%d,\n", cmap->wmode); fprintf(fo, " %d, /* codespace table */\n", cmap->ncspace); diff --git a/mupdf/pdf_cmap_table.c b/mupdf/pdf_cmap_table.c index 001dacf2..a1abea3f 100644 --- a/mupdf/pdf_cmap_table.c +++ b/mupdf/pdf_cmap_table.c @@ -156,6 +156,6 @@ pdf_cmap *pdf_cmaptable[] = &pdf_cmap_UniKS_UCS2_H, &pdf_cmap_UniKS_UCS2_V, #endif - 0 + nil }; diff --git a/mupdf/pdf_debug.c b/mupdf/pdf_debug.c index aafc4e9c..19d54308 100644 --- a/mupdf/pdf_debug.c +++ b/mupdf/pdf_debug.c @@ -67,7 +67,7 @@ static inline void pdflog(int tag, char *name, char *fmt, va_list ap) if (strchr(fmt, '{')) level ++; - push = strchr(fmt, '\n') != 0; + push = !!strchr(fmt, '\n'); fflush(stdout); } diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c index b599df04..a0807f4c 100644 --- a/mupdf/pdf_font.c +++ b/mupdf/pdf_font.c @@ -7,32 +7,32 @@ static char *basefontnames[14][7] = { - { "Courier", "CourierNew", "CourierNewPSMT", 0 }, + { "Courier", "CourierNew", "CourierNewPSMT", nil }, { "Courier-Bold", "CourierNew,Bold", "Courier,Bold", - "CourierNewPS-BoldMT", "CourierNew-Bold", 0 }, + "CourierNewPS-BoldMT", "CourierNew-Bold", nil }, { "Courier-Oblique", "CourierNew,Italic", "Courier,Italic", - "CourierNewPS-ItalicMT", "CourierNew-Italic", 0 }, + "CourierNewPS-ItalicMT", "CourierNew-Italic", nil }, { "Courier-BoldOblique", "CourierNew,BoldItalic", "Courier,BoldItalic", - "CourierNewPS-BoldItalicMT", "CourierNew-BoldItalic", 0 }, - { "Helvetica", "ArialMT", "Arial", 0 }, + "CourierNewPS-BoldItalicMT", "CourierNew-BoldItalic", nil }, + { "Helvetica", "ArialMT", "Arial", nil }, { "Helvetica-Bold", "Arial-BoldMT", "Arial,Bold", "Arial-Bold", - "Helvetica,Bold", 0 }, + "Helvetica,Bold", nil }, { "Helvetica-Oblique", "Arial-ItalicMT", "Arial,Italic", "Arial-Italic", - "Helvetica,Italic", "Helvetica-Italic", 0 }, + "Helvetica,Italic", "Helvetica-Italic", nil }, { "Helvetica-BoldOblique", "Arial-BoldItalicMT", "Arial,BoldItalic", "Arial-BoldItalic", - "Helvetica,BoldItalic", "Helvetica-BoldItalic", 0 }, + "Helvetica,BoldItalic", "Helvetica-BoldItalic", nil }, { "Times-Roman", "TimesNewRomanPSMT", "TimesNewRoman", - "TimesNewRomanPS", 0 }, + "TimesNewRomanPS", nil }, { "Times-Bold", "TimesNewRomanPS-BoldMT", "TimesNewRoman,Bold", - "TimesNewRomanPS-Bold", "TimesNewRoman-Bold", 0 }, + "TimesNewRomanPS-Bold", "TimesNewRoman-Bold", nil }, { "Times-Italic", "TimesNewRomanPS-ItalicMT", "TimesNewRoman,Italic", - "TimesNewRomanPS-Italic", "TimesNewRoman-Italic", 0 }, + "TimesNewRomanPS-Italic", "TimesNewRoman-Italic", nil }, { "Times-BoldItalic", "TimesNewRomanPS-BoldItalicMT", "TimesNewRoman,BoldItalic", "TimesNewRomanPS-BoldItalic", - "TimesNewRoman-BoldItalic", 0 }, - { "Symbol", 0 }, - { "ZapfDingbats", 0 } + "TimesNewRoman-BoldItalic", nil }, + { "Symbol", nil }, + { "ZapfDingbats", nil } }; /* @@ -178,7 +178,7 @@ pdf_newfontdesc(void) fontdesc->missingwidth = 0; fontdesc->encoding = nil; - fontdesc->tottfcmap = 0; + fontdesc->tottfcmap = nil; fontdesc->ncidtogid = 0; fontdesc->cidtogid = nil; diff --git a/mupdf/pdf_fontagl.c b/mupdf/pdf_fontagl.c index 8929c14d..ba3cb9bd 100644 --- a/mupdf/pdf_fontagl.c +++ b/mupdf/pdf_fontagl.c @@ -4629,13 +4629,13 @@ int pdf_lookupagl(char *name, int *ucsbuf, int ucscap) while (s[0]) { strlcpy(tmp, s, 5); - ucsbuf[ucslen++] = strtol(tmp, 0, 16); + ucsbuf[ucslen++] = strtol(tmp, nil, 16); s += MIN(strlen(s), 4); } } else if (strstr(s, "u") == s) - ucsbuf[ucslen++] = strtol(s + 1, 0, 16); + ucsbuf[ucslen++] = strtol(s + 1, nil, 16); next: s = strsep(&p, "_"); diff --git a/mupdf/pdf_fontenc.c b/mupdf/pdf_fontenc.c index dd31915d..3ee20de2 100644 --- a/mupdf/pdf_fontenc.c +++ b/mupdf/pdf_fontenc.c @@ -5,7 +5,7 @@ #include "fitz.h" #include "mupdf.h" -#define _notdef 0 +#define _notdef nil void pdf_loadencoding(char **estrings, char *encoding) { diff --git a/mupdf/pdf_fontfile.c b/mupdf/pdf_fontfile.c index dfaa6528..7339a962 100644 --- a/mupdf/pdf_fontfile.c +++ b/mupdf/pdf_fontfile.c @@ -104,7 +104,7 @@ static const struct { "Chancery", pdf_font_URWChanceryL_MediItal_cff_buf, &pdf_font_URWChanceryL_MediItal_cff_len }, - { 0, 0, 0 } + { nil, nil, nil } }; fz_error diff --git a/mupdf/pdf_image.c b/mupdf/pdf_image.c index 2b3af750..0999d499 100644 --- a/mupdf/pdf_image.c +++ b/mupdf/pdf_image.c @@ -327,7 +327,7 @@ pdf_loadimage(pdf_image **imgp, pdf_xref *xref, fz_obj *dict, fz_obj *ref) if (mask->super.cs != pdf_devicegray) return fz_throw("syntaxerror: SMask must be DeviceGray"); - mask->super.cs = 0; + mask->super.cs = nil; mask->super.n = 0; mask->super.a = 1; } |