diff options
author | Bart Polot <bart.polot+voyager@gmail.com> | 2017-05-10 20:58:28 +0200 |
---|---|---|
committer | Bart Polot <bart.polot+voyager@gmail.com> | 2017-05-10 20:58:28 +0200 |
commit | 5031ce9079f9e5292468374fa8d4a95462e7168a (patch) | |
tree | 70812f66790a1775384ccd6006ac1a88fdd73a62 /src/regex/regex_test_lib.h | |
parent | 1c2ab4aa3b9b563ad2098984b5751e67d3267778 (diff) | |
download | gnunet-5031ce9079f9e5292468374fa8d4a95462e7168a.tar.gz gnunet-5031ce9079f9e5292468374fa8d4a95462e7168a.zip |
Change regex combination, allow hex
Diffstat (limited to 'src/regex/regex_test_lib.h')
-rw-r--r-- | src/regex/regex_test_lib.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/regex/regex_test_lib.h b/src/regex/regex_test_lib.h index 83414e5dc..c4f7e7539 100644 --- a/src/regex/regex_test_lib.h +++ b/src/regex/regex_test_lib.h | |||
@@ -38,15 +38,23 @@ extern "C" | |||
38 | #endif | 38 | #endif |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | |||
41 | /** | 42 | /** |
42 | * Combine an array of regexes into a single prefix-shared regex. | 43 | * Combine an array of regexes into a single prefix-shared regex. |
44 | * Returns a prefix-combine regex that matches the same strings as | ||
45 | * any of the original regexes. | ||
46 | * | ||
47 | * WARNING: only useful for reading specific regexes for specific applications, | ||
48 | * namely the gnunet-regex-profiler / gnunet-regex-daemon. | ||
49 | * This function DOES NOT support arbitrary regex combining. | ||
43 | * | 50 | * |
44 | * @param regexes A NULL-terminated array of regexes. | 51 | * @param regexes A NULL-terminated array of regexes. |
52 | * @param alphabet_size Size of the alphabet the regex uses. | ||
45 | * | 53 | * |
46 | * @return A string with a single regex that matches any of the original regexes | 54 | * @return A string with a single regex that matches any of the original regexes |
47 | */ | 55 | */ |
48 | char * | 56 | char * |
49 | REGEX_TEST_combine(char * const regexes[]); | 57 | REGEX_TEST_combine (char * const regexes[], unsigned int alphabet_size); |
50 | 58 | ||
51 | 59 | ||
52 | /** | 60 | /** |