Revision: 2702
http://tmux.svn.sourceforge.net/tmux/?rev=2702&view=rev
Author: tcunha
Date: 2012-02-15 19:32:12 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
Sync OpenBSD patchset 1029:
Add a wrapper function tty_set_size from George Nachman.
Modified Paths:
--------------
trunk/tmux.h
trunk/tty.c
Modified: trunk/tmux.h
===================================================================
--- trunk/tmux.h 2012-02-15 19:31:35 UTC (rev 2701)
+++ trunk/tmux.h 2012-02-15 19:32:12 UTC (rev 2702)
@@ -1454,6 +1454,7 @@
void tty_pututf8(struct tty *, const struct grid_utf8 *);
void tty_init(struct tty *, int, char *);
int tty_resize(struct tty *);
+int tty_set_size(struct tty *tty, u_int sx, u_int sy);
void tty_start_tty(struct tty *);
void tty_stop_tty(struct tty *);
void tty_set_title(struct tty *, const char *);
Modified: trunk/tty.c
===================================================================
--- trunk/tty.c 2012-02-15 19:31:35 UTC (rev 2701)
+++ trunk/tty.c 2012-02-15 19:32:12 UTC (rev 2702)
@@ -93,10 +93,8 @@
sx = 80;
sy = 24;
}
- if (sx == tty->sx && sy == tty->sy)
+ if (!tty_set_size(tty, sx, sy))
return (0);
- tty->sx = sx;
- tty->sy = sy;
tty->cx = UINT_MAX;
tty->cy = UINT_MAX;
@@ -117,6 +115,15 @@
}
int
+tty_set_size(struct tty *tty, u_int sx, u_int sy) {
+ if (sx == tty->sx && sy == tty->sy)
+ return (0);
+ tty->sx = sx;
+ tty->sy = sy;
+ return (1);
+}
+
+int
tty_open(struct tty *tty, const char *overrides, char **cause)
{
char out[64];
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs