- Added knowledgePrintShort for knowledge displays without newlines.

This commit is contained in:
ccremers 2004-08-06 11:59:27 +00:00
parent cd0dce31f3
commit 4d154e8126
2 changed files with 26 additions and 0 deletions

View File

@ -339,6 +339,31 @@ knowledgePrint (Knowledge know)
eprintf ("\n");
}
//! Print a knowledge set, short version (no newline)
void
knowledgePrintShort (const Knowledge know)
{
indent ();
if (know == NULL)
{
eprintf ("Empty");
return;
}
if (know->basic != NULL)
{
termlistPrint (know->basic);
if (know->encrypt != NULL);
{
eprintf (", ");
}
}
if (know->encrypt != NULL)
{
termlistPrint (know->encrypt);
}
}
//! Print the inverses list of a knowledge set.
void
knowledgeInversesPrint (Knowledge know)

View File

@ -41,6 +41,7 @@ void knowledgeSetInverses (Knowledge know, Termlist tl);
void knowledgeSimplify (Knowledge know, Term decryptkey);
int inKnowledge (const Knowledge know, Term term);
void knowledgePrint (Knowledge know);
void knowledgePrintShort (const Knowledge know);
void knowledgeInversesPrint (Knowledge know);
int isKnowledgeEqual (Knowledge know1, Knowledge know2);
Termlist knowledgeSet (const Knowledge know);