diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-20 08:32:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-20 08:32:50 +0000 |
commit | 21a2b4f95b4488645ba5a6254fcb8919c4915f73 (patch) | |
tree | 00c92cb7103cc14fba7e63e8dee99fe711856863 /src/regex/test_regex_graph_api.c | |
parent | 5533b105943b4f6dd688c1758350cd83ebeab3b9 (diff) | |
download | gnunet-21a2b4f95b4488645ba5a6254fcb8919c4915f73.tar.gz gnunet-21a2b4f95b4488645ba5a6254fcb8919c4915f73.zip |
continuing refactoring of regex library structure, disambiguating symbol names between old regex library which is now internal and the public API; moving IP-to-regex conversion functions to tun library, as only vpn is using those to begin with
Diffstat (limited to 'src/regex/test_regex_graph_api.c')
-rw-r--r-- | src/regex/test_regex_graph_api.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/regex/test_regex_graph_api.c b/src/regex/test_regex_graph_api.c index 3ae607352..303a0ce07 100644 --- a/src/regex/test_regex_graph_api.c +++ b/src/regex/test_regex_graph_api.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <regex.h> | 25 | #include <regex.h> |
26 | #include <time.h> | 26 | #include <time.h> |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_regex_lib.h" | 28 | #include "regex_internal_lib.h" |
29 | #include "regex_internal.h" | 29 | #include "regex_internal.h" |
30 | 30 | ||
31 | #define KEEP_FILES 1 | 31 | #define KEEP_FILES 1 |
@@ -73,7 +73,7 @@ int | |||
73 | main (int argc, char *argv[]) | 73 | main (int argc, char *argv[]) |
74 | { | 74 | { |
75 | int error; | 75 | int error; |
76 | struct GNUNET_REGEX_Automaton *a; | 76 | struct REGEX_ITERNAL_Automaton *a; |
77 | unsigned int i; | 77 | unsigned int i; |
78 | const char *filename = "test_graph.dot"; | 78 | const char *filename = "test_graph.dot"; |
79 | 79 | ||
@@ -97,58 +97,58 @@ main (int argc, char *argv[]) | |||
97 | for (i = 0; i < 12; i++) | 97 | for (i = 0; i < 12; i++) |
98 | { | 98 | { |
99 | /* Check NFA graph creation */ | 99 | /* Check NFA graph creation */ |
100 | a = GNUNET_REGEX_construct_nfa (regex[i], strlen (regex[i])); | 100 | a = REGEX_ITERNAL_construct_nfa (regex[i], strlen (regex[i])); |
101 | GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT); | 101 | REGEX_ITERNAL_automaton_save_graph (a, filename, REGEX_ITERNAL_GRAPH_DEFAULT); |
102 | GNUNET_REGEX_automaton_destroy (a); | 102 | REGEX_ITERNAL_automaton_destroy (a); |
103 | error += filecheck (filename); | 103 | error += filecheck (filename); |
104 | 104 | ||
105 | a = GNUNET_REGEX_construct_nfa (regex[i], strlen (regex[i])); | 105 | a = REGEX_ITERNAL_construct_nfa (regex[i], strlen (regex[i])); |
106 | GNUNET_REGEX_automaton_save_graph (a, filename, | 106 | REGEX_ITERNAL_automaton_save_graph (a, filename, |
107 | GNUNET_REGEX_GRAPH_DEFAULT | | 107 | REGEX_ITERNAL_GRAPH_DEFAULT | |
108 | GNUNET_REGEX_GRAPH_VERBOSE); | 108 | REGEX_ITERNAL_GRAPH_VERBOSE); |
109 | GNUNET_REGEX_automaton_destroy (a); | 109 | REGEX_ITERNAL_automaton_destroy (a); |
110 | error += filecheck (filename); | 110 | error += filecheck (filename); |
111 | 111 | ||
112 | a = GNUNET_REGEX_construct_nfa (regex[i], strlen (regex[i])); | 112 | a = REGEX_ITERNAL_construct_nfa (regex[i], strlen (regex[i])); |
113 | GNUNET_REGEX_automaton_save_graph (a, filename, | 113 | REGEX_ITERNAL_automaton_save_graph (a, filename, |
114 | GNUNET_REGEX_GRAPH_DEFAULT | | 114 | REGEX_ITERNAL_GRAPH_DEFAULT | |
115 | GNUNET_REGEX_GRAPH_COLORING); | 115 | REGEX_ITERNAL_GRAPH_COLORING); |
116 | GNUNET_REGEX_automaton_destroy (a); | 116 | REGEX_ITERNAL_automaton_destroy (a); |
117 | error += filecheck (filename); | 117 | error += filecheck (filename); |
118 | 118 | ||
119 | a = GNUNET_REGEX_construct_nfa (regex[i], strlen (regex[i])); | 119 | a = REGEX_ITERNAL_construct_nfa (regex[i], strlen (regex[i])); |
120 | GNUNET_REGEX_automaton_save_graph (a, filename, | 120 | REGEX_ITERNAL_automaton_save_graph (a, filename, |
121 | GNUNET_REGEX_GRAPH_DEFAULT | | 121 | REGEX_ITERNAL_GRAPH_DEFAULT | |
122 | GNUNET_REGEX_GRAPH_VERBOSE | | 122 | REGEX_ITERNAL_GRAPH_VERBOSE | |
123 | GNUNET_REGEX_GRAPH_COLORING); | 123 | REGEX_ITERNAL_GRAPH_COLORING); |
124 | GNUNET_REGEX_automaton_destroy (a); | 124 | REGEX_ITERNAL_automaton_destroy (a); |
125 | error += filecheck (filename); | 125 | error += filecheck (filename); |
126 | 126 | ||
127 | 127 | ||
128 | /* Check DFA graph creation */ | 128 | /* Check DFA graph creation */ |
129 | a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0); | 129 | a = REGEX_ITERNAL_construct_dfa (regex[i], strlen (regex[i]), 0); |
130 | GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT); | 130 | REGEX_ITERNAL_automaton_save_graph (a, filename, REGEX_ITERNAL_GRAPH_DEFAULT); |
131 | GNUNET_REGEX_automaton_destroy (a); | 131 | REGEX_ITERNAL_automaton_destroy (a); |
132 | error += filecheck (filename); | 132 | error += filecheck (filename); |
133 | 133 | ||
134 | a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0); | 134 | a = REGEX_ITERNAL_construct_dfa (regex[i], strlen (regex[i]), 0); |
135 | GNUNET_REGEX_automaton_save_graph (a, filename, | 135 | REGEX_ITERNAL_automaton_save_graph (a, filename, |
136 | GNUNET_REGEX_GRAPH_DEFAULT | | 136 | REGEX_ITERNAL_GRAPH_DEFAULT | |
137 | GNUNET_REGEX_GRAPH_VERBOSE); | 137 | REGEX_ITERNAL_GRAPH_VERBOSE); |
138 | GNUNET_REGEX_automaton_destroy (a); | 138 | REGEX_ITERNAL_automaton_destroy (a); |
139 | error += filecheck (filename); | 139 | error += filecheck (filename); |
140 | 140 | ||
141 | a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0); | 141 | a = REGEX_ITERNAL_construct_dfa (regex[i], strlen (regex[i]), 0); |
142 | GNUNET_REGEX_automaton_save_graph (a, filename, | 142 | REGEX_ITERNAL_automaton_save_graph (a, filename, |
143 | GNUNET_REGEX_GRAPH_DEFAULT | | 143 | REGEX_ITERNAL_GRAPH_DEFAULT | |
144 | GNUNET_REGEX_GRAPH_COLORING); | 144 | REGEX_ITERNAL_GRAPH_COLORING); |
145 | GNUNET_REGEX_automaton_destroy (a); | 145 | REGEX_ITERNAL_automaton_destroy (a); |
146 | error += filecheck (filename); | 146 | error += filecheck (filename); |
147 | 147 | ||
148 | 148 | ||
149 | a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 4); | 149 | a = REGEX_ITERNAL_construct_dfa (regex[i], strlen (regex[i]), 4); |
150 | GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT); | 150 | REGEX_ITERNAL_automaton_save_graph (a, filename, REGEX_ITERNAL_GRAPH_DEFAULT); |
151 | GNUNET_REGEX_automaton_destroy (a); | 151 | REGEX_ITERNAL_automaton_destroy (a); |
152 | error += filecheck (filename); | 152 | error += filecheck (filename); |
153 | 153 | ||
154 | } | 154 | } |