1 | /* Copyright (C) 1995, 1996 Tom Lord |
---|
2 | * |
---|
3 | * This program is free software; you can redistribute it and/or modify |
---|
4 | * it under the terms of the GNU Library General Public License as published by |
---|
5 | * the Free Software Foundation; either version 2, or (at your option) |
---|
6 | * any later version. |
---|
7 | * |
---|
8 | * This program is distributed in the hope that it will be useful, |
---|
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | * GNU Library General Public License for more details. |
---|
12 | * |
---|
13 | * You should have received a copy of the GNU Library General Public License |
---|
14 | * along with this software; see the file COPYING. If not, write to |
---|
15 | * the Free Software Foundation, 59 Temple Place - Suite 330, |
---|
16 | * Boston, MA 02111-1307, USA. |
---|
17 | */ |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | #include "rxall.h" |
---|
22 | #include "rxnode.h" |
---|
23 | #include "rxhash.h" |
---|
24 | |
---|
25 | #ifdef __STDC__ |
---|
26 | static int |
---|
27 | rexp_node_equal (void * va, void * vb) |
---|
28 | #else |
---|
29 | static int |
---|
30 | rexp_node_equal (va, vb) |
---|
31 | void * va; |
---|
32 | void * vb; |
---|
33 | #endif |
---|
34 | { |
---|
35 | struct rexp_node * a; |
---|
36 | struct rexp_node * b; |
---|
37 | |
---|
38 | a = (struct rexp_node *)va; |
---|
39 | b = (struct rexp_node *)vb; |
---|
40 | |
---|
41 | return ( (va == vb) |
---|
42 | || ( (a->type == b->type) |
---|
43 | && (a->params.intval == b->params.intval) |
---|
44 | && (a->params.intval2 == b->params.intval2) |
---|
45 | && rx_bitset_is_equal (a->params.cset_size, a->params.cset, b->params.cset) |
---|
46 | && rexp_node_equal (a->params.pair.left, b->params.pair.left) |
---|
47 | && rexp_node_equal (a->params.pair.right, b->params.pair.right))); |
---|
48 | } |
---|
49 | |
---|
50 | |
---|