iOS/buildlibs/armv7/allegro-4.4.2/addons/jpgalleg/src/io.c
/* _jpeg_put_bit:
 *  Writes a single bit to the output stream.
 */
Writes a single bit to the output stream.
Writes a single bit to the output stream .
int
_jpeg_put_bit(int bit)
{
	current_byte |= (bit << _jpeg_io.current_bit);
	_jpeg_io.current_bit--;
	if (_jpeg_io.current_bit < 0) {
		if (_jpeg_putc(current_byte))
			return -1;
		if (current_byte == 0xff)
			_jpeg_putc(0);
		_jpeg_io.current_bit = 7;
		current_byte = 0;
	}
	return 0;
}
int _jpeg_put_bit ( int bit ) { current_byte |= ( bit << _jpeg_io . current_bit ) ; _jpeg_io . current_bit -- ; if ( _jpeg_io . current_bit < 0 ) { if ( _jpeg_putc ( current_byte ) ) return -1 ; if ( current_byte == 0xff ) _jpeg_putc ( 0 ) ; _jpeg_io . current_bit = 7 ; current_byte = 0 ; } return 0 ; }
_jpeg_put_bit:
  Writes a single bit to the output stream.
_jpeg_put_bit : Writes a single bit to the output stream .