misc. string fixes

convert remaining %s to %hs or %ls
use WPRINTF_ARGS on unicode printf functions
fix: __func__ can't be widened via preprocessor (-> revert to char*)
convert remaining external_[directory|file_string to string()
Util: don't mix fwprintf and fprintf
Formation: fix dangling pointer (storing result of c_str())

This was SVN commit r7164.
This commit is contained in:
janwas
2009-11-04 15:29:28 +00:00
parent e29d5a779f
commit 77d2c67ada
39 changed files with 130 additions and 125 deletions
+3 -3
View File
@@ -409,16 +409,16 @@ void ScriptingHost::ErrorReporter(JSContext* UNUSED(cx), const char* pmessage, J
// apparently there is no further information in this struct we can use
// because linebuf/tokenptr require a buffer to have been allocated.
// that doesn't look possible since we are a callback and there is
// no mention in the dox about where this would happen (typical).
// no mention in the docs about where this would happen (typical).
// for developer convenience: write to output window so they can
// doubleclick on that line and be taken to the error locus.
// double-click on that line and be taken to the error locus.
debug_printf(L"%ls(%d): %ls\n", file.c_str(), line, message.c_str());
// note: CLogger's LOG already takes care of writing to the console,
// so don't do that here.
LOG(CLogger::Error, LOG_CATEGORY, L"JavaScript Error (%s, line %d): %s", file.c_str(), line, message.c_str());
LOG(CLogger::Error, LOG_CATEGORY, L"JavaScript Error (%ls, line %d): %ls", file.c_str(), line, message.c_str());
}
#ifndef NDEBUG