fixed problem with macros not working properly on Unix systems
This commit is contained in:
parent
81599bdc1e
commit
719281f27c
1 changed files with 3 additions and 7 deletions
|
@ -157,8 +157,6 @@ void internal_preprocess_file(const std::string& fname,
|
|||
|
||||
std::string str = val.value;
|
||||
|
||||
std::cerr << "symbol '" << symbol << "' called with arguments: ";
|
||||
|
||||
//substitute in given arguments
|
||||
for(size_t n = 0; n != val.arguments.size(); ++n) {
|
||||
const std::string& replace_with = (n < items.size()) ? items[n] : "";
|
||||
|
@ -179,12 +177,8 @@ void internal_preprocess_file(const std::string& fname,
|
|||
|
||||
pos = new_pos;
|
||||
}
|
||||
|
||||
std::cerr << "'" << item << "' -> '" << replace_with << "' (substituted " << subs << " times), ";
|
||||
}
|
||||
|
||||
std::cerr << "\n";
|
||||
|
||||
res.insert(res.end(),str.begin(),str.end());
|
||||
line += std::count(str.begin(),str.end(),'\n');
|
||||
} else if(depth < 20) {
|
||||
|
@ -665,7 +659,9 @@ std::vector<std::string> config::split(const std::string& val, char c)
|
|||
}
|
||||
|
||||
namespace {
|
||||
bool notspace(char c) { return !isspace(c); }
|
||||
//make sure we regard '\r' and '\n' as a space, since Mac, Unix, and DOS
|
||||
//all consider these differently.
|
||||
bool notspace(char c) { return c == '\r' || c == '\n' || !isspace(c); }
|
||||
}
|
||||
|
||||
std::string& config::strip(std::string& str)
|
||||
|
|
Loading…
Add table
Reference in a new issue