From 00d0a1f01acc2ca15096beeb9c423dbe593f3e27 Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 1 May 2010 20:36:42 +0000 Subject: [PATCH] Some more tabs and cleanup There was some code in FileUtils.h which was added in r232 (in 2005) to znc. It was already commented out back then which means it is commented out for 5 years already. I'm 99% sure we can safely remove that. :P git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1965 726aef4b-f618-498e-8847-2d620e286838 --- FileUtils.h | 40 ---------------------------------------- ZNCString.h | 12 ++++++------ defines.h | 4 ++-- 3 files changed, 8 insertions(+), 48 deletions(-) diff --git a/FileUtils.h b/FileUtils.h index 226e790c..e5e60cb6 100644 --- a/FileUtils.h +++ b/FileUtils.h @@ -160,46 +160,6 @@ public: return FillByWildcard(sDir, "*"); } -/* static bool Create(const CString& sDir, mode_t mode = 0755) { - VCCString vSubDirs = sDir.split("[/\\\\]+"); - CCString sCurDir; - - for (unsigned int a = 0; a < vSubDirs.size(); a++) { - sCurDir += vSubDirs[a] + "/"; - if ((!CDir::Exists(sCurDir)) && (mkdir(sCurDir.c_str(), mode) != 0)) { - return false; - } - } - - return true; - } - - int FillByRegex(const CCString& sDir, const CCString& sRegex, const CCString& sFlags = "") { - CleanUp(); - DIR* dir = opendir((sDir.empty()) ? "." : sDir.c_str()); - - if (!dir) { - return 0; - } - - struct dirent * de; - - while ((de = readdir(dir)) != 0) { - if ((strcmp(de->d_name, ".") == 0) || (strcmp(de->d_name, "..") == 0)) { - continue; - } - if ((!sRegex.empty()) && (!CCString::search(de->d_name, sRegex, sFlags))) { - continue; - } - - CFile *file = new CFile(sDir, de->d_name, this); - push_back(file); - } - - closedir(dir); - return size(); - }*/ - int FillByWildcard(const CString& sDir, const CString& sWildcard) { CleanUp(); DIR* dir = opendir((sDir.empty()) ? "." : sDir.c_str()); diff --git a/ZNCString.h b/ZNCString.h index 83c1e73d..3ced8428 100644 --- a/ZNCString.h +++ b/ZNCString.h @@ -30,14 +30,14 @@ using std::pair; class CString; class MCString; -typedef set SCString; -typedef set SPair; +typedef set SCString; +typedef set SPair; -typedef vector VCString; -typedef vector > VPair; +typedef vector VCString; +typedef vector > VPair; -typedef list LCString; -typedef list > LPair; +typedef list LCString; +typedef list > LPair; static const unsigned char XX = 0xff; static const unsigned char base64_table[256] = { diff --git a/defines.h b/defines.h index fc00bbf1..99f12893 100644 --- a/defines.h +++ b/defines.h @@ -22,8 +22,8 @@ #endif // Redefine some Csocket debugging mechanisms to use znc's -#define CS_DEBUG(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f) -#define PERROR(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f << ": " << strerror(GetSockError())) +#define CS_DEBUG(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f) +#define PERROR(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f << ": " << strerror(GetSockError())) #endif // !_DEFINES_H