Add some basic tests for encoding detection and conversion
[geany-mirror.git] / scintilla / src / Debugging.h
blob5221ff8e34f6471de8523c722224d37e4a7442d4
1 // Scintilla source code edit control
2 /** @file Debugging.h
3 ** Assert and debug trace functions.
4 ** Implemented in each platform layer.
5 **/
6 // Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
7 // The License.txt file describes the conditions under which this software may be distributed.
9 #ifndef DEBUGGING_H
10 #define DEBUGGING_H
12 namespace Scintilla::Internal {
14 #if defined(__clang__)
15 # if __has_feature(attribute_analyzer_noreturn)
16 # define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
17 # else
18 # define CLANG_ANALYZER_NORETURN
19 # endif
20 #else
21 # define CLANG_ANALYZER_NORETURN
22 #endif
24 /**
25 * Platform namespace used to segregate debugging functions.
27 namespace Platform {
29 void DebugDisplay(const char *s) noexcept;
30 void DebugPrintf(const char *format, ...) noexcept;
31 bool ShowAssertionPopUps(bool assertionPopUps_) noexcept;
32 void Assert(const char *c, const char *file, int line) noexcept CLANG_ANALYZER_NORETURN;
36 #ifdef NDEBUG
37 #define PLATFORM_ASSERT(c) ((void)0)
38 #else
39 #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Internal::Platform::Assert(#c, __FILE__, __LINE__))
40 #endif
44 #endif