]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/crc-16.cc
fileutl: simple_buffer: Add write() and full() methods
[apt.git] / apt-pkg / contrib / crc-16.cc
index b300ed67e48275ff9dffc81ad6de90d1b2f89956..f5df2d8b13af258643249341d904c12ba79df0ed 100644 (file)
    Al Longyear <longyear@netcom.com>
    
    Modified by Jason Gunthorpe <jgg@debian.org> to fit the local coding
    Al Longyear <longyear@netcom.com>
    
    Modified by Jason Gunthorpe <jgg@debian.org> to fit the local coding
-   style, this code is belived to be in the Public Domain.
+   style, this code is believed to be in the Public Domain.
    
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
    
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include <config.h>
+
 #include <apt-pkg/crc-16.h>
                                                                        /*}}}*/
 
 #include <apt-pkg/crc-16.h>
                                                                        /*}}}*/
 
@@ -63,7 +65,7 @@ static unsigned short const crc16_table[256] =
 /* Recompute the FCS with one more character appended. */
 #define CalcFCS(fcs, c) (((fcs) >> 8) ^ crc16_table[((fcs) ^ (c)) & 0xff])
 unsigned short AddCRC16(unsigned short fcs, void const *Buf,
 /* Recompute the FCS with one more character appended. */
 #define CalcFCS(fcs, c) (((fcs) >> 8) ^ crc16_table[((fcs) ^ (c)) & 0xff])
 unsigned short AddCRC16(unsigned short fcs, void const *Buf,
-                       unsigned long len) 
+                       unsigned long long len)
 {
    unsigned char const *buf = (unsigned char const *)Buf;
    while (len--)
 {
    unsigned char const *buf = (unsigned char const *)Buf;
    while (len--)