aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefs.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-30 10:18:15 +0100
committermarha <marha@users.sourceforge.net>2012-10-30 10:18:15 +0100
commit33d29586bf3a280e821e0bf62694492dba459dab (patch)
treee029e900674f4f8901cae65c95acd3e15ce3948c /xorg-server/hw/xwin/winprefs.c
parentaf2d8fb974d476eadcd3cde3baebd038f5750600 (diff)
parent7b3f315a5d8b90dcb0db5512ed91fa700027cb7a (diff)
downloadvcxsrv-33d29586bf3a280e821e0bf62694492dba459dab.tar.gz
vcxsrv-33d29586bf3a280e821e0bf62694492dba459dab.tar.bz2
vcxsrv-33d29586bf3a280e821e0bf62694492dba459dab.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig xserver mesa git update 30 oct 2012 Conflicts: xorg-server/dix/grabs.c xorg-server/hw/xwin/winclipboard.h xorg-server/hw/xwin/winclipboardthread.c xorg-server/hw/xwin/winclipboardwrappers.c xorg-server/hw/xwin/winmonitors.c xorg-server/hw/xwin/winmsg.c xorg-server/hw/xwin/winmsg.h xorg-server/hw/xwin/winprefslex.l xorg-server/hw/xwin/winprefsyacc.y xorg-server/hw/xwin/winregistry.c
Diffstat (limited to 'xorg-server/hw/xwin/winprefs.c')
-rw-r--r--xorg-server/hw/xwin/winprefs.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index c66e11396..5becf23a0 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -59,9 +59,6 @@ extern int parse_file(FILE * fp);
/* Currently in use command ID, incremented each new menu item created */
static int g_cmdid = STARTMENUID;
-/* Defined in DIX */
-extern char *display;
-
/* Local function to handle comma-ified icon names */
static HICON LoadImageComma(char *fname, int sx, int sy, int flags);
@@ -332,12 +329,12 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command)
case CMD_EXEC:
if (fork() == 0) {
struct rlimit rl;
- unsigned long i;
+ int fd;
/* Close any open descriptors except for STD* */
getrlimit(RLIMIT_NOFILE, &rl);
- for (i = STDERR_FILENO + 1; i < rl.rlim_cur; i++)
- close(i);
+ for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++)
+ close(fd);
/* Disassociate any TTYs */
setsid();
@@ -540,21 +537,21 @@ static HICON
LoadImageComma(char *fname, int sx, int sy, int flags)
{
HICON hicon;
- int index;
+ int i;
char file[PATH_MAX + NAME_MAX + 2];
/* Some input error checking */
if (!fname || !fname[0])
return NULL;
- index = 0;
+ i = 0;
hicon = NULL;
if (fname[0] == ',') {
/* It's the XWIN.EXE resource they want */
- index = atoi(fname + 1);
+ i = atoi(fname + 1);
hicon = LoadImage(g_hInstance,
- MAKEINTRESOURCE(index), IMAGE_ICON, sx, sy, flags);
+ MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags);
}
else {
file[0] = 0;
@@ -571,8 +568,8 @@ LoadImageComma(char *fname, int sx, int sy, int flags)
/* Specified as <fname>,<index> */
*(strrchr(file, ',')) = 0; /* End string at comma */
- index = atoi(strrchr(fname, ',') + 1);
- hicon = ExtractIcon(g_hInstance, file, index);
+ i = atoi(strrchr(fname, ',') + 1);
+ hicon = ExtractIcon(g_hInstance, file, i);
}
else {
/* Just an .ico file... */