Removed some amxmod compat stuff for now so this can actually compile and link properly again

This commit is contained in:
Scott Ehlert 2006-09-03 02:39:13 +00:00
parent 2905217607
commit 557958b408
5 changed files with 5 additions and 74 deletions

View File

@ -33,7 +33,6 @@
#include "amxmodx.h" #include "amxmodx.h"
#include "CLang.h" #include "CLang.h"
#include "format.h" #include "format.h"
#include "amxmod_compat.h"
#ifdef __linux__ #ifdef __linux__
#define _snprintf snprintf #define _snprintf snprintf
@ -288,23 +287,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
static char outbuf[4096]; static char outbuf[4096];
cell *addr = get_amxaddr(amx, params[parm++]); cell *addr = get_amxaddr(amx, params[parm++]);
if (amx->flags & AMX_FLAG_OLDFILE) len = atcprintf(outbuf, sizeof(outbuf)-1, addr, amx, params, &parm);
{
if (*addr & BCOMPAT_TRANSLATE_BITS)
{
const char *key, *def;
if (!translate_bcompat(amx, addr, &key, &def))
{
goto normal_string;
}
len = atcprintf(outbuf, sizeof(outbuf)-1, def, amx, params, &parm);
} else {
goto normal_string;
}
} else {
normal_string:
len = atcprintf(outbuf, sizeof(outbuf)-1, addr, amx, params, &parm);
}
return outbuf; return outbuf;
} }

View File

@ -1,6 +1,5 @@
#include "amxmodx.h" #include "amxmodx.h"
#include "format.h" #include "format.h"
#include "amxmod_compat.h"
//Adapted from Quake3's vsprintf //Adapted from Quake3's vsprintf
// thanks to cybermind for linking me to this :) // thanks to cybermind for linking me to this :)
@ -423,24 +422,6 @@ reswitch:
break; break;
case 's': case 's':
CHECK_ARGS(0); CHECK_ARGS(0);
if (amx->flags & AMX_FLAG_OLDFILE)
{
cell *addr = get_amxaddr(amx, params[arg]);
if (*addr & BCOMPAT_TRANSLATE_BITS)
{
const char *key, *def;
if (!translate_bcompat(amx, addr, &key, &def))
{
goto break_to_normal_string;
}
arg++;
size_t written = atcprintf(buf_p, llen, def, amx, params, &arg);
buf_p += written;
llen -= written;
break;
}
}
break_to_normal_string:
AddString(&buf_p, llen, get_amxaddr(amx, params[arg]), width, prec); AddString(&buf_p, llen, get_amxaddr(amx, params[arg]), width, prec);
arg++; arg++;
break; break;

View File

@ -628,7 +628,6 @@ void C_ServerDeactivate_Post()
g_xvars.clear(); g_xvars.clear();
g_plugins.clear(); g_plugins.clear();
ClearPluginLibraries(); ClearPluginLibraries();
ClearTransCache();
modules_callPluginsUnloaded(); modules_callPluginsUnloaded();
ClearMessages(); ClearMessages();

View File

@ -579,11 +579,6 @@ int set_amxnatives(AMX* amx, char error[128])
amx_Register(amx, vector_Natives, -1); amx_Register(amx, vector_Natives, -1);
amx_Register(amx, g_SortNatives, -1); amx_Register(amx, g_SortNatives, -1);
if (amx->flags & AMX_FLAG_OLDFILE)
{
amx_Register(amx, g_BcompatNatives, -1);
}
//we're not actually gonna check these here anymore //we're not actually gonna check these here anymore
amx->flags |= AMX_FLAG_PRENIT; amx->flags |= AMX_FLAG_PRENIT;

View File

@ -33,7 +33,6 @@
#include "amxmodx.h" #include "amxmodx.h"
#include "format.h" #include "format.h"
#include "binlog.h" #include "binlog.h"
#include "amxmod_compat.h"
const char* stristr(const char* str, const char* substr) const char* stristr(const char* str, const char* substr)
{ {
@ -116,21 +115,8 @@ extern "C" size_t get_amxstring_r(AMX *amx, cell amx_addr, char *destination, in
register char *dest = destination; register char *dest = destination;
char *start = dest; char *start = dest;
if ( (amx->flags & AMX_FLAG_OLDFILE) && while (maxlen-- && *source)
(*source & BCOMPAT_TRANSLATE_BITS) ) *dest++=(char)(*source++);
{
const char *def, *key;
if (!translate_bcompat(amx, source, &key, &def))
{
goto normal_string;
}
while (maxlen-- && *def)
*dest++=(*source++);
} else {
normal_string:
while (maxlen-- && *source)
*dest++=(char)(*source++);
}
*dest = '\0'; *dest = '\0';
@ -153,22 +139,9 @@ char *get_amxstring(AMX *amx, cell amx_addr, int id, int& len)
register char* dest = buffor[id]; register char* dest = buffor[id];
char* start = dest; char* start = dest;
if ( (amx->flags & AMX_FLAG_OLDFILE) && while ((*dest++=(char)(*source++)));
(*source & BCOMPAT_TRANSLATE_BITS) )
{
const char *def, *key;
if (!translate_bcompat(amx, source, &key, &def))
{
goto normal_string;
}
while ( (*dest++ = (*def++)) );
len = --dest - start;
} else {
normal_string:
while ((*dest++=(char)(*source++)));
len = --dest - start; len = --dest - start;
}
#if defined BINLOG_ENABLED #if defined BINLOG_ENABLED
if (g_binlog_level & 2) if (g_binlog_level & 2)