aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-21 12:39:00 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-21 20:39:25 +0000
commitbfb432729156378d2f8fc8b666fda7e7b23e9749 (patch)
tree4c3e85ba30ff41319e48563ee0063c7b6e990f6c /wsutil
parentf3a68f00a1a9b7a3f28c6986713febaa81b92ba0 (diff)
Remove tvb_ from the names of wsutil mempbrk routines.
Routines that don't take a tvbuff as an argument shouldn't have tvb_ in the name. Change-Id: I3550256551e30b3f329cbbfca71ef27c727d29c0 Reviewed-on: https://code.wireshark.org/review/7302 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/ws_mempbrk.c6
-rw-r--r--wsutil/ws_mempbrk.h12
-rw-r--r--wsutil/ws_mempbrk_int.h6
-rw-r--r--wsutil/ws_mempbrk_sse42.c4
4 files changed, 15 insertions, 13 deletions
diff --git a/wsutil/ws_mempbrk.c b/wsutil/ws_mempbrk.c
index 28f6a61f7b..11b19e39ff 100644
--- a/wsutil/ws_mempbrk.c
+++ b/wsutil/ws_mempbrk.c
@@ -40,7 +40,7 @@
#include "ws_mempbrk_int.h"
void
-tvb_pbrk_compile(tvb_pbrk_pattern* pattern, const gchar *needles)
+ws_mempbrk_compile(ws_mempbrk_pattern* pattern, const gchar *needles)
{
const gchar *n = needles;
while (*n) {
@@ -55,7 +55,7 @@ tvb_pbrk_compile(tvb_pbrk_pattern* pattern, const gchar *needles)
const guint8 *
-ws_mempbrk_portable_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle)
+ws_mempbrk_portable_exec(const guint8* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle)
{
const guint8 *haystack_end = haystack + haystacklen;
@@ -73,7 +73,7 @@ ws_mempbrk_portable_exec(const guint8* haystack, size_t haystacklen, const tvb_p
WS_DLL_PUBLIC const guint8 *
-tvb_pbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle)
+ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle)
{
#ifdef HAVE_SSE4_2
if (haystacklen >= 16 && pattern->use_sse42)
diff --git a/wsutil/ws_mempbrk.h b/wsutil/ws_mempbrk.h
index 6138ec3ccd..74129c3195 100644
--- a/wsutil/ws_mempbrk.h
+++ b/wsutil/ws_mempbrk.h
@@ -28,7 +28,7 @@
#include <emmintrin.h>
#endif
-/** The pattern object used for tvb_pbrk_pattern_guint8().
+/** The pattern object used for ws_mempbrk_exec().
*/
typedef struct {
gchar patt[256];
@@ -36,12 +36,14 @@ typedef struct {
gboolean use_sse42;
__m128i mask;
#endif
-} tvb_pbrk_pattern;
+} ws_mempbrk_pattern;
-/** Compile the pattern for the needles to find using tvb_pbrk_pattern_guint8().
+/** Compile the pattern for the needles to find using ws_mempbrk_exec().
*/
-WS_DLL_PUBLIC void tvb_pbrk_compile(tvb_pbrk_pattern* pattern, const gchar *needles);
+WS_DLL_PUBLIC void ws_mempbrk_compile(ws_mempbrk_pattern* pattern, const gchar *needles);
-WS_DLL_PUBLIC const guint8 *tvb_pbrk_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle);
+/** Scan for the needles specified by the compiled pattern.
+ */
+WS_DLL_PUBLIC const guint8 *ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle);
#endif /* __WS_MEMPBRK_H__ */
diff --git a/wsutil/ws_mempbrk_int.h b/wsutil/ws_mempbrk_int.h
index 53f5a46617..83c06e24ef 100644
--- a/wsutil/ws_mempbrk_int.h
+++ b/wsutil/ws_mempbrk_int.h
@@ -22,11 +22,11 @@
#ifndef __WS_MEMPBRK_INT_H__
#define __WS_MEMPBRK_INT_H__
-const guint8 *ws_mempbrk_portable_exec(const guint8* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle);
+const guint8 *ws_mempbrk_portable_exec(const guint8* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle);
#ifdef HAVE_SSE4_2
-void ws_mempbrk_sse42_compile(tvb_pbrk_pattern* pattern, const gchar *needles);
-const char *ws_mempbrk_sse42_exec(const char* haystack, size_t haystacklen, const tvb_pbrk_pattern* pattern, guchar *found_needle);
+void ws_mempbrk_sse42_compile(ws_mempbrk_pattern* pattern, const gchar *needles);
+const char *ws_mempbrk_sse42_exec(const char* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle);
#endif
#endif /* __WS_MEMPBRK_INT_H__ */
diff --git a/wsutil/ws_mempbrk_sse42.c b/wsutil/ws_mempbrk_sse42.c
index 66b92c4417..80bf53d25f 100644
--- a/wsutil/ws_mempbrk_sse42.c
+++ b/wsutil/ws_mempbrk_sse42.c
@@ -62,7 +62,7 @@ __m128i_shift_right (__m128i value, unsigned long int offset)
void
-ws_mempbrk_sse42_compile(tvb_pbrk_pattern* pattern, const gchar *needles)
+ws_mempbrk_sse42_compile(ws_mempbrk_pattern* pattern, const gchar *needles)
{
size_t length = strlen(needles);
@@ -107,7 +107,7 @@ ws_mempbrk_sse42_compile(tvb_pbrk_pattern* pattern, const gchar *needles)
X for case 1. */
const char *
-ws_mempbrk_sse42_exec(const char *s, size_t slen, const tvb_pbrk_pattern* pattern, guchar *found_needle)
+ws_mempbrk_sse42_exec(const char *s, size_t slen, const ws_mempbrk_pattern* pattern, guchar *found_needle)
{
const char *aligned;
int offset;