Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

void ByteStream::write32 ( unsigned int  card32  )  [inherited]

Writes a four-bytes integer to a ByteStream. The integer most significant bytes are written first, regardless of the processor endianness.

Definition at line 535 of file ByteStream.cpp.

References ByteStream::writall().

Referenced by DjVmDir0::encode(), and DjVmDir::encode().

{
  unsigned char c[4];
  c[0] = (card>>24) & 0xff;
  c[1] = (card>>16) & 0xff;
  c[2] = (card>>8) & 0xff;
  c[3] = (card) & 0xff;
  if (writall((void*)c, sizeof(c)) != sizeof(c))
    G_THROW(strerror(errno));   //  (No error in the DjVuMessageFile)
}


Generated by  Doxygen 1.6.0   Back to index