$OpenBSD: patch-menu_c,v 1.6 2003/11/17 22:59:32 fgsch Exp $
--- menu.c.orig	2003-11-10 15:03:30.000000000 -0300
+++ menu.c	2003-11-17 19:09:12.000000000 -0300
@@ -329,7 +329,7 @@ void flush_caches(struct terminal *term,
 /* jde v historii o psteps polozek dozadu */
 void go_backwards(struct terminal *term, void *psteps, struct session *ses)
 {
-	int steps = (int) psteps;
+	int steps = (intptr_t) psteps;
 
 	/*if (ses->tq_goto_position)
 		--steps;
@@ -363,7 +363,7 @@ void history_menu(struct terminal *term,
 	foreach(l, ses->history) {
 		if (n/* || ses->tq_goto_position*/) {
 			if (!mi && !(mi = new_menu(3))) return;
-			add_to_menu(&mi, stracpy(l->url), "", "", MENU_FUNC go_backwards, (void *) n, 0);
+			add_to_menu(&mi, stracpy(l->url), "", "", MENU_FUNC go_backwards, (void *)(intptr_t) n, 0);
 		}
 		n++;
 	}
@@ -410,7 +410,7 @@ void menu_toggle(struct terminal *term, 
 
 void display_codepage(struct terminal *term, void *pcp, struct session *ses)
 {
-	int cp = (int)pcp;
+	int cp = (intptr_t)pcp;
 	struct term_spec *t = new_term_spec(term->term);
 	if (t) t->charset = cp;
 	cls_redraw_all_terminals();
@@ -418,7 +418,7 @@ void display_codepage(struct terminal *t
 
 void assumed_codepage(struct terminal *term, void *pcp, struct session *ses)
 {
-	int cp = (int)pcp;
+	int cp = (intptr_t)pcp;
 	ses->ds.assume_cp = cp;
 	redraw_terminal_cls(term);
 }
@@ -431,7 +431,7 @@ void charset_list(struct terminal *term,
 	if (!(mi = new_menu(1))) return;
 	for (i = 0; (n = get_cp_name(i)); i++) {
 		if (is_cp_special(i)) continue;
-		add_to_menu(&mi, get_cp_name(i), "", "", MENU_FUNC display_codepage, (void *)i, 0);
+		add_to_menu(&mi, get_cp_name(i), "", "", MENU_FUNC display_codepage, (void *)(intptr_t)i, 0);
 	}
 	sel = ses->term->spec->charset;
 	if (sel < 0) sel = 0;
@@ -440,7 +440,7 @@ void charset_list(struct terminal *term,
 
 void set_val(struct terminal *term, void *ip, int *d)
 {
-	*d = (int)ip;
+	*d = (intptr_t)ip;
 }
 
 void charset_sel_list(struct terminal *term, struct session *ses, int *ptr)
@@ -450,7 +450,7 @@ void charset_sel_list(struct terminal *t
 	struct menu_item *mi;
 	if (!(mi = new_menu(1))) return;
 	for (i = 0; (n = get_cp_name(i)); i++) {
-		add_to_menu(&mi, get_cp_name(i), "", "", MENU_FUNC set_val, (void *)i, 0);
+		add_to_menu(&mi, get_cp_name(i), "", "", MENU_FUNC set_val, (void *)(intptr_t)i, 0);
 	}
 	sel = *ptr;
 	if (sel < 0) sel = 0;
@@ -1885,7 +1885,7 @@ void miscelaneous_options(struct termina
 
 void menu_set_language(struct terminal *term, void *pcp, struct session *ses)
 {
-	set_language((int)pcp);
+	set_language((intptr_t)pcp);
 	cls_redraw_all_terminals();
 }
 
@@ -1897,7 +1897,7 @@ void menu_language_list(struct terminal 
 	if (!(mi = new_menu(1))) return;
 	for (i = 0; i < n_languages(); i++) {
 		n = language_name(i);
-		add_to_menu(&mi, n, "", "", MENU_FUNC menu_set_language, (void *)i, 0);
+		add_to_menu(&mi, n, "", "", MENU_FUNC menu_set_language, (void *)(intptr_t)i, 0);
 	}
 	sel = current_language;
 	do_menu_selected(term, mi, ses, sel);
