fgsch 6e5d467155 update to 2.1pre15. prompted some time ago by
Julian Leyh <oenone at oenone dot de>. sorry for the delay dude.
2004-12-04 01:01:42 +00:00

85 lines
2.9 KiB
Plaintext

$OpenBSD: patch-menu_c,v 1.7 2004/12/04 01:01:42 fgsch Exp $
--- menu.c.orig Tue Apr 20 05:08:43 2004
+++ menu.c Fri Dec 3 20:35:32 2004
@@ -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;
@@ -1894,7 +1894,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();
}
@@ -1906,7 +1906,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);