Changeset 149 for cafu/trunk/Libs/ConsoleCommands/Console_Lua.cpp
- Timestamp:
- 09/03/10 00:25:58 (21 months ago)
- Files:
-
- 1 copied
-
cafu/trunk/Libs/ConsoleCommands/Console_Lua.cpp (copied) (copied from cafu/trunk/Libs/ConsoleCommands/Console.cpp) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/Libs/ConsoleCommands/Console_Lua.cpp
r36 r149 22 22 */ 23 23 24 #include "Console_Lua.hpp" 24 25 #include "Console.hpp" 25 26 … … 28 29 #include <lua.h> 29 30 #include <lauxlib.h> 30 }31 32 #if defined(_WIN32) && defined (_MSC_VER)33 #if (_MSC_VER<1300)34 #define vsnprintf _vsnprintf35 #define for if (false) ; else for36 #endif37 #endif38 39 40 std::string cf::va(const char* FormatString, ...)41 {42 va_list ArgList;43 char Buffer[1024];44 45 if (!FormatString) return "";46 47 va_start(ArgList, FormatString);48 vsnprintf(Buffer, 1024-1, FormatString, ArgList);49 Buffer[1024-1]=0;50 va_end(ArgList);51 52 return Buffer;53 31 } 54 32 … … 194 172 195 173 196 void cf::Console I::RegisterLua(lua_State* LuaState)174 void cf::Console_RegisterLua(lua_State* LuaState) 197 175 { 198 176 static const luaL_Reg ConsoleFunctions[]=
