aboutsummaryrefslogtreecommitdiffstats
path: root/epan/strutil.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-23 19:28:38 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-23 19:28:38 +0000
commit25916cea51bf70d0d1f86ef78561fc03d12ceb5c (patch)
treee548d193b8418f9e45b8b4c4523c1b702068062f /epan/strutil.c
parent48c3b28e0bccb7684a7ab988164bdfe935933a4a (diff)
From Jakub Zawadzki:
Optimizations. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4303 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31967 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/strutil.c')
-rw-r--r--epan/strutil.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/epan/strutil.c b/epan/strutil.c
index eebbff38ed..ab0019cf8a 100644
--- a/epan/strutil.c
+++ b/epan/strutil.c
@@ -370,49 +370,6 @@ format_text_wsp(const guchar *string, size_t len)
return fmtbuf[idx];
}
-/* Max string length for displaying byte string. */
-#define MAX_BYTE_STR_LEN 48
-
-/* Turn an array of bytes into a string showing the bytes in hex. */
-#define N_BYTES_TO_STR_STRINGS 6
-gchar *
-bytes_to_str(const guint8 *bd, int bd_len) {
- return bytes_to_str_punct(bd,bd_len,'\0');
-}
-
-/* Turn an array of bytes into a string showing the bytes in hex with
- * punct as a bytes separator.
- */
-gchar *
-bytes_to_str_punct(const guint8 *bd, int bd_len, gchar punct) {
- gchar *cur;
- gchar *p;
- int len;
-
- cur=ep_alloc(MAX_BYTE_STR_LEN+3+1);
- p = cur;
- len = MAX_BYTE_STR_LEN;
- while (bd_len > 0 && len > 0) {
- *p++ = hex[(*bd) >> 4];
- *p++ = hex[(*bd) & 0xF];
- len -= 2;
- bd++;
- bd_len--;
- if(punct && bd_len > 0){
- *p++ = punct;
- len--;
- }
- }
- if (bd_len != 0) {
- /* Note that we're not showing the full string. */
- *p++ = '.';
- *p++ = '.';
- *p++ = '.';
- }
- *p = '\0';
- return cur;
-}
-
static gboolean
is_byte_sep(guint8 c)
{