Add support for patterns on %include #25140

Also adds generic tor_glob function to expand globs.
This commit is contained in:
Daniel Pinto
2020-06-03 22:09:42 +01:00
parent a7226ca06e
commit 34fa2c4d0d
20 changed files with 1339 additions and 87 deletions
+9
View File
@@ -143,6 +143,15 @@ tor_strupper(char *s)
}
}
/** Replaces <b>old</b> with <b>replacement</b> in <b>s</b> */
void
tor_strreplacechar(char *s, char find, char replacement)
{
for (s = strchr(s, find); s; s = strchr(s + 1, find)) {
*s = replacement;
}
}
/** Return 1 if every character in <b>s</b> is printable, else return 0.
*/
int