[patch 08/11] terminal: term_send_ucs makes its own struct term_event.

Kalle Olavi Niemitalo <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
08 (text/x-patch, 1.8 KB)
terminal: term_send_ucs makes its own struct term_event.

---
commit 8c24d6f73005dd6650fa5feec77f7dc411a28551
tree 50d471f65db842a8d822c2bfeeb02b858b09e9bc
parent 2eff8ac17b18d7af23bb9abdbe44168b671d1025
author Kalle Olavi Niemitalo <[email protected]> Sat, 05 Aug 2006 13:20:22 +0300
committer Kalle Olavi Niemitalo <[email protected]> Sat, 05 Aug 2006 20:24:22 +0300

 src/terminal/event.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/terminal/event.c b/src/terminal/event.c
index 38822a1..c45d0b9 100644
--- a/src/terminal/event.c
+++ b/src/terminal/event.c
@@ -127,15 +127,17 @@ term_send_event(struct terminal *term, s
 }
 
 static void
-term_send_ucs(struct terminal *term, struct term_event *ev, unicode_val_T u)
+term_send_ucs(struct terminal *term, unicode_val_T u, int modifier)
 {
 	unsigned char *recoded;
+	struct term_event ev;
 
+	set_kbd_term_event(&ev, KBD_UNDEF, modifier);
 	recoded = u2cp_no_nbsp(u, get_opt_codepage_tree(term->spec, "charset"));
 	if (!recoded) recoded = "*";
 	while (*recoded) {
-		ev->info.keyboard.key = *recoded;
-		term_send_event(term, ev);
+		ev.info.keyboard.key = *recoded;
+		term_send_event(term, &ev);
 		recoded++;
 	}
 }
@@ -293,13 +295,15 @@ #endif /* CONFIG_UTF_8 */
 
 					if (u < interlink->utf_8.min)
 						u = UCS_NO_CHAR;
-					term_send_ucs(term, &tev, u);
+					term_send_ucs(term, u,
+						      get_kbd_modifier(&tev));
 				}
 				break;
 
 			} else {
 				interlink->utf_8.len = 0;
-				term_send_ucs(term, &tev, UCS_NO_CHAR);
+				term_send_ucs(term, UCS_NO_CHAR,
+					      get_kbd_modifier(&tev));
 			}
 		}
 
@@ -322,7 +326,7 @@ #endif /* CONFIG_UTF_8 */
 			break;
 		}
 
-		term_send_ucs(term, &tev, UCS_NO_CHAR);
+		term_send_ucs(term, UCS_NO_CHAR, get_kbd_modifier(&tev));
 		break;
 	}
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFE1OApHm9IGt60eMgRAn1rAKCeHC3m605ywNviWYWqoTthURQBuwCeJLRr
Phm4QROygIZ4a0E/yPIVuyE=
=No+l
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.