iOS/buildlibs/armv7/allegro-4.4.2/addons/jpgalleg/src/encode.c
/* compare_entries:
 *  qsort() comparision function to sort huffman entries by frequency.
 */
qsort() comparision function to sort huffman entries by frequency.
qsort () comparision function to sort huffman entries by frequency .
static int
compare_entries(const void *d1, const void *d2)
{
	HUFFMAN_ENTRY *e1 = (HUFFMAN_ENTRY *)d1;
	HUFFMAN_ENTRY *e2 = (HUFFMAN_ENTRY *)d2;
	if (e1->frequency < e2->frequency)
		return 1;
	else if (e1->frequency > e2->frequency)
		return -1;
	return 0;
}
static int compare_entries ( const void * d1 , const void * d2 ) { HUFFMAN_ENTRY * e1 = ( HUFFMAN_ENTRY * ) d1 ; HUFFMAN_ENTRY * e2 = ( HUFFMAN_ENTRY * ) d2 ; if ( e1 -> frequency < e2 -> frequency ) return 1 ; else if ( e1 -> frequency > e2 -> frequency ) return -1 ; return 0 ; }
compare_entries:
  qsort() comparision function to sort huffman entries by frequency.
compare_entries : qsort () comparision function to sort huffman entries by frequency .