// Substitutes spaces with underscores in filename (and path)
string QuoteName(string const & name)
{
-#ifdef WITH_WARNINGS
-#warning Add proper emx support here!
-#endif
+ // CHECK Add proper emx support here!
#ifndef __EMX__
return '\'' + name + '\'';
#else
bool PutEnv(string const & envstr)
{
-#ifdef WITH_WARNINGS
-#warning Look at and fix this.
-#endif
+ // CHECK Look at and fix this.
// f.ex. what about error checking?
#if HAVE_PUTENV
// this leaks, but what can we do about it?
if (!regexMatch(copy1, RegExp)) {
// No EndChar inside. So we are finished
result1 += CompareString + result0;
- result0.clear();
+ result0.erase();
continue;
}
Strips path off if no_path == true.
If no extension on oldname, just appends.
*/
-string ChangeExtension(string const & oldname, string const & extension,
- bool no_path)
+string ChangeExtension(string const & oldname, string const & extension)
{
string::size_type last_slash = oldname.rfind('/');
string::size_type last_dot = oldname.rfind('.');
ext= '.' + extension;
else
ext = extension;
- string ret_str;
- if (no_path && last_slash != string::npos) {
- ++last_slash; // step it
- ret_str = oldname.substr(last_slash,
- last_dot - last_slash) + ext;
- } else
- ret_str = oldname.substr(0, last_dot) + ext;
- return CleanupPath(ret_str);
+
+ return CleanupPath(oldname.substr(0, last_dot) + ext);
}