-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 28f503e7221517b5bc31409b1e42fe31b664119d:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 28f503e7221517b5bc31409b1e42fe31b664119d
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Tue Jan 11 04:44:57 2005 +0000

    *** empty log message ***

diff --git a/autoconf/config.h.in b/autoconf/config.h.in

index d65a24bd5bd4afec190ec36cb4a64b35bb83c89c..

index ..d4a24ff68d08d226fc0ca12b271bdbff0f0e6561 100644

--- a/autoconf/config.h.in
+++ b/autoconf/config.h.in
@@ -130,6 +130,9 @@
 /* Define if you have the <libc.h> header file.  */
 #undef HAVE_LIBC_H

+/* Define if you have the <pty.h> header file.  */
+#undef HAVE_PTY_H
+
 /* Define if you have the <stdarg.h> header file.  */
 #undef HAVE_STDARG_H

diff --git a/autoconf/configure.in b/autoconf/configure.in

index 01539218c4389e09fc73ade910aac19ab75578aa..

index ..86777dda67363515e2503b7b7f7bd89dd1654d10 100644

--- a/autoconf/configure.in
+++ b/autoconf/configure.in
@@ -522,6 +522,7 @@ AC_CHECK_HEADERS( \
 	utmp.h \
 	utmpx.h \
         stdint.h \
+        pty.h \
 )

 AC_HEADER_TIME
diff --git a/src/ptytty.C b/src/ptytty.C

index 3c79ba0f74dc9b50d1e4f8b7db74c964c1052b62..

index ..93a57388bfb1491caab8fdc654387abdd190dbb1 100644

--- a/src/ptytty.C
+++ b/src/ptytty.C
@@ -48,6 +48,9 @@
 #ifdef HAVE_ISASTREAM
 # include <stropts.h>
 #endif
+#ifdef HAVE_PTY_H
+# include <pty.h>
+#endif

 // better do this via configure, but....
 #if defined(__FreeBSD__)
@@ -438,5 +441,32 @@ rxvt_ptytty::get ()
   return true;
 }

+void
+rxvt_ptytty::set_utf8_mode (bool on)
+{
+#ifdef IUTF8
+  if (pty != -1)
+    {
+      struct termios tio;
+
+      if (tcgetattr (pty, &tio) != -1)
+        {
+          tcflag_t new_cflag = tio.c_iflag;
+
+          if (on)
+            new_cflag |= IUTF8;
+          else
+            new_cflag &= ~IUTF8;
+
+          if (new_cflag != tio.c_iflag)
+            {
+              tio.c_iflag = new_cflag;
+              tcsetattr (pty, TCSANOW, &tio);
+            }
+        }
+    }
+#endif
+}
+
 /*----------------------- end-of-file (C source) -----------------------*/

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 12:58:49 2024