aboutsummaryrefslogtreecommitdiffstats
path: root/libnormalform_clause_cmp__.c
blob: 407ea1121c318c87ab15ad910d220a078f9bdd40 (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
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST


int
(libnormalform_clause_cmp__)(struct expression *a, struct expression *b)
{
	size_t i = 0, j = 0, n = a->nterms, m = b->nterms;
	int cmp;
	for (; i < n && j < m; i++, j++) {
		cmp = libnormalform_literal_cmp__(a->terms[i], b->terms[j]);
		if (cmp)
			return cmp;
	}
	return (i < n) - (j < m);
}


#else

TODO_TEST

#endif