aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-05 13:11:13 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-05 13:11:13 +0000
commitd6efc2451b025f596253032b5547c974cf1f515f (patch)
tree352b789fb8f4f90b3b6332dd8258499d82e6a1ca
parent2ba20d1ef121661b16f9592bf1185dc9be827d84 (diff)
fixed wrong status display at receiving on *BSD systems.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@975 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja7
-rw-r--r--libsylph/pop.c2
-rw-r--r--libsylph/utils.c14
4 files changed, 22 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ffc66a1..7875fdfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-05
+
+ * libsylph/pop.c: pop3_getrange_stat_recv(): fixed non-portable format
+ string ("%Ld" is not defined in *BSD, including Mac OS X). This
+ fixes wrong status display at receiving on *BSD systems.
+ * libsylph/utils.c: to_human_readable(): disabled translation.
+
2006-02-03
* src/summaryview.c: summary_row_expanded(): re-enabled workaround
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 1cd4eef8..aaf68528 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,10 @@
+2006-02-05
+
+ * libsylph/pop.c: pop3_getrange_stat_recv(): 移植性のないフォーマット
+ 文字列を修正("%Ld" は Mac OS X を含む *BSD では未定義)。これによって
+ *BSD システムで受信時のステータス表示がおかしくなるのを修正。
+ * libsylph/utils.c: to_human_readable(): 翻訳を無効にした。
+
2006-02-03
* src/summaryview.c: summary_row_expanded(): workaround を GTK+ 2.8
diff --git a/libsylph/pop.c b/libsylph/pop.c
index 7988ef48..8b110b3e 100644
--- a/libsylph/pop.c
+++ b/libsylph/pop.c
@@ -187,7 +187,7 @@ static gint pop3_getrange_stat_send(Pop3Session *session)
static gint pop3_getrange_stat_recv(Pop3Session *session, const gchar *msg)
{
- if (sscanf(msg, "%d %Ld", &session->count, &session->total_bytes) != 2) {
+ if (sscanf(msg, "%d %lld", &session->count, &session->total_bytes) != 2) {
log_warning(_("POP3 protocol error\n"));
session->error_val = PS_PROTOCOL;
return -1;
diff --git a/libsylph/utils.c b/libsylph/utils.c
index e6703186..e99f3d3a 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -269,16 +269,16 @@ gchar *itos(gint n)
gchar *to_human_readable(gint64 size)
{
- static gchar str[10];
+ static gchar str[16];
if (size < 1024)
- g_snprintf(str, sizeof(str), _("%dB"), (gint)size);
- else if (size >> 10 < 1024)
- g_snprintf(str, sizeof(str), _("%.1fKB"), (gfloat)size / (1 << 10));
- else if (size >> 20 < 1024)
- g_snprintf(str, sizeof(str), _("%.2fMB"), (gfloat)size / (1 << 20));
+ g_snprintf(str, sizeof(str), "%dB", (gint)size);
+ else if ((size >> 10) < 1024)
+ g_snprintf(str, sizeof(str), "%.1fKB", (gfloat)size / (1 << 10));
+ else if ((size >> 20) < 1024)
+ g_snprintf(str, sizeof(str), "%.2fMB", (gfloat)size / (1 << 20));
else
- g_snprintf(str, sizeof(str), _("%.2fGB"), (gfloat)size / (1 << 30));
+ g_snprintf(str, sizeof(str), "%.2fGB", (gfloat)size / (1 << 30));
return str;
}