aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-25 21:36:28 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-25 21:36:28 +0000
commite123568297e33d8cbe7acd9023fa65d7f4a8a621 (patch)
treef0f850c40843ad40f59013810d889b5cfdf01c9c /src
parentcdee03748e83189713b32bb87bc77cde659c20d9 (diff)
downloadgnunet-e123568297e33d8cbe7acd9023fa65d7f4a8a621.tar.gz
gnunet-e123568297e33d8cbe7acd9023fa65d7f4a8a621.zip
-also break at some other tokens
Diffstat (limited to 'src')
-rw-r--r--src/fs/fs_uri.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index d3fcdd8ca..3bba83fdc 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -1571,7 +1571,12 @@ get_keywords_from_parens (const char *s, char **array, int index)
1571 1571
1572 1572
1573/** 1573/**
1574 * Break the filename up by "_", " " and "." (any other separators?) to make 1574 * Where to break up keywords
1575 */
1576#define TOKENS "_. /-!?#&+@\"\'\\;:"
1577
1578/**
1579 * Break the filename up by TOKENS to make
1575 * keywords. 1580 * keywords.
1576 * 1581 *
1577 * @param s string to break down. 1582 * @param s string to break down.
@@ -1592,7 +1597,7 @@ get_keywords_from_tokens (const char *s, char **array, int index)
1592 int seps = 0; 1597 int seps = 0;
1593 1598
1594 ss = GNUNET_strdup (s); 1599 ss = GNUNET_strdup (s);
1595 for (p = strtok (ss, "_. "); p != NULL; p = strtok (NULL, "_, ")) 1600 for (p = strtok (ss, TOKENS); p != NULL; p = strtok (NULL, TOKENS))
1596 { 1601 {
1597 if (NULL != array) 1602 if (NULL != array)
1598 { 1603 {
@@ -1609,6 +1614,7 @@ get_keywords_from_tokens (const char *s, char **array, int index)
1609 GNUNET_free (ss); 1614 GNUNET_free (ss);
1610 return seps; 1615 return seps;
1611} 1616}
1617#undef TOKENS
1612 1618
1613 1619
1614/** 1620/**