summaryrefslogtreecommitdiff
path: root/dix/dixutils.c
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-03-07 23:02:59 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-03-07 23:02:59 +0000
commit8d0e520721ab7697d2d4f639425499b79c61b43f (patch)
treeec2e9adae765ac635092eec69b22209dc6bb214d /dix/dixutils.c
parentcb0aa2b4d8875f1ea66e720ca7c6cc2f403be26a (diff)
xc/programs/Xserver/dix/atom.c
xc/programs/Xserver/dix/colormap.c xc/programs/Xserver/dix/cursor.c xc/programs/Xserver/dix/devices.c xc/programs/Xserver/dix/dispatch.c xc/programs/Xserver/dix/dixfonts.c xc/programs/Xserver/dix/dixutils.c xc/programs/Xserver/dix/events.c xc/programs/Xserver/dix/extension.c xc/programs/Xserver/dix/gc.c xc/programs/Xserver/dix/glyphcurs.c xc/programs/Xserver/dix/grabs.c xc/programs/Xserver/dix/main.c xc/programs/Xserver/dix/pixmap.c xc/programs/Xserver/dix/privates.c xc/programs/Xserver/dix/property.c xc/programs/Xserver/dix/resource.c xc/programs/Xserver/dix/swaprep.c xc/programs/Xserver/dix/swapreq.c //bugs.freedesktop.org/show_bug.cgi?id=2560) attachment #2037 (https://bugs.freedesktop.org/attachment.cgi?id=2037) ANSI-fy Xserver/dix code. The conversion preserves the comments which annotate variables. These have been moved into doxygen(esque?) "stubs" above each function. Patch by Mike Owens <etc@filespanker.com>.
Diffstat (limited to 'dix/dixutils.c')
-rw-r--r--dix/dixutils.c130
1 files changed, 44 insertions, 86 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 5bd5841a9..155636e91 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -104,8 +104,7 @@ Author: Adobe Systems Incorporated
*/
int
-CompareTimeStamps(a, b)
- TimeStamp a, b;
+CompareTimeStamps(TimeStamp a, TimeStamp b)
{
if (a.months < b.months)
return EARLIER;
@@ -124,8 +123,7 @@ CompareTimeStamps(a, b)
#define HALFMONTH ((unsigned long) 1<<31)
TimeStamp
-ClientTimeToServerTime(c)
- CARD32 c;
+ClientTimeToServerTime(CARD32 c)
{
TimeStamp ts;
if (c == CurrentTime)
@@ -169,9 +167,7 @@ ISOLatin1ToLower (unsigned char source)
void
-CopyISOLatin1Lowered(dest, source, length)
- register unsigned char *dest, *source;
- int length;
+CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length)
{
register int i;
@@ -210,10 +206,7 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len,
*/
WindowPtr
-SecurityLookupWindow(rid, client, access_mode)
- XID rid;
- ClientPtr client;
- Mask access_mode;
+SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode)
{
WindowPtr pWin;
@@ -240,10 +233,7 @@ SecurityLookupWindow(rid, client, access_mode)
pointer
-SecurityLookupDrawable(rid, client, access_mode)
- XID rid;
- ClientPtr client;
- Mask access_mode;
+SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode)
{
register DrawablePtr pDraw;
@@ -266,17 +256,13 @@ SecurityLookupDrawable(rid, client, access_mode)
*/
WindowPtr
-LookupWindow(rid, client)
- XID rid;
- ClientPtr client;
+LookupWindow(XID rid, ClientPtr client)
{
return SecurityLookupWindow(rid, client, SecurityUnknownAccess);
}
pointer
-LookupDrawable(rid, client)
- XID rid;
- ClientPtr client;
+LookupDrawable(XID rid, ClientPtr client)
{
return SecurityLookupDrawable(rid, client, SecurityUnknownAccess);
}
@@ -284,9 +270,7 @@ LookupDrawable(rid, client)
#else /* not XCSECURITY */
WindowPtr
-LookupWindow(rid, client)
- XID rid;
- ClientPtr client;
+LookupWindow(XID rid, ClientPtr client)
{
WindowPtr pWin;
@@ -311,9 +295,7 @@ LookupWindow(rid, client)
pointer
-LookupDrawable(rid, client)
- XID rid;
- ClientPtr client;
+LookupDrawable(XID rid, ClientPtr client)
{
register DrawablePtr pDraw;
@@ -330,9 +312,7 @@ LookupDrawable(rid, client)
#endif /* XCSECURITY */
ClientPtr
-LookupClient(rid, client)
- XID rid;
- ClientPtr client;
+LookupClient(XID rid, ClientPtr client)
{
pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
SecurityReadAccess);
@@ -347,11 +327,8 @@ LookupClient(rid, client)
int
-AlterSaveSetForClient(ClientPtr client,
- WindowPtr pWin,
- unsigned mode,
- Bool toRoot,
- Bool remap)
+AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
+ Bool toRoot, Bool remap)
{
int numnow;
SaveSetElt *pTmp = NULL;
@@ -406,8 +383,7 @@ AlterSaveSetForClient(ClientPtr client,
}
void
-DeleteWindowFromAnySaveSet(pWin)
- WindowPtr pWin;
+DeleteWindowFromAnySaveSet(WindowPtr pWin)
{
register int i;
register ClientPtr client;
@@ -443,11 +419,13 @@ static int sizeHandlers;
static Bool inHandler;
static Bool handlerDeleted;
-/* called from the OS layer */
+/**
+ *
+ * \param pTimeout DIX doesn't want to know how OS represents time
+ * \param pReadMask nor how it represents the det of descriptors
+ */
void
-BlockHandler(pTimeout, pReadmask)
-pointer pTimeout; /* DIX doesn't want to know how OS represents time */
-pointer pReadmask; /* nor how it represents the set of descriptors */
+BlockHandler(pointer pTimeout, pointer pReadmask)
{
register int i, j;
@@ -475,10 +453,13 @@ pointer pReadmask; /* nor how it represents the set of descriptors */
--inHandler;
}
+/**
+ *
+ * \param result 32 bits of undefined result from the wait
+ * \param pReadmask the resulting descriptor mask
+ */
void
-WakeupHandler(result, pReadmask)
-int result; /* 32 bits of undefined result from the wait */
-pointer pReadmask; /* the resulting descriptor mask */
+WakeupHandler(int result, pointer pReadmask)
{
register int i, j;
@@ -506,15 +487,14 @@ pointer pReadmask; /* the resulting descriptor mask */
--inHandler;
}
-/* Reentrant with BlockHandler and WakeupHandler, except wakeup won't
+/**
+ * Reentrant with BlockHandler and WakeupHandler, except wakeup won't
* get called until next time
*/
-
Bool
-RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
- BlockHandlerProcPtr blockHandler;
- WakeupHandlerProcPtr wakeupHandler;
- pointer blockData;
+RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler,
+ WakeupHandlerProcPtr wakeupHandler,
+ pointer blockData)
{
BlockHandlerPtr new;
@@ -536,10 +516,9 @@ RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
}
void
-RemoveBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
- BlockHandlerProcPtr blockHandler;
- WakeupHandlerProcPtr wakeupHandler;
- pointer blockData;
+RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler,
+ WakeupHandlerProcPtr wakeupHandler,
+ pointer blockData)
{
int i;
@@ -633,12 +612,8 @@ ProcessWorkQueueZombies(void)
Bool
QueueWorkProc (
- Bool (*function)(
- ClientPtr /* pClient */,
- pointer /* closure */
- ),
- ClientPtr client,
- pointer closure)
+ Bool (*function)(ClientPtr /* pClient */, pointer /* closure */),
+ ClientPtr client, pointer closure)
{
WorkQueuePtr q;
@@ -672,10 +647,7 @@ typedef struct _SleepQueue {
static SleepQueuePtr sleepQueue = NULL;
Bool
-ClientSleep (client, function, closure)
- ClientPtr client;
- ClientSleepProcPtr function;
- pointer closure;
+ClientSleep (ClientPtr client, ClientSleepProcPtr function, pointer closure)
{
SleepQueuePtr q;
@@ -693,8 +665,7 @@ ClientSleep (client, function, closure)
}
Bool
-ClientSignal (client)
- ClientPtr client;
+ClientSignal (ClientPtr client)
{
SleepQueuePtr q;
@@ -707,8 +678,7 @@ ClientSignal (client)
}
void
-ClientWakeup (client)
- ClientPtr client;
+ClientWakeup (ClientPtr client)
{
SleepQueuePtr q, *prev;
@@ -734,8 +704,7 @@ ClientWakeup (client)
}
Bool
-ClientIsAsleep (client)
- ClientPtr client;
+ClientIsAsleep (ClientPtr client)
{
SleepQueuePtr q;
@@ -909,9 +878,7 @@ static CallbackFuncsRec default_cbfuncs =
/* ===== Public Procedures ===== */
Bool
-CreateCallbackList(pcbl, cbfuncs)
- CallbackListPtr *pcbl;
- CallbackFuncsPtr cbfuncs;
+CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
{
CallbackListPtr cbl;
int i;
@@ -943,10 +910,7 @@ CreateCallbackList(pcbl, cbfuncs)
}
Bool
-AddCallback(pcbl, callback, data)
- CallbackListPtr *pcbl;
- CallbackProcPtr callback;
- pointer data;
+AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
{
if (!pcbl) return FALSE;
if (!*pcbl)
@@ -958,27 +922,21 @@ AddCallback(pcbl, callback, data)
}
Bool
-DeleteCallback(pcbl, callback, data)
- CallbackListPtr *pcbl;
- CallbackProcPtr callback;
- pointer data;
+DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
{
if (!pcbl || !*pcbl) return FALSE;
return ((*(*pcbl)->funcs.DeleteCallback) (pcbl, callback, data));
}
void
-CallCallbacks(pcbl, call_data)
- CallbackListPtr *pcbl;
- pointer call_data;
+CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
{
if (!pcbl || !*pcbl) return;
(*(*pcbl)->funcs.CallCallbacks) (pcbl, call_data);
}
void
-DeleteCallbackList(pcbl)
- CallbackListPtr *pcbl;
+DeleteCallbackList(CallbackListPtr *pcbl)
{
if (!pcbl || !*pcbl) return;
(*(*pcbl)->funcs.DeleteCallbackList) (pcbl);