WIP to make dtbuilder work on 64bit.
Fixes many, though not all 64bit-warnings. In lots of places, pointers are cast to ints to be then used as array subscripts. The only way to deal with this is to change them to long. Additionally, use calloc() to allocate the int_array in istr.c and drop the (wrong) macro patch to istr.h. Should make dtbuilder work on 32bit again.
This commit is contained in:
committed by
Jon Trulson
parent
50e6c86bf4
commit
1177e21080
@@ -110,7 +110,7 @@ abobj_calculate_new_layout(
|
||||
Position x, y;
|
||||
Dimension width, height;
|
||||
Dimension p_width, p_height;
|
||||
int gridpos;
|
||||
long gridpos;
|
||||
|
||||
if ((attachments = obj->attachments) == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -258,7 +258,7 @@ static void set_attach_values(
|
||||
PropOptionsSetting objlist_setting,
|
||||
int offset_value,
|
||||
int position_value,
|
||||
int objlist_value
|
||||
XtPointer objlist_value
|
||||
);
|
||||
|
||||
static void change_attach_type(
|
||||
@@ -2642,7 +2642,7 @@ set_attach_values(
|
||||
PropOptionsSetting objlist_setting,
|
||||
int offset_value,
|
||||
int position_value,
|
||||
int objlist_value
|
||||
XtPointer objlist_value
|
||||
)
|
||||
{
|
||||
switch (attach_type)
|
||||
@@ -2945,7 +2945,7 @@ convert_offset_position(
|
||||
/*
|
||||
set_attach_values(attach_type,
|
||||
offset_setting, position_setting, objlist_setting,
|
||||
offset_value, position_value, (int)sibling_obj);
|
||||
offset_value, position_value, (XtPointer)sibling_obj);
|
||||
*/
|
||||
|
||||
*ret_offset = offset_value;
|
||||
@@ -3068,7 +3068,7 @@ change_attach_type(
|
||||
*/
|
||||
set_attach_values(attach_type,
|
||||
offset_setting, position_setting, objlist_setting,
|
||||
offset, position, (int)attach_obj);
|
||||
offset, position, (XtPointer)attach_obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -3263,7 +3263,7 @@ change_opp_attach_type(
|
||||
*/
|
||||
set_attach_values(opp_attach_type,
|
||||
opp_offset_setting, opp_position_setting, opp_objlist_setting,
|
||||
offset, position, (int)attach_obj);
|
||||
offset, position, (XtPointer)attach_obj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3335,7 +3335,7 @@ attach_obj_changed(
|
||||
&offset, &position);
|
||||
set_attach_values(attach_type,
|
||||
offset_setting, position_setting, objlist_setting,
|
||||
offset, position, (int)attach_obj);
|
||||
offset, position, (XtPointer)attach_obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ extern char ** connP_get_when_labels(
|
||||
extern char ** connP_get_act_labels(
|
||||
int *num_labels
|
||||
);
|
||||
extern int connP_get_obj_type_index(
|
||||
extern long connP_get_obj_type_index(
|
||||
AB_OBJECT_TYPE ab_type,
|
||||
int ab_subtype
|
||||
);
|
||||
@@ -181,7 +181,7 @@ extern int connP_objtype_needs_subtype(
|
||||
AB_OBJECT_TYPE obj_type,
|
||||
int obj_subtype
|
||||
);
|
||||
extern int connP_obj_enabled(
|
||||
extern long connP_obj_enabled(
|
||||
AB_OBJECT_TYPE obj_type,
|
||||
int obj_subtype
|
||||
);
|
||||
|
||||
@@ -926,7 +926,7 @@ connP_make_conn_string(
|
||||
)
|
||||
{
|
||||
register int i;
|
||||
int si;
|
||||
long si;
|
||||
static char conn_string[BUFSIZ];
|
||||
char buf[BUFSIZ];
|
||||
AB_ACTION_INFO *action_info;
|
||||
@@ -1041,13 +1041,13 @@ connP_make_conn_string(
|
||||
return(conn_string);
|
||||
}
|
||||
|
||||
extern int
|
||||
extern long
|
||||
connP_get_obj_type_index(
|
||||
AB_OBJECT_TYPE ab_type,
|
||||
int ab_subtype
|
||||
)
|
||||
{
|
||||
register int i;
|
||||
register long i;
|
||||
|
||||
if (connP_objtype_needs_subtype(ab_type, ab_subtype))
|
||||
{
|
||||
@@ -1093,8 +1093,8 @@ connP_guess_when_action(
|
||||
AB_BUILTIN_ACTION *act_ret
|
||||
)
|
||||
{
|
||||
int i = connP_get_obj_type_index(source_type, source_subtype);
|
||||
int j = connP_get_obj_type_index(target_type, target_subtype);
|
||||
long i = connP_get_obj_type_index(source_type, source_subtype);
|
||||
long j = connP_get_obj_type_index(target_type, target_subtype);
|
||||
|
||||
if (ConnP_conn_objs[i].when_list != NULL)
|
||||
*when_ret = ConnP_conn_objs[i].default_when;
|
||||
@@ -1197,7 +1197,7 @@ assign_when_list(
|
||||
int source_subtype
|
||||
)
|
||||
{
|
||||
int i;
|
||||
long i;
|
||||
int n;
|
||||
ConnObj *src_conn_obj;
|
||||
|
||||
@@ -1232,7 +1232,7 @@ assign_action_list(
|
||||
int target_subtype
|
||||
)
|
||||
{
|
||||
int i;
|
||||
long i;
|
||||
int n;
|
||||
ConnObj *trg_conn_obj;
|
||||
|
||||
@@ -1286,7 +1286,7 @@ connP_objtype_needs_subtype(
|
||||
return(0);
|
||||
}
|
||||
|
||||
extern int
|
||||
extern long
|
||||
connP_obj_enabled(
|
||||
AB_OBJECT_TYPE obj_type,
|
||||
int obj_subtype
|
||||
|
||||
@@ -129,7 +129,7 @@ static Widget exec_code_dialog = NULL;
|
||||
static Widget exec_code_textpane = NULL;
|
||||
|
||||
static Widget ConnP_view_source_obj = NULL; /* View:'s "Source Object" PushButton */
|
||||
static int ConnP_view_filter = -1;
|
||||
static long ConnP_view_filter = -1;
|
||||
|
||||
static STRING CodeFragBuf = NULL;
|
||||
static STRING action_type_labels[ACTION_TYPE_NUM_VALUES];
|
||||
@@ -496,7 +496,7 @@ populate_view_menu(
|
||||
XtPointer call_data
|
||||
)
|
||||
{
|
||||
int i;
|
||||
long i;
|
||||
Widget w;
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@ setup_source(
|
||||
ABObj source
|
||||
)
|
||||
{
|
||||
int i = connP_get_obj_type_index(source_type, source_subtype);
|
||||
long i = connP_get_obj_type_index(source_type, source_subtype);
|
||||
|
||||
if (i < 0) return;
|
||||
|
||||
@@ -544,7 +544,7 @@ setup_target(
|
||||
ABObj target
|
||||
)
|
||||
{
|
||||
int i = connP_get_obj_type_index(target_type, target_subtype);
|
||||
long i = connP_get_obj_type_index(target_type, target_subtype);
|
||||
|
||||
if (i < 0) return;
|
||||
|
||||
@@ -949,9 +949,9 @@ set_view_filter(
|
||||
XtPointer call_data
|
||||
)
|
||||
{
|
||||
if (ConnP_view_filter != (int)client_data)
|
||||
if (ConnP_view_filter != (long)client_data)
|
||||
{
|
||||
ConnP_view_filter = (int)client_data;
|
||||
ConnP_view_filter = (long)client_data;
|
||||
populate_connection_list(NULL);
|
||||
}
|
||||
}
|
||||
@@ -1551,7 +1551,7 @@ set_standard_action_type(
|
||||
)
|
||||
{
|
||||
XmString xm_label_str;
|
||||
int i = 0;
|
||||
long i = 0;
|
||||
BOOL found = FALSE;
|
||||
|
||||
connP_set_action_type(AB_FUNC_BUILTIN);
|
||||
@@ -3832,7 +3832,7 @@ update_conn_ed_controls(void)
|
||||
int source_subtype = -1;
|
||||
AB_OBJECT_TYPE target_type = AB_TYPE_UNDEF;
|
||||
int target_subtype = -1;
|
||||
int i = -1, j = -1;
|
||||
long i = -1, j = -1;
|
||||
|
||||
source_type = connP_get_source_type();
|
||||
source_subtype = connP_get_source_subtype();
|
||||
|
||||
@@ -877,7 +877,7 @@ typeCB(
|
||||
}
|
||||
|
||||
/* Set the default button to be Action1 */
|
||||
if ((int)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
|
||||
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
|
||||
{
|
||||
prop_options_set_value(&(mes->default_btn),
|
||||
(XtPointer)AB_DEFAULT_BTN_ACTION1, True);
|
||||
@@ -928,7 +928,7 @@ typeCB(
|
||||
}
|
||||
|
||||
/* Set the default button to be Cancel */
|
||||
if ((int)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_CANCEL)
|
||||
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_CANCEL)
|
||||
{
|
||||
prop_options_set_value(&(mes->default_btn),
|
||||
(XtPointer)AB_DEFAULT_BTN_CANCEL, True);
|
||||
@@ -979,7 +979,7 @@ typeCB(
|
||||
}
|
||||
|
||||
/* Set the default button to be Action2 */
|
||||
if ((int)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION2)
|
||||
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION2)
|
||||
{
|
||||
prop_options_set_value(&(mes->default_btn),
|
||||
(XtPointer)AB_DEFAULT_BTN_ACTION2, True);
|
||||
@@ -1031,7 +1031,7 @@ typeCB(
|
||||
}
|
||||
|
||||
/* Set the default button to be Action1 */
|
||||
if ((int)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
|
||||
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
|
||||
{
|
||||
prop_options_set_value(&(mes->default_btn),
|
||||
(XtPointer)AB_DEFAULT_BTN_ACTION1, True);
|
||||
@@ -1079,7 +1079,7 @@ typeCB(
|
||||
}
|
||||
|
||||
/* Set the default button to be Action1 */
|
||||
if ((int)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
|
||||
if ((XtPointer)prop_options_get_value(&(mes->default_btn)) != AB_DEFAULT_BTN_ACTION1)
|
||||
{
|
||||
prop_options_set_value(&(mes->default_btn),
|
||||
(XtPointer)AB_DEFAULT_BTN_ACTION1, True);
|
||||
|
||||
Reference in New Issue
Block a user