diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-02-25 23:35:13 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-02-25 23:35:13 +0000 |
commit | 162817ad33208c00ed5c99618eff77ff44d6f277 (patch) | |
tree | f2e9c71afa6413f4fa63d66448cf19f811d5e212 /ui | |
parent | 0037adc30ef5c2566822f117df6158762afd10e6 (diff) |
it's ==> its & its ==> it's as needed.
In a few cases:
Fix spelling;
Clean up whitespace and formatting style.
svn path=/trunk/; revision=47889
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/airpcap_gui_utils.c | 164 | ||||
-rw-r--r-- | ui/gtk/dcerpc_stat.c | 2 | ||||
-rw-r--r-- | ui/gtk/dlg_utils.c | 136 | ||||
-rw-r--r-- | ui/gtk/dlg_utils.h | 2 | ||||
-rw-r--r-- | ui/gtk/file_dlg.c | 2 | ||||
-rw-r--r-- | ui/gtk/file_dlg.h | 2 | ||||
-rw-r--r-- | ui/gtk/gui_utils.c | 2 | ||||
-rw-r--r-- | ui/gtk/main.c | 8 | ||||
-rw-r--r-- | ui/gtk/main.h | 4 | ||||
-rw-r--r-- | ui/gtk/main_menubar.c | 6 | ||||
-rw-r--r-- | ui/gtk/main_statusbar.c | 2 | ||||
-rw-r--r-- | ui/gtk/main_toolbar.c | 2 | ||||
-rw-r--r-- | ui/gtk/prefs_dlg.c | 2 | ||||
-rw-r--r-- | ui/gtk/range_utils.c | 2 | ||||
-rw-r--r-- | ui/gtk/rlc_lte_graph.c | 2 | ||||
-rw-r--r-- | ui/gtk/voip_calls.c | 2 |
16 files changed, 170 insertions, 170 deletions
diff --git a/ui/gtk/airpcap_gui_utils.c b/ui/gtk/airpcap_gui_utils.c index fec1ad3594..cbb2215be7 100644 --- a/ui/gtk/airpcap_gui_utils.c +++ b/ui/gtk/airpcap_gui_utils.c @@ -90,7 +90,7 @@ airpcap_set_toolbar_start_capture(airpcap_if_info_t* if_info) airpcap_toolbar_keys_button = g_object_get_data(G_OBJECT(wireless_tb),AIRPCAP_TOOLBAR_KEY_MANAGEMENT_KEY); /* The current interface is an airpcap interface */ - if(if_info != NULL) + if (if_info != NULL) { gtk_widget_set_sensitive(wireless_tb,TRUE); gtk_widget_set_sensitive(airpcap_toolbar_label,TRUE); @@ -108,7 +108,7 @@ airpcap_set_toolbar_start_capture(airpcap_if_info_t* if_info) /*decryption check box*/ g_signal_handlers_block_by_func (airpcap_toolbar_decryption,airpcap_toolbar_encryption_cb, wireless_tb); - if(if_info->DecryptionOn == AIRPCAP_DECRYPTION_ON) + if (if_info->DecryptionOn == AIRPCAP_DECRYPTION_ON) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(airpcap_toolbar_decryption),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(airpcap_toolbar_decryption),FALSE); @@ -119,10 +119,10 @@ airpcap_set_toolbar_start_capture(airpcap_if_info_t* if_info) g_free(if_label_text); change_airpcap_settings = FALSE; - if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0){ + if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0) { guint i = 0; - for (; i<if_info->numSupportedChannels; i++){ + for (; i<if_info->numSupportedChannels; i++) { gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(toolbar_channel_cb), ieee80211_mhz_to_str(if_info->pSupportedChannels[i].Frequency)); } } @@ -184,7 +184,7 @@ airpcap_set_toolbar_stop_capture(airpcap_if_info_t* if_info) airpcap_toolbar_keys_button = g_object_get_data(G_OBJECT(wireless_tb),AIRPCAP_TOOLBAR_KEY_MANAGEMENT_KEY); /* The current interface is an airpcap interface */ - if(if_info != NULL) + if (if_info != NULL) { gtk_widget_set_sensitive(wireless_tb,TRUE); gtk_widget_set_sensitive(airpcap_toolbar_label,TRUE); @@ -203,7 +203,7 @@ airpcap_set_toolbar_stop_capture(airpcap_if_info_t* if_info) /*decription check box*/ g_signal_handlers_block_by_func (airpcap_toolbar_decryption,airpcap_toolbar_encryption_cb, wireless_tb); - if(if_info->DecryptionOn == AIRPCAP_DECRYPTION_ON) + if (if_info->DecryptionOn == AIRPCAP_DECRYPTION_ON) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(airpcap_toolbar_decryption),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(airpcap_toolbar_decryption),FALSE); @@ -214,10 +214,10 @@ airpcap_set_toolbar_stop_capture(airpcap_if_info_t* if_info) g_free(if_label_text); change_airpcap_settings = FALSE; - if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0){ + if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0) { guint i = 0; - for (; i<if_info->numSupportedChannels; i++){ + for (; i<if_info->numSupportedChannels; i++) { gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(toolbar_channel_cb), ieee80211_mhz_to_str(if_info->pSupportedChannels[i].Frequency)); } } @@ -269,12 +269,12 @@ airpcap_add_key_to_list(GtkListStore *key_list_store, gchar* type, gchar* key, g void airpcap_fill_key_list(GtkListStore *key_list_store) { - const gchar* s = NULL; - unsigned int i,n; + const gchar* s = NULL; + unsigned int i,n; airpcap_if_info_t* fake_if_info; - GList* wireshark_key_list=NULL; - decryption_key_t* curr_key = NULL; - GtkTreeIter iter; + GList* wireshark_key_list = NULL; + decryption_key_t* curr_key = NULL; + GtkTreeIter iter; fake_if_info = airpcap_driver_fake_if_info_new(); @@ -286,7 +286,7 @@ airpcap_fill_key_list(GtkListStore *key_list_store) { curr_key = (decryption_key_t*)g_list_nth_data(wireshark_key_list,i); - if(curr_key->type == AIRPDCAP_KEY_TYPE_WEP) + if (curr_key->type == AIRPDCAP_KEY_TYPE_WEP) { gtk_list_store_insert_with_values(key_list_store , &iter, G_MAXINT, KL_COL_TYPE, AIRPCAP_WEP_KEY_STRING, @@ -294,9 +294,9 @@ airpcap_fill_key_list(GtkListStore *key_list_store) KL_COL_SSID, "", -1); } - else if(curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PWD) + else if (curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PWD) { - if(curr_key->ssid != NULL) + if (curr_key->ssid != NULL) s = format_uri(curr_key->ssid, ":"); else s = ""; @@ -308,7 +308,7 @@ airpcap_fill_key_list(GtkListStore *key_list_store) -1); } - else if(curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PMK) + else if (curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PMK) { gtk_list_store_insert_with_values(key_list_store , &iter, G_MAXINT, KL_COL_TYPE, AIRPCAP_WPA_BIN_KEY_STRING, @@ -329,15 +329,15 @@ airpcap_fill_key_list(GtkListStore *key_list_store) AirpcapValidationType airpcap_get_validation_type(const gchar* name) { - if(!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_ALL,name))) + if (!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_ALL,name))) { return AIRPCAP_VT_ACCEPT_EVERYTHING; } - else if(!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRECT,name))) + else if (!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRECT,name))) { return AIRPCAP_VT_ACCEPT_CORRECT_FRAMES; } - else if(!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRUPT,name))) + else if (!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRUPT,name))) { return AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES; } @@ -351,19 +351,19 @@ airpcap_get_validation_type(const gchar* name) const gchar* airpcap_get_validation_name(AirpcapValidationType vt) { - if(vt == AIRPCAP_VT_ACCEPT_EVERYTHING) + if (vt == AIRPCAP_VT_ACCEPT_EVERYTHING) { return AIRPCAP_VALIDATION_TYPE_NAME_ALL; } - else if(vt == AIRPCAP_VT_ACCEPT_CORRECT_FRAMES) + else if (vt == AIRPCAP_VT_ACCEPT_CORRECT_FRAMES) { return AIRPCAP_VALIDATION_TYPE_NAME_CORRECT; } - else if(vt == AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES) + else if (vt == AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES) { return AIRPCAP_VALIDATION_TYPE_NAME_CORRUPT; } - else if(vt == AIRPCAP_VT_UNKNOWN) + else if (vt == AIRPCAP_VT_UNKNOWN) { return AIRPCAP_VALIDATION_TYPE_NAME_UNKNOWN; } @@ -396,11 +396,11 @@ airpcap_get_validation_combo_entry(AirpcapValidationType vt) AirpcapLinkType airpcap_get_link_type(const gchar* name) { - if(!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_ONLY,name))){ + if (!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_ONLY,name))) { return AIRPCAP_LT_802_11; - }else if(!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_RADIO,name))){ + }else if (!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_RADIO,name))) { return AIRPCAP_LT_802_11_PLUS_RADIO; - }else if(!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_PPI,name))){ + }else if (!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_PPI,name))) { return AIRPCAP_LT_802_11_PLUS_PPI; }else{ return AIRPCAP_LT_UNKNOWN; @@ -414,13 +414,13 @@ airpcap_get_link_type(const gchar* name) const gchar* airpcap_get_link_name(AirpcapLinkType lt) { - if(lt == AIRPCAP_LT_802_11){ + if (lt == AIRPCAP_LT_802_11) { return AIRPCAP_LINK_TYPE_NAME_802_11_ONLY; - }else if(lt == AIRPCAP_LT_802_11_PLUS_RADIO){ + }else if (lt == AIRPCAP_LT_802_11_PLUS_RADIO) { return AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_RADIO; - }else if(lt == AIRPCAP_LT_802_11_PLUS_PPI){ + }else if (lt == AIRPCAP_LT_802_11_PLUS_PPI) { return AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_PPI; - }else if(lt == AIRPCAP_LT_UNKNOWN){ + }else if (lt == AIRPCAP_LT_UNKNOWN) { return AIRPCAP_LINK_TYPE_NAME_UNKNOWN; } return NULL; @@ -471,10 +471,10 @@ airpcap_update_frequency_and_offset(airpcap_if_info_t* if_info) PAirpcapHandle ad; gboolean return_value = FALSE; - if (if_info != NULL){ + if (if_info != NULL) { ad = airpcap_if_open(if_info->name, ebuf); - if(ad != NULL) { + if (ad != NULL) { return_value = airpcap_if_set_device_channel_ex(ad,if_info->channelInfo); airpcap_if_close(ad); } @@ -524,9 +524,9 @@ airpcap_channel_changed_noset_cb(GtkWidget *channel_cb, gpointer channel_offset_ static int airpcap_get_selected_channel_offset(GtkWidget *channel_offset_cb) { - int offset; + int offset; gchar *off_str; - int retval = 0; + int retval = 0; if (channel_offset_cb == NULL || !gtk_widget_get_sensitive(channel_offset_cb)) { @@ -557,7 +557,7 @@ airpcap_channel_offset_changed_cb(GtkWidget *channel_offset_cb, gpointer data _U airpcap_if_selected->channelInfo.ExtChannel = airpcap_get_selected_channel_offset(channel_offset_cb); airpcap_if_selected->saved = FALSE; change_airpcap_settings = TRUE; - if (!airpcap_update_frequency_and_offset(airpcap_if_selected)){ + if (!airpcap_update_frequency_and_offset(airpcap_if_selected)) { simple_dialog(ESD_TYPE_ERROR,ESD_BTN_OK, "Unable to set extension channel %d", airpcap_if_selected->channelInfo.ExtChannel); @@ -571,11 +571,11 @@ airpcap_channel_offset_changed_cb(GtkWidget *channel_offset_cb, gpointer data _U void airpcap_update_channel_offset_combo(airpcap_if_info_t* if_info, guint chan_freq, GtkWidget *channel_offset_cb, gboolean set) { - gint current_offset; - gint new_offset; + gint current_offset; + gint new_offset; guint i; - gint active_idx = 0; - gint idx_count = -1; + gint active_idx = 0; + gint idx_count = -1; if (!if_info || airpcap_if_is_any(if_info) || if_info->pSupportedChannels == NULL || if_info->numSupportedChannels < 1) { gtk_widget_set_sensitive(GTK_WIDGET(channel_offset_cb),FALSE); @@ -614,7 +614,7 @@ airpcap_update_channel_offset_combo(airpcap_if_info_t* if_info, guint chan_freq, if (new_offset == 0) { active_idx = idx_count; } - if ((if_info->pSupportedChannels[i].Flags & FLAG_CAN_BE_HIGH)){ + if ((if_info->pSupportedChannels[i].Flags & FLAG_CAN_BE_HIGH)) { gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(channel_offset_cb), "+1"); idx_count++; if (new_offset == 1) { @@ -632,7 +632,7 @@ airpcap_update_channel_offset_combo(airpcap_if_info_t* if_info, guint chan_freq, change_airpcap_settings = TRUE; if_info->channelInfo.ExtChannel = new_offset; - if (!airpcap_update_frequency_and_offset(if_info)){ + if (!airpcap_update_frequency_and_offset(if_info)) { simple_dialog(ESD_TYPE_ERROR,ESD_BTN_OK,"Adapter failed to be set with the following settings: Frequency - %d Extension Channel - %d", if_info->channelInfo.Frequency, if_info->channelInfo.ExtChannel); } } @@ -648,7 +648,7 @@ airpcap_update_channel_offset_combo(airpcap_if_info_t* if_info, guint chan_freq, int airpcap_if_is_any(airpcap_if_info_t* if_info) { - if(g_ascii_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)==0) + if (g_ascii_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)==0) return 1; else return 0; @@ -660,7 +660,7 @@ airpcap_if_is_any(airpcap_if_info_t* if_info) void airpcap_update_channel_combo(GtkWidget* channel_cb, airpcap_if_info_t* if_info) { - if(!if_info || airpcap_if_is_any(if_info) || !airpcap_if_selected) + if (!if_info || airpcap_if_is_any(if_info) || !airpcap_if_selected) { gtk_combo_box_set_active(GTK_COMBO_BOX(channel_cb), -1); change_airpcap_settings = FALSE; @@ -672,9 +672,9 @@ airpcap_update_channel_combo(GtkWidget* channel_cb, airpcap_if_info_t* if_info) gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(channel_cb), 0); } - if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0){ + if (if_info->pSupportedChannels != NULL && if_info->numSupportedChannels > 0) { guint i; - for (i = 0; i<(if_info->numSupportedChannels); i++){ + for (i = 0; i<(if_info->numSupportedChannels); i++) { gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(channel_cb), ieee80211_mhz_to_str(airpcap_if_selected->pSupportedChannels[i].Frequency)); } } @@ -691,8 +691,8 @@ airpcap_update_channel_combo(GtkWidget* channel_cb, airpcap_if_info_t* if_info) static void airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_info_t *fake_if_info) { - GtkTreePath *path; - GtkTreeIter iter; + GtkTreePath *path; + GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(key_list_store); /* airpcap stuff */ @@ -707,7 +707,7 @@ airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_in gchar *row_type, *row_key; /* SSID not needed for AirPcap */ size_t key_len; - if(fake_if_info == NULL) + if (fake_if_info == NULL) return; keys_in_list = gtk_tree_model_iter_n_children(model, NULL); @@ -737,11 +737,11 @@ airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_in KL_COL_KEY, &row_key, -1); - if(g_ascii_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0) + if (g_ascii_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0) KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WEP; - else if(g_ascii_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0) + else if (g_ascii_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0) KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WPA_PWD; - else if(g_ascii_strcasecmp(row_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0) + else if (g_ascii_strcasecmp(row_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0) KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WPA_PMK; /* Retrieve the Item corresponding to the i-th key */ @@ -750,8 +750,8 @@ airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_in KeysCollection->Keys[i].KeyLen = (guint) key_len / 2; memset(&KeysCollection->Keys[i].KeyData, 0, sizeof(KeysCollection->Keys[i].KeyData)); - /* Key must be saved in adifferent way, depending on its type... */ - if(KeysCollection->Keys[i].KeyType == AIRPDCAP_KEY_TYPE_WEP) + /* Key must be saved in a different way, depending on its type... */ + if (KeysCollection->Keys[i].KeyType == AIRPDCAP_KEY_TYPE_WEP) { for(j = 0 ; j < key_len; j += 2) { @@ -769,7 +769,7 @@ airpcap_add_keys_to_driver_from_list(GtkListStore *key_list_store, airpcap_if_in /* * Free the old adapter key collection! */ - if(fake_if_info->keysCollection != NULL) + if (fake_if_info->keysCollection != NULL) g_free(fake_if_info->keysCollection); /* @@ -791,13 +791,13 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto GtkTreeModel *model = GTK_TREE_MODEL(key_list_store); gboolean items_left; gint if_n = 0; - gint i = 0; + gint i = 0; airpcap_if_info_t* curr_if = NULL; airpcap_if_info_t* fake_info_if = NULL; - GList* key_list=NULL; + GList* key_list = NULL; char* tmp_type = NULL; - char* tmp_key = NULL; + char* tmp_key = NULL; char* tmp_ssid = NULL; decryption_key_t* tmp_dk=NULL; @@ -817,7 +817,7 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto KL_COL_SSID, &tmp_ssid, -1); - if(g_ascii_strcasecmp(tmp_type, AIRPCAP_WEP_KEY_STRING) == 0) + if (g_ascii_strcasecmp(tmp_type, AIRPCAP_WEP_KEY_STRING) == 0) { tmp_dk = (decryption_key_t*)g_malloc(sizeof(decryption_key_t)); tmp_dk->key = g_string_new(tmp_key); @@ -826,7 +826,7 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto tmp_dk->bits = (guint) tmp_dk->key->len * 4; key_list = g_list_append(key_list,tmp_dk); } - else if(g_ascii_strcasecmp(tmp_type, AIRPCAP_WPA_PWD_KEY_STRING) == 0) + else if (g_ascii_strcasecmp(tmp_type, AIRPCAP_WPA_PWD_KEY_STRING) == 0) { tmp_dk = (decryption_key_t*)g_malloc(sizeof(decryption_key_t)); tmp_dk->key = g_string_new(tmp_key); @@ -836,7 +836,7 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto tmp_dk->bits = 256; key_list = g_list_append(key_list,tmp_dk); } - else if(g_ascii_strcasecmp(tmp_type, AIRPCAP_WPA_BIN_KEY_STRING) == 0) + else if (g_ascii_strcasecmp(tmp_type, AIRPCAP_WPA_BIN_KEY_STRING) == 0) { tmp_dk = (decryption_key_t*)g_malloc(sizeof(decryption_key_t)); tmp_dk->key = g_string_new(tmp_key); @@ -855,7 +855,7 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto /* * Save the key list for driver. */ - if( (if_list == NULL) || (info_if == NULL) ) return; + if ( (if_list == NULL) || (info_if == NULL) ) return; fake_info_if = airpcap_driver_fake_if_info_new(); @@ -870,7 +870,7 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto { curr_if = (airpcap_if_info_t*)g_list_nth_data(if_list,i); - if(curr_if != NULL) + if (curr_if != NULL) { /* XXX - Set an empty collection */ airpcap_if_clear_decryption_settings(curr_if); @@ -896,10 +896,10 @@ airpcap_read_and_save_decryption_keys_from_list_store(GtkListStore* key_list_sto gboolean airpcap_check_decryption_keys(GList* if_list) { - gint if_n = 0; - gint i = 0; + gint if_n = 0; + gint i = 0; gint n_adapters_keys = 0; - gint n_driver_keys = 0; + gint n_driver_keys = 0; airpcap_if_info_t* curr_if = NULL; GList* wireshark_key_list; @@ -913,7 +913,7 @@ airpcap_check_decryption_keys(GList* if_list) * If no AirPcap interface is found, return TRUE, so Wireshark * will use HIS OWN keys. */ - if(if_list == NULL) + if (if_list == NULL) return TRUE; if_n = g_list_length(if_list); @@ -935,10 +935,10 @@ airpcap_check_decryption_keys(GList* if_list) adapters_keys_equals &= key_lists_are_equal(wireshark_key_list,curr_adapter_key_list); } - if(n_adapters_keys != 0) /* If for some reason at least one specific key has been found */ + if (n_adapters_keys != 0) /* If for some reason at least one specific key has been found */ equals &= adapters_keys_equals; /* */ - if(n_driver_keys == 0) /* No keys set in any of the AirPcap adapters... */ + if (n_driver_keys == 0) /* No keys set in any of the AirPcap adapters... */ return TRUE; /* Use Wireshark keys and set them ad default for airpcap devices */ return equals; @@ -960,9 +960,9 @@ void airpcap_load_decryption_keys(GList* if_list) { gint if_n = 0; - gint i = 0; + gint i = 0; - if(if_list == NULL) return; + if (if_list == NULL) return; if_n = g_list_length(if_list); @@ -980,11 +980,11 @@ void airpcap_save_decryption_keys(GList* key_list, GList* adapters_list) { gint if_n = 0; - gint i = 0; + gint i = 0; airpcap_if_info_t* curr_if = NULL; GList* empty_key_list = NULL; - if( (key_list == NULL) || (adapters_list == NULL)) return; + if ( (key_list == NULL) || (adapters_list == NULL)) return; if_n = g_list_length(adapters_list); @@ -1023,7 +1023,7 @@ airpcap_enable_toolbar_widgets(GtkWidget* w, gboolean en) *fcs_lb, *advanced_bt; - if(w == NULL) + if (w == NULL) return; toolbar_tb = w; @@ -1038,21 +1038,21 @@ airpcap_enable_toolbar_widgets(GtkWidget* w, gboolean en) advanced_bt = g_object_get_data(G_OBJECT(toolbar_tb),AIRPCAP_TOOLBAR_ADVANCED_KEY); - if(if_description_lb != NULL) + if (if_description_lb != NULL) gtk_widget_set_sensitive(if_description_lb,en); - if(channel_lb != NULL) + if (channel_lb != NULL) gtk_widget_set_sensitive(channel_lb,en); - if(toolbar_channel_cb != NULL) + if (toolbar_channel_cb != NULL) gtk_widget_set_sensitive(toolbar_channel_cb,en); - if(channel_offset_cb != NULL) + if (channel_offset_cb != NULL) gtk_widget_set_sensitive(channel_offset_cb,en); - if(channel_offset_lb != NULL) + if (channel_offset_lb != NULL) gtk_widget_set_sensitive(channel_offset_lb,en); - if(fcs_lb != NULL) + if (fcs_lb != NULL) gtk_widget_set_sensitive(fcs_lb,en); - if(fcs_cb != NULL) + if (fcs_cb != NULL) gtk_widget_set_sensitive(fcs_cb,en); - if(advanced_bt != NULL) + if (advanced_bt != NULL) gtk_widget_set_sensitive(advanced_bt,en); return; diff --git a/ui/gtk/dcerpc_stat.c b/ui/gtk/dcerpc_stat.c index 3bce9c98c6..6813bec890 100644 --- a/ui/gtk/dcerpc_stat.c +++ b/ui/gtk/dcerpc_stat.c @@ -134,7 +134,7 @@ dcerpcstat_packet(void *rs_arg, packet_info *pinfo, epan_dissect_t *edt _U_, con return FALSE; } if(ri->call_data->opnum >= rs->num_procedures){ - /* don't handle this since its outside of known table */ + /* don't handle this since it's outside of known table */ return FALSE; } diff --git a/ui/gtk/dlg_utils.c b/ui/gtk/dlg_utils.c index 4855f436df..86b34e009a 100644 --- a/ui/gtk/dlg_utils.c +++ b/ui/gtk/dlg_utils.c @@ -62,8 +62,8 @@ dlg_button_new(GtkWidget *hbox, GtkWidget *button_hbox, const gchar *stock_id) void dlg_button_focus_nth(GtkWidget *hbox, gint focus_item) { GtkWidget *button_hbox, *button; - GList *children; - gint cur_item = 0; + GList *children; + gint cur_item = 0; if (!hbox) return; @@ -98,44 +98,44 @@ dlg_button_focus_nth(GtkWidget *hbox, gint focus_item) { GtkWidget * dlg_button_row_new(const gchar *stock_id_first, ...) { - gint buttons = 0; - va_list stock_id_list; + gint buttons = 0; + va_list stock_id_list; const gchar *stock_id = stock_id_first; GtkWidget *hbox; GtkWidget *button_hbox; GtkWidget *help_hbox; GtkWidget *button; - const gchar *apply = NULL; - const gchar *cancel = NULL; - const gchar *cap_start = NULL; - const gchar *cap_stop = NULL; - const gchar *cap_options = NULL; + const gchar *apply = NULL; + const gchar *cancel = NULL; + const gchar *cap_start = NULL; + const gchar *cap_stop = NULL; + const gchar *cap_options = NULL; #ifdef _WIN32 - const gchar *cap_details = NULL; + const gchar *cap_details = NULL; #endif - const gchar *clear = NULL; - const gchar *closex = NULL; - const gchar *copy = NULL; - const gchar *create_stat = NULL; - const gchar *delete = NULL; - const gchar *dont_save = NULL; - const gchar *filter_stream= NULL; - const gchar *find = NULL; - const gchar *help = NULL; - const gchar *jump = NULL; - const gchar *no = NULL; - const gchar *ok = NULL; - const gchar *print = NULL; - const gchar *save = NULL; - const gchar *save_as = NULL; - const gchar *save_all = NULL; - const gchar *stop = NULL; - const gchar *yes = NULL; - const gchar *refresh = NULL; - const gchar *add = NULL; + const gchar *clear = NULL; + const gchar *closex = NULL; + const gchar *copy = NULL; + const gchar *create_stat = NULL; + const gchar *delete = NULL; + const gchar *dont_save = NULL; + const gchar *filter_stream = NULL; + const gchar *find = NULL; + const gchar *help = NULL; + const gchar *jump = NULL; + const gchar *no = NULL; + const gchar *ok = NULL; + const gchar *print = NULL; + const gchar *save = NULL; + const gchar *save_as = NULL; + const gchar *save_all = NULL; + const gchar *stop = NULL; + const gchar *yes = NULL; + const gchar *refresh = NULL; + const gchar *add = NULL; #ifdef HAVE_GEOIP - const gchar *map = NULL; + const gchar *map = NULL; #endif /* HAVE_GEOIP */ const gchar *follow_stream = NULL; const gchar *graph_a_b = NULL; @@ -389,10 +389,10 @@ dlg_button_row_new(const gchar *stock_id_first, ...) return hbox; } if (save && dont_save && cancel) { - dlg_button_new(hbox, button_hbox, dont_save); - dlg_button_new(hbox, button_hbox, cancel); - dlg_button_new(hbox, button_hbox, save); - return hbox; + dlg_button_new(hbox, button_hbox, dont_save); + dlg_button_new(hbox, button_hbox, cancel); + dlg_button_new(hbox, button_hbox, save); + return hbox; } } if (buttons == 4) { @@ -414,33 +414,33 @@ dlg_button_row_new(const gchar *stock_id_first, ...) #endif /* beware: sequence of buttons is important! */ - if (ok != NULL) dlg_button_new(hbox, button_hbox, ok); - if (delete != NULL) dlg_button_new(hbox, button_hbox, delete); - if (jump != NULL) dlg_button_new(hbox, button_hbox, jump); - if (find != NULL) dlg_button_new(hbox, button_hbox, find); - if (print != NULL) dlg_button_new(hbox, button_hbox, print); - if (create_stat != NULL) dlg_button_new(hbox, button_hbox, create_stat); - if (apply != NULL) dlg_button_new(hbox, button_hbox, apply); - if (yes != NULL) dlg_button_new(hbox, button_hbox, yes); - if (no != NULL) dlg_button_new(hbox, button_hbox, no); - if (save != NULL) dlg_button_new(hbox, button_hbox, save); - if (save_as != NULL) dlg_button_new(hbox, button_hbox, save_as); - if (save_all != NULL) dlg_button_new(hbox, button_hbox, save_all); - if (dont_save != NULL) dlg_button_new(hbox, button_hbox, dont_save); - if (cap_start != NULL) dlg_button_new(hbox, button_hbox, cap_start); - if (cap_stop != NULL) dlg_button_new(hbox, button_hbox, cap_stop); - if (cap_options != NULL) dlg_button_new(hbox, button_hbox, cap_options); + if (ok != NULL) dlg_button_new(hbox, button_hbox, ok); + if (delete != NULL) dlg_button_new(hbox, button_hbox, delete); + if (jump != NULL) dlg_button_new(hbox, button_hbox, jump); + if (find != NULL) dlg_button_new(hbox, button_hbox, find); + if (print != NULL) dlg_button_new(hbox, button_hbox, print); + if (create_stat != NULL) dlg_button_new(hbox, button_hbox, create_stat); + if (apply != NULL) dlg_button_new(hbox, button_hbox, apply); + if (yes != NULL) dlg_button_new(hbox, button_hbox, yes); + if (no != NULL) dlg_button_new(hbox, button_hbox, no); + if (save != NULL) dlg_button_new(hbox, button_hbox, save); + if (save_as != NULL) dlg_button_new(hbox, button_hbox, save_as); + if (save_all != NULL) dlg_button_new(hbox, button_hbox, save_all); + if (dont_save != NULL) dlg_button_new(hbox, button_hbox, dont_save); + if (cap_start != NULL) dlg_button_new(hbox, button_hbox, cap_start); + if (cap_stop != NULL) dlg_button_new(hbox, button_hbox, cap_stop); + if (cap_options != NULL) dlg_button_new(hbox, button_hbox, cap_options); #ifdef _WIN32 - if (cap_details != NULL) dlg_button_new(hbox, button_hbox, cap_details); + if (cap_details != NULL) dlg_button_new(hbox, button_hbox, cap_details); #endif - if (stop != NULL) dlg_button_new(hbox, button_hbox, stop); - if (clear != NULL) dlg_button_new(hbox, button_hbox, clear); - if (filter_stream!= NULL) dlg_button_new(hbox, button_hbox, filter_stream); + if (stop != NULL) dlg_button_new(hbox, button_hbox, stop); + if (clear != NULL) dlg_button_new(hbox, button_hbox, clear); + if (filter_stream != NULL) dlg_button_new(hbox, button_hbox, filter_stream); if (follow_stream != NULL) dlg_button_new(hbox, button_hbox, follow_stream); - if (graph_a_b != NULL) dlg_button_new(hbox, button_hbox, graph_a_b); - if (graph_b_a != NULL) dlg_button_new(hbox, button_hbox, graph_b_a); - if (closex != NULL) dlg_button_new(hbox, button_hbox, closex); - if (cancel != NULL) dlg_button_new(hbox, button_hbox, cancel); + if (graph_a_b != NULL) dlg_button_new(hbox, button_hbox, graph_a_b); + if (graph_b_a != NULL) dlg_button_new(hbox, button_hbox, graph_b_a); + if (closex != NULL) dlg_button_new(hbox, button_hbox, closex); + if (cancel != NULL) dlg_button_new(hbox, button_hbox, cancel); return hbox; } @@ -483,7 +483,7 @@ dlg_window_new(const gchar *title) } /* Create a configuration dialog box window that belongs to Wireshark's - * main window and add the name of the current profile name to it's title bar + * main window and add the name of the current profile name to its title bar */ GtkWidget * dlg_conf_window_new(const gchar *title) @@ -506,15 +506,15 @@ dlg_conf_window_new(const gchar *title) return win; } -/* Set the "activate" signal for a widget to call a routine to - activate the "OK" button for a dialog box. +/* Set the "activate" signal for a widget to call a routine to + activate the "OK" button for a dialog box. - XXX - there should be a way to specify that a GtkEntry widget - shouldn't itself handle the Return key, but should let it be - passed on to the parent, so that you don't have to do this - by hand for every GtkEntry widget in a dialog box, but, alas, - there isn't. (Does this problem exist for other widgets? - I.e., are there any others that seize the Return key? */ + XXX - there should be a way to specify that a GtkEntry widget + shouldn't itself handle the Return key, but should let it be + passed on to the parent, so that you don't have to do this + by hand for every GtkEntry widget in a dialog box, but, alas, + there isn't. (Does this problem exist for other widgets? + I.e., are there any others that seize the Return key? */ void dlg_set_activate(GtkWidget *widget, GtkWidget *ok_button) { diff --git a/ui/gtk/dlg_utils.h b/ui/gtk/dlg_utils.h index 618b6b2fce..a7df9d0557 100644 --- a/ui/gtk/dlg_utils.h +++ b/ui/gtk/dlg_utils.h @@ -104,7 +104,7 @@ extern GtkWidget *dlg_window_new(const gchar *title); /** Create a configuration dialog box window that belongs to Wireshark's - * main window and add the name of the current profile name to it's title bar + * main window and add the name of the current profile name to its title bar * If you want to create a window, use window_new() instead. * See window_new() for general window usage. * diff --git a/ui/gtk/file_dlg.c b/ui/gtk/file_dlg.c index e76767a9d9..4f15f6e0d1 100644 --- a/ui/gtk/file_dlg.c +++ b/ui/gtk/file_dlg.c @@ -158,7 +158,7 @@ file_selection_set_current_folder(GtkWidget *fs, const gchar *filename) new_filename = g_strdup(filename); } - /* this function is very pedantic about it's filename parameter */ + /* this function is very pedantic about its filename parameter */ /* no trailing '\' allowed, unless a win32 root dir "D:\" */ ret = gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fs), new_filename); g_free(new_filename); diff --git a/ui/gtk/file_dlg.h b/ui/gtk/file_dlg.h index b1bff57499..9aa9311227 100644 --- a/ui/gtk/file_dlg.h +++ b/ui/gtk/file_dlg.h @@ -116,7 +116,7 @@ extern gchar *file_selection_run(GtkWidget *fs); extern gboolean file_target_unwritable_ui(GtkWidget *chooser_w, char *cf_name); #endif -/** The function file_selection_browse() will g_object_set_data() itself on it's parent window. +/** The function file_selection_browse() will g_object_set_data() itself on its parent window. * When destroying the parent window, it can close the corresponding file selection. */ #define E_FILE_SEL_DIALOG_PTR_KEY "file_sel_dialog_ptr" diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c index 63421cbebd..c9b5beb324 100644 --- a/ui/gtk/gui_utils.c +++ b/ui/gtk/gui_utils.c @@ -456,7 +456,7 @@ window_destroy(GtkWidget *win) #if 0 /* Do we need this one ? */ -/* convert an xpm to a GtkWidget, using the window settings from it's parent */ +/* convert an xpm to a GtkWidget, using the window settings from its parent */ /* (be sure that the parent window is already being displayed) */ GtkWidget * xpm_to_widget_from_parent(GtkWidget *parent, diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 90e396f8f6..eca6c4bf19 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -402,7 +402,7 @@ selected_ptree_info_cb(GtkWidget *widget _U_, gpointer data _U_) /* convert selected field to protocol abbreviation */ /* XXX - could this conversion be simplified? */ field_id = cfile.finfo_selected->hfinfo->id; - /* if the selected field isn't a protocol, get it's parent */ + /* if the selected field isn't a protocol, get its parent */ if(!proto_registrar_is_protocol(field_id)) { field_id = proto_registrar_get_parent(cfile.finfo_selected->hfinfo->id); } @@ -480,7 +480,7 @@ selected_ptree_ref_cb(GtkWidget *widget _U_, gpointer data _U_) /* convert selected field to protocol abbreviation */ /* XXX - could this conversion be simplified? */ field_id = cfile.finfo_selected->hfinfo->id; - /* if the selected field isn't a protocol, get it's parent */ + /* if the selected field isn't a protocol, get its parent */ if(!proto_registrar_is_protocol(field_id)) { field_id = proto_registrar_get_parent(cfile.finfo_selected->hfinfo->id); } @@ -1347,7 +1347,7 @@ resolv_update_cb(gpointer data _U_) } -/* Set main_window_name and it's icon title to the capture filename */ +/* Set main_window_name and its icon title to the capture filename */ static void set_display_filename(capture_file *cf) { @@ -1911,7 +1911,7 @@ main_capture_callback(gint event, capture_options *capture_opts, gpointer user_d case(capture_cb_capture_stopping): g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: capture stopping"); /* Beware: this state won't be called, if the capture child - * closes the capturing on it's own! */ + * closes the capturing on its own! */ #ifdef HAVE_GTKOSXAPPLICATION theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL); gtkosx_application_set_dock_icon_pixbuf(theApp,gdk_pixbuf_new_from_xpm_data(wsicon64_xpm)); diff --git a/ui/gtk/main.h b/ui/gtk/main.h index 845cf296c0..4beffbf050 100644 --- a/ui/gtk/main.h +++ b/ui/gtk/main.h @@ -327,10 +327,10 @@ extern void main_colorize_changed(gboolean packet_list_colorize); */ extern gboolean main_do_quit(void); -/** Rearrange the main window widgets, user changed it's preferences. */ +/** Rearrange the main window widgets, user changed its preferences. */ extern void main_widgets_rearrange(void); -/** Show or hide the main window widgets, user changed it's preferences. */ +/** Show or hide the main window widgets, user changed its preferences. */ extern void main_widgets_show_or_hide(void); /* Update main window items based on whether we have a packet history. */ diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index 7fecaa684b..4f53ba667f 100644 --- a/ui/gtk/main_menubar.c +++ b/ui/gtk/main_menubar.c @@ -4010,14 +4010,14 @@ set_menu_object_data (const gchar *path, const gchar *key, gpointer data) /* Recently used capture files submenu: * Submenu containing the recently used capture files. - * The capture filenames are always kept with the absolute path, to be independant + * The capture filenames are always kept with the absolute path to be independent * of the current path. * They are only stored inside the labels of the submenu (no separate list). */ #define MENU_RECENT_FILES_PATH "/Menubar/FileMenu/OpenRecent" #define MENU_RECENT_FILES_KEY "Recent File Name" -/* Add a file name to the top of the list, if its allrady present remove it first */ +/* Add a file name to the top of the list; if it's already present remove it first */ static GList * remove_present_file_name(GList *recent_files_list, const gchar *cf_name) { @@ -4255,7 +4255,7 @@ add_tap_plugins (guint merge_id, GtkUIManager *ui_manager) g_list_free(cfg_list); } -/* Open a file by it's name +/* Open a file by its name (Beware: will not ask to close existing capture file!) */ void menu_open_filename(gchar *cf_name) diff --git a/ui/gtk/main_statusbar.c b/ui/gtk/main_statusbar.c index 298efc832e..a3fe598f1a 100644 --- a/ui/gtk/main_statusbar.c +++ b/ui/gtk/main_statusbar.c @@ -1089,7 +1089,7 @@ statusbar_capture_callback(gint event, capture_options *capture_opts, break; case(capture_cb_capture_stopping): /* Beware: this state won't be called, if the capture child - * closes the capturing on it's own! */ + * closes the capturing on its own! */ break; case(capture_cb_capture_failed): statusbar_capture_failed_cb(capture_opts); diff --git a/ui/gtk/main_toolbar.c b/ui/gtk/main_toolbar.c index 061f79672b..f651511723 100644 --- a/ui/gtk/main_toolbar.c +++ b/ui/gtk/main_toolbar.c @@ -384,7 +384,7 @@ toolbar_new(void) toolbar_item(color_display_button, main_tb, GTK_STOCK_SELECT_COLOR, "Edit coloring rules...", color_display_cb, NULL); - /* the preference button uses it's own Stock icon label "Prefs", as "Preferences" is too long */ + /* the preference button uses its own Stock icon label "Prefs", as "Preferences" is too long */ toolbar_item(prefs_button, main_tb, GTK_STOCK_PREFERENCES, "Edit preferences...", prefs_cb, NULL); diff --git a/ui/gtk/prefs_dlg.c b/ui/gtk/prefs_dlg.c index fb6236c425..29c3e5ca17 100644 --- a/ui/gtk/prefs_dlg.c +++ b/ui/gtk/prefs_dlg.c @@ -546,7 +546,7 @@ prefs_page_cb(GtkWidget *w _U_, gpointer dummy _U_, PREFS_PAGE_E prefs_page) prefs_tree_page_add(label_str, cts.page, store, &gui_iter); cts.page++; - /* select the main GUI page as the default page and expand it's children */ + /* select the main GUI page as the default page and expand its children */ gtk_tree_selection_select_iter(selection, &gui_iter); /* (expand will only take effect, when at least one child exists) */ gtk_tree_view_expand_all(GTK_TREE_VIEW(cts.tree)); diff --git a/ui/gtk/range_utils.c b/ui/gtk/range_utils.c index c7ced2a7b8..2a4f18e48c 100644 --- a/ui/gtk/range_utils.c +++ b/ui/gtk/range_utils.c @@ -527,7 +527,7 @@ range_entry_in_event(GtkWidget *widget _U_, GdkEventFocus *event _U_, gpointer u /* needs to do when the default button was pressed. This is difficult as we currently */ /* don't have a concept to call the hosting dialog this way. */ - /* XXX - As we might want to put the whole range thing in it's own dialog, this would be */ + /* XXX - As we might want to put the whole range thing in its own dialog, this would be */ /* a much easier task than it would be today as we could simply close our own dialog. */ } diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c index de2129144a..10e1925657 100644 --- a/ui/gtk/rlc_lte_graph.c +++ b/ui/gtk/rlc_lte_graph.c @@ -2242,7 +2242,7 @@ static gboolean motion_notify_event(GtkWidget *widget _U_, GdkEventMotion *event } } else { - /* Update the cross if its being shown */ + /* Update the cross if it's being shown */ if (g->cross.erase_needed) cross_erase(g); if (g->cross.draw) { diff --git a/ui/gtk/voip_calls.c b/ui/gtk/voip_calls.c index 53ee9b1da7..a9dfffb0f6 100644 --- a/ui/gtk/voip_calls.c +++ b/ui/gtk/voip_calls.c @@ -3316,7 +3316,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, } else if(pi->key_val == 23) { /* User pressed the soft key 3 */ /* Cancel on cs2k so clear buffer */ - /* On mcs its config which will clear the buffer too */ + /* On mcs it's config which will clear the buffer too */ tmp_unistim_info->key_buffer = g_strdup("\n"); /* User pressed something, set labels*/ |