|
From: <tim...@en...> - 2006-04-28 17:06:18
|
> On Friday 28 April 2006 02:34 am, Bastian Maerkisch wrote:
>> For the standard OS/2 build we will have to leave out the linkage
>> requirement against X11 though. Too many systems do not have X11
>> installed.
>> Could we move the raise_console() code into a new executable instead?
>
> The new code must of course be subject to the same
> configuration tests and conditional compilation as we have now.
It is worth noting that there is already (a) special case(s) to
distinguish a OS/2 console and a Xterm-like console for other purposes.
For example, in readline.c (866) :
#ifdef OS2
/* We need to call different procedures, dependent on the
session type: VIO/window or an (XFree86) xterm */
static char
os2_getch() {
static int IsXterm =3D 0;
static int init =3D 0;
if (!init) {
if (getenv("WINDOWID")) {
IsXterm =3D 1;
}
init =3D 1;
}
if (IsXterm) {
return ansi_getc();
} else {
return msdos_getch();
}
}
#endif /* OS2 */
If this code has worked for years, and it is likely to be the case (
*_getch() is used for each input character), we can be confident that a
test for WINDOWID is enough to know who manages the console.
Timoth=E9e
|