/usr/share/doc/xviewg/examples/ttysw/sample_tty.c is in xview-examples 3.2p1.4-28.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | /*
* sample_tty.c -- create a base frame with a tty subwindow.
* This subwindow runs a UNIX command specified in an argument
* vector as shown below. The example does a "man cat".
*/
#include <xview/xview.h>
#include <xview/tty.h>
char *my_argv[] = { "man", "cat", NULL };
main(argc, argv)
char *argv[];
{
Tty tty;
Frame frame;
xv_init(XV_INIT_ARGS, argc, argv, 0);
frame = (Frame)xv_create(NULL, FRAME, NULL);
tty = (Tty)xv_create(frame, TTY,
WIN_ROWS, 24,
WIN_COLUMNS, 80,
TTY_ARGV, my_argv,
NULL);
window_fit(frame);
xv_main_loop(frame);
}
|