mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Enhancements
Fix dependency bug for compiling on some platforms. Add specifying port via environment variable. Add BacktoCN.list extracted from ConnersHua's original BakctoCN configuration.
This commit is contained in:
5 files changed
+109
-3
No files matched your search
@@ -320,6 +320,21 @@ std::vector<std::string> split(const std::string &s, const std::string &seperato
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string GetEnv(std::string name)
|
||||
{
|
||||
std::string retVal;
|
||||
#ifdef _WIN32
|
||||
char chrData[1024] = {};
|
||||
if(GetEnvironmentVariable(name.c_str(), chrData, 1023))
|
||||
retVal.assign(chrData);
|
||||
#else
|
||||
char *env = getenv(name.c_str());
|
||||
if(env != NULL)
|
||||
retVal.assign(env);
|
||||
#endif // _WIN32
|
||||
return retVal;
|
||||
}
|
||||
|
||||
std::string getSystemProxy()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in new issue
Block a user