source: git/factory/debug.cc @ 8d9226

spielwiese
Last change on this file since 8d9226 was aef6ab, checked in by Jens Schmidt <schmidt@…>, 27 years ago
Initial revision git-svn-id: file:///usr/local/Singular/svn/trunk@48 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 684 bytes
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id: debug.cc,v 1.1 1996-12-04 13:59:26 schmidt Exp $ */
3
4/*
5$Log:
6*/
7
8static int deb_level;
9char * deb_level_msg = 0;
10
11void deb_inc_level()
12{
13    int i;
14    deb_level++;
15    if ( deb_level_msg != 0 )
16        delete [] deb_level_msg;
17    deb_level_msg = new char[3*deb_level+1];
18    for ( i = 0; i < 3*deb_level; i++ )
19        deb_level_msg[i] = ' ';
20    deb_level_msg[3*deb_level] = '\0';
21}
22
23void deb_dec_level()
24{
25    if ( deb_level > 0 ) {
26        int i;
27        deb_level--;
28        delete [] deb_level_msg;
29        deb_level_msg = new char[3*deb_level+1];
30            for ( i = 0; i < 3*deb_level; i++ )
31                deb_level_msg[i] = ' ';
32        deb_level_msg[3*deb_level] = '\0';
33    }
34}
Note: See TracBrowser for help on using the repository browser.