home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pctchnqs / 1990 / number6 / setcrc.fix < prev    next >
Text File  |  1990-12-14  |  459b  |  20 lines

  1.   /* then search for the signature */
  2.   if (buffer[i] == signature[state])
  3.   {
  4.     ++state;
  5.     if (signature[state] == 0)
  6.     {
  7.       ++i;           /* point to crc position */
  8.       crc_location += i;
  9.       ++i;          /* skip over crc position */
  10.       ++ finds; /* increment # of times found */
  11.       state = 0;  /* restart signature search */
  12.     }
  13.   }
  14.   else
  15.     state = 0;
  16.  
  17. }
  18. if (finds == 0)
  19.      crc_location += (long)num_bytes;
  20.