diff -cr kon2-0.3.orig/src/child.c kon2-0.3/src/child.c *** kon2-0.3.orig/src/child.c Tue Nov 15 17:08:03 2005 --- kon2-0.3/src/child.c Tue Nov 15 17:36:26 2005 *************** *** 40,46 **** #include #include ! static char *startupStr, *execProg; int ConfigExecProg(const char *string) { --- 40,46 ---- #include #include ! static char *startupStr, *execProg, *terminalType; int ConfigExecProg(const char *string) { *************** *** 54,59 **** --- 54,78 ---- return SUCCESS; } + static int ConfigTerminalType(const char *string) + { + + char *p; + while(*string && (*string == ' ' || *string == '\t')) + string++; + + p = terminalType = strdup(string); + while(*p){ + if(*p == ' ' || *p == '\t' || *p == '\n'){ + *p = '\0'; + break; + } + p++; + } + + return SUCCESS; + } + static void RunStartupCmd(void) { char *p; *************** *** 77,82 **** --- 96,102 ---- { DefineCap("StartupMessage", ConfigMessage, "On"); DefineCap("StartUp", ConfigStartup, NULL); + DefineCap("TerminalType", ConfigTerminalType, "vt100"); } void ChildCleanup(void) *************** *** 105,111 **** win.ws_col = dInfo.txmax + 1; win.ws_xpixel = win.ws_ypixel = 0; ioctl(STDIN_FILENO, TIOCSWINSZ, &win); ! sprintf(buff,"TERM=vt100"); #endif tcap = strdup(buff); --- 125,131 ---- win.ws_col = dInfo.txmax + 1; win.ws_xpixel = win.ws_ypixel = 0; ioctl(STDIN_FILENO, TIOCSWINSZ, &win); ! sprintf(buff,"TERM=%s", terminalType); #endif tcap = strdup(buff);