diff --git a/color_filters.c b/color_filters.c index ef72946dcd..ff8d43339a 100644 --- a/color_filters.c +++ b/color_filters.c @@ -111,8 +111,8 @@ color_filters_init(void) /* Create a new filter */ color_filter_t * -color_filter_new(gchar *name, /* The name of the filter to create */ - gchar *filter_string, /* The string representing the filter */ +color_filter_new(const gchar *name, /* The name of the filter to create */ + const gchar *filter_string, /* The string representing the filter */ color_t *bg_color, /* The background color */ color_t *fg_color) /* The foreground color */ { diff --git a/color_filters.h b/color_filters.h index 46646d05b6..17ab753e08 100644 --- a/color_filters.h +++ b/color_filters.h @@ -108,7 +108,7 @@ color_filters_colorize_packet(gint row, epan_dissect_t *edt); * @param fg_color foreground color * @return the new color filter */ -color_filter_t *color_filter_new(gchar *name, gchar *filter_string, +color_filter_t *color_filter_new(const gchar *name, const gchar *filter_string, color_t *bg_color, color_t *fg_color); /** Remove the color filter. diff --git a/epan/packet.c b/epan/packet.c index ca7b44410c..e9c691b35b 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1261,7 +1261,7 @@ dissector_table_foreach (char *name, * function on each entry. */ void -dissector_table_foreach_handle(char *name, +dissector_table_foreach_handle(const char *name, DATFunc_handle func, gpointer user_data) { diff --git a/epan/packet.h b/epan/packet.h index 04df470356..311fcfa647 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -156,7 +156,7 @@ extern void dissector_table_foreach (char *name, DATFunc func, gpointer user_data); extern void dissector_all_tables_foreach_changed (DATFunc func, gpointer user_data); -extern void dissector_table_foreach_handle(char *name, DATFunc_handle func, +extern void dissector_table_foreach_handle(const char *name, DATFunc_handle func, gpointer user_data); extern void dissector_all_tables_foreach_table (DATFunc_table func, gpointer user_data); diff --git a/gtk/about_dlg.c b/gtk/about_dlg.c index dfe1f834c3..498bc027bc 100644 --- a/gtk/about_dlg.c +++ b/gtk/about_dlg.c @@ -207,7 +207,7 @@ about_folders_page_new(void) GtkWidget *table; const char *constpath; char *path; - gchar *titles[] = { "Name", "Folder", "Typical Files"}; + const gchar *titles[] = { "Name", "Folder", "Typical Files"}; GtkWidget *scrolledwindow; scrolledwindow = scrolled_window_new(NULL, NULL); diff --git a/gtk/ansi_a_stat.c b/gtk/ansi_a_stat.c index cfa2b49c88..e1165c0206 100644 --- a/gtk/ansi_a_stat.c +++ b/gtk/ansi_a_stat.c @@ -271,10 +271,10 @@ ansi_a_stat_gtk_win_destroy_cb( static void ansi_a_stat_gtk_win_create( ansi_a_stat_dlg_t *dlg_p, - char *title) + const char *title) { #define INIT_TABLE_NUM_COLUMNS 3 - char *default_titles[] = { "IEI", "Message Name", "Count" }; + const char *default_titles[] = { "IEI", "Message Name", "Count" }; int i; column_arrows *col_arrows; GtkWidget *column_lb; diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c index 4f686d34a9..5a71cb6cef 100644 --- a/gtk/ansi_map_stat.c +++ b/gtk/ansi_map_stat.c @@ -62,7 +62,7 @@ typedef struct column_arrows { typedef struct _my_columns_t { guint32 value; - gchar *strptr; + const gchar *strptr; GtkJustification just; } my_columns_t; @@ -267,7 +267,7 @@ ansi_map_stat_gtk_win_destroy_cb( static void ansi_map_stat_gtk_win_create( ansi_map_stat_dlg_t *dlg_p, - char *title) + const char *title) { int i; column_arrows *col_arrows; diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 85e4022dfb..2688b41ebc 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -278,7 +278,7 @@ set_link_type_list(GtkWidget *linktype_om, GtkWidget *entry) #define TIME_UNIT_HOUR 2 #define TIME_UNIT_DAY 3 #define MAX_TIME_UNITS 4 -static char *time_unit_name[MAX_TIME_UNITS] = { +static const char *time_unit_name[MAX_TIME_UNITS] = { "second(s)", "minute(s)", "hour(s)", @@ -385,7 +385,7 @@ guint32 value) #define SIZE_UNIT_MEGABYTES 2 #define SIZE_UNIT_GIGABYTES 3 #define MAX_SIZE_UNITS 4 -static char *size_unit_name[MAX_SIZE_UNITS] = { +static const char *size_unit_name[MAX_SIZE_UNITS] = { "byte(s)", "kilobyte(s)", "megabyte(s)", diff --git a/gtk/capture_prefs.c b/gtk/capture_prefs.c index c85c3a0e98..bef43aa646 100644 --- a/gtk/capture_prefs.c +++ b/gtk/capture_prefs.c @@ -251,9 +251,8 @@ ifopts_edit_cb(GtkWidget *w, gpointer data _U_) *cur_opts_fr, *ed_opts_fr, *main_vb, *if_descr_lb, *if_hide_lb, *bbox, *ok_bt, *cancel_bt; - gchar *cur_titles[] = { "Device", "Description", - "Comment", "Hide?" }; - int row = 0; + const gchar *cur_titles[] = { "Device", "Description", "Comment", "Hide?" }; + int row = 0; GtkWidget *caller = gtk_widget_get_toplevel(w); diff --git a/gtk/color_dlg.c b/gtk/color_dlg.c index c85218bf13..cec6125f3f 100644 --- a/gtk/color_dlg.c +++ b/gtk/color_dlg.c @@ -63,7 +63,7 @@ static void remember_selected_row(GtkTreeSelection *sel, gpointer list); #endif static void color_destroy_cb(GtkButton *button, gpointer user_data); static void destroy_edit_dialog_cb(gpointer filter_arg, gpointer dummy); -static void create_new_color_filter(GtkButton *button, char *filter); +static void create_new_color_filter(GtkButton *button, const char *filter); static void color_new_cb(GtkButton *button, gpointer user_data); static void color_props_cb(GtkButton *button, gpointer user_data); static void color_delete_cb(GtkWidget *widget, gpointer user_data); @@ -209,7 +209,7 @@ colorize_dialog_new (char *filter) GtkTreeViewColumn *column; GtkTreeSelection *selection; #endif - gchar *titles[] = { "Name", "String" }; + const gchar *titles[] = { "Name", "String" }; row_selected = -1; /* no row selected */ @@ -903,7 +903,7 @@ color_import_cb(GtkButton *button, gpointer user_data ) /* Create a new filter in the list, and pop up an "Edit color filter" dialog box to edit it. */ static void -create_new_color_filter(GtkButton *button, char *filter) +create_new_color_filter(GtkButton *button, const char *filter) { color_filter_t *colorf; GtkStyle *style; diff --git a/gtk/column_prefs.c b/gtk/column_prefs.c index 63f915917c..b4d2f24d33 100644 --- a/gtk/column_prefs.c +++ b/gtk/column_prefs.c @@ -77,7 +77,7 @@ column_prefs_show() { GList *clp = NULL; fmt_data *cfmt; gint i; - gchar *column_titles[] = {"Title", "Format"}; + const gchar *column_titles[] = {"Title", "Format"}; #if GTK_MAJOR_VERSION < 2 gchar *col_ent[2]; gint row; @@ -423,7 +423,7 @@ column_list_select_cb(GtkTreeSelection *sel, gpointer user_data _U_) static void column_list_new_cb(GtkWidget *w _U_, gpointer data _U_) { fmt_data *cfmt; - gchar *title = "New Column"; + const gchar *title = "New Column"; #if GTK_MAJOR_VERSION < 2 gchar *col_ent[2]; #else diff --git a/gtk/conversations_eth.c b/gtk/conversations_eth.c index 4ed203c483..262590b3b4 100644 --- a/gtk/conversations_eth.c +++ b/gtk/conversations_eth.c @@ -53,9 +53,9 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -eth_conversation_init(char *optarg) +eth_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,eth,",9)){ filter=optarg+9; diff --git a/gtk/conversations_fc.c b/gtk/conversations_fc.c index 8cbd055a46..ed4e12e1e0 100644 --- a/gtk/conversations_fc.c +++ b/gtk/conversations_fc.c @@ -53,9 +53,9 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c static void -fc_conversation_init(char *optarg) +fc_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,fc,",8)){ filter=optarg+8; diff --git a/gtk/conversations_fddi.c b/gtk/conversations_fddi.c index c9db23f57a..135d03865d 100644 --- a/gtk/conversations_fddi.c +++ b/gtk/conversations_fddi.c @@ -53,9 +53,9 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -fddi_conversation_init(char *optarg) +fddi_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,fddi,",10)){ filter=optarg+10; diff --git a/gtk/conversations_ip.c b/gtk/conversations_ip.c index e5b29dbdae..baac47ca88 100644 --- a/gtk/conversations_ip.c +++ b/gtk/conversations_ip.c @@ -51,9 +51,9 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c } static void -ip_conversation_init(char *optarg) +ip_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,ip,",8)){ filter=optarg+8; diff --git a/gtk/conversations_ipx.c b/gtk/conversations_ipx.c index ad564bf043..d397d14263 100644 --- a/gtk/conversations_ipx.c +++ b/gtk/conversations_ipx.c @@ -53,9 +53,9 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -ipx_conversation_init(char *optarg) +ipx_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,ipx,",9)){ filter=optarg+9; diff --git a/gtk/conversations_jxta.c b/gtk/conversations_jxta.c index cc550aec51..29acc7d78b 100644 --- a/gtk/conversations_jxta.c +++ b/gtk/conversations_jxta.c @@ -61,9 +61,9 @@ jxta_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static void -jxta_conversation_init(char *optarg) +jxta_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,jxta,",10)){ filter=optarg+10; diff --git a/gtk/conversations_sctp.c b/gtk/conversations_sctp.c index cfe36031dc..2a62cec083 100644 --- a/gtk/conversations_sctp.c +++ b/gtk/conversations_sctp.c @@ -1,7 +1,7 @@ /* conversations_sctp.c * conversations_sctp 2005 Oleg Terletsky * - * $Id:$ + * $Id$ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -62,9 +62,9 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -sctp_conversation_init(char *optarg) +sctp_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,sctp,",10)){ filter=optarg+10; diff --git a/gtk/conversations_table.c b/gtk/conversations_table.c index fa655af3e2..921c9f535f 100644 --- a/gtk/conversations_table.c +++ b/gtk/conversations_table.c @@ -100,7 +100,7 @@ ct_port_to_str(int port_type, guint32 port) of protocols, either ethernet, tokenring, fddi etc so we must be more specific there thats why we need specific_addr_type */ -static char * +static const char * ct_get_filter_name(address *addr, int specific_addr_type, int port_type, int name_type) { switch(name_type){ @@ -1154,7 +1154,7 @@ copy_as_csv_cb(GtkWindow *win _U_, gpointer data) static gboolean -init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func) +init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func) { int i; column_arrows *col_arrows; @@ -1273,7 +1273,7 @@ init_ct_table_page(conversations_table *conversations, GtkWidget *vbox, gboolean void -init_conversation_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func) +init_conversation_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func) { conversations_table *conversations; char title[256]; @@ -1352,7 +1352,7 @@ ct_win_destroy_notebook_cb(GtkWindow *win _U_, gpointer data) static conversations_table * -init_ct_notebook_page_cb(gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func) +init_ct_notebook_page_cb(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func) { gboolean ret; GtkWidget *page_vbox; @@ -1378,9 +1378,9 @@ init_ct_notebook_page_cb(gboolean hide_ports, char *table_name, char *tap_name, typedef struct { gboolean hide_ports; /* hide TCP / UDP port columns */ - char *table_name; /* GUI output name */ - char *tap_name; /* internal name */ - char *filter; /* display filter string (unused) */ + const char *table_name; /* GUI output name */ + const char *tap_name; /* internal name */ + const char *filter; /* display filter string (unused) */ tap_packet_cb packet_func; /* function to be called for new incoming packets */ } register_ct_t; @@ -1388,7 +1388,7 @@ typedef struct { static GSList *registered_ct_tables = NULL; void -register_conversation_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func) +register_conversation_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func) { register_ct_t *table; @@ -1616,7 +1616,7 @@ add_conversation_table_data(conversations_table *ct, const address *src, const a /* if this was a new conversation we have to create a clist row for it */ if(new_conversation){ - char *entries[NUM_COLS]; + const char *entries[NUM_COLS]; char frames[16],bytes[16],txframes[16],txbytes[16],rxframes[16],rxbytes[16]; /* these values will be filled by call to draw_ct_table_addresses() below */ diff --git a/gtk/conversations_table.h b/gtk/conversations_table.h index c4c8af2c51..783fad0dae 100644 --- a/gtk/conversations_table.h +++ b/gtk/conversations_table.h @@ -47,13 +47,13 @@ typedef struct _conversation_t { /** Conversation widget */ typedef struct _conversations_table { - char *name; /**< the name of the table */ + const char *name; /**< the name of the table */ GtkWidget *win; /**< GTK window */ GtkWidget *page_lb; /**< label */ GtkWidget *scrolled_window; /**< the scrolled window */ GtkCList *table; /**< the GTK table */ guint32 num_columns; /**< number of columns in the above table */ - char *default_titles[10]; /**< Column headers */ + const char *default_titles[10]; /**< Column headers */ GtkWidget *menu; /**< context menu */ gboolean has_ports; /**< table has ports */ guint32 num_conversations; /**< number of conversations */ @@ -69,7 +69,7 @@ typedef struct _conversations_table { * @param filter the optional filter name or NULL * @param packet_func the function to be called for each incoming packet */ -extern void register_conversation_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func); +extern void register_conversation_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func); /** Init the conversation table for the single conversation window. * @@ -79,7 +79,7 @@ extern void register_conversation_table(gboolean hide_ports, char *table_name, c * @param filter the optional filter name or NULL * @param packet_func the function to be called for each incoming packet */ -extern void init_conversation_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func); +extern void init_conversation_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func); /** Callback for "Conversations" statistics item. * diff --git a/gtk/conversations_tcpip.c b/gtk/conversations_tcpip.c index 7500e65fb1..f35051275b 100644 --- a/gtk/conversations_tcpip.c +++ b/gtk/conversations_tcpip.c @@ -53,9 +53,9 @@ tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ static void -tcpip_conversation_init(char *optarg) +tcpip_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,tcp,",9)){ filter=optarg+9; diff --git a/gtk/conversations_tr.c b/gtk/conversations_tr.c index 8884e66249..ad7252fca6 100644 --- a/gtk/conversations_tr.c +++ b/gtk/conversations_tr.c @@ -53,9 +53,9 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c static void -tr_conversation_init(char *optarg) +tr_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,tr,",8)){ filter=optarg+8; diff --git a/gtk/conversations_udpip.c b/gtk/conversations_udpip.c index f24dae9b26..9e66323065 100644 --- a/gtk/conversations_udpip.c +++ b/gtk/conversations_udpip.c @@ -53,9 +53,9 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ static void -udpip_conversation_init(char *optarg) +udpip_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,udp,",9)){ filter=optarg+9; diff --git a/gtk/conversations_wlan.c b/gtk/conversations_wlan.c index a2312a04c4..88e76be369 100644 --- a/gtk/conversations_wlan.c +++ b/gtk/conversations_wlan.c @@ -53,9 +53,9 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -wlan_conversation_init(char *optarg) +wlan_conversation_init(const char *optarg) { - char *filter=NULL; + const char *filter=NULL; if(!strncmp(optarg,"conv,wlan,",10)){ filter=optarg+10; diff --git a/gtk/decode_as_dcerpc.c b/gtk/decode_as_dcerpc.c index f5e91efb66..9bc0be532a 100644 --- a/gtk/decode_as_dcerpc.c +++ b/gtk/decode_as_dcerpc.c @@ -196,7 +196,7 @@ decode_dcerpc_reset_all(void) /* remove a binding (looking the same way as the given one) */ static void decode_dcerpc_binding_reset( -gchar *table_name _U_, +const gchar *table_name _U_, decode_dcerpc_bind_values_t *binding) { GSList *le; @@ -224,7 +224,7 @@ decode_dcerpc_bind_values_t *binding) /* a binding has changed (remove a previously existing one) */ static void decode_dcerpc_binding_change( -gchar *table_name, +const gchar *table_name, decode_dcerpc_bind_values_t *binding) { @@ -241,7 +241,7 @@ decode_dcerpc_bind_values_t *binding) /* a binding has changed (add/replace/remove it) */ static void -decode_change_one_dcerpc_binding(gchar *table_name, decode_dcerpc_bind_values_t *binding, GtkWidget *list) +decode_change_one_dcerpc_binding(const gchar *table_name, decode_dcerpc_bind_values_t *binding, GtkWidget *list) { dcerpc_uuid_key *key; gchar *abbrev; @@ -308,7 +308,7 @@ static void decode_dcerpc(GtkWidget *notebook_pg) { GtkWidget *list; - gchar *table_name; + const gchar *table_name; decode_dcerpc_bind_values_t *binding; @@ -347,7 +347,7 @@ decode_dcerpc_add_to_list(gpointer key, gpointer value, gpointer user_data) /* add all interfaces to the list */ static GtkWidget * -decode_add_dcerpc_menu (GtkWidget *page, gchar *table_name _U_) +decode_add_dcerpc_menu (GtkWidget *page, const gchar *table_name _U_) { GtkWidget *scrolled_window; GtkWidget *list; diff --git a/gtk/decode_as_dcerpc.h b/gtk/decode_as_dcerpc.h index 6b1dcc26eb..07a6765b6a 100644 --- a/gtk/decode_as_dcerpc.h +++ b/gtk/decode_as_dcerpc.h @@ -124,7 +124,7 @@ const gchar *current_proto_name); * to store any information generated by this routine. */ extern void -decode_add_to_list (gchar *table_name, const gchar *proto_name, gpointer value, gpointer user_data); +decode_add_to_list (const gchar *table_name, const gchar *proto_name, gpointer value, gpointer user_data); /* * This routine starts the creation of a List on a notebook page. It diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c index 0e270c6b65..8033d707d4 100644 --- a/gtk/decode_as_dlg.c +++ b/gtk/decode_as_dlg.c @@ -265,7 +265,7 @@ gchar *selector_name, const gchar *initial_proto_name, const gchar *current_proto_name) { - gchar *text[E_LIST_D_COLUMNS]; + const gchar *text[E_LIST_D_COLUMNS]; #if GTK_MAJOR_VERSION < 2 GtkCList *clist; gint row; @@ -280,10 +280,10 @@ const gchar *current_proto_name) store = (GtkListStore *)list_data; #endif - text[E_LIST_D_TABLE] = (char *)table_name; + text[E_LIST_D_TABLE] = table_name; text[E_LIST_D_SELECTOR] = selector_name; - text[E_LIST_D_INITIAL] = (char *)initial_proto_name; - text[E_LIST_D_CURRENT] = (char *)current_proto_name; + text[E_LIST_D_INITIAL] = initial_proto_name; + text[E_LIST_D_CURRENT] = current_proto_name; #if GTK_MAJOR_VERSION < 2 row = gtk_clist_prepend(clist, text); #else @@ -523,7 +523,7 @@ void decode_show_cb (GtkWidget * w _U_, gpointer data _U_) { GtkWidget *main_vb, *bbox, *ok_bt, *clear_bt, *help_bt, *scrolled_window; - gchar *titles[E_LIST_D_COLUMNS] = { + const gchar *titles[E_LIST_D_COLUMNS] = { "Table", "Value", "Initial", "Current" }; gint column; @@ -1230,9 +1230,9 @@ lookup_handle(GtkTreeModel *model, GtkTreePath *path _U_, GtkTreeIter *iter, * to store any information generated by this routine. */ void -decode_add_to_list (gchar *table_name, const gchar *proto_name, gpointer value, gpointer user_data) +decode_add_to_list (const gchar *table_name, const gchar *proto_name, gpointer value, gpointer user_data) { - gchar *text[E_LIST_S_COLUMNS]; + const gchar *text[E_LIST_S_COLUMNS]; #if GTK_MAJOR_VERSION < 2 GtkCList *list; gint row; @@ -1263,7 +1263,7 @@ decode_add_to_list (gchar *table_name, const gchar *proto_name, gpointer value, if (hli.found) return; #endif - text[E_LIST_S_PROTO_NAME] = (char *)proto_name; + text[E_LIST_S_PROTO_NAME] = proto_name; text[E_LIST_S_TABLE] = table_name; #if GTK_MAJOR_VERSION < 2 row = gtk_clist_prepend(list, text); @@ -1387,7 +1387,7 @@ decode_list_menu_start(GtkWidget *page, GtkWidget **list_p, void decode_list_menu_finish(GtkWidget *list) { - gchar *text[E_LIST_S_COLUMNS]; + const gchar *text[E_LIST_S_COLUMNS]; #if GTK_MAJOR_VERSION < 2 gint row; #else @@ -1432,7 +1432,7 @@ decode_list_menu_finish(GtkWidget *list) * scrolled window. */ static GtkWidget * -decode_add_simple_menu (GtkWidget *page, gchar *table_name) +decode_add_simple_menu (GtkWidget *page, const gchar *table_name) { GtkWidget *scrolled_window; GtkWidget *list; @@ -1469,7 +1469,7 @@ decode_add_simple_menu (GtkWidget *page, gchar *table_name) * routine. */ static GtkWidget * -decode_add_simple_page (gchar *prompt, gchar *title, gchar *table_name, +decode_add_simple_page (const gchar *prompt, const gchar *title, const gchar *table_name, guint value) { GtkWidget *page, *label, *scrolled_window; @@ -1520,7 +1520,7 @@ decode_add_simple_page (gchar *prompt, gchar *title, gchar *table_name, * this routine. */ static GtkWidget * -decode_add_tcpudp_page (gchar *prompt, gchar *table_name) +decode_add_tcpudp_page (const gchar *prompt, const gchar *table_name) { GtkWidget *page, *label, *scrolled_window, *optmenu; @@ -1723,7 +1723,7 @@ decode_sctp_add_port_ppid (GtkWidget *page) static GtkWidget * -decode_add_sctp_page (gchar *prompt, gchar *table_name) +decode_add_sctp_page (const gchar *prompt, const gchar *table_name) { GtkWidget *page, *label, *scrolled_window, *radio, *vbox, *alignment, *sctpbox, *sctpmenu; diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c index a98dda5220..515fc7b2f8 100644 --- a/gtk/dfilter_expr_dlg.c +++ b/gtk/dfilter_expr_dlg.c @@ -77,7 +77,7 @@ typedef struct protocol_data { static void show_relations(GtkWidget *relation_list, ftenum_t ftype); static gboolean relation_is_presence_test(const char *string); -static void add_relation_list(GtkWidget *relation_list, char *relation, gboolean sensitive); +static void add_relation_list(GtkWidget *relation_list, const char *relation, gboolean sensitive); static void build_boolean_values(GtkWidget *value_list_scrolled_win, GtkWidget *value_list, const true_false_string *values); @@ -297,7 +297,7 @@ relation_is_presence_test(const char *string) } static void -add_relation_list(GtkWidget *relation_list, char *relation, gboolean sensitive) +add_relation_list(GtkWidget *relation_list, const char *relation, gboolean sensitive) { #if GTK_MAJOR_VERSION < 2 GtkWidget *label, *item; @@ -431,7 +431,7 @@ build_boolean_values(GtkWidget *value_list_scrolled_win, GtkWidget *value_list, */ if (values == NULL) values = &true_false; - add_value_list_item(value_list, values->true_string, (gpointer)values); + add_value_list_item(value_list, values->true_string, values); add_value_list_item(value_list, values->false_string, NULL); /* @@ -488,7 +488,7 @@ build_enum_values(GtkWidget *value_list_scrolled_win _U_, GtkWidget *value_list, */ while (values->strptr != NULL) { add_value_list_item(value_list, values->strptr, - (gpointer)values); + values); values++; } diff --git a/gtk/dlg_utils.c b/gtk/dlg_utils.c index 444ba93176..72c53bd12d 100644 --- a/gtk/dlg_utils.c +++ b/gtk/dlg_utils.c @@ -63,7 +63,7 @@ static void file_selection_browse_destroy_cb(GtkWidget *win, GtkWidget* file_te) /* create a button for the button row (helper for dlg_button_row_new) */ static GtkWidget * -dlg_button_new(GtkWidget *hbox, GtkWidget *button_hbox, gchar *stock_id) +dlg_button_new(GtkWidget *hbox, GtkWidget *button_hbox, const gchar *stock_id) { GtkWidget *button; @@ -87,32 +87,32 @@ dlg_button_new(GtkWidget *hbox, GtkWidget *button_hbox, gchar *stock_id) * GTK2 (e.g. GNOME) "Apply" "Cancel" "OK" */ GtkWidget * -dlg_button_row_new(gchar *stock_id_first, ...) +dlg_button_row_new(const gchar *stock_id_first, ...) { gint buttons = 0; va_list stock_id_list; - gchar *stock_id = stock_id_first; + const gchar *stock_id = stock_id_first; GtkWidget *hbox; GtkWidget *button_hbox; GtkWidget *help_hbox; GtkWidget *button; - gchar *ok = NULL; - gchar *apply = NULL; - gchar *save = NULL; - gchar *dont_save = NULL; - gchar *cancel = NULL; - gchar *close = NULL; - gchar *clear = NULL; - gchar *start = NULL; - gchar *stop = NULL; - gchar *create_stat = NULL; - gchar *help = NULL; - gchar *print = NULL; - gchar *find = NULL; - gchar *jump = NULL; - gchar *yes = NULL; - gchar *no = NULL; + const gchar *ok = NULL; + const gchar *apply = NULL; + const gchar *save = NULL; + const gchar *dont_save = NULL; + const gchar *cancel = NULL; + const gchar *close = NULL; + const gchar *clear = NULL; + const gchar *start = NULL; + const gchar *stop = NULL; + const gchar *create_stat = NULL; + const gchar *help = NULL; + const gchar *print = NULL; + const gchar *find = NULL; + const gchar *jump = NULL; + const gchar *yes = NULL; + const gchar *no = NULL; va_start(stock_id_list, stock_id_first); diff --git a/gtk/dlg_utils.h b/gtk/dlg_utils.h index f0cba2c98e..478a7ff7ce 100644 --- a/gtk/dlg_utils.h +++ b/gtk/dlg_utils.h @@ -166,7 +166,7 @@ extern void set_last_open_dir(char *dirname); * @return the new button row * @todo move this to ui_util.h */ -extern GtkWidget *dlg_button_row_new(gchar *stock_id_first, ...); +extern GtkWidget *dlg_button_row_new(const gchar *stock_id_first, ...); /** Set the "activate" signal for a widget to call a routine to * activate the "OK" button for a dialog box. diff --git a/gtk/file_dlg.c b/gtk/file_dlg.c index 8fcf6a1a79..6493738dea 100644 --- a/gtk/file_dlg.c +++ b/gtk/file_dlg.c @@ -359,7 +359,7 @@ file_open_entry_changed(GtkWidget *w _U_, gpointer file_sel) /* copied from summary_dlg.c */ static GtkWidget * -add_string_to_table_sensitive(GtkWidget *list, guint *row, gchar *title, gchar *value, gboolean sensitive) +add_string_to_table_sensitive(GtkWidget *list, guint *row, const gchar *title, const gchar *value, gboolean sensitive) { GtkWidget *label; gchar *indent; @@ -386,7 +386,7 @@ add_string_to_table_sensitive(GtkWidget *list, guint *row, gchar *title, gchar * } static GtkWidget * -add_string_to_table(GtkWidget *list, guint *row, gchar *title, gchar *value) +add_string_to_table(GtkWidget *list, guint *row, const gchar *title, const gchar *value) { return add_string_to_table_sensitive(list, row, title, value, TRUE); } diff --git a/gtk/filter_dlg.c b/gtk/filter_dlg.c index 775550b811..ec06e0de48 100644 --- a/gtk/filter_dlg.c +++ b/gtk/filter_dlg.c @@ -813,7 +813,7 @@ filter_dlg_save_cb(GtkWidget *save_bt _U_, gpointer data) char *pf_dir_path; char *f_path; int f_save_errno; - char *filter_type; + const char *filter_type; /* Create the directory that holds personal configuration files, if necessary. */ diff --git a/gtk/filter_dlg.h b/gtk/filter_dlg.h index 9f20ab9f2c..f6049c5b6c 100644 --- a/gtk/filter_dlg.h +++ b/gtk/filter_dlg.h @@ -38,7 +38,7 @@ * created. */ typedef struct { - gchar *title; /**< title of dialog box */ + const gchar *title; /**< title of dialog box */ gboolean wants_apply_button; /**< dialog should have an Apply button */ gboolean activate_on_ok; /**< if parent text widget should be activated on "Ok" or "Apply" */ diff --git a/gtk/find_dlg.c b/gtk/find_dlg.c index 2261e67a89..cbd5ab9f15 100644 --- a/gtk/find_dlg.c +++ b/gtk/find_dlg.c @@ -783,7 +783,7 @@ find_previous_cb(GtkWidget *w , gpointer d) /* this function jumps to the next packet matching the filter */ void -find_previous_next_frame_with_filter(char *filter, gboolean backwards) +find_previous_next_frame_with_filter(const char *filter, gboolean backwards) { dfilter_t *sfcode; gboolean sbackwards_saved; diff --git a/gtk/find_dlg.h b/gtk/find_dlg.h index 41ddfe3c4c..46fc2cc1fb 100644 --- a/gtk/find_dlg.h +++ b/gtk/find_dlg.h @@ -63,6 +63,6 @@ extern void find_frame_with_filter(char *filter); * @param filter the filter string * @param backwards TRUE, if searching should be done backwards */ -extern void find_previous_next_frame_with_filter(char *filter, gboolean backwards); +extern void find_previous_next_frame_with_filter(const char *filter, gboolean backwards); #endif /* find_dlg.h */ diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c index 55e9e15206..2eaa75e1d2 100644 --- a/gtk/flow_graph.c +++ b/gtk/flow_graph.c @@ -241,7 +241,7 @@ int flow_graph_tcp_add_to_graph(packet_info *pinfo, const struct tcpheader *tcph { graph_analysis_item_t *gai; /* copied from packet-tcp */ - gchar *fstr[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR" }; + const gchar *fstr[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR" }; guint i, bpos; guint fpos = 0; gchar flags[64] = ""; @@ -524,7 +524,7 @@ static void flow_graph_dlg_create (void) /* init function for tap */ static void -flow_graph_init_tap(char *dummy _U_) +flow_graph_init_tap(const char *dummy _U_) { /* initialize graph items store */ diff --git a/gtk/gsm_a_stat.c b/gtk/gsm_a_stat.c index 5c8a0e5e7f..e34b4347a2 100644 --- a/gtk/gsm_a_stat.c +++ b/gtk/gsm_a_stat.c @@ -358,10 +358,10 @@ gsm_a_stat_gtk_win_destroy_cb( static void gsm_a_stat_gtk_win_create( gsm_a_stat_dlg_t *dlg_p, - char *title) + const char *title) { #define INIT_TABLE_NUM_COLUMNS 3 - char *default_titles[] = { "IEI", "Message Name", "Count" }; + const char *default_titles[] = { "IEI", "Message Name", "Count" }; int i; column_arrows *col_arrows; GtkWidget *column_lb; @@ -506,7 +506,7 @@ gsm_a_stat_gtk_dtap_cb( GtkWidget *w _U_, gpointer d _U_, gsm_a_stat_dlg_t *dlg_dtap_p, - char *title, + const char *title, const value_string *dtap_msg_strings) { int i; diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c index e563f4fc79..2f8221126e 100644 --- a/gtk/gsm_map_stat.c +++ b/gtk/gsm_map_stat.c @@ -65,7 +65,7 @@ typedef struct column_arrows { typedef struct _my_columns_t { guint32 value; - gchar *strptr; + const gchar *strptr; GtkJustification just; } my_columns_t; @@ -300,7 +300,7 @@ gsm_map_stat_gtk_win_destroy_cb( static void gsm_map_stat_gtk_win_create( gsm_map_stat_dlg_t *dlg_p, - char *title) + const char *title) { int i; column_arrows *col_arrows; diff --git a/gtk/gtk_stat_util.c b/gtk/gtk_stat_util.c index 343bf2bcbe..bc96023b69 100644 --- a/gtk/gtk_stat_util.c +++ b/gtk/gtk_stat_util.c @@ -74,7 +74,7 @@ add_table_entry(gtk_table *tab, const char *str, int x, int y) /* init a main windowfor stats, set title and display used filter in window */ void -init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, char *title, char *filter) +init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, const char *title, const char *filter) { GtkWidget *main_label; GtkWidget *filter_label; @@ -101,7 +101,7 @@ init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, char *title, char * /* create a table, using a scrollable gtkclist */ GtkCList * -create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, char *titles[]) +create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, const char *titles[]) { GtkCList *table; int i; diff --git a/gtk/gtk_stat_util.h b/gtk/gtk_stat_util.h index 4cbb6a011b..3287cab81d 100644 --- a/gtk/gtk_stat_util.h +++ b/gtk/gtk_stat_util.h @@ -41,7 +41,7 @@ * @param title the title for the window * @param filter the filter string */ -extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, char *title, char *filter); +extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, const char *title, const char *filter); /** Create a stats table, using a scrollable gtkclist. * @@ -50,6 +50,6 @@ extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, char *t * @param columns number of columns * @param titles */ -extern GtkCList *create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, char *titles[]); +extern GtkCList *create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, const char *titles[]); #endif diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c index 24894402b9..e6d1c6095d 100644 --- a/gtk/h225_counter.c +++ b/gtk/h225_counter.c @@ -497,7 +497,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) } -static gchar *titles[]={"Message Type or Reason", +static const gchar *titles[]={"Message Type or Reason", "Count" }; static void diff --git a/gtk/h225_ras_srt.c b/gtk/h225_ras_srt.c index add30db5cf..57b9399352 100644 --- a/gtk/h225_ras_srt.c +++ b/gtk/h225_ras_srt.c @@ -268,7 +268,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) } -static gchar *titles[]={"RAS-Type", +static const gchar *titles[]={"RAS-Type", "Measurements", "Min RTT", "Max RTT", diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c index dc34285e6c..91810117b5 100644 --- a/gtk/help_dlg.c +++ b/gtk/help_dlg.c @@ -223,7 +223,7 @@ gboolean topic_available(topic_action_e action) { /* * Open the help dialog and show a specific help page. */ -static void help_topic(gchar *topic) { +static void help_topic(const gchar *topic) { gchar *page_topic; GtkWidget *help_nb; GSList *help_page_ent; diff --git a/gtk/hostlist_eth.c b/gtk/hostlist_eth.c index b7a93c3cd5..8a97687401 100644 --- a/gtk/hostlist_eth.c +++ b/gtk/hostlist_eth.c @@ -58,7 +58,7 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons static void -gtk_eth_hostlist_init(char *optarg) +gtk_eth_hostlist_init(const char *optarg) { char *filter=NULL; diff --git a/gtk/hostlist_table.c b/gtk/hostlist_table.c index b294c5b4b0..538de0ed88 100644 --- a/gtk/hostlist_table.c +++ b/gtk/hostlist_table.c @@ -94,7 +94,7 @@ hostlist_port_to_str(int port_type, guint32 port) of protocols, either ethernet, tokenring, fddi etc so we must be more specific there thats why we need specific_addr_type */ -static char * +static const char * hostlist_get_filter_name(address *addr, int specific_addr_type, int port_type, int name_type) { switch(name_type){ @@ -617,7 +617,7 @@ copy_as_csv_cb(GtkWindow *win _U_, gpointer data) static gboolean -init_hostlist_table_page(hostlist_table *hosttable, GtkWidget *vbox, gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func) +init_hostlist_table_page(hostlist_table *hosttable, GtkWidget *vbox, gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func) { int i; column_arrows *col_arrows; @@ -1041,7 +1041,7 @@ add_hostlist_table_data(hostlist_table *hl, const address *addr, guint32 port, g /* if this was a new talker we have to create a clist row for it */ if(new_talker){ - char *entries[NUM_COLS]; + const char *entries[NUM_COLS]; char frames[16],bytes[16],txframes[16],txbytes[16],rxframes[16],rxbytes[16]; /* these values will be filled by call to draw_hostlist_table_addresses() below */ diff --git a/gtk/hostlist_table.h b/gtk/hostlist_table.h index cea976aabb..17f78e7285 100644 --- a/gtk/hostlist_table.h +++ b/gtk/hostlist_table.h @@ -50,7 +50,7 @@ typedef struct _hostlist_table { GtkWidget *scrolled_window; /**< the scrolled window */ GtkCList *table; /**< the GTK table */ guint32 num_columns; /**< number of columns in the above table */ - char *default_titles[8]; /**< Column headers */ + const char *default_titles[8]; /**< Column headers */ GtkWidget *menu; /**< context menu */ gboolean has_ports; /**< table has ports */ guint32 num_hosts; /**< number of hosts (0 or 1) */ @@ -76,7 +76,7 @@ extern void register_hostlist_table(gboolean hide_ports, char *table_name, char * @param filter the optional filter name or NULL * @param packet_func the function to be called for each incoming packet */ -extern void init_hostlist_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, tap_packet_cb packet_func); +extern void init_hostlist_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func); /** Callback for "Endpoints" statistics item. * diff --git a/gtk/main.c b/gtk/main.c index ec93f57d0f..0759d62be0 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -343,7 +343,7 @@ selected_ptree_info_cb(GtkWidget *widget _U_, gpointer data _U_) "Hint 2: If you want to add a new protocol page, you should use the ProtocolTemplate,\n" "which will save you a lot of editing and will give a consistent look over the pages.", proto_abbrev, proto_abbrev); - simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, (gpointer) proto_abbrev); + simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, proto_abbrev); } } diff --git a/gtk/menu.c b/gtk/menu.c index ab9a189631..d722b28a31 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -649,7 +649,7 @@ static GList * tap_menu_item_add( */ void register_tap_menu_item( - char *name, + const char *name, REGISTER_TAP_GROUP_E group, GtkItemFactoryCallback callback, gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *), @@ -657,7 +657,7 @@ register_tap_menu_item( gpointer callback_data) { /*static const char toolspath[] = "/Statistics/";*/ - char *toolspath; + const char *toolspath; char *p; char *menupath; size_t menupathlen; @@ -932,7 +932,7 @@ set_menu_sensitivity(GtkItemFactory *ifactory, const gchar *path, gint val) } static void -set_menu_object_data_meat(GtkItemFactory *ifactory, gchar *path, gchar *key, gpointer data) +set_menu_object_data_meat(GtkItemFactory *ifactory, const gchar *path, const gchar *key, gpointer data) { GtkWidget *menu = NULL; @@ -941,7 +941,7 @@ set_menu_object_data_meat(GtkItemFactory *ifactory, gchar *path, gchar *key, gpo } void -set_menu_object_data (gchar *path, gchar *key, gpointer data) { +set_menu_object_data (const gchar *path, const gchar *key, gpointer data) { GSList *menu_list = popup_menu_list; gchar *shortpath = strrchr(path, '/'); diff --git a/gtk/menu.h b/gtk/menu.h index 6fb1ef044b..b4c0cc3c28 100644 --- a/gtk/menu.h +++ b/gtk/menu.h @@ -72,7 +72,7 @@ extern GtkWidget *main_menu_new(GtkAccelGroup **accel); * @param key the key to set * @param data the data to set */ -extern void set_menu_object_data(gchar *path, gchar *key, gpointer data); +extern void set_menu_object_data(const gchar *path, const gchar *key, gpointer data); /** The popup menu handler. * diff --git a/gtk/packet_list.c b/gtk/packet_list.c index 8f3399b74d..36345bc89d 100644 --- a/gtk/packet_list.c +++ b/gtk/packet_list.c @@ -558,10 +558,10 @@ packet_list_set_column_titles(void) win_style = gtk_widget_get_style(top_level); ascend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &ascend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_ascend_xpm); + clist_ascend_xpm); descend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &descend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_descend_xpm); + clist_descend_xpm); col_arrows = (column_arrows *) g_malloc(sizeof(column_arrows) * cfile.cinfo.num_cols); @@ -702,7 +702,7 @@ packet_list_append(const gchar *text[], gpointer data) { gint row; - row = eth_clist_append(ETH_CLIST(packet_list), (gchar **)text); + row = eth_clist_append(ETH_CLIST(packet_list), text); eth_clist_set_row_data(ETH_CLIST(packet_list), row, data); return row; } diff --git a/gtk/plugins_dlg.c b/gtk/plugins_dlg.c index 536c891137..90d4f47c8d 100644 --- a/gtk/plugins_dlg.c +++ b/gtk/plugins_dlg.c @@ -56,7 +56,7 @@ plugins_scan(GtkWidget *list) { plugin *pt_plug; GString *type; - char *sep; + const char *sep; pt_plug = plugin_list; while (pt_plug) @@ -88,7 +88,7 @@ about_plugins_page_new(void) { GtkWidget *scrolledwindow; GtkWidget *plugins_list; - gchar *titles[] = {"Name", "Version", "Type"}; + const gchar *titles[] = {"Name", "Version", "Type"}; scrolledwindow = scrolled_window_new(NULL, NULL); diff --git a/gtk/print_dlg.c b/gtk/print_dlg.c index 390997d765..31c2395fe4 100644 --- a/gtk/print_dlg.c +++ b/gtk/print_dlg.c @@ -72,7 +72,7 @@ typedef enum { */ static GtkWidget * -open_print_dialog(char *title, output_action_e action, print_args_t *args); +open_print_dialog(const char *title, output_action_e action, print_args_t *args); static void print_cmd_toggle_dest(GtkWidget *widget, gpointer data); static void print_cmd_toggle_detail(GtkWidget *widget, gpointer data); static void print_ok_cb(GtkWidget *ok_bt, gpointer parent_w); @@ -388,7 +388,7 @@ print_browse_file_cb(GtkWidget *file_bt, GtkWidget *file_te) /* Open the print dialog */ static GtkWidget * -open_print_dialog(char *title, output_action_e action, print_args_t *args) +open_print_dialog(const char *title, output_action_e action, print_args_t *args) { #if GTK_MAJOR_VERSION < 2 GtkAccelGroup *accel_group; diff --git a/gtk/proto_dlg.c b/gtk/proto_dlg.c index fae7399986..f8f673bf0e 100644 --- a/gtk/proto_dlg.c +++ b/gtk/proto_dlg.c @@ -98,7 +98,7 @@ proto_cb(GtkWidget *w _U_, gpointer data _U_) GtkWidget *main_vb, *bbox, *proto_list, *label, *proto_sw, *proto_frame, *proto_vb, *button; - gchar *titles[] = { "Status", "Protocol", "Description" }; + const gchar *titles[] = { "Status", "Protocol", "Description" }; #if GTK_MAJOR_VERSION < 2 gint width; #else diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c index 2fca557d65..a9025ef39b 100644 --- a/gtk/proto_draw.c +++ b/gtk/proto_draw.c @@ -1019,8 +1019,8 @@ packet_hex_print_common(GtkTextView *bv, const guint8 *pd, int len, int bstart, #else GtkTextBuffer *buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(bv)); GtkTextIter iter; - char *revstyle; - gchar *convline; + const char *revstyle; + const gchar *convline; gsize newsize; GtkTextMark *mark = NULL; #endif diff --git a/gtk/proto_hier_stats_dlg.c b/gtk/proto_hier_stats_dlg.c index 5ede8330df..bed0dc2570 100644 --- a/gtk/proto_hier_stats_dlg.c +++ b/gtk/proto_hier_stats_dlg.c @@ -75,7 +75,7 @@ fill_in_tree_node(GNode *node, gpointer data) gboolean is_leaf; draw_info_t child_di; double seconds; - gchar *text[NUM_STAT_COLUMNS]; + const gchar *text[NUM_STAT_COLUMNS]; #if GTK_MAJOR_VERSION < 2 GtkCTree *tree = di->tree; GtkCTreeNode *parent = di->parent; @@ -96,7 +96,7 @@ fill_in_tree_node(GNode *node, gpointer data) seconds = ps->last_time - ps->first_time; - text[0] = (gchar *) stats->hfinfo->name; + text[0] = stats->hfinfo->name; text[1] = g_strdup_printf("%6.2f%%", PCT(stats->num_pkts_total, ps->tot_packets)); text[2] = g_strdup_printf("%u", stats->num_pkts_total); diff --git a/gtk/recent.c b/gtk/recent.c index 84120be319..7849d5e99f 100644 --- a/gtk/recent.c +++ b/gtk/recent.c @@ -72,7 +72,7 @@ extern void add_menu_recent_capture_file(gchar *file); recent_settings_t recent; -static char *ts_type_text[] = +static const char *ts_type_text[] = { "RELATIVE", "ABSOLUTE", "ABSOLUTE_WITH_DATE", "DELTA", NULL }; /* Takes an string and a pointer to an array of strings, and a default int value. @@ -81,7 +81,7 @@ static char *ts_type_text[] = * default value that was passed as the third argument is returned. */ static int -find_index_from_string_array(char *needle, char **haystack, int default_value) +find_index_from_string_array(const char *needle, const char **haystack, int default_value) { int i = 0; diff --git a/gtk/sctp_error_dlg.c b/gtk/sctp_error_dlg.c index 98e16fca6a..3b6a5b1a6d 100644 --- a/gtk/sctp_error_dlg.c +++ b/gtk/sctp_error_dlg.c @@ -149,7 +149,7 @@ gtk_sctperror_dlg(void) GtkWidget *bt_frame; GtkWidget *bt_close; - gchar *titles[NUM_COLS] = {"Framenumber","Chunk Types", "Info"}; + const gchar *titles[NUM_COLS] = {"Framenumber","Chunk Types", "Info"}; column_arrows *col_arrows; GtkStyle *win_style; GtkWidget *column_lb; diff --git a/gtk/sctp_stat.h b/gtk/sctp_stat.h index 6dd87cbf2d..9bf7d6de2d 100644 --- a/gtk/sctp_stat.h +++ b/gtk/sctp_stat.h @@ -201,7 +201,7 @@ typedef struct _sctp_assoc_info { typedef struct _sctp_error_info { guint32 frame_number; gchar chunk_info[200]; - gchar *info_text; + const gchar *info_text; } sctp_error_info_t; diff --git a/gtk/service_response_time_table.c b/gtk/service_response_time_table.c index 4e751fb23b..9281766de0 100644 --- a/gtk/service_response_time_table.c +++ b/gtk/service_response_time_table.c @@ -336,7 +336,7 @@ init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox, const char * GdkPixmap *ascend_pm, *descend_pm; GtkStyle *win_style; GtkWidget *column_lb; - char *default_titles[] = { "Index", "Procedure", "Calls", "Min SRT", "Max SRT", "Avg SRT" }; + const char *default_titles[] = { "Index", "Procedure", "Calls", "Min SRT", "Max SRT", "Avg SRT" }; if(filter_string){ diff --git a/gtk/tap_menu.h b/gtk/tap_menu.h index d791343eea..3a7de2a08d 100644 --- a/gtk/tap_menu.h +++ b/gtk/tap_menu.h @@ -73,7 +73,7 @@ typedef enum { * @param callback_data data for callback function */ extern void register_tap_menu_item( - char *name, + const char *name, REGISTER_TAP_GROUP_E group, GtkItemFactoryCallback callback, gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *), diff --git a/gtk/ui_util.c b/gtk/ui_util.c index 799c5c07bf..3c4c560ca1 100644 --- a/gtk/ui_util.c +++ b/gtk/ui_util.c @@ -957,7 +957,7 @@ simple_list_append(GtkWidget *list, ...) /* create a simple list widget */ GtkWidget * -simple_list_new(gint cols, gchar **titles) { +simple_list_new(gint cols, const gchar **titles) { GtkWidget *plugins_list; #if GTK_MAJOR_VERSION >= 2 int i; @@ -1025,7 +1025,7 @@ copy_to_clipboard(GString *str) * (Or ignore it if unspecified). */ gchar * -create_user_window_title(gchar *caption) +create_user_window_title(const gchar *caption) { /* fail-safe */ if (caption == NULL) diff --git a/gtk/ui_util.h b/gtk/ui_util.h index a421a1782c..b037f0a430 100644 --- a/gtk/ui_util.h +++ b/gtk/ui_util.h @@ -261,7 +261,7 @@ extern GtkWidget *tree_view_new(GtkTreeModel *model); * @param titles the titles of all columns * @return the new simple list widget */ -extern GtkWidget *simple_list_new(gint cols, gchar **titles); +extern GtkWidget *simple_list_new(gint cols, const gchar **titles); /** Append a row to the simple list. * * @param list the list from simple_list_new() @@ -302,7 +302,7 @@ extern void copy_to_clipboard(GString *str); * @param caption string you want included in title (appended to user-defined string) * @return a newly created title string including user-defined preference (if specified) */ -extern gchar *create_user_window_title(gchar *caption); +extern gchar *create_user_window_title(const gchar *caption); #endif /* __GTKGUIUI_UTIL_H__ */ diff --git a/gtk/voip_calls.c b/gtk/voip_calls.c index 96188a5c3a..55798c8823 100644 --- a/gtk/voip_calls.c +++ b/gtk/voip_calls.c @@ -63,7 +63,7 @@ #include "alert_box.h" #include "simple_dialog.h" -char *voip_call_state_name[7]={ +const char *voip_call_state_name[7]={ "CALL SETUP", "RINGING", "IN CALL", @@ -74,7 +74,7 @@ char *voip_call_state_name[7]={ }; /* defines whether we can consider the call active */ -char *voip_protocol_name[6]={ +const char *voip_protocol_name[6]={ "SIP", "ISUP", "H323", @@ -84,8 +84,8 @@ char *voip_protocol_name[6]={ }; typedef struct { - gchar *frame_label; - gchar *comment; + const gchar *frame_label; + const gchar *comment; } graph_str; #define H245_MAX 6 @@ -1960,7 +1960,7 @@ remove_tap_listener_sdp_calls(void) This function will look for a signal/event in the SignalReq/ObsEvent string and return true if it is found */ -gboolean isSignal(gchar *signal, gchar *signalStr) +gboolean isSignal(const gchar *signal, const gchar *signalStr) { gint i; gchar **resultArray; diff --git a/gtk/voip_calls.h b/gtk/voip_calls.h index 2b23860871..a7d1ba9599 100644 --- a/gtk/voip_calls.h +++ b/gtk/voip_calls.h @@ -52,7 +52,7 @@ typedef enum _voip_call_state { VOIP_UNKNOWN } voip_call_state; -extern char *voip_call_state_name[7]; +extern const char *voip_call_state_name[7]; typedef enum _voip_call_active_state { VOIP_ACTIVE, @@ -68,7 +68,7 @@ typedef enum _voip_protocol { VOIP_AC_CAS } voip_protocol; -extern char *voip_protocol_name[6]; +extern const char *voip_protocol_name[6]; /* defines specific SIP data */ diff --git a/image/dn_arrow.xpm b/image/dn_arrow.xpm index 8f71d31e55..929f5aca68 100644 --- a/image/dn_arrow.xpm +++ b/image/dn_arrow.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *dn_arrow[] = { +static const char *dn_arrow[] = { /* width height num_colors chars_per_pixel */ " 11 12 2 1", /* colors */ diff --git a/image/eexcl3d64.xpm b/image/eexcl3d64.xpm index 4853f90db6..2a3121a567 100644 --- a/image/eexcl3d64.xpm +++ b/image/eexcl3d64.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * eexcl3d64_xpm[] = { +static const char * eexcl3d64_xpm[] = { "64 64 1305 2", " c None", ". c #ACAFAC", diff --git a/image/eicon3d16.xpm b/image/eicon3d16.xpm index 29af14d6a0..08f366079a 100644 --- a/image/eicon3d16.xpm +++ b/image/eicon3d16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * eicon3d16_xpm[] = { +static const char * eicon3d16_xpm[] = { "16 16 195 2", " c None", ". c #C6CAC6", diff --git a/image/eicon3d32.xpm b/image/eicon3d32.xpm index 0df6d97a25..af56ef0409 100644 --- a/image/eicon3d32.xpm +++ b/image/eicon3d32.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * eicon3d32_xpm[] = { +static const char * eicon3d32_xpm[] = { "32 32 599 2", " c None", ". c #ACB0AC", diff --git a/image/eicon3d48.xpm b/image/eicon3d48.xpm index 999cf81f7f..651d4bc3bf 100644 --- a/image/eicon3d48.xpm +++ b/image/eicon3d48.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * eicon3d48_xpm[] = { +static const char * eicon3d48_xpm[] = { "48 48 1034 2", " c None", ". c #B2B5B2", diff --git a/image/icon-ethereal.xpm b/image/icon-ethereal.xpm index 2529c21fbc..772e609efe 100644 --- a/image/icon-ethereal.xpm +++ b/image/icon-ethereal.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *icon_ethereal_xpm[] = { +static const char *icon_ethereal_xpm[] = { /* width height num_colors chars_per_pixel */ " 66 63 10 1", /* colors */ diff --git a/image/icon-excl.xpm b/image/icon-excl.xpm index dfd3ecb57b..4b68e381e6 100644 --- a/image/icon-excl.xpm +++ b/image/icon-excl.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * icon_excl_xpm[] = { +static const char * icon_excl_xpm[] = { "64 64 21 1", " c None", ". c #FFFFFF", diff --git a/image/stock_dialog_error_48.xpm b/image/stock_dialog_error_48.xpm index cd87bd0b78..89dbc8f69e 100644 --- a/image/stock_dialog_error_48.xpm +++ b/image/stock_dialog_error_48.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_dialog_error_48_xpm[] = { +static const char * stock_dialog_error_48_xpm[] = { "48 48 474 2", " c None", ". c #8B5447", diff --git a/image/stock_dialog_info_48.xpm b/image/stock_dialog_info_48.xpm index 9dbbd8591d..09dc59f1d1 100644 --- a/image/stock_dialog_info_48.xpm +++ b/image/stock_dialog_info_48.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_dialog_info_48_xpm[] = { +static const char * stock_dialog_info_48_xpm[] = { "48 48 590 2", " c None", ". c #9A9AA0", diff --git a/image/stock_dialog_question_48.xpm b/image/stock_dialog_question_48.xpm index f316196306..0f70d1977f 100644 --- a/image/stock_dialog_question_48.xpm +++ b/image/stock_dialog_question_48.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_dialog_question_48_xpm[] = { +static const char * stock_dialog_question_48_xpm[] = { "48 48 481 2", " c None", ". c #572B20", diff --git a/image/stock_dialog_warning_48.xpm b/image/stock_dialog_warning_48.xpm index 341d19872f..16b9b50b04 100644 --- a/image/stock_dialog_warning_48.xpm +++ b/image/stock_dialog_warning_48.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_dialog_warning_48_xpm[] = { +static const char * stock_dialog_warning_48_xpm[] = { "48 48 225 2", " c None", ". c #000000", diff --git a/image/toolbar/autoscroll_24.xpm b/image/toolbar/autoscroll_24.xpm index f62d9238a4..5a2272c258 100644 --- a/image/toolbar/autoscroll_24.xpm +++ b/image/toolbar/autoscroll_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * autoscroll_24_xpm[] = { +static const char * autoscroll_24_xpm[] = { "24 24 71 1", " c None", ". c #000000", diff --git a/image/toolbar/capture_filter_24.xpm b/image/toolbar/capture_filter_24.xpm index e0d0a7b30e..30a183c897 100644 --- a/image/toolbar/capture_filter_24.xpm +++ b/image/toolbar/capture_filter_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * capture_filter_24_xpm[] = { +static const char * capture_filter_24_xpm[] = { "24 24 305 2", " c None", ". c #000000", diff --git a/image/toolbar/capture_interfaces_24.xpm b/image/toolbar/capture_interfaces_24.xpm index 5c19c437fd..f92967c853 100644 --- a/image/toolbar/capture_interfaces_24.xpm +++ b/image/toolbar/capture_interfaces_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * capture_interfaces_24_xpm[] = { +static const char * capture_interfaces_24_xpm[] = { "24 24 219 2", " c None", ". c #000000", diff --git a/image/toolbar/capture_options_24.xpm b/image/toolbar/capture_options_24.xpm index 1823101edc..353ef87002 100644 --- a/image/toolbar/capture_options_24.xpm +++ b/image/toolbar/capture_options_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * capture_options_24_xpm[] = { +static const char * capture_options_24_xpm[] = { "24 24 261 2", " c None", ". c #000000", diff --git a/image/toolbar/capture_restart_24.xpm b/image/toolbar/capture_restart_24.xpm index 8b24e7d8e3..099f1f86e5 100644 --- a/image/toolbar/capture_restart_24.xpm +++ b/image/toolbar/capture_restart_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * capture_restart_24_xpm[] = { +static const char * capture_restart_24_xpm[] = { "24 24 270 2", " c None", ". c #000000", diff --git a/image/toolbar/capture_start_24.xpm b/image/toolbar/capture_start_24.xpm index b511cdb6f5..2126d9f51a 100644 --- a/image/toolbar/capture_start_24.xpm +++ b/image/toolbar/capture_start_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * capture_start_24_xpm[] = { +static const char * capture_start_24_xpm[] = { "24 24 241 2", " c None", ". c #000000", diff --git a/image/toolbar/capture_stop_24.xpm b/image/toolbar/capture_stop_24.xpm index e33bf5739f..e3f8f1f5c9 100644 --- a/image/toolbar/capture_stop_24.xpm +++ b/image/toolbar/capture_stop_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * capture_stop_24_xpm[] = { +static const char * capture_stop_24_xpm[] = { "24 24 337 2", " c None", ". c #000000", diff --git a/image/toolbar/checkbox_16.xpm b/image/toolbar/checkbox_16.xpm index c9805097b9..66e8047a05 100644 --- a/image/toolbar/checkbox_16.xpm +++ b/image/toolbar/checkbox_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * checkbox_16_xpm[] = { +static const char * checkbox_16_xpm[] = { "16 16 25 1", " c None", ". c #9D9D9D", diff --git a/image/toolbar/colorize_24.xpm b/image/toolbar/colorize_24.xpm index 5da8971c45..fcb20c4b6e 100644 --- a/image/toolbar/colorize_24.xpm +++ b/image/toolbar/colorize_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * colorize_24_xpm[] = { +static const char * colorize_24_xpm[] = { "24 24 57 1", " c None", ". c #000000", diff --git a/image/toolbar/conversations_16.xpm b/image/toolbar/conversations_16.xpm index 933d2bb032..194ffd420c 100644 --- a/image/toolbar/conversations_16.xpm +++ b/image/toolbar/conversations_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * conversations_16_xpm[] = { +static const char * conversations_16_xpm[] = { "16 16 51 1", " c None", ". c #191918", diff --git a/image/toolbar/decode_as_16.xpm b/image/toolbar/decode_as_16.xpm index b045610c0c..6d704bf4e8 100644 --- a/image/toolbar/decode_as_16.xpm +++ b/image/toolbar/decode_as_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * decode_as_16_xpm[] = { +static const char * decode_as_16_xpm[] = { "16 16 6 1", " c None", ". c #000000", diff --git a/image/toolbar/display_filter_24.xpm b/image/toolbar/display_filter_24.xpm index c782ae0154..766ca62a9d 100644 --- a/image/toolbar/display_filter_24.xpm +++ b/image/toolbar/display_filter_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * display_filter_24_xpm[] = { +static const char * display_filter_24_xpm[] = { "24 24 110 2", " c None", ". c #000000", diff --git a/image/toolbar/endpoints_16.xpm b/image/toolbar/endpoints_16.xpm index 16cb287224..c0b39de6ba 100644 --- a/image/toolbar/endpoints_16.xpm +++ b/image/toolbar/endpoints_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * endpoints_16_xpm[] = { +static const char * endpoints_16_xpm[] = { "16 16 49 1", " c None", ". c #79797C", diff --git a/image/toolbar/file_set_list_16.xpm b/image/toolbar/file_set_list_16.xpm index d9faea30ff..383c061481 100644 --- a/image/toolbar/file_set_list_16.xpm +++ b/image/toolbar/file_set_list_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * file_set_list_16_xpm[] = { +static const char * file_set_list_16_xpm[] = { "16 16 37 1", " c None", ". c #000000", diff --git a/image/toolbar/file_set_next_16.xpm b/image/toolbar/file_set_next_16.xpm index 90dfdcb97a..4a06c1420a 100644 --- a/image/toolbar/file_set_next_16.xpm +++ b/image/toolbar/file_set_next_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * file_set_next_16_xpm[] = { +static const char * file_set_next_16_xpm[] = { "16 16 42 1", " c None", ". c #000000", diff --git a/image/toolbar/file_set_previous_16.xpm b/image/toolbar/file_set_previous_16.xpm index 6a65c41343..0e09a8706b 100644 --- a/image/toolbar/file_set_previous_16.xpm +++ b/image/toolbar/file_set_previous_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * file_set_previous_16_xpm[] = { +static const char * file_set_previous_16_xpm[] = { "16 16 42 1", " c None", ". c #000000", diff --git a/image/toolbar/graphs_16.xpm b/image/toolbar/graphs_16.xpm index ad8b0e2b09..7b4c5392ce 100644 --- a/image/toolbar/graphs_16.xpm +++ b/image/toolbar/graphs_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * graphs_16_xpm[] = { +static const char * graphs_16_xpm[] = { "16 16 4 1", " c None", ". c #000000", diff --git a/image/toolbar/internet_24.xpm b/image/toolbar/internet_24.xpm index 3860c563b3..3c78d380ce 100644 --- a/image/toolbar/internet_24.xpm +++ b/image/toolbar/internet_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * internet_24_xpm[] = { +static const char * internet_24_xpm[] = { "24 24 310 2", " c None", ". c #2D373E", diff --git a/image/toolbar/resize_columns_24.xpm b/image/toolbar/resize_columns_24.xpm index 5aee2d6ade..f917c0f70c 100644 --- a/image/toolbar/resize_columns_24.xpm +++ b/image/toolbar/resize_columns_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * resize_columns_24_xpm[] = { +static const char * resize_columns_24_xpm[] = { "24 24 24 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_add_24.xpm b/image/toolbar/stock_add_24.xpm index 9aef1ef64c..3f1981c939 100644 --- a/image/toolbar/stock_add_24.xpm +++ b/image/toolbar/stock_add_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_add_24_xpm[] = { +static const char * stock_add_24_xpm[] = { "24 24 24 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_bottom_24.xpm b/image/toolbar/stock_bottom_24.xpm index 13eb555648..28c0a8e015 100644 --- a/image/toolbar/stock_bottom_24.xpm +++ b/image/toolbar/stock_bottom_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_bottom_24_xpm[] = { +static const char * stock_bottom_24_xpm[] = { "24 24 49 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_clear_24.xpm b/image/toolbar/stock_clear_24.xpm index b05c766a04..9adcc03407 100644 --- a/image/toolbar/stock_clear_24.xpm +++ b/image/toolbar/stock_clear_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_clear_24_xpm[] = { +static const char * stock_clear_24_xpm[] = { "24 24 56 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_close_24.xpm b/image/toolbar/stock_close_24.xpm index 032cd950b3..98699d5542 100644 --- a/image/toolbar/stock_close_24.xpm +++ b/image/toolbar/stock_close_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_close_24_xpm[] = { +static const char * stock_close_24_xpm[] = { "24 24 2 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_colorselector_24.xpm b/image/toolbar/stock_colorselector_24.xpm index 4990f7d4bb..ef944251ad 100644 --- a/image/toolbar/stock_colorselector_24.xpm +++ b/image/toolbar/stock_colorselector_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_colorselector_24_xpm[] = { +static const char * stock_colorselector_24_xpm[] = { "24 24 223 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_help_24.xpm b/image/toolbar/stock_help_24.xpm index e2e13ff89c..0f4e210ff7 100644 --- a/image/toolbar/stock_help_24.xpm +++ b/image/toolbar/stock_help_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_help_24_xpm[] = { +static const char * stock_help_24_xpm[] = { "24 24 244 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_jump_to_24.xpm b/image/toolbar/stock_jump_to_24.xpm index d77c01d7da..02702df761 100644 --- a/image/toolbar/stock_jump_to_24.xpm +++ b/image/toolbar/stock_jump_to_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_jump_to_24_xpm[] = { +static const char * stock_jump_to_24_xpm[] = { "24 24 144 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_left_arrow_24.xpm b/image/toolbar/stock_left_arrow_24.xpm index 369da1c0fe..01d2daf997 100644 --- a/image/toolbar/stock_left_arrow_24.xpm +++ b/image/toolbar/stock_left_arrow_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_left_arrow_24_xpm[] = { +static const char * stock_left_arrow_24_xpm[] = { "24 24 43 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_ok_20.xpm b/image/toolbar/stock_ok_20.xpm index 6771609f76..6e23c22e0f 100644 --- a/image/toolbar/stock_ok_20.xpm +++ b/image/toolbar/stock_ok_20.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_ok_20_xpm[] = { +static const char * stock_ok_20_xpm[] = { "20 20 47 1", " c None", ". c #10120F", diff --git a/image/toolbar/stock_open_24.xpm b/image/toolbar/stock_open_24.xpm index 70786ebe3c..2204c247b5 100644 --- a/image/toolbar/stock_open_24.xpm +++ b/image/toolbar/stock_open_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_open_24_xpm[] = { +static const char * stock_open_24_xpm[] = { "24 24 173 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_preferences_24.xpm b/image/toolbar/stock_preferences_24.xpm index 376ca79266..cc93ad35a8 100644 --- a/image/toolbar/stock_preferences_24.xpm +++ b/image/toolbar/stock_preferences_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_preferences_24_xpm[] = { +static const char * stock_preferences_24_xpm[] = { "24 24 87 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_print_24.xpm b/image/toolbar/stock_print_24.xpm index 5e2254f20d..b24a568a46 100644 --- a/image/toolbar/stock_print_24.xpm +++ b/image/toolbar/stock_print_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_print_24_xpm[] = { +static const char * stock_print_24_xpm[] = { "24 24 175 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_properties_24.xpm b/image/toolbar/stock_properties_24.xpm index a2d9cb6c24..8555658ed2 100644 --- a/image/toolbar/stock_properties_24.xpm +++ b/image/toolbar/stock_properties_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_properties_24_xpm[] = { +static const char * stock_properties_24_xpm[] = { "24 24 185 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_refresh_24.xpm b/image/toolbar/stock_refresh_24.xpm index 88a457d09d..72f180cc38 100644 --- a/image/toolbar/stock_refresh_24.xpm +++ b/image/toolbar/stock_refresh_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_refresh_24_xpm[] = { +static const char * stock_refresh_24_xpm[] = { "24 24 126 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_right_arrow_24.xpm b/image/toolbar/stock_right_arrow_24.xpm index dfac57b979..28c7336537 100644 --- a/image/toolbar/stock_right_arrow_24.xpm +++ b/image/toolbar/stock_right_arrow_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_right_arrow_24_xpm[] = { +static const char * stock_right_arrow_24_xpm[] = { "24 24 41 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_save_24.xpm b/image/toolbar/stock_save_24.xpm index 3c2a50795f..9e6ceb8cfe 100644 --- a/image/toolbar/stock_save_24.xpm +++ b/image/toolbar/stock_save_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_save_24_xpm[] = { +static const char * stock_save_24_xpm[] = { "24 24 220 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_save_as_24.xpm b/image/toolbar/stock_save_as_24.xpm index e94f449512..a6620fd19b 100644 --- a/image/toolbar/stock_save_as_24.xpm +++ b/image/toolbar/stock_save_as_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_save_as_24_xpm[] = { +static const char * stock_save_as_24_xpm[] = { "24 24 262 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_search_24.xpm b/image/toolbar/stock_search_24.xpm index 59614e86bd..a87cefebf0 100644 --- a/image/toolbar/stock_search_24.xpm +++ b/image/toolbar/stock_search_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_search_24_xpm[] = { +static const char * stock_search_24_xpm[] = { "24 24 207 2", " c None", ". c #000000", diff --git a/image/toolbar/stock_stop_24.xpm b/image/toolbar/stock_stop_24.xpm index d5d51eecd8..f2dc8294be 100644 --- a/image/toolbar/stock_stop_24.xpm +++ b/image/toolbar/stock_stop_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_stop_24_xpm[] = { +static const char * stock_stop_24_xpm[] = { "24 24 258 2", " c None", ". c #010000", diff --git a/image/toolbar/stock_top_24.xpm b/image/toolbar/stock_top_24.xpm index 3c1c687f31..3cc7a3613b 100644 --- a/image/toolbar/stock_top_24.xpm +++ b/image/toolbar/stock_top_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_top_24_xpm[] = { +static const char * stock_top_24_xpm[] = { "24 24 51 1", " c None", ". c #000000", diff --git a/image/toolbar/stock_zoom_1_24.xpm b/image/toolbar/stock_zoom_1_24.xpm index 9bd5c6657b..f4675dcb18 100644 --- a/image/toolbar/stock_zoom_1_24.xpm +++ b/image/toolbar/stock_zoom_1_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_zoom_1_24_xpm[] = { +static const char * stock_zoom_1_24_xpm[] = { "24 24 136 2", " c None", ". c #343434", diff --git a/image/toolbar/stock_zoom_in_24.xpm b/image/toolbar/stock_zoom_in_24.xpm index cb62c924a3..a6f2114242 100644 --- a/image/toolbar/stock_zoom_in_24.xpm +++ b/image/toolbar/stock_zoom_in_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_zoom_in_24_xpm[] = { +static const char * stock_zoom_in_24_xpm[] = { "24 24 132 2", " c None", ". c #343434", diff --git a/image/toolbar/stock_zoom_out_24.xpm b/image/toolbar/stock_zoom_out_24.xpm index c3bc8069d5..c03b0df759 100644 --- a/image/toolbar/stock_zoom_out_24.xpm +++ b/image/toolbar/stock_zoom_out_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * stock_zoom_out_24_xpm[] = { +static const char * stock_zoom_out_24_xpm[] = { "24 24 131 2", " c None", ". c #343434", diff --git a/image/toolbar/telephony_16.xpm b/image/toolbar/telephony_16.xpm index 246e492028..a2fb5bb1ef 100644 --- a/image/toolbar/telephony_16.xpm +++ b/image/toolbar/telephony_16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * telephony_16_xpm[] = { +static const char * telephony_16_xpm[] = { "16 16 87 1", " c None", ". c #000000", diff --git a/image/toolbar/time_24.xpm b/image/toolbar/time_24.xpm index ada7a6a62d..97eb497f7d 100644 --- a/image/toolbar/time_24.xpm +++ b/image/toolbar/time_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * time_24_xpm[] = { +static const char * time_24_xpm[] = { "24 24 92 2", " c None", ". c #000000", diff --git a/image/toolbar/web_support_24.xpm b/image/toolbar/web_support_24.xpm index 43e76a949e..17f60585de 100644 --- a/image/toolbar/web_support_24.xpm +++ b/image/toolbar/web_support_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * web_support_24_xpm[] = { +static const char * web_support_24_xpm[] = { "24 24 383 2", " c None", ". c #010101", diff --git a/image/toolbar/wiki_24.xpm b/image/toolbar/wiki_24.xpm index 618c4e7078..7299ebdcb7 100644 --- a/image/toolbar/wiki_24.xpm +++ b/image/toolbar/wiki_24.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * wiki_24_xpm[] = { +static const char * wiki_24_xpm[] = { "24 24 305 2", " c None", ". c #2D373E", diff --git a/image/up_arrow.xpm b/image/up_arrow.xpm index a33294ca5d..11c80ae448 100644 --- a/image/up_arrow.xpm +++ b/image/up_arrow.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *up_arrow[] = { +static const char *up_arrow[] = { /* width height num_colors chars_per_pixel */ " 11 12 2 1", /* colors */ diff --git a/plugins/stats_tree/pinfo_stats_tree.c b/plugins/stats_tree/pinfo_stats_tree.c index 34d6194d00..5eccf454fa 100644 --- a/plugins/stats_tree/pinfo_stats_tree.c +++ b/plugins/stats_tree/pinfo_stats_tree.c @@ -51,7 +51,7 @@ static const gchar* port_type_to_str (port_type type) { /* ip host stats_tree -- basic test */ static int st_node_ip = -1; -static gchar* st_str_ip = "IP address"; +static const gchar* st_str_ip = "IP address"; static void ip_hosts_stats_tree_init(stats_tree* st) { st_node_ip = stats_tree_create_node(st, st_str_ip, 0, TRUE); @@ -73,7 +73,7 @@ static int ip_hosts_stats_tree_packet(stats_tree *st , packet_info *pinfo, epan /* packet type stats_tree -- test pivot node */ static int st_node_ptype = -1; -static gchar* st_str_ptype = "Port Type"; +static const gchar* st_str_ptype = "Port Type"; static void ptype_stats_tree_init(stats_tree* st) { st_node_ptype = stats_tree_create_pivot(st, st_str_ptype, 0); @@ -91,7 +91,7 @@ static int ptype_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_diss /* packet length stats_tree -- test range node */ static int st_node_plen = -1; -static gchar* st_str_plen = "Packet Length"; +static const gchar* st_str_plen = "Packet Length"; static void plen_stats_tree_init(stats_tree* st) { st_node_plen = stats_tree_create_range_node(st, st_str_plen, 0, "0-19","20-39","40-79","80-159","160-319","320-639","640-1279","1280-",NULL); @@ -111,7 +111,7 @@ static int plen_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_disse */ static int st_node_dsts = -1; -static gchar* st_str_dsts = "Destinations"; +static const gchar* st_str_dsts = "Destinations"; static void dsts_stats_tree_init(stats_tree* st) { st_node_dsts = stats_tree_create_node(st, st_str_dsts, 0, TRUE); diff --git a/tap_dfilter_dlg.h b/tap_dfilter_dlg.h index 0116eae595..35331b9b98 100644 --- a/tap_dfilter_dlg.h +++ b/tap_dfilter_dlg.h @@ -52,10 +52,10 @@ */ typedef struct _tap_dfilter_dlg { - char *win_title; /* title */ - char *init_string; /* the string to call the tap without a filter via "-z" option */ + const char *win_title; /* title */ + const char *init_string; /* the string to call the tap without a filter via "-z" option */ void (* tap_init_cb)(char *); /* callback to init function of the tap */ - gint index; /* initiate this value always with "-1" */ + gint index; /* initiate this value always with "-1" */ } tap_dfilter_dlg; /* This will update the titles of the dialog windows when we load a new capture file. */