BUG/MINOR: tools: also accept '+' as a valid character in an identifier
The function is_idchar() was added by commit 36f586b ("MINOR: tools:
add is_idchar() to tell if a char may belong to an identifier") to
ease matching of sample fetch/converter names. But it lacked support
for the '+' character used in "base32+src" and "url32+src". A quick
way to figure the list of supported sample fetch+converter names is
to issue the following command:
git grep '"[^"]*",.*SMP_T_.*SMP_USE_'|cut -f2 -d'"'|sort -u
No more entry is reported once searching for characters not covered
by is_idchar().
No backport is needed.
diff --git a/include/common/standard.h b/include/common/standard.h
index da2efcf..6d2432f 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -373,13 +373,13 @@
extern const char *invalid_prefix_char(const char *name);
/* returns true if <c> is an identifier character, that is, a digit, a letter,
- * or '-', '_', ':' or '.'. This is usable for proxy names, server names, ACL
- * names, sample fetch names, and converter names.
+ * or '-', '+', '_', ':' or '.'. This is usable for proxy names, server names,
+ * ACL names, sample fetch names, and converter names.
*/
static inline int is_idchar(char c)
{
return isalnum((int)(unsigned char)c) ||
- c == '.' || c == '_' || c == '-' || c == ':';
+ c == '.' || c == '_' || c == '-' || c == '+' || c == ':';
}
/*