Loading...
Searching...
No Matches
debug.cc
Go to the documentation of this file.
/* emacs edit mode for this file is -*- C++ -*- */
#include "globaldefs.h"
STATIC_VAR int deb_level = -1;
VAR char * deb_level_msg = (char *)"";
void deb_inc_level()
{
int i;
// deb_level == -1 iff we enter this function for the first time
if ( deb_level == -1 )
deb_level = 0;
else
delete [] deb_level_msg;
deb_level++;
deb_level_msg = new char[3*deb_level+1];
for ( i = 0; i < 3*deb_level; i++ )
deb_level_msg[i] = ' ';
deb_level_msg[3*deb_level] = '\0';
}
void deb_dec_level()
{
if ( deb_level > 0 ) {
int i;
deb_level--;
delete [] deb_level_msg;
deb_level_msg = new char[3*deb_level+1];
for ( i = 0; i < 3*deb_level; i++ )
deb_level_msg[i] = ' ';
deb_level_msg[3*deb_level] = '\0';
}
}
i
int i
Definition cfEzgcd.cc:132
deb_level_msg
VAR char * deb_level_msg
Definition debug.cc:5
deb_dec_level
void deb_dec_level()
Definition debug.cc:24
deb_level
STATIC_VAR int deb_level
Definition debug.cc:4
deb_inc_level
void deb_inc_level()
Definition debug.cc:7
globaldefs.h
STATIC_VAR
#define STATIC_VAR
Definition globaldefs.h:7
VAR
#define VAR
Definition globaldefs.h:5