1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 15:36:34 +00:00
Interlisp.maiko/inc/byteswapdefs.h
2023-02-17 17:01:27 -08:00

19 lines
742 B
C

#ifndef BYTESWAPDEFS_H
#define BYTESWAPDEFS_H 1
/****************************************************************/
/* */
/* swap halves of a single 4-byte word */
/* */
/****************************************************************/
static inline unsigned int swapx(unsigned int word) {
return (((word >> 16) & 0xffff) | ((word & 0xffff) << 16));
}
void word_swap_page(void *page, unsigned longwordcount);
void bit_reverse_region(unsigned short *top, int width, int height, int rasterwidth);
#ifdef RESWAPPEDCODESTREAM
unsigned int byte_swap_code_block(unsigned int *base);
#endif
#endif