third_party/inchi/INCHI_BASE/src/ikey_base26.c
const char* base26_triplet_1( const unsigned char *a )
{
    UINT32 b0, b1, h;
    b0 = (UINT32) a[0];             /* 1111 1111  */
#ifndef FIX_BASE26_ENC_BUG
    b1 = (UINT32) ( a[1] & 0x3f );  /* 0011 1111  */
    h = (UINT32) ( b0 | b1 << 8 );
#else
    b1 = (UINT32) ( a[1] & 0xfc );  /* 1111 1100  */
    h = (UINT32) ( b0 << 8 | b1 ) >> 2;
#endif
    return t26[h];
}
/****************************************************************************
 Get a character representing 1st 14-bit triplet
 (bits 0..13 of contiguous array of octets)
****************************************************************************/
Get a character representing 1st 14-bit triplet
(bits 0..13 of contiguous array of octets)
Get a character representing 1st 14 - bit triplet ( bits 0 .. 13 of contiguous array of octets )
const char* base26_triplet_1( const unsigned char *a )
{
    UINT32 b0, b1, h;
    b0 = (UINT32) a[0];             
#ifndef FIX_BASE26_ENC_BUG
    b1 = (UINT32) ( a[1] & 0x3f );  
    h = (UINT32) ( b0 | b1 << 8 );
#else
    b1 = (UINT32) ( a[1] & 0xfc );  
    h = (UINT32) ( b0 << 8 | b1 ) >> 2;
#endif
    return t26[h];
}
const char * base26_triplet_1 ( const unsigned char * a ) { UINT32 b0 , b1 , h ; b0 = ( UINT32 ) a [ 0 ] ; #ifndef FIX_BASE26_ENC_BUG b1 = ( UINT32 ) ( a [ 1 ] & 0x3f ) ; h = ( UINT32 ) ( b0 | b1 << 8 ) ; #else b1 = ( UINT32 ) ( a [ 1 ] & 0xfc ) ; h = ( UINT32 ) ( b0 << 8 | b1 ) >> 2 ; #endif return t26 [ h ] ; }
Get a character representing 1st 14-bit triplet
(bits 0..13 of contiguous array of octets)
Get a character representing 1st 14 - bit triplet ( bits 0 .. 13 of contiguous array of octets )
/* 1111 1111  */ /* 0011 1111  */ /* 1111 1100  */