Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/hostext/PluginLoader.cpp @ 75:0f8524203677
* doc updates
author | cannam |
---|---|
date | Thu, 07 Jun 2007 13:56:26 +0000 |
parents | 6d16c376fd2f |
children | 6bf198e06d72 |
comparison
equal
deleted
inserted
replaced
74:64d45f526afc | 75:0f8524203677 |
---|---|
38 #include "PluginLoader.h" | 38 #include "PluginLoader.h" |
39 #include "PluginInputDomainAdapter.h" | 39 #include "PluginInputDomainAdapter.h" |
40 #include "PluginChannelAdapter.h" | 40 #include "PluginChannelAdapter.h" |
41 | 41 |
42 #include <fstream> | 42 #include <fstream> |
43 #include <cctype> // tolower | |
43 | 44 |
44 #ifdef _WIN32 | 45 #ifdef _WIN32 |
45 | 46 |
46 #include <windows.h> | 47 #include <windows.h> |
47 #include <tchar.h> | 48 #include <tchar.h> |
214 if (libraryName != "") { | 215 if (libraryName != "") { |
215 // libraryName is lowercased and lacking an extension, | 216 // libraryName is lowercased and lacking an extension, |
216 // as it came from the plugin key | 217 // as it came from the plugin key |
217 string temp = *fi; | 218 string temp = *fi; |
218 for (size_t i = 0; i < temp.length(); ++i) { | 219 for (size_t i = 0; i < temp.length(); ++i) { |
219 temp[i] = std::tolower(temp[i]); | 220 temp[i] = tolower(temp[i]); |
220 } | 221 } |
221 string::size_type pi = temp.find('.'); | 222 string::size_type pi = temp.find('.'); |
222 if (pi == string::npos) { | 223 if (pi == string::npos) { |
223 if (libraryName != temp) continue; | 224 if (libraryName != temp) continue; |
224 } else { | 225 } else { |
273 | 274 |
274 li = basename.find('.'); | 275 li = basename.find('.'); |
275 if (li != string::npos) basename = basename.substr(0, li); | 276 if (li != string::npos) basename = basename.substr(0, li); |
276 | 277 |
277 for (size_t i = 0; i < basename.length(); ++i) { | 278 for (size_t i = 0; i < basename.length(); ++i) { |
278 basename[i] = std::tolower(basename[i]); | 279 basename[i] = tolower(basename[i]); |
279 } | 280 } |
280 | 281 |
281 return basename + ":" + identifier; | 282 return basename + ":" + identifier; |
282 } | 283 } |
283 | 284 |