diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-12-02 23:34:40 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-12-02 23:34:40 +0000 |
commit | 8414298f8921489c6174c24d4363c391822e83c5 (patch) | |
tree | ab0226aab80ac9804a8dd4c850f9031c2aeebe96 /epan | |
parent | cfa04730cf84fc8463cb6377a132379a7abe32a4 (diff) |
Make the format argument to the "col_XXX_fstr()" routines, and the "str"
argument to "col_append_str()", const pointers; they're not modified by
the routines in question.
svn path=/trunk/; revision=6725
Diffstat (limited to 'epan')
-rw-r--r-- | epan/column-utils.c | 10 | ||||
-rw-r--r-- | epan/column-utils.h | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index 856ffcfe9c..df25857418 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -1,7 +1,7 @@ /* column-utils.c * Routines for column utilities. * - * $Id: column-utils.c,v 1.25 2002/11/11 19:23:14 guy Exp $ + * $Id: column-utils.c,v 1.26 2002/12/02 23:34:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -124,7 +124,7 @@ col_set_str(column_info *cinfo, gint el, gchar* str) { /* Adds a vararg list to a packet info string. */ void -col_add_fstr(column_info *cinfo, gint el, gchar *format, ...) { +col_add_fstr(column_info *cinfo, gint el, const gchar *format, ...) { va_list ap; int i; size_t max_len; @@ -146,7 +146,7 @@ col_add_fstr(column_info *cinfo, gint el, gchar *format, ...) { /* Appends a vararg list to a packet info string. */ void -col_append_fstr(column_info *cinfo, gint el, gchar *format, ...) { +col_append_fstr(column_info *cinfo, gint el, const gchar *format, ...) { va_list ap; int i; size_t len, max_len; @@ -177,7 +177,7 @@ col_append_fstr(column_info *cinfo, gint el, gchar *format, ...) { #define COL_BUF_MAX_LEN (((COL_MAX_INFO_LEN) > (COL_MAX_LEN)) ? \ (COL_MAX_INFO_LEN) : (COL_MAX_LEN)) void -col_prepend_fstr(column_info *cinfo, gint el, gchar *format, ...) +col_prepend_fstr(column_info *cinfo, gint el, const gchar *format, ...) { va_list ap; int i; @@ -232,7 +232,7 @@ col_add_str(column_info *cinfo, gint el, const gchar* str) { } void -col_append_str(column_info *cinfo, gint el, gchar* str) { +col_append_str(column_info *cinfo, gint el, const gchar* str) { int i; size_t len, max_len; diff --git a/epan/column-utils.h b/epan/column-utils.h index 7800469950..512667e31d 100644 --- a/epan/column-utils.h +++ b/epan/column-utils.h @@ -1,7 +1,7 @@ /* column-utils.h * Definitions for column utility structures and routines * - * $Id: column-utils.h,v 1.8 2002/11/11 19:23:14 guy Exp $ + * $Id: column-utils.h,v 1.9 2002/12/02 23:34:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -45,19 +45,19 @@ extern gint check_col(column_info *, gint); extern void col_clear(column_info *, gint); extern void col_set_str(column_info *, gint, gchar *); #if __GNUC__ >= 2 -extern void col_add_fstr(column_info *, gint, gchar *, ...) +extern void col_add_fstr(column_info *, gint, const gchar *, ...) __attribute__((format (printf, 3, 4))); -extern void col_append_fstr(column_info *, gint, gchar *, ...) +extern void col_append_fstr(column_info *, gint, const gchar *, ...) __attribute__((format (printf, 3, 4))); -extern void col_prepend_fstr(column_info *, gint, gchar *, ...) +extern void col_prepend_fstr(column_info *, gint, const gchar *, ...) __attribute__((format (printf, 3, 4))); #else -extern void col_add_fstr(column_info *, gint, gchar *, ...); -extern void col_append_fstr(column_info *, gint, gchar *, ...); -extern void col_prepend_fstr(column_info *, gint, gchar *, ...); +extern void col_add_fstr(column_info *, gint, const gchar *, ...); +extern void col_append_fstr(column_info *, gint, const gchar *, ...); +extern void col_prepend_fstr(column_info *, gint, const gchar *, ...); #endif extern void col_add_str(column_info *, gint, const gchar *); -extern void col_append_str(column_info *, gint, gchar *); +extern void col_append_str(column_info *, gint, const gchar *); extern void col_set_cls_time(frame_data *, column_info *, int); extern void fill_in_columns(packet_info *); |