Lines 1-12
Link Here
|
1 |
#include "FilePath.h" |
1 |
#include "FilePath.h" |
2 |
|
2 |
|
3 |
#include <stdio.h> |
3 |
#include <cstdio> |
|
|
4 |
#include <algorithm> |
4 |
|
5 |
|
5 |
#ifndef _WIN32 |
6 |
#ifndef _WIN32 |
6 |
#include <ctype.h> |
7 |
#include <cctype> |
7 |
#endif |
8 |
#endif |
8 |
|
9 |
|
9 |
|
|
|
10 |
KD_FilePath::KD_FilePath() : fileName("") , filePath(""), archiveName(""), archiveSuffix("") |
10 |
KD_FilePath::KD_FilePath() : fileName("") , filePath(""), archiveName(""), archiveSuffix("") |
11 |
{ |
11 |
{ |
12 |
} |
12 |
} |
Lines 165-172
Link Here
|
165 |
// (*not* the first one found scanning from left to right) |
165 |
// (*not* the first one found scanning from left to right) |
166 |
|
166 |
|
167 |
// the search is case-insensitive -> lower-casificator in action |
167 |
// the search is case-insensitive -> lower-casificator in action |
|
|
168 |
ToLower __tolower(std::locale::classic()); |
168 |
string copy_directory = directory; |
169 |
string copy_directory = directory; |
169 |
transform (copy_directory.begin(), copy_directory.end(), copy_directory.begin(), tolower); |
170 |
transform (copy_directory.begin(), copy_directory.end(), copy_directory.begin(), __tolower); |
170 |
|
171 |
|
171 |
map<string,T_ArchiveReaderFactory>::iterator suffix_iter= |
172 |
map<string,T_ArchiveReaderFactory>::iterator suffix_iter= |
172 |
KD_ArchiveManager::known_suffixes.begin(); |
173 |
KD_ArchiveManager::known_suffixes.begin(); |
Lines 271-276
Link Here
|
271 |
|
272 |
|
272 |
string KD_FilePath::GetFileExtension() const |
273 |
string KD_FilePath::GetFileExtension() const |
273 |
{ |
274 |
{ |
|
|
275 |
ToLower __tolower(std::locale::classic()); |
274 |
size_t pos = fileName.rfind('.'); |
276 |
size_t pos = fileName.rfind('.'); |
275 |
if (pos == fileName.npos) |
277 |
if (pos == fileName.npos) |
276 |
return ""; |
278 |
return ""; |
Lines 280-286
Link Here
|
280 |
for (unsigned int i=0; i<ext.size(); i++) |
282 |
for (unsigned int i=0; i<ext.size(); i++) |
281 |
ext[i] = tolower(ext[i]); |
283 |
ext[i] = tolower(ext[i]); |
282 |
*/ |
284 |
*/ |
283 |
transform (ext.begin(), ext.end(), ext.begin(), tolower); |
285 |
transform (ext.begin(), ext.end(), ext.begin(), __tolower); |
284 |
return ext; |
286 |
return ext; |
285 |
} |
287 |
} |
286 |
|
288 |
|