- Fixed some more printf usages, that should now be handled by eprintf.

This commit is contained in:
ccremers 2004-07-29 12:47:57 +00:00
parent 523b0ffd32
commit 17c6fe5136
4 changed files with 27 additions and 26 deletions

View File

@ -348,17 +348,19 @@ check_claim_nisynch (const System sys, const int i)
cl->failed = statesIncrease (cl->failed);
#ifdef DEBUG
globalError++;
warning ("Claim has failed!");
printf ("// To be exact, claim label ");
eprintf ("To be exact, claim label ");
termPrint (cl->label);
printf (" with prec set ");
eprintf (" with prec set ");
termlistPrint (cl->prec);
printf ("\n");
printf ("// i: %i\n// f: ",i);
eprintf ("\n");
eprintf ("i: %i\nf: ",i);
termmapPrint (f);
printf ("\n// g: ");
eprintf ("\ng: ");
termmapPrint (g);
printf ("\n");
eprintf ("\n");
globalError--;
#endif
}

View File

@ -83,7 +83,7 @@ knowledgeDuplicate (Knowledge know)
if (know == NULL)
{
printf ("Warning! Trying to copy empty knowledge!\n");
warning ("Trying to copy empty knowledge.");
return NULL;
}
newknow = makeKnowledge ();
@ -141,8 +141,7 @@ knowledgeAddTerm (Knowledge know, Term term)
{
if (know == NULL)
{
fprintf
(stderr, "Warning: trying to add term to uninitialised (NULL) Know pointer.\n");
warning ("Trying to add term to uninitialised (NULL) Know pointer.");
return 1;
}
if (term == NULL)
@ -324,20 +323,20 @@ knowledgePrint (Knowledge know)
indent ();
if (know == NULL)
{
printf ("Empty.\n");
eprintf ("Empty.\n");
return;
}
printf (" [Basic]: ");
eprintf (" [Basic]: ");
termlistPrint (know->basic);
printf ("\n");
eprintf ("\n");
indent ();
printf (" [Encrp]: ");
eprintf (" [Encrp]: ");
termlistPrint (know->encrypt);
printf ("\n");
eprintf ("\n");
indent ();
printf (" [Vars]: ");
eprintf (" [Vars]: ");
termlistPrint (know->vars);
printf ("\n");
eprintf ("\n");
}
//! Print the inverses list of a knowledge set.
@ -349,14 +348,14 @@ knowledgeInversesPrint (Knowledge know)
if (know == NULL)
{
printf ("Empty knowledge.");
eprintf ("Empty knowledge.");
return;
}
tl = knowledgeGetInverses (know);
if (tl == NULL)
{
printf ("None.");
eprintf ("None.");
}
else
{
@ -364,13 +363,13 @@ knowledgeInversesPrint (Knowledge know)
{
if (after)
{
printf (",");
eprintf (",");
}
printf ("(");
eprintf ("(");
termPrint (tl->term);
printf (",");
eprintf (",");
termPrint (tl->next->term);
printf (")");
eprintf (")");
after = 1;
tl = tl->next->next;
}

View File

@ -165,7 +165,7 @@ systemRuns (const System sys)
#ifdef DEBUG
if (sys->switchScenario < 0)
{
printf ("// Last run with a choose: %i\n",sys->lastChooseRun);
warning ("Last run with a choose: %i",sys->lastChooseRun);
}
#endif
}

View File

@ -111,12 +111,12 @@ void termmapPrint (Termmap f)
{
if (f != NULL)
{
printf ("\"");
eprintf ("\"");
termPrint (f->term);
printf ("\" -> %i", f->result);
eprintf ("\" -> %i", f->result);
if (f->next != NULL)
{
printf (", ");
eprintf (", ");
termmapPrint (f->next);
}
}