summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-12-02 23:34:40 +0000
committerGuy Harris <guy@alum.mit.edu>2002-12-02 23:34:40 +0000
commit8414298f8921489c6174c24d4363c391822e83c5 (patch)
treeab0226aab80ac9804a8dd4c850f9031c2aeebe96
parentcfa04730cf84fc8463cb6377a132379a7abe32a4 (diff)
downloadwireshark-8414298f8921489c6174c24d4363c391822e83c5.tar.gz
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
-rw-r--r--epan/column-utils.c10
-rw-r--r--epan/column-utils.h16
-rw-r--r--plugins/plugin_table.h10
3 files changed, 18 insertions, 18 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 *);
diff --git a/plugins/plugin_table.h b/plugins/plugin_table.h
index 980ab93d20..38e0f53a57 100644
--- a/plugins/plugin_table.h
+++ b/plugins/plugin_table.h
@@ -1,7 +1,7 @@
/* plugin_table.h
* Table of exported addresses for Ethereal plugins.
*
- * $Id: plugin_table.h,v 1.55 2002/11/28 22:13:52 guy Exp $
+ * $Id: plugin_table.h,v 1.56 2002/12/02 23:34:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -33,11 +33,11 @@
/* Typedefs to make our plugin_address_table_t struct look prettier */
typedef gint (*addr_check_col)(column_info*, gint);
typedef void (*addr_col_clear)(column_info*, gint);
-typedef void (*addr_col_add_fstr)(column_info*, gint, gchar*, ...);
-typedef void (*addr_col_append_fstr)(column_info*, gint, gchar*, ...);
-typedef void (*addr_col_prepend_fstr)(column_info*, gint, gchar*, ...);
+typedef void (*addr_col_add_fstr)(column_info*, gint, const gchar*, ...);
+typedef void (*addr_col_append_fstr)(column_info*, gint, const gchar*, ...);
+typedef void (*addr_col_prepend_fstr)(column_info*, gint, const gchar*, ...);
typedef void (*addr_col_add_str)(column_info*, gint, const gchar*);
-typedef void (*addr_col_append_str)(column_info*, gint, gchar*);
+typedef void (*addr_col_append_str)(column_info*, gint, const gchar*);
typedef void (*addr_col_set_str)(column_info*, gint, gchar*);
typedef void (*addr_register_init_routine)(void (*func)(void));