core/Translator.cpp
changeset 1406 f5c07ec3c052
parent 1352 4241c756c278
child 1621 ac5d4c68a99a
     1.1 --- a/core/Translator.cpp	Tue Sep 11 12:29:58 2007 +0000
     1.2 +++ b/core/Translator.cpp	Tue Sep 11 15:10:18 2007 +0000
     1.3 @@ -34,7 +34,6 @@
     1.4  #include <ctype.h>
     1.5  #include "Translator.h"
     1.6  #include "Logger.h"
     1.7 -#include "TextParsers.h"
     1.8  #include "LibrarySys.h"
     1.9  #include "sm_stringutil.h"
    1.10  #include "sourcemod.h"
    1.11 @@ -139,9 +138,9 @@
    1.12  
    1.13  	unsigned int line=0, col=0;
    1.14  
    1.15 -	if ((err=g_TextParser.ParseFile_SMC(path, this, &line, &col)) != SMCParse_Okay)
    1.16 +	if ((err=textparsers->ParseFile_SMC(path, this, &line, &col)) != SMCParse_Okay)
    1.17  	{
    1.18 -		const char *msg = g_TextParser.GetSMCErrorString(err);
    1.19 +		const char *msg = textparsers->GetSMCErrorString(err);
    1.20  		if (!msg)
    1.21  		{
    1.22  			msg = m_ParseError.c_str();
    1.23 @@ -271,7 +270,7 @@
    1.24  				} else if (*value == ',') {
    1.25  					/* Do nothing */
    1.26  				} else {
    1.27 -					unsigned int bytes = g_TextParser.GetUTF8CharBytes(value);
    1.28 +					unsigned int bytes = textparsers->GetUTF8CharBytes(value);
    1.29  					if (bytes != 1 || !isalpha(*value))
    1.30  					{
    1.31  						ParseWarning("Invalid token '%c' in #format property on line %d.", *value, m_CurLine);
    1.32 @@ -288,7 +287,7 @@
    1.33  						return SMCParse_Continue;
    1.34  					}
    1.35  				} else {
    1.36 -					unsigned int bytes = g_TextParser.GetUTF8CharBytes(value);
    1.37 +					unsigned int bytes = textparsers->GetUTF8CharBytes(value);
    1.38  					if (bytes != 1 || !isdigit(*value))
    1.39  					{
    1.40  						ParseWarning("Token '%c' in #format property on line %d is not a digit, phrase will be ignored.",
    1.41 @@ -521,7 +520,7 @@
    1.42  				unsigned int bytes;
    1.43  				while (*in_ptr != '\0')
    1.44  				{
    1.45 -					bytes = g_TextParser.GetUTF8CharBytes(in_ptr);
    1.46 +					bytes = textparsers->GetUTF8CharBytes(in_ptr);
    1.47  					if (bytes != 1)
    1.48  					{
    1.49  						goto scrap_point;
    1.50 @@ -809,9 +808,9 @@
    1.51  	/* Start anew */
    1.52  	SMCParseError err;
    1.53  	unsigned int line=0, col=0;
    1.54 -	if ((err=g_TextParser.ParseFile_SMC(lang_header_file, this, &line, &col)) != SMCParse_Okay)
    1.55 +	if ((err=textparsers->ParseFile_SMC(lang_header_file, this, &line, &col)) != SMCParse_Okay)
    1.56  	{
    1.57 -		const char *str_err = g_TextParser.GetSMCErrorString(err);
    1.58 +		const char *str_err = textparsers->GetSMCErrorString(err);
    1.59  		if (!str_err)
    1.60  		{
    1.61  			str_err = m_CustomError.c_str();