$NetBSD: patch-ck,v 1.1 2001/12/20 09:20:03 tron Exp $

--- lib/libxview/ttysw/tty_main.c.orig	Tue Jun 29 07:17:22 1993
+++ lib/libxview/ttysw/tty_main.c	Thu Dec 20 10:09:17 2001
@@ -75,6 +75,11 @@
 int     committed_left = 0;
 #endif
 
+static int ttysw_process_point();
+static int ttysw_process_adjust();
+static int ttysw_process_motion();
+static int ttysw_process_keyboard();
+
 extern Textsw_index textsw_insert();
 #ifdef OW_I18N
 extern Textsw_index textsw_insert_wcs();
@@ -906,8 +911,12 @@
 
 	    if (int_ucntl == (tiocsti & 0xff))
 		ttysw_process_STI(ttysw, owbp, cc - 1);
+#ifndef XV_USE_TERMIOS
 	    (void) ioctl(ttysw->ttysw_tty, TIOCGETC, &ttysw->tchars);
 	    (void) ioctl(ttysw->ttysw_tty, TIOCGLTC, &ttysw->ltchars);
+#else
+	    (void) tcgetattr(ttysw->ttysw_tty, &ttysw->termios);
+#endif
 	    ttysw_getp(TTY_VIEW_HANDLE_FROM_TTY_FOLIO(ttysw));	/* jcb for nng */
 	} else
 #ifdef OW_I18N
