From 11076b1b8983814c58324328819d2b84ae088c35 Mon Sep 17 00:00:00 2001 From: Joseph Pranevich Date: Sun, 14 Feb 1999 11:17:22 +0000 Subject: [PATCH] Added configuration options XtermProgram and XtermResolution. Fixed a warning. --- console/xterm.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/console/xterm.c b/console/xterm.c index 5a007c5a13e..87e60f9462d 100644 --- a/console/xterm.c +++ b/console/xterm.c @@ -17,10 +17,14 @@ #include "windows.h" #include "console.h" +#include "options.h" #include "debug.h" #define ESC '\x1b' +char console_xterm_prog[80]; +char console_xterm_resolution[10]; + static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid); FILE *wine_openpty(int *master, int *slave, char *name, struct termios *term, struct winsize *winsize); @@ -52,6 +56,13 @@ void XTERM_Start() chain.resizeScreen = driver.resizeScreen; driver.resizeScreen = XTERM_ResizeScreen; + + /* Read in driver configuration */ + PROFILE_GetWineIniString("console", "XtermProg", + "xterm", console_xterm_prog, 79); + PROFILE_GetWineIniString("console", "XtermResolution", + "80x24", console_xterm_resolution, 9); + } void XTERM_Init() @@ -123,9 +134,10 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid) if ((*pid=fork()) == 0) { tcsetattr(fileno(*slave), TCSADRAIN, &term); sprintf(buf, "-Sxx%d", fileno(*master)); - execlp(CONSOLE_XTERM_PROG, CONSOLE_XTERM_PROG, buf, "-fg", - "white", "-bg", "black", NULL); - ERR(console, "error creating xterm\n"); + execlp(console_xterm_prog, console_xterm_prog, buf, "-fg", + "white", "-bg", "black", "-g", + console_xterm_resolution, NULL); + ERR(console, "error creating xterm (file not found?)\n"); exit(1); }