Fix more poorly indented/wrapped comments & code

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Alan Coopersmith 2012-07-09 19:12:42 -07:00
parent 789d64e19a
commit 6be74a9080
11 changed files with 44 additions and 30 deletions

View File

@ -630,7 +630,7 @@ ProcShmGetImage(ClientPtr client)
return rc; return rc;
VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client);
if (pDraw->type == DRAWABLE_WINDOW) { if (pDraw->type == DRAWABLE_WINDOW) {
if ( /* check for being viewable */ if ( /* check for being viewable */
!((WindowPtr) pDraw)->realized || !((WindowPtr) pDraw)->realized ||
/* check for being on screen */ /* check for being on screen */
pDraw->x + stuff->x < 0 || pDraw->x + stuff->x < 0 ||

View File

@ -444,7 +444,8 @@ SyncSendAlarmNotifyEvents(SyncAlarm * pAlarm)
ane.counter_value_hi = XSyncValueHigh32(pCounter->value); ane.counter_value_hi = XSyncValueHigh32(pCounter->value);
ane.counter_value_lo = XSyncValueLow32(pCounter->value); ane.counter_value_lo = XSyncValueLow32(pCounter->value);
} }
else { /* XXX what else can we do if there's no counter? */ else {
/* XXX what else can we do if there's no counter? */
ane.counter_value_hi = ane.counter_value_lo = 0; ane.counter_value_hi = ane.counter_value_lo = 0;
} }
@ -1779,10 +1780,10 @@ ProcSyncQueryAlarm(ClientPtr client)
pTrigger = &pAlarm->trigger; pTrigger = &pAlarm->trigger;
rep.counter = (pTrigger->pSync) ? pTrigger->pSync->id : None; rep.counter = (pTrigger->pSync) ? pTrigger->pSync->id : None;
#if 0 /* XXX unclear what to do, depends on whether relative value-types #if 0 /* XXX unclear what to do, depends on whether relative value-types
* are "consumed" immediately and are considered absolute from then * are "consumed" immediately and are considered absolute from then
* on. * on.
*/ */
rep.value_type = pTrigger->value_type; rep.value_type = pTrigger->value_type;
rep.wait_value_hi = XSyncValueHigh32(pTrigger->wait_value); rep.wait_value_hi = XSyncValueHigh32(pTrigger->wait_value);
rep.wait_value_lo = XSyncValueLow32(pTrigger->wait_value); rep.wait_value_lo = XSyncValueLow32(pTrigger->wait_value);

View File

@ -1266,7 +1266,7 @@ ProcessTouchOwnershipEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
else else
ti->listeners[0].state = LISTENER_HAS_ACCEPTED; ti->listeners[0].state = LISTENER_HAS_ACCEPTED;
} }
else { /* this is the very first ownership event for a grab */ else { /* this is the very first ownership event for a grab */
DeliverTouchEvents(dev, ti, (InternalEvent *) ev, ev->resource); DeliverTouchEvents(dev, ti, (InternalEvent *) ev, ev->resource);
} }
} }
@ -2312,12 +2312,11 @@ SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client,
check = (mask & exclusivemasks); check = (mask & exclusivemasks);
if (wOtherInputMasks(pWin)) { if (wOtherInputMasks(pWin)) {
if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { /* It is illegal for two different if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) {
* clients to select on any of the /* It is illegal for two different clients to select on any of
* events for maskcheck. However, * the events for maskcheck. However, it is OK, for some client
* it is OK, for some client to * to continue selecting on one of those events.
* continue selecting on one of those */
* events. */
for (others = wOtherInputMasks(pWin)->inputClients; others; for (others = wOtherInputMasks(pWin)->inputClients; others;
others = others->next) { others = others->next) {
if (!SameClient(others, client) && (check & if (!SameClient(others, client) && (check &

View File

@ -438,8 +438,9 @@ SProcIDispatch(ClientPtr client)
static void static void
SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
/* All we look at is the type field */ {
{ /* This is common to all replies */ /* All we look at is the type field */
/* This is common to all replies */
if (rep->RepType == X_GetExtensionVersion) if (rep->RepType == X_GetExtensionVersion)
SRepXGetExtensionVersion(client, len, SRepXGetExtensionVersion(client, len,
(xGetExtensionVersionReply *) rep); (xGetExtensionVersionReply *) rep);

View File

@ -208,7 +208,8 @@ updateOverlayWindow(ScreenPtr pScreen)
return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin));
} }
/* Let's be on the safe side and not assume an overlay window is always allocated. */ /* Let's be on the safe side and not assume an overlay window is
always allocated. */
return Success; return Success;
} }
@ -678,7 +679,8 @@ compWindowUpdateAutomatic(WindowPtr pWin)
/* /*
* And paint * And paint
*/ */
CompositePicture(PictOpSrc, pSrcPicture, 0, pDstPicture, 0, 0, /* src_x, src_y */ CompositePicture(PictOpSrc, pSrcPicture, 0, pDstPicture,
0, 0, /* src_x, src_y */
0, 0, /* msk_x, msk_y */ 0, 0, /* msk_x, msk_y */
pSrcPixmap->screen_x - pParent->drawable.x, pSrcPixmap->screen_x - pParent->drawable.x,
pSrcPixmap->screen_y - pParent->drawable.y, pSrcPixmap->screen_y - pParent->drawable.y,

View File

@ -331,9 +331,11 @@ config_udev_pre_init(void)
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "input", udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "input",
NULL); NULL);
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty", NULL); /* For Wacom serial devices */ /* For Wacom serial devices */
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty", NULL);
#ifdef CONFIG_UDEV_KMS #ifdef CONFIG_UDEV_KMS
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "drm", NULL); /* For output GPU devices */ /* For output GPU devices */
udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "drm", NULL);
#endif #endif
#ifdef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG #ifdef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG

View File

@ -576,7 +576,7 @@ CopyFree(int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst)
int nalloc; int nalloc;
switch (channel) { switch (channel) {
default: /* so compiler can see that everything gets initialized */ default: /* so compiler can see that everything gets initialized */
case REDMAP: case REDMAP:
ppix = (pmapSrc->clientPixelsRed)[client]; ppix = (pmapSrc->clientPixelsRed)[client];
npix = (pmapSrc->numPixelsRed)[client]; npix = (pmapSrc->numPixelsRed)[client];
@ -653,7 +653,7 @@ FreeCell(ColormapPtr pmap, Pixel i, int channel)
int *pCount; int *pCount;
switch (channel) { switch (channel) {
default: /* so compiler can see that everything gets initialized */ default: /* so compiler can see that everything gets initialized */
case PSEUDOMAP: case PSEUDOMAP:
case REDMAP: case REDMAP:
pent = (EntryPtr) & pmap->red[i]; pent = (EntryPtr) & pmap->red[i];
@ -2146,7 +2146,7 @@ FreeCo(ColormapPtr pmap, int client, int color, int npixIn, Pixel * ppixIn,
ppixClient = pmap->clientPixelsBlue[client]; ppixClient = pmap->clientPixelsBlue[client];
npixClient = pmap->numPixelsBlue[client]; npixClient = pmap->numPixelsBlue[client];
break; break;
default: /* so compiler can see that everything gets initialized */ default: /* so compiler can see that everything gets initialized */
case PSEUDOMAP: case PSEUDOMAP:
cmask = ~((Pixel) 0); cmask = ~((Pixel) 0);
rgbbad = 0; rgbbad = 0;

View File

@ -1246,7 +1246,8 @@ HasOtherPointer(WindowPtr win, DeviceIntPtr exclude)
* Assumption: Neither A nor B are valid windows. * Assumption: Neither A nor B are valid windows.
*/ */
static void static void
CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, WindowPtr A, /* PointerRootWin or NoneWin */ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
WindowPtr A, /* PointerRootWin or NoneWin */
WindowPtr B, /* NoneWin or PointerRootWin */ WindowPtr B, /* NoneWin or PointerRootWin */
int mode) int mode)
{ {
@ -1290,7 +1291,8 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, WindowPtr A, /* PointerRootWi
* Assumption: A is a valid window and not PointerRoot or None. * Assumption: A is a valid window and not PointerRoot or None.
*/ */
static void static void
CoreFocusToPointerRootOrNone(DeviceIntPtr dev, WindowPtr A, WindowPtr B, /* PointerRootWin or NoneWin */ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, WindowPtr A,
WindowPtr B, /* PointerRootWin or NoneWin */
int mode) int mode)
{ {
WindowPtr root; WindowPtr root;
@ -1336,7 +1338,8 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, WindowPtr A, WindowPtr B,
* Assumption: B is a valid window and not PointerRoot or None. * Assumption: B is a valid window and not PointerRoot or None.
*/ */
static void static void
CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, WindowPtr A, /* PointerRootWin or NoneWin */ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
WindowPtr A, /* PointerRootWin or NoneWin */
WindowPtr B, int mode) WindowPtr B, int mode)
{ {
WindowPtr root; WindowPtr root;

View File

@ -698,9 +698,10 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py)
} }
static void static void
CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, Bool confineToScreen, /* unused if PanoramiX on */ CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents,
ScreenPtr pScreen) Bool confineToScreen, /* unused if PanoramiX on */
{ /* unused if PanoramiX on */ ScreenPtr pScreen) /* unused if PanoramiX on */
{
HotSpot new; HotSpot new;
SpritePtr pSprite = pDev->spriteInfo->sprite; SpritePtr pSprite = pDev->spriteInfo->sprite;

View File

@ -205,7 +205,10 @@ AllocGrab(void)
} }
GrabPtr GrabPtr
CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice, WindowPtr window, enum InputLevel grabtype, GrabMask *mask, GrabParameters *param, int type, KeyCode keybut, /* key or button */ CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice,
WindowPtr window, enum InputLevel grabtype, GrabMask *mask,
GrabParameters *param, int type,
KeyCode keybut, /* key or button */
WindowPtr confineTo, CursorPtr cursor) WindowPtr confineTo, CursorPtr cursor)
{ {
GrabPtr grab; GrabPtr grab;

View File

@ -262,8 +262,10 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
ev.kind = kind; ev.kind = kind;
ev.forced = forced; ev.forced = forced;
WriteEventsToClient(pEv->client, 1, (xEvent *) &ev); WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
}} static void }
}
static void
SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * from, SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent * from,
xXF86VidModeNotifyEvent * to) xXF86VidModeNotifyEvent * to)
{ {