[xserver-commit] xserver/dix cursor.c,3.12,3.13 devices.c,3.22,3.23 dispatch.c,3.34,3.35 dixfonts.c,3.31,3.32 dixutils.c,3.18,3.19 gc.c,3.11,3.12 grabs.c,3.6,3.7 main.c,3.44,3.45 resource.c,3.15,3.16 swaprep.c,3.9,3.10

Warren Turkal xserver-commit@pdx.freedesktop.org


Committed by: wt

Update of /cvs/xserver/xserver/dix
In directory pdx:/tmp/cvs-serv15213/dix

Modified Files:
	cursor.c devices.c dispatch.c dixfonts.c dixutils.c gc.c 
	grabs.c main.c resource.c swaprep.c 
Log Message:
* completely get rid of NeedNestedPrototypes
* completely get rid of NeedVarargsPrototypes
* remove a lot of NeedFunctionPrototypes
* ansify many function declarations



Index: cursor.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/cursor.c,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -d -r3.12 -r3.13
--- a/cursor.c	2 Nov 2003 19:56:10 -0000	3.12
+++ b/cursor.c	18 Feb 2004 03:23:36 -0000	3.13
@@ -76,12 +76,7 @@
 #endif
 
 static void
-#if NeedFunctionPrototypes
 FreeCursorBits(CursorBitsPtr bits)
-#else
-FreeCursorBits(bits)
-    CursorBitsPtr bits;
-#endif
 {
     if (--bits->refcnt > 0)
 	return;

Index: devices.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/devices.c,v
retrieving revision 3.22
retrieving revision 3.23
diff -u -d -r3.22 -r3.23
--- a/devices.c	11 Sep 2003 05:12:50 -0000	3.22
+++ b/devices.c	18 Feb 2004 03:23:36 -0000	3.23
@@ -200,12 +200,7 @@
 }
 
 static void
-#if NeedFunctionPrototypes
 CloseDevice(register DeviceIntPtr dev)
-#else
-CloseDevice(dev)
-    register DeviceIntPtr dev;
-#endif
 {
     KbdFeedbackPtr k, knext;
     PtrFeedbackPtr p, pnext;
@@ -504,12 +499,7 @@
 }
 
 static Bool
-#if NeedFunctionPrototypes
 InitModMap(register KeyClassPtr keyc)
-#else
-InitModMap(keyc)
-    register KeyClassPtr keyc;
-#endif
 {
     int i, j;
     CARD8 keysPerModifier[8];
@@ -1715,17 +1705,10 @@
 #ifdef AddInputDevice
 #undef AddInputDevice
 
-#if NeedFunctionPrototypes
 DevicePtr
 AddInputDevice(
     DeviceProc deviceProc,
     Bool autoStart)
-#else
-DevicePtr
-AddInputDevice(deviceProc, autoStart)
-    DeviceProc deviceProc;
-    Bool autoStart;
-#endif
 {
     return (DevicePtr)_AddInputDevice(deviceProc, autoStart);
 }
@@ -1734,14 +1717,8 @@
 #ifdef RegisterPointerDevice
 #undef RegisterPointerDevice
 
-#if NeedFunctionPrototypes
 void
 RegisterPointerDevice(DevicePtr device)
-#else
-void
-RegisterPointerDevice(device)
-    DevicePtr device;
-#endif
 {
     _RegisterPointerDevice((DeviceIntPtr)device);
 }
@@ -1750,14 +1727,8 @@
 #ifdef RegisterKeyboardDevice
 #undef RegisterKeyboardDevice
 
-#if NeedFunctionPrototypes
 void
 RegisterKeyboardDevice(DevicePtr device)
-#else
-void
-RegisterKeyboardDevice(device)
-    DevicePtr device;
-#endif
 {
     _RegisterKeyboardDevice((DeviceIntPtr)device);
 }

Index: dispatch.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dispatch.c,v
retrieving revision 3.34
retrieving revision 3.35
diff -u -d -r3.34 -r3.35
--- a/dispatch.c	12 Feb 2004 18:58:49 -0000	3.34
+++ b/dispatch.c	18 Feb 2004 03:23:36 -0000	3.35
@@ -139,16 +139,10 @@
 HWEventQueuePtr checkForInput[2];
 extern int connBlockScreenStart;
 
-static void KillAllClients(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
+static void KillAllClients(void);
 
 static void DeleteClientFromAnySelections(
-#if NeedFunctionPrototypes
     ClientPtr /*client*/
-#endif
 );
 
 static int nextFreeClientID; /* always MIN free client ID */
@@ -1187,12 +1181,7 @@
 }
 
 static void
-#if NeedFunctionPrototypes
 UngrabServer(ClientPtr client)
-#else
-UngrabServer(client)
-    ClientPtr client;
-#endif
 {
     int i;
 

Index: dixfonts.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dixfonts.c,v
retrieving revision 3.31
retrieving revision 3.32
diff -u -d -r3.31 -r3.32
--- a/dixfonts.c	2 Oct 2003 02:30:12 -0000	3.31
+++ b/dixfonts.c	18 Feb 2004 03:23:36 -0000	3.32
@@ -196,23 +196,13 @@
 
 /* XXX -- these two funcs may want to be broken into macros */
 static void
-#if NeedFunctionPrototypes
 UseFPE(FontPathElementPtr fpe)
-#else
-UseFPE(fpe)
-    FontPathElementPtr fpe;
-#endif
 {
     fpe->refcount++;
 }
 
 static void
-#if NeedFunctionPrototypes
 FreeFPE (FontPathElementPtr fpe)
-#else
-FreeFPE (fpe)
-    FontPathElementPtr	fpe;
-#endif
 {
     fpe->refcount--;
     if (fpe->refcount == 0) {
@@ -223,13 +213,7 @@
 }
 
 static Bool
-#if NeedFunctionPrototypes
 doOpenFont(ClientPtr client, OFclosurePtr c)
-#else
-doOpenFont(client, c)
-    ClientPtr   client;
-    OFclosurePtr c;
-#endif
 {
     FontPtr     pfont = NullFont;
     FontPathElementPtr fpe = NULL;
@@ -579,13 +563,7 @@
 }
 
 static Bool
-#if NeedFunctionPrototypes
 doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
-#else
-doListFontsAndAliases(client, c)
-    ClientPtr   client;
-    LFclosurePtr c;
-#endif
 {
     FontPathElementPtr fpe;
     int         err = Successful;
@@ -1645,12 +1623,7 @@
 
 /* does the necessary magic to figure out the fpe type */
 static int
-#if NeedFunctionPrototypes
 DetermineFPEType(char *pathname)
-#else
-DetermineFPEType(pathname)
-    char       *pathname;
-#endif
 {
     int         i;
 
@@ -1663,14 +1636,7 @@
 
 
 static void
-#if NeedFunctionPrototypes
 FreeFontPath(FontPathElementPtr *list, int n, Bool force)
-#else
-FreeFontPath(list, n, force)
-    FontPathElementPtr	*list;
-    Bool		force;
-    int         n;
-#endif
 {
     int         i;
 
@@ -1697,15 +1663,7 @@
 }
 
 static FontPathElementPtr
-#if NeedFunctionPrototypes
 find_existing_fpe(FontPathElementPtr *list, int num, unsigned char *name, int len)
-#else
-find_existing_fpe(list, num, name, len)
-    FontPathElementPtr *list;
-    int         num;
-    unsigned char *name;
-    int         len;
-#endif
 {
     FontPathElementPtr fpe;
     int         i;
@@ -1720,15 +1678,7 @@
 
 
 static int
-#if NeedFunctionPrototypes
 SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
-#else
-SetFontPathElements(npaths, paths, bad, persist)
-    int         npaths;
-    unsigned char *paths;
-    int        *bad;
-    Bool	persist;
-#endif
 {
     int         i, err = 0;
     int         valid_paths = 0;

Index: dixutils.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dixutils.c,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -d -r3.18 -r3.19
--- a/dixutils.c	18 Feb 2004 02:12:44 -0000	3.18
+++ b/dixutils.c	18 Feb 2004 03:23:36 -0000	3.19
@@ -635,7 +635,6 @@
 }
 
 Bool
-#if NeedFunctionPrototypes
 QueueWorkProc (
     Bool	(*function)(
 		ClientPtr	/* pClient */,
@@ -643,12 +642,6 @@
 		),
     ClientPtr	client,
     pointer	closure)
-#else
-QueueWorkProc (function, client, closure)
-    Bool	(*function)();
-    ClientPtr	client;
-    pointer	closure;
-#endif
 {
     WorkQueuePtr    q;
 
@@ -765,17 +758,10 @@
 static CallbackListPtr **listsToCleanup = NULL;
 
 static Bool 
-#if NeedFunctionPrototypes
 _AddCallback(
     CallbackListPtr *pcbl,
     CallbackProcPtr callback,
     pointer         data)
-#else
-_AddCallback(pcbl, callback, data)
-    CallbackListPtr *pcbl;
-    CallbackProcPtr callback;
-    pointer         data;
-#endif
 {
     CallbackPtr     cbr;
 
@@ -791,17 +777,10 @@
 }
 
 static Bool 
-#if NeedFunctionPrototypes
 _DeleteCallback(
     CallbackListPtr *pcbl,
     CallbackProcPtr callback,
     pointer         data)
-#else
-_DeleteCallback(pcbl, callback, data)
-    CallbackListPtr *pcbl;
-    CallbackProcPtr callback;
-    pointer         data;
-#endif
 {
     CallbackListPtr cbl = *pcbl;
     CallbackPtr     cbr, pcbr;
@@ -834,15 +813,9 @@
 }
 
 static void 
-#if NeedFunctionPrototypes
 _CallCallbacks(
     CallbackListPtr    *pcbl,
     pointer	    call_data)
-#else
-_CallCallbacks(pcbl, call_data)
-    CallbackListPtr    *pcbl;
-    pointer	    call_data;
-#endif
 {
     CallbackListPtr cbl = *pcbl;
     CallbackPtr     cbr, pcbr;
@@ -897,13 +870,8 @@
 }
 
 static void
-#if NeedFunctionPrototypes
 _DeleteCallbackList(
     CallbackListPtr    *pcbl)
-#else
-_DeleteCallbackList(pcbl)
-    CallbackListPtr    *pcbl;
-#endif
 {
     CallbackListPtr cbl = *pcbl;
     CallbackPtr     cbr, nextcbr;

Index: gc.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/gc.c,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -d -r3.11 -r3.12
--- a/gc.c	11 Sep 2003 05:12:50 -0000	3.11
+++ b/gc.c	18 Feb 2004 03:23:36 -0000	3.12
@@ -69,9 +69,7 @@
 extern FontPtr defaultFont;
 
 static Bool CreateDefaultTile(
-#if NeedFunctionPrototypes
     GCPtr /*pGC*/
-#endif
 );
 
 unsigned char DefaultDash[2] = {4, 4};
@@ -588,12 +586,7 @@
 */
 
 static GCPtr
-#if NeedFunctionPrototypes
 AllocateGC(ScreenPtr pScreen)
-#else
-AllocateGC(pScreen)
-    ScreenPtr pScreen;
-#endif
 {
     GCPtr pGC;
     register char *ptr;

Index: grabs.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/grabs.c,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -d -r3.6 -r3.7
--- a/grabs.c	11 Sep 2003 05:12:50 -0000	3.6
+++ b/grabs.c	18 Feb 2004 03:23:36 -0000	3.7
@@ -68,7 +68,6 @@
 #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
 
 GrabPtr
-#if NeedFunctionPrototypes
 CreateGrab(
     int client,
     DeviceIntPtr device,
@@ -81,21 +80,6 @@
     KeyCode keybut,	/* key or button */
     WindowPtr confineTo,
     CursorPtr cursor)
-#else
-CreateGrab(client, device, window, eventMask, ownerEvents, keyboardMode,
-	   pointerMode, modDevice, modifiers, type, keybut, confineTo, cursor)
-    int client;
-    DeviceIntPtr device;
-    WindowPtr window;
-    Mask eventMask;
-    Bool ownerEvents, keyboardMode, pointerMode;
-    DeviceIntPtr modDevice;
-    unsigned short modifiers;
-    int type;
-    KeyCode keybut;	/* key or button */
-    WindowPtr confineTo;
-    CursorPtr cursor;
-#endif
 {
     GrabPtr grab;
 
@@ -128,12 +112,7 @@
 }
 
 static void
-#if NeedFunctionPrototypes
 FreeGrab(GrabPtr pGrab)
-#else
-FreeGrab(pGrab)
-    GrabPtr pGrab;
-#endif
 {
     if (pGrab->modifiersDetail.pMask != NULL)
 	xfree(pGrab->modifiersDetail.pMask);
@@ -176,13 +155,7 @@
 }
 
 static Mask *
-#if NeedFunctionPrototypes
 DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
-#else
-DeleteDetailFromMask(pDetailMask, detail)
-    Mask *pDetailMask;
-    unsigned short detail;
-#endif
 {
     register Mask *mask;
     register int i;
@@ -202,22 +175,16 @@
 }
 
 static Bool
-#if NeedFunctionPrototypes
 IsInGrabMask(
     DetailRec firstDetail,
     DetailRec secondDetail,
     unsigned short exception)
-#else
-IsInGrabMask(firstDetail, secondDetail, exception)
-    DetailRec firstDetail, secondDetail;
-    unsigned short exception;
-#endif
 {
     if (firstDetail.exact == exception)
     {
 	if (firstDetail.pMask == NULL)
 	    return TRUE;
-	
+
 	/* (at present) never called with two non-null pMasks */
 	if (secondDetail.exact == exception)
 	    return FALSE;
@@ -230,15 +197,10 @@
 }
 
 static Bool 
-#if NeedFunctionPrototypes
 IdenticalExactDetails(
     unsigned short firstExact,
     unsigned short secondExact,
     unsigned short exception)
-#else
-IdenticalExactDetails(firstExact, secondExact, exception)
-    unsigned short firstExact, secondExact, exception;
-#endif
 {
     if ((firstExact == exception) || (secondExact == exception))
 	return FALSE;
@@ -250,16 +212,10 @@
 }
 
 static Bool 
-#if NeedFunctionPrototypes
 DetailSupersedesSecond(
     DetailRec firstDetail,
     DetailRec secondDetail,
     unsigned short exception)
-#else
-DetailSupersedesSecond(firstDetail, secondDetail, exception)
-    DetailRec firstDetail, secondDetail;
-    unsigned short exception;
-#endif
 {
     if (IsInGrabMask(firstDetail, secondDetail, exception))
 	return TRUE;
@@ -272,12 +228,7 @@
 }
 
 static Bool
-#if NeedFunctionPrototypes
 GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
-#else
-GrabSupersedesSecond(pFirstGrab, pSecondGrab)
-    GrabPtr pFirstGrab, pSecondGrab;
-#endif
 {
     if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail,
 				pSecondGrab->modifiersDetail, 

Index: main.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/main.c,v
retrieving revision 3.44
retrieving revision 3.45
diff -u -d -r3.44 -r3.45
--- a/main.c	18 Feb 2004 02:12:44 -0000	3.44
+++ b/main.c	18 Feb 2004 03:23:36 -0000	3.45
@@ -109,16 +109,10 @@
 #endif
 
 extern int InitClientPrivates(
-#if NeedFunctionPrototypes
     ClientPtr /*client*/
-#endif
 );
 
-extern void Dispatch(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
+extern void Dispatch(void);
 
 char *ConnectionInfo;
 xConnSetupPrefix connSetupPrefix;
@@ -644,7 +638,6 @@
 */
 
 int
-#if NeedFunctionPrototypes
 AddScreen(
     Bool	(* pfnInit)(
 	int /*index*/,
@@ -654,12 +647,6 @@
 		),
     int argc,
     char **argv)
-#else
-AddScreen(pfnInit, argc, argv)
-    Bool	(* pfnInit)();
-    int argc;
-    char **argv;
-#endif
 {
 
     int i;

Index: resource.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/resource.c,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -d -r3.15 -r3.16
--- a/resource.c	30 Sep 2003 06:02:41 -0000	3.15
+++ b/resource.c	18 Feb 2004 03:23:36 -0000	3.16
@@ -98,9 +98,7 @@
 #include <assert.h>
 
 static void RebuildTable(
-#if NeedFunctionPrototypes
     int /*client*/
-#endif
 );
 
 #define SERVER_MINID 32
@@ -256,13 +254,7 @@
 
 
 static int
-#if NeedFunctionPrototypes
 Hash(int client, register XID id)
-#else
-Hash(client, id)
-    int client;
-    register XID id;
-#endif
 {
     id &= RESOURCE_ID_MASK;
     switch (clientTable[client].hashsize)
@@ -284,17 +276,11 @@
 }
 
 static XID
-#if NeedFunctionPrototypes
 AvailableID(
     register int client,
     register XID id,
     register XID maxid,
     register XID goodid)
-#else
-AvailableID(client, id, maxid, goodid)
-    register int client;
-    register XID id, maxid, goodid;
-#endif
 {
     register ResourcePtr res;
 

Index: swaprep.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/swaprep.c,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -d -r3.9 -r3.10
--- a/swaprep.c	11 Sep 2003 05:12:50 -0000	3.9
+++ b/swaprep.c	18 Feb 2004 03:23:36 -0000	3.10
@@ -63,23 +63,17 @@
 #include "globals.h"
 
 static void SwapFontInfo(
-#if NeedFunctionPrototypes
     xQueryFontReply * /* pr */
-#endif
 );
 
 #ifndef LBX
 static void SwapCharInfo(
-#if NeedFunctionPrototypes
     xCharInfo * /* pInfo */
-#endif
     );
 
 static void SwapFont(
-#if NeedFunctionPrototypes
     xQueryFontReply * /* pr */,
     Bool /* hasGlyphs */
-#endif
     );
 #endif