gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r20925 - gnunet/src/regex


From: gnunet
Subject: [GNUnet-SVN] r20925 - gnunet/src/regex
Date: Tue, 10 Apr 2012 16:37:53 +0200

Author: szengel
Date: 2012-04-10 16:37:53 +0200 (Tue, 10 Apr 2012)
New Revision: 20925

Modified:
   gnunet/src/regex/regex.c
   gnunet/src/regex/test_regex.c
Log:
fix


Modified: gnunet/src/regex/regex.c
===================================================================
--- gnunet/src/regex/regex.c    2012-04-10 14:30:19 UTC (rev 20924)
+++ gnunet/src/regex/regex.c    2012-04-10 14:37:53 UTC (rev 20925)
@@ -403,7 +403,7 @@
     for (t_check = s_check->transitions_head; NULL != t_check;
          t_check = t_check->next)
     {
-      if (s_check != s2 && s2 == t_check->state)
+      if (s_check != s1 && s2 == t_check->state)
         t_check->state = s1;
     }
   }
@@ -1343,6 +1343,8 @@
   dfa->start = dfa_state_create (&ctx, nfa_set);
   automaton_add_state (dfa, dfa->start);
   GNUNET_array_append (dfa_stack->states, dfa_stack->len, dfa->start);
+
+  // Create dfa states by combining nfa states
   while (dfa_stack->len > 0)
   {
     dfa_state = dfa_stack->states[dfa_stack->len - 1];
@@ -1385,7 +1387,7 @@
   GNUNET_free (dfa_stack);
   GNUNET_REGEX_automaton_destroy (nfa);
 
-  /*dfa_minimize (&ctx, dfa);*/
+  dfa_minimize (&ctx, dfa);
 
   return dfa;
 }

Modified: gnunet/src/regex/test_regex.c
===================================================================
--- gnunet/src/regex/test_regex.c       2012-04-10 14:30:19 UTC (rev 20924)
+++ gnunet/src/regex/test_regex.c       2012-04-10 14:37:53 UTC (rev 20925)
@@ -289,7 +289,7 @@
 
   srand (time (NULL));
   for (i = 0; i < 100; i++)
-    check_rand += test_random (100, 150, 10);
+    check_rand += test_random (200, 250, 20);
 
   return check_nfa + check_dfa + check_rand;
 }




reply via email to

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