~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_bit.cc

  • Committer: Brian Aker
  • Date: 2010-05-27 01:25:56 UTC
  • mfrom: (1567.1.4 new-staging)
  • Revision ID: brian@gaz-20100527012556-5zgkirkl7swbigd6
Merge of Brian, Paul. PBXT compile issue, and test framework cleanup. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include "mysys_priv.h"
17
 
 
18
 
#include <mysys/my_bit.h>
 
16
#include "config.h"
 
17
#include "drizzled/internal/my_sys.h"
 
18
 
 
19
#include "drizzled/internal/my_bit.h"
 
20
 
 
21
namespace drizzled
 
22
{
 
23
namespace internal
 
24
{
19
25
 
20
26
const char _my_bits_nbits[256] = {
21
27
  0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
39
45
/*
40
46
  perl -e 'print map{", 0x".unpack H2,pack B8,unpack b8,chr$_}(0..255)'
41
47
*/
42
 
const uchar _my_bits_reverse_table[256]={
 
48
const unsigned char _my_bits_reverse_table[256]={
43
49
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30,
44
50
0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98,
45
51
0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64,
61
67
0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F,
62
68
0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
63
69
};
 
70
 
 
71
} /* namespace internal */
 
72
} /* namespace drizzled */