src/rotateorthlow.c
l_uint8 *
makeReverseByteTab1(void)
{
l_int32   i;
l_uint8  *tab;

    PROCNAME("makeReverseByteTab1");

    if ((tab = (l_uint8 *)CALLOC(256, sizeof(l_uint8))) == NULL)
        return (l_uint8 *)ERROR_PTR("calloc fail for tab", procName, NULL);

    for (i = 0; i < 256; i++)
        tab[i] = ((0x80 & i) >> 7) |
                 ((0x40 & i) >> 5) |
                 ((0x20 & i) >> 3) |
                 ((0x10 & i) >> 1) |
                 ((0x08 & i) << 1) |
                 ((0x04 & i) << 3) |
                 ((0x02 & i) << 5) |
                 ((0x01 & i) << 7);

    return tab;
}
/*!
 *  makeReverseByteTab1()
 *
 *  Notes:
 *      (1) This generates an 8 bit lookup table for reversing
 *          the order of eight 1-bit pixels.
 */
makeReverseByteTab1()
Notes:
(1) This generates an 8 bit lookup table for reversing
the order of eight 1-bit pixels.
makeReverseByteTab1 () Notes : ( 1 ) This generates an 8 bit lookup table for reversing the order of eight 1 - bit pixels .
l_uint8 *
makeReverseByteTab1(void)
{
l_int32   i;
l_uint8  *tab;
    PROCNAME("makeReverseByteTab1");
    if ((tab = (l_uint8 *)CALLOC(256, sizeof(l_uint8))) == NULL)
        return (l_uint8 *)ERROR_PTR("calloc fail for tab", procName, NULL);
    for (i = 0; i < 256; i++)
        tab[i] = ((0x80 & i) >> 7) |
                 ((0x40 & i) >> 5) |
                 ((0x20 & i) >> 3) |
                 ((0x10 & i) >> 1) |
                 ((0x08 & i) << 1) |
                 ((0x04 & i) << 3) |
                 ((0x02 & i) << 5) |
                 ((0x01 & i) << 7);
    return tab;
}
l_uint8 * makeReverseByteTab1 ( void ) { l_int32 i ; l_uint8 * tab ; PROCNAME ( " " ) ; if ( ( tab = ( l_uint8 * ) CALLOC ( 256 , sizeof ( l_uint8 ) ) ) == NULL ) return ( l_uint8 * ) ERROR_PTR ( " " , procName , NULL ) ; for ( i = 0 ; i < 256 ; i ++ ) tab [ i ] = ( ( 0x80 & i ) >> 7 ) | ( ( 0x40 & i ) >> 5 ) | ( ( 0x20 & i ) >> 3 ) | ( ( 0x10 & i ) >> 1 ) | ( ( 0x08 & i ) << 1 ) | ( ( 0x04 & i ) << 3 ) | ( ( 0x02 & i ) << 5 ) | ( ( 0x01 & i ) << 7 ) ; return tab ; }
makeReverseByteTab1()
  Notes:
      (1) This generates an 8 bit lookup table for reversing
          the order of eight 1-bit pixels.
makeReverseByteTab1 () Notes : ( 1 ) This generates an 8 bit lookup table for reversing the order of eight 1 - bit pixels .