Mercurial > hg > th-libs
comparison th_regex.h @ 655:ae601363fdad
Doxygenization.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 25 Jan 2020 14:06:01 +0200 |
parents | 38a9302962f7 |
children | c5aa9ada1051 |
comparison
equal
deleted
inserted
replaced
654:1092eb33bd59 | 655:ae601363fdad |
---|---|
3 * Programmed and designed by Matti 'ccr' Hamalainen | 3 * Programmed and designed by Matti 'ccr' Hamalainen |
4 * (C) Copyright 2020 Tecnic Software productions (TNSP) | 4 * (C) Copyright 2020 Tecnic Software productions (TNSP) |
5 * | 5 * |
6 * Please read file 'COPYING' for information on license and distribution. | 6 * Please read file 'COPYING' for information on license and distribution. |
7 */ | 7 */ |
8 /// @file | |
9 /// @brief Simple regular expression matching functionality | |
8 #ifndef TH_REGEX_H | 10 #ifndef TH_REGEX_H |
9 #define TH_REGEX_H | 11 #define TH_REGEX_H |
10 | 12 |
11 #include "th_types.h" | |
12 #include "th_datastruct.h" | 13 #include "th_datastruct.h" |
13 #include "th_ioctx.h" | 14 #include "th_ioctx.h" |
14 | 15 |
15 | 16 |
16 #ifdef __cplusplus | 17 #ifdef __cplusplus |
20 | 21 |
21 // | 22 // |
22 // Definitions | 23 // Definitions |
23 // | 24 // |
24 | 25 |
25 // Character type | 26 /** @brief th_regex_char_t |
27 * Character type used by th_regex module. | |
28 */ | |
26 typedef char th_regex_char_t; | 29 typedef char th_regex_char_t; |
27 | 30 |
28 | 31 |
29 // Structure containing the compiled regular expression | 32 /** @struct th_regex_t |
33 * Structure containing the tokenized / compiled regular expression. | |
34 */ | |
30 struct th_regex_t; | 35 struct th_regex_t; |
31 typedef struct th_regex_t th_regex_t; | 36 typedef struct th_regex_t th_regex_t; |
32 | 37 |
33 | 38 |
34 // Linked list structure for returned match sequences | 39 /** @brief |
40 * Linked list structure containing the information for matched | |
41 * sequences returned by th_regex_match(). | |
42 */ | |
35 typedef struct | 43 typedef struct |
36 { | 44 { |
37 th_llist_t node; | 45 th_llist_t node; ///< Internal linked list data |
38 size_t start, len; | 46 |
47 size_t start; ///< Start offset of the match sequence in @p haystack in @c th_regex_char_t units. | |
48 size_t len; ///< Length of the match sequence in @p haystack in @c th_regex_char_t units. | |
39 } th_regex_match_t; | 49 } th_regex_match_t; |
40 | 50 |
41 | 51 |
42 // Flags for th_regex_match() | 52 // Flags for th_regex_match() |
43 // (not actually used or supported yet :D) | 53 // (not actually used or supported yet :D) |