Commit 513949e4 authored by Pfeiffer, Götz's avatar Pfeiffer, Götz
Browse files

sci.c: Some obsolete settings for the debug ("dbg") module were removed.


The dbg module was rewritten some time ago. A few of the functions and macros
were removed or now have no effect. The changes in sci reflect these changes in
dbg.c.
parent cfabff2c
......@@ -79,23 +79,16 @@ summary:
#define DBG_LOCAL_COMP 1
/* use local switch-variables for the dbg module */
#define DBG_ASYNC_COMP 1
/* use async. I/O via message passing */
/* the following defines are for sci-debugging, they do not influence
any header-files but are placed here since they are usually changed
together with the above macros.*/
#define SCI_OUT_FILE "stdout"
/* file for debug-outputs */
#define SCI_TRC_LEVEL 1
/* standard trace-level */
/* level 6: dense traces for debugging
level 5: enter/exit tracing
level 1: messages on fatal errors
*/
#define SCI_FLUSHMODE 1
/* 0, 1 and 2 are allowed */
/*@ITI________________________________________________________*/
/* Include-Files */
......@@ -663,9 +656,8 @@ static void give_global_sem(void)
static void init_dbg(void)
{ if (!dbg_initialized)
{ DBG_SET_OUT(SCI_OUT_FILE);
{
DBG_TRC_LEVEL= SCI_TRC_LEVEL;
DBG_FLUSHMODE(SCI_FLUSHMODE);
dbg_initialized= TRUE;
};
}
......@@ -3624,11 +3616,6 @@ int sci_show_dbg(void)
DBG_PRN(DBG_OUT, DBG_FLAG,"all debug runtime-variables are local to this module\n");
#else
DBG_PRN(DBG_OUT, DBG_FLAG,"the global debug runtime-variables of dbg.c are used\n");
#endif
#if DBG_ASYNC_COMP
DBG_PRN(DBG_OUT, DBG_FLAG,"Debug-printing is asynchronous (via message-queue)\n");
#else
DBG_PRN(DBG_OUT, DBG_FLAG,"Debug-printing is synchronous (via simple fprintf)\n");
#endif
DBG_PRN(DBG_OUT, DBG_FLAG,"filedate at compilation-time: %s\n", sci_cdate);
return(0);
......@@ -3638,16 +3625,10 @@ int sci_show_dbg(void)
int sci_help(void)
{ DBG_PRN(DBG_OUT, DBG_FLAG,
"interactive sci functions:\n"
"sci_dbg_out(char *filename)\n"
" filename may also be stderr, stdout or dbgout\n"
"sci_dbg_assert(int level)\n"
" level: 0: standard\n"
" 1: endless loop after failed assertion\n"
" 2: exit after failed assertion\n"
"sci_dbg_flush(int mode)\n"
" mode: 0: no flush\n"
" 1: fflush() after each output\n"
" 2: puts(\"\\n\\n\");fflush() after each output\n"
"sci_dbg_tracelevel(int level)\n"
" level: 6: dense traces for sci-debugging\n"
" 5: entry and exit of each function is shown\n"
......@@ -3673,13 +3654,9 @@ int sci_help(void)
/*@EX*/
void sci_dbg_out(char *str)
{
if (*str==0)
{ DBG_PRN(DBG_OUT, DBG_FLAG,
"usage: sci_dbg_out(string)\n"
"string: stdout, stderr or filename\n");
return;
};
DBG_SET_OUT(str);
DBG_PRN(DBG_OUT, DBG_FLAG,
"usage: sci_dbg_out is now obsolete and doesn't do anything\n");
return;
}
/*@EX*/
......@@ -3714,12 +3691,11 @@ void sci_dbg_assert(int i)
/*@EX*/
void sci_dbg_flush(int i)
{ if ((i>=0) && (i<=2))
{ DBG_FLUSHMODE(i); return; };
{
DBG_PRN(DBG_OUT, DBG_FLAG,
"usage: sci_dbg_flush(n);\n"
"n: 0(no flush), 1(fflush), 2(fflush) + \"\n\n\")\n");
}
"usage: sci_dbg_flush is now obsolete and doesn't do anything\n");
return;
}
/*@EX*/
void sci_dbg_tracelevel(int i)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment