Mercurial > hg > vampy
comparison PyPlugScanner.cpp @ 120:a38d318c85a9 tip
MSVC fixes
author | Chris Cannam |
---|---|
date | Wed, 18 Dec 2019 16:51:20 +0000 |
parents | a9e918adfff0 |
children |
comparison
equal
deleted
inserted
replaced
119:e1d65734d953 | 120:a38d318c85a9 |
---|---|
17 #include <algorithm> | 17 #include <algorithm> |
18 #include <cstdlib> | 18 #include <cstdlib> |
19 //#include "vamp-hostsdk/PluginHostAdapter.h" | 19 //#include "vamp-hostsdk/PluginHostAdapter.h" |
20 | 20 |
21 #ifdef _WIN32 | 21 #ifdef _WIN32 |
22 // We should be using the unicode apis, but we're not (yet) | |
23 #undef UNICODE | |
24 #undef _UNICODE | |
25 #define _MBCS 1 | |
22 #include <windows.h> | 26 #include <windows.h> |
23 #include <tchar.h> | 27 #include <tchar.h> |
24 #define pathsep ("\\") | 28 #define pathsep ("\\") |
25 #else | 29 #else |
26 #include <dirent.h> | 30 #include <dirent.h> |
383 f < envPath.length()) { | 387 f < envPath.length()) { |
384 envPath.replace(f, 5, home); | 388 envPath.replace(f, 5, home); |
385 } | 389 } |
386 } | 390 } |
387 #ifdef _WIN32 | 391 #ifdef _WIN32 |
388 char *cpfiles = getenv("ProgramFiles"); | 392 const char *cpfiles = getenv("ProgramFiles"); |
389 if (!cpfiles) cpfiles = "C:\\Program Files"; | 393 if (!cpfiles) cpfiles = "C:\\Program Files"; |
390 std::string pfiles(cpfiles); | 394 std::string pfiles(cpfiles); |
391 std::string::size_type f; | 395 std::string::size_type f; |
392 while ((f = envPath.find("%ProgramFiles%")) != std::string::npos && | 396 while ((f = envPath.find("%ProgramFiles%")) != std::string::npos && |
393 f < envPath.length()) { | 397 f < envPath.length()) { |