Fixed xofts issues
This commit is contained in:
parent
692cf5bb70
commit
cd6ab5617c
@ -767,7 +767,7 @@ bool cByteBuffer::ReadUTF16String(AString & a_String, int a_NumChars)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
RawBEToUTF8((RawData.data()), a_NumChars, a_String);
|
RawBEToUTF8(RawData.data(), a_NumChars, a_String);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ void cLogCommandOutputCallback::Finished(void)
|
|||||||
{
|
{
|
||||||
case '\n':
|
case '\n':
|
||||||
{
|
{
|
||||||
LOG("%s",m_Buffer.substr(last, i - last).c_str());
|
LOG("%s", m_Buffer.substr(last, i - last).c_str());
|
||||||
last = i + 1;
|
last = i + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ void cLogCommandOutputCallback::Finished(void)
|
|||||||
} // for i - m_Buffer[]
|
} // for i - m_Buffer[]
|
||||||
if (last < len)
|
if (last < len)
|
||||||
{
|
{
|
||||||
LOG("%s",m_Buffer.substr(last).c_str());
|
LOG("%s", m_Buffer.substr(last).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the buffer for the next command output:
|
// Clear the buffer for the next command output:
|
||||||
|
@ -17,7 +17,7 @@ public:
|
|||||||
virtual ~cCommandOutputCallback() {}; // Force a virtual destructor in subclasses
|
virtual ~cCommandOutputCallback() {}; // Force a virtual destructor in subclasses
|
||||||
|
|
||||||
/// Syntax sugar function, calls Out() with Printf()-ed parameters; appends a "\n"
|
/// Syntax sugar function, calls Out() with Printf()-ed parameters; appends a "\n"
|
||||||
void Out(const char * a_Fmt, ...) FORMATSTRING(2,3);
|
void Out(const char * a_Fmt, ...) FORMATSTRING(2, 3);
|
||||||
|
|
||||||
/// Called when the command wants to output anything; may be called multiple times
|
/// Called when the command wants to output anything; may be called multiple times
|
||||||
virtual void Out(const AString & a_Text) = 0;
|
virtual void Out(const AString & a_Text) = 0;
|
||||||
|
@ -114,7 +114,8 @@ template <typename T, size_t Size, bool x = sizeof(T) == Size>
|
|||||||
class SizeChecker;
|
class SizeChecker;
|
||||||
|
|
||||||
template <typename T, size_t Size>
|
template <typename T, size_t Size>
|
||||||
class SizeChecker<T, Size, true> {
|
class SizeChecker<T, Size, true>
|
||||||
|
{
|
||||||
T v;
|
T v;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ void cLog::Log(const char * a_Format, va_list argList)
|
|||||||
|
|
||||||
AString Line;
|
AString Line;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
Printf(Line, "[" SIZE_T_FMT_PRECISION(04) "|%02d:%02d:%02d] %s", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
Printf(Line, "[%04lx|%02d:%02d:%02d] %s", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
||||||
#else
|
#else
|
||||||
Printf(Line, "[%02d:%02d:%02d] %s", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
Printf(Line, "[%02d:%02d:%02d] %s", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, Message.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,8 +14,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
cLog(const AString & a_FileName);
|
cLog(const AString & a_FileName);
|
||||||
~cLog();
|
~cLog();
|
||||||
void Log(const char * a_Format, va_list argList) FORMATSTRING(2,0);
|
void Log(const char * a_Format, va_list argList) FORMATSTRING(2, 0);
|
||||||
void Log(const char * a_Format, ...) FORMATSTRING(2,3);
|
void Log(const char * a_Format, ...) FORMATSTRING(2, 3);
|
||||||
// tolua_begin
|
// tolua_begin
|
||||||
void SimpleLog(const char * a_String);
|
void SimpleLog(const char * a_String);
|
||||||
void OpenLog(const char * a_FileName);
|
void OpenLog(const char * a_FileName);
|
||||||
|
@ -21,10 +21,10 @@ public: // tolua_export
|
|||||||
|
|
||||||
~cMCLogger(); // tolua_export
|
~cMCLogger(); // tolua_export
|
||||||
|
|
||||||
void Log(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
|
void Log(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
|
||||||
void Info(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
|
void Info(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
|
||||||
void Warn(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
|
void Warn(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
|
||||||
void Error(const char* a_Format, va_list a_ArgList) FORMATSTRING(2,0);
|
void Error(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
|
||||||
|
|
||||||
void LogSimple(const char* a_Text, int a_LogType = 0 ); // tolua_export
|
void LogSimple(const char* a_Text, int a_LogType = 0 ); // tolua_export
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern void LOG(const char* a_Format, ...) FORMATSTRING(1,2);
|
extern void LOG(const char* a_Format, ...) FORMATSTRING(1, 2);
|
||||||
extern void LOGINFO(const char* a_Format, ...) FORMATSTRING(1,2);
|
extern void LOGINFO(const char* a_Format, ...) FORMATSTRING(1, 2);
|
||||||
extern void LOGWARN(const char* a_Format, ...) FORMATSTRING(1,2);
|
extern void LOGWARN(const char* a_Format, ...) FORMATSTRING(1, 2);
|
||||||
extern void LOGERROR(const char* a_Format, ...) FORMATSTRING(1,2);
|
extern void LOGERROR(const char* a_Format, ...) FORMATSTRING(1, 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public:
|
|||||||
/** Returns the list of all items in the specified folder (files, folders, nix pipes, whatever's there). */
|
/** Returns the list of all items in the specified folder (files, folders, nix pipes, whatever's there). */
|
||||||
static AStringVector GetFolderContents(const AString & a_Folder); // Exported in ManualBindings.cpp
|
static AStringVector GetFolderContents(const AString & a_Folder); // Exported in ManualBindings.cpp
|
||||||
|
|
||||||
int Printf(const char * a_Fmt, ...) FORMATSTRING(2,3);
|
int Printf(const char * a_Fmt, ...) FORMATSTRING(2, 3);
|
||||||
|
|
||||||
/** Flushes all the bufferef output into the file (only when writing) */
|
/** Flushes all the bufferef output into the file (only when writing) */
|
||||||
void Flush(void);
|
void Flush(void);
|
||||||
|
@ -22,16 +22,16 @@ typedef std::list<AString> AStringList;
|
|||||||
|
|
||||||
|
|
||||||
/** Add the formated string to the existing data in the string */
|
/** Add the formated string to the existing data in the string */
|
||||||
extern AString & AppendVPrintf(AString & str, const char * format, va_list args) FORMATSTRING(2,0);
|
extern AString & AppendVPrintf(AString & str, const char * format, va_list args) FORMATSTRING(2, 0);
|
||||||
|
|
||||||
/// Output the formatted text into the string
|
/// Output the formatted text into the string
|
||||||
extern AString & Printf (AString & str, const char * format, ...) FORMATSTRING(2,3);
|
extern AString & Printf (AString & str, const char * format, ...) FORMATSTRING(2, 3);
|
||||||
|
|
||||||
/// Output the formatted text into string, return string by value
|
/// Output the formatted text into string, return string by value
|
||||||
extern AString Printf(const char * format, ...) FORMATSTRING(1,2);
|
extern AString Printf(const char * format, ...) FORMATSTRING(1, 2);
|
||||||
|
|
||||||
/// Add the formatted string to the existing data in the string
|
/// Add the formatted string to the existing data in the string
|
||||||
extern AString & AppendPrintf (AString & str, const char * format, ...) FORMATSTRING(2,3);
|
extern AString & AppendPrintf (AString & str, const char * format, ...) FORMATSTRING(2, 3);
|
||||||
|
|
||||||
/// Split the string at any of the listed delimiters, return as a stringvector
|
/// Split the string at any of the listed delimiters, return as a stringvector
|
||||||
extern AStringVector StringSplit(const AString & str, const AString & delim);
|
extern AStringVector StringSplit(const AString & str, const AString & delim);
|
||||||
|
Loading…
Reference in New Issue
Block a user