removing NeedFunctionPrototypes and NeedNestedPrototypes patch (1/3)

Ely Levy <[email protected]>
Newsgroups gmane.comp.freedesktop.xserver
Message-ID <[email protected]>
this one does the dix dir and few other files

Ely Levy
System group
Hebrew University
Jerusalem Israel
patch1 (text/plain, 30.7 KB)
Index: dix/colormap.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/colormap.c,v
retrieving revision 3.14
diff -u -r3.14 colormap.c
--- dix/colormap.c	14 Feb 2004 15:19:54 -0000	3.14
+++ dix/colormap.c	15 Feb 2004 02:29:36 -0000
@@ -68,126 +68,39 @@
 extern XID clientErrorValue;
 extern int colormapPrivateCount;
 
-static Pixel FindBestPixel(
-    EntryPtr /*pentFirst*/,
-    int /*size*/,
-    xrgb * /*prgb*/,
-    int /*channel*/
-);
-
-static int AllComp(
-    EntryPtr /*pent*/,
-    xrgb * /*prgb*/
-);
-
-static int RedComp(
-    EntryPtr /*pent*/,
-    xrgb * /*prgb*/
-);
-
-static int GreenComp(
-    EntryPtr /*pent*/,
-    xrgb * /*prgb*/
-);
-
-static int BlueComp(
-    EntryPtr /*pent*/,
-    xrgb * /*prgb*/
-);
-
-static void FreePixels(
-    register ColormapPtr /*pmap*/,
-    register int /*client*/
-);
-
-static void CopyFree(
-    int /*channel*/,
-    int /*client*/,
-    ColormapPtr /*pmapSrc*/,
-    ColormapPtr /*pmapDst*/
-);
-
-static void FreeCell(
-    ColormapPtr /*pmap*/,
-    Pixel /*i*/,
-    int /*channel*/
-);
-
-static void UpdateColors(
-    ColormapPtr /*pmap*/
-);
-
-static int AllocDirect(
-    int /*client*/,
-    ColormapPtr /*pmap*/,
-    int /*c*/,
-    int /*r*/,
-    int /*g*/,
-    int /*b*/,
-    Bool /*contig*/,
-    Pixel * /*pixels*/,
-    Pixel * /*prmask*/,
-    Pixel * /*pgmask*/,
-    Pixel * /*pbmask*/
-);
-
-static int AllocPseudo(
-    int /*client*/,
-    ColormapPtr /*pmap*/,
-    int /*c*/,
-    int /*r*/,
-    Bool /*contig*/,
-    Pixel * /*pixels*/,
-    Pixel * /*pmask*/,
-    Pixel ** /*pppixFirst*/
-);
-
-static Bool AllocCP(
-    ColormapPtr /*pmap*/,
-    EntryPtr /*pentFirst*/,
-    int /*count*/,
-    int /*planes*/,
-    Bool /*contig*/,
-    Pixel * /*pixels*/,
-    Pixel * /*pMask*/
-);
-
-static Bool AllocShared(
-    ColormapPtr /*pmap*/,
-    Pixel * /*ppix*/,
-    int /*c*/,
-    int /*r*/,
-    int /*g*/,
-    int /*b*/,
-    Pixel /*rmask*/,
-    Pixel /*gmask*/,
-    Pixel /*bmask*/,
-    Pixel * /*ppixFirst*/
-);
-
-static int FreeCo(
-    ColormapPtr /*pmap*/,
-    int /*client*/,
-    int /*color*/,
-    int /*npixIn*/,
-    Pixel * /*ppixIn*/,
-    Pixel /*mask*/
-);
-
-static int   TellNoMap(
-    WindowPtr	/*pwin*/,
-    Colormap 	* /*pmid*/
-);
-
-static void FindColorInRootCmap (
-    ColormapPtr	/* pmap */,
-    EntryPtr	/* pentFirst */,
-    int		/* size */,
-    xrgb*	/* prgb */,
-    Pixel*	/* pPixel */,
-    int		/* channel */,
-    ColorCompareProcPtr /* comp */
-);
+static Pixel FindBestPixel(EntryPtr pentFirst, int size, xrgb *prgb, int channel);
+static int AllComp(EntryPtr pent, xrgb *prgb);
+static int RedComp(EntryPtr pent, xrgb *prgb);
+static int GreenComp(EntryPtr pent, xrgb *prgb);
+static int BlueComp(EntryPtr pent, xrgb *prgb);
+static void FreePixels(register ColormapPtr pmap,register int client);
+static void CopyFree(int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst);
+static void FreeCell(ColormapPtr pmap, Pixel i,int channel);
+static void UpdateColors(ColormapPtr pmap);
+
+static int AllocDirect(int client, ColormapPtr pmap, int c ,int r, 
+		       int g, int b, Bool contig, Pixel *pixels, 
+		       Pixel *prmask, Pixel *pgmask, Pixel *pbmask);
+
+static int AllocPseudo(int client, ColormapPtr pmap, int c, int r,
+		       Bool contig, Pixel *pixels, Pixel *pmask,
+		       Pixel **pppixFirst);
+
+static Bool AllocCP(ColormapPtr pmap, EntryPtr pentFirst, int count,
+		    int planes, Bool contig, Pixel *pixels, Pixel *pMask);
+
+static Bool AllocShared(ColormapPtr pmap, Pixel *ppix, int c,
+			int r, int g, int b, Pixel rmask,
+			Pixel gmask, Pixel bmask, Pixel *ppixFirst);
+
+static int FreeCo(ColormapPtr pmap, int client, int color,
+		  int npixIn, Pixel *ppixIn, Pixel mask);
+
+static int TellNoMap(WindowPtr pwin,Colormap *pmid);
+
+static void FindColorInRootCmap(ColormapPtr pmap, EntryPtr pentFirst, int size,
+				xrgb *prgb, Pixel *pPixel, int channel,
+				ColorCompareProcPtr comp);
 
 #define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1)
 #define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1)
Index: dix/cursor.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/cursor.c,v
retrieving revision 3.12
diff -u -r3.12 cursor.c
--- dix/cursor.c	2 Nov 2003 19:56:10 -0000	3.12
+++ dix/cursor.c	15 Feb 2004 02:29:37 -0000
@@ -76,12 +76,7 @@
 #endif
 
 static void
-#if NeedFunctionPrototypes
 FreeCursorBits(CursorBitsPtr bits)
-#else
-FreeCursorBits(bits)
-    CursorBitsPtr bits;
-#endif
 {
     if (--bits->refcnt > 0)
 	return;
Index: dix/devices.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/devices.c,v
retrieving revision 3.22
diff -u -r3.22 devices.c
--- dix/devices.c	11 Sep 2003 05:12:50 -0000	3.22
+++ dix/devices.c	15 Feb 2004 02:29:42 -0000
@@ -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,8 @@
 #ifdef AddInputDevice
 #undef AddInputDevice
 
-#if NeedFunctionPrototypes
-DevicePtr
-AddInputDevice(
-    DeviceProc deviceProc,
-    Bool autoStart)
-#else
 DevicePtr
-AddInputDevice(deviceProc, autoStart)
-    DeviceProc deviceProc;
-    Bool autoStart;
-#endif
+AddInputDevice(DeviceProc deviceProc,Bool autoStart)
 {
     return (DevicePtr)_AddInputDevice(deviceProc, autoStart);
 }
@@ -1734,14 +1715,8 @@
 #ifdef RegisterPointerDevice
 #undef RegisterPointerDevice
 
-#if NeedFunctionPrototypes
 void
 RegisterPointerDevice(DevicePtr device)
-#else
-void
-RegisterPointerDevice(device)
-    DevicePtr device;
-#endif
 {
     _RegisterPointerDevice((DeviceIntPtr)device);
 }
@@ -1750,14 +1725,8 @@
 #ifdef RegisterKeyboardDevice
 #undef RegisterKeyboardDevice
 
-#if NeedFunctionPrototypes
 void
 RegisterKeyboardDevice(DevicePtr device)
-#else
-void
-RegisterKeyboardDevice(device)
-    DevicePtr device;
-#endif
 {
     _RegisterKeyboardDevice((DeviceIntPtr)device);
 }
Index: dix/dispatch.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dispatch.c,v
retrieving revision 3.34
diff -u -r3.34 dispatch.c
--- dix/dispatch.c	12 Feb 2004 18:58:49 -0000	3.34
+++ dix/dispatch.c	15 Feb 2004 02:29:52 -0000
@@ -139,17 +139,8 @@
 HWEventQueuePtr checkForInput[2];
 extern int connBlockScreenStart;
 
-static void KillAllClients(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-static void DeleteClientFromAnySelections(
-#if NeedFunctionPrototypes
-    ClientPtr /*client*/
-#endif
-);
+static void KillAllClients(void);
+static void DeleteClientFromAnySelections(ClientPtr client);
 
 static int nextFreeClientID; /* always MIN free client ID */
 
@@ -1187,12 +1178,7 @@
 }
 
 static void
-#if NeedFunctionPrototypes
 UngrabServer(ClientPtr client)
-#else
-UngrabServer(client)
-    ClientPtr client;
-#endif
 {
     int i;
 
Index: dix/dixfonts.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dixfonts.c,v
retrieving revision 3.31
diff -u -r3.31 dixfonts.c
--- dix/dixfonts.c	2 Oct 2003 02:30:12 -0000	3.31
+++ dix/dixfonts.c	15 Feb 2004 02:29:58 -0000
@@ -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,8 @@
 }
 
 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
+find_existing_fpe(FontPathElementPtr *list, int num, 
+		  unsigned char *name, int len)
 {
     FontPathElementPtr fpe;
     int         i;
@@ -1720,15 +1679,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: dix/dixutils.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dixutils.c,v
retrieving revision 3.17
diff -u -r3.17 dixutils.c
--- dix/dixutils.c	15 Jan 2004 09:03:46 -0000	3.17
+++ dix/dixutils.c	15 Feb 2004 02:30:00 -0000
@@ -635,22 +635,8 @@
 }
 
 Bool
-#if NeedFunctionPrototypes
-QueueWorkProc (
-    Bool	(*function)(
-#if NeedNestedPrototypes
-		ClientPtr	/* pClient */,
-		pointer		/* closure */
-#endif
-		),
-    ClientPtr	client,
-    pointer	closure)
-#else
-QueueWorkProc (function, client, closure)
-    Bool	(*function)();
-    ClientPtr	client;
-    pointer	closure;
-#endif
+QueueWorkProc (Bool (*function)(ClientPtr pClient,pointer closure),
+	       ClientPtr client, pointer closure)
 {
     WorkQueuePtr    q;
 
@@ -767,17 +753,8 @@
 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
+_AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback,
+	     pointer data)
 {
     CallbackPtr     cbr;
 
@@ -793,17 +770,8 @@
 }
 
 static Bool 
-#if NeedFunctionPrototypes
-_DeleteCallback(
-    CallbackListPtr *pcbl,
-    CallbackProcPtr callback,
-    pointer         data)
-#else
-_DeleteCallback(pcbl, callback, data)
-    CallbackListPtr *pcbl;
-    CallbackProcPtr callback;
-    pointer         data;
-#endif
+_DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback,
+		pointer data)
 {
     CallbackListPtr cbl = *pcbl;
     CallbackPtr     cbr, pcbr;
@@ -836,15 +804,7 @@
 }
 
 static void 
-#if NeedFunctionPrototypes
-_CallCallbacks(
-    CallbackListPtr    *pcbl,
-    pointer	    call_data)
-#else
-_CallCallbacks(pcbl, call_data)
-    CallbackListPtr    *pcbl;
-    pointer	    call_data;
-#endif
+_CallCallbacks(CallbackListPtr *pcbl,pointer call_data)
 {
     CallbackListPtr cbl = *pcbl;
     CallbackPtr     cbr, pcbr;
@@ -899,13 +859,7 @@
 }
 
 static void
-#if NeedFunctionPrototypes
-_DeleteCallbackList(
-    CallbackListPtr    *pcbl)
-#else
-_DeleteCallbackList(pcbl)
-    CallbackListPtr    *pcbl;
-#endif
+_DeleteCallbackList(CallbackListPtr *pcbl)
 {
     CallbackListPtr cbl = *pcbl;
     CallbackPtr     cbr, nextcbr;
Index: dix/gc.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/gc.c,v
retrieving revision 3.11
diff -u -r3.11 gc.c
--- dix/gc.c	11 Sep 2003 05:12:50 -0000	3.11
+++ dix/gc.c	15 Feb 2004 02:30:03 -0000
@@ -68,11 +68,7 @@
 extern XID clientErrorValue;
 extern FontPtr defaultFont;
 
-static Bool CreateDefaultTile(
-#if NeedFunctionPrototypes
-    GCPtr /*pGC*/
-#endif
-);
+static Bool CreateDefaultTile(GCPtr); /*pGC*/
 
 unsigned char DefaultDash[2] = {4, 4};
 
@@ -588,12 +584,7 @@
 */
 
 static GCPtr
-#if NeedFunctionPrototypes
 AllocateGC(ScreenPtr pScreen)
-#else
-AllocateGC(pScreen)
-    ScreenPtr pScreen;
-#endif
 {
     GCPtr pGC;
     register char *ptr;
Index: dix/grabs.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/grabs.c,v
retrieving revision 3.6
diff -u -r3.6 grabs.c
--- dix/grabs.c	11 Sep 2003 05:12:50 -0000	3.6
+++ dix/grabs.c	15 Feb 2004 02:30:05 -0000
@@ -68,34 +68,12 @@
 #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
 
 GrabPtr
-#if NeedFunctionPrototypes
-CreateGrab(
-    int client,
-    DeviceIntPtr device,
-    WindowPtr window,
-    Mask eventMask,
-    Bool ownerEvents, Bool keyboardMode, Bool pointerMode,
-    DeviceIntPtr modDevice,
-    unsigned short modifiers,
-    int type,
-    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
+CreateGrab(int client, DeviceIntPtr device,WindowPtr window,
+	   Mask eventMask, Bool ownerEvents, Bool keyboardMode, 
+	   Bool pointerMode, DeviceIntPtr modDevice,
+	   unsigned short modifiers, int type, 
+	   KeyCode keybut,	/* key or button */
+	   WindowPtr confineTo, CursorPtr cursor)
 {
     GrabPtr grab;
 
@@ -128,12 +106,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 +149,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,16 +169,10 @@
 }
 
 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)
     {
@@ -230,15 +191,8 @@
 }
 
 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
+IdenticalExactDetails(unsigned short firstExact, unsigned short secondExact,
+		      unsigned short exception)
 {
     if ((firstExact == exception) || (secondExact == exception))
 	return FALSE;
@@ -250,16 +204,8 @@
 }
 
 static Bool 
-#if NeedFunctionPrototypes
-DetailSupersedesSecond(
-    DetailRec firstDetail,
-    DetailRec secondDetail,
-    unsigned short exception)
-#else
-DetailSupersedesSecond(firstDetail, secondDetail, exception)
-    DetailRec firstDetail, secondDetail;
-    unsigned short exception;
-#endif
+DetailSupersedesSecond(DetailRec firstDetail, DetailRec secondDetail,
+		       unsigned short exception)
 {
     if (IsInGrabMask(firstDetail, secondDetail, exception))
 	return TRUE;
@@ -272,12 +218,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: dix/main.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/main.c,v
retrieving revision 3.43
diff -u -r3.43 main.c
--- dix/main.c	4 Feb 2004 15:56:07 -0000	3.43
+++ dix/main.c	15 Feb 2004 02:30:07 -0000
@@ -108,17 +108,9 @@
 #include "dpmsproc.h"
 #endif
 
-extern int InitClientPrivates(
-#if NeedFunctionPrototypes
-    ClientPtr /*client*/
-#endif
-);
+extern int InitClientPrivates(ClientPtr client);
 
-extern void Dispatch(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
+extern void Dispatch(void);
 
 char *ConnectionInfo;
 xConnSetupPrefix connSetupPrefix;
@@ -153,13 +145,7 @@
  */
 /*ARGSUSED*/
 void
-ReplyNotSwappd(
-#if NeedNestedPrototypes
-	ClientPtr pClient ,
-	int size ,
-	void * pbuf
-#endif
-	)
+ReplyNotSwappd(	ClientPtr pClient ,int size ,void * pbuf)
 {
     FatalError("Not implemented");
 }
@@ -646,24 +632,10 @@
 */
 
 int
-#if NeedFunctionPrototypes
 AddScreen(
-    Bool	(* pfnInit)(
-#if NeedNestedPrototypes
-	int /*index*/,
-	ScreenPtr /*pScreen*/,
-	int /*argc*/,
-	char ** /*argv*/
-#endif
-		),
+    Bool (* pfnInit)(int index,	ScreenPtr pScreen,int argc,char ** argv),
     int argc,
     char **argv)
-#else
-AddScreen(pfnInit, argc, argv)
-    Bool	(* pfnInit)();
-    int argc;
-    char **argv;
-#endif
 {
 
     int i;
Index: dix/resource.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/resource.c,v
retrieving revision 3.15
diff -u -r3.15 resource.c
--- dix/resource.c	30 Sep 2003 06:02:41 -0000	3.15
+++ dix/resource.c	15 Feb 2004 02:30:09 -0000
@@ -97,11 +97,7 @@
 #endif
 #include <assert.h>
 
-static void RebuildTable(
-#if NeedFunctionPrototypes
-    int /*client*/
-#endif
-);
+static void RebuildTable(int client);
 
 #define SERVER_MINID 32
 
@@ -256,13 +252,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 +274,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;
 
@@ -628,12 +612,9 @@
  */
 
 void
-FindClientResourcesByType(
-    ClientPtr client,
-    RESTYPE type,
-    FindResType func,
-    pointer cdata
-){
+FindClientResourcesByType(ClientPtr client,RESTYPE type,
+			  FindResType func,pointer cdata)
+{
     register ResourcePtr *resources;
     register ResourcePtr this, next;
     int i, elements;
Index: dix/swaprep.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/swaprep.c,v
retrieving revision 3.9
diff -u -r3.9 swaprep.c
--- dix/swaprep.c	11 Sep 2003 05:12:50 -0000	3.9
+++ dix/swaprep.c	15 Feb 2004 02:30:13 -0000
@@ -62,25 +62,11 @@
 #include "swaprep.h"
 #include "globals.h"
 
-static void SwapFontInfo(
-#if NeedFunctionPrototypes
-    xQueryFontReply * /* pr */
-#endif
-);
+static void SwapFontInfo(xQueryFontReply *pr);
 
 #ifndef LBX
-static void SwapCharInfo(
-#if NeedFunctionPrototypes
-    xCharInfo * /* pInfo */
-#endif
-    );
-
-static void SwapFont(
-#if NeedFunctionPrototypes
-    xQueryFontReply * /* pr */,
-    Bool /* hasGlyphs */
-#endif
-    );
+static void SwapCharInfo(xCharInfo *pInfo);
+static void SwapFont(QueryFontReply *pr, Bool hasGlyphs);
 #endif
 
 /* Thanks to Jack Palevich for testing and subsequently rewriting all this */
Index: dix/tables.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/tables.c,v
retrieving revision 3.7
diff -u -r3.7 tables.c
--- dix/tables.c	11 Sep 2003 05:12:50 -0000	3.7
+++ dix/tables.c	15 Feb 2004 02:30:15 -0000
@@ -67,22 +67,14 @@
     k5_stage1(), k5_stage2(), k5_stage3(), k5_bad();
 #endif
 
-int (* InitialVector[3]) (
-#if NeedNestedPrototypes
-	ClientPtr /* client */
-#endif
-    ) =
+int (* InitialVector[3]) (ClientPtr client) =
 {
     0,
     ProcInitialConnection,
     ProcEstablishConnection
 };
 
-int (* ProcVector[256]) (
-#if NeedNestedPrototypes
-	ClientPtr /* client */
-#endif
-    ) =
+int (* ProcVector[256]) (ClientPtr client) =
 {
     ProcBadRequest,
     ProcCreateWindow,
@@ -214,11 +206,7 @@
     ProcNoOperation    
 };
 
-int (* SwappedProcVector[256]) (
-#if NeedNestedPrototypes
-	ClientPtr /* client */
-#endif
-    ) =
+int (* SwappedProcVector[256]) (ClientPtr client) =
 {
     ProcBadRequest,
     SProcCreateWindow,
Index: hw/kdrive/src/knoop.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/knoop.c,v
retrieving revision 1.5
diff -u -r1.5 knoop.c
--- hw/kdrive/src/knoop.c	2 Nov 2003 19:56:10 -0000	1.5
+++ hw/kdrive/src/knoop.c	15 Feb 2004 02:30:15 -0000
@@ -33,227 +33,64 @@
 #include "kdrive.h"
 #include <gcstruct.h>
 
-typedef void	(* typeFillSpans)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*nInit*/,
-		DDXPointPtr /*pptInit*/,
-		int * /*pwidthInit*/,
-		int /*fSorted*/
-#endif
-);
+typedef void (* typeFillSpans)(DrawablePtr pDrawable, GCPtr pGC, int nInit,
+			       DDXPointPtr pptInit, int *pwidthInit,int fSorted);
 
-typedef void	(* typeSetSpans)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		char * /*psrc*/,
-		DDXPointPtr /*ppt*/,
-		int * /*pwidth*/,
-		int /*nspans*/,
-		int /*fSorted*/
-#endif
-);
+typedef void (* typeSetSpans)(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
+			      DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
 
-typedef void	(* typePutImage)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*depth*/,
-		int /*x*/,
-		int /*y*/,
-		int /*w*/,
-		int /*h*/,
-		int /*leftPad*/,
-		int /*format*/,
-		char * /*pBits*/
-#endif
-);
+typedef void (* typePutImage)(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, 
+			      int y, int w, int h, int leftPad, int format, char *pBits);
 
-typedef RegionPtr	(* typeCopyArea)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pSrc*/,
-		DrawablePtr /*pDst*/,
-		GCPtr /*pGC*/,
-		int /*srcx*/,
-		int /*srcy*/,
-		int /*w*/,
-		int /*h*/,
-		int /*dstx*/,
-		int /*dsty*/
-#endif
-);
+typedef RegionPtr (* typeCopyArea)(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pG, 
+				   int srcx, int srcy, int w, int h, int dstx, int dsty);
 
-typedef RegionPtr	(* typeCopyPlane)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pSrcDrawable*/,
-		DrawablePtr /*pDstDrawable*/,
-		GCPtr /*pGC*/,
-		int /*srcx*/,
-		int /*srcy*/,
-		int /*width*/,
-		int /*height*/,
-		int /*dstx*/,
-		int /*dsty*/,
-		unsigned long /*bitPlane*/
-#endif
-);
-typedef void	(* typePolyPoint)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*mode*/,
-		int /*npt*/,
-		DDXPointPtr /*pptInit*/
-#endif
-);
+typedef RegionPtr (* typeCopyPlane)(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+				    GCPtr pGC, int srcx, int srcy, int width,
+				    int heigh/, int dstx, int dsty, unsigned long bitPlane);
 
-typedef void	(* typePolylines)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*mode*/,
-		int /*npt*/,
-		DDXPointPtr /*pptInit*/
-#endif
-);
+typedef void (* typePolyPoint)(DrawablePtr pDrawable, GCPtr pGC, 
+			       int mode, int npt, DDXPointPtr pptInit);
 
-typedef void	(* typePolySegment)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*nseg*/,
-		xSegment * /*pSegs*/
-#endif
-);
+typedef void (* typePolylines)(DrawablePtr pDrawable, GCPtr pGC, int mode,
+			       int npt,DDXPointPtr pptInit);
 
-typedef void	(* typePolyRectangle)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*nrects*/,
-		xRectangle * /*pRects*/
-#endif
-);
+typedef void (* typePolySegment)(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs);
 
-typedef void	(* typePolyArc)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*narcs*/,
-		xArc * /*parcs*/
-#endif
-);
+typedef void (* typePolyRectangle)(DrawablePtr pDrawable, GCPtr pGC, int nrects, xRectangle *pRects);
 
-typedef void	(* typeFillPolygon)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*shape*/,
-		int /*mode*/,
-		int /*count*/,
-		DDXPointPtr /*pPts*/
-#endif
-);
+typedef void (* typePolyArc)(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs);
 
-typedef void	(* typePolyFillRect)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*nrectFill*/,
-		xRectangle * /*prectInit*/
-#endif
-);
+typedef void (* typeFillPolygon)(DrawablePtr pDrawable, GCPtr pGC, int shape,
+				 int mode, int count, DDXPointPtr pPts);
 
-typedef void	(* typePolyFillArc)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*narcs*/,
-		xArc * /*parcs*/
-#endif
-);
+typedef void (* typePolyFillRect)(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
+				  xRectangle * prectInit);
 
-typedef int		(* typePolyText8)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*x*/,
-		int /*y*/,
-		int /*count*/,
-		char * /*chars*/
-#endif
-);
+typedef void (* typePolyFillArc)(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs);
 
-typedef int		(* typePolyText16)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*x*/,
-		int /*y*/,
-		int /*count*/,
-		unsigned short * /*chars*/
-#endif
-);
+typedef int (* typePolyText8)(DrawablePtr pDrawable, GCPtr pGC, int x,
+			      int y, int count, char *chars);
 
-typedef void	(* typeImageText8)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*x*/,
-		int /*y*/,
-		int /*count*/,
-		char * /*chars*/
-#endif
-);
+typedef int (* typePolyText16)(DrawablePtr pDrawable, GCPtr pGC, int x,
+			       int y, int count, unsigned short * chars);
 
-typedef void	(* typeImageText16)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*x*/,
-		int /*y*/,
-		int /*count*/,
-		unsigned short * /*chars*/
-#endif
-);
+typedef void (* typeImageText8)(DrawablePtr pDrawable, GCPtr pGC, int x,
+				int y, int count, char *chars);
 
-typedef void	(* typeImageGlyphBlt)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*x*/,
-		int /*y*/,
-		unsigned int /*nglyph*/,
-		CharInfoPtr * /*ppci*/,
-		pointer /*pglyphBase*/
-#endif
-);
+typedef void (* typeImageText16)(DrawablePtr pDrawable, GCPtr pGC, int x,
+				 int y, int count, unsigned short * chars);
 
-typedef void	(* typePolyGlyphBlt)(
-#if NeedNestedPrototypes
-		DrawablePtr /*pDrawable*/,
-		GCPtr /*pGC*/,
-		int /*x*/,
-		int /*y*/,
-		unsigned int /*nglyph*/,
-		CharInfoPtr * /*ppci*/,
-		pointer /*pglyphBase*/
-#endif
-);
+typedef void (* typeImageGlyphBlt)(DrawablePtr pDrawable, GCPtr pGC, int x,
+				   int y, unsigned int nglyph, CharInfoPtr *ppci,
+				   pointer pglyphBase);
 
-typedef void	(* typePushPixels)(
-#if NeedNestedPrototypes
-		GCPtr /*pGC*/,
-		PixmapPtr /*pBitMap*/,
-		DrawablePtr /*pDst*/,
-		int /*w*/,
-		int /*h*/,
-		int /*x*/,
-		int /*y*/
-#endif
-);
+typedef void (* typePolyGlyphBlt)(DrawablePtr pDrawable, GCPtr pGC, int x,
+				  int y, unsigned int nglyph, CharInfoPtr *ppci,
+				  pointer pglyphBase);
+
+typedef void (* typePushPixels)(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
+				int w, int h, int x, int y);
 
 static RegionPtr
 KdNoopCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
Index: GL/glx/glxext.h
===================================================================
RCS file: /cvs/xserver/xserver/GL/glx/glxext.h,v
retrieving revision 1.4
diff -u -r1.4 glxext.h
--- GL/glx/glxext.h	3 Jul 2003 18:05:13 -0000	1.4
+++ GL/glx/glxext.h	15 Feb 2004 02:30:16 -0000
@@ -81,7 +81,6 @@
 extern Bool __glXCoreType(void);
 
 extern int GlxInitVisuals(
-#if NeedFunctionPrototypes
     VisualPtr *       visualp,
     DepthPtr *        depthp,
     int *             nvisualp,
@@ -91,7 +90,6 @@
     unsigned long     sizes,
     int               bitsPerRGB,
     int               preferredVis
-#endif
 );
 
 #endif /* _glxext_h_ */
Index: hw/xnest/Keyboard.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xnest/Keyboard.c,v
retrieving revision 1.12
diff -u -r1.12 Keyboard.c
--- hw/xnest/Keyboard.c	4 Feb 2004 15:51:20 -0000	1.12
+++ hw/xnest/Keyboard.c	15 Feb 2004 02:30:16 -0000
@@ -39,30 +39,24 @@
 #include <X11/extensions/XKBconfig.h>
 
 extern	Bool	XkbQueryExtension(
-#if NeedFunctionPrototypes
 	Display *		/* dpy */,
 	int *			/* opcodeReturn */,
 	int *			/* eventBaseReturn */,
 	int *			/* errorBaseReturn */,
 	int *			/* majorRtrn */,
 	int *			/* minorRtrn */
-#endif
 );
 
 extern	XkbDescPtr XkbGetKeyboard(
-#if NeedFunctionPrototypes
 	Display *		/* dpy */,
 	unsigned int		/* which */,
 	unsigned int		/* deviceSpec */
-#endif
 );
 
 extern	Status	XkbGetControls(
-#if NeedFunctionPrototypes
 	Display *		/* dpy */,
 	unsigned long		/* which */,
 	XkbDescPtr		/* desc */
-#endif
 );
 
 #ifndef XKB_BASE_DIRECTORY
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.