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
@@ -587,7 +587,7 @@ JSBool JSI_IGUIObject::toString(JSContext* cx, JSObject* obj, uintN UNUSED(argc)
IGUIObject* e = (IGUIObject*)JS_GetPrivate( cx, obj );
char buffer[256];
snprintf(buffer, 256, "[GUIObject: %s]", e->GetName().c_str());
snprintf(buffer, 256, "[GUIObject: %hs]", e->GetName().c_str());
buffer[255] = 0;
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, buffer));
return JS_TRUE;