* @param cls closure.
* @param key hash for current state.
* @param proof proof for current state.
+ * @param accepting GNUNET_YES if this is an accepting state, GNUNET_NO if not.
* @param num_edges number of edges leaving current state.
* @param edges edges leaving current state.
*/
typedef void (*GNUNET_REGEX_KeyIterator)(void *cls,
const GNUNET_HashCode *key,
const char *proof,
+ int accepting,
unsigned int num_edges,
const struct GNUNET_REGEX_Edge *edges);
a->state_count++;
}
-typedef void (*GNUNET_REGEX_traverse_action)(void *cls, struct
- GNUNET_REGEX_State *s);
+typedef void (*GNUNET_REGEX_traverse_action) (void *cls,
+ struct GNUNET_REGEX_State * s);
/**
* Traverses all states that are reachable from state 's'. Expects
* the states to be unmarked (s->marked == GNUNET_NO). Performs
* 'action' on each visited state.
*
+ * @param cls closure.
* @param s start state.
* @param action action to be performed on each state.
*/
* Traverses the given automaton from it's start state, visiting all
* reachable states and calling 'action' on each one of them.
*
+ * @param cls closure.
* @param a automaton.
* @param action action to be performed on each state.
*/
*/
static struct GNUNET_REGEX_StateSet *
nfa_closure_set_create (struct GNUNET_REGEX_Automaton *nfa,
- struct GNUNET_REGEX_StateSet *states,
- const char label)
+ struct GNUNET_REGEX_StateSet *states, const char label)
{
struct GNUNET_REGEX_State *s;
struct GNUNET_REGEX_StateSet *sset;
* to construct the key
*/
unsigned int
-GNUNET_REGEX_get_first_key (const char *input_string,
- unsigned int string_len,
- GNUNET_HashCode *key)
+GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
+ GNUNET_HashCode * key)
{
unsigned int size;
* @return GNUNET_OK if the proof is valid for the given key
*/
int
-GNUNET_REGEX_check_proof (const char *proof,
- const GNUNET_HashCode *key)
+GNUNET_REGEX_check_proof (const char *proof, const GNUNET_HashCode * key)
{
return GNUNET_OK;
}
* @param iterator_cls closure.
*/
static void
-iterate_edge (struct GNUNET_REGEX_State *s,
- GNUNET_REGEX_KeyIterator iterator,
+iterate_edge (struct GNUNET_REGEX_State *s, GNUNET_REGEX_KeyIterator iterator,
void *iterator_cls)
{
struct Transition *t;
num_edges = state_get_edges (s, edges);
- iterator (iterator_cls,
- &s->hash,
- NULL,
-
- num_edges,
- edges);
+ iterator (iterator_cls, &s->hash, NULL, s->accepting, num_edges, edges);
for (t = s->transitions_head; NULL != t; t = t->next)