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/da9b6d6ac08f
branches:  trunk
changeset: 1020646:da9b6d6ac08f
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 87b3f19d02d2 -r da9b6d6ac08f 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 87b3f19d02d2 -r da9b6d6ac08f 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 87b3f19d02d2 -r da9b6d6ac08f 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