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