Core/Cleanup: Drop various unused code
This commit is contained in:
@@ -1755,38 +1755,6 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* const* linkTypes,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char const *fmtstring(char const *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
#define MAX_FMT_STRING 32000
|
||||
static char temp_buffer[MAX_FMT_STRING];
|
||||
static char string[MAX_FMT_STRING];
|
||||
static int index = 0;
|
||||
char *buf;
|
||||
int len;
|
||||
|
||||
va_start(argptr, format);
|
||||
vsnprintf(temp_buffer,MAX_FMT_STRING, format, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
len = strlen(temp_buffer);
|
||||
|
||||
if (len >= MAX_FMT_STRING)
|
||||
return "ERROR";
|
||||
|
||||
if (len + index >= MAX_FMT_STRING-1)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
|
||||
buf = &string[index];
|
||||
memcpy(buf, temp_buffer, len+1);
|
||||
|
||||
index += len + 1;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
GameObject* ChatHandler::GetNearbyGameObject()
|
||||
{
|
||||
if (!m_session)
|
||||
|
||||
@@ -402,7 +402,4 @@ class CliHandler : public ChatHandler
|
||||
Print* m_print;
|
||||
};
|
||||
|
||||
char const *fmtstring(char const *format, ...);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user