source: trunk/libs/newlib/src/include/cgen/bitset.h @ 628

Last change on this file since 628 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.0 KB
Line 
1/* Header file the type CGEN_BITSET.
2   Copyright 2002, 2005, 2009 Free Software Foundation, Inc.
3
4   This file is part of the GNU opcodes library.
5
6   This library is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 3, or (at your option)
9   any later version.
10
11   It is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this library; see the file COPYING3.  If not, write to the
18   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
19   02110-1301, USA.  */
20
21#ifndef CGEN_BITSET_H
22#define CGEN_BITSET_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* A bitmask represented as a string.
29   Each member of the set is represented as a bit
30   in the string. Bytes are indexed from left to right in the string and
31   bits from most significant to least within each byte.
32
33   For example, the bit representing member number 6 is (set->bits[0] & 0x02).
34*/
35typedef struct cgen_bitset
36{
37  unsigned length;
38  char *bits;
39} CGEN_BITSET;
40
41extern CGEN_BITSET *cgen_bitset_create PARAMS ((unsigned));
42extern void cgen_bitset_init PARAMS ((CGEN_BITSET *, unsigned));
43extern void cgen_bitset_clear PARAMS ((CGEN_BITSET *));
44extern void cgen_bitset_add PARAMS ((CGEN_BITSET *, unsigned));
45extern void cgen_bitset_set PARAMS ((CGEN_BITSET *, unsigned));
46extern int cgen_bitset_compare PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
47extern void cgen_bitset_union PARAMS ((CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *));
48extern int cgen_bitset_intersect_p PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
49extern int cgen_bitset_contains PARAMS ((CGEN_BITSET *, unsigned));
50extern CGEN_BITSET *cgen_bitset_copy PARAMS ((CGEN_BITSET *));
51
52#ifdef __cplusplus
53} // extern "C"
54#endif
55
56#endif
Note: See TracBrowser for help on using the repository browser.