DATRW++ library: seismic data I/O with multiple formats

◆ needswap()

bool datrw::mseed::needswap ( const unsigned char &  bytesex)

check bytesex

check for bytesec

Definition at line 192 of file mseedread.cc.

References datrw::util::cpu(), datrw::util::cpu_Intel, datrw::util::cpu_Motorola, datrw::util::cpu_unknown, datrw::mseed::SEED::sparc68000, and datrw::mseed::SEED::vax8086.

Referenced by main(), datrw::mseed::MiniSEEDRecord::read(), and datrw::mseed::MiniSEEDRecord::readheader().

193  {
194  // my CPU type
196  // file type
198  // file type
199  SEED::EByteOrder byteorder=SEED::EByteOrder(int(bytesex));
200  if (byteorder == SEED::vax8086)
201  { filesex=datrw::util::cpu_Intel; }
202  else if (byteorder == SEED::sparc68000)
203  { filesex=datrw::util::cpu_Motorola; }
204  bool retval=(filesex != mysex);
205  return(retval);
206  } // needswap(const unsigned char& bytesex)
Ecpu_type cpu()
check for my CPU model
Definition: bytesex.cc:73
Ecpu_type
Define different CPU type that are recognized.
Definition: bytesex.h:88
unknown CPU
Definition: bytesex.h:94
Motorola CPU.
Definition: bytesex.h:92
SPARC or 68000 byte order.
Definition: seedstructs.h:127
Intel CPU.
Definition: bytesex.h:90
VAX or 8086 byte order.
Definition: seedstructs.h:126
Here is the call graph for this function:
Here is the caller graph for this function: