Diff for /libaitcrc/src/pelco.c between versions 1.3 and 1.4

version 1.3, 2011/04/28 20:28:20 version 1.4, 2012/07/04 14:53:43
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 47  SUCH DAMAGE. Line 47  SUCH DAMAGE.
   
   
 /*  /*
 * crcPelco() Calculate Pelco D/P CRC * crcPelco() - Calculate Pelco D/P CRC
  *
  * @ver = Pelco protocol version (Dd | Pp)   * @ver = Pelco protocol version (Dd | Pp)
  * @pkt = Packet for calculate crc   * @pkt = Packet for calculate crc
 * return: crc for packet, if is 0 check and crc_GetErrno() ==  * return: crc for packet, if is 0 check and crc_GetErrno() == EINVAL
         Pelco protocol not supported          Pelco protocol not supported
  */   */
inline u_char crcPelco(u_char ver, u_char *pkt)inline u_char
 crcPelco(u_char ver, u_char *pkt)
 {  {
         register u_char i, crc;          register u_char i, crc;
   
           assert(pkt);
   
         switch (ver) {          switch (ver) {
                 case 'D':                  case 'D':
                 case 'd':                  case 'd':
Line 69  inline u_char crcPelco(u_char ver, u_char *pkt) Line 73  inline u_char crcPelco(u_char ver, u_char *pkt)
                         break;                          break;
                 default:                  default:
                         crc = 0;                          crc = 0;
                        crcSetErr(1, "crcAdler(): Invalid parameters!");                        crc_SetErr(EINVAL, "Invalid parameters!");
         }          }
   
         return crc;          return crc;

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>