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/246195447a9e
branches:  trunk
changeset: 961417:246195447a9e
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 aca40a06f362 -r 246195447a9e 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 @@
        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 @@
        /* 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 @@
                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 aca40a06f362 -r 246195447a9e 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 @@
        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 @@
                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 aca40a06f362 -r 246195447a9e 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 @@
                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