1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtwm: resolve 92 compiler warnings (related to 64 bit pointer to int coversions)

This commit is contained in:
Peter Howkins 2014-12-30 17:13:41 +00:00
parent 4a66f1ab61
commit 8ed5281e3e
5 changed files with 94 additions and 94 deletions

View file

@ -625,12 +625,12 @@ WorkspaceModifyCB (Widget w,
/* When adding a switch buttons, keep the row columns row count */ /* When adding a switch buttons, keep the row columns row count */
/* equal to the requested value with small number of buttons */ /* equal to the requested value with small number of buttons */
if (switch_data->switch_count <= (int) if (switch_data->switch_count <= (intptr_t)
(switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value)) (switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value))
{ {
Arg al[1]; Arg al[1];
panel.switch_row_count = (int) panel.switch_row_count = (intptr_t)
(switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value); (switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value);
XtSetArg (al[0], XmNnumColumns, panel.switch_row_count); XtSetArg (al[0], XmNnumColumns, panel.switch_row_count);
@ -710,7 +710,7 @@ WorkspaceModifyCB (Widget w,
/* When deleting a switch button, keep trying to decrease the */ /* When deleting a switch button, keep trying to decrease the */
/* row count to the requested value. */ /* row count to the requested value. */
if (panel.switch_row_count > (int) if (panel.switch_row_count > (intptr_t)
(switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value)) (switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value))
{ {
button_width = XtWidth (switch_data->buttons[0]); button_width = XtWidth (switch_data->buttons[0]);
@ -1237,7 +1237,7 @@ CheckControlTypeFile (ControlData * control_data)
char * message; char * message;
if ((int) control_data->element_values[CONTROL_TYPE].parsed_value != CONTROL_FILE) if ((intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value != CONTROL_FILE)
return (True); return (True);
file_name = file_name =
@ -1372,7 +1372,7 @@ PushCB (Widget w,
int i, j; int i, j;
control_behavior = (int) (panel.element_values[PANEL_CONTROL_BEHAVIOR].parsed_value); control_behavior = (intptr_t) (panel.element_values[PANEL_CONTROL_BEHAVIOR].parsed_value);
/* See if the workspace name is being edited. If so, call the */ /* See if the workspace name is being edited. If so, call the */
@ -1563,9 +1563,9 @@ PushCB (Widget w,
(callback->reason == XmCR_DEFAULT_ACTION || (callback->reason == XmCR_DEFAULT_ACTION ||
callback->reason == XmCR_SINGLE_SELECT))) callback->reason == XmCR_SINGLE_SELECT)))
{ {
control_type = (int) (control_data->element_values[CONTROL_TYPE].parsed_value); control_type = (intptr_t) (control_data->element_values[CONTROL_TYPE].parsed_value);
push_action = (PanelActionData *) (control_data->element_values[CONTROL_PUSH_ACTION].parsed_value); push_action = (PanelActionData *) (control_data->element_values[CONTROL_PUSH_ACTION].parsed_value);
push_recall = (Boolean) (control_data->element_values[CONTROL_PUSH_RECALL].parsed_value); push_recall = (Boolean) (intptr_t) (control_data->element_values[CONTROL_PUSH_RECALL].parsed_value);
switch (control_type) switch (control_type)
{ {
@ -1577,7 +1577,7 @@ PushCB (Widget w,
/* Turn off the subpanel control monitor indicator */ /* Turn off the subpanel control monitor indicator */
if ((char) control_data->element_values[CONTROL_MONITOR_TYPE]. if ((char) (intptr_t) control_data->element_values[CONTROL_MONITOR_TYPE].
parsed_value != MONITOR_NONE) parsed_value != MONITOR_NONE)
{ {
if (subpanel_data != NULL) if (subpanel_data != NULL)
@ -1731,7 +1731,7 @@ PushCB (Widget w,
/* action occured out of a subpanel. */ /* action occured out of a subpanel. */
if (subpanel_data != NULL && unpost_subpanel && if (subpanel_data != NULL && unpost_subpanel &&
(Boolean) panel.element_values[PANEL_SUBPANEL_UNPOST].parsed_value && (Boolean) (intptr_t) panel.element_values[PANEL_SUBPANEL_UNPOST].parsed_value &&
subpanel_data->torn == False) subpanel_data->torn == False)
ArrowCB (main_control_data->arrow, ArrowCB (main_control_data->arrow,
(XtPointer)main_control_data, (XtPointer)NULL); (XtPointer)main_control_data, (XtPointer)NULL);
@ -1774,8 +1774,8 @@ DropCB (Widget w,
animate_data->dropData->protocol == DtDND_BUFFER_TRANSFER)) animate_data->dropData->protocol == DtDND_BUFFER_TRANSFER))
{ {
int numItems; int numItems;
int control_type = intptr_t control_type =
(int)control_data->element_values[CONTROL_TYPE].parsed_value; (intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value;
char * control_name = char * control_name =
(char *)control_data->element_values[CONTROL_FILE_NAME].parsed_value; (char *)control_data->element_values[CONTROL_FILE_NAME].parsed_value;
Boolean send_control_name = False; Boolean send_control_name = False;
@ -2291,7 +2291,7 @@ CustomizeDropCB (Widget w,
Boolean drop_of_fp; Boolean drop_of_fp;
Boolean bad_control; Boolean bad_control;
Boolean control_monitor; Boolean control_monitor;
int position_hints; intptr_t position_hints;
int count; int count;
char * new_control_name; char * new_control_name;
@ -2456,18 +2456,18 @@ CustomizeDropCB (Widget w,
if (bad_control) continue; if (bad_control) continue;
if ((int) element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE) if ((intptr_t) element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE)
control_monitor = True; control_monitor = True;
else else
control_monitor = False; control_monitor = False;
position_hints = (int)element_values[CONTROL_POSITION_HINTS].parsed_value; position_hints = (intptr_t) element_values[CONTROL_POSITION_HINTS].parsed_value;
/* Initialize the subpanel layout and processing attributes. */ /* Initialize the subpanel layout and processing attributes. */
if ((int) main_control_data-> if ((intptr_t) main_control_data->
element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE)
{ {
control_monitor = True; control_monitor = True;
@ -2476,7 +2476,7 @@ CustomizeDropCB (Widget w,
for (j = 0; j < subpanel_data->control_data_count; j++) for (j = 0; j < subpanel_data->control_data_count; j++)
{ {
if ((int) subpanel_data->control_data[j]-> if ((intptr_t) subpanel_data->control_data[j]->
element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE)
{ {
control_monitor = True; control_monitor = True;
@ -2517,7 +2517,7 @@ CustomizeDropCB (Widget w,
for (j = count - 2; j >= 0; j--) for (j = count - 2; j >= 0; j--)
{ {
if (position_hints >= if (position_hints >=
(int) subpanel_data->control_data[j]->element_values[CONTROL_POSITION_HINTS].parsed_value) (intptr_t) subpanel_data->control_data[j]->element_values[CONTROL_POSITION_HINTS].parsed_value)
break; break;
} }

View file

@ -607,7 +607,7 @@ _DtPerfChkpntMsgSend("End Front panel database read");
for (i = panel_count - 1; i > 0; i--) for (i = panel_count - 1; i > 0; i--)
{ {
if ((Boolean)(panel_data[i].element_values[PANEL_LOCKED].parsed_value)) if ((intptr_t)(panel_data[i].element_values[PANEL_LOCKED].parsed_value))
break; break;
} }
@ -680,7 +680,7 @@ _DtPerfChkpntMsgSend("End Front panel database read");
if (switch_count != 0) { if (switch_count != 0) {
for (i = switch_count - 1; i > 0; i--) for (i = switch_count - 1; i > 0; i--)
{ {
if ((Boolean)(switch_data[i].element_values[SWITCH_LOCKED].parsed_value)) if ((intptr_t)(switch_data[i].element_values[SWITCH_LOCKED].parsed_value))
break; break;
} }
@ -1149,7 +1149,7 @@ AnimationParseCB (DtDtsDbField * fields,
if ((string = _DtWmParseNextTokenC(&source, False)) != NULL) if ((string = _DtWmParseNextTokenC(&source, False)) != NULL)
{ {
StringToInt((char *)string, &val_rtn); StringToInt((char *)string, &val_rtn);
panel.animation_data[count].items[i].delay = (int) val_rtn; panel.animation_data[count].items[i].delay = (int) (intptr_t) val_rtn;
} }
else else
{ {
@ -1495,8 +1495,8 @@ BubbleSort (RecordData * rec_data,
} }
else else
{ {
if ((int) rec_data[j].element_values[elem_index].parsed_value > if ((intptr_t) rec_data[j].element_values[elem_index].parsed_value >
(int) rec_data[j+1].element_values[elem_index].parsed_value) (intptr_t) rec_data[j+1].element_values[elem_index].parsed_value)
{ {
SwapEntries(rec_data, j, j+1); SwapEntries(rec_data, j, j+1);
t = j; t = j;
@ -1559,9 +1559,9 @@ ReorderByContainerName (RecordData * rec_data,
while (i < rec_count) while (i < rec_count)
{ {
cont_type = (int) cont_type = (int) (intptr_t)
(rec_data[start].element_values[elem_type].parsed_value); (rec_data[start].element_values[elem_type].parsed_value);
while ((int)(rec_data[i].element_values[elem_type].parsed_value) == while ((intptr_t)(rec_data[i].element_values[elem_type].parsed_value) ==
cont_type) cont_type)
{ {
i++; i++;
@ -1653,9 +1653,9 @@ ReorderByPosition(RecordData *rec_data,
} }
else else
{ {
container_type = (int) container_type = (int) (intptr_t)
(rec_data[start].element_values[cont_type].parsed_value); (rec_data[start].element_values[cont_type].parsed_value);
while (((int)rec_data[i].element_values[cont_type].parsed_value == while (((intptr_t)rec_data[i].element_values[cont_type].parsed_value ==
container_type) && container_type) &&
(strcmp((char *) (strcmp((char *)
rec_data[i].element_values[cont_name].parsed_value, rec_data[i].element_values[cont_name].parsed_value,
@ -1809,12 +1809,12 @@ ResolveDuplicates (RecordData * record_data,
element_values = record_data[i].element_values; element_values = record_data[i].element_values;
if (ANY_CONTAINER_TYPE != container_type) if (ANY_CONTAINER_TYPE != container_type)
{ {
cont_type = (int) (element_values[container_type].parsed_value); cont_type = (int) (intptr_t) (element_values[container_type].parsed_value);
cont_name = (char *) (element_values[container_name].parsed_value); cont_name = (char *) (element_values[container_name].parsed_value);
} }
record_name = (char *) (element_values[name_type].parsed_value); record_name = (char *) (element_values[name_type].parsed_value);
locked = (Boolean)(element_values[lock_type].parsed_value); locked = (Boolean) (intptr_t) (element_values[lock_type].parsed_value);
if (locked) if (locked)
{ {
i--; i--;
@ -1834,7 +1834,7 @@ ResolveDuplicates (RecordData * record_data,
} }
else else
{ {
while (((int)(element_values[container_type].parsed_value) while (((intptr_t)(element_values[container_type].parsed_value)
== cont_type) && == cont_type) &&
(strcmp((char *)(element_values[container_name].parsed_value), (strcmp((char *)(element_values[container_name].parsed_value),
cont_name) == 0) && cont_name) == 0) &&
@ -1864,7 +1864,7 @@ ResolveDuplicates (RecordData * record_data,
while ((strcmp((char *) (element_values[name_type].parsed_value), while ((strcmp((char *) (element_values[name_type].parsed_value),
record_name) == 0)) record_name) == 0))
{ {
locked = (Boolean)(element_values[lock_type].parsed_value); locked = (Boolean) (intptr_t) (element_values[lock_type].parsed_value);
if (locked && start_index == lock_index) if (locked && start_index == lock_index)
lock_index = i; lock_index = i;
last_index = i; last_index = i;
@ -1875,14 +1875,14 @@ ResolveDuplicates (RecordData * record_data,
} }
else else
{ {
while (((int)(element_values[container_type].parsed_value) while (((intptr_t)(element_values[container_type].parsed_value)
== cont_type) && == cont_type) &&
(strcmp((char *)(element_values[container_name].parsed_value), (strcmp((char *)(element_values[container_name].parsed_value),
cont_name) == 0) && cont_name) == 0) &&
(strcmp((char *)(element_values[name_type].parsed_value), (strcmp((char *)(element_values[name_type].parsed_value),
record_name) == 0)) record_name) == 0))
{ {
locked = (Boolean)(element_values[lock_type].parsed_value); locked = (Boolean) (intptr_t) (element_values[lock_type].parsed_value);
if (locked && start_index == lock_index) if (locked && start_index == lock_index)
lock_index = i; lock_index = i;
last_index = i; last_index = i;
@ -1942,7 +1942,7 @@ GetNameList (RecordData * record_data,
for (i = 0; i < record_count; i++) for (i = 0; i < record_count; i++)
{ {
if (ANY_CONTAINER_TYPE == container_type || if (ANY_CONTAINER_TYPE == container_type ||
(int)(record_data[i].element_values[container_type].parsed_value) == (intptr_t)(record_data[i].element_values[container_type].parsed_value) ==
container) container)
{ {
if (found_count >= name_list_count) if (found_count >= name_list_count)
@ -1999,7 +1999,7 @@ EliminateUnused (RecordData * record_data,
{ {
element_values = record_data[i].element_values; element_values = record_data[i].element_values;
if (cont_type == ANY_CONTAINER_TYPE || if (cont_type == ANY_CONTAINER_TYPE ||
(int)(element_values[cont_type].parsed_value) == container) (intptr_t)(element_values[cont_type].parsed_value) == container)
{ {
if (cont_name_list != NULL) if (cont_name_list != NULL)
{ {
@ -2069,15 +2069,15 @@ EliminateDeleted (RecordData * record_data,
{ {
start = i; start = i;
element_values = record_data[i].element_values; element_values = record_data[i].element_values;
if ((Boolean)element_values[delete_type].parsed_value) if ((intptr_t)element_values[delete_type].parsed_value)
{ {
Boolean delete_rest = False; Boolean delete_rest = False;
if (record_type == CONTROL) if (record_type == CONTROL)
{ {
rec_type = (int)element_values[CONTROL_TYPE].parsed_value; rec_type = (intptr_t)element_values[CONTROL_TYPE].parsed_value;
container_type = container_type =
(int)element_values[CONTROL_CONTAINER_TYPE].parsed_value; (intptr_t)element_values[CONTROL_CONTAINER_TYPE].parsed_value;
} }
container_name = container_name =
XtNewString ((char *)element_values[cont_name].parsed_value); XtNewString ((char *)element_values[cont_name].parsed_value);
@ -2088,18 +2088,18 @@ EliminateDeleted (RecordData * record_data,
{ {
other_element_values = record_data[j].element_values; other_element_values = record_data[j].element_values;
if ((record_type != CONTROL || if ((record_type != CONTROL ||
((int)other_element_values[CONTROL_CONTAINER_TYPE].parsed_value ((intptr_t)other_element_values[CONTROL_CONTAINER_TYPE].parsed_value
== container_type && == container_type &&
(int) other_element_values[CONTROL_TYPE].parsed_value (intptr_t) other_element_values[CONTROL_TYPE].parsed_value
== rec_type)) && == rec_type)) &&
strcmp((char *)other_element_values[cont_name].parsed_value, strcmp((char *)other_element_values[cont_name].parsed_value,
container_name) == 0 && container_name) == 0 &&
strcmp((char *)other_element_values[record_name].parsed_value, strcmp((char *)other_element_values[record_name].parsed_value,
rec_name) == 0) rec_name) == 0)
{ {
if ((Boolean)other_element_values[lock_type].parsed_value) if ((intptr_t)other_element_values[lock_type].parsed_value)
{ {
if ((Boolean)other_element_values[delete_type].parsed_value) if ((intptr_t)other_element_values[delete_type].parsed_value)
{ {
EliminateEntries(record_data, record_count, j, j, &dummy, EliminateEntries(record_data, record_count, j, j, &dummy,
&count, record_type); &count, record_type);
@ -2194,7 +2194,7 @@ CountElements (RecordData * record_data,
for (i = 0; i < record_count; i++) for (i = 0; i < record_count; i++)
{ {
if (ANY_CONTAINER_TYPE == container_type || if (ANY_CONTAINER_TYPE == container_type ||
(int)(record_data[i].element_values[container_type].parsed_value) == (intptr_t)(record_data[i].element_values[container_type].parsed_value) ==
container) container)
{ {
if (strcmp (container_name, if (strcmp (container_name,
@ -2273,7 +2273,7 @@ AddControlActionList (ControlData * control_data)
int j = 0; int j = 0;
if ((int)control_data->element_values[CONTROL_TYPE].parsed_value == if ((intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value ==
CONTROL_FILE) CONTROL_FILE)
{ {
file_name = (char *) file_name = (char *)
@ -2450,7 +2450,7 @@ ProcessBox (BoxData * box_data)
{ {
element_values = control_data[i].element_values; element_values = control_data[i].element_values;
if ((int) element_values[CONTROL_CONTAINER_TYPE].parsed_value == BOX && if ((intptr_t) element_values[CONTROL_CONTAINER_TYPE].parsed_value == BOX &&
strcmp ((char *) box_data->element_values[BOX_NAME].parsed_value, strcmp ((char *) box_data->element_values[BOX_NAME].parsed_value,
(char *) element_values[CONTROL_CONTAINER_NAME].parsed_value) == 0) (char *) element_values[CONTROL_CONTAINER_NAME].parsed_value) == 0)
{ {
@ -2619,7 +2619,7 @@ ProcessSubpanel (SubpanelData * subpanel_data)
{ {
element_values = control_data[i].element_values; element_values = control_data[i].element_values;
if ((int) element_values[CONTROL_CONTAINER_TYPE].parsed_value == SUBPANEL && if ((intptr_t) element_values[CONTROL_CONTAINER_TYPE].parsed_value == SUBPANEL &&
strcmp ((char *) subpanel_data->element_values[SUBPANEL_NAME].parsed_value, strcmp ((char *) subpanel_data->element_values[SUBPANEL_NAME].parsed_value,
(char *) element_values[CONTROL_CONTAINER_NAME].parsed_value) == 0) (char *) element_values[CONTROL_CONTAINER_NAME].parsed_value) == 0)
{ {
@ -2664,7 +2664,7 @@ ProcessSwitch (SwitchData * switch_data)
{ {
element_values = control_data[i].element_values; element_values = control_data[i].element_values;
if ((int) element_values[CONTROL_CONTAINER_TYPE].parsed_value == SWITCH && if ((intptr_t) element_values[CONTROL_CONTAINER_TYPE].parsed_value == SWITCH &&
strcmp ((char *) switch_data->element_values[SWITCH_NAME].parsed_value, strcmp ((char *) switch_data->element_values[SWITCH_NAME].parsed_value,
(char *) element_values[CONTROL_CONTAINER_NAME].parsed_value) == 0) (char *) element_values[CONTROL_CONTAINER_NAME].parsed_value) == 0)
{ {
@ -2784,7 +2784,7 @@ WriteComponentToFile (RecordData * record_data,
record_data->element_values[k].use_default == False) record_data->element_values[k].use_default == False)
{ {
if (record_type == CONTROL && if (record_type == CONTROL &&
(int) record_data->element_values[CONTROL_TYPE].parsed_value == CONTROL_FILE && (intptr_t) record_data->element_values[CONTROL_TYPE].parsed_value == CONTROL_FILE &&
(k == CONTROL_PUSH_ACTION || (k == CONTROL_PUSH_ACTION ||
k == CONTROL_LABEL || k == CONTROL_DROP_ACTION)) k == CONTROL_LABEL || k == CONTROL_DROP_ACTION))
continue; continue;
@ -2880,7 +2880,7 @@ WriteControlComponentFile (ControlData * control_data)
WriteComponentToFile ((RecordData *) control_data, CONTROL, control_keywords, WriteComponentToFile ((RecordData *) control_data, CONTROL, control_keywords,
(char *) element_values[CONTROL_CONTAINER_NAME].parsed_value, (char *) element_values[CONTROL_CONTAINER_NAME].parsed_value,
(int) element_values[CONTROL_CONTAINER_TYPE].parsed_value, (int) (intptr_t) element_values[CONTROL_CONTAINER_TYPE].parsed_value,
False); False);
} }
@ -2932,7 +2932,7 @@ RemoveControlComponentFile (ControlData * control_data)
RemoveComponentFile ((RecordData *) control_data, CONTROL, control_keywords, RemoveComponentFile ((RecordData *) control_data, CONTROL, control_keywords,
(char *) element_values[CONTROL_CONTAINER_NAME].parsed_value, (char *) element_values[CONTROL_CONTAINER_NAME].parsed_value,
(int) element_values[CONTROL_CONTAINER_TYPE].parsed_value); (int) (intptr_t) element_values[CONTROL_CONTAINER_TYPE].parsed_value);
} }
@ -3193,7 +3193,7 @@ InitializeFileControlFields (ElementValue * element_values,
{ {
if ((int)element_values[CONTROL_TYPE].parsed_value == CONTROL_FILE) if ((intptr_t)element_values[CONTROL_TYPE].parsed_value == CONTROL_FILE)
{ {
Boolean free_data_type = False; Boolean free_data_type = False;
char * act_list; char * act_list;
@ -3377,7 +3377,7 @@ UpdateFileType (ControlData * control_data)
icon_name = icon_name =
(char *)control_data->element_values[CONTROL_NORMAL_ICON].parsed_value; (char *)control_data->element_values[CONTROL_NORMAL_ICON].parsed_value;
if ((int)control_data->element_values[CONTROL_CONTAINER_TYPE].parsed_value == if ((intptr_t)control_data->element_values[CONTROL_CONTAINER_TYPE].parsed_value ==
SUBPANEL) SUBPANEL)
{ {
icon_name = GetIconName (icon_name, panel.sub_icon_size); icon_name = GetIconName (icon_name, panel.sub_icon_size);
@ -3431,7 +3431,7 @@ UpdateFileTypeControlFields (void)
{ {
control_data = box_data->control_data[j]; control_data = box_data->control_data[j];
if ((int)control_data->element_values[CONTROL_TYPE].parsed_value == if ((intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value ==
CONTROL_FILE) CONTROL_FILE)
UpdateFileType(control_data); UpdateFileType(control_data);
@ -3443,7 +3443,7 @@ UpdateFileTypeControlFields (void)
{ {
control_data = subpanel_data->control_data[k]; control_data = subpanel_data->control_data[k];
if ((int)control_data->element_values[CONTROL_TYPE].parsed_value if ((intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value
== CONTROL_FILE) == CONTROL_FILE)
UpdateFileType(control_data); UpdateFileType(control_data);
} }
@ -3457,7 +3457,7 @@ UpdateFileTypeControlFields (void)
{ {
control_data = switch_data->control_data[j]; control_data = switch_data->control_data[j];
if ((int)control_data->element_values[CONTROL_TYPE].parsed_value == if ((intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value ==
CONTROL_FILE) CONTROL_FILE)
UpdateFileType(control_data); UpdateFileType(control_data);
} }

View file

@ -161,7 +161,7 @@ PrintFrontPanelContents(void)
if (box_data->switch_data != NULL) if (box_data->switch_data != NULL)
{ {
switch_data = box_data->switch_data; switch_data = box_data->switch_data;
switch_position = (int) box_data->switch_data->element_values[SWITCH_POSITION_HINTS].parsed_value; switch_position = (int) (intptr_t) box_data->switch_data->element_values[SWITCH_POSITION_HINTS].parsed_value;
} }
else else
switch_data = NULL; switch_data = NULL;
@ -175,7 +175,7 @@ PrintFrontPanelContents(void)
control_data = box_data->control_data[j]; control_data = box_data->control_data[j];
if (switch_data != NULL && if (switch_data != NULL &&
switch_position < (int) (control_data->element_values[CONTROL_POSITION_HINTS].parsed_value)) switch_position < (int) (intptr_t) (control_data->element_values[CONTROL_POSITION_HINTS].parsed_value))
{ {
printf (" SWITCH %s\n", printf (" SWITCH %s\n",
(char *) switch_data->element_values[0].parsed_value); (char *) switch_data->element_values[0].parsed_value);

View file

@ -222,7 +222,7 @@ FrontPanelCreate (Widget toplevel)
/* Create the handles, menu and iconify */ /* Create the handles, menu and iconify */
if ((Boolean) panel.element_values[PANEL_DISPLAY_HANDLES].parsed_value) if ((intptr_t) panel.element_values[PANEL_DISPLAY_HANDLES].parsed_value)
{ {
XtTranslations handle_translations = HandleInputTranslations(); XtTranslations handle_translations = HandleInputTranslations();
@ -241,7 +241,7 @@ FrontPanelCreate (Widget toplevel)
XtAddCallback (panel.right_handle, XmNhelpCallback, XtAddCallback (panel.right_handle, XmNhelpCallback,
(XtCallbackProc) GeneralTopicHelpCB, PANEL_HANDLE); (XtCallbackProc) GeneralTopicHelpCB, PANEL_HANDLE);
if ((Boolean) panel.element_values[PANEL_DISPLAY_MENU].parsed_value) if ((intptr_t) panel.element_values[PANEL_DISPLAY_MENU].parsed_value)
{ {
panel.menu = PanelControlCreate (panel.form, "menu", menu_normal_image); panel.menu = PanelControlCreate (panel.form, "menu", menu_normal_image);
@ -297,7 +297,7 @@ FrontPanelCreate (Widget toplevel)
XtSetValues (panel.left_handle, al, ac); XtSetValues (panel.left_handle, al, ac);
} }
if ((Boolean) panel.element_values[PANEL_DISPLAY_MINIMIZE].parsed_value) if ((intptr_t) panel.element_values[PANEL_DISPLAY_MINIMIZE].parsed_value)
{ {
panel.iconify = panel.iconify =
PanelControlCreate (panel.form, "minimize", minimize_normal_image); PanelControlCreate (panel.form, "minimize", minimize_normal_image);
@ -430,7 +430,7 @@ Initialize (DtPanelShellWidget panel_shell)
XFreePixmap (display, busy_pixmap_mask); XFreePixmap (display, busy_pixmap_mask);
panel.resolution = (int) panel.element_values[PANEL_RESOLUTION].parsed_value; panel.resolution = (int) (intptr_t) panel.element_values[PANEL_RESOLUTION].parsed_value;
/* Extract and validate resolution. */ /* Extract and validate resolution. */
@ -802,7 +802,7 @@ BoxCreate ()
XtSetArg (al[ac], XmNbottomOffset, 0); ac++; XtSetArg (al[ac], XmNbottomOffset, 0); ac++;
switch_position = switch_position =
(int) box_data->switch_data->element_values[SWITCH_POSITION_HINTS].parsed_value; (intptr_t) box_data->switch_data->element_values[SWITCH_POSITION_HINTS].parsed_value;
/* Determine if the defined switch position is actually the */ /* Determine if the defined switch position is actually the */
@ -812,7 +812,7 @@ BoxCreate ()
{ {
for (j = 0; j < box_data->control_data_count; j++) for (j = 0; j < box_data->control_data_count; j++)
{ {
if (switch_position < (int) ((box_data->control_data[j])->element_values[CONTROL_POSITION_HINTS].parsed_value)) if (switch_position < (intptr_t) ((box_data->control_data[j])->element_values[CONTROL_POSITION_HINTS].parsed_value))
break; break;
} }
@ -1369,7 +1369,7 @@ MainControlCreate (int switch_position)
for (j = 0; j < box_data->control_data_count; j++) for (j = 0; j < box_data->control_data_count; j++)
{ {
if (switch_position < if (switch_position <
(int) ((box_data->control_data[j])->element_values[CONTROL_POSITION_HINTS].parsed_value)) (intptr_t) ((box_data->control_data[j])->element_values[CONTROL_POSITION_HINTS].parsed_value))
{ {
ControlCreate (box_data->left_control_form, ControlCreate (box_data->left_control_form,
&box_data->control_data[0], j); &box_data->control_data[0], j);
@ -1439,7 +1439,7 @@ ControlSetVisualData (ControlData * control_data,
else else
{ {
if (control_data != NULL && if (control_data != NULL &&
(char) control_data->element_values[CONTROL_TYPE].parsed_value == (intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value ==
CONTROL_CLOCK) CONTROL_CLOCK)
{ {
if (panel.color_use != XmCO_BLACK_WHITE) if (panel.color_use != XmCO_BLACK_WHITE)
@ -1470,7 +1470,7 @@ ControlSetVisualData (ControlData * control_data,
XtSetArg (al[*ac], XmNbottomShadowColor, panel.primary_pixel_set->bs);(*ac)++; XtSetArg (al[*ac], XmNbottomShadowColor, panel.primary_pixel_set->bs);(*ac)++;
XtSetArg (al[*ac], XmNselectColor, panel.primary_pixel_set->sc); (*ac)++; XtSetArg (al[*ac], XmNselectColor, panel.primary_pixel_set->sc); (*ac)++;
if ((char) control_data->element_values[CONTROL_TYPE].parsed_value == if ((intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value ==
CONTROL_DATE) CONTROL_DATE)
{ {
/* /*
@ -1564,7 +1564,7 @@ ControlSetIconData (Widget parent,
/* If this is not a subpanel control and the keyword is is set so that */ /* If this is not a subpanel control and the keyword is is set so that */
/* labels are not to be displayed, set the string resource to NULL. */ /* labels are not to be displayed, set the string resource to NULL. */
if (container_type != SUBPANEL && (Boolean) if (container_type != SUBPANEL && (intptr_t)
panel.element_values[PANEL_DISPLAY_CONTROL_LABELS].parsed_value == False) panel.element_values[PANEL_DISPLAY_CONTROL_LABELS].parsed_value == False)
{ {
XtSetArg (al[*ac], XmNstring, NULL); (*ac)++; XtSetArg (al[*ac], XmNstring, NULL); (*ac)++;
@ -1575,7 +1575,7 @@ ControlSetIconData (Widget parent,
(char *) control_data->element_values[CONTROL_LABEL].parsed_value; (char *) control_data->element_values[CONTROL_LABEL].parsed_value;
if ((int) control_data->element_values[CONTROL_TYPE].parsed_value if ((intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value
!= CONTROL_BLANK) != CONTROL_BLANK)
{ {
if (control_label != NULL) if (control_label != NULL)
@ -1655,7 +1655,7 @@ ControlSetBehavior (ControlData * control_data,
} }
if (panel.resolution == HIGH && if (panel.resolution == HIGH &&
(char) control_data->element_values[CONTROL_CONTAINER_TYPE].parsed_value == BOX && (intptr_t) control_data->element_values[CONTROL_CONTAINER_TYPE].parsed_value == BOX &&
in_subpanel == False) in_subpanel == False)
margin_width = 5; margin_width = 5;
else else
@ -1672,7 +1672,7 @@ ControlSetBehavior (ControlData * control_data,
/* Switch on the controls control type to set the behaviors */ /* Switch on the controls control type to set the behaviors */
/* specific to the individual control types. */ /* specific to the individual control types. */
switch ((char) control_data->element_values[CONTROL_TYPE].parsed_value) switch ((intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value)
{ {
case CONTROL_BLANK: case CONTROL_BLANK:
{ {
@ -1704,11 +1704,11 @@ ControlSetBehavior (ControlData * control_data,
XtSetArg (al[*ac], XmNmarginWidth, margin_width); (*ac)++; XtSetArg (al[*ac], XmNmarginWidth, margin_width); (*ac)++;
if ((char) control_data->element_values[CONTROL_MONITOR_TYPE].parsed_value == MONITOR_NONE) if ((intptr_t) control_data->element_values[CONTROL_MONITOR_TYPE].parsed_value == MONITOR_NONE)
{ {
XtSetArg (al[*ac], XmNcontrolType, XmCONTROL_BUTTON); (*ac)++; XtSetArg (al[*ac], XmNcontrolType, XmCONTROL_BUTTON); (*ac)++;
} }
else if ((char) control_data->element_values[CONTROL_MONITOR_TYPE].parsed_value == MONITOR_FILE) else if ((intptr_t) control_data->element_values[CONTROL_MONITOR_TYPE].parsed_value == MONITOR_FILE)
{ {
String file_name; String file_name;
@ -1718,7 +1718,7 @@ ControlSetBehavior (ControlData * control_data,
XtSetArg (al[*ac], XmNfileName, *expanded_file_name); (*ac)++; XtSetArg (al[*ac], XmNfileName, *expanded_file_name); (*ac)++;
XtSetArg (al[*ac], XmNcontrolType, XmCONTROL_MONITOR); (*ac)++; XtSetArg (al[*ac], XmNcontrolType, XmCONTROL_MONITOR); (*ac)++;
} }
else if ((char) control_data->element_values[CONTROL_MONITOR_TYPE].parsed_value == MONITOR_MAIL) else if ((intptr_t) control_data->element_values[CONTROL_MONITOR_TYPE].parsed_value == MONITOR_MAIL)
{ {
String file_name; String file_name;
@ -1869,17 +1869,17 @@ ControlCreateAndRegister (Widget parent,
/* Create either a normal control or a clock */ /* Create either a normal control or a clock */
if ((int) control_data->element_values[CONTROL_TYPE].parsed_value if ((intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value
== CONTROL_CLOCK) == CONTROL_CLOCK)
icon = DtCreateClock (parent, "icon", al, ac); icon = DtCreateClock (parent, "icon", al, ac);
else else
icon = _DtCreateControl (parent, "icon", al, ac); icon = _DtCreateControl (parent, "icon", al, ac);
if ((int)control_data->element_values[CONTROL_TYPE].parsed_value if ((intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value
== CONTROL_DATE && == CONTROL_DATE &&
(control_data->subpanel_data == NULL || main_copy) && (control_data->subpanel_data == NULL || main_copy) &&
(main_copy || (main_copy ||
(int)control_data->element_values[CONTROL_CONTAINER_TYPE].parsed_value (intptr_t)control_data->element_values[CONTROL_CONTAINER_TYPE].parsed_value
== SUBPANEL)) == SUBPANEL))
{ {
format = nl_langinfo(D_FMT); format = nl_langinfo(D_FMT);
@ -1916,7 +1916,7 @@ ControlCreateAndRegister (Widget parent,
if (control_data->element_values[CONTROL_DROP_ACTION].parsed_value if (control_data->element_values[CONTROL_DROP_ACTION].parsed_value
!= NULL) != NULL)
{ {
if ((int)control_data->element_values[CONTROL_TYPE].parsed_value == if ((intptr_t)control_data->element_values[CONTROL_TYPE].parsed_value ==
CONTROL_FILE) CONTROL_FILE)
{ {
if (control_data->is_action) if (control_data->is_action)
@ -1969,10 +1969,10 @@ ControlCreateAndRegister (Widget parent,
if (!main_copy) if (!main_copy)
{ {
if ((Boolean) control_data->element_values[CONTROL_PUSH_RECALL].parsed_value) if ((intptr_t) control_data->element_values[CONTROL_PUSH_RECALL].parsed_value)
PushRecallRegister (control_data, True); PushRecallRegister (control_data, True);
if ((char) control_data->element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT) if ((intptr_t) control_data->element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT)
EmbeddedClientRegister (control_data, True); EmbeddedClientRegister (control_data, True);
} }
@ -2075,7 +2075,7 @@ SwitchCreate (BoxData * box_data)
} }
panel.switch_row_count = panel.switch_row_count =
(int) (switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value); (int) (intptr_t) (switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value);
switch_data->buttons = switch_data->buttons =
(Widget *) XtMalloc (sizeof (Widget *) * switch_count); (Widget *) XtMalloc (sizeof (Widget *) * switch_count);
@ -2643,7 +2643,7 @@ ArrowCreate (Widget parent,
} }
else else
{ {
if ((int) (control_data[i]-> if ((intptr_t) (control_data[i]->
element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE)
{ {
if (CheckOtherMonitorsOn(control_data[i]->subpanel_data)) if (CheckOtherMonitorsOn(control_data[i]->subpanel_data))
@ -2820,7 +2820,7 @@ SubpanelCreate (ControlData * main_control_data,
/* the drop zone as the top child of the form */ /* the drop zone as the top child of the form */
control_install = control_install =
(Boolean) subpanel_data->element_values[SUBPANEL_CONTROL_INSTALL].parsed_value; (Boolean) (intptr_t) subpanel_data->element_values[SUBPANEL_CONTROL_INSTALL].parsed_value;
if (control_install) if (control_install)
{ {
@ -2897,7 +2897,7 @@ SubpanelCreate (ControlData * main_control_data,
/* have monitor files attached to them. If so, the constraints */ /* have monitor files attached to them. If so, the constraints */
/* for the form need to be set appropriately. */ /* for the form need to be set appropriately. */
if ((int) (main_control_data-> if ((intptr_t) (main_control_data->
element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE)
monitor = True; monitor = True;
@ -2905,7 +2905,7 @@ SubpanelCreate (ControlData * main_control_data,
{ {
for (i = 0; i < subpanel_data->control_data_count; i++) for (i = 0; i < subpanel_data->control_data_count; i++)
{ {
if ((int) (subpanel_data->control_data[i]-> if ((intptr_t) (subpanel_data->control_data[i]->
element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE)
{ {
monitor = True; monitor = True;
@ -3085,7 +3085,7 @@ SubpanelControlCreate (SubpanelData * subpanel_data,
/* If there is a monitor file, create the indicator */ /* If there is a monitor file, create the indicator */
if ((int) (control_data-> if ((intptr_t) (control_data->
element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value) != MONITOR_NONE)
{ {
ac = ac_save; ac = ac_save;
@ -3792,7 +3792,7 @@ DeleteSubpanelControl (SubpanelData * subpanel_data,
for (j = 0; j < subpanel_data->control_data_count; j++) for (j = 0; j < subpanel_data->control_data_count; j++)
{ {
if ((int) subpanel_data->control_data[j]-> if ((intptr_t) subpanel_data->control_data[j]->
element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE)
{ {
control_monitor = True; control_monitor = True;
@ -3800,7 +3800,7 @@ DeleteSubpanelControl (SubpanelData * subpanel_data,
} }
} }
if ((int) main_control_data-> if ((intptr_t) main_control_data->
element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE) element_values[CONTROL_MONITOR_TYPE].parsed_value != MONITOR_NONE)
{ {
control_monitor = True; control_monitor = True;
@ -3901,15 +3901,15 @@ ToggleDefaultControl (ControlData * main_control_data,
control_icon = main_control_data->icon; control_icon = main_control_data->icon;
main_control_data->icon = subpanel_data->main_panel_icon_copy; main_control_data->icon = subpanel_data->main_panel_icon_copy;
if ((Boolean) main_control_data->element_values[CONTROL_PUSH_RECALL].parsed_value) if ((intptr_t) main_control_data->element_values[CONTROL_PUSH_RECALL].parsed_value)
PushRecallRegister (main_control_data, True); PushRecallRegister (main_control_data, True);
if ((char) main_control_data->element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT) if ((intptr_t) main_control_data->element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT)
EmbeddedClientRegister (main_control_data, True); EmbeddedClientRegister (main_control_data, True);
main_control_data->icon = control_icon; main_control_data->icon = control_icon;
if ((char) main_control_data-> if ((intptr_t) main_control_data->
element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT) element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT)
{ {
EmbeddedClientReparent ((char *) main_control_data-> EmbeddedClientReparent ((char *) main_control_data->
@ -3919,13 +3919,13 @@ ToggleDefaultControl (ControlData * main_control_data,
} }
else else
{ {
if ((Boolean) subpanel_data->default_control->element_values[CONTROL_PUSH_RECALL].parsed_value) if ((intptr_t) subpanel_data->default_control->element_values[CONTROL_PUSH_RECALL].parsed_value)
PushRecallRegister (subpanel_data->default_control, True); PushRecallRegister (subpanel_data->default_control, True);
if ((char) subpanel_data->default_control->element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT) if ((intptr_t) subpanel_data->default_control->element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT)
EmbeddedClientRegister (subpanel_data->default_control, True); EmbeddedClientRegister (subpanel_data->default_control, True);
if ((char) subpanel_data->default_control-> if ((intptr_t) subpanel_data->default_control->
element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT) element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT)
{ {
EmbeddedClientReparent ((char *) subpanel_data->default_control-> EmbeddedClientReparent ((char *) subpanel_data->default_control->
@ -4037,7 +4037,7 @@ ToggleDefaultControl (ControlData * main_control_data,
/* If this is a toggle of a client control from the subpanel to */ /* If this is a toggle of a client control from the subpanel to */
/* the main panel, call the reparenting function. */ /* the main panel, call the reparenting function. */
if ((char) control_data-> if ((intptr_t) control_data->
element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT) element_values[CONTROL_TYPE].parsed_value == CONTROL_CLIENT)
{ {
EmbeddedClientReparent ((char *) control_data-> EmbeddedClientReparent ((char *) control_data->

View file

@ -224,7 +224,7 @@ EmbeddedClientRegister (ControlData * control_data,
WmFpEmbeddedClientData * embedded_client = NULL; WmFpEmbeddedClientData * embedded_client = NULL;
if ((char) control_data-> if ((intptr_t) control_data->
element_values[CONTROL_TYPE].parsed_value != CONTROL_CLIENT) element_values[CONTROL_TYPE].parsed_value != CONTROL_CLIENT)
return; return;