aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/wsp_stat.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-11-03 18:28:35 +0000
committerBill Meier <wmeier@newsguy.com>2010-11-03 18:28:35 +0000
commit0ca948bacf0c180349c3a40b14e77b1d9ef738d7 (patch)
tree9b0cb0771383a2c43c39aea3d114cfbbb46b5820 /gtk/wsp_stat.c
parentdffb55434c04d43a14b1c410da6c4442f194e118 (diff)
Use value_string_ext fcns to access certain value_string arrays;
Some whitespace cleanup. svn path=/trunk/; revision=34763
Diffstat (limited to 'gtk/wsp_stat.c')
-rw-r--r--gtk/wsp_stat.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk/wsp_stat.c b/gtk/wsp_stat.c
index 447b7982c3..75febf54c5 100644
--- a/gtk/wsp_stat.c
+++ b/gtk/wsp_stat.c
@@ -282,9 +282,9 @@ wsp_init_table(wspstat_t *sp)
x=2;
}
/* Maybe we should display the hexadecimal value ? */
- /* g_snprintf(buffer, sizeof(buffer), "%s (0X%x)", match_strval( index2pdut( i ), wsp_vals_pdu_type), index2pdut(i) );*/
+ /* g_snprintf(buffer, sizeof(buffer), "%s (0X%x)", match_strval_ext( index2pdut( i ), &wsp_vals_pdu_type_ext), index2pdut(i) );*/
add_table_entry( sp,
- match_strval(index2pdut(i), wsp_vals_pdu_type), /* or buffer, */
+ match_strval_ext(index2pdut(i), &wsp_vals_pdu_type_ext), /* or buffer, */
x,
pos,
0
@@ -312,7 +312,8 @@ gtk_wspstat_init(const char *optarg, void *userdata _U_)
GtkWidget *bt_close;
GtkWidget *bbox;
guint32 i;
- wsp_status_code_t *sc;
+ wsp_status_code_t *sc;
+ const value_string *wsp_vals_status_p;
if (strncmp (optarg, "wsp,stat,", 9) == 0){
@@ -326,16 +327,17 @@ gtk_wspstat_init(const char *optarg, void *userdata _U_)
gtk_window_set_destroy_with_parent (GTK_WINDOW(sp->win), TRUE);
sp->hash = g_hash_table_new( g_int_hash, g_int_equal);
- for (i=0 ; wsp_vals_status[i].strptr ; i++ )
+ wsp_vals_status_p = VALUE_STRING_EXT_VS_P(&wsp_vals_status_ext);
+ for (i=0 ; wsp_vals_status_p[i].strptr ; i++ )
{
gint *key;
sc=g_malloc( sizeof(wsp_status_code_t) );
key=g_malloc( sizeof(gint) );
- sc->name=wsp_vals_status[i].strptr;
+ sc->name=wsp_vals_status_p[i].strptr;
sc->packets=0;
sc->widget=NULL;
sc->sp = sp;
- *key=wsp_vals_status[i].value;
+ *key=wsp_vals_status_p[i].value;
g_hash_table_insert(
sp->hash,
key,