From fd2fe9791264ff8ed8a9bf9d374e796bf011776e Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 6 Jul 2009 02:09:52 +0200 Subject: Use nil instead of 0 for pointers. --- apps/unix/x11pdf.c | 12 ++++++------ apps/unix/ximage.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'apps') 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"); -- cgit v1.2.3