summaryrefslogtreecommitdiff
path: root/src/regex/regex_block_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/regex_block_lib.h')
-rw-r--r--src/regex/regex_block_lib.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/regex/regex_block_lib.h b/src/regex/regex_block_lib.h
index 6b2d3bf26..3368e3456 100644
--- a/src/regex/regex_block_lib.h
+++ b/src/regex/regex_block_lib.h
@@ -49,7 +49,8 @@ struct RegexBlock;
49/** 49/**
50 * Edge representation. 50 * Edge representation.
51 */ 51 */
52struct REGEX_BLOCK_Edge { 52struct REGEX_BLOCK_Edge
53{
53 /** 54 /**
54 * Label of the edge. FIXME: might want to not consume exactly 55 * Label of the edge. FIXME: might want to not consume exactly
55 * multiples of 8 bits, need length! 56 * multiples of 8 bits, need length!
@@ -72,9 +73,9 @@ struct REGEX_BLOCK_Edge {
72 * @return #GNUNET_OK if the proof is valid for the given key. 73 * @return #GNUNET_OK if the proof is valid for the given key.
73 */ 74 */
74int 75int
75REGEX_BLOCK_check_proof(const char *proof, 76REGEX_BLOCK_check_proof (const char *proof,
76 size_t proof_len, 77 size_t proof_len,
77 const struct GNUNET_HashCode *key); 78 const struct GNUNET_HashCode *key);
78 79
79 80
80/** 81/**
@@ -90,10 +91,10 @@ REGEX_BLOCK_check_proof(const char *proof,
90 * #GNUNET_SYSERR if the block is invalid. 91 * #GNUNET_SYSERR if the block is invalid.
91 */ 92 */
92int 93int
93REGEX_BLOCK_check(const struct RegexBlock *block, 94REGEX_BLOCK_check (const struct RegexBlock *block,
94 size_t size, 95 size_t size,
95 const struct GNUNET_HashCode *query, 96 const struct GNUNET_HashCode *query,
96 const char *xquery); 97 const char *xquery);
97 98
98 99
99/* FIXME: might want to use 'struct REGEX_BLOCK_Edge' here instead of 3 arguments! */ 100/* FIXME: might want to use 'struct REGEX_BLOCK_Edge' here instead of 3 arguments! */
@@ -130,10 +131,10 @@ typedef int
130 * be errors in further edges. 131 * be errors in further edges.
131 */ 132 */
132int 133int
133REGEX_BLOCK_iterate(const struct RegexBlock *block, 134REGEX_BLOCK_iterate (const struct RegexBlock *block,
134 size_t size, 135 size_t size,
135 REGEX_INTERNAL_EgdeIterator iterator, 136 REGEX_INTERNAL_EgdeIterator iterator,
136 void *iter_cls); 137 void *iter_cls);
137 138
138 139
139/** 140/**
@@ -145,9 +146,9 @@ REGEX_BLOCK_iterate(const struct RegexBlock *block,
145 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block is malformed 146 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block is malformed
146 */ 147 */
147int 148int
148REGEX_BLOCK_get_key(const struct RegexBlock *block, 149REGEX_BLOCK_get_key (const struct RegexBlock *block,
149 size_t block_len, 150 size_t block_len,
150 struct GNUNET_HashCode *key); 151 struct GNUNET_HashCode *key);
151 152
152 153
153/** 154/**
@@ -158,8 +159,8 @@ REGEX_BLOCK_get_key(const struct RegexBlock *block,
158 * @return #GNUNET_YES if the block is accepting, #GNUNET_NO if not 159 * @return #GNUNET_YES if the block is accepting, #GNUNET_NO if not
159 */ 160 */
160int 161int
161GNUNET_BLOCK_is_accepting(const struct RegexBlock *block, 162GNUNET_BLOCK_is_accepting (const struct RegexBlock *block,
162 size_t block_len); 163 size_t block_len);
163 164
164 165
165/** 166/**
@@ -173,11 +174,11 @@ GNUNET_BLOCK_is_accepting(const struct RegexBlock *block,
173 * @return the regex block, NULL on error 174 * @return the regex block, NULL on error
174 */ 175 */
175struct RegexBlock * 176struct RegexBlock *
176REGEX_BLOCK_create(const char *proof, 177REGEX_BLOCK_create (const char *proof,
177 unsigned int num_edges, 178 unsigned int num_edges,
178 const struct REGEX_BLOCK_Edge *edges, 179 const struct REGEX_BLOCK_Edge *edges,
179 int accepting, 180 int accepting,
180 size_t *rsize); 181 size_t *rsize);
181 182
182 183
183#if 0 /* keep Emacsens' auto-indent happy */ 184#if 0 /* keep Emacsens' auto-indent happy */