My Project
Loading...
Searching...
No Matches
debug.cc
Go to the documentation of this file.
1/* emacs edit mode for this file is -*- C++ -*- */
2#include "globaldefs.h"
3
5VAR char * deb_level_msg = (char *)"";
6
8{
9 int i;
10
11 // deb_level == -1 iff we enter this function for the first time
12 if ( deb_level == -1 )
13 deb_level = 0;
14 else
15 delete [] deb_level_msg;
16
17 deb_level++;
18 deb_level_msg = new char[3*deb_level+1];
19 for ( i = 0; i < 3*deb_level; i++ )
20 deb_level_msg[i] = ' ';
21 deb_level_msg[3*deb_level] = '\0';
22}
23
25{
26 if ( deb_level > 0 ) {
27 int i;
28 deb_level--;
29 delete [] deb_level_msg;
30 deb_level_msg = new char[3*deb_level+1];
31 for ( i = 0; i < 3*deb_level; i++ )
32 deb_level_msg[i] = ' ';
33 deb_level_msg[3*deb_level] = '\0';
34 }
35}
int i
Definition: cfEzgcd.cc:132
VAR char * deb_level_msg
Definition: debug.cc:5
void deb_dec_level()
Definition: debug.cc:24
STATIC_VAR int deb_level
Definition: debug.cc:4
void deb_inc_level()
Definition: debug.cc:7
#define STATIC_VAR
Definition: globaldefs.h:7
#define VAR
Definition: globaldefs.h:5