1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
diff -u -r gnome-nettool-3.8.0/src/info.c gnome-nettool-3.8.0-printf/src/info.c
--- gnome-nettool-3.8.0/src/info.c 2013-05-02 13:58:40.000000000 +0200
+++ gnome-nettool-3.8.0-printf/src/info.c 2013-05-03 05:20:04.684921458 +0200
@@ -232,13 +232,13 @@
text_rx_bytes = util_legible_bytes (netload.bytes_in);
text_tx_bytes = util_legible_bytes (netload.bytes_out);
- g_sprintf (rx_pkt, "%lld", netload.packets_in);
- g_sprintf (tx_pkt, "%lld", netload.packets_out);
+ g_sprintf (rx_pkt, "%" G_GUINT64_FORMAT, netload.packets_in);
+ g_sprintf (tx_pkt, "%" G_GUINT64_FORMAT, netload.packets_out);
- g_sprintf (rx_error, "%lld", netload.errors_in);
- g_sprintf (tx_error, "%lld", netload.errors_out);
+ g_sprintf (rx_error, "%" G_GUINT64_FORMAT, netload.errors_in);
+ g_sprintf (tx_error, "%" G_GUINT64_FORMAT, netload.errors_out);
- g_sprintf (collisions, "%lld", netload.collisions);
+ g_sprintf (collisions, "%" G_GUINT64_FORMAT, netload.collisions);
gtk_label_set_text (GTK_LABEL (info->tx_bytes), text_tx_bytes);
gtk_label_set_text (GTK_LABEL (info->tx), tx_pkt);
diff -u -r gnome-nettool-3.8.0/src/utils.c gnome-nettool-3.8.0-printf/src/utils.c
--- gnome-nettool-3.8.0/src/utils.c 2013-05-02 13:58:40.000000000 +0200
+++ gnome-nettool-3.8.0-printf/src/utils.c 2013-05-03 05:21:45.704202804 +0200
@@ -272,7 +272,7 @@
unit = "KiB";
}
- result = g_strdup_printf ("%lld.%lld %s", short_rx / 10,
+ result = g_strdup_printf ("%" G_GUINT64_FORMAT ".%" G_GUINT64_FORMAT " %s", short_rx / 10,
short_rx % 10, unit);
return result;
}
|