diff options
| author | Jussi Pakkanen <jussi.pakkanen@canonical.com> | 2011-04-28 14:46:17 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-04-28 15:19:03 +0200 |
| commit | 753f11f3881eac51da49c5bb2c2eebc99bd47410 (patch) | |
| tree | b3a5906f6751116efd26fdd6951e7d2f82f0b38f /src/grail-bits.c | |
| parent | b2a967eea554fce9fdec21f5e19c9608406f530c (diff) | |
Use visibility macros instead of symbol map
Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/grail-bits.c')
| -rw-r--r-- | src/grail-bits.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/grail-bits.c b/src/grail-bits.c index 4c8b941..8ebfb18 100644 --- a/src/grail-bits.c +++ b/src/grail-bits.c | |||
| @@ -46,19 +46,21 @@ static const int grail_first_set_bit[256] = | |||
| 46 | 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, | 46 | 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | void grail_mask_set_mask(grail_mask_t *a, const grail_mask_t *b, int bytes) | 49 | void GRAIL_PUBLIC grail_mask_set_mask(grail_mask_t *a, const grail_mask_t *b, |
| 50 | int bytes) | ||
| 50 | { | 51 | { |
| 51 | while (bytes--) | 52 | while (bytes--) |
| 52 | *a++ |= *b++; | 53 | *a++ |= *b++; |
| 53 | } | 54 | } |
| 54 | 55 | ||
| 55 | void grail_mask_clear_mask(grail_mask_t *a, const grail_mask_t *b, int bytes) | 56 | void GRAIL_PUBLIC grail_mask_clear_mask(grail_mask_t *a, const grail_mask_t *b, |
| 57 | int bytes) | ||
| 56 | { | 58 | { |
| 57 | while (bytes--) | 59 | while (bytes--) |
| 58 | *a++ &= ~*b++; | 60 | *a++ &= ~*b++; |
| 59 | } | 61 | } |
| 60 | 62 | ||
| 61 | int grail_mask_count(const grail_mask_t *mask, int bytes) | 63 | int GRAIL_PUBLIC grail_mask_count(const grail_mask_t *mask, int bytes) |
| 62 | { | 64 | { |
| 63 | int count = 0; | 65 | int count = 0; |
| 64 | while (bytes--) | 66 | while (bytes--) |
| @@ -66,7 +68,7 @@ int grail_mask_count(const grail_mask_t *mask, int bytes) | |||
| 66 | return count; | 68 | return count; |
| 67 | } | 69 | } |
| 68 | 70 | ||
| 69 | int grail_mask_get_first(const grail_mask_t *mask, int bytes) | 71 | int GRAIL_PUBLIC grail_mask_get_first(const grail_mask_t *mask, int bytes) |
| 70 | { | 72 | { |
| 71 | int k; | 73 | int k; |
| 72 | for (k = 0; k < bytes; k++) | 74 | for (k = 0; k < bytes; k++) |
| @@ -75,7 +77,7 @@ int grail_mask_get_first(const grail_mask_t *mask, int bytes) | |||
| 75 | return -1; | 77 | return -1; |
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | int grail_mask_get_next(int i, const grail_mask_t *mask, int bytes) | 80 | int GRAIL_PUBLIC grail_mask_get_next(int i, const grail_mask_t *mask, int bytes) |
| 79 | { | 81 | { |
| 80 | int k = ++i >> 3; | 82 | int k = ++i >> 3; |
| 81 | if (k < bytes) { | 83 | if (k < bytes) { |
