[Cmake-commits] [cmake-commits] king committed cmSystemTools.cxx 1.396 1.397 cmSystemTools.h 1.160 1.161
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jun 24 15:09:52 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17707/Source
Modified Files:
cmSystemTools.cxx cmSystemTools.h
Log Message:
ENH: Remove unused cmSystemTools::RemoveEscapes
The RemoveEscapes method is no longer used anywhere. All uses of it
have been replaced by a real lexer. We can remove the method.
Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.160
retrieving revision 1.161
diff -C 2 -d -r1.160 -r1.161
*** cmSystemTools.h 5 Jun 2009 16:01:29 -0000 1.160
--- cmSystemTools.h 24 Jun 2009 19:09:50 -0000 1.161
***************
*** 60,70 ****
///! Escape quotes in a string.
static std::string EscapeQuotes(const char* str);
!
! /**
! * Given a string, replace any escape sequences with the corresponding
! * characters.
! */
! static std::string RemoveEscapes(const char*);
!
typedef void (*ErrorCallback)(const char*, const char*, bool&, void*);
/**
--- 60,64 ----
///! Escape quotes in a string.
static std::string EscapeQuotes(const char* str);
!
typedef void (*ErrorCallback)(const char*, const char*, bool&, void*);
/**
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.396
retrieving revision 1.397
diff -C 2 -d -r1.396 -r1.397
*** cmSystemTools.cxx 5 Jun 2009 16:01:29 -0000 1.396
--- cmSystemTools.cxx 24 Jun 2009 19:09:50 -0000 1.397
***************
*** 236,281 ****
}
-
- std::string cmSystemTools::RemoveEscapes(const char* s)
- {
- std::string result = "";
- for(const char* ch = s; *ch; ++ch)
- {
- if(*ch == '\\' && *(ch+1) != ';')
- {
- ++ch;
- switch (*ch)
- {
- case '\\': result.insert(result.end(), '\\'); break;
- case '"': result.insert(result.end(), '"'); break;
- case ' ': result.insert(result.end(), ' '); break;
- case 't': result.insert(result.end(), '\t'); break;
- case 'n': result.insert(result.end(), '\n'); break;
- case 'r': result.insert(result.end(), '\r'); break;
- case '#': result.insert(result.end(), '#'); break;
- case '(': result.insert(result.end(), '('); break;
- case ')': result.insert(result.end(), ')'); break;
- case '0': result.insert(result.end(), '\0'); break;
- case '\0':
- {
- cmSystemTools::Error("Trailing backslash in argument:\n", s);
- return result;
- }
- default:
- {
- std::string chStr(1, *ch);
- cmSystemTools::Error("Invalid escape sequence \\", chStr.c_str(),
- "\nin argument ", s);
- }
- }
- }
- else
- {
- result.insert(result.end(), *ch);
- }
- }
- return result;
- }
-
void cmSystemTools::Error(const char* m1, const char* m2,
const char* m3, const char* m4)
--- 236,239 ----
More information about the Cmake-commits
mailing list