3rdparty/iio/iio.c
// Note: different order than for shorts.
// Fascinating braindeadness.
different order than for shorts.
Fascinating braindeadness.
different order than for shorts . Fascinating braindeadness .
static uint32_t rim_getint(FILE *f, bool swp)
{
	int a = pick_char_for_sure(f);
	int b = pick_char_for_sure(f);
	int c = pick_char_for_sure(f);
	int d = pick_char_for_sure(f);
	IIO_DEBUG("rgi %.2x%.2x %.2x%.2x\n", a, b, c, d);
	assert(a >= 0); assert(b >= 0); assert(c >= 0); assert(d >= 0);
	assert(a < 256); assert(b < 256); assert(c < 256); assert(d < 256);
	uint32_t r = swp ?
		a*0x1000000 + b*0x10000 + c*0x100 + d:
		d*0x1000000 + c*0x10000 + b*0x100 + a;
	return r;
}
static uint32_t rim_getint ( FILE * f , bool swp ) { int a = pick_char_for_sure ( f ) ; int b = pick_char_for_sure ( f ) ; int c = pick_char_for_sure ( f ) ; int d = pick_char_for_sure ( f ) ; IIO_DEBUG ( " \n " , a , b , c , d ) ; assert ( a >= 0 ) ; assert ( b >= 0 ) ; assert ( c >= 0 ) ; assert ( d >= 0 ) ; assert ( a < 256 ) ; assert ( b < 256 ) ; assert ( c < 256 ) ; assert ( d < 256 ) ; uint32_t r = swp ? a * 0x1000000 + b * 0x10000 + c * 0x100 + d : d * 0x1000000 + c * 0x10000 + b * 0x100 + a ; return r ; }
Note: different order than for shorts.
Note : different order than for shorts .