Revision: 2715
          http://tmux.svn.sourceforge.net/tmux/?rev=2715&view=rev
Author:   tcunha
Date:     2012-03-07 13:38:26 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
Sync OpenBSD patchset 1040:

Accept hex values as keys, needed for send-keys, based on a diff from
George Nachman.

Modified Paths:
--------------
    trunk/key-string.c

Modified: trunk/key-string.c
===================================================================
--- trunk/key-string.c  2012-03-07 13:37:44 UTC (rev 2714)
+++ trunk/key-string.c  2012-03-07 13:38:26 UTC (rev 2715)
@@ -137,7 +137,16 @@
 key_string_lookup_string(const char *string)
 {
        int     key, modifiers;
+       u_short u;
+       int     size;
 
+       /* Is this a hexadecimal value? */
+       if (string[0] == '0' && string[1] == 'x') {
+               if (sscanf(string + 2, "%hx%n", &u, &size) != 1 || size > 4)
+                       return (KEYC_NONE);
+               return (u);
+       }
+
        /* Check for modifiers. */
        modifiers = 0;
        if (string[0] == '^' && string[1] != '\0') {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to