Module Name:    src
Committed By:   christos
Date:           Sun Apr 18 14:01:29 UTC 2021

Modified Files:
        src/external/bsd/tmux/dist: cmd-display-menu.c window-customize.c
            window-tree.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tmux/dist/cmd-display-menu.c \
    src/external/bsd/tmux/dist/window-customize.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/tmux/dist/window-tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/tmux/dist/cmd-display-menu.c
diff -u src/external/bsd/tmux/dist/cmd-display-menu.c:1.2 src/external/bsd/tmux/dist/cmd-display-menu.c:1.3
--- src/external/bsd/tmux/dist/cmd-display-menu.c:1.2	Sat Apr 17 16:42:09 2021
+++ src/external/bsd/tmux/dist/cmd-display-menu.c	Sun Apr 18 10:01:29 2021
@@ -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;
Index: src/external/bsd/tmux/dist/window-customize.c
diff -u src/external/bsd/tmux/dist/window-customize.c:1.2 src/external/bsd/tmux/dist/window-customize.c:1.3
--- src/external/bsd/tmux/dist/window-customize.c:1.2	Sat Apr 17 16:42:10 2021
+++ src/external/bsd/tmux/dist/window-customize.c	Sun Apr 18 10:01:29 2021
@@ -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);
 

Index: src/external/bsd/tmux/dist/window-tree.c
diff -u src/external/bsd/tmux/dist/window-tree.c:1.8 src/external/bsd/tmux/dist/window-tree.c:1.9
--- src/external/bsd/tmux/dist/window-tree.c:1.8	Sat Apr 17 16:42:10 2021
+++ src/external/bsd/tmux/dist/window-tree.c	Sun Apr 18 10:01:29 2021
@@ -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);

Reply via email to