More char -> const char warning fixes.
Removed (very few) casts that only change the warning message but don't remove it (with gcc-4). svn path=/trunk/; revision=15227
This commit is contained in:
parent
e6856b69f3
commit
4e1f4b18ab
|
@ -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 */
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)",
|
||||
|
|
|
@ -251,8 +251,7 @@ 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?" };
|
||||
const gchar *cur_titles[] = { "Device", "Description", "Comment", "Hide?" };
|
||||
int row = 0;
|
||||
|
||||
GtkWidget *caller = gtk_widget_get_toplevel(w);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* conversations_sctp.c
|
||||
* conversations_sctp 2005 Oleg Terletsky <oleg.terletsky@comverse.com>
|
||||
*
|
||||
* $Id:$
|
||||
* $Id$
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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" */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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] = "<None>";
|
||||
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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, '/');
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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 *),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * eexcl3d64_xpm[] = {
|
||||
static const char * eexcl3d64_xpm[] = {
|
||||
"64 64 1305 2",
|
||||
" c None",
|
||||
". c #ACAFAC",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * eicon3d16_xpm[] = {
|
||||
static const char * eicon3d16_xpm[] = {
|
||||
"16 16 195 2",
|
||||
" c None",
|
||||
". c #C6CAC6",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * eicon3d32_xpm[] = {
|
||||
static const char * eicon3d32_xpm[] = {
|
||||
"32 32 599 2",
|
||||
" c None",
|
||||
". c #ACB0AC",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * eicon3d48_xpm[] = {
|
||||
static const char * eicon3d48_xpm[] = {
|
||||
"48 48 1034 2",
|
||||
" c None",
|
||||
". c #B2B5B2",
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * icon_excl_xpm[] = {
|
||||
static const char * icon_excl_xpm[] = {
|
||||
"64 64 21 1",
|
||||
" c None",
|
||||
". c #FFFFFF",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * autoscroll_24_xpm[] = {
|
||||
static const char * autoscroll_24_xpm[] = {
|
||||
"24 24 71 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * checkbox_16_xpm[] = {
|
||||
static const char * checkbox_16_xpm[] = {
|
||||
"16 16 25 1",
|
||||
" c None",
|
||||
". c #9D9D9D",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * colorize_24_xpm[] = {
|
||||
static const char * colorize_24_xpm[] = {
|
||||
"24 24 57 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * conversations_16_xpm[] = {
|
||||
static const char * conversations_16_xpm[] = {
|
||||
"16 16 51 1",
|
||||
" c None",
|
||||
". c #191918",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * endpoints_16_xpm[] = {
|
||||
static const char * endpoints_16_xpm[] = {
|
||||
"16 16 49 1",
|
||||
" c None",
|
||||
". c #79797C",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * graphs_16_xpm[] = {
|
||||
static const char * graphs_16_xpm[] = {
|
||||
"16 16 4 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * internet_24_xpm[] = {
|
||||
static const char * internet_24_xpm[] = {
|
||||
"24 24 310 2",
|
||||
" c None",
|
||||
". c #2D373E",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue