| 72 | } |
| 73 | |
| 74 | string getEnvVar(const string& key) { |
| 75 | #if defined(OS_WIN) |
| 76 | DWORD bufSize = |
| 77 | 32767; // limit according to GetEnvironment Variable documentation |
| 78 | string retVal; |
| 79 | retVal.resize(bufSize); |
| 80 | bufSize = GetEnvironmentVariable(key.c_str(), &retVal[0], bufSize); |
| 81 | if (!bufSize) { |
| 82 | return string(""); |
| 83 | } else { |
| 84 | retVal.resize(bufSize); |
| 85 | return retVal; |
| 86 | } |
| 87 | #else |
| 88 | char* str = getenv(key.c_str()); |
| 89 | return str == NULL ? string("") : string(str); |
| 90 | #endif |
| 91 | } |
| 92 | |
| 93 | const char* getName(af_dtype type) { |
| 94 | switch (type) { |
no outgoing calls
no test coverage detected