blob: 6736e4ae31e2309700622e57cfac3a8f2d8506ba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST
int
(libnormalform_contains_clause__)(struct expression *this, struct expression *clause, size_t ignore)
{
size_t i;
int cmp;
if (ignore > this->nterms)
ignore = this->nterms;
for (i = 0; i < ignore; i++) {
cmp = libnormalform_clause_cmp__(clause, this->terms[i]);
if (cmp >= 0)
return !cmp;
}
for (i++; i < this->nterms; i++) {
cmp = libnormalform_clause_cmp__(clause, this->terms[i]);
if (cmp >= 0)
return !cmp;
}
return 0;
}
#else
TODO_TEST
#endif
|