gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 33/90: -DOC: Another comment stripping pass through REGEX


From: gnunet
Subject: [gnunet] 33/90: -DOC: Another comment stripping pass through REGEX
Date: Tue, 18 Oct 2022 03:06:32 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit be98a6e575d77aa71456c93b973473b17540447e
Author: Willow Liquorice <willow@howhill.com>
AuthorDate: Sun Sep 4 02:55:22 2022 +0100

    -DOC: Another comment stripping pass through REGEX
---
 src/regex/regex_block_lib.c    | 43 ----------------------------
 src/regex/regex_internal.c     | 64 ------------------------------------------
 src/regex/regex_internal.h     |  4 +--
 src/regex/regex_internal_dht.c |  6 ----
 4 files changed, 2 insertions(+), 115 deletions(-)

diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c
index cbfb553ce..048d6d743 100644
--- a/src/regex/regex_block_lib.c
+++ b/src/regex/regex_block_lib.c
@@ -110,14 +110,6 @@ GNUNET_BLOCK_is_accepting (const struct RegexBlock *block,
 }
 
 
-/**
- * Check if the given 'proof' matches the given 'key'.
- *
- * @param proof partial regex of a state
- * @param proof_len number of bytes in 'proof'
- * @param key hash of a state.
- * @return #GNUNET_OK if the proof is valid for the given key.
- */
 int
 REGEX_BLOCK_check_proof (const char *proof,
                          size_t proof_len,
@@ -187,18 +179,6 @@ check_edge (void *cls,
 }
 
 
-/**
- * Check if the regex block is well formed, including all edges.
- *
- * @param block The start of the block.
- * @param size The size of the block.
- * @param query the query for the block
- * @param xquery String describing the edge we are looking for.
- *               Can be NULL in case this is a put block.
- * @return #GNUNET_OK in case it's fine.
- *         #GNUNET_NO in case the xquery exists and is not found (IRRELEVANT).
- *         #GNUNET_SYSERR if the block is invalid.
- */
 int
 REGEX_BLOCK_check (const struct RegexBlock *block,
                    size_t size,
@@ -246,14 +226,6 @@ REGEX_BLOCK_check (const struct RegexBlock *block,
 }
 
 
-/**
- * Obtain the key that a particular block is to be stored under.
- *
- * @param block block to get the key from
- * @param block_len number of bytes in block
- * @param key where to store the key
- * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block is malformed
- */
 int
 REGEX_BLOCK_get_key (const struct RegexBlock *block,
                      size_t block_len,
@@ -289,21 +261,6 @@ REGEX_BLOCK_get_key (const struct RegexBlock *block,
 }
 
 
-/**
- * Iterate over all edges of a block of a regex state.
- *
- * @param block Block to iterate over.
- * @param size Size of @a block.
- * @param iterator Function to call on each edge in the block.
- * @param iter_cls Closure for the @a iterator.
- * @return #GNUNET_SYSERR if an error has been encountered.
- *         #GNUNET_OK if no error has been encountered.
- *           Note that if the iterator stops the iteration by returning
- *         #GNUNET_NO, the block will no longer be checked for further errors.
- *           The return value will be GNUNET_OK meaning that no errors were
- *         found until the edge last notified to the iterator, but there might
- *         be errors in further edges.
- */
 int
 REGEX_BLOCK_iterate (const struct RegexBlock *block,
                      size_t size,
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c
index aa40851a9..c4fab6b56 100644
--- a/src/regex/regex_internal.c
+++ b/src/regex/regex_internal.c
@@ -501,19 +501,6 @@ automaton_state_traverse (struct REGEX_INTERNAL_State *s,
 }
 
 
-/**
- * Traverses the given automaton using depth-first-search (DFS) from it's start
- * state, visiting all reachable states and calling 'action' on each one of
- * them.
- *
- * @param a automaton to be traversed.
- * @param start start state, pass a->start or NULL to traverse the whole 
automaton.
- * @param check function that is checked before advancing on each transition
- *              in the DFS.
- * @param check_cls closure for @a check.
- * @param action action to be performed on each state.
- * @param action_cls closure for @a action
- */
 void
 REGEX_INTERNAL_automaton_traverse (const struct REGEX_INTERNAL_Automaton *a,
                                    struct REGEX_INTERNAL_State *start,
@@ -3041,23 +3028,6 @@ construct_dfa_states (struct REGEX_INTERNAL_Context *ctx,
 }
 
 
-/**
- * Construct DFA for the given 'regex' of length 'len'.
- *
- * Path compression means, that for example a DFA o -> a -> b -> c -> o will be
- * compressed to o -> abc -> o. Note that this parameter influences the
- * non-determinism of states of the resulting NFA in the DHT (number of 
outgoing
- * edges with the same label). For example for an application that stores IPv4
- * addresses as bitstrings it could make sense to limit the path compression to
- * 4 or 8.
- *
- * @param regex regular expression string.
- * @param len length of the regular expression.
- * @param max_path_len limit the path compression length to the
- *        given value. If set to 1, no path compression is applied. Set to 0 
for
- *        maximal possible path compression (generally not desirable).
- * @return DFA, needs to be freed using REGEX_INTERNAL_automaton_destroy.
- */
 struct REGEX_INTERNAL_Automaton *
 REGEX_INTERNAL_construct_dfa (const char *regex,
                               const size_t len,
@@ -3118,12 +3088,6 @@ REGEX_INTERNAL_construct_dfa (const char *regex,
 }
 
 
-/**
- * Free the memory allocated by constructing the REGEX_INTERNAL_Automaton data
- * structure.
- *
- * @param a automaton to be destroyed
- */
 void
 REGEX_INTERNAL_automaton_destroy (struct REGEX_INTERNAL_Automaton *a)
 {
@@ -3251,13 +3215,6 @@ evaluate_nfa (struct REGEX_INTERNAL_Automaton *a, const 
char *string)
 }
 
 
-/**
- * Evaluates the given @a string against the given compiled regex @a a
- *
- * @param a automaton
- * @param string string to check
- * @return 0 if string matches, non-0 otherwise
- */
 int
 REGEX_INTERNAL_eval (struct REGEX_INTERNAL_Automaton *a, const char *string)
 {
@@ -3284,17 +3241,6 @@ REGEX_INTERNAL_eval (struct REGEX_INTERNAL_Automaton *a, 
const char *string)
 }
 
 
-/**
- * Get the canonical regex of the given automaton.
- * When constructing the automaton a proof is computed for each state,
- * consisting of the regular expression leading to this state. A complete
- * regex for the automaton can be computed by combining these proofs.
- * As of now this function is only useful for testing.
- *
- * @param a automaton for which the canonical regex should be returned.
- *
- * @return
- */
 const char *
 REGEX_INTERNAL_get_canonical_regex (struct REGEX_INTERNAL_Automaton *a)
 {
@@ -3685,16 +3631,6 @@ iterate_reachables (void *cls, const struct 
GNUNET_HashCode *key, void *value)
 }
 
 
-/**
- * Iterate over all edges of automaton 'a' that are reachable from a state with
- * a proof of at least GNUNET_REGEX_INITIAL_BYTES characters.
- *
- * Call the iterator for each such edge.
- *
- * @param a automaton.
- * @param iterator iterator called for each reachable edge.
- * @param iterator_cls closure.
- */
 void
 REGEX_INTERNAL_iterate_reachable_edges (struct REGEX_INTERNAL_Automaton *a,
                                         REGEX_INTERNAL_KeyIterator iterator,
diff --git a/src/regex/regex_internal.h b/src/regex/regex_internal.h
index 5b434b30c..8d4526d1f 100644
--- a/src/regex/regex_internal.h
+++ b/src/regex/regex_internal.h
@@ -368,9 +368,9 @@ typedef void
  * @param start start state, pass a->start or NULL to traverse the whole 
automaton.
  * @param check function that is checked before advancing on each transition
  *              in the DFS.
- * @param check_cls closure for check.
+ * @param check_cls closure for @a check.
  * @param action action to be performed on each state.
- * @param action_cls closure for action
+ * @param action_cls closure for @a action
  */
 void
 REGEX_INTERNAL_automaton_traverse (const struct REGEX_INTERNAL_Automaton *a,
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c
index e578fba2c..bda979edb 100644
--- a/src/regex/regex_internal_dht.c
+++ b/src/regex/regex_internal_dht.c
@@ -216,12 +216,6 @@ REGEX_INTERNAL_announce (struct GNUNET_DHT_Handle *dht,
 }
 
 
-/**
- * Announce again a regular expression previously announced.
- * Does use caching to speed up process.
- *
- * @param h Handle returned by a previous #REGEX_INTERNAL_announce call().
- */
 void
 REGEX_INTERNAL_reannounce (struct REGEX_INTERNAL_Announcement *h)
 {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]