commit c55d5db85eed95ee5f69f2ef63dba1badf2a1919
parent 40479f966ee2ca218253afa68493954f31feb2a6
Author: Colin Leroy <colin@colino.net>
Date: Wed, 28 May 2008 05:42:02 +0000
2008-05-28 [colin] 3.4.0cvs71
* src/compose.c
* src/compose.h
* src/grouplistdialog.c
* src/image_viewer.c
* src/imap.c
* src/inc.c
* src/main.c
* src/matcher.c
* src/messageview.c
* src/mimeview.c
* src/prefs_themes.c
* src/procmsg.h
* src/summaryview.c
* src/summaryview.h
* src/textview.c
* src/common/smtp.c
* src/common/utils.c
* src/common/utils.h
Use goffset instead of off_t for MsgInfo's size
Allows using MsgInfo structure from plugins
compiled with largefile support
Diffstat:
21 files changed, 94 insertions(+), 83 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,27 @@
+2008-05-28 [colin] 3.4.0cvs71
+
+ * src/compose.c
+ * src/compose.h
+ * src/grouplistdialog.c
+ * src/image_viewer.c
+ * src/imap.c
+ * src/inc.c
+ * src/main.c
+ * src/matcher.c
+ * src/messageview.c
+ * src/mimeview.c
+ * src/prefs_themes.c
+ * src/procmsg.h
+ * src/summaryview.c
+ * src/summaryview.h
+ * src/textview.c
+ * src/common/smtp.c
+ * src/common/utils.c
+ * src/common/utils.h
+ Use goffset instead of off_t for MsgInfo's size
+ Allows using MsgInfo structure from plugins
+ compiled with largefile support
+
2008-05-26 [colin] 3.4.0cvs70
* src/mainwindow.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3366,3 +3366,4 @@
( cvs diff -u -r 1.20.2.61 -r 1.20.2.62 src/common/utils.h; ) > 3.4.0cvs68.patchset
( cvs diff -u -r 1.83.2.131 -r 1.83.2.132 src/mimeview.c; ) > 3.4.0cvs69.patchset
( cvs diff -u -r 1.274.2.244 -r 1.274.2.245 src/mainwindow.c; cvs diff -u -r 1.39.2.45 -r 1.39.2.46 src/mainwindow.h; cvs diff -u -r 1.14.2.62 -r 1.14.2.63 src/plugins/trayicon/trayicon.c; ) > 3.4.0cvs70.patchset
+( cvs diff -u -r 1.382.2.450 -r 1.382.2.451 src/compose.c; cvs diff -u -r 1.50.2.45 -r 1.50.2.46 src/compose.h; cvs diff -u -r 1.14.2.19 -r 1.14.2.20 src/grouplistdialog.c; cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/image_viewer.c; cvs diff -u -r 1.179.2.222 -r 1.179.2.223 src/imap.c; cvs diff -u -r 1.149.2.90 -r 1.149.2.91 src/inc.c; cvs diff -u -r 1.115.2.195 -r 1.115.2.196 src/main.c; cvs diff -u -r 1.75.2.59 -r 1.75.2.60 src/matcher.c; cvs diff -u -r 1.94.2.177 -r 1.94.2.178 src/messageview.c; cvs diff -u -r 1.83.2.132 -r 1.83.2.133 src/mimeview.c; cvs diff -u -r 1.3.2.56 -r 1.3.2.57 src/prefs_themes.c; cvs diff -u -r 1.60.2.52 -r 1.60.2.53 src/procmsg.h; cvs diff -u -r 1.395.2.369 -r 1.395.2.370 src/summaryview.c; cvs diff -u -r 1.68.2.46 -r 1.68.2.47 src/summaryview.h; cvs diff -u -r 1.96.2.201 -r 1.96.2.202 src/textview.c; cvs diff -u -r 1.11.2.23 -r 1.11.2.24 src/common/smtp.c; cvs diff -u -r 1.36.2.141 -r 1.36.2.142 src/common/utils.c; cvs diff -u -r 1.20.2.62 -r 1.20.2.63 src/common/utils.h; ) > 3.4.0cvs71.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=4
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=70
+EXTRA_VERSION=71
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/common/smtp.c b/src/common/smtp.c
@@ -603,7 +603,7 @@ static gint smtp_session_recv_msg(Session *session, const gchar *msg)
log_warning(LOG_PROTOCOL, _("Message is too big "
"(Maximum size is %s)\n"),
to_human_readable(
- (off_t)(smtp_session->max_message_size)));
+ (goffset)(smtp_session->max_message_size)));
smtp_session->state = SMTP_ERROR;
smtp_session->error_val = SM_ERROR;
return -1;
diff --git a/src/common/utils.c b/src/common/utils.c
@@ -323,7 +323,7 @@ gchar *itos(gint n)
d = (d*100) >> divisor; \
}
-gchar *to_human_readable(size_t size)
+gchar *to_human_readable(goffset size)
{
static gchar str[14];
static gchar *b_format = NULL, *kb_format = NULL,
@@ -335,20 +335,20 @@ gchar *to_human_readable(size_t size)
mb_format = _("%d.%02dMB");
gb_format = _("%.2fGB");
}
-
- if (size < (size_t)1024) {
+
+ if (size < (goffset)1024) {
g_snprintf(str, sizeof(str), b_format, (gint)size);
return str;
- } else if (size >> 10 < (size_t)1024) {
+ } else if (size >> 10 < (goffset)1024) {
divide(size, 10, t, r);
g_snprintf(str, sizeof(str), kb_format, t, r);
return str;
- } else if (size >> 20 < (size_t)1024) {
+ } else if (size >> 20 < (goffset)1024) {
divide(size, 20, t, r);
g_snprintf(str, sizeof(str), mb_format, t, r);
return str;
} else {
- g_snprintf(str, sizeof(str), gb_format, (gfloat)(size) / (1 << 30));
+ g_snprintf(str, sizeof(str), gb_format, (gfloat)(size >> 30));
return str;
}
}
diff --git a/src/common/utils.h b/src/common/utils.h
@@ -71,21 +71,6 @@ gint g_chmod (const gchar *path,
#endif /* !GLIB_CHECK_VERSION */
-/* The AC_CHECK_SIZEOF() in configure fails for some machines.
- * we provide some fallback values here */
-#if !SIZEOF_UNSIGNED_SHORT
- #undef SIZEOF_UNSIGNED_SHORT
- #define SIZEOF_UNSIGNED_SHORT 2
-#endif
-#if !SIZEOF_UNSIGNED_INT
- #undef SIZEOF_UNSIGNED_INT
- #define SIZEOF_UNSIGNED_INT 4
-#endif
-#if !SIZEOF_UNSIGNED_LONG
- #undef SIZEOF_UNSIGNED_LONG
- #define SIZEOF_UNSIGNED_LONG 4
-#endif
-
#ifndef HAVE_U32_TYPEDEF
#undef u32 /* maybe there is a macro with this name */
typedef guint32 u32;
@@ -243,7 +228,7 @@ gint to_number (const gchar *nstr);
gchar *itos_buf (gchar *nstr,
gint n);
gchar *itos (gint n);
-gchar *to_human_readable (size_t size);
+gchar *to_human_readable (goffset size);
/* alternative string functions */
gint strcmp2 (const gchar *s1,
diff --git a/src/compose.c b/src/compose.c
@@ -3544,8 +3544,8 @@ static gboolean compose_attach_append(Compose *compose, const gchar *file,
ainfo->content_type = g_strdup("application/octet-stream");
}
- ainfo->size = size;
- size_text = to_human_readable(size);
+ ainfo->size = (goffset)size;
+ size_text = to_human_readable((goffset)size);
store = GTK_LIST_STORE(gtk_tree_view_get_model
(GTK_TREE_VIEW(compose->attach_clist)));
@@ -8033,7 +8033,7 @@ static void compose_attach_property(Compose *compose)
ainfo->file = file;
}
if (size)
- ainfo->size = size;
+ ainfo->size = (goffset)size;
/* update tree store */
text = to_human_readable(ainfo->size);
@@ -8923,7 +8923,7 @@ warn_err:
procmsg_msginfo_free(compose->targetinfo);
compose->targetinfo = procmsg_msginfo_new();
compose->targetinfo->msgnum = msgnum;
- compose->targetinfo->size = s.st_size;
+ compose->targetinfo->size = (goffset)s.st_size;
compose->targetinfo->mtime = s.st_mtime;
compose->targetinfo->folder = draft;
if (target_locked)
diff --git a/src/compose.h b/src/compose.h
@@ -240,7 +240,7 @@ struct _AttachInfo
gchar *content_type;
EncodingType encoding;
gchar *name;
- off_t size;
+ goffset size;
};
typedef enum
diff --git a/src/grouplistdialog.c b/src/grouplistdialog.c
@@ -488,7 +488,7 @@ static gboolean grouplist_recv_func(SockInfo *sock, gint count, gint read_bytes,
g_snprintf(buf, sizeof(buf),
_("%d newsgroups received (%s read)"),
- count, to_human_readable(read_bytes));
+ count, to_human_readable((goffset)read_bytes));
gtk_label_set_text(GTK_LABEL(status_label), buf);
GTK_EVENTS_FLUSH();
if (ack == FALSE)
diff --git a/src/image_viewer.c b/src/image_viewer.c
@@ -164,7 +164,7 @@ static void image_viewer_show_mimepart(MimeViewer *_mimeviewer, const gchar *fil
gtk_label_set_text(GTK_LABEL(imageviewer->filename),
procmime_mimeinfo_get_parameter(mimeinfo, "name"));
- gtk_label_set_text(GTK_LABEL(imageviewer->filesize), to_human_readable(mimeinfo->length));
+ gtk_label_set_text(GTK_LABEL(imageviewer->filesize), to_human_readable((goffset)mimeinfo->length));
gtk_label_set_text(GTK_LABEL(imageviewer->content_type), mimeinfo->subtype);
gtk_label_set_text(GTK_LABEL(imageviewer->error_lbl), "");
gtk_label_set_text(GTK_LABEL(imageviewer->error_msg), "");
diff --git a/src/imap.c b/src/imap.c
@@ -5127,7 +5127,7 @@ static MsgInfo *imap_envelope_from_lep(struct imap_fetch_env_info * info,
{
MsgInfo *msginfo = NULL;
guint32 uid = 0;
- size_t size = 0;
+ goffset size = 0;
MsgFlags flags = {0, 0};
if (info->headers == NULL)
@@ -5142,7 +5142,7 @@ static MsgInfo *imap_envelope_from_lep(struct imap_fetch_env_info * info,
flags.perm_flags = info->flags;
uid = info->uid;
- size = info->size;
+ size = (goffset) info->size;
msginfo = procheader_parse_str(info->headers, flags, FALSE, FALSE);
if (msginfo) {
diff --git a/src/inc.c b/src/inc.c
@@ -627,7 +627,7 @@ static gint inc_start(IncProgressDialog *inc_dialog)
"Done (%d messages (%s) received)",
pop3_session->cur_total_num),
pop3_session->cur_total_num,
- to_human_readable(pop3_session->cur_total_recv_bytes));
+ to_human_readable((goffset)pop3_session->cur_total_recv_bytes));
else
msg = g_strdup_printf(_("Done (no new messages)"));
SET_PIXMAP_AND_TEXT(okpix, msg);
@@ -968,11 +968,11 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
if (pop3_session->state == POP3_RETR ||
pop3_session->state == POP3_RETR_RECV ||
pop3_session->state == POP3_DELETE) {
- Xstrdup_a(total_size_str, to_human_readable(total), return);
+ Xstrdup_a(total_size_str, to_human_readable((goffset)total), return);
g_snprintf(buf, sizeof(buf),
_("Retrieving message (%d / %d) (%s / %s)"),
pop3_session->cur_msg, pop3_session->count,
- to_human_readable(cur_total), total_size_str);
+ to_human_readable((goffset)cur_total), total_size_str);
progress_dialog_set_label(inc_dialog->dialog, buf);
}
@@ -994,7 +994,7 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
pop3_session->cur_total_num),
pop3_session->cur_total_num,
to_human_readable
- (pop3_session->cur_total_recv_bytes));
+ ((goffset)pop3_session->cur_total_recv_bytes));
progress_dialog_list_set_status(inc_dialog->dialog,
inc_dialog->cur_row,
buf);
diff --git a/src/main.c b/src/main.c
@@ -109,6 +109,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
#include "news_gtk.h"
#include "matcher.h"
#include "tags.h"
+
#ifdef HAVE_LIBETPAN
#include "imap-thread.h"
#include "nntp-thread.h"
@@ -934,9 +935,9 @@ int main(int argc, char *argv[])
gint num_folder_class = 0;
gboolean asked_for_migration = FALSE;
gboolean start_done = TRUE;
-
- START_TIMING("startup");
+ START_TIMING("startup");
+
sc_starting = TRUE;
#ifdef G_OS_WIN32
diff --git a/src/matcher.c b/src/matcher.c
@@ -1033,76 +1033,76 @@ gboolean matcherprop_match(MatcherProp *prop,
}
case MATCHCRITERIA_SIZE_GREATER:
{
- /* FIXME: info->size is an off_t */
- gboolean ret = (info->size > (off_t) prop->value);
+ /* FIXME: info->size is a goffset */
+ gboolean ret = (info->size > (goffset) prop->value);
/* debug output */
if (debug_filtering_session
&& prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) {
if (ret) {
log_print(LOG_DEBUG_FILTERING,
- "message size [ %ld ] is greater than [ %d ]\n",
- info->size, prop->value);
+ "message size is greater than [ %d ]\n",
+ prop->value);
} else {
log_print(LOG_DEBUG_FILTERING,
- "message size [ %ld ] is not greater than [ %d ]\n",
- info->size, prop->value);
+ "message size is not greater than [ %d ]\n",
+ prop->value);
}
}
return ret;
}
case MATCHCRITERIA_SIZE_SMALLER:
{
- /* FIXME: info->size is an off_t */
- gboolean ret = (info->size < (off_t) prop->value);
+ /* FIXME: info->size is a goffset */
+ gboolean ret = (info->size < (goffset) prop->value);
/* debug output */
if (debug_filtering_session
&& prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) {
if (ret) {
log_print(LOG_DEBUG_FILTERING,
- "message size [ %ld ] is smaller than [ %d ]\n",
- info->size, prop->value);
+ "message size is smaller than [ %d ]\n",
+ prop->value);
} else {
log_print(LOG_DEBUG_FILTERING,
- "message size [ %ld ] is not smaller than [ %d ]\n",
- info->size, prop->value);
+ "message size is not smaller than [ %d ]\n",
+ prop->value);
}
}
return ret;
}
case MATCHCRITERIA_SIZE_EQUAL:
{
- /* FIXME: info->size is an off_t */
- gboolean ret = (info->size == (off_t) prop->value);
+ /* FIXME: info->size is a goffset */
+ gboolean ret = (info->size == (goffset) prop->value);
/* debug output */
if (debug_filtering_session
&& prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) {
if (ret) {
log_print(LOG_DEBUG_FILTERING,
- "message size [ %ld ] is equal to [ %d ]\n",
- info->size, prop->value);
+ "message size is equal to [ %d ]\n",
+ prop->value);
} else {
log_print(LOG_DEBUG_FILTERING,
- "message size [ %ld ] is not equal to [ %d ]\n",
- info->size, prop->value);
+ "message size is not equal to [ %d ]\n",
+ prop->value);
}
}
return ret;
}
case MATCHCRITERIA_PARTIAL:
{
- /* FIXME: info->size is an off_t */
- gboolean ret = (info->total_size != 0 && info->size != (off_t)info->total_size);
+ /* FIXME: info->size is a goffset */
+ gboolean ret = (info->total_size != 0 && info->size != (goffset)info->total_size);
/* debug output */
if (debug_filtering_session
&& prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) {
if (ret) {
log_print(LOG_DEBUG_FILTERING,
- "message is partially downloaded, size [ %ld ] is less than total size [ %d ])\n",
- info->size, info->total_size);
+ "message is partially downloaded, size is less than total size [ %d ])\n",
+ info->total_size);
} else {
log_print(LOG_DEBUG_FILTERING,
"message is not partially downloaded\n");
@@ -1112,8 +1112,8 @@ gboolean matcherprop_match(MatcherProp *prop,
}
case MATCHCRITERIA_NOT_PARTIAL:
{
- /* FIXME: info->size is an off_t */
- gboolean ret = (info->total_size == 0 || info->size == (off_t)info->total_size);
+ /* FIXME: info->size is a goffset */
+ gboolean ret = (info->total_size == 0 || info->size == (goffset)info->total_size);
/* debug output */
if (debug_filtering_session
@@ -1123,8 +1123,8 @@ gboolean matcherprop_match(MatcherProp *prop,
"message is not partially downloaded\n");
} else {
log_print(LOG_DEBUG_FILTERING,
- "message is partially downloaded, size [ %ld ] is less than total size [ %d ])\n",
- info->size, info->total_size);
+ "message is partially downloaded, size is less than total size [ %d ])\n",
+ info->total_size);
}
}
return ret;
diff --git a/src/messageview.c b/src/messageview.c
@@ -1514,7 +1514,7 @@ static void messageview_show_partial_display_cb(NoticeView *noticeview, MessageV
void messageview_show_partial_display(MessageView *messageview, MsgInfo *msginfo,
size_t length)
{
- gchar *msg = g_strdup_printf(_("Show all %s."), to_human_readable(length));
+ gchar *msg = g_strdup_printf(_("Show all %s."), to_human_readable((goffset)length));
noticeview_set_icon(messageview->noticeview, STOCK_PIXMAP_NOTICE_WARN);
noticeview_set_text(messageview->noticeview, _("Only the first megabyte of text is shown."));
noticeview_set_button_text(messageview->noticeview, msg);
@@ -1608,7 +1608,7 @@ static void partial_recv_show(NoticeView *noticeview, MsgInfo *msginfo)
text = g_strdup_printf(_("This message has been "
"partially retrieved;\nit is %s."),
to_human_readable(
- (off_t)(msginfo->total_size)));
+ (goffset)(msginfo->total_size)));
button1 = _("Mark for download");
button2 = _("Mark for deletion");
button1_cb = partial_recv_dload_clicked;
@@ -1619,7 +1619,7 @@ static void partial_recv_show(NoticeView *noticeview, MsgInfo *msginfo)
"partially retrieved;\nit is %s and "
"will be downloaded."),
to_human_readable(
- (off_t)(msginfo->total_size)));
+ (goffset)(msginfo->total_size)));
button1 = _("Unmark");
button1_cb = partial_recv_unmark_clicked;
button2 = _("Mark for deletion");
@@ -1630,7 +1630,7 @@ static void partial_recv_show(NoticeView *noticeview, MsgInfo *msginfo)
"partially retrieved;\nit is %s and "
"will be deleted."),
to_human_readable(
- (off_t)(msginfo->total_size)));
+ (goffset)(msginfo->total_size)));
button1 = _("Mark for download");
button1_cb = partial_recv_dload_clicked;
button2 = _("Unmark");
diff --git a/src/mimeview.c b/src/mimeview.c
@@ -586,7 +586,7 @@ static GtkCTreeNode *mimeview_append_part(MimeView *mimeview,
}
str[COL_MIMETYPE] = content_type;
- str[COL_SIZE] = to_human_readable(partinfo->length);
+ str[COL_SIZE] = to_human_readable((goffset)partinfo->length);
if (prefs_common.attach_desc)
str[COL_NAME] = (gchar *) get_part_description(partinfo);
else
@@ -2245,7 +2245,7 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
mimeinfo->subtype);
tip = g_strjoin("\n", content_type,
- to_human_readable(mimeinfo->length), NULL);
+ to_human_readable((goffset)mimeinfo->length), NULL);
g_free(content_type);
if (desc && *desc) {
gchar *tmp = NULL;
diff --git a/src/prefs_themes.c b/src/prefs_themes.c
@@ -763,7 +763,7 @@ static gchar *prefs_themes_get_theme_stats(const gchar *dirname)
prefs_themes_foreach_file(dirname, prefs_themes_file_stats, dinfo);
stats = g_strdup_printf(_("%d files (%d icons), size: %s"),
- dinfo->files, dinfo->pixms, to_human_readable(dinfo->bytes));
+ dinfo->files, dinfo->pixms, to_human_readable((goffset)dinfo->bytes));
g_free(dinfo);
return stats;
diff --git a/src/procmsg.h b/src/procmsg.h
@@ -205,7 +205,7 @@ struct _MsgInfo
guint refcnt;
guint msgnum;
- off_t size;
+ goffset size;
time_t mtime;
time_t date_t;
time_t thread_date;
diff --git a/src/summaryview.c b/src/summaryview.c
@@ -2443,7 +2443,7 @@ static void summary_status_show(SummaryView *summaryview)
GList *rowlist, *cur;
guint n_selected = 0, n_new = 0, n_unread = 0, n_total = 0;
guint n_marked = 0, n_replied = 0, n_forwarded = 0, n_locked = 0, n_ignored = 0, n_watched = 0;
- off_t sel_size = 0, n_size = 0;
+ goffset sel_size = 0, n_size = 0;
MsgInfo *msginfo;
gchar *name;
#if GTK_CHECK_VERSION(2, 12, 0)
@@ -2538,7 +2538,7 @@ static void summary_status_show(SummaryView *summaryview)
spc = "";
if (n_selected) {
- sel = g_strdup_printf(" (%s)", to_human_readable(sel_size));
+ sel = g_strdup_printf(" (%s)", to_human_readable((goffset)sel_size));
if (n_selected == 1)
itstr = g_strdup(_(" item selected"));
else
@@ -2562,7 +2562,7 @@ static void summary_status_show(SummaryView *summaryview)
str = g_strdup_printf(_("%d new, %d unread, %d total (%s)"),
n_new, n_unread, n_total,
- to_human_readable(n_size));
+ to_human_readable((goffset)n_size));
gtk_label_set_text(GTK_LABEL(summaryview->statlabel_msgs), str);
@@ -2580,7 +2580,7 @@ static void summary_status_show(SummaryView *summaryview)
"<b>Ignored:</b> %d\n"
"<b>Watched:</b> %d"),
n_new, n_unread, n_total,
- to_human_readable(n_size),
+ to_human_readable((goffset)n_size),
n_marked,n_replied,n_forwarded,
n_locked,n_ignored,n_watched);
@@ -2591,15 +2591,15 @@ static void summary_status_show(SummaryView *summaryview)
} else {
gchar *ssize, *tsize;
if (n_selected) {
- ssize = g_strdup(to_human_readable(sel_size));
- tsize = g_strdup(to_human_readable(n_size));
+ ssize = g_strdup(to_human_readable((goffset)sel_size));
+ tsize = g_strdup(to_human_readable((goffset)n_size));
str = g_strdup_printf(_("%d/%d selected (%s/%s), %d unread"),
n_selected, n_total, ssize, tsize, n_unread);
g_free(ssize);
g_free(tsize);
} else
str = g_strdup_printf(_("%d new, %d unread, %d total (%s)"),
- n_new, n_unread, n_total, to_human_readable(n_size));
+ n_new, n_unread, n_total, to_human_readable((goffset)n_size));
g_free(sel);
g_free(del);
g_free(mv);
@@ -4205,7 +4205,7 @@ void summary_delete(SummaryView *summaryview)
GtkCTreeNode *row = GTK_CTREE_NODE(cur->data);
msginfo = gtk_ctree_node_get_row_data(ctree, row);
if (msginfo && msginfo->total_size != 0 &&
- msginfo->size != (off_t)msginfo->total_size)
+ msginfo->size != (goffset)msginfo->total_size)
partial_mark_for_delete(msginfo);
}
diff --git a/src/summaryview.h b/src/summaryview.h
@@ -153,7 +153,7 @@ struct _SummaryView
/* current message status */
gint unreadmarked;
- off_t total_size;
+ goffset total_size;
gint deleted;
gint moved;
gint copied;
diff --git a/src/textview.c b/src/textview.c
@@ -879,7 +879,7 @@ void textview_show_mime_part(TextView *textview, MimeInfo *partinfo)
TEXTVIEW_INSERT(" (");
TEXTVIEW_INSERT(content_type);
TEXTVIEW_INSERT(", ");
- TEXTVIEW_INSERT(to_human_readable(partinfo->length));
+ TEXTVIEW_INSERT(to_human_readable((goffset)partinfo->length));
TEXTVIEW_INSERT("):\n\n");
g_free(content_type);