Mangle all funny file names for .x function (ROOT-8467).

This commit is contained in:
Philippe Canal 2016-11-28 10:25:50 -06:00 committed by sftnight
parent 5e14792560
commit 1d0c1e0156

View File

@ -91,8 +91,36 @@ namespace cling {
if (ret[0] >= '0' && ret[0] <= '9')
ret.insert(ret.begin(), '_');
for (char& c: ret) {
if (c == '-' || c == '+' || c == '-' || c == '.' || c == '@' || c == '~')
c = '_';
switch(c) {
case '+': c = '_'; break;
case '-': c = '_'; break;
case '*': c = '_'; break;
case '/': c = '_'; break;
case '&': c = '_'; break;
case '%': c = '_'; break;
case '|': c = '_'; break;
case '^': c = '_'; break;
case '>': c = '_'; break;
case '<': c = '_'; break;
case '=': c = '_'; break;
case '~': c = '_'; break;
case '.': c = '_'; break;
case '(': c = '_'; break;
case ')': c = '_'; break;
case '[': c = '_'; break;
case ']': c = '_'; break;
case '!': c = '_'; break;
case ',': c = '_'; break;
case '$': c = '_'; break;
case ' ': c = '_'; break;
case ':': c = '_'; break;
case '"': c = '_'; break;
case '@': c = '_'; break;
case '\'': c = '_'; break;
case '\\': c = '_'; break;
default:
/* nothing to do */
};
}
return ret;
}