aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-26 20:25:37 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-26 20:25:37 +0200
commitaa78134a557079ce570345e751e4c36c4b2ba79a (patch)
treef7bf25950513285184e2426109235337d0aef8be /src/regex
parent1f2674fe293be7c1a852fbe4a7241fbcb149078f (diff)
downloadgnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.tar.gz
gnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.zip
-fix many more typos
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c2
-rw-r--r--src/regex/gnunet-regex-profiler.c8
-rw-r--r--src/regex/gnunet-regex-simulation-profiler.c2
-rw-r--r--src/regex/gnunet-service-regex.c2
-rw-r--r--src/regex/perf-regex.c2
-rw-r--r--src/regex/plugin_block_regex.c2
-rw-r--r--src/regex/regex_block_lib.c4
-rw-r--r--src/regex/regex_internal.c10
-rw-r--r--src/regex/regex_internal_dht.c6
-rw-r--r--src/regex/regex_test_lib.c10
-rw-r--r--src/regex/regex_test_random.c2
-rw-r--r--src/regex/test_regex_api.c2
-rw-r--r--src/regex/test_regex_eval_api.c2
-rw-r--r--src/regex/test_regex_proofs.c2
14 files changed, 28 insertions, 28 deletions
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index d94b5ae46..70301338f 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -21,7 +21,7 @@
21/** 21/**
22 * @file regex/gnunet-daemon-regexprofiler.c 22 * @file regex/gnunet-daemon-regexprofiler.c
23 * @brief daemon that uses cadet to announce a regular expression. Used in 23 * @brief daemon that uses cadet to announce a regular expression. Used in
24 * conjunction with gnunet-regex-profiler to announce regexes on serveral peers 24 * conjunction with gnunet-regex-profiler to announce regexes on several peers
25 * without the need to explicitly connect to the cadet service running on the 25 * without the need to explicitly connect to the cadet service running on the
26 * peer from within the profiler. 26 * peer from within the profiler.
27 * @author Maximilian Szengel 27 * @author Maximilian Szengel
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c
index e82e10e3b..90e06cf5f 100644
--- a/src/regex/gnunet-regex-profiler.c
+++ b/src/regex/gnunet-regex-profiler.c
@@ -173,7 +173,7 @@ struct RegexPeer
173 struct GNUNET_SCHEDULER_Task *timeout; 173 struct GNUNET_SCHEDULER_Task *timeout;
174 174
175 /** 175 /**
176 * Deamon start 176 * Daemon start
177 */ 177 */
178 struct GNUNET_TESTBED_Operation *daemon_op; 178 struct GNUNET_TESTBED_Operation *daemon_op;
179}; 179};
@@ -718,7 +718,7 @@ find_string (void *cls);
718 * @param cls Closure provided in REGEX_INTERNAL_search. 718 * @param cls Closure provided in REGEX_INTERNAL_search.
719 * @param id Peer providing a regex that matches the string. 719 * @param id Peer providing a regex that matches the string.
720 * @param get_path Path of the get request. 720 * @param get_path Path of the get request.
721 * @param get_path_length Lenght of get_path. 721 * @param get_path_length Length of get_path.
722 * @param put_path Path of the put request. 722 * @param put_path Path of the put request.
723 * @param put_path_length Length of the put_path. 723 * @param put_path_length Length of the put_path.
724 */ 724 */
@@ -936,7 +936,7 @@ daemon_started (void *cls,
936 else 936 else
937 { 937 {
938 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 938 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
939 "Deamon %u started successfully\n", peer->id); 939 "Daemon %u started successfully\n", peer->id);
940 } 940 }
941 941
942 /* Find a peer to look for a string matching the regex announced */ 942 /* Find a peer to look for a string matching the regex announced */
@@ -1027,7 +1027,7 @@ announce_next_regex (void *cls)
1027 1027
1028/** 1028/**
1029 * DHT connect callback. Called when we are connected to the dht service for 1029 * DHT connect callback. Called when we are connected to the dht service for
1030 * the peer in 'cls'. If successfull we connect to the stats service of this 1030 * the peer in 'cls'. If successful we connect to the stats service of this
1031 * peer and then try to match the search string of this peer. 1031 * peer and then try to match the search string of this peer.
1032 * 1032 *
1033 * @param cls internal peer id. 1033 * @param cls internal peer id.
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c
index 3d449a04e..ab6d65d58 100644
--- a/src/regex/gnunet-regex-simulation-profiler.c
+++ b/src/regex/gnunet-regex-simulation-profiler.c
@@ -60,7 +60,7 @@ struct ProgressMeter
60 unsigned int total; 60 unsigned int total;
61 61
62 /** 62 /**
63 * Intervall for printing percentage. 63 * Interval for printing percentage.
64 */ 64 */
65 unsigned int modnum; 65 unsigned int modnum;
66 66
diff --git a/src/regex/gnunet-service-regex.c b/src/regex/gnunet-service-regex.c
index 19250d427..7a5cc1f05 100644
--- a/src/regex/gnunet-service-regex.c
+++ b/src/regex/gnunet-service-regex.c
@@ -189,7 +189,7 @@ handle_announce (void *cls,
189 * @param cls the struct ClientEntry of the client searching 189 * @param cls the struct ClientEntry of the client searching
190 * @param id Peer providing a regex that matches the string. 190 * @param id Peer providing a regex that matches the string.
191 * @param get_path Path of the get request. 191 * @param get_path Path of the get request.
192 * @param get_path_length Lenght of @a get_path. 192 * @param get_path_length Length of @a get_path.
193 * @param put_path Path of the put request. 193 * @param put_path Path of the put request.
194 * @param put_path_length Length of the @a put_path. 194 * @param put_path_length Length of the @a put_path.
195 */ 195 */
diff --git a/src/regex/perf-regex.c b/src/regex/perf-regex.c
index 6155501f2..aea0c054f 100644
--- a/src/regex/perf-regex.c
+++ b/src/regex/perf-regex.c
@@ -63,7 +63,7 @@ print_edge (void *cls,
63 63
64 64
65/** 65/**
66 * The main function of the regex performace test. 66 * The main function of the regex performance test.
67 * 67 *
68 * Read a set of regex from a file, combine them and create a DFA from the 68 * Read a set of regex from a file, combine them and create a DFA from the
69 * resulting combined regex. 69 * resulting combined regex.
diff --git a/src/regex/plugin_block_regex.c b/src/regex/plugin_block_regex.c
index c087abae9..ad897493f 100644
--- a/src/regex/plugin_block_regex.c
+++ b/src/regex/plugin_block_regex.c
@@ -168,7 +168,7 @@ evaluate_block_regex (void *cls,
168 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 168 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
169 169
170 case GNUNET_NO: 170 case GNUNET_NO:
171 /* xquery missmatch, can happen */ 171 /* xquery mismatch, can happen */
172 return GNUNET_BLOCK_EVALUATION_RESULT_IRRELEVANT; 172 return GNUNET_BLOCK_EVALUATION_RESULT_IRRELEVANT;
173 173
174 default: 174 default:
diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c
index 159e8bf8a..cbfb553ce 100644
--- a/src/regex/regex_block_lib.c
+++ b/src/regex/regex_block_lib.c
@@ -71,7 +71,7 @@ struct RegexBlock
71 uint16_t num_edges GNUNET_PACKED; 71 uint16_t num_edges GNUNET_PACKED;
72 72
73 /** 73 /**
74 * Nubmer of unique destinations reachable from this state. 74 * Number of unique destinations reachable from this state.
75 */ 75 */
76 uint16_t num_destinations GNUNET_PACKED; 76 uint16_t num_destinations GNUNET_PACKED;
77 77
@@ -158,7 +158,7 @@ struct CheckEdgeContext
158 * 158 *
159 * @param cls Closure, (xquery context). 159 * @param cls Closure, (xquery context).
160 * @param token Token that follows to next state. 160 * @param token Token that follows to next state.
161 * @param len Lenght of token. 161 * @param len Length of token.
162 * @param key Hash of next state. 162 * @param key Hash of next state.
163 * 163 *
164 * @return #GNUNET_YES, to keep iterating 164 * @return #GNUNET_YES, to keep iterating
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c
index cd33281e2..aa40851a9 100644
--- a/src/regex/regex_internal.c
+++ b/src/regex/regex_internal.c
@@ -1562,7 +1562,7 @@ automaton_create_proofs_simplify (const struct StringBuffer *R_last_ij,
1562 1562
1563/** 1563/**
1564 * Create proofs for all states in the given automaton. Implementation of the 1564 * Create proofs for all states in the given automaton. Implementation of the
1565 * algorithm descriped in chapter 3.2.1 of "Automata Theory, Languages, and 1565 * algorithm described in chapter 3.2.1 of "Automata Theory, Languages, and
1566 * Computation 3rd Edition" by Hopcroft, Motwani and Ullman. 1566 * Computation 3rd Edition" by Hopcroft, Motwani and Ullman.
1567 * 1567 *
1568 * Each state in the automaton gets assigned 'proof' and 'hash' (hash of the 1568 * Each state in the automaton gets assigned 'proof' and 'hash' (hash of the
@@ -1796,7 +1796,7 @@ dfa_state_create (struct REGEX_INTERNAL_Context *ctx,
1796 1796
1797/** 1797/**
1798 * Move from the given state 's' to the next state on transition 'str'. Consumes 1798 * Move from the given state 's' to the next state on transition 'str'. Consumes
1799 * as much of the given 'str' as possible (usefull for strided DFAs). On return 1799 * as much of the given 'str' as possible (useful for strided DFAs). On return
1800 * 's' will point to the next state, and the length of the substring used for 1800 * 's' will point to the next state, and the length of the substring used for
1801 * this transition will be returned. If no transition possible 0 is returned and 1801 * this transition will be returned. If no transition possible 0 is returned and
1802 * 's' points to NULL. 1802 * 's' points to NULL.
@@ -1805,7 +1805,7 @@ dfa_state_create (struct REGEX_INTERNAL_Context *ctx,
1805 * transition possible) 1805 * transition possible)
1806 * @param str edge label to follow (will match longest common prefix) 1806 * @param str edge label to follow (will match longest common prefix)
1807 * 1807 *
1808 * @return length of the substring comsumed from 'str' 1808 * @return length of the substring consumed from 'str'
1809 */ 1809 */
1810static unsigned int 1810static unsigned int
1811dfa_move (struct REGEX_INTERNAL_State **s, const char *str) 1811dfa_move (struct REGEX_INTERNAL_State **s, const char *str)
@@ -3055,7 +3055,7 @@ construct_dfa_states (struct REGEX_INTERNAL_Context *ctx,
3055 * @param len length of the regular expression. 3055 * @param len length of the regular expression.
3056 * @param max_path_len limit the path compression length to the 3056 * @param max_path_len limit the path compression length to the
3057 * given value. If set to 1, no path compression is applied. Set to 0 for 3057 * given value. If set to 1, no path compression is applied. Set to 0 for
3058 * maximal possible path compression (generally not desireable). 3058 * maximal possible path compression (generally not desirable).
3059 * @return DFA, needs to be freed using REGEX_INTERNAL_automaton_destroy. 3059 * @return DFA, needs to be freed using REGEX_INTERNAL_automaton_destroy.
3060 */ 3060 */
3061struct REGEX_INTERNAL_Automaton * 3061struct REGEX_INTERNAL_Automaton *
@@ -3525,7 +3525,7 @@ REGEX_INTERNAL_iterate_all_edges (struct REGEX_INTERNAL_Automaton *a,
3525/** 3525/**
3526 * Struct to hold all the relevant state information in the HashMap. 3526 * Struct to hold all the relevant state information in the HashMap.
3527 * 3527 *
3528 * Contains the same info as the Regex Iterator parametes except the key, 3528 * Contains the same info as the Regex Iterator parameters except the key,
3529 * which comes directly from the HashMap iterator. 3529 * which comes directly from the HashMap iterator.
3530 */ 3530 */
3531struct temporal_state_store 3531struct temporal_state_store
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c
index 39d7cd847..3fb74c319 100644
--- a/src/regex/regex_internal_dht.c
+++ b/src/regex/regex_internal_dht.c
@@ -254,7 +254,7 @@ REGEX_INTERNAL_announce_cancel (struct REGEX_INTERNAL_Announcement *h)
254 254
255/** 255/**
256 * Struct to keep state of running searches that have consumed a part of 256 * Struct to keep state of running searches that have consumed a part of
257 * the inital string. 257 * the initial string.
258 */ 258 */
259struct RegexSearchContext 259struct RegexSearchContext
260{ 260{
@@ -374,7 +374,7 @@ regex_next_edge (const struct RegexBlock *block,
374 * @param exp When will this value expire. 374 * @param exp When will this value expire.
375 * @param key Key of the result. 375 * @param key Key of the result.
376 * @param get_path Path of the get request. 376 * @param get_path Path of the get request.
377 * @param get_path_length Lenght of get_path. 377 * @param get_path_length Length of get_path.
378 * @param put_path Path of the put request. 378 * @param put_path Path of the put request.
379 * @param put_path_length Length of the put_path. 379 * @param put_path_length Length of the put_path.
380 * @param type Type of the result. 380 * @param type Type of the result.
@@ -551,7 +551,7 @@ regex_result_iterator (void *cls,
551 * 551 *
552 * @param cls Closure (context of the search). 552 * @param cls Closure (context of the search).
553 * @param token Token that follows to next state. 553 * @param token Token that follows to next state.
554 * @param len Lenght of token. 554 * @param len Length of token.
555 * @param key Hash of next state. 555 * @param key Hash of next state.
556 * @return #GNUNET_YES if should keep iterating, #GNUNET_NO otherwise. 556 * @return #GNUNET_YES if should keep iterating, #GNUNET_NO otherwise.
557 */ 557 */
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index 58cd8dc10..f8d3f993f 100644
--- a/src/regex/regex_test_lib.c
+++ b/src/regex/regex_test_lib.c
@@ -137,7 +137,7 @@ debugctx (struct RegexCombineCtx *ctx, int level)
137 137
138 138
139/** 139/**
140 * Add a single regex to a context, combining with exisiting regex by-prefix. 140 * Add a single regex to a context, combining with existing regex by-prefix.
141 * 141 *
142 * @param ctx Context with 0 or more regexes. 142 * @param ctx Context with 0 or more regexes.
143 * @param regex Regex to add. 143 * @param regex Regex to add.
@@ -378,14 +378,14 @@ regex_add_multiple (struct RegexCombineCtx *ctx,
378 378
379 379
380/** 380/**
381 * Add a single regex to a context, splitting the exisiting state. 381 * Add a single regex to a context, splitting the existing state.
382 * 382 *
383 * We only had a partial match, split existing state, truncate the current node 383 * We only had a partial match, split existing state, truncate the current node
384 * so it only contains the prefix, add suffix(es) as children. 384 * so it only contains the prefix, add suffix(es) as children.
385 * 385 *
386 * @param ctx Context to split. 386 * @param ctx Context to split.
387 * @param len Lenght of ctx->s 387 * @param len Length of ctx->s
388 * @param prefix_l Lenght of common prefix of the new regex and @a ctx->s 388 * @param prefix_l Length of common prefix of the new regex and @a ctx->s
389 */ 389 */
390static void 390static void
391regex_split (struct RegexCombineCtx *ctx, 391regex_split (struct RegexCombineCtx *ctx,
@@ -431,7 +431,7 @@ regex_split (struct RegexCombineCtx *ctx,
431 431
432 432
433/** 433/**
434 * Add a single regex to a context, combining with exisiting regex by-prefix. 434 * Add a single regex to a context, combining with existing regex by-prefix.
435 * 435 *
436 * @param ctx Context with 0 or more regexes. 436 * @param ctx Context with 0 or more regexes.
437 * @param regex Regex to add. 437 * @param regex Regex to add.
diff --git a/src/regex/regex_test_random.c b/src/regex/regex_test_random.c
index 02d59f5dc..823563d4d 100644
--- a/src/regex/regex_test_random.c
+++ b/src/regex/regex_test_random.c
@@ -55,7 +55,7 @@ get_random_literal ()
55 * @param matching_str (optional) pointer to a string that will contain a string 55 * @param matching_str (optional) pointer to a string that will contain a string
56 * that will be matched by the generated regex, if 56 * that will be matched by the generated regex, if
57 * 'matching_str' pointer was not NULL. Make sure you 57 * 'matching_str' pointer was not NULL. Make sure you
58 * allocated at least rx_length+1 bytes for this sting. 58 * allocated at least rx_length+1 bytes for this string.
59 * 59 *
60 * @return NULL if 'rx_length' is 0, a random regex of length 'rx_length', which 60 * @return NULL if 'rx_length' is 0, a random regex of length 'rx_length', which
61 * needs to be freed, otherwise. 61 * needs to be freed, otherwise.
diff --git a/src/regex/test_regex_api.c b/src/regex/test_regex_api.c
index 734fbdbf3..9761e80f9 100644
--- a/src/regex/test_regex_api.c
+++ b/src/regex/test_regex_api.c
@@ -80,7 +80,7 @@ end_badly ()
80 * @param cls Closure provided in GNUNET_REGEX_search. 80 * @param cls Closure provided in GNUNET_REGEX_search.
81 * @param id Peer providing a regex that matches the string. 81 * @param id Peer providing a regex that matches the string.
82 * @param get_path Path of the get request. 82 * @param get_path Path of the get request.
83 * @param get_path_length Lenght of get_path. 83 * @param get_path_length Length of get_path.
84 * @param put_path Path of the put request. 84 * @param put_path Path of the put request.
85 * @param put_path_length Length of the put_path. 85 * @param put_path_length Length of the put_path.
86 */ 86 */
diff --git a/src/regex/test_regex_eval_api.c b/src/regex/test_regex_eval_api.c
index 7cd081269..be3649dbd 100644
--- a/src/regex/test_regex_eval_api.c
+++ b/src/regex/test_regex_eval_api.c
@@ -195,7 +195,7 @@ error:
195 * @param rxstr regular expression and strings with expected results to 195 * @param rxstr regular expression and strings with expected results to
196 * match against. 196 * match against.
197 * 197 *
198 * @return 0 on successfull, non 0 otherwise 198 * @return 0 on successful, non 0 otherwise
199 */ 199 */
200int 200int
201test_automaton (struct REGEX_INTERNAL_Automaton *a, regex_t *rx, 201test_automaton (struct REGEX_INTERNAL_Automaton *a, regex_t *rx,
diff --git a/src/regex/test_regex_proofs.c b/src/regex/test_regex_proofs.c
index 8908084b0..289b1183b 100644
--- a/src/regex/test_regex_proofs.c
+++ b/src/regex/test_regex_proofs.c
@@ -78,7 +78,7 @@ test_proof (const char *regex)
78 * @param count number of random regular expressions to test. 78 * @param count number of random regular expressions to test.
79 * @param rx_length length of the random regular expressions. 79 * @param rx_length length of the random regular expressions.
80 * 80 *
81 * @return 0 on succes, number of failures otherwise. 81 * @return 0 on success, number of failures otherwise.
82 */ 82 */
83static unsigned int 83static unsigned int
84test_proofs_random (unsigned int count, size_t rx_length) 84test_proofs_random (unsigned int count, size_t rx_length)