X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=libiberty%2Fcrc32.c;h=96b12b9b56a720b652dcd11ebd4d5a80b10cccc1;hb=c17e02e1b55b5e9cbdc6581f05bfec96dc8436f4;hp=c12916b5216a469d1b6a14e997aa72974783826f;hpb=bdc0e08dbcf16b52410ce016ab9ed036a32e7e2d;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/crc32.c b/libiberty/crc32.c index c12916b521..96b12b9b56 100644 --- a/libiberty/crc32.c +++ b/libiberty/crc32.c @@ -1,5 +1,5 @@ /* crc32.c - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2019 Free Software Foundation, Inc. This file is part of the libiberty library. @@ -33,15 +33,14 @@ #include "libiberty.h" -/* This table was generated by the following program. This matches - what gdb does. +/* This table was generated by the following program. #include int main () { - int i, j; + unsigned int i, j; unsigned int c; int table[256]; @@ -138,17 +137,17 @@ 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 data split across multiple buffers by passing the return value of each call as the @var{init} parameter of the next. -This is intended to match the CRC used by the @command{gdb} remote -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 is used by the @command{gdb} remote 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: