diff options
| author | nyamatongwe <devnull@localhost> | 2000-10-03 11:31:47 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2000-10-03 11:31:47 +0000 |
| commit | 036b89d5335618318ea2ad575d397b5e146ae2d9 (patch) | |
| tree | 815fb27f2ecc79464f6cc75a56789d3a43babe3e /gtk/PlatGTK.cxx | |
| parent | bf47b7f563c0eca28b8555c0b6bdfcfe70a659ac (diff) | |
| download | scintilla-mirror-036b89d5335618318ea2ad575d397b5e146ae2d9.tar.gz | |
Added PLATFORM_ASSERT which is a verson of the standard assert which
can be directed wither to debug output or message boxes on Windows.
Diffstat (limited to 'gtk/PlatGTK.cxx')
| -rw-r--r-- | gtk/PlatGTK.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index f9141255e..5276d75f2 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -864,6 +864,21 @@ void Platform::DebugPrintf(const char *, ...) { } #endif +// Not supported for GTK+ +static bool assertionPopUps = true; + +void Platform::ShowAssertionPopUps(bool assertionPopUps_) { + assertionPopUps = assertionPopUps_; +} + +void Platform::Assert(const char *c, const char *file, int line) { + char buffer[2000]; + sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); + strcat(buffer, "\r\n"); + Platform::DebugDisplay(buffer); + abort(); +} + int Platform::Clamp(int val, int minVal, int maxVal) { if (val > maxVal) val = maxVal; |
