SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
debug.cc
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2//! \file debug.cc Some internal debugging tools
3//
4// Copyright (c) 1991-2004 Petr Peringer
5//
6// This library is licensed under GNU Library GPL. See the file COPYING.
7//
8
9//
10// debugging facilities
11//
12
13
14////////////////////////////////////////////////////////////////////////////
15//
16// interface
17//
18
19#include "simlib.h"
20#include "internal.h"
21
22namespace simlib3 {
23
24////////////////////////////////////////////////////////////////////////////
25//
26// implementation
27//
28
30
31#ifndef NDEBUG
32unsigned long SIMLIB_debug_flag = 0UL; // default = no debugging
33#endif
34
35// start debugging
36void DebugON()
37{
38 Debug(~0UL);
39}
40
41// stop debugging
43{
44 Debug(0UL);
45}
46
47// set debug mode flag
48unsigned long Debug(unsigned long mode)
49{
50#ifdef NDEBUG
52 return 0;
53#else
54 unsigned long tmp = SIMLIB_debug_flag;
55 SIMLIB_debug_flag = mode;
56 return tmp;
57#endif
58}
59
60}
61// end
62
@ NoDebugErr
Definition: errors.h:87
Internal header file for SIMLIB/C++.
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
Definition: algloop.cc:32
void DebugOFF()
stop debugging output
Definition: debug.cc:42
SIMLIB_IMPLEMENTATION
Definition: algloop.cc:34
void DebugON()
start debugging output
Definition: debug.cc:36
unsigned long Debug(unsigned long mode)
Definition: debug.cc:48
unsigned long SIMLIB_debug_flag
Definition: debug.cc:32
void SIMLIB_warning(const enum _ErrEnum N)
print warning message and continue
Definition: error.cc:74
Main SIMLIB/C++ interface.