Rework build pathname functions (#422)

* Rework build_pathname* functions

* Replace old platform defines with the new ones

* Correct usage of build_pathname_r()

* Fix inconsistencies (white spaces)

* Remove useless defines
This commit is contained in:
Karol Szuster
2017-03-11 19:26:25 +01:00
committed by Vincent Herbet
parent fa3d28872e
commit 9551c70c59
13 changed files with 688 additions and 734 deletions

View File

@@ -17,7 +17,7 @@
static int g_ident = 0;
SqlFunctions g_SqliteFuncs =
SqlFunctions g_SqliteFuncs =
{
&g_Sqlite,
SetMysqlAffinity,
@@ -69,7 +69,7 @@ void OnAmxxAttach()
MF_OverrideNatives(g_OldCompatNatives, MODULE_NAME);
char path[255];
MF_BuildPathnameR(path, sizeof(path)-1, "%s/sqlite3", MF_GetLocalInfo("amxx_datadir", "addons/amxmodx/data"));
MF_BuildPathnameR(path, sizeof(path), "%s/sqlite3", MF_GetLocalInfo("amxx_datadir", "addons/amxmodx/data"));
if (!DirExists(path))
{
mkdir(path
@@ -96,4 +96,3 @@ void OnPluginsUnloaded()
extern "C" void __cxa_pure_virtual(void)
{
}