Small fix in theide commandline mode

git-svn-id: svn://ultimatepp.org/upp/trunk@369 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-08-26 21:25:16 +00:00
parent ea699eb2a9
commit 215bdadf0a
5 changed files with 1033 additions and 345 deletions

View file

@ -36,10 +36,17 @@ static int sAppf(int c) {
return c >= ' ' || c == '\n' ? c : c == '\t' ? ' ' : 0;
}
static int sCharFilterNoCr(int c) {
return c == '\r' ? 0 : c;
}
void Console::Append(const String& s) {
if(s.IsEmpty()) return;
if(console) {
Puts(s);
String t = Filter(s, sCharFilterNoCr);
if(*t.Last() == '\n')
t.Trim(t.GetCount() - 1);
Puts(t);
return;
}
int l, h;