[comp.windows.x] CreateTTYWindow

dave@pmafire.UUCP (Dave Remien) (12/17/88)

Hi there, fellow netlanders......

We're still in the dark ages (X10.4), and trying to figure out how
CreateTTYWindow is supposed to work. We're trying to get clips (the Nasa
expert system) to open xterms to display an execution trace, the agenda,
and the current facts.  When run, the window processes are created, but
immediately die. No windows appear. Having no source code, we can't
figure out where the call is failing. Errno is set to ENXIO, but
XErrorEvent.error_code is 0. 

Is it possible that the pty used to talk to the xterm are indicating end
of file and closing? We've beat our heads against the wall for a while
on this, and are completely confused (not an unordinary state :-)).

Here's the scenario:

#include <stdio.h>
#include <X/Xlib.h>
#include <Xr/Xrlib.h>
#include <X/Xtty.h>
#include "../clips.h"

TTYWindow *xfacts, *xagenda, *xtrace;
Display *disp_ptr;
int x_on=FALSE;

[possibly extraneous code deleted]

int xwindow_on()
{
	if (x_on) return(0);
	else x_on = TRUE;

	disp_ptr = XOpenDisplay(NULL);
	if (disp_ptr == NULL) return(0);
		
	XrInit(NULL);
	
	xfacts = CreateTTYWindow(60, 25, 830, 1,
				 "vtsingle", "vtbold", 2, 0);
	xagenda = CreateTTYWindow(60, 25, 830, 605,
				 "vtsingle", "vtbold", 2, 0);
	xtrace = CreateTTYWindow(60, 25, 1, 605,
				 "vtsingle", "vtbold", 2, 0);

	add_router("x_windows",
		   20,
		   find_x_window,
		   print_x_window,
		   NULL,
		   NULL,
		   exit_x_window);
		   
	return(1);
		   
}

[possibly extraneous code deleted]

Any help would be greatly appreciated.

Please email any replies, if this is trivial or has appeared before.

-- 
Dave Remien - WINCO Computer Engineering Group (only somewhat confused, now)
208-526-3523 Paths: ...!bigtex!pmafire!dave | ...!ucdavis!egg-id!pma386!dave