diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-26 11:53:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-26 11:53:06 +0000 |
commit | d8076558c37b4b4984d8b6530b378551d9d4ee05 (patch) | |
tree | 491e49df60395105fa03090e3ffe0b7dd494064d /src/regex/regex_block_lib.c | |
parent | 9058f938b0a651aaa3345755b76395c3385d246d (diff) | |
download | gnunet-d8076558c37b4b4984d8b6530b378551d9d4ee05.tar.gz gnunet-d8076558c37b4b4984d8b6530b378551d9d4ee05.zip |
-duping comments from declarations to definitions
Diffstat (limited to 'src/regex/regex_block_lib.c')
-rw-r--r-- | src/regex/regex_block_lib.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c index 851bdba14..b945b9198 100644 --- a/src/regex/regex_block_lib.c +++ b/src/regex/regex_block_lib.c | |||
@@ -81,10 +81,22 @@ check_edge (void *cls, | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | /** | ||
85 | * Check if the regex block is well formed, including all edges. | ||
86 | * | ||
87 | * @param block The start of the block. | ||
88 | * @param size The size of the block. | ||
89 | * @param xquery String describing the edge we are looking for. | ||
90 | * Can be NULL in case this is a put block. | ||
91 | * | ||
92 | * @return GNUNET_OK in case it's fine. | ||
93 | * GNUNET_NO in case the xquery exists and is not found (IRRELEVANT). | ||
94 | * GNUNET_SYSERR if the block is invalid. | ||
95 | */ | ||
84 | int | 96 | int |
85 | REGEX_BLOCK_check (const struct RegexBlock *block, | 97 | REGEX_BLOCK_check (const struct RegexBlock *block, |
86 | size_t size, | 98 | size_t size, |
87 | const char *xquery) | 99 | const char *xquery) |
88 | { | 100 | { |
89 | int res; | 101 | int res; |
90 | struct regex_block_xquery_ctx ctx; | 102 | struct regex_block_xquery_ctx ctx; |
@@ -108,6 +120,22 @@ REGEX_BLOCK_check (const struct RegexBlock *block, | |||
108 | } | 120 | } |
109 | 121 | ||
110 | 122 | ||
123 | /** | ||
124 | * Iterate over all edges of a block of a regex state. | ||
125 | * | ||
126 | * @param block Block to iterate over. | ||
127 | * @param size Size of block. | ||
128 | * @param iterator Function to call on each edge in the block. | ||
129 | * @param iter_cls Closure for the iterator. | ||
130 | * | ||
131 | * @return GNUNET_SYSERR if an error has been encountered. | ||
132 | * GNUNET_OK if no error has been encountered. | ||
133 | * Note that if the iterator stops the iteration by returning | ||
134 | * GNUNET_NO, the block will no longer be checked for further errors. | ||
135 | * The return value will be GNUNET_OK meaning that no errors were | ||
136 | * found until the edge last notified to the iterator, but there might | ||
137 | * be errors in further edges. | ||
138 | */ | ||
111 | int | 139 | int |
112 | REGEX_BLOCK_iterate (const struct RegexBlock *block, | 140 | REGEX_BLOCK_iterate (const struct RegexBlock *block, |
113 | size_t size, | 141 | size_t size, |