aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/dix/cursor.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c14
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c31
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c15
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c3
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c62
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Split.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c32
-rw-r--r--nx-X11/programs/Xserver/mi/mibitblt.c6
-rw-r--r--nx-X11/programs/Xserver/mi/mispans.c10
-rw-r--r--nx-X11/programs/Xserver/os/xdmauth.c18
-rw-r--r--nx-X11/programs/Xserver/os/xdmcp.c26
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxList.c1
-rw-r--r--nx-X11/programs/Xserver/xkb/xkb.c21
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbActions.c9
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbLEDs.c6
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c4
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbtext.c1
-rw-r--r--nx-X11/programs/Xserver/xkb/xkmread.c1
28 files changed, 155 insertions, 163 deletions
diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c
index 658edcb87..8f6f82c6d 100644
--- a/nx-X11/programs/Xserver/dix/cursor.c
+++ b/nx-X11/programs/Xserver/dix/cursor.c
@@ -145,7 +145,7 @@ CheckForEmptyMask(CursorBitsPtr bits)
if (bits->argb)
{
CARD32 *argb = bits->argb;
- int n = bits->width * bits->height;
+ n = bits->width * bits->height;
while (n--)
if (*argb++ & 0xff000000) return;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index e04a03dc1..0b8331b79 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -303,7 +303,7 @@ void nxagentWakeupByReset(ClientPtr client)
#ifndef WAIT_ALL_EVENTS
-static Bool nxagentWaitWakeupBySplitPredicate(Display *display, XEvent *event, XPointer ptr)
+static Bool nxagentWaitWakeupBySplitPredicate(Display *disp, XEvent *event, XPointer ptr)
{
return (event -> type == ClientMessage &&
(event -> xclient.data.l[0] == NXNoSplitNotify ||
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 47eaa946d..1d5054fbb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1733,13 +1733,15 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
return 0;
}
- int i = nxagentFindCurrentSelectionIndex(selection);
- if (i < NumCurrentSelections && IS_INTERNAL_OWNER(i))
{
- /*
- * There is a client owner on the agent side, let normal dix stuff happen.
- */
- return 0;
+ int i = nxagentFindCurrentSelectionIndex(selection);
+ if (i < NumCurrentSelections && IS_INTERNAL_OWNER(i))
+ {
+ /*
+ * There is a client owner on the agent side, let normal dix stuff happen.
+ */
+ return 0;
+ }
}
/*
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
index 0c667a00c..bafb30cea 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
@@ -487,7 +487,7 @@ void nxagentDisconnectCursor(void * p0, XID x1, void * p2)
}
}
-Bool nxagentDisconnectAllCursor(void)
+void nxagentDisconnectAllCursor(void)
{
Bool r = True;
@@ -518,7 +518,7 @@ Bool nxagentDisconnectAllCursor(void)
nxagentDisconnectCursor(grab -> cursor, 0, &r);
}
- return r;
+ return;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.h b/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
index b115dfa38..e857834df 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
@@ -112,6 +112,6 @@ void nxagentDisconnectCursor(void * p0, XID x1, void * p2);
void nxagentReconnectCursor(void * p0, XID x1, void * p2);
void nxagentReDisplayCurrentCursor(void);
Bool nxagentReconnectAllCursor(void *p0);
-Bool nxagentDisconnectAllCursor(void);
+void nxagentDisconnectAllCursor(void);
#endif /* __Cursor_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index dad6bfb2b..c8ad891be 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -110,7 +110,7 @@ Bool nxagentTrue24 = False;
int nxagentNumVisuals;
int nxagentXConnectionNumber;
-int nxagentIOErrorHandler(Display *display);
+int nxagentIOErrorHandler(Display *disp);
static Bool nxagentDisplayInfoSaved = False;
static Display *nxagentDisplayBackup = NULL;
@@ -170,7 +170,7 @@ Pixmap nxagentIconPixmap;
Pixmap nxagentIconShape;
Bool useXpmIcon = False;
-Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask);
+Bool nxagentMakeIcon(Display *disp, Pixmap *nxIcon, Pixmap *nxMask);
static void nxagentInitVisuals(void);
@@ -188,7 +188,7 @@ static int nxagentCheckForColormapsCompatibility(int flexibility);
* Save Internal implementation Also called in Reconnect.c.
*/
-Display *nxagentInternalOpenDisplay(char *display);
+Display *nxagentInternalOpenDisplay(char *disp);
#ifdef NXAGENT_TIMESTAMP
unsigned long startTime;
@@ -226,7 +226,7 @@ int nxagentServerOrder(void)
* be probably moved to Handlers.c.
*/
-int nxagentIOErrorHandler(Display *display)
+int nxagentIOErrorHandler(Display *disp)
{
#ifdef TEST
fprintf(stderr, "nxagentIOErrorHandler: Got I/O error with nxagentException.ioError [%d].\n",
@@ -559,7 +559,7 @@ static void nxagentSigchldHandler(int signal)
return;
}
-Display *nxagentInternalOpenDisplay(char *display)
+Display *nxagentInternalOpenDisplay(char *disp)
{
/*
* Stop the smart schedule timer since it uses SIGALRM as we do.
@@ -601,10 +601,10 @@ FIXME: Should print a warning if the user tries to let the agent
#ifdef TEST
fprintf(stderr, "nxagentInternalOpenDisplay: Going to open the display [%s].\n",
- display);
+ disp);
#endif
- Display *newDisplay = XOpenDisplay(display);
+ Display *newDisplay = XOpenDisplay(disp);
alarm(0);
@@ -630,7 +630,7 @@ FIXME: Should print a warning if the user tries to let the agent
return newDisplay;
}
-static void nxagentDisplayBlockHandler(Display *display, int reason)
+static void nxagentDisplayBlockHandler(Display *disp, int reason)
{
if (nxagentDisplay != NULL)
{
@@ -686,7 +686,7 @@ static void nxagentDisplayBlockHandler(Display *display, int reason)
}
}
-static void nxagentDisplayWriteHandler(Display *display, int length)
+static void nxagentDisplayWriteHandler(Display *disp, int length)
{
if (nxagentDisplay != NULL)
{
@@ -717,7 +717,7 @@ int nxagentGetDataRate(void)
return nxagentRate;
}
-static void nxagentDisplayFlushHandler(Display *display, int length)
+static void nxagentDisplayFlushHandler(Display *disp, int length)
{
if (nxagentDisplay != NULL)
{
@@ -768,7 +768,7 @@ static void nxagentDisplayFlushHandler(Display *display, int length)
* rupt was received or if any other event occurred mandating the
+ end of the session."
*/
-static int nxagentDisplayErrorPredicate(Display *display, int error)
+static int nxagentDisplayErrorPredicate(Display *disp, int error)
{
#ifdef TEST
fprintf(stderr, "nxagentDisplayErrorPredicate: CHECK! Error is [%d] with [%d][%d][%d][%d][%d].\n",
@@ -789,7 +789,7 @@ static int nxagentDisplayErrorPredicate(Display *display, int error)
else if (nxagentException.sigHup > 0 ||
nxagentException.ioError > 0)
{
- NXForceDisplayError(display);
+ NXForceDisplayError(disp);
return 1;
}
@@ -1746,7 +1746,7 @@ FIXME: Is this needed?
nxagentDisplay = NULL;
}
-Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
+Bool nxagentMakeIcon(Display *disp, Pixmap *nxIcon, Pixmap *nxMask)
{
char** agentIconData;
@@ -1764,8 +1764,8 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
XlibPixmap IconPixmap;
XlibPixmap IconShape;
- if (XpmSuccess == XpmCreatePixmapFromData(display,
- DefaultRootWindow(display),
+ if (XpmSuccess == XpmCreatePixmapFromData(disp,
+ DefaultRootWindow(disp),
agentIconData,
&IconPixmap,
&IconShape,
@@ -2255,7 +2255,6 @@ static int nxagentInitAndCheckVisuals(int flexibility)
{
/* FIXME: does this also need work? */
- bool matched;
bool compatible = true;
long viMask = VisualScreenMask;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 7c69c99d9..7f1d2dec5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -405,7 +405,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
RegionNumRects(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
#endif
- RegionPtr clipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
+ clipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
/*
* Intersecting the viewable region of the drawable with the
@@ -2261,11 +2261,11 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
{
RegionPtr pRegion = RegionCreate(NullBox, 1);
- int np = nPoints;
- while (np--)
+ xPoint *xp = pPoints;
+
+ for (int np = nPoints; np--; xp++)
{
BoxRec box;
- xPoint *xp = pPoints;
if (CoordModePrevious)
{
@@ -2294,8 +2294,6 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
RegionUnion(pRegion, pRegion, &tmpRegion);
RegionUninit(&tmpRegion);
-
- xp++;
}
BoxRec extents = *RegionExtents(pRegion);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 597359cf1..b19dda3ac 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -167,7 +167,7 @@ void nxagentHandleCollectPropertyEvent(XEvent*);
void nxagentHandleCollectGrabPointerEvent(int resource);
-Bool nxagentCollectGrabPointerPredicate(Display *display, XEvent *X, XPointer ptr);
+Bool nxagentCollectGrabPointerPredicate(Display *disp, XEvent *X, XPointer ptr);
/*
* Used in Handlers.c to synchronize the agent with the remote X
@@ -702,7 +702,7 @@ static void nxagentToggleAutoGrab(void)
nxagentDisableAutoGrab();
}
-static Bool nxagentExposurePredicate(Display *display, XEvent *event, XPointer window)
+static Bool nxagentExposurePredicate(Display *disp, XEvent *event, XPointer window)
{
/*
* Handle both Expose and ProcessedExpose events. The latters are
@@ -720,12 +720,12 @@ static Bool nxagentExposurePredicate(Display *display, XEvent *event, XPointer w
}
}
-static int nxagentAnyEventPredicate(Display *display, XEvent *event, XPointer parameter)
+static int nxagentAnyEventPredicate(Display *disp, XEvent *event, XPointer parameter)
{
return 1;
}
-int nxagentInputEventPredicate(Display *display, XEvent *event, XPointer parameter)
+int nxagentInputEventPredicate(Display *disp, XEvent *event, XPointer parameter)
{
switch (event -> type)
{
@@ -1238,7 +1238,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
int resource = nxagentWaitForResource(NXGetCollectGrabPointerResource,
nxagentCollectGrabPointerPredicate);
- ScreenPtr pScreen = nxagentScreen(X.xbutton.window);
+ pScreen = nxagentScreen(X.xbutton.window);
viewportCursor = XCreateFontCursor(nxagentDisplay, XC_fleur);
NXCollectGrabPointer(nxagentDisplay, resource,
@@ -1380,7 +1380,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
}
case MotionNotify:
{
- ScreenPtr pScreen = nxagentScreen(X.xmotion.window);
+ pScreen = nxagentScreen(X.xmotion.window);
#ifdef TEST
fprintf(stderr, "%s: Going to handle new MotionNotify event.\n", __func__);
@@ -1593,6 +1593,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
{
for (int k = 0; k < 8; k++)
{
+ if (val & (1 << k))
{
#ifdef NXAGENT_FIXKEYS_DEBUG
fprintf(stderr, "sending KeyRelease event for keycode: %x\n",
@@ -3882,7 +3883,7 @@ void nxagentDeactivatePointerGrab(void)
}
}
-Bool nxagentCollectGrabPointerPredicate(Display *display, XEvent *X, XPointer ptr)
+Bool nxagentCollectGrabPointerPredicate(Display *disp, XEvent *X, XPointer ptr)
{
return (X -> xclient.window == 0 &&
X -> xclient.message_type == 0 &&
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h
index 85f585e1f..6df5725d4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h
@@ -68,9 +68,9 @@ typedef int (*GetResourceFuncPtr)(Display*);
int nxagentWaitForResource(GetResourceFuncPtr, PredicateFuncPtr);
-Bool nxagentCollectGrabPointerPredicate(Display *display, XEvent *X, XPointer ptr);
+Bool nxagentCollectGrabPointerPredicate(Display *disp, XEvent *X, XPointer ptr);
-int nxagentInputEventPredicate(Display *display, XEvent *event, XPointer parameter);
+int nxagentInputEventPredicate(Display *disp, XEvent *event, XPointer parameter);
/*
* Enable and disable notification of
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 559eae719..fa6b9ce03 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -941,7 +941,7 @@ void nxagentHandleCollectInputFocusEvent(int resource)
#endif
}
-Bool nxagentCollectInputFocusPredicate(Display *display, XEvent *X, XPointer ptr)
+Bool nxagentCollectInputFocusPredicate(Display *disp, XEvent *X, XPointer ptr)
{
return (X -> xclient.window == 0 &&
X -> xclient.message_type == 0 &&
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index 3cba1a89d..0b6b36547 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -203,7 +203,7 @@ void checkX2goAgent(void)
/*
* Called at X server's initialization.
*/
-void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
+void InitOutput(ScreenInfo *scrInfo, int argc, char *argv[])
{
/*
* Print our pid and version information.
@@ -329,13 +329,13 @@ FIXME: These variables, if not removed at all because have probably
* Initialize the basic screen info.
*/
- nxagentSetScreenInfo(screenInfo);
+ nxagentSetScreenInfo(scrInfo);
/*
* Initialize pixmap formats for this screen.
*/
- nxagentSetPixmapFormats(screenInfo);
+ nxagentSetPixmapFormats(scrInfo);
/*
* Get our own privates' index.
@@ -370,7 +370,7 @@ FIXME: These variables, if not removed at all because have probably
AddScreen(nxagentOpenScreen, argc, argv);
}
- nxagentNumScreens = screenInfo->numScreens;
+ nxagentNumScreens = scrInfo->numScreens;
/*
* Initialize the GCs used by the synchronization put images. We do
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 695d14618..565394c65 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -647,9 +647,9 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
}
}
-Bool nxagentDisconnectAllPixmaps(void)
+void nxagentDisconnectAllPixmaps(void)
{
- int r = 1;
+ int r;
#ifdef TEST
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.\n");
@@ -661,6 +661,7 @@ Bool nxagentDisconnectAllPixmaps(void)
* too.
*/
+ r = 1;
FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP, nxagentDisconnectPixmap, &r);
#ifdef WARNING
@@ -674,7 +675,7 @@ Bool nxagentDisconnectAllPixmaps(void)
#endif
- for (int i = 0, r = 1; i < MAXCLIENTS; r = 1, i++)
+ for (int i = 0; i < MAXCLIENTS; i++)
{
if (clients[i])
{
@@ -682,6 +683,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to disconnect pixmaps of client [%d].\n", i);
#endif
+ r = 1;
FindClientResourcesByType(clients[i], RT_PIXMAP, nxagentDisconnectPixmap, &r);
#ifdef WARNING
@@ -701,7 +703,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf(stderr, "nxagentDisconnectAllPixmaps: Pixmaps disconnection completed.\n");
#endif
- return r;
+ return;
}
void nxagentReconnectPixmap(void *p0, XID x1, void *p2)
@@ -837,7 +839,13 @@ Bool nxagentReconnectAllPixmaps(void *p0)
#endif
- for (int i = 0, result = 1; i < MAXCLIENTS; result = 1, i++)
+ /*
+ * FIXME: This is a bit cumbersome: at the end of each iteration
+ * result will be reset to 1. Therefore at loop exit result will
+ * always be 1 meaning the whole function will always return 1...
+ */
+ result = 1;
+ for (int i = 0; i < MAXCLIENTS; result = 1, i++)
{
if (clients[i] != NULL)
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h b/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
index 00cc39c5f..d35cd4c30 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
@@ -132,7 +132,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
void nxagentReconnectPixmap(void *p0, XID x1, void *p2);
Bool nxagentReconnectAllPixmaps(void *p0);
void nxagentDisconnectPixmap(void *p0, XID x1, void* p2);
-Bool nxagentDisconnectAllPixmaps(void);
+void nxagentDisconnectAllPixmaps(void);
int nxagentDestroyNewPixmapResourceType(void * p, XID id);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 86d3ba502..cfa0ec804 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -83,7 +83,7 @@ extern Bool nxagentReconnectAllPicture(void*);
extern Bool nxagentDisconnectAllPicture(void);
extern Bool nxagentDisconnectAllWindows(void);
-extern Bool nxagentDisconnectAllCursor(void);
+extern void nxagentDisconnectAllCursor(void);
extern Bool nxagentReconnectFailedFonts(void*);
extern Bool nxagentInstallFontServerPath(void);
@@ -519,6 +519,7 @@ Bool nxagentReconnectSession(void)
nxagentEmptyBSPixmapList();
+ /* FIXME: nxagentReconnectAllPixmaps will always return 1 */
if (nxagentReconnectAllPixmaps(reconnectLossyLevel[PIXMAP_STEP]) == 0)
{
failedStep = PIXMAP_STEP;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 2ed7d9593..bf614ffdc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -236,7 +236,7 @@ int nxagentBitsPerPixel(int depth)
else return 32;
}
-void nxagentSetScreenInfo(ScreenInfo *screenInfo)
+void nxagentSetScreenInfo(ScreenInfo *scrInfo)
{
/*
* Setup global screen info parameters. In the Xnest
@@ -248,34 +248,34 @@ void nxagentSetScreenInfo(ScreenInfo *screenInfo)
*
* From a standard implementation:
*
- * screenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
- * screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
- * screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
- * screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
+ * scrInfo->imageByteOrder = IMAGE_BYTE_ORDER;
+ * scrInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
+ * scrInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
+ * scrInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
*
* From Xnest implementation:
*
- * screenInfo -> imageByteOrder = ImageByteOrder(nxagentDisplay);
- * screenInfo -> bitmapScanlineUnit = BitmapUnit(nxagentDisplay);
- * screenInfo -> bitmapScanlinePad = BitmapPad(nxagentDisplay);
- * screenInfo -> bitmapBitOrder = BitmapBitOrder(nxagentDisplay);
+ * scrInfo -> imageByteOrder = ImageByteOrder(nxagentDisplay);
+ * scrInfo -> bitmapScanlineUnit = BitmapUnit(nxagentDisplay);
+ * scrInfo -> bitmapScanlinePad = BitmapPad(nxagentDisplay);
+ * scrInfo -> bitmapBitOrder = BitmapBitOrder(nxagentDisplay);
*/
- screenInfo -> imageByteOrder = IMAGE_BYTE_ORDER;
- screenInfo -> bitmapScanlinePad = BITMAP_SCANLINE_PAD;
- screenInfo -> bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
- screenInfo -> bitmapBitOrder = BITMAP_BIT_ORDER;
+ scrInfo -> imageByteOrder = IMAGE_BYTE_ORDER;
+ scrInfo -> bitmapScanlinePad = BITMAP_SCANLINE_PAD;
+ scrInfo -> bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
+ scrInfo -> bitmapBitOrder = BITMAP_BIT_ORDER;
#ifdef TEST
fprintf(stderr, "nxagentSetScreenInfo: Server image order is [%d] bitmap order is [%d].\n",
- screenInfo -> imageByteOrder, screenInfo -> bitmapBitOrder);
+ scrInfo -> imageByteOrder, scrInfo -> bitmapBitOrder);
fprintf(stderr, "nxagentSetScreenInfo: Server scanline unit is [%d] scanline pad is [%d].\n",
- screenInfo -> bitmapScanlineUnit, screenInfo -> bitmapScanlinePad);
+ scrInfo -> bitmapScanlineUnit, scrInfo -> bitmapScanlinePad);
#endif
}
-void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
+void nxagentSetPixmapFormats(ScreenInfo *scrInfo)
{
/*
* Formats are created with no care of which are supported
@@ -284,19 +284,19 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
* of session from a display to another.
*/
- screenInfo -> numPixmapFormats = nxagentNumPixmapFormats;
+ scrInfo -> numPixmapFormats = nxagentNumPixmapFormats;
for (int i = 0; i < nxagentNumPixmapFormats; i++)
{
- screenInfo -> formats[i].depth = nxagentPixmapFormats[i].depth;
- screenInfo -> formats[i].bitsPerPixel = nxagentPixmapFormats[i].bits_per_pixel;
- screenInfo -> formats[i].scanlinePad = nxagentPixmapFormats[i].scanline_pad;
+ scrInfo -> formats[i].depth = nxagentPixmapFormats[i].depth;
+ scrInfo -> formats[i].bitsPerPixel = nxagentPixmapFormats[i].bits_per_pixel;
+ scrInfo -> formats[i].scanlinePad = nxagentPixmapFormats[i].scanline_pad;
#ifdef TEST
fprintf(stderr, "nxagentSetPixmapFormats: Set format at index [%d] to depth [%d] "
"bits per pixel [%d] scanline pad [%d].\n", i,
- screenInfo -> formats[i].depth, screenInfo -> formats[i].bitsPerPixel,
- screenInfo -> formats[i].scanlinePad);
+ scrInfo -> formats[i].depth, scrInfo -> formats[i].bitsPerPixel,
+ scrInfo -> formats[i].scanlinePad);
#endif
}
}
@@ -2950,9 +2950,9 @@ int nxagentShadowSendUpdates(int *suspended)
return 1;
}
-int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr,
- unsigned char nxagentShadowDepth, int nxagentShadowWidth,
- int nxagentShadowHeight, char *nxagentShadowBuffer, int *changed, int *suspended)
+int nxagentShadowPoll(PixmapPtr shadowPixmapPtr, GCPtr shadowGCPtr,
+ unsigned char shadowDepth, int shadowWidth,
+ int shadowHeight, char *shadowBuffer, int *changed, int *suspended)
{
RegionRec updateRegion;
RegionRec tempRegion;
@@ -2977,7 +2977,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
BoxRec *pBox = (BoxRec *)ptBox;
#ifdef TEST
- fprintf(stderr, "nxagentShadowPoll: nRects[%ld], pBox[%p] depth[%d].\n", numRects, (void *) pBox, nxagentShadowDepth);
+ fprintf(stderr, "nxagentShadowPoll: nRects[%ld], pBox[%p] depth[%d].\n", numRects, (void *) pBox, shadowDepth);
#endif
for (int n = 0; n < numRects; n++)
@@ -2994,7 +2994,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
unsigned int width = pBox[n].y1 - pBox[n].x1;/* y1 = x2 */
unsigned int height = y2 - pBox[n].x2; /* x2 = y1 */
- if((x + width) > nxagentShadowWidth || (y + height) > nxagentShadowHeight)
+ if((x + width) > shadowWidth || (y + height) > shadowHeight)
{
/*
* Out of bounds. Maybe a resize of the master session is going on.
@@ -3028,8 +3028,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
for (int c = 0; c + y < y2; c++)
{
- memcpy(tBuffer, nxagentShadowBuffer + x * nxagentBppMaster +
- (y + c) * nxagentShadowWidth * nxagentBppMaster, line);
+ memcpy(tBuffer, shadowBuffer + x * nxagentBppMaster +
+ (y + c) * shadowWidth * nxagentBppMaster, line);
tBuffer += line;
@@ -3042,8 +3042,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
nxagentShadowAdaptDepth(width, height, line, &tBuffer);
}
- fbPutImage(nxagentVirtualDrawable((DrawablePtr)nxagentShadowPixmapPtr), nxagentShadowGCPtr,
- nxagentShadowDepth, x, y, width, height, 0, ZPixmap, tBuffer);
+ fbPutImage(nxagentVirtualDrawable((DrawablePtr)shadowPixmapPtr), shadowGCPtr,
+ shadowDepth, x, y, width, height, 0, ZPixmap, tBuffer);
BoxRec box = {.x1 = x, .x2 = x + width, .y1 = y, .y2 = y + height};
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c
index 4dac8f5b2..850056c21 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Split.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c
@@ -780,7 +780,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
}
}
-static Bool nxagentCommitSplitPredicate(Display *display, XEvent *event, XPointer ptr)
+static Bool nxagentCommitSplitPredicate(Display *disp, XEvent *event, XPointer ptr)
{
return (event -> type == ClientMessage &&
event -> xclient.data.l[0] == NXCommitSplitNotify &&
@@ -820,7 +820,7 @@ void nxagentWaitCommitEvent(int resource)
}
}
-static Bool nxagentWaitSplitPredicate(Display *display, XEvent *event, XPointer ptr)
+static Bool nxagentWaitSplitPredicate(Display *disp, XEvent *event, XPointer ptr)
{
return (event -> type == ClientMessage &&
(event -> xclient.data.l[0] == NXNoSplitNotify ||
diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c
index 7a6d81b6b..0cc60410d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c
@@ -85,7 +85,6 @@ int CleanXYImage(XImage *image)
int CleanZImage(XImage *image)
{
unsigned int bytesToClean;
- unsigned int j;
unsigned int imageLength;
#ifdef TEST
@@ -105,8 +104,6 @@ int CleanZImage(XImage *image)
* as fully transparent.
*/
- register int i;
-
bytesToClean = image -> bytes_per_line * image -> height;
#ifdef DEBUG
@@ -118,14 +115,14 @@ int CleanZImage(XImage *image)
if (image -> byte_order == LSBFirst)
{
- for (i = 3; i < bytesToClean; i += 4)
+ for (int i = 3; i < bytesToClean; i += 4)
{
((unsigned char *) image -> data)[i] = 0x00;
}
}
else
{
- for (i = 0; i < bytesToClean; i += 4)
+ for (int i = 0; i < bytesToClean; i += 4)
{
((unsigned char *) image -> data)[i] = 0x00;
}
@@ -138,14 +135,12 @@ int CleanZImage(XImage *image)
case 16:
case 8:
{
- register int i, j;
-
bytesToClean = image -> bytes_per_line -
((image -> width * image -> bits_per_pixel) >> 3);
- for (i = 1; i <= image -> height; i++)
+ for (int i = 1; i <= image -> height; i++)
{
- for (j = bytesToClean; j > 0; j--)
+ for (int j = bytesToClean; j > 0; j--)
{
((unsigned char *) image -> data)[(i * image -> bytes_per_line) - j] = 0x00;
}
@@ -171,7 +166,7 @@ int CleanZImage(XImage *image)
bytesToClean = imageLength % 4;
- for (j = 0; j < bytesToClean; j++)
+ for (int j = 0; j < bytesToClean; j++)
{
((unsigned char *)image -> data)[(imageLength + j)] = 0x00;
}
@@ -189,7 +184,6 @@ int CleanZImage(XImage *image)
int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
register long data_size;
- register int i;
data_size = (src_image -> bytes_per_line * src_image -> height) >> 2;
@@ -212,7 +206,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
mask = 0x00ffffff;
}
- for (i = 0; i < data_size; i++)
+ for (int i = 0; i < data_size; i++)
{
((unsigned int *)dst_image -> data)[i] = ((unsigned int *)src_image -> data)[i] & mask;
}
@@ -224,7 +218,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
unsigned int bytes_to_clean;
- for (i = 0; i < data_size; i++)
+ for (int i = 0; i < data_size; i++)
{
((unsigned int *)dst_image -> data)[i] = ((unsigned int *)src_image -> data)[i];
}
@@ -236,7 +230,6 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
register unsigned int mask = 0xffffffff;
register int line_size;
- register int i;
line_size = dst_image -> bytes_per_line >> 2;
@@ -249,7 +242,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
mask = mask >> (bytes_to_clean << 3);
}
- for (i = 0; i < dst_image -> height;)
+ for (int i = 0; i < dst_image -> height;)
{
((unsigned char *)dst_image -> data)[(++i * line_size) -1] &= mask;
}
@@ -261,7 +254,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
case 15:
case 16:
{
- for (i = 0; i < data_size; i++)
+ for (int i = 0; i < data_size; i++)
{
((unsigned int *) dst_image -> data)[i] = ((unsigned int *) src_image -> data)[i];
}
@@ -270,7 +263,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
int card32_per_line = dst_image -> bytes_per_line >> 2;
- for (i = 0; i < dst_image -> height;)
+ for (int i = 0; i < dst_image -> height;)
{
((unsigned int *) dst_image -> data)[(++i * card32_per_line) -1] &= 0x0000ffff;
}
@@ -313,7 +306,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
}
}
- for (i = 0; i < data_size; i++)
+ for (int i = 0; i < data_size; i++)
{
((unsigned int *) dst_image -> data)[i] = ((unsigned int *) src_image -> data)[i];
}
@@ -321,11 +314,10 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
if (mask)
{
int card32_per_line;
- int i;
card32_per_line = dst_image -> bytes_per_line >> 2;
- for (i = 0; i < dst_image -> height; i++)
+ for (int i = 0; i < dst_image -> height; i++)
{
((unsigned int *) dst_image -> data)[(++i * card32_per_line) -1] &= mask;
}
diff --git a/nx-X11/programs/Xserver/mi/mibitblt.c b/nx-X11/programs/Xserver/mi/mibitblt.c
index 67d36a742..7b1aca794 100644
--- a/nx-X11/programs/Xserver/mi/mibitblt.c
+++ b/nx-X11/programs/Xserver/mi/mibitblt.c
@@ -666,7 +666,7 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
{
if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 )
{
- xPoint pt;
+ xPoint xpt;
pGC = GetScratchGC(depth, pDraw->pScreen);
if (!pGC)
@@ -683,9 +683,9 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
* Clear the pixmap before doing anything else
*/
ValidateGC((DrawablePtr)pPixmap, pGC);
- pt.x = pt.y = 0;
+ xpt.x = xpt.y = 0;
width = w;
- (*pGC->ops->FillSpans)((DrawablePtr)pPixmap, pGC, 1, &pt, &width,
+ (*pGC->ops->FillSpans)((DrawablePtr)pPixmap, pGC, 1, &xpt, &width,
TRUE);
/* alu is already GXCopy */
diff --git a/nx-X11/programs/Xserver/mi/mispans.c b/nx-X11/programs/Xserver/mi/mispans.c
index a8762d323..c731f2a03 100644
--- a/nx-X11/programs/Xserver/mi/mispans.c
+++ b/nx-X11/programs/Xserver/mi/mispans.c
@@ -462,12 +462,12 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
ysizes[index] * sizeof(int));
if (!newpoints || !newwidths)
{
- int i;
+ int k;
- for (i = 0; i < ylength; i++)
+ for (k = 0; k < ylength; k++)
{
- free (yspans[i].points);
- free (yspans[i].widths);
+ free (yspans[k].points);
+ free (yspans[k].widths);
}
free (yspans);
free (ysizes);
@@ -494,8 +494,6 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
widths = (int *) malloc(count * sizeof(int));
if (!points || !widths)
{
- int i;
-
for (i = 0; i < ylength; i++)
{
free (yspans[i].points);
diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c
index eb89f4bc1..9745dffaf 100644
--- a/nx-X11/programs/Xserver/os/xdmauth.c
+++ b/nx-X11/programs/Xserver/os/xdmauth.c
@@ -61,7 +61,7 @@ static Bool authFromXDMCP;
static XdmAuthKeyRec privateKey;
static char XdmAuthenticationName[] = "XDM-AUTHENTICATION-1";
#define XdmAuthenticationNameLen (sizeof XdmAuthenticationName - 1)
-static XdmAuthKeyRec rho;
+static XdmAuthKeyRec global_rho;
static Bool
XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
@@ -76,7 +76,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
return FALSE;
incoming = (XdmAuthKeyPtr) incomingData->data;
XdmcpDecrementKey (incoming);
- return XdmcpCompareKeys (incoming, &rho);
+ return XdmcpCompareKeys (incoming, &global_rho);
}
return FALSE;
}
@@ -89,7 +89,7 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
outgoingData->data = 0;
if (packet_type == REQUEST) {
if (XdmcpAllocARRAY8 (outgoingData, 8))
- XdmcpWrap ((unsigned char *)&rho, (unsigned char *)&privateKey,
+ XdmcpWrap ((unsigned char *)&global_rho, (unsigned char *)&privateKey,
outgoingData->data, 8);
}
return TRUE;
@@ -152,10 +152,10 @@ XdmAuthenticationInit (char *cookie, int cookie_len)
cookie_len = 7;
memmove (privateKey.data + 1, cookie, cookie_len);
}
- XdmcpGenerateKey (&rho);
+ XdmcpGenerateKey (&global_rho);
XdmcpRegisterAuthentication (XdmAuthenticationName, XdmAuthenticationNameLen,
- (char *)&rho,
- sizeof (rho),
+ (char *)&global_rho,
+ sizeof (global_rho),
(ValidatorFunc)XdmAuthenticationValidator,
(GeneratorFunc)XdmAuthenticationGenerator,
(AddAuthorFunc)XdmAuthenticationAddAuth);
@@ -340,7 +340,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id)
{
/* R5 xdm sent bogus authorization data in the accept packet,
* but we can recover */
- rho_bits = rho.data;
+ rho_bits = global_rho.data;
key_bits = (unsigned char *) data;
key_bits[0] = '\0';
}
@@ -353,7 +353,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id)
break;
#ifdef XDMCP
case 8: /* auth from XDMCP is 8 bytes long */
- rho_bits = rho.data;
+ rho_bits = global_rho.data;
key_bits = (unsigned char *) data;
break;
#endif
@@ -477,7 +477,7 @@ XdmRemoveCookie (unsigned short data_length, char *data)
break;
#ifdef XDMCP
case 8:
- rho_bits = &rho;
+ rho_bits = &global_rho;
key_bits = (XdmAuthKeyPtr) data;
break;
#endif
diff --git a/nx-X11/programs/Xserver/os/xdmcp.c b/nx-X11/programs/Xserver/os/xdmcp.c
index 8da1131ed..458870357 100644
--- a/nx-X11/programs/Xserver/os/xdmcp.c
+++ b/nx-X11/programs/Xserver/os/xdmcp.c
@@ -679,15 +679,15 @@ XdmcpBlockHandler(
struct timeval **wt,
void * pReadmask)
{
- fd_set *LastSelectMask = (fd_set*)pReadmask;
+ fd_set *last_select_mask = (fd_set*)pReadmask;
CARD32 millisToGo;
if (state == XDM_OFF)
return;
- FD_SET(xdmcpSocket, LastSelectMask);
+ FD_SET(xdmcpSocket, last_select_mask);
#if defined(IPv6) && defined(AF_INET6)
if (xdmcpSocket6 >= 0)
- FD_SET(xdmcpSocket6, LastSelectMask);
+ FD_SET(xdmcpSocket6, last_select_mask);
#endif
if (timeOutTime == 0)
return;
@@ -710,7 +710,7 @@ XdmcpWakeupHandler(
int i,
void * pReadmask)
{
- fd_set* LastSelectMask = (fd_set*)pReadmask;
+ fd_set* last_select_mask = (fd_set*)pReadmask;
#ifdef NX_TRANS_SOCKET
@@ -723,16 +723,16 @@ XdmcpWakeupHandler(
return;
if (i > 0)
{
- if (FD_ISSET(xdmcpSocket, LastSelectMask))
+ if (FD_ISSET(xdmcpSocket, last_select_mask))
{
receive_packet(xdmcpSocket);
- FD_CLR(xdmcpSocket, LastSelectMask);
+ FD_CLR(xdmcpSocket, last_select_mask);
}
#if defined(IPv6) && defined(AF_INET6)
- if (xdmcpSocket6 >= 0 && FD_ISSET(xdmcpSocket6, LastSelectMask))
+ if (xdmcpSocket6 >= 0 && FD_ISSET(xdmcpSocket6, last_select_mask))
{
receive_packet(xdmcpSocket6);
- FD_CLR(xdmcpSocket6, LastSelectMask);
+ FD_CLR(xdmcpSocket6, last_select_mask);
}
#endif
}
@@ -757,12 +757,12 @@ static void
XdmcpSelectHost(
struct sockaddr *host_sockaddr,
int host_len,
- ARRAY8Ptr AuthenticationName)
+ ARRAY8Ptr auth_name)
{
state = XDM_START_CONNECTION;
memmove(&req_sockaddr, host_sockaddr, host_len);
req_socklen = host_len;
- XdmcpSetAuthentication (AuthenticationName);
+ XdmcpSetAuthentication (auth_name);
send_packet();
}
@@ -777,11 +777,11 @@ static void
XdmcpAddHost(
struct sockaddr *from,
int fromlen,
- ARRAY8Ptr AuthenticationName,
+ ARRAY8Ptr auth_name,
ARRAY8Ptr hostname,
ARRAY8Ptr status)
{
- XdmcpSelectHost(from, fromlen, AuthenticationName);
+ XdmcpSelectHost(from, fromlen, auth_name);
}
/*
@@ -1066,8 +1066,6 @@ send_query_msg(void)
XdmcpWriteARRAYofARRAY8 (&buffer, &AuthenticationNames);
if (broadcast)
{
- int i;
-
for (i = 0; i < NumBroadcastAddresses; i++)
XdmcpFlush (xdmcpSocket, &buffer, (XdmcpNetaddr) &BroadcastAddresses[i],
sizeof (struct sockaddr_in));
diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c
index 449828a59..ee5d63fac 100644
--- a/nx-X11/programs/Xserver/xkb/ddxList.c
+++ b/nx-X11/programs/Xserver/xkb/ddxList.c
@@ -136,7 +136,6 @@ char tmpname[PATH_MAX];
file= list->pattern[what];
map= strrchr(file,'(');
if (map!=NULL) {
- char *tmp;
map++;
tmp= strrchr(map,')');
if ((tmp==NULL)||(tmp[1]!='\0')) {
diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c
index 238b0897e..7b392fa09 100644
--- a/nx-X11/programs/Xserver/xkb/xkb.c
+++ b/nx-X11/programs/Xserver/xkb/xkb.c
@@ -876,21 +876,21 @@ XkbWriteKeyTypes( XkbDescPtr xkb,
buf= (char *)&wire[1];
if (wire->nMapEntries>0) {
- xkbKTMapEntryWireDesc * wire;
+ xkbKTMapEntryWireDesc * ewire;
XkbKTMapEntryPtr entry;
- wire= (xkbKTMapEntryWireDesc *)buf;
+ ewire= (xkbKTMapEntryWireDesc *)buf;
entry= type->map;
- for (n=0;n<type->map_count;n++,wire++,entry++) {
- wire->active= entry->active;
- wire->mask= entry->mods.mask;
- wire->level= entry->level;
- wire->realMods= entry->mods.real_mods;
- wire->virtualMods= entry->mods.vmods;
+ for (n=0;n<type->map_count;n++,ewire++,entry++) {
+ ewire->active= entry->active;
+ ewire->mask= entry->mods.mask;
+ ewire->level= entry->level;
+ ewire->realMods= entry->mods.real_mods;
+ ewire->virtualMods= entry->mods.vmods;
if (client->swapped) {
- swaps(&wire->virtualMods);
+ swaps(&ewire->virtualMods);
}
}
- buf= (char *)wire;
+ buf= (char *)ewire;
if (type->preserve!=NULL) {
xkbModsWireDesc * pwire;
XkbModsPtr preserve;
@@ -2598,7 +2598,6 @@ ProcXkbSetCompatMap(ClientPtr client)
}
if (stuff->groups!=0) {
- register unsigned i,bit;
xkbModsWireDesc *wire = (xkbModsWireDesc *)data;
for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) {
if (stuff->groups&bit) {
diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c
index eadef3bee..d51b3ade4 100644
--- a/nx-X11/programs/Xserver/xkb/xkbActions.c
+++ b/nx-X11/programs/Xserver/xkb/xkbActions.c
@@ -1040,10 +1040,10 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
unsigned keycode,
XkbAction * pAction)
{
-DeviceIntPtr dev;
-int button;
-
if (filter->keycode==0) { /* initial press */
+ DeviceIntPtr dev;
+ int button;
+
dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL);
if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))
return 1;
@@ -1081,7 +1081,8 @@ int button;
}
}
else if (filter->keycode==keycode) {
- int button;
+ DeviceIntPtr dev;
+ int button;
filter->active= 0;
dev= _XkbLookupButtonDevice(filter->upAction.devbtn.device,NULL);
diff --git a/nx-X11/programs/Xserver/xkb/xkbLEDs.c b/nx-X11/programs/Xserver/xkb/xkbLEDs.c
index 0fccd0913..9853efad5 100644
--- a/nx-X11/programs/Xserver/xkb/xkbLEDs.c
+++ b/nx-X11/programs/Xserver/xkb/xkbLEDs.c
@@ -630,11 +630,9 @@ XkbSrvLedInfoPtr sli;
/* optimization to check for most common case */
if (((class==XkbDfltXIClass)&&(id==XkbDfltXIId))&&(dev->kbdfeed)) {
- XkbSrvLedInfoPtr sli;
- sli= dev->kbdfeed->xkb_sli;
if (dev->kbdfeed->xkb_sli==NULL) {
- sli= XkbAllocSrvLedInfo(dev,dev->kbdfeed,NULL,needed_parts);
- dev->kbdfeed->xkb_sli= sli;
+ dev->kbdfeed->xkb_sli=
+ XkbAllocSrvLedInfo(dev,dev->kbdfeed,NULL,needed_parts);
}
return dev->kbdfeed->xkb_sli;
}
diff --git a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c
index 253b4654e..a26cd88c2 100644
--- a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c
+++ b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c
@@ -117,12 +117,12 @@ unsigned ndx;
return;
}
if ( rg->currentDown!=0 ) {
- int key = xE->u.u.detail;
+ int tmpkey = xE->u.u.detail;
xE->u.u.type= KeyRelease;
xE->u.u.detail= rg->currentDown;
XkbHandleActions(keybd,keybd,xE,count);
xE->u.u.type= KeyPress;
- xE->u.u.detail= key;
+ xE->u.u.detail= tmpkey;
}
rg->currentDown= key;
}
diff --git a/nx-X11/programs/Xserver/xkb/xkbtext.c b/nx-X11/programs/Xserver/xkb/xkbtext.c
index dc1c712ae..0110b64e0 100644
--- a/nx-X11/programs/Xserver/xkb/xkbtext.c
+++ b/nx-X11/programs/Xserver/xkb/xkbtext.c
@@ -1271,7 +1271,6 @@ char buf[256],*tmp;
}
else if (type==XkbKB_RadioGroup) {
int g;
- char *tmp;
g= ((behavior->data)&(~XkbKB_RGAllowNone))+1;
if (XkbKB_RGAllowNone&behavior->data) {
sprintf(buf,"allowNone,");
diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c
index b24c43e03..3bb4414e3 100644
--- a/nx-X11/programs/Xserver/xkb/xkmread.c
+++ b/nx-X11/programs/Xserver/xkb/xkmread.c
@@ -636,7 +636,6 @@ XkbDescPtr xkb;
bzero((char *)typeName,XkbNumKbdGroups*sizeof(Atom));
bzero((char *)type,XkbNumKbdGroups*sizeof(XkbKeyTypePtr));
if (wireMap.flags&XkmKeyHasTypes) {
- register int g;
for (g=0;g<XkbNumKbdGroups;g++) {
if ((wireMap.flags&(1<<g))&&
((tmp=XkmGetCountedString(file,buf,100))>0)) {