diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2005-03-07 23:02:59 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2005-03-07 23:02:59 +0000 |
commit | 8d0e520721ab7697d2d4f639425499b79c61b43f (patch) | |
tree | ec2e9adae765ac635092eec69b22209dc6bb214d /dix | |
parent | cb0aa2b4d8875f1ea66e720ca7c6cc2f403be26a (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')
-rw-r--r-- | dix/atom.c | 11 | ||||
-rw-r--r-- | dix/colormap.c | 239 | ||||
-rw-r--r-- | dix/cursor.c | 65 | ||||
-rw-r--r-- | dix/devices.c | 172 | ||||
-rw-r--r-- | dix/dispatch.c | 334 | ||||
-rw-r--r-- | dix/dixfonts.c | 149 | ||||
-rw-r--r-- | dix/dixutils.c | 130 | ||||
-rw-r--r-- | dix/events.c | 262 | ||||
-rw-r--r-- | dix/extension.c | 34 | ||||
-rw-r--r-- | dix/gc.c | 102 | ||||
-rw-r--r-- | dix/glyphcurs.c | 11 | ||||
-rw-r--r-- | dix/grabs.c | 14 | ||||
-rw-r--r-- | dix/main.c | 15 | ||||
-rw-r--r-- | dix/pixmap.c | 24 | ||||
-rw-r--r-- | dix/privates.c | 24 | ||||
-rw-r--r-- | dix/property.c | 35 | ||||
-rw-r--r-- | dix/resource.c | 81 | ||||
-rw-r--r-- | dix/swaprep.c | 360 | ||||
-rw-r--r-- | dix/swapreq.c | 213 | ||||
-rw-r--r-- | dix/window.c | 187 |
20 files changed, 761 insertions, 1701 deletions
diff --git a/dix/atom.c b/dix/atom.c index 7509f0a24..5a62ff083 100644 --- a/dix/atom.c +++ b/dix/atom.c @@ -71,10 +71,7 @@ static NodePtr *nodeTable; 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; @@ -151,15 +148,13 @@ MakeAtom(string, len, makeit) } 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; diff --git a/dix/colormap.c b/dix/colormap.c index 947ffe46d..dc5dd405e 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/colormap.c,v 1.4 2004/08/07 00:58:21 keithp Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/colormap.c,v 1.5 2004/08/13 08:16:14 keithp Exp $ */ /* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.11 2003/11/03 05:10:59 tsi Exp $ */ /*********************************************************** @@ -245,15 +245,15 @@ typedef struct _colorResource */ -/* Create and initialize the color map */ +/** + * Create and initialize the color map + * + * \param mid resource to use for this colormap + * \param alloc 1 iff all entries are allocated writable + */ 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; @@ -414,10 +414,12 @@ CreateColormap (mid, pScreen, pVisual, ppcmap, alloc, client) return (Success); } +/** + * + * \param value must conform to DeleteType + */ int -FreeColormap (value, mid) - pointer value; /* must conform to DeleteType */ - XID mid; +FreeColormap (pointer value, XID mid) { int i; register EntryPtr pent; @@ -474,9 +476,7 @@ FreeColormap (value, mid) /* Tell window that pmid has disappeared */ static int -TellNoMap (pwin, pmid) - WindowPtr pwin; - Colormap *pmid; +TellNoMap (WindowPtr pwin, Colormap *pmid) { xEvent xE; @@ -503,9 +503,7 @@ TellNoMap (pwin, pmid) /* 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; @@ -530,9 +528,7 @@ TellLostMap (pwin, value) /* 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; @@ -557,10 +553,7 @@ TellGainedMap (pwin, value) 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; @@ -607,9 +600,7 @@ CopyColormapAndFree (mid, pSrc, client) /* 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; EntryPtr pentSrcFirst, pentDstFirst; @@ -696,10 +687,7 @@ CopyFree (channel, client, pmapSrc, pmapDst) /* 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; @@ -746,8 +734,7 @@ FreeCell (pmap, i, channel) } static void -UpdateColors (pmap) - ColormapPtr pmap; +UpdateColors (ColormapPtr pmap) { xColorItem *defs; register xColorItem *pdef; @@ -814,11 +801,9 @@ UpdateColors (pmap) * 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; @@ -1001,9 +986,7 @@ AllocColor (pmap, pred, pgreen, pblue, pPix, client) */ void -FakeAllocColor (pmap, item) - register ColormapPtr pmap; - register xColorItem *item; +FakeAllocColor (register ColormapPtr pmap, register xColorItem *item) { Pixel pixR, pixG, pixB; Pixel temp; @@ -1069,9 +1052,7 @@ FakeAllocColor (pmap, item) /* 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; @@ -1136,11 +1117,7 @@ BigNumAdd (BigNumPtr x, BigNumPtr y, BigNumPtr r) } 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; @@ -1187,14 +1164,9 @@ FindBestPixel(pentFirst, size, prgb, channel) } 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; @@ -1231,15 +1203,9 @@ FindColorInRootCmap (pmap, pentFirst, size, prgb, pPixel, channel, comp) * 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; @@ -1412,9 +1378,7 @@ gotit: /* 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) && @@ -1424,9 +1388,7 @@ AllComp (pent, prgb) } static int -RedComp (pent, prgb) - EntryPtr pent; - xrgb *prgb; +RedComp (EntryPtr pent, xrgb *prgb) { if (pent->co.local.red == prgb->red) return (1); @@ -1434,9 +1396,7 @@ RedComp (pent, prgb) } static int -GreenComp (pent, prgb) - EntryPtr pent; - xrgb *prgb; +GreenComp (EntryPtr pent, xrgb *prgb) { if (pent->co.local.green == prgb->green) return (1); @@ -1444,9 +1404,7 @@ GreenComp (pent, prgb) } static int -BlueComp (pent, prgb) - EntryPtr pent; - xrgb *prgb; +BlueComp (EntryPtr pent, xrgb *prgb) { if (pent->co.local.blue == prgb->blue) return (1); @@ -1457,11 +1415,7 @@ BlueComp (pent, prgb) /* 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; @@ -1546,9 +1500,7 @@ QueryColors (pmap, count, ppixIn, prgbList) } 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; @@ -1637,12 +1589,14 @@ FreePixels(pmap, client) } } -/* Free all of a client's colors and cells */ -/*ARGSUSED*/ +/** + * Frees all of a client's colors and cells. + * + * \param value must conform to DeleteType + * \unused fakeid + */ int -FreeClientPixels (value, fakeid) - pointer value; /* must conform to DeleteType */ - XID fakeid; +FreeClientPixels (pointer value, XID fakeid) { ColormapPtr pmap; colorResource *pcr = (colorResource *)value; @@ -1655,13 +1609,8 @@ FreeClientPixels (value, fakeid) } 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; @@ -1732,14 +1681,9 @@ AllocColorCells (client, pmap, colors, planes, contig, ppix, masks) 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; @@ -1827,13 +1771,8 @@ AllocColorPlanes (client, pmap, colors, r, g, b, contig, pixels, } 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; @@ -1951,14 +1890,8 @@ AllocDirect (client, pmap, c, r, g, b, contig, pixels, prmask, pgmask, pbmask) } 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; @@ -2012,13 +1945,8 @@ AllocPseudo (client, pmap, c, r, contig, pixels, pmask, pppixFirst) * (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; @@ -2187,13 +2115,13 @@ AllocCP (pmap, pentFirst, count, planes, contig, pixels, pMask) return (FALSE); } +/** + * + * \param 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; @@ -2322,14 +2250,11 @@ AllocShared (pmap, ppix, c, r, g, b, rmask, gmask, bmask, ppixFirst) } -/* Free colors and/or cells (probably slow for large numbers) */ - +/** FreeColors + * 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; @@ -2367,19 +2292,20 @@ FreeColors (pmap, client, count, pixels, mask) return (result); } -/* Helper for FreeColors -- frees all combinations of *newpixels and mask bits +/** + * 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 + * + * \param pmap which colormap head + * \param color which sub-map, eg, RED, BLUE, PSEUDO + * \param npixIn number of pixels passed in + * \param ppixIn number of base pixels + * \param 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; int npixClient, npixNew, npix; Pixel bits, base, cmask, rgbbad; @@ -2572,10 +2498,7 @@ FreeCo (pmap, client, color, npixIn, ppixIn, mask) /* 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; @@ -2842,9 +2765,7 @@ StoreColors (pmap, count, defs) } int -IsMapInstalled(map, pWin) - Colormap map; - WindowPtr pWin; +IsMapInstalled(Colormap map, WindowPtr pWin) { Colormap *pmaps; int imap, nummaps, found; diff --git a/dix/cursor.c b/dix/cursor.c index 9e0724fb4..b269c4e8d 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -100,14 +100,13 @@ FreeCursorBits(CursorBitsPtr bits) } } -/* - * To be called indirectly by DeleteResource; must use exactly two args +/** + * To be called indirectly by DeleteResource; must use exactly two args. + * + * \param value must conform to DeleteType */ -/*ARGSUSED*/ int -FreeCursor(value, cid) - pointer value; /* must conform to DeleteType */ - XID cid; +FreeCursor(pointer value, XID cid) { int nscr; CursorPtr pCurs = (CursorPtr)value; @@ -152,19 +151,19 @@ CheckForEmptyMask(CursorBitsPtr bits) bits->emptyMask = TRUE; } -/* +/** * does nothing about the resource table, just creates the data structure. * does not copy the src and mask bits + * + * \param psrcbits server-defined padding + * \param pmaskbits server-defined padding + * \param argb no padding */ CursorPtr -AllocCursorARGB(psrcbits, pmaskbits, argb, cm, - foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue) - unsigned char * psrcbits; /* server-defined padding */ - unsigned char * pmaskbits; /* server-defined padding */ - CARD32 * argb; /* no padding */ - CursorMetricPtr cm; - unsigned foreRed, foreGreen, foreBlue; - unsigned backRed, backGreen, backBlue; +AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, + CursorMetricPtr cm, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue) { CursorBitsPtr bits; CursorPtr pCurs; @@ -227,14 +226,16 @@ AllocCursorARGB(psrcbits, pmaskbits, argb, cm, return pCurs; } +/** + * + * \param psrcbits server-defined padding + * \param pmaskbits server-defined padding + */ CursorPtr -AllocCursor(psrcbits, pmaskbits, cm, - foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue) - unsigned char * psrcbits; /* server-defined padding */ - unsigned char * pmaskbits; /* server-defined padding */ - CursorMetricPtr cm; - unsigned foreRed, foreGreen, foreBlue; - unsigned backRed, backGreen, backBlue; +AllocCursor(unsigned char *psrcbits, unsigned char *pmaskbits, + CursorMetricPtr cm, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue) { return AllocCursorARGB (psrcbits, pmaskbits, (CARD32 *) 0, cm, foreRed, foreGreen, foreBlue, @@ -242,15 +243,10 @@ AllocCursor(psrcbits, pmaskbits, cm, } int -AllocGlyphCursor(source, sourceChar, mask, maskChar, - foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue, - ppCurs, client) - Font source, mask; - unsigned int sourceChar, maskChar; - unsigned foreRed, foreGreen, foreBlue; - unsigned backRed, backGreen, backBlue; - CursorPtr *ppCurs; - ClientPtr client; +AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue, + CursorPtr *ppCurs, ClientPtr client) { FontPtr sourcefont, maskfont; unsigned char *srcbits; @@ -422,8 +418,7 @@ AllocGlyphCursor(source, sourceChar, mask, maskChar, return Success; } -/*********************************************************** - * CreateRootCursor +/** CreateRootCursor * * look up the name of a font * open the font @@ -433,9 +428,7 @@ AllocGlyphCursor(source, sourceChar, mask, maskChar, *************************************************************/ CursorPtr -CreateRootCursor(pfilename, glyph) - char * pfilename; - unsigned int glyph; +CreateRootCursor(char *pfilename, unsigned glyph) { CursorPtr curs; FontPtr cursorfont; diff --git a/dix/devices.c b/dix/devices.c index d4e4be823..bfcd9133f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -78,9 +78,7 @@ SOFTWARE. #include "dixevents.h" DeviceIntPtr -_AddInputDevice(deviceProc, autoStart) - DeviceProc deviceProc; - Bool autoStart; +_AddInputDevice(DeviceProc deviceProc, Bool autoStart) { register DeviceIntPtr dev; @@ -127,8 +125,7 @@ _AddInputDevice(deviceProc, autoStart) } Bool -EnableDevice(dev) - register DeviceIntPtr dev; +EnableDevice(register DeviceIntPtr dev) { register DeviceIntPtr *prev; @@ -146,8 +143,7 @@ EnableDevice(dev) } Bool -DisableDevice(dev) - register DeviceIntPtr dev; +DisableDevice(register DeviceIntPtr dev) { register DeviceIntPtr *prev; @@ -302,8 +298,7 @@ CloseDownDevices() } void -RemoveDevice(dev) - register DeviceIntPtr dev; +RemoveDevice(register DeviceIntPtr dev) { register DeviceIntPtr prev,tmp,next; @@ -353,8 +348,7 @@ NumMotionEvents() } void -_RegisterPointerDevice(device) - DeviceIntPtr device; +_RegisterPointerDevice(DeviceIntPtr device) { inputInfo.pointer = device; #ifdef XKB @@ -380,8 +374,7 @@ _RegisterPointerDevice(device) } void -_RegisterKeyboardDevice(device) - DeviceIntPtr device; +_RegisterKeyboardDevice(DeviceIntPtr device) { inputInfo.keyboard = device; #ifdef XKB @@ -419,8 +412,7 @@ LookupPointerDevice() } DevicePtr -LookupDevice(id) - int id; +LookupDevice(int id) { DeviceIntPtr dev; @@ -436,8 +428,7 @@ LookupDevice(id) } void -QueryMinMaxKeyCodes(minCode, maxCode) - KeyCode *minCode, *maxCode; +QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode) { if (inputInfo.keyboard) { *minCode = inputInfo.keyboard->key->curKeySyms.minKeyCode; @@ -446,8 +437,7 @@ QueryMinMaxKeyCodes(minCode, maxCode) } Bool -SetKeySymsMap(dst, src) - register KeySymsPtr dst, src; +SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src) { int i, j; int rowDif = src->minKeyCode - dst->minKeyCode; @@ -538,10 +528,7 @@ InitModMap(register KeyClassPtr keyc) } Bool -InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers) - DeviceIntPtr dev; - KeySymsPtr pKeySyms; - CARD8 pModifiers[]; +InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[]) { int i; register KeyClassPtr keyc; @@ -579,10 +566,8 @@ InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers) } Bool -InitButtonClassDeviceStruct(dev, numButtons, map) - register DeviceIntPtr dev; - int numButtons; - CARD8 *map; +InitButtonClassDeviceStruct(register DeviceIntPtr dev, int numButtons, + CARD8 *map) { register ButtonClassPtr butc; int i; @@ -605,12 +590,9 @@ InitButtonClassDeviceStruct(dev, numButtons, map) } Bool -InitValuatorClassDeviceStruct(dev, numAxes, motionProc, numMotionEvents, mode) - DeviceIntPtr dev; - ValuatorMotionProcPtr motionProc; - int numAxes; - int numMotionEvents; - int mode; +InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, + ValuatorMotionProcPtr motionProc, + int numMotionEvents, int mode) { int i; register ValuatorClassPtr valc; @@ -634,8 +616,7 @@ InitValuatorClassDeviceStruct(dev, numAxes, motionProc, numMotionEvents, mode) } Bool -InitFocusClassDeviceStruct(dev) - DeviceIntPtr dev; +InitFocusClassDeviceStruct(DeviceIntPtr dev) { register FocusClassPtr focc; @@ -653,10 +634,8 @@ InitFocusClassDeviceStruct(dev) } Bool -InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc) - DeviceIntPtr dev; - BellProcPtr bellProc; - KbdCtrlProcPtr controlProc; +InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, + KbdCtrlProcPtr controlProc) { register KbdFeedbackPtr feedc; @@ -683,9 +662,7 @@ InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc) } Bool -InitPtrFeedbackClassDeviceStruct(dev, controlProc) - DeviceIntPtr dev; - PtrCtrlProcPtr controlProc; +InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) { register PtrFeedbackPtr feedc; @@ -726,13 +703,9 @@ IntegerCtrl defaultIntegerControl = { 0}; Bool -InitStringFeedbackClassDeviceStruct (dev, controlProc, max_symbols, - num_symbols_supported, symbols) - DeviceIntPtr dev; - StringCtrlProcPtr controlProc; - int max_symbols; - int num_symbols_supported; - KeySym *symbols; +InitStringFeedbackClassDeviceStruct ( + DeviceIntPtr dev, StringCtrlProcPtr controlProc, + int max_symbols, int num_symbols_supported, KeySym *symbols) { int i; register StringFeedbackPtr feedc; @@ -770,10 +743,8 @@ InitStringFeedbackClassDeviceStruct (dev, controlProc, max_symbols, } Bool -InitBellFeedbackClassDeviceStruct (dev, bellProc, controlProc) - DeviceIntPtr dev; - BellProcPtr bellProc; - BellCtrlProcPtr controlProc; +InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc, + BellCtrlProcPtr controlProc) { register BellFeedbackPtr feedc; @@ -792,9 +763,7 @@ InitBellFeedbackClassDeviceStruct (dev, bellProc, controlProc) } Bool -InitLedFeedbackClassDeviceStruct (dev, controlProc) - DeviceIntPtr dev; - LedCtrlProcPtr controlProc; +InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc) { register LedFeedbackPtr feedc; @@ -815,9 +784,7 @@ InitLedFeedbackClassDeviceStruct (dev, controlProc) } Bool -InitIntegerFeedbackClassDeviceStruct (dev, controlProc) - DeviceIntPtr dev; - IntegerCtrlProcPtr controlProc; +InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc) { register IntegerFeedbackPtr feedc; @@ -835,14 +802,9 @@ InitIntegerFeedbackClassDeviceStruct (dev, controlProc) } Bool -InitPointerDeviceStruct(device, map, numButtons, motionProc, controlProc, - numMotionEvents) - DevicePtr device; - CARD8 *map; - int numButtons; - PtrCtrlProcPtr controlProc; - ValuatorMotionProcPtr motionProc; - int numMotionEvents; +InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, + ValuatorMotionProcPtr motionProc, + PtrCtrlProcPtr controlProc, int numMotionEvents) { DeviceIntPtr dev = (DeviceIntPtr)device; @@ -853,12 +815,9 @@ InitPointerDeviceStruct(device, map, numButtons, motionProc, controlProc, } Bool -InitKeyboardDeviceStruct(device, pKeySyms, pModifiers, bellProc, controlProc) - DevicePtr device; - KeySymsPtr pKeySyms; - CARD8 pModifiers[]; - BellProcPtr bellProc; - KbdCtrlProcPtr controlProc; +InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms, + CARD8 pModifiers[], BellProcPtr bellProc, + KbdCtrlProcPtr controlProc) { DeviceIntPtr dev = (DeviceIntPtr)device; @@ -868,10 +827,8 @@ InitKeyboardDeviceStruct(device, pKeySyms, pModifiers, bellProc, controlProc) } void -SendMappingNotify(request, firstKeyCode, count, client) - unsigned int request, count; - unsigned int firstKeyCode; - ClientPtr client; +SendMappingNotify(unsigned request, unsigned firstKeyCode, unsigned count, + ClientPtr client) { int i; xEvent event; @@ -914,11 +871,7 @@ SendMappingNotify(request, firstKeyCode, count, client) * sort it to do the checking. How often is it called? Just being lazy? */ Bool -BadDeviceMap(buff, length, low, high, errval) - register BYTE *buff; - int length; - unsigned low, high; - XID *errval; +BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *errval) { register int i, j; @@ -966,8 +919,7 @@ AllModifierKeysAreUp(dev, map1, per1, map2, per2) } int -ProcSetModifierMapping(client) - ClientPtr client; +ProcSetModifierMapping(ClientPtr client) { xSetModifierMappingReply rep; REQUEST(xSetModifierMappingReq); @@ -1078,8 +1030,7 @@ ProcSetModifierMapping(client) } int -ProcGetModifierMapping(client) - ClientPtr client; +ProcGetModifierMapping(ClientPtr client) { xGetModifierMappingReply rep; register KeyClassPtr keyc = inputInfo.keyboard->key; @@ -1100,8 +1051,7 @@ ProcGetModifierMapping(client) } int -ProcChangeKeyboardMapping(client) - ClientPtr client; +ProcChangeKeyboardMapping(ClientPtr client) { REQUEST(xChangeKeyboardMappingReq); unsigned len; @@ -1146,8 +1096,7 @@ ProcChangeKeyboardMapping(client) } int -ProcSetPointerMapping(client) - ClientPtr client; +ProcSetPointerMapping(ClientPtr client) { REQUEST(xSetPointerMappingReq); BYTE *map; @@ -1186,8 +1135,7 @@ ProcSetPointerMapping(client) } int -ProcGetKeyboardMapping(client) - ClientPtr client; +ProcGetKeyboardMapping(ClientPtr client) { xGetKeyboardMappingReply rep; REQUEST(xGetKeyboardMappingReq); @@ -1225,8 +1173,7 @@ ProcGetKeyboardMapping(client) } int -ProcGetPointerMapping(client) - ClientPtr client; +ProcGetPointerMapping(ClientPtr client) { xGetPointerMappingReply rep; ButtonClassPtr butc = inputInfo.pointer->button; @@ -1242,10 +1189,7 @@ ProcGetPointerMapping(client) } void -NoteLedState(keybd, led, on) - DeviceIntPtr keybd; - int led; - Bool on; +NoteLedState(DeviceIntPtr keybd, int led, Bool on) { KeybdCtrl *ctrl = &keybd->kbdfeed->ctrl; if (on) @@ -1255,8 +1199,7 @@ NoteLedState(keybd, led, on) } int -Ones(mask) /* HACKMEM 169 */ - unsigned long mask; +Ones(unsigned long mask) /* HACKMEM 169 */ { register unsigned long y; @@ -1266,8 +1209,7 @@ Ones(mask) /* HACKMEM 169 */ } int -ProcChangeKeyboardControl (client) - ClientPtr client; +ProcChangeKeyboardControl (ClientPtr client) { #define DO_ALL (-1) KeybdCtrl ctrl; @@ -1457,8 +1399,7 @@ ProcChangeKeyboardControl (client) } int -ProcGetKeyboardControl (client) - ClientPtr client; +ProcGetKeyboardControl (ClientPtr client) { int i; register KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl; @@ -1481,8 +1422,7 @@ ProcGetKeyboardControl (client) } int -ProcBell(client) - ClientPtr client; +ProcBell(ClientPtr client) { register DeviceIntPtr keybd = inputInfo.keyboard; int base = keybd->kbdfeed->ctrl.bell; @@ -1511,8 +1451,7 @@ ProcBell(client) } int -ProcChangePointerControl(client) - ClientPtr client; +ProcChangePointerControl(ClientPtr client) { DeviceIntPtr mouse = inputInfo.pointer; PtrCtrl ctrl; /* might get BadValue part way through */ @@ -1566,8 +1505,7 @@ ProcChangePointerControl(client) } int -ProcGetPointerControl(client) - ClientPtr client; +ProcGetPointerControl(ClientPtr client) { register PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl; xGetPointerControlReply rep; @@ -1584,9 +1522,7 @@ ProcGetPointerControl(client) } void -MaybeStopHint(dev, client) - register DeviceIntPtr dev; - ClientPtr client; +MaybeStopHint(register DeviceIntPtr dev, ClientPtr client) { GrabPtr grab = dev->grab; @@ -1602,8 +1538,7 @@ MaybeStopHint(dev, client) } int -ProcGetMotionEvents(client) - ClientPtr client; +ProcGetMotionEvents(ClientPtr client) { WindowPtr pWin; xTimecoord * coords = (xTimecoord *) NULL; @@ -1670,8 +1605,7 @@ ProcGetMotionEvents(client) } int -ProcQueryKeymap(client) - ClientPtr client; +ProcQueryKeymap(ClientPtr client) { xQueryKeymapReply rep; int i; @@ -1703,9 +1637,7 @@ ProcQueryKeymap(client) #undef AddInputDevice DevicePtr -AddInputDevice( - DeviceProc deviceProc, - Bool autoStart) +AddInputDevice(DeviceProc deviceProc, Bool autoStart) { return (DevicePtr)_AddInputDevice(deviceProc, autoStart); } diff --git a/dix/dispatch.c b/dix/dispatch.c index 69debb5e8..2f24e6126 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.4 2004/07/29 18:43:58 stukreit Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.6 2004/09/15 09:05:22 eich Exp $ */ /* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ /************************************************************ @@ -144,13 +144,9 @@ CallbackListPtr ServerGrabCallback = NULL; HWEventQueuePtr checkForInput[2]; extern int connBlockScreenStart; -static void KillAllClients( - void -); +static void KillAllClients(void); -static void DeleteClientFromAnySelections( - ClientPtr /*client*/ -); +static void DeleteClientFromAnySelections(ClientPtr client); static int nextFreeClientID; /* always MIN free client ID */ @@ -171,8 +167,7 @@ XID clientErrorValue; /* XXX this is a kludge */ (a.pScreen == b.pScreen)) void -SetInputCheck(c0, c1) - HWEventQueuePtr c0, c1; +SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1) { checkForInput[0] = c0; checkForInput[1] = c1; @@ -220,8 +215,7 @@ InitSelections() } void -FlushClientCaches(id) - XID id; +FlushClientCaches(XID id) { int i; register ClientPtr client; @@ -488,17 +482,14 @@ Dispatch(void) #undef MAJOROP -/*ARGSUSED*/ int -ProcBadRequest(client) - ClientPtr client; +ProcBadRequest(ClientPtr client) { return (BadRequest); } int -ProcCreateWindow(client) - register ClientPtr client; +ProcCreateWindow(ClientPtr client) { register WindowPtr pParent, pWin; REQUEST(xCreateWindowReq); @@ -541,8 +532,7 @@ ProcCreateWindow(client) } int -ProcChangeWindowAttributes(client) - register ClientPtr client; +ProcChangeWindowAttributes(register ClientPtr client) { register WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); @@ -568,8 +558,7 @@ ProcChangeWindowAttributes(client) } int -ProcGetWindowAttributes(client) - register ClientPtr client; +ProcGetWindowAttributes(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -586,8 +575,7 @@ ProcGetWindowAttributes(client) } int -ProcDestroyWindow(client) - register ClientPtr client; +ProcDestroyWindow(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -603,8 +591,7 @@ ProcDestroyWindow(client) } int -ProcDestroySubwindows(client) - register ClientPtr client; +ProcDestroySubwindows(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -619,8 +606,7 @@ ProcDestroySubwindows(client) } int -ProcChangeSaveSet(client) - register ClientPtr client; +ProcChangeSaveSet(register ClientPtr client) { register WindowPtr pWin; REQUEST(xChangeSaveSetReq); @@ -649,8 +635,7 @@ ProcChangeSaveSet(client) } int -ProcReparentWindow(client) - register ClientPtr client; +ProcReparentWindow(register ClientPtr client) { register WindowPtr pWin, pParent; REQUEST(xReparentWindowReq); @@ -685,8 +670,7 @@ ProcReparentWindow(client) } int -ProcMapWindow(client) - register ClientPtr client; +ProcMapWindow(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -702,8 +686,7 @@ ProcMapWindow(client) } int -ProcMapSubwindows(client) - register ClientPtr client; +ProcMapSubwindows(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -719,8 +702,7 @@ ProcMapSubwindows(client) } int -ProcUnmapWindow(client) - register ClientPtr client; +ProcUnmapWindow(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -736,8 +718,7 @@ ProcUnmapWindow(client) } int -ProcUnmapSubwindows(client) - register ClientPtr client; +ProcUnmapSubwindows(register ClientPtr client) { register WindowPtr pWin; REQUEST(xResourceReq); @@ -752,8 +733,7 @@ ProcUnmapSubwindows(client) } int -ProcConfigureWindow(client) - register ClientPtr client; +ProcConfigureWindow(register ClientPtr client) { register WindowPtr pWin; REQUEST(xConfigureWindowReq); @@ -777,8 +757,7 @@ ProcConfigureWindow(client) } int -ProcCirculateWindow(client) - register ClientPtr client; +ProcCirculateWindow(register ClientPtr client) { register WindowPtr pWin; REQUEST(xCirculateWindowReq); @@ -799,9 +778,7 @@ ProcCirculateWindow(client) } int -GetGeometry(client, rep) - register ClientPtr client; - xGetGeometryReply *rep; +GetGeometry(register ClientPtr client, xGetGeometryReply *rep) { register DrawablePtr pDraw; REQUEST(xResourceReq); @@ -842,8 +819,7 @@ GetGeometry(client, rep) int -ProcGetGeometry(client) - register ClientPtr client; +ProcGetGeometry(register ClientPtr client) { xGetGeometryReply rep; int status; @@ -857,8 +833,7 @@ ProcGetGeometry(client) int -ProcQueryTree(client) - register ClientPtr client; +ProcQueryTree(register ClientPtr client) { xQueryTreeReply reply; int numChildren = 0; @@ -907,8 +882,7 @@ ProcQueryTree(client) } int -ProcInternAtom(client) - register ClientPtr client; +ProcInternAtom(register ClientPtr client) { Atom atom; char *tchar; @@ -937,8 +911,7 @@ ProcInternAtom(client) } int -ProcGetAtomName(client) - register ClientPtr client; +ProcGetAtomName(register ClientPtr client) { char *str; xGetAtomNameReply reply; @@ -969,8 +942,7 @@ extern int k5_bad(); #endif int -ProcSetSelectionOwner(client) - register ClientPtr client; +ProcSetSelectionOwner(register ClientPtr client) { WindowPtr pWin; TimeStamp time; @@ -1066,8 +1038,7 @@ ProcSetSelectionOwner(client) } int -ProcGetSelectionOwner(client) - register ClientPtr client; +ProcGetSelectionOwner(register ClientPtr client) { REQUEST(xResourceReq); @@ -1098,8 +1069,7 @@ ProcGetSelectionOwner(client) } int -ProcConvertSelection(client) - register ClientPtr client; +ProcConvertSelection(register ClientPtr client) { Bool paramsOkay; xEvent event; @@ -1163,8 +1133,7 @@ ProcConvertSelection(client) } int -ProcGrabServer(client) - register ClientPtr client; +ProcGrabServer(register ClientPtr client) { REQUEST_SIZE_MATCH(xReq); if (grabState != GrabNone && client != grabClient) @@ -1218,8 +1187,7 @@ UngrabServer(ClientPtr client) } int -ProcUngrabServer(client) - register ClientPtr client; +ProcUngrabServer(register ClientPtr client) { REQUEST_SIZE_MATCH(xReq); UngrabServer(client); @@ -1227,8 +1195,7 @@ ProcUngrabServer(client) } int -ProcTranslateCoords(client) - register ClientPtr client; +ProcTranslateCoords(register ClientPtr client) { REQUEST(xTranslateCoordsReq); @@ -1300,8 +1267,7 @@ ProcTranslateCoords(client) } int -ProcOpenFont(client) - register ClientPtr client; +ProcOpenFont(register ClientPtr client) { int err; REQUEST(xOpenFontReq); @@ -1320,8 +1286,7 @@ ProcOpenFont(client) } int -ProcCloseFont(client) - register ClientPtr client; +ProcCloseFont(register ClientPtr client) { FontPtr pFont; REQUEST(xResourceReq); @@ -1342,8 +1307,7 @@ ProcCloseFont(client) } int -ProcQueryFont(client) - register ClientPtr client; +ProcQueryFont(register ClientPtr client) { xQueryFontReply *reply; FontPtr pFont; @@ -1402,8 +1366,7 @@ ProcQueryFont(client) } int -ProcQueryTextExtents(client) - register ClientPtr client; +ProcQueryTextExtents(register ClientPtr client) { REQUEST(xQueryTextExtentsReq); xQueryTextExtentsReply reply; @@ -1453,8 +1416,7 @@ ProcQueryTextExtents(client) } int -ProcListFonts(client) - register ClientPtr client; +ProcListFonts(register ClientPtr client) { REQUEST(xListFontsReq); @@ -1465,8 +1427,7 @@ ProcListFonts(client) } int -ProcListFontsWithInfo(client) - register ClientPtr client; +ProcListFontsWithInfo(register ClientPtr client) { REQUEST(xListFontsWithInfoReq); @@ -1476,19 +1437,19 @@ ProcListFontsWithInfo(client) (unsigned char *) &stuff[1], stuff->maxNames); } -/*ARGSUSED*/ +/** + * + * \param value must conform to DeleteType + */ int -dixDestroyPixmap(value, pid) - pointer value; /* must conform to DeleteType */ - XID pid; +dixDestroyPixmap(pointer value, XID pid) { PixmapPtr pPixmap = (PixmapPtr)value; return (*pPixmap->drawable.pScreen->DestroyPixmap)(pPixmap); } int -ProcCreatePixmap(client) - register ClientPtr client; +ProcCreatePixmap(register ClientPtr client) { PixmapPtr pMap; register DrawablePtr pDraw; @@ -1530,8 +1491,7 @@ CreatePmap: } int -ProcFreePixmap(client) - register ClientPtr client; +ProcFreePixmap(register ClientPtr client) { PixmapPtr pMap; @@ -1553,8 +1513,7 @@ ProcFreePixmap(client) } int -ProcCreateGC(client) - register ClientPtr client; +ProcCreateGC(register ClientPtr client) { int error; GC *pGC; @@ -1580,8 +1539,7 @@ ProcCreateGC(client) } int -ProcChangeGC(client) - register ClientPtr client; +ProcChangeGC(register ClientPtr client) { GC *pGC; REQUEST(xChangeGCReq); @@ -1605,8 +1563,7 @@ ProcChangeGC(client) } int -ProcCopyGC(client) - register ClientPtr client; +ProcCopyGC(register ClientPtr client) { register GC *dstGC; register GC *pGC; @@ -1629,8 +1586,7 @@ ProcCopyGC(client) } int -ProcSetDashes(client) - register ClientPtr client; +ProcSetDashes(register ClientPtr client) { register GC *pGC; int result; @@ -1657,8 +1613,7 @@ ProcSetDashes(client) } int -ProcSetClipRectangles(client) - register ClientPtr client; +ProcSetClipRectangles(register ClientPtr client) { int nr; int result; @@ -1687,8 +1642,7 @@ ProcSetClipRectangles(client) } int -ProcFreeGC(client) - register ClientPtr client; +ProcFreeGC(register ClientPtr client) { register GC *pGC; REQUEST(xResourceReq); @@ -1700,8 +1654,7 @@ ProcFreeGC(client) } int -ProcClearToBackground(client) - register ClientPtr client; +ProcClearToBackground(register ClientPtr client) { REQUEST(xClearAreaReq); register WindowPtr pWin; @@ -1728,8 +1681,7 @@ ProcClearToBackground(client) } int -ProcCopyArea(client) - register ClientPtr client; +ProcCopyArea(register ClientPtr client) { register DrawablePtr pDst; register DrawablePtr pSrc; @@ -1770,8 +1722,7 @@ ProcCopyArea(client) } int -ProcCopyPlane(client) - register ClientPtr client; +ProcCopyPlane(register ClientPtr client) { register DrawablePtr psrcDraw, pdstDraw; register GC *pGC; @@ -1818,8 +1769,7 @@ ProcCopyPlane(client) } int -ProcPolyPoint(client) - register ClientPtr client; +ProcPolyPoint(register ClientPtr client) { int npoint; register GC *pGC; @@ -1842,8 +1792,7 @@ ProcPolyPoint(client) } int -ProcPolyLine(client) - register ClientPtr client; +ProcPolyLine(register ClientPtr client) { int npoint; register GC *pGC; @@ -1866,8 +1815,7 @@ ProcPolyLine(client) } int -ProcPolySegment(client) - register ClientPtr client; +ProcPolySegment(register ClientPtr client) { int nsegs; register GC *pGC; @@ -1886,8 +1834,7 @@ ProcPolySegment(client) } int -ProcPolyRectangle (client) - register ClientPtr client; +ProcPolyRectangle (register ClientPtr client) { int nrects; register GC *pGC; @@ -1907,8 +1854,7 @@ ProcPolyRectangle (client) } int -ProcPolyArc(client) - register ClientPtr client; +ProcPolyArc(register ClientPtr client) { int narcs; register GC *pGC; @@ -1927,8 +1873,7 @@ ProcPolyArc(client) } int -ProcFillPoly(client) - register ClientPtr client; +ProcFillPoly(register ClientPtr client) { int things; register GC *pGC; @@ -1959,8 +1904,7 @@ ProcFillPoly(client) } int -ProcPolyFillRectangle(client) - register ClientPtr client; +ProcPolyFillRectangle(register ClientPtr client) { int things; register GC *pGC; @@ -1981,8 +1925,7 @@ ProcPolyFillRectangle(client) } int -ProcPolyFillArc(client) - register ClientPtr client; +ProcPolyFillArc(register ClientPtr client) { int narcs; register GC *pGC; @@ -2055,8 +1998,7 @@ ReformatImage (char *base, int nbytes, int bpp, int order) * boundary, even if the scanlines are padded to our satisfaction. */ int -ProcPutImage(client) - register ClientPtr client; +ProcPutImage(register ClientPtr client) { register GC *pGC; register DrawablePtr pDraw; @@ -2114,13 +2056,9 @@ ProcPutImage(client) int -DoGetImage(client, format, drawable, x, y, width, height, planemask, im_return) - register ClientPtr client; - Drawable drawable; - int format; - int x, y, width, height; - Mask planemask; - xGetImageReply **im_return; +DoGetImage(register ClientPtr client, int format, Drawable drawable, + int x, int y, int width, int height, + Mask planemask, xGetImageReply **im_return) { register DrawablePtr pDraw; int nlines, linesPerBuf; @@ -2344,8 +2282,7 @@ DoGetImage(client, format, drawable, x, y, width, height, planemask, im_return) } int -ProcGetImage(client) - register ClientPtr client; +ProcGetImage(register ClientPtr client) { REQUEST(xGetImageReq); @@ -2358,8 +2295,7 @@ ProcGetImage(client) } int -ProcPolyText(client) - register ClientPtr client; +ProcPolyText(register ClientPtr client) { int err; REQUEST(xPolyTextReq); @@ -2388,8 +2324,7 @@ ProcPolyText(client) } int -ProcImageText8(client) - register ClientPtr client; +ProcImageText8(register ClientPtr client) { int err; register DrawablePtr pDraw; @@ -2419,8 +2354,7 @@ ProcImageText8(client) } int -ProcImageText16(client) - register ClientPtr client; +ProcImageText16(register ClientPtr client) { int err; register DrawablePtr pDraw; @@ -2451,8 +2385,7 @@ ProcImageText16(client) int -ProcCreateColormap(client) - register ClientPtr client; +ProcCreateColormap(register ClientPtr client) { VisualPtr pVisual; ColormapPtr pmap; @@ -2495,8 +2428,7 @@ ProcCreateColormap(client) } int -ProcFreeColormap(client) - register ClientPtr client; +ProcFreeColormap(register ClientPtr client) { ColormapPtr pmap; REQUEST(xResourceReq); @@ -2520,8 +2452,7 @@ ProcFreeColormap(client) int -ProcCopyColormapAndFree(client) - register ClientPtr client; +ProcCopyColormapAndFree(register ClientPtr client) { Colormap mid; ColormapPtr pSrcMap; @@ -2548,8 +2479,7 @@ ProcCopyColormapAndFree(client) } int -ProcInstallColormap(client) - register ClientPtr client; +ProcInstallColormap(register ClientPtr client) { ColormapPtr pcmp; REQUEST(xResourceReq); @@ -2570,8 +2500,7 @@ ProcInstallColormap(client) } int -ProcUninstallColormap(client) - register ClientPtr client; +ProcUninstallColormap(register ClientPtr client) { ColormapPtr pcmp; REQUEST(xResourceReq); @@ -2593,8 +2522,7 @@ ProcUninstallColormap(client) } int -ProcListInstalledColormaps(client) - register ClientPtr client; +ProcListInstalledColormaps(register ClientPtr client) { xListInstalledColormapsReply *preply; int nummaps; @@ -2629,8 +2557,7 @@ ProcListInstalledColormaps(client) } int -ProcAllocColor(client) - register ClientPtr client; +ProcAllocColor (register ClientPtr client) { ColormapPtr pmap; int retval; @@ -2681,8 +2608,7 @@ ProcAllocColor(client) } int -ProcAllocNamedColor (client) - register ClientPtr client; +ProcAllocNamedColor (register ClientPtr client) { ColormapPtr pcmp; REQUEST(xAllocNamedColorReq); @@ -2743,8 +2669,7 @@ ProcAllocNamedColor (client) } int -ProcAllocColorCells (client) - register ClientPtr client; +ProcAllocColorCells (register ClientPtr client) { ColormapPtr pcmp; REQUEST(xAllocColorCellsReq); @@ -2819,8 +2744,7 @@ ProcAllocColorCells (client) } int -ProcAllocColorPlanes(client) - register ClientPtr client; +ProcAllocColorPlanes(register ClientPtr client) { ColormapPtr pcmp; REQUEST(xAllocColorPlanesReq); @@ -2893,8 +2817,7 @@ ProcAllocColorPlanes(client) } int -ProcFreeColors (client) - register ClientPtr client; +ProcFreeColors(register ClientPtr client) { ColormapPtr pcmp; REQUEST(xFreeColorsReq); @@ -2929,8 +2852,7 @@ ProcFreeColors (client) } int -ProcStoreColors (client) - register ClientPtr client; +ProcStoreColors (ClientPtr client) { ColormapPtr pcmp; REQUEST(xStoreColorsReq); @@ -2964,8 +2886,7 @@ ProcStoreColors (client) } int -ProcStoreNamedColor (client) - register ClientPtr client; +ProcStoreNamedColor (register ClientPtr client) { ColormapPtr pcmp; REQUEST(xStoreNamedColorReq); @@ -2999,8 +2920,7 @@ ProcStoreNamedColor (client) } int -ProcQueryColors(client) - register ClientPtr client; +ProcQueryColors(register ClientPtr client) { ColormapPtr pcmp; REQUEST(xQueryColorsReq); @@ -3051,8 +2971,7 @@ ProcQueryColors(client) } int -ProcLookupColor(client) - register ClientPtr client; +ProcLookupColor(register ClientPtr client) { ColormapPtr pcmp; REQUEST(xLookupColorReq); @@ -3090,8 +3009,7 @@ ProcLookupColor(client) } int -ProcCreateCursor( client) - register ClientPtr client; +ProcCreateCursor (register ClientPtr client) { CursorPtr pCursor; @@ -3181,8 +3099,7 @@ ProcCreateCursor( client) } int -ProcCreateGlyphCursor( client) - register ClientPtr client; +ProcCreateGlyphCursor (register ClientPtr client) { CursorPtr pCursor; int res; @@ -3206,8 +3123,7 @@ ProcCreateGlyphCursor( client) int -ProcFreeCursor(client) - register ClientPtr client; +ProcFreeCursor (register ClientPtr client) { CursorPtr pCursor; REQUEST(xResourceReq); @@ -3228,8 +3144,7 @@ ProcFreeCursor(client) } int -ProcQueryBestSize (client) - register ClientPtr client; +ProcQueryBestSize (register ClientPtr client) { xQueryBestSizeReply reply; register DrawablePtr pDraw; @@ -3262,8 +3177,7 @@ ProcQueryBestSize (client) int -ProcSetScreenSaver (client) - register ClientPtr client; +ProcSetScreenSaver (register ClientPtr client) { int blankingOption, exposureOption; REQUEST(xSetScreenSaverReq); @@ -3319,8 +3233,7 @@ ProcSetScreenSaver (client) } int -ProcGetScreenSaver(client) - register ClientPtr client; +ProcGetScreenSaver(register ClientPtr client) { xGetScreenSaverReply rep; @@ -3337,8 +3250,7 @@ ProcGetScreenSaver(client) } int -ProcChangeHosts(client) - register ClientPtr client; +ProcChangeHosts(register ClientPtr client) { REQUEST(xChangeHostsReq); int result; @@ -3362,8 +3274,7 @@ ProcChangeHosts(client) } int -ProcListHosts(client) - register ClientPtr client; +ProcListHosts(register ClientPtr client) { xListHostsReply reply; int len, nHosts, result; @@ -3397,8 +3308,7 @@ ProcListHosts(client) } int -ProcChangeAccessControl(client) - register ClientPtr client; +ProcChangeAccessControl(register ClientPtr client) { int result; REQUEST(xSetAccessControlReq); @@ -3416,8 +3326,7 @@ ProcChangeAccessControl(client) } int -ProcKillClient(client) - register ClientPtr client; +ProcKillClient(register ClientPtr client) { REQUEST(xResourceReq); ClientPtr killclient; @@ -3451,8 +3360,7 @@ ProcKillClient(client) } int -ProcSetFontPath(client) - register ClientPtr client; +ProcSetFontPath(register ClientPtr client) { unsigned char *ptr; unsigned long nbytes, total; @@ -3487,8 +3395,7 @@ ProcSetFontPath(client) } int -ProcGetFontPath(client) - register ClientPtr client; +ProcGetFontPath(register ClientPtr client) { xGetFontPathReply reply; int stringLens, numpaths; @@ -3510,8 +3417,7 @@ ProcGetFontPath(client) } int -ProcChangeCloseDownMode(client) - register ClientPtr client; +ProcChangeCloseDownMode(register ClientPtr client) { REQUEST(xSetCloseDownModeReq); @@ -3530,8 +3436,7 @@ ProcChangeCloseDownMode(client) } } -int ProcForceScreenSaver(client) - register ClientPtr client; +int ProcForceScreenSaver(register ClientPtr client) { REQUEST(xForceScreenSaverReq); @@ -3547,8 +3452,7 @@ int ProcForceScreenSaver(client) return client->noClientException; } -int ProcNoOperation(client) - register ClientPtr client; +int ProcNoOperation(register ClientPtr client) { REQUEST_AT_LEAST_SIZE(xReq); @@ -3591,8 +3495,7 @@ InitProcVectors(void) char dispatchExceptionAtReset = DE_RESET; void -CloseDownClient(client) - register ClientPtr client; +CloseDownClient(register ClientPtr client) { Bool really_close_down = client->clientGone || client->closeDownMode == DestroyAll; @@ -3714,10 +3617,7 @@ CloseDownRetainedResources() } } -void InitClient(client, i, ospriv) - ClientPtr client; - int i; - pointer ospriv; +void InitClient(ClientPtr client, int i, pointer ospriv) { client->index = i; client->sequence = 0; @@ -3782,8 +3682,7 @@ extern unsigned *clientPrivateSizes; extern unsigned totalClientSize; int -InitClientPrivates(client) - ClientPtr client; +InitClientPrivates(ClientPtr client) { register char *ptr; DevUnion *ppriv; @@ -3824,9 +3723,7 @@ InitClientPrivates(client) * Returns NULL if there are no free clients. *************************/ -ClientPtr -NextAvailableClient(ospriv) - pointer ospriv; +ClientPtr NextAvailableClient(pointer ospriv) { register int i; register ClientPtr client; @@ -3870,8 +3767,7 @@ NextAvailableClient(ospriv) } int -ProcInitialConnection(client) - register ClientPtr client; +ProcInitialConnection(register ClientPtr client) { REQUEST(xReq); register xConnClientPrefix *prefix; @@ -3906,9 +3802,7 @@ IncrementClientCount() #endif int -SendConnSetup(client, reason) - register ClientPtr client; - char *reason; +SendConnSetup(register ClientPtr client, char *reason) { register xWindowRoot *root; register int i; @@ -4008,8 +3902,7 @@ SendConnSetup(client, reason) } int -ProcEstablishConnection(client) - register ClientPtr client; +ProcEstablishConnection(register ClientPtr client) { char *reason, *auth_proto, *auth_string; register xConnClientPrefix *prefix; @@ -4043,12 +3936,8 @@ ProcEstablishConnection(client) } void -SendErrorToClient(client, majorCode, minorCode, resId, errorCode) - ClientPtr client; - unsigned int majorCode; - unsigned int minorCode; - XID resId; - int errorCode; +SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, + XID resId, int errorCode) { xError rep; @@ -4063,8 +3952,7 @@ SendErrorToClient(client, majorCode, minorCode, resId, errorCode) } void -DeleteWindowFromAnySelections(pWin) - WindowPtr pWin; +DeleteWindowFromAnySelections(WindowPtr pWin) { register int i; @@ -4086,8 +3974,7 @@ DeleteWindowFromAnySelections(pWin) } static void -DeleteClientFromAnySelections(client) - ClientPtr client; +DeleteClientFromAnySelections(ClientPtr client) { register int i; @@ -4109,8 +3996,7 @@ DeleteClientFromAnySelections(client) } void -MarkClientException(client) - ClientPtr client; +MarkClientException(ClientPtr client) { client->noClientException = -1; } diff --git a/dix/dixfonts.c b/dix/dixfonts.c index a09626f88..006d5141c 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1,4 +1,4 @@ -/* $XdotOrg$ */ +/* $XdotOrg: xc/programs/Xserver/dix/dixfonts.c,v 1.2 2004/04/23 19:04:44 eich Exp $ */ /* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.28 2003/11/08 02:02:03 dawes Exp $ */ /************************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -123,8 +123,7 @@ FontToXError(err) * adding RT_FONT prevents conflict with default cursor font */ Bool -SetDefaultFont(defaultfontname) - char *defaultfontname; +SetDefaultFont(char *defaultfontname) { int err; FontPtr pf; @@ -152,8 +151,7 @@ SetDefaultFont(defaultfontname) * freed data. */ void -QueueFontWakeup(fpe) - FontPathElementPtr fpe; +QueueFontWakeup(FontPathElementPtr fpe) { int i; FontPathElementPtr *new; @@ -182,8 +180,7 @@ QueueFontWakeup(fpe) } void -RemoveFontWakeup(fpe) - FontPathElementPtr fpe; +RemoveFontWakeup(FontPathElementPtr fpe) { int i, j; @@ -199,12 +196,8 @@ RemoveFontWakeup(fpe) } } -/* ARGSUSED */ void -FontWakeup(data, count, LastSelectMask) - pointer data; - int count; - pointer LastSelectMask; +FontWakeup(pointer data, int count, pointer LastSelectMask) { int i; FontPathElementPtr fpe; @@ -381,12 +374,7 @@ bail: } int -OpenFont(client, fid, flags, lenfname, pfontname) - ClientPtr client; - XID fid; - Mask flags; - unsigned lenfname; - char *pfontname; +OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontname) { OFclosurePtr c; int i; @@ -470,14 +458,13 @@ OpenFont(client, fid, flags, lenfname, pfontname) return Success; } -/* +/** * Decrement font's ref count, and free storage if ref count equals zero + * + * \param value must conform to DeleteType */ -/*ARGSUSED*/ int -CloseFont(value, fid) - pointer value; /* must conform to DeleteType */ - XID fid; +CloseFont(pointer value, XID fid) { int nscr; ScreenPtr pscr; @@ -516,16 +503,14 @@ CloseFont(value, fid) /***====================================================================***/ - /* - * \ Sets up pReply as the correct QueryFontReply for pFont with the first - * nProtoCCIStructs char infos. \ +/** + * Sets up pReply as the correct QueryFontReply for pFont with the first + * nProtoCCIStructs char infos. + * + * \param pReply caller must allocate this storage */ - void -QueryFont(pFont, pReply, nProtoCCIStructs) - FontPtr pFont; - xQueryFontReply *pReply; /* caller must allocate this storage */ - int nProtoCCIStructs; +QueryFont(FontPtr pFont, xQueryFontReply *pReply, int nProtoCCIStructs) { FontPropPtr pFP; int r, @@ -843,11 +828,8 @@ bail: } int -ListFonts(client, pattern, length, max_names) - ClientPtr client; - unsigned char *pattern; - unsigned int length; - unsigned int max_names; +ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, + unsigned max_names) { int i; LFclosurePtr c; @@ -896,9 +878,7 @@ ListFonts(client, pattern, length, max_names) } int -doListFontsWithInfo(client, c) - ClientPtr client; - LFWIclosurePtr c; +doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) { FontPathElementPtr fpe; int err = Successful; @@ -1120,11 +1100,8 @@ bail: } int -StartListFontsWithInfo(client, length, pattern, max_names) - ClientPtr client; - int length; - unsigned char *pattern; - int max_names; +StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, + int max_names) { int i; LFWIclosurePtr c; @@ -1178,9 +1155,7 @@ static XID clearGC[] = { CT_NONE }; #define clearGCmask (GCClipMask) int -doPolyText(client, c) - ClientPtr client; - register PTclosurePtr c; +doPolyText(ClientPtr client, register PTclosurePtr c) { register FontPtr pFont = c->pGC->font, oldpFont; Font fid, oldfid; @@ -1447,16 +1422,8 @@ bail: } int -PolyText(client, pDraw, pGC, pElt, endReq, xorg, yorg, reqType, did) - ClientPtr client; - DrawablePtr pDraw; - GC *pGC; - unsigned char *pElt; - unsigned char *endReq; - int xorg; - int yorg; - int reqType; - XID did; +PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt, + unsigned char *endReq, int xorg, int yorg, int reqType, XID did) { PTclosureRec local_closure; @@ -1490,9 +1457,7 @@ PolyText(client, pDraw, pGC, pElt, endReq, xorg, yorg, reqType, did) #undef FontShiftSize int -doImageText(client, c) - ClientPtr client; - register ITclosurePtr c; +doImageText(ClientPtr client, register ITclosurePtr c) { int err = Success, lgerr; /* err is in X error, not font error, space */ FontPathElementPtr fpe; @@ -1613,16 +1578,8 @@ bail: } int -ImageText(client, pDraw, pGC, nChars, data, xorg, yorg, reqType, did) - ClientPtr client; - DrawablePtr pDraw; - GC *pGC; - int nChars; - unsigned char *data; - int xorg; - int yorg; - int reqType; - XID did; +ImageText(ClientPtr client, DrawablePtr pDraw, GC *pGC, int nChars, + unsigned char *data, int xorg, int yorg, int reqType, XID did) { ITclosureRec local_closure; @@ -1822,11 +1779,7 @@ bail: /* XXX -- do we need to pass error down to each renderer? */ int -SetFontPath(client, npaths, paths, error) - ClientPtr client; - int npaths; - unsigned char *paths; - int *error; +SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) { int err = Success; @@ -1840,8 +1793,7 @@ SetFontPath(client, npaths, paths, error) } int -SetDefaultFontPath(path) - char *path; +SetDefaultFontPath(char *path) { unsigned char *cp, *pp, @@ -1882,9 +1834,7 @@ SetDefaultFontPath(path) } unsigned char * -GetFontPath(count, length) - int *count; - int *length; +GetFontPath(int *count, int *length) { int i; unsigned char *c; @@ -1914,12 +1864,7 @@ GetFontPath(count, length) } int -LoadGlyphs(client, pfont, nchars, item_size, data) - ClientPtr client; - FontPtr pfont; - unsigned nchars; - int item_size; - unsigned char *data; +LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size, unsigned char *data) { if (fpe_functions[pfont->fpe->type].load_glyphs) return (*fpe_functions[pfont->fpe->type].load_glyphs) @@ -1929,8 +1874,7 @@ LoadGlyphs(client, pfont, nchars, item_size, data) } void -DeleteClientFontStuff(client) - ClientPtr client; +DeleteClientFontStuff(ClientPtr client) { int i; FontPathElementPtr fpe; @@ -1974,8 +1918,7 @@ GetDefaultPointSize () FontResolutionPtr -GetClientResolutions (num) - int *num; +GetClientResolutions (int *num) { if (requestingClient && requestingClient->fontResFunc != NULL && !requestingClient->clientGone) @@ -2080,8 +2023,7 @@ FreeFonts() /* convenience functions for FS interface */ FontPtr -find_old_font(id) - XID id; +find_old_font(XID id) { return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, SecurityUnknownAccess); @@ -2094,23 +2036,19 @@ GetNewFontClientID() } int -StoreFontClientFont(pfont, id) - FontPtr pfont; - Font id; +StoreFontClientFont(FontPtr pfont, Font id) { return AddResource(id, RT_NONE, (pointer) pfont); } void -DeleteFontClientID(id) - Font id; +DeleteFontClientID(Font id) { FreeResource(id, RT_NONE); } int -client_auth_generation(client) - ClientPtr client; +client_auth_generation(ClientPtr client) { return 0; } @@ -2119,9 +2057,7 @@ static int fs_handlers_installed = 0; static unsigned int last_server_gen; int -init_fs_handlers(fpe, block_handler) - FontPathElementPtr fpe; - BlockHandlerProcPtr block_handler; +init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler) { /* if server has reset, make sure the b&w handlers are reinstalled */ if (last_server_gen < serverGeneration) { @@ -2144,10 +2080,7 @@ init_fs_handlers(fpe, block_handler) } void -remove_fs_handlers(fpe, block_handler, all) - FontPathElementPtr fpe; - BlockHandlerProcPtr block_handler; - Bool all; +remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler, Bool all) { if (all) { /* remove the handlers if no one else is using them */ @@ -2175,8 +2108,8 @@ remove_fs_handlers(fpe, block_handler, all) #define GLYPH_SIZE(ch, nbytes) \ GLWIDTHBYTESPADDED((ch)->metrics.rightSideBearing - \ (ch)->metrics.leftSideBearing, (nbytes)) -dump_char_ascii(cip) - CharInfoPtr cip; +void +dump_char_ascii(CharInfoPtr cip) { int r, l; 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); diff --git a/dix/events.c b/dix/events.c index 8cd5bfc90..473a6c70c 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.5 2004/07/31 01:33:40 stukreit Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.6 2004/08/09 02:08:35 kem Exp $ */ /* $XFree86: xc/programs/Xserver/dix/events.c,v 3.51 2004/01/12 17:04:52 tsi Exp $ */ /************************************************************ @@ -222,14 +222,14 @@ HotSpot xeviehot; #endif static void DoEnterLeaveEvents( - WindowPtr /*fromWin*/, - WindowPtr /*toWin*/, - int /*mode*/ + WindowPtr fromWin, + WindowPtr toWin, + int mode ); static WindowPtr XYToWindow( - int /*x*/, - int /*y*/ + int x, + int y ); extern int lastEvent; @@ -608,9 +608,7 @@ XineramaChangeToCursor(CursorPtr cursor) #endif /* PANORAMIX */ void -SetMaskForEvent(mask, event) - Mask mask; - int event; +SetMaskForEvent(Mask mask, int event) { if ((event < LASTEvent) || (event >= 128)) FatalError("SetMaskForEvent: bogus event number"); @@ -618,8 +616,7 @@ SetMaskForEvent(mask, event) } void -SetCriticalEvent(event) - int event; +SetCriticalEvent(int event) { if (event >= 128) FatalError("SetCriticalEvent: bogus event number"); @@ -843,8 +840,7 @@ ChangeToCursor(CursorPtr cursor) /* returns true if b is a descendent of a */ Bool -IsParent(a, b) - register WindowPtr a, b; +IsParent(register WindowPtr a, register WindowPtr b) { for (b = b->parent; b; b = b->parent) if (b == a) return TRUE; @@ -900,8 +896,7 @@ GetSpriteCursor() } void -GetSpritePosition(px, py) - int *px, *py; +GetSpritePosition(int *px, int *py) { *px = sprite.hotPhys.x; *py = sprite.hotPhys.y; @@ -941,8 +936,7 @@ MonthChangedOrBadTime(register xEvent *xE) lastDeviceEventTime = currentTime; } void -NoticeEventTime(xE) - register xEvent *xE; +NoticeEventTime(register xEvent *xE) { if (!syncEvents.playingEvents) NoticeTime(xE); @@ -953,10 +947,7 @@ NoticeEventTime(xE) **************************************************************************/ void -EnqueueEvent(xE, device, count) - xEvent *xE; - DeviceIntPtr device; - int count; +EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) { register QdEventPtr tail = *syncEvents.pendtail; register QdEventPtr qe; @@ -1172,9 +1163,7 @@ ScreenRestructured (ScreenPtr pScreen) #endif void -CheckGrabForSyncs(thisDev, thisMode, otherMode) - register DeviceIntPtr thisDev; - Bool thisMode, otherMode; +CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) { register GrabPtr grab = thisDev->grab; register DeviceIntPtr dev; @@ -1208,11 +1197,8 @@ CheckGrabForSyncs(thisDev, thisMode, otherMode) } void -ActivatePointerGrab(mouse, grab, time, autoGrab) - register GrabPtr grab; - register DeviceIntPtr mouse; - TimeStamp time; - Bool autoGrab; +ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, + TimeStamp time, Bool autoGrab) { WindowPtr oldWin = (mouse->grab) ? mouse->grab->window : sprite.win; @@ -1239,8 +1225,7 @@ ActivatePointerGrab(mouse, grab, time, autoGrab) } void -DeactivatePointerGrab(mouse) - register DeviceIntPtr mouse; +DeactivatePointerGrab(register DeviceIntPtr mouse) { register GrabPtr grab = mouse->grab; register DeviceIntPtr dev; @@ -1264,11 +1249,7 @@ DeactivatePointerGrab(mouse) } void -ActivateKeyboardGrab(keybd, grab, time, passive) - register DeviceIntPtr keybd; - GrabPtr grab; - TimeStamp time; - Bool passive; +ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) { WindowPtr oldWin; @@ -1294,8 +1275,7 @@ ActivateKeyboardGrab(keybd, grab, time, passive) } void -DeactivateKeyboardGrab(keybd) - register DeviceIntPtr keybd; +DeactivateKeyboardGrab(register DeviceIntPtr keybd) { register GrabPtr grab = keybd->grab; register DeviceIntPtr dev; @@ -1319,11 +1299,7 @@ DeactivateKeyboardGrab(keybd) } void -AllowSome(client, time, thisDev, newState) - ClientPtr client; - TimeStamp time; - register DeviceIntPtr thisDev; - int newState; +AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) { Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; TimeStamp grabTime; @@ -1431,8 +1407,7 @@ AllowSome(client, time, thisDev, newState) } int -ProcAllowEvents(client) - register ClientPtr client; +ProcAllowEvents(register ClientPtr client) { TimeStamp time; DeviceIntPtr mouse = inputInfo.pointer; @@ -1475,8 +1450,7 @@ ProcAllowEvents(client) } void -ReleaseActiveGrabs(client) - ClientPtr client; +ReleaseActiveGrabs(ClientPtr client) { register DeviceIntPtr dev; Bool done; @@ -1502,12 +1476,8 @@ ReleaseActiveGrabs(client) **************************************************************************/ int -TryClientEvents (client, pEvents, count, mask, filter, grab) - ClientPtr client; - GrabPtr grab; - xEvent *pEvents; - int count; - Mask mask, filter; +TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, + Mask filter, GrabPtr grab) { int i; int type; @@ -1585,13 +1555,8 @@ TryClientEvents (client, pEvents, count, mask, filter, grab) } int -DeliverEventsToWindow(pWin, pEvents, count, filter, grab, mskidx) - register WindowPtr pWin; - GrabPtr grab; - xEvent *pEvents; - int count; - Mask filter; - int mskidx; +DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count, + Mask filter, GrabPtr grab, int mskidx) { int deliveries = 0, nondeliveries = 0; int attempt; @@ -1709,12 +1674,8 @@ XineramaTryClientEventsResult( #endif int -MaybeDeliverEventsToClient(pWin, pEvents, count, filter, dontClient) - register WindowPtr pWin; - xEvent *pEvents; - int count; - Mask filter; - ClientPtr dontClient; +MaybeDeliverEventsToClient(register WindowPtr pWin, xEvent *pEvents, + int count, Mask filter, ClientPtr dontClient) { register OtherClients *other; @@ -1804,12 +1765,8 @@ FixUpEventFromWindow( } int -DeliverDeviceEvents(pWin, xE, grab, stopAt, dev, count) - register WindowPtr pWin, stopAt; - register xEvent *xE; - GrabPtr grab; - DeviceIntPtr dev; - int count; +DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, + register WindowPtr stopAt, DeviceIntPtr dev, int count) { Window child = None; int type = xE->u.u.type; @@ -1872,10 +1829,8 @@ DeliverDeviceEvents(pWin, xE, grab, stopAt, dev, count) /* not useful for events that propagate up the tree or extension events */ int -DeliverEvents(pWin, xE, count, otherParent) - register WindowPtr pWin, otherParent; - register xEvent *xE; - int count; +DeliverEvents(register WindowPtr pWin, register xEvent *xE, int count, + register WindowPtr otherParent) { Mask filter; int deliveries; @@ -2091,8 +2046,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) #endif void -DefineInitialRootWindow(win) - register WindowPtr win; +DefineInitialRootWindow(register WindowPtr win) { register ScreenPtr pScreen = win->drawable.pScreen; @@ -2139,18 +2093,14 @@ DefineInitialRootWindow(win) * between the one the pointer is in and the one that the last cursor was * instantiated from. */ -/*ARGSUSED*/ void -WindowHasNewCursor(pWin) - WindowPtr pWin; +WindowHasNewCursor(WindowPtr pWin) { PostNewCursor(); } void -NewCurrentScreen(newScreen, x, y) - ScreenPtr newScreen; - int x,y; +NewCurrentScreen(ScreenPtr newScreen, int x, int y) { sprite.hotPhys.x = x; sprite.hotPhys.y = y; @@ -2293,8 +2243,7 @@ XineramaWarpPointer(ClientPtr client) int -ProcWarpPointer(client) - ClientPtr client; +ProcWarpPointer(ClientPtr client) { WindowPtr dest = NULL; int x, y; @@ -2497,7 +2446,7 @@ CheckPassiveGrabsOnWindow( return FALSE; } -/* +/** "CheckDeviceGrabs" handles both keyboard and pointer events that may cause a passive grab to be activated. If the event is a keyboard event, the ancestors of the focus window are traced down and tried to see if they have @@ -2511,11 +2460,8 @@ tried. PRH */ Bool -CheckDeviceGrabs(device, xE, checkFirst, count) - register DeviceIntPtr device; - register xEvent *xE; - int checkFirst; - int count; +CheckDeviceGrabs(register DeviceIntPtr device, register xEvent *xE, + int checkFirst, int count) { register int i; register WindowPtr pWin = NULL; @@ -2558,11 +2504,7 @@ CheckDeviceGrabs(device, xE, checkFirst, count) } void -DeliverFocusedEvent(keybd, xE, window, count) - xEvent *xE; - DeviceIntPtr keybd; - WindowPtr window; - int count; +DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) { WindowPtr focus = keybd->focus->win; int mskidx = 0; @@ -2590,11 +2532,8 @@ DeliverFocusedEvent(keybd, xE, window, count) } void -DeliverGrabbedEvent(xE, thisDev, deactivateGrab, count) - register xEvent *xE; - register DeviceIntPtr thisDev; - Bool deactivateGrab; - int count; +DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, + Bool deactivateGrab, int count) { register GrabPtr grab = thisDev->grab; int deliveries = 0; @@ -2676,13 +2615,10 @@ DeliverGrabbedEvent(xE, thisDev, deactivateGrab, count) void #ifdef XKB -CoreProcessKeyboardEvent (xE, keybd, count) +CoreProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count) #else -ProcessKeyboardEvent (xE, keybd, count) +ProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count) #endif - register xEvent *xE; - register DeviceIntPtr keybd; - int count; { int key, bit; register BYTE *kptr; @@ -2835,9 +2771,7 @@ drawable.id:0; CoreProcessKeyEvent to be called, as in for example Mouse Keys. */ void -FixKeyState (xE, keybd) - register xEvent *xE; - register DeviceIntPtr keybd; +FixKeyState (register xEvent *xE, register DeviceIntPtr keybd) { int key, bit; register BYTE *kptr; @@ -2869,13 +2803,10 @@ FixKeyState (xE, keybd) void #ifdef XKB -CoreProcessPointerEvent (xE, mouse, count) +CoreProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count) #else -ProcessPointerEvent (xE, mouse, count) +ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count) #endif - register xEvent *xE; - register DeviceIntPtr mouse; - int count; { register GrabPtr grab = mouse->grab; Bool deactivateGrab = FALSE; @@ -3026,10 +2957,12 @@ RecalculateDeliverableEvents(pWin) } } +/** + * + * \param value must conform to DeleteType + */ int -OtherClientGone(value, id) - pointer value; /* must conform to DeleteType */ - XID id; +OtherClientGone(pointer value, XID id) { register OtherClientsPtr other, prev; register WindowPtr pWin = (WindowPtr)value; @@ -3058,10 +2991,7 @@ OtherClientGone(value, id) } int -EventSelectForWindow(pWin, client, mask) - register WindowPtr pWin; - register ClientPtr client; - Mask mask; +EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask mask) { Mask check; OtherClients * others; @@ -3140,13 +3070,9 @@ maskSet: return Success; } -/*ARGSUSED*/ int -EventSuppressForWindow(pWin, client, mask, checkOptional) - register WindowPtr pWin; - register ClientPtr client; - Mask mask; - Bool *checkOptional; +EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client, + Mask mask, Bool *checkOptional) { register int i, free; @@ -3432,10 +3358,7 @@ FocusOutEvents( } void -DoFocusEvents(dev, fromWin, toWin, mode) - DeviceIntPtr dev; - WindowPtr fromWin, toWin; - int mode; +DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) { int out, in; /* for holding details for to/from PointerRoot/None */ @@ -3654,8 +3577,7 @@ ProcSetInputFocus(client) } int -ProcGetInputFocus(client) - ClientPtr client; +ProcGetInputFocus(ClientPtr client) { xGetInputFocusReply rep; /* REQUEST(xReq); */ @@ -3676,8 +3598,7 @@ ProcGetInputFocus(client) } int -ProcGrabPointer(client) - ClientPtr client; +ProcGrabPointer(ClientPtr client) { xGrabPointerReply rep; DeviceIntPtr device = inputInfo.pointer; @@ -3783,8 +3704,7 @@ ProcGrabPointer(client) } int -ProcChangeActivePointerGrab(client) - ClientPtr client; +ProcChangeActivePointerGrab(ClientPtr client) { DeviceIntPtr device = inputInfo.pointer; register GrabPtr grab = device->grab; @@ -3830,8 +3750,7 @@ ProcChangeActivePointerGrab(client) } int -ProcUngrabPointer(client) - ClientPtr client; +ProcUngrabPointer(ClientPtr client) { DeviceIntPtr device = inputInfo.pointer; GrabPtr grab; @@ -3850,17 +3769,9 @@ ProcUngrabPointer(client) } int -GrabDevice(client, dev, this_mode, other_mode, grabWindow, ownerEvents, ctime, - mask, status) - register ClientPtr client; - register DeviceIntPtr dev; - unsigned this_mode; - unsigned other_mode; - Window grabWindow; - unsigned ownerEvents; - Time ctime; - Mask mask; - CARD8 *status; +GrabDevice(register ClientPtr client, register DeviceIntPtr dev, + unsigned this_mode, unsigned other_mode, Window grabWindow, + unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status) { register WindowPtr pWin; register GrabPtr grab; @@ -3915,8 +3826,7 @@ GrabDevice(client, dev, this_mode, other_mode, grabWindow, ownerEvents, ctime, } int -ProcGrabKeyboard(client) - ClientPtr client; +ProcGrabKeyboard(ClientPtr client) { xGrabKeyboardReply rep; REQUEST(xGrabKeyboardReq); @@ -3945,8 +3855,7 @@ ProcGrabKeyboard(client) } int -ProcUngrabKeyboard(client) - ClientPtr client; +ProcUngrabKeyboard(ClientPtr client) { DeviceIntPtr device = inputInfo.keyboard; GrabPtr grab; @@ -3965,8 +3874,7 @@ ProcUngrabKeyboard(client) } int -ProcQueryPointer(client) - ClientPtr client; +ProcQueryPointer(ClientPtr client) { xQueryPointerReply rep; WindowPtr pWin, t; @@ -4081,8 +3989,7 @@ CloseDownEvents(void) } int -ProcSendEvent(client) - ClientPtr client; +ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ @@ -4170,8 +4077,7 @@ ProcSendEvent(client) } int -ProcUngrabKey(client) - ClientPtr client; +ProcUngrabKey(ClientPtr client) { REQUEST(xUngrabKeyReq); WindowPtr pWin; @@ -4212,8 +4118,7 @@ ProcUngrabKey(client) } int -ProcGrabKey(client) - ClientPtr client; +ProcGrabKey(ClientPtr client) { WindowPtr pWin; REQUEST(xGrabKeyReq); @@ -4267,8 +4172,7 @@ ProcGrabKey(client) int -ProcGrabButton(client) - ClientPtr client; +ProcGrabButton(ClientPtr client) { WindowPtr pWin, confineTo; REQUEST(xGrabButtonReq); @@ -4342,8 +4246,7 @@ ProcGrabButton(client) } int -ProcUngrabButton(client) - ClientPtr client; +ProcUngrabButton(ClientPtr client) { REQUEST(xUngrabButtonReq); WindowPtr pWin; @@ -4375,9 +4278,7 @@ ProcUngrabButton(client) } void -DeleteWindowFromAnyEvents(pWin, freeResources) - WindowPtr pWin; - Bool freeResources; +DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) { WindowPtr parent; DeviceIntPtr mouse = inputInfo.pointer; @@ -4464,12 +4365,11 @@ DeleteWindowFromAnyEvents(pWin, freeResources) #endif } -/* Call this whenever some window at or below pWin has changed geometry */ - -/*ARGSUSED*/ +/** + * Call this whenever some window at or below pWin has changed geometry + */ void -CheckCursorConfinement(pWin) - WindowPtr pWin; +CheckCursorConfinement(WindowPtr pWin) { GrabPtr grab = inputInfo.pointer->grab; WindowPtr confineTo; @@ -4488,9 +4388,7 @@ CheckCursorConfinement(pWin) } Mask -EventMaskForClient(pWin, client) - WindowPtr pWin; - ClientPtr client; +EventMaskForClient(WindowPtr pWin, ClientPtr client) { register OtherClientsPtr other; @@ -4505,8 +4403,7 @@ EventMaskForClient(pWin, client) } int -ProcRecolorCursor(client) - ClientPtr client; +ProcRecolorCursor(ClientPtr client) { CursorPtr pCursor; int nscr; @@ -4547,10 +4444,7 @@ ProcRecolorCursor(client) } void -WriteEventsToClient(pClient, count, events) - ClientPtr pClient; - int count; - xEvent *events; +WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) { #ifdef PANORAMIX xEvent eventCopy; diff --git a/dix/extension.c b/dix/extension.c index 3fcf31b8e..ee8bcaa23 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -156,9 +156,7 @@ AddExtension(char *name, int NumEvents, int NumErrors, return(ext); } -Bool AddExtensionAlias(alias, ext) - char *alias; - ExtensionEntry *ext; +Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) { char *name; char **aliases; @@ -219,9 +217,7 @@ CheckExtension(const char *extname) } void -DeclareExtensionSecurity(extname, secure) - char *extname; - Bool secure; +DeclareExtensionSecurity(char *extname, Bool secure) { #ifdef XCSECURITY int i = FindExtension(extname, strlen(extname)); @@ -247,15 +243,13 @@ DeclareExtensionSecurity(extname, secure) } unsigned short -StandardMinorOpcode(client) - ClientPtr client; +StandardMinorOpcode(ClientPtr client) { return ((xReq *)client->requestBuffer)->data; } unsigned short -MinorOpcodeOfRequest(client) - ClientPtr client; +MinorOpcodeOfRequest(ClientPtr client) { unsigned char major; @@ -307,8 +301,7 @@ CloseDownExtensions() int -ProcQueryExtension(client) - ClientPtr client; +ProcQueryExtension(ClientPtr client) { xQueryExtensionReply reply; int i; @@ -347,8 +340,7 @@ ProcQueryExtension(client) } int -ProcListExtensions(client) - ClientPtr client; +ProcListExtensions(ClientPtr client) { xListExtensionsReply reply; char *bufptr, *buffer; @@ -413,9 +405,7 @@ ProcListExtensions(client) ExtensionLookupProc -LookupProc(name, pGC) - char *name; - GCPtr pGC; +LookupProc(char *name, GCPtr pGC) { register int i; register ScreenProcEntry *spentry; @@ -430,19 +420,13 @@ LookupProc(name, pGC) } Bool -RegisterProc(name, pGC, proc) - char *name; - GC *pGC; - ExtensionLookupProc proc; +RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc) { return RegisterScreenProc(name, pGC->pScreen, proc); } Bool -RegisterScreenProc(name, pScreen, proc) - char *name; - ScreenPtr pScreen; - ExtensionLookupProc proc; +RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc) { register ScreenProcEntry *spentry; register ProcEntryPtr procEntry = (ProcEntryPtr)NULL; @@ -65,16 +65,12 @@ SOFTWARE. extern XID clientErrorValue; extern FontPtr defaultFont; -static Bool CreateDefaultTile( - GCPtr /*pGC*/ -); +static Bool CreateDefaultTile(GCPtr pGC); unsigned char DefaultDash[2] = {4, 4}; void -ValidateGC(pDraw, pGC) - DrawablePtr pDraw; - GC *pGC; +ValidateGC(DrawablePtr pDraw, GC *pGC) { (*pGC->funcs->ValidateGC) (pGC, pGC->stateChanges, pDraw); pGC->stateChanges = 0; @@ -146,12 +142,7 @@ ValidateGC(pDraw, pGC) assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; } int -dixChangeGC(client, pGC, mask, pC32, pUnion) - ClientPtr client; - register GC *pGC; - register BITS32 mask; - CARD32 *pC32; - ChangeGCValPtr pUnion; +dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion) { register BITS32 index2; register int error = 0; @@ -529,10 +520,7 @@ dixChangeGC(client, pGC, mask, pC32, pUnion) /* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells * it that all of the entries are constants or IDs */ int -ChangeGC(pGC, mask, pval) - register GC *pGC; - register BITS32 mask; - XID *pval; +ChangeGC(register GC *pGC, register BITS32 mask, XID *pval) { return (dixChangeGC(NullClient, pGC, mask, pval, NULL)); } @@ -558,11 +546,7 @@ NOTE: 32 bits long */ int -DoChangeGC(pGC, mask, pval, fPointer) - register GC *pGC; - register BITS32 mask; - XID *pval; - int fPointer; +DoChangeGC(register GC *pGC, register BITS32 mask, XID *pval, int fPointer) { if (fPointer) /* XXX might be a problem on 64 bit big-endian servers */ @@ -614,11 +598,7 @@ AllocateGC(ScreenPtr pScreen) } GCPtr -CreateGC(pDrawable, mask, pval, pStatus) - DrawablePtr pDrawable; - BITS32 mask; - XID *pval; - int *pStatus; +CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus) { register GCPtr pGC; @@ -699,8 +679,7 @@ CreateGC(pDrawable, mask, pval, pStatus) } static Bool -CreateDefaultTile (pGC) - GCPtr pGC; +CreateDefaultTile (GCPtr pGC) { XID tmpval[3]; PixmapPtr pTile; @@ -743,10 +722,7 @@ CreateDefaultTile (pGC) } int -CopyGC(pgcSrc, pgcDst, mask) - register GC *pgcSrc; - register GC *pgcDst; - register BITS32 mask; +CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask) { register BITS32 index2; BITS32 maskQ; @@ -904,16 +880,13 @@ CopyGC(pgcSrc, pgcDst, mask) return error; } -/***************** - * FreeGC - * does the diX part of freeing the characteristics in the GC - ***************/ - -/*ARGSUSED*/ +/** + * does the diX part of freeing the characteristics in the GC. + * + * \param value must conform to DeleteType + */ int -FreeGC(value, gid) - pointer value; /* must conform to DeleteType */ - XID gid; +FreeGC(pointer value, XID gid) { GCPtr pGC = (GCPtr)value; @@ -933,10 +906,7 @@ FreeGC(value, gid) } void -SetGCMask(pGC, selectMask, newDataMask) - GCPtr pGC; - Mask selectMask; - Mask newDataMask; +SetGCMask(GCPtr pGC, Mask selectMask, Mask newDataMask) { pGC->stateChanges = (~selectMask & pGC->stateChanges) | (selectMask & newDataMask); @@ -960,9 +930,7 @@ go with CreateGC() or ChangeGC().) */ GCPtr -CreateScratchGC(pScreen, depth) - ScreenPtr pScreen; - unsigned depth; +CreateScratchGC(ScreenPtr pScreen, unsigned depth) { register GCPtr pGC; @@ -1014,8 +982,7 @@ CreateScratchGC(pScreen, depth) } void -FreeGCperDepth(screenNum) - int screenNum; +FreeGCperDepth(int screenNum) { register int i; register ScreenPtr pScreen; @@ -1031,8 +998,7 @@ FreeGCperDepth(screenNum) Bool -CreateGCperDepth(screenNum) - int screenNum; +CreateGCperDepth(int screenNum) { register int i; register ScreenPtr pScreen; @@ -1062,8 +1028,7 @@ CreateGCperDepth(screenNum) } Bool -CreateDefaultStipple(screenNum) - int screenNum; +CreateDefaultStipple(int screenNum) { register ScreenPtr pScreen; XID tmpval[3]; @@ -1100,19 +1065,14 @@ CreateDefaultStipple(screenNum) } void -FreeDefaultStipple(screenNum) - int screenNum; +FreeDefaultStipple(int screenNum) { ScreenPtr pScreen = screenInfo.screens[screenNum]; (*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]); } int -SetDashes(pGC, offset, ndash, pdash) -register GCPtr pGC; -unsigned offset; -register unsigned ndash; -register unsigned char *pdash; +SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) { register long i; register unsigned char *p, *indash; @@ -1168,10 +1128,7 @@ register unsigned char *pdash; } int -VerifyRectOrder(nrects, prects, ordering) - int nrects; - xRectangle *prects; - int ordering; +VerifyRectOrder(int nrects, xRectangle *prects, int ordering) { register xRectangle *prectP, *prectN; register int i; @@ -1221,12 +1178,8 @@ VerifyRectOrder(nrects, prects, ordering) } int -SetClipRects(pGC, xOrigin, yOrigin, nrects, prects, ordering) - GCPtr pGC; - int xOrigin, yOrigin; - int nrects; - xRectangle *prects; - int ordering; +SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, + xRectangle *prects, int ordering) { int newct, size; xRectangle *prectsNew; @@ -1262,9 +1215,7 @@ SetClipRects(pGC, xOrigin, yOrigin, nrects, prects, ordering) you use it often enough it will become real.) */ GCPtr -GetScratchGC(depth, pScreen) - register unsigned depth; - register ScreenPtr pScreen; +GetScratchGC(register unsigned depth, register ScreenPtr pScreen) { register int i; register GCPtr pGC; @@ -1313,8 +1264,7 @@ mark it as available. if not, free it for real */ void -FreeScratchGC(pGC) - register GCPtr pGC; +FreeScratchGC(register GCPtr pGC) { register ScreenPtr pScreen = pGC->pScreen; register int i; diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c index 630e98fa3..88b3bb895 100644 --- a/dix/glyphcurs.c +++ b/dix/glyphcurs.c @@ -71,11 +71,7 @@ cursor metrics. */ int -ServerBitsFromGlyph(pfont, ch, cm, ppbits) - FontPtr pfont; - unsigned int ch; - register CursorMetricPtr cm; - unsigned char **ppbits; +ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, unsigned char **ppbits) { register ScreenPtr pScreen; register GCPtr pGC; @@ -141,10 +137,7 @@ ServerBitsFromGlyph(pfont, ch, cm, ppbits) Bool -CursorMetricsFromGlyph( pfont, ch, cm) - register FontPtr pfont; - unsigned ch; - register CursorMetricPtr cm; +CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm) { CharInfoPtr pci; unsigned long nglyphs; diff --git a/dix/grabs.c b/dix/grabs.c index 6eba43d1f..34482e561 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -123,11 +123,8 @@ FreeGrab(GrabPtr pGrab) xfree(pGrab); } -/*ARGSUSED*/ int -DeletePassiveGrab(value, id) - pointer value; - XID id; +DeletePassiveGrab(pointer value, XID id) { register GrabPtr g, prev; GrabPtr pGrab = (GrabPtr)value; @@ -240,8 +237,7 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) } Bool -GrabMatchesSecond(pFirstGrab, pSecondGrab) - GrabPtr pFirstGrab, pSecondGrab; +GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) { if ((pFirstGrab->device != pSecondGrab->device) || (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || @@ -272,8 +268,7 @@ GrabMatchesSecond(pFirstGrab, pSecondGrab) } int -AddPassiveGrabToList(pGrab) - GrabPtr pGrab; +AddPassiveGrabToList(GrabPtr pGrab) { GrabPtr grab; @@ -306,8 +301,7 @@ AddPassiveGrabToList(pGrab) */ Bool -DeletePassiveGrabFromList(pMinuendGrab) - GrabPtr pMinuendGrab; +DeletePassiveGrabFromList(GrabPtr pMinuendGrab) { register GrabPtr grab; GrabPtr *deletes, *adds; diff --git a/dix/main.c b/dix/main.c index d1883c3e4..5614c5dbb 100644 --- a/dix/main.c +++ b/dix/main.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.3 2004/06/30 20:06:53 kem Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.4 2004/09/18 23:18:35 gisburn Exp $ */ /* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */ /*********************************************************** @@ -113,13 +113,9 @@ Equipment Corporation. #include "dpmsproc.h" #endif -extern int InitClientPrivates( - ClientPtr /*client*/ -); +extern int InitClientPrivates(ClientPtr client); -extern void Dispatch( - void -); +extern void Dispatch(void); char *ConnectionInfo; xConnSetupPrefix connSetupPrefix; @@ -152,7 +148,7 @@ NotImplemented(xEvent *from, xEvent *to) /* * Dummy entry for ReplySwapVector[] */ -/*ARGSUSED*/ + void ReplyNotSwappd( ClientPtr pClient , @@ -780,8 +776,7 @@ AddScreen( } static void -FreeScreen(pScreen) - ScreenPtr pScreen; +FreeScreen(ScreenPtr pScreen) { xfree(pScreen->WindowPrivateSizes); xfree(pScreen->GCPrivateSizes); diff --git a/dix/pixmap.c b/dix/pixmap.c index 2df5d7374..bccc6b5cd 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -48,15 +48,8 @@ from The Open Group. /* callable by ddx */ PixmapPtr -GetScratchPixmapHeader(pScreen, width, height, depth, bitsPerPixel, devKind, - pPixData) - ScreenPtr pScreen; - int width; - int height; - int depth; - int bitsPerPixel; - int devKind; - pointer pPixData; +GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) { PixmapPtr pPixmap = pScreen->pScratchPixmap; @@ -78,8 +71,7 @@ GetScratchPixmapHeader(pScreen, width, height, depth, bitsPerPixel, devKind, /* callable by ddx */ void -FreeScratchPixmapHeader(pPixmap) - PixmapPtr pPixmap; +FreeScratchPixmapHeader(PixmapPtr pPixmap) { if (pPixmap) { @@ -95,8 +87,7 @@ FreeScratchPixmapHeader(pPixmap) Bool -CreateScratchPixmapsForScreen(scrnum) - int scrnum; +CreateScratchPixmapsForScreen(int scrnum) { /* let it be created on first use */ screenInfo.screens[scrnum]->pScratchPixmap = NULL; @@ -105,8 +96,7 @@ CreateScratchPixmapsForScreen(scrnum) void -FreeScratchPixmapsForScreen(scrnum) - int scrnum; +FreeScratchPixmapsForScreen(int scrnum) { FreeScratchPixmapHeader(screenInfo.screens[scrnum]->pScratchPixmap); } @@ -114,9 +104,7 @@ FreeScratchPixmapsForScreen(scrnum) /* callable by ddx */ PixmapPtr -AllocatePixmap(pScreen, pixDataSize) - ScreenPtr pScreen; - int pixDataSize; +AllocatePixmap(ScreenPtr pScreen, int pixDataSize) { PixmapPtr pPixmap; #ifdef PIXPRIV diff --git a/dix/privates.c b/dix/privates.c index 672738f29..ffc046a0b 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -73,9 +73,7 @@ AllocateClientPrivateIndex() } Bool -AllocateClientPrivate(index2, amount) - int index2; - unsigned amount; +AllocateClientPrivate(int index2, unsigned amount) { unsigned oldamount; @@ -166,10 +164,7 @@ AllocateWindowPrivateIndex() } Bool -AllocateWindowPrivate(pScreen, index2, amount) - register ScreenPtr pScreen; - int index2; - unsigned amount; +AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount) { unsigned oldamount; @@ -219,10 +214,7 @@ AllocateGCPrivateIndex() } Bool -AllocateGCPrivate(pScreen, index2, amount) - register ScreenPtr pScreen; - int index2; - unsigned amount; +AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount) { unsigned oldamount; @@ -272,10 +264,7 @@ AllocatePixmapPrivateIndex() } Bool -AllocatePixmapPrivate(pScreen, index2, amount) - register ScreenPtr pScreen; - int index2; - unsigned amount; +AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount) { unsigned oldamount; @@ -322,10 +311,7 @@ ResetColormapPrivates() int -AllocateColormapPrivateIndex (initPrivFunc) - -InitCmapPrivFunc initPrivFunc; - +AllocateColormapPrivateIndex (InitCmapPrivFunc initPrivFunc) { int index; int i; diff --git a/dix/property.c b/dix/property.c index f3d0edc9e..9bdc7f7e9 100644 --- a/dix/property.c +++ b/dix/property.c @@ -87,8 +87,7 @@ int fWriteToClient(ClientPtr client, int len, char *buf) #ifdef notdef static void -PrintPropertys(pWin) - WindowPtr pWin; +PrintPropertys(WindowPtr pWin) { PropertyPtr pProp; register int j; @@ -107,8 +106,7 @@ PrintPropertys(pWin) #endif int -ProcRotateProperties(client) - ClientPtr client; +ProcRotateProperties(ClientPtr client) { int i, j, delta; REQUEST(xRotatePropertiesReq); @@ -200,8 +198,7 @@ found: } int -ProcChangeProperty(client) - ClientPtr client; +ProcChangeProperty(ClientPtr client) { WindowPtr pWin; char format, mode; @@ -274,13 +271,9 @@ ProcChangeProperty(client) } int -ChangeWindowProperty(pWin, property, type, format, mode, len, value, sendevent) - WindowPtr pWin; - Atom property, type; - int format, mode; - unsigned long len; - pointer value; - Bool sendevent; +ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, + int mode, unsigned long len, pointer value, + Bool sendevent) { #ifdef LBX return LbxChangeWindowProperty(NULL, pWin, property, type, @@ -397,9 +390,7 @@ ChangeWindowProperty(pWin, property, type, format, mode, len, value, sendevent) } int -DeleteProperty(pWin, propName) - WindowPtr pWin; - Atom propName; +DeleteProperty(WindowPtr pWin, Atom propName) { PropertyPtr pProp, prevProp; xEvent event; @@ -442,8 +433,7 @@ DeleteProperty(pWin, propName) } void -DeleteAllWindowProperties(pWin) - WindowPtr pWin; +DeleteAllWindowProperties(WindowPtr pWin) { PropertyPtr pProp, pNextProp; xEvent event; @@ -495,8 +485,7 @@ NullPropertyReply( *****************/ int -ProcGetProperty(client) - ClientPtr client; +ProcGetProperty(ClientPtr client) { PropertyPtr pProp, prevProp; unsigned long n, len, ind; @@ -651,8 +640,7 @@ ProcGetProperty(client) } int -ProcListProperties(client) - ClientPtr client; +ProcListProperties(ClientPtr client) { Atom *pAtoms = NULL, *temppAtoms; xListPropertiesReply xlpr; @@ -699,8 +687,7 @@ ProcListProperties(client) } int -ProcDeleteProperty(client) - register ClientPtr client; +ProcDeleteProperty(register ClientPtr client) { WindowPtr pWin; REQUEST(xDeletePropertyReq); diff --git a/dix/resource.c b/dix/resource.c index e2da30bad..96dcec2cf 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -74,7 +74,7 @@ Equipment Corporation. ******************************************************************/ /* $Xorg: resource.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ -/* $XdotOrg: xc/programs/Xserver/dix/resource.c,v 1.2 2004/04/23 19:04:44 eich Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/resource.c,v 1.3 2004/04/25 22:42:09 gisburn Exp $ */ /* $TOG: resource.c /main/41 1998/02/09 14:20:31 kaleb $ */ /* Routines to manage various kinds of resources: @@ -167,8 +167,7 @@ void RegisterResourceName (RESTYPE type, char *name) #endif RESTYPE -CreateNewResourceType(deleteFunc) - DeleteType deleteFunc; +CreateNewResourceType(DeleteType deleteFunc) { RESTYPE next = lastResourceType + 1; DeleteType *funcs; @@ -218,8 +217,7 @@ ClientResourceRec clientTable[MAXCLIENTS]; *****************/ Bool -InitClientResources(client) - ClientPtr client; +InitClientResources(ClientPtr client) { register int i, j; @@ -322,10 +320,7 @@ AvailableID( } void -GetXIDRange(client, server, minp, maxp) - int client; - Bool server; - XID *minp, *maxp; +GetXIDRange(int client, Bool server, XID *minp, XID *maxp) { register XID id, maxid; register ResourcePtr *resp; @@ -359,7 +354,8 @@ GetXIDRange(client, server, minp, maxp) *maxp = maxid; } -/* GetXIDList is called by the XC-MISC extension's MiscGetXIDList function. +/** + * GetXIDList is called by the XC-MISC extension's MiscGetXIDList function. * This function tries to find count unused XIDs for the given client. It * puts the IDs in the array pids and returns the number found, which should * almost always be the number requested. @@ -375,10 +371,7 @@ GetXIDRange(client, server, minp, maxp) */ unsigned int -GetXIDList(pClient, count, pids) - ClientPtr pClient; - unsigned int count; - XID *pids; +GetXIDList(ClientPtr pClient, unsigned count, XID *pids) { unsigned int found = 0; XID id = pClient->clientAsMask; @@ -405,8 +398,7 @@ GetXIDList(pClient, count, pids) */ XID -FakeClientID(client) - register int client; +FakeClientID(register int client) { XID id, maxid; @@ -427,10 +419,7 @@ FakeClientID(client) } Bool -AddResource(id, type, value) - XID id; - RESTYPE type; - pointer value; +AddResource(XID id, RESTYPE type, pointer value) { int client; register ClientResourceRec *rrec; @@ -466,8 +455,7 @@ AddResource(id, type, value) } static void -RebuildTable(client) - int client; +RebuildTable(int client) { register int j; register ResourcePtr res, next; @@ -516,9 +504,7 @@ RebuildTable(client) } void -FreeResource(id, skipDeleteFuncType) - XID id; - RESTYPE skipDeleteFuncType; +FreeResource(XID id, RESTYPE skipDeleteFuncType) { int cid; register ResourcePtr res; @@ -565,10 +551,7 @@ FreeResource(id, skipDeleteFuncType) void -FreeResourceByType(id, type, skipFree) - XID id; - RESTYPE type; - Bool skipFree; +FreeResourceByType(XID id, RESTYPE type, Bool skipFree) { int cid; register ResourcePtr res; @@ -608,10 +591,7 @@ FreeResourceByType(id, type, skipFree) */ Bool -ChangeResourceValue (id, rtype, value) - XID id; - RESTYPE rtype; - pointer value; +ChangeResourceValue (XID id, RESTYPE rtype, pointer value) { int cid; register ResourcePtr res; @@ -760,8 +740,7 @@ FreeClientNeverRetainResources(ClientPtr client) } void -FreeClientResources(client) - ClientPtr client; +FreeClientResources(ClientPtr client) { register ResourcePtr *resources; register ResourcePtr this; @@ -819,9 +798,7 @@ FreeAllResources() } Bool -LegalNewID(id, client) - XID id; - register ClientPtr client; +LegalNewID(XID id, register ClientPtr client) { #ifdef PANORAMIX @@ -851,11 +828,7 @@ LegalNewID(id, client) */ pointer -SecurityLookupIDByType(client, id, rtype, mode) - ClientPtr client; - XID id; - RESTYPE rtype; - Mask mode; +SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) { int cid; register ResourcePtr res; @@ -884,11 +857,7 @@ SecurityLookupIDByType(client, id, rtype, mode) pointer -SecurityLookupIDByClass(client, id, classes, mode) - ClientPtr client; - XID id; - RESTYPE classes; - Mask mode; +SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) { int cid; register ResourcePtr res = NULL; @@ -920,18 +889,14 @@ SecurityLookupIDByClass(client, id, classes, mode) */ pointer -LookupIDByType(id, rtype) - XID id; - RESTYPE rtype; +LookupIDByType(XID id, RESTYPE rtype) { return SecurityLookupIDByType(NullClient, id, rtype, SecurityUnknownAccess); } pointer -LookupIDByClass(id, classes) - XID id; - RESTYPE classes; +LookupIDByClass(XID id, RESTYPE classes) { return SecurityLookupIDByClass(NullClient, id, classes, SecurityUnknownAccess); @@ -943,9 +908,7 @@ LookupIDByClass(id, classes) * LookupIDByType returns the object with the given id and type, else NULL. */ pointer -LookupIDByType(id, rtype) - XID id; - RESTYPE rtype; +LookupIDByType(XID id, RESTYPE rtype) { int cid; register ResourcePtr res; @@ -967,9 +930,7 @@ LookupIDByType(id, rtype) * given classes, else NULL. */ pointer -LookupIDByClass(id, classes) - XID id; - RESTYPE classes; +LookupIDByClass(XID id, RESTYPE classes) { int cid; register ResourcePtr res; diff --git a/dix/swaprep.c b/dix/swaprep.c index 6bde83b96..08e6d3c37 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -59,27 +59,21 @@ SOFTWARE. #include "swaprep.h" #include "globals.h" -static void SwapFontInfo( - xQueryFontReply * /* pr */ -); +static void SwapFontInfo(xQueryFontReply *pr); #ifndef LBX -static void SwapCharInfo( - xCharInfo * /* pInfo */ - ); - -static void SwapFont( - xQueryFontReply * /* pr */, - Bool /* hasGlyphs */ - ); +static void SwapCharInfo(xCharInfo *pInfo); + +static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs); #endif -/* Thanks to Jack Palevich for testing and subsequently rewriting all this */ +/** + * Thanks to Jack Palevich for testing and subsequently rewriting all this + * + * \param size size in bytes + */ void -Swap32Write(pClient, size, pbuf) - ClientPtr pClient; - int size; /* in bytes */ - register CARD32 *pbuf; +Swap32Write(ClientPtr pClient, int size, register CARD32 *pbuf) { register int i; register char n; @@ -94,11 +88,12 @@ Swap32Write(pClient, size, pbuf) (void)WriteToClient(pClient, size << 2, (char *) pbuf); } +/** + * + * \param size size in bytes + */ void -CopySwap32Write(pClient, size, pbuf) - ClientPtr pClient; - int size; /* in bytes */ - CARD32 *pbuf; +CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) { int bufsize = size; CARD32 *pbufT; @@ -141,11 +136,12 @@ CopySwap32Write(pClient, size, pbuf) DEALLOCATE_LOCAL ((char *) pbufT); } +/** + * + * \param size size in bytes + */ void -CopySwap16Write(pClient, size, pbuf) - ClientPtr pClient; - int size; /* in bytes */ - short *pbuf; +CopySwap16Write(ClientPtr pClient, int size, short *pbuf) { int bufsize = size; short *pbufT; @@ -191,10 +187,7 @@ CopySwap16Write(pClient, size, pbuf) /* Extra-small reply */ void -SGenericReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGenericReply *pRep; +SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep) { register char n; @@ -204,10 +197,8 @@ SGenericReply(pClient, size, pRep) /* Extra-large reply */ void -SGetWindowAttributesReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetWindowAttributesReply *pRep; +SGetWindowAttributesReply(ClientPtr pClient, int size, + xGetWindowAttributesReply *pRep) { register char n; @@ -225,10 +216,7 @@ SGetWindowAttributesReply(pClient, size, pRep) } void -SGetGeometryReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetGeometryReply *pRep; +SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep) { register char n; @@ -243,10 +231,7 @@ SGetGeometryReply(pClient, size, pRep) } void -SQueryTreeReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryTreeReply *pRep; +SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep) { register char n; @@ -259,10 +244,7 @@ SQueryTreeReply(pClient, size, pRep) } void -SInternAtomReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xInternAtomReply *pRep; +SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep) { register char n; @@ -272,10 +254,7 @@ SInternAtomReply(pClient, size, pRep) } void -SGetAtomNameReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetAtomNameReply *pRep; +SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep) { register char n; @@ -287,10 +266,7 @@ SGetAtomNameReply(pClient, size, pRep) void -SGetPropertyReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetPropertyReply *pRep; +SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep) { register char n; @@ -303,10 +279,7 @@ SGetPropertyReply(pClient, size, pRep) } void -SListPropertiesReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xListPropertiesReply *pRep; +SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep) { register char n; @@ -317,10 +290,8 @@ SListPropertiesReply(pClient, size, pRep) } void -SGetSelectionOwnerReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetSelectionOwnerReply *pRep; +SGetSelectionOwnerReply(ClientPtr pClient, int size, + xGetSelectionOwnerReply *pRep) { register char n; @@ -331,10 +302,7 @@ SGetSelectionOwnerReply(pClient, size, pRep) void -SQueryPointerReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryPointerReply *pRep; +SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep) { register char n; @@ -350,8 +318,7 @@ SQueryPointerReply(pClient, size, pRep) } void -SwapTimecoord(pCoord) - xTimecoord *pCoord; +SwapTimecoord(xTimecoord* pCoord) { register char n; @@ -361,10 +328,7 @@ SwapTimecoord(pCoord) } void -SwapTimeCoordWrite(pClient, size, pRep) - ClientPtr pClient; - int size; - xTimecoord *pRep; +SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep) { int i, n; xTimecoord *pRepT; @@ -380,10 +344,7 @@ SwapTimeCoordWrite(pClient, size, pRep) } void -SGetMotionEventsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetMotionEventsReply *pRep; +SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep) { register char n; @@ -394,10 +355,7 @@ SGetMotionEventsReply(pClient, size, pRep) } void -STranslateCoordsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xTranslateCoordsReply *pRep; +STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep) { register char n; @@ -409,10 +367,7 @@ STranslateCoordsReply(pClient, size, pRep) } void -SGetInputFocusReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetInputFocusReply *pRep; +SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep) { register char n; @@ -423,10 +378,7 @@ SGetInputFocusReply(pClient, size, pRep) /* extra long reply */ void -SQueryKeymapReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryKeymapReply *pRep; +SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep) { register char n; @@ -439,8 +391,7 @@ SQueryKeymapReply(pClient, size, pRep) static #endif void -SwapCharInfo(pInfo) - xCharInfo *pInfo; +SwapCharInfo(xCharInfo *pInfo) { register char n; @@ -453,8 +404,7 @@ SwapCharInfo(pInfo) } static void -SwapFontInfo(pr) - xQueryFontReply *pr; +SwapFontInfo(xQueryFontReply *pr) { register char n; @@ -473,9 +423,7 @@ SwapFontInfo(pr) static #endif void -SwapFont( pr, hasGlyphs) - xQueryFontReply * pr; - Bool hasGlyphs; +SwapFont(xQueryFontReply *pr, Bool hasGlyphs) { unsigned i; xCharInfo * pxci; @@ -507,20 +455,14 @@ SwapFont( pr, hasGlyphs) } void -SQueryFontReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryFontReply *pRep; +SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep) { SwapFont(pRep, TRUE); (void)WriteToClient(pClient, size, (char *) pRep); } void -SQueryTextExtentsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryTextExtentsReply *pRep; +SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep) { register char n; @@ -536,10 +478,7 @@ SQueryTextExtentsReply(pClient, size, pRep) } void -SListFontsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xListFontsReply *pRep; +SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep) { register char n; @@ -550,20 +489,15 @@ SListFontsReply(pClient, size, pRep) } void -SListFontsWithInfoReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xListFontsWithInfoReply *pRep; +SListFontsWithInfoReply(ClientPtr pClient, int size, + xListFontsWithInfoReply *pRep) { SwapFont((xQueryFontReply *)pRep, FALSE); (void)WriteToClient(pClient, size, (char *) pRep); } void -SGetFontPathReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetFontPathReply *pRep; +SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep) { register char n; @@ -574,10 +508,7 @@ SGetFontPathReply(pClient, size, pRep) } void -SGetImageReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetImageReply *pRep; +SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep) { register char n; @@ -589,10 +520,8 @@ SGetImageReply(pClient, size, pRep) } void -SListInstalledColormapsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xListInstalledColormapsReply *pRep; +SListInstalledColormapsReply(ClientPtr pClient, int size, + xListInstalledColormapsReply *pRep) { register char n; @@ -619,10 +548,7 @@ SAllocColorReply(pClient, size, pRep) } void -SAllocNamedColorReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xAllocNamedColorReply *pRep; +SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep) { register char n; @@ -638,10 +564,7 @@ SAllocNamedColorReply(pClient, size, pRep) } void -SAllocColorCellsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xAllocColorCellsReply *pRep; +SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep) { register char n; @@ -654,10 +577,7 @@ SAllocColorCellsReply(pClient, size, pRep) void -SAllocColorPlanesReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xAllocColorPlanesReply *pRep; +SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep) { register char n; @@ -671,8 +591,7 @@ SAllocColorPlanesReply(pClient, size, pRep) } void -SwapRGB(prgb) - xrgb *prgb; +SwapRGB(xrgb *prgb) { register char n; @@ -682,10 +601,7 @@ SwapRGB(prgb) } void -SQColorsExtend(pClient, size, prgb) - ClientPtr pClient; - int size; - xrgb *prgb; +SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb) { int i, n; xrgb *prgbT; @@ -701,10 +617,7 @@ SQColorsExtend(pClient, size, prgb) } void -SQueryColorsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryColorsReply *pRep; +SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep) { register char n; @@ -715,10 +628,7 @@ SQueryColorsReply(pClient, size, pRep) } void -SLookupColorReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xLookupColorReply *pRep; +SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep) { register char n; @@ -733,10 +643,7 @@ SLookupColorReply(pClient, size, pRep) } void -SQueryBestSizeReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xQueryBestSizeReply *pRep; +SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep) { register char n; @@ -747,10 +654,7 @@ SQueryBestSizeReply(pClient, size, pRep) } void -SListExtensionsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xListExtensionsReply *pRep; +SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep) { register char n; @@ -760,10 +664,8 @@ SListExtensionsReply(pClient, size, pRep) } void -SGetKeyboardMappingReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetKeyboardMappingReply *pRep; +SGetKeyboardMappingReply(ClientPtr pClient, int size, + xGetKeyboardMappingReply *pRep) { register char n; @@ -773,10 +675,8 @@ SGetKeyboardMappingReply(pClient, size, pRep) } void -SGetPointerMappingReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetPointerMappingReply *pRep; +SGetPointerMappingReply(ClientPtr pClient, int size, + xGetPointerMappingReply *pRep) { register char n; @@ -786,10 +686,8 @@ SGetPointerMappingReply(pClient, size, pRep) } void -SGetModifierMappingReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetModifierMappingReply *pRep; +SGetModifierMappingReply(ClientPtr pClient, int size, + xGetModifierMappingReply *pRep) { register char n; @@ -799,10 +697,7 @@ SGetModifierMappingReply(pClient, size, pRep) } void -SGetKeyboardControlReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetKeyboardControlReply *pRep; +SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep) { register char n; @@ -815,10 +710,7 @@ SGetKeyboardControlReply(pClient, size, pRep) } void -SGetPointerControlReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetPointerControlReply *pRep; +SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep) { register char n; @@ -830,10 +722,7 @@ SGetPointerControlReply(pClient, size, pRep) } void -SGetScreenSaverReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xGetScreenSaverReply *pRep; +SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep) { register char n; @@ -844,10 +733,7 @@ SGetScreenSaverReply(pClient, size, pRep) } void -SLHostsExtend(pClient, size, buf) - ClientPtr pClient; - int size; - char *buf; +SLHostsExtend(ClientPtr pClient, int size, char *buf) { char *bufT = buf; char *endbuf = buf + size; @@ -862,10 +748,7 @@ SLHostsExtend(pClient, size, buf) } void -SListHostsReply(pClient, size, pRep) - ClientPtr pClient; - int size; - xListHostsReply *pRep; +SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep) { register char n; @@ -878,8 +761,7 @@ SListHostsReply(pClient, size, pRep) void -SErrorEvent(from, to) - xError *from, *to; +SErrorEvent(xError *from, xError *to) { to->type = X_Error; to->errorCode = from->errorCode; @@ -890,8 +772,7 @@ SErrorEvent(from, to) } void -SKeyButtonPtrEvent(from, to) - xEvent *from, *to; +SKeyButtonPtrEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; @@ -919,8 +800,7 @@ SKeyButtonPtrEvent(from, to) } void -SEnterLeaveEvent(from, to) - xEvent *from, *to; +SEnterLeaveEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; @@ -939,8 +819,7 @@ SEnterLeaveEvent(from, to) } void -SFocusEvent(from, to) - xEvent *from, *to; +SFocusEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; @@ -950,8 +829,7 @@ SFocusEvent(from, to) } void -SExposeEvent(from, to) - xEvent *from, *to; +SExposeEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -964,8 +842,7 @@ SExposeEvent(from, to) } void -SGraphicsExposureEvent(from, to) - xEvent *from, *to; +SGraphicsExposureEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -988,8 +865,7 @@ SGraphicsExposureEvent(from, to) } void -SNoExposureEvent(from, to) - xEvent *from, *to; +SNoExposureEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -999,8 +875,7 @@ SNoExposureEvent(from, to) } void -SVisibilityEvent(from, to) - xEvent *from, *to; +SVisibilityEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1009,8 +884,7 @@ SVisibilityEvent(from, to) } void -SCreateNotifyEvent(from, to) - xEvent *from, *to; +SCreateNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1026,8 +900,7 @@ SCreateNotifyEvent(from, to) } void -SDestroyNotifyEvent(from, to) - xEvent *from, *to; +SDestroyNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1036,8 +909,7 @@ SDestroyNotifyEvent(from, to) } void -SUnmapNotifyEvent(from, to) - xEvent *from, *to; +SUnmapNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1047,8 +919,7 @@ SUnmapNotifyEvent(from, to) } void -SMapNotifyEvent(from, to) - xEvent *from, *to; +SMapNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1058,8 +929,7 @@ SMapNotifyEvent(from, to) } void -SMapRequestEvent(from, to) - xEvent *from, *to; +SMapRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1068,8 +938,7 @@ SMapRequestEvent(from, to) } void -SReparentEvent(from, to) - xEvent *from, *to; +SReparentEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1082,8 +951,7 @@ SReparentEvent(from, to) } void -SConfigureNotifyEvent(from, to) - xEvent *from, *to; +SConfigureNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1104,8 +972,7 @@ SConfigureNotifyEvent(from, to) } void -SConfigureRequestEvent(from, to) - xEvent *from, *to; +SConfigureRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; /* actually stack-mode */ @@ -1130,8 +997,7 @@ SConfigureRequestEvent(from, to) void -SGravityEvent(from, to) - xEvent *from, *to; +SGravityEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1142,8 +1008,7 @@ SGravityEvent(from, to) } void -SResizeRequestEvent(from, to) - xEvent *from, *to; +SResizeRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1153,8 +1018,7 @@ SResizeRequestEvent(from, to) } void -SCirculateEvent(from, to) - xEvent *from, *to; +SCirculateEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; @@ -1166,8 +1030,7 @@ SCirculateEvent(from, to) } void -SPropertyEvent(from, to) - xEvent *from, *to; +SPropertyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1178,8 +1041,7 @@ SPropertyEvent(from, to) } void -SSelectionClearEvent(from, to) - xEvent *from, *to; +SSelectionClearEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1189,8 +1051,7 @@ SSelectionClearEvent(from, to) } void -SSelectionRequestEvent(from, to) - xEvent *from, *to; +SSelectionRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1208,8 +1069,7 @@ SSelectionRequestEvent(from, to) } void -SSelectionNotifyEvent(from, to) - xEvent *from, *to; +SSelectionNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1225,8 +1085,7 @@ SSelectionNotifyEvent(from, to) } void -SColormapEvent(from, to) - xEvent *from, *to; +SColormapEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1237,8 +1096,7 @@ SColormapEvent(from, to) } void -SMappingEvent(from, to) - xEvent *from, *to; +SMappingEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); @@ -1249,8 +1107,7 @@ SMappingEvent(from, to) } void -SClientMessageEvent(from, to) - xEvent *from, *to; +SClientMessageEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; /* actually format */ @@ -1301,8 +1158,7 @@ SClientMessageEvent(from, to) } void -SKeymapNotifyEvent(from, to) - xEvent *from, *to; +SKeymapNotifyEvent(xEvent *from, xEvent *to) { /* Keymap notify events are special; they have no sequence number field, and contain entirely 8-bit data */ @@ -1362,10 +1218,7 @@ SwapConnSetupInfo( void -WriteSConnectionInfo(pClient, size, pInfo) - ClientPtr pClient; - unsigned long size; - char *pInfo; +WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) { char *pInfoTBase; @@ -1381,8 +1234,7 @@ WriteSConnectionInfo(pClient, size, pInfo) } void -SwapConnSetup(pConnSetup, pConnSetupT) - xConnSetup *pConnSetup, *pConnSetupT; +SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT) { cpswapl(pConnSetup->release, pConnSetupT->release); cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase); @@ -1401,8 +1253,7 @@ SwapConnSetup(pConnSetup, pConnSetupT) } void -SwapWinRoot(pRoot, pRootT) - xWindowRoot *pRoot, *pRootT; +SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT) { cpswapl(pRoot->windowId, pRootT->windowId); cpswapl(pRoot->defaultColormap, pRootT->defaultColormap); @@ -1423,8 +1274,7 @@ SwapWinRoot(pRoot, pRootT) } void -SwapVisual(pVis, pVisT) - xVisualType *pVis, *pVisT; +SwapVisual(xVisualType *pVis, xVisualType *pVisT) { cpswapl(pVis->visualID, pVisT->visualID); pVisT->class = pVis->class; @@ -1436,9 +1286,7 @@ SwapVisual(pVis, pVisT) } void -SwapConnSetupPrefix(pcspFrom, pcspTo) - xConnSetupPrefix *pcspFrom; - xConnSetupPrefix *pcspTo; +SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo) { pcspTo->success = pcspFrom->success; pcspTo->lengthReason = pcspFrom->lengthReason; @@ -1448,9 +1296,7 @@ SwapConnSetupPrefix(pcspFrom, pcspTo) } void -WriteSConnSetupPrefix(pClient, pcsp) - ClientPtr pClient; - xConnSetupPrefix *pcsp; +WriteSConnSetupPrefix(ClientPtr pClient, xConnSetupPrefix *pcsp) { xConnSetupPrefix cspT; diff --git a/dix/swapreq.c b/dix/swapreq.c index d795a3dea..5baadf792 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -62,9 +62,7 @@ SOFTWARE. /* Byte swap a list of longs */ void -SwapLongs (list, count) - register CARD32 *list; - register unsigned long count; +SwapLongs (register CARD32 *list, register unsigned long count) { register char n; @@ -91,9 +89,7 @@ SwapLongs (list, count) /* Byte swap a list of shorts */ void -SwapShorts (list, count) - register short *list; - register unsigned long count; +SwapShorts (register short *list, register unsigned long count) { register char n; @@ -128,8 +124,7 @@ SwapShorts (list, count) /* The following is used for all requests that have no fields to be swapped (except "length") */ int -SProcSimpleReq(client) - register ClientPtr client; +SProcSimpleReq(register ClientPtr client) { register char n; @@ -142,8 +137,7 @@ SProcSimpleReq(client) only a single 32-bit field to be swapped, coming right after the "length" field */ int -SProcResourceReq(client) - register ClientPtr client; +SProcResourceReq(register ClientPtr client) { register char n; @@ -155,8 +149,7 @@ SProcResourceReq(client) } int -SProcCreateWindow(client) - register ClientPtr client; +SProcCreateWindow(register ClientPtr client) { register char n; @@ -178,8 +171,7 @@ SProcCreateWindow(client) } int -SProcChangeWindowAttributes(client) - register ClientPtr client; +SProcChangeWindowAttributes(register ClientPtr client) { register char n; @@ -193,8 +185,7 @@ SProcChangeWindowAttributes(client) } int -SProcReparentWindow(client) - register ClientPtr client; +SProcReparentWindow(register ClientPtr client) { register char n; REQUEST(xReparentWindowReq); @@ -208,8 +199,7 @@ SProcReparentWindow(client) } int -SProcConfigureWindow(client) - register ClientPtr client; +SProcConfigureWindow(register ClientPtr client) { register char n; REQUEST(xConfigureWindowReq); @@ -224,8 +214,7 @@ SProcConfigureWindow(client) int -SProcInternAtom(client) - register ClientPtr client; +SProcInternAtom(register ClientPtr client) { register char n; REQUEST(xInternAtomReq); @@ -236,8 +225,7 @@ SProcInternAtom(client) } int -SProcChangeProperty(client) - register ClientPtr client; +SProcChangeProperty(register ClientPtr client) { register char n; REQUEST(xChangePropertyReq); @@ -261,8 +249,7 @@ SProcChangeProperty(client) } int -SProcDeleteProperty(client) - register ClientPtr client; +SProcDeleteProperty(register ClientPtr client) { register char n; REQUEST(xDeletePropertyReq); @@ -275,8 +262,7 @@ SProcDeleteProperty(client) } int -SProcGetProperty(client) - register ClientPtr client; +SProcGetProperty(register ClientPtr client) { register char n; REQUEST(xGetPropertyReq); @@ -291,8 +277,7 @@ SProcGetProperty(client) } int -SProcSetSelectionOwner(client) - register ClientPtr client; +SProcSetSelectionOwner(register ClientPtr client) { register char n; REQUEST(xSetSelectionOwnerReq); @@ -305,8 +290,7 @@ SProcSetSelectionOwner(client) } int -SProcConvertSelection(client) - register ClientPtr client; +SProcConvertSelection(register ClientPtr client) { register char n; REQUEST(xConvertSelectionReq); @@ -321,8 +305,7 @@ SProcConvertSelection(client) } int -SProcSendEvent(client) - register ClientPtr client; +SProcSendEvent(register ClientPtr client) { register char n; xEvent eventT; @@ -344,8 +327,7 @@ SProcSendEvent(client) } int -SProcGrabPointer(client) - register ClientPtr client; +SProcGrabPointer(register ClientPtr client) { register char n; REQUEST(xGrabPointerReq); @@ -360,8 +342,7 @@ SProcGrabPointer(client) } int -SProcGrabButton(client) - register ClientPtr client; +SProcGrabButton(register ClientPtr client) { register char n; REQUEST(xGrabButtonReq); @@ -376,8 +357,7 @@ SProcGrabButton(client) } int -SProcUngrabButton(client) - register ClientPtr client; +SProcUngrabButton(register ClientPtr client) { register char n; REQUEST(xUngrabButtonReq); @@ -389,8 +369,7 @@ SProcUngrabButton(client) } int -SProcChangeActivePointerGrab(client) - register ClientPtr client; +SProcChangeActivePointerGrab(register ClientPtr client) { register char n; REQUEST(xChangeActivePointerGrabReq); @@ -403,8 +382,7 @@ SProcChangeActivePointerGrab(client) } int -SProcGrabKeyboard(client) - register ClientPtr client; +SProcGrabKeyboard(register ClientPtr client) { register char n; REQUEST(xGrabKeyboardReq); @@ -416,8 +394,7 @@ SProcGrabKeyboard(client) } int -SProcGrabKey(client) - register ClientPtr client; +SProcGrabKey(register ClientPtr client) { register char n; REQUEST(xGrabKeyReq); @@ -429,8 +406,7 @@ SProcGrabKey(client) } int -SProcUngrabKey(client) - register ClientPtr client; +SProcUngrabKey(register ClientPtr client) { register char n; REQUEST(xUngrabKeyReq); @@ -442,8 +418,7 @@ SProcUngrabKey(client) } int -SProcGetMotionEvents(client) - register ClientPtr client; +SProcGetMotionEvents(register ClientPtr client) { register char n; REQUEST(xGetMotionEventsReq); @@ -456,8 +431,7 @@ SProcGetMotionEvents(client) } int -SProcTranslateCoords(client) - register ClientPtr client; +SProcTranslateCoords(register ClientPtr client) { register char n; REQUEST(xTranslateCoordsReq); @@ -471,8 +445,7 @@ SProcTranslateCoords(client) } int -SProcWarpPointer(client) - register ClientPtr client; +SProcWarpPointer(register ClientPtr client) { register char n; REQUEST(xWarpPointerReq); @@ -490,8 +463,7 @@ SProcWarpPointer(client) } int -SProcSetInputFocus(client) - register ClientPtr client; +SProcSetInputFocus(register ClientPtr client) { register char n; REQUEST(xSetInputFocusReq); @@ -503,8 +475,7 @@ SProcSetInputFocus(client) } int -SProcOpenFont(client) - register ClientPtr client; +SProcOpenFont(register ClientPtr client) { register char n; REQUEST(xOpenFontReq); @@ -516,8 +487,7 @@ SProcOpenFont(client) } int -SProcListFonts(client) - register ClientPtr client; +SProcListFonts(register ClientPtr client) { register char n; REQUEST(xListFontsReq); @@ -529,8 +499,7 @@ SProcListFonts(client) } int -SProcListFontsWithInfo(client) - register ClientPtr client; +SProcListFontsWithInfo(register ClientPtr client) { register char n; REQUEST(xListFontsWithInfoReq); @@ -542,8 +511,7 @@ SProcListFontsWithInfo(client) } int -SProcSetFontPath(client) - register ClientPtr client; +SProcSetFontPath(register ClientPtr client) { register char n; REQUEST(xSetFontPathReq); @@ -554,8 +522,7 @@ SProcSetFontPath(client) } int -SProcCreatePixmap(client) - register ClientPtr client; +SProcCreatePixmap(register ClientPtr client) { register char n; REQUEST(xCreatePixmapReq); @@ -570,8 +537,7 @@ SProcCreatePixmap(client) } int -SProcCreateGC(client) - register ClientPtr client; +SProcCreateGC(register ClientPtr client) { register char n; REQUEST(xCreateGCReq); @@ -585,8 +551,7 @@ SProcCreateGC(client) } int -SProcChangeGC(client) - register ClientPtr client; +SProcChangeGC(register ClientPtr client) { register char n; REQUEST(xChangeGCReq); @@ -599,8 +564,7 @@ SProcChangeGC(client) } int -SProcCopyGC(client) - register ClientPtr client; +SProcCopyGC(register ClientPtr client) { register char n; REQUEST(xCopyGCReq); @@ -613,8 +577,7 @@ SProcCopyGC(client) } int -SProcSetDashes(client) - register ClientPtr client; +SProcSetDashes(register ClientPtr client) { register char n; REQUEST(xSetDashesReq); @@ -628,8 +591,7 @@ SProcSetDashes(client) } int -SProcSetClipRectangles(client) - register ClientPtr client; +SProcSetClipRectangles(register ClientPtr client) { register char n; REQUEST(xSetClipRectanglesReq); @@ -643,8 +605,7 @@ SProcSetClipRectangles(client) } int -SProcClearToBackground(client) - register ClientPtr client; +SProcClearToBackground(register ClientPtr client) { register char n; REQUEST(xClearAreaReq); @@ -659,8 +620,7 @@ SProcClearToBackground(client) } int -SProcCopyArea(client) - register ClientPtr client; +SProcCopyArea(register ClientPtr client) { register char n; REQUEST(xCopyAreaReq); @@ -679,8 +639,7 @@ SProcCopyArea(client) } int -SProcCopyPlane(client) - register ClientPtr client; +SProcCopyPlane(register ClientPtr client) { register char n; REQUEST(xCopyPlaneReq); @@ -702,8 +661,7 @@ SProcCopyPlane(client) /* The following routine is used for all Poly drawing requests (except FillPoly, which uses a different request format) */ int -SProcPoly(client) - register ClientPtr client; +SProcPoly(register ClientPtr client) { register char n; @@ -720,8 +678,7 @@ SProcPoly(client) is longer than xPolyPointReq, and we don't want to swap the difference as shorts! */ int -SProcFillPoly(client) - register ClientPtr client; +SProcFillPoly(register ClientPtr client) { register char n; @@ -735,8 +692,7 @@ SProcFillPoly(client) } int -SProcPutImage(client) - register ClientPtr client; +SProcPutImage(register ClientPtr client) { register char n; REQUEST(xPutImageReq); @@ -754,8 +710,7 @@ SProcPutImage(client) } int -SProcGetImage(client) - register ClientPtr client; +SProcGetImage(register ClientPtr client) { register char n; REQUEST(xGetImageReq); @@ -773,8 +728,7 @@ SProcGetImage(client) /* ProcPolyText used for both PolyText8 and PolyText16 */ int -SProcPolyText(client) - register ClientPtr client; +SProcPolyText(register ClientPtr client) { register char n; REQUEST(xPolyTextReq); @@ -790,8 +744,7 @@ SProcPolyText(client) /* ProcImageText used for both ImageText8 and ImageText16 */ int -SProcImageText(client) - register ClientPtr client; +SProcImageText(register ClientPtr client) { register char n; REQUEST(xImageTextReq); @@ -805,8 +758,7 @@ SProcImageText(client) } int -SProcCreateColormap(client) - register ClientPtr client; +SProcCreateColormap(register ClientPtr client) { register char n; REQUEST(xCreateColormapReq); @@ -820,8 +772,7 @@ SProcCreateColormap(client) int -SProcCopyColormapAndFree(client) - register ClientPtr client; +SProcCopyColormapAndFree(register ClientPtr client) { register char n; REQUEST(xCopyColormapAndFreeReq); @@ -834,8 +785,7 @@ SProcCopyColormapAndFree(client) } int -SProcAllocColor (client) - register ClientPtr client; +SProcAllocColor(register ClientPtr client) { register char n; REQUEST(xAllocColorReq); @@ -849,8 +799,7 @@ SProcAllocColor (client) } int -SProcAllocNamedColor (client) - register ClientPtr client; +SProcAllocNamedColor(register ClientPtr client) { register char n; @@ -863,8 +812,7 @@ SProcAllocNamedColor (client) } int -SProcAllocColorCells (client) - register ClientPtr client; +SProcAllocColorCells(register ClientPtr client) { register char n; REQUEST(xAllocColorCellsReq); @@ -877,8 +825,7 @@ SProcAllocColorCells (client) } int -SProcAllocColorPlanes(client) - register ClientPtr client; +SProcAllocColorPlanes(register ClientPtr client) { register char n; REQUEST(xAllocColorPlanesReq); @@ -893,8 +840,7 @@ SProcAllocColorPlanes(client) } int -SProcFreeColors (client) - register ClientPtr client; +SProcFreeColors(register ClientPtr client) { register char n; REQUEST(xFreeColorsReq); @@ -908,8 +854,7 @@ SProcFreeColors (client) } void -SwapColorItem(pItem) - xColorItem *pItem; +SwapColorItem(xColorItem *pItem) { register char n; @@ -920,8 +865,7 @@ SwapColorItem(pItem) } int -SProcStoreColors (client) - register ClientPtr client; +SProcStoreColors(register ClientPtr client) { register char n; long count; @@ -938,8 +882,7 @@ SProcStoreColors (client) } int -SProcStoreNamedColor (client) - register ClientPtr client; +SProcStoreNamedColor (register ClientPtr client) { register char n; REQUEST(xStoreNamedColorReq); @@ -952,8 +895,7 @@ SProcStoreNamedColor (client) } int -SProcQueryColors(client) - register ClientPtr client; +SProcQueryColors (register ClientPtr client) { register char n; REQUEST(xQueryColorsReq); @@ -965,8 +907,7 @@ SProcQueryColors(client) } int -SProcLookupColor(client) - register ClientPtr client; +SProcLookupColor (register ClientPtr client) { register char n; REQUEST(xLookupColorReq); @@ -978,8 +919,7 @@ SProcLookupColor(client) } int -SProcCreateCursor( client) - register ClientPtr client; +SProcCreateCursor (register ClientPtr client) { register char n; REQUEST(xCreateCursorReq); @@ -1000,8 +940,7 @@ SProcCreateCursor( client) } int -SProcCreateGlyphCursor( client) - register ClientPtr client; +SProcCreateGlyphCursor (register ClientPtr client) { register char n; REQUEST(xCreateGlyphCursorReq); @@ -1023,8 +962,7 @@ SProcCreateGlyphCursor( client) int -SProcRecolorCursor(client) - register ClientPtr client; +SProcRecolorCursor (register ClientPtr client) { register char n; REQUEST(xRecolorCursorReq); @@ -1041,8 +979,7 @@ SProcRecolorCursor(client) } int -SProcQueryBestSize (client) - register ClientPtr client; +SProcQueryBestSize (register ClientPtr client) { register char n; REQUEST(xQueryBestSizeReq); @@ -1056,8 +993,7 @@ SProcQueryBestSize (client) } int -SProcQueryExtension (client) - register ClientPtr client; +SProcQueryExtension (register ClientPtr client) { register char n; REQUEST(xQueryExtensionReq); @@ -1068,8 +1004,7 @@ SProcQueryExtension (client) } int -SProcChangeKeyboardMapping (client) - register ClientPtr client; +SProcChangeKeyboardMapping (register ClientPtr client) { register char n; REQUEST(xChangeKeyboardMappingReq); @@ -1081,8 +1016,7 @@ SProcChangeKeyboardMapping (client) int -SProcChangeKeyboardControl (client) - register ClientPtr client; +SProcChangeKeyboardControl (register ClientPtr client) { register char n; REQUEST(xChangeKeyboardControlReq); @@ -1094,8 +1028,7 @@ SProcChangeKeyboardControl (client) } int -SProcChangePointerControl (client) - register ClientPtr client; +SProcChangePointerControl (register ClientPtr client) { register char n; REQUEST(xChangePointerControlReq); @@ -1109,8 +1042,7 @@ SProcChangePointerControl (client) int -SProcSetScreenSaver (client) - register ClientPtr client; +SProcSetScreenSaver (register ClientPtr client) { register char n; REQUEST(xSetScreenSaverReq); @@ -1122,8 +1054,7 @@ SProcSetScreenSaver (client) } int -SProcChangeHosts(client) - register ClientPtr client; +SProcChangeHosts (register ClientPtr client) { register char n; @@ -1135,8 +1066,7 @@ SProcChangeHosts(client) } -int SProcRotateProperties(client) - register ClientPtr client; +int SProcRotateProperties (register ClientPtr client) { register char n; REQUEST(xRotatePropertiesReq); @@ -1149,10 +1079,8 @@ int SProcRotateProperties(client) return ((* ProcVector[X_RotateProperties])(client)); } -/*ARGSUSED*/ int -SProcNoOperation(client) - ClientPtr client; +SProcNoOperation(register ClientPtr client) { register char n; REQUEST(xReq); @@ -1161,8 +1089,7 @@ SProcNoOperation(client) } void -SwapConnClientPrefix(pCCP) - xConnClientPrefix *pCCP; +SwapConnClientPrefix(xConnClientPrefix *pCCP) { register char n; diff --git a/dix/window.c b/dix/window.c index cfc821c2c..f77f612f4 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/window.c,v 1.4.2.1 2004/07/30 06:54:41 anholt Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/window.c,v 1.6 2004/07/31 08:24:13 anholt Exp $ */ /* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /* @@ -132,10 +132,7 @@ extern void WindowHasNewCursor(); extern void RecalculateDeliverableEvents(); #endif -static Bool TileScreenSaver( - int /*i*/, - int /*kind*/ -); +static Bool TileScreenSaver(int i, int kind); #define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ @@ -169,9 +166,7 @@ int deltaSaveUndersViewable = 0; ******/ int -PrintChildren(p1, indent) - WindowPtr p1; - int indent; +PrintChildren(WindowPtr p1, int indent) { WindowPtr p2; int i; @@ -204,10 +199,7 @@ PrintWindowTree() #endif int -TraverseTree(pWin, func, data) - register WindowPtr pWin; - VisitWindowProcPtr func; - pointer data; +TraverseTree(register WindowPtr pWin, VisitWindowProcPtr func, pointer data) { register int result; register WindowPtr pChild; @@ -242,10 +234,7 @@ TraverseTree(pWin, func, data) *****/ int -WalkTree(pScreen, func, data) - ScreenPtr pScreen; - VisitWindowProcPtr func; - pointer data; +WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data) { return(TraverseTree(WindowTable[pScreen->myNum], func, data)); } @@ -343,8 +332,7 @@ MakeRootTile(WindowPtr pWin) } WindowPtr -AllocateWindow(pScreen) - ScreenPtr pScreen; +AllocateWindow(ScreenPtr pScreen) { WindowPtr pWin; register char *ptr; @@ -380,8 +368,7 @@ AllocateWindow(pScreen) *****/ Bool -CreateRootWindow(pScreen) - ScreenPtr pScreen; +CreateRootWindow(ScreenPtr pScreen) { WindowPtr pWin; BoxRec box; @@ -489,8 +476,7 @@ CreateRootWindow(pScreen) } void -InitRootWindow(pWin) - WindowPtr pWin; +InitRootWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -517,11 +503,9 @@ InitRootWindow(pWin) */ void -ClippedRegionFromBox(pWin, Rgn, x, y, w, h) - register WindowPtr pWin; - RegionPtr Rgn; - register int x, y; - int w, h; +ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn, + register int x, register int y, + register int w, register int h) { ScreenPtr pScreen = pWin->drawable.pScreen; BoxRec box; @@ -547,8 +531,7 @@ ClippedRegionFromBox(pWin, Rgn, x, y, w, h) } WindowPtr -RealChildHead(pWin) - register WindowPtr pWin; +RealChildHead(register WindowPtr pWin) { if (!pWin->parent && (screenIsSaved == SCREEN_SAVER_ON) && @@ -564,19 +547,9 @@ RealChildHead(pWin) *****/ WindowPtr -CreateWindow(wid, pParent, x, y, w, h, bw, class, vmask, vlist, - depth, client, visual, error) - Window wid; - register WindowPtr pParent; - int x,y; - unsigned int w, h, bw; - unsigned int class; - register Mask vmask; - XID *vlist; - int depth; - ClientPtr client; - VisualID visual; - int *error; +CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w, + unsigned h, unsigned bw, unsigned class, register Mask vmask, XID *vlist, + int depth, ClientPtr client, VisualID visual, int *error) { register WindowPtr pWin; WindowPtr pHead; @@ -896,11 +869,8 @@ CrushTree(WindowPtr pWin) * If wid is None, don't send any events *****/ -/*ARGSUSED*/ int -DeleteWindow(value, wid) - pointer value; - XID wid; +DeleteWindow(pointer value, XID wid) { register WindowPtr pParent; register WindowPtr pWin = (WindowPtr)value; @@ -934,11 +904,8 @@ DeleteWindow(value, wid) return Success; } -/*ARGSUSED*/ void -DestroySubwindows(pWin, client) - register WindowPtr pWin; - ClientPtr client; +DestroySubwindows(register WindowPtr pWin, ClientPtr client) { /* XXX * The protocol is quite clear that each window should be @@ -965,11 +932,7 @@ DestroySubwindows(pWin, client) *****/ int -ChangeWindowAttributes(pWin, vmask, vlist, client) - register WindowPtr pWin; - Mask vmask; - XID *vlist; - ClientPtr client; +ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) { register Mask index2; register XID *pVlist; @@ -1509,10 +1472,7 @@ PatchUp: *****/ void -GetWindowAttributes(pWin, client, wa) - register WindowPtr pWin; - ClientPtr client; - xGetWindowAttributesReply *wa; +GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa) { wa->type = X_Reply; wa->bitGravity = pWin->bitGravity; @@ -1548,8 +1508,7 @@ GetWindowAttributes(pWin, client, wa) WindowPtr -MoveWindowInStack(pWin, pNextSib) - register WindowPtr pWin, pNextSib; +MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib) { register WindowPtr pParent = pWin->parent; WindowPtr pFirstChange = pWin; /* highest window where list changes */ @@ -1633,8 +1592,7 @@ MoveWindowInStack(pWin, pNextSib) } RegionPtr -CreateUnclippedWinSize (pWin) - register WindowPtr pWin; +CreateUnclippedWinSize (register WindowPtr pWin) { RegionPtr pRgn; BoxRec box; @@ -1661,8 +1619,7 @@ CreateUnclippedWinSize (pWin) } void -SetWinSize (pWin) - register WindowPtr pWin; +SetWinSize (register WindowPtr pWin) { #ifdef COMPOSITE if (pWin->redirectDraw) @@ -1700,8 +1657,7 @@ SetWinSize (pWin) } void -SetBorderSize (pWin) - register WindowPtr pWin; +SetBorderSize (register WindowPtr pWin) { int bw; @@ -1744,13 +1700,17 @@ SetBorderSize (pWin) } } +/** + * + * \param x,y new window position + * \param oldx,oldy old window position + * \param destx,desty position relative to gravity + */ + void -GravityTranslate (x, y, oldx, oldy, dw, dh, gravity, destx, desty) - register int x, y; /* new window position */ - int oldx, oldy; /* old window position */ - int dw, dh; - unsigned gravity; - register int *destx, *desty; /* position relative to gravity */ +GravityTranslate (register int x, register int y, int oldx, int oldy, + int dw, int dh, unsigned gravity, + register int *destx, register int *desty) { switch (gravity) { case NorthGravity: @@ -1798,9 +1758,7 @@ GravityTranslate (x, y, oldx, oldy, dw, dh, gravity, destx, desty) /* XXX need to retile border on each window with ParentRelative origin */ void -ResizeChildrenWinSize(pWin, dx, dy, dw, dh) - register WindowPtr pWin; - int dx, dy, dw, dh; +ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh) { register ScreenPtr pScreen; register WindowPtr pSib, pChild; @@ -2212,11 +2170,7 @@ ReflectStackChange( *****/ int -ConfigureWindow(pWin, mask, vlist, client) - register WindowPtr pWin; - register Mask mask; - XID *vlist; - ClientPtr client; +ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client) { #define RESTACK_WIN 0 #define MOVE_WIN 1 @@ -2501,10 +2455,7 @@ ActuallyDoSomething: ******/ int -CirculateWindow(pParent, direction, client) - WindowPtr pParent; - int direction; - ClientPtr client; +CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) { register WindowPtr pWin, pHead, pFirst; xEvent event; @@ -2576,10 +2527,8 @@ CompareWIDs( *****/ int -ReparentWindow(pWin, pParent, x, y, client) - register WindowPtr pWin, pParent; - int x,y; - ClientPtr client; +ReparentWindow(register WindowPtr pWin, register WindowPtr pParent, + int x, int y, ClientPtr client) { WindowPtr pPrev, pPriorParent; Bool WasMapped = (Bool)(pWin->mapped); @@ -2711,9 +2660,7 @@ RealizeTree(WindowPtr pWin) *****/ int -MapWindow(pWin, client) - register WindowPtr pWin; - ClientPtr client; +MapWindow(register WindowPtr pWin, ClientPtr client) { register ScreenPtr pScreen; @@ -2839,9 +2786,7 @@ MapWindow(pWin, client) *****/ void -MapSubwindows(pParent, client) - register WindowPtr pParent; - ClientPtr client; +MapSubwindows(register WindowPtr pParent, ClientPtr client) { register WindowPtr pWin; WindowPtr pFirstMapped = NullWindow; @@ -3020,9 +2965,7 @@ UnrealizeTree( *****/ int -UnmapWindow(pWin, fromConfigure) - register WindowPtr pWin; - Bool fromConfigure; +UnmapWindow(register WindowPtr pWin, Bool fromConfigure) { register WindowPtr pParent; xEvent event; @@ -3081,8 +3024,7 @@ UnmapWindow(pWin, fromConfigure) *****/ void -UnmapSubwindows(pWin) - register WindowPtr pWin; +UnmapSubwindows(register WindowPtr pWin) { register WindowPtr pChild, pHead; xEvent event; @@ -3173,8 +3115,7 @@ UnmapSubwindows(pWin) void -HandleSaveSet(client) - register ClientPtr client; +HandleSaveSet(register ClientPtr client) { register WindowPtr pParent, pWin; register int j; @@ -3214,11 +3155,13 @@ HandleSaveSet(client) client->saveSet = (SaveSetElt *)NULL; } +/** + * + * \param x,y in root + * \param box "return" value + */ Bool -VisibleBoundingBoxFromPoint(pWin, x, y, box) - register WindowPtr pWin; - int x, y; /* in root */ - BoxPtr box; /* "return" value */ +VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box) { if (!pWin->realized) return (FALSE); @@ -3227,10 +3170,12 @@ VisibleBoundingBoxFromPoint(pWin, x, y, box) return(FALSE); } +/** + * + * \param x,y in root + */ Bool -PointInWindowIsVisible(pWin, x, y) - register WindowPtr pWin; - int x, y; /* in root */ +PointInWindowIsVisible(register WindowPtr pWin, int x, int y) { BoxRec box; @@ -3244,8 +3189,7 @@ PointInWindowIsVisible(pWin, x, y) RegionPtr -NotClippedByChildren(pWin) - register WindowPtr pWin; +NotClippedByChildren(register WindowPtr pWin) { register ScreenPtr pScreen; RegionPtr pReg; @@ -3262,8 +3206,7 @@ NotClippedByChildren(pWin) } void -SendVisibilityNotify(pWin) - WindowPtr pWin; +SendVisibilityNotify(WindowPtr pWin) { xEvent event; #ifndef NO_XINERAMA_PORT @@ -3335,14 +3278,12 @@ SendVisibilityNotify(pWin) #ifndef NOLOGOHACK static void DrawLogo( - WindowPtr /*pWin*/ + WindowPtr pWin ); #endif void -SaveScreens(on, mode) - int on; - int mode; +SaveScreens(int on, int mode) { int i; int what; @@ -3573,8 +3514,7 @@ TileScreenSaver(int i, int kind) */ WindowPtr -FindWindowWithOptional (w) - register WindowPtr w; +FindWindowWithOptional (register WindowPtr w) { do w = w->parent; @@ -3591,8 +3531,7 @@ FindWindowWithOptional (w) */ void -CheckWindowOptionalNeed (w) - register WindowPtr w; +CheckWindowOptionalNeed (register WindowPtr w) { register WindowOptPtr optional; register WindowOptPtr parentOptional; @@ -3644,8 +3583,7 @@ CheckWindowOptionalNeed (w) */ Bool -MakeWindowOptional (pWin) - register WindowPtr pWin; +MakeWindowOptional (register WindowPtr pWin) { register WindowOptPtr optional; register WindowOptPtr parentOptional; @@ -3686,8 +3624,7 @@ MakeWindowOptional (pWin) } void -DisposeWindowOptional (pWin) - register WindowPtr pWin; +DisposeWindowOptional (register WindowPtr pWin) { if (!pWin->optional) return; |