/* allocate our new filter. API claims g_malloc terminates program on failure */
/* my calc for max alloc needed is really +10 but when did a few extra bytes hurt ? */
- previous_filter_len = previous_filter?strlen(previous_filter):0;
- filter_out_filter_len = strlen(follow_filter) + previous_filter_len + 16;
+ previous_filter_len = previous_filter?(int)strlen(previous_filter):0;
+ filter_out_filter_len = (int)strlen(follow_filter) + previous_filter_len + 16;
follow_info->filter_out_filter = (gchar *)g_malloc(filter_out_filter_len);
/* append the negation */
if (!skip) {
size_t nchars = rec->data.data_len;
- gchar *buffer = g_memdup(rec->data.data, nchars);
+ gchar *buffer = g_memdup(rec->data.data, (guint) nchars);
frs_return = follow_show(follow_info, print_line, buffer, nchars,
rec->is_server, arg, global_pos,
gtk_text_buffer_get_end_iter(buf, &iter);
if (is_server) {
- gtk_text_buffer_insert_with_tags(buf, &iter, buffer, nchars,
+ gtk_text_buffer_insert_with_tags(buf, &iter, buffer, (gint) nchars,
server_tag, NULL);
} else {
- gtk_text_buffer_insert_with_tags(buf, &iter, buffer, nchars,
+ gtk_text_buffer_insert_with_tags(buf, &iter, buffer, (gint) nchars,
client_tag, NULL);
}
return TRUE;
case SHOW_EBCDIC:
/* If our native arch is ASCII, call: */
- EBCDIC_to_ASCII(buffer, nchars);
+ EBCDIC_to_ASCII(buffer, (guint) nchars);
if (!(*print_line) (buffer, nchars, is_server, arg))
return FRS_PRINT_ERROR;
break;
/* allocate our new filter. API claims g_malloc terminates program on failure */
/* my calc for max alloc needed is really +10 but when did a few extra bytes hurt ? */
- filter_out_filter_len = strlen(follow_filter) + strlen(previous_filter) + 16;
+ filter_out_filter_len = (int)(strlen(follow_filter) + strlen(previous_filter) + 16);
follow_info->filter_out_filter = (gchar *)g_malloc(filter_out_filter_len);
/* append the negation */
if (nchars == 0)
break;
/* XXX - if we don't get "bcount" bytes, is that an error? */
- sc.dlen -= nchars;
+ sc.dlen -= (guint32) nchars;
if (!skip) {
frs_return = follow_show(follow_info, print_line, buffer,
/* allocate our new filter. API claims g_malloc terminates program on failure */
/* my calc for max alloc needed is really +10 but when did a few extra bytes hurt ? */
- previous_filter_len = previous_filter?strlen(previous_filter):0;
- filter_out_filter_len = strlen(follow_filter) + previous_filter_len + 16;
+ previous_filter_len = previous_filter?(int)strlen(previous_filter):0;
+ filter_out_filter_len = (int)strlen(follow_filter) + previous_filter_len + 16;
follow_info->filter_out_filter = (gchar *)g_malloc(filter_out_filter_len);
/* append the negation */
static void enlarge_string(GString *gstr, guint32 length, char pad){
- guint32 i;
+ gsize i;
for (i = gstr->len; i < length; i++){
g_string_append_c(gstr, pad);
static void overwrite (GString *gstr, char *text_to_insert, guint32 p1, guint32 p2){
- guint32 len;
+ gsize len;
gsize pos;
if (p1 == p2)
len = strlen(text_to_insert);
}
- /* ouch this is ugly but gtk1 needs it */
- if ((guint32)pos > (guint32)gstr->len)
+ if (pos > gstr->len)
pos = gstr->len;
/* ouch this is ugly but gtk1 needs it */
- if ((guint32)(pos + len) > (guint32)gstr->len)
+ if ((pos + len) > gstr->len)
g_string_truncate(gstr, pos);
else
g_string_erase(gstr, pos, len);
g_string_append_c(empty_line, '|');
- enlarge_string(separator_line, empty_line->len + header_length, '-');
+ enlarge_string(separator_line, (guint32) empty_line->len + header_length, '-');
/*
* Draw the items
if (finfo->hfinfo->blurb != NULL &&
finfo->hfinfo->blurb[0] != '\0') {
has_blurb = TRUE;
- length = strlen(finfo->hfinfo->blurb);
+ length = (guint) strlen(finfo->hfinfo->blurb);
} else {
- length = strlen(finfo->hfinfo->name);
+ length = (guint) strlen(finfo->hfinfo->name);
}
finfo_length = finfo->length + finfo->appendix_length;
gint fileopen_dir_te_length;
fileopen_dir_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w), GUI_FILEOPEN_DIR_KEY);
- fileopen_dir_te_length = strlen(gtk_entry_get_text (GTK_ENTRY(fileopen_entry)));
+ fileopen_dir_te_length = (gint) strlen(gtk_entry_get_text (GTK_ENTRY(fileopen_entry)));
if (fileopen_dir_te_length == 0)
return FALSE;
lastchar = gtk_editable_get_chars(GTK_EDITABLE(fileopen_entry), fileopen_dir_te_length-1, -1);
GList *col_l, *col_l_elt;
col_width_data *cfmt;
const gchar *cust_format = col_format_to_string(COL_CUSTOM);
- int cust_format_len = strlen(cust_format);
+ int cust_format_len = (int) strlen(cust_format);
if (strcmp(key, RECENT_KEY_MAIN_TOOLBAR_SHOW) == 0) {
if (g_ascii_strcasecmp(value, "true") == 0) {