src/byteswap.c
/****************************************************************/
/*                                                              */
/*     Byte- & word-swap a region wordcount long-words long     */
/*                                                              */
/****************************************************************/
Byte- & word-swap a region wordcount long-words long
Byte - & word - swap a region wordcount long - words long
void word_swap_page(unsigned short *page, int longwordcount) {
  register int i;
  register unsigned int *longpage;
  longpage = (unsigned int *)page;
  for (i = 0; i < (longwordcount + longwordcount); i++) {
    *(page + i) = byte_swap_word(*(page + i));
  }
  for (i = 0; i < longwordcount; i++) { *(longpage + i) = swapx(*(longpage + i)); }
}
void word_swap_page ( unsigned short * page , int longwordcount ) { register int i ; register unsigned int * longpage ; longpage = ( unsigned int * ) page ; for ( i = 0 ; i < ( longwordcount + longwordcount ) ; i ++ ) { * ( page + i ) = byte_swap_word ( * ( page + i ) ) ; } for ( i = 0 ; i < longwordcount ; i ++ ) { * ( longpage + i ) = swapx ( * ( longpage + i ) ) ; } }
Byte- & word-swap a region wordcount long-words long
Byte - & word - swap a region wordcount long - words long