-
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 'tf/LH-32v8/introduce-funcguard-category-setup'
* tf/LH-32v8/introduce-funcguard-category-setup: funcguard: add Scintilla DllMain guard funcguard: add PowerEditor WinMain.cpp guards scintilla: add funcguard category setup common: make npp_debug common and add to Scintilla powereditor: introduce funcguard category setup [#32] Signed-off-by: Thell Fowler <git@tbfowler.name>
- Loading branch information
Showing
20 changed files
with
648 additions
and
27 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
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,4 @@ | ||
FuncGuards.h | ||
# Ignore developer's private funcguards templates | ||
Templates/ | ||
*.tmp |
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,62 @@ | ||
// This file is part of Notepad++ Community Release's FuncGuard project. | ||
// Copyright (C)2009 The Notepad++ Community | ||
// | ||
// 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. | ||
|
||
#include "precompiled_headers.h" | ||
#include "MISC/Debug/FuncGuards.h" | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// This source enables/disables all functions guards based on whether or not | ||
// the NPPCR_GUARD_... macro is defined in FuncGuards.h | ||
// | ||
// When new functions guards are created they should be added to this file | ||
// in alphabetical order. | ||
// | ||
// | ||
// IT IS RECOMMENDED TO USE THE POWERSHELL FUNCGUARD MODULE TO KEEP THE RELATED | ||
// FILES IN SYNCH AND PROPERLY ORDERED! | ||
// | ||
// | ||
// Any desired documentation for the function guard belongs in FuncGuards.h | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
/* | ||
Usage: | ||
The entries in this file need to remain between the block start and block | ||
end statements. | ||
All entries need to follow the format and have a blank line above and below | ||
the entry: | ||
#ifdef FUNCGUARD_PREFIX_GUARDNAME | ||
func_guard_enable_cat(guardName); | ||
#else | ||
func_guard_disable_cat(guardName); | ||
#endif | ||
*/ | ||
|
||
// FUNCGUARD_BLOCK_START << Do not alter or remove | ||
|
||
#ifdef FUNCGUARD_NPPCR_WINMAIN | ||
func_guard_enable_cat(guardWinMain); | ||
#else | ||
func_guard_disable_cat(guardWinMain); | ||
#endif | ||
|
||
// FUNCGUARD_BLOCK_END << Do not alter or remove |
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,58 @@ | ||
// This file is part of Notepad++ Community Release's FuncGuard project. | ||
// Copyright (C)2009 The Notepad++ Community | ||
// | ||
// 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. | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// All function guards should be listed here to make them available in any | ||
// source. The simplest method is by using the precompiled headers. | ||
// | ||
// When new functions guards are created they should be added to this file | ||
// in alphabetical order. | ||
// | ||
// | ||
// IT IS RECOMMENDED TO USE THE POWERSHELL FUNCGUARD MODULE TO KEEP THE RELATED | ||
// FILES IN SYNCH AND PROPERLY ORDERED! | ||
// | ||
// | ||
// Any desired documentation for the function guard belongs in FuncGuards.h | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
/* | ||
Usage: | ||
- Entries in this file need to remain between the '#ifndef' and '#endif' | ||
statements for FUNCGUARDIMPORT and should have no spacing between the | ||
entries. | ||
Example: | ||
#ifndef MISC_DEBUG_FUNCGUARDIMPORT_H | ||
#define MISC_DEBUG_FUNCGUARDIMPORT_H | ||
func_guard_import_cat(guardClass1); | ||
func_guard_import_cat(guardClass1Class2_Communications); | ||
func_guard_import_cat(guardClass2); | ||
#endif // MISC_DEBUG_FUNCGUARDS_H | ||
*/ | ||
|
||
#ifndef MISC_DEBUG_FUNCGUARDIMPORT_H | ||
#define MISC_DEBUG_FUNCGUARDIMPORT_H | ||
|
||
func_guard_import_cat(guardWinMain); | ||
|
||
#endif // 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// This file is part of Notepad++ Community Release's FuncGuard project. | ||
// Copyright (C)2009 The Notepad++ Community | ||
// | ||
// 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. | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Uncomment/Comment out the desired guard definitions to enable/disable. Use | ||
// the provided func_guard() statement in the functions you want to trace. | ||
// | ||
// When new functions guards are created they should be added to this file | ||
// in alphabetical order. | ||
// | ||
// | ||
// IT IS RECOMMENDED TO USE THE POWERSHELL FUNCGUARD MODULE TO KEEP THE RELATED | ||
// FILES IN SYNCH AND PROPERLY ORDERED! | ||
// | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
/* | ||
Usage: | ||
This skeleton file should be copied to FuncGuards.h by a pre-build event when | ||
FuncGuards.h doesn't exist. It serves as your projects 'tracked' version of | ||
available function guards. | ||
ALL FUNCTION GUARDS SHOULD BE DISABLED (commented out) IN THIS FILE | ||
Notes: | ||
- Every define and usage needs to start with '//' | ||
- Cat is CamelCase with '_' spacing between either the filename or major | ||
class category followed by a subclass or particular function area if | ||
needed. | ||
- This is the validation regex used by the Powershell FuncGuard module: | ||
$Name -cmatch "^(\p{Lu}\p{Ll}+)+($|_((\p{Lu}\p{Ll}+)|\d)+|\d+)+$" | ||
- Entries in this file need to remain between the '#ifndef SHIPPING' and | ||
'#endif // SHIPPING' statements and should have a single line before and | ||
after the entry. | ||
- The format of the entries need to follow one of the following two | ||
examples: | ||
*/ | ||
|
||
// func_guard(guardClass1); | ||
// Description: Used in tracing functions in the Class1 class. | ||
// #define FUNCGUARD_PSUNIT_CLASS1 | ||
|
||
// func_guard(guardClass1Class2_Communications); | ||
// Description: For tracing TestGuard1 and TestGuard2 communication. | ||
/* | ||
This enables tracing of _only_ the communication functions of the | ||
TestGuard1 and TestGuard2 classes. | ||
Modify the local function area to filter messages, to output use: | ||
func_guard_debugf_cat(guardTestGuard_MultiClass); | ||
Enable by adding to the current func_guard(#cat) statement. | ||
example: func_guard(guardClass1 | guardClass1Class2_Communications); | ||
If both TestGuard1 and TestGuard2 are active then enabling this is not | ||
needed, but doesn't hurt anything. | ||
*/ | ||
// #define FUNCGUARD_PSUNIT_CLASS1CLASS2_COMMUNICATIONS | ||
|
||
#ifndef MISC_DEBUG_FUNCGUARD_H | ||
#define MISC_DEBUG_FUNCGUARD_H | ||
|
||
#ifndef SHIPPING | ||
|
||
// func_guard(guardWinMain); | ||
// Description: Function tracing in WinMain.cpp | ||
//#define FUNCGUARD_NPPCR_WINMAIN | ||
|
||
#endif // SHIPPING | ||
#endif // MISC_DEBUG_FUNCGUARD_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
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.