*
* $Id$
*
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
#include "epan/packet_info.h"
#include "epan/epan.h"
#include "epan/value_string.h"
-#include "tap_menu.h"
+#include <epan/stat_cmd_args.h>
+#include "../stat_menu.h"
+#include "gui_stat_menu.h"
#include "image/clist_ascend.xpm"
#include "image/clist_descend.xpm"
#include "simple_dialog.h"
#include "filter_dlg.h"
#include "compat_macros.h"
#include <epan/dissectors/packet-ansi_map.h>
-#include "ui_util.h"
+#include "gui_utils.h"
typedef struct column_arrows {
}
-/*
- * Never gets called ?
- */
-static void
-ansi_map_stat_gtk_init(
- char *optarg)
-{
- /* does not appear to be called */
-
- optarg = optarg;
-}
-
-
static void
ansi_map_stat_gtk_cb(
GtkWidget *w _U_,
gpointer d _U_)
{
int i;
- char str[100];
/*
i = 0;
while (ansi_map_opr_code_strings[i].strptr)
{
- g_snprintf(str, 100, "0x%02x", ansi_map_opr_code_strings[i].value);
- dlg.entries[0] = g_strdup(str);
+ dlg.entries[0] = g_strdup_printf("0x%02x",
+ ansi_map_opr_code_strings[i].value);
dlg.entries[1] = g_strdup(ansi_map_opr_code_strings[i].strptr);
i++;
}
- ansi_map_stat_draw(NULL);
+ ansi_map_stat_draw(&stat);
+}
+
+
+static void
+ansi_map_stat_gtk_init(
+ const char *optarg _U_,
+ void* userdata _U_ )
+{
+ ansi_map_stat_gtk_cb(NULL, NULL);
}
GString *err_p;
- register_tap_listener_cmd_arg("ansi_map,", ansi_map_stat_gtk_init);
-
memset((void *) &stat, 0, sizeof(ansi_map_stat_t));
err_p =
exit(1);
}
- register_tap_menu_item("ANSI/MAP Operation", REGISTER_TAP_GROUP_TELEPHONY,
+ register_stat_menu_item("ANSI/MAP Operation", REGISTER_STAT_GROUP_TELEPHONY,
ansi_map_stat_gtk_cb, NULL, NULL, NULL);
+ register_stat_cmd_arg("ansi_map", ansi_map_stat_gtk_init,NULL);
}