Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/tmux/dist fix the 32 bit build (I guess the aut...



details:   https://anonhg.NetBSD.org/src/rev/50b4db4e309d
branches:  trunk
changeset: 378615:50b4db4e309d
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 18 14:01:29 2021 +0000

description:
fix the 32 bit build (I guess the authors don't have any 32 bit machines
anymore)

diffstat:

 external/bsd/tmux/dist/cmd-display-menu.c |  6 +++---
 external/bsd/tmux/dist/window-customize.c |  4 ++--
 external/bsd/tmux/dist/window-tree.c      |  8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (69 lines):

diff -r 177d7f504437 -r 50b4db4e309d external/bsd/tmux/dist/cmd-display-menu.c
--- a/external/bsd/tmux/dist/cmd-display-menu.c Sun Apr 18 12:05:29 2021 +0000
+++ b/external/bsd/tmux/dist/cmd-display-menu.c Sun Apr 18 14:01:29 2021 +0000
@@ -155,7 +155,7 @@ cmd_display_menu_get_position(struct cli
        else
                format_add(ft, "popup_centre_x", "%ld", n);
        n = (tty->sy - 1) / 2 + h / 2;
-       if (n >= tty->sy)
+       if ((unsigned long)n >= tty->sy)
                format_add(ft, "popup_centre_y", "%u", tty->sy - h);
        else
                format_add(ft, "popup_centre_y", "%ld", n);
@@ -188,7 +188,7 @@ cmd_display_menu_get_position(struct cli
        /* Position in pane. */
        tty_window_offset(&tc->tty, &ox, &oy, &sx, &sy);
        n = top + wp->yoff - oy + h;
-       if (n >= tty->sy)
+       if ((unsigned long)n >= tty->sy)
                format_add(ft, "popup_pane_top", "%u", tty->sy - h);
        else
                format_add(ft, "popup_pane_top", "%ld", n);
@@ -236,7 +236,7 @@ cmd_display_menu_get_position(struct cli
                yp = "#{popup_window_status_line_y}";
        p = format_expand(ft, yp);
        n = strtol(p, NULL, 10);
-       if (n < h)
+       if ((unsigned long)n < h)
                n = 0;
        else
                n -= h;
diff -r 177d7f504437 -r 50b4db4e309d external/bsd/tmux/dist/window-customize.c
--- a/external/bsd/tmux/dist/window-customize.c Sun Apr 18 12:05:29 2021 +0000
+++ b/external/bsd/tmux/dist/window-customize.c Sun Apr 18 14:01:29 2021 +0000
@@ -116,7 +116,7 @@ window_customize_get_tag(struct options_
        uint64_t        offset;
 
        if (oe == NULL)
-               return ((uint64_t)o);
+               return ((uintptr_t)o);
        offset = ((const char *)oe - (const char *)options_table) / sizeof *options_table;
        return ((2ULL << 62)|(offset << 32)|((idx + 1) << 1)|1);
 }
@@ -484,7 +484,7 @@ window_customize_build_keys(struct windo
                item->idx = -1;
 
                expanded = format_expand(ft, data->format);
-               child = mode_tree_add(data->data, top, item, (uint64_t)bd,
+               child = mode_tree_add(data->data, top, item, (uintptr_t)bd,
                    expanded, NULL, 0);
                free(expanded);
 
diff -r 177d7f504437 -r 50b4db4e309d external/bsd/tmux/dist/window-tree.c
--- a/external/bsd/tmux/dist/window-tree.c      Sun Apr 18 12:05:29 2021 +0000
+++ b/external/bsd/tmux/dist/window-tree.c      Sun Apr 18 14:01:29 2021 +0000
@@ -1257,10 +1257,10 @@ window_tree_key(struct window_mode_entry
                data->offset++;
                break;
        case 'H':
-               mode_tree_expand(data->data, (uint64_t)fsp->s);
-               mode_tree_expand(data->data, (uint64_t)fsp->wl);
-               if (!mode_tree_set_current(data->data, (uint64_t)wme->wp))
-                       mode_tree_set_current(data->data, (uint64_t)fsp->wl);
+               mode_tree_expand(data->data, (uintptr_t)fsp->s);
+               mode_tree_expand(data->data, (uintptr_t)fsp->wl);
+               if (!mode_tree_set_current(data->data, (uintptr_t)wme->wp))
+                       mode_tree_set_current(data->data, (uintptr_t)fsp->wl);
                break;
        case 'm':
                window_tree_pull_item(item, &ns, &nwl, &nwp);



Home | Main Index | Thread Index | Old Index