1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
$NetBSD: patch-as,v 1.2 2008/08/17 23:50:06 dholland Exp $
--- x11/ui.cpp.orig 2003-03-19 10:05:38.000000000 -0500
+++ x11/ui.cpp 2008-08-17 19:20:26.000000000 -0400
@@ -41,7 +41,8 @@ extern "C" {
}
#include <iostream.h>
-#include <strstream.h>
+#include <strstream>
+using namespace std;
#include "coord.h"
#include "area.h"
@@ -930,7 +931,7 @@ void Ui::menu_enemies_refill_CB(void* va
UiP ui = (UiP)closure;
ui->settingsChanges |= UIenemiesRefill;
// SGI compiler says you can't cast void* to Boolean.
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
ui->settings.enemiesRefill = val;
}
@@ -939,7 +940,7 @@ void Ui::menu_enemies_refill_CB(void* va
void Ui::menu_controls_CB(void* value,Viewport* vPort,void* closure) {
UiP ui = (UiP)closure;
int dpyNum = vPort->get_dpy_num();
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
XMapWindow(ui->xvars.dpy[dpyNum],ui->xdata.controls[dpyNum]);
}
@@ -955,7 +956,7 @@ void Ui::menu_learn_controls_CB(void* va
Viewport* vPort,void* closure) {
UiP ui = (UiP)closure;
int dpyNum = vPort->get_dpy_num();
- Boolean active = (Boolean)(int)value;
+ Boolean active = (Boolean)(intptr_t)value;
if (active) {
ui->lControls[dpyNum].input = ui->lControls[dpyNum].key =
@@ -994,7 +995,7 @@ void Ui::menu_learn_controls_CB(void* va
void Ui::menu_scenarios_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
ui->settingsChanges |= UIstyle;
ui->settings.style = SCENARIOS;
@@ -1005,7 +1006,7 @@ void Ui::menu_scenarios_CB(void* value,V
void Ui::menu_levels_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
ui->settingsChanges |= UIstyle;
ui->settings.style = LEVELS;
@@ -1016,7 +1017,7 @@ void Ui::menu_levels_CB(void* value,View
void Ui::menu_kill_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
ui->settingsChanges |= UIstyle;
ui->settings.style = KILL;
@@ -1027,7 +1028,7 @@ void Ui::menu_kill_CB(void* value,Viewpo
void Ui::menu_duel_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
ui->settingsChanges |= UIstyle;
ui->settings.style = DUEL;
@@ -1038,7 +1039,7 @@ void Ui::menu_duel_CB(void* value,Viewpo
void Ui::menu_extended_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
ui->settingsChanges |= UIstyle;
ui->settings.style = EXTENDED;
@@ -1049,7 +1050,7 @@ void Ui::menu_extended_CB(void* value,Vi
void Ui::menu_training_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
if (val) {
ui->settingsChanges |= UIstyle;
ui->settings.style = TRAINING;
@@ -1070,7 +1071,7 @@ void Ui::menu_quanta_CB(void* value,View
void Ui::menu_cooperative_CB(void* value,Viewport*,void* closure) {
UiP ui = (UiP)closure;
ui->settingsChanges |= UIcooperative;
- Boolean val = (Boolean)(int)value;
+ Boolean val = (Boolean)(intptr_t)value;
ui->settings.cooperative = val;
}
@@ -1079,7 +1080,7 @@ void Ui::menu_cooperative_CB(void* value
void Ui::menu_help_CB(void* value,Viewport* vPort,void* closure) {
UiP ui = (UiP)closure;
int dpyNum = vPort->get_dpy_num();
- Boolean active = (Boolean)(int)value;
+ Boolean active = (Boolean)(intptr_t)value;
if (active) {
XMapWindow(ui->xvars.dpy[dpyNum],ui->xdata.help[dpyNum]);
@@ -1094,7 +1095,7 @@ void Ui::menu_help_CB(void* value,Viewpo
void Ui::status_weapon_CB(void* value,Viewport* vPort,void*) {
// Some mouse controls.
// UiP ui = (UiP)closure;
- int button = (int)value;
+ int button = (int)(intptr_t)value;
switch (button) {
case Button1:
@@ -1113,7 +1114,7 @@ void Ui::status_weapon_CB(void* value,Vi
void Ui::status_item_CB(void* value,Viewport* vPort,void*) {
// UiP ui = (UiP)closure;
- int button = (int)value;
+ int button = (int)(intptr_t)value;
switch (button) {
case Button1:
|