testing/icgen/random_verschillende_resoluties_N-GenIC/gadget3_64/read_ic.c
void swap_Nbyte(char *data, int n, int m)
{
  int i, j;
  char old_data[16];

  if(swap_file != 8)
    {
      for(j = 0; j < n; j++)
	{
	  memcpy(&old_data[0], &data[j * m], m);
	  for(i = 0; i < m; i++)
	    {
	      data[j * m + i] = old_data[m - i - 1];
	    }
	}
    }
}
/*-----------------------------------------------------------------------------*/
/*---------------------- Routine to swap ENDIAN -------------------------------*/
/*-------- char *data:    Pointer to the data ---------------------------------*/
/*-------- int n:         Number of elements to swap --------------------------*/
/*-------- int m:         Size of single element to swap ----------------------*/
/*--------                int,float = 4 ---------------------------------------*/
/*--------                double    = 8 ---------------------------------------*/
/*-----------------------------------------------------------------------------*/
Routine to swap ENDIAN
char *data:    Pointer to the data
int n:         Number of elements to swap
int m:         Size of single element to swap
int,float = 4
double    = 8
Routine to swap ENDIAN char * data : Pointer to the data int n : Number of elements to swap int m : Size of single element to swap int float = 4 double = 8
void swap_Nbyte(char *data, int n, int m)
{
  int i, j;
  char old_data[16];
  if(swap_file != 8)
    {
      for(j = 0; j < n; j++)
	{
	  memcpy(&old_data[0], &data[j * m], m);
	  for(i = 0; i < m; i++)
	    {
	      data[j * m + i] = old_data[m - i - 1];
	    }
	}
    }
}
void swap_Nbyte ( char * data , int n , int m ) { int i , j ; char old_data [ 16 ] ; if ( swap_file != 8 ) { for ( j = 0 ; j < n ; j ++ ) { memcpy ( & old_data [ 0 ] , & data [ j * m ] , m ) ; for ( i = 0 ; i < m ; i ++ ) { data [ j * m + i ] = old_data [ m - i - 1 ] ; } } } }
Routine to swap ENDIAN
char *data:    Pointer to the data
int n:         Number of elements to swap
int m:         Size of single element to swap
int,float = 4
double    = 8
Routine to swap ENDIAN char * data : Pointer to the data int n : Number of elements to swap int m : Size of single element to swap int float = 4 double = 8