testing/icgen/random_verschillende_resoluties_N-GenIC/gadget3_64/read_ic.c
void swap_header()
{
  swap_Nbyte((char *) &header.npart, 6, 4);
  swap_Nbyte((char *) &header.mass, 6, 8);
  swap_Nbyte((char *) &header.time, 1, 8);
  swap_Nbyte((char *) &header.redshift, 1, 8);
  swap_Nbyte((char *) &header.flag_sfr, 1, 4);
  swap_Nbyte((char *) &header.flag_feedback, 1, 4);
  swap_Nbyte((char *) &header.npartTotal, 6, 4);
  swap_Nbyte((char *) &header.flag_cooling, 1, 4);
  swap_Nbyte((char *) &header.num_files, 1, 4);
  swap_Nbyte((char *) &header.BoxSize, 1, 8);
  swap_Nbyte((char *) &header.Omega0, 1, 8);
  swap_Nbyte((char *) &header.OmegaLambda, 1, 8);
  swap_Nbyte((char *) &header.HubbleParam, 1, 8);
  swap_Nbyte((char *) &header.flag_stellarage, 1, 4);
  swap_Nbyte((char *) &header.flag_metals, 1, 4);
  swap_Nbyte((char *) &header.npartTotalHighWord, 6, 4);
  swap_Nbyte((char *) &header.flag_entropy_instead_u, 1, 4);
  swap_Nbyte((char *) &header.flag_doubleprecision, 1, 4);
#ifdef COSMIC_RAYS 
  swap_Nbyte((char *) &header.SpectralIndex_CR_Pop, NUMCRPOP, 8);
#endif
}
/*------------------------------------------------------------------*/
/*----------- procedure to swap header if needed -------------------*/
/*------------------------------------------------------------------*/
procedure to swap header if needed
procedure to swap header if needed
void swap_header()
{
  swap_Nbyte((char *) &header.npart, 6, 4);
  swap_Nbyte((char *) &header.mass, 6, 8);
  swap_Nbyte((char *) &header.time, 1, 8);
  swap_Nbyte((char *) &header.redshift, 1, 8);
  swap_Nbyte((char *) &header.flag_sfr, 1, 4);
  swap_Nbyte((char *) &header.flag_feedback, 1, 4);
  swap_Nbyte((char *) &header.npartTotal, 6, 4);
  swap_Nbyte((char *) &header.flag_cooling, 1, 4);
  swap_Nbyte((char *) &header.num_files, 1, 4);
  swap_Nbyte((char *) &header.BoxSize, 1, 8);
  swap_Nbyte((char *) &header.Omega0, 1, 8);
  swap_Nbyte((char *) &header.OmegaLambda, 1, 8);
  swap_Nbyte((char *) &header.HubbleParam, 1, 8);
  swap_Nbyte((char *) &header.flag_stellarage, 1, 4);
  swap_Nbyte((char *) &header.flag_metals, 1, 4);
  swap_Nbyte((char *) &header.npartTotalHighWord, 6, 4);
  swap_Nbyte((char *) &header.flag_entropy_instead_u, 1, 4);
  swap_Nbyte((char *) &header.flag_doubleprecision, 1, 4);
#ifdef COSMIC_RAYS 
  swap_Nbyte((char *) &header.SpectralIndex_CR_Pop, NUMCRPOP, 8);
#endif
}
void swap_header ( ) { swap_Nbyte ( ( char * ) & header . npart , 6 , 4 ) ; swap_Nbyte ( ( char * ) & header . mass , 6 , 8 ) ; swap_Nbyte ( ( char * ) & header . time , 1 , 8 ) ; swap_Nbyte ( ( char * ) & header . redshift , 1 , 8 ) ; swap_Nbyte ( ( char * ) & header . flag_sfr , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . flag_feedback , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . npartTotal , 6 , 4 ) ; swap_Nbyte ( ( char * ) & header . flag_cooling , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . num_files , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . BoxSize , 1 , 8 ) ; swap_Nbyte ( ( char * ) & header . Omega0 , 1 , 8 ) ; swap_Nbyte ( ( char * ) & header . OmegaLambda , 1 , 8 ) ; swap_Nbyte ( ( char * ) & header . HubbleParam , 1 , 8 ) ; swap_Nbyte ( ( char * ) & header . flag_stellarage , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . flag_metals , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . npartTotalHighWord , 6 , 4 ) ; swap_Nbyte ( ( char * ) & header . flag_entropy_instead_u , 1 , 4 ) ; swap_Nbyte ( ( char * ) & header . flag_doubleprecision , 1 , 4 ) ; #ifdef COSMIC_RAYS swap_Nbyte ( ( char * ) & header . SpectralIndex_CR_Pop , NUMCRPOP , 8 ) ; #endif }
procedure to swap header if needed
procedure to swap header if needed