зеркало из https://github.com/mozilla/gecko-dev.git
workaround for mac console code wierdness w.r.t. newlines and carraige returns
This commit is contained in:
Родитель
79d5c5f26d
Коммит
9e300771a9
|
@ -1071,6 +1071,17 @@ GlobalWindowImpl::Dump(const nsString& aStr)
|
|||
{
|
||||
char *cstr = aStr.ToNewCString();
|
||||
|
||||
#ifdef XP_MAC
|
||||
// have to convert \r to \n so that printing to the console works
|
||||
char *c = cstr, *cEnd = cstr + aStr.Length();
|
||||
while (c < cEnd)
|
||||
{
|
||||
if (*c == '\r')
|
||||
*c = '\n';
|
||||
c++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (nsnull != cstr) {
|
||||
printf("%s", cstr);
|
||||
delete [] cstr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче