mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
kpty: add missing functions
This commit is contained in:
@@ -5,7 +5,7 @@ communicating with them using a pty.."
|
||||
HOMEPAGE="https://invent.kde.org/frameworks/kpty/"
|
||||
COPYRIGHT="2010-2024 KDE Organisation"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/kpty-${portVersion}.tar.xz"
|
||||
CHECKSUM_SHA256="844c03068b266fa0805a015af2752923b42d55e8d9d4d65b3e600a19a2805419"
|
||||
PATCHES="kpty-$portVersion.patchset"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
From 69f5727e734677a2a663300e30d2a5162bc74a9d Mon Sep 17 00:00:00 2001
|
||||
From ccc5601b21f9b728208803b48cbef2d4626ef0c1 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 1 Nov 2021 09:20:04 +1000
|
||||
Subject: Use bsd openpty for haiku
|
||||
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 644c00b..2693d1d 100644
|
||||
index b1f91b4..012c5b1 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ add_library(KF5Pty)
|
||||
@@ -309,5 +309,57 @@ index 0000000..7acd36d
|
||||
+ return d->slaveFd;
|
||||
+}
|
||||
--
|
||||
2.30.2
|
||||
2.43.2
|
||||
|
||||
|
||||
From 67c27e5444e44f1e6964c04e84ad0e4d8136818c Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 3 Mar 2024 22:25:16 +1000
|
||||
Subject: Add missing functions
|
||||
|
||||
|
||||
diff --git a/src/kpty_haiku.cpp b/src/kpty_haiku.cpp
|
||||
index 7acd36d..79422e0 100644
|
||||
--- a/src/kpty_haiku.cpp
|
||||
+++ b/src/kpty_haiku.cpp
|
||||
@@ -219,17 +219,23 @@ bool KPty::tcSetAttr(struct ::termios *ttmode)
|
||||
return _tcsetattr(d->masterFd, ttmode) == 0;
|
||||
}
|
||||
|
||||
-bool KPty::setWinSize(int lines, int columns)
|
||||
+bool KPty::setWinSize(int lines, int columns, int height, int width)
|
||||
{
|
||||
Q_D(KPty);
|
||||
|
||||
struct winsize winSize;
|
||||
- memset(&winSize, 0, sizeof(winSize));
|
||||
winSize.ws_row = (unsigned short)lines;
|
||||
winSize.ws_col = (unsigned short)columns;
|
||||
+ winSize.ws_ypixel = (unsigned short)height;
|
||||
+ winSize.ws_xpixel = (unsigned short)width;
|
||||
return ioctl(d->masterFd, TIOCSWINSZ, (char *)&winSize) == 0;
|
||||
}
|
||||
|
||||
+bool KPty::setWinSize(int lines, int columns)
|
||||
+{
|
||||
+ return setWinSize(lines, columns, 0, 0);
|
||||
+}
|
||||
+
|
||||
bool KPty::setEcho(bool echo)
|
||||
{
|
||||
struct ::termios ttmode;
|
||||
@@ -264,3 +270,11 @@ int KPty::slaveFd() const
|
||||
|
||||
return d->slaveFd;
|
||||
}
|
||||
+
|
||||
+void KPty::setCTtyEnabled(bool enable)
|
||||
+{
|
||||
+ Q_D(KPty);
|
||||
+
|
||||
+ d->withCTty = enable;
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.43.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user