2 * Functions optionally implemented in assembler
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #include "asm_utils.h"
30 /* String comparison func for dfilter_token GTree */
32 wrs_strcmp(gconstpointer a, gconstpointer b)
34 return strcmp((const char*)a, (const char*)b);
38 wrs_strcmp_with_data(gconstpointer a, gconstpointer b, gpointer user_data _U_)
40 return strcmp((const char*)a, (const char*)b);
44 wrs_str_equal(gconstpointer a, gconstpointer b)
46 return !strcmp((const char*)a, (const char*)b);
50 wrs_check_charset(const guint8 table[256], const char *str)
62 wrs_str_hash(gconstpointer v)
64 /* 31 bit hash function */
65 const signed char *p = (const signed char *)v;
68 for (p += 1; *p != '\0'; p++)
69 h = (h << 5) - h + *p;
74 * Editor modelines - http://www.wireshark.org/tools/modelines.html
79 * indent-tabs-mode: nil
82 * vi: set shiftwidth=4 tabstop=8 expandtab:
83 * :indentSize=4:tabSize=8:noTabs=true: