aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex_test_graph.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-06-20 09:02:43 +0000
committerChristian Grothoff <christian@grothoff.org>2013-06-20 09:02:43 +0000
commit566b7539fcaf9c455da665cb641016d2cfbb1b47 (patch)
treeeb12baa08d99313d6da7eb8c1be17c5e447f1586 /src/regex/regex_test_graph.c
parentde9409f80dbfc5cc61a28316b271600e9da95cdc (diff)
downloadgnunet-566b7539fcaf9c455da665cb641016d2cfbb1b47.tar.gz
gnunet-566b7539fcaf9c455da665cb641016d2cfbb1b47.zip
renaming symbols from libgnunetregextest to have the prefix REGEX_TEST
Diffstat (limited to 'src/regex/regex_test_graph.c')
-rw-r--r--src/regex/regex_test_graph.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/regex/regex_test_graph.c b/src/regex/regex_test_graph.c
index 369356aa1..0684da711 100644
--- a/src/regex/regex_test_graph.c
+++ b/src/regex/regex_test_graph.c
@@ -29,9 +29,9 @@
29 29
30/** 30/**
31 * Context for graph creation. Passed as the cls to 31 * Context for graph creation. Passed as the cls to
32 * REGEX_ITERNAL_automaton_save_graph_step. 32 * REGEX_TEST_automaton_save_graph_step.
33 */ 33 */
34struct REGEX_ITERNAL_Graph_Context 34struct REGEX_TEST_Graph_Context
35{ 35{
36 /** 36 /**
37 * File pointer to the dot file used for output. 37 * File pointer to the dot file used for output.
@@ -64,12 +64,12 @@ struct REGEX_ITERNAL_Graph_Context
64 */ 64 */
65static void 65static void
66scc_tarjan_strongconnect (unsigned int *scc_counter, 66scc_tarjan_strongconnect (unsigned int *scc_counter,
67 struct REGEX_ITERNAL_State *v, unsigned int *index, 67 struct REGEX_INTERNAL_State *v, unsigned int *index,
68 struct REGEX_ITERNAL_State **stack, 68 struct REGEX_INTERNAL_State **stack,
69 unsigned int *stack_size) 69 unsigned int *stack_size)
70{ 70{
71 struct REGEX_ITERNAL_State *w; 71 struct REGEX_INTERNAL_State *w;
72 struct REGEX_ITERNAL_Transition *t; 72 struct REGEX_INTERNAL_Transition *t;
73 73
74 v->index = *index; 74 v->index = *index;
75 v->lowlink = *index; 75 v->lowlink = *index;
@@ -114,12 +114,12 @@ scc_tarjan_strongconnect (unsigned int *scc_counter,
114 * @param a the automaton for which SCCs should be computed and assigned. 114 * @param a the automaton for which SCCs should be computed and assigned.
115 */ 115 */
116static void 116static void
117scc_tarjan (struct REGEX_ITERNAL_Automaton *a) 117scc_tarjan (struct REGEX_INTERNAL_Automaton *a)
118{ 118{
119 unsigned int index; 119 unsigned int index;
120 unsigned int scc_counter; 120 unsigned int scc_counter;
121 struct REGEX_ITERNAL_State *v; 121 struct REGEX_INTERNAL_State *v;
122 struct REGEX_ITERNAL_State *stack[a->state_count]; 122 struct REGEX_INTERNAL_State *stack[a->state_count];
123 unsigned int stack_size; 123 unsigned int stack_size;
124 124
125 for (v = a->states_head; NULL != v; v = v->next) 125 for (v = a->states_head; NULL != v; v = v->next)
@@ -144,18 +144,18 @@ scc_tarjan (struct REGEX_ITERNAL_Automaton *a)
144/** 144/**
145 * Save a state to an open file pointer. cls is expected to be a file pointer to 145 * Save a state to an open file pointer. cls is expected to be a file pointer to
146 * an open file. Used only in conjunction with 146 * an open file. Used only in conjunction with
147 * REGEX_ITERNAL_automaton_save_graph. 147 * REGEX_TEST_automaton_save_graph.
148 * 148 *
149 * @param cls file pointer. 149 * @param cls file pointer.
150 * @param count current count of the state, not used. 150 * @param count current count of the state, not used.
151 * @param s state. 151 * @param s state.
152 */ 152 */
153void 153void
154REGEX_ITERNAL_automaton_save_graph_step (void *cls, unsigned int count, 154REGEX_TEST_automaton_save_graph_step (void *cls, unsigned int count,
155 struct REGEX_ITERNAL_State *s) 155 struct REGEX_INTERNAL_State *s)
156{ 156{
157 struct REGEX_ITERNAL_Graph_Context *ctx = cls; 157 struct REGEX_TEST_Graph_Context *ctx = cls;
158 struct REGEX_ITERNAL_Transition *ctran; 158 struct REGEX_INTERNAL_Transition *ctran;
159 char *s_acc = NULL; 159 char *s_acc = NULL;
160 char *s_tran = NULL; 160 char *s_tran = NULL;
161 char *name; 161 char *name;
@@ -268,13 +268,13 @@ REGEX_ITERNAL_automaton_save_graph_step (void *cls, unsigned int count,
268 * mode 268 * mode
269 */ 269 */
270void 270void
271REGEX_ITERNAL_automaton_save_graph (struct REGEX_ITERNAL_Automaton *a, 271REGEX_TEST_automaton_save_graph (struct REGEX_INTERNAL_Automaton *a,
272 const char *filename, 272 const char *filename,
273 enum REGEX_ITERNAL_GraphSavingOptions options) 273 enum REGEX_TEST_GraphSavingOptions options)
274{ 274{
275 char *start; 275 char *start;
276 char *end; 276 char *end;
277 struct REGEX_ITERNAL_Graph_Context ctx; 277 struct REGEX_TEST_Graph_Context ctx;
278 278
279 if (NULL == a) 279 if (NULL == a)
280 { 280 {
@@ -290,9 +290,9 @@ REGEX_ITERNAL_automaton_save_graph (struct REGEX_ITERNAL_Automaton *a,
290 290
291 ctx.filep = fopen (filename, "w"); 291 ctx.filep = fopen (filename, "w");
292 ctx.verbose = 292 ctx.verbose =
293 (0 == (options & REGEX_ITERNAL_GRAPH_VERBOSE)) ? GNUNET_NO : GNUNET_YES; 293 (0 == (options & REGEX_TEST_GRAPH_VERBOSE)) ? GNUNET_NO : GNUNET_YES;
294 ctx.coloring = 294 ctx.coloring =
295 (0 == (options & REGEX_ITERNAL_GRAPH_COLORING)) ? GNUNET_NO : GNUNET_YES; 295 (0 == (options & REGEX_TEST_GRAPH_COLORING)) ? GNUNET_NO : GNUNET_YES;
296 296
297 if (NULL == ctx.filep) 297 if (NULL == ctx.filep)
298 { 298 {
@@ -308,8 +308,8 @@ REGEX_ITERNAL_automaton_save_graph (struct REGEX_ITERNAL_Automaton *a,
308 start = "digraph G {\nrankdir=LR\n"; 308 start = "digraph G {\nrankdir=LR\n";
309 fwrite (start, strlen (start), 1, ctx.filep); 309 fwrite (start, strlen (start), 1, ctx.filep);
310 310
311 REGEX_ITERNAL_automaton_traverse (a, a->start, NULL, NULL, 311 REGEX_INTERNAL_automaton_traverse (a, a->start, NULL, NULL,
312 &REGEX_ITERNAL_automaton_save_graph_step, 312 &REGEX_TEST_automaton_save_graph_step,
313 &ctx); 313 &ctx);
314 314
315 end = "\n}\n"; 315 end = "\n}\n";