diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-05-17 23:33:23 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-05-17 23:33:23 +0000 |
commit | 8f53a5655cb2ccad82056ebbbab7e6ed40e5c35f (patch) | |
tree | 0c072378d8eddf255d2f1c16db913ab7feba7681 | |
parent | e902f33d18d034b5e61bc5e7889ec3982c1d98a3 (diff) | |
download | wireshark-8f53a5655cb2ccad82056ebbbab7e6ed40e5c35f.tar.gz wireshark-8f53a5655cb2ccad82056ebbbab7e6ed40e5c35f.tar.bz2 wireshark-8f53a5655cb2ccad82056ebbbab7e6ed40e5c35f.zip |
Make some routines static that aren't used outside the source file in
which they're defined.
Include some header files that declare functions in the source files
that define the functions.
Declare packet_list_get_type() in gtk/packet_list_store.h, as it defines
a macro that uses that function.
svn path=/trunk/; revision=37223
-rw-r--r-- | epan/oids.c | 4 | ||||
-rw-r--r-- | gtk/export_object_smb.c | 2 | ||||
-rw-r--r-- | gtk/iax2_analysis.c | 2 | ||||
-rw-r--r-- | gtk/manual_addr_resolv.c | 1 | ||||
-rw-r--r-- | gtk/menus.c | 4 | ||||
-rw-r--r-- | gtk/new_packet_list.c | 2 | ||||
-rw-r--r-- | gtk/packet_list_store.h | 1 | ||||
-rw-r--r-- | gtk/proto_help.c | 2 | ||||
-rw-r--r-- | gtk/rtp_analysis.c | 2 | ||||
-rw-r--r-- | gtk/voip_calls.c | 2 | ||||
-rw-r--r-- | util.c | 2 |
11 files changed, 14 insertions, 10 deletions
diff --git a/epan/oids.c b/epan/oids.c index 05835833c6..363d168abd 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -801,7 +801,7 @@ const char* oid_subid2string(guint32* subids, guint len) { return s; } -guint check_num_oid(const char* str) { +static guint check_num_oid(const char* str) { const char* r = str; char c = '\0'; guint n = 0; @@ -1057,7 +1057,7 @@ guint oid_string2encoded(const char *oid_str, guint8 **bytes) { return 0; } -char* oid2str(oid_info_t* oid, guint32* subids, guint len, guint left) { +static char* oid2str(oid_info_t* oid, guint32* subids, guint len, guint left) { if (left == 0) { return oid->name; } else { diff --git a/gtk/export_object_smb.c b/gtk/export_object_smb.c index 2f183e266c..9d82cd2f04 100644 --- a/gtk/export_object_smb.c +++ b/gtk/export_object_smb.c @@ -418,7 +418,7 @@ eo_smb_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const /* This is the eo_protocoldata_reset function that is used in the export_object module to cleanup any previous private data of the export object functionality before perform the eo_reset function or when the window closes */ -void +static void eo_smb_cleanup(void) { int i,last; diff --git a/gtk/iax2_analysis.c b/gtk/iax2_analysis.c index 6ef1558a9b..c2061f1cbd 100644 --- a/gtk/iax2_analysis.c +++ b/gtk/iax2_analysis.c @@ -2877,7 +2877,7 @@ static void add_to_list(GtkWidget *list, user_data_t * user_data, guint32 number */ /* Present floats with two decimals */ -void +static void iax2_float_data_func (GtkTreeViewColumn *column _U_, GtkCellRenderer *renderer, GtkTreeModel *model, diff --git a/gtk/manual_addr_resolv.c b/gtk/manual_addr_resolv.c index 1ef56a94dd..b936030600 100644 --- a/gtk/manual_addr_resolv.c +++ b/gtk/manual_addr_resolv.c @@ -42,6 +42,7 @@ #include "gtk/help_dlg.h" #include "gtk/main.h" #include "gtk/menus.h" +#include "gtk/manual_addr_resolv.h" GtkWidget *man_addr_resolv_dlg = NULL; diff --git a/gtk/menus.c b/gtk/menus.c index df1accc52b..41ed4032b2 100644 --- a/gtk/menus.c +++ b/gtk/menus.c @@ -3531,7 +3531,7 @@ menu_dissector_filter_cb( GtkWidget *widget _U_, g_free( (void *) buf); } -gboolean menu_dissector_filter_spe_cb(frame_data *fd _U_, epan_dissect_t *edt, gpointer callback_data) { +static gboolean menu_dissector_filter_spe_cb(frame_data *fd _U_, epan_dissect_t *edt, gpointer callback_data) { dissector_filter_t *filter_entry = callback_data; /* XXX - this gets the packet_info of the last dissected packet, */ @@ -3540,7 +3540,7 @@ gboolean menu_dissector_filter_spe_cb(frame_data *fd _U_, epan_dissect_t *edt, g return (edt != NULL) ? filter_entry->is_filter_valid(&edt->pi) : FALSE; } -void menu_dissector_filter(void) { +static void menu_dissector_filter(void) { GList *list_entry = dissector_filter_list; dissector_filter_t *filter_entry; diff --git a/gtk/new_packet_list.c b/gtk/new_packet_list.c index d9ddd6e093..2b5de8bb64 100644 --- a/gtk/new_packet_list.c +++ b/gtk/new_packet_list.c @@ -602,7 +602,7 @@ new_packet_list_remove_column (gint col_id, GtkTreeViewColumn *col _U_) new_packet_list_recreate(); } -void +static void new_packet_list_toggle_resolved (GtkWidget *w, gint col_id) { /* We have to check for skip-update because we get an emit in menus_set_column_resolved() */ diff --git a/gtk/packet_list_store.h b/gtk/packet_list_store.h index 9b26befe7f..34ce0dfa94 100644 --- a/gtk/packet_list_store.h +++ b/gtk/packet_list_store.h @@ -37,6 +37,7 @@ * The packet list store * @ingroup main_window_group */ +extern GType packet_list_get_type(void); #define PACKETLIST_TYPE_LIST (packet_list_get_type()) #define PACKET_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PACKETLIST_TYPE_LIST, PacketList)) #define PACKETLIST_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CART((klass), PACKETLIST_TYPE_LIST)) diff --git a/gtk/proto_help.c b/gtk/proto_help.c index 5557c75861..db6c327a52 100644 --- a/gtk/proto_help.c +++ b/gtk/proto_help.c @@ -41,6 +41,8 @@ #include <epan/strutil.h> #include <epan/proto.h> +#include "gtk/proto_help.h" + #if GLIB_CHECK_VERSION(2,14,0) /* GRegex */ #define PH_MENU_TOP "/Protocol Help" diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 02f78049f1..05de274684 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -3029,7 +3029,7 @@ static void add_to_list(GtkWidget *list, user_data_t * user_data, guint32 number /* Present boolean value */ -void +static void rtp_boolean_data_func (GtkTreeViewColumn *column _U_, GtkCellRenderer *renderer, GtkTreeModel *model, diff --git a/gtk/voip_calls.c b/gtk/voip_calls.c index ab7b28f811..089578f294 100644 --- a/gtk/voip_calls.c +++ b/gtk/voip_calls.c @@ -336,7 +336,7 @@ static guint change_call_num_graph(voip_calls_tapinfo_t *tapinfo _U_, guint16 ca /****************************************************************************/ /* Insert the item in the graph list */ -void insert_to_graph(voip_calls_tapinfo_t *tapinfo _U_, packet_info *pinfo, const gchar *frame_label, const gchar *comment, guint16 call_num, address *src_addr, address *dst_addr, guint16 line_style, double time_val, guint32 frame_num) +static void insert_to_graph(voip_calls_tapinfo_t *tapinfo _U_, packet_info *pinfo, const gchar *frame_label, const gchar *comment, guint16 call_num, address *src_addr, address *dst_addr, guint16 line_style, double time_val, guint32 frame_num) { graph_analysis_item_t *gai, *new_gai; GList *list; @@ -132,7 +132,7 @@ compute_timestamp_diff(gint *diffsec, gint *diffusec, } /* Remove any %<interface_name> from an IP address. */ -char *sanitize_filter_ip(char *hostname) { +static char *sanitize_filter_ip(char *hostname) { gchar *end; gchar *ret; |