3 * $Id: set.h,v 1.1 1997/07/21 13:47:44 mdw Exp $
5 * Management of sets (for the use of the class expression handler)
10 /*----- Licencing notice --------------------------------------------------*
12 * This file is part of `become'
14 * `Become' is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * `Become' is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with `become'; if not, write to the Free Software
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 /*----- Revision history --------------------------------------------------*
32 * Revision 1.1 1997/07/21 13:47:44 mdw
44 /*----- Required headers --------------------------------------------------*/
50 /*----- Functions provided ------------------------------------------------*/
52 /* --- @set_subtract@ --- *
54 * Arguments: @sym_table *a@ = pointer to table @A@
55 * @sym_table *b@ = pointer to table @B@
57 * Returns: A symbol table containing all the elements in @A@ which don't
60 * Use: Subtracts a symbol table from another symbol table. Assumes
61 * that there's no data following the actual @sym_base@ block
62 * for each item in the table.
65 extern sym_table
*set_subtract(sym_table */
*a*/
, sym_table */
*b*/
);
67 /* --- @set_intersect@ --- *
69 * Arguments: @sym_table *a@ = pointer to table @A@
70 * @sym_table *b@ = pointer to table @B@
72 * Returns: A symbol table containing all the elements in @A@ which also
75 * Use: Constructs the intersection of two symbol tables. Assumes
76 * that there's no data following the actual @sym_base@ block
77 * for each item in the table.
80 sym_table
*set_intersect(sym_table */
*a*/
, sym_table */
*b*/
);
82 /* --- @set_union@ --- *
84 * Arguments: @sym_table *a@ = pointer to table @A@
85 * @sym_table *b@ = pointer to table @B@
87 * Returns: A symbol table containing all the elements in @A@ and those
90 * Use: Constructs the union of two symbol tables. Assumes that
91 * there's no data following the actual @sym_base@ block for
92 * each item in the table.
95 sym_table
*set_union(sym_table */
*a*/
, sym_table */
*b*/
);
97 /* --- @set_copy@ --- *
99 * Arguments: @sym_table *a@ = pointer to table
101 * Returns: A copy of the symbol table.
103 * Use: Copies a symbol table. Same assumptions again...
106 sym_table
*set_copy(sym_table */
*a*/
);
108 /*----- That's all, folks -------------------------------------------------*/