32 lines
478 B
C
32 lines
478 B
C
|
|
#include <debug.h>
|
|
|
|
#include <avl/avl.h>
|
|
|
|
#include "struct.h"
|
|
#include "discard.h"
|
|
|
|
bool truthtable_set_discard(
|
|
struct truthtable_set* this,
|
|
truthtable_t truthtable)
|
|
{
|
|
struct avl_node_t* node = avl_search(this->tree, &truthtable);
|
|
|
|
bool was_present;
|
|
|
|
if (node)
|
|
{
|
|
was_present = true;
|
|
|
|
avl_delete_node(this->tree, node);
|
|
|
|
this->n--;
|
|
}
|
|
else
|
|
{
|
|
TODO;
|
|
}
|
|
|
|
return was_present;
|
|
}
|
|
|