void SQVM::Raise_Error(const SQChar *s, ...) { va_list vl; va_start(vl, s); scvsprintf(_sp(rsl((SQInteger)scstrlen(s)+(NUMBER_MAX_CHAR*2))), s, vl); va_end(vl); _lasterror = SQString::Create(_ss(this),_spval,-1); }
void SquirrelVM::ErrorFunc(HSQUIRRELVM v,const SQChar* s,...) { static SQChar temp[2048]; va_list vl; va_start(vl, s); scvsprintf(temp, s, vl); __asm int 3; va_end(vl); }
static void CaptureScriptOutput(HSQUIRRELVM /*v*/, const SQChar * s, ...) { static SQChar temp[2048]; va_list vl; va_start(vl,s); scvsprintf(temp,s,vl); ::capture.append(cbC2U(temp)); va_end(vl); }
void UIManager::ScriptDebugLog(HSQUIRRELVM v,const SQChar* s,...) { static SQChar temp[2048]; va_list vl; va_start(vl, s); scvsprintf(temp, s, vl); console::formatter() << "foo_alsong_lyric: Squirrel print:" << pfc::stringcvt::string_utf8_from_wide(temp); va_end(vl); }
static void ScriptsPrintFunc(HSQUIRRELVM /*v*/, const SQChar * s, ...) { static SQChar temp[2048]; va_list vl; va_start(vl,s); scvsprintf( temp,s,vl); wxString msg = cbC2U(temp); Manager::Get()->GetLogManager()->DebugLog(msg); va_end(vl); s_ScriptErrors << msg; }
static void ScriptConsolePrintFunc(HSQUIRRELVM /*v*/, const SQChar * s, ...) { static SQChar temp[2048]; va_list vl; va_start(vl,s); scvsprintf( temp,s,vl); wxString msg = cbC2U(temp); va_end(vl); if (s_Console) s_Console->Log(msg); Manager::Get()->GetScriptingManager()->InjectScriptOutput(msg); }
extern "C" void squirrel_print_helper(HSQUIRRELVM vm, const SQChar *format, ...) { SQChar buffer[4096]; struct rust_data *ptr; va_list va; ptr = ((struct rust_data *)sq_getforeignptr(vm)); if (!ptr || !ptr->print_callback) return; va_start(va, format); scvsprintf(buffer, 4096, format, va); va_end(va); return ptr->print_callback(ptr, buffer); }
void SQVM::Raise_ErrorV(const SQChar *s, va_list &vl) { scvsprintf(_sp(rsl((SQInteger)scstrlen(s)+(NUMBER_MAX_CHAR*2))), s, vl); Raise_Error(_spval); }