summaryrefslogtreecommitdiff
path: root/do_blt.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-13 18:55:51 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-13 18:55:51 -0200
commitc7f3c6652e9507e4303fd9ed913c593afb7447f0 (patch)
treebb78edc4cdd137a3f2e7eb6e9d6fdd3b2c9f9706 /do_blt.c
parent828c0323450eadaf040749c010918679f5e4fe53 (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, and corrects make distcheck.
Diffstat (limited to 'do_blt.c')
-rw-r--r--do_blt.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/do_blt.c b/do_blt.c
index b508b4a..97371dc 100644
--- a/do_blt.c
+++ b/do_blt.c
@@ -200,7 +200,7 @@ InitCopyPix(XParms xp, Parms p, int reps)
/* Create pixmap to write stuff into, and initialize it */
pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, xp->vinfo.depth);
- pixgc = XCreateGC(xp->d, pix, 0, 0);
+ pixgc = XCreateGC(xp->d, pix, 0, NULL);
/* need a gc with GXcopy cos pixmaps contain junk on creation. mmm */
XCopyArea(xp->d, xp->w, pix, pixgc, 0, 0, WIDTH, HEIGHT, 0, 0);
XFreeGC(xp->d, pixgc);
@@ -214,8 +214,8 @@ InitGetImage(XParms xp, Parms p, int reps)
/* Create image to stuff bits into */
image = XGetImage(xp->d, xp->w, 0, 0, WIDTH, HEIGHT, xp->planemask,
- p->font==0?ZPixmap:XYPixmap);
- if(image==0){
+ p->font==NULL?ZPixmap:XYPixmap);
+ if(image==NULL){
printf("XGetImage failed\n");
return False;
}
@@ -284,7 +284,7 @@ DoGetImage(XParms xp, Parms p, int reps)
int format;
size = p->special;
- format = (p->font == 0) ? ZPixmap : XYPixmap;
+ format = (p->font == NULL) ? ZPixmap : XYPixmap;
for (sa = segsa, sb = segsb, i = 0; i != reps; i++, sa++, sb++) {
XDestroyImage(image);
image = XGetImage(xp->d, xp->w, sa->x1, sa->y1, size, size,
@@ -404,7 +404,7 @@ InitShmPutImage(XParms xp, Parms p, int reps)
perror ("shmget");
return False;
}
- shm_info.shmaddr = (char *) shmat(shm_info.shmid, 0, 0);
+ shm_info.shmaddr = (char *) shmat(shm_info.shmid, NULL, 0);
if (shm_info.shmaddr == ((char *) -1))
{
/*
@@ -417,7 +417,7 @@ InitShmPutImage(XParms xp, Parms p, int reps)
free(segsa);
free(segsb);
perror ("shmat");
- shmctl (shm_info.shmid, IPC_RMID, 0);
+ shmctl (shm_info.shmid, IPC_RMID, NULL);
return False;
}
shm_info.readOnly = True;
@@ -439,7 +439,7 @@ InitShmPutImage(XParms xp, Parms p, int reps)
free(segsb);
if(shmdt (shm_info.shmaddr)==-1)
perror("shmdt:");
- if(shmctl (shm_info.shmid, IPC_RMID, 0)==-1)
+ if(shmctl (shm_info.shmid, IPC_RMID, NULL)==-1)
perror("shmctl rmid:");
return False;
}
@@ -478,7 +478,7 @@ EndShmPutImage(XParms xp, Parms p)
XSync(xp->d, False); /* need server to detach so can remove id */
if(shmdt (shm_info.shmaddr)==-1)
perror("shmdt:");
- if(shmctl (shm_info.shmid, IPC_RMID, 0)==-1)
+ if(shmctl (shm_info.shmid, IPC_RMID, NULL)==-1)
perror("shmctl rmid:");
}
@@ -528,7 +528,7 @@ InitCopyPlane(XParms xp, Parms p, int reps)
/* Create pixmap to write stuff into, and initialize it */
pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT,
- p->font==0 ? 1 : xp->vinfo.depth);
+ p->font==NULL ? 1 : xp->vinfo.depth);
gcv.graphics_exposures = False;
gcv.foreground = 0;
gcv.background = 1;
@@ -608,6 +608,9 @@ InitCompositePix(XParms xp, Parms p, int reps)
case PictStandardA1:
depth = 1;
break;
+ default:
+ depth = 0;
+ break;
}
if (!format)
format = XRenderFindStandardFormat (xp->d, xp->planemask);