-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jl/LH-8v4/introduce-debug-guards' into next
* jl/LH-8v4/introduce-debug-guards: common.h: split generic tchar defines from common functions testNppDebug.cpp: add tests for guard debug statements npp_debug.h: add guard_debugf_cat() controlled by guard state gitignore: do not ignore PowerEditor/MISC/Debug Debug output: improve output performance and design Debug guards: add documentation Debug guards: add a way to enable / disable per category Debug function guards: implement the guard. * Merge note: When merging a few manual changes are needed to ensure that common generic and DEFAULT_NO_CASE are properly handled. Conflicts: PowerEditor/src/MISC/Common/Common.h PowerEditor/src/precompiled_headers.h PowerEditor/visual.net/notepadPlus.9.vcproj [#8] Signed-off-by: Thell Fowler <git@tbfowler.name>
- Loading branch information
Showing
10 changed files
with
895 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ Thumbs.db | |
*.suo | ||
*.tlb | ||
*.tlh | ||
*.tmp_* | ||
*.bak | ||
*.cache | ||
*.ilk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
!PowerEditor/src/MISC/Debug/ | ||
PowerEditor/src/MISC/Debug/FuncGuards.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
//this file is part of notepad++ | ||
//Copyright (C)2003 Don HO ( donho@altern.org ) | ||
// | ||
//This program is free software; you can redistribute it and/or | ||
//modify it under the terms of the GNU General Public License | ||
//as published by the Free Software Foundation; either | ||
//version 2 of the License, or (at your option) any later version. | ||
// | ||
//This program is distributed in the hope that it will be useful, | ||
//but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
//GNU General Public License for more details. | ||
// | ||
//You should have received a copy of the GNU General Public License | ||
//along with this program; if not, write to the Free Software | ||
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
|
||
#ifndef MISC_COMMON_COMMONGENERICS_H | ||
#define MISC_COMMON_COMMONGENERICS_H | ||
|
||
#define CP_ANSI_LATIN_1 1252 | ||
#define CP_BIG5 950 | ||
|
||
#ifdef UNICODE | ||
#define NppMainEntry wWinMain | ||
#define generic_strtol wcstol | ||
#define generic_strncpy(dest, src, size_d) wcsncpy_s(dest, size_d, src, _TRUNCATE) | ||
#define generic_stricmp _wcsicmp | ||
#define generic_strncmp wcsncmp | ||
#define generic_strnicmp _wcsnicmp | ||
#define generic_strncat wcsncat | ||
#define generic_strchr wcschr | ||
#define generic_atoi _wtoi | ||
#define generic_itoa _itow_s | ||
#define generic_atof _wtof | ||
#define generic_strtok wcstok_s | ||
#define generic_strftime wcsftime | ||
#define generic_fprintf fwprintf | ||
#define generic_sscanf swscanf_s | ||
#define generic_fopen(pFile, filename, mode) if(_wfopen_s(&pFile, filename, mode) != 0){pFile = NULL;} | ||
#define generic_fgets fgetws | ||
#define generic_stat _wstat | ||
#define generic_sprintf swprintf | ||
#define COPYDATA_FILENAMES COPYDATA_FILENAMESW | ||
#else | ||
#define NppMainEntry WinMain | ||
#define generic_strtol strtol | ||
#define generic_strncpy(dest, src, size_d) strncpy_s(dest, size_d, src, _TRUNCATE) | ||
#define generic_stricmp _stricmp | ||
#define generic_strncmp strncmp | ||
#define generic_strnicmp _strnicmp | ||
#define generic_strncat strncat | ||
#define generic_strchr strchr | ||
#define generic_atoi atoi | ||
#define generic_itoa _itoa_s | ||
#define generic_atof atof | ||
#define generic_strtok strtok_s | ||
#define generic_strftime strftime | ||
#define generic_fprintf fprintf | ||
#define generic_sscanf sscanf_s | ||
#define generic_fopen(pFile, filename, mode) if(fopen_s(&pFile, filename, mode) != 0){pFile = NULL;} | ||
#define generic_fgets fgets | ||
#define generic_stat _stat | ||
#define generic_sprintf sprintf | ||
#define COPYDATA_FILENAMES COPYDATA_FILENAMESA | ||
#endif | ||
|
||
typedef std::basic_string<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > generic_string; | ||
|
||
#endif // MISC_COMMON_COMMONGENERICS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.