aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/saver.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/saver.c')
-rw-r--r--xorg-server/Xext/saver.c74
1 files changed, 31 insertions, 43 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c
index e9633f4b3..6afd79c34 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -113,9 +113,7 @@ typedef struct _ScreenSaverSuspension {
int count;
} ScreenSaverSuspensionRec;
-static int ScreenSaverFreeSuspend(pointer /*value */ ,
- XID /* id */
- );
+static int ScreenSaverFreeSuspend(void *value, XID id);
/*
* each screen has a list of clients requesting
@@ -137,18 +135,14 @@ typedef struct _ScreenSaverEvent {
CARD32 mask;
} ScreenSaverEventRec;
-static int ScreenSaverFreeEvents(pointer /* value */ ,
- XID /* id */
- );
+static int ScreenSaverFreeEvents(void * value, XID id);
-static Bool setEventMask(ScreenPtr /* pScreen */ ,
- ClientPtr /* client */ ,
- unsigned long /* mask */
- );
+static Bool setEventMask(ScreenPtr pScreen,
+ ClientPtr client,
+ unsigned long mask);
-static unsigned long getEventMask(ScreenPtr /* pScreen */ ,
- ClientPtr /* client */
- );
+static unsigned long getEventMask(ScreenPtr pScreen,
+ ClientPtr client);
/*
* when a client sets the screen saver attributes, a resource is
@@ -174,21 +168,16 @@ typedef struct _ScreenSaverAttr {
unsigned long *values;
} ScreenSaverAttrRec, *ScreenSaverAttrPtr;
-static int ScreenSaverFreeAttr(pointer /* value */ ,
- XID /* id */
- );
+static int ScreenSaverFreeAttr(void *value, XID id);
-static void FreeAttrs(ScreenSaverAttrPtr /* pAttr */
- );
+static void FreeAttrs(ScreenSaverAttrPtr pAttr);
-static void FreeScreenAttr(ScreenSaverAttrPtr /* pAttr */
- );
+static void FreeScreenAttr(ScreenSaverAttrPtr pAttr);
static void
- SendScreenSaverNotify(ScreenPtr /* pScreen */ ,
- int /* state */ ,
- Bool /* forced */
- );
+SendScreenSaverNotify(ScreenPtr pScreen,
+ int state,
+ Bool forced);
typedef struct _ScreenSaverScreenPrivate {
ScreenSaverEventPtr events;
@@ -197,8 +186,7 @@ typedef struct _ScreenSaverScreenPrivate {
Colormap installedMap;
} ScreenSaverScreenPrivateRec, *ScreenSaverScreenPrivatePtr;
-static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr /* pScreen */
- );
+static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr pScreen);
static DevPrivateKeyRec ScreenPrivateKeyRec;
@@ -294,7 +282,7 @@ setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask)
pEv->client = client;
pEv->screen = pScreen;
pEv->resource = FakeClientID(client->index);
- if (!AddResource(pEv->resource, SaverEventType, (pointer) pEv))
+ if (!AddResource(pEv->resource, SaverEventType, (void *) pEv))
return FALSE;
}
pEv->mask = mask;
@@ -325,7 +313,7 @@ FreeScreenAttr(ScreenSaverAttrPtr pAttr)
}
static int
-ScreenSaverFreeEvents(pointer value, XID id)
+ScreenSaverFreeEvents(void *value, XID id)
{
ScreenSaverEventPtr pOld = (ScreenSaverEventPtr) value;
ScreenPtr pScreen = pOld->screen;
@@ -347,7 +335,7 @@ ScreenSaverFreeEvents(pointer value, XID id)
}
static int
-ScreenSaverFreeAttr(pointer value, XID id)
+ScreenSaverFreeAttr(void *value, XID id)
{
ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr) value;
ScreenPtr pScreen = pOldAttr->screen;
@@ -369,7 +357,7 @@ ScreenSaverFreeAttr(pointer value, XID id)
}
static int
-ScreenSaverFreeSuspend(pointer value, XID id)
+ScreenSaverFreeSuspend(void *value, XID id)
{
ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value;
ScreenSaverSuspensionPtr *prev, this;
@@ -465,7 +453,7 @@ UninstallSaverColormap(ScreenPtr pScreen)
int rc;
if (pPriv && pPriv->installedMap != None) {
- rc = dixLookupResourceByType((pointer *) &pCmap, pPriv->installedMap,
+ rc = dixLookupResourceByType((void **) &pCmap, pPriv->installedMap,
RT_COLORMAP, serverClient,
DixUninstallAccess);
if (rc == Success)
@@ -576,7 +564,7 @@ CreateSaverWindow(ScreenPtr pScreen)
if (i < numInstalled)
return TRUE;
- result = dixLookupResourceByType((pointer *) &pCmap, wantMap, RT_COLORMAP,
+ result = dixLookupResourceByType((void **) &pCmap, wantMap, RT_COLORMAP,
serverClient, DixInstallAccess);
if (result != Success)
return TRUE;
@@ -926,7 +914,7 @@ ScreenSaverSetAttributes(ClientPtr client)
}
else {
ret =
- dixLookupResourceByType((pointer *) &pPixmap, pixID,
+ dixLookupResourceByType((void **) &pPixmap, pixID,
RT_PIXMAP, client, DixReadAccess);
if (ret == Success) {
if ((pPixmap->drawable.depth != depth) ||
@@ -958,7 +946,7 @@ ScreenSaverSetAttributes(ClientPtr client)
}
else {
ret =
- dixLookupResourceByType((pointer *) &pPixmap, pixID,
+ dixLookupResourceByType((void **) &pPixmap, pixID,
RT_PIXMAP, client, DixReadAccess);
if (ret == Success) {
if ((pPixmap->drawable.depth != depth) ||
@@ -1042,7 +1030,7 @@ ScreenSaverSetAttributes(ClientPtr client)
break;
case CWColormap:
cmap = (Colormap) * pVlist;
- ret = dixLookupResourceByType((pointer *) &pCmap, cmap, RT_COLORMAP,
+ ret = dixLookupResourceByType((void **) &pCmap, cmap, RT_COLORMAP,
client, DixUseAccess);
if (ret != Success) {
client->errorValue = cmap;
@@ -1061,7 +1049,7 @@ ScreenSaverSetAttributes(ClientPtr client)
*values++ = None;
}
else {
- ret = dixLookupResourceByType((pointer *) &pCursor, cursorID,
+ ret = dixLookupResourceByType((void **) &pCursor, cursorID,
RT_CURSOR, client, DixUseAccess);
if (ret != Success) {
client->errorValue = cursorID;
@@ -1082,7 +1070,7 @@ ScreenSaverSetAttributes(ClientPtr client)
FreeScreenAttr(pPriv->attr);
pPriv->attr = pAttr;
pAttr->resource = FakeClientID(client->index);
- if (!AddResource(pAttr->resource, AttrType, (pointer) pAttr))
+ if (!AddResource(pAttr->resource, AttrType, (void *) pAttr))
return BadAlloc;
return Success;
PatchUp:
@@ -1134,7 +1122,7 @@ ProcScreenSaverSetAttributes(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
- status = dixLookupResourceByClass((pointer *) &draw, stuff->drawable,
+ status = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, DixWriteAccess);
if (status != Success)
return (status == BadValue) ? BadDrawable : status;
@@ -1149,7 +1137,7 @@ ProcScreenSaverSetAttributes(ClientPtr client)
pback_offset = Ones((Mask) stuff->mask & (CWBackPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
- status = dixLookupResourceByType((pointer *) &backPix, tmp,
+ status = dixLookupResourceByType((void **) &backPix, tmp,
XRT_PIXMAP, client,
DixReadAccess);
if (status != Success)
@@ -1161,7 +1149,7 @@ ProcScreenSaverSetAttributes(ClientPtr client)
pbord_offset = Ones((Mask) stuff->mask & (CWBorderPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
- status = dixLookupResourceByType((pointer *) &bordPix, tmp,
+ status = dixLookupResourceByType((void **) &bordPix, tmp,
XRT_PIXMAP, client,
DixReadAccess);
if (status != Success)
@@ -1173,7 +1161,7 @@ ProcScreenSaverSetAttributes(ClientPtr client)
cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1));
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
- status = dixLookupResourceByType((pointer *) &cmap, tmp,
+ status = dixLookupResourceByType((void **) &cmap, tmp,
XRT_COLORMAP, client,
DixReadAccess);
if (status != Success)
@@ -1214,7 +1202,7 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
- rc = dixLookupResourceByClass((pointer *) &draw, stuff->drawable,
+ rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, DixWriteAccess);
if (rc != Success)
return (rc == BadValue) ? BadDrawable : rc;
@@ -1273,7 +1261,7 @@ ProcScreenSaverSuspend(ClientPtr client)
this->count = 1;
this->clientResource = FakeClientID(client->index);
- if (!AddResource(this->clientResource, SuspendType, (pointer) this)) {
+ if (!AddResource(this->clientResource, SuspendType, (void *) this)) {
free(this);
return BadAlloc;
}