aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/help_dlg.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-08-30 02:50:18 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-08-30 02:50:18 +0000
commit0e3cb70212e3be65cca036b9e89e6366f8a8a5ef (patch)
treed443ba6ccbe2a38e65d07311896e4db887bfad28 /gtk/help_dlg.c
parent1a06c6a7eae14624d1e1a766fe2221c49a306537 (diff)
downloadwireshark-0e3cb70212e3be65cca036b9e89e6366f8a8a5ef.tar.gz
wireshark-0e3cb70212e3be65cca036b9e89e6366f8a8a5ef.tar.bz2
wireshark-0e3cb70212e3be65cca036b9e89e6366f8a8a5ef.zip
Add FT_STRINGZ type. NCP dissector is only one that uses it right now.
Remove tvb_get_stringz from quake dissector and add tvb_get_nstringz, tvb_get_nstringz0, and tvb_strnlen to tvbuff.c. Remove multiple definitions of pntohl and friends from various places (except for wiretap) and put into pint.h Consolidate duplicate code for turning FT_* enums into strings (ala the glossary). svn path=/trunk/; revision=2382
Diffstat (limited to 'gtk/help_dlg.c')
-rw-r--r--gtk/help_dlg.c73
1 files changed, 3 insertions, 70 deletions
diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c
index de7ef1be6f..6fe37795a3 100644
--- a/gtk/help_dlg.c
+++ b/gtk/help_dlg.c
@@ -1,6 +1,6 @@
/* help_dlg.c
*
- * $Id: help_dlg.c,v 1.6 2000/08/22 06:38:32 gram Exp $
+ * $Id: help_dlg.c,v 1.7 2000/08/30 02:50:18 gram Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@@ -48,6 +48,7 @@
#include "main.h"
#include "util.h"
#include "ui_util.h"
+#include "proto.h"
typedef enum {
OVERVIEW_HELP,
@@ -365,75 +366,7 @@ static void set_help_text(GtkWidget *w, help_type_t type)
nb_lines += 2;
} else {
- /* XXX should convert this ? */
- switch(hfinfo->type) {
- case FT_NONE:
- type_name = "FT_NONE";
- break;
- case FT_BOOLEAN:
- type_name = "FT_BOOLEAN";
- break;
- case FT_UINT8:
- type_name = "FT_UINT8";
- break;
- case FT_UINT16:
- type_name = "FT_UINT16";
- break;
- case FT_UINT24:
- type_name = "FT_UINT24";
- break;
- case FT_UINT32:
- type_name = "FT_UINT32";
- break;
- case FT_INT8:
- type_name = "FT_INT8";
- break;
- case FT_INT16:
- type_name = "FT_INT16";
- break;
- case FT_INT24:
- type_name = "FT_INT24";
- break;
- case FT_INT32:
- type_name = "FT_INT32";
- break;
- case FT_DOUBLE:
- type_name = "FT_DOUBLE";
- break;
- case FT_ABSOLUTE_TIME:
- type_name = "FT_ABSOLUTE_TIME";
- break;
- case FT_RELATIVE_TIME:
- type_name = "FT_RELATIVE_TIME";
- break;
- case FT_UINT_STRING:
- type_name = "FT_UINT_STRING";
- break;
- case FT_STRING:
- type_name = "FT_STRING";
- break;
- case FT_ETHER:
- type_name = "FT_ETHER";
- break;
- case FT_BYTES:
- type_name = "FT_BYTES";
- break;
- case FT_IPv4:
- type_name = "FT_IPv4";
- break;
- case FT_IPv6:
- type_name = "FT_IPv6";
- break;
- case FT_IPXNET:
- type_name = "FT_IPXNET";
- break;
- case FT_TEXT_ONLY:
- type_name = "FT_TEXT_ONLY";
- break;
- default:
- g_assert_not_reached();
- type_name = NULL;
- }
+ type_name = proto_registrar_ftype_name(hfinfo->type);
snprintf(buffer, BUFF_LEN, "%s%s%s%s(%s)\n",
hfinfo->abbrev,
&blanks[B_LEN - (maxlen - strlen(hfinfo->abbrev)) - 2],