Handle window size changes.
Don't change the terminal name.
This commit is contained in:
parent
fb04017335
commit
bc3d572bec
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-Wnn_uum_jhlp_c,v 1.1 2000/04/16 21:53:31 espie Exp $
|
||||
--- Wnn/uum/jhlp.c.orig Sat Apr 15 21:09:13 2000
|
||||
+++ Wnn/uum/jhlp.c Sat Apr 15 21:38:38 2000
|
||||
$OpenBSD: patch-Wnn_uum_jhlp_c,v 1.2 2000/04/20 22:59:21 espie Exp $
|
||||
--- Wnn/uum/jhlp.c.orig Sun Apr 16 02:31:48 2000
|
||||
+++ Wnn/uum/jhlp.c Sun Apr 16 14:06:49 2000
|
||||
@@ -80,6 +80,9 @@ struct passwd *getpwuid();
|
||||
|
||||
jmp_buf kk_env;
|
||||
@ -158,7 +158,31 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.1 2000/04/16 21:53:31 espie Exp $
|
||||
|
||||
#ifdef linux
|
||||
setsid();
|
||||
@@ -1562,9 +1569,11 @@ do_end()
|
||||
@@ -1446,11 +1453,23 @@ open_ttyp()
|
||||
close(open(ttyname(ttypfd), O_WRONLY, 0));
|
||||
*/
|
||||
#endif /* defined(SYSVR2) && !defined(linux) */
|
||||
+#ifdef __OpenBSD__
|
||||
+ {
|
||||
+ struct winsize win;
|
||||
+
|
||||
+ if (ioctl(ttyfd, TIOCGWINSZ, &win) != -1) {
|
||||
+ win.ws_row = crow;
|
||||
+ win.ws_col = maxlength;
|
||||
+ ioctl(ttypfd, TIOCSWINSZ, &win);
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
#ifdef TIOCSSIZE
|
||||
pty_rowcol.ts_lines = crow; /* instead of lines */
|
||||
pty_rowcol.ts_cols = maxlength; /* instead of columns */
|
||||
ioctl(ttypfd, TIOCSSIZE, &pty_rowcol);
|
||||
#endif /* TIOCSSIZE */
|
||||
+#endif
|
||||
}
|
||||
|
||||
/** pty ¤Î¥ª¡¼¥×¥ó */
|
||||
@@ -1562,9 +1581,11 @@ do_end()
|
||||
perror(prog);
|
||||
}
|
||||
|
||||
@ -170,7 +194,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.1 2000/04/16 21:53:31 espie Exp $
|
||||
#ifdef TIOCSSIZE
|
||||
pty_rowcol.ts_lines = 0;
|
||||
pty_rowcol.ts_cols = 0;
|
||||
@@ -1636,7 +1645,16 @@ ptyname(b, pty, no)
|
||||
@@ -1636,7 +1657,16 @@ ptyname(b, pty, no)
|
||||
char *b, *pty;
|
||||
int no;
|
||||
{
|
||||
@ -187,3 +211,38 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.1 2000/04/16 21:53:31 espie Exp $
|
||||
}
|
||||
#endif /* !sgi */
|
||||
|
||||
@@ -1755,14 +1785,14 @@ change_size()
|
||||
|
||||
if ((i = win.ws_row) != 0) {
|
||||
crow = Term_RowWidth = i - conv_lines;
|
||||
-#ifdef linux
|
||||
+#if defined(linux) || defined(__OpenBSD__)
|
||||
win.ws_row = crow;
|
||||
#endif
|
||||
}
|
||||
if ((i = win.ws_col) != 0) {
|
||||
maxlength = Term_LineWidth = i;
|
||||
}
|
||||
-#ifdef linux
|
||||
+#if defined(linux) || defined(__OpenBSD__)
|
||||
ioctl(ttypfd, TIOCSWINSZ, &win);
|
||||
#else /* linux */
|
||||
#ifdef TIOCSSIZE
|
||||
@@ -1770,7 +1800,8 @@ change_size()
|
||||
pty_rowcol.ts_cols = maxlength; /* instead of columns */
|
||||
ioctl(ttypfd, TIOCSSIZE, &pty_rowcol);
|
||||
#endif /* TIOCSSIZE */
|
||||
-#ifdef sun /* When your machine needs SIGWINCH, add your machine */
|
||||
+#endif
|
||||
+#if defined(sun) || defined(__OpenBSD__) /* When your machine needs SIGWINCH, add your machine */
|
||||
{
|
||||
int grp;
|
||||
ioctl(ptyfd, TIOCGPGRP, &grp);
|
||||
@@ -1781,7 +1812,6 @@ change_size()
|
||||
#endif
|
||||
}
|
||||
#endif /* sun */
|
||||
-#endif /* linux */
|
||||
|
||||
set_scroll_region(0, crow - 1);
|
||||
if (henkan_off_flag) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-Wnn_uum_termio_c,v 1.1 2000/04/16 21:53:32 espie Exp $
|
||||
$OpenBSD: patch-Wnn_uum_termio_c,v 1.2 2000/04/20 22:59:22 espie Exp $
|
||||
--- Wnn/uum/termio.c.orig Thu Jul 1 01:33:10 1993
|
||||
+++ Wnn/uum/termio.c Sun Apr 16 00:24:11 2000
|
||||
+++ Wnn/uum/termio.c Sun Apr 16 14:02:18 2000
|
||||
@@ -93,7 +93,7 @@ openTermData()
|
||||
fprintf(stderr, "Cannot get terminal name.");
|
||||
return(-1);
|
||||
@ -24,3 +24,16 @@ $OpenBSD: patch-Wnn_uum_termio_c,v 1.1 2000/04/16 21:53:32 espie Exp $
|
||||
#if defined(uniosu)
|
||||
if(jterm < 2) { /* kanji terminal */
|
||||
fprintf(stderr, "Not kanji terminal. Goodbye !\n");
|
||||
@@ -119,10 +121,12 @@ openTermData()
|
||||
fprintf(stderr, "Your terminal is not strong enough. Goodbye !\n");
|
||||
return(-1);
|
||||
}
|
||||
+#if 0
|
||||
termchar[0] = 0;
|
||||
strcat(termchar,cp);
|
||||
strcat(termchar,"-j");
|
||||
setenv("TERM", termchar);
|
||||
+#endif
|
||||
|
||||
sprintf(lcode,"%d", lines - conv_lines);
|
||||
setenv("LINES", lcode);
|
||||
|
Loading…
Reference in New Issue
Block a user