diff th_regex.h @ 664:c5aa9ada1051

s/th_regex_char_t/th_char_t/g
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 27 Jan 2020 07:48:27 +0200
parents ae601363fdad
children 7493d4c9ff77
line wrap: on
line diff
--- a/th_regex.h	Mon Jan 27 07:47:26 2020 +0200
+++ b/th_regex.h	Mon Jan 27 07:48:27 2020 +0200
@@ -23,12 +23,6 @@
 // Definitions
 //
 
-/** @brief th_regex_char_t
- * Character type used by th_regex module.
- */
-typedef char th_regex_char_t;
-
-
 /** @struct th_regex_t
  * Structure containing the tokenized / compiled regular expression.
  */
@@ -44,8 +38,8 @@
 {
     th_llist_t node;    ///< Internal linked list data
 
-    size_t start;       ///< Start offset of the match sequence in @p haystack in @c th_regex_char_t units.
-    size_t len;         ///< Length of the match sequence in @p haystack in @c th_regex_char_t units.
+    size_t start;       ///< Start offset of the match sequence in @p haystack in @c th_char_t units.
+    size_t len;         ///< Length of the match sequence in @p haystack in @c th_char_t units.
 } th_regex_match_t;
 
 
@@ -66,11 +60,11 @@
 //
 // Functions
 //
-int      th_regex_compile(th_regex_t **pexpr, const th_regex_char_t *pattern);
+int      th_regex_compile(th_regex_t **pexpr, const th_char_t *pattern);
 void     th_regex_free(th_regex_t *expr);
 void     th_regex_dump(th_ioctx *fh, const int level, const th_regex_t *expr);
 
-int      th_regex_match(const th_regex_t *expr, const th_regex_char_t *haystack,
+int      th_regex_match(const th_regex_t *expr, const th_char_t *haystack,
          size_t *pnmatches, th_regex_match_t **pmatches, const size_t maxmatches,
          const int flags);