Revision: 2586
          http://tmux.svn.sourceforge.net/tmux/?rev=2586&view=rev
Author:   tcunha
Date:     2011-08-25 21:12:52 +0000 (Thu, 25 Aug 2011)
Log Message:
-----------
Sync OpenBSD patchset 949:

Add a tty_bell wrapper function, from Dylan Alex Simon.

Modified Paths:
--------------
    trunk/server-window.c
    trunk/tmux.h
    trunk/tty.c

Modified: trunk/server-window.c
===================================================================
--- trunk/server-window.c       2011-08-25 21:12:10 UTC (rev 2585)
+++ trunk/server-window.c       2011-08-25 21:12:52 UTC (rev 2586)
@@ -86,7 +86,7 @@
                        if (c == NULL || c->session != s)
                                continue;
                        if (!visual) {
-                               tty_putcode(&c->tty, TTYC_BEL);
+                               tty_bell(&c->tty);
                                continue;
                        }
                        if (c->session->curw->window == w) {
@@ -108,7 +108,7 @@
                        if (c->session->curw->window != w)
                                continue;
                        if (!visual) {
-                               tty_putcode(&c->tty, TTYC_BEL);
+                               tty_bell(&c->tty);
                                continue;
                        }
                        status_message_set(c, "Bell in current window");
@@ -254,6 +254,6 @@
        for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                c = ARRAY_ITEM(&clients, i);
                if (c != NULL && c->session == s)
-                       tty_putcode(&c->tty, TTYC_BEL);
+                       tty_bell(&c->tty);
        }
 }

Modified: trunk/tmux.h
===================================================================
--- trunk/tmux.h        2011-08-25 21:12:10 UTC (rev 2585)
+++ trunk/tmux.h        2011-08-25 21:12:52 UTC (rev 2586)
@@ -1454,6 +1454,7 @@
 void   tty_cmd_reverseindex(struct tty *, const struct tty_ctx *);
 void   tty_cmd_setselection(struct tty *, const struct tty_ctx *);
 void   tty_cmd_rawstring(struct tty *, const struct tty_ctx *);
+void   tty_bell(struct tty *);
 
 /* tty-term.c */
 extern struct tty_terms tty_terms;

Modified: trunk/tty.c
===================================================================
--- trunk/tty.c 2011-08-25 21:12:10 UTC (rev 2585)
+++ trunk/tty.c 2011-08-25 21:12:52 UTC (rev 2586)
@@ -1546,3 +1546,9 @@
        tty_puts(tty, s);
        return (0);
 }
+
+void
+tty_bell(struct tty *tty)
+{
+       tty_putcode(tty, TTYC_BEL);
+}

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


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to