std::string cmd_buf = command;
std::string tok = next_token(cmd_buf, " \t\r\n");
- if (tok.empty() || tok[0] == '#')
+ if (tok.empty())
return;
if (tok[0] == '!') {
}
while (!tok.empty()) {
- if (tok == "#")
- break;
+ if (tok == "#") {
+ int stop;
+ for (stop = 0; stop < GetSize(cmd_buf); stop++)
+ if (cmd_buf[stop] == '\r' || cmd_buf[stop] == '\n')
+ break;
+ cmd_buf = cmd_buf.substr(stop);
+ } else
if (tok.back() == ';') {
int num_semikolon = 0;
while (!tok.empty() && tok.back() == ';')