diff options
author | Oliver Schneider <oliver@assarbad.net> | 2017-11-22 22:54:49 +0300 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2017-11-22 22:54:49 +0300 |
commit | ea449d28c1582161a3007e8c168dd56b7ce867d3 (patch) | |
tree | 4d94cfd19d15a67549d095b3cc814e0b11ecaafe /common | |
parent | 05211c399e7385436053739df1424eb7411c67a1 (diff) |
Replaced own countof by the _countof from stdlib.h
Moved numerous headers out of stdafx.h so these won't cause unnecessary recompiles
Diffstat (limited to 'common')
-rw-r--r-- | common/commonhelpers.cpp | 2 | ||||
-rw-r--r-- | common/tracer.h | 4 | ||||
-rw-r--r-- | common/wds_constants.cpp | 6 | ||||
-rw-r--r-- | common/wds_constants.h | 53 |
4 files changed, 26 insertions, 39 deletions
diff --git a/common/commonhelpers.cpp b/common/commonhelpers.cpp index 48f94b5..6678dca 100644 --- a/common/commonhelpers.cpp +++ b/common/commonhelpers.cpp @@ -20,6 +20,8 @@ // #include "stdafx.h" +#include <common/mdexceptions.h> +#include <common/wds_constants.h> CString MyStrRetToString(const LPITEMIDLIST pidl, const STRRET *strret) { diff --git a/common/tracer.h b/common/tracer.h index d85bfa7..b50172f 100644 --- a/common/tracer.h +++ b/common/tracer.h @@ -23,11 +23,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // -// Author(s): - oliver -> http://windirstat.net/contact/oliver/ -// #ifndef __TRACER_H_VER__ -#define __TRACER_H_VER__ 2014012617 +#define __TRACER_H_VER__ 2017112219 #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif // Check for "#pragma once" support diff --git a/common/wds_constants.cpp b/common/wds_constants.cpp index 007e770..d8dda1e 100644 --- a/common/wds_constants.cpp +++ b/common/wds_constants.cpp @@ -17,14 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// Author(s): - oliver -> http://windirstat.net/contact/oliver/ -// #include "stdafx.h" #include "wds_constants.h" namespace wds { +#if 0 demangle_t translator_demangle_email[] = { { L'/', L'-' }, @@ -37,7 +36,7 @@ namespace wds { { L"Bernhard Seifert", 0, L"https://windirstat.net/contact/bernhard/", L"Creator of the project, original author" }, { L"Oliver Schneider", 0, L"https://windirstat.net/contact/oliver/", L"Project maintainer" }, - { L"Chris Wimmer", 0, L"http://sourceforge.net/users/dezipaitor", L"Contributor" }, + { L"Chris Wimmer", 0, L"https://sourceforge.net/users/dezipaitor", L"Contributor" }, { 0 }, }; @@ -178,4 +177,5 @@ namespace wds 0 /* end marker */ }, }; +#endif // 0 } diff --git a/common/wds_constants.h b/common/wds_constants.h index 966b6df..96e0066 100644 --- a/common/wds_constants.h +++ b/common/wds_constants.h @@ -20,38 +20,13 @@ // #ifndef __WDS_CONSTANTS_H_VER__ -#define __WDS_CONSTANTS_H_VER__ 2014021723 +#define __WDS_CONSTANTS_H_VER__ 2017112218 #if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__MCPP) #pragma once #endif // Check for "#pragma once" support namespace wds { - const size_t maxContacts = 5; - typedef struct _demangle_t - { - WCHAR from; - WCHAR to; - } demangle_t; - typedef struct _contact_t - { - LPWSTR name; - LPWSTR mail; - LPWSTR weburl; - LPWSTR description; - } contact_t; - typedef struct _translator_t - { - LCID id; - LPWSTR lngNative; - LPWSTR lngEnglish; - LPWSTR lngISO639_1; - contact_t translators[maxContacts]; - } translator_t; - extern translator_t translators[]; - extern contact_t authors[]; - extern demangle_t translator_demangle_email[]; - // Single character constants const TCHAR chrSharp = _T('#'); const TCHAR chrBracketOpen = _T('('); @@ -89,14 +64,26 @@ namespace wds const LPCTSTR strLangPrefix = _T(STR_RESOURCE_PREFIX); const LPCTSTR strInvalidAttributes = _T("??????"); - const LPCTSTR strAttributeReadonly = _T("R"); - const LPCTSTR strAttributeHidden = _T("H"); - const LPCTSTR strAttributeSystem = _T("S"); - const LPCTSTR strAttributeArchive = _T("A"); - const LPCTSTR strAttributeCompressed = _T("R"); - const LPCTSTR strAttributeEncrypted = _T("E"); + const LPCTSTR strAttributeReadonly = _T("R"); /*FILE_ATTRIBUTE_READONLY*/ + const LPCTSTR strAttributeHidden = _T("H"); /*FILE_ATTRIBUTE_HIDDEN*/ + const LPCTSTR strAttributeSystem = _T("S"); /*FILE_ATTRIBUTE_SYSTEM*/ + /* don't need FILE_ATTRIBUTE_DIRECTORY, directories are visualized in other ways */ + const LPCTSTR strAttributeArchive = _T("A"); /*FILE_ATTRIBUTE_ARCHIVE*/ + /* don't need FILE_ATTRIBUTE_DEVICE */ + /* don't need FILE_ATTRIBUTE_NORMAL */ + const LPCTSTR strAttributeTemporary = _T("T"); /*FILE_ATTRIBUTE_TEMPORARY*/ + const LPCTSTR strAttributeSparse = _T("~"); /*FILE_ATTRIBUTE_SPARSE_FILE*/ + const LPCTSTR strAttributeReparsePoint = _T("@"); /*FILE_ATTRIBUTE_REPARSE_POINT*/ + const LPCTSTR strAttributeCompressed = _T("C"); /*FILE_ATTRIBUTE_COMPRESSED*/ + const LPCTSTR strAttributeOffline = _T("_"); /*FILE_ATTRIBUTE_OFFLINE*/ + const LPCTSTR strAttributeNotContentIndexed = _T("i"); /*FILE_ATTRIBUTE_NOT_CONTENT_INDEXED*/ + const LPCTSTR strAttributeEncrypted = _T("E"); /*FILE_ATTRIBUTE_ENCRYPTED*/ + const LPCTSTR strAttributeIntegrityStream = _T("I"); /*FILE_ATTRIBUTE_INTEGRITY_STREAM*/ + const LPCTSTR strAttributeVirtual = _T("V"); /*FILE_ATTRIBUTE_VIRTUAL*/ + /* don't need FILE_ATTRIBUTE_NO_SCRUB_DATA */ + const LPCTSTR strAttributeEA = _T("+"); /*FILE_ATTRIBUTE_EA*/ - const int iLangCodeLength = 4; + const int iLangCodeLength = _countof(STR_RESOURCE_PREFIX); const int iNumDriveLetters = (chrCapZ - chrCapA) + 1; } |