1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-01 13:24:25 +01:00

Normalized line endings to unix (no bug).

This commit is contained in:
David Anderson 2009-02-16 17:43:55 -05:00
parent ee50d4adfc
commit 277a2a4966

View File

@ -421,7 +421,7 @@ bool LoadFromVDF(const char *file, bool &skipped)
int LoadVDFPluginsFromDir(const char *dir, int &skipped)
{
bool success, skip;
bool success, skip;
int total = 0;
char path[MAX_PATH];
@ -453,10 +453,10 @@ int LoadVDFPluginsFromDir(const char *dir, int &skipped)
do
{
g_SmmAPI.PathFormat(path, sizeof(path), "%s\\%s", dir, fd.cFileName);
success = LoadFromVDF(path, skip);
if (skip)
skipped++;
else if (success)
success = LoadFromVDF(path, skip);
if (skip)
skipped++;
else if (success)
total++;
} while (FindNextFile(hFind, &fd));
@ -485,10 +485,10 @@ int LoadVDFPluginsFromDir(const char *dir, int &skipped)
continue;
}
g_SmmAPI.PathFormat(path, sizeof(path), "%s/%s", dir, pEnt->d_name);
success = LoadFromVDF(path, skip);
if (skip)
skipped++;
else if (success)
success = LoadFromVDF(path, skip);
if (skip)
skipped++;
else if (success)
total++;
}
@ -669,24 +669,24 @@ int LoadPluginsFromFile(const char *filepath, int &skipped)
return total;
}
int LoadPlugins(const char *filepath, const char *vdfpath)
{
int total, skipped, fskipped, vskipped;
const char *s = "";
total = LoadPluginsFromFile(filepath, fskipped);
total += LoadVDFPluginsFromDir(vdfpath, vskipped);
skipped = fskipped + vskipped;
if (total == 0 || total > 1)
s = "s";
if (skipped)
LogMessage("[META] Loaded %d plugin%s (%d already loaded)", total, s, skipped);
else
LogMessage("[META] Loaded %d plugin%s.", total, s);
return total;
int LoadPlugins(const char *filepath, const char *vdfpath)
{
int total, skipped, fskipped, vskipped;
const char *s = "";
total = LoadPluginsFromFile(filepath, fskipped);
total += LoadVDFPluginsFromDir(vdfpath, vskipped);
skipped = fskipped + vskipped;
if (total == 0 || total > 1)
s = "s";
if (skipped)
LogMessage("[META] Loaded %d plugin%s (%d already loaded)", total, s, skipped);
else
LogMessage("[META] Loaded %d plugin%s.", total, s);
return total;
}
void LogMessage(const char *msg, ...)