[hackers] [st] Fix Identification sequences || "Roberto E. Vargas Caballero"

From: <hg_AT_suckless.org>
Date: Sun, 7 Oct 2012 11:11:51 +0200 (CEST)

changeset: 361:79b08dd4049d
user: "Roberto E. Vargas Caballero" <k0ga_AT_shike2.com>
date: Sun Oct 07 11:06:00 2012 +0200
files: st.c
description:
Fix Identification sequences
Do not send NUL character in the identification (use (sizeof(VT102ID) - 1),
and finish the sequence once you execute it.
---
 st.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff -r 4e43cd608c09 -r 79b08dd4049d st.c
--- a/st.c	Sat Oct 06 21:19:56 2012 +0200
+++ b/st.c	Sun Oct 07 11:06:00 2012 +0200
_AT_@ -1514,7 +1514,7 @@
 		break;
 	case 'c': /* DA -- Device Attributes */
 		if(csiescseq.arg[0] == 0)
-			ttywrite(VT102ID, sizeof(VT102ID));
+			ttywrite(VT102ID, sizeof(VT102ID) - 1);
 		break;
 	case 'C': /* CUF -- Cursor <n> Forward */
 	case 'a':
_AT_@ -1940,7 +1940,8 @@
 				term.esc = 0;
 				break;
 			case 'Z': /* DECID -- Identify Terminal */
-				ttywrite(VT102ID, sizeof(VT102ID));
+				ttywrite(VT102ID, sizeof(VT102ID) - 1);
+				term.esc = 0;
 				break;
 			case 'c': /* RIS -- Reset to inital state */
 				treset();
Received on Sun Oct 07 2012 - 11:11:51 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 07 2012 - 11:12:09 CEST