source: vis_dev/glu-2.3/src/var_set/var_set.h @ 104

Last change on this file since 104 was 13, checked in by cecile, 13 years ago

library glu 2.3

File size: 2.5 KB
Line 
1#ifndef VAR_SET_H /* { */
2#define VAR_SET_H
3
4/*
5 * Revision Control Information
6 *
7 * /projects/hsis/CVS/utilities/var_set/var_set.h,v
8 * rajeev
9 * 1.3
10 * 1995/08/08 22:41:47
11 * var_set.h,v
12 * Revision 1.3  1995/08/08 22:41:47  rajeev
13 * Changes made by shazqadeer.420 as of 8/8/95
14 *
15 * Revision 1.1  1993/07/29  00:44:35  serdar
16 * Imported from /projects/classes/sis. Makefile changed for use in
17 *  /projects/hsis-util/hsis-util-1.0/common/src.
18 *
19 * Revision 1.3  1993/05/28  23:49:29  sis
20 * Aesthetic changes to prototypes.
21 *
22 * Revision 1.2  1993/05/11  19:49:14  sis
23 * Changes for ANSI C compatibility.
24 *
25 * Revision 1.1  1993/03/01  16:24:39  sis
26 * Initial revision
27 *
28 * Revision 1.1  1993/03/01  16:23:57  sis
29 * Initial revision
30 *
31 * Revision 1.3  1993/02/25  02:04:41  shiple
32 *  Added file pointer argument to declaration of var_set_print.
33 *
34 * Revision 1.2  1993/02/24  23:35:16  shiple
35 * Add VAR_SET_BYTE_SIZE macro. Fix newly introduced bug in
36 * definition of VAR_SET_WORD_SIZE.
37 *
38 * Revision 1.1  1993/02/23  22:58:28  shiple
39 * Initial revision
40 *
41 *
42 */
43
44#define VAR_SET_BYTE_SIZE 8
45#define VAR_SET_WORD_SIZE ((sizeof(unsigned int))*(VAR_SET_BYTE_SIZE))
46#define VAR_SET_ALL_ZEROS 0
47#define VAR_SET_ALL_ONES  ((unsigned int) ~0)
48#define VAR_SET_EXTRACT_BIT(word,pos) (((word) & (1 << (pos))) != 0)
49
50typedef struct var_set_struct {
51  int n_elts;
52  int n_words;
53  unsigned int *data;
54} var_set_t;
55
56EXTERN var_set_t *var_set_new ARGS((int));
57EXTERN var_set_t *var_set_copy ARGS((var_set_t *));
58EXTERN var_set_t *var_set_assign ARGS((var_set_t *, var_set_t *));
59EXTERN void       var_set_free ARGS((var_set_t *));
60EXTERN int        var_set_n_elts ARGS((var_set_t *));
61EXTERN var_set_t *var_set_or ARGS((var_set_t *, var_set_t *, var_set_t *));
62EXTERN var_set_t *var_set_and ARGS((var_set_t *, var_set_t *, var_set_t *));
63EXTERN var_set_t *var_set_not ARGS((var_set_t *, var_set_t *));
64EXTERN int        var_set_get_elt ARGS((var_set_t *, int));
65EXTERN void       var_set_set_elt ARGS((var_set_t *, int));
66EXTERN void       var_set_clear_elt ARGS((var_set_t *, int));
67EXTERN void       var_set_clear ARGS((var_set_t *));
68EXTERN int        var_set_intersect ARGS((var_set_t *, var_set_t *));
69EXTERN int        var_set_is_empty ARGS((var_set_t *));
70EXTERN int        var_set_is_full ARGS((var_set_t *));
71EXTERN void       var_set_print ARGS((FILE *, var_set_t *));
72EXTERN int        var_set_equal ARGS((var_set_t *, var_set_t *));
73EXTERN int        var_set_cmp ARGS((char *, char *));
74EXTERN unsigned int var_set_hash ARGS((var_set_t *));
75
76#endif /* } */
Note: See TracBrowser for help on using the repository browser.