From: Christian Grothoff Date: Sun, 25 Dec 2011 21:36:28 +0000 (+0000) Subject: -also break at some other tokens X-Git-Tag: initial-import-from-subversion-38251~15521 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e123568297e33d8cbe7acd9023fa65d7f4a8a621;p=oweals%2Fgnunet.git -also break at some other tokens --- 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) /** - * Break the filename up by "_", " " and "." (any other separators?) to make + * Where to break up keywords + */ +#define TOKENS "_. /-!?#&+@\"\'\\;:" + +/** + * Break the filename up by TOKENS to make * keywords. * * @param s string to break down. @@ -1592,7 +1597,7 @@ get_keywords_from_tokens (const char *s, char **array, int index) int seps = 0; ss = GNUNET_strdup (s); - for (p = strtok (ss, "_. "); p != NULL; p = strtok (NULL, "_, ")) + for (p = strtok (ss, TOKENS); p != NULL; p = strtok (NULL, TOKENS)) { if (NULL != array) { @@ -1609,6 +1614,7 @@ get_keywords_from_tokens (const char *s, char **array, int index) GNUNET_free (ss); return seps; } +#undef TOKENS /**