|
From: Drasko D. <dra...@gm...> - 2011-07-08 16:24:22
|
On Fri, Jul 8, 2011 at 2:05 PM, Mahr, Stefan <Ste...@sp...> wrote: >> Where are those functions defined and how do they know what the target endianness is? > > They doesn't know the target endianness, but host endianness. How do they convert then, when they do not know from which endianes to convert from ? /** * Sets @c num bits in @c _buffer, starting at the @c first bit, * using the bits in @c value. This routine fast-paths writes * of little-endian, byte-aligned, 32-bit words. * @param _buffer The buffer whose bits will be set. * @param first The bit offset in @c _buffer to start writing (0-31). * @param num The number of bits from @c value to copy (1-32). * @param value Up to 32 bits that will be copied to _buffer. */ static inline void buf_set_u32(void *_buffer, unsigned first, unsigned num, uint32_t value) BR, Drasko |