The branch, master has been updated
       via  df6488a47088ec8bcddc6a1cfa85fec1a462c789 (commit)
       via  776eef49d8e13b227d25e5d56d4c379b89c4aacb (commit)
       via  6e764fb53e7665d723d0ac58ec32c5b608f9c713 (commit)
       via  86207ee676af4fc64f6e289d824460800f43194e (commit)
       via  8a8e2eb04aa03bd1b8f4a515fc1d7e50a35acb44 (commit)
      from  66e8811c64a833b759511b3f7309e834155a8442 (commit)

- Log -----------------------------------------------------------------
commit df6488a47088ec8bcddc6a1cfa85fec1a462c789
Merge: 66e8811 776eef4
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Merge branch 'obsd-master'

 format.c        |    2 +-
 osdep-openbsd.c |    3 ++-
 screen.c        |    4 ++--
 window-choose.c |    9 +++------
 window-copy.c   |   21 ++++++++++++---------
 5 files changed, 20 insertions(+), 19 deletions(-)



commit 776eef49d8e13b227d25e5d56d4c379b89c4aacb
Author: deraadt <deraadt>
Commit: deraadt <deraadt>

    Replace <sys/param.h> with <limits.h> and other less dirty headers where
    possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
    to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
    MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
    sensible to avoid pulling in the pollution.  These are the files confirmed
    through binary verification.
    ok guenther, millert, doug (helped with the verification protocol)
---
 procname.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/procname.c b/procname.c
index 7ee076e..97a78d7 100644
--- a/procname.c
+++ b/procname.c
@@ -16,7 +16,8 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <sys/param.h>
+#include <sys/param.h> /* MAXCOMLEN */
+#include <sys/types.h>
 #include <sys/proc.h>
 #include <sys/sysctl.h>
 #include <sys/stat.h>


commit 6e764fb53e7665d723d0ac58ec32c5b608f9c713
Author: nicm <nicm>
Commit: nicm <nicm>

    Remove an unnecessary variable and shorten a line.
---
 window-choose.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/window-choose.c b/window-choose.c
index 5601639..0d72474 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -330,14 +330,12 @@ window_choose_collapse(struct window_pane *wp, struct 
session *s)
        struct window_choose_mode_data  *data = wp->modedata;
        struct window_choose_mode_item  *item, *chosen;
        struct window_choose_data       *wcd;
-       u_int                            i, pos;
+       u_int                            i;
 
        ARRAY_DECL(, struct window_choose_mode_item) list_copy;
        ARRAY_INIT(&list_copy);
 
-       pos = data->selected;
-
-       chosen = &ARRAY_ITEM(&data->list, pos);
+       chosen = &ARRAY_ITEM(&data->list, data->selected);
        chosen->state &= ~TREE_EXPANDED;
 
        /*
@@ -353,9 +351,8 @@ window_choose_collapse(struct window_pane *wp, struct 
session *s)
                        /* We only show the session when collapsed. */
                        if (wcd->type & TREE_SESSION) {
                                item->state &= ~TREE_EXPANDED;
+                               ARRAY_ADD(&list_copy, *item);
 
-                               ARRAY_ADD(&list_copy,
-                                               ARRAY_ITEM(&data->list, i));
                                /*
                                 * Update the selection to this session item so
                                 * we don't end up highlighting a non-existent


commit 86207ee676af4fc64f6e289d824460800f43194e
Author: nicm <nicm>
Commit: nicm <nicm>

    Shorten some long lines.
---
 window-copy.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/window-copy.c b/window-copy.c
index 8aae09b..6447a2d 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -390,13 +390,16 @@ window_copy_key(struct window_pane *wp, struct session 
*sess, int key)
                        if (data->inputtype == WINDOW_COPY_JUMPFORWARD) {
                                for (; np != 0; np--)
                                        window_copy_cursor_jump(wp);
-                       } else if (data->inputtype == WINDOW_COPY_JUMPBACK) {
+                       }
+                       if (data->inputtype == WINDOW_COPY_JUMPBACK) {
                                for (; np != 0; np--)
                                        window_copy_cursor_jump_back(wp);
-                       } else if (data->inputtype == 
WINDOW_COPY_JUMPTOFORWARD) {
+                       }
+                       if (data->inputtype == WINDOW_COPY_JUMPTOFORWARD) {
                                for (; np != 0; np--)
                                        window_copy_cursor_jump_to(wp);
-                       } else if (data->inputtype == WINDOW_COPY_JUMPTOBACK) {
+                       }
+                       if (data->inputtype == WINDOW_COPY_JUMPTOBACK) {
                                for (; np != 0; np--)
                                        window_copy_cursor_jump_to_back(wp);
                        }
@@ -1771,7 +1774,7 @@ window_copy_other_end(struct window_pane *wp)
 {
        struct window_copy_mode_data    *data = wp->modedata;
        struct screen                   *s = &data->screen;
-       u_int                            selx, sely, cx, cy, yy;
+       u_int                            selx, sely, cx, cy, yy, hsize;
 
        if (!s->sel.flag && s->sel.lineflag == LINE_SEL_NONE)
                return;
@@ -1791,13 +1794,13 @@ window_copy_other_end(struct window_pane *wp)
        data->sely = yy;
        data->cx = selx;
 
-       if (sely < screen_hsize(data->backing) - data->oy) {
-               data->oy = screen_hsize(data->backing) - sely;
+       hsize = screen_hsize(data->backing);
+       if (sely < hsize - data->oy) {
+               data->oy = hsize - sely;
                data->cy = 0;
-       } else if (sely > screen_hsize(data->backing) - data->oy + 
screen_size_y(s)) {
-               data->oy = screen_hsize(data->backing) - sely + 
screen_size_y(s) - 1;
+       } else if (sely > hsize - data->oy + screen_size_y(s)) {
+               data->oy = hsize - sely + screen_size_y(s) - 1;
                data->cy = screen_size_y(s) - 1;
-
        } else
                data->cy = cy + sely - yy;
 


commit 8a8e2eb04aa03bd1b8f4a515fc1d7e50a35acb44
Author: deraadt <deraadt>
Commit: deraadt <deraadt>

    correctly use HOST_NAME_MAX.
    
    Some notes:
    POSIX HOST_NAME_MAX doesn't include the NUL.
    POSIX LOGIN_NAME_MAX and TTY_NAME_MAX do include the NUL.
    
    BSD MAXHOSTNAMELEN includes the NUL.  Actually, most of the historical
    BSD MAX* defines did include the NUL, except for the historical
    mistake of utmp fields without NULs in the string, which directly led
    to strncpy..  just showing how error prone this kind of accounting is.
    CSRG did right.  Somehow POSIX missed the memo on the concepts of
    carefulness and consistancy, and we are still paying the price when
    people trip over this.  Of course, glibc is even more amazing (that is
    a hint to blackhats)
    
    ok guenther
---
 format.c |    2 +-
 screen.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/format.c b/format.c
index c5ede2b..ea0a91b 100644
--- a/format.c
+++ b/format.c
@@ -133,7 +133,7 @@ struct format_tree *
 format_create(void)
 {
        struct format_tree      *ft;
-       char                     host[MAXHOSTNAMELEN], *ptr;
+       char                     host[HOST_NAME_MAX+1], *ptr;
 
        ft = xcalloc(1, sizeof *ft);
        RB_INIT(&ft->tree);
diff --git a/screen.c b/screen.c
index 3e3cac5..1b841ee 100644
--- a/screen.c
+++ b/screen.c
@@ -31,11 +31,11 @@ void        screen_resize_y(struct screen *, u_int);
 void
 screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
 {
-       char host[HOST_NAME_MAX];
+       char host[HOST_NAME_MAX+1];
 
        s->grid = grid_create(sx, sy, hlimit);
 
-       if (gethostname(host, HOST_NAME_MAX) == 0)
+       if (gethostname(host, sizeof(host)) == 0)
                s->title = xstrdup(host);
        else
                s->title = xstrdup("");


-----------------------------------------------------------------------

Summary of changes:
 format.c        |    2 +-
 osdep-openbsd.c |    3 ++-
 screen.c        |    4 ++--
 window-choose.c |    9 +++------
 window-copy.c   |   21 ++++++++++++---------
 5 files changed, 20 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to