Position x, y;
Dimension width, height;
Dimension p_width, p_height;
- int gridpos;
+ long gridpos;
if ((attachments = obj->attachments) == NULL)
return -1;
PropOptionsSetting objlist_setting,
int offset_value,
int position_value,
- int objlist_value
+ XtPointer objlist_value
);
static void change_attach_type(
PropOptionsSetting objlist_setting,
int offset_value,
int position_value,
- int objlist_value
+ XtPointer objlist_value
)
{
switch (attach_type)
/*
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;
*/
set_attach_values(attach_type,
offset_setting, position_setting, objlist_setting,
- offset, position, (int)attach_obj);
+ offset, position, (XtPointer)attach_obj);
}
*/
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);
}
}
&offset, &position);
set_attach_values(attach_type,
offset_setting, position_setting, objlist_setting,
- offset, position, (int)attach_obj);
+ offset, position, (XtPointer)attach_obj);
}
}
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
);
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
);
)
{
register int i;
- int si;
+ long si;
static char conn_string[BUFSIZ];
char buf[BUFSIZ];
AB_ACTION_INFO *action_info;
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))
{
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;
int source_subtype
)
{
- int i;
+ long i;
int n;
ConnObj *src_conn_obj;
int target_subtype
)
{
- int i;
+ long i;
int n;
ConnObj *trg_conn_obj;
return(0);
}
-extern int
+extern long
connP_obj_enabled(
AB_OBJECT_TYPE obj_type,
int obj_subtype
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];
XtPointer call_data
)
{
- int i;
+ long i;
Widget w;
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;
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;
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);
}
}
)
{
XmString xm_label_str;
- int i = 0;
+ long i = 0;
BOOL found = FALSE;
connP_set_action_type(AB_FUNC_BUILTIN);
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();
}
/* 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);
}
/* 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);
}
/* 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);
}
/* 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);
}
/* 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);
/* ARGSUSED */
+int
main(int argc, STRING *argv)
{
int exitValue = 0;
{
fileName = strlist_get_str(fileNames, i, &wasFoundVoidPtr);
assert(fileName != NULL);
- wasFound = (BOOL)(unsigned)wasFoundVoidPtr;
+ wasFound = (BOOL)(unsigned long)wasFoundVoidPtr;
if (!wasFound)
{
util_printf_err("module not found in project: %s\n", fileName);
#define mfobj_set_proj_data(_obj,_data) \
( mfobj_set_flags(_obj, CGenFlagDataIsProj), \
- ((int)(mfobj_data(_obj)->info.proj = (_data))) \
+ ((long)(mfobj_data(_obj)->info.proj = (_data))) \
)
#define mfobj_get_proj_data(obj) \
BOOL foundEm = FALSE;
*wClassOut = NULL;
- *resValueOut = NULL;
+ *resValueOut = 0;
if (wClass == NULL)
{
assert(project != NULL);
if (project == NULL)
{
- return NULL;
+ return 0;
}
for (trav_open(&trav, projOrModule, AB_TRAV_ACTIONS_FOR_OBJ);
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
/* OSF/1 define va_list in <va_list.h> as structure of char ** and int
* Sun define va_list as void * */
- va_list paramList = { NULL, 0 };
+ va_list paramList = { 0, 0 };
#else
va_list paramList = NULL;
#endif /* __osf__ */
/*
* Store ABObj reference in uil widget node
*/
- uil_widget->header.user_data = (int)ab_widget;
+ uil_widget->header.user_data = (long)ab_widget;
/*
* Populate arguments and callbacks
/*
* Store ABObj reference in uil widget node
*/
- uil_widget->header.user_data = (int)ab_widget;
+ uil_widget->header.user_data = (long)ab_widget;
}
AttachmentContext *attach_context = (AttachmentContext *)context;
STRING attach_str;
AB_ATTACH_TYPE att_type;
- int att_pos = 0, att_off = 0, offset = 0;
+ long att_pos = 0, att_off = 0, offset = 0;
void *value = NULL;
BOOL need_val = TRUE;
ObjRef *obj_ref;
XtPointer res_value
)
{
- if(obj_set_num_rows(obj,(int)res_value)) return(FALSE);
+ if(obj_set_num_rows(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_num_columns(obj,(int)res_value)) return(FALSE);
+ if(obj_set_num_columns(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_max_value(obj,(int)res_value)) return(FALSE);
+ if(obj_set_max_value(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_min_value(obj,(int)res_value)) return(FALSE);
+ if(obj_set_min_value(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_num_columns(obj,(int)res_value)) return(FALSE);
+ if(obj_set_num_columns(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_max_length(obj,(int)res_value)) return(FALSE);
+ if(obj_set_max_length(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_pane_max(obj,(int)res_value)) return(FALSE);
+ if(obj_set_pane_max(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_pane_min(obj,(int)res_value)) return(FALSE);
+ if(obj_set_pane_min(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_initial_value_int(obj,(int)res_value)) return(FALSE);
+ if(obj_set_initial_value_int(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_increment(obj,(int)res_value)) return(FALSE);
+ if(obj_set_increment(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
XtPointer res_value
)
{
- if(obj_set_decimal_points(obj,(int)res_value)) return(FALSE);
+ if(obj_set_decimal_points(obj,(long)res_value)) return(FALSE);
else return(TRUE);
}
get_charset_text(az_value_entry->b_charset));
else
printf(" font charset: userdefined(%x)",
- get_charset_text((int) az_value_entry->az_charset_value));
+ get_charset_text((long) az_value_entry->az_charset_value));
goto check_for_table_value;
/*
* Compares to entries (for qsort)
*/
-static int
+static long
bil_token_entry_compare(const void *leftEntry, const void *rightEntry)
{
- return ((int)(((BilTokenIndexEntry)leftEntry)->string))
- - ((int)(((BilTokenIndexEntry)rightEntry)->string));
+ return ((long)(((BilTokenIndexEntry)leftEntry)->string))
+ - ((long)(((BilTokenIndexEntry)rightEntry)->string));
}
/*
* Compares a key to an entry (for bsearch)
*/
-static int
+static long
bil_token_key_compare(const void *voidIstr, const void *voidEntry)
{
- return ((int)((ISTRING)(voidIstr)))
- - ((int)(((BilTokenIndexEntry)voidEntry)->string));
+ return ((long)((ISTRING)(voidIstr)))
+ - ((long)(((BilTokenIndexEntry)voidEntry)->string));
}
bilP_string_to_token(STRING strToken)
{
ISTRING istrToken = istr_create(strToken);
- register int midDiff;
- register int midIndex;
- int minIndex, maxIndex;
+ register long midDiff;
+ register long midIndex;
+ long minIndex, maxIndex;
bil_token_table_check_init();
/*
while (minIndex < maxIndex)
{
midIndex = ((minIndex + maxIndex)>>1);
- midDiff = (((int)bil_token_table_index[midIndex].string)
- - ((int)istrToken));
+ midDiff = (((long)bil_token_table_index[midIndex].string)
+ - ((long)istrToken));
if (midDiff < 0)
{
/* mid is too small - take upper half */
{
ABObj target = NULL;
STRING name = NULL;
- int value = 0;
+ long value = 0;
AB_COMPASS_POINT cp = AB_CP_UNDEF;
util_dprintf(3, "bilP_load_attachment_value: %d/%s\n\t%d/%s\n",
{
AB_ARG_TYPE type = AB_ARG_UNDEF;
- if ((type = obj_get_arg_type(obj)) != NULL)
+ if ((type = obj_get_arg_type(obj)) != 0)
{
switch (type)
{
break;
case AB_ATTACH_GRIDLINE:
case AB_ATTACH_CENTER_GRIDLINE:
- abio_put_integer(outFile, (int)obj_get_attach_value(obj, AB_CP_NORTH));
+ abio_put_integer(outFile, (long)obj_get_attach_value(obj, AB_CP_NORTH));
break;
case AB_ATTACH_POINT:
case AB_ATTACH_NONE:
break;
case AB_ATTACH_GRIDLINE:
case AB_ATTACH_CENTER_GRIDLINE:
- abio_put_integer(outFile, (int)obj_get_attach_value(obj, AB_CP_SOUTH));
+ abio_put_integer(outFile, (long)obj_get_attach_value(obj, AB_CP_SOUTH));
break;
default:
abio_put_integer(outFile, 0);
break;
case AB_ATTACH_GRIDLINE:
case AB_ATTACH_CENTER_GRIDLINE:
- abio_put_integer(outFile, (int)obj_get_attach_value(obj, AB_CP_EAST));
+ abio_put_integer(outFile, (long)obj_get_attach_value(obj, AB_CP_EAST));
break;
default:
abio_put_integer(outFile, 0);
break;
case AB_ATTACH_GRIDLINE:
case AB_ATTACH_CENTER_GRIDLINE:
- abio_put_integer(outFile, (int)obj_get_attach_value(obj, AB_CP_WEST));
+ abio_put_integer(outFile, (long)obj_get_attach_value(obj, AB_CP_WEST));
break;
default:
abio_put_integer(outFile, 0);
attr = gilP_string_to_att(istr_string(keyword));
if ((rc = gilP_load_attribute_value(
- inFile, obj, attr, parent)) != NULL)
+ inFile, obj, attr, parent)) != 0)
{
return_value = rc;
goto epilogue;
if (!obj_is_action(obj))
{
member_error(obj, "to");
- return NULL;
+ return 0;
}
obj->info.action.to = to;
return 0;
if (!obj_is_action(obj))
{
member_error(obj, "from");
- return NULL;
+ return 0;
}
obj->info.action.from = from;
return 0;
if (obj->type != AB_TYPE_ACTION)
{
member_error(obj, "when");
- return NULL;
+ return 0;
}
obj->info.action.when = when;
return 0;
default:
if (util_get_verbosity() > 0)
fprintf(stderr, "obj_get_attach_offset: invalid direction\n");
- return NULL;
+ return 0;
}
}
obj->info.message.help_button = has_button;
return 0;
}
+
+int
obj_set_tooltalk_level(ABObj obj, AB_TOOLTALK_LEVEL tt_level)
{
verify_for_write(obj);
((((_list)->user_datas == NULL) && ((_data) != NULL))? \
objlistP_build_user_data_array(_list, _index, _data) \
: \
- ((int)((_list)->user_datas[(_index)] = (_data))) \
+ ((long)((_list)->user_datas[(_index)] = (_data))) \
)
*/
: \
objlistP_build_user_data_array(_list, _index, _data)) \
: \
- ((int)((_list)->user_datas[(_index)] = (_data))) \
+ ((long)((_list)->user_datas[(_index)] = (_data))) \
)
#define objlistP_get_user_data(_list,_index) \
*/
if (list->unique)
{
- int index = objlist_get_obj_index(list, obj);
+ long index = objlist_get_obj_index(list, obj);
if (index >= 0)
{
objlistP_add_user_data(list, index, clientData);
}
if (names == NULL)
{
- return NULL;
+ return 0;
}
for (trav_open(&trav, tree, AB_TRAV_ALL);
}
if (names == NULL)
{
- return NULL;
+ return 0;
}
for (trav_open(&trav, tree, AB_TRAV_ALL);
moduleNameEndChar = *moduleNameEndPtr;
*moduleNameEndPtr = 0;
}
- while (((*objNamePtr) != NULL) && (isspace(*objNamePtr)))
+ while (((*objNamePtr) != 0) && (isspace(*objNamePtr)))
{
++objNamePtr;
}
{
return FALSE;
}
- for (cp = ident; *cp != NULL; ++cp)
+ for (cp = ident; *cp != 0; ++cp)
{
if (isspace(*cp))
{
moduleNameEndChar = *module_name_end_ptr;
*module_name_end_ptr = 0;
}
- while (((*obj_name_ptr) != NULL) && (isspace(*obj_name_ptr)))
+ while (((*obj_name_ptr) != 0) && (isspace(*obj_name_ptr)))
{
++obj_name_ptr;
}
obj_name, (_fieldName)))
#define check_str(obj, _field) \
- ( ((int)(last_field = #_field)), \
+ ( ((long)(last_field = #_field)), \
(istr_verify(obj->_field) >= 0)? \
(0) \
: \
case AB_ARG_WIDGET:
if (cgen_args)
{
- util_dprintf(0,"%s ", args[i].value != NULL?
+ util_dprintf(0,"%s ", args[i].value != 0?
istr_string((ISTRING)(args[i].value)) : "NULL");
}
else
*/
typedef struct
{
- int rec_num; /* record # (offset) in table */
+ long rec_num; /* record # (offset) in table */
} TableIndexEntryRec, *TableIndexEntry, *TableIndex;
ISTRING strdef
)
{
- unsigned char xmdef = NULL;
+ unsigned char xmdef = 0;
int i;
ObjxmEnumTable *enum_table = NULL;
ISTRING istr_xmname = istr_dup_existing(xmname);
}
-static int
+static long
xm_res_table_entry_xmname_compare(const void *leftEntry, const void *rightEntry)
{
return
- ((int)xm_res_table[((TableIndexEntry)leftEntry)->rec_num].xmname)
- - ((int)xm_res_table[((TableIndexEntry)rightEntry)->rec_num].xmname);
+ ((long)xm_res_table[((TableIndexEntry)leftEntry)->rec_num].xmname)
+ - ((long)xm_res_table[((TableIndexEntry)rightEntry)->rec_num].xmname);
}
midIndex = ((minIndex + maxIndex)>>1);
entry = get_indexed_entry(
xm_res_table,xm_res_table_xmname_index,midIndex);
- midDiff = ((int)(entry->xmname)) - ((int)istr_xmname);
+ midDiff = ((long)(entry->xmname)) - ((long)istr_xmname);
if (midDiff < 0)
{
/* mid is too small - take upper half */
String colorname
)
{
- static Colormap colormap = NULL;
+ static Colormap colormap = 0;
static Display *display = NULL;
XColor color;
XColor exact_color;
if (util_strempty(filebase))
return ERR_BAD_PARAM2;
- *pixmap_p = NULL;
+ *pixmap_p = 0;
/* Use Pixmap conversion callback if it exists */
if (ObjxmP_filename_to_pixmap_cb != NULL)
Pixel fgPixel = 0;
Pixel bgPixel = 0;
- *pixmap_p = NULL;
+ *pixmap_p = 0;
/*
* Get default values
* In CDE, XmGetPixmap handles .xpm files, as well.
*/
*pixmap_p = XmGetPixmap(screen, filename, fgPixel, bgPixel);
- if ((*pixmap_p == NULL) || (*pixmap_p == XmUNSPECIFIED_PIXMAP))
+ if ((*pixmap_p == 0) || (*pixmap_p == XmUNSPECIFIED_PIXMAP))
{
return -1;
}
*/
STRING Istr_null_string= "(nil)";
STRN *int_array= NULL; /* unique number array */
-int num_count = 1; /* unique number counter */
+long num_count = 1; /* unique number counter */
static BucketRec hashtable[NUMBUCKETS];
/* comment at top of this file) */
#endif /* DEBUG */
-static int *freelist; /* freelist for unused numbers */
+static long *freelist; /* freelist for unused numbers */
-static int freecount = 0; /* freelist count */
-static int hash_count = 0; /* total number that has been inserted */
+static long freecount = 0; /* freelist count */
+static long hash_count = 0; /* total number that has been inserted */
static unsigned hashing(
char *p
#define int_array_set(ptr) (int_array = (ptr))
#endif
#define istrP_int_to_client(intVal) ((ISTRING)(intVal))
-#define istrP_client_to_int(istrVal) ((int)(istrVal))
+#define istrP_client_to_int(istrVal) ((long)(istrVal))
#define return_istr(x) return istrP_int_to_client(x)
/*****************************************************************************/
)
{
int hashval;
- int str_exists;
+ long str_exists;
Bucket new_bucket;
int i;
Bucket entry;
)
{
int hashval;
- int str_exists;
+ long str_exists;
Bucket new_bucket;
int i;
Bucket entry;
)
{
int hashval;
- int str_exists;
+ long str_exists;
Bucket new_bucket;
int i;
Bucket entry;
)
{
int hashval;
- int str_exists;
+ long str_exists;
if (string == NULL)
{
ISTRING *istringClientPtr
)
{
- int istring = (int)(*istringClientPtr);
+ long istring = (long)(*istringClientPtr);
int val; /* hashing value */
int i;
Bucket entry;
(int_array[istring].read_const == 0)))
{
istrP_errmsg_noexist(istring);
- return NULL;
+ return 0;
}
if (int_array[istring].read_const == 1) /* const entry */
{
/* put unused int_array location of the freelist */
if(free_num == 0)
{
- freelist = (int *)malloc(ARRAYSIZE * sizeof(int));
+ freelist = (long *)malloc(ARRAYSIZE * sizeof(long));
if (freelist == NULL)
{
fprintf(stderr,
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
- return NULL ;
+ return 0 ;
}
free_num = 1;
}
else /* need more freelist space */
{
free_num++;
- freelist = (int *)realloc(freelist,
- (ARRAYSIZE * free_num) * sizeof(int));
+ freelist = (long *)realloc(freelist,
+ (ARRAYSIZE * free_num) * sizeof(long));
assert(freelist != NULL);
if (freelist == NULL)
{
fprintf(stderr,
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
- return NULL ;
+ return 0 ;
}
freelist[freecount] = istring;
freecount++;
/*
* Set the client's variable to NULL
*/
- istring = NULL;
+ istring = 0;
(*istringClientPtr) = istrP_int_to_client(istring);
return 1;
}
ISTRING istringClientVal
)
{
- int istring= istrP_client_to_int(istringClientVal);
+ long istring= istrP_client_to_int(istringClientVal);
if(istring == 0)
{
ISTRING istringClientVal
)
{
- int istring = istrP_client_to_int(istringClientVal);
+ long istring = istrP_client_to_int(istringClientVal);
if(istring == 0)
{
if(hash_count == 0)
{
- int_array_set((STRN *)malloc(ARRAYSIZE * sizeof(STRN)));
+ int_array_set((STRN *)calloc(ARRAYSIZE, sizeof(STRN)));
if (int_array == NULL)
{
fprintf(stderr,
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
- return NULL ;
+ return 0 ;
}
array_num = 1;
}
fprintf(stderr,
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
"ISTR: error in allocating memory\n") );
- return NULL ;
+ return 0 ;
}
int_array[val].refcount =1;
if (flag == 1)
((((_list)->user_datas == NULL) && ((_data) != NULL))? \
strlistP_build_user_data_array(_list, _index, _data) \
: \
- ((int)((_list)->user_datas[(_index)] = (_data))) \
+ ((long)((_list)->user_datas[(_index)] = (_data))) \
)
}
-int
+long
strlist_set_istr_data(StringList list, ISTRING istring, void *data)
{
- int index = strlist_get_istr_index(list, istring);
+ long index = strlist_get_istr_index(list, istring);
if (index < 0)
{
return index;
/*
* Returns the index of the given string, or -1 if it doesn't exist
*/
-int
+long
strlist_get_istr_index(StringList list, ISTRING string)
{
- int index = -1;
+ long index = -1;
int i = 0;
int num_strings = list->num_strings;
}
-int
+long
strlist_remove_istr(StringList list, ISTRING istring)
{
- int index = strlist_get_istr_index(list, istring);
+ long index = strlist_get_istr_index(list, istring);
if (index < 0)
{
return 0;
}
-int
+long
strlist_get_str_index(StringList list, STRING string)
{
- int index = -1;
+ long index = -1;
ISTRING istring = istr_create(string);
if (istring != NULL)
{
}
-int
+long
strlist_remove_str(StringList list, STRING string)
{
- int return_value = 0;
+ long return_value = 0;
ISTRING istring = istr_dup_existing(string);
if (istring != NULL)
{
}
-int
+long
strlist_set_str_data(StringList list, STRING string, void *data)
{
- int return_value = 0;
+ long return_value = 0;
ISTRING istring = istr_dup_existing(string);
if (istring != NULL)
{
**************************************************************************/
+int
strlistP_shrink_array(StringList list, int sizeDiff)
{
int return_value = 0;
* STRING interfaces
*/
int strlist_add_str(StringList, STRING s, void *userData);
-int strlist_remove_str(StringList, STRING s);
+long strlist_remove_str(StringList, STRING s);
BOOL strlist_str_exists(StringList list, STRING s);
-int strlist_get_str_index(StringList list, STRING s);
+long strlist_get_str_index(StringList list, STRING s);
STRING strlist_get_str(StringList,
int whichString, void **userDataOut);
-int strlist_set_str_data(StringList, STRING string, void *data);
+long strlist_set_str_data(StringList, STRING string, void *data);
void *strlist_get_str_data(StringList, STRING string);
StringList strlist_dup(StringList);
* The STRINGs and ISTRING are kept in the same list, and behave identically
*/
int strlist_add_istr(StringList, ISTRING s, void *userData);
-int strlist_add_index_istr(StringList,
+long strlist_add_index_istr(StringList,
int index, ISTRING s, void *userData);
BOOL strlist_istr_exists(StringList list, ISTRING s);
-int strlist_get_istr_index(StringList list, ISTRING s);
+long strlist_get_istr_index(StringList list, ISTRING s);
ISTRING strlist_get_istr(StringList,
int whichString, void **userDataOut);
-int strlist_set_istr_data(StringList, ISTRING istring, void *data);
+long strlist_set_istr_data(StringList, ISTRING istring, void *data);
void *strlist_get_istr_data(StringList, ISTRING istring);
-int strlist_remove_istr(StringList, ISTRING s);
+long strlist_remove_istr(StringList, ISTRING s);
#endif /* _ABUTIL_STRLIST_H_ */