summaryrefslogtreecommitdiffstats
path: root/wsutil/strnatcmp.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /wsutil/strnatcmp.h
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wsutil/strnatcmp.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/wsutil/strnatcmp.h b/wsutil/strnatcmp.h
new file mode 100644
index 0000000..0ebe1f6
--- /dev/null
+++ b/wsutil/strnatcmp.h
@@ -0,0 +1,33 @@
+/** @file
+ *
+ * Original code downloaded from: http://sourcefrog.net/projects/natsort/
+
+ strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
+ Copyright (C) 2000, 2004 by Martin Pool <mbp sourcefrog net>
+
+ SPDX-License-Identifier: Zlib
+ */
+
+#ifndef STRNATCMP_H
+#define STRNATCMP_H
+
+#include "ws_symbol_export.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* CUSTOMIZATION SECTION
+ *
+ * You can change this typedef, but must then also change the inline
+ * functions in strnatcmp.c */
+typedef char nat_char;
+
+WS_DLL_PUBLIC int ws_ascii_strnatcmp(nat_char const *a, nat_char const *b);
+WS_DLL_PUBLIC int ws_ascii_strnatcasecmp(nat_char const *a, nat_char const *b);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* STRNATCMP_H */