diff options
author | nyamatongwe <unknown> | 2000-10-03 11:31:47 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2000-10-03 11:31:47 +0000 |
commit | a67e810e17bcb5db90f2f0f53b90533c23cee8ed (patch) | |
tree | 815fb27f2ecc79464f6cc75a56789d3a43babe3e /gtk/PlatGTK.cxx | |
parent | 57e0eed5ab57d6e2607a41a33336e26cd7f11202 (diff) | |
download | scintilla-mirror-a67e810e17bcb5db90f2f0f53b90533c23cee8ed.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; |