From 006790927f725133cc271438616f786826576590 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 27 Sep 2014 11:29:03 -0700 Subject: [PATCH] Make get_column_longest_string() static. It's not used outside epan/column.c, so don't export it. Change-Id: I38e084946d92f3c31b06fc4fc1991c88e652f58a Reviewed-on: https://code.wireshark.org/review/4334 Reviewed-by: Guy Harris --- epan/column.c | 26 +++++++++++++------------- epan/column.h | 2 -- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/epan/column.c b/epan/column.c index 69d16faada..4d23d9e5bc 100644 --- a/epan/column.c +++ b/epan/column.c @@ -450,18 +450,6 @@ get_timestamp_column_longest_string(const gint type, const gint precision) return ""; } -/* Returns the longer string of the column title or the hard-coded width of - * its contents for building the packet list layout. */ -const gchar * -get_column_width_string(const gint format, const gint col) -{ - if(strlen(get_column_longest_string(format)) > - strlen(get_column_title(col))) - return get_column_longest_string(format); - else - return get_column_title(col); -} - /* Returns a string representing the longest possible value for a particular column type. See also get_column_width_string() above. @@ -474,7 +462,7 @@ get_column_width_string(const gint format, const gint col) is done, and given that the width for COL...SRC and COL...DST columns is somewhat arbitrary in any case. We should probably clean that up eventually, though. */ -const char * +static const char * get_column_longest_string(const gint format) { switch (format) { @@ -620,6 +608,18 @@ get_column_longest_string(const gint format) } } +/* Returns the longer string of the column title or the hard-coded width of + * its contents for building the packet list layout. */ +const gchar * +get_column_width_string(const gint format, const gint col) +{ + if(strlen(get_column_longest_string(format)) > + strlen(get_column_title(col))) + return get_column_longest_string(format); + else + return get_column_title(col); +} + /* Returns the longest possible width, in characters, for a particular column type. */ gint diff --git a/epan/column.h b/epan/column.h index d9ccc38376..3061c36e82 100644 --- a/epan/column.h +++ b/epan/column.h @@ -74,8 +74,6 @@ void set_column_custom_occurrence(const gint, const gint); WS_DLL_PUBLIC const gchar *get_column_width_string(const gint, const gint); WS_DLL_PUBLIC -const char *get_column_longest_string(const gint); -WS_DLL_PUBLIC gint get_column_char_width(const gint format); WS_DLL_PUBLIC