Mercurial > hg > Applications > Grep
comparison c/bitVector/main.cc @ 84:3d1c71fbd4a4
add bitInfo & fix Makefile
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 07 Oct 2015 18:21:32 +0900 |
parents | a2826bf4e80a |
children | 9a1bb8f439f5 |
comparison
equal
deleted
inserted
replaced
83:d19afac949a5 | 84:3d1c71fbd4a4 |
---|---|
1 #include <stdio.h> | 1 #include <stdio.h> |
2 #include <stdlib.h> | 2 #include <stdlib.h> |
3 #include <string.h> | 3 #include <string.h> |
4 #include "bitInfo.h" | |
4 | 5 |
5 int bitBlock = sizeof(unsigned long) * 8; | 6 int bitBlock = sizeof(unsigned long) * 8; |
6 | |
7 typedef struct bitInfo { | |
8 int arrayNum; | |
9 unsigned long *bitContainer; | |
10 }BitInfo,*BitInfoPtr; | |
11 | 7 |
12 void bitSet(BitInfoPtr bi, int bitSetPosition) { | 8 void bitSet(BitInfoPtr bi, int bitSetPosition) { |
13 | 9 |
14 unsigned long tmp = 1; | 10 unsigned long tmp = 1; |
15 int arrayPosition = 0; | 11 int arrayPosition = 0; |