From 9cd4b45217e5624c4ffa1ad77aff87ea280db45a Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 20 Feb 2010 17:27:12 +0000 Subject: Added command to open log file --- xorg-server/hw/xwin/winprefs.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'xorg-server/hw/xwin/winprefs.c') diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c index 2472ea5aa..3becb436a 100644 --- a/xorg-server/hw/xwin/winprefs.c +++ b/xorg-server/hw/xwin/winprefs.c @@ -56,6 +56,8 @@ extern DWORD g_dwCurrentThreadID; extern const char *winGetBaseDir(void); +extern const char *g_pszLogFile; + /* From winmultiwindowflex.l, the real parser */ extern void parse_file (FILE *fp); @@ -785,12 +787,9 @@ LoadPreferences (void) /* Setup a DISPLAY environment variable, need to allocate on heap */ /* because putenv doesn't copy the argument... Always use screen 0 */ winGetDisplayName(szDisplay, 0); - szEnvDisplay = (char *)(malloc(strlen(szDisplay)+strlen("DISPLAY=")+1)); - if (szEnvDisplay) - { - snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); - putenv (szEnvDisplay); - } + szEnvDisplay = (char *)(malloc(strlen(szDisplay)+9/*strlen("DISPLAY=")+1*/)); + snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); + putenv (szEnvDisplay); /* Replace any "%display%" in menu commands with display string */ for (i=0; i