aboutsummaryrefslogtreecommitdiffstats
path: root/epan/column.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-04-03 18:18:50 +0000
committerBill Meier <wmeier@newsguy.com>2010-04-03 18:18:50 +0000
commit6812b68eb1973d4a439cc1342890353982a42a57 (patch)
treeb191b600b7710d04062effdc3f43d243d1150b55 /epan/column.c
parent68ad976a55954f7c4859c9402e4c219cf1fb5d45 (diff)
From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
Diffstat (limited to 'epan/column.c')
-rw-r--r--epan/column.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/column.c b/epan/column.c
index 17dbcb461e..03ed22d673 100644
--- a/epan/column.c
+++ b/epan/column.c
@@ -45,7 +45,7 @@
/* Given a format number (as defined in column_info.h), returns its equivalent
string */
const gchar *
-col_format_to_string(gint fmt) {
+col_format_to_string(const gint fmt) {
const gchar *slist[] = {
"%q", /* 0) COL_8021Q_VLAN_ID */
"%Yt", /* 1) COL_ABS_DATE_TIME */
@@ -179,7 +179,7 @@ static const gchar *dlist[NUM_COL_FMTS] = {
};
const gchar *
-col_format_desc(gint fmt) {
+col_format_desc(const gint fmt) {
g_assert((fmt >= 0) && (fmt < NUM_COL_FMTS));
return(dlist[fmt]);
}
@@ -187,7 +187,7 @@ col_format_desc(gint fmt) {
/* Marks each array element true if it can be substituted for the given
column format */
void
-get_column_format_matches(gboolean *fmt_list, gint format) {
+get_column_format_matches(gboolean *fmt_list, const gint format) {
/* Get the obvious: the format itself */
if ((format >= 0) && (format < NUM_COL_FMTS))
@@ -311,7 +311,7 @@ get_column_format_matches(gboolean *fmt_list, gint format) {
/* Returns a string representing the longest possible value for
a timestamp column type. */
static const char *
-get_timestamp_column_longest_string(gint type, gint precision)
+get_timestamp_column_longest_string(const gint type, const gint precision)
{
switch(type) {
@@ -452,7 +452,7 @@ get_timestamp_column_longest_string(gint type, gint precision)
/* 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(gint format, gint col)
+get_column_width_string(const gint format, const gint col)
{
if(strlen(get_column_longest_string(format)) >
strlen(get_column_title(col)))
@@ -474,7 +474,7 @@ get_column_width_string(gint format, gint col)
is somewhat arbitrary in any case. We should probably clean
that up eventually, though. */
const char *
-get_column_longest_string(gint format)
+get_column_longest_string(const gint format)
{
switch (format) {
case COL_NUMBER:
@@ -610,13 +610,13 @@ get_column_longest_string(gint format)
/* Returns the longest possible width, in characters, for a particular
column type. */
gint
-get_column_char_width(gint format)
+get_column_char_width(const gint format)
{
return (gint)strlen(get_column_longest_string(format));
}
gint
-get_column_format(gint col)
+get_column_format(const gint col)
{
GList *clp = g_list_nth(prefs.col_list, col);
fmt_data *cfmt;
@@ -630,7 +630,7 @@ get_column_format(gint col)
}
gint
-get_column_format_from_str(gchar *str)
+get_column_format_from_str(const gchar *str)
{
gint i;
@@ -642,7 +642,7 @@ get_column_format_from_str(gchar *str)
}
gchar *
-get_column_title(gint col)
+get_column_title(const gint col)
{
GList *clp = g_list_nth(prefs.col_list, col);
fmt_data *cfmt;
@@ -656,7 +656,7 @@ get_column_title(gint col)
}
const gchar *
-get_column_custom_field(gint col)
+get_column_custom_field(const gint col)
{
GList *clp = g_list_nth(prefs.col_list, col);
fmt_data *cfmt;
@@ -670,7 +670,7 @@ get_column_custom_field(gint col)
}
void
-build_column_format_array(column_info *cinfo, gint num_cols, gboolean reset_fences)
+build_column_format_array(column_info *cinfo, const gint num_cols, const gboolean reset_fences)
{
int i;