1.1 --- a/core-legacy/sourcemm.cpp Mon Feb 16 15:52:46 2009 -0500
1.2 +++ b/core-legacy/sourcemm.cpp Mon Feb 16 17:43:55 2009 -0500
1.3 @@ -421,7 +421,7 @@
1.4
1.5 int LoadVDFPluginsFromDir(const char *dir, int &skipped)
1.6 {
1.7 - bool success, skip;
1.8 + bool success, skip;
1.9 int total = 0;
1.10 char path[MAX_PATH];
1.11
1.12 @@ -453,10 +453,10 @@
1.13 do
1.14 {
1.15 g_SmmAPI.PathFormat(path, sizeof(path), "%s\\%s", dir, fd.cFileName);
1.16 - success = LoadFromVDF(path, skip);
1.17 - if (skip)
1.18 - skipped++;
1.19 - else if (success)
1.20 + success = LoadFromVDF(path, skip);
1.21 + if (skip)
1.22 + skipped++;
1.23 + else if (success)
1.24 total++;
1.25 } while (FindNextFile(hFind, &fd));
1.26
1.27 @@ -485,10 +485,10 @@
1.28 continue;
1.29 }
1.30 g_SmmAPI.PathFormat(path, sizeof(path), "%s/%s", dir, pEnt->d_name);
1.31 - success = LoadFromVDF(path, skip);
1.32 - if (skip)
1.33 - skipped++;
1.34 - else if (success)
1.35 + success = LoadFromVDF(path, skip);
1.36 + if (skip)
1.37 + skipped++;
1.38 + else if (success)
1.39 total++;
1.40 }
1.41
1.42 @@ -669,24 +669,24 @@
1.43 return total;
1.44 }
1.45
1.46 -int LoadPlugins(const char *filepath, const char *vdfpath)
1.47 -{
1.48 - int total, skipped, fskipped, vskipped;
1.49 - const char *s = "";
1.50 -
1.51 - total = LoadPluginsFromFile(filepath, fskipped);
1.52 - total += LoadVDFPluginsFromDir(vdfpath, vskipped);
1.53 - skipped = fskipped + vskipped;
1.54 -
1.55 - if (total == 0 || total > 1)
1.56 - s = "s";
1.57 -
1.58 - if (skipped)
1.59 - LogMessage("[META] Loaded %d plugin%s (%d already loaded)", total, s, skipped);
1.60 - else
1.61 - LogMessage("[META] Loaded %d plugin%s.", total, s);
1.62 -
1.63 - return total;
1.64 +int LoadPlugins(const char *filepath, const char *vdfpath)
1.65 +{
1.66 + int total, skipped, fskipped, vskipped;
1.67 + const char *s = "";
1.68 +
1.69 + total = LoadPluginsFromFile(filepath, fskipped);
1.70 + total += LoadVDFPluginsFromDir(vdfpath, vskipped);
1.71 + skipped = fskipped + vskipped;
1.72 +
1.73 + if (total == 0 || total > 1)
1.74 + s = "s";
1.75 +
1.76 + if (skipped)
1.77 + LogMessage("[META] Loaded %d plugin%s (%d already loaded)", total, s, skipped);
1.78 + else
1.79 + LogMessage("[META] Loaded %d plugin%s.", total, s);
1.80 +
1.81 + return total;
1.82 }
1.83
1.84 void LogMessage(const char *msg, ...)