diff options
author | marha <marha@users.sourceforge.net> | 2010-02-20 17:27:12 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-02-20 17:27:12 +0000 |
commit | 9cd4b45217e5624c4ffa1ad77aff87ea280db45a (patch) | |
tree | b981bb6c191c8cee1768a3886fbb3362398f40b1 /xorg-server/hw/xwin | |
parent | 68504d1066c26aa26b73d5be549d7a95d6afd8ed (diff) | |
download | vcxsrv-9cd4b45217e5624c4ffa1ad77aff87ea280db45a.tar.gz vcxsrv-9cd4b45217e5624c4ffa1ad77aff87ea280db45a.tar.bz2 vcxsrv-9cd4b45217e5624c4ffa1ad77aff87ea280db45a.zip |
Added command to open log file
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r-- | xorg-server/hw/xwin/winprefs.c | 17 |
1 files changed, 11 insertions, 6 deletions
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<pref.menuItems; i++) @@ -808,6 +807,12 @@ LoadPreferences (void) dstParam += strlen(szDisplay); srcParam += 9; } + else if (!strncmp(srcParam, "%logfile%", 9)) + { + memcpy (dstParam, g_pszLogFile, strlen(g_pszLogFile)); + dstParam += strlen(g_pszLogFile); + srcParam += 9; + } else { *dstParam = *srcParam; |