From 557958b4088a28381fb57b4fa3985c63b6a07b72 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Sun, 3 Sep 2006 02:39:13 +0000 Subject: [PATCH] Removed some amxmod compat stuff for now so this can actually compile and link properly again --- amxmodx/CLang.cpp | 19 +------------------ amxmodx/format.cpp | 19 ------------------- amxmodx/meta_api.cpp | 1 - amxmodx/modules.cpp | 5 ----- amxmodx/string.cpp | 35 ++++------------------------------- 5 files changed, 5 insertions(+), 74 deletions(-) diff --git a/amxmodx/CLang.cpp b/amxmodx/CLang.cpp index 0c0cba49..2a7263fb 100755 --- a/amxmodx/CLang.cpp +++ b/amxmodx/CLang.cpp @@ -33,7 +33,6 @@ #include "amxmodx.h" #include "CLang.h" #include "format.h" -#include "amxmod_compat.h" #ifdef __linux__ #define _snprintf snprintf @@ -288,23 +287,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len) static char outbuf[4096]; cell *addr = get_amxaddr(amx, params[parm++]); - if (amx->flags & AMX_FLAG_OLDFILE) - { - 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); - } + len = atcprintf(outbuf, sizeof(outbuf)-1, addr, amx, params, &parm); return outbuf; } diff --git a/amxmodx/format.cpp b/amxmodx/format.cpp index 441ab2c8..b2e788db 100644 --- a/amxmodx/format.cpp +++ b/amxmodx/format.cpp @@ -1,6 +1,5 @@ #include "amxmodx.h" #include "format.h" -#include "amxmod_compat.h" //Adapted from Quake3's vsprintf // thanks to cybermind for linking me to this :) @@ -423,24 +422,6 @@ reswitch: break; case 's': 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); arg++; break; diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index 9f859503..eb554a3d 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -628,7 +628,6 @@ void C_ServerDeactivate_Post() g_xvars.clear(); g_plugins.clear(); ClearPluginLibraries(); - ClearTransCache(); modules_callPluginsUnloaded(); ClearMessages(); diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index a0b638ac..54d5c3e0 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -578,11 +578,6 @@ int set_amxnatives(AMX* amx, char error[128]) amx_Register(amx, msg_Natives, -1); amx_Register(amx, vector_Natives, -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 amx->flags |= AMX_FLAG_PRENIT; diff --git a/amxmodx/string.cpp b/amxmodx/string.cpp index 5fbaad38..267f6aee 100755 --- a/amxmodx/string.cpp +++ b/amxmodx/string.cpp @@ -33,7 +33,6 @@ #include "amxmodx.h" #include "format.h" #include "binlog.h" -#include "amxmod_compat.h" 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; char *start = dest; - if ( (amx->flags & AMX_FLAG_OLDFILE) && - (*source & BCOMPAT_TRANSLATE_BITS) ) - { - 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++); - } + while (maxlen-- && *source) + *dest++=(char)(*source++); *dest = '\0'; @@ -153,22 +139,9 @@ char *get_amxstring(AMX *amx, cell amx_addr, int id, int& len) register char* dest = buffor[id]; char* start = dest; - if ( (amx->flags & AMX_FLAG_OLDFILE) && - (*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++))); + while ((*dest++=(char)(*source++))); - len = --dest - start; - } + len = --dest - start; #if defined BINLOG_ENABLED if (g_binlog_level & 2)