On Sun, Apr 19, 2015 at 02:36:35PM -0300, Amadeus Folego wrote:
> Alex, you just posted the diffstat, not the patch itself.

I know. I was only proving a point about it being small and trying to
reduce the noise, though moot now. Should have attached it in the first
place. Made it shorter now too. Did it with a custom key function
instead of in tcontrolcode, silly me.

Both TCO{ON,OFF} and TCI{ON,OFF} work. Not sure which one is more
correct.
From 6faff33bb1fed94408ee4aad422fc5740eaac9ef Mon Sep 17 00:00:00 2001
From: Alex Pilon <a...@alexpilon.ca>
Date: Fri, 10 Apr 2015 18:24:10 -0400
Subject: [PATCH] Add flow control support.

---
 st.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/st.c b/st.c
index bb8c365..2c8ede8 100644
--- a/st.c
+++ b/st.c
@@ -2514,10 +2514,14 @@ tcontrolcode(uchar ascii) {
 	case '\030': /* CAN */
 		csireset();
 		break;
+	case '\021': /* XON */
+		ioctl(cmdfd, TCXONC, TCOON);
+		return;
+	case '\023': /* XOFF */
+		ioctl(cmdfd, TCXONC, TCOOFF);
+		return;
 	case '\005': /* ENQ (IGNORED) */
 	case '\000': /* NUL (IGNORED) */
-	case '\021': /* XON (IGNORED) */
-	case '\023': /* XOFF (IGNORED) */
 	case 0177:   /* DEL (IGNORED) */
 		return;
 	case 0x84:   /* TODO: IND */
-- 
2.3.5

Attachment: pgpnw1KsQo61e.pgp
Description: PGP signature

Reply via email to