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

static word_t GetWord ( void   )  [static]

Receive a word (sixteen bits) from the input

Returns:
the received word

Definition at line 173 of file unarc.c.

References fp, and Status.

Referenced by GetHeader(), and GetStartPos().

{
  word_t u = 0;

  if (Status == EOF)
    return 0;

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

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

  return u;
}


Generated by  Doxygen 1.6.0   Back to index