Clean up whitespace in S/390 -tdep and -nat files.
[binutils-gdb.git] / libiberty / crc32.c
index 2171a3d1c7fbe9e7611fafdc36310b1c57a7c569..12d9be07cfd65d479aa01e92e2fc6dd8c29509b4 100644 (file)
@@ -1,5 +1,5 @@
 /* crc32.c
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2011 Free Software Foundation, Inc.
 
    This file is part of the libiberty library.
 
@@ -138,7 +138,8 @@ static const unsigned int crc32_table[] =
 
 /*
 
-@deftypefn Extension unsigned int crc32 (const unsigned char *@var{buf}, int @var{len}, unsigned int @var{init})
+@deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @
+  int @var{len}, unsigned int @var{init})
 
 Compute the 32-bit CRC of @var{buf} which has length @var{len}.  The
 starting value is @var{init}; this may be used to compute the CRC of
@@ -150,12 +151,25 @@ protocol for the @samp{qCRC} command.  In order to get the same
 results as gdb for a block of data, you must pass the first CRC
 parameter as @code{0xffffffff}.
 
+This CRC can be specified as:
+
+  Width  : 32
+  Poly   : 0x04c11db7
+  Init   : parameter, typically 0xffffffff
+  RefIn  : false
+  RefOut : false
+  XorOut : 0
+
+This differs from the "standard" CRC-32 algorithm in that the values
+are not reflected, and there is no final XOR value.  These differences
+make it easy to compose the values of multiple blocks.
+
 @end deftypefn
 
 */
 
 unsigned int
-crc32 (const unsigned char *buf, int len, unsigned int init)
+xcrc32 (const unsigned char *buf, int len, unsigned int init)
 {
   unsigned int crc = init;
   while (len--)