- Fixed some more printf usages, that should now be handled by eprintf.
This commit is contained in:
parent
523b0ffd32
commit
17c6fe5136
14
src/claim.c
14
src/claim.c
@ -348,17 +348,19 @@ check_claim_nisynch (const System sys, const int i)
|
|||||||
cl->failed = statesIncrease (cl->failed);
|
cl->failed = statesIncrease (cl->failed);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
globalError++;
|
||||||
warning ("Claim has failed!");
|
warning ("Claim has failed!");
|
||||||
printf ("// To be exact, claim label ");
|
eprintf ("To be exact, claim label ");
|
||||||
termPrint (cl->label);
|
termPrint (cl->label);
|
||||||
printf (" with prec set ");
|
eprintf (" with prec set ");
|
||||||
termlistPrint (cl->prec);
|
termlistPrint (cl->prec);
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
printf ("// i: %i\n// f: ",i);
|
eprintf ("i: %i\nf: ",i);
|
||||||
termmapPrint (f);
|
termmapPrint (f);
|
||||||
printf ("\n// g: ");
|
eprintf ("\ng: ");
|
||||||
termmapPrint (g);
|
termmapPrint (g);
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
|
globalError--;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ knowledgeDuplicate (Knowledge know)
|
|||||||
|
|
||||||
if (know == NULL)
|
if (know == NULL)
|
||||||
{
|
{
|
||||||
printf ("Warning! Trying to copy empty knowledge!\n");
|
warning ("Trying to copy empty knowledge.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
newknow = makeKnowledge ();
|
newknow = makeKnowledge ();
|
||||||
@ -141,8 +141,7 @@ knowledgeAddTerm (Knowledge know, Term term)
|
|||||||
{
|
{
|
||||||
if (know == NULL)
|
if (know == NULL)
|
||||||
{
|
{
|
||||||
fprintf
|
warning ("Trying to add term to uninitialised (NULL) Know pointer.");
|
||||||
(stderr, "Warning: trying to add term to uninitialised (NULL) Know pointer.\n");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (term == NULL)
|
if (term == NULL)
|
||||||
@ -324,20 +323,20 @@ knowledgePrint (Knowledge know)
|
|||||||
indent ();
|
indent ();
|
||||||
if (know == NULL)
|
if (know == NULL)
|
||||||
{
|
{
|
||||||
printf ("Empty.\n");
|
eprintf ("Empty.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf (" [Basic]: ");
|
eprintf (" [Basic]: ");
|
||||||
termlistPrint (know->basic);
|
termlistPrint (know->basic);
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
indent ();
|
indent ();
|
||||||
printf (" [Encrp]: ");
|
eprintf (" [Encrp]: ");
|
||||||
termlistPrint (know->encrypt);
|
termlistPrint (know->encrypt);
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
indent ();
|
indent ();
|
||||||
printf (" [Vars]: ");
|
eprintf (" [Vars]: ");
|
||||||
termlistPrint (know->vars);
|
termlistPrint (know->vars);
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Print the inverses list of a knowledge set.
|
//! Print the inverses list of a knowledge set.
|
||||||
@ -349,14 +348,14 @@ knowledgeInversesPrint (Knowledge know)
|
|||||||
|
|
||||||
if (know == NULL)
|
if (know == NULL)
|
||||||
{
|
{
|
||||||
printf ("Empty knowledge.");
|
eprintf ("Empty knowledge.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tl = knowledgeGetInverses (know);
|
tl = knowledgeGetInverses (know);
|
||||||
if (tl == NULL)
|
if (tl == NULL)
|
||||||
{
|
{
|
||||||
printf ("None.");
|
eprintf ("None.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -364,13 +363,13 @@ knowledgeInversesPrint (Knowledge know)
|
|||||||
{
|
{
|
||||||
if (after)
|
if (after)
|
||||||
{
|
{
|
||||||
printf (",");
|
eprintf (",");
|
||||||
}
|
}
|
||||||
printf ("(");
|
eprintf ("(");
|
||||||
termPrint (tl->term);
|
termPrint (tl->term);
|
||||||
printf (",");
|
eprintf (",");
|
||||||
termPrint (tl->next->term);
|
termPrint (tl->next->term);
|
||||||
printf (")");
|
eprintf (")");
|
||||||
after = 1;
|
after = 1;
|
||||||
tl = tl->next->next;
|
tl = tl->next->next;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ systemRuns (const System sys)
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (sys->switchScenario < 0)
|
if (sys->switchScenario < 0)
|
||||||
{
|
{
|
||||||
printf ("// Last run with a choose: %i\n",sys->lastChooseRun);
|
warning ("Last run with a choose: %i",sys->lastChooseRun);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -111,12 +111,12 @@ void termmapPrint (Termmap f)
|
|||||||
{
|
{
|
||||||
if (f != NULL)
|
if (f != NULL)
|
||||||
{
|
{
|
||||||
printf ("\"");
|
eprintf ("\"");
|
||||||
termPrint (f->term);
|
termPrint (f->term);
|
||||||
printf ("\" -> %i", f->result);
|
eprintf ("\" -> %i", f->result);
|
||||||
if (f->next != NULL)
|
if (f->next != NULL)
|
||||||
{
|
{
|
||||||
printf (", ");
|
eprintf (", ");
|
||||||
termmapPrint (f->next);
|
termmapPrint (f->next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user