forked from osmocom/wireshark
Unsigned does not have msign.
svn path=/trunk/; revision=28842
This commit is contained in:
parent
74ff21bccf
commit
1ec579f62b
|
@ -431,7 +431,6 @@ time_secs_to_str_buf_unsigned(guint32 time, guint32 frac, gboolean is_nsecs,
|
|||
emem_strbuf_t *buf)
|
||||
{
|
||||
int hours, mins, secs;
|
||||
const gchar *msign = "";
|
||||
gboolean do_comma = FALSE;
|
||||
|
||||
secs = time % 60;
|
||||
|
@ -442,25 +441,25 @@ time_secs_to_str_buf_unsigned(guint32 time, guint32 frac, gboolean is_nsecs,
|
|||
time /= 24;
|
||||
|
||||
if (time != 0) {
|
||||
ep_strbuf_append_printf(buf, "%s%u day%s", msign, time, PLURALIZE(time));
|
||||
ep_strbuf_append_printf(buf, "%u day%s", time, PLURALIZE(time));
|
||||
do_comma = TRUE;
|
||||
}
|
||||
if (hours != 0) {
|
||||
ep_strbuf_append_printf(buf, "%s%s%u hour%s", COMMA(do_comma), msign, hours, PLURALIZE(hours));
|
||||
ep_strbuf_append_printf(buf, "%s%u hour%s", COMMA(do_comma), hours, PLURALIZE(hours));
|
||||
do_comma = TRUE;
|
||||
}
|
||||
if (mins != 0) {
|
||||
ep_strbuf_append_printf(buf, "%s%s%u minute%s", COMMA(do_comma), msign, mins, PLURALIZE(mins));
|
||||
ep_strbuf_append_printf(buf, "%s%u minute%s", COMMA(do_comma), mins, PLURALIZE(mins));
|
||||
do_comma = TRUE;
|
||||
}
|
||||
if (secs != 0 || frac != 0) {
|
||||
if (frac != 0) {
|
||||
if (is_nsecs)
|
||||
ep_strbuf_append_printf(buf, "%s%s%u.%09u seconds", COMMA(do_comma), msign, secs, frac);
|
||||
ep_strbuf_append_printf(buf, "%s%u.%09u seconds", COMMA(do_comma), secs, frac);
|
||||
else
|
||||
ep_strbuf_append_printf(buf, "%s%s%u.%03u seconds", COMMA(do_comma), msign, secs, frac);
|
||||
ep_strbuf_append_printf(buf, "%s%u.%03u seconds", COMMA(do_comma), secs, frac);
|
||||
} else
|
||||
ep_strbuf_append_printf(buf, "%s%s%u second%s", COMMA(do_comma), msign, secs, PLURALIZE(secs));
|
||||
ep_strbuf_append_printf(buf, "%s%u second%s", COMMA(do_comma), secs, PLURALIZE(secs));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue