aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/str_util.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-10-14 11:12:16 -0400
committerBill Meier <wmeier@newsguy.com>2014-10-14 16:45:09 +0000
commit10b83e6931debe1f1f2ea4edce86ddf168995e51 (patch)
treefb8b987b896ded10ce6e1f9a4fa344ccdd987515 /wsutil/str_util.c
parent2359e67f9c42cc285935c70fe8e9cc6b9f369797 (diff)
Add editor-modelines; adjust whitespace.
Change-Id: I8cad872cee972a6d22a72852dac57fd188daca84 Reviewed-on: https://code.wireshark.org/review/4683 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'wsutil/str_util.c')
-rw-r--r--wsutil/str_util.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/wsutil/str_util.c b/wsutil/str_util.c
index 83558c156d..77a0a17b40 100644
--- a/wsutil/str_util.c
+++ b/wsutil/str_util.c
@@ -58,10 +58,10 @@ ascii_strdown_inplace(gchar *str)
gchar *s;
for (s = str; *s; s++)
- /* What 'g_ascii_tolower (gchar c)' does, this should be slightly more efficient */
+ /* What 'g_ascii_tolower (gchar c)' does, this should be slightly more efficient */
*s = g_ascii_isupper (*s) ? *s - 'A' + 'a' : *s;
- return (str);
+ return (str);
}
/* Convert all ASCII letters to upper case, in place. */
@@ -71,10 +71,10 @@ ascii_strup_inplace(gchar *str)
gchar *s;
for (s = str; *s; s++)
- /* What 'g_ascii_toupper (gchar c)' does, this should be slightly more efficient */
- *s = g_ascii_islower (*s) ? *s - 'a' + 'A' : *s;
+ /* What 'g_ascii_toupper (gchar c)' does, this should be slightly more efficient */
+ *s = g_ascii_islower (*s) ? *s - 'a' + 'A' : *s;
- return (str);
+ return (str);
}
/* Check if an entire string is printable. */
@@ -138,7 +138,7 @@ format_size(gint64 size, format_size_flags_e flags)
power = 1024;
}
- if (size / power / power / power / power >= 10) {
+ if (size / power / power / power / power >= 10) {
g_string_printf(human_str, "%" GROUP_FLAG G_GINT64_MODIFIER "d %s", size / power / power / power / power, prefix[pfx_off]);
} else if (size / power / power / power >= 10) {
g_string_printf(human_str, "%" GROUP_FLAG G_GINT64_MODIFIER "d %s", size / power / power / power, prefix[pfx_off+1]);
@@ -146,7 +146,7 @@ format_size(gint64 size, format_size_flags_e flags)
g_string_printf(human_str, "%" GROUP_FLAG G_GINT64_MODIFIER "d %s", size / power / power, prefix[pfx_off+2]);
} else if (size / power >= 10) {
g_string_printf(human_str, "%" GROUP_FLAG G_GINT64_MODIFIER "d %s", size / power, prefix[pfx_off+3]);
- } else {
+ } else {
g_string_printf(human_str, "%" GROUP_FLAG G_GINT64_MODIFIER "d", size);
is_small = TRUE;
}
@@ -186,3 +186,16 @@ printable_char_or_period(gchar c)
{
return g_ascii_isprint(c) ? c : '.';
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */