locale changes, piscreen
This commit is contained in:
@@ -219,14 +219,15 @@ void PIScreen::SystemConsole::print() {
|
||||
} else {
|
||||
if (!s.isEmpty()) {
|
||||
moveTo(si, sj);
|
||||
printf("%s", s.data());
|
||||
PICout::stdoutPIString(s);
|
||||
s.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!s.isEmpty()) {
|
||||
moveTo(si, sj);
|
||||
printf("%s", s.data());
|
||||
PICout::stdoutPIString(s);
|
||||
//printf("%s", s.data());
|
||||
s.clear();
|
||||
}
|
||||
}
|
||||
@@ -295,32 +296,32 @@ void PIScreen::SystemConsole::newLine() {
|
||||
}
|
||||
#else // WINDOWS
|
||||
PIString PIScreen::SystemConsole::formatString(const PIScreenTypes::Cell & c) {
|
||||
PIString ts("\e[0");
|
||||
PIString ts = PIStringAscii("\e[0");
|
||||
switch (c.format.color_char) {
|
||||
case Black: ts += ";30"; break;
|
||||
case Red: ts += ";31"; break;
|
||||
case Green: ts += ";32"; break;
|
||||
case Blue: ts += ";34"; break;
|
||||
case Cyan: ts += ";36"; break;
|
||||
case Magenta: ts += ";35"; break;
|
||||
case Yellow: ts += ";33"; break;
|
||||
case White: ts += ";37"; break;
|
||||
case Black: ts += PIStringAscii(";30"); break;
|
||||
case Red: ts += PIStringAscii(";31"); break;
|
||||
case Green: ts += PIStringAscii(";32"); break;
|
||||
case Blue: ts += PIStringAscii(";34"); break;
|
||||
case Cyan: ts += PIStringAscii(";36"); break;
|
||||
case Magenta: ts += PIStringAscii(";35"); break;
|
||||
case Yellow: ts += PIStringAscii(";33"); break;
|
||||
case White: ts += PIStringAscii(";37"); break;
|
||||
}
|
||||
switch (c.format.color_back) {
|
||||
case Black: ts += ";40"; break;
|
||||
case Red: ts += ";41"; break;
|
||||
case Green: ts += ";42"; break;
|
||||
case Blue: ts += ";44"; break;
|
||||
case Cyan: ts += ";46"; break;
|
||||
case Magenta: ts += ";45"; break;
|
||||
case Yellow: ts += ";43"; break;
|
||||
case White: ts += ";47"; break;
|
||||
case Black: ts += PIStringAscii(";40"); break;
|
||||
case Red: ts += PIStringAscii(";41"); break;
|
||||
case Green: ts += PIStringAscii(";42"); break;
|
||||
case Blue: ts += PIStringAscii(";44"); break;
|
||||
case Cyan: ts += PIStringAscii(";46"); break;
|
||||
case Magenta: ts += PIStringAscii(";45"); break;
|
||||
case Yellow: ts += PIStringAscii(";43"); break;
|
||||
case White: ts += PIStringAscii(";47"); break;
|
||||
}
|
||||
if ((c.format.flags & Bold) == Bold) ts += ";1";
|
||||
if ((c.format.flags & Underline) == Underline) ts += ";4";
|
||||
if ((c.format.flags & Blink) == Blink) ts += ";5";
|
||||
if ((c.format.flags & Inverse) == Inverse) ts += ";7";
|
||||
return ts + "m";
|
||||
if ((c.format.flags & Bold ) == Bold ) ts += PIStringAscii(";1");
|
||||
if ((c.format.flags & Underline) == Underline) ts += PIStringAscii(";4");
|
||||
if ((c.format.flags & Blink ) == Blink ) ts += PIStringAscii(";5");
|
||||
if ((c.format.flags & Inverse ) == Inverse ) ts += PIStringAscii(";7");
|
||||
return ts + 'm';
|
||||
}
|
||||
#endif // WINDOWS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user