michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef NSDEFS_H michael@0: #define NSDEFS_H michael@0: michael@0: #include michael@0: michael@0: #ifdef _DEBUG michael@0: #define BREAK_TO_DEBUGGER DebugBreak() michael@0: #else michael@0: #define BREAK_TO_DEBUGGER michael@0: #endif michael@0: michael@0: #ifdef _DEBUG michael@0: #define VERIFY(exp) if (!(exp)) { GetLastError(); BREAK_TO_DEBUGGER; } michael@0: #else // !_DEBUG michael@0: #define VERIFY(exp) (exp) michael@0: #endif // !_DEBUG michael@0: michael@0: // NSPR Win32 modules: michael@0: // nsWindow, nsSound, and nsClipboard michael@0: // michael@0: // Logging can be changed at runtime without recompiling in the General michael@0: // property page of Visual Studio under the "Environment" property. michael@0: // michael@0: // Two variables are of importance to be set: michael@0: // NSPR_LOG_MODULES and NSPR_LOG_FILE michael@0: // michael@0: // NSPR_LOG_MODULES: michael@0: // NSPR_LOG_MODULES=all:5 (To log everything completely) michael@0: // NSPR_LOG_MODULES=nsWindow:5,nsSound:5,nsClipboard:5 michael@0: // (To log windows widget stuff) michael@0: // NSPR_LOG_MODULES= (To turn off logging) michael@0: // michael@0: // NSPR_LOG_FILE: michael@0: // NSPR_LOG_FILE=C:\nsprlog.txt (To a file on disk) michael@0: // NSPR_LOG_FILE=WinDebug (To the debug window) michael@0: // NSPR_LOG_FILE= (To stdout/stderr) michael@0: michael@0: #endif // NSDEFS_H michael@0: michael@0: