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

static tbyte_t GetThree ( void   )  [static]

Receive a three-byte integer (twenty-four bits) from the input

Returns:
the received integer

Definition at line 198 of file unarc.c.

References fp, and Status.

Referenced by GetHeader().

{
  tbyte_t u = 0;

  if (Status == EOF || feof (fp) || ferror (fp)) {
    Status = EOF;
    return 0;
  }
  else
    Status = 0;

  u = (tbyte_t) (fgetc (fp) & 0xff);
  u |= ((tbyte_t) fgetc (fp) & 0xff) << 8;
  u |= ((tbyte_t) fgetc (fp) & 0xff) << 16;

  return u;
}


Generated by  Doxygen 1.6.0   Back to index