[xserver-commit] xserver/dix atom.c,3.6,3.7 colormap.c,3.13,3.14

Warren Turkal xserver-commit@pdx.freedesktop.org


Committed by: wt

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

Modified Files:
	atom.c colormap.c 
Log Message:
Trivial ansification


Index: atom.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/atom.c,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -d -r3.6 -r3.7
--- atom.c	11 Sep 2003 05:12:50 -0000	3.6
+++ atom.c	14 Feb 2004 15:19:54 -0000	3.7
@@ -74,10 +74,7 @@
 void FreeAtom(NodePtr patom);
 
 Atom 
-MakeAtom(string, len, makeit)
-    char *string;
-    unsigned len;
-    Bool makeit;
+MakeAtom(char *string, unsigned len, Bool makeit)
 {
     register    NodePtr * np;
     unsigned i;
@@ -154,15 +151,13 @@
 }
 
 Bool
-ValidAtom(atom)
-    Atom atom;
+ValidAtom(Atom atom)
 {
     return (atom != None) && (atom <= lastAtom);
 }
 
 char *
-NameForAtom(atom)
-    Atom atom;
+NameForAtom(Atom atom)
 {
     NodePtr node;
     if (atom > lastAtom) return 0;
@@ -189,7 +184,7 @@
 }
 
 void
-FreeAllAtoms()
+FreeAllAtoms(void)
 {
     if(atomRoot == (NodePtr)NULL)
 	return;
@@ -201,7 +196,7 @@
 }
 
 void
-InitAtoms()
+InitAtoms(void)
 {
     FreeAllAtoms();
     tableLength = InitialTableSize;

Index: colormap.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/colormap.c,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -d -r3.13 -r3.14
--- colormap.c	15 Jan 2004 08:53:44 -0000	3.13
+++ colormap.c	14 Feb 2004 15:19:54 -0000	3.14
@@ -69,74 +69,55 @@
 extern int colormapPrivateCount;
 
 static Pixel FindBestPixel(
-#if NeedFunctionPrototypes
     EntryPtr /*pentFirst*/,
     int /*size*/,
     xrgb * /*prgb*/,
     int /*channel*/
-#endif
 );
 
 static int AllComp(
-#if NeedFunctionPrototypes
     EntryPtr /*pent*/,
     xrgb * /*prgb*/
-#endif
 );
 
 static int RedComp(
-#if NeedFunctionPrototypes
     EntryPtr /*pent*/,
     xrgb * /*prgb*/
-#endif
 );
 
 static int GreenComp(
-#if NeedFunctionPrototypes
     EntryPtr /*pent*/,
     xrgb * /*prgb*/
-#endif
 );
 
 static int BlueComp(
-#if NeedFunctionPrototypes
     EntryPtr /*pent*/,
     xrgb * /*prgb*/
-#endif
 );
 
 static void FreePixels(
-#if NeedFunctionPrototypes
     register ColormapPtr /*pmap*/,
     register int /*client*/
-#endif
 );
 
 static void CopyFree(
-#if NeedFunctionPrototypes
     int /*channel*/,
     int /*client*/,
     ColormapPtr /*pmapSrc*/,
     ColormapPtr /*pmapDst*/
-#endif
 );
 
 static void FreeCell(
-#if NeedFunctionPrototypes
     ColormapPtr /*pmap*/,
     Pixel /*i*/,
     int /*channel*/
-#endif
 );
 
 static void UpdateColors(
-#if NeedFunctionPrototypes
     ColormapPtr /*pmap*/
-#endif
 );
 
 static int AllocDirect(
-#if NeedFunctionPrototypes
     int /*client*/,
     ColormapPtr /*pmap*/,
     int /*c*/,
@@ -148,11 +129,9 @@
     Pixel * /*prmask*/,
     Pixel * /*pgmask*/,
     Pixel * /*pbmask*/
-#endif
 );
 
 static int AllocPseudo(
-#if NeedFunctionPrototypes
     int /*client*/,
     ColormapPtr /*pmap*/,
     int /*c*/,
@@ -161,11 +140,9 @@
     Pixel * /*pixels*/,
     Pixel * /*pmask*/,
     Pixel ** /*pppixFirst*/
-#endif
 );
 
 static Bool AllocCP(
-#if NeedFunctionPrototypes
     ColormapPtr /*pmap*/,
     EntryPtr /*pentFirst*/,
     int /*count*/,
@@ -173,11 +150,9 @@
     Bool /*contig*/,
     Pixel * /*pixels*/,
     Pixel * /*pMask*/
-#endif
 );
 
 static Bool AllocShared(
-#if NeedFunctionPrototypes
     ColormapPtr /*pmap*/,
     Pixel * /*ppix*/,
     int /*c*/,
@@ -188,29 +163,23 @@
     Pixel /*gmask*/,
     Pixel /*bmask*/,
     Pixel * /*ppixFirst*/
-#endif
 );
 
 static int FreeCo(
-#if NeedFunctionPrototypes
     ColormapPtr /*pmap*/,
     int /*client*/,
     int /*color*/,
     int /*npixIn*/,
     Pixel * /*ppixIn*/,
     Pixel /*mask*/
-#endif
 );
 
 static int   TellNoMap(
-#if NeedFunctionPrototypes
     WindowPtr	/*pwin*/,
     Colormap 	* /*pmid*/
-#endif
 );
 
 static void FindColorInRootCmap (
-#if NeedFunctionPrototypes
     ColormapPtr	/* pmap */,
     EntryPtr	/* pentFirst */,
     int		/* size */,
@@ -218,7 +187,6 @@
     Pixel*	/* pPixel */,
     int		/* channel */,
     ColorCompareProcPtr /* comp */
-#endif
 );
 
 #define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1)
@@ -280,15 +248,13 @@
  */
 
 
-/* Create and initialize the color map */
+/* Create and initialize the color map
+ * mid - resource to use for this colormap
+ * alloc - 1 iff all entries are alocated writeable
+ */
 int 
-CreateColormap (mid, pScreen, pVisual, ppcmap, alloc, client)
-    Colormap	mid;		/* resource to use for this colormap */
-    ScreenPtr	pScreen;
-    VisualPtr	pVisual;
-    ColormapPtr	*ppcmap;	
-    int		alloc;		/* 1 iff all entries are allocated writeable */
-    int		client;
+CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
+                ColormapPtr *ppcmap, int alloc, int client)
 {
     int		class, size;
     unsigned long sizebytes;
@@ -449,10 +415,10 @@
     return (Success);
 }
 
+/* value - must conform to DelteType
+ */
 int
-FreeColormap (value, mid)
-    pointer	value; /* must conform to DeleteType */
-    XID		mid;
+FreeColormap (pointer value, XID mid)
 {
     int		i;
     register EntryPtr pent;
@@ -509,9 +475,7 @@
 
 /* Tell window that pmid has disappeared */
 static int
-TellNoMap (pwin, pmid)
-    WindowPtr	pwin;
-    Colormap 	*pmid;
+TellNoMap (WindowPtr pwin, Colormap *pmid)
 {
     xEvent 	xE;
 
@@ -538,9 +502,7 @@
 
 /* Tell window that pmid got uninstalled */
 int
-TellLostMap (pwin, value)
-    WindowPtr	pwin;
-    pointer	value;
+TellLostMap (WindowPtr pwin, pointer value)
 {
     Colormap 	*pmid = (Colormap *)value;
     xEvent 	xE;
@@ -565,9 +527,7 @@
 
 /* Tell window that pmid got installed */
 int
-TellGainedMap (pwin, value)
-    WindowPtr	pwin;
-    pointer	value;
+TellGainedMap (WindowPtr pwin, pointer value)
 {
     Colormap 	*pmid = (Colormap *)value;
     xEvent 	xE;
@@ -592,10 +552,7 @@
 
   
 int
-CopyColormapAndFree (mid, pSrc, client)
-    Colormap	mid;
-    ColormapPtr	pSrc;
-    int		client;
+CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client)
 {
     ColormapPtr	pmap = (ColormapPtr) NULL;
     int		result, alloc, size;
@@ -642,9 +599,7 @@
 
 /* Helper routine for freeing large numbers of cells from a map */
 static void
-CopyFree (channel, client, pmapSrc, pmapDst)
-    int		channel, client;
-    ColormapPtr	pmapSrc, pmapDst;
+CopyFree (int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst)
 {
     int		z, npix, oldFree;
     EntryPtr	pentSrcFirst, pentDstFirst;
@@ -734,10 +689,7 @@
 /* Free the ith entry in a color map.  Must handle freeing of
  * colors allocated through AllocColorPlanes */
 static void
-FreeCell (pmap, i, channel)
-    ColormapPtr pmap;
-    Pixel i;
-    int	channel;
+FreeCell (ColormapPtr pmap, Pixel i, int channel)
 {
     EntryPtr pent;
     int	*pCount;
@@ -784,8 +736,7 @@
 }
 
 static void
-UpdateColors (pmap)
-    ColormapPtr	pmap;
+UpdateColors (ColormapPtr pmap)
 {
     xColorItem		*defs;
     register xColorItem *pdef;
@@ -852,11 +803,9 @@
  * Returns by changing the value in pred, pgreen, pblue and pPix
  */
 int
-AllocColor (pmap, pred, pgreen, pblue, pPix, client)
-    ColormapPtr		pmap;
-    unsigned short 	*pred, *pgreen, *pblue;
-    Pixel		*pPix;
-    int			client;
+AllocColor (ColormapPtr pmap,
+            unsigned short *pred, unsigned short *pgreen, unsigned short *pblue,
+	    Pixel *pPix, int client)
 {
     Pixel	pixR, pixG, pixB;
     int		entries;
@@ -1042,9 +991,7 @@
  */
 
 void
-FakeAllocColor (pmap, item)
-    register ColormapPtr pmap;
-    register xColorItem  *item;
+FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
 {
     Pixel	pixR, pixG, pixB;
     Pixel	temp;
@@ -1110,9 +1057,7 @@
 
 /* free a pixel value obtained from FakeAllocColor */
 void
-FakeFreeColor(pmap, pixel)
-    register ColormapPtr pmap;
-    Pixel pixel;
+FakeFreeColor(register ColormapPtr pmap, Pixel pixel)
 {
     register VisualPtr pVisual;
     Pixel pixR, pixG, pixB;
@@ -1163,12 +1108,7 @@
 				 ((r)->lower = BIGNUMLOWER-1))
 
 static void
-#if NeedFunctionPrototypes
 BigNumAdd (BigNumPtr x, BigNumPtr y, BigNumPtr r)
-#else
-BigNumAdd (x, y, r)
-    BigNumPtr	x, y, r;
-#endif
 {
     BigNumLower	lower, carry = 0;
 
@@ -1182,11 +1122,7 @@
 }
 
 static Pixel
-FindBestPixel(pentFirst, size, prgb, channel)
-    EntryPtr	pentFirst;
-    int		size;
-    xrgb	*prgb;
-    int		channel;
+FindBestPixel(EntryPtr pentFirst, int size, xrgb *prgb, int channel)
 {
     EntryPtr	pent;
     Pixel	pixel, final;
@@ -1233,14 +1169,8 @@
 }
 
 static void
-FindColorInRootCmap (pmap, pentFirst, size, prgb, pPixel, channel, comp)
-    ColormapPtr	pmap;
-    EntryPtr	pentFirst;
-    int		size;
-    xrgb*	prgb;
-    Pixel*	pPixel;
-    int		channel;
-    ColorCompareProcPtr comp;
+FindColorInRootCmap (ColormapPtr pmap, EntryPtr pentFirst, int size,
+                     xrgb *prgb, Pixel *pPixel, int channel, ColorCompareProcPtr comp)
 {
     EntryPtr    pent;
     Pixel	pixel;
@@ -1277,15 +1207,8 @@
  * load *pPixel with that value, otherwise set it to 0
  */
 int
-FindColor (pmap, pentFirst, size, prgb, pPixel, channel, client, comp)
-    ColormapPtr	pmap;
-    EntryPtr	pentFirst;
-    int		size;
-    xrgb	*prgb;
-    Pixel	*pPixel;
-    int		channel;
-    int		client;
-    ColorCompareProcPtr comp;
+FindColor (ColormapPtr pmap, EntryPtr pentFirst, int size,
+           xrgb *prgb, Pixel *pPixel, int channel, int client, ColorCompareProcPtr comp)
 {
     EntryPtr	pent;
     Bool	foundFree;
@@ -1458,9 +1381,7 @@
 /* Comparison functions -- passed to FindColor to determine if an
  * entry is already the color we're looking for or not */
 static int
-AllComp (pent, prgb)
-    EntryPtr	pent;
-    xrgb	*prgb;
+AllComp (EntryPtr pent, xrgb *prgb)
 {
     if((pent->co.local.red == prgb->red) &&
        (pent->co.local.green == prgb->green) &&
@@ -1470,9 +1391,7 @@
 }
 
 static int
-RedComp (pent, prgb)
-    EntryPtr	pent;
-    xrgb	*prgb;
+RedComp (EntryPtr pent, xrgb *prgb)
 {
     if (pent->co.local.red == prgb->red) 
 	return (1);
@@ -1480,9 +1399,7 @@
 }
 
 static int
-GreenComp (pent, prgb)
-    EntryPtr	pent;
-    xrgb	*prgb;
+GreenComp (EntryPtr pent, xrgb *prgb)
 {
     if (pent->co.local.green == prgb->green) 
 	return (1);
@@ -1490,9 +1407,7 @@
 }
 
 static int
-BlueComp (pent, prgb)
-    EntryPtr	pent;
-    xrgb	*prgb;
+BlueComp (EntryPtr pent, xrgb *prgb)
 {
     if (pent->co.local.blue == prgb->blue) 
 	return (1);
@@ -1503,11 +1418,7 @@
 /* Read the color value of a cell */
 
 int
-QueryColors (pmap, count, ppixIn, prgbList)
-    ColormapPtr	pmap;
-    int		count;
-    Pixel	*ppixIn;
-    xrgb	*prgbList;
+QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
 {
     Pixel	*ppix, pixel;
     xrgb	*prgb;
@@ -1592,9 +1503,7 @@
 }
 
 static void
-FreePixels(pmap, client)
-    register ColormapPtr	pmap;
-    register int 		client;
+FreePixels(register ColormapPtr pmap, register int client)
 {
     register Pixel		*ppix, *ppixStart;
     register int 		n;
@@ -1683,12 +1592,11 @@
     }
 }
 
-/* Free all of a client's colors and cells */
-/*ARGSUSED*/
+/* Free all of a client's colors and cells
+ * value - must conform to DeleteType
+ */
 int
-FreeClientPixels (value, fakeid)
-    pointer value;  /* must conform to DeleteType */
-    XID	fakeid;
+FreeClientPixels (pointer value, XID fakeid)
 {
     ColormapPtr pmap;
     colorResource *pcr = (colorResource *)value;
@@ -1701,13 +1609,8 @@
 }
 
 int
-AllocColorCells (client, pmap, colors, planes, contig, ppix, masks)
-    int		client;
-    ColormapPtr	pmap;
-    int		colors, planes;
-    Bool	contig;
-    Pixel	*ppix;
-    Pixel	*masks;
+AllocColorCells (int client, ColormapPtr pmap, int colors, int planes,
+                 Bool contig, Pixel *ppix, Pixel *masks)
 {
     Pixel	rmask, gmask, bmask, *ppixFirst, r, g, b;
     int		n, class;
@@ -1778,14 +1681,9 @@
 
 
 int
-AllocColorPlanes (client, pmap, colors, r, g, b, contig, pixels,
-		  prmask, pgmask, pbmask)
-    int		client;
-    ColormapPtr	pmap;
-    int		colors, r, g, b;
-    Bool	contig;
-    Pixel	*pixels;
-    Pixel	*prmask, *pgmask, *pbmask;
+AllocColorPlanes (int client, ColormapPtr pmap, int colors,
+                  int r, int g, int b, Bool contig, Pixel *pixels,
+		  Pixel *prmask, Pixel *pgmask, Pixel *pbmask)
 {
     int		ok;
     Pixel	mask, *ppixFirst;
@@ -1873,13 +1771,9 @@
 }
 
 static int
-AllocDirect (client, pmap, c, r, g, b, contig, pixels, prmask, pgmask, pbmask)
-    int		client;
-    ColormapPtr	pmap;
-    int		c, r, g, b;
-    Bool	contig;
-    Pixel	*pixels;
-    Pixel	*prmask, *pgmask, *pbmask;
+AllocDirect (int client, ColormapPtr pmap, int c,
+             int r, int g, int b, Bool contig, Pixel *pixels,
+	     Pixel *prmask, Pixel *pgmask, Pixel *pbmask)
 {
     Pixel	*ppixRed, *ppixGreen, *ppixBlue;
     Pixel	*ppix, *pDst, *p;
@@ -1997,14 +1891,8 @@
 }
 
 static int
-AllocPseudo (client, pmap, c, r, contig, pixels, pmask, pppixFirst)
-    int		client;
-    ColormapPtr	pmap;
-    int		c, r;
-    Bool	contig;
-    Pixel	*pixels;
-    Pixel	*pmask;
-    Pixel	**pppixFirst;
+AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
+             Pixel *pixels, Pixel *pmask, Pixel **pppixFirst)
 {
     Pixel	*ppix, *p, *pDst, *ppixTemp;
     int		npix;
@@ -2058,13 +1946,8 @@
  * (see AllocShared for why we care)
  */
 static Bool
-AllocCP (pmap, pentFirst, count, planes, contig, pixels, pMask)
-    ColormapPtr	pmap;
-    EntryPtr	pentFirst;
-    int		count, planes;
-    Bool	contig;
-    Pixel	*pixels, *pMask;
-    
+AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count,
+         int planes, Bool contig, Pixel *pixels, Pixel *pMask)
 {
     EntryPtr	ent;
     Pixel	pixel, base, entries, maxp, save;
@@ -2233,13 +2116,11 @@
     return (FALSE);
 }
 
+/* ppixFirst - First of the client's new pixels
+ */
 static Bool
-AllocShared (pmap, ppix, c, r, g, b, rmask, gmask, bmask, ppixFirst)
-    ColormapPtr	pmap;
-    Pixel	*ppix;
-    int		c, r, g, b;
-    Pixel	rmask, gmask, bmask;
-    Pixel	*ppixFirst;	/* First of the client's new pixels */
+AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
+             Pixel rmask, Pixel gmask, Pixel bmask, Pixel *ppixFirst)
 {
     Pixel	*pptr, *cptr;
     int		npix, z, npixClientNew, npixShared;
@@ -2371,11 +2252,7 @@
 /* Free colors and/or cells (probably slow for large numbers) */
 
 int
-FreeColors (pmap, client, count, pixels, mask)
-    ColormapPtr	pmap;
-    int		client, count;
-    Pixel	*pixels;
-    Pixel	mask;
+FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask)
 {
     int		rval, result, class;
     Pixel	rmask;
@@ -2415,15 +2292,15 @@
 
 /* Helper for FreeColors -- frees all combinations of *newpixels and mask bits
  * which the client has allocated in channel colormap cells of pmap.
- * doesn't change newpixels if it doesn't need to */
+ * doesn't change newpixels if it doesn't need to 
+ * pmap - which colormap head
+ * color - which sub-map, eg RED, BLUE, PSEUDO
+ * npixIn - number of pixels passed in
+ * ppixIn - list of base pixels
+ * mask - mask client gave us
+ */
 static int
-FreeCo (pmap, client, color, npixIn, ppixIn, mask)
-    ColormapPtr	pmap;		/* which colormap head */
-    int		client;		
-    int		color;		/* which sub-map, eg RED, BLUE, PSEUDO */
-    int		npixIn;		/* number of pixels passed in */
-    Pixel	*ppixIn;	/* list of base pixels */
-    Pixel	mask;		/* mask client gave us */ 
+FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixel mask)
 {
 
     Pixel	*ppixClient, pixTest;
@@ -2618,10 +2495,7 @@
 
 /* Redefine color values */
 int
-StoreColors (pmap, count, defs)
-    ColormapPtr	pmap;
-    int		count;
-    xColorItem	*defs;
+StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
 {
     register Pixel 	pix;
     register xColorItem *pdef;
@@ -2888,9 +2762,7 @@
 }
 
 int
-IsMapInstalled(map, pWin)
-    Colormap	map;
-    WindowPtr	pWin;
+IsMapInstalled(Colormap map, WindowPtr pWin)
 {
     Colormap	*pmaps;
     int		imap, nummaps, found;