[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27622 - gnunet/src/regex
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27622 - gnunet/src/regex |
Date: |
Wed, 26 Jun 2013 13:51:44 +0200 |
Author: grothoff
Date: 2013-06-26 13:51:44 +0200 (Wed, 26 Jun 2013)
New Revision: 27622
Modified:
gnunet/src/regex/gnunet-regex-simulation-profiler.c
gnunet/src/regex/perf-regex.c
gnunet/src/regex/plugin_block_regex.c
gnunet/src/regex/regex_block_lib.c
gnunet/src/regex/regex_block_lib.h
gnunet/src/regex/regex_internal.c
gnunet/src/regex/regex_internal_dht.c
gnunet/src/regex/regex_internal_lib.h
gnunet/src/regex/test_regex_iterate_api.c
Log:
-renaming symbols of the block library to use the REGEX_BLOCK_ prefix and not
the REGEX_INTERNAL_ prefix
Modified: gnunet/src/regex/gnunet-regex-simulation-profiler.c
===================================================================
--- gnunet/src/regex/gnunet-regex-simulation-profiler.c 2013-06-26 11:50:16 UTC
(rev 27621)
+++ gnunet/src/regex/gnunet-regex-simulation-profiler.c 2013-06-26 11:51:44 UTC
(rev 27622)
@@ -335,7 +335,7 @@
static void
regex_iterator (void *cls, const struct GNUNET_HashCode *key, const char
*proof,
int accepting, unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge *edges)
+ const struct REGEX_BLOCK_Edge *edges)
{
unsigned int i;
int result;
Modified: gnunet/src/regex/perf-regex.c
===================================================================
--- gnunet/src/regex/perf-regex.c 2013-06-26 11:50:16 UTC (rev 27621)
+++ gnunet/src/regex/perf-regex.c 2013-06-26 11:51:44 UTC (rev 27622)
@@ -53,7 +53,7 @@
const char *proof,
int accepting,
unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge *edges)
+ const struct REGEX_BLOCK_Edge *edges)
{
unsigned int i;
Modified: gnunet/src/regex/plugin_block_regex.c
===================================================================
--- gnunet/src/regex/plugin_block_regex.c 2013-06-26 11:50:16 UTC (rev
27621)
+++ gnunet/src/regex/plugin_block_regex.c 2013-06-26 11:51:44 UTC (rev
27622)
@@ -108,10 +108,10 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Block with no xquery\n");
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " key: %s, %u edges\n",
GNUNET_h2s (&rblock->key), ntohl (rblock->n_edges));
- REGEX_INTERNAL_block_iterate (rblock, reply_block_size, &rdebug, NULL);
+ REGEX_BLOCK_iterate (rblock, reply_block_size, &rdebug, NULL);
return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
}
- switch (REGEX_INTERNAL_block_check (reply_block,
+ switch (REGEX_BLOCK_check (reply_block,
reply_block_size,
xquery))
{
Modified: gnunet/src/regex/regex_block_lib.c
===================================================================
--- gnunet/src/regex/regex_block_lib.c 2013-06-26 11:50:16 UTC (rev 27621)
+++ gnunet/src/regex/regex_block_lib.c 2013-06-26 11:51:44 UTC (rev 27622)
@@ -82,7 +82,7 @@
int
-REGEX_INTERNAL_block_check (const struct RegexBlock *block,
+REGEX_BLOCK_check (const struct RegexBlock *block,
size_t size,
const char *xquery)
{
@@ -98,7 +98,7 @@
ctx.xquery = xquery;
ctx.found = GNUNET_NO;
ctx.key = GNUNET_strdup (GNUNET_h2s (&block->key));
- res = REGEX_INTERNAL_block_iterate (block, size, &check_edge, &ctx);
+ res = REGEX_BLOCK_iterate (block, size, &check_edge, &ctx);
GNUNET_free (ctx.key);
if (GNUNET_SYSERR == res)
return GNUNET_SYSERR;
@@ -109,7 +109,7 @@
int
-REGEX_INTERNAL_block_iterate (const struct RegexBlock *block,
+REGEX_BLOCK_iterate (const struct RegexBlock *block,
size_t size,
REGEX_INTERNAL_EgdeIterator iterator,
void *iter_cls)
@@ -191,10 +191,10 @@
* @return the regex block
*/
struct RegexBlock *
-REGEX_INTERNAL_block_create (const struct GNUNET_HashCode *key,
+REGEX_BLOCK_create (const struct GNUNET_HashCode *key,
const char *proof,
unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge *edges,
+ const struct REGEX_BLOCK_Edge *edges,
int accepting,
size_t *rsize)
{
Modified: gnunet/src/regex/regex_block_lib.h
===================================================================
--- gnunet/src/regex/regex_block_lib.h 2013-06-26 11:50:16 UTC (rev 27621)
+++ gnunet/src/regex/regex_block_lib.h 2013-06-26 11:51:44 UTC (rev 27622)
@@ -43,7 +43,7 @@
/**
* Edge representation.
*/
-struct REGEX_INTERNAL_Edge
+struct REGEX_BLOCK_Edge
{
/**
* Label of the edge. FIXME: might want to not consume exactly multiples of
8 bits, need length!
@@ -70,12 +70,12 @@
* GNUNET_SYSERR if the block is invalid.
*/
int
-REGEX_INTERNAL_block_check (const struct RegexBlock *block,
+REGEX_BLOCK_check (const struct RegexBlock *block,
size_t size,
const char *xquery);
-/* FIXME: might want to use 'struct REGEX_INTERNAL_Edge' here instead of 3
arguments! */
+/* FIXME: might want to use 'struct REGEX_BLOCK_Edge' here instead of 3
arguments! */
/**
* Iterator over edges in a block.
@@ -110,7 +110,7 @@
* be errors in further edges.
*/
int
-REGEX_INTERNAL_block_iterate (const struct RegexBlock *block,
+REGEX_BLOCK_iterate (const struct RegexBlock *block,
size_t size,
REGEX_INTERNAL_EgdeIterator iterator,
void *iter_cls);
@@ -125,10 +125,10 @@
* @return the regex block
*/
struct RegexBlock *
-REGEX_INTERNAL_block_create (const struct GNUNET_HashCode *key,
+REGEX_BLOCK_create (const struct GNUNET_HashCode *key,
const char *proof,
unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge *edges,
+ const struct REGEX_BLOCK_Edge *edges,
int accepting,
size_t *rsize);
Modified: gnunet/src/regex/regex_internal.c
===================================================================
--- gnunet/src/regex/regex_internal.c 2013-06-26 11:50:16 UTC (rev 27621)
+++ gnunet/src/regex/regex_internal.c 2013-06-26 11:51:44 UTC (rev 27622)
@@ -205,7 +205,7 @@
* @return number of edges.
*/
static unsigned int
-state_get_edges (struct REGEX_INTERNAL_State *s, struct REGEX_INTERNAL_Edge
*edges)
+state_get_edges (struct REGEX_INTERNAL_State *s, struct REGEX_BLOCK_Edge
*edges)
{
struct REGEX_INTERNAL_Transition *t;
unsigned int count;
@@ -3372,8 +3372,8 @@
char *temp;
struct REGEX_INTERNAL_Transition *t;
unsigned int num_edges = state->transition_count;
- struct REGEX_INTERNAL_Edge edges[num_edges];
- struct REGEX_INTERNAL_Edge edge[1];
+ struct REGEX_BLOCK_Edge edges[num_edges];
+ struct REGEX_BLOCK_Edge edge[1];
struct GNUNET_HashCode hash;
struct GNUNET_HashCode hash_new;
@@ -3463,7 +3463,7 @@
for (s = a->states_head; NULL != s; s = s->next)
{
- struct REGEX_INTERNAL_Edge edges[s->transition_count];
+ struct REGEX_BLOCK_Edge edges[s->transition_count];
unsigned int num_edges;
num_edges = state_get_edges (s, edges);
Modified: gnunet/src/regex/regex_internal_dht.c
===================================================================
--- gnunet/src/regex/regex_internal_dht.c 2013-06-26 11:50:16 UTC (rev
27621)
+++ gnunet/src/regex/regex_internal_dht.c 2013-06-26 11:51:44 UTC (rev
27622)
@@ -87,7 +87,7 @@
const char *proof,
int accepting,
unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge *edges)
+ const struct REGEX_BLOCK_Edge *edges)
{
struct REGEX_INTERNAL_Announcement *h = cls;
struct RegexBlock *block;
@@ -123,7 +123,7 @@
DHT_TTL,
NULL, NULL);
}
- block = REGEX_INTERNAL_block_create (key, proof,
+ block = REGEX_BLOCK_create (key, proof,
num_edges, edges,
accepting,
&size);
@@ -573,7 +573,7 @@
/* Find the longest match for the current string position,
* among tokens in the given block */
ctx->longest_match = 0;
- result = REGEX_INTERNAL_block_iterate (block, size,
+ result = REGEX_BLOCK_iterate (block, size,
®ex_edge_iterator, ctx);
GNUNET_break (GNUNET_OK == result);
Modified: gnunet/src/regex/regex_internal_lib.h
===================================================================
--- gnunet/src/regex/regex_internal_lib.h 2013-06-26 11:50:16 UTC (rev
27621)
+++ gnunet/src/regex/regex_internal_lib.h 2013-06-26 11:51:44 UTC (rev
27622)
@@ -135,7 +135,7 @@
const char *proof,
int accepting,
unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge
*edges);
+ const struct REGEX_BLOCK_Edge *edges);
/**
Modified: gnunet/src/regex/test_regex_iterate_api.c
===================================================================
--- gnunet/src/regex/test_regex_iterate_api.c 2013-06-26 11:50:16 UTC (rev
27621)
+++ gnunet/src/regex/test_regex_iterate_api.c 2013-06-26 11:51:44 UTC (rev
27622)
@@ -61,7 +61,7 @@
static void
key_iterator (void *cls, const struct GNUNET_HashCode *key, const char *proof,
int accepting, unsigned int num_edges,
- const struct REGEX_INTERNAL_Edge *edges)
+ const struct REGEX_BLOCK_Edge *edges)
{
unsigned int i;
struct IteratorContext *ctx = cls;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27622 - gnunet/src/regex,
gnunet <=